From ea3345a03e344e6102456425c2a07e8d6b637510 Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Sat, 24 Jan 2026 20:30:42 +0800 Subject: [PATCH] Welcome in 2026 adding lot of features --- .gitignore | 2 +- configs/hooks.el | 25 +- configs/key-binding.el | 4 - configs/modes.el | 50 +- configs/project.el | 17 - .../aalto-dark-theme.el | 87 - .../aalto-light-theme.el | 168 - .../aliceblue-theme.el | 147 - .../color-theme-modern-0.0.3/andreas-theme.el | 220 - elpa/color-theme-modern-0.0.3/arjen-theme.el | 246 - .../beige-diff-theme.el | 63 - .../beige-eshell-theme.el | 59 - .../bharadwaj-slate-theme.el | 317 - .../bharadwaj-theme.el | 377 - elpa/color-theme-modern-0.0.3/billw-theme.el | 217 - .../black-on-gray-theme.el | 123 - .../blippblopp-theme.el | 99 - .../blue-erc-theme.el | 90 - .../blue-eshell-theme.el | 64 - .../blue-gnus-theme.el | 114 - .../blue-mood-theme.el | 136 - .../blue-sea-theme.el | 263 - .../calm-forest-theme.el | 174 - .../charcoal-black-theme.el | 303 - .../color-theme-modern-0.0.3/clarity-theme.el | 119 - .../color-theme-modern-0.0.3/classic-theme.el | 208 - elpa/color-theme-modern-0.0.3/cobalt-theme.el | 82 - .../color-theme-modern-autoloads.el | 1052 -- .../color-theme-modern-pkg.el | 10 - .../color-theme-modern.el | 30 - .../color-theme-modern-0.0.3/comidia-theme.el | 193 - .../dark-blue-theme.el | 439 - .../dark-blue2-theme.el | 626 - .../dark-erc-theme.el | 91 - .../dark-font-lock-theme.el | 57 - .../dark-gnus-theme.el | 114 - .../dark-green-theme.el | 85 - .../dark-info-theme.el | 50 - .../dark-laptop-theme.el | 177 - .../deep-blue-theme.el | 137 - elpa/color-theme-modern-0.0.3/desert-theme.el | 175 - .../digital-ofs1-theme.el | 518 - .../emacs-21-theme.el | 391 - .../emacs-nw-theme.el | 400 - .../euphoria-theme.el | 109 - .../feng-shui-theme.el | 88 - .../fischmeister-theme.el | 72 - elpa/color-theme-modern-0.0.3/gnome-theme.el | 56 - elpa/color-theme-modern-0.0.3/gnome2-theme.el | 105 - .../goldenrod-theme.el | 165 - elpa/color-theme-modern-0.0.3/gray1-theme.el | 98 - elpa/color-theme-modern-0.0.3/gray30-theme.el | 200 - .../color-theme-modern-0.0.3/greiner-theme.el | 100 - .../color-theme-modern-0.0.3/gtk-ide-theme.el | 63 - .../high-contrast-theme.el | 271 - elpa/color-theme-modern-0.0.3/hober-theme.el | 277 - .../color-theme-modern-0.0.3/infodoc-theme.el | 126 - .../jb-simple-theme.el | 329 - .../jedit-grey-theme.el | 64 - .../jonadabian-slate-theme.el | 158 - .../jonadabian-theme.el | 66 - .../jsc-dark-theme.el | 208 - .../jsc-light-theme.el | 175 - .../jsc-light2-theme.el | 185 - elpa/color-theme-modern-0.0.3/julie-theme.el | 432 - .../katester-theme.el | 271 - .../kingsajz-theme.el | 281 - .../late-night-theme.el | 214 - .../lawrence-theme.el | 278 - .../color-theme-modern-0.0.3/ld-dark-theme.el | 353 - elpa/color-theme-modern-0.0.3/lethe-theme.el | 440 - elpa/color-theme-modern-0.0.3/marine-theme.el | 123 - .../marquardt-theme.el | 149 - elpa/color-theme-modern-0.0.3/matrix-theme.el | 683 - .../midnight-theme.el | 64 - .../mistyday-theme.el | 101 - elpa/color-theme-modern-0.0.3/montz-theme.el | 196 - elpa/color-theme-modern-0.0.3/oswald-theme.el | 97 - elpa/color-theme-modern-0.0.3/parus-theme.el | 165 - .../color-theme-modern-0.0.3/pierson-theme.el | 70 - .../color-theme-modern-0.0.3/pok-wob-theme.el | 181 - .../color-theme-modern-0.0.3/pok-wog-theme.el | 167 - .../railscast-theme.el | 91 - .../ramangalahy-theme.el | 211 - .../raspopovic-theme.el | 105 - .../renegade-theme.el | 75 - .../color-theme-modern-0.0.3/resolve-theme.el | 193 - .../retro-green-theme.el | 60 - .../retro-orange-theme.el | 60 - .../robin-hood-theme.el | 114 - elpa/color-theme-modern-0.0.3/rotor-theme.el | 113 - .../color-theme-modern-0.0.3/ryerson-theme.el | 52 - .../salmon-diff-theme.el | 63 - .../salmon-font-lock-theme.el | 56 - .../scintilla-theme.el | 63 - elpa/color-theme-modern-0.0.3/shaman-theme.el | 115 - .../simple-1-theme.el | 55 - .../sitaramv-nt-theme.el | 99 - .../sitaramv-solaris-theme.el | 210 - elpa/color-theme-modern-0.0.3/snow-theme.el | 139 - .../color-theme-modern-0.0.3/snowish-theme.el | 267 - .../standard-ediff-theme.el | 60 - .../standard-theme.el | 273 - .../color-theme-modern-0.0.3/subdued-theme.el | 110 - .../subtle-blue-theme.el | 437 - .../subtle-hacker-theme.el | 156 - .../taming-mr-arneson-theme.el | 178 - elpa/color-theme-modern-0.0.3/taylor-theme.el | 129 - .../tty-dark-theme.el | 88 - .../vim-colors-theme.el | 125 - .../whateveryouwant-theme.el | 410 - elpa/color-theme-modern-0.0.3/wheat-theme.el | 274 - .../word-perfect-theme.el | 154 - elpa/color-theme-modern-0.0.3/xemacs-theme.el | 121 - elpa/color-theme-modern-0.0.3/xp-theme.el | 191 - elpa/cond-let-0.2.1/cond-let-autoloads.el | 28 - elpa/cond-let-0.2.1/cond-let-pkg.el | 8 - elpa/cond-let-0.2.1/cond-let.el | 534 - elpa/dash-2.20.0/dash-autoloads.el | 83 - elpa/dash-2.20.0/dash-pkg.el | 10 - elpa/dash-2.20.0/dash.el | 4165 ----- elpa/dash-2.20.0/dash.info | 4954 ----- elpa/dash-2.20.0/dir | 18 - .../edit-indirect-autoloads.el | 60 - .../edit-indirect-0.1.13/edit-indirect-pkg.el | 9 - elpa/edit-indirect-0.1.13/edit-indirect.el | 435 - elpa/epl-0.9/epl-autoloads.el | 22 - elpa/epl-0.9/epl-pkg.el | 2 - elpa/epl-0.9/epl.el | 711 - elpa/flycheck-35.0/flycheck-autoloads.el | 306 - elpa/flycheck-35.0/flycheck-buttercup.el | 157 - elpa/flycheck-35.0/flycheck-ert.el | 451 - elpa/flycheck-35.0/flycheck-pkg.el | 12 - elpa/flycheck-35.0/flycheck.el | 13034 ------------- elpa/gnupg/pubring.kbx | Bin 4169 -> 0 bytes elpa/gnupg/trustdb.gpg | Bin 1200 -> 0 bytes elpa/llama-1.0.3/.dir-locals.el | 8 - elpa/llama-1.0.3/llama-autoloads.el | 112 - elpa/llama-1.0.3/llama-pkg.el | 9 - elpa/llama-1.0.3/llama.el | 572 - elpa/mmm-mode-0.5.11/dir | 18 - elpa/mmm-mode-0.5.11/mmm-auto.el | 178 - elpa/mmm-mode-0.5.11/mmm-class.el | 339 - elpa/mmm-mode-0.5.11/mmm-cmds.el | 442 - elpa/mmm-mode-0.5.11/mmm-compat.el | 130 - elpa/mmm-mode-0.5.11/mmm-cweb.el | 100 - elpa/mmm-mode-0.5.11/mmm-defaults.el | 62 - elpa/mmm-mode-0.5.11/mmm-erb.el | 243 - elpa/mmm-mode-0.5.11/mmm-mason.el | 175 - elpa/mmm-mode-0.5.11/mmm-mode-autoloads.el | 115 - elpa/mmm-mode-0.5.11/mmm-mode-pkg.el | 11 - elpa/mmm-mode-0.5.11/mmm-mode.el | 310 - elpa/mmm-mode-0.5.11/mmm-myghty.el | 187 - elpa/mmm-mode-0.5.11/mmm-noweb.el | 421 - elpa/mmm-mode-0.5.11/mmm-region.el | 932 - elpa/mmm-mode-0.5.11/mmm-rpm.el | 80 - elpa/mmm-mode-0.5.11/mmm-sample.el | 440 - elpa/mmm-mode-0.5.11/mmm-univ.el | 64 - elpa/mmm-mode-0.5.11/mmm-utils.el | 162 - elpa/mmm-mode-0.5.11/mmm-vars.el | 1148 -- elpa/mmm-mode-0.5.11/mmm.info | 2086 --- elpa/nix-mode-1.5.0/nix-build.el | 33 - elpa/nix-mode-1.5.0/nix-drv-mode.el | 50 - elpa/nix-mode-1.5.0/nix-edit.el | 39 - elpa/nix-mode-1.5.0/nix-flake.el | 575 - elpa/nix-mode-1.5.0/nix-format.el | 55 - elpa/nix-mode-1.5.0/nix-instantiate.el | 95 - elpa/nix-mode-1.5.0/nix-log.el | 41 - elpa/nix-mode-1.5.0/nix-mode-autoloads.el | 285 - elpa/nix-mode-1.5.0/nix-mode-pkg.el | 11 - elpa/nix-mode-1.5.0/nix-mode.el | 1059 -- elpa/nix-mode-1.5.0/nix-prettify-mode.el | 181 - elpa/nix-mode-1.5.0/nix-repl.el | 222 - elpa/nix-mode-1.5.0/nix-search.el | 135 - elpa/nix-mode-1.5.0/nix-shebang.el | 46 - elpa/nix-mode-1.5.0/nix-shell.el | 294 - elpa/nix-mode-1.5.0/nix-store.el | 232 - elpa/nix-mode-1.5.0/nix.el | 368 - elpa/pkg-info-0.6/pkg-info-autoloads.el | 127 - elpa/pkg-info-0.6/pkg-info-pkg.el | 2 - elpa/pkg-info-0.6/pkg-info.el | 331 - elpa/ssass-mode-0.2/ssass-mode-autoloads.el | 27 - elpa/ssass-mode-0.2/ssass-mode-pkg.el | 2 - elpa/ssass-mode-0.2/ssass-mode.el | 242 - .../typescript-mode-autoloads.el | 49 - .../typescript-mode-pkg.el | 8 - .../typescript-mode-test-utilities.el | 63 - elpa/typescript-mode-0.4/typescript-mode.el | 2985 --- .../vue-html-mode-autoloads.el | 27 - elpa/vue-html-mode-0.2/vue-html-mode-pkg.el | 2 - elpa/vue-html-mode-0.2/vue-html-mode.el | 133 - elpa/vue-mode-0.4/vue-mode-autoloads.el | 38 - elpa/vue-mode-0.4/vue-mode-pkg.el | 2 - elpa/vue-mode-0.4/vue-mode.el | 254 - elpa/web-mode-17.3.22.signed | 1 - elpa/web-mode-17.3.22/.github/CONTRIBUTING.md | 9 - elpa/web-mode-17.3.22/.github/FUNDING.yml | 2 - elpa/web-mode-17.3.22/README.md | 16 - elpa/web-mode-17.3.22/web-mode-autoloads.el | 39 - elpa/web-mode-17.3.22/web-mode-pkg.el | 2 - elpa/web-mode-17.3.22/web-mode.el | 15141 ---------------- init.el | 38 +- stuff/edit-indirect.el | 388 - stuff/edje-mode.el | 512 - stuff/find-cmd.el | 242 - stuff/flymake-cursor.el | 167 - stuff/go-mode-autoloads.el | 98 - stuff/go-mode.el | 2009 -- stuff/go.el | 1 - stuff/ssass-mode.el | 242 - stuff/vue-html-mode.el | 131 - 211 files changed, 58 insertions(+), 80682 deletions(-) delete mode 100644 configs/project.el delete mode 100644 elpa/color-theme-modern-0.0.3/aalto-dark-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/aalto-light-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/aliceblue-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/andreas-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/arjen-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/beige-diff-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/beige-eshell-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/bharadwaj-slate-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/bharadwaj-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/billw-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/black-on-gray-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/blippblopp-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/blue-erc-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/blue-eshell-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/blue-gnus-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/blue-mood-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/blue-sea-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/calm-forest-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/charcoal-black-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/clarity-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/classic-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/cobalt-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/color-theme-modern-autoloads.el delete mode 100644 elpa/color-theme-modern-0.0.3/color-theme-modern-pkg.el delete mode 100644 elpa/color-theme-modern-0.0.3/color-theme-modern.el delete mode 100644 elpa/color-theme-modern-0.0.3/comidia-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/dark-blue-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/dark-blue2-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/dark-erc-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/dark-font-lock-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/dark-gnus-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/dark-green-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/dark-info-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/dark-laptop-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/deep-blue-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/desert-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/digital-ofs1-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/emacs-21-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/emacs-nw-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/euphoria-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/feng-shui-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/fischmeister-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/gnome-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/gnome2-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/goldenrod-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/gray1-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/gray30-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/greiner-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/gtk-ide-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/high-contrast-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/hober-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/infodoc-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/jb-simple-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/jedit-grey-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/jonadabian-slate-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/jonadabian-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/jsc-dark-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/jsc-light-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/jsc-light2-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/julie-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/katester-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/kingsajz-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/late-night-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/lawrence-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/ld-dark-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/lethe-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/marine-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/marquardt-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/matrix-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/midnight-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/mistyday-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/montz-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/oswald-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/parus-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/pierson-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/pok-wob-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/pok-wog-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/railscast-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/ramangalahy-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/raspopovic-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/renegade-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/resolve-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/retro-green-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/retro-orange-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/robin-hood-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/rotor-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/ryerson-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/salmon-diff-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/salmon-font-lock-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/scintilla-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/shaman-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/simple-1-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/sitaramv-nt-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/sitaramv-solaris-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/snow-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/snowish-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/standard-ediff-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/standard-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/subdued-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/subtle-blue-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/subtle-hacker-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/taming-mr-arneson-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/taylor-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/tty-dark-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/vim-colors-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/whateveryouwant-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/wheat-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/word-perfect-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/xemacs-theme.el delete mode 100644 elpa/color-theme-modern-0.0.3/xp-theme.el delete mode 100644 elpa/cond-let-0.2.1/cond-let-autoloads.el delete mode 100644 elpa/cond-let-0.2.1/cond-let-pkg.el delete mode 100644 elpa/cond-let-0.2.1/cond-let.el delete mode 100644 elpa/dash-2.20.0/dash-autoloads.el delete mode 100644 elpa/dash-2.20.0/dash-pkg.el delete mode 100644 elpa/dash-2.20.0/dash.el delete mode 100644 elpa/dash-2.20.0/dash.info delete mode 100644 elpa/dash-2.20.0/dir delete mode 100644 elpa/edit-indirect-0.1.13/edit-indirect-autoloads.el delete mode 100644 elpa/edit-indirect-0.1.13/edit-indirect-pkg.el delete mode 100644 elpa/edit-indirect-0.1.13/edit-indirect.el delete mode 100644 elpa/epl-0.9/epl-autoloads.el delete mode 100644 elpa/epl-0.9/epl-pkg.el delete mode 100644 elpa/epl-0.9/epl.el delete mode 100644 elpa/flycheck-35.0/flycheck-autoloads.el delete mode 100644 elpa/flycheck-35.0/flycheck-buttercup.el delete mode 100644 elpa/flycheck-35.0/flycheck-ert.el delete mode 100644 elpa/flycheck-35.0/flycheck-pkg.el delete mode 100644 elpa/flycheck-35.0/flycheck.el delete mode 100644 elpa/gnupg/pubring.kbx delete mode 100644 elpa/gnupg/trustdb.gpg delete mode 100644 elpa/llama-1.0.3/.dir-locals.el delete mode 100644 elpa/llama-1.0.3/llama-autoloads.el delete mode 100644 elpa/llama-1.0.3/llama-pkg.el delete mode 100644 elpa/llama-1.0.3/llama.el delete mode 100644 elpa/mmm-mode-0.5.11/dir delete mode 100644 elpa/mmm-mode-0.5.11/mmm-auto.el delete mode 100644 elpa/mmm-mode-0.5.11/mmm-class.el delete mode 100644 elpa/mmm-mode-0.5.11/mmm-cmds.el delete mode 100644 elpa/mmm-mode-0.5.11/mmm-compat.el delete mode 100644 elpa/mmm-mode-0.5.11/mmm-cweb.el delete mode 100644 elpa/mmm-mode-0.5.11/mmm-defaults.el delete mode 100644 elpa/mmm-mode-0.5.11/mmm-erb.el delete mode 100644 elpa/mmm-mode-0.5.11/mmm-mason.el delete mode 100644 elpa/mmm-mode-0.5.11/mmm-mode-autoloads.el delete mode 100644 elpa/mmm-mode-0.5.11/mmm-mode-pkg.el delete mode 100644 elpa/mmm-mode-0.5.11/mmm-mode.el delete mode 100644 elpa/mmm-mode-0.5.11/mmm-myghty.el delete mode 100644 elpa/mmm-mode-0.5.11/mmm-noweb.el delete mode 100644 elpa/mmm-mode-0.5.11/mmm-region.el delete mode 100644 elpa/mmm-mode-0.5.11/mmm-rpm.el delete mode 100644 elpa/mmm-mode-0.5.11/mmm-sample.el delete mode 100644 elpa/mmm-mode-0.5.11/mmm-univ.el delete mode 100644 elpa/mmm-mode-0.5.11/mmm-utils.el delete mode 100644 elpa/mmm-mode-0.5.11/mmm-vars.el delete mode 100644 elpa/mmm-mode-0.5.11/mmm.info delete mode 100644 elpa/nix-mode-1.5.0/nix-build.el delete mode 100644 elpa/nix-mode-1.5.0/nix-drv-mode.el delete mode 100644 elpa/nix-mode-1.5.0/nix-edit.el delete mode 100644 elpa/nix-mode-1.5.0/nix-flake.el delete mode 100644 elpa/nix-mode-1.5.0/nix-format.el delete mode 100644 elpa/nix-mode-1.5.0/nix-instantiate.el delete mode 100644 elpa/nix-mode-1.5.0/nix-log.el delete mode 100644 elpa/nix-mode-1.5.0/nix-mode-autoloads.el delete mode 100644 elpa/nix-mode-1.5.0/nix-mode-pkg.el delete mode 100644 elpa/nix-mode-1.5.0/nix-mode.el delete mode 100644 elpa/nix-mode-1.5.0/nix-prettify-mode.el delete mode 100644 elpa/nix-mode-1.5.0/nix-repl.el delete mode 100644 elpa/nix-mode-1.5.0/nix-search.el delete mode 100644 elpa/nix-mode-1.5.0/nix-shebang.el delete mode 100644 elpa/nix-mode-1.5.0/nix-shell.el delete mode 100644 elpa/nix-mode-1.5.0/nix-store.el delete mode 100644 elpa/nix-mode-1.5.0/nix.el delete mode 100644 elpa/pkg-info-0.6/pkg-info-autoloads.el delete mode 100644 elpa/pkg-info-0.6/pkg-info-pkg.el delete mode 100644 elpa/pkg-info-0.6/pkg-info.el delete mode 100644 elpa/ssass-mode-0.2/ssass-mode-autoloads.el delete mode 100644 elpa/ssass-mode-0.2/ssass-mode-pkg.el delete mode 100644 elpa/ssass-mode-0.2/ssass-mode.el delete mode 100644 elpa/typescript-mode-0.4/typescript-mode-autoloads.el delete mode 100644 elpa/typescript-mode-0.4/typescript-mode-pkg.el delete mode 100644 elpa/typescript-mode-0.4/typescript-mode-test-utilities.el delete mode 100644 elpa/typescript-mode-0.4/typescript-mode.el delete mode 100644 elpa/vue-html-mode-0.2/vue-html-mode-autoloads.el delete mode 100644 elpa/vue-html-mode-0.2/vue-html-mode-pkg.el delete mode 100644 elpa/vue-html-mode-0.2/vue-html-mode.el delete mode 100644 elpa/vue-mode-0.4/vue-mode-autoloads.el delete mode 100644 elpa/vue-mode-0.4/vue-mode-pkg.el delete mode 100644 elpa/vue-mode-0.4/vue-mode.el delete mode 100644 elpa/web-mode-17.3.22.signed delete mode 100644 elpa/web-mode-17.3.22/.github/CONTRIBUTING.md delete mode 100644 elpa/web-mode-17.3.22/.github/FUNDING.yml delete mode 100644 elpa/web-mode-17.3.22/README.md delete mode 100644 elpa/web-mode-17.3.22/web-mode-autoloads.el delete mode 100644 elpa/web-mode-17.3.22/web-mode-pkg.el delete mode 100644 elpa/web-mode-17.3.22/web-mode.el delete mode 100644 stuff/edit-indirect.el delete mode 100644 stuff/edje-mode.el delete mode 100644 stuff/find-cmd.el delete mode 100644 stuff/flymake-cursor.el delete mode 100644 stuff/go-mode-autoloads.el delete mode 100644 stuff/go-mode.el delete mode 160000 stuff/go.el delete mode 100644 stuff/ssass-mode.el delete mode 100644 stuff/vue-html-mode.el diff --git a/.gitignore b/.gitignore index 599fc14..36a7586 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -elpa/archives +elpa eshell backup/ *.elc diff --git a/configs/hooks.el b/configs/hooks.el index d07aa65..ff59073 100644 --- a/configs/hooks.el +++ b/configs/hooks.el @@ -1,20 +1,20 @@ ; Delete trailing whitespaces on save -(add-hook 'write-file-hooks 'delete-trailing-whitespace) +(add-hook 'before-save-hook 'delete-trailing-whitespace) ;; Mode to collapse code block (add-hook 'c-mode-common-hook (lambda () (hs-minor-mode 1))) -(add-hook 'lisp-mode-hooks (lambda () (hs-minor-mode 1))) -(add-hook 'java-mode-hooks (lambda () (hs-minor-mode 1))) -(add-hook 'python-mode-hooks (lambda () (hs-minor-mode 1))) +(add-hook 'lisp-mode-hook (lambda () (hs-minor-mode 1))) +(add-hook 'java-mode-hook (lambda () (hs-minor-mode 1))) +(add-hook 'python-mode-hook (lambda () (hs-minor-mode 1))) ; Auto insert C/C++ header guard -(add-hook 'find-file-hooks +(add-hook 'find-file-hook (lambda () (when (and (memq major-mode '(c-mode c++-mode)) (equal (point-min) (point-max)) (string-match ".*\\.hh?" (buffer-file-name))) (insert-header-guard) (goto-line 3) (insert "\n")))) -(add-hook 'find-file-hooks +(add-hook 'find-file-hook (lambda () (when (and (memq major-mode '(c-mode c++-mode)) (equal (point-min) (point-max)) (string-match ".*\\.cc?" (buffer-file-name))) (insert-header-inclusion)))) @@ -28,18 +28,7 @@ (insert-shebang-if-empty "/usr/bin/ruby"))) ; Golang +; Modern Go configuration now in packages.el using eglot and go-mode (add-hook 'go-mode-hook (lambda () (set (make-local-variable 'compile-command) "go build"))) - -(add-hook 'go-mode-hook - (lambda () - (when (buffer-empty-p) - (save-excursion - (goto-char (point-min)) - (insert "package \n\nimport (\n\t\n)\n"))))) - -(add-hook 'before-save-hook 'gofmt-before-save) - -(eval-after-load "go-mode" - '(require 'flymake-go)) diff --git a/configs/key-binding.el b/configs/key-binding.el index 4133af7..54e2f9d 100644 --- a/configs/key-binding.el +++ b/configs/key-binding.el @@ -41,10 +41,6 @@ (global-set-key (kbd "C-c k") 'kill-this-buffer) (put 'narrow-to-region 'disabled nil) -;; Magit -(global-set-key (kbd "C-x g") 'magit-status) -(global-set-key (kbd "C-x M-g") 'magit-dispatch-popup) - ;; Don't shift-selection (setq shift-select-mode nil) diff --git a/configs/modes.el b/configs/modes.el index 065dc93..eb2adad 100644 --- a/configs/modes.el +++ b/configs/modes.el @@ -18,39 +18,34 @@ (add-to-list 'auto-mode-alist '("\\.bbclass$" . conf-mode)) (add-to-list 'auto-mode-alist '("\\.bbappend$" . conf-mode)) -;; Go mode -(require 'go-mode-autoloads) - ;; Changelog mode (add-to-list 'auto-mode-alist '("COMMIT_EDITMSG" . change-log-mode)) -;; Edje-mode -(require 'edje-mode) -(add-to-list 'auto-mode-alist '("\\.edc$" . edje-mode)) - ;; web-mode -(require 'web-mode) -(add-to-list 'auto-mode-alist '("\\.svelte$" . web-mode)) -(setq web-mode-code-indent-offset 4) -(setq web-mode-css-indent-offset 4) -(setq web-mode-markup-indent-offset 4) -(setq web-mode-script-padding 4) -(setq web-mode-style-padding 4) -(setq web-mode-void-elements - '("area" "base" "br" "command" "embed" "hr" "img" "input" "keygen" - "link" "meta" "param" "source" "track" "wbr" "tmpl_var")) +;; Now configured in packages.el with LSP support and prettier auto-formatting + ;(require 'web-mode) + ;(add-to-list 'auto-mode-alist '("\\.svelte$" . web-mode)) + ;(setq web-mode-code-indent-offset 4) + ;(setq web-mode-css-indent-offset 4) + ;(setq web-mode-markup-indent-offset 4) + ;(setq web-mode-script-padding 4) + ;(setq web-mode-style-padding 4) + ;(setq web-mode-void-elements + ; '("area" "base" "br" "command" "embed" "hr" "img" "input" "keygen" + ; "link" "meta" "param" "source" "track" "wbr" "tmpl_var")) ;; Vue.js-mode (require 'vue-mode) (add-to-list 'auto-mode-alist '("\\.vue$" . vue-mode)) -;(setq mmm-js-mode-enter-hook (lambda () (setq syntax-ppss-table nil))) -;(setq mmm-typescript-mode-enter-hook (lambda () (setq syntax-ppss-table nil))) + ;(setq mmm-js-mode-enter-hook (lambda () (setq syntax-ppss-table nil))) + ;(setq mmm-typescript-mode-enter-hook (lambda () (setq syntax-ppss-table nil))) (defun fix-mmm-syntax () (save-restriction (setq-local syntax-ppss-table typescript-mode-syntax-table) )) (add-hook 'mmm-typescript-mode-enter-hook 'fix-mmm-syntax) -(setq js-indent-level 2) +;; js-indent-level now configured in packages.el (set to 4 spaces) +;(setq js-indent-level 2) (setq vue-html-extra-indent 2) (setq-default indent-tabs-mode nil) @@ -93,7 +88,6 @@ ) ;; Org-mode -;(require 'org-install) (add-to-list 'auto-mode-alist '("\\.org$" . org-mode)) (define-key global-map "\C-cl" 'org-store-link) (define-key global-map "\C-ca" 'org-agenda) @@ -107,17 +101,3 @@ ;; Markdown-mode (add-to-list 'auto-mode-alist '("\\.md$" . markdown-mode)) - -;; Python-mode -;(when (load "flymake" t) -; (defun flymake-pyflakes-init () -; (let* ((temp-file (flymake-init-create-temp-buffer-copy -; 'flymake-create-temp-inplace)) -; (local-file (file-relative-name -; temp-file -; (file-name-directory buffer-file-name)))) -; (list "pyflakes" (list local-file)))) -; -; (add-to-list 'flymake-allowed-file-name-masks -; '("\\.py\\'" flymake-pyflakes-init))) -;(add-hook 'find-file-hook 'flymake-find-file-hook) diff --git a/configs/project.el b/configs/project.el deleted file mode 100644 index 9df1e67..0000000 --- a/configs/project.el +++ /dev/null @@ -1,17 +0,0 @@ -(setq project-roots - `(("Django project" - :root-contains-files ("manage.py") - :filename-regex ,(regexify-ext-list '(py html css js sh)) - :exclude-paths '("contrib")))) - -(global-set-key (kbd "C-c p f") 'project-root-find-file) -(global-set-key (kbd "C-c p g") 'project-root-grep) -(global-set-key (kbd "C-c p a") 'project-root-ack) -(global-set-key (kbd "C-c p d") 'project-root-goto-root) -(global-set-key (kbd "C-c p l") 'project-root-browse-seen-projects) - -(global-set-key (kbd "C-c p s") - (lambda () (interactive) - (with-project-root - (ansi-term (getenv "SHELL") - (concat (car project-details) "-shell"))) diff --git a/elpa/color-theme-modern-0.0.3/aalto-dark-theme.el b/elpa/color-theme-modern-0.0.3/aalto-dark-theme.el deleted file mode 100644 index 3ba9408..0000000 --- a/elpa/color-theme-modern-0.0.3/aalto-dark-theme.el +++ /dev/null @@ -1,87 +0,0 @@ -;;; aalto-dark-theme.el --- aalto-dark theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of aalto-dark theme from `color-themes' - -;;; Code: - -(deftheme aalto-dark - "aalto-dark theme") - -(custom-theme-set-faces - 'aalto-dark - - '(default ((t (:background "DeepSkyBlue3" :foreground "white")))) - '(mouse ((t (:foreground "black")))) - '(cursor ((t (:background "yellow")))) - '(border ((t (:foreground "black")))) - - '(bold ((t (:bold t :background "blue3" :foreground "white")))) - '(bold-italic ((t (:italic t :bold t :foreground "blue3")))) - '(calendar-today-face ((t (:underline t)))) - '(diary-face ((t (:foreground "red")))) - '(font-lock-builtin-face ((t (:foreground "LightSteelBlue")))) - '(font-lock-comment-face ((t (:foreground "OrangeRed")))) - '(font-lock-constant-face ((t (:foreground "Aquamarine")))) - '(font-lock-function-name-face ((t (:foreground "LightSkyBlue")))) - '(font-lock-keyword-face ((t (:foreground "Cyan")))) - '(font-lock-string-face ((t (:foreground "LightSalmon")))) - '(font-lock-type-face ((t (:foreground "PaleGreen")))) - '(font-lock-variable-name-face ((t (:foreground "LightGoldenrod")))) - '(font-lock-warning-face ((t (:bold t :foreground "Pink")))) - '(highlight ((t (:background "blue3" :foreground "white")))) - '(holiday-face ((t (:background "pink")))) - '(info-menu-5 ((t (:underline t)))) - '(info-node ((t (:italic t :bold t)))) - '(info-xref ((t (:bold t)))) - '(italic ((t (:italic t :background "gray")))) - '(message-cited-text-face ((t (:foreground "red")))) - '(message-header-cc-face ((t (:bold t :foreground "green4")))) - '(message-header-name-face ((t (:foreground "DarkGreen")))) - '(message-header-newsgroups-face ((t (:italic t :bold t :foreground "yellow")))) - '(message-header-other-face ((t (:foreground "#b00000")))) - '(message-header-subject-face ((t (:foreground "green3")))) - '(message-header-to-face ((t (:bold t :foreground "green2")))) - '(message-header-xheader-face ((t (:foreground "blue")))) - '(message-mml-face ((t (:foreground "ForestGreen")))) - '(message-separator-face ((t (:foreground "blue3")))) - '(modeline ((t (:background "white" :foreground "DeepSkyBlue3")))) - '(modeline-buffer-id ((t (:background "white" :foreground "DeepSkyBlue3")))) - '(modeline-mousable ((t (:background "white" :foreground "DeepSkyBlue3")))) - '(modeline-mousable-minor-mode ((t (:background "white" :foreground "DeepSkyBlue3")))) - '(region ((t (:background "gray")))) - '(secondary-selection ((t (:background "darkslateblue")))) - '(show-paren-match-face ((t (:background "turquoise")))) - '(show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) - '(underline ((t (:underline t))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'aalto-dark) - -;;; aalto-dark-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/aalto-light-theme.el b/elpa/color-theme-modern-0.0.3/aalto-light-theme.el deleted file mode 100644 index bff5fbe..0000000 --- a/elpa/color-theme-modern-0.0.3/aalto-light-theme.el +++ /dev/null @@ -1,168 +0,0 @@ -;;; aalto-light-theme.el --- aalto-light theme - -;; Copyright (C) 2001 Jari Aalto -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of aalto-light theme from `color-themes' - -;;; Code: - -(deftheme aalto-light - "aalto-light theme") - -(custom-theme-set-faces - 'aalto-light - - '(default ((t (:background "#FFFFE0" :foreground "DarkSlateGray4")))) - '(mouse ((t (:foreground "LawnGreen")))) - '(cursor ((t (:background "black")))) - '(border ((t (:foreground "black")))) - - '(gnus-mouse-face ((t (:background "darkseagreen2")))) - '(list-matching-lines-face ((t (:bold t)))) - '(tinyreplace-:face ((t (:background "darkseagreen2")))) - '(view-highlight-face ((t (:background "darkseagreen2")))) - - '(bold ((t (:bold t)))) - '(bold-italic ((t (:italic t :bold t)))) - '(calendar-today-face ((t (:underline t)))) - '(cvs-filename-face ((t (:foreground "blue4")))) - '(cvs-handled-face ((t (:foreground "pink")))) - '(cvs-header-face ((t (:bold t :foreground "blue4")))) - '(cvs-marked-face ((t (:bold t :foreground "green3")))) - '(cvs-msg-face ((t (:italic t)))) - '(cvs-need-action-face ((t (:foreground "orange")))) - '(cvs-unknown-face ((t (:foreground "red")))) - '(diary-face ((t (:foreground "red")))) - '(eshell-test-failed-face ((t (:bold t :foreground "OrangeRed")))) - '(eshell-test-ok-face ((t (:bold t :foreground "Green")))) - '(font-lock-builtin-face ((t (:foreground "Orchid")))) - '(font-lock-comment-face ((t (:foreground "Firebrick")))) - '(font-lock-constant-face ((t (:foreground "CadetBlue")))) - '(font-lock-function-name-face ((t (:foreground "Blue")))) - '(font-lock-keyword-face ((t (:foreground "Purple")))) - '(font-lock-string-face ((t (:foreground "RosyBrown")))) - '(font-lock-type-face ((t (:foreground "ForestGreen")))) - '(font-lock-variable-name-face ((t (:foreground "DarkGoldenrod")))) - '(font-lock-warning-face ((t (:bold t :foreground "Red")))) - '(gnus-emphasis-bold ((t (:bold t)))) - '(gnus-emphasis-bold-italic ((t (:italic t :bold t)))) - '(gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) - '(gnus-emphasis-italic ((t (:italic t)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(gnus-emphasis-underline-bold ((t (:underline t :bold t)))) - '(gnus-emphasis-underline-bold-italic ((t (:underline t :italic t :bold t)))) - '(gnus-emphasis-underline-italic ((t (:underline t :italic t)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "DeepPink3")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "DeepPink3")))) - '(gnus-group-mail-2-empty-face ((t (:foreground "HotPink3")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "HotPink3")))) - '(gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "magenta4")))) - '(gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "DeepPink4")))) - '(gnus-group-news-1-empty-face ((t (:foreground "ForestGreen")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "ForestGreen")))) - '(gnus-group-news-2-empty-face ((t (:foreground "CadetBlue4")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "CadetBlue4")))) - '(gnus-group-news-3-empty-face ((t (nil)))) - '(gnus-group-news-3-face ((t (:bold t)))) - '(gnus-group-news-4-empty-face ((t (nil)))) - '(gnus-group-news-4-face ((t (:bold t)))) - '(gnus-group-news-5-empty-face ((t (nil)))) - '(gnus-group-news-5-face ((t (:bold t)))) - '(gnus-group-news-6-empty-face ((t (nil)))) - '(gnus-group-news-6-face ((t (:bold t)))) - '(gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "DarkGreen")))) - '(gnus-header-content-face ((t (:italic t :foreground "indianred4")))) - '(gnus-header-from-face ((t (:foreground "red3")))) - '(gnus-header-name-face ((t (:foreground "maroon")))) - '(gnus-header-newsgroups-face ((t (:italic t :foreground "MidnightBlue")))) - '(gnus-header-subject-face ((t (:foreground "red4")))) - '(gnus-signature-face ((t (:italic t)))) - '(gnus-splash-face ((t (:foreground "Brown")))) - '(gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "RoyalBlue")))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "DarkGreen")))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "firebrick")))) - '(gnus-summary-high-unread-face ((t (:bold t)))) - '(gnus-summary-low-ancient-face ((t (:italic t :foreground "RoyalBlue")))) - '(gnus-summary-low-read-face ((t (:italic t :foreground "DarkGreen")))) - '(gnus-summary-low-ticked-face ((t (:italic t :foreground "firebrick")))) - '(gnus-summary-low-unread-face ((t (:italic t)))) - '(gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) - '(gnus-summary-normal-read-face ((t (:foreground "DarkGreen")))) - '(gnus-summary-normal-ticked-face ((t (:foreground "firebrick")))) - '(gnus-summary-normal-unread-face ((t (nil)))) - '(gnus-summary-selected-face ((t (:underline t)))) - '(highlight ((t (:background "darkseagreen2")))) - '(holiday-face ((t (:background "pink")))) - '(info-menu-5 ((t (:underline t)))) - '(info-node ((t (:italic t :bold t)))) - '(info-xref ((t (:bold t)))) - '(italic ((t (:italic t)))) - '(message-cited-text-face ((t (:foreground "red")))) - '(message-header-cc-face ((t (:foreground "MidnightBlue")))) - '(message-header-name-face ((t (:foreground "cornflower blue")))) - '(message-header-newsgroups-face ((t (:italic t :bold t :foreground "blue4")))) - '(message-header-other-face ((t (:foreground "steel blue")))) - '(message-header-subject-face ((t (:bold t :foreground "navy blue")))) - '(message-header-to-face ((t (:bold t :foreground "MidnightBlue")))) - '(message-header-xheader-face ((t (:foreground "blue")))) - '(message-mml-face ((t (:foreground "ForestGreen")))) - '(message-separator-face ((t (:foreground "brown")))) - '(modeline ((t (:background "black" :foreground "white")))) - '(modeline-buffer-id ((t (:background "black" :foreground "white")))) - '(modeline-mousable ((t (:background "black" :foreground "white")))) - '(modeline-mousable-minor-mode ((t (:background "black" :foreground "white")))) - '(region ((t (:background "gray")))) - '(secondary-selection ((t (:background "paleturquoise")))) - '(sgml-comment-face ((t (:foreground "dark turquoise")))) - '(sgml-doctype-face ((t (:foreground "red")))) - '(sgml-end-tag-face ((t (:foreground "blue")))) - '(sgml-entity-face ((t (:foreground "magenta")))) - '(sgml-ignored-face ((t (:background "gray60" :foreground "gray40")))) - '(sgml-ms-end-face ((t (:foreground "green")))) - '(sgml-ms-start-face ((t (:foreground "green")))) - '(sgml-pi-face ((t (:foreground "lime green")))) - '(sgml-sgml-face ((t (:foreground "brown")))) - '(sgml-short-ref-face ((t (:foreground "deep sky blue")))) - '(sgml-start-tag-face ((t (:foreground "blue")))) - '(show-paren-match-face ((t (:background "turquoise")))) - '(show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) - '(underline ((t (:underline t)))) - '(widget-button-face ((t (:bold t)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "dark green")))) - '(widget-field-face ((t (:background "gray85")))) - '(widget-inactive-face ((t (:foreground "dim gray")))) - '(widget-single-line-field-face ((t (:background "gray85"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'aalto-light) - -;;; aalto-light-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/aliceblue-theme.el b/elpa/color-theme-modern-0.0.3/aliceblue-theme.el deleted file mode 100644 index beea638..0000000 --- a/elpa/color-theme-modern-0.0.3/aliceblue-theme.el +++ /dev/null @@ -1,147 +0,0 @@ -;;; aliceblue-theme.el --- aliceblue theme - -;; Copyright (C) 2002 by Girish Bharadwaj -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of aliceblue theme from `color-themes' - -;;; Code: - -(deftheme aliceblue - "aliceblue theme") - -(custom-theme-set-faces - 'aliceblue - - '(default ((t (:background "AliceBlue" :foreground "DarkSlateGray4")))) - '(mouse ((t (:background "black")))) - '(cursor ((t (:background "black")))) - '(border ((t (:background "black")))) - - '(bold ((t (:bold t :weight bold)))) - '(bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) - '(comint-highlight-input ((t (:bold t :weight bold)))) - '(comint-highlight-prompt ((t (:foreground "dark blue")))) - '(custom-button-face ((t (:background "lightgrey" :foreground "black" :box (:line-width 2 :style released-button))))) - '(custom-button-pressed-face ((t (:background "lightgrey" :foreground "black" :box (:line-width 2 :style pressed-button))))) - '(custom-changed-face ((t (:background "blue" :foreground "white")))) - '(custom-comment-face ((t (:background "gray85")))) - '(custom-comment-tag-face ((t (:foreground "blue4")))) - '(custom-documentation-face ((t (nil)))) - '(custom-face-tag-face ((t (:bold t :weight bold :height 1.2)))) - '(custom-group-tag-face ((t (:bold t :foreground "blue" :weight bold :height 1.2)))) - '(custom-group-tag-face-1 ((t (:bold t :foreground "red" :weight bold :height 1.2)))) - '(custom-invalid-face ((t (:background "red" :foreground "yellow")))) - '(custom-modified-face ((t (:background "blue" :foreground "white")))) - '(custom-rogue-face ((t (:background "black" :foreground "pink")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:background "white" :foreground "blue")))) - '(custom-state-face ((t (:foreground "dark green")))) - '(custom-variable-button-face ((t (:bold t :underline t :weight bold)))) - '(custom-variable-tag-face ((t (:bold t :foreground "blue" :weight bold :height 1.2)))) - - '(font-lock-builtin-face ((t (:foreground "Orchid")))) - '(font-lock-comment-face ((t (:italic t :foreground "Firebrick" :slant oblique)))) - '(font-lock-constant-face ((t (:foreground "CadetBlue")))) - '(font-lock-function-name-face ((t (:bold t :foreground "Blue" :weight extra-bold)))) - '(font-lock-keyword-face ((t (:bold t :foreground "Purple" :weight semi-bold)))) - '(font-lock-preprocessor-face ((t (:foreground "CadetBlue")))) - '(font-lock-reference-face ((t (:foreground "Orchid")))) - '(font-lock-string-face ((t (:foreground "RosyBrown")))) - '(font-lock-type-face ((t (:italic t :foreground "ForestGreen" :slant italic)))) - '(font-lock-variable-name-face ((t (:foreground "DarkGoldenrod" :width condensed)))) - '(font-lock-warning-face ((t (:bold t :foreground "Red" :weight bold)))) - '(fringe ((t (:background "DarkSlateBlue")))) - '(header-line ((t (:box (:line-width -1 :style released-button) :background "grey90" :foreground "grey20" :box nil)))) - '(highlight ((t (:background "darkseagreen2")))) - '(isearch ((t (:background "magenta4" :foreground "lightskyblue1")))) - '(isearch-lazy-highlight-face ((t (:background "paleturquoise")))) - '(italic ((t (:italic t :slant italic)))) - '(jde-bug-breakpoint-cursor ((t (:background "brown" :foreground "cyan")))) - '(jde-db-active-breakpoint-face ((t (:background "red" :foreground "black")))) - '(jde-db-requested-breakpoint-face ((t (:background "yellow" :foreground "black")))) - '(jde-db-spec-breakpoint-face ((t (:background "green" :foreground "black")))) - '(jde-java-font-lock-api-face ((t (:foreground "dark goldenrod")))) - '(jde-java-font-lock-bold-face ((t (:bold t :weight bold)))) - '(jde-java-font-lock-code-face ((t (nil)))) - '(jde-java-font-lock-constant-face ((t (:foreground "CadetBlue")))) - '(jde-java-font-lock-doc-tag-face ((t (:foreground "green4")))) - '(jde-java-font-lock-italic-face ((t (:italic t :slant italic)))) - '(jde-java-font-lock-link-face ((t (:foreground "blue" :underline t :slant normal)))) - '(jde-java-font-lock-modifier-face ((t (:foreground "Orchid")))) - '(jde-java-font-lock-number-face ((t (:foreground "RosyBrown")))) - '(jde-java-font-lock-operator-face ((t (:foreground "medium blue")))) - '(jde-java-font-lock-package-face ((t (:foreground "blue3")))) - '(jde-java-font-lock-pre-face ((t (nil)))) - '(jde-java-font-lock-underline-face ((t (:underline t)))) - '(menu ((t (nil)))) - '(modeline ((t (:background "grey75" :foreground "black" :box (:line-width -1 :style released-button))))) - '(modeline-buffer-id ((t (:background "grey75" :foreground "black")))) - '(modeline-mousable ((t (:background "grey75" :foreground "black")))) - '(modeline-mousable-minor-mode ((t (:background "grey75" :foreground "black")))) - '(primary-selection ((t (:background "lightgoldenrod2")))) - '(region ((t (:background "lightgoldenrod2")))) - '(scroll-bar ((t (nil)))) - '(secondary-selection ((t (:background "yellow")))) - '(semantic-dirty-token-face ((t (:background "lightyellow")))) - '(semantic-unmatched-syntax-face ((t (:underline "red")))) - '(senator-intangible-face ((t (:foreground "gray25")))) - '(senator-momentary-highlight-face ((t (:background "gray70")))) - '(senator-read-only-face ((t (:background "#CCBBBB")))) - '(show-paren-match-face ((t (:background "turquoise")))) - '(show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) - '(speedbar-button-face ((t (:foreground "green4")))) - '(speedbar-directory-face ((t (:foreground "blue4")))) - '(speedbar-file-face ((t (:foreground "cyan4")))) - '(speedbar-highlight-face ((t (:background "green")))) - '(speedbar-selected-face ((t (:foreground "red" :underline t)))) - '(speedbar-tag-face ((t (:foreground "brown")))) - '(template-message-face ((t (:bold t :weight bold)))) - '(tool-bar ((t (:background "grey75" :foreground "black" :box (:line-width 1 :style released-button))))) - '(trailing-whitespace ((t (:background "red")))) - '(underline ((t (:underline t)))) - - '(widget-button-face ((t (:bold t :weight bold)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "dark green")))) - '(widget-field-face ((t (:background "gray85")))) - '(widget-inactive-face ((t (:foreground "dim gray")))) - '(widget-single-line-field-face ((t (:background "gray85")))) - '(trailing-whitespace ((t (:background "red")))) - '(underline ((t (:underline t)))) - - '(widget-button-face ((t (:bold t :weight bold)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "dark green")))) - '(widget-field-face ((t (:background "gray85")))) - '(widget-inactive-face ((t (:foreground "dim gray")))) - '(widget-single-line-field-face ((t (:background "gray85")))) - '(zmacs-region ((t (:background "lightgoldenrod2"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'aliceblue) - -;;; aliceblue-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/andreas-theme.el b/elpa/color-theme-modern-0.0.3/andreas-theme.el deleted file mode 100644 index e35ed4d..0000000 --- a/elpa/color-theme-modern-0.0.3/andreas-theme.el +++ /dev/null @@ -1,220 +0,0 @@ -;;; andreas-theme.el --- andreas theme - -;; Copyright (C) 2003 by Andreas Busch -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of andreas theme from `color-themes' - -;;; Code: - -(deftheme andreas - "andreas theme") - -(custom-theme-set-faces - 'andreas - - '(default ((t (:background "white" :foreground "black")))) - '(mouse ((t (:foreground "black")))) - '(cursor ((t (:background "black")))) - '(border ((t (:foreground "black")))) - '(OrangeRed ((t (nil)))) - '(gnus-mouse-face ((t (nil)))) - '(ispell-highlight-face ((t (nil)))) - '(blue ((t (:foreground "blue")))) - '(bold ((t (:bold t)))) - '(bold-italic ((t (:italic t :bold t)))) - '(border-glyph ((t (nil)))) - '(calendar-today-face ((t (:underline t)))) - '(color-mode-face-@ ((t (:foreground "orange")))) - '(color-mode-face-a ((t (:foreground "blue")))) - '(color-mode-face-b ((t (:foreground "red")))) - '(color-mode-face-c ((t (:foreground "green3")))) - '(color-mode-face-d ((t (:background "red" :foreground "white")))) - '(color-mode-face-e ((t (:background "orange" :foreground "blue")))) - '(color-mode-face-f ((t (:background "blue" :foreground "yellow")))) - '(color-mode-face-g ((t (:background "lightblue" :foreground "brown")))) - '(color-mode-face-h ((t (:background "brown" :foreground "white")))) - '(custom-button-face ((t (:bold t)))) - '(custom-changed-face ((t (:background "blue" :foreground "white")))) - '(custom-documentation-face ((t (nil)))) - '(custom-face-tag-face ((t (:underline t)))) - '(custom-group-tag-face ((t (:underline t :foreground "blue")))) - '(custom-group-tag-face-1 ((t (:underline t :foreground "red")))) - '(custom-invalid-face ((t (:background "red" :foreground "yellow")))) - '(custom-modified-face ((t (:background "blue" :foreground "white")))) - '(custom-rogue-face ((t (:background "black" :foreground "pink")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:background "white" :foreground "blue")))) - '(custom-state-face ((t (:foreground "dark green")))) - '(custom-variable-button-face ((t (:underline t :bold t :background "gray90")))) - '(custom-variable-tag-face ((t (:underline t :background "gray95" :foreground "blue")))) - '(diary-face ((t (:foreground "red")))) - '(display-time-mail-balloon-enhance-face ((t (:background "orange")))) - '(display-time-mail-balloon-gnus-group-face ((t (:foreground "blue")))) - '(display-time-time-balloon-face ((t (:foreground "red")))) - '(emacs-wiki-bad-link-face ((t (:bold t :foreground "red")))) - '(emacs-wiki-link-face ((t (:bold t :foreground "green")))) - '(font-lock-comment-face ((t (:foreground "orange1")))) - '(font-lock-doc-string-face ((t (:foreground "green4")))) - '(font-lock-function-name-face ((t (:foreground "blue3")))) - '(font-lock-keyword-face ((t (:foreground "red1")))) - '(font-lock-preprocessor-face ((t (:foreground "blue3")))) - '(font-lock-reference-face ((t (:foreground "red3")))) - '(font-lock-string-face ((t (:foreground "green4")))) - '(font-lock-type-face ((t (:foreground "#6920ac")))) - '(font-lock-variable-name-face ((t (:foreground "blue3")))) - '(font-lock-warning-face ((t (:bold t :foreground "Red")))) - '(gnu-cite-face-3 ((t (nil)))) - '(gnu-cite-face-4 ((t (nil)))) - '(gnus-cite-attribution-face ((t (:underline t)))) - '(gnus-cite-face-1 ((t (:foreground "MidnightBlue")))) - '(gnus-cite-face-10 ((t (:foreground "medium purple")))) - '(gnus-cite-face-11 ((t (:foreground "turquoise")))) - '(gnus-cite-face-2 ((t (:foreground "firebrick")))) - '(gnus-cite-face-3 ((t (:foreground "dark green")))) - '(gnus-cite-face-4 ((t (:foreground "OrangeRed")))) - '(gnus-cite-face-5 ((t (:foreground "dark khaki")))) - '(gnus-cite-face-6 ((t (:foreground "dark violet")))) - '(gnus-cite-face-7 ((t (:foreground "SteelBlue4")))) - '(gnus-cite-face-8 ((t (:foreground "magenta")))) - '(gnus-cite-face-9 ((t (:foreground "violet")))) - '(gnus-emphasis-bold ((t (:bold t)))) - '(gnus-emphasis-bold-italic ((t (:italic t :bold t)))) - '(gnus-emphasis-italic ((t (:italic t)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(gnus-emphasis-underline-bold ((t (:underline t :bold t)))) - '(gnus-emphasis-underline-bold-italic ((t (:underline t :italic t :bold t)))) - '(gnus-emphasis-underline-italic ((t (:underline t :italic t)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "DeepPink3")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "DeepPink3")))) - '(gnus-group-mail-2-empty-face ((t (:foreground "HotPink3")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "HotPink3")))) - '(gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "magenta4")))) - '(gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "DeepPink4")))) - '(gnus-group-news-1-empty-face ((t (:foreground "ForestGreen")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "ForestGreen")))) - '(gnus-group-news-2-empty-face ((t (:foreground "CadetBlue4")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "CadetBlue4")))) - '(gnus-group-news-3-empty-face ((t (nil)))) - '(gnus-group-news-3-face ((t (:bold t)))) - '(gnus-group-news-4-empty-face ((t (nil)))) - '(gnus-group-news-4-face ((t (:bold t)))) - '(gnus-group-news-5-empty-face ((t (nil)))) - '(gnus-group-news-5-face ((t (:bold t)))) - '(gnus-group-news-6-empty-face ((t (nil)))) - '(gnus-group-news-6-face ((t (:bold t)))) - '(gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "DarkGreen")))) - '(gnus-header-content-face ((t (:italic t :foreground "indianred4")))) - '(gnus-header-from-face ((t (:bold t :foreground "red3")))) - '(gnus-header-name-face ((t (:foreground "maroon")))) - '(gnus-header-newsgroups-face ((t (:italic t :bold t :foreground "MidnightBlue")))) - '(gnus-header-subject-face ((t (:bold t :foreground "red4")))) - '(gnus-splash-face ((t (:foreground "red")))) - '(gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "RoyalBlue")))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "DarkGreen")))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "DarkRed")))) - '(gnus-summary-high-unread-face ((t (:bold t)))) - '(gnus-summary-low-ancient-face ((t (:italic t :foreground "RoyalBlue")))) - '(gnus-summary-low-read-face ((t (:italic t :foreground "DarkGreen")))) - '(gnus-summary-low-ticked-face ((t (:italic t :foreground "firebrick")))) - '(gnus-summary-low-unread-face ((t (:italic t)))) - '(gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) - '(gnus-summary-normal-read-face ((t (:foreground "DarkGreen")))) - '(gnus-summary-normal-ticked-face ((t (:foreground "Red")))) - '(gnus-summary-normal-unread-face ((t (nil)))) - '(gnus-summary-selected-face ((t (:underline t)))) - '(gnus-x-face ((t (nil)))) - '(green ((t (:foreground "green")))) - '(gui-button-face ((t (:background "grey75")))) - '(gui-element ((t (:background "Gray80")))) - '(highlight ((t (nil)))) - '(holiday-face ((t (:background "pink")))) - '(hyper-apropos-documentation ((t (:foreground "darkred")))) - '(hyper-apropos-heading ((t (:bold t)))) - '(hyper-apropos-hyperlink ((t (:foreground "blue4")))) - '(hyper-apropos-major-heading ((t (:bold t)))) - '(hyper-apropos-section-heading ((t (:italic t :bold t)))) - '(hyper-apropos-warning ((t (:bold t :foreground "red")))) - '(info-node ((t (:italic t :bold t)))) - '(info-xref ((t (:bold t)))) - '(isearch ((t (:background "yellow" :foreground "red")))) - '(italic ((t (:italic t)))) - '(kai-gnus-cite-face-1 ((t (:foreground "LightCyan4")))) - '(kai-gnus-cite-face-2 ((t (:foreground "LightSkyBlue2")))) - '(kai-gnus-cite-face-3 ((t (:foreground "DodgerBlue3")))) - '(kai-gnus-group-mail-face ((t (:foreground "darkslategrey")))) - '(kai-gnus-group-nonempty-mail-face ((t (:foreground "DarkRed")))) - '(kai-gnus-group-starred-face ((t (:foreground "grey50")))) - '(left-margin ((t (nil)))) - '(list-mode-item-selected ((t (:background "gray68")))) - '(message-cited-text ((t (:italic t)))) - '(message-cited-text-face ((t (:foreground "red")))) - '(message-header-cc-face ((t (:foreground "MidnightBlue")))) - '(message-header-contents ((t (:italic t)))) - '(message-header-name-face ((t (:foreground "cornflower blue")))) - '(message-header-newsgroups-face ((t (:italic t :bold t :foreground "blue4")))) - '(message-header-other-face ((t (:foreground "steel blue")))) - '(message-header-subject-face ((t (:bold t :foreground "navy blue")))) - '(message-header-to-face ((t (:bold t :foreground "MidnightBlue")))) - '(message-header-xheader-face ((t (:foreground "blue")))) - '(message-headers ((t (:bold t)))) - '(message-highlighted-header-contents ((t (:italic t :bold t)))) - '(message-mml-face ((t (:foreground "ForestGreen")))) - '(message-separator-face ((t (:foreground "brown")))) - '(modeline ((t (:background "Gray75" :foreground "Black")))) - '(modeline-buffer-id ((t (:background "Gray75" :foreground "blue4")))) - '(modeline-mousable ((t (:background "Gray75" :foreground "firebrick")))) - '(modeline-mousable-minor-mode ((t (:background "Gray75" :foreground "green4")))) - '(paren-blink-off ((t (:foreground "gray80")))) - '(paren-match ((t (:background "red" :foreground "white")))) - '(paren-mismatch ((t (:background "DeepPink")))) - '(pointer ((t (:foreground "blue")))) - '(primary-selection ((t (:background "gray65")))) - '(red ((t (:foreground "red")))) - '(region ((t (:background "gray75")))) - '(right-margin ((t (nil)))) - '(secondary-selection ((t (:background "paleturquoise")))) - '(text-cursor ((t (:background "red" :foreground "LightYellow1")))) - '(toolbar ((t (:background "Gray80")))) - '(underline ((t (:underline t)))) - '(vertical-divider ((t (:background "Gray80")))) - '(widget-button-face ((t (:bold t)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "dark green")))) - '(widget-field-face ((t (:background "gray85")))) - '(widget-inactive-face ((t (:foreground "dim gray")))) - '(x-face ((t (:background "white")))) - '(yellow ((t (:foreground "yellow")))) - '(zmacs-region ((t (:background "gray65" :foreground "yellow"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'andreas) - -;;; andreas-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/arjen-theme.el b/elpa/color-theme-modern-0.0.3/arjen-theme.el deleted file mode 100644 index df57785..0000000 --- a/elpa/color-theme-modern-0.0.3/arjen-theme.el +++ /dev/null @@ -1,246 +0,0 @@ -;;; arjen-theme.el --- arjen theme - -;; Copyright (C) 2001 -- 2008 Arjen Wiersma -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Arjen Wiersma -;; Maintainers: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of arjen theme from `color-themes' - -;;; Code: - -(deftheme arjen - "arjen theme") - -(custom-theme-set-faces - 'arjen - - '(default ((t (:background "black" :foreground "White")))) - '(mouse ((t (:foreground "sienna1")))) - '(cursor ((t (:background "yellow")))) - '(border ((t (:foreground "black")))) - - '(default ((t (:background "black" :foreground "white")))) - '(blue ((t (:foreground "blue")))) - '(bold ((t (:bold t)))) - '(bold-italic ((t (:bold t)))) - '(border-glyph ((t (nil)))) - '(buffers-tab ((t (:background "black" :foreground "white")))) - '(buffers-tab-face ((t (:background "black" :foreground "white")))) - '(calendar-today-face ((t (:underline t)))) - '(cperl-array-face ((t (:foreground "darkseagreen")))) - '(cperl-hash-face ((t (:foreground "darkseagreen")))) - '(cperl-nonoverridable-face ((t (:foreground "SkyBlue")))) - '(cperl-here-face ((t (:foreground "Orange")))) - '(cperl-invalid-face ((nil (:underline nil)))) - '(cperl-pod-face ((t (:foreground "IndianRed")))) - '(cperl-pod-head-face ((t (:foreground "darkseagreen")))) - '(custom-button-face ((t (nil)))) - '(custom-changed-face ((t (:background "blue" :foreground "white")))) - '(custom-documentation-face ((t (nil)))) - '(custom-face-tag-face ((t (:underline t)))) - '(custom-group-tag-face ((t (:underline t :foreground "light blue")))) - '(custom-group-tag-face-1 ((t (:underline t :foreground "pink")))) - '(custom-invalid-face ((t (:background "red" :foreground "yellow")))) - '(custom-modified-face ((t (:background "blue" :foreground "white")))) - '(custom-rogue-face ((t (:background "black" :foreground "pink")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:background "white" :foreground "blue")))) - '(custom-state-face ((t (:foreground "lime green")))) - '(custom-variable-button-face ((t (:underline t :bold t)))) - '(custom-variable-tag-face ((t (:underline t :foreground "light blue")))) - '(diary-face ((t (:foreground "IndianRed")))) - '(erc-action-face ((t (:bold t)))) - '(erc-bold-face ((t (:bold t)))) - '(erc-default-face ((t (nil)))) - '(erc-direct-msg-face ((t (:foreground "sandybrown")))) - '(erc-error-face ((t (:bold t :foreground "IndianRed")))) - '(erc-input-face ((t (:foreground "Beige")))) - '(erc-inverse-face ((t (:background "wheat" :foreground "darkslategrey")))) - '(erc-notice-face ((t (:foreground "MediumAquamarine")))) - '(erc-pal-face ((t (:foreground "pale green")))) - '(erc-prompt-face ((t (:foreground "MediumAquamarine")))) - '(erc-underline-face ((t (:underline t)))) - '(eshell-ls-archive-face ((t (:bold t :foreground "IndianRed")))) - '(eshell-ls-backup-face ((t (:foreground "Grey")))) - '(eshell-ls-clutter-face ((t (:foreground "DimGray")))) - '(eshell-ls-directory-face ((t (:bold t :foreground "MediumSlateBlue")))) - '(eshell-ls-executable-face ((t (:foreground "Coral")))) - '(eshell-ls-missing-face ((t (:foreground "black")))) - '(eshell-ls-picture-face ((t (:foreground "Violet")))) - '(eshell-ls-product-face ((t (:foreground "sandybrown")))) - '(eshell-ls-readonly-face ((t (:foreground "Aquamarine")))) - '(eshell-ls-special-face ((t (:foreground "Gold")))) - '(eshell-ls-symlink-face ((t (:foreground "White")))) - '(eshell-ls-unreadable-face ((t (:foreground "DimGray")))) - '(eshell-prompt-face ((t (:foreground "MediumAquamarine")))) - '(fl-comment-face ((t (:foreground "pink")))) - '(fl-doc-string-face ((t (:foreground "purple")))) - '(fl-function-name-face ((t (:foreground "red")))) - '(fl-keyword-face ((t (:foreground "cadetblue")))) - '(fl-string-face ((t (:foreground "green")))) - '(fl-type-face ((t (:foreground "yellow")))) - '(font-lock-builtin-face ((t (:foreground "LightSteelBlue")))) - '(font-lock-comment-face ((t (:foreground "IndianRed")))) - '(font-lock-constant-face ((t (:foreground "Aquamarine")))) - '(font-lock-doc-string-face ((t (:foreground "DarkOrange")))) - '(font-lock-function-name-face ((t (:foreground "YellowGreen")))) - '(font-lock-keyword-face ((t (:foreground "PaleYellow")))) - '(font-lock-preprocessor-face ((t (:foreground "Aquamarine")))) - '(font-lock-reference-face ((t (:foreground "SlateBlue")))) - '(font-lock-string-face ((t (:foreground "Orange")))) - '(font-lock-type-face ((t (:foreground "Green")))) - '(font-lock-variable-name-face ((t (:foreground "darkseagreen")))) - '(font-lock-warning-face ((t (:bold t :foreground "Pink")))) - '(qt-classes-face ((t (:foreground "Red")))) - '(gnus-cite-attribution-face ((t (nil)))) - '(gnus-cite-face-1 ((t (:bold nil :foreground "deep sky blue")))) - '(gnus-cite-face-10 ((t (:foreground "medium purple")))) - '(gnus-cite-face-11 ((t (:foreground "turquoise")))) - '(gnus-cite-face-2 ((t (:bold nil :foreground "cadetblue")))) - '(gnus-cite-face-3 ((t (:bold nil :foreground "gold")))) - '(gnus-cite-face-4 ((t (:foreground "light pink")))) - '(gnus-cite-face-5 ((t (:foreground "pale green")))) - '(gnus-cite-face-6 ((t (:bold nil :foreground "chocolate")))) - '(gnus-cite-face-7 ((t (:foreground "orange")))) - '(gnus-cite-face-8 ((t (:foreground "magenta")))) - '(gnus-cite-face-9 ((t (:foreground "violet")))) - '(gnus-emphasis-bold ((t (:bold nil)))) - '(gnus-emphasis-bold-italic ((t (:bold nil)))) - '(gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) - '(gnus-emphasis-italic ((t (nil)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(gnus-emphasis-underline-bold ((t (:underline t :bold nil)))) - '(gnus-emphasis-underline-bold-italic ((t (:underline t :bold nil)))) - '(gnus-emphasis-underline-italic ((t (:underline t)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "aquamarine1")))) - '(gnus-group-mail-1-face ((t (:bold nil :foreground "aquamarine1")))) - '(gnus-group-mail-2-empty-face ((t (:foreground "aquamarine2")))) - '(gnus-group-mail-2-face ((t (:bold nil :foreground "aquamarine2")))) - '(gnus-group-mail-3-empty-face ((t (:foreground "aquamarine3")))) - '(gnus-group-mail-3-face ((t (:bold nil :foreground "aquamarine3")))) - '(gnus-group-mail-low-empty-face ((t (:foreground "aquamarine4")))) - '(gnus-group-mail-low-face ((t (:bold nil :foreground "aquamarine4")))) - '(gnus-group-news-1-empty-face ((t (:foreground "PaleTurquoise")))) - '(gnus-group-news-1-face ((t (:bold nil :foreground "PaleTurquoise")))) - '(gnus-group-news-2-empty-face ((t (:foreground "turquoise")))) - '(gnus-group-news-2-face ((t (:bold nil :foreground "turquoise")))) - '(gnus-group-news-3-empty-face ((t (nil)))) - '(gnus-group-news-3-face ((t (:bold nil)))) - '(gnus-group-news-4-empty-face ((t (nil)))) - '(gnus-group-news-4-face ((t (:bold nil)))) - '(gnus-group-news-5-empty-face ((t (nil)))) - '(gnus-group-news-5-face ((t (:bold nil)))) - '(gnus-group-news-6-empty-face ((t (nil)))) - '(gnus-group-news-6-face ((t (:bold nil)))) - '(gnus-group-news-low-empty-face ((t (:foreground "DarkTurquoise")))) - '(gnus-group-news-low-face ((t (:bold nil :foreground "DarkTurquoise")))) - '(gnus-header-content-face ((t (:foreground "forest green")))) - '(gnus-header-from-face ((t (:bold nil :foreground "spring green")))) - '(gnus-header-name-face ((t (:foreground "deep sky blue")))) - '(gnus-header-newsgroups-face ((t (:bold nil :foreground "purple")))) - '(gnus-header-subject-face ((t (:bold nil :foreground "orange")))) - '(gnus-signature-face ((t (:bold nil :foreground "khaki")))) - '(gnus-splash-face ((t (:foreground "Brown")))) - '(gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) - '(gnus-summary-high-ancient-face ((t (:bold nil :foreground "SkyBlue")))) - '(gnus-summary-high-read-face ((t (:bold nil :foreground "PaleGreen")))) - '(gnus-summary-high-ticked-face ((t (:bold nil :foreground "pink")))) - '(gnus-summary-high-unread-face ((t (:bold nil)))) - '(gnus-summary-low-ancient-face ((t (:foreground "SkyBlue")))) - '(gnus-summary-low-read-face ((t (:foreground "PaleGreen")))) - '(gnus-summary-low-ticked-face ((t (:foreground "pink")))) - '(gnus-summary-low-unread-face ((t (nil)))) - '(gnus-summary-normal-ancient-face ((t (:foreground "SkyBlue")))) - '(gnus-summary-normal-read-face ((t (:foreground "PaleGreen")))) - '(gnus-summary-normal-ticked-face ((t (:foreground "pink")))) - '(gnus-summary-normal-unread-face ((t (nil)))) - '(gnus-summary-selected-face ((t (:underline t)))) - '(green ((t (:foreground "green")))) - '(gui-button-face ((t (:background "grey75" :foreground "black")))) - '(gui-element ((t (:background "#D4D0C8" :foreground "black")))) - '(highlight ((t (:background "darkolivegreen")))) - '(highline-face ((t (:background "SeaGreen")))) - '(holiday-face ((t (:background "DimGray")))) - '(info-menu-5 ((t (:underline t)))) - '(info-node ((t (:underline t :bold t :foreground "DodgerBlue1")))) - '(info-xref ((t (:underline t :foreground "DodgerBlue1")))) - '(isearch ((t (:background "blue")))) - '(isearch-secondary ((t (:foreground "red3")))) - '(italic ((t (nil)))) - '(left-margin ((t (nil)))) - '(list-mode-item-selected ((t (:background "gray68" :foreground "white")))) - '(message-cited-text-face ((t (:bold t :foreground "green")))) - '(message-header-cc-face ((t (:bold t :foreground "green4")))) - '(message-header-name-face ((t (:bold t :foreground "orange")))) - '(message-header-newsgroups-face ((t (:bold t :foreground "violet")))) - '(message-header-other-face ((t (:bold t :foreground "chocolate")))) - '(message-header-subject-face ((t (:bold t :foreground "yellow")))) - '(message-header-to-face ((t (:bold t :foreground "cadetblue")))) - '(message-header-xheader-face ((t (:bold t :foreground "light blue")))) - '(message-mml-face ((t (:bold t :foreground "Green3")))) - '(message-separator-face ((t (:foreground "blue3")))) - '(modeline ((t (:background "DarkRed" :foreground "white" :box (:line-width 1 :style released-button))))) - '(modeline-buffer-id ((t (:background "DarkRed" :foreground "white")))) - '(modeline-mousable ((t (:background "DarkRed" :foreground "white")))) - '(modeline-mousable-minor-mode ((t (:background "DarkRed" :foreground "white")))) - '(p4-depot-added-face ((t (:foreground "blue")))) - '(p4-depot-deleted-face ((t (:foreground "red")))) - '(p4-depot-unmapped-face ((t (:foreground "grey30")))) - '(p4-diff-change-face ((t (:foreground "dark green")))) - '(p4-diff-del-face ((t (:foreground "red")))) - '(p4-diff-file-face ((t (:background "gray90")))) - '(p4-diff-head-face ((t (:background "gray95")))) - '(p4-diff-ins-face ((t (:foreground "blue")))) - '(pointer ((t (nil)))) - '(primary-selection ((t (:background "blue")))) - '(red ((t (:foreground "red")))) - '(region ((t (:background "blue")))) - '(right-margin ((t (nil)))) - '(secondary-selection ((t (:background "darkslateblue")))) - '(show-paren-match-face ((t (:background "Aquamarine" :foreground "SlateBlue")))) - '(show-paren-mismatch-face ((t (:background "Red" :foreground "White")))) - '(text-cursor ((t (:background "yellow" :foreground "black")))) - '(toolbar ((t (nil)))) - '(underline ((nil (:underline nil)))) - '(vc-mode-face ((t (:background "darkolivegreen")))) - '(vertical-divider ((t (nil)))) - '(widget ((t (nil)))) - '(widget-button-face ((t (:bold t)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "lime green")))) - '(widget-field-face ((t (:background "dim gray")))) - '(widget-inactive-face ((t (:foreground "light gray")))) - '(widget-single-line-field-face ((t (:background "dim gray")))) - '(woman-bold-face ((t (:bold t)))) - '(woman-italic-face ((t (:foreground "beige")))) - '(woman-unknown-face ((t (:foreground "LightSalmon")))) - '(yellow ((t (:foreground "yellow")))) - '(zmacs-region ((t (:background "snow" :foreground "blue"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'arjen) - -;;; arjen-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/beige-diff-theme.el b/elpa/color-theme-modern-0.0.3/beige-diff-theme.el deleted file mode 100644 index a3efcdd..0000000 --- a/elpa/color-theme-modern-0.0.3/beige-diff-theme.el +++ /dev/null @@ -1,63 +0,0 @@ -;;; beige-diff-theme.el --- beige-diff theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of beige-diff theme from `color-themes' - -;;; Code: - -(deftheme beige-diff - "beige-diff theme") - -(custom-theme-set-faces - 'beige-diff - - '(change-log-acknowledgement-face ((t (:foreground "firebrick")))) - '(change-log-conditionals-face ((t (:foreground "khaki" :background "sienna")))) - '(change-log-date-face ((t (:foreground "gold")))) - '(change-log-email-face ((t (:foreground "khaki" :underline t)))) - '(change-log-file-face ((t (:bold t :foreground "lemon chiffon")))) - '(change-log-function-face ((t (:foreground "khaki" :background "sienna")))) - '(change-log-list-face ((t (:foreground "wheat")))) - '(change-log-name-face ((t (:bold t :foreground "light goldenrod")))) - '(diff-added-face ((t (nil)))) - '(diff-changed-face ((t (nil)))) - '(diff-context-face ((t (:foreground "grey50")))) - '(diff-file-header-face ((t (:bold t :foreground "lemon chiffon")))) - '(diff-function-face ((t (:foreground "grey50")))) - '(diff-header-face ((t (:foreground "lemon chiffon")))) - '(diff-hunk-header-face ((t (:foreground "light goldenrod")))) - '(diff-index-face ((t (:bold t :underline t)))) - '(diff-nonexistent-face ((t (:bold t :background "grey70" :weight bold)))) - '(diff-removed-face ((t (nil)))) - '(log-view-message-face ((t (:foreground "lemon chiffon"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'beige-diff) - -;;; beige-diff-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/beige-eshell-theme.el b/elpa/color-theme-modern-0.0.3/beige-eshell-theme.el deleted file mode 100644 index 70646c6..0000000 --- a/elpa/color-theme-modern-0.0.3/beige-eshell-theme.el +++ /dev/null @@ -1,59 +0,0 @@ -;;; beige-eshell-theme.el --- beige-eshell theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of beige-eshell theme from `color-themes' - -;;; Code: - -(deftheme beige-eshell - "beige-eshell theme") - -(custom-theme-set-faces - 'beige-eshell - - '(eshell-ls-archive-face ((t (:bold t :foreground "IndianRed")))) - '(eshell-ls-backup-face ((t (:foreground "Grey")))) - '(eshell-ls-clutter-face ((t (:foreground "DimGray")))) - '(eshell-ls-directory-face ((t (:bold t :foreground "dark khaki")))) - '(eshell-ls-executable-face ((t (:foreground "Coral")))) - '(eshell-ls-missing-face ((t (:foreground "black")))) - '(eshell-ls-picture-face ((t (:foreground "gold")))) ; non-standard face - '(eshell-ls-product-face ((t (:foreground "dark sea green")))) - '(eshell-ls-readonly-face ((t (:foreground "light steel blue")))) - '(eshell-ls-special-face ((t (:foreground "gold")))) - '(eshell-ls-symlink-face ((t (:foreground "peach puff")))) - '(eshell-ls-text-face ((t (:foreground "moccasin")))) ; non-standard face - '(eshell-ls-todo-face ((t (:bold t :foreground "yellow green")))) ; non-standard face - '(eshell-ls-unreadable-face ((t (:foreground "DimGray")))) - '(eshell-prompt-face ((t (:foreground "lemon chiffon"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'beige-eshell) - -;;; beige-eshell-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/bharadwaj-slate-theme.el b/elpa/color-theme-modern-0.0.3/bharadwaj-slate-theme.el deleted file mode 100644 index 37ed614..0000000 --- a/elpa/color-theme-modern-0.0.3/bharadwaj-slate-theme.el +++ /dev/null @@ -1,317 +0,0 @@ -;;; bharadwaj-slate-theme.el --- bharadwaj-slate theme - -;; Copyright (C) 2002 by Girish Bharadwaj -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of bharadwaj-slate theme from `color-themes' - -;;; Code: - -(deftheme bharadwaj-slate - "bharadwaj-slate theme") - -(custom-theme-set-faces - 'bharadwaj-slate - - '(default ((t (:background "DarkSlateGray" :foreground "palegreen")))) - '(mouse ((t (:background "black")))) - '(cursor ((t (:background "khaki")))) - '(border ((t (:background "black")))) - - '(display-time-mail-face ((t (:background "Darkslategray" :foreground "white" :overline "blueviolet" :underline "blueviolet")))) - '(gnus-article-button-face ((t (:bold t :weight bold)))) - '(gnus-article-mouse-face ((t (:background "darkolivegreen")))) - '(gnus-mouse-face ((t (:background "darkolivegreen")))) - '(help-highlight-face ((t (:underline t)))) - '(ibuffer-deletion-face ((t (:foreground "lightblue3")))) - '(ibuffer-filter-group-name-face ((t (:bold t :weight bold)))) - '(ibuffer-marked-face ((t (:bold t :foreground "Pink" :weight bold)))) - '(ibuffer-title-face ((t (:foreground "lightblue3")))) - '(list-matching-lines-buffer-name-face ((t (:underline t)))) - '(list-matching-lines-face ((t (:bold t :weight bold)))) - '(view-highlight-face ((t (:background "darkolivegreen")))) - '(widget-mouse-face ((t (:background "darkolivegreen")))) - - '(bg:erc-color-face0 ((t (:background "White")))) - '(bg:erc-color-face1 ((t (:background "black")))) - '(bg:erc-color-face10 ((t (:background "lightblue1")))) - '(bg:erc-color-face11 ((t (:background "cyan")))) - '(bg:erc-color-face12 ((t (:background "blue")))) - '(bg:erc-color-face13 ((t (:background "deeppink")))) - '(bg:erc-color-face14 ((t (:background "gray50")))) - '(bg:erc-color-face15 ((t (:background "gray90")))) - '(bg:erc-color-face2 ((t (:background "blue4")))) - '(bg:erc-color-face3 ((t (:background "green4")))) - '(bg:erc-color-face4 ((t (:background "red")))) - '(bg:erc-color-face5 ((t (:background "brown")))) - '(bg:erc-color-face6 ((t (:background "purple")))) - '(bg:erc-color-face7 ((t (:background "orange")))) - '(bg:erc-color-face8 ((t (:background "yellow")))) - '(bg:erc-color-face9 ((t (:background "green")))) - '(bold ((t (:bold t :weight bold)))) - '(bold-italic ((t (:italic t :bold t :weight bold)))) - '(button ((t (:underline t)))) - '(comint-highlight-input ((t (:bold t :weight bold)))) - '(comint-highlight-prompt ((t (:foreground "cyan")))) - '(custom-button-face ((t (:background "lightgrey" :foreground "black" :box (:line-width 2 :style released-button))))) - '(custom-button-pressed-face ((t (:background "lightgrey" :foreground "black" :box (:line-width 2 :style pressed-button))))) - '(custom-changed-face ((t (:background "blue" :foreground "white")))) - '(custom-comment-face ((t (:background "dim gray")))) - '(custom-comment-tag-face ((t (:foreground "gray80")))) - '(custom-documentation-face ((t (nil)))) - '(custom-face-tag-face ((t (:bold t :family "helv" :weight bold :height 1.2)))) - '(custom-group-tag-face ((t (:bold t :foreground "light blue" :weight bold :height 1.2)))) - '(custom-group-tag-face-1 ((t (:bold t :family "helv" :foreground "pink" :weight bold :height 1.2)))) - '(custom-invalid-face ((t (:background "red" :foreground "yellow")))) - '(custom-modified-face ((t (:background "blue" :foreground "white")))) - '(custom-rogue-face ((t (:background "black" :foreground "pink")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:background "white" :foreground "blue")))) - '(custom-state-face ((t (:foreground "lime green")))) - '(custom-variable-button-face ((t (:bold t :underline t :weight bold)))) - '(custom-variable-tag-face ((t (:bold t :family "helv" :foreground "light blue" :weight bold :height 1.2)))) - '(erc-action-face ((t (:bold t :box (:line-width 2 :color "grey75") :weight bold)))) - '(erc-bold-face ((t (:bold t :weight bold)))) - '(erc-default-face ((t (nil)))) - '(erc-direct-msg-face ((t (:foreground "IndianRed")))) - '(erc-error-face ((t (:background "Red" :foreground "White")))) - '(erc-input-face ((t (:foreground "lightblue")))) - '(erc-inverse-face ((t (:background "Black" :foreground "White")))) - '(erc-notice-face ((t (:bold t :foreground "dodgerblue" :weight bold)))) - '(erc-prompt-face ((t (:bold t :background "black" :foreground "white" :weight bold)))) - '(erc-timestamp-face ((t (:bold t :foreground "green" :weight bold)))) - '(erc-underline-face ((t (:underline t)))) - '(eshell-ls-archive-face ((t (:bold t :foreground "Orchid" :weight bold)))) - '(eshell-ls-backup-face ((t (:foreground "LightSalmon")))) - '(eshell-ls-clutter-face ((t (:bold t :foreground "OrangeRed" :weight bold)))) - '(eshell-ls-directory-face ((t (:bold t :foreground "SkyBlue" :weight bold)))) - '(eshell-ls-executable-face ((t (:bold t :foreground "Green" :weight bold)))) - '(eshell-ls-missing-face ((t (:bold t :foreground "Red" :weight bold)))) - '(eshell-ls-product-face ((t (:foreground "LightSalmon")))) - '(eshell-ls-readonly-face ((t (:foreground "Pink")))) - '(eshell-ls-special-face ((t (:bold t :foreground "Magenta" :weight bold)))) - '(eshell-ls-symlink-face ((t (:bold t :foreground "Cyan" :weight bold)))) - '(eshell-ls-unreadable-face ((t (:foreground "DarkGrey")))) - '(eshell-prompt-face ((t (:bold t :foreground "Pink" :weight bold)))) - '(fg:erc-color-face0 ((t (:foreground "White")))) - '(fg:erc-color-face1 ((t (:foreground "black")))) - '(fg:erc-color-face10 ((t (:foreground "lightblue1")))) - '(fg:erc-color-face11 ((t (:foreground "cyan")))) - '(fg:erc-color-face12 ((t (:foreground "blue")))) - '(fg:erc-color-face13 ((t (:foreground "deeppink")))) - '(fg:erc-color-face14 ((t (:foreground "gray50")))) - '(fg:erc-color-face15 ((t (:foreground "gray90")))) - '(fg:erc-color-face2 ((t (:foreground "blue4")))) - '(fg:erc-color-face3 ((t (:foreground "green4")))) - '(fg:erc-color-face4 ((t (:foreground "red")))) - '(fg:erc-color-face5 ((t (:foreground "brown")))) - '(fg:erc-color-face6 ((t (:foreground "purple")))) - '(fg:erc-color-face7 ((t (:foreground "orange")))) - '(fg:erc-color-face8 ((t (:foreground "yellow")))) - '(fg:erc-color-face9 ((t (:foreground "green")))) - '(fixed-pitch ((t (:family "courier")))) - '(font-lock-builtin-face ((t (:bold t :foreground "pink" :weight bold :height 1.1)))) - '(font-lock-comment-face ((t (:foreground "violet" :height 1.0)))) - '(font-lock-constant-face ((t (:bold t :foreground "tomato" :weight bold :height 1.0)))) - '(font-lock-function-name-face ((t (:bold t :foreground "DodgerBlue" :weight bold)))) - '(font-lock-keyword-face ((t (:bold t :foreground "turquoise" :weight bold)))) - '(font-lock-preprocessor-face ((t (:bold t :foreground "tomato" :weight bold :height 1.0)))) - '(font-lock-reference-face ((t (:bold t :foreground "pink" :weight bold :height 1.1)))) - '(font-lock-string-face ((t (:foreground "red" :height 1.0)))) - '(font-lock-type-face ((t (:foreground "lightblue3")))) - '(font-lock-variable-name-face ((t (:bold t :foreground "gray" :weight bold :height 1.0)))) - '(font-lock-warning-face ((t (:bold t :foreground "Pink" :weight bold)))) - '(fringe ((t (:background "DarkSlateGray")))) - '(gnus-cite-attribution-face ((t (:italic t)))) - '(gnus-cite-face-1 ((t (:foreground "light blue")))) - '(gnus-cite-face-10 ((t (:foreground "medium purple")))) - '(gnus-cite-face-11 ((t (:foreground "turquoise")))) - '(gnus-cite-face-2 ((t (:foreground "light cyan")))) - '(gnus-cite-face-3 ((t (:foreground "light yellow")))) - '(gnus-cite-face-4 ((t (:foreground "light pink")))) - '(gnus-cite-face-5 ((t (:foreground "pale green")))) - '(gnus-cite-face-6 ((t (:foreground "beige")))) - '(gnus-cite-face-7 ((t (:foreground "orange")))) - '(gnus-cite-face-8 ((t (:foreground "magenta")))) - '(gnus-cite-face-9 ((t (:foreground "violet")))) - '(gnus-emphasis-bold ((t (:bold t :weight bold)))) - '(gnus-emphasis-bold-italic ((t (:italic t :bold t :weight bold)))) - '(gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) - '(gnus-emphasis-italic ((t (:italic t)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(gnus-emphasis-underline-bold ((t (:bold t :underline t :weight bold)))) - '(gnus-emphasis-underline-bold-italic ((t (:italic t :bold t :underline t :weight bold)))) - '(gnus-emphasis-underline-italic ((t (:italic t :underline t)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "aquamarine1")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "aquamarine1" :weight bold)))) - '(gnus-group-mail-2-empty-face ((t (:foreground "aquamarine2")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "aquamarine2" :weight bold)))) - '(gnus-group-mail-3-empty-face ((t (:foreground "aquamarine3")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "aquamarine3" :weight bold)))) - '(gnus-group-mail-low-empty-face ((t (:foreground "aquamarine4")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "aquamarine4" :weight bold)))) - '(gnus-group-news-1-empty-face ((t (:foreground "PaleTurquoise")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "PaleTurquoise" :weight bold)))) - '(gnus-group-news-2-empty-face ((t (:foreground "turquoise")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "turquoise" :weight bold)))) - '(gnus-group-news-3-empty-face ((t (nil)))) - '(gnus-group-news-3-face ((t (:bold t :weight bold)))) - '(gnus-group-news-4-empty-face ((t (nil)))) - '(gnus-group-news-4-face ((t (:bold t :weight bold)))) - '(gnus-group-news-5-empty-face ((t (nil)))) - '(gnus-group-news-5-face ((t (:bold t :weight bold)))) - '(gnus-group-news-6-empty-face ((t (nil)))) - '(gnus-group-news-6-face ((t (:bold t :weight bold)))) - '(gnus-group-news-low-empty-face ((t (:foreground "DarkTurquoise")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "DarkTurquoise" :weight bold)))) - '(gnus-header-content-face ((t (:italic t :foreground "forest green")))) - '(gnus-header-from-face ((t (:foreground "spring green")))) - '(gnus-header-name-face ((t (:foreground "SeaGreen")))) - '(gnus-header-newsgroups-face ((t (:italic t :foreground "yellow")))) - '(gnus-header-subject-face ((t (:foreground "SeaGreen3")))) - '(gnus-signature-face ((t (:italic t)))) - '(gnus-splash-face ((t (:foreground "Brown")))) - '(gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "SkyBlue" :weight bold)))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "PaleGreen" :weight bold)))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "pink" :weight bold)))) - '(gnus-summary-high-unread-face ((t (:bold t :weight bold)))) - '(gnus-summary-low-ancient-face ((t (:italic t :foreground "SkyBlue")))) - '(gnus-summary-low-read-face ((t (:italic t :foreground "PaleGreen")))) - '(gnus-summary-low-ticked-face ((t (:italic t :foreground "pink")))) - '(gnus-summary-low-unread-face ((t (:italic t)))) - '(gnus-summary-normal-ancient-face ((t (:foreground "SkyBlue")))) - '(gnus-summary-normal-read-face ((t (:foreground "PaleGreen")))) - '(gnus-summary-normal-ticked-face ((t (:foreground "pink")))) - '(gnus-summary-normal-unread-face ((t (nil)))) - '(gnus-summary-selected-face ((t (:underline t)))) - '(header-line ((t (:underline "blueviolet" :overline "blueviolet" :background "grey20" :foreground "grey90")))) - '(highlight ((t (:background "darkolivegreen")))) - '(html-helper-bold-face ((t (:bold t :foreground "wheat" :weight bold)))) - '(html-helper-italic-face ((t (:italic t :foreground "spring green")))) - '(html-helper-underline-face ((t (:foreground "cornsilk" :underline t)))) - '(html-tag-face ((t (:bold t :foreground "deep sky blue" :weight bold)))) - '(info-menu-6 ((t (nil)))) - '(isearch ((t (:background "palevioletred2" :foreground "brown4")))) - '(isearch-lazy-highlight-face ((t (:background "paleturquoise4")))) - '(italic ((t (:italic t)))) - '(jde-bug-breakpoint-cursor ((t (:background "brown" :foreground "cyan")))) - '(jde-db-active-breakpoint-face ((t (:background "red" :foreground "black")))) - '(jde-db-requested-breakpoint-face ((t (:background "yellow" :foreground "black")))) - '(jde-db-spec-breakpoint-face ((t (:background "green" :foreground "black")))) - '(jde-java-font-lock-api-face ((t (:foreground "light goldenrod")))) - '(jde-java-font-lock-bold-face ((t (:bold t :weight bold)))) - '(jde-java-font-lock-code-face ((t (nil)))) - '(jde-java-font-lock-constant-face ((t (:foreground "Aquamarine")))) - '(jde-java-font-lock-doc-tag-face ((t (:foreground "light coral")))) - '(jde-java-font-lock-italic-face ((t (:italic t)))) - '(jde-java-font-lock-link-face ((t (:foreground "blue" :underline t :slant normal)))) - '(jde-java-font-lock-modifier-face ((t (:foreground "LightSteelBlue")))) - '(jde-java-font-lock-number-face ((t (:foreground "LightSalmon")))) - '(jde-java-font-lock-operator-face ((t (:foreground "medium blue")))) - '(jde-java-font-lock-package-face ((t (:foreground "steelblue1")))) - '(jde-java-font-lock-pre-face ((t (nil)))) - '(jde-java-font-lock-underline-face ((t (:underline t)))) - '(menu ((t (nil)))) - '(message-cited-text-face ((t (:foreground "red")))) - '(message-header-cc-face ((t (:bold t :foreground "green4" :weight bold)))) - '(message-header-name-face ((t (:foreground "DarkGreen")))) - '(message-header-newsgroups-face ((t (:italic t :bold t :foreground "yellow" :weight bold)))) - '(message-header-other-face ((t (:foreground "#b00000")))) - '(message-header-subject-face ((t (:foreground "green3")))) - '(message-header-to-face ((t (:bold t :foreground "green2" :weight bold)))) - '(message-header-xheader-face ((t (:foreground "blue")))) - '(message-mml-face ((t (:foreground "ForestGreen")))) - '(message-separator-face ((t (:foreground "blue3")))) - '(minibuffer-prompt ((t (:foreground "cyan")))) - '(mode-line ((t (:background "Darkslategray" :foreground "white" :overline "blueviolet" :underline "blueviolet")))) - '(mode-line-inactive ((t (:italic t :underline "blueviolet" :overline "blueviolet" :background "white" :foreground "cadetblue" :weight light)))) - '(modeline ((t (:background "Darkslategray" :foreground "white" :overline "blueviolet" :underline "blueviolet")))) - '(modeline-buffer-id ((t (:background "Darkslategray" :foreground "white" :overline "blueviolet" :underline "blueviolet")))) - '(modeline-mousable ((t (:background "Darkslategray" :foreground "white" :overline "blueviolet" :underline "blueviolet")))) - '(modeline-mousable-minor-mode ((t (:background "Darkslategray" :foreground "white" :overline "blueviolet" :underline "blueviolet")))) - '(primary-selection ((t (:background "dimgray")))) - '(region ((t (:background "dimgray")))) - '(scroll-bar ((t (nil)))) - '(secondary-selection ((t (:background "SkyBlue4")))) - '(semantic-dirty-token-face ((t (:background "lightyellow")))) - '(semantic-unmatched-syntax-face ((t (:underline "red")))) - '(senator-intangible-face ((t (:foreground "gray75")))) - '(senator-momentary-highlight-face ((t (:background "gray30")))) - '(senator-read-only-face ((t (:background "#664444")))) - '(show-paren-match-face ((t (:bold t :foreground "lightblue" :weight bold :height 1.1)))) - '(show-paren-mismatch-face ((t (:bold t :foreground "red" :weight bold :height 1.1)))) - '(show-tabs-space-face ((t (:foreground "yellow")))) - '(show-tabs-tab-face ((t (:foreground "red")))) - '(speedbar-button-face ((t (:foreground "green3")))) - '(speedbar-directory-face ((t (:foreground "light blue")))) - '(speedbar-file-face ((t (:foreground "cyan")))) - '(speedbar-highlight-face ((t (:background "sea green")))) - '(speedbar-selected-face ((t (:foreground "red" :underline t)))) - '(speedbar-tag-face ((t (:foreground "yellow")))) - '(template-message-face ((t (:bold t :weight bold)))) - '(term-black ((t (:foreground "black")))) - '(term-blackbg ((t (:background "black")))) - '(term-blue ((t (:foreground "blue")))) - '(term-bluebg ((t (:background "blue")))) - '(term-bold ((t (:bold t :weight bold)))) - '(term-cyan ((t (:foreground "cyan")))) - '(term-cyanbg ((t (:background "cyan")))) - '(term-default ((t (:background "DarkSlateGray" :foreground "palegreen")))) - '(term-default-bg ((t (nil)))) - '(term-default-bg-inv ((t (nil)))) - '(term-default-fg ((t (nil)))) - '(term-default-fg-inv ((t (nil)))) - '(term-green ((t (:foreground "green")))) - '(term-greenbg ((t (:background "green")))) - '(term-invisible ((t (nil)))) - '(term-invisible-inv ((t (nil)))) - '(term-magenta ((t (:foreground "magenta")))) - '(term-magentabg ((t (:background "magenta")))) - '(term-red ((t (:foreground "red")))) - '(term-redbg ((t (:background "red")))) - '(term-underline ((t (:underline t)))) - '(term-white ((t (:foreground "white")))) - '(term-whitebg ((t (:background "white")))) - '(term-yellow ((t (:foreground "yellow")))) - '(term-yellowbg ((t (:background "yellow")))) - '(tool-bar ((t (:background "DarkSlateGray" :foreground "White")))) - '(tooltip ((t (:background "lightyellow" :foreground "black")))) - '(trailing-whitespace ((t (:background "red")))) - '(underline ((t (:underline t)))) - '(variable-pitch ((t (:family "helv")))) - '(widget-button-face ((t (:bold t :weight bold)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "lime green")))) - '(widget-field-face ((t (:background "dim gray")))) - '(widget-inactive-face ((t (:foreground "light gray")))) - '(widget-single-line-field-face ((t (:background "dim gray")))) - '(zmacs-region ((t (:background "dimgray"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'bharadwaj-slate) - -;;; bharadwaj-slate-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/bharadwaj-theme.el b/elpa/color-theme-modern-0.0.3/bharadwaj-theme.el deleted file mode 100644 index 43da5d0..0000000 --- a/elpa/color-theme-modern-0.0.3/bharadwaj-theme.el +++ /dev/null @@ -1,377 +0,0 @@ -;;; bharadwaj-theme.el --- bharadwaj theme - -;; Copyright (C) 2001 by Girish Bharadwaj -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of bharadwaj theme from `color-themes' - -;;; Code: - -(deftheme bharadwaj - "bharadwaj theme") - -(custom-theme-set-faces - 'bharadwaj - - '(default ((t (:background "gainsboro" :foreground "black")))) - '(mouse ((t (:foreground "grey15")))) - '(cursor ((t (:background "grey15")))) - '(border ((t (:foreground "black")))) - - '(gnus-mouse-face ((t (:background "LightSkyBlue")))) - '(smiley-mouse-face ((t (:background "LightSkyBlue")))) - - '(bbdb-company ((t (nil)))) - '(bbdb-field-name ((t (:bold t)))) - '(bbdb-field-value ((t (nil)))) - '(bbdb-name ((t (:underline t)))) - '(blank-space-face ((t (nil)))) - '(blank-tab-face ((t (nil)))) - '(blue ((t (nil)))) - '(bold ((t (:bold t)))) - '(bold-italic ((t (:bold t)))) - '(border-glyph ((t (nil)))) - '(calendar-today-face ((t (:underline t)))) - '(comint-input-face ((t (:foreground "deepskyblue")))) - '(cperl-array-face ((t (:bold t :background "lightyellow2" :foreground "Blue")))) - '(cperl-hash-face ((t (:bold t :background "lightyellow2" :foreground "Red")))) - '(cperl-nonoverridable-face ((t (:foreground "chartreuse3")))) - '(custom-button-face ((t (:bold t)))) - '(custom-changed-face ((t (:background "blue" :foreground "white")))) - '(custom-documentation-face ((t (nil)))) - '(custom-face-tag-face ((t (:underline t)))) - '(custom-group-tag-face ((t (:underline t :bold t :foreground "blue")))) - '(custom-group-tag-face-1 ((t (:underline t :foreground "red")))) - '(custom-invalid-face ((t (:background "red" :foreground "yellow")))) - '(custom-modified-face ((t (:background "blue" :foreground "white")))) - '(custom-rogue-face ((t (:background "black" :foreground "pink")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:background "white" :foreground "blue")))) - '(custom-state-face ((t (:foreground "dark green")))) - '(custom-variable-button-face ((t (:underline t :bold t)))) - '(custom-variable-tag-face ((t (:underline t :bold t :foreground "blue")))) - '(cvs-filename-face ((t (:foreground "blue4")))) - '(cvs-handled-face ((t (:foreground "pink")))) - '(cvs-header-face ((t (:bold t :foreground "blue4")))) - '(cvs-marked-face ((t (:bold t :foreground "green3")))) - '(cvs-msg-face ((t (nil)))) - '(cvs-need-action-face ((t (:foreground "orange")))) - '(cvs-unknown-face ((t (:foreground "red")))) - '(diary-face ((t (:bold t :foreground "red")))) - '(dired-face-boring ((t (:foreground "Gray65")))) - '(dired-face-directory ((t (:bold t :foreground "forestgreen")))) - '(dired-face-executable ((t (:foreground "indianred")))) - '(dired-face-flagged ((t (:background "SlateGray")))) - '(dired-face-marked ((t (:background "darkblue" :foreground "deepskyblue")))) - '(dired-face-permissions ((t (nil)))) - '(dired-face-setuid ((t (:foreground "Red")))) - '(dired-face-socket ((t (:foreground "magenta")))) - '(dired-face-symlink ((t (:foreground "grey95")))) - '(display-time-mail-balloon-enhance-face ((t (:background "orange")))) - '(display-time-mail-balloon-gnus-group-face ((t (:foreground "blue")))) - '(display-time-time-balloon-face ((t (:foreground "red")))) - '(ediff-current-diff-face-A ((t (:background "pale green" :foreground "firebrick")))) - '(ediff-current-diff-face-Ancestor ((t (:background "VioletRed" :foreground "Black")))) - '(ediff-current-diff-face-B ((t (:background "Yellow" :foreground "DarkOrchid")))) - '(ediff-current-diff-face-C ((t (:background "Pink" :foreground "Navy")))) - '(ediff-even-diff-face-A ((t (:background "light grey" :foreground "Black")))) - '(ediff-even-diff-face-Ancestor ((t (:background "Grey" :foreground "White")))) - '(ediff-even-diff-face-B ((t (:background "Grey" :foreground "White")))) - '(ediff-even-diff-face-C ((t (:background "light grey" :foreground "Black")))) - '(ediff-fine-diff-face-A ((t (:background "sky blue" :foreground "Navy")))) - '(ediff-fine-diff-face-Ancestor ((t (:background "Green" :foreground "Black")))) - '(ediff-fine-diff-face-B ((t (:background "cyan" :foreground "Black")))) - '(ediff-fine-diff-face-C ((t (:background "Turquoise" :foreground "Black")))) - '(ediff-odd-diff-face-A ((t (:background "Grey" :foreground "White")))) - '(ediff-odd-diff-face-Ancestor ((t (:background "light grey" :foreground "Black")))) - '(ediff-odd-diff-face-B ((t (:background "light grey" :foreground "Black")))) - '(ediff-odd-diff-face-C ((t (:background "Grey" :foreground "White")))) - '(erc-action-face ((t (:bold t)))) - '(erc-bold-face ((t (:bold t)))) - '(erc-default-face ((t (nil)))) - '(erc-direct-msg-face ((t (nil)))) - '(erc-error-face ((t (:bold t)))) - '(erc-input-face ((t (nil)))) - '(erc-inverse-face ((t (nil)))) - '(erc-notice-face ((t (nil)))) - '(erc-pal-face ((t (nil)))) - '(erc-prompt-face ((t (nil)))) - '(erc-underline-face ((t (nil)))) - '(eshell-ls-archive-face ((t (:bold t :foreground "Orchid")))) - '(eshell-ls-backup-face ((t (:foreground "OrangeRed")))) - '(eshell-ls-clutter-face ((t (:bold t :foreground "OrangeRed")))) - '(eshell-ls-directory-face ((t (:bold t :foreground "Blue")))) - '(eshell-ls-executable-face ((t (:bold t :foreground "ForestGreen")))) - '(eshell-ls-missing-face ((t (:bold t :foreground "Red")))) - '(eshell-ls-picture-face ((t (nil)))) - '(eshell-ls-product-face ((t (:foreground "OrangeRed")))) - '(eshell-ls-readonly-face ((t (:foreground "Brown")))) - '(eshell-ls-special-face ((t (:bold t :foreground "Magenta")))) - '(eshell-ls-symlink-face ((t (:bold t :foreground "DarkCyan")))) - '(eshell-ls-unreadable-face ((t (:foreground "Grey30")))) - '(eshell-prompt-face ((t (:bold t :foreground "Red")))) - '(eshell-test-failed-face ((t (:bold t :foreground "OrangeRed")))) - '(eshell-test-ok-face ((t (:bold t :foreground "Green")))) - '(excerpt ((t (nil)))) - '(ff-paths-non-existant-file-face ((t (:bold t :foreground "NavyBlue")))) - '(fg:black ((t (:foreground "black")))) - '(fixed ((t (:bold t)))) - '(flyspell-duplicate-face ((t (:underline t :bold t :foreground "Gold3")))) - '(flyspell-incorrect-face ((t (:underline t :bold t :foreground "OrangeRed")))) - '(font-latex-bold-face ((t (nil)))) - '(font-latex-italic-face ((t (nil)))) - '(font-latex-math-face ((t (nil)))) - '(font-latex-sedate-face ((t (nil)))) - '(font-latex-string-face ((t (nil)))) - '(font-latex-warning-face ((t (nil)))) - '(font-lock-builtin-face ((t (:foreground "ForestGreen")))) - '(font-lock-comment-face ((t (:foreground "grey55")))) - '(font-lock-constant-face ((t (:foreground "OliveDrab")))) - '(font-lock-doc-string-face ((t (:bold t :foreground "blue4")))) - '(font-lock-exit-face ((t (nil)))) - '(font-lock-function-name-face ((t (:italic t :bold t :foreground "SlateBlue")))) - '(font-lock-keyword-face ((t (:foreground "DarkBlue")))) - '(font-lock-preprocessor-face ((t (:foreground "blue3")))) - '(font-lock-reference-face ((t (:foreground "red3")))) - '(font-lock-string-face ((t (:foreground "DarkRed")))) - '(font-lock-type-face ((t (:foreground "SteelBlue4")))) - '(font-lock-variable-name-face ((t (:foreground "DarkGoldenrod")))) - '(font-lock-warning-face ((t (:bold t :foreground "VioletRed")))) - '(fringe ((t (:background "grey95")))) - '(gnus-cite-attribution-face ((t (:bold t)))) - '(gnus-cite-face-1 ((t (:foreground "MidnightBlue")))) - '(gnus-cite-face-10 ((t (:foreground "medium purple")))) - '(gnus-cite-face-11 ((t (:foreground "turquoise")))) - '(gnus-cite-face-2 ((t (:foreground "firebrick")))) - '(gnus-cite-face-3 ((t (:foreground "dark green")))) - '(gnus-cite-face-4 ((t (:foreground "OrangeRed")))) - '(gnus-cite-face-5 ((t (:foreground "dark khaki")))) - '(gnus-cite-face-6 ((t (:foreground "dark violet")))) - '(gnus-cite-face-7 ((t (:foreground "SteelBlue4")))) - '(gnus-cite-face-8 ((t (:foreground "magenta")))) - '(gnus-cite-face-9 ((t (:foreground "violet")))) - '(gnus-emphasis-bold ((t (:bold t)))) - '(gnus-emphasis-bold-italic ((t (:bold t)))) - '(gnus-emphasis-highlight-words ((t (nil)))) - '(gnus-emphasis-italic ((t (nil)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(gnus-emphasis-underline-bold ((t (:underline t :bold t)))) - '(gnus-emphasis-underline-bold-italic ((t (:underline t :bold t)))) - '(gnus-emphasis-underline-italic ((t (:underline t)))) - '(gnus-filterhist-face-1 ((t (nil)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "DeepPink3")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "DeepPink3")))) - '(gnus-group-mail-2-empty-face ((t (:foreground "HotPink3")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "HotPink3")))) - '(gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "magenta4")))) - '(gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "DeepPink4")))) - '(gnus-group-news-1-empty-face ((t (:foreground "ForestGreen")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "ForestGreen")))) - '(gnus-group-news-2-empty-face ((t (:foreground "CadetBlue4")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "CadetBlue4")))) - '(gnus-group-news-3-empty-face ((t (nil)))) - '(gnus-group-news-3-face ((t (:bold t)))) - '(gnus-group-news-4-empty-face ((t (nil)))) - '(gnus-group-news-4-face ((t (:bold t)))) - '(gnus-group-news-5-empty-face ((t (nil)))) - '(gnus-group-news-5-face ((t (:bold t)))) - '(gnus-group-news-6-empty-face ((t (nil)))) - '(gnus-group-news-6-face ((t (:bold t)))) - '(gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "DarkGreen")))) - '(gnus-header-content-face ((t (:foreground "indianred4")))) - '(gnus-header-from-face ((t (:bold t :foreground "red3")))) - '(gnus-header-name-face ((t (:bold t :foreground "maroon")))) - '(gnus-header-newsgroups-face ((t (:bold t :foreground "MidnightBlue")))) - '(gnus-header-subject-face ((t (:bold t :foreground "red4")))) - '(gnus-picons-face ((t (:background "white" :foreground "black")))) - '(gnus-picons-xbm-face ((t (:background "white" :foreground "black")))) - '(gnus-signature-face ((t (nil)))) - '(gnus-splash ((t (nil)))) - '(gnus-splash-face ((t (:foreground "ForestGreen")))) - '(gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "RoyalBlue")))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "DarkGreen")))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "firebrick")))) - '(gnus-summary-high-unread-face ((t (:bold t)))) - '(gnus-summary-low-ancient-face ((t (:foreground "RoyalBlue")))) - '(gnus-summary-low-read-face ((t (:foreground "DarkGreen")))) - '(gnus-summary-low-ticked-face ((t (:bold t :foreground "firebrick")))) - '(gnus-summary-low-unread-face ((t (nil)))) - '(gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) - '(gnus-summary-normal-read-face ((t (:foreground "DarkGreen")))) - '(gnus-summary-normal-ticked-face ((t (:bold t :foreground "firebrick")))) - '(gnus-summary-normal-unread-face ((t (:bold t)))) - '(gnus-summary-selected-face ((t (:underline t)))) - '(gnus-x-face ((t (:background "white" :foreground "black")))) - '(green ((t (nil)))) - '(gui-button-face ((t (:background "grey75")))) - '(gui-element ((t (:background "Gray80")))) - '(highlight ((t (:background "LightSkyBlue")))) - '(highlight-changes-delete-face ((t (:underline t :foreground "red")))) - '(highlight-changes-face ((t (:foreground "red")))) - '(highline-face ((t (:background "grey95")))) - '(holiday-face ((t (:background "pink")))) - '(html-helper-italic-face ((t (nil)))) - '(info-menu-5 ((t (:underline t)))) - '(info-node ((t (:bold t)))) - '(info-xref ((t (:bold t)))) - '(isearch ((t (:background "yellow")))) - '(isearch-secondary ((t (:foreground "red3")))) - '(italic ((t (nil)))) - '(lazy-highlight-face ((t (:bold t :foreground "dark magenta")))) - '(left-margin ((t (nil)))) - '(linemenu-face ((t (nil)))) - '(list-mode-item-selected ((t (nil)))) - '(makefile-space-face ((t (:background "hotpink")))) - '(message-cited-text-face ((t (:foreground "red")))) - '(message-header-cc-face ((t (:bold t :foreground "MidnightBlue")))) - '(message-header-name-face ((t (:foreground "cornflower blue")))) - '(message-header-newsgroups-face ((t (:bold t :foreground "blue4")))) - '(message-header-other-face ((t (:foreground "steel blue")))) - '(message-header-subject-face ((t (:bold t :foreground "navy blue")))) - '(message-header-to-face ((t (:bold t :foreground "MidnightBlue")))) - '(message-header-xheader-face ((t (:foreground "blue")))) - '(message-mml-face ((t (:bold t)))) - '(message-separator-face ((t (:foreground "brown")))) - '(modeline ((t (:background "white" :foreground "black")))) - '(modeline-buffer-id ((t (:background "white" :foreground "black")))) - '(modeline-mousable ((t (:background "white" :foreground "black")))) - '(modeline-mousable-minor-mode ((t (:background "white" :foreground "black")))) - '(paren-blink-off ((t (:foreground "gray80")))) - '(paren-face-match ((t (:background "turquoise")))) - '(paren-face-mismatch ((t (:background "purple" :foreground "white")))) - '(paren-face-no-match ((t (:background "yellow" :foreground "black")))) - '(paren-match ((t (:background "darkseagreen2")))) - '(paren-mismatch ((t (:background "DeepPink" :foreground "black")))) - '(paren-mismatch-face ((t (:bold t)))) - '(paren-no-match-face ((t (:bold t)))) - '(pointer ((t (nil)))) - '(primary-selection ((t (nil)))) - '(red ((t (nil)))) - '(region ((t (:background "grey80")))) - '(right-margin ((t (nil)))) - '(secondary-selection ((t (:background "grey55")))) - '(sgml-comment-face ((t (:foreground "dark turquoise")))) - '(sgml-doctype-face ((t (nil)))) - '(sgml-end-tag-face ((t (nil)))) - '(sgml-entity-face ((t (nil)))) - '(sgml-ignored-face ((t (nil)))) - '(sgml-ms-end-face ((t (:foreground "green")))) - '(sgml-ms-start-face ((t (:foreground "green")))) - '(sgml-pi-face ((t (:foreground "lime green")))) - '(sgml-sgml-face ((t (nil)))) - '(sgml-short-ref-face ((t (:foreground "deep sky blue")))) - '(sgml-start-tag-face ((t (nil)))) - '(shell-option-face ((t (:foreground "blue")))) - '(shell-output-2-face ((t (:foreground "darkseagreen")))) - '(shell-output-3-face ((t (:foreground "slategrey")))) - '(shell-output-face ((t (:foreground "palegreen")))) - '(shell-prompt-face ((t (:foreground "red")))) - '(show-paren-match-face ((t (:background "grey80")))) - '(show-paren-mismatch-face ((t (:bold t :background "purple" :foreground "white")))) - '(speedbar-button-face ((t (:bold t :foreground "green4")))) - '(speedbar-directory-face ((t (:bold t :foreground "blue4")))) - '(speedbar-file-face ((t (:bold t :foreground "cyan4")))) - '(speedbar-highlight-face ((t (:background "green")))) - '(speedbar-selected-face ((t (:underline t :foreground "red")))) - '(speedbar-tag-face ((t (:foreground "brown")))) - '(swbuff-current-buffer-face ((t (:bold t)))) - '(template-message-face ((t (:bold t)))) - '(term-black ((t (:foreground "black")))) - '(term-blackbg ((t (:background "black")))) - '(term-blue ((t (:foreground "blue")))) - '(term-bluebg ((t (:background "blue")))) - '(term-bold ((t (:bold t)))) - '(term-cyan ((t (:foreground "cyan")))) - '(term-cyanbg ((t (:background "cyan")))) - '(term-default-bg ((t (nil)))) - '(term-default-bg-inv ((t (nil)))) - '(term-default-fg ((t (nil)))) - '(term-default-fg-inv ((t (nil)))) - '(term-green ((t (:foreground "green")))) - '(term-greenbg ((t (:background "green")))) - '(term-invisible ((t (nil)))) - '(term-invisible-inv ((t (nil)))) - '(term-magenta ((t (:foreground "magenta")))) - '(term-magentabg ((t (:background "magenta")))) - '(term-red ((t (:foreground "red")))) - '(term-redbg ((t (:background "red")))) - '(term-underline ((t (:underline t)))) - '(term-white ((t (:foreground "white")))) - '(term-whitebg ((t (:background "white")))) - '(term-yellow ((t (:foreground "yellow")))) - '(term-yellowbg ((t (:background "yellow")))) - '(text-cursor ((t (:background "grey15" :foreground "gainsboro")))) - '(toolbar ((t (nil)))) - '(underline ((t (:underline t)))) - '(vc-annotate-face-0046FF ((t (nil)))) - '(vcursor ((t (:underline t :background "cyan" :foreground "blue")))) - '(vertical-divider ((t (nil)))) - '(vhdl-font-lock-attribute-face ((t (:foreground "Orchid")))) - '(vhdl-font-lock-directive-face ((t (:foreground "CadetBlue")))) - '(vhdl-font-lock-enumvalue-face ((t (:foreground "Gold4")))) - '(vhdl-font-lock-function-face ((t (:foreground "Orchid4")))) - '(vhdl-font-lock-prompt-face ((t (:bold t :foreground "Red")))) - '(vhdl-font-lock-reserved-words-face ((t (:bold t :foreground "Orange")))) - '(vhdl-font-lock-translate-off-face ((t (:background "LightGray")))) - '(vhdl-speedbar-architecture-face ((t (:foreground "Blue")))) - '(vhdl-speedbar-architecture-selected-face ((t (:underline t :foreground "Blue")))) - '(vhdl-speedbar-configuration-face ((t (:foreground "DarkGoldenrod")))) - '(vhdl-speedbar-configuration-selected-face ((t (:underline t :foreground "DarkGoldenrod")))) - '(vhdl-speedbar-entity-face ((t (:foreground "ForestGreen")))) - '(vhdl-speedbar-entity-selected-face ((t (:underline t :foreground "ForestGreen")))) - '(vhdl-speedbar-instantiation-face ((t (:foreground "Brown")))) - '(vhdl-speedbar-instantiation-selected-face ((t (:underline t :foreground "Brown")))) - '(vhdl-speedbar-package-face ((t (:foreground "Grey50")))) - '(vhdl-speedbar-package-selected-face ((t (:underline t :foreground "Grey50")))) - '(viper-minibuffer-emacs-face ((t (:background "darkseagreen2" :foreground "Black")))) - '(viper-minibuffer-insert-face ((t (:background "pink" :foreground "Black")))) - '(viper-minibuffer-vi-face ((t (:background "grey" :foreground "DarkGreen")))) - '(viper-replace-overlay-face ((t (:background "darkseagreen2" :foreground "Black")))) - '(viper-search-face ((t (:background "khaki" :foreground "Black")))) - '(vvb-face ((t (:background "pink" :foreground "black")))) - '(widget-button-face ((t (:bold t)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "dark green")))) - '(widget-field-face ((t (:background "navy" :foreground "white")))) - '(widget-inactive-face ((t (:foreground "dim gray")))) - '(widget-single-line-field-face ((t (:background "royalblue" :foreground "white")))) - '(woman-bold-face ((t (:bold t)))) - '(woman-italic-face ((t (nil)))) - '(woman-unknown-face ((t (nil)))) - '(xref-keyword-face ((t (:foreground "blue")))) - '(xref-list-pilot-face ((t (:foreground "navy")))) - '(xref-list-symbol-face ((t (:foreground "navy")))) - '(yellow ((t (nil)))) - '(zmacs-region ((t (:background "royalblue"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'bharadwaj) - -;;; bharadwaj-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/billw-theme.el b/elpa/color-theme-modern-0.0.3/billw-theme.el deleted file mode 100644 index 10a5fb1..0000000 --- a/elpa/color-theme-modern-0.0.3/billw-theme.el +++ /dev/null @@ -1,217 +0,0 @@ -;;; billw-theme.el --- billw theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of billw theme from `color-themes' - -;;; Code: - -(deftheme billw - "billw theme") - -(custom-theme-set-faces - 'billw - - '(default ((t (:background "black" :foreground "cornsilk")))) - '(mouse ((t (:foreground "black")))) - '(cursor ((t (:background "white")))) - '(border ((t (:foreground "black")))) - - '(modeline ((t (:foreground "black" :background "wheat")))) - '(modeline-buffer-id ((t (:foreground "black" :background "wheat")))) - '(modeline-mousable ((t (:foreground "black" :background "wheat")))) - '(modeline-mousable-minor-mode ((t (:foreground "black" :background "wheat")))) - '(highlight ((t (:foreground "wheat" :background "darkslategray")))) - '(bold ((t (:bold t)))) - '(italic ((t (:italic t)))) - '(bold-italic ((t (:bold t :italic t)))) - '(region ((t (:background "dimgray")))) - '(secondary-selection ((t (:background "deepskyblue4")))) - '(underline ((t (:underline t)))) - '(info-node ((t (:foreground "yellow" :bold t :italic t)))) - '(info-menu-5 ((t (:underline t)))) - '(info-xref ((t (:foreground "yellow" :bold t)))) - '(diary-face ((t (:foreground "orange")))) - '(calendar-today-face ((t (:underline t)))) - '(holiday-face ((t (:background "red")))) - '(show-paren-match-face ((t (:background "deepskyblue4")))) - '(show-paren-mismatch-face ((t (:foreground "white" :background "red")))) - '(font-lock-comment-face ((t (:foreground "gold")))) - '(font-lock-string-face ((t (:foreground "orange")))) - '(font-lock-keyword-face ((t (:foreground "cyan1")))) - '(font-lock-builtin-face ((t (:foreground "LightSteelBlue")))) - '(font-lock-function-name-face ((t (:foreground "mediumspringgreen")))) - '(font-lock-variable-name-face ((t (:foreground "light salmon")))) - '(font-lock-type-face ((t (:foreground "yellow1")))) - '(font-lock-constant-face ((t (:foreground "salmon")))) - '(font-lock-warning-face ((t (:foreground "gold" :bold t)))) - '(blank-space-face ((t (:background "LightGray")))) - '(blank-tab-face ((t (:foreground "black" :background "cornsilk")))) - '(highline-face ((t (:background "gray35")))) - '(eshell-ls-directory-face ((t (:foreground "green" :bold t)))) - '(eshell-ls-symlink-face ((t (:foreground "Cyan" :bold t)))) - '(eshell-ls-executable-face ((t (:foreground "orange" :bold t)))) - '(eshell-ls-readonly-face ((t (:foreground "gray")))) - '(eshell-ls-unreadable-face ((t (:foreground "DarkGrey")))) - '(eshell-ls-special-face ((t (:foreground "Magenta" :bold t)))) - '(eshell-ls-missing-face ((t (:foreground "Red" :bold t)))) - '(eshell-ls-archive-face ((t (:foreground "Orchid" :bold t)))) - '(eshell-ls-backup-face ((t (:foreground "LightSalmon")))) - '(eshell-ls-product-face ((t (:foreground "LightSalmon")))) - '(eshell-ls-clutter-face ((t (:foreground "blue" :bold t)))) - '(sgml-start-tag-face ((t (:foreground "mediumspringgreen")))) - '(custom-button-face ((t (:foreground "white")))) - '(sgml-ignored-face ((t (:foreground "gray20" :background "gray60")))) - '(sgml-doctype-face ((t (:foreground "orange")))) - '(sgml-sgml-face ((t (:foreground "yellow")))) - '(vc-annotate-face-0046FF ((t (:foreground "wheat" :background "black")))) - '(custom-documentation-face ((t (:foreground "white")))) - '(sgml-end-tag-face ((t (:foreground "greenyellow")))) - '(linemenu-face ((t (:background "gray30")))) - '(sgml-entity-face ((t (:foreground "gold")))) - '(message-header-to-face ((t (:foreground "floral white" :bold t)))) - '(message-header-cc-face ((t (:foreground "ivory")))) - '(message-header-subject-face ((t (:foreground "papaya whip" :bold t)))) - '(message-header-newsgroups-face ((t (:foreground "lavender blush" :bold t :italic t)))) - '(message-header-other-face ((t (:foreground "pale turquoise")))) - '(message-header-name-face ((t (:foreground "light sky blue")))) - '(message-header-xheader-face ((t (:foreground "blue")))) - '(message-separator-face ((t (:foreground "sandy brown")))) - '(message-cited-text-face ((t (:foreground "plum1")))) - '(message-mml-face ((t (:foreground "ForestGreen")))) - '(gnus-group-news-1-face ((t (:foreground "white" :bold t)))) - '(gnus-group-news-1-empty-face ((t (:foreground "white")))) - '(gnus-group-news-2-face ((t (:foreground "lightcyan" :bold t)))) - '(gnus-group-news-2-empty-face ((t (:foreground "lightcyan")))) - '(gnus-group-news-3-face ((t (:foreground "tan" :bold t)))) - '(gnus-group-news-3-empty-face ((t (:foreground "tan")))) - '(gnus-group-news-4-face ((t (:foreground "white" :bold t)))) - '(gnus-group-news-4-empty-face ((t (:foreground "white")))) - '(gnus-group-news-5-face ((t (:foreground "wheat" :bold t)))) - '(gnus-group-news-5-empty-face ((t (:foreground "wheat")))) - '(gnus-group-news-6-face ((t (:foreground "tan" :bold t)))) - '(gnus-group-news-6-empty-face ((t (:foreground "tan")))) - '(gnus-group-news-low-face ((t (:foreground "DarkTurquoise" :bold t)))) - '(gnus-group-news-low-empty-face ((t (:foreground "DarkTurquoise")))) - '(gnus-group-mail-1-face ((t (:foreground "white" :bold t)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "gray80")))) - '(gnus-group-mail-2-face ((t (:foreground "lightcyan" :bold t)))) - '(gnus-group-mail-2-empty-face ((t (:foreground "lightcyan")))) - '(gnus-group-mail-3-face ((t (:foreground "tan" :bold t)))) - '(gnus-group-mail-3-empty-face ((t (:foreground "tan")))) - '(gnus-group-mail-low-face ((t (:foreground "aquamarine4" :bold t)))) - '(gnus-group-mail-low-empty-face ((t (:foreground "aquamarine4")))) - '(gnus-summary-selected-face ((t (:background "deepskyblue4" :underline t)))) - '(gnus-summary-cancelled-face ((t (:foreground "black" :background "gray")))) - '(gnus-summary-high-ticked-face ((t (:foreground "gray70" :bold t)))) - '(gnus-summary-low-ticked-face ((t (:foreground "gray70" :bold t)))) - '(gnus-summary-normal-ticked-face ((t (:foreground "gray70" :bold t)))) - '(gnus-summary-high-ancient-face ((t (:foreground "SkyBlue" :bold t)))) - '(gnus-summary-low-ancient-face ((t (:foreground "SkyBlue" :italic t)))) - '(gnus-summary-normal-ancient-face ((t (:foreground "SkyBlue")))) - '(gnus-summary-high-unread-face ((t (:bold t)))) - '(gnus-summary-low-unread-face ((t (:italic t)))) - '(gnus-summary-normal-unread-face ((t (nil)))) - '(gnus-summary-high-read-face ((t (:foreground "PaleGreen" :bold t)))) - '(gnus-summary-low-read-face ((t (:foreground "PaleGreen" :italic t)))) - '(gnus-summary-normal-read-face ((t (:foreground "PaleGreen")))) - '(gnus-splash-face ((t (:foreground "gold")))) - '(font-latex-bold-face ((t (nil)))) - '(font-latex-italic-face ((t (nil)))) - '(font-latex-math-face ((t (nil)))) - '(font-latex-sedate-face ((t (:foreground "Gray85")))) - '(font-latex-string-face ((t (:foreground "orange")))) - '(font-latex-warning-face ((t (:foreground "gold")))) - '(widget-documentation-face ((t (:foreground "lime green")))) - '(widget-button-face ((t (:bold t)))) - '(widget-field-face ((t (:background "gray20")))) - '(widget-single-line-field-face ((t (:background "gray20")))) - '(widget-inactive-face ((t (:foreground "wheat")))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(custom-invalid-face ((t (:foreground "yellow" :background "red")))) - '(custom-rogue-face ((t (:foreground "pink" :background "black")))) - '(custom-modified-face ((t (:foreground "white" :background "blue")))) - '(custom-set-face ((t (:foreground "blue")))) - '(custom-changed-face ((t (:foreground "wheat" :background "skyblue")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-state-face ((t (:foreground "light green")))) - '(custom-variable-tag-face ((t (:foreground "skyblue" :underline t)))) - '(custom-variable-button-face ((t (:bold t :underline t)))) - '(custom-face-tag-face ((t (:foreground "white" :underline t)))) - '(custom-group-tag-face-1 ((t (:foreground "pink" :underline t)))) - '(custom-group-tag-face ((t (:foreground "skyblue" :underline t)))) - '(swbuff-current-buffer-face ((t (:foreground "red" :bold t)))) - '(ediff-current-diff-face-A ((t (:foreground "firebrick" :background "pale green")))) - '(ediff-current-diff-face-B ((t (:foreground "DarkOrchid" :background "Yellow")))) - '(ediff-current-diff-face-C ((t (:foreground "white" :background "indianred")))) - '(ediff-current-diff-face-Ancestor ((t (:foreground "Black" :background "VioletRed")))) - '(ediff-fine-diff-face-A ((t (:foreground "Navy" :background "sky blue")))) - '(ediff-fine-diff-face-B ((t (:foreground "Black" :background "cyan")))) - '(ediff-fine-diff-face-C ((t (:foreground "Black" :background "Turquoise")))) - '(ediff-fine-diff-face-Ancestor ((t (:foreground "Black" :background "Green")))) - '(ediff-even-diff-face-A ((t (:foreground "Black" :background "light grey")))) - '(ediff-even-diff-face-B ((t (:foreground "White" :background "Grey")))) - '(ediff-even-diff-face-C ((t (:foreground "Black" :background "light grey")))) - '(ediff-even-diff-face-Ancestor ((t (:foreground "White" :background "Grey")))) - '(ediff-odd-diff-face-A ((t (:foreground "White" :background "Grey")))) - '(ediff-odd-diff-face-B ((t (:foreground "Black" :background "light grey")))) - '(ediff-odd-diff-face-C ((t (:foreground "White" :background "Grey")))) - '(ediff-odd-diff-face-Ancestor ((t (:foreground "Black" :background "light grey")))) - '(gnus-emphasis-bold ((t (:bold t)))) - '(gnus-emphasis-italic ((t (:italic t)))) - '(gnus-emphasis-underline ((t (:foreground "white" :background "goldenrod4")))) - '(gnus-emphasis-underline-bold ((t (:foreground "black" :background "yellow" :bold t :underline t)))) - '(gnus-emphasis-underline-italic ((t (:foreground "black" :background "yellow" :italic t :underline t)))) - '(gnus-emphasis-bold-italic ((t (:bold t :italic t)))) - '(gnus-emphasis-underline-bold-italic ((t (:foreground "black" :background "yellow" :bold t :italic t :underline t)))) - '(gnus-emphasis-highlight-words ((t (:foreground "yellow" :background "black")))) - '(gnus-signature-face ((t (:italic t)))) - '(gnus-header-from-face ((t (:foreground "wheat")))) - '(gnus-header-subject-face ((t (:foreground "wheat" :bold t)))) - '(gnus-header-newsgroups-face ((t (:foreground "wheat" :italic t)))) - '(gnus-header-name-face ((t (:foreground "white")))) - '(gnus-header-content-face ((t (:foreground "tan" :italic t)))) - '(gnus-filterhist-face-1 ((t (nil)))) - '(gnus-splash ((t (:foreground "Brown")))) - '(gnus-cite-attribution-face ((t (:italic t)))) - '(gnus-cite-face-1 ((t (:foreground "light blue")))) - '(gnus-cite-face-2 ((t (:foreground "light cyan")))) - '(gnus-cite-face-3 ((t (:foreground "light yellow")))) - '(gnus-cite-face-4 ((t (:foreground "light pink")))) - '(gnus-cite-face-5 ((t (:foreground "pale green")))) - '(gnus-cite-face-6 ((t (:foreground "beige")))) - '(gnus-cite-face-7 ((t (:foreground "orange")))) - '(gnus-cite-face-8 ((t (:foreground "magenta")))) - '(gnus-cite-face-9 ((t (:foreground "violet")))) - '(gnus-cite-face-10 ((t (:foreground "medium purple")))) - '(gnus-cite-face-11 ((t (:foreground "turquoise"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'billw) - -;;; billw-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/black-on-gray-theme.el b/elpa/color-theme-modern-0.0.3/black-on-gray-theme.el deleted file mode 100644 index e06e1a3..0000000 --- a/elpa/color-theme-modern-0.0.3/black-on-gray-theme.el +++ /dev/null @@ -1,123 +0,0 @@ -;;; black-on-gray-theme.el --- black-on-gray theme - -;; Copyright (C) 2002 by sbhojwani -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of black-on-gray theme from `color-themes' - -;;; Code: - -(deftheme black-on-gray - "black-on-gray theme") - -(custom-theme-set-faces - 'black-on-gray - - '(default ((t (:background "white" :foreground "black")))) - '(border ((t (:foreground "blue")))) - - '(blue ((t (:foreground "blue")))) - '(bold ((t (:bold t :size "10pt")))) - '(bold-italic ((t (:italic t :bold t :size "10pt")))) - '(border-glyph ((t (:size "11pt")))) - '(buffers-tab ((t (:background "gray75")))) - '(buffers-tab-face ((t (:background "gray75")))) - '(display-time-mail-balloon-enhance-face ((t (:background "orange")))) - '(display-time-mail-balloon-gnus-group-face ((t (:foreground "blue")))) - '(display-time-time-balloon-face ((t (:foreground "red")))) - '(ecb-bucket-token-face ((t (:bold t :size "10pt")))) - '(ecb-default-general-face ((t (nil)))) - '(ecb-default-highlight-face ((t (:background "cornflower blue" :foreground "yellow")))) - '(ecb-directories-general-face ((t (nil)))) - '(ecb-directory-face ((t (:background "cornflower blue" :foreground "yellow")))) - '(ecb-history-face ((t (:background "cornflower blue" :foreground "yellow")))) - '(ecb-history-general-face ((t (nil)))) - '(ecb-method-face ((t (:background "cornflower blue" :foreground "yellow")))) - '(ecb-methods-general-face ((t (nil)))) - '(ecb-source-face ((t (:background "cornflower blue" :foreground "yellow")))) - '(ecb-source-in-directories-buffer-face ((t (:foreground "medium blue")))) - '(ecb-sources-general-face ((t (nil)))) - '(ecb-token-header-face ((t (:background "SeaGreen1")))) - '(ecb-type-token-class-face ((t (:bold t :size "10pt")))) - '(ecb-type-token-enum-face ((t (:bold t :size "10pt")))) - '(ecb-type-token-group-face ((t (:bold t :size "10pt" :foreground "dimgray")))) - '(ecb-type-token-interface-face ((t (:bold t :size "10pt")))) - '(ecb-type-token-struct-face ((t (:bold t :size "10pt")))) - '(ecb-type-token-typedef-face ((t (:bold t :size "10pt")))) - '(font-lock-builtin-face ((t (:foreground "red3")))) - '(font-lock-constant-face ((t (:foreground "blue3")))) - '(font-lock-comment-face ((t (:foreground "blue")))) - '(font-lock-doc-face ((t (:foreground "green4")))) - '(font-lock-doc-string-face ((t (:foreground "green4")))) - '(font-lock-function-name-face ((t (nil)))) - '(font-lock-keyword-face ((t (nil)))) - '(font-lock-preprocessor-face ((t (:foreground "blue3")))) - '(font-lock-reference-face ((t (:foreground "red3")))) - '(font-lock-string-face ((t (nil)))) - '(font-lock-type-face ((t (nil)))) - '(font-lock-variable-name-face ((t (nil)))) - '(font-lock-warning-face ((t (nil)))) - '(green ((t (:foreground "green")))) - '(gui-button-face ((t (:background "grey75")))) - '(gui-element ((t (:size "8pt" :background "gray75")))) - '(highlight ((t (:background "darkseagreen2")))) - '(isearch ((t (:background "paleturquoise")))) - '(isearch-secondary ((t (:foreground "red3")))) - '(italic ((t (:size "10pt")))) - '(left-margin ((t (nil)))) - '(list-mode-item-selected ((t (:background "gray68")))) - '(modeline ((t (:background "gray75")))) - '(modeline-buffer-id ((t (:background "gray75" :foreground "blue4")))) - '(modeline-mousable ((t (:background "gray75" :foreground "firebrick")))) - '(modeline-mousable-minor-mode ((t (:background "gray75" :foreground "green4")))) - '(paren-blink-off ((t (:foreground "gray")))) - '(paren-match ((t (:background "darkseagreen2")))) - '(paren-mismatch ((t (nil)))) - '(pointer ((t (nil)))) - '(primary-selection ((t (:background "gray65")))) - '(red ((t (:foreground "red")))) - '(region ((t (:background "gray65")))) - '(right-margin ((t (nil)))) - '(secondary-selection ((t (:background "paleturquoise")))) - '(semantic-dirty-token-face ((t (nil)))) - '(semantic-unmatched-syntax-face ((t (nil)))) - '(text-cursor ((t (:background "red" :foreground "gray")))) - '(toolbar ((t (:background "gray75")))) - '(underline ((t (:underline t)))) - '(vertical-divider ((t (:background "gray75")))) - '(widget ((t (:size "8pt" :background "gray75")))) - '(widget-button-face ((t (:bold t)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "dark green")))) - '(widget-field-face ((t (:background "gray85")))) - '(widget-inactive-face ((t (nil)))) - '(yellow ((t (:foreground "yellow")))) - '(zmacs-region ((t (:background "gray65"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'black-on-gray) - -;;; black-on-gray-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/blippblopp-theme.el b/elpa/color-theme-modern-0.0.3/blippblopp-theme.el deleted file mode 100644 index f7ff1fe..0000000 --- a/elpa/color-theme-modern-0.0.3/blippblopp-theme.el +++ /dev/null @@ -1,99 +0,0 @@ -;;; blippblopp-theme.el --- blippblopp theme - -;; Copyright (C) 2001 by Thomas Sicheritz-Ponten -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of blippblopp theme from `color-themes' - -;;; Code: - -(deftheme blippblopp - "blippblopp theme") - -(custom-theme-set-faces - 'blippblopp - - '(default ((t (:background "white" :foreground "black")))) - '(mouse ((t (:foreground "black")))) - '(cursor ((t (:background "Red3")))) - '(border ((t (:foreground "black")))) - - '(blue ((t (:foreground "blue")))) - '(bold ((t (:bold t)))) - '(bold-italic ((t (:italic t :bold t)))) - '(excerpt ((t (:italic t)))) - '(ff-paths-non-existant-file-face ((t (:bold t :foreground "NavyBlue")))) - '(fg:black ((t (:foreground "black")))) - '(fixed ((t (:bold t)))) - '(font-lock-builtin-face ((t (:foreground "red3")))) - '(font-lock-comment-face ((t (:foreground "orange")))) - '(font-lock-constant-face ((t (:foreground "red3")))) - '(font-lock-doc-string-face ((t (:foreground "darkgreen")))) - '(font-lock-exit-face ((t (:foreground "green")))) - '(font-lock-function-name-face ((t (:bold t :foreground "red")))) - '(font-lock-keyword-face ((t (:bold t :foreground "steelblue")))) - '(font-lock-preprocessor-face ((t (:foreground "blue3")))) - '(font-lock-reference-face ((t (:foreground "red3")))) - '(font-lock-string-face ((t (:foreground "green4")))) - '(font-lock-type-face ((t (:bold t :foreground "blue")))) - '(font-lock-variable-name-face ((t (:foreground "black")))) - '(font-lock-warning-face ((t (:bold t :foreground "Red")))) - '(green ((t (:foreground "green")))) - '(message-cited-text-face ((t (:foreground "red")))) - '(message-header-cc-face ((t (:foreground "MidnightBlue")))) - '(message-header-name-face ((t (:foreground "cornflower blue")))) - '(message-header-newsgroups-face ((t (:italic t :bold t :foreground "blue4")))) - '(message-header-other-face ((t (:foreground "steel blue")))) - '(message-header-subject-face ((t (:bold t :foreground "navy blue")))) - '(message-header-to-face ((t (:bold t :foreground "MidnightBlue")))) - '(message-header-xheader-face ((t (:foreground "blue")))) - '(message-mml-face ((t (:foreground "ForestGreen")))) - '(message-separator-face ((t (:foreground "brown")))) - '(modeline ((t (:background "dimgray" :foreground "lemonchiffon")))) - '(modeline-buffer-id ((t (:background "dimgray" :foreground "green3")))) - '(modeline-mousable ((t (:background "dimgray" :foreground "orange")))) - '(modeline-mousable-minor-mode ((t (:background "dimgray" :foreground "blue4")))) - '(primary-selection ((t (:background "gray65")))) - '(red ((t (:foreground "red")))) - '(region ((t (:background "gray65")))) - '(secondary-selection ((t (:background "paleturquoise")))) - '(show-paren-match-face ((t (:background "turquoise")))) - '(show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) - '(text-cursor ((t (:background "Red3" :foreground "white")))) - '(toolbar ((t (:background "Gray80")))) - '(underline ((t (:underline t)))) - '(vcursor ((t (:underline t :background "cyan" :foreground "blue")))) - '(vertical-divider ((t (:background "Gray80")))) - '(xref-keyword-face ((t (:foreground "blue")))) - '(xref-list-pilot-face ((t (:foreground "navy")))) - '(xref-list-symbol-face ((t (:foreground "navy")))) - '(yellow ((t (:foreground "yellow")))) - '(zmacs-region ((t (:background "gray65"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'blippblopp) - -;;; blippblopp-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/blue-erc-theme.el b/elpa/color-theme-modern-0.0.3/blue-erc-theme.el deleted file mode 100644 index 02eedf1..0000000 --- a/elpa/color-theme-modern-0.0.3/blue-erc-theme.el +++ /dev/null @@ -1,90 +0,0 @@ -;;; blue-erc-theme.el --- blue-erc theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of blue-erc theme from `color-themes' - -;;; Code: - -(deftheme blue-erc - "blue-erc theme") - -(custom-theme-set-faces - 'blue-erc - - '(erc-action-face ((t (nil)))) - '(erc-bold-face ((t (:bold t)))) - '(erc-current-nick-face ((t (:bold t :foreground "yellow")))) - '(erc-default-face ((t (nil)))) - '(erc-direct-msg-face ((t (:foreground "pale green")))) - '(erc-error-face ((t (:bold t :foreground "IndianRed")))) - '(erc-highlight-face ((t (:bold t :foreground "pale green")))) - '(erc-input-face ((t (:foreground "light blue")))) - '(erc-inverse-face ((t (:background "steel blue")))) - '(erc-keyword-face ((t (:foreground "orange" :bold t)))) - '(erc-notice-face ((t (:foreground "light salmon")))) - '(erc-notice-face ((t (:foreground "MediumAquamarine")))) - '(erc-pal-face ((t (:foreground "pale green")))) - '(erc-prompt-face ((t (:foreground "light blue" :bold t)))) - '(fg:erc-color-face0 ((t (:foreground "white")))) - '(fg:erc-color-face1 ((t (:foreground "beige")))) - '(fg:erc-color-face2 ((t (:foreground "lemon chiffon")))) - '(fg:erc-color-face3 ((t (:foreground "light cyan")))) - '(fg:erc-color-face4 ((t (:foreground "powder blue")))) - '(fg:erc-color-face5 ((t (:foreground "sky blue")))) - '(fg:erc-color-face6 ((t (:foreground "dark sea green")))) - '(fg:erc-color-face7 ((t (:foreground "pale green")))) - '(fg:erc-color-face8 ((t (:foreground "medium spring green")))) - '(fg:erc-color-face9 ((t (:foreground "khaki")))) - '(fg:erc-color-face10 ((t (:foreground "pale goldenrod")))) - '(fg:erc-color-face11 ((t (:foreground "light goldenrod yellow")))) - '(fg:erc-color-face12 ((t (:foreground "light yellow")))) - '(fg:erc-color-face13 ((t (:foreground "yellow")))) - '(fg:erc-color-face14 ((t (:foreground "light goldenrod")))) - '(fg:erc-color-face15 ((t (:foreground "lime green")))) - '(bg:erc-color-face0 ((t (nil)))) - '(bg:erc-color-face1 ((t (nil)))) - '(bg:erc-color-face2 ((t (nil)))) - '(bg:erc-color-face3 ((t (nil)))) - '(bg:erc-color-face4 ((t (nil)))) - '(bg:erc-color-face5 ((t (nil)))) - '(bg:erc-color-face6 ((t (nil)))) - '(bg:erc-color-face7 ((t (nil)))) - '(bg:erc-color-face8 ((t (nil)))) - '(bg:erc-color-face9 ((t (nil)))) - '(bg:erc-color-face10 ((t (nil)))) - '(bg:erc-color-face11 ((t (nil)))) - '(bg:erc-color-face12 ((t (nil)))) - '(bg:erc-color-face13 ((t (nil)))) - '(bg:erc-color-face14 ((t (nil)))) - '(bg:erc-color-face15 ((t (nil))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'blue-erc) - -;;; blue-erc-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/blue-eshell-theme.el b/elpa/color-theme-modern-0.0.3/blue-eshell-theme.el deleted file mode 100644 index ec79855..0000000 --- a/elpa/color-theme-modern-0.0.3/blue-eshell-theme.el +++ /dev/null @@ -1,64 +0,0 @@ -;;; blue-eshell-theme.el --- blue-eshell theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of blue-eshell theme from `color-themes' - -;;; Code: - -(deftheme blue-eshell - "blue-eshell theme") - -(custom-theme-set-faces - 'blue-eshell - - '(default ((t (:background "Blue-Eshell" :foreground "DarkSlateGray4")))) - '(mouse ((t (:foreground "black")))) - '(cursor ((t (:background "black")))) - '(border ((t (:foreground "black")))) - - '(eshell-ls-archive-face ((t (:bold t :foreground "IndianRed")))) - '(eshell-ls-backup-face ((t (:foreground "Grey")))) - '(eshell-ls-clutter-face ((t (:foreground "DimGray")))) - '(eshell-ls-directory-face ((t (:bold t :foreground "MediumSlateBlue")))) - '(eshell-ls-executable-face ((t (:foreground "Coral")))) - '(eshell-ls-missing-face ((t (:foreground "black")))) - '(eshell-ls-picture-face ((t (:foreground "Violet")))) ; non-standard face - '(eshell-ls-product-face ((t (:foreground "LightSalmon")))) - '(eshell-ls-readonly-face ((t (:foreground "Aquamarine")))) - '(eshell-ls-special-face ((t (:foreground "Gold")))) - '(eshell-ls-symlink-face ((t (:foreground "White")))) - '(eshell-ls-text-face ((t (:foreground "medium aquamarine")))) ; non-standard face - '(eshell-ls-todo-face ((t (:bold t :foreground "aquamarine")))) ; non-standard face - '(eshell-ls-unreadable-face ((t (:foreground "DimGray")))) - '(eshell-prompt-face ((t (:foreground "powder blue"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'blue-eshell) - -;;; blue-eshell-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/blue-gnus-theme.el b/elpa/color-theme-modern-0.0.3/blue-gnus-theme.el deleted file mode 100644 index d674fb1..0000000 --- a/elpa/color-theme-modern-0.0.3/blue-gnus-theme.el +++ /dev/null @@ -1,114 +0,0 @@ -;;; blue-gnus-theme.el --- blue-gnus theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of blue-gnus theme from `color-themes' - -;;; Code: - -(deftheme blue-gnus - "blue-gnus theme") - -(custom-theme-set-faces - 'blue-gnus - - '(gnus-cite-attribution-face ((t (:foreground "lemon chiffon" :bold t)))) - '(gnus-cite-face-1 ((t (:foreground "LightSalmon")))) - '(gnus-cite-face-2 ((t (:foreground "Khaki")))) - '(gnus-cite-face-3 ((t (:foreground "Coral")))) - '(gnus-cite-face-4 ((t (:foreground "yellow green")))) - '(gnus-cite-face-5 ((t (:foreground "dark khaki")))) - '(gnus-cite-face-6 ((t (:foreground "bisque")))) - '(gnus-cite-face-7 ((t (:foreground "peru")))) - '(gnus-cite-face-8 ((t (:foreground "light coral")))) - '(gnus-cite-face-9 ((t (:foreground "plum")))) - '(gnus-emphasis-bold ((t (:bold t)))) - '(gnus-emphasis-bold-italic ((t (:italic t :bold t)))) - '(gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) - '(gnus-emphasis-italic ((t (:italic t)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(gnus-emphasis-underline-bold ((t (:bold t :underline t)))) - '(gnus-emphasis-underline-bold-italic ((t (:italic t :bold t :underline t)))) - '(gnus-emphasis-underline-italic ((t (:italic t :underline t)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "White")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "White")))) - '(gnus-group-mail-2-empty-face ((t (:foreground "light cyan")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "light cyan")))) - '(gnus-group-mail-3-empty-face ((t (:foreground "LightBlue")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "LightBlue")))) - '(gnus-group-mail-low-empty-face ((t (:foreground "Aquamarine")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "Aquamarine")))) - '(gnus-group-news-1-empty-face ((t (:foreground "White")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "White")))) - '(gnus-group-news-2-empty-face ((t (:foreground "light cyan")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "light cyan")))) - '(gnus-group-news-3-empty-face ((t (:foreground "LightBlue")))) - '(gnus-group-news-3-face ((t (:bold t :foreground "LightBlue")))) - '(gnus-group-news-4-empty-face ((t (:foreground "Aquamarine")))) - '(gnus-group-news-4-face ((t (:bold t :foreground "Aquamarine")))) - '(gnus-group-news-5-empty-face ((t (:foreground "MediumAquamarine")))) - '(gnus-group-news-5-face ((t (:bold t :foreground "MediumAquamarine")))) - '(gnus-group-news-6-empty-face ((t (:foreground "MediumAquamarine")))) - '(gnus-group-news-6-face ((t (:bold t :foreground "MediumAquamarine")))) - '(gnus-group-news-low-empty-face ((t (:foreground "MediumAquamarine")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "MediumAquamarine")))) - '(gnus-header-content-face ((t (:foreground "LightSkyBlue3")))) - '(gnus-header-from-face ((t (:bold t :foreground "light cyan")))) - '(gnus-header-name-face ((t (:bold t :foreground "LightBlue")))) - '(gnus-header-newsgroups-face ((t (:bold t :foreground "MediumAquamarine")))) - '(gnus-header-subject-face ((t (:bold t :foreground "light cyan")))) - '(gnus-signature-face ((t (:foreground "Grey")))) - '(gnus-splash-face ((t (:foreground "ForestGreen")))) - '(gnus-summary-cancelled-face ((t (:background "Black" :foreground "Yellow")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "MediumAquamarine")))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "Aquamarine")))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "LightSalmon")))) - '(gnus-summary-high-unread-face ((t (:bold t :foreground "beige")))) - '(gnus-summary-low-ancient-face ((t (:foreground "DimGray")))) - '(gnus-summary-low-read-face ((t (:foreground "slate gray")))) - '(gnus-summary-low-ticked-face ((t (:foreground "Pink")))) - '(gnus-summary-low-unread-face ((t (:foreground "LightGray")))) - '(gnus-summary-normal-ancient-face ((t (:foreground "MediumAquamarine")))) - '(gnus-summary-normal-read-face ((t (:foreground "Aquamarine")))) - '(gnus-summary-normal-ticked-face ((t (:foreground "LightSalmon")))) - '(gnus-summary-normal-unread-face ((t (nil)))) - '(gnus-summary-selected-face ((t (:background "DarkSlateBlue")))) - '(message-cited-text-face ((t (:foreground "LightSalmon")))) - '(message-header-cc-face ((t (:foreground "light cyan")))) - '(message-header-name-face ((t (:foreground "LightBlue")))) - '(message-header-newsgroups-face ((t (:bold t :foreground "MediumAquamarine")))) - '(message-header-other-face ((t (:foreground "MediumAquamarine")))) - '(message-header-subject-face ((t (:bold t :foreground "light cyan")))) - '(message-header-to-face ((t (:bold t :foreground "light cyan")))) - '(message-header-xheader-face ((t (:foreground "MediumAquamarine")))) - '(message-separator-face ((t (:foreground "chocolate"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'blue-gnus) - -;;; blue-gnus-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/blue-mood-theme.el b/elpa/color-theme-modern-0.0.3/blue-mood-theme.el deleted file mode 100644 index a3cb79b..0000000 --- a/elpa/color-theme-modern-0.0.3/blue-mood-theme.el +++ /dev/null @@ -1,136 +0,0 @@ -;;; blue-mood-theme.el --- blue-mood theme - -;; Copyright (C) 2002 by Nelson Loyola -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of blue-mood theme from `color-themes' - -;;; Code: - -(deftheme blue-mood - "blue-mood theme") - -(custom-theme-set-faces - 'blue-mood - - '(default ((t (:background "DodgerBlue4" :foreground "white smoke")))) - '(mouse ((t (:foreground "black")))) - '(cursor ((t (:background "DarkGoldenrod1")))) - '(border ((t (:foreground "Blue")))) - - '(blue ((t (:foreground "blue")))) - '(bold ((t (:bold t)))) - '(bold-italic ((t (nil)))) - '(border-glyph ((t (nil)))) - '(cmode-bracket-face ((t (:bold t)))) - '(cperl-array-face ((t (:bold t :foreground "wheat")))) - '(cperl-hash-face ((t (:bold t :foreground "chartreuse")))) - '(custom-button-face ((t (nil)))) - '(custom-changed-face ((t (:background "blue" :foreground "white")))) - '(custom-documentation-face ((t (nil)))) - '(custom-face-tag-face ((t (:underline t)))) - '(custom-group-tag-face ((t (:underline t :foreground "blue")))) - '(custom-group-tag-face-1 ((t (:underline t :foreground "red")))) - '(custom-invalid-face ((t (:background "red" :foreground "yellow")))) - '(custom-modified-face ((t (:background "blue" :foreground "white")))) - '(custom-rogue-face ((t (:background "black" :foreground "pink")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:background "white" :foreground "blue")))) - '(custom-state-face ((t (:bold t :foreground "cyan")))) - '(custom-variable-button-face ((t (:underline t :bold t)))) - '(custom-variable-tag-face ((t (:underline t :foreground "blue")))) - '(ff-paths-non-existant-file-face ((t (:bold t :foreground "NavyBlue")))) - '(font-lock-builtin-face ((t (:bold t :foreground "wheat")))) - '(font-lock-comment-face ((t (:bold t :foreground "gray72")))) - '(font-lock-constant-face ((t (:bold t :foreground "cyan3")))) - '(font-lock-doc-string-face ((t (:foreground "#00C000")))) - '(font-lock-function-name-face ((t (:bold t :foreground "chartreuse")))) - '(font-lock-keyword-face ((t (:bold t :foreground "gold1")))) - '(font-lock-other-emphasized-face ((t (:bold t :foreground "gold1")))) - '(font-lock-other-type-face ((t (:bold t :foreground "gold1")))) - '(font-lock-preprocessor-face ((t (:foreground "plum")))) - '(font-lock-reference-face ((t (:bold t :foreground "orangered")))) - '(font-lock-string-face ((t (:foreground "tomato")))) - '(font-lock-type-face ((t (:bold t :foreground "gold1")))) - '(font-lock-variable-name-face ((t (:foreground "light yellow")))) - '(font-lock-warning-face ((t (:foreground "tomato")))) - '(green ((t (:foreground "green")))) - '(gui-button-face ((t (:background "grey75" :foreground "black")))) - '(gui-element ((t (:size "nil" :background "#e7e3d6" :foreground" #000000")))) - '(highlight ((t (:background "red" :foreground "yellow")))) - '(isearch ((t (:bold t :background "pale turquoise" :foreground "blue")))) - '(italic ((t (nil)))) - '(lazy-highlight-face ((t (:bold t :foreground "dark magenta")))) - '(left-margin ((t (nil)))) - '(list-mode-item-selected ((t (:bold t :background "gray68" :foreground "yellow")))) - '(modeline ((t (:background "goldenrod" :foreground "darkblue")))) - '(modeline-buffer-id ((t (:background "goldenrod" :foreground "darkblue")))) - '(modeline-mousable ((t (:background "goldenrod" :foreground "darkblue")))) - '(modeline-mousable-minor-mode ((t (:background "goldenrod" :foreground "darkblue")))) - '(my-tab-face ((t (:background "SlateBlue1")))) - '(p4-depot-added-face ((t (:foreground "steelblue1")))) - '(p4-depot-deleted-face ((t (:foreground "red")))) - '(p4-depot-unmapped-face ((t (:foreground "grey90")))) - '(p4-diff-change-face ((t (:foreground "dark green")))) - '(p4-diff-del-face ((t (:bold t :foreground "salmon")))) - '(p4-diff-file-face ((t (:background "blue")))) - '(p4-diff-head-face ((t (:background "blue")))) - '(p4-diff-ins-face ((t (:foreground "steelblue1")))) - '(paren-blink-off ((t (:foreground "DodgerBlue4")))) - '(paren-match ((t (:background "red" :foreground "yellow")))) - '(paren-mismatch ((t (:background "DeepPink")))) - '(pointer ((t (:background "white")))) - '(primary-selection ((t (:bold t :background "medium sea green")))) - '(red ((t (:foreground "red")))) - '(region ((t (:background "red" :foreground "yellow")))) - '(right-margin ((t (nil)))) - '(secondary-selection ((t (:background "gray91" :foreground "sienna3")))) - '(show-paren-match-face ((t (:background "cyan3" :foreground "blue")))) - '(show-paren-mismatch-face ((t (:background "red" :foreground "blue")))) - '(show-trailing-whitespace ((t (:background "red" :foreground "blue")))) - '(speedbar-button-face ((t (:foreground "white")))) - '(speedbar-directory-face ((t (:foreground "gray")))) - '(speedbar-file-face ((t (:foreground "gold1")))) - '(speedbar-highlight-face ((t (:background "lightslateblue" :foreground "gold1")))) - '(speedbar-selected-face ((t (:underline t :foreground "red")))) - '(speedbar-tag-face ((t (:foreground "chartreuse")))) - '(text-cursor ((t (:background "DarkGoldenrod1" :foreground "DodgerBlue4")))) - '(toolbar ((t (:background "#e7e3d6" :foreground "#000000")))) - '(underline ((t (:underline t)))) - '(vertical-divider ((t (:background "#e7e3d6" :foreground "#000000")))) - '(widget-button-face ((t (:bold t)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "dark green")))) - '(widget-field-face ((t (:background "gray85")))) - '(widget-inactive-face ((t (:foreground "dim gray")))) - '(widget-single-line-field-face ((t (:background "gray85")))) - '(yellow ((t (:foreground "yellow")))) - '(zmacs-region ((t (:background "white" :foreground "midnightblue"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'blue-mood) - -;;; blue-mood-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/blue-sea-theme.el b/elpa/color-theme-modern-0.0.3/blue-sea-theme.el deleted file mode 100644 index 2a8bd0b..0000000 --- a/elpa/color-theme-modern-0.0.3/blue-sea-theme.el +++ /dev/null @@ -1,263 +0,0 @@ -;;; blue-sea-theme.el --- blue-sea theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of blue-sea theme from `color-themes' - -;;; Code: - -(deftheme blue-sea - "blue-sea theme") - -(custom-theme-set-faces - 'blue-sea - - '(default ((t (:background "MidnightBlue" :foreground "Grey")))) - '(mouse ((t (:foreground "Grey")))) - '(cursor ((t (:background "Grey")))) - '(border ((t (:foreground "Grey")))) - - '(gnus-cite-attribution-face ((t (:lforeground "lemon chiffon" :bold t)))) - '(gnus-cite-face-1 ((t (:foreground "LightSalmon")))) - '(gnus-cite-face-2 ((t (:foreground "Khaki")))) - '(gnus-cite-face-3 ((t (:foreground "Coral")))) - '(gnus-cite-face-4 ((t (:foreground "yellow green")))) - '(gnus-cite-face-5 ((t (:foreground "dark khaki")))) - '(gnus-cite-face-6 ((t (:foreground "bisque")))) - '(gnus-cite-face-7 ((t (:foreground "peru")))) - '(gnus-cite-face-8 ((t (:foreground "light coral")))) - '(gnus-cite-face-9 ((t (:foreground "plum")))) - '(gnus-emphasis-bold ((t (:bold t)))) - '(gnus-emphasis-bold-italic ((t (:italic t :bold t)))) - '(gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) - '(gnus-emphasis-italic ((t (:italic t)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(gnus-emphasis-underline-bold ((t (:bold t :underline t)))) - '(gnus-emphasis-underline-bold-italic ((t (:italic t :bold t :underline t)))) - '(gnus-emphasis-underline-italic ((t (:italic t :underline t)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "White")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "White")))) - '(gnus-group-mail-2-empty-face ((t (:foreground "light cyan")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "light cyan")))) - '(gnus-group-mail-3-empty-face ((t (:foreground "LightBlue")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "LightBlue")))) - '(gnus-group-mail-low-empty-face ((t (:foreground "Aquamarine")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "Aquamarine")))) - '(gnus-group-news-1-empty-face ((t (:foreground "White")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "White")))) - '(gnus-group-news-2-empty-face ((t (:foreground "light cyan")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "light cyan")))) - '(gnus-group-news-3-empty-face ((t (:foreground "LightBlue")))) - '(gnus-group-news-3-face ((t (:bold t :foreground "LightBlue")))) - '(gnus-group-news-4-empty-face ((t (:foreground "Aquamarine")))) - '(gnus-group-news-4-face ((t (:bold t :foreground "Aquamarine")))) - '(gnus-group-news-5-empty-face ((t (:foreground "MediumAquamarine")))) - '(gnus-group-news-5-face ((t (:bold t :foreground "MediumAquamarine")))) - '(gnus-group-news-6-empty-face ((t (:foreground "MediumAquamarine")))) - '(gnus-group-news-6-face ((t (:bold t :foreground "MediumAquamarine")))) - '(gnus-group-news-low-empty-face ((t (:foreground "MediumAquamarine")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "MediumAquamarine")))) - '(gnus-header-content-face ((t (:foreground "LightSkyBlue3")))) - '(gnus-header-from-face ((t (:bold t :foreground "light cyan")))) - '(gnus-header-name-face ((t (:bold t :foreground "LightBlue")))) - '(gnus-header-newsgroups-face ((t (:bold t :foreground "MediumAquamarine")))) - '(gnus-header-subject-face ((t (:bold t :foreground "light cyan")))) - '(gnus-signature-face ((t (:foreground "Grey")))) - '(gnus-splash-face ((t (:foreground "ForestGreen")))) - '(gnus-summary-cancelled-face ((t (:background "Black" :foreground "Yellow")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "MediumAquamarine")))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "Aquamarine")))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "LightSalmon")))) - '(gnus-summary-high-unread-face ((t (:bold t :foreground "beige")))) - '(gnus-summary-low-ancient-face ((t (:foreground "DimGray")))) - '(gnus-summary-low-read-face ((t (:foreground "slate gray")))) - '(gnus-summary-low-ticked-face ((t (:foreground "Pink")))) - '(gnus-summary-low-unread-face ((t (:foreground "LightGray")))) - '(gnus-summary-normal-ancient-face ((t (:foreground "MediumAquamarine")))) - '(gnus-summary-normal-read-face ((t (:foreground "Aquamarine")))) - '(gnus-summary-normal-ticked-face ((t (:foreground "LightSalmon")))) - '(gnus-summary-normal-unread-face ((t (nil)))) - '(gnus-summary-selected-face ((t (:background "DarkSlateBlue")))) - '(message-cited-text-face ((t (:foreground "LightSalmon")))) - '(message-header-cc-face ((t (:foreground "light cyan")))) - '(message-header-name-face ((t (:foreground "LightBlue")))) - '(message-header-newsgroups-face ((t (:bold t :foreground "MediumAquamarine")))) - '(message-header-other-face ((t (:foreground "MediumAquamarine")))) - '(message-header-subject-face ((t (:bold t :foreground "light cyan")))) - '(message-header-to-face ((t (:bold t :foreground "light cyan")))) - '(message-header-xheader-face ((t (:foreground "MediumAquamarine")))) - '(message-separator-face ((t (:foreground "chocolate")))) - - '(erc-action-face ((t (nil)))) - '(erc-bold-face ((t (:bold t)))) - '(erc-current-nick-face ((t (:bold t :foreground "yellow")))) - '(erc-default-face ((t (nil)))) - '(erc-direct-msg-face ((t (:foreground "pale green")))) - '(erc-error-face ((t (:bold t :foreground "IndianRed")))) - '(erc-highlight-face ((t (:bold t :foreground "pale green")))) - '(erc-input-face ((t (:foreground "light blue")))) - '(erc-inverse-face ((t (:background "steel blue")))) - '(erc-keyword-face ((t (:foreground "orange" :bold t)))) - '(erc-notice-face ((t (:foreground "light salmon")))) - '(erc-notice-face ((t (:foreground "MediumAquamarine")))) - '(erc-pal-face ((t (:foreground "pale green")))) - '(erc-prompt-face ((t (:foreground "light blue" :bold t)))) - '(fg:erc-color-face0 ((t (:foreground "white")))) - '(fg:erc-color-face1 ((t (:foreground "beige")))) - '(fg:erc-color-face2 ((t (:foreground "lemon chiffon")))) - '(fg:erc-color-face3 ((t (:foreground "light cyan")))) - '(fg:erc-color-face4 ((t (:foreground "powder blue")))) - '(fg:erc-color-face5 ((t (:foreground "sky blue")))) - '(fg:erc-color-face6 ((t (:foreground "dark sea green")))) - '(fg:erc-color-face7 ((t (:foreground "pale green")))) - '(fg:erc-color-face8 ((t (:foreground "medium spring green")))) - '(fg:erc-color-face9 ((t (:foreground "khaki")))) - '(fg:erc-color-face10 ((t (:foreground "pale goldenrod")))) - '(fg:erc-color-face11 ((t (:foreground "light goldenrod yellow")))) - '(fg:erc-color-face12 ((t (:foreground "light yellow")))) - '(fg:erc-color-face13 ((t (:foreground "yellow")))) - '(fg:erc-color-face14 ((t (:foreground "light goldenrod")))) - '(fg:erc-color-face15 ((t (:foreground "lime green")))) - '(bg:erc-color-face0 ((t (nil)))) - '(bg:erc-color-face1 ((t (nil)))) - '(bg:erc-color-face2 ((t (nil)))) - '(bg:erc-color-face3 ((t (nil)))) - '(bg:erc-color-face4 ((t (nil)))) - '(bg:erc-color-face5 ((t (nil)))) - '(bg:erc-color-face6 ((t (nil)))) - '(bg:erc-color-face7 ((t (nil)))) - '(bg:erc-color-face8 ((t (nil)))) - '(bg:erc-color-face9 ((t (nil)))) - '(bg:erc-color-face10 ((t (nil)))) - '(bg:erc-color-face11 ((t (nil)))) - '(bg:erc-color-face12 ((t (nil)))) - '(bg:erc-color-face13 ((t (nil)))) - '(bg:erc-color-face14 ((t (nil)))) - '(bg:erc-color-face15 ((t (nil)))) - - - '(bold ((t (:bold t)))) - '(bold-italic ((t (:bold t :foreground "beige")))) - '(calendar-today-face ((t (:underline t)))) - '(cperl-array-face ((t (:foreground "light salmon" :bold t)))) - '(cperl-hash-face ((t (:foreground "beige" :bold t :italic t)))) - '(cperl-nonoverridable-face ((t (:foreground "aquamarine")))) - '(custom-button-face ((t (:foreground "gainsboro")))) - '(custom-changed-face ((t (:foreground "white" :background "blue")))) - '(custom-documentation-face ((t (:foreground "light blue")))) - '(custom-face-tag-face ((t (:underline t)))) - '(custom-group-tag-face ((t (:foreground "pale turquoise" :bold t)))) - '(custom-group-tag-face-1 ((t (:foreground "pale turquoise" :underline t)))) - '(custom-invalid-face ((t (:foreground "yellow" :background "red")))) - '(custom-modified-face ((t (:foreground "white" :background "blue")))) - '(custom-rogue-face ((t (:foreground "pink" :background "black")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:foreground "blue" :background "white")))) - '(custom-state-face ((t (:foreground "light salmon")))) - '(custom-variable-button-face ((t (:bold t :underline t)))) - '(custom-variable-tag-face ((t (:foreground "turquoise" :bold t)))) - '(diary-face ((t (:foreground "red")))) - '(dired-face-directory ((t (:bold t :foreground "sky blue")))) - '(dired-face-permissions ((t (:foreground "aquamarine")))) - '(dired-face-flagged ((t (:foreground "tomato")))) - '(dired-face-marked ((t (:foreground "light salmon")))) - '(dired-face-executable ((t (:foreground "green yellow")))) - '(eshell-ls-archive-face ((t (:bold t :foreground "medium purple")))) - '(eshell-ls-backup-face ((t (:foreground "dim gray")))) - '(eshell-ls-clutter-face ((t (:foreground "dim gray")))) - '(eshell-ls-directory-face ((t (:bold t :foreground "medium slate blue")))) - '(eshell-ls-executable-face ((t (:bold t :foreground "aquamarine")))) - '(eshell-ls-missing-face ((t (:foreground "black")))) - '(eshell-ls-picture-face ((t (:foreground "violet")))) - '(eshell-ls-product-face ((t (:foreground "light steel blue")))) - '(eshell-ls-readonly-face ((t (:foreground "aquamarine")))) - '(eshell-ls-special-face ((t (:foreground "gold")))) - '(eshell-ls-symlink-face ((t (:foreground "white")))) - '(eshell-ls-unreadable-face ((t (:foreground "dim gray")))) - '(eshell-prompt-face ((t (:foreground "light sky blue" :bold t)))) - '(excerpt ((t (:italic t)))) - '(fixed ((t (:bold t)))) - '(flyspell-duplicate-face ((t (:foreground "Gold3" :bold t :underline t)))) - '(flyspell-incorrect-face ((t (:foreground "OrangeRed" :bold t :underline t)))) - '(font-lock-builtin-face ((t (:foreground "aquamarine")))) - '(font-lock-comment-face ((t (:foreground "light blue")))) - '(font-lock-constant-face ((t (:foreground "pale green")))) - '(font-lock-doc-string-face ((t (:foreground "sky blue")))) - '(font-lock-function-name-face ((t (:bold t :foreground "aquamarine")))) - '(font-lock-keyword-face ((t (:foreground "pale turquoise" :bold t)))) - '(font-lock-reference-face ((t (:foreground "pale green")))) - '(font-lock-string-face ((t (:foreground "light sky blue")))) - '(font-lock-type-face ((t (:foreground "sky blue" :bold t)))) - '(font-lock-variable-name-face ((t (:foreground "turquoise" :bold t)))) - '(font-lock-warning-face ((t (:foreground "Red" :bold t)))) - '(fringe ((t (:background "MidnightBlue")))) - '(header-line ((t (:background "#002" :foreground "cornflower blue")))) - '(highlight ((t (:background "dark slate blue" :foreground "light blue")))) - '(highline-face ((t (:background "DeepSkyBlue4")))) - '(holiday-face ((t (:background "pink")))) - '(info-menu-5 ((t (:underline t)))) - '(info-node ((t (:bold t)))) - '(info-xref ((t (:bold t :foreground "sky blue")))) - '(isearch ((t (:background "slate blue")))) - '(italic ((t (:foreground "sky blue")))) - '(makefile-space-face ((t (:background "hotpink")))) - '(menu ((t (:background "MidnightBlue" :foreground "Grey")))) - '(modeline ((t (:foreground "wheat" :background "slate blue")))) - '(mode-line-inactive ((t (:background "dark slate blue" :foreground "wheat")))) - '(modeline-buffer-id ((t (:foreground "beige" :background "slate blue")))) - '(modeline-mousable ((t (:foreground "light cyan" :background "slate blue")))) - '(modeline-mousable-minor-mode ((t (:foreground "wheat" :background "slate blue")))) - '(region ((t (:background "DarkSlateBlue")))) - '(secondary-selection ((t (:background "steel blue")))) - '(show-paren-match-face ((t (:foreground "white" :background "light slate blue")))) - '(show-paren-mismatch-face ((t (:foreground "white" :background "red")))) - '(speedbar-button-face ((t (:foreground "seashell2")))) - '(speedbar-directory-face ((t (:foreground "seashell3")))) - '(speedbar-file-face ((t (:foreground "seashell4")))) - '(speedbar-highlight-face ((t (:background "dark slate blue" :foreground "wheat")))) - '(speedbar-selected-face ((t (:foreground "seashell1" :underline t)))) - '(speedbar-tag-face ((t (:foreground "antique white")))) - '(tool-bar ((t (:background "MidnightBlue" :foreground "Grey" :box (:line-width 1 :style released-button))))) - '(underline ((t (:underline t)))) - '(widget-button-face ((t (:bold t)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "light blue")))) - '(widget-field-face ((t (:background "RoyalBlue4" :foreground "wheat")))) - '(widget-inactive-face ((t (:foreground "dim gray")))) - '(widget-single-line-field-face ((t (:background "slate blue" :foreground "wheat")))) - '(woman-bold-face ((t (:foreground "sky blue" :bold t)))) - '(woman-italic-face ((t (:foreground "deep sky blue")))) - '(woman-unknown-face ((t (:foreground "LightSalmon")))) - '(Man-overstrike-face ((t (:foreground "sky blue" :bold t)))) - '(Man-underline-face ((t (:foreground "deep sky blue")))) - '(zmacs-region ((t (:background "DarkSlateBlue"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'blue-sea) - -;;; blue-sea-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/calm-forest-theme.el b/elpa/color-theme-modern-0.0.3/calm-forest-theme.el deleted file mode 100644 index 55d60b4..0000000 --- a/elpa/color-theme-modern-0.0.3/calm-forest-theme.el +++ /dev/null @@ -1,174 +0,0 @@ -;;; calm-forest-theme.el --- calm-forest theme - -;; Copyright (C) 2003 by Artur Hefczyc -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of calm-forest theme from `color-themes' - -;;; Code: - -(deftheme calm-forest - "calm-forest theme") - -(custom-theme-set-faces - 'calm-forest - - '(default ((t (:background "gray12" :foreground "green")))) - '(mouse ((t (:background "yellow")))) - '(cursor ((t (:background "orange")))) - '(border ((t (:background "black")))) - - '(help-highlight-face ((t (:underline t)))) - '(list-matching-lines-face ((t (:bold t :weight bold)))) - '(view-highlight-face ((t (:background "darkolivegreen")))) - '(widget-mouse-face ((t (:background "darkolivegreen")))) - - '(Info-title-1-face ((t (:bold t :weight bold :family "helv" :height 1.728)))) - '(Info-title-2-face ((t (:bold t :family "helv" :weight bold :height 1.44)))) - '(Info-title-3-face ((t (:bold t :weight bold :family "helv" :height 1.2)))) - '(Info-title-4-face ((t (:bold t :family "helv" :weight bold)))) - '(bold ((t (:bold t :weight bold)))) - '(bold-italic ((t (:italic t :bold t :weight bold)))) - '(comint-highlight-input ((t (:bold t :weight bold)))) - '(comint-highlight-prompt ((t (:foreground "cyan")))) - '(cparen-around-andor-face ((t (:bold t :foreground "maroon" :weight bold)))) - '(cparen-around-begin-face ((t (:foreground "maroon")))) - '(cparen-around-conditional-face ((t (:bold t :foreground "RoyalBlue" :weight bold)))) - '(cparen-around-define-face ((t (:bold t :foreground "Blue" :weight bold)))) - '(cparen-around-lambda-face ((t (:foreground "LightSeaGreen")))) - '(cparen-around-letdo-face ((t (:bold t :foreground "LightSeaGreen" :weight bold)))) - '(cparen-around-quote-face ((t (:foreground "SaddleBrown")))) - '(cparen-around-set!-face ((t (:foreground "OrangeRed")))) - '(cparen-around-syntax-rules-face ((t (:foreground "Magenta")))) - '(cparen-around-vector-face ((t (:foreground "chocolate")))) - '(cparen-binding-face ((t (:foreground "ForestGreen")))) - '(cparen-binding-list-face ((t (:bold t :foreground "ForestGreen" :weight bold)))) - '(cparen-conditional-clause-face ((t (:foreground "RoyalBlue")))) - '(cparen-normal-paren-face ((t (:foreground "grey50")))) - '(custom-button-face ((t (:background "lightgrey" :foreground "black" - :box (:line-width 2 :style released-button))))) - '(custom-button-pressed-face ((t (:background "lightgrey" :foreground "black" - :box (:line-width 2 :style pressed-button))))) - '(custom-changed-face ((t (:background "blue" :foreground "white")))) - '(custom-comment-face ((t (:background "dim gray")))) - '(custom-comment-tag-face ((t (:foreground "gray80")))) - '(custom-documentation-face ((t (nil)))) - '(custom-face-tag-face ((t (:bold t :family "helv" :weight bold :height 1.2)))) - '(custom-group-tag-face ((t (:bold t :foreground "light blue" :weight bold :height 1.2)))) - '(custom-group-tag-face-1 ((t (:bold t :family "helv" :foreground "pink" :weight bold :height 1.2)))) - '(custom-invalid-face ((t (:background "red" :foreground "yellow")))) - '(custom-modified-face ((t (:background "blue" :foreground "white")))) - '(custom-rogue-face ((t (:background "black" :foreground "pink")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:background "white" :foreground "blue")))) - '(custom-state-face ((t (:foreground "lime green")))) - '(custom-variable-button-face ((t (:bold t :underline t :weight bold)))) - '(custom-variable-tag-face ((t (:bold t :foreground "light blue" :weight bold :height 1.2)))) - '(eieio-custom-slot-tag-face ((t (:foreground "light blue")))) - '(extra-whitespace-face ((t (:background "pale green")))) - '(fixed-pitch ((t (:family "courier")))) - '(font-latex-bold-face ((t (:bold t :foreground "OliveDrab" :weight bold)))) - '(font-latex-italic-face ((t (:italic t :foreground "OliveDrab")))) - '(font-latex-math-face ((t (:foreground "burlywood")))) - '(font-latex-sedate-face ((t (:foreground "LightGray")))) - '(font-latex-string-face ((t (:foreground "RosyBrown")))) - '(font-latex-warning-face ((t (:bold t :foreground "Red" :weight bold)))) - '(font-lock-builtin-face ((t (:foreground "LightSteelBlue")))) - '(font-lock-comment-face ((t (:foreground "chocolate1")))) - '(font-lock-constant-face ((t (:foreground "Aquamarine")))) - '(font-lock-doc-face ((t (:foreground "LightSalmon")))) - '(font-lock-function-name-face ((t (:foreground "LightSkyBlue")))) - '(font-lock-keyword-face ((t (:foreground "Cyan")))) - '(font-lock-string-face ((t (:foreground "LightSalmon")))) - '(font-lock-type-face ((t (:foreground "PaleGreen")))) - '(font-lock-variable-name-face ((t (:foreground "LightGoldenrod")))) - '(font-lock-warning-face ((t (:bold t :foreground "Pink" :weight bold)))) - '(fringe ((t (:background "grey10")))) - '(header-line ((t (:background "grey20" :foreground"grey90" - :box (:line-width -1 :style released-button))))) - '(highlight ((t (:background "darkolivegreen")))) - '(info-header-node ((t (:italic t :bold t :weight bold :foreground "white")))) - '(info-header-xref ((t (:bold t :weight bold :foreground "cyan")))) - '(info-menu-5 ((t (:foreground "red1")))) - '(info-menu-header ((t (:bold t :family "helv" :weight bold)))) - '(info-node ((t (:italic t :bold t :foreground "white" :weight bold)))) - '(info-xref ((t (:bold t :foreground "cyan" :weight bold)))) - '(isearch ((t (:background "palevioletred2" :foreground "brown4")))) - '(isearch-lazy-highlight-face ((t (:background "paleturquoise4")))) - '(italic ((t (:italic t)))) - '(jde-bug-breakpoint-cursor ((t (:background "brown" :foreground "cyan")))) - '(jde-db-active-breakpoint-face ((t (:background "red" :foreground "black")))) - '(jde-db-requested-breakpoint-face ((t (:background "yellow" :foreground "black")))) - '(jde-db-spec-breakpoint-face ((t (:background "green" :foreground "black")))) - '(jde-java-font-lock-api-face ((t (:foreground "light goldenrod")))) - '(jde-java-font-lock-bold-face ((t (:bold t :weight bold)))) - '(jde-java-font-lock-code-face ((t (nil)))) - '(jde-java-font-lock-constant-face ((t (:foreground "Aquamarine")))) - '(jde-java-font-lock-doc-tag-face ((t (:foreground "light coral")))) - '(jde-java-font-lock-italic-face ((t (:italic t)))) - '(jde-java-font-lock-link-face ((t (:foreground "blue" :underline t :slant normal)))) - '(jde-java-font-lock-modifier-face ((t (:foreground "LightSteelBlue")))) - '(jde-java-font-lock-number-face ((t (:foreground "LightSalmon")))) - '(jde-java-font-lock-operator-face ((t (:foreground "medium blue")))) - '(jde-java-font-lock-package-face ((t (:foreground "steelblue1")))) - '(jde-java-font-lock-pre-face ((t (nil)))) - '(jde-java-font-lock-underline-face ((t (:underline t)))) - '(menu ((t (nil)))) - '(mode-line ((t (:background "grey75" :foreground "black" - :box (:line-width -1 :style released-button))))) - '(region ((t (:background "blue3")))) - '(scroll-bar ((t (nil)))) - '(secondary-selection ((t (:background "SkyBlue4")))) - '(semantic-dirty-token-face ((t (:background "gray10")))) - '(semantic-unmatched-syntax-face ((t (:underline "red")))) - '(senator-intangible-face ((t (:foreground "gray75")))) - '(senator-momentary-highlight-face ((t (:background "gray30")))) - '(senator-read-only-face ((t (:background "#664444")))) - '(show-paren-match-face ((t (:background "turquoise")))) - '(show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) - '(speedbar-button-face ((t (:foreground "green3")))) - '(speedbar-directory-face ((t (:foreground "light blue")))) - '(speedbar-file-face ((t (:foreground "cyan")))) - '(speedbar-highlight-face ((t (:background "sea green")))) - '(speedbar-selected-face ((t (:foreground "red" :underline t)))) - '(speedbar-separator-face ((t (:background "blue" :foreground "white" :overline "gray")))) - '(speedbar-tag-face ((t (:foreground "yellow")))) - '(tool-bar ((t (:background "grey75" :foreground "black" - :box (:line-width 1 :style released-button))))) - '(trailing-whitespace ((t (:background "red")))) - '(underline ((t (:underline t)))) - '(variable-pitch ((t (:family "helv")))) - '(widget-button-face ((t (:bold t :weight bold)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "lime green")))) - '(widget-field-face ((t (:background "dim gray")))) - '(widget-inactive-face ((t (:foreground "light gray")))) - '(widget-single-line-field-face ((t (:background "dim gray"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'calm-forest) - -;;; calm-forest-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/charcoal-black-theme.el b/elpa/color-theme-modern-0.0.3/charcoal-black-theme.el deleted file mode 100644 index 7edace2..0000000 --- a/elpa/color-theme-modern-0.0.3/charcoal-black-theme.el +++ /dev/null @@ -1,303 +0,0 @@ -;;; charcoal-black-theme.el --- charcoal-black theme - -;; Copyright (C) 2003 by Lars Chr. Hausmann -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of charcoal-black theme from `color-themes' - -;;; Code: - -(deftheme charcoal-black - "charcoal-black theme") - -(custom-theme-set-faces - 'charcoal-black - - '(default ((t (:background "Grey15" :foreground "Grey")))) - '(mouse ((t (:background "Grey")))) - '(cursor ((t (:background "Grey")))) - '(border ((t (:background "Grey")))) - - '(display-time-mail-face ((t (:underline t)))) - '(gnus-article-button-face ((t (:bold t :weight bold)))) - '(gnus-article-mouse-face ((t (:background "dark slate blue" :foreground "light blue")))) - '(gnus-mouse-face ((t (:background "dark slate blue" :foreground "light blue")))) - '(help-highlight-face ((t (:underline t)))) - '(list-matching-lines-face ((t (:bold t :weight bold)))) - '(mime-button-face ((t (:bold t :weight bold)))) - '(mime-button-mouse-face ((t (:background "dark slate blue" :foreground "light blue")))) - '(view-highlight-face ((t (:background "dark slate blue" :foreground "light blue")))) - '(widget-mouse-face ((t (:background "dark slate blue" :foreground "light blue")))) - - '(Info-title-1-face ((t (:bold t :weight bold :family "helv" :height 1.728)))) - '(Info-title-2-face ((t (:bold t :family "helv" :weight bold :height 1.44)))) - '(Info-title-3-face ((t (:bold t :weight bold :family "helv" :height 1.2)))) - '(Info-title-4-face ((t (:bold t :family "helv" :weight bold)))) - '(bg:erc-color-face0 ((t (nil)))) - '(bg:erc-color-face1 ((t (nil)))) - '(bg:erc-color-face10 ((t (nil)))) - '(bg:erc-color-face11 ((t (nil)))) - '(bg:erc-color-face12 ((t (nil)))) - '(bg:erc-color-face13 ((t (nil)))) - '(bg:erc-color-face14 ((t (nil)))) - '(bg:erc-color-face15 ((t (nil)))) - '(bg:erc-color-face2 ((t (nil)))) - '(bg:erc-color-face3 ((t (nil)))) - '(bg:erc-color-face4 ((t (nil)))) - '(bg:erc-color-face5 ((t (nil)))) - '(bg:erc-color-face6 ((t (nil)))) - '(bg:erc-color-face7 ((t (nil)))) - '(bg:erc-color-face8 ((t (nil)))) - '(bg:erc-color-face9 ((t (nil)))) - '(bold ((t (:bold t :weight bold)))) - '(bold-italic ((t (:bold t :foreground "beige" :weight bold)))) - '(calendar-today-face ((t (:underline t)))) - '(comint-highlight-input ((t (:bold t :weight bold)))) - '(comint-highlight-prompt ((t (:foreground "cyan")))) - '(cperl-array-face ((t (:bold t :foreground "light salmon" :weight bold)))) - '(cperl-hash-face ((t (:italic t :bold t :foreground "beige" :slant italic :weight bold)))) - '(cperl-nonoverridable-face ((t (:foreground "aquamarine")))) - '(custom-button-face ((t (:foreground "gainsboro")))) - '(custom-button-pressed-face ((t (:background "lightgrey" :foreground "black" :box (:line-width 2 :style pressed-button))))) - '(custom-changed-face ((t (:background "blue" :foreground "white")))) - '(custom-comment-face ((t (:background "dim gray")))) - '(custom-comment-tag-face ((t (:foreground "gray80")))) - '(custom-documentation-face ((t (:foreground "light blue")))) - '(custom-face-tag-face ((t (:underline t)))) - '(custom-group-tag-face ((t (:bold t :foreground "pale turquoise" :weight bold)))) - '(custom-group-tag-face-1 ((t (:foreground "pale turquoise" :underline t)))) - '(custom-invalid-face ((t (:background "red" :foreground "yellow")))) - '(custom-modified-face ((t (:background "blue" :foreground "white")))) - '(custom-rogue-face ((t (:background "black" :foreground "pink")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:background "white" :foreground "blue")))) - '(custom-state-face ((t (:foreground "light salmon")))) - '(custom-variable-button-face ((t (:bold t :underline t :weight bold)))) - '(custom-variable-tag-face ((t (:bold t :foreground "turquoise" :weight bold)))) - '(diary-face ((t (:foreground "red")))) - '(dired-face-directory ((t (:bold t :foreground "sky blue" :weight bold)))) - '(dired-face-executable ((t (:foreground "green yellow")))) - '(dired-face-flagged ((t (:foreground "tomato")))) - '(dired-face-marked ((t (:foreground "light salmon")))) - '(dired-face-permissions ((t (:foreground "aquamarine")))) - '(erc-action-face ((t (nil)))) - '(erc-bold-face ((t (:bold t :weight bold)))) - '(erc-default-face ((t (nil)))) - '(erc-direct-msg-face ((t (:foreground "pale green")))) - '(erc-error-face ((t (:bold t :foreground "IndianRed" :weight bold)))) - '(erc-highlight-face ((t (:bold t :foreground "pale green" :weight bold)))) - '(erc-input-face ((t (:foreground "light blue")))) - '(erc-inverse-face ((t (:background "steel blue")))) - '(erc-notice-face ((t (:foreground "light salmon")))) - '(erc-pal-face ((t (:foreground "pale green")))) - '(erc-prompt-face ((t (:bold t :foreground "light blue" :weight bold)))) - '(eshell-ls-archive-face ((t (:bold t :foreground "medium purple" :weight bold)))) - '(eshell-ls-backup-face ((t (:foreground "dim gray")))) - '(eshell-ls-clutter-face ((t (:foreground "dim gray")))) - '(eshell-ls-directory-face ((t (:bold t :foreground "medium slate blue" :weight bold)))) - '(eshell-ls-executable-face ((t (:bold t :foreground "aquamarine" :weight bold)))) - '(eshell-ls-missing-face ((t (:foreground "black")))) - '(eshell-ls-picture-face ((t (:foreground "violet")))) - '(eshell-ls-product-face ((t (:foreground "light steel blue")))) - '(eshell-ls-readonly-face ((t (:foreground "aquamarine")))) - '(eshell-ls-special-face ((t (:foreground "gold")))) - '(eshell-ls-symlink-face ((t (:foreground "white")))) - '(eshell-ls-unreadable-face ((t (:foreground "dim gray")))) - '(eshell-prompt-face ((t (:bold t :foreground "light sky blue" :weight bold)))) - '(excerpt ((t (:italic t :slant italic)))) - '(fg:erc-color-face0 ((t (:foreground "white")))) - '(fg:erc-color-face1 ((t (:foreground "beige")))) - '(fg:erc-color-face10 ((t (:foreground "pale goldenrod")))) - '(fg:erc-color-face11 ((t (:foreground "light goldenrod yellow")))) - '(fg:erc-color-face12 ((t (:foreground "light yellow")))) - '(fg:erc-color-face13 ((t (:foreground "yellow")))) - '(fg:erc-color-face14 ((t (:foreground "light goldenrod")))) - '(fg:erc-color-face15 ((t (:foreground "lime green")))) - '(fg:erc-color-face2 ((t (:foreground "lemon chiffon")))) - '(fg:erc-color-face3 ((t (:foreground "light cyan")))) - '(fg:erc-color-face4 ((t (:foreground "powder blue")))) - '(fg:erc-color-face5 ((t (:foreground "sky blue")))) - '(fg:erc-color-face6 ((t (:foreground "dark sea green")))) - '(fg:erc-color-face7 ((t (:foreground "pale green")))) - '(fg:erc-color-face8 ((t (:foreground "medium spring green")))) - '(fg:erc-color-face9 ((t (:foreground "khaki")))) - '(fixed ((t (:bold t :weight bold)))) - '(fixed-pitch ((t (:family "courier")))) - '(flyspell-duplicate-face ((t (:bold t :foreground "Gold3" :underline t :weight bold)))) - '(flyspell-incorrect-face ((t (:bold t :foreground "OrangeRed" :underline t :weight bold)))) - '(font-lock-builtin-face ((t (:foreground "aquamarine")))) - '(font-lock-comment-face ((t (:foreground "light blue")))) - '(font-lock-constant-face ((t (:foreground "pale green")))) - '(font-lock-doc-face ((t (:foreground "light sky blue")))) - '(font-lock-doc-string-face ((t (:foreground "sky blue")))) - '(font-lock-function-name-face ((t (:bold t :foreground "aquamarine" :weight bold)))) - '(font-lock-keyword-face ((t (:bold t :foreground "pale turquoise" :weight bold)))) - '(font-lock-reference-face ((t (:foreground "pale green")))) - '(font-lock-string-face ((t (:foreground "light sky blue")))) - '(font-lock-type-face ((t (:bold t :foreground "sky blue" :weight bold)))) - '(font-lock-variable-name-face ((t (:bold t :foreground "turquoise" :weight bold)))) - '(font-lock-warning-face ((t (:bold t :foreground "Red" :weight bold)))) - '(fringe ((t (:background "Grey15")))) - '(gnus-cite-face-1 ((t (:foreground "LightSalmon")))) - '(gnus-cite-face-2 ((t (:foreground "Khaki")))) - '(gnus-cite-face-3 ((t (:foreground "Coral")))) - '(gnus-cite-face-4 ((t (:foreground "yellow green")))) - '(gnus-cite-face-5 ((t (:foreground "dark khaki")))) - '(gnus-cite-face-6 ((t (:foreground "bisque")))) - '(gnus-cite-face-7 ((t (:foreground "peru")))) - '(gnus-cite-face-8 ((t (:foreground "light coral")))) - '(gnus-cite-face-9 ((t (:foreground "plum")))) - '(gnus-emphasis-bold ((t (:bold t :weight bold)))) - '(gnus-emphasis-bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) - '(gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) - '(gnus-emphasis-italic ((t (:italic t :slant italic)))) - '(gnus-emphasis-strikethru ((t (nil)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(gnus-emphasis-underline-bold ((t (:bold t :underline t :weight bold)))) - '(gnus-emphasis-underline-bold-italic ((t (:italic t :bold t :underline t :slant italic :weight bold)))) - '(gnus-emphasis-underline-italic ((t (:italic t :underline t :slant italic)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "White")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "White" :weight bold)))) - '(gnus-group-mail-2-empty-face ((t (:foreground "light cyan")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "light cyan" :weight bold)))) - '(gnus-group-mail-3-empty-face ((t (:foreground "LightBlue")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "LightBlue" :weight bold)))) - '(gnus-group-mail-low-empty-face ((t (:foreground "Aquamarine")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "Aquamarine" :weight bold)))) - '(gnus-group-news-1-empty-face ((t (:foreground "White")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "White" :weight bold)))) - '(gnus-group-news-2-empty-face ((t (:foreground "light cyan")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "light cyan" :weight bold)))) - '(gnus-group-news-3-empty-face ((t (:foreground "LightBlue")))) - '(gnus-group-news-3-face ((t (:bold t :foreground "LightBlue" :weight bold)))) - '(gnus-group-news-4-empty-face ((t (:foreground "Aquamarine")))) - '(gnus-group-news-4-face ((t (:bold t :foreground "Aquamarine" :weight bold)))) - '(gnus-group-news-5-empty-face ((t (:foreground "MediumAquamarine")))) - '(gnus-group-news-5-face ((t (:bold t :foreground "MediumAquamarine" :weight bold)))) - '(gnus-group-news-6-empty-face ((t (:foreground "MediumAquamarine")))) - '(gnus-group-news-6-face ((t (:bold t :foreground "MediumAquamarine" :weight bold)))) - '(gnus-group-news-low-empty-face ((t (:foreground "MediumAquamarine")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "MediumAquamarine" :weight bold)))) - '(gnus-header-content-face ((t (:foreground "LightSkyBlue3")))) - '(gnus-header-from-face ((t (:bold t :foreground "light cyan" :weight bold)))) - '(gnus-header-name-face ((t (:bold t :foreground "LightBlue" :weight bold)))) - '(gnus-header-newsgroups-face ((t (:italic t :bold t :foreground "MediumAquamarine" :slant italic :weight bold)))) - '(gnus-header-subject-face ((t (:bold t :foreground "light cyan" :weight bold)))) - '(gnus-server-agent-face ((t (:bold t :foreground "PaleTurquoise" :weight bold)))) - '(gnus-server-closed-face ((t (:italic t :foreground "Light Steel Blue" :slant italic)))) - '(gnus-server-denied-face ((t (:bold t :foreground "Pink" :weight bold)))) - '(gnus-server-offline-face ((t (:bold t :foreground "Yellow" :weight bold)))) - '(gnus-server-opened-face ((t (:bold t :foreground "Green1" :weight bold)))) - '(gnus-signature-face ((t (:foreground "Grey")))) - '(gnus-splash-face ((t (:foreground "ForestGreen")))) - '(gnus-summary-cancelled-face ((t (:background "Black" :foreground "Yellow")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "MediumAquamarine" :weight bold)))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "Aquamarine" :weight bold)))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "LightSalmon" :weight bold)))) - '(gnus-summary-high-unread-face ((t (:italic t :bold t :foreground "beige" :slant italic :weight bold)))) - '(gnus-summary-low-ancient-face ((t (:italic t :foreground "DimGray" :slant italic)))) - '(gnus-summary-low-read-face ((t (:foreground "slate gray")))) - '(gnus-summary-low-ticked-face ((t (:foreground "Pink")))) - '(gnus-summary-low-unread-face ((t (:foreground "LightGray")))) - '(gnus-summary-normal-ancient-face ((t (:foreground "MediumAquamarine")))) - '(gnus-summary-normal-read-face ((t (:foreground "Aquamarine")))) - '(gnus-summary-normal-ticked-face ((t (:foreground "LightSalmon")))) - '(gnus-summary-normal-unread-face ((t (nil)))) - '(gnus-summary-selected-face ((t (:underline t)))) - '(header-line ((t (:box (:line-width -1 :style released-button) :background "grey20" :foreground "grey90" :box nil)))) - '(highlight ((t (:background "dark slate blue" :foreground "light blue")))) - '(highline-face ((t (:background "DeepSkyBlue4")))) - '(holiday-face ((t (:background "pink")))) - '(info-header-node ((t (:bold t :weight bold)))) - '(info-header-xref ((t (:bold t :weight bold :foreground "sky blue")))) - '(info-menu-5 ((t (:underline t)))) - '(info-menu-header ((t (:bold t :family "helv" :weight bold)))) - '(info-node ((t (:bold t :weight bold)))) - '(info-xref ((t (:bold t :foreground "sky blue" :weight bold)))) - '(isearch ((t (:background "slate blue")))) - '(isearch-lazy-highlight-face ((t (:background "paleturquoise4")))) - '(italic ((t (:foreground "sky blue")))) - '(jde-bug-breakpoint-cursor ((t (:background "brown" :foreground "cyan")))) - '(jde-bug-breakpoint-marker ((t (:background "yellow" :foreground "red")))) - '(jde-java-font-lock-api-face ((t (:foreground "light goldenrod")))) - '(jde-java-font-lock-bold-face ((t (:bold t :weight bold)))) - '(jde-java-font-lock-code-face ((t (nil)))) - '(jde-java-font-lock-constant-face ((t (:foreground "Aquamarine")))) - '(jde-java-font-lock-doc-tag-face ((t (:foreground "light coral")))) - '(jde-java-font-lock-italic-face ((t (:italic t :slant italic)))) - '(jde-java-font-lock-link-face ((t (:foreground "blue" :underline t :slant normal)))) - '(jde-java-font-lock-modifier-face ((t (:foreground "LightSteelBlue")))) - '(jde-java-font-lock-number-face ((t (:foreground "LightSalmon")))) - '(jde-java-font-lock-package-face ((t (:foreground "steelblue1")))) - '(jde-java-font-lock-pre-face ((t (nil)))) - '(jde-java-font-lock-underline-face ((t (:underline t)))) - '(makefile-space-face ((t (:background "hotpink")))) - '(menu ((t (:background "MidnightBlue" :foreground "Grey")))) - '(message-cited-text-face ((t (:foreground "LightSalmon")))) - '(message-header-cc-face ((t (:foreground "light cyan")))) - '(message-header-name-face ((t (:foreground "LightBlue")))) - '(message-header-newsgroups-face ((t (:italic t :bold t :foreground "MediumAquamarine" :slant italic :weight bold)))) - '(message-header-other-face ((t (:foreground "MediumAquamarine")))) - '(message-header-subject-face ((t (:bold t :foreground "light cyan" :weight bold)))) - '(message-header-to-face ((t (:bold t :foreground "light cyan" :weight bold)))) - '(message-header-xheader-face ((t (:foreground "MediumAquamarine")))) - '(message-mml-face ((t (:foreground "ForestGreen")))) - '(message-separator-face ((t (:foreground "chocolate")))) - '(mode-line ((t (:background "grey75" :foreground "black" :box (:line-width -1 :style released-button))))) - '(region ((t (:background "DarkSlateBlue")))) - '(scroll-bar ((t (:background "grey75")))) - '(secondary-selection ((t (:background "steel blue")))) - '(semantic-dirty-token-face ((t (:background "gray10")))) - '(semantic-unmatched-syntax-face ((t (:underline "red")))) - '(show-paren-match-face ((t (:background "light slate blue" :foreground "white")))) - '(show-paren-mismatch-face ((t (:background "red" :foreground "white")))) - '(speedbar-button-face ((t (:foreground "seashell2")))) - '(speedbar-directory-face ((t (:foreground "seashell3")))) - '(speedbar-file-face ((t (:foreground "seashell4")))) - '(speedbar-highlight-face ((t (:background "dark slate blue" :foreground "wheat")))) - '(speedbar-selected-face ((t (:foreground "seashell1" :underline t)))) - '(speedbar-separator-face ((t (:background "blue" :foreground "white" :overline "gray")))) - '(speedbar-tag-face ((t (:foreground "antique white")))) - '(tool-bar ((t (:background "grey75" :foreground "black" :box (:line-width 1 :style released-button))))) - '(tooltip ((t (:background "lightyellow" :foreground "black")))) - '(trailing-whitespace ((t (:background "red")))) - '(underline ((t (:underline t)))) - '(variable-pitch ((t (:family "helv")))) - '(widget-button-face ((t (:bold t :weight bold)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "light blue")))) - '(widget-field-face ((t (:background "RoyalBlue4" :foreground "wheat")))) - '(widget-inactive-face ((t (:foreground "dim gray")))) - '(widget-single-line-field-face ((t (:background "slate blue" :foreground "wheat")))) - '(woman-bold-face ((t (:bold t :foreground "sky blue" :weight bold)))) - '(woman-italic-face ((t (:foreground "deep sky blue")))) - '(woman-unknown-face ((t (:foreground "LightSalmon")))) - '(zmacs-region ((t (:background "DarkSlateBlue"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'charcoal-black) - -;;; charcoal-black-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/clarity-theme.el b/elpa/color-theme-modern-0.0.3/clarity-theme.el deleted file mode 100644 index 2aa9086..0000000 --- a/elpa/color-theme-modern-0.0.3/clarity-theme.el +++ /dev/null @@ -1,119 +0,0 @@ -;;; clarity-theme.el --- clarity theme - -;; Copyright (C) 2003 by Richard Wellum -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of clarity theme from `color-themes' - -;;; Code: - -(deftheme clarity - "clarity theme") - -(custom-theme-set-faces - 'clarity - - '(default ((t (:background "black" :foreground "white")))) - '(mouse ((t (:background "white")))) - '(cursor ((t (:background "yellow")))) - '(border ((t (:background "white")))) - - '(help-highlight-face ((t (:underline t)))) - '(list-matching-lines-face ((t (:bold t :weight bold)))) - '(view-highlight-face ((t (:background "darkolivegreen")))) - '(widget-mouse-face ((t (:background "darkolivegreen")))) - - '(CUA-global-mark-face ((t (:background "cyan" :foreground "black")))) - '(CUA-rectangle-face ((t (:background "maroon" :foreground "white")))) - '(CUA-rectangle-noselect-face ((t (:background "dimgray" :foreground "white")))) - '(bold ((t (:bold t :weight bold)))) - '(bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) - '(clearcase-dired-checkedout-face ((t (:foreground "red")))) - '(comint-highlight-input ((t (:bold t :weight bold)))) - '(comint-highlight-prompt ((t (:foreground "cyan")))) - '(fixed-pitch ((t (:family "courier")))) - '(flash-paren-face-off ((t (nil)))) - '(flash-paren-face-on ((t (nil)))) - '(flash-paren-face-region ((t (nil)))) - '(font-lock-builtin-face ((t (:foreground "LightSteelBlue")))) - '(font-lock-comment-face ((t (:foreground "OrangeRed")))) - '(font-lock-constant-face ((t (:foreground "Aquamarine")))) - '(font-lock-doc-face ((t (:foreground "LightSalmon")))) - '(font-lock-function-name-face ((t (:foreground "LightSkyBlue")))) - '(font-lock-keyword-face ((t (:foreground "Cyan")))) - '(font-lock-string-face ((t (:foreground "LightSalmon")))) - '(font-lock-type-face ((t (:foreground "PaleGreen")))) - '(font-lock-variable-name-face ((t (:foreground "LightGoldenrod")))) - '(font-lock-warning-face ((t (:bold t :foreground "Pink" :weight bold)))) - '(ibuffer-dired-buffer-face ((t (:foreground "LightSkyBlue")))) - '(ibuffer-help-buffer-face ((t (:foreground "OrangeRed")))) - '(ibuffer-hidden-buffer-face ((t (:bold t :foreground "Pink" :weight bold)))) - '(ibuffer-occur-match-face ((t (:bold t :foreground "Pink" :weight bold)))) - '(ibuffer-read-only-buffer-face ((t (:foreground "PaleGreen")))) - '(ibuffer-special-buffer-face ((t (:foreground "Cyan")))) - '(ibuffer-title-face ((t (:foreground "PaleGreen")))) - '(fringe ((t (:background "grey10")))) - '(header-line ((t (:box (:line-width -1 :style released-button) :foreground "grey20" :background "grey90" :box nil)))) - '(highlight ((t (:background "darkolivegreen")))) - '(ibuffer-deletion-face ((t (:foreground "red")))) - '(ibuffer-marked-face ((t (:foreground "green")))) - '(isearch ((t (:background "palevioletred2" :foreground "brown4")))) - '(isearch-lazy-highlight-face ((t (:background "paleturquoise4")))) - '(italic ((t (:italic t :slant italic)))) - '(menu ((t (nil)))) - '(mode-line ((t (:foreground "yellow" :background "darkslateblue" - :box (:line-width -1 :style released-button))))) - '(region ((t (:background "blue")))) - '(scroll-bar ((t (nil)))) - '(secondary-selection ((t (:background "darkslateblue")))) - '(show-block-face1 ((t (:background "gray10")))) - '(show-block-face2 ((t (:background "gray15")))) - '(show-block-face3 ((t (:background "gray20")))) - '(show-block-face4 ((t (:background "gray25")))) - '(show-block-face5 ((t (:background "gray30")))) - '(show-block-face6 ((t (:background "gray35")))) - '(show-block-face7 ((t (:background "gray40")))) - '(show-block-face8 ((t (:background "gray45")))) - '(show-block-face9 ((t (:background "gray50")))) - '(show-paren-match-face ((t (:background "turquoise")))) - '(show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) - '(tool-bar ((t (:background "grey75" :foreground "black" - :box (:line-width 1 :style released-button))))) - '(tooltip ((t (:background "lightyellow" :foreground "black")))) - '(trailing-whitespace ((t (:background "red")))) - '(underline ((t (:underline t)))) - '(variable-pitch ((t (:family "helv")))) - '(widget-button-face ((t (:bold t :weight bold)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "lime green")))) - '(widget-field-face ((t (:background "dim gray")))) - '(widget-inactive-face ((t (:foreground "light gray")))) - '(widget-single-line-field-face ((t (:background "dim gray"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'clarity) - -;;; clarity-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/classic-theme.el b/elpa/color-theme-modern-0.0.3/classic-theme.el deleted file mode 100644 index ae16dfa..0000000 --- a/elpa/color-theme-modern-0.0.3/classic-theme.el +++ /dev/null @@ -1,208 +0,0 @@ -;;; classic-theme.el --- classic theme - -;; Copyright (C) 2000 by Frederic Giroud -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of classic theme from `color-themes' - -;;; Code: - -(deftheme classic - "classic theme") - -(custom-theme-set-faces - 'classic - - '(default ((t (:background "darkslategrey" :foreground "AntiqueWhite")))) - ;; avoid ugly random fringe color - '(fringe ((t (:background "darkslategrey")))) - - '(mouse ((t (:foreground "Grey")))) - '(cursor ((t (:background "Red")))) - '(border ((t (:foreground "black")))) - - '(gnus-cite-attribution-face ((t (:lforeground "lemon chiffon" :bold t)))) - '(gnus-cite-face-1 ((t (:foreground "LightSalmon")))) - '(gnus-cite-face-2 ((t (:foreground "Khaki")))) - '(gnus-cite-face-3 ((t (:foreground "Coral")))) - '(gnus-cite-face-4 ((t (:foreground "yellow green")))) - '(gnus-cite-face-5 ((t (:foreground "dark khaki")))) - '(gnus-cite-face-6 ((t (:foreground "bisque")))) - '(gnus-cite-face-7 ((t (:foreground "peru")))) - '(gnus-cite-face-8 ((t (:foreground "light coral")))) - '(gnus-cite-face-9 ((t (:foreground "plum")))) - '(gnus-emphasis-bold ((t (:bold t)))) - '(gnus-emphasis-bold-italic ((t (:italic t :bold t)))) - '(gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) - '(gnus-emphasis-italic ((t (:italic t)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(gnus-emphasis-underline-bold ((t (:bold t :underline t)))) - '(gnus-emphasis-underline-bold-italic ((t (:italic t :bold t :underline t)))) - '(gnus-emphasis-underline-italic ((t (:italic t :underline t)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "White")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "White")))) - '(gnus-group-mail-2-empty-face ((t (:foreground "light cyan")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "light cyan")))) - '(gnus-group-mail-3-empty-face ((t (:foreground "LightBlue")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "LightBlue")))) - '(gnus-group-mail-low-empty-face ((t (:foreground "Aquamarine")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "Aquamarine")))) - '(gnus-group-news-1-empty-face ((t (:foreground "White")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "White")))) - '(gnus-group-news-2-empty-face ((t (:foreground "light cyan")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "light cyan")))) - '(gnus-group-news-3-empty-face ((t (:foreground "LightBlue")))) - '(gnus-group-news-3-face ((t (:bold t :foreground "LightBlue")))) - '(gnus-group-news-4-empty-face ((t (:foreground "Aquamarine")))) - '(gnus-group-news-4-face ((t (:bold t :foreground "Aquamarine")))) - '(gnus-group-news-5-empty-face ((t (:foreground "MediumAquamarine")))) - '(gnus-group-news-5-face ((t (:bold t :foreground "MediumAquamarine")))) - '(gnus-group-news-6-empty-face ((t (:foreground "MediumAquamarine")))) - '(gnus-group-news-6-face ((t (:bold t :foreground "MediumAquamarine")))) - '(gnus-group-news-low-empty-face ((t (:foreground "MediumAquamarine")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "MediumAquamarine")))) - '(gnus-header-content-face ((t (:foreground "LightSkyBlue3")))) - '(gnus-header-from-face ((t (:bold t :foreground "light cyan")))) - '(gnus-header-name-face ((t (:bold t :foreground "LightBlue")))) - '(gnus-header-newsgroups-face ((t (:bold t :foreground "MediumAquamarine")))) - '(gnus-header-subject-face ((t (:bold t :foreground "light cyan")))) - '(gnus-signature-face ((t (:foreground "Grey")))) - '(gnus-splash-face ((t (:foreground "ForestGreen")))) - '(gnus-summary-cancelled-face ((t (:background "Black" :foreground "Yellow")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "MediumAquamarine")))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "Aquamarine")))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "LightSalmon")))) - '(gnus-summary-high-unread-face ((t (:bold t :foreground "beige")))) - '(gnus-summary-low-ancient-face ((t (:foreground "DimGray")))) - '(gnus-summary-low-read-face ((t (:foreground "slate gray")))) - '(gnus-summary-low-ticked-face ((t (:foreground "Pink")))) - '(gnus-summary-low-unread-face ((t (:foreground "LightGray")))) - '(gnus-summary-normal-ancient-face ((t (:foreground "MediumAquamarine")))) - '(gnus-summary-normal-read-face ((t (:foreground "Aquamarine")))) - '(gnus-summary-normal-ticked-face ((t (:foreground "LightSalmon")))) - '(gnus-summary-normal-unread-face ((t (nil)))) - '(gnus-summary-selected-face ((t (:background "DarkSlateBlue")))) - '(message-cited-text-face ((t (:foreground "LightSalmon")))) - '(message-header-cc-face ((t (:foreground "light cyan")))) - '(message-header-name-face ((t (:foreground "LightBlue")))) - '(message-header-newsgroups-face ((t (:bold t :foreground "MediumAquamarine")))) - '(message-header-other-face ((t (:foreground "MediumAquamarine")))) - '(message-header-subject-face ((t (:bold t :foreground "light cyan")))) - '(message-header-to-face ((t (:bold t :foreground "light cyan")))) - '(message-header-xheader-face ((t (:foreground "MediumAquamarine")))) - '(message-separator-face ((t (:foreground "chocolate")))) - - '(apropos-keybinding-face ((t (:underline t)))) - '(apropos-label-face ((t (:italic t)))) - '(apropos-match-face ((t (:background "Aquamarine" :foreground "SlateBlue")))) - '(apropos-property-face ((t (:italic t :bold t :foreground "beige")))) - '(apropos-symbol-face ((t (:underline t :foreground "DodgerBlue1")))) - '(goto-address-mail-face ((t (:bold t :foreground "light cyan")))) - '(goto-address-mail-mouse-face ((t (:background "Aquamarine" :foreground "SlateBlue")))) - '(goto-address-url-face ((t (:underline t :foreground "DodgerBlue1")))) - '(goto-address-url-mouse-face ((t (:background "PaleGreen" :foreground "DarkGreen")))) - '(list-matching-lines-face ((t (:bold t)))) - '(view-highlight-face ((t (:background "PaleGreen" :foreground "DarkGreen")))) - - '(bold ((t (:bold t)))) - '(bold-italic ((t (:italic t :bold t :foreground "beige")))) - '(calendar-today-face ((t (:underline t)))) - '(cperl-array-face ((t (:foreground "Yellow")))) - '(cperl-hash-face ((t (:foreground "White")))) - '(cperl-nonoverridable-face ((t (:foreground "SkyBlue")))) - '(custom-button-face ((t (:underline t :foreground "MediumSlateBlue")))) - '(custom-documentation-face ((t (:foreground "Grey")))) - '(custom-group-tag-face ((t (:foreground "MediumAquamarine")))) - '(custom-state-face ((t (:foreground "LightSalmon")))) - '(custom-variable-tag-face ((t (:foreground "Aquamarine")))) - '(diary-face ((t (:foreground "IndianRed")))) - '(erc-action-face ((t (:bold t)))) - '(erc-bold-face ((t (:bold t)))) - '(erc-default-face ((t (nil)))) - '(erc-direct-msg-face ((t (:foreground "LightSalmon")))) - '(erc-error-face ((t (:bold t :foreground "IndianRed")))) - '(erc-input-face ((t (:foreground "Beige")))) - '(erc-inverse-face ((t (:background "wheat" :foreground "darkslategrey")))) - '(erc-notice-face ((t (:foreground "MediumAquamarine")))) - '(erc-pal-face ((t (:foreground "pale green")))) - '(erc-prompt-face ((t (:foreground "MediumAquamarine")))) - '(erc-underline-face ((t (:underline t)))) - '(eshell-ls-archive-face ((t (:bold t :foreground "IndianRed")))) - '(eshell-ls-backup-face ((t (:foreground "Grey")))) - '(eshell-ls-clutter-face ((t (:foreground "DimGray")))) - '(eshell-ls-directory-face ((t (:bold t :foreground "MediumSlateBlue")))) - '(eshell-ls-executable-face ((t (:foreground "Coral")))) - '(eshell-ls-missing-face ((t (:foreground "black")))) - '(eshell-ls-picture-face ((t (:foreground "Violet")))) - '(eshell-ls-product-face ((t (:foreground "LightSalmon")))) - '(eshell-ls-readonly-face ((t (:foreground "Aquamarine")))) - '(eshell-ls-special-face ((t (:foreground "Gold")))) - '(eshell-ls-symlink-face ((t (:foreground "White")))) - '(eshell-ls-unreadable-face ((t (:foreground "DimGray")))) - '(eshell-prompt-face ((t (:foreground "MediumAquamarine")))) - '(font-lock-builtin-face ((t (:bold t :foreground "PaleGreen")))) - '(font-lock-comment-face ((t (:foreground "tomato3")))) - '(font-lock-constant-face ((t (:foreground "Aquamarine")))) - '(font-lock-doc-string-face ((t (:foreground "LightSalmon3")))) - '(font-lock-function-name-face ((t (:foreground "SteelBlue1")))) - '(font-lock-keyword-face ((t (:foreground "cyan1")))) - '(font-lock-reference-face ((t (:foreground "LightSalmon2")))) - '(font-lock-string-face ((t (:foreground "LightSalmon3")))) - '(font-lock-type-face ((t (:foreground "PaleGreen3")))) - '(font-lock-variable-name-face ((t (:foreground "khaki1")))) - '(font-lock-warning-face ((t (:bold t :foreground "IndianRed")))) - '(font-lock-preprocessor-face ((t (:foreground "SkyBlue3")))) - '(widget-field-face ((t (:background "DarkCyan")))) - '(custom-group-tag-face ((t(:foreground "brown" :underline t)))) - '(custom-state-face ((t (:foreground "khaki")))) - '(highlight ((t (:background "PaleGreen" :foreground "DarkGreen")))) - '(highline-face ((t (:background "SeaGreen")))) - '(holiday-face ((t (:background "DimGray")))) - '(info-menu-5 ((t (:underline t)))) - '(info-node ((t (:underline t :bold t :foreground "DodgerBlue1")))) - '(info-xref ((t (:underline t :foreground "DodgerBlue1")))) - '(isearch ((t (:foreground "red" :background "CornflowerBlue")))) - '(italic ((t (:italic t)))) - '(modeline ((t (:background "LightSlateGray" :foreground "AntiqueWhite")))) - '(modeline-buffer-id ((t (:background "LightSlateGray" :foreground "DarkBlue")))) - '(modeline-mousable ((t (:background "LightSlateGray" :foreground "firebrick")))) - '(modeline-mousable-minor-mode ((t (:background "LightSlateGray" :foreground "wheat")))) - '(region ((t (:background "dark cyan" :foreground "cyan")))) - '(secondary-selection ((t (:background "Aquamarine" :foreground "SlateBlue")))) - '(show-paren-match-face ((t (:background "Aquamarine" :foreground "SlateBlue")))) - '(show-paren-mismatch-face ((t (:background "Red" :foreground "White")))) - '(underline ((t (:underline t)))) - '(widget-field-face ((t (:foreground "LightBlue")))) - '(widget-inactive-face ((t (:foreground "DimGray")))) - '(widget-single-line-field-face ((t (:foreground "LightBlue")))) - '(woman-bold-face ((t (:bold t)))) - '(woman-italic-face ((t (:foreground "beige")))) - '(woman-unknown-face ((t (:foreground "LightSalmon"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'classic) - -;;; classic-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/cobalt-theme.el b/elpa/color-theme-modern-0.0.3/cobalt-theme.el deleted file mode 100644 index 2690df3..0000000 --- a/elpa/color-theme-modern-0.0.3/cobalt-theme.el +++ /dev/null @@ -1,82 +0,0 @@ -;;; cobalt-theme.el --- cobalt theme - -;; Copyright (C) 2012 by Nick Ewing -;; Copyright (C) 2014 by Syohei YOSHIDA - -;; Author: Nick Ewing -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of cobalt theme from `color-themes' - -;;; Code: - -(deftheme cobalt - "cobalt theme") - -(custom-theme-set-faces - 'cobalt - - '(default ((t (:background "#09223F" :foreground "#F8F8F8")))) - '(cursor ((t (:background "#A7A7A7")))) - '(border ((t (:foreground "black")))) - - '(buffers-tab ((t (:background "#09223F" :foreground "white")))) - '(font-lock-builtin-face ((t (:foreground "#40FFB9")))) - '(font-lock-comment-face ((t (:foreground "#008AFF")))) - '(font-lock-constant-face ((t (:foreground "#FF518C")))) - '(font-lock-doc-face ((t (:foreground "#008AFF")))) - '(font-lock-function-name-face ((t (:foreground "#FFDD00")))) - '(font-lock-keyword-face ((t (:foreground "#FA9E18")))) - '(font-lock-preprocessor-face ((t (:foreground "#8090A2")))) - '(font-lock-reference-face ((t (:foreground "#CCCCCC")))) - '(font-lock-regexp-grouping-backslash ((t (:foreground "#E9C062")))) - '(font-lock-regexp-grouping-construct ((t (:foreground "red")))) - '(font-lock-string-face ((t (:foreground "#42D915")))) - '(font-lock-type-face ((t (:foreground "#FFEF79")))) - '(font-lock-variable-name-face ((t (:foreground "#CCCCCC")))) - '(font-lock-warning-face ((t (:foreground "Pink")))) - '(hl-line ((t (:background "#00162A")))) - '(linum ((t (:background "#111111" :foreground "#888888" - :underline nil)))) - '(gui-element ((t (:background "#303030" :foreground "black")))) - '(region ((t (:background "#444444")))) - '(highlight ((t (:background "#26425D")))) - '(show-paren-match ((t (:background "#26425D")))) - '(show-paren-mismatch ((t (:background "#FF0000")))) - '(ecb-default-highlight-face ((t (:background "#26425D")))) - '(minibuffer-prompt ((t (:foreground "#008AFF")))) - '(modeline ((t (:background "#111111" :foreground "#888888")))) - '(modeline-inactive ((t (:background "#222222" :foreground "#888888")))) - '(italic ((t (nil)))) - '(left-margin ((t (nil)))) - '(toolbar ((t (nil)))) - '(ido-subdir ((t (:foreground "#008AFF")))) - '(ido-only-match ((t (:foreground "#42D915")))) - '(mumamo-background-chunk-major ((t (:background nil)))) - '(mumamo-background-chunk-submode1 ((t (:background nil)))) - '(underline ((nil (:underline nil))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'cobalt) - -;;; cobalt-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/color-theme-modern-autoloads.el b/elpa/color-theme-modern-0.0.3/color-theme-modern-autoloads.el deleted file mode 100644 index d49d2e8..0000000 --- a/elpa/color-theme-modern-0.0.3/color-theme-modern-autoloads.el +++ /dev/null @@ -1,1052 +0,0 @@ -;;; color-theme-modern-autoloads.el --- automatically extracted autoloads -*- lexical-binding: t -*- -;; -;;; Code: - -(add-to-list 'load-path (directory-file-name - (or (file-name-directory #$) (car load-path)))) - - -;;;### (autoloads nil "aalto-dark-theme" "aalto-dark-theme.el" (0 -;;;;;; 0 0 0)) -;;; Generated autoloads from aalto-dark-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "aalto-dark-theme" '("aalto-dark")) - -;;;*** - -;;;### (autoloads nil "aalto-light-theme" "aalto-light-theme.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from aalto-light-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "aalto-light-theme" '("aalto-light")) - -;;;*** - -;;;### (autoloads nil "aliceblue-theme" "aliceblue-theme.el" (0 0 -;;;;;; 0 0)) -;;; Generated autoloads from aliceblue-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "aliceblue-theme" '("aliceblue")) - -;;;*** - -;;;### (autoloads nil "andreas-theme" "andreas-theme.el" (0 0 0 0)) -;;; Generated autoloads from andreas-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "andreas-theme" '("andreas")) - -;;;*** - -;;;### (autoloads nil "arjen-theme" "arjen-theme.el" (0 0 0 0)) -;;; Generated autoloads from arjen-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "arjen-theme" '("arjen")) - -;;;*** - -;;;### (autoloads nil "beige-diff-theme" "beige-diff-theme.el" (0 -;;;;;; 0 0 0)) -;;; Generated autoloads from beige-diff-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "beige-diff-theme" '("beige-diff")) - -;;;*** - -;;;### (autoloads nil "beige-eshell-theme" "beige-eshell-theme.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from beige-eshell-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "beige-eshell-theme" '("beige-eshell")) - -;;;*** - -;;;### (autoloads nil "bharadwaj-slate-theme" "bharadwaj-slate-theme.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from bharadwaj-slate-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "bharadwaj-slate-theme" '("bharadwaj-slate")) - -;;;*** - -;;;### (autoloads nil "bharadwaj-theme" "bharadwaj-theme.el" (0 0 -;;;;;; 0 0)) -;;; Generated autoloads from bharadwaj-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "bharadwaj-theme" '("bharadwaj")) - -;;;*** - -;;;### (autoloads nil "billw-theme" "billw-theme.el" (0 0 0 0)) -;;; Generated autoloads from billw-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "billw-theme" '("billw")) - -;;;*** - -;;;### (autoloads nil "black-on-gray-theme" "black-on-gray-theme.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from black-on-gray-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "black-on-gray-theme" '("black-on-gray")) - -;;;*** - -;;;### (autoloads nil "blippblopp-theme" "blippblopp-theme.el" (0 -;;;;;; 0 0 0)) -;;; Generated autoloads from blippblopp-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "blippblopp-theme" '("blippblopp")) - -;;;*** - -;;;### (autoloads nil "blue-erc-theme" "blue-erc-theme.el" (0 0 0 -;;;;;; 0)) -;;; Generated autoloads from blue-erc-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "blue-erc-theme" '("blue-erc")) - -;;;*** - -;;;### (autoloads nil "blue-eshell-theme" "blue-eshell-theme.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from blue-eshell-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "blue-eshell-theme" '("blue-eshell")) - -;;;*** - -;;;### (autoloads nil "blue-gnus-theme" "blue-gnus-theme.el" (0 0 -;;;;;; 0 0)) -;;; Generated autoloads from blue-gnus-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "blue-gnus-theme" '("blue-gnus")) - -;;;*** - -;;;### (autoloads nil "blue-mood-theme" "blue-mood-theme.el" (0 0 -;;;;;; 0 0)) -;;; Generated autoloads from blue-mood-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "blue-mood-theme" '("blue-mood")) - -;;;*** - -;;;### (autoloads nil "blue-sea-theme" "blue-sea-theme.el" (0 0 0 -;;;;;; 0)) -;;; Generated autoloads from blue-sea-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "blue-sea-theme" '("blue-sea")) - -;;;*** - -;;;### (autoloads nil "calm-forest-theme" "calm-forest-theme.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from calm-forest-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "calm-forest-theme" '("calm-forest")) - -;;;*** - -;;;### (autoloads nil "charcoal-black-theme" "charcoal-black-theme.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from charcoal-black-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "charcoal-black-theme" '("charcoal-black")) - -;;;*** - -;;;### (autoloads nil "clarity-theme" "clarity-theme.el" (0 0 0 0)) -;;; Generated autoloads from clarity-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "clarity-theme" '("clarity")) - -;;;*** - -;;;### (autoloads nil "classic-theme" "classic-theme.el" (0 0 0 0)) -;;; Generated autoloads from classic-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "classic-theme" '("classic")) - -;;;*** - -;;;### (autoloads nil "cobalt-theme" "cobalt-theme.el" (0 0 0 0)) -;;; Generated autoloads from cobalt-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "cobalt-theme" '("cobalt")) - -;;;*** - -;;;### (autoloads nil "comidia-theme" "comidia-theme.el" (0 0 0 0)) -;;; Generated autoloads from comidia-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "comidia-theme" '("comidia")) - -;;;*** - -;;;### (autoloads nil "dark-blue-theme" "dark-blue-theme.el" (0 0 -;;;;;; 0 0)) -;;; Generated autoloads from dark-blue-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "dark-blue-theme" '("dark-blue")) - -;;;*** - -;;;### (autoloads nil "dark-blue2-theme" "dark-blue2-theme.el" (0 -;;;;;; 0 0 0)) -;;; Generated autoloads from dark-blue2-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "dark-blue2-theme" '("dark-blue2")) - -;;;*** - -;;;### (autoloads nil "dark-erc-theme" "dark-erc-theme.el" (0 0 0 -;;;;;; 0)) -;;; Generated autoloads from dark-erc-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "dark-erc-theme" '("dark-erc")) - -;;;*** - -;;;### (autoloads nil "dark-font-lock-theme" "dark-font-lock-theme.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from dark-font-lock-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "dark-font-lock-theme" '("dark-font-lock")) - -;;;*** - -;;;### (autoloads nil "dark-gnus-theme" "dark-gnus-theme.el" (0 0 -;;;;;; 0 0)) -;;; Generated autoloads from dark-gnus-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "dark-gnus-theme" '("dark-gnus")) - -;;;*** - -;;;### (autoloads nil "dark-green-theme" "dark-green-theme.el" (0 -;;;;;; 0 0 0)) -;;; Generated autoloads from dark-green-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "dark-green-theme" '("dark-green")) - -;;;*** - -;;;### (autoloads nil "dark-info-theme" "dark-info-theme.el" (0 0 -;;;;;; 0 0)) -;;; Generated autoloads from dark-info-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "dark-info-theme" '("dark-info")) - -;;;*** - -;;;### (autoloads nil "dark-laptop-theme" "dark-laptop-theme.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from dark-laptop-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "dark-laptop-theme" '("dark-laptop")) - -;;;*** - -;;;### (autoloads nil "deep-blue-theme" "deep-blue-theme.el" (0 0 -;;;;;; 0 0)) -;;; Generated autoloads from deep-blue-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "deep-blue-theme" '("deep-blue")) - -;;;*** - -;;;### (autoloads nil "desert-theme" "desert-theme.el" (0 0 0 0)) -;;; Generated autoloads from desert-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "desert-theme" '("desert")) - -;;;*** - -;;;### (autoloads nil "digital-ofs1-theme" "digital-ofs1-theme.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from digital-ofs1-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "digital-ofs1-theme" '("digital-ofs1")) - -;;;*** - -;;;### (autoloads nil "emacs-21-theme" "emacs-21-theme.el" (0 0 0 -;;;;;; 0)) -;;; Generated autoloads from emacs-21-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "emacs-21-theme" '("emacs-21")) - -;;;*** - -;;;### (autoloads nil "emacs-nw-theme" "emacs-nw-theme.el" (0 0 0 -;;;;;; 0)) -;;; Generated autoloads from emacs-nw-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "emacs-nw-theme" '("emacs-nw")) - -;;;*** - -;;;### (autoloads nil "euphoria-theme" "euphoria-theme.el" (0 0 0 -;;;;;; 0)) -;;; Generated autoloads from euphoria-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "euphoria-theme" '("euphoria")) - -;;;*** - -;;;### (autoloads nil "feng-shui-theme" "feng-shui-theme.el" (0 0 -;;;;;; 0 0)) -;;; Generated autoloads from feng-shui-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "feng-shui-theme" '("feng-shui")) - -;;;*** - -;;;### (autoloads nil "fischmeister-theme" "fischmeister-theme.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from fischmeister-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "fischmeister-theme" '("fischmeister")) - -;;;*** - -;;;### (autoloads nil "gnome-theme" "gnome-theme.el" (0 0 0 0)) -;;; Generated autoloads from gnome-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "gnome-theme" '("gnome")) - -;;;*** - -;;;### (autoloads nil "gnome2-theme" "gnome2-theme.el" (0 0 0 0)) -;;; Generated autoloads from gnome2-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "gnome2-theme" '("gnome2")) - -;;;*** - -;;;### (autoloads nil "goldenrod-theme" "goldenrod-theme.el" (0 0 -;;;;;; 0 0)) -;;; Generated autoloads from goldenrod-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "goldenrod-theme" '("goldenrod")) - -;;;*** - -;;;### (autoloads nil "gray1-theme" "gray1-theme.el" (0 0 0 0)) -;;; Generated autoloads from gray1-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "gray1-theme" '("gray1")) - -;;;*** - -;;;### (autoloads nil "gray30-theme" "gray30-theme.el" (0 0 0 0)) -;;; Generated autoloads from gray30-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "gray30-theme" '("gray30")) - -;;;*** - -;;;### (autoloads nil "greiner-theme" "greiner-theme.el" (0 0 0 0)) -;;; Generated autoloads from greiner-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "greiner-theme" '("greiner")) - -;;;*** - -;;;### (autoloads nil "gtk-ide-theme" "gtk-ide-theme.el" (0 0 0 0)) -;;; Generated autoloads from gtk-ide-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "gtk-ide-theme" '("gtk-ide")) - -;;;*** - -;;;### (autoloads nil "high-contrast-theme" "high-contrast-theme.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from high-contrast-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "high-contrast-theme" '("high-contrast")) - -;;;*** - -;;;### (autoloads nil "hober-theme" "hober-theme.el" (0 0 0 0)) -;;; Generated autoloads from hober-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "hober-theme" '("hober")) - -;;;*** - -;;;### (autoloads nil "infodoc-theme" "infodoc-theme.el" (0 0 0 0)) -;;; Generated autoloads from infodoc-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "infodoc-theme" '("infodoc")) - -;;;*** - -;;;### (autoloads nil "jb-simple-theme" "jb-simple-theme.el" (0 0 -;;;;;; 0 0)) -;;; Generated autoloads from jb-simple-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "jb-simple-theme" '("jb-simple")) - -;;;*** - -;;;### (autoloads nil "jedit-grey-theme" "jedit-grey-theme.el" (0 -;;;;;; 0 0 0)) -;;; Generated autoloads from jedit-grey-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "jedit-grey-theme" '("jedit-grey")) - -;;;*** - -;;;### (autoloads nil "jonadabian-slate-theme" "jonadabian-slate-theme.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from jonadabian-slate-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "jonadabian-slate-theme" '("jonadabian-slate")) - -;;;*** - -;;;### (autoloads nil "jonadabian-theme" "jonadabian-theme.el" (0 -;;;;;; 0 0 0)) -;;; Generated autoloads from jonadabian-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "jonadabian-theme" '("jonadabian")) - -;;;*** - -;;;### (autoloads nil "jsc-dark-theme" "jsc-dark-theme.el" (0 0 0 -;;;;;; 0)) -;;; Generated autoloads from jsc-dark-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "jsc-dark-theme" '("jsc-dark")) - -;;;*** - -;;;### (autoloads nil "jsc-light-theme" "jsc-light-theme.el" (0 0 -;;;;;; 0 0)) -;;; Generated autoloads from jsc-light-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "jsc-light-theme" '("jsc-light")) - -;;;*** - -;;;### (autoloads nil "jsc-light2-theme" "jsc-light2-theme.el" (0 -;;;;;; 0 0 0)) -;;; Generated autoloads from jsc-light2-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "jsc-light2-theme" '("jsc-light2")) - -;;;*** - -;;;### (autoloads nil "julie-theme" "julie-theme.el" (0 0 0 0)) -;;; Generated autoloads from julie-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "julie-theme" '("julie")) - -;;;*** - -;;;### (autoloads nil "katester-theme" "katester-theme.el" (0 0 0 -;;;;;; 0)) -;;; Generated autoloads from katester-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "katester-theme" '("katester")) - -;;;*** - -;;;### (autoloads nil "kingsajz-theme" "kingsajz-theme.el" (0 0 0 -;;;;;; 0)) -;;; Generated autoloads from kingsajz-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "kingsajz-theme" '("kingsajz")) - -;;;*** - -;;;### (autoloads nil "late-night-theme" "late-night-theme.el" (0 -;;;;;; 0 0 0)) -;;; Generated autoloads from late-night-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "late-night-theme" '("late-night")) - -;;;*** - -;;;### (autoloads nil "lawrence-theme" "lawrence-theme.el" (0 0 0 -;;;;;; 0)) -;;; Generated autoloads from lawrence-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "lawrence-theme" '("lawrence")) - -;;;*** - -;;;### (autoloads nil "ld-dark-theme" "ld-dark-theme.el" (0 0 0 0)) -;;; Generated autoloads from ld-dark-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "ld-dark-theme" '("ld-dark")) - -;;;*** - -;;;### (autoloads nil "lethe-theme" "lethe-theme.el" (0 0 0 0)) -;;; Generated autoloads from lethe-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "lethe-theme" '("lethe")) - -;;;*** - -;;;### (autoloads nil "marine-theme" "marine-theme.el" (0 0 0 0)) -;;; Generated autoloads from marine-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "marine-theme" '("marine")) - -;;;*** - -;;;### (autoloads nil "marquardt-theme" "marquardt-theme.el" (0 0 -;;;;;; 0 0)) -;;; Generated autoloads from marquardt-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "marquardt-theme" '("marquardt")) - -;;;*** - -;;;### (autoloads nil "matrix-theme" "matrix-theme.el" (0 0 0 0)) -;;; Generated autoloads from matrix-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "matrix-theme" '("matrix")) - -;;;*** - -;;;### (autoloads nil "midnight-theme" "midnight-theme.el" (0 0 0 -;;;;;; 0)) -;;; Generated autoloads from midnight-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "midnight-theme" '("midnight")) - -;;;*** - -;;;### (autoloads nil "mistyday-theme" "mistyday-theme.el" (0 0 0 -;;;;;; 0)) -;;; Generated autoloads from mistyday-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "mistyday-theme" '("mistyday")) - -;;;*** - -;;;### (autoloads nil "montz-theme" "montz-theme.el" (0 0 0 0)) -;;; Generated autoloads from montz-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "montz-theme" '("montz")) - -;;;*** - -;;;### (autoloads nil "oswald-theme" "oswald-theme.el" (0 0 0 0)) -;;; Generated autoloads from oswald-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "oswald-theme" '("oswald")) - -;;;*** - -;;;### (autoloads nil "parus-theme" "parus-theme.el" (0 0 0 0)) -;;; Generated autoloads from parus-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "parus-theme" '("parus")) - -;;;*** - -;;;### (autoloads nil "pierson-theme" "pierson-theme.el" (0 0 0 0)) -;;; Generated autoloads from pierson-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "pierson-theme" '("pierson")) - -;;;*** - -;;;### (autoloads nil "pok-wob-theme" "pok-wob-theme.el" (0 0 0 0)) -;;; Generated autoloads from pok-wob-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "pok-wob-theme" '("pok-wob")) - -;;;*** - -;;;### (autoloads nil "pok-wog-theme" "pok-wog-theme.el" (0 0 0 0)) -;;; Generated autoloads from pok-wog-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "pok-wog-theme" '("pok-wog")) - -;;;*** - -;;;### (autoloads nil "railscast-theme" "railscast-theme.el" (0 0 -;;;;;; 0 0)) -;;; Generated autoloads from railscast-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "railscast-theme" '("railscast")) - -;;;*** - -;;;### (autoloads nil "ramangalahy-theme" "ramangalahy-theme.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from ramangalahy-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "ramangalahy-theme" '("ramangalahy")) - -;;;*** - -;;;### (autoloads nil "raspopovic-theme" "raspopovic-theme.el" (0 -;;;;;; 0 0 0)) -;;; Generated autoloads from raspopovic-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "raspopovic-theme" '("raspopovic")) - -;;;*** - -;;;### (autoloads nil "renegade-theme" "renegade-theme.el" (0 0 0 -;;;;;; 0)) -;;; Generated autoloads from renegade-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "renegade-theme" '("renegade")) - -;;;*** - -;;;### (autoloads nil "resolve-theme" "resolve-theme.el" (0 0 0 0)) -;;; Generated autoloads from resolve-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "resolve-theme" '("resolve")) - -;;;*** - -;;;### (autoloads nil "retro-green-theme" "retro-green-theme.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from retro-green-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "retro-green-theme" '("retro-green")) - -;;;*** - -;;;### (autoloads nil "retro-orange-theme" "retro-orange-theme.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from retro-orange-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "retro-orange-theme" '("retro-orange")) - -;;;*** - -;;;### (autoloads nil "robin-hood-theme" "robin-hood-theme.el" (0 -;;;;;; 0 0 0)) -;;; Generated autoloads from robin-hood-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "robin-hood-theme" '("robin-hood")) - -;;;*** - -;;;### (autoloads nil "rotor-theme" "rotor-theme.el" (0 0 0 0)) -;;; Generated autoloads from rotor-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "rotor-theme" '("rotor")) - -;;;*** - -;;;### (autoloads nil "ryerson-theme" "ryerson-theme.el" (0 0 0 0)) -;;; Generated autoloads from ryerson-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "ryerson-theme" '("ryerson")) - -;;;*** - -;;;### (autoloads nil "salmon-diff-theme" "salmon-diff-theme.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from salmon-diff-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "salmon-diff-theme" '("salmon-diff")) - -;;;*** - -;;;### (autoloads nil "salmon-font-lock-theme" "salmon-font-lock-theme.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from salmon-font-lock-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "salmon-font-lock-theme" '("salmon-font-lock")) - -;;;*** - -;;;### (autoloads nil "scintilla-theme" "scintilla-theme.el" (0 0 -;;;;;; 0 0)) -;;; Generated autoloads from scintilla-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "scintilla-theme" '("scintilla")) - -;;;*** - -;;;### (autoloads nil "shaman-theme" "shaman-theme.el" (0 0 0 0)) -;;; Generated autoloads from shaman-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "shaman-theme" '("shaman")) - -;;;*** - -;;;### (autoloads nil "simple-1-theme" "simple-1-theme.el" (0 0 0 -;;;;;; 0)) -;;; Generated autoloads from simple-1-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "simple-1-theme" '("simple-1")) - -;;;*** - -;;;### (autoloads nil "sitaramv-nt-theme" "sitaramv-nt-theme.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from sitaramv-nt-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "sitaramv-nt-theme" '("sitaramv-nt")) - -;;;*** - -;;;### (autoloads nil "sitaramv-solaris-theme" "sitaramv-solaris-theme.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from sitaramv-solaris-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "sitaramv-solaris-theme" '("sitaramv-solaris")) - -;;;*** - -;;;### (autoloads nil "snow-theme" "snow-theme.el" (0 0 0 0)) -;;; Generated autoloads from snow-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "snow-theme" '("snow")) - -;;;*** - -;;;### (autoloads nil "snowish-theme" "snowish-theme.el" (0 0 0 0)) -;;; Generated autoloads from snowish-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "snowish-theme" '("snowish")) - -;;;*** - -;;;### (autoloads nil "standard-ediff-theme" "standard-ediff-theme.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from standard-ediff-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "standard-ediff-theme" '("standard-ediff")) - -;;;*** - -;;;### (autoloads nil "standard-theme" "standard-theme.el" (0 0 0 -;;;;;; 0)) -;;; Generated autoloads from standard-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "standard-theme" '("standard")) - -;;;*** - -;;;### (autoloads nil "subdued-theme" "subdued-theme.el" (0 0 0 0)) -;;; Generated autoloads from subdued-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "subdued-theme" '("subdued")) - -;;;*** - -;;;### (autoloads nil "subtle-blue-theme" "subtle-blue-theme.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from subtle-blue-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "subtle-blue-theme" '("subtle-blue")) - -;;;*** - -;;;### (autoloads nil "subtle-hacker-theme" "subtle-hacker-theme.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from subtle-hacker-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "subtle-hacker-theme" '("subtle-hacker")) - -;;;*** - -;;;### (autoloads nil "taming-mr-arneson-theme" "taming-mr-arneson-theme.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from taming-mr-arneson-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "taming-mr-arneson-theme" '("taming-mr-arneson")) - -;;;*** - -;;;### (autoloads nil "taylor-theme" "taylor-theme.el" (0 0 0 0)) -;;; Generated autoloads from taylor-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "taylor-theme" '("taylor")) - -;;;*** - -;;;### (autoloads nil "tty-dark-theme" "tty-dark-theme.el" (0 0 0 -;;;;;; 0)) -;;; Generated autoloads from tty-dark-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "tty-dark-theme" '("tty-dark")) - -;;;*** - -;;;### (autoloads nil "vim-colors-theme" "vim-colors-theme.el" (0 -;;;;;; 0 0 0)) -;;; Generated autoloads from vim-colors-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "vim-colors-theme" '("vim-colors")) - -;;;*** - -;;;### (autoloads nil "whateveryouwant-theme" "whateveryouwant-theme.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from whateveryouwant-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "whateveryouwant-theme" '("whateveryouwant")) - -;;;*** - -;;;### (autoloads nil "wheat-theme" "wheat-theme.el" (0 0 0 0)) -;;; Generated autoloads from wheat-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "wheat-theme" '("wheat")) - -;;;*** - -;;;### (autoloads nil "word-perfect-theme" "word-perfect-theme.el" -;;;;;; (0 0 0 0)) -;;; Generated autoloads from word-perfect-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "word-perfect-theme" '("word-perfect")) - -;;;*** - -;;;### (autoloads nil "xemacs-theme" "xemacs-theme.el" (0 0 0 0)) -;;; Generated autoloads from xemacs-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "xemacs-theme" '("xemacs")) - -;;;*** - -;;;### (autoloads nil "xp-theme" "xp-theme.el" (0 0 0 0)) -;;; Generated autoloads from xp-theme.el - -(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) - -(register-definition-prefixes "xp-theme" 'nil) - -;;;*** - -;;;### (autoloads nil nil ("color-theme-modern-pkg.el" "color-theme-modern.el") -;;;;;; (0 0 0 0)) - -;;;*** - -;; Local Variables: -;; version-control: never -;; no-byte-compile: t -;; no-update-autoloads: t -;; coding: utf-8 -;; End: -;;; color-theme-modern-autoloads.el ends here diff --git a/elpa/color-theme-modern-0.0.3/color-theme-modern-pkg.el b/elpa/color-theme-modern-0.0.3/color-theme-modern-pkg.el deleted file mode 100644 index a1a5a84..0000000 --- a/elpa/color-theme-modern-0.0.3/color-theme-modern-pkg.el +++ /dev/null @@ -1,10 +0,0 @@ -(define-package "color-theme-modern" "0.0.3" "Reimplement colortheme with Emacs 24 theme framework." - '((emacs "24")) - :commit "4f7da6f955f7c584c5dfab2dc170f9a3debd80f8" :authors - '(("Syohei YOSHIDA" . "syohex@gmail.com")) - :maintainer - '("Syohei YOSHIDA" . "syohex@gmail.com") - :url "https://github.com/emacs-jp/replace-colorthemes") -;; Local Variables: -;; no-byte-compile: t -;; End: diff --git a/elpa/color-theme-modern-0.0.3/color-theme-modern.el b/elpa/color-theme-modern-0.0.3/color-theme-modern.el deleted file mode 100644 index 65b2f06..0000000 --- a/elpa/color-theme-modern-0.0.3/color-theme-modern.el +++ /dev/null @@ -1,30 +0,0 @@ -;;; color-theme-modern.el --- ports of color-theme themes to deftheme - -;; Copyright (C) 2013-2016 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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 package ports many `color-theme' themes to `deftheme' themes. - -;;; Code: - -(provide 'color-theme-modern) - -;;; color-theme-modern.el ends here diff --git a/elpa/color-theme-modern-0.0.3/comidia-theme.el b/elpa/color-theme-modern-0.0.3/comidia-theme.el deleted file mode 100644 index ff18389..0000000 --- a/elpa/color-theme-modern-0.0.3/comidia-theme.el +++ /dev/null @@ -1,193 +0,0 @@ -;;; comidia-theme.el --- comidia theme - -;; Copyright (C) 2001 by Marcelo Dias -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of comidia theme from `color-themes' - -;;; Code: - -(deftheme comidia - "comidia theme") - -(custom-theme-set-faces - 'comidia - - '(default ((t (:background "black" :foreground "SteelBlue")))) - '(mouse ((t (:background "SteelBlue")))) - '(cursor ((t (:background "SteelBlue")))) - '(border ((t (:background "black")))) - - '(bg:erc-color-face0 ((t (:background "White")))) - '(bg:erc-color-face1 ((t (:background "black")))) - '(bg:erc-color-face10 ((t (:background "lightblue1")))) - '(bg:erc-color-face11 ((t (:background "cyan")))) - '(bg:erc-color-face12 ((t (:background "blue")))) - '(bg:erc-color-face13 ((t (:background "deeppink")))) - '(bg:erc-color-face14 ((t (:background "gray50")))) - '(bg:erc-color-face15 ((t (:background "gray90")))) - '(bg:erc-color-face2 ((t (:background "blue4")))) - '(bg:erc-color-face3 ((t (:background "green4")))) - '(bg:erc-color-face4 ((t (:background "red")))) - '(bg:erc-color-face5 ((t (:background "brown")))) - '(bg:erc-color-face6 ((t (:background "purple")))) - '(bg:erc-color-face7 ((t (:background "orange")))) - '(bg:erc-color-face8 ((t (:background "yellow")))) - '(bg:erc-color-face9 ((t (:background "green")))) - '(bold ((t (:bold t :weight bold)))) - '(bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) - '(comint-highlight-input ((t (:bold t :weight bold)))) - '(comint-highlight-prompt ((t (:foreground "cyan")))) - '(erc-action-face ((t (:bold t :weight bold)))) - '(erc-bold-face ((t (:bold t :weight bold)))) - '(erc-dangerous-host-face ((t (:foreground "red")))) - '(erc-default-face ((t (nil)))) - '(erc-direct-msg-face ((t (:foreground "IndianRed")))) - '(erc-error-face ((t (:background "Red" :foreground "White")))) - '(erc-fool-face ((t (:foreground "dim gray")))) - '(erc-input-face ((t (:foreground "brown")))) - '(erc-inverse-face ((t (:background "Black" :foreground "White")))) - '(erc-keyword-face ((t (:bold t :foreground "pale green" :weight bold)))) - '(erc-notice-face ((t (:bold t :foreground "SlateBlue" :weight bold)))) - '(erc-pal-face ((t (:bold t :foreground "Magenta" :weight bold)))) - '(erc-prompt-face ((t (:bold t :background "lightBlue2" :foreground "Black" :weight bold)))) - '(erc-timestamp-face ((t (:bold t :foreground "green" :weight bold)))) - '(erc-underline-face ((t (:underline t)))) - '(fg:erc-color-face0 ((t (:foreground "White")))) - '(fg:erc-color-face1 ((t (:foreground "black")))) - '(fg:erc-color-face10 ((t (:foreground "lightblue1")))) - '(fg:erc-color-face11 ((t (:foreground "cyan")))) - '(fg:erc-color-face12 ((t (:foreground "blue")))) - '(fg:erc-color-face13 ((t (:foreground "deeppink")))) - '(fg:erc-color-face14 ((t (:foreground "gray50")))) - '(fg:erc-color-face15 ((t (:foreground "gray90")))) - '(fg:erc-color-face2 ((t (:foreground "blue4")))) - '(fg:erc-color-face3 ((t (:foreground "green4")))) - '(fg:erc-color-face4 ((t (:foreground "red")))) - '(fg:erc-color-face5 ((t (:foreground "brown")))) - '(fg:erc-color-face6 ((t (:foreground "purple")))) - '(fg:erc-color-face7 ((t (:foreground "orange")))) - '(fg:erc-color-face8 ((t (:foreground "yellow")))) - '(fg:erc-color-face9 ((t (:foreground "green")))) - - '(font-lock-builtin-face ((t (:foreground "LightSteelBlue")))) - '(font-lock-comment-face ((t (:foreground "chocolate1")))) - '(font-lock-constant-face ((t (:foreground "Aquamarine")))) - '(font-lock-doc-face ((t (:foreground "LightSalmon")))) - '(font-lock-doc-string-face ((t (:foreground "LightSalmon")))) - '(font-lock-function-name-face ((t (:foreground "LightSkyBlue")))) - '(font-lock-keyword-face ((t (:foreground "Cyan")))) - '(font-lock-preprocessor-face ((t (:foreground "Aquamarine")))) - '(font-lock-reference-face ((t (:foreground "LightSteelBlue")))) - '(font-lock-string-face ((t (:foreground "LightSalmon")))) - '(font-lock-type-face ((t (:foreground "PaleGreen")))) - '(font-lock-variable-name-face ((t (:foreground "LightGoldenrod")))) - '(font-lock-warning-face ((t (:bold t :foreground "Pink" :weight bold)))) - '(fringe ((t (:background "grey10")))) - '(gnus-group-mail-1-empty-face ((t (:foreground "aquamarine1")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "aquamarine1" :weight bold)))) - '(gnus-group-mail-2-empty-face ((t (:foreground "aquamarine2")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "aquamarine2" :weight bold)))) - '(gnus-group-mail-3-empty-face ((t (:foreground "aquamarine3")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "aquamarine3" :weight bold)))) - '(gnus-group-mail-low-empty-face ((t (:foreground "aquamarine4")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "aquamarine4" :weight bold)))) - '(gnus-group-news-1-empty-face ((t (:foreground "PaleTurquoise")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "PaleTurquoise" :weight bold)))) - '(gnus-group-news-2-empty-face ((t (:foreground "turquoise")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "turquoise" :weight bold)))) - '(gnus-group-news-3-empty-face ((t (nil)))) - '(gnus-group-news-3-face ((t (:bold t :weight bold)))) - '(gnus-group-news-4-empty-face ((t (nil)))) - '(gnus-group-news-4-face ((t (:bold t :weight bold)))) - '(gnus-group-news-5-empty-face ((t (nil)))) - '(gnus-group-news-5-face ((t (:bold t :weight bold)))) - '(gnus-group-news-6-empty-face ((t (nil)))) - '(gnus-group-news-6-face ((t (:bold t :weight bold)))) - '(gnus-group-news-low-empty-face ((t (:foreground "DarkTurquoise")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "DarkTurquoise" :weight bold)))) - '(gnus-splash-face ((t (:foreground "Brown")))) - '(gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "SkyBlue" :weight bold)))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "PaleGreen" :weight bold)))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "pink" :weight bold)))) - '(gnus-summary-high-unread-face ((t (:bold t :weight bold)))) - '(gnus-summary-low-ancient-face ((t (:italic t :foreground "SkyBlue" :slant italic)))) - '(gnus-summary-low-read-face ((t (:italic t :foreground "PaleGreen" :slant italic)))) - '(gnus-summary-low-ticked-face ((t (:italic t :foreground "pink" :slant italic)))) - '(gnus-summary-low-unread-face ((t (:italic t :slant italic)))) - '(gnus-summary-normal-ancient-face ((t (:foreground "SkyBlue")))) - '(gnus-summary-normal-read-face ((t (:foreground "PaleGreen")))) - '(gnus-summary-normal-ticked-face ((t (:foreground "pink")))) - '(gnus-summary-normal-unread-face ((t (nil)))) - '(gnus-summary-selected-face ((t (:underline t)))) - '(header-line ((t (:width condensed :box (:line-width 1 :style none) :background "grey20" :foreground "grey90" :box nil)))) - '(highlight ((t (:background "darkolivegreen")))) - '(isearch ((t (:background "palevioletred2" :foreground "brown4")))) - '(isearch-lazy-highlight-face ((t (:background "paleturquoise4")))) - '(italic ((t (:italic t :slant italic)))) - '(menu ((t (nil)))) - '(message-cited-text-face ((t (:foreground "red")))) - '(message-header-cc-face ((t (:bold t :foreground "green4" :weight bold)))) - '(message-header-name-face ((t (:foreground "DarkGreen")))) - '(message-header-newsgroups-face ((t (:italic t :bold t :foreground "yellow" :slant italic :weight bold)))) - '(message-header-other-face ((t (:foreground "#b00000")))) - '(message-header-subject-face ((t (:foreground "green3")))) - '(message-header-to-face ((t (:bold t :foreground "green2" :weight bold)))) - '(message-header-xheader-face ((t (:foreground "blue")))) - '(message-mml-face ((t (:foreground "ForestGreen")))) - '(message-separator-face ((t (:foreground "blue3")))) - '(modeline ((t (:background "Gray10" :foreground "SteelBlue" :box (:line-width 1 :style none) :width condensed)))) - '(modeline-buffer-id ((t (:background "Gray10" :foreground "SteelBlue" :box (:line-width 1 :style none) :width condensed)))) - '(modeline-mousable-minor-mode ((t (:background "Gray10" :foreground "SteelBlue" :box (:line-width 1 :style none) :width condensed)))) - '(modeline-mousable ((t (:background "Gray10" :foreground "SteelBlue" :box (:line-width 1 :style none) :width condensed)))) - '(primary-selection ((t (:background "blue3")))) - '(region ((t (:background "blue3")))) - '(scroll-bar ((t (:background "grey75")))) - '(secondary-selection ((t (:background "SkyBlue4")))) - '(speedbar-button-face ((t (:foreground "green3")))) - '(speedbar-directory-face ((t (:foreground "light blue")))) - '(speedbar-file-face ((t (:foreground "cyan")))) - '(speedbar-highlight-face ((t (:background "sea green")))) - '(speedbar-selected-face ((t (:foreground "red" :underline t)))) - '(speedbar-tag-face ((t (:foreground "yellow")))) - '(tool-bar ((t (:background "grey75" :foreground "black" :box (:line-width 1 :style released-button))))) - '(tooltip ((t (:background "lightyellow" :foreground "black")))) - '(trailing-whitespace ((t (:background "red")))) - '(underline ((t (:underline t)))) - - '(widget-button-face ((t (:bold t :weight bold)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "lime green")))) - '(widget-field-face ((t (:background "dim gray")))) - '(widget-inactive-face ((t (:foreground "light gray")))) - '(widget-single-line-field-face ((t (:background "dim gray")))) - '(zmacs-region ((t (:background "blue3"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'comidia) - -;;; comidia-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/dark-blue-theme.el b/elpa/color-theme-modern-0.0.3/dark-blue-theme.el deleted file mode 100644 index 69c03bb..0000000 --- a/elpa/color-theme-modern-0.0.3/dark-blue-theme.el +++ /dev/null @@ -1,439 +0,0 @@ -;;; subtle-blue-theme.el --- dark-blue theme - -;; Copyright (C) 2001 by Chris McMahan -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of dark-blue theme from `color-themes' - -;;; Code: - -(deftheme dark-blue - "dark-blue theme") - -(custom-theme-set-faces - 'dark-blue - - '(default ((t (:background "#537182" :foreground "AntiqueWhite2")))) - '(mouse ((t (:background "Grey")))) - '(cursor ((t (:background "LightGray")))) - '(border ((t (:background "black")))) - - '(bbdb-company ((t (:italic t)))) - '(bbdb-field-name ((t (:bold t :foreground "MediumAquamarine")))) - '(bbdb-field-value ((t (nil)))) - '(bbdb-name ((t (:underline t)))) - '(blank-space-face ((t (:background "LightGray")))) - '(blank-tab-face ((t (:background "Wheat" :foreground "DarkSlateGray")))) - '(blue ((t (:foreground "blue")))) - '(bold ((t (:bold t :foreground "MediumAquamarine")))) - '(bold-italic ((t (:italic t :bold t :foreground "SkyBlue")))) - '(border-glyph ((t (nil)))) - '(calendar-today-face ((t (:underline t)))) - '(comint-highlight-input ((t (:bold t)))) - '(comint-highlight-prompt ((t (:foreground "cyan")))) - '(comint-input-face ((t (:foreground "deepskyblue")))) - '(cperl-array-face ((t (:bold t :foreground "Yellow")))) - '(cperl-hash-face ((t (:italic t :bold t :foreground "White")))) - '(cperl-nonoverridable-face ((t (:foreground "SkyBlue")))) - '(custom-button-face ((t (:underline t :bold t :foreground "MediumAquaMarine")))) - '(custom-button-pressed-face ((t (:background "lightgrey" :foreground "black")))) - '(custom-changed-face ((t (:background "blue" :foreground "white")))) - '(custom-comment-face ((t (:background "dim gray")))) - '(custom-comment-tag-face ((t (:foreground "gray80")))) - '(custom-documentation-face ((t (:foreground "Grey")))) - '(custom-face-tag-face ((t (:underline t)))) - '(custom-group-tag-face ((t (:bold t :foreground "MediumAquamarine")))) - '(custom-group-tag-face-1 ((t (:foreground "MediumAquaMarine")))) - '(custom-invalid-face ((t (:background "red" :foreground "yellow")))) - '(custom-modified-face ((t (:background "blue" :foreground "white")))) - '(custom-rogue-face ((t (:background "black" :foreground "pink")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:background "white" :foreground "blue")))) - '(custom-state-face ((t (:foreground "yellow")))) - '(custom-variable-button-face ((t (:underline t :bold t)))) - '(custom-variable-tag-face ((t (:bold t :foreground "Aquamarine")))) - '(cvs-filename-face ((t (:foreground "blue4")))) - '(cvs-handled-face ((t (:foreground "pink")))) - '(cvs-header-face ((t (:bold t :foreground "blue4")))) - '(cvs-marked-face ((t (:bold t :foreground "green3")))) - '(cvs-msg-face ((t (:italic t)))) - '(cvs-need-action-face ((t (:foreground "orange")))) - '(cvs-unknown-face ((t (:foreground "red")))) - '(diary-face ((t (:bold t :foreground "cyan")))) - '(dired-face-boring ((t (:foreground "Gray65")))) - '(dired-face-directory ((t (:bold t :foreground "sky blue")))) - '(dired-face-executable ((t (:foreground "green yellow")))) - '(dired-face-flagged ((t (:foreground "tomato")))) - '(dired-face-marked ((t (:foreground "light salmon")))) - '(dired-face-permissions ((t (:foreground "aquamarine")))) - '(dired-face-setuid ((t (:foreground "Red")))) - '(dired-face-socket ((t (:foreground "magenta")))) - '(dired-face-symlink ((t (:foreground "gray95")))) - '(display-time-mail-balloon-enhance-face ((t (:background "orange")))) - '(display-time-mail-balloon-gnus-group-face ((t (:foreground "blue")))) - '(display-time-time-balloon-face ((t (:foreground "red")))) - '(ecb-sources-face ((t (:foreground "LightBlue1")))) - '(ediff-current-diff-face-A ((t (:background "pale green" :foreground "firebrick")))) - '(ediff-current-diff-face-Ancestor ((t (:background "VioletRed" :foreground "Black")))) - '(ediff-current-diff-face-B ((t (:background "Yellow" :foreground "DarkOrchid")))) - '(ediff-current-diff-face-C ((t (:background "indianred" :foreground "white")))) - '(ediff-even-diff-face-A ((t (:background "light gray" :foreground "Black")))) - '(ediff-even-diff-face-Ancestor ((t (:background "Gray" :foreground "White")))) - '(ediff-even-diff-face-B ((t (:background "Gray" :foreground "White")))) - '(ediff-even-diff-face-C ((t (:background "light gray" :foreground "Black")))) - '(ediff-fine-diff-face-A ((t (:background "sky blue" :foreground "Navy")))) - '(ediff-fine-diff-face-Ancestor ((t (:background "Green" :foreground "Black")))) - '(ediff-fine-diff-face-B ((t (:background "cyan" :foreground "Black")))) - '(ediff-fine-diff-face-C ((t (:background "Turquoise" :foreground "Black")))) - '(ediff-odd-diff-face-A ((t (:background "Gray" :foreground "White")))) - '(ediff-odd-diff-face-Ancestor ((t (:background "light gray" :foreground "Black")))) - '(ediff-odd-diff-face-B ((t (:background "light gray" :foreground "Black")))) - '(ediff-odd-diff-face-C ((t (:background "Gray" :foreground "White")))) - '(erc-action-face ((t (:bold t)))) - '(erc-bold-face ((t (:bold t)))) - '(erc-default-face ((t (nil)))) - '(erc-direct-msg-face ((t (:foreground "LightSalmon")))) - '(erc-error-face ((t (:bold t :foreground "yellow")))) - '(erc-input-face ((t (:foreground "Beige")))) - '(erc-inverse-face ((t (:background "wheat" :foreground "darkslategrey")))) - '(erc-notice-face ((t (:foreground "MediumAquamarine")))) - '(erc-pal-face ((t (:foreground "PaleGreen")))) - '(erc-prompt-face ((t (:foreground "MediumAquamarine")))) - '(erc-underline-face ((t (:underline t)))) - '(eshell-ls-archive-face ((t (:bold t :foreground "wheat")))) - '(eshell-ls-backup-face ((t (:foreground "Grey")))) - '(eshell-ls-clutter-face ((t (:bold t :foreground "wheat")))) - '(eshell-ls-directory-face ((t (:bold t :foreground "Yellow")))) - '(eshell-ls-executable-face ((t (:bold t :foreground "wheat")))) - '(eshell-ls-missing-face ((t (:bold t :foreground "wheat")))) - '(eshell-ls-picture-face ((t (:foreground "wheat")))) - '(eshell-ls-product-face ((t (:foreground "wheat")))) - '(eshell-ls-readonly-face ((t (:foreground "wheat")))) - '(eshell-ls-special-face ((t (:bold t :foreground "wheat")))) - '(eshell-ls-symlink-face ((t (:bold t :foreground "White")))) - '(eshell-ls-text-face ((t (:foreground "wheat")))) - '(eshell-ls-todo-face ((t (:foreground "wheat")))) - '(eshell-ls-unreadable-face ((t (:foreground "wheat3")))) - '(eshell-prompt-face ((t (:bold t :foreground "PaleGreen")))) - '(eshell-test-failed-face ((t (:bold t :foreground "OrangeRed")))) - '(eshell-test-ok-face ((t (:bold t :foreground "Green")))) - '(excerpt ((t (:italic t)))) - '(ff-paths-non-existant-file-face ((t (:bold t :foreground "NavyBlue")))) - '(fixed ((t (:bold t)))) - '(flyspell-duplicate-face ((t (:underline t :bold t :foreground "Gold3")))) - '(flyspell-incorrect-face ((t (:underline t :bold t :foreground "OrangeRed")))) - '(font-latex-italic-face ((t (nil)))) - '(font-latex-math-face ((t (nil)))) - '(font-latex-sedate-face ((t (:foreground "Gray85")))) - '(font-latex-string-face ((t (:foreground "orange")))) - '(font-latex-warning-face ((t (:foreground "gold")))) - '(font-lock-builtin-face ((t (:foreground "PaleGreen")))) - '(font-lock-comment-face ((t (:italic t :foreground "Gray80")))) - '(font-lock-constant-face ((t (:foreground "LightBlue")))) - '(font-lock-doc-face ((t (:bold t)))) - '(font-lock-doc-string-face ((t (:bold t :foreground "DarkSeaGreen")))) - '(font-lock-exit-face ((t (:foreground "green")))) - '(font-lock-function-name-face ((t (:italic t :bold t :foreground "Yellow")))) - '(font-lock-keyword-face ((t (:bold t :foreground "LightBlue")))) - '(font-lock-preprocessor-face ((t (:foreground "blue3")))) - '(font-lock-reference-face ((t (:foreground "PaleGreen")))) - '(font-lock-string-face ((t (:italic t :foreground "DarkSeaGreen")))) - '(font-lock-type-face ((t (:bold t :foreground "YellowGreen")))) - '(font-lock-variable-name-face ((t (:italic t :bold t :foreground "LightBlue")))) - '(font-lock-warning-face ((t (:bold t :foreground "LightSalmon")))) - '(fringe ((t (:background "darkslategrey")))) - '(gnus-cite-attribution-face ((t (:italic t :bold t)))) - '(gnus-cite-face-1 ((t (:foreground "LightBlue")))) - '(gnus-cite-face-10 ((t (:foreground "LightBlue")))) - '(gnus-cite-face-11 ((t (:foreground "LightBlue")))) - '(gnus-cite-face-2 ((t (:foreground "LightBlue")))) - '(gnus-cite-face-3 ((t (:foreground "LightBlue")))) - '(gnus-cite-face-4 ((t (:foreground "LightBlue")))) - '(gnus-cite-face-5 ((t (:foreground "LightBlue")))) - '(gnus-cite-face-6 ((t (:foreground "LightBlue")))) - '(gnus-cite-face-7 ((t (:foreground "LightBlue")))) - '(gnus-cite-face-8 ((t (:foreground "LightBlue")))) - '(gnus-cite-face-9 ((t (:foreground "LightBlue")))) - '(gnus-emphasis-bold ((t (:bold t)))) - '(gnus-emphasis-bold-italic ((t (:italic t :bold t)))) - '(gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) - '(gnus-emphasis-italic ((t (:italic t)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(gnus-emphasis-underline-bold ((t (:underline t :bold t)))) - '(gnus-emphasis-underline-bold-italic ((t (:underline t :italic t :bold t)))) - '(gnus-emphasis-underline-italic ((t (:underline t :italic t)))) - '(gnus-filterhist-face-1 ((t (nil)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "gray80")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "light cyan")))) - '(gnus-group-mail-2-empty-face ((t (:foreground "gray80")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "turquoise")))) - '(gnus-group-mail-3-empty-face ((t (:foreground "gray80")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "LightBlue")))) - '(gnus-group-mail-low-empty-face ((t (:foreground "gray80")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "LightBlue")))) - '(gnus-group-news-1-empty-face ((t (:foreground "gray80")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "green yellow")))) - '(gnus-group-news-2-empty-face ((t (:foreground "gray80")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "Aquamarine")))) - '(gnus-group-news-3-empty-face ((t (:foreground "gray80")))) - '(gnus-group-news-3-face ((t (:bold t :foreground "LightBlue")))) - '(gnus-group-news-4-empty-face ((t (:foreground "gray80")))) - '(gnus-group-news-4-face ((t (:bold t :foreground "Wheat")))) - '(gnus-group-news-5-empty-face ((t (:foreground "gray80")))) - '(gnus-group-news-5-face ((t (:bold t :foreground "MediumAquamarine")))) - '(gnus-group-news-6-empty-face ((t (:foreground "gray80")))) - '(gnus-group-news-6-face ((t (:bold t :foreground "MediumAquamarine")))) - '(gnus-group-news-low-empty-face ((t (:foreground "gray80")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "yellow green")))) - '(gnus-header-content-face ((t (:italic t :foreground "LightSkyBlue3")))) - '(gnus-header-from-face ((t (:bold t :foreground "light cyan")))) - '(gnus-header-name-face ((t (:bold t :foreground "LightBlue")))) - '(gnus-header-newsgroups-face ((t (:italic t :bold t :foreground "LightSkyBlue3")))) - '(gnus-header-subject-face ((t (:bold t :foreground "light cyan")))) - '(gnus-picons-face ((t (:background "white" :foreground "black")))) - '(gnus-picons-xbm-face ((t (:background "white" :foreground "black")))) - '(gnus-signature-face ((t (:italic t :foreground "LightBlue")))) - '(gnus-splash ((t (:foreground "Brown")))) - '(gnus-splash-face ((t (:foreground "LightBlue")))) - '(gnus-summary-cancelled-face ((t (:background "black" :foreground "gray80")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "LightBlue")))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "gray80")))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "burlywood")))) - '(gnus-summary-high-unread-face ((t (:italic t :bold t :foreground "wheat")))) - '(gnus-summary-low-ancient-face ((t (:italic t :foreground "LightBlue")))) - '(gnus-summary-low-read-face ((t (:italic t :foreground "light sea green")))) - '(gnus-summary-low-ticked-face ((t (:italic t :bold t :foreground "LightBlue")))) - '(gnus-summary-low-unread-face ((t (:italic t :foreground "light sea green")))) - '(gnus-summary-normal-ancient-face ((t (:foreground "gray80")))) - '(gnus-summary-normal-read-face ((t (:foreground "gray80")))) - '(gnus-summary-normal-ticked-face ((t (:bold t :foreground "sandy brown")))) - '(gnus-summary-normal-unread-face ((t (:bold t :foreground "wheat")))) - '(gnus-summary-selected-face ((t (:underline t)))) - '(gnus-x-face ((t (:background "white" :foreground "black")))) - '(green ((t (:foreground "green")))) - '(gui-button-face ((t (:background "DarkSalmon" :foreground "white")))) - '(gui-element ((t (:background "Gray")))) - '(header-line ((t (:background "grey20" :foreground "grey90")))) - '(highlight ((t (:background "PaleGreen" :foreground "DarkGreen")))) - '(highlight-changes-delete-face ((t (:underline t :foreground "red")))) - '(highlight-changes-face ((t (:foreground "red")))) - '(highline-face ((t (:background "SeaGreen")))) - '(holiday-face ((t (:background "DimGray")))) - '(html-helper-bold-face ((t (:foreground "DarkRed")))) - '(html-helper-italic-face ((t (:foreground "DarkBlue")))) - '(html-helper-underline-face ((t (:underline t :foreground "Black")))) - '(html-tag-face ((t (:foreground "Blue")))) - '(info-menu-5 ((t (:underline t)))) - '(info-node ((t (:underline t :italic t :bold t :foreground "light blue")))) - '(info-xref ((t (:bold t :foreground "light blue")))) - '(isearch ((t (:background "Aquamarine" :foreground "SteelBlue")))) - '(isearch-lazy-highlight-face ((t (:background "paleturquoise4")))) - '(isearch-secondary ((t (:foreground "red3")))) - '(italic ((t (:italic t)))) - '(jde-bug-breakpoint-cursor ((t (:background "brown" :foreground "cyan")))) - '(jde-bug-breakpoint-marker ((t (:background "yellow" :foreground "red")))) - '(jde-java-font-lock-api-face ((t (:foreground "LightBlue")))) - '(jde-java-font-lock-bold-face ((t (:bold t)))) - '(jde-java-font-lock-code-face ((t (nil)))) - '(jde-java-font-lock-constant-face ((t (:foreground "LightBlue")))) - '(jde-java-font-lock-doc-tag-face ((t (:foreground "LightBlue")))) - '(jde-java-font-lock-italic-face ((t (:italic t)))) - '(jde-java-font-lock-link-face ((t (:underline t :foreground "LightBlue")))) - '(jde-java-font-lock-modifier-face ((t (:foreground "LightBlue")))) - '(jde-java-font-lock-number-face ((t (:foreground "LightBlue")))) - '(jde-java-font-lock-package-face ((t (:foreground "LightBlue")))) - '(jde-java-font-lock-pre-face ((t (nil)))) - '(jde-java-font-lock-underline-face ((t (:underline t)))) - '(lazy-highlight-face ((t (:bold t :foreground "dark magenta")))) - '(left-margin ((t (nil)))) - '(linemenu-face ((t (:background "gray30")))) - '(list-mode-item-selected ((t (nil)))) - '(makefile-space-face ((t (:background "hotpink")))) - '(menu ((t (:background "wheat" :foreground "gray30")))) - '(message-cited-text-face ((t (:foreground "White")))) - '(message-header-cc-face ((t (:bold t :foreground "light cyan")))) - '(message-header-name-face ((t (:foreground "LightBlue")))) - '(message-header-newsgroups-face ((t (:italic t :bold t :foreground "LightSkyBlue3")))) - '(message-header-other-face ((t (:foreground "LightSkyBlue3")))) - '(message-header-subject-face ((t (:bold t :foreground "light cyan")))) - '(message-header-to-face ((t (:bold t :foreground "light cyan")))) - '(message-header-xheader-face ((t (:foreground "LightBlue")))) - '(message-mml-face ((t (:bold t :foreground "LightBlue")))) - '(message-separator-face ((t (:foreground "LightBlue")))) - '(mmm-default-submode-face ((t (:background "#c0c0c5")))) - '(modeline ((t (:background "#c1ccd9" :foreground "#4f657d")))) - '(modeline-buffer-id ((t (:background "#c1ccd9" :foreground "#4f657d")))) - '(modeline-mousable ((t (:background "#c1ccd9" :foreground "#4f657d")))) - '(modeline-mousable-minor-mode ((t (:background "#c1ccd9" :foreground "#4f657d")))) - - '(my-summary-highlight-face ((t (:foreground "White")))) - '(my-url-face ((t (:foreground "LightBlue")))) - '(nil ((t (nil)))) - '(paren-blink-off ((t (:foreground "gray")))) - '(paren-face-match ((t (:background "turquoise")))) - '(paren-face-mismatch ((t (:background "purple" :foreground "white")))) - '(paren-face-no-match ((t (:background "yellow" :foreground "black")))) - '(paren-match ((t (:background "darkseagreen2")))) - '(paren-mismatch ((t (:background "DeepPink" :foreground "black")))) - '(paren-mismatch-face ((t (:bold t)))) - '(paren-no-match-face ((t (:bold t)))) - '(pointer ((t (nil)))) - '(primary-selection ((t (:background "gray65")))) - '(red ((t (:foreground "red")))) - '(region ((t (:background "PaleTurquoise4" :foreground "gray80")))) - '(right-margin ((t (nil)))) - '(scroll-bar ((t (nil)))) - '(secondary-selection ((t (:background "sea green" :foreground "yellow")))) - '(semantic-dirty-token-face ((t (:background "gray10")))) - '(semantic-intangible-face ((t (:foreground "gray25")))) - '(semantic-read-only-face ((t (:background "gray25")))) - '(senator-intangible-face ((t (:foreground "gray75")))) - '(senator-momentary-highlight-face ((t (:background "gray80")))) - '(senator-read-only-face ((t (:background "#664444")))) - '(sgml-comment-face ((t (:foreground "dark turquoise")))) - '(sgml-doctype-face ((t (:foreground "red")))) - '(sgml-end-tag-face ((t (:foreground "blue")))) - '(sgml-entity-face ((t (:foreground "magenta")))) - '(sgml-ignored-face ((t (:background "gray60" :foreground "gray40")))) - '(sgml-ms-end-face ((t (:foreground "green")))) - '(sgml-ms-start-face ((t (:foreground "yellow")))) - '(sgml-pi-face ((t (:foreground "lime green")))) - '(sgml-sgml-face ((t (:foreground "brown")))) - '(sgml-short-ref-face ((t (:foreground "deep sky blue")))) - '(sgml-start-tag-face ((t (:foreground "dark green")))) - '(shell-option-face ((t (:foreground "blue")))) - '(shell-output-2-face ((t (:foreground "darkseagreen")))) - '(shell-output-3-face ((t (:foreground "slategray")))) - '(shell-output-face ((t (:foreground "palegreen")))) - '(shell-prompt-face ((t (:foreground "red")))) - '(show-paren-match-face ((t (:background "Aquamarine" :foreground "steel blue")))) - '(show-paren-mismatch-face ((t (:bold t :background "IndianRed" :foreground "White")))) - '(speedbar-button-face ((t (:bold t :foreground "LightBlue")))) - '(speedbar-directory-face ((t (:bold t :foreground "yellow")))) - '(speedbar-file-face ((t (:bold t :foreground "wheat")))) - '(speedbar-highlight-face ((t (:background "sea green")))) - '(speedbar-selected-face ((t (:underline t)))) - '(speedbar-tag-face ((t (:foreground "LightBlue")))) - '(swbuff-current-buffer-face ((t (:bold t :foreground "red")))) - '(template-message-face ((t (:bold t)))) - '(term-black ((t (:foreground "black")))) - '(term-blackbg ((t (:background "black")))) - '(term-blue ((t (:foreground "blue")))) - '(term-bluebg ((t (:background "blue")))) - '(term-bold ((t (:bold t)))) - '(term-cyan ((t (:foreground "cyan")))) - '(term-cyanbg ((t (:background "cyan")))) - '(term-default-bg ((t (nil)))) - '(term-default-bg-inv ((t (nil)))) - '(term-default-fg ((t (nil)))) - '(term-default-fg-inv ((t (nil)))) - '(term-green ((t (:foreground "green")))) - '(term-greenbg ((t (:background "green")))) - '(term-invisible ((t (nil)))) - '(term-invisible-inv ((t (nil)))) - '(term-magenta ((t (:foreground "magenta")))) - '(term-magentabg ((t (:background "magenta")))) - '(term-red ((t (:foreground "red")))) - '(term-redbg ((t (:background "red")))) - '(term-underline ((t (:underline t)))) - '(term-white ((t (:foreground "white")))) - '(term-whitebg ((t (:background "white")))) - '(term-yellow ((t (:foreground "yellow")))) - '(term-yellowbg ((t (:background "yellow")))) - '(text-cursor ((t (:background "Red3" :foreground "white")))) - '(tool-bar ((t (:background "grey75" :foreground "black")))) - '(toolbar ((t (:background "Gray")))) - '(trailing-whitespace ((t (:background "red")))) - '(underline ((t (:underline t)))) - '(variable-pitch ((t (nil)))) - '(vc-annotate-face-0046FF ((t (:background "black" :foreground "wheat")))) - '(vcursor ((t (:underline t :background "cyan" :foreground "blue")))) - '(vertical-divider ((t (:background "Gray")))) - '(vhdl-font-lock-attribute-face ((t (:foreground "Orchid")))) - '(vhdl-font-lock-directive-face ((t (:foreground "CadetBlue")))) - '(vhdl-font-lock-enumvalue-face ((t (:foreground "Gold4")))) - '(vhdl-font-lock-function-face ((t (:foreground "Orchid4")))) - '(vhdl-font-lock-prompt-face ((t (:bold t :foreground "Red")))) - '(vhdl-font-lock-reserved-words-face ((t (:bold t :foreground "Orange")))) - '(vhdl-font-lock-translate-off-face ((t (:background "LightGray")))) - '(vhdl-speedbar-architecture-face ((t (:foreground "Blue")))) - '(vhdl-speedbar-architecture-selected-face ((t (:underline t :foreground "Blue")))) - '(vhdl-speedbar-configuration-face ((t (:foreground "DarkGoldenrod")))) - '(vhdl-speedbar-configuration-selected-face ((t (:underline t :foreground "DarkGoldenrod")))) - '(vhdl-speedbar-entity-face ((t (:foreground "ForestGreen")))) - '(vhdl-speedbar-entity-selected-face ((t (:underline t :foreground "ForestGreen")))) - '(vhdl-speedbar-instantiation-face ((t (:foreground "Brown")))) - '(vhdl-speedbar-instantiation-selected-face ((t (:underline t :foreground "Brown")))) - '(vhdl-speedbar-package-face ((t (:foreground "Gray50")))) - '(vhdl-speedbar-package-selected-face ((t (:underline t :foreground "Gray50")))) - '(viper-minibuffer-emacs-face ((t (:background "darkseagreen2" :foreground "Black")))) - '(viper-minibuffer-insert-face ((t (:background "pink" :foreground "Black")))) - '(viper-minibuffer-vi-face ((t (:background "gray" :foreground "DarkGreen")))) - '(viper-replace-overlay-face ((t (:background "darkseagreen2" :foreground "Black")))) - '(viper-search-face ((t (:background "khaki" :foreground "Black")))) - '(vm-header-content-face ((t (:italic t :foreground "wheat")))) - '(vm-header-from-face ((t (:italic t :foreground "wheat")))) - '(vm-header-name-face ((t (:foreground "cyan")))) - '(vm-header-subject-face ((t (:foreground "cyan")))) - '(vm-header-to-face ((t (:italic t :foreground "cyan")))) - '(vm-message-cited-face ((t (:foreground "Gray80")))) - '(vm-summary-face-1 ((t (:foreground "MediumAquamarine")))) - '(vm-summary-face-2 ((t (:foreground "MediumAquamarine")))) - '(vm-summary-face-3 ((t (:foreground "MediumAquamarine")))) - '(vm-summary-face-4 ((t (:foreground "MediumAquamarine")))) - '(vm-summary-highlight-face ((t (:foreground "White")))) - '(vmpc-pre-sig-face ((t (:foreground "Aquamarine")))) - '(vmpc-sig-face ((t (:foreground "LightBlue")))) - '(vvb-face ((t (:background "pink" :foreground "black")))) - '(widget-button-face ((t (:bold t)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "LightBlue")))) - '(widget-field-face ((t (:foreground "LightBlue")))) - '(widget-inactive-face ((t (:foreground "Wheat3")))) - '(widget-single-line-field-face ((t (:foreground "LightBlue")))) - '(woman-bold-face ((t (:bold t)))) - '(woman-italic-face ((t (:foreground "beige")))) - '(woman-unknown-face ((t (:foreground "LightSalmon")))) - '(xref-keyword-face ((t (:foreground "blue")))) - '(xref-list-pilot-face ((t (:foreground "navy")))) - '(xref-list-symbol-face ((t (:foreground "navy")))) - '(xxml-emph-1-face ((t (:background "lightyellow")))) - '(xxml-emph-2-face ((t (:background "lightyellow")))) - '(xxml-header-1-face ((t (:background "seashell1" :foreground "MediumAquamarine")))) - '(xxml-header-2-face ((t (:background "seashell1" :foreground "SkyBlue")))) - '(xxml-header-3-face ((t (:background "seashell1")))) - '(xxml-header-4-face ((t (:background "seashell1")))) - '(xxml-interaction-face ((t (:background "lightcyan")))) - '(xxml-rug-face ((t (:background "cyan")))) - '(xxml-sparkle-face ((t (:background "yellow")))) - '(xxml-unbreakable-space-face ((t (:underline t :foreground "grey")))) - '(yellow ((t (:foreground "yellow")))) - '(zmacs-region ((t (:background "SlateGray"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'dark-blue) - -;;; dark-blue-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/dark-blue2-theme.el b/elpa/color-theme-modern-0.0.3/dark-blue2-theme.el deleted file mode 100644 index c8b7084..0000000 --- a/elpa/color-theme-modern-0.0.3/dark-blue2-theme.el +++ /dev/null @@ -1,626 +0,0 @@ -;;; dark-blue2-theme.el --- dark-blue2 theme - -;; Copyright (C) 2002 by Chris McMahan -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of dark-blue2 theme from `color-themes' - -;;; Code: - -(deftheme dark-blue2 - "dark-blue2 theme") - -(custom-theme-set-faces - 'dark-blue2 - - '(default ((t (:background "#233b5a" :foreground "#fff8dc")))) - '(mouse ((t (:background "Grey")))) - '(cursor ((t (:background "Yellow")))) - '(border ((t (:background "black")))) - - '(cperl-invalid-face ((t (:underline t)))) - '(gnus-article-button-face ((t (:bold t :foreground "cyan" :weight bold)))) - '(gnus-article-mouse-face ((t (:background "SkyBlue3")))) - '(help-highlight-face ((t (:underline t)))) - '(list-matching-lines-face ((t (:bold t :foreground "cyan" :weight bold)))) - '(view-highlight-face ((t (:background "SkyBlue3")))) - '(vm-highlight-url-face ((t (:bold t :foreground "cyan" :weight bold)))-italic) - '(vm-highlighted-header-face ((t (:bold t :foreground "cyan" :weight bold)))) - '(vm-mime-button-face ((t (:background "grey75" :foreground "gray30")))) - '(vm-summary-highlight-face ((t (:bold t :foreground "cyan" :weight bold)))) - '(widget-mouse-face ((t (:background "SkyBlue3")))) - - '(Info-title-1-face ((t (:bold t :weight bold :height 1.728 :family "helv")))) - '(Info-title-2-face ((t (:bold t :weight bold :height 1.44 :family "helv")))) - '(Info-title-3-face ((t (:bold t :weight bold :height 1.2 :family "helv")))) - '(Info-title-4-face ((t (:bold t :weight bold :family "helv")))) - '(antlr-font-lock-keyword-face ((t (:bold t :foreground "Gray85" :weight bold)))) - '(antlr-font-lock-literal-face ((t (:bold t :foreground "Gray85" :weight bold)))) - '(antlr-font-lock-ruledef-face ((t (:bold t :foreground "Gray85" :weight bold)))) - '(antlr-font-lock-ruleref-face ((t (:foreground "Gray85")))) - '(antlr-font-lock-tokendef-face ((t (:bold t :foreground "Gray85" :weight bold)))) - '(antlr-font-lock-tokenref-face ((t (:foreground "Gray85")))) - '(bbdb-company ((t (:italic t :slant italic)))) - '(bbdb-field-name ((t (:bold t :weight bold)))) - '(bbdb-field-value ((t (nil)))) - '(bbdb-name ((t (:underline t)))) - '(bg:erc-color-face0 ((t (:background "White")))) - '(bg:erc-color-face1 ((t (:background "black")))) - '(bg:erc-color-face10 ((t (:background "lightblue1")))) - '(bg:erc-color-face11 ((t (:background "cyan")))) - '(bg:erc-color-face12 ((t (:background "blue")))) - '(bg:erc-color-face13 ((t (:background "deeppink")))) - '(bg:erc-color-face14 ((t (:background "gray50")))) - '(bg:erc-color-face15 ((t (:background "gray90")))) - '(bg:erc-color-face2 ((t (:background "blue4")))) - '(bg:erc-color-face3 ((t (:background "green4")))) - '(bg:erc-color-face4 ((t (:background "red")))) - '(bg:erc-color-face5 ((t (:background "brown")))) - '(bg:erc-color-face6 ((t (:background "purple")))) - '(bg:erc-color-face7 ((t (:background "orange")))) - '(bg:erc-color-face8 ((t (:background "yellow")))) - '(bg:erc-color-face9 ((t (:background "green")))) - '(blank-space-face ((t (:background "LightGray")))) - '(blank-tab-face ((t (:background "Wheat")))) - '(blue ((t (:foreground "blue")))) - '(bold ((t (:bold t :foreground "cyan" :weight bold)))) - '(bold-italic ((t (:italic t :bold t :foreground "cyan2" :slant italic :weight bold)))) - '(border-glyph ((t (nil)))) - '(buffers-tab ((t (:background "gray30" :foreground "LightSkyBlue")))) - '(calendar-today-face ((t (:underline t)))) - '(change-log-acknowledgement-face ((t (:foreground "firebrick")))) - '(change-log-conditionals-face ((t (:background "sienna" :foreground "khaki")))) - '(change-log-date-face ((t (:foreground "gold")))) - '(change-log-email-face ((t (:foreground "khaki" :underline t)))) - '(change-log-file-face ((t (:bold t :foreground "lemon chiffon" :weight bold)))) - '(change-log-function-face ((t (:background "sienna" :foreground "khaki")))) - '(change-log-list-face ((t (:foreground "wheat")))) - '(change-log-name-face ((t (:bold t :foreground "light goldenrod" :weight bold)))) - '(comint-highlight-input ((t (:bold t :weight bold)))) - '(comint-highlight-prompt ((t (:foreground "cyan")))) - '(comint-input-face ((t (:foreground "deepskyblue")))) - '(cperl-array-face ((t (:bold t :background "lightyellow2" :foreground "Blue" :weight bold)))) - '(cperl-hash-face ((t (:italic t :bold t :background "lightyellow2" :foreground "Red" :slant italic :weight bold)))) - '(cperl-invalid-face ((t (:foreground "white")))) - '(cperl-nonoverridable-face ((t (:foreground "chartreuse3")))) - '(custom-button-face ((t (:bold t :weight bold)))) - '(custom-button-pressed-face ((t (:background "lightgrey" :foreground "gray30")))) - '(custom-changed-face ((t (:background "blue" :foreground "white")))) - '(custom-comment-face ((t (:foreground "white")))) - '(custom-comment-tag-face ((t (:foreground "white")))) - '(custom-documentation-face ((t (:foreground "light blue")))) - '(custom-face-tag-face ((t (:underline t)))) - '(custom-group-tag-face ((t (:bold t :foreground "gray85" :underline t :weight bold)))) - '(custom-group-tag-face-1 ((t (:foreground "gray85" :underline t)))) - '(custom-invalid-face ((t (:background "red" :foreground "yellow")))) - '(custom-modified-face ((t (:background "blue" :foreground "white")))) - '(custom-rogue-face ((t (:background "gray30" :foreground "pink")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:background "white" :foreground "blue")))) - '(custom-state-face ((t (:foreground "gray85")))) - '(custom-variable-button-face ((t (:bold t :underline t :weight bold)))) - '(custom-variable-tag-face ((t (:bold t :foreground "gray85" :underline t :weight bold)))) - '(cvs-filename-face ((t (:foreground "white")))) - '(cvs-handled-face ((t (:foreground "pink")))) - '(cvs-header-face ((t (:foreground "green")))) - '(cvs-marked-face ((t (:bold t :foreground "green3" :weight bold)))) - '(cvs-msg-face ((t (:foreground "gray85")))) - '(cvs-need-action-face ((t (:foreground "yellow")))) - '(cvs-unknown-face ((t (:foreground "grey")))) - '(cyan ((t (:foreground "cyan")))) - '(diary-face ((t (:bold t :foreground "gray85" :weight bold)))) - '(diff-added-face ((t (nil)))) - '(diff-changed-face ((t (nil)))) - '(diff-context-face ((t (:foreground "grey50")))) - '(diff-file-header-face ((t (:bold t :background "grey70" :weight bold)))) - '(diff-function-face ((t (:foreground "grey50")))) - '(diff-header-face ((t (:foreground "lemon chiffon")))) - '(diff-hunk-header-face ((t (:background "grey85")))) - '(diff-index-face ((t (:bold t :background "grey70" :weight bold)))) - '(diff-nonexistent-face ((t (:bold t :background "grey70" :weight bold)))) - '(diff-removed-face ((t (nil)))) - '(dired-face-boring ((t (:foreground "Gray65")))) - '(dired-face-directory ((t (:bold t :weight bold)))) - '(dired-face-executable ((t (:foreground "gray85")))) - '(dired-face-flagged ((t (:background "LightSlateGray")))) - '(dired-face-header ((t (:background "grey75" :foreground "gray30")))) - '(dired-face-marked ((t (:background "PaleVioletRed")))) - '(dired-face-permissions ((t (:background "grey75" :foreground "gray30")))) - '(dired-face-setuid ((t (:foreground "gray85")))) - '(dired-face-socket ((t (:foreground "gray85")))) - '(dired-face-symlink ((t (:foreground "cyan")))) - '(display-time-mail-balloon-enhance-face ((t (:background "orange")))) - '(display-time-mail-balloon-gnus-group-face ((t (:foreground "blue")))) - '(display-time-time-balloon-face ((t (:foreground "gray85")))) - '(ebrowse-default-face ((t (nil)))) - '(ebrowse-file-name-face ((t (:italic t :slant italic)))) - '(ebrowse-member-attribute-face ((t (:foreground "red")))) - '(ebrowse-member-class-face ((t (:foreground "Gray85")))) - '(ebrowse-progress-face ((t (:background "blue")))) - '(ebrowse-root-class-face ((t (:bold t :foreground "Gray85" :weight bold)))) - '(ebrowse-tree-mark-face ((t (:foreground "Gray85")))) - '(ecb-bucket-token-face ((t (:bold t :weight bold)))) - '(ecb-default-general-face ((t (:height 1.0)))) - '(ecb-default-highlight-face ((t (:background "magenta" :height 1.0)))) - '(ecb-directories-general-face ((t (:height 0.9)))) - '(ecb-directory-face ((t (:background "Cyan4")))) - '(ecb-history-face ((t (:background "Cyan4")))) - '(ecb-history-general-face ((t (:height 0.9)))) - '(ecb-method-face ((t (:background "Cyan4" :slant normal :weight normal)))) - '(ecb-methods-general-face ((t (:slant normal)))) - '(ecb-source-face ((t (:background "Cyan4")))) - '(ecb-source-in-directories-buffer-face ((t (:foreground "LightBlue1" :background "Cyan4")))) - '(ecb-sources-face ((t (:foreground "LightBlue1")))) - '(ecb-sources-general-face ((t (:height 0.9)))) - '(ecb-token-header-face ((t (:background "Steelblue4")))) - '(ecb-type-token-class-face ((t (:bold t :weight bold)))) - '(ecb-type-token-enum-face ((t (:bold t :weight bold)))) - '(ecb-type-token-group-face ((t (:bold t :foreground "dim gray" :weight bold)))) - '(ecb-type-token-interface-face ((t (:bold t :weight bold)))) - '(ecb-type-token-struct-face ((t (:bold t :weight bold)))) - '(ecb-type-token-typedef-face ((t (:bold t :weight bold)))) - '(ediff-current-diff-face-A ((t (:background "pale green" :foreground "firebrick")))) - '(ediff-current-diff-face-Ancestor ((t (:background "VioletRed" :foreground "Gray30")))) - '(ediff-current-diff-face-B ((t (:background "Yellow" :foreground "DarkOrchid")))) - '(ediff-current-diff-face-C ((t (:background "Pink" :foreground "Navy")))) - '(ediff-even-diff-face-A ((t (:background "light grey" :foreground "Gray30")))) - '(ediff-even-diff-face-Ancestor ((t (:background "Grey" :foreground "White")))) - '(ediff-even-diff-face-B ((t (:background "Grey" :foreground "White")))) - '(ediff-even-diff-face-C ((t (:background "light grey" :foreground "Gray30")))) - '(ediff-fine-diff-face-A ((t (:background "sky blue" :foreground "Navy")))) - '(ediff-fine-diff-face-Ancestor ((t (:background "Green" :foreground "Gray30")))) - '(ediff-fine-diff-face-B ((t (:background "cyan" :foreground "Gray30")))) - '(ediff-fine-diff-face-C ((t (:background "Turquoise" :foreground "Gray30")))) - '(ediff-odd-diff-face-A ((t (:background "Grey" :foreground "White")))) - '(ediff-odd-diff-face-Ancestor ((t (:background "light grey" :foreground "Gray30")))) - '(ediff-odd-diff-face-B ((t (:background "light grey" :foreground "Gray30")))) - '(ediff-odd-diff-face-C ((t (:background "Grey" :foreground "White")))) - '(erc-action-face ((t (:bold t :weight bold)))) - '(erc-bold-face ((t (:bold t :weight bold)))) - '(erc-dangerous-host-face ((t (:foreground "red")))) - '(erc-default-face ((t (nil)))) - '(erc-direct-msg-face ((t (:foreground "pale green")))) - '(erc-error-face ((t (:bold t :foreground "gray85" :weight bold)))) - '(erc-fool-face ((t (:foreground "Gray85")))) - '(erc-highlight-face ((t (:bold t :foreground "pale green" :weight bold)))) - '(erc-input-face ((t (:foreground "light blue")))) - '(erc-inverse-face ((t (:background "Black" :foreground "White")))) - '(erc-keyword-face ((t (:bold t :foreground "pale green" :weight bold)))) - '(erc-notice-face ((t (:foreground "light salmon")))) - '(erc-pal-face ((t (:foreground "pale green")))) - '(erc-prompt-face ((t (:bold t :foreground "light blue" :weight bold)))) - '(erc-timestamp-face ((t (:bold t :foreground "green" :weight bold)))) - '(erc-underline-face ((t (:underline t)))) - '(eshell-ls-archive-face ((t (:bold t :weight bold)))) - '(eshell-ls-backup-face ((t (:foreground "gray85")))) - '(eshell-ls-clutter-face ((t (:bold t :foreground "gray85" :weight bold)))) - '(eshell-ls-directory-face ((t (:bold t :foreground "Cyan" :weight bold)))) - '(eshell-ls-executable-face ((t (:bold t :weight bold)))) - '(eshell-ls-missing-face ((t (:bold t :weight bold)))) - '(eshell-ls-picture-face ((t (:foreground "gray85")))) - '(eshell-ls-product-face ((t (:foreground "gray85")))) - '(eshell-ls-readonly-face ((t (:foreground "gray70")))) - '(eshell-ls-special-face ((t (:bold t :weight bold)))) - '(eshell-ls-symlink-face ((t (:bold t :weight bold)))) - '(eshell-ls-text-face ((t (:foreground "gray85")))) - '(eshell-ls-todo-face ((t (:bold t :weight bold)))) - '(eshell-ls-unreadable-face ((t (:foreground "gray85")))) - '(eshell-prompt-face ((t (:bold t :foreground "Yellow" :weight bold)))) - '(eshell-test-failed-face ((t (:bold t :weight bold)))) - '(eshell-test-ok-face ((t (:bold t :weight bold)))) - '(excerpt ((t (:italic t :slant italic)))) - '(ff-paths-non-existant-file-face ((t (:bold t :foreground "gray85" :weight bold)))) - '(fg:black ((t (:foreground "black")))) - '(fg:erc-color-face0 ((t (:foreground "White")))) - '(fg:erc-color-face1 ((t (:foreground "black")))) - '(fg:erc-color-face10 ((t (:foreground "lightblue1")))) - '(fg:erc-color-face11 ((t (:foreground "cyan")))) - '(fg:erc-color-face12 ((t (:foreground "blue")))) - '(fg:erc-color-face13 ((t (:foreground "deeppink")))) - '(fg:erc-color-face14 ((t (:foreground "gray50")))) - '(fg:erc-color-face15 ((t (:foreground "gray90")))) - '(fg:erc-color-face2 ((t (:foreground "blue4")))) - '(fg:erc-color-face3 ((t (:foreground "green4")))) - '(fg:erc-color-face4 ((t (:foreground "red")))) - '(fg:erc-color-face5 ((t (:foreground "brown")))) - '(fg:erc-color-face6 ((t (:foreground "purple")))) - '(fg:erc-color-face7 ((t (:foreground "orange")))) - '(fg:erc-color-face8 ((t (:foreground "yellow")))) - '(fg:erc-color-face9 ((t (:foreground "green")))) - '(fixed ((t (:bold t :weight bold)))) - '(fixed-pitch ((t (:family "outline-lucida console")))) - '(fl-comment-face ((t (:foreground "gray85")))) - '(fl-function-name-face ((t (:foreground "green")))) - '(fl-keyword-face ((t (:foreground "LightGreen")))) - '(fl-string-face ((t (:foreground "light coral")))) - '(fl-type-face ((t (:foreground "cyan")))) - '(flyspell-duplicate-face ((t (:bold t :foreground "Gold3" :underline t :weight bold)))) - '(flyspell-incorrect-face ((t (:bold t :foreground "OrangeRed" :underline t :weight bold)))) - '(font-latex-bold-face ((t (nil)))) - '(font-latex-italic-face ((t (nil)))) - '(font-latex-math-face ((t (nil)))) - '(font-latex-sedate-face ((t (:foreground "Gray85")))) - '(font-latex-string-face ((t (:foreground "orange")))) - '(font-latex-warning-face ((t (:foreground "gold")))) - '(font-lock-builtin-face ((t (:bold t :foreground "LightSteelBlue" :weight bold)))) - '(font-lock-comment-face ((t (:italic t :foreground "medium aquamarine" :slant italic)))) - '(font-lock-constant-face ((t (:bold t :foreground "Aquamarine" :weight bold)))) - '(font-lock-doc-face ((t (:bold t :weight bold)))) - '(font-lock-doc-string-face ((t (:bold t :foreground "aquamarine" :weight bold)))) - '(font-lock-exit-face ((t (:foreground "green")))) - '(font-lock-function-name-face ((t (:italic t :bold t :foreground "LightSkyBlue" :slant italic :weight bold)))) - '(font-lock-keyword-face ((t (:bold t :foreground "Cyan" :weight bold)))) - '(font-lock-preprocessor-face ((t (:foreground "Gray85")))) - '(font-lock-reference-face ((t (:foreground "cyan")))) - '(font-lock-string-face ((t (:italic t :foreground "aquamarine" :slant italic)))) - '(font-lock-type-face ((t (:bold t :foreground "PaleGreen" :weight bold)))) - '(font-lock-variable-name-face ((t (:italic t :bold t :foreground "LightGoldenrod" :slant italic :weight bold)))) - '(font-lock-warning-face ((t (:bold t :foreground "Salmon" :weight bold)))) - '(fringe ((t (:background "#3c5473")))) - '(gnus-cite-attribution-face ((t (:italic t :bold t :foreground "beige" :underline t :slant italic :weight bold)))) - '(gnus-cite-face-1 ((t (:foreground "gold")))) - '(gnus-cite-face-10 ((t (:foreground "coral")))) - '(gnus-cite-face-11 ((t (:foreground "turquoise")))) - '(gnus-cite-face-2 ((t (:foreground "wheat")))) - '(gnus-cite-face-3 ((t (:foreground "light pink")))) - '(gnus-cite-face-4 ((t (:foreground "khaki")))) - '(gnus-cite-face-5 ((t (:foreground "pale green")))) - '(gnus-cite-face-6 ((t (:foreground "beige")))) - '(gnus-cite-face-7 ((t (:foreground "orange")))) - '(gnus-cite-face-8 ((t (:foreground "magenta")))) - '(gnus-cite-face-9 ((t (:foreground "violet")))) - '(gnus-emphasis-bold ((t (:bold t :foreground "light gray" :weight bold)))) - '(gnus-emphasis-bold-italic ((t (:italic t :bold t :foreground "cyan" :slant italic :weight bold)))) - '(gnus-emphasis-highlight-words ((t (:background "gray30" :foreground "gold")))) - '(gnus-emphasis-italic ((t (:italic t :foreground "cyan" :slant italic)))) - '(gnus-emphasis-underline ((t (:foreground "white" :underline t)))) - '(gnus-emphasis-underline-bold ((t (:bold t :foreground "white" :underline t :weight bold)))) - '(gnus-emphasis-underline-bold-italic ((t (:italic t :bold t :foreground "white" :underline t :slant italic :weight bold)))) - '(gnus-emphasis-underline-italic ((t (:italic t :foreground "white" :underline t :slant italic)))) - '(gnus-filterhist-face-1 ((t (nil)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "Magenta")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "Magenta" :weight bold)))) - '(gnus-group-mail-2-empty-face ((t (:foreground "aquamarine2")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "aquamarine2" :weight bold)))) - '(gnus-group-mail-3-empty-face ((t (:foreground "Cyan")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "Cyan" :weight bold)))) - '(gnus-group-mail-low-empty-face ((t (:foreground "Wheat")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "Gray85" :weight bold)))) - '(gnus-group-news-1-empty-face ((t (:foreground "PaleTurquoise")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "PaleTurquoise" :weight bold)))) - '(gnus-group-news-2-empty-face ((t (:foreground "turquoise")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "turquoise" :weight bold)))) - '(gnus-group-news-3-empty-face ((t (:foreground "wheat")))) - '(gnus-group-news-3-face ((t (:bold t :foreground "Wheat" :weight bold)))) - '(gnus-group-news-4-empty-face ((t (:foreground "Aquamarine")))) - '(gnus-group-news-4-face ((t (:bold t :weight bold)))) - '(gnus-group-news-5-empty-face ((t (:foreground "MediumAquamarine")))) - '(gnus-group-news-5-face ((t (:bold t :weight bold)))) - '(gnus-group-news-6-empty-face ((t (:foreground "MediumAquamarine")))) - '(gnus-group-news-6-face ((t (:bold t :weight bold)))) - '(gnus-group-news-low-empty-face ((t (:foreground "MediumAquamarine")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "MediumAquamarine" :weight bold)))) - '(gnus-header-content-face ((t (:italic t :foreground "Wheat" :slant italic)))) - '(gnus-header-from-face ((t (:bold t :foreground "light yellow" :weight bold)))) - '(gnus-header-name-face ((t (:bold t :foreground "Wheat" :weight bold)))) - '(gnus-header-newsgroups-face ((t (:italic t :bold t :foreground "gold" :slant italic :weight bold)))) - '(gnus-header-subject-face ((t (:bold t :foreground "Gold" :weight bold)))) - '(gnus-picons-face ((t (:background "white" :foreground "gray30")))) - '(gnus-picons-xbm-face ((t (:background "white" :foreground "gray30")))) - '(gnus-signature-face ((t (:italic t :foreground "white" :slant italic)))) - '(gnus-splash ((t (:foreground "Brown")))) - '(gnus-splash-face ((t (:foreground "orange")))) - '(gnus-summary-cancelled-face ((t (:background "gray30" :foreground "orange")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "SkyBlue" :weight bold)))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "gray85" :weight bold)))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "coral" :weight bold)))) - '(gnus-summary-high-unread-face ((t (:italic t :bold t :foreground "gold" :slant italic :weight bold)))) - '(gnus-summary-low-ancient-face ((t (:italic t :foreground "SkyBlue" :slant italic)))) - '(gnus-summary-low-read-face ((t (:italic t :foreground "gray85" :slant italic)))) - '(gnus-summary-low-ticked-face ((t (:italic t :bold t :foreground "coral" :slant italic :weight bold)))) - '(gnus-summary-low-unread-face ((t (:italic t :foreground "white" :slant italic)))) - '(gnus-summary-normal-ancient-face ((t (:foreground "SkyBlue")))) - '(gnus-summary-normal-read-face ((t (:foreground "gray70")))) - '(gnus-summary-normal-ticked-face ((t (:bold t :foreground "pink" :weight bold)))) - '(gnus-summary-normal-unread-face ((t (:bold t :foreground "gray85" :weight bold)))) - '(gnus-summary-selected-face ((t (:foreground "white" :underline t)))) - '(gnus-x-face ((t (:background "white" :foreground "gray30")))) - '(green ((t (:foreground "green")))) - '(gui-button-face ((t (:background "grey75" :foreground "gray30")))) - '(gui-element ((t (:background "Gray80")))) - '(header-line ((t (:background "grey20" :foreground "grey90")))) - '(hi-black-b ((t (:bold t :weight bold)))) - '(hi-black-hb ((t (:bold t :weight bold :height 1.67 :family "helv")))) - '(hi-blue ((t (:background "light blue")))) - '(hi-blue-b ((t (:bold t :foreground "blue" :weight bold)))) - '(hi-green ((t (:background "green")))) - '(hi-green-b ((t (:bold t :foreground "green" :weight bold)))) - '(hi-pink ((t (:background "pink")))) - '(hi-red-b ((t (:bold t :foreground "red" :weight bold)))) - '(hi-yellow ((t (:background "yellow")))) - '(highlight ((t (:background "SkyBlue3")))) - '(highlight-changes-delete-face ((t (:foreground "gray85" :underline t)))) - '(highlight-changes-face ((t (:foreground "gray85")))) - '(highline-face ((t (:background "#3c5473")))) - '(highline-vertical-face ((t (:background "lightcyan")))) - '(holiday-face ((t (:background "pink" :foreground "gray30")))) - '(html-helper-bold-face ((t (:bold t :weight bold)))) - '(html-helper-bold-italic-face ((t (nil)))) - '(html-helper-builtin-face ((t (:foreground "gray85" :underline t)))) - '(html-helper-italic-face ((t (:bold t :foreground "yellow" :weight bold)))) - '(html-helper-underline-face ((t (:underline t)))) - '(html-tag-face ((t (:bold t :weight bold)))) - '(hyper-apropos-documentation ((t (:foreground "white")))) - '(hyper-apropos-heading ((t (:bold t :weight bold)))) - '(hyper-apropos-hyperlink ((t (:foreground "sky blue")))) - '(hyper-apropos-major-heading ((t (:bold t :weight bold)))) - '(hyper-apropos-section-heading ((t (:bold t :weight bold)))) - '(hyper-apropos-warning ((t (:bold t :foreground "gray85" :weight bold)))) - '(ibuffer-marked-face ((t (:foreground "gray85")))) - '(idlwave-help-link-face ((t (:foreground "Blue")))) - '(idlwave-shell-bp-face ((t (:background "Pink" :foreground "Black")))) - '(info-header-node ((t (:italic t :bold t :foreground "brown" :slant italic :weight bold)))) - '(info-header-xref ((t (:bold t :foreground "magenta4" :weight bold)))) - '(info-menu-5 ((t (:underline t)))) - '(info-menu-6 ((t (nil)))) - '(info-menu-header ((t (:bold t :weight bold :family "helv")))) - '(info-node ((t (:italic t :bold t :slant italic :weight bold)))) - '(info-xref ((t (:bold t :weight bold)))) - '(isearch ((t (:background "LightSeaGreen")))) - '(isearch-lazy-highlight-face ((t (:background "cyan4")))) - '(isearch-secondary ((t (:foreground "red3")))) - '(italic ((t (:italic t :bold t :slant italic :weight bold)))) - '(jde-bug-breakpoint-cursor ((t (:background "brown" :foreground "cyan")))) - '(jde-bug-breakpoint-marker ((t (:background "yellow" :foreground "red")))) - '(jde-java-font-lock-api-face ((t (:foreground "LightBlue")))) - '(jde-java-font-lock-bold-face ((t (:bold t :weight bold)))) - '(jde-java-font-lock-code-face ((t (nil)))) - '(jde-java-font-lock-constant-face ((t (:foreground "LightBlue")))) - '(jde-java-font-lock-doc-tag-face ((t (:foreground "LightBlue")))) - '(jde-java-font-lock-italic-face ((t (:italic t :slant italic)))) - '(jde-java-font-lock-link-face ((t (:foreground "cyan3" :underline t)))) - '(jde-java-font-lock-modifier-face ((t (:foreground "LightBlue")))) - '(jde-java-font-lock-number-face ((t (:foreground "RosyBrown")))) - '(jde-java-font-lock-operator-face ((t (:foreground "cyan3")))) - '(jde-java-font-lock-package-face ((t (:foreground "LightBlue")))) - '(jde-java-font-lock-pre-face ((t (nil)))) - '(jde-java-font-lock-underline-face ((t (:underline t)))) - '(lazy-highlight-face ((t (:bold t :foreground "yellow" :weight bold)))) - '(left-margin ((t (nil)))) - '(linemenu-face ((t (:background "gray30")))) - '(list-mode-item-selected ((t (:background "gray68")))) - '(log-view-file-face ((t (:bold t :background "grey70" :weight bold)))) - '(log-view-message-face ((t (:background "grey85")))) - '(magenta ((t (:foreground "gray85")))) - '(makefile-space-face ((t (:background "hotpink" :foreground "white")))) - '(man-bold ((t (:bold t :weight bold)))) - '(man-heading ((t (:bold t :weight bold)))) - '(man-italic ((t (:foreground "yellow")))) - '(man-xref ((t (:underline t)))) - '(menu ((t (:background "wheat" :foreground "gray30")))) - '(message-cited-text ((t (:foreground "orange")))) - '(message-cited-text-face ((t (:foreground "medium aquamarine")))) - '(message-header-cc-face ((t (:bold t :foreground "gray85" :weight bold)))) - '(message-header-contents ((t (:foreground "white")))) - '(message-header-name-face ((t (:foreground "gray85")))) - '(message-header-newsgroups-face ((t (:italic t :bold t :foreground "yellow" :slant italic :weight bold)))) - '(message-header-other-face ((t (:foreground "gray85")))) - '(message-header-subject-face ((t (:bold t :foreground "green3" :weight bold)))) - '(message-header-to-face ((t (:bold t :foreground "green2" :weight bold)))) - '(message-header-xheader-face ((t (:foreground "blue")))) - '(message-headers ((t (:bold t :foreground "orange" :weight bold)))) - '(message-highlighted-header-contents ((t (:bold t :weight bold)))) - '(message-mml-face ((t (:bold t :foreground "gray85" :weight bold)))) - '(message-separator-face ((t (:foreground "gray85")))) - '(message-url ((t (:bold t :foreground "pink" :weight bold)))) - '(mmm-default-submode-face ((t (:background "#c0c0c5")))) - '(mmm-face ((t (:background "black" :foreground "green")))) - '(modeline ((t (:background "#3c5473" :foreground "lightgray" :box (:line-width -1 :style released-button :family "helv"))))) - '(modeline-buffer-id ((t (:background "white" :foreground "DeepSkyBlue3" :slant normal :weight normal :width normal :family "outline-verdana")))) - '(modeline-mousable ((t (:background "white" :foreground "DeepSkyBlue3")))) - '(modeline-mousable-minor-mode ((t (:background "white" :foreground "DeepSkyBlue3")))) - '(my-summary-highlight-face ((t (:background "PaleTurquoise4" :foreground "White")))) - '(my-url-face ((t (:foreground "LightBlue")))) - '(nil ((t (nil)))) - '(paren-blink-off ((t (:foreground "gray80")))) - '(paren-face-match ((t (:background "turquoise")))) - '(paren-face-mismatch ((t (:background "purple" :foreground "white")))) - '(paren-face-no-match ((t (:background "yellow" :foreground "gray30")))) - '(paren-match ((t (:background "darkseagreen2")))) - '(paren-mismatch ((t (:background "RosyBrown" :foreground "gray30")))) - '(paren-mismatch-face ((t (:bold t :background "white" :foreground "red" :weight bold)))) - '(paren-no-match-face ((t (:bold t :background "white" :foreground "red" :weight bold)))) - '(pointer ((t (nil)))) - '(primary-selection ((t (:background "gray40")))) - '(reb-match-0 ((t (:background "lightblue")))) - '(reb-match-1 ((t (:background "aquamarine")))) - '(reb-match-2 ((t (:background "springgreen")))) - '(reb-match-3 ((t (:background "yellow")))) - '(red ((t (:foreground "red")))) - '(region ((t (:background "Cyan4")))) - '(right-margin ((t (nil)))) - '(scroll-bar ((t (:background "grey75")))) - '(secondary-selection ((t (:background "gray60")))) - '(semantic-dirty-token-face ((t (:background "gray10")))) - '(semantic-intangible-face ((t (:foreground "gray25")))) - '(semantic-read-only-face ((t (:background "gray25")))) - '(semantic-unmatched-syntax-face ((t (:underline "red")))) - '(senator-intangible-face ((t (:foreground "gray75")))) - '(senator-momentary-highlight-face ((t (:background "gray70")))) - '(senator-read-only-face ((t (:background "#664444")))) - '(sgml-comment-face ((t (:foreground "dark turquoise")))) - '(sgml-doctype-face ((t (:foreground "turquoise")))) - '(sgml-end-tag-face ((t (:foreground "aquamarine")))) - '(sgml-entity-face ((t (:foreground "gray85")))) - '(sgml-ignored-face ((t (:background "gray60" :foreground "gray40")))) - '(sgml-ms-end-face ((t (:foreground "green")))) - '(sgml-ms-start-face ((t (:foreground "yellow")))) - '(sgml-pi-face ((t (:foreground "lime green")))) - '(sgml-sgml-face ((t (:foreground "brown")))) - '(sgml-short-ref-face ((t (:foreground "deep sky blue")))) - '(sgml-start-tag-face ((t (:foreground "aquamarine")))) - '(sh-heredoc-face ((t (:foreground "tan")))) - '(shell-option-face ((t (:foreground "gray85")))) - '(shell-output-2-face ((t (:foreground "gray85")))) - '(shell-output-3-face ((t (:foreground "gray85")))) - '(shell-output-face ((t (:bold t :weight bold)))) - '(shell-prompt-face ((t (:foreground "yellow")))) - '(show-paren-match-face ((t (:bold t :background "turquoise" :weight bold)))) - '(show-paren-mismatch-face ((t (:bold t :background "RosyBrown" :foreground "white" :weight bold)))) - '(show-tabs-space-face ((t (:foreground "yellow")))) - '(show-tabs-tab-face ((t (:foreground "red")))) - '(smerge-base-face ((t (:foreground "red")))) - '(smerge-markers-face ((t (:background "grey85")))) - '(smerge-mine-face ((t (:foreground "Gray85")))) - '(smerge-other-face ((t (:foreground "darkgreen")))) - '(speedbar-button-face ((t (:bold t :weight bold)))) - '(speedbar-directory-face ((t (:bold t :weight bold)))) - '(speedbar-file-face ((t (:bold t :weight bold)))) - '(speedbar-highlight-face ((t (:background "sea green")))) - '(speedbar-selected-face ((t (:underline t)))) - '(speedbar-tag-face ((t (:foreground "yellow")))) - '(strokes-char-face ((t (:background "lightgray")))) - '(swbuff-current-buffer-face ((t (:bold t :foreground "gray85" :weight bold)))) - '(template-message-face ((t (:bold t :weight bold)))) - '(term-black ((t (:foreground "black")))) - '(term-blackbg ((t (:background "black")))) - '(term-blue ((t (:foreground "blue")))) - '(term-bluebg ((t (:background "blue")))) - '(term-bold ((t (:bold t :weight bold)))) - '(term-cyan ((t (:foreground "cyan")))) - '(term-cyanbg ((t (:background "cyan")))) - '(term-default ((t (:background "gray80" :foreground "gray30" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :width normal :family "outline-lucida console")))) - '(term-default-bg ((t (nil)))) - '(term-default-bg-inv ((t (nil)))) - '(term-default-fg ((t (nil)))) - '(term-default-fg-inv ((t (nil)))) - '(term-green ((t (:foreground "green")))) - '(term-greenbg ((t (:background "green")))) - '(term-invisible ((t (nil)))) - '(term-invisible-inv ((t (nil)))) - '(term-magenta ((t (:foreground "magenta")))) - '(term-magentabg ((t (:background "magenta")))) - '(term-red ((t (:foreground "red")))) - '(term-redbg ((t (:background "red")))) - '(term-underline ((t (:underline t)))) - '(term-white ((t (:foreground "white")))) - '(term-whitebg ((t (:background "white")))) - '(term-yellow ((t (:foreground "yellow")))) - '(term-yellowbg ((t (:background "yellow")))) - '(tex-math-face ((t (:foreground "RosyBrown")))) - '(texinfo-heading-face ((t (:foreground "Blue")))) - '(text-cursor ((t (:background "Red3" :foreground "gray80")))) - '(tool-bar ((t (:background "grey75" :foreground "black")))) - '(toolbar ((t (:background "Gray80")))) - '(tooltip ((t (:background "lightyellow" :foreground "black")))) - '(trailing-whitespace ((t (:background "red")))) - '(underline ((t (:underline t)))) - '(variable-pitch ((t (:family "helv")))) - '(vc-annotate-face-0046FF ((t (:background "black" :foreground "wheat")))) - '(vcursor ((t (:background "cyan" :foreground "blue" :underline t)))) - '(vertical-divider ((t (:background "Gray80")))) - '(vhdl-font-lock-attribute-face ((t (:foreground "gray85")))) - '(vhdl-font-lock-directive-face ((t (:foreground "gray85")))) - '(vhdl-font-lock-enumvalue-face ((t (:foreground "gray85")))) - '(vhdl-font-lock-function-face ((t (:foreground "gray85")))) - '(vhdl-font-lock-prompt-face ((t (:bold t :foreground "gray85" :weight bold)))) - '(vhdl-font-lock-reserved-words-face ((t (:bold t :foreground "gray85" :weight bold)))) - '(vhdl-font-lock-translate-off-face ((t (:background "LightGray")))) - '(vhdl-speedbar-architecture-face ((t (:foreground "gray85")))) - '(vhdl-speedbar-architecture-selected-face ((t (:foreground "gray85" :underline t)))) - '(vhdl-speedbar-configuration-face ((t (:foreground "gray85")))) - '(vhdl-speedbar-configuration-selected-face ((t (:foreground "gray85" :underline t)))) - '(vhdl-speedbar-entity-face ((t (:foreground "gray85")))) - '(vhdl-speedbar-entity-selected-face ((t (:foreground "gray85" :underline t)))) - '(vhdl-speedbar-instantiation-face ((t (:foreground "gray85")))) - '(vhdl-speedbar-instantiation-selected-face ((t (:foreground "gray85" :underline t)))) - '(vhdl-speedbar-package-face ((t (:foreground "gray85")))) - '(vhdl-speedbar-package-selected-face ((t (:foreground "gray85" :underline t)))) - '(viper-minibuffer-emacs-face ((t (:background "darkseagreen2" :foreground "Black")))) - '(viper-minibuffer-insert-face ((t (:background "pink" :foreground "Black")))) - '(viper-minibuffer-vi-face ((t (:background "grey" :foreground "DarkGreen")))) - '(viper-replace-overlay-face ((t (:background "darkseagreen2" :foreground "Black")))) - '(viper-search-face ((t (:background "khaki" :foreground "Black")))) - '(vm-header-content-face ((t (:italic t :foreground "wheat" :slant italic)))) - '(vm-header-from-face ((t (:italic t :foreground "wheat" :slant italic)))) - '(vm-header-name-face ((t (:foreground "cyan")))) - '(vm-header-subject-face ((t (:foreground "cyan")))) - '(vm-header-to-face ((t (:italic t :foreground "cyan" :slant italic)))) - '(vm-message-cited-face ((t (:foreground "Gray80")))) - '(vm-monochrome-image ((t (:background "white" :foreground "gray30")))) - '(vm-summary-face-1 ((t (:foreground "MediumAquamarine")))) - '(vm-summary-face-2 ((t (:foreground "MediumAquamarine")))) - '(vm-summary-face-3 ((t (:foreground "MediumAquamarine")))) - '(vm-summary-face-4 ((t (:foreground "MediumAquamarine")))) - '(vm-summary-highlight-face ((t (:foreground "White")))) - '(vm-xface ((t (:background "white" :foreground "gray30")))) - '(vmpc-pre-sig-face ((t (:foreground "gray85")))) - '(vmpc-sig-face ((t (:foreground "gray85")))) - '(vvb-face ((t (:background "pink" :foreground "gray30")))) - '(w3m-anchor-face ((t (:bold t :foreground "gray85" :weight bold)))) - '(w3m-arrived-anchor-face ((t (:bold t :foreground "gray85" :weight bold)))) - '(w3m-header-line-location-content-face ((t (:background "dark olive green" :foreground "wheat")))) - '(w3m-header-line-location-title-face ((t (:background "dark olive green" :foreground "beige")))) - '(white ((t (:foreground "white")))) - '(widget ((t (nil)))) - '(widget-button-face ((t (:bold t :weight bold)))) - '(widget-button-pressed-face ((t (:foreground "gray85")))) - '(widget-documentation-face ((t (:foreground "dark green")))) - '(widget-field-face ((t (:background "gray85" :foreground "gray30")))) - '(widget-inactive-face ((t (:foreground "dim gray")))) - '(widget-single-line-field-face ((t (:background "dim gray" :foreground "white")))) - '(woman-addition-face ((t (:foreground "orange")))) - '(woman-bold-face ((t (:bold t :weight bold)))) - '(woman-italic-face ((t (:foreground "beige")))) - '(woman-unknown-face ((t (:foreground "LightSalmon")))) - '(x-face ((t (:background "white" :foreground "gray30")))) - '(xrdb-option-name-face ((t (:foreground "gray85")))) - '(xref-keyword-face ((t (:foreground "gray85")))) - '(xref-list-default-face ((t (nil)))) - '(xref-list-pilot-face ((t (:foreground "gray85")))) - '(xref-list-symbol-face ((t (:foreground "navy")))) - '(xsl-fo-alternate-face ((t (:foreground "Yellow")))) - '(xsl-fo-main-face ((t (:foreground "PaleGreen")))) - '(xsl-other-element-face ((t (:foreground "Coral")))) - '(xsl-xslt-alternate-face ((t (:foreground "LightGray")))) - '(xsl-xslt-main-face ((t (:foreground "Wheat")))) - '(xxml-emph-1-face ((t (:background "lightyellow")))) - '(xxml-emph-2-face ((t (:background "lightyellow")))) - '(xxml-header-1-face ((t (:background "seashell1" :foreground "MediumAquamarine")))) - '(xxml-header-2-face ((t (:background "seashell1" :foreground "SkyBlue")))) - '(xxml-header-3-face ((t (:background "seashell1")))) - '(xxml-header-4-face ((t (:background "seashell1")))) - '(xxml-interaction-face ((t (:background "lightcyan")))) - '(xxml-rug-face ((t (:background "cyan")))) - '(xxml-sparkle-face ((t (:background "yellow")))) - '(xxml-unbreakable-space-face ((t (:foreground "grey" :underline t)))) - '(yellow ((t (:foreground "yellow")))) - '(zmacs-region ((t (:background "Cyan4"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'dark-blue2) - -;;; dark-blue2-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/dark-erc-theme.el b/elpa/color-theme-modern-0.0.3/dark-erc-theme.el deleted file mode 100644 index 255af66..0000000 --- a/elpa/color-theme-modern-0.0.3/dark-erc-theme.el +++ /dev/null @@ -1,91 +0,0 @@ -;;; dark-erc-theme.el --- dark-erc theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of dark-erc theme from `color-themes' - -;;; Code: - -(deftheme dark-erc - "dark-erc theme") - -(custom-theme-set-faces - 'dark-erc - - '(erc-action-face ((t (nil)))) - '(erc-bold-face ((t (:bold t)))) - '(erc-current-nick-face ((t (:bold t)))) - '(erc-default-face ((t (nil)))) - '(erc-direct-msg-face ((t (nil)))) - '(erc-error-face ((t (:bold t :foreground "IndianRed")))) - '(erc-highlight-face ((t (:bold t :foreground "pale green")))) - '(erc-input-face ((t (:foreground "#555")))) - '(erc-inverse-face ((t (:background "steel blue")))) - '(erc-keyword-face ((t (:foreground "#999" :bold t)))) - '(erc-nick-msg-face ((t (:foreground "#888")))) - '(erc-notice-face ((t (:foreground "#444")))) - '(erc-pal-face ((t (:foreground "#888")))) - '(erc-prompt-face ((t (:foreground "#777" :bold t)))) - '(erc-timestamp-face ((t (:foreground "#777" :bold t)))) - '(fg:erc-color-face0 ((t (:foreground "white")))) - '(fg:erc-color-face1 ((t (:foreground "beige")))) - '(fg:erc-color-face2 ((t (:foreground "lemon chiffon")))) - '(fg:erc-color-face3 ((t (:foreground "light cyan")))) - '(fg:erc-color-face4 ((t (:foreground "powder blue")))) - '(fg:erc-color-face5 ((t (:foreground "sky blue")))) - '(fg:erc-color-face6 ((t (:foreground "dark sea green")))) - '(fg:erc-color-face7 ((t (:foreground "pale green")))) - '(fg:erc-color-face8 ((t (:foreground "medium spring green")))) - '(fg:erc-color-face9 ((t (:foreground "khaki")))) - '(fg:erc-color-face10 ((t (:foreground "pale goldenrod")))) - '(fg:erc-color-face11 ((t (:foreground "light goldenrod yellow")))) - '(fg:erc-color-face12 ((t (:foreground "light yellow")))) - '(fg:erc-color-face13 ((t (:foreground "yellow")))) - '(fg:erc-color-face14 ((t (:foreground "light goldenrod")))) - '(fg:erc-color-face15 ((t (:foreground "lime green")))) - '(bg:erc-color-face0 ((t (nil)))) - '(bg:erc-color-face1 ((t (nil)))) - '(bg:erc-color-face2 ((t (nil)))) - '(bg:erc-color-face3 ((t (nil)))) - '(bg:erc-color-face4 ((t (nil)))) - '(bg:erc-color-face5 ((t (nil)))) - '(bg:erc-color-face6 ((t (nil)))) - '(bg:erc-color-face7 ((t (nil)))) - '(bg:erc-color-face8 ((t (nil)))) - '(bg:erc-color-face9 ((t (nil)))) - '(bg:erc-color-face10 ((t (nil)))) - '(bg:erc-color-face11 ((t (nil)))) - '(bg:erc-color-face12 ((t (nil)))) - '(bg:erc-color-face13 ((t (nil)))) - '(bg:erc-color-face14 ((t (nil)))) - '(bg:erc-color-face15 ((t (nil))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'dark-erc) - -;;; dark-erc-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/dark-font-lock-theme.el b/elpa/color-theme-modern-0.0.3/dark-font-lock-theme.el deleted file mode 100644 index 584a937..0000000 --- a/elpa/color-theme-modern-0.0.3/dark-font-lock-theme.el +++ /dev/null @@ -1,57 +0,0 @@ -;;; dark-font-lock-theme.el --- dark-font-lock theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of dark-font-lock theme from `color-themes' - -;;; Code: - -(deftheme dark-font-lock - "dark-font-lock theme") - -(custom-theme-set-faces - 'dark-font-lock - - '(font-lock-builtin-face ((t (:bold t :foreground "#777")))) - '(font-lock-comment-face ((t (:foreground "#555")))) - '(font-lock-constant-face ((t (:foreground "#777")))) - '(font-lock-doc-string-face ((t (:foreground "#777")))) - '(font-lock-doc-face ((t (:foreground "#777")))) - '(font-lock-function-name-face ((t (:bold t :foreground "#777")))) - '(font-lock-keyword-face ((t (:foreground "#777")))) - '(font-lock-preprocessor-face ((t (:foreground "#777")))) - '(font-lock-reference-face ((t (:foreground "#777")))) - '(font-lock-string-face ((t (:foreground "#777")))) - '(font-lock-type-face ((t (:bold t)))) - '(font-lock-variable-name-face ((t (:bold t :foreground "#888")))) - '(font-lock-warning-face ((t (:bold t :foreground "#999"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'dark-font-lock) - -;;; dark-font-lock-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/dark-gnus-theme.el b/elpa/color-theme-modern-0.0.3/dark-gnus-theme.el deleted file mode 100644 index d020e14..0000000 --- a/elpa/color-theme-modern-0.0.3/dark-gnus-theme.el +++ /dev/null @@ -1,114 +0,0 @@ -;;; dark-gnus-theme.el --- dark-gnus theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of dark-gnus theme from `color-themes' - -;;; Code: - -(deftheme dark-gnus - "dark-gnus theme") - -(custom-theme-set-faces - 'dark-gnus - - '(gnus-cite-attribution-face ((t (:foreground "#bbb")))) - '(gnus-cite-face-1 ((t (:foreground "#aaa")))) - '(gnus-cite-face-2 ((t (:foreground "#aaa")))) - '(gnus-cite-face-3 ((t (:foreground "#aaa")))) - '(gnus-cite-face-4 ((t (:foreground "#aaa")))) - '(gnus-cite-face-5 ((t (:foreground "#aaa")))) - '(gnus-cite-face-6 ((t (:foreground "#aaa")))) - '(gnus-cite-face-7 ((t (:foreground "#aaa")))) - '(gnus-cite-face-8 ((t (:foreground "#aaa")))) - '(gnus-cite-face-9 ((t (:foreground "#aaa")))) - '(gnus-emphasis-bold ((t (:bold t)))) - '(gnus-emphasis-bold-italic ((t (:italic t :bold t)))) - '(gnus-emphasis-highlight-words ((t (:foreground "#ccc")))) - '(gnus-emphasis-italic ((t (:italic t)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(gnus-emphasis-underline-bold ((t (:bold t :underline t)))) - '(gnus-emphasis-underline-bold-italic ((t (:italic t :bold t :underline t)))) - '(gnus-emphasis-underline-italic ((t (:italic t :underline t)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "#999")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "#999")))) - '(gnus-group-mail-2-empty-face ((t (:foreground "#999")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "#999")))) - '(gnus-group-mail-3-empty-face ((t (:foreground "#888")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "#888")))) - '(gnus-group-mail-low-empty-face ((t (:foreground "#777")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "#777")))) - '(gnus-group-news-1-empty-face ((t (:foreground "#999")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "#999")))) - '(gnus-group-news-2-empty-face ((t (:foreground "#888")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "#888")))) - '(gnus-group-news-3-empty-face ((t (:foreground "#777")))) - '(gnus-group-news-3-face ((t (:bold t :foreground "#777")))) - '(gnus-group-news-4-empty-face ((t (:foreground "#666")))) - '(gnus-group-news-4-face ((t (:bold t :foreground "#666")))) - '(gnus-group-news-5-empty-face ((t (:foreground "#666")))) - '(gnus-group-news-5-face ((t (:bold t :foreground "#666")))) - '(gnus-group-news-6-empty-face ((t (:foreground "#666")))) - '(gnus-group-news-6-face ((t (:bold t :foreground "#666")))) - '(gnus-group-news-low-empty-face ((t (:foreground "#666")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "#666")))) - '(gnus-header-content-face ((t (:foreground "#888")))) - '(gnus-header-from-face ((t (:bold t :foreground "#888")))) - '(gnus-header-name-face ((t (:bold t :foreground "#777")))) - '(gnus-header-newsgroups-face ((t (:bold t :foreground "#777")))) - '(gnus-header-subject-face ((t (:bold t :foreground "#999")))) - '(gnus-signature-face ((t (:foreground "#444")))) - '(gnus-splash-face ((t (:foreground "#ccc")))) - '(gnus-summary-cancelled-face ((t (:background "#555" :foreground "#000")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "#555")))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "#666")))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "#777")))) - '(gnus-summary-high-unread-face ((t (:bold t :foreground "#888")))) - '(gnus-summary-low-ancient-face ((t (:foreground "#444")))) - '(gnus-summary-low-read-face ((t (:foreground "#555")))) - '(gnus-summary-low-ticked-face ((t (:foreground "#666")))) - '(gnus-summary-low-unread-face ((t (:foreground "#777")))) - '(gnus-summary-normal-ancient-face ((t (:foreground "#555")))) - '(gnus-summary-normal-read-face ((t (:foreground "#666")))) - '(gnus-summary-normal-ticked-face ((t (:foreground "#777")))) - '(gnus-summary-normal-unread-face ((t (:foreground "#888")))) - '(gnus-summary-selected-face ((t (:background "#333")))) - '(message-cited-text-face ((t (:foreground "#aaa")))) - '(message-header-cc-face ((t (:foreground "#888")))) - '(message-header-name-face ((t (:bold t :foreground "#777")))) - '(message-header-newsgroups-face ((t (:bold t :foreground "#777")))) - '(message-header-other-face ((t (:foreground "#666")))) - '(message-header-subject-face ((t (:bold t :foreground "#999")))) - '(message-header-to-face ((t (:bold t :foreground "#777")))) - '(message-header-xheader-face ((t (:foreground "#666")))) - '(message-separator-face ((t (:foreground "#999"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'dark-gnus) - -;;; dark-gnus-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/dark-green-theme.el b/elpa/color-theme-modern-0.0.3/dark-green-theme.el deleted file mode 100644 index 4292d30..0000000 --- a/elpa/color-theme-modern-0.0.3/dark-green-theme.el +++ /dev/null @@ -1,85 +0,0 @@ -;;; dark-green-theme.el --- dark-green theme - -;; Copyright (C) 2002 by ces93 -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of dark-green theme from `color-themes' - -;;; Code: - -(deftheme dark-green - "dark-green theme") - -(custom-theme-set-faces - 'dark-green - - '(blue ((t (:foreground "blue")))) - '(bold ((t (:bold t)))) - '(bold-italic ((t (:italic t :bold t)))) - '(border-glyph ((t (nil)))) - '(fringe ((t (nil)))) - '(green ((t (:foreground "green")))) - '(gui-button-face ((t (:background "grey75" :foreground "black")))) - '(gui-element ((t (:background "#ffffff" :foreground "#000000")))) - '(highlight ((t (:background "gray" :foreground "darkred")))) - '(isearch ((t (:background "LightSlateGray" :foreground "red")))) - '(italic ((t (:italic t)))) - '(left-margin ((t (nil)))) - '(list-mode-item-selected ((t (:background "gray68")))) - '(mode-line ((t (:background "LightSlateGray" :foreground "black")))) - '(modeline ((t (:background "LightSlateGray" :foreground "black")))) - '(modeline-buffer-id ((t (:background "LightSlateGray" :foreground "blue4")))) - '(modeline-mousable ((t (:background "LightSlateGray" :foreground "firebrick")))) - '(modeline-mousable-minor-mode ((t (:background "LightSlateGray" :foreground "green4")))) - '(pointer ((t (:background "#ffffff" :foreground "#000000")))) - '(primary-selection ((t (:background "gray65")))) - '(red ((t (:foreground "red")))) - '(region ((t (:background "gray65")))) - '(right-margin ((t (nil)))) - '(rpm-spec-dir-face ((t (:foreground "green")))) - '(rpm-spec-doc-face ((t (:foreground "magenta")))) - '(rpm-spec-ghost-face ((t (:foreground "red")))) - '(rpm-spec-macro-face ((t (:foreground "purple")))) - '(rpm-spec-package-face ((t (:foreground "red")))) - '(rpm-spec-tag-face ((t (:foreground "blue")))) - '(secondary-selection ((t (:background "paleturquoise")))) - '(text-cursor ((t (:background "Red3" :foreground "DarkSlateGray")))) - '(tool-bar ((t (nil)))) - '(toolbar ((t (:background "#ffffff" :foreground "#000000")))) - '(underline ((t (:underline t)))) - '(vertical-divider ((t (:background "#ffffff" :foreground "#000000")))) - '(widget-button-face ((t (:bold t)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "dark green")))) - '(widget-field-face ((t (:background "gray85")))) - '(widget-inactive-face ((t (:foreground "dim gray")))) - '(yellow ((t (:foreground "yellow")))) - '(zmacs-region ((t (:background "darkorange" :foreground "black"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'dark-green) - -;;; dark-green-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/dark-info-theme.el b/elpa/color-theme-modern-0.0.3/dark-info-theme.el deleted file mode 100644 index 19d9000..0000000 --- a/elpa/color-theme-modern-0.0.3/dark-info-theme.el +++ /dev/null @@ -1,50 +0,0 @@ -;;; dark-info-theme.el --- dark-info theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of dark-info theme from `color-themes' - -;;; Code: - -(deftheme dark-info - "dark-info theme") - -(custom-theme-set-faces - 'dark-info - - '(info-header-node ((t (:foreground "#666")))) - '(info-header-xref ((t (:foreground "#666")))) - '(info-menu-5 ((t (:underline t)))) - '(info-menu-header ((t (:bold t :foreground "#666")))) - '(info-node ((t (:bold t :foreground "#888")))) - '(info-xref ((t (:bold t :foreground "#777"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'dark-info) - -;;; dark-info-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/dark-laptop-theme.el b/elpa/color-theme-modern-0.0.3/dark-laptop-theme.el deleted file mode 100644 index 89b861d..0000000 --- a/elpa/color-theme-modern-0.0.3/dark-laptop-theme.el +++ /dev/null @@ -1,177 +0,0 @@ -;;; dark-laptop-theme.el --- dark-laptop theme - -;; Copyright (C) 2001 by Laurent Michel -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of dark-laptop theme from `color-themes' - -;;; Code: - -(deftheme dark-laptop - "dark-laptop theme") - -(custom-theme-set-faces - 'dark-laptop - - '(default ((t (:background "black" :foreground "white")))) - '(mouse ((t (:foreground "sienna1")))) - '(cursor ((t (:background "yellow")))) - '(border ((t (:foreground "black")))) - - '(gnus-mouse-face ((t (:background "darkolivegreen")))) - '(list-matching-lines-face ((t (:bold t)))) - '(view-highlight-face ((t (:background "darkolivegreen")))) - - '(bold ((t (:bold t)))) - '(bold-italic ((t (:italic t :bold t)))) - '(custom-button-face ((t (nil)))) - '(custom-changed-face ((t (:background "blue" :foreground "white")))) - '(custom-documentation-face ((t (nil)))) - '(custom-face-tag-face ((t (:underline t)))) - '(custom-group-tag-face ((t (:underline t :foreground "light blue")))) - '(custom-group-tag-face-1 ((t (:underline t :foreground "pink")))) - '(custom-invalid-face ((t (:background "red" :foreground "yellow")))) - '(custom-modified-face ((t (:background "blue" :foreground "white")))) - '(custom-rogue-face ((t (:background "black" :foreground "pink")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:background "white" :foreground "blue")))) - '(custom-state-face ((t (:foreground "lime green")))) - '(custom-variable-button-face ((t (:underline t :bold t)))) - '(custom-variable-tag-face ((t (:underline t :foreground "light blue")))) - '(fl-comment-face ((t (:foreground "pink")))) - '(fl-doc-string-face ((t (:foreground "purple")))) - '(fl-function-name-face ((t (:foreground "red")))) - '(fl-keyword-face ((t (:foreground "cyan")))) - '(fl-string-face ((t (:foreground "green")))) - '(fl-type-face ((t (:foreground "yellow")))) - '(font-lock-builtin-face ((t (:foreground "LightSteelBlue")))) - '(font-lock-comment-face ((t (:foreground "OrangeRed")))) - '(font-lock-constant-face ((t (:foreground "Aquamarine")))) - '(font-lock-doc-string-face ((t (:foreground "LightSalmon")))) - '(font-lock-function-name-face ((t (:foreground "LightSkyBlue")))) - '(font-lock-keyword-face ((t (:foreground "Cyan")))) - '(font-lock-preprocessor-face ((t (:foreground "Aquamarine")))) - '(font-lock-reference-face ((t (:foreground "LightSteelBlue")))) - '(font-lock-string-face ((t (:foreground "LightSalmon")))) - '(font-lock-type-face ((t (:foreground "PaleGreen")))) - '(font-lock-variable-name-face ((t (:foreground "LightGoldenrod")))) - '(font-lock-warning-face ((t (:bold t :foreground "Pink")))) - '(gnus-cite-attribution-face ((t (:italic t)))) - '(gnus-cite-face-1 ((t (:bold t :foreground "deep sky blue")))) - '(gnus-cite-face-10 ((t (:foreground "medium purple")))) - '(gnus-cite-face-11 ((t (:foreground "turquoise")))) - '(gnus-cite-face-2 ((t (:bold t :foreground "cyan")))) - '(gnus-cite-face-3 ((t (:bold t :foreground "gold")))) - '(gnus-cite-face-4 ((t (:foreground "light pink")))) - '(gnus-cite-face-5 ((t (:foreground "pale green")))) - '(gnus-cite-face-6 ((t (:bold t :foreground "chocolate")))) - '(gnus-cite-face-7 ((t (:foreground "orange")))) - '(gnus-cite-face-8 ((t (:foreground "magenta")))) - '(gnus-cite-face-9 ((t (:foreground "violet")))) - '(gnus-emphasis-bold ((t (:bold t)))) - '(gnus-emphasis-bold-italic ((t (:italic t :bold t)))) - '(gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) - '(gnus-emphasis-italic ((t (:italic t)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(gnus-emphasis-underline-bold ((t (:underline t :bold t)))) - '(gnus-emphasis-underline-bold-italic ((t (:underline t :italic t :bold t)))) - '(gnus-emphasis-underline-italic ((t (:underline t :italic t)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "aquamarine1")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "aquamarine1")))) - '(gnus-group-mail-2-empty-face ((t (:foreground "aquamarine2")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "aquamarine2")))) - '(gnus-group-mail-3-empty-face ((t (:foreground "aquamarine3")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "aquamarine3")))) - '(gnus-group-mail-low-empty-face ((t (:foreground "aquamarine4")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "aquamarine4")))) - '(gnus-group-news-1-empty-face ((t (:foreground "PaleTurquoise")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "PaleTurquoise")))) - '(gnus-group-news-2-empty-face ((t (:foreground "turquoise")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "turquoise")))) - '(gnus-group-news-3-empty-face ((t (nil)))) - '(gnus-group-news-3-face ((t (:bold t)))) - '(gnus-group-news-4-empty-face ((t (nil)))) - '(gnus-group-news-4-face ((t (:bold t)))) - '(gnus-group-news-5-empty-face ((t (nil)))) - '(gnus-group-news-5-face ((t (:bold t)))) - '(gnus-group-news-6-empty-face ((t (nil)))) - '(gnus-group-news-6-face ((t (:bold t)))) - '(gnus-group-news-low-empty-face ((t (:foreground "DarkTurquoise")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "DarkTurquoise")))) - '(gnus-header-content-face ((t (:italic t :foreground "forest green")))) - '(gnus-header-from-face ((t (:bold t :foreground "spring green")))) - '(gnus-header-name-face ((t (:foreground "deep sky blue")))) - '(gnus-header-newsgroups-face ((t (:italic t :bold t :foreground "purple")))) - '(gnus-header-subject-face ((t (:bold t :foreground "orange")))) - '(gnus-signature-face ((t (:bold t :foreground "khaki")))) - '(gnus-splash-face ((t (:foreground "Brown")))) - '(gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "SkyBlue")))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "PaleGreen")))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "pink")))) - '(gnus-summary-high-unread-face ((t (:bold t)))) - '(gnus-summary-low-ancient-face ((t (:italic t :foreground "SkyBlue")))) - '(gnus-summary-low-read-face ((t (:italic t :foreground "PaleGreen")))) - '(gnus-summary-low-ticked-face ((t (:italic t :foreground "pink")))) - '(gnus-summary-low-unread-face ((t (:italic t)))) - '(gnus-summary-normal-ancient-face ((t (:foreground "SkyBlue")))) - '(gnus-summary-normal-read-face ((t (:foreground "PaleGreen")))) - '(gnus-summary-normal-ticked-face ((t (:foreground "pink")))) - '(gnus-summary-normal-unread-face ((t (nil)))) - '(gnus-summary-selected-face ((t (:underline t)))) - '(highlight ((t (:background "darkolivegreen")))) - '(italic ((t (:italic t)))) - '(message-cited-text-face ((t (:bold t :foreground "red")))) - '(message-header-cc-face ((t (:bold t :foreground "green4")))) - '(message-header-name-face ((t (:bold t :foreground "orange")))) - '(message-header-newsgroups-face ((t (:bold t :foreground "violet")))) - '(message-header-other-face ((t (:bold t :foreground "chocolate")))) - '(message-header-subject-face ((t (:bold t :foreground "yellow")))) - '(message-header-to-face ((t (:bold t :foreground "cyan")))) - '(message-header-xheader-face ((t (:bold t :foreground "light blue")))) - '(message-mml-face ((t (:bold t :background "Green3")))) - '(message-separator-face ((t (:foreground "blue3")))) - '(modeline ((t (:background "white" :foreground "black")))) - '(modeline-buffer-id ((t (:background "white" :foreground "black")))) - '(modeline-mousable ((t (:background "white" :foreground "black")))) - '(modeline-mousable-minor-mode ((t (:background "white" :foreground "black")))) - '(region ((t (:background "blue")))) - '(primary-selection ((t (:background "blue")))) - '(isearch ((t (:background "blue")))) - '(zmacs-region ((t (:background "blue")))) - '(secondary-selection ((t (:background "darkslateblue")))) - '(underline ((t (:underline t)))) - '(widget-button-face ((t (:bold t)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "lime green")))) - '(widget-field-face ((t (:background "dim gray")))) - '(widget-inactive-face ((t (:foreground "light gray")))) - '(widget-single-line-field-face ((t (:background "dim gray"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'dark-laptop) - -;;; dark-laptop-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/deep-blue-theme.el b/elpa/color-theme-modern-0.0.3/deep-blue-theme.el deleted file mode 100644 index a849362..0000000 --- a/elpa/color-theme-modern-0.0.3/deep-blue-theme.el +++ /dev/null @@ -1,137 +0,0 @@ -;;; deep-blue-theme.el --- deep-blue theme - -;; Copyright (C) 2001 by Tomas Cerha -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of deep-blue theme from `color-themes' - -;;; Code: - -(deftheme deep-blue - "deep-blue theme") - -(custom-theme-set-faces - 'deep-blue - - '(default ((t (:background "#102e4e" :foreground "#eeeeee")))) - '(mouse ((t (:background "white")))) - '(cursor ((t (:background "green" :foreground "black")))) - '(border ((t (:background "black")))) - - '(Info-title-1-face ((t (:bold t :weight bold :height 1.728)))) - '(Info-title-2-face ((t (:bold t :weight bold :height 1.44)))) - '(Info-title-3-face ((t (:bold t :weight bold :height 1.2)))) - '(Info-title-4-face ((t (:bold t :weight bold)))) - '(bold ((t (:bold t :weight bold)))) - '(bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) - '(calendar-today-face ((t (:background "blue")))) - '(change-log-acknowledgement-face ((t (:italic t :slant italic :foreground "CadetBlue")))) - '(change-log-conditionals-face ((t (:foreground "SeaGreen2")))) - '(change-log-date-face ((t (:foreground "burlywood")))) - '(change-log-email-face ((t (:foreground "SeaGreen2")))) - '(change-log-file-face ((t (:bold t :weight bold :foreground "goldenrod")))) - '(change-log-function-face ((t (:foreground "SeaGreen2")))) - '(change-log-list-face ((t (:bold t :weight bold :foreground "DeepSkyBlue1")))) - '(change-log-name-face ((t (:foreground "gold")))) - '(comint-highlight-input ((t (:bold t :weight bold)))) - '(comint-highlight-prompt ((t (:foreground "cyan")))) - '(cvs-filename-face ((t (:foreground "lightblue")))) - '(cvs-handled-face ((t (:foreground "pink")))) - '(cvs-header-face ((t (:bold t :foreground "lightyellow" :weight bold)))) - '(cvs-marked-face ((t (:bold t :foreground "green" :weight bold)))) - '(cvs-msg-face ((t (:italic t :slant italic)))) - '(cvs-need-action-face ((t (:foreground "orange")))) - '(cvs-unknown-face ((t (:foreground "red")))) - '(diary-face ((t (:foreground "orange red")))) - '(diff-added-face ((t (nil)))) - '(diff-changed-face ((t (nil)))) - '(diff-context-face ((t (:foreground "grey70")))) - '(diff-file-header-face ((t (:bold t :background "grey60" :weight bold)))) - '(diff-function-face ((t (:foreground "grey70")))) - '(diff-header-face ((t (:background "grey45")))) - '(diff-hunk-header-face ((t (:background "grey45")))) - '(diff-index-face ((t (:bold t :weight bold :background "grey60")))) - '(diff-nonexistent-face ((t (:bold t :weight bold :background "grey60")))) - '(diff-removed-face ((t (nil)))) - - '(font-latex-bold-face ((t (:bold t :foreground "OliveDrab" :weight bold)))) - '(font-latex-italic-face ((t (:italic t :foreground "OliveDrab" :slant italic)))) - '(font-latex-math-face ((t (:foreground "burlywood")))) - '(font-latex-sedate-face ((t (:foreground "LightGray")))) - '(font-latex-string-face ((t (:foreground "LightSalmon")))) - '(font-latex-warning-face ((t (:bold t :foreground "Pink" :weight bold)))) - '(font-lock-builtin-face ((t (:foreground "LightCoral")))) - '(font-lock-comment-face ((t (:italic t :foreground "CadetBlue" :slant italic)))) - '(font-lock-constant-face ((t (:foreground "gold")))) - '(font-lock-doc-face ((t (:foreground "BlanchedAlmond")))) - '(font-lock-doc-string-face ((t (:foreground "BlanchedAlmond")))) - '(font-lock-function-name-face ((t (:bold t :foreground "goldenrod" :weight bold)))) - '(font-lock-keyword-face ((t (:bold t :foreground "DeepSkyBlue1" :weight bold)))) - '(font-lock-preprocessor-face ((t (:foreground "gold")))) - '(font-lock-reference-face ((t (:foreground "LightCoral")))) - '(font-lock-string-face ((t (:foreground "burlywood")))) - '(font-lock-type-face ((t (:foreground "CadetBlue1")))) - '(font-lock-variable-name-face ((t (:foreground "SeaGreen2")))) - '(font-lock-warning-face ((t (:foreground "yellow")))) - '(fringe ((t (:background "#405060")))) - '(header-line ((t (:box (:line-width 2 :style released-button) :background "grey20" :foreground "grey90" :box nil)))) - '(highlight ((t (:background "darkgreen")))) - '(holiday-face ((t (:foreground "green")))) - '(info-header-node ((t (:foreground "DeepSkyBlue1")))) - '(info-header-xref ((t (:bold t :weight bold :foreground "SeaGreen2")))) - '(info-menu-5 ((t (:foreground "wheat")))) - '(info-menu-header ((t (:bold t :weight bold)))) - '(info-node ((t (:foreground "DeepSkyBlue1")))) - '(info-xref ((t (:bold t :foreground "SeaGreen2" :weight bold)))) - '(isearch ((t (:background "palevioletred2" :foreground "brown4")))) - '(isearch-lazy-highlight-face ((t (:background "paleturquoise4")))) - '(italic ((t (:italic t :slant italic)))) - '(menu ((t (:background "gray" :foreground "black")))) - '(modeline ((t (:background "gray" :foreground "black" :box (:line-width 2 :style released-button))))) - '(modeline-buffer-id ((t (:background "gray" :foreground "black" :box (:line-width 2 :style released-button))))) - '(modeline-mousable ((t (:background "gray" :foreground "black" :box (:line-width 2 :style released-button))))) - '(modeline-mousable-minor-mode ((t (:background "gray" :foreground "black" :box (:line-width 2 :style released-button))))) - '(region ((t (:background "DarkCyan")))) - '(scroll-bar ((t (:background "gray" :foreground "#506070")))) - '(secondary-selection ((t (:background "yellow" :foreground "gray10")))) - '(show-paren-match-face ((t (:bold t :foreground "yellow" :weight bold)))) - '(show-paren-mismatch-face ((t (:bold t :foreground "red" :weight bold)))) - '(tool-bar ((t (:background "grey75" :foreground "black" :box (:line-width 1 :style released-button))))) - '(tooltip ((t (:background "lightyellow" :foreground "black")))) - '(trailing-whitespace ((t (:background "#102e4e")))) - '(underline ((t (:underline t)))) - - '(widget-button-face ((t (:bold t :weight bold)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "lime green")))) - '(widget-field-face ((t (:background "dim gray")))) - '(widget-inactive-face ((t (:foreground "light gray")))) - '(widget-single-line-field-face ((t (:background "dim gray"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'deep-blue) - -;;; deep-blue-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/desert-theme.el b/elpa/color-theme-modern-0.0.3/desert-theme.el deleted file mode 100644 index 158bc5c..0000000 --- a/elpa/color-theme-modern-0.0.3/desert-theme.el +++ /dev/null @@ -1,175 +0,0 @@ -;;; desert-theme.el --- desert theme - -;; Copyright (C) Sergei Lebedev -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of desert theme from `color-themes' - -;;; Code: - -(deftheme desert - "desert theme") - -(custom-theme-set-faces - 'desert - - '(default ((t (:background "gray20" :foreground "ghost white")))) - - '(ac-candidate-face ((t (:background "gray15" :foreground "ghost white")))) - '(ac-completion-face ((t (:background "olivedrab" :foreground "khaki")))) - '(ac-selection-face ((t (:foreground "khaki" :background "olivedrab")))) - '(bold ((t (:bold t :weight bold)))) - '(bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) - '(border ((t (nil)))) - '(buffer-menu-buffer ((t (:bold t :foreground "khaki" :weight bold)))) - '(button ((t (:bold t :weight bold :underline nil :foreground "MediumPurple3" :background "gray20")))) - - '(completions-annotations ((t (:underline t)))) - '(completions-common-part ((t (:foreground "ghost white" :background "gray20")))) - '(completions-first-difference ((t (:bold t :weight bold)))) - - '(cursor ((t (:background "khaki")))) - - '(dired-directory ((t (:bold t :weight bold :foreground "PaleGreen3")))) - '(dired-flagged ((t (:bold t :weight bold :foreground "Pink")))) - '(dired-header ((t (:bold t :weight bold :foreground "PaleGreen3")))) - '(dired-ignored ((t (:foreground "grey70")))) - '(dired-mark ((t (:foreground "#ffa0a0")))) - '(dired-marked ((t (:bold t :weight bold :foreground "DarkOrange")))) - '(dired-perm-write ((t (:foreground "LightSkyBlue3")))) - '(dired-symlink ((t (:foreground "khaki")))) - '(dired-warning ((t (:bold t :weight bold :foreground "goldenrod")))) - - '(elscreen-tab-background-face ((t (:background "gray15")))) - '(elscreen-tab-control-face - ((t (:bold t :weight bold :foreground "goldenrod" :background "gray15" :underline nil)))) - '(elscreen-tab-current-screen-face - ((t (:bold t :background "gray15" :foreground "goldenrod" :weight bold)))) - '(elscreen-tab-other-screen-face ((t (:background "gray15" :foreground "gray60")))) - - '(error ((t (:bold t :foreground "Pink" :weight bold)))) - '(escape-glyph ((t (:foreground "cyan")))) - '(file-name-shadow ((t (:foreground "grey70")))) - - '(font-lock-builtin-face ((t (:foreground "MediumPurple3")))) - '(font-lock-comment-delimiter-face ((t (:foreground "LightSkyBlue3")))) - '(font-lock-comment-face ((t (:foreground "LightSkyBlue3")))) - '(font-lock-constant-face ((t (:foreground "#ffa0a0")))) - '(font-lock-doc-face ((t (:foreground "IndianRed3")))) - '(font-lock-function-name-face ((t (:bold t :foreground "PaleGreen3" :weight bold)))) - '(font-lock-keyword-face ((t (:foreground "khaki")))) - '(font-lock-negation-char-face ((t (nil)))) - '(font-lock-preprocessor-face ((t (:foreground "MediumPurple3")))) - '(font-lock-regexp-grouping-backslash ((t (:bold t :weight bold)))) - '(font-lock-regexp-grouping-construct ((t (:bold t :weight bold)))) - '(font-lock-string-face ((t (:foreground "#ffa0a0")))) - '(font-lock-type-face ((t (:bold t :foreground "PaleGreen3" :weight bold)))) - '(font-lock-variable-name-face ((t (:foreground "ghost white")))) - '(font-lock-warning-face ((t (:bold t :foreground "goldenrod" :weight bold)))) - - '(fringe ((t (:background "gray20")))) - '(glyphless-char ((t (:height 0.6)))) - '(header-line ((t (:background "gray15" :box (:color "gray20" :line-width 2))))) - '(help-argument-name ((t (nil)))) - '(highlight ((t (:background "olivedrab" :foreground "khaki")))) - '(ido-first-match ((t (:bold t :foreground "PaleGreen3" :weight bold)))) - '(ido-only-match ((t (:bold t :foreground "PaleGreen3" :weight bold)))) - '(ido-subdir ((t (:bold t :weight bold :foreground "khaki")))) - - '(isearch ((t (:background "olivedrab" :foreground "khaki")))) - '(isearch-fail ((t (:background "red4")))) - '(isearch-lazy-light - ((t (:bold t :background "gray20" :foreground "ghost white" :weight bold)))) - - '(italic ((t (:underline t)))) - - '(jabber-activity-face ((t (:bold t :weight bold :foreground "PaleGreen3")))) - '(jabber-activity-personal-face ((t (:bold t :foreground "#ffa0a0" :weight bold)))) - '(jabber-chat-prompt-foreign ((t (:bold t :foreground "PaleGreen3" :weight bold)))) - '(jabber-chat-prompt-local ((t (:bold t :foreground "#ffa0a0" :weight bold)))) - '(jabber-chat-prompt-system ((t (:bold t :foreground "LightSkyBlue3" :weight bold)))) - '(jabber-rare-time-face ((t (:bold t :foreground "PaleGreen3" :weight bold)))) - '(jabber-roster-user-away ((t (:foreground "IndianRed3")))) - '(jabber-roster-user-chatty ((t (:bold t :foreground "PaleGreen3" :weight bold)))) - '(jabber-roster-user-dnd ((t (:foreground "LightSkyBlue3")))) - '(jabber-roster-user-error ((t (:bold t :weight bold :foreground "goldenrod")))) - '(jabber-roster-user-offline ((t (:background "gray20" :foreground "gray40")))) - '(jabber-roster-user-online ((t (:bold t :foreground "khaki" :weight bold)))) - '(jabber-roster-user-xa ((t (:foreground "IndianRed3")))) - '(jabber-title-large ((t (:bold t :weight bold :height 1.728)))) - '(jabber-title-medium ((t (:bold t :weight bold :height 1.44)))) - '(jabber-title-small ((t (:bold t :weight bold :height 1.2)))) - - '(lazy-highlight ((t (:background "paleturquoise4")))) - '(link ((t (:bold t :background "gray20" :foreground "MediumPurple3" :underline nil :weight bold)))) - '(link-visited ((t (:bold t :underline nil :foreground "MediumPurple3" :background "gray20" :weight bold)))) - '(linum ((t (:background "gray20" :foreground "yellow")))) - '(match ((t (:bold t :weight bold)))) - '(menu ((t (nil)))) - '(minibuffer-prompt ((t (:bold t :foreground "khaki" :weight bold)))) - - '(mode-line - ((t (:box (:color "gray20" :line-width 2) - :background "gray15" :foreground "gray60")))) - '(mode-line-buffer-id - ((t (:bold t :background "gray15" :box (:color "gray20" :line-width 2) - :foreground "goldenrod" :weight bold)))) - '(mode-line-emphasis ((t (:bold t :weight bold)))) - '(mode-line-highlight ((t (:box (:line-width 2 :color "grey40" :style released-button))))) - '(mode-line-inactive - ((t (:foreground "gray60" :background "gray15" - :box (:color "gray20" :line-width 2))))) - - '(mouse ((t (:background "khaki")))) - '(next-error ((t (:background "olivedrab" :foreground "khaki")))) - '(nobreak-space ((t (:foreground "cyan" :underline t)))) - '(query-replace ((t (:foreground "khaki" :background "olivedrab")))) - '(region ((t (:foreground "khaki" :background "olivedrab")))) - '(scroll-bar ((t (nil)))) - '(secondary-selection ((t (:background "SkyBlue4")))) - '(shadow ((t (:foreground "grey70")))) - '(show-paren-match ((t (:bold t :foreground "PaleGreen3" :weight bold)))) - '(show-paren-mismatch ((t (:bold t :foreground "goldenrod" :weight bold)))) - '(success ((t (:bold t :foreground "Green1" :weight bold)))) - '(tool-bar - ((t (:background "grey75" :foreground "black" :box (:line-width 1 :style released-button))))) - '(tooltip ((t (:background "lightyellow" :foreground "black")))) - '(trailing-whitespace ((t (:bold t :weight bold :foreground "goldenrod")))) - '(underline ((t (:underline t)))) - - '(vertical-border ((t (nil)))) - '(warning ((t (:bold t :foreground "DarkOrange" :weight bold)))) - '(widget-button ((t (:bold t :weight bold)))) - '(widget-button-pressed ((t (:foreground "red1")))) - '(widget-documentation ((t (:foreground "lime green")))) - '(widget-field ((t (:background "dim gray")))) - '(widget-inactive ((t (:foreground "grey70")))) - '(widget-single-line-field ((t (:background "dim gray")))) ) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'desert) - -;;; desert-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/digital-ofs1-theme.el b/elpa/color-theme-modern-0.0.3/digital-ofs1-theme.el deleted file mode 100644 index d99e2ab..0000000 --- a/elpa/color-theme-modern-0.0.3/digital-ofs1-theme.el +++ /dev/null @@ -1,518 +0,0 @@ -;;; digital-ofs1-theme.el --- digital-ofs1 theme - -;; Copyright (C) 2001 by Gareth Owen -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of digital-ofs1 theme from `color-themes' - -;;; Code: - -(deftheme digital-ofs1 - "digital-ofs1 theme") - -(custom-theme-set-faces - 'digital-ofs1 - - '(default ((t (:background "#CA94AA469193" :foreground "Black")))) - '(mouse ((t (:foreground "black")))) - '(cursor ((t (:background "black")))) - '(border ((t (:foreground "black")))) - - '(Man-overstrike-face ((t (:bold t)))) - '(Man-underline-face ((t (:underline t :bold t)))) - '(gnus-mouse-face ((t (:bold t :background "darkseagreen2")))) - '(goto-address-mail-face ((t (:italic t :bold t)))) - '(goto-address-mail-mouse-face ((t (:bold t :background "paleturquoise")))) - '(goto-address-url-face ((t (:bold t)))) - '(goto-address-url-mouse-face ((t (:bold t :background "darkseagreen2")))) - '(ispell-highlight-face ((t (:bold t :background "darkseagreen2")))) - '(list-matching-lines-face ((t (:bold t)))) - '(rmail-highlight-face ((t (:italic t :bold t :foreground "Blue")))) - '(view-highlight-face ((t (:bold t :background "darkseagreen2")))) - - '(default ((t (:bold t)))) - '(bbdb-company ((t (:italic t)))) - '(bbdb-field-name ((t (:bold t)))) - '(bbdb-field-value ((t (nil)))) - '(bbdb-name ((t (:underline t)))) - '(blank-space-face ((t (nil)))) - '(blank-tab-face ((t (nil)))) - '(blue ((t (:bold t :foreground "blue")))) - '(bold ((t (:bold t)))) - '(bold-italic ((t (:italic t :bold t)))) - '(border-glyph ((t (:bold t)))) - '(buffers-tab ((t (:background "black" :foreground "LightSkyBlue")))) - '(calendar-today-face ((t (:underline t :bold t :foreground "white")))) - '(comint-input-face ((t (nil)))) - '(cperl-array-face ((t (:bold t :background "lightyellow2" :foreground "Blue")))) - '(cperl-hash-face ((t (:italic t :bold t :background "lightyellow2" :foreground "Red")))) - '(cperl-here-face ((t (nil)))) - '(cperl-invalid-face ((t (:foreground "white")))) - '(cperl-nonoverridable-face ((t (:foreground "chartreuse3")))) - '(cperl-pod-face ((t (nil)))) - '(cperl-pod-head-face ((t (nil)))) - '(custom-button-face ((t (:bold t)))) - '(custom-changed-face ((t (:bold t :background "blue" :foreground "white")))) - '(custom-comment-face ((t (:foreground "white")))) - '(custom-comment-tag-face ((t (:foreground "white")))) - '(custom-documentation-face ((t (:bold t)))) - '(custom-face-tag-face ((t (:underline t :bold t)))) - '(custom-group-tag-face ((t (:underline t :bold t :foreground "DarkBlue")))) - '(custom-group-tag-face-1 ((t (:underline t :bold t :foreground "red")))) - '(custom-invalid-face ((t (:bold t :background "red" :foreground "yellow")))) - '(custom-modified-face ((t (:bold t :background "blue" :foreground "white")))) - '(custom-rogue-face ((t (:bold t :background "black" :foreground "pink")))) - '(custom-saved-face ((t (:underline t :bold t)))) - '(custom-set-face ((t (:bold t :background "white" :foreground "blue")))) - '(custom-state-face ((t (:bold t :foreground "dark green")))) - '(custom-variable-button-face ((t (:underline t :bold t)))) - '(custom-variable-tag-face ((t (:underline t :bold t :foreground "blue")))) - '(cvs-filename-face ((t (:foreground "white")))) - '(cvs-handled-face ((t (:foreground "pink")))) - '(cvs-header-face ((t (:bold t :foreground "green")))) - '(cvs-marked-face ((t (:bold t :foreground "green3")))) - '(cvs-msg-face ((t (:italic t :foreground "red")))) - '(cvs-need-action-face ((t (:foreground "yellow")))) - '(cvs-unknown-face ((t (:foreground "grey")))) - '(cyan ((t (:foreground "cyan")))) - '(diary-face ((t (:bold t :foreground "red")))) - '(diff-added-face ((t (nil)))) - '(diff-changed-face ((t (nil)))) - '(diff-file-header-face ((t (:bold t :background "grey70")))) - '(diff-hunk-header-face ((t (:background "grey85")))) - '(diff-index-face ((t (:bold t :background "grey70")))) - '(diff-removed-face ((t (nil)))) - '(dired-face-boring ((t (:foreground "Gray65")))) - '(dired-face-directory ((t (:bold t)))) - '(dired-face-executable ((t (:foreground "SeaGreen")))) - '(dired-face-flagged ((t (:background "LightSlateGray")))) - '(dired-face-header ((t (:background "grey75" :foreground "black")))) - '(dired-face-marked ((t (:background "PaleVioletRed")))) - '(dired-face-permissions ((t (:background "grey75" :foreground "black")))) - '(dired-face-setuid ((t (:foreground "Red")))) - '(dired-face-socket ((t (:foreground "magenta")))) - '(dired-face-symlink ((t (:foreground "cyan")))) - '(display-time-mail-balloon-enhance-face ((t (:bold t :background "orange")))) - '(display-time-mail-balloon-gnus-group-face ((t (:bold t :foreground "blue")))) - '(display-time-time-balloon-face ((t (:bold t :foreground "red")))) - '(ediff-current-diff-face-A ((t (:background "pale green" :foreground "firebrick")))) - '(ediff-current-diff-face-Ancestor ((t (:background "VioletRed" :foreground "Black")))) - '(ediff-current-diff-face-B ((t (:background "Yellow" :foreground "DarkOrchid")))) - '(ediff-current-diff-face-C ((t (:background "Pink" :foreground "Navy")))) - '(ediff-even-diff-face-A ((t (:background "light grey" :foreground "Black")))) - '(ediff-even-diff-face-Ancestor ((t (:background "Grey" :foreground "White")))) - '(ediff-even-diff-face-B ((t (:background "Grey" :foreground "White")))) - '(ediff-even-diff-face-C ((t (:background "light grey" :foreground "Black")))) - '(ediff-fine-diff-face-A ((t (:background "sky blue" :foreground "Navy")))) - '(ediff-fine-diff-face-Ancestor ((t (:background "Green" :foreground "Black")))) - '(ediff-fine-diff-face-B ((t (:background "cyan" :foreground "Black")))) - '(ediff-fine-diff-face-C ((t (:background "Turquoise" :foreground "Black")))) - '(ediff-odd-diff-face-A ((t (:background "Grey" :foreground "White")))) - '(ediff-odd-diff-face-Ancestor ((t (:background "light grey" :foreground "Black")))) - '(ediff-odd-diff-face-B ((t (:background "light grey" :foreground "Black")))) - '(ediff-odd-diff-face-C ((t (:background "Grey" :foreground "White")))) - '(erc-action-face ((t (:bold t)))) - '(erc-bold-face ((t (:bold t)))) - '(erc-default-face ((t (nil)))) - '(erc-direct-msg-face ((t (nil)))) - '(erc-error-face ((t (:bold t)))) - '(erc-input-face ((t (nil)))) - '(erc-inverse-face ((t (nil)))) - '(erc-notice-face ((t (nil)))) - '(erc-pal-face ((t (nil)))) - '(erc-prompt-face ((t (nil)))) - '(erc-underline-face ((t (nil)))) - '(eshell-ls-archive-face ((t (:bold t :foreground "Orchid")))) - '(eshell-ls-backup-face ((t (:foreground "OrangeRed")))) - '(eshell-ls-clutter-face ((t (:bold t :foreground "OrangeRed")))) - '(eshell-ls-directory-face ((t (:bold t :foreground "Blue")))) - '(eshell-ls-executable-face ((t (:bold t :foreground "ForestGreen")))) - '(eshell-ls-missing-face ((t (:bold t :foreground "Red")))) - '(eshell-ls-picture-face ((t (:foreground "Violet")))) - '(eshell-ls-product-face ((t (:foreground "OrangeRed")))) - '(eshell-ls-readonly-face ((t (:foreground "Brown")))) - '(eshell-ls-special-face ((t (:bold t :foreground "Magenta")))) - '(eshell-ls-symlink-face ((t (:bold t :foreground "DarkCyan")))) - '(eshell-ls-text-face ((t (:foreground "medium aquamarine")))) - '(eshell-ls-todo-face ((t (:bold t :foreground "aquamarine")))) - '(eshell-ls-unreadable-face ((t (:foreground "Grey30")))) - '(eshell-prompt-face ((t (:bold t :foreground "Red")))) - '(eshell-test-failed-face ((t (:bold t :foreground "OrangeRed")))) - '(eshell-test-ok-face ((t (:bold t :foreground "Green")))) - '(excerpt ((t (:italic t)))) - '(ff-paths-non-existant-file-face ((t (:bold t :foreground "NavyBlue")))) - '(fg:black ((t (:foreground "black")))) - '(fixed ((t (:bold t)))) - '(fl-comment-face ((t (:foreground "medium purple")))) - '(fl-doc-string-face ((t (nil)))) - '(fl-function-name-face ((t (:foreground "green")))) - '(fl-keyword-face ((t (:foreground "LightGreen")))) - '(fl-string-face ((t (:foreground "light coral")))) - '(fl-type-face ((t (:foreground "cyan")))) - '(flyspell-duplicate-face ((t (:underline t :bold t :foreground "Gold3")))) - '(flyspell-incorrect-face ((t (:underline t :bold t :foreground "OrangeRed")))) - '(font-latex-bold-face ((t (:bold t)))) - '(font-latex-italic-face ((t (:italic t)))) - '(font-latex-math-face ((t (nil)))) - '(font-latex-sedate-face ((t (nil)))) - '(font-latex-string-face ((t (nil)))) - '(font-latex-warning-face ((t (nil)))) - '(font-lock-builtin-face ((t (:italic t :bold t :foreground "Orchid")))) - '(font-lock-comment-face ((t (:bold t :foreground "Firebrick")))) - '(font-lock-constant-face ((t (:italic t :bold t :foreground "CadetBlue")))) - '(font-lock-doc-string-face ((t (:italic t :bold t :foreground "green4")))) - '(font-lock-emphasized-face ((t (:bold t)))) - '(font-lock-exit-face ((t (:foreground "green")))) - '(font-lock-function-name-face ((t (:italic t :bold t :foreground "Blue")))) - '(font-lock-keyword-face ((t (:bold t :foreground "dark olive green")))) - '(font-lock-other-emphasized-face ((t (:italic t :bold t)))) - '(font-lock-other-type-face ((t (:bold t :foreground "DarkBlue")))) - '(font-lock-preprocessor-face ((t (:italic t :bold t :foreground "blue3")))) - '(font-lock-reference-face ((t (:italic t :bold t :foreground "red3")))) - '(font-lock-special-comment-face ((t (nil)))) - '(font-lock-special-keyword-face ((t (nil)))) - '(font-lock-string-face ((t (:italic t :bold t :foreground "DarkBlue")))) - '(font-lock-type-face ((t (:italic t :bold t :foreground "DarkGreen")))) - '(font-lock-variable-name-face ((t (:italic t :bold t :foreground "darkgreen")))) - '(font-lock-warning-face ((t (:bold t :foreground "Red")))) - '(fringe ((t (:background "grey95")))) - '(gdb-arrow-face ((t (:bold t)))) - '(gnus-cite-attribution-face ((t (:italic t :bold t)))) - '(gnus-cite-face-1 ((t (:bold t :foreground "MidnightBlue")))) - '(gnus-cite-face-10 ((t (:foreground "medium purple")))) - '(gnus-cite-face-11 ((t (:foreground "turquoise")))) - '(gnus-cite-face-2 ((t (:bold t :foreground "firebrick")))) - '(gnus-cite-face-3 ((t (:bold t :foreground "dark green")))) - '(gnus-cite-face-4 ((t (:foreground "OrangeRed")))) - '(gnus-cite-face-5 ((t (:foreground "dark khaki")))) - '(gnus-cite-face-6 ((t (:bold t :foreground "dark violet")))) - '(gnus-cite-face-7 ((t (:foreground "SteelBlue4")))) - '(gnus-cite-face-8 ((t (:foreground "magenta")))) - '(gnus-cite-face-9 ((t (:foreground "violet")))) - '(gnus-cite-face-list ((t (nil)))) - '(gnus-emphasis-bold ((t (:bold t)))) - '(gnus-emphasis-bold-italic ((t (:italic t :bold t)))) - '(gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) - '(gnus-emphasis-italic ((t (:italic t)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(gnus-emphasis-underline-bold ((t (:underline t :bold t)))) - '(gnus-emphasis-underline-bold-italic ((t (:underline t :italic t :bold t)))) - '(gnus-emphasis-underline-italic ((t (:underline t :italic t)))) - '(gnus-filterhist-face-1 ((t (nil)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "DeepPink3")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "DeepPink3")))) - '(gnus-group-mail-2-empty-face ((t (:foreground "HotPink3")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "HotPink3")))) - '(gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "magenta4")))) - '(gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "DeepPink4")))) - '(gnus-group-news-1-empty-face ((t (:foreground "ForestGreen")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "ForestGreen")))) - '(gnus-group-news-2-empty-face ((t (:foreground "CadetBlue4")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "CadetBlue4")))) - '(gnus-group-news-3-empty-face ((t (nil)))) - '(gnus-group-news-3-face ((t (:bold t)))) - '(gnus-group-news-4-empty-face ((t (nil)))) - '(gnus-group-news-4-face ((t (:bold t)))) - '(gnus-group-news-5-empty-face ((t (nil)))) - '(gnus-group-news-5-face ((t (:bold t)))) - '(gnus-group-news-6-empty-face ((t (nil)))) - '(gnus-group-news-6-face ((t (:bold t)))) - '(gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "DarkGreen")))) - '(gnus-header-content-face ((t (:italic t :foreground "indianred4")))) - '(gnus-header-from-face ((t (:bold t :foreground "red3")))) - '(gnus-header-name-face ((t (:bold t :foreground "maroon")))) - '(gnus-header-newsgroups-face ((t (:italic t :bold t :foreground "MidnightBlue")))) - '(gnus-header-subject-face ((t (:bold t :foreground "red4")))) - '(gnus-picons-face ((t (:background "white" :foreground "black")))) - '(gnus-picons-xbm-face ((t (:background "white" :foreground "black")))) - '(gnus-signature-face ((t (:italic t :bold t)))) - '(gnus-splash ((t (nil)))) - '(gnus-splash-face ((t (:foreground "Brown")))) - '(gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "RoyalBlue")))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "DarkGreen")))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "firebrick")))) - '(gnus-summary-high-unread-face ((t (:italic t :bold t)))) - '(gnus-summary-low-ancient-face ((t (:italic t :foreground "RoyalBlue")))) - '(gnus-summary-low-read-face ((t (:italic t :foreground "DarkGreen")))) - '(gnus-summary-low-ticked-face ((t (:italic t :bold t :foreground "firebrick")))) - '(gnus-summary-low-unread-face ((t (:italic t)))) - '(gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) - '(gnus-summary-normal-read-face ((t (:foreground "DarkGreen")))) - '(gnus-summary-normal-ticked-face ((t (:bold t :foreground "firebrick")))) - '(gnus-summary-normal-unread-face ((t (:bold t)))) - '(gnus-summary-selected-face ((t (:underline t)))) - '(gnus-x-face ((t (:background "white" :foreground "black")))) - '(green ((t (:bold t :foreground "green")))) - '(gui-button-face ((t (:bold t :background "grey75" :foreground "black")))) - '(gui-element ((t (:bold t :background "Gray80")))) - '(highlight ((t (:bold t :background "darkseagreen2")))) - '(highlight-changes-delete-face ((t (:underline t :foreground "red")))) - '(highlight-changes-face ((t (:foreground "red")))) - '(highline-face ((t (:background "black" :foreground "white")))) - '(holiday-face ((t (:bold t :background "pink" :foreground "white")))) - '(hproperty:but-face ((t (:bold t)))) - '(hproperty:flash-face ((t (:bold t)))) - '(hproperty:highlight-face ((t (:bold t)))) - '(hproperty:item-face ((t (:bold t)))) - '(html-helper-bold-face ((t (:bold t)))) - '(html-helper-bold-italic-face ((t (nil)))) - '(html-helper-builtin-face ((t (:underline t :foreground "blue3")))) - '(html-helper-italic-face ((t (:italic t :bold t :foreground "yellow")))) - '(html-helper-underline-face ((t (:underline t)))) - '(html-tag-face ((t (:bold t)))) - '(hyper-apropos-documentation ((t (:foreground "white")))) - '(hyper-apropos-heading ((t (:bold t)))) - '(hyper-apropos-hyperlink ((t (:foreground "sky blue")))) - '(hyper-apropos-major-heading ((t (:bold t)))) - '(hyper-apropos-section-heading ((t (:bold t)))) - '(hyper-apropos-warning ((t (:bold t :foreground "red")))) - '(ibuffer-marked-face ((t (:foreground "red")))) - '(info-menu-5 ((t (:underline t :bold t)))) - '(info-menu-6 ((t (nil)))) - '(info-node ((t (:italic t :bold t)))) - '(info-xref ((t (:bold t)))) - '(isearch ((t (:bold t :background "paleturquoise")))) - '(isearch-secondary ((t (:foreground "red3")))) - '(ispell-face ((t (:bold t)))) - '(italic ((t (:italic t :bold t)))) - '(jde-bug-breakpoint-cursor ((t (:background "brown" :foreground "cyan")))) - '(jde-bug-breakpoint-marker ((t (:background "yellow" :foreground "red")))) - '(jde-java-font-lock-link-face ((t (:underline t :foreground "blue")))) - '(jde-java-font-lock-number-face ((t (:foreground "RosyBrown")))) - '(lazy-highlight-face ((t (:bold t :foreground "dark magenta")))) - '(left-margin ((t (:bold t)))) - '(linemenu-face ((t (nil)))) - '(list-mode-item-selected ((t (:bold t :background "gray68")))) - '(magenta ((t (:foreground "magenta")))) - '(makefile-space-face ((t (:background "hotpink")))) - '(man-bold ((t (:bold t)))) - '(man-heading ((t (:bold t)))) - '(man-italic ((t (:foreground "yellow")))) - '(man-xref ((t (:underline t)))) - '(message-cited-text ((t (:bold t :foreground "orange")))) - '(message-cited-text-face ((t (:bold t :foreground "red")))) - '(message-header-cc-face ((t (:bold t :foreground "MidnightBlue")))) - '(message-header-contents ((t (:italic t :bold t :foreground "white")))) - '(message-header-name-face ((t (:bold t :foreground "cornflower blue")))) - '(message-header-newsgroups-face ((t (:italic t :bold t :foreground "blue4")))) - '(message-header-other-face ((t (:bold t :foreground "steel blue")))) - '(message-header-subject-face ((t (:bold t :foreground "navy blue")))) - '(message-header-to-face ((t (:bold t :foreground "MidnightBlue")))) - '(message-header-xheader-face ((t (:bold t :foreground "blue")))) - '(message-headers ((t (:bold t :foreground "orange")))) - '(message-highlighted-header-contents ((t (:bold t)))) - '(message-mml-face ((t (:bold t :foreground "ForestGreen")))) - '(message-separator-face ((t (:foreground "brown")))) - '(message-url ((t (:bold t :foreground "pink")))) - '(mmm-face ((t (:background "black" :foreground "green")))) - '(modeline ((t (:bold t :background "Black" :foreground "#CA94AA469193")))) - '(modeline-buffer-id ((t (:bold t :background "Gray80" :foreground "blue4")))) - '(modeline-mousable ((t (:bold t :background "Gray80" :foreground "firebrick")))) - '(modeline-mousable-minor-mode ((t (:bold t :background "Gray80" :foreground "green4")))) - '(my-tab-face ((t (nil)))) - '(nil ((t (nil)))) - '(p4-diff-del-face ((t (:bold t)))) - '(paren-blink-off ((t (:foreground "gray80")))) - '(paren-face ((t (nil)))) - '(paren-face-match ((t (nil)))) - '(paren-face-mismatch ((t (nil)))) - '(paren-face-no-match ((t (nil)))) - '(paren-match ((t (:background "darkseagreen2")))) - '(paren-mismatch ((t (:background "DeepPink" :foreground "black")))) - '(paren-mismatch-face ((t (:bold t :background "DeepPink" :foreground "white")))) - '(paren-no-match-face ((t (:bold t :background "yellow" :foreground "white")))) - '(pointer ((t (:bold t)))) - '(primary-selection ((t (:bold t :background "gray65")))) - '(red ((t (:bold t :foreground "red")))) - '(region ((t (:bold t :background "gray")))) - '(right-margin ((t (:bold t)))) - '(searchm-buffer ((t (:bold t)))) - '(searchm-button ((t (:bold t)))) - '(searchm-field ((t (nil)))) - '(searchm-field-label ((t (:bold t)))) - '(searchm-highlight ((t (:bold t)))) - '(secondary-selection ((t (:bold t :background "paleturquoise")))) - '(semantic-intangible-face ((t (:foreground "gray25")))) - '(semantic-read-only-face ((t (:background "gray25")))) - '(senator-momentary-highlight-face ((t (:background "gray70")))) - '(setnu-line-number-face ((t (:italic t :bold t)))) - '(sgml-comment-face ((t (:foreground "dark green")))) - '(sgml-doctype-face ((t (:foreground "maroon")))) - '(sgml-end-tag-face ((t (:foreground "blue2")))) - '(sgml-entity-face ((t (:foreground "red2")))) - '(sgml-ignored-face ((t (:background "gray90" :foreground "maroon")))) - '(sgml-ms-end-face ((t (:foreground "maroon")))) - '(sgml-ms-start-face ((t (:foreground "maroon")))) - '(sgml-pi-face ((t (:foreground "maroon")))) - '(sgml-sgml-face ((t (:foreground "maroon")))) - '(sgml-short-ref-face ((t (:foreground "goldenrod")))) - '(sgml-start-tag-face ((t (:foreground "blue2")))) - '(shell-input-face ((t (:bold t)))) - '(shell-option-face ((t (:bold t :foreground "blue4")))) - '(shell-output-2-face ((t (:bold t :foreground "green4")))) - '(shell-output-3-face ((t (:bold t :foreground "green4")))) - '(shell-output-face ((t (:bold t)))) - '(shell-prompt-face ((t (:bold t :foreground "red4")))) - '(show-paren-match-face ((t (:bold t :background "turquoise")))) - '(show-paren-mismatch-face ((t (:bold t :background "purple" :foreground "white")))) - '(speedbar-button-face ((t (:bold t :foreground "magenta")))) - '(speedbar-directory-face ((t (:bold t :foreground "orchid")))) - '(speedbar-file-face ((t (:bold t :foreground "pink")))) - '(speedbar-highlight-face ((t (:background "black")))) - '(speedbar-selected-face ((t (:underline t :foreground "cyan")))) - '(speedbar-tag-face ((t (:foreground "yellow")))) - '(swbuff-current-buffer-face ((t (:bold t :foreground "red")))) - '(template-message-face ((t (:bold t)))) - '(term-black ((t (:foreground "black")))) - '(term-blackbg ((t (:background "black")))) - '(term-blue ((t (:foreground "blue")))) - '(term-blue-bold-face ((t (:bold t :background "snow2" :foreground "blue")))) - '(term-blue-face ((t (:foreground "blue")))) - '(term-blue-inv-face ((t (:background "blue")))) - '(term-blue-ul-face ((t (:underline t :background "snow2" :foreground "blue")))) - '(term-bluebg ((t (:background "blue")))) - '(term-bold ((t (:bold t)))) - '(term-cyan ((t (:foreground "cyan")))) - '(term-cyan-bold-face ((t (:bold t :background "snow2" :foreground "cyan")))) - '(term-cyan-face ((t (:foreground "cyan")))) - '(term-cyan-inv-face ((t (:background "cyan")))) - '(term-cyan-ul-face ((t (:underline t :background "snow2" :foreground "cyan")))) - '(term-cyanbg ((t (:background "cyan")))) - '(term-default-bg ((t (nil)))) - '(term-default-bg-inv ((t (nil)))) - '(term-default-bold-face ((t (:bold t :background "snow2" :foreground "darkslategray")))) - '(term-default-face ((t (:background "snow2" :foreground "darkslategray")))) - '(term-default-fg ((t (nil)))) - '(term-default-fg-inv ((t (nil)))) - '(term-default-inv-face ((t (:background "darkslategray" :foreground "snow2")))) - '(term-default-ul-face ((t (:underline t :background "snow2" :foreground "darkslategray")))) - '(term-green ((t (:foreground "green")))) - '(term-green-bold-face ((t (:bold t :background "snow2" :foreground "green")))) - '(term-green-face ((t (:foreground "green")))) - '(term-green-inv-face ((t (:background "green")))) - '(term-green-ul-face ((t (:underline t :background "snow2" :foreground "green")))) - '(term-greenbg ((t (:background "green")))) - '(term-invisible ((t (nil)))) - '(term-invisible-inv ((t (nil)))) - '(term-magenta ((t (:foreground "magenta")))) - '(term-magenta-bold-face ((t (:bold t :background "snow2" :foreground "magenta")))) - '(term-magenta-face ((t (:foreground "magenta")))) - '(term-magenta-inv-face ((t (:background "magenta")))) - '(term-magenta-ul-face ((t (:underline t :background "snow2" :foreground "magenta")))) - '(term-magentabg ((t (:background "magenta")))) - '(term-red ((t (:foreground "red")))) - '(term-red-bold-face ((t (:bold t :background "snow2" :foreground "red")))) - '(term-red-face ((t (:foreground "red")))) - '(term-red-inv-face ((t (:background "red")))) - '(term-red-ul-face ((t (:underline t :background "snow2" :foreground "red")))) - '(term-redbg ((t (:background "red")))) - '(term-underline ((t (:underline t)))) - '(term-white ((t (:foreground "white")))) - '(term-white-bold-face ((t (:bold t :background "snow2" :foreground "white")))) - '(term-white-face ((t (:foreground "white")))) - '(term-white-inv-face ((t (:background "snow2")))) - '(term-white-ul-face ((t (:underline t :background "snow2" :foreground "white")))) - '(term-whitebg ((t (:background "white")))) - '(term-yellow ((t (:foreground "yellow")))) - '(term-yellow-bold-face ((t (:bold t :background "snow2" :foreground "yellow")))) - '(term-yellow-face ((t (:foreground "yellow")))) - '(term-yellow-inv-face ((t (:background "yellow")))) - '(term-yellow-ul-face ((t (:underline t :background "snow2" :foreground "yellow")))) - '(term-yellowbg ((t (:background "yellow")))) - '(text-cursor ((t (:bold t :background "Red3" :foreground "gray80")))) - '(toolbar ((t (:bold t :background "Gray80")))) - '(underline ((t (:underline t :bold t)))) - '(vc-annotate-face-0046FF ((t (nil)))) - '(vcursor ((t (:underline t :background "cyan" :foreground "blue")))) - '(vertical-divider ((t (:bold t :background "Gray80")))) - '(vhdl-font-lock-attribute-face ((t (:foreground "Orchid")))) - '(vhdl-font-lock-directive-face ((t (:foreground "CadetBlue")))) - '(vhdl-font-lock-enumvalue-face ((t (:foreground "Gold4")))) - '(vhdl-font-lock-function-face ((t (:foreground "Orchid4")))) - '(vhdl-font-lock-generic-/constant-face ((t (nil)))) - '(vhdl-font-lock-prompt-face ((t (:bold t :foreground "Red")))) - '(vhdl-font-lock-reserved-words-face ((t (:bold t :foreground "Orange")))) - '(vhdl-font-lock-translate-off-face ((t (:background "LightGray")))) - '(vhdl-font-lock-type-face ((t (nil)))) - '(vhdl-font-lock-variable-face ((t (nil)))) - '(vhdl-speedbar-architecture-face ((t (:foreground "Blue")))) - '(vhdl-speedbar-architecture-selected-face ((t (:underline t :foreground "Blue")))) - '(vhdl-speedbar-configuration-face ((t (:foreground "DarkGoldenrod")))) - '(vhdl-speedbar-configuration-selected-face ((t (:underline t :foreground "DarkGoldenrod")))) - '(vhdl-speedbar-entity-face ((t (:foreground "ForestGreen")))) - '(vhdl-speedbar-entity-selected-face ((t (:underline t :foreground "ForestGreen")))) - '(vhdl-speedbar-instantiation-face ((t (:foreground "Brown")))) - '(vhdl-speedbar-instantiation-selected-face ((t (:underline t :foreground "Brown")))) - '(vhdl-speedbar-package-face ((t (:foreground "Grey50")))) - '(vhdl-speedbar-package-selected-face ((t (:underline t :foreground "Grey50")))) - '(vhdl-speedbar-subprogram-face ((t (nil)))) - '(viper-minibuffer-emacs-face ((t (:background "darkseagreen2" :foreground "Black")))) - '(viper-minibuffer-insert-face ((t (:background "pink" :foreground "Black")))) - '(viper-minibuffer-vi-face ((t (:background "grey" :foreground "DarkGreen")))) - '(viper-replace-overlay-face ((t (:background "darkseagreen2" :foreground "Black")))) - '(viper-search-face ((t (:background "khaki" :foreground "Black")))) - '(vm-xface ((t (:background "white" :foreground "black")))) - '(vmpc-pre-sig-face ((t (:foreground "forestgreen")))) - '(vmpc-sig-face ((t (:foreground "steelblue")))) - '(vvb-face ((t (nil)))) - '(w3m-anchor-face ((t (:bold t :foreground "DodgerBlue1")))) - '(w3m-arrived-anchor-face ((t (:bold t :foreground "DodgerBlue3")))) - '(w3m-header-line-location-content-face ((t (:background "dark olive green" :foreground "wheat")))) - '(w3m-header-line-location-title-face ((t (:background "dark olive green" :foreground "beige")))) - '(white ((t (:foreground "white")))) - '(widget ((t (nil)))) - '(widget-button-face ((t (:bold t)))) - '(widget-button-pressed-face ((t (:bold t :foreground "red")))) - '(widget-documentation-face ((t (:bold t :foreground "dark green")))) - '(widget-field-face ((t (:bold t :background "gray85")))) - '(widget-inactive-face ((t (:bold t :foreground "dim gray")))) - '(widget-single-line-field-face ((t (:background "gray85")))) - '(woman-bold-face ((t (:bold t)))) - '(woman-italic-face ((t (:foreground "beige")))) - '(woman-unknown-face ((t (:foreground "LightSalmon")))) - '(x-face ((t (:bold t :background "white" :foreground "black")))) - '(x-symbol-adobe-fontspecific-face ((t (nil)))) - '(x-symbol-face ((t (nil)))) - '(x-symbol-heading-face ((t (:bold t)))) - '(x-symbol-info-face ((t (nil)))) - '(x-symbol-invisible-face ((t (nil)))) - '(x-symbol-revealed-face ((t (nil)))) - '(xrdb-option-name-face ((t (:foreground "red")))) - '(xref-keyword-face ((t (:foreground "blue")))) - '(xref-list-default-face ((t (nil)))) - '(xref-list-pilot-face ((t (:foreground "navy")))) - '(xref-list-symbol-face ((t (:foreground "navy")))) - '(yellow ((t (:bold t :foreground "yellow")))) - '(zmacs-region ((t (:bold t :background "gray65"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'digital-ofs1) - -;;; digital-ofs1-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/emacs-21-theme.el b/elpa/color-theme-modern-0.0.3/emacs-21-theme.el deleted file mode 100644 index 8d453c9..0000000 --- a/elpa/color-theme-modern-0.0.3/emacs-21-theme.el +++ /dev/null @@ -1,391 +0,0 @@ -;;; emacs-21-theme.el --- emacs-21 theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of emacs-21 theme from `color-themes' - -;;; Code: - -(deftheme emacs-21 - "emacs-21 theme") - -(custom-theme-set-faces - 'emacs-21 - - '(default ((t (:background "white" :foreground "black")))) - '(mouse ((t (:background "black")))) - '(cursor ((t (:background "black")))) - '(border ((t (:background "black")))) - - '(Man-overstrike-face ((t (:bold t :weight bold)))) - '(Man-underline-face ((t (:underline t)))) - '(cperl-here-face ((t (:foreground "RosyBrown")))) - '(cperl-invalid-face ((t (:underline t)))) - '(cperl-pod-face ((t (:foreground "Firebrick")))) - '(cperl-pod-head-face ((t (:foreground "DarkGoldenrod")))) - '(gnus-article-button-face ((t (:bold t :weight bold)))) - '(gnus-article-mouse-face ((t (:background "darkseagreen2")))) - '(gnus-mouse-face ((t (:background "darkseagreen2")))) - '(help-highlight-face ((t (:underline t)))) - '(idlwave-class-arrow-face ((t (:bold t :weight bold)))) - '(idlwave-shell-breakpoint-face ((t (:background "Pink" :foreground "Black")))) - '(idlwave-shell-expression-face ((t (:background "yellow")))) - '(idlwave-shell-stop-line-face ((t (:background "darkseagreen2")))) - '(ispell-highlight-face ((t (:background "darkseagreen2")))) - '(list-matching-lines-face ((t (:bold t :weight bold)))) - '(view-highlight-face ((t (:background "darkseagreen2")))) - '(widget-mouse-face ((t (:background "darkseagreen2")))) - '(Info-title-1-face ((t (:bold t :weight bold :height 1.728)))) - '(Info-title-2-face ((t (:bold t :weight bold :height 1.44)))) - '(Info-title-3-face ((t (:bold t :weight bold :height 1.2)))) - '(Info-title-4-face ((t (:bold t :weight bold)))) - '(antlr-font-lock-keyword-face ((t (:bold t :foreground "black" :weight bold)))) - '(antlr-font-lock-literal-face ((t (:bold t :foreground "brown4" :weight bold)))) - '(antlr-font-lock-ruledef-face ((t (:bold t :foreground "blue" :weight bold)))) - '(antlr-font-lock-ruleref-face ((t (:foreground "blue4")))) - '(antlr-font-lock-tokendef-face ((t (:bold t :foreground "blue" :weight bold)))) - '(antlr-font-lock-tokenref-face ((t (:foreground "orange4")))) - '(bold ((t (:bold t :weight bold)))) - '(bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) - '(calendar-today-face ((t (:underline t)))) - '(change-log-acknowledgement-face ((t (:foreground "Firebrick")))) - '(change-log-conditionals-face ((t (:foreground "DarkGoldenrod")))) - '(change-log-date-face ((t (:foreground "RosyBrown")))) - '(change-log-email-face ((t (:foreground "DarkGoldenrod")))) - '(change-log-file-face ((t (:foreground "Blue")))) - '(change-log-function-face ((t (:foreground "DarkGoldenrod")))) - '(change-log-list-face ((t (:foreground "Purple")))) - '(change-log-name-face ((t (:foreground "CadetBlue")))) - '(comint-highlight-input ((t (:bold t :weight bold)))) - '(comint-highlight-prompt ((t (:foreground "dark blue")))) - '(cperl-array-face ((t (:bold t :background "lightyellow2" :foreground "Blue" :weight bold)))) - '(cperl-hash-face ((t (:italic t :bold t :background "lightyellow2" :foreground "Red" :slant italic :weight bold)))) - '(cperl-nonoverridable-face ((t (:foreground "chartreuse3")))) - '(custom-button-face ((t (:background "lightgrey" :foreground "black" - :box (:line-width 2 :style released-button))))) - '(custom-button-pressed-face ((t (:background "lightgrey" :foreground "black" - :box (:line-width 2 :style pressed-button))))) - '(custom-changed-face ((t (:background "blue" :foreground "white")))) - '(custom-comment-face ((t (:background "gray85")))) - '(custom-comment-tag-face ((t (:foreground "blue4")))) - '(custom-documentation-face ((t (nil)))) - '(custom-face-tag-face ((t (:bold t :weight bold :height 1.2)))) - '(custom-group-tag-face ((t (:bold t :foreground "blue" :weight bold :height 1.2)))) - '(custom-group-tag-face-1 ((t (:bold t :foreground "red" :weight bold :height 1.2)))) - '(custom-invalid-face ((t (:background "red" :foreground "yellow")))) - '(custom-modified-face ((t (:background "blue" :foreground "white")))) - '(custom-rogue-face ((t (:background "black" :foreground "pink")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:background "white" :foreground "blue")))) - '(custom-state-face ((t (:foreground "dark green")))) - '(custom-variable-button-face ((t (:bold t :underline t :weight bold)))) - '(custom-variable-tag-face ((t (:bold t :foreground "blue" :weight bold :height 1.2)))) - '(cvs-filename-face ((t (:foreground "blue4")))) - '(cvs-handled-face ((t (:foreground "pink")))) - '(cvs-header-face ((t (:bold t :foreground "blue4" :weight bold)))) - '(cvs-marked-face ((t (:bold t :foreground "green3" :weight bold)))) - '(cvs-msg-face ((t (:italic t :slant italic)))) - '(cvs-need-action-face ((t (:foreground "orange")))) - '(cvs-unknown-face ((t (:foreground "red")))) - '(diary-face ((t (:foreground "red")))) - '(diff-added-face ((t (nil)))) - '(diff-changed-face ((t (nil)))) - '(diff-context-face ((t (:foreground "grey50")))) - '(diff-file-header-face ((t (:bold t :background "grey70" :weight bold)))) - '(diff-function-face ((t (:foreground "grey50")))) - '(diff-header-face ((t (:background "grey85")))) - '(diff-hunk-header-face ((t (:background "grey85")))) - '(diff-index-face ((t (:bold t :weight bold :background "grey70")))) - '(diff-nonexistent-face ((t (:bold t :weight bold :background "grey70")))) - '(diff-removed-face ((t (nil)))) - '(dired-face-boring ((t (:foreground "RosyBrown")))) - '(dired-face-directory ((t (:foreground "Blue")))) - '(dired-face-executable ((t (nil)))) - '(dired-face-flagged ((t (:foreground "Red" :weight bold)))) - '(dired-face-marked ((t (:foreground "Red" :weight bold)))) - '(dired-face-permissions ((t (nil)))) - '(dired-face-setuid ((t (nil)))) - '(dired-face-socket ((t (nil)))) - '(dired-face-symlink ((t (:foreground "Purple")))) - '(ebrowse-default-face ((t (nil)))) - '(ebrowse-file-name-face ((t (:italic t :slant italic)))) - '(ebrowse-member-attribute-face ((t (:foreground "red")))) - '(ebrowse-member-class-face ((t (:foreground "purple")))) - '(ebrowse-progress-face ((t (:background "blue")))) - '(ebrowse-root-class-face ((t (:bold t :foreground "blue" :weight bold)))) - '(ebrowse-tree-mark-face ((t (:foreground "red")))) - '(ediff-current-diff-face-A ((t (:background "pale green" :foreground "firebrick")))) - '(ediff-current-diff-face-Ancestor ((t (:background "VioletRed" :foreground "Black")))) - '(ediff-current-diff-face-B ((t (:background "Yellow" :foreground "DarkOrchid")))) - '(ediff-current-diff-face-C ((t (:background "Pink" :foreground "Navy")))) - '(ediff-even-diff-face-A ((t (:background "light grey" :foreground "Black")))) - '(ediff-even-diff-face-Ancestor ((t (:background "Grey" :foreground "White")))) - '(ediff-even-diff-face-B ((t (:background "Grey" :foreground "White")))) - '(ediff-even-diff-face-C ((t (:background "light grey" :foreground "Black")))) - '(ediff-fine-diff-face-A ((t (:background "sky blue" :foreground "Navy")))) - '(ediff-fine-diff-face-Ancestor ((t (:background "Green" :foreground "Black")))) - '(ediff-fine-diff-face-B ((t (:background "cyan" :foreground "Black")))) - '(ediff-fine-diff-face-C ((t (:background "Turquoise" :foreground "Black")))) - '(ediff-odd-diff-face-A ((t (:background "Grey" :foreground "White")))) - '(ediff-odd-diff-face-Ancestor ((t (:background "light grey" :foreground "Black")))) - '(ediff-odd-diff-face-B ((t (:background "light grey" :foreground "Black")))) - '(ediff-odd-diff-face-C ((t (:background "Grey" :foreground "White")))) - '(eshell-ls-archive-face ((t (:bold t :foreground "Orchid" :weight bold)))) - '(eshell-ls-backup-face ((t (:foreground "OrangeRed")))) - '(eshell-ls-clutter-face ((t (:bold t :foreground "OrangeRed" :weight bold)))) - '(eshell-ls-directory-face ((t (:bold t :foreground "Blue" :weight bold)))) - '(eshell-ls-executable-face ((t (:bold t :foreground "ForestGreen" :weight bold)))) - '(eshell-ls-missing-face ((t (:bold t :foreground "Red" :weight bold)))) - '(eshell-ls-product-face ((t (:foreground "OrangeRed")))) - '(eshell-ls-readonly-face ((t (:foreground "Brown")))) - '(eshell-ls-special-face ((t (:bold t :foreground "Magenta" :weight bold)))) - '(eshell-ls-symlink-face ((t (:bold t :foreground "Dark Cyan" :weight bold)))) - '(eshell-ls-unreadable-face ((t (:foreground "Grey30")))) - '(eshell-prompt-face ((t (:bold t :foreground "Red" :weight bold)))) - '(eshell-test-failed-face ((t (:bold t :foreground "OrangeRed" :weight bold)))) - '(eshell-test-ok-face ((t (:bold t :foreground "Green" :weight bold)))) - '(excerpt ((t (:italic t :slant italic)))) - '(fixed ((t (:bold t :weight bold)))) - '(fixed-pitch ((t (:family "courier")))) - '(flyspell-duplicate-face ((t (:bold t :foreground "Gold3" :underline t :weight bold)))) - '(flyspell-incorrect-face ((t (:bold t :foreground "OrangeRed" :underline t :weight bold)))) - '(font-lock-builtin-face ((t (:foreground "Orchid")))) - '(font-lock-comment-face ((t (:foreground "Firebrick")))) - '(font-lock-constant-face ((t (:foreground "CadetBlue")))) - '(font-lock-doc-face ((t (:foreground "RosyBrown")))) - '(font-lock-doc-string-face ((t (:foreground "RosyBrown")))) - '(font-lock-function-name-face ((t (:foreground "Blue")))) - '(font-lock-keyword-face ((t (:foreground "Purple")))) - '(font-lock-preprocessor-face ((t (:foreground "CadetBlue")))) - '(font-lock-reference-face ((t (:foreground "Orchid")))) - '(font-lock-string-face ((t (:foreground "RosyBrown")))) - '(font-lock-type-face ((t (:foreground "ForestGreen")))) - '(font-lock-variable-name-face ((t (:foreground "DarkGoldenrod")))) - '(font-lock-warning-face ((t (:bold t :foreground "Red" :weight bold)))) - '(fringe ((t (:background "grey95")))) - '(gnus-cite-attribution-face ((t (:italic t :slant italic)))) - '(gnus-cite-face-1 ((t (:foreground "MidnightBlue")))) - '(gnus-cite-face-10 ((t (:foreground "medium purple")))) - '(gnus-cite-face-11 ((t (:foreground "turquoise")))) - '(gnus-cite-face-2 ((t (:foreground "firebrick")))) - '(gnus-cite-face-3 ((t (:foreground "dark green")))) - '(gnus-cite-face-4 ((t (:foreground "OrangeRed")))) - '(gnus-cite-face-5 ((t (:foreground "dark khaki")))) - '(gnus-cite-face-6 ((t (:foreground "dark violet")))) - '(gnus-cite-face-7 ((t (:foreground "SteelBlue4")))) - '(gnus-cite-face-8 ((t (:foreground "magenta")))) - '(gnus-cite-face-9 ((t (:foreground "violet")))) - '(gnus-emphasis-bold ((t (:bold t :weight bold)))) - '(gnus-emphasis-bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) - '(gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) - '(gnus-emphasis-italic ((t (:italic t :slant italic)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(gnus-emphasis-underline-bold ((t (:bold t :underline t :weight bold)))) - '(gnus-emphasis-underline-bold-italic ((t (:italic t :bold t :underline t :slant italic :weight bold)))) - '(gnus-emphasis-underline-italic ((t (:italic t :underline t :slant italic)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "DeepPink3")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "DeepPink3" :weight bold)))) - '(gnus-group-mail-2-empty-face ((t (:foreground "HotPink3")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "HotPink3" :weight bold)))) - '(gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "magenta4" :weight bold)))) - '(gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "DeepPink4" :weight bold)))) - '(gnus-group-news-1-empty-face ((t (:foreground "ForestGreen")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "ForestGreen" :weight bold)))) - '(gnus-group-news-2-empty-face ((t (:foreground "CadetBlue4")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "CadetBlue4" :weight bold)))) - '(gnus-group-news-3-empty-face ((t (nil)))) - '(gnus-group-news-3-face ((t (:bold t :weight bold)))) - '(gnus-group-news-4-empty-face ((t (nil)))) - '(gnus-group-news-4-face ((t (:bold t :weight bold)))) - '(gnus-group-news-5-empty-face ((t (nil)))) - '(gnus-group-news-5-face ((t (:bold t :weight bold)))) - '(gnus-group-news-6-empty-face ((t (nil)))) - '(gnus-group-news-6-face ((t (:bold t :weight bold)))) - '(gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "DarkGreen" :weight bold)))) - '(gnus-header-content-face ((t (:italic t :foreground "indianred4" :slant italic)))) - '(gnus-header-from-face ((t (:foreground "red3")))) - '(gnus-header-name-face ((t (:foreground "maroon")))) - '(gnus-header-newsgroups-face ((t (:italic t :foreground "MidnightBlue" :slant italic)))) - '(gnus-header-subject-face ((t (:foreground "red4")))) - '(gnus-signature-face ((t (:italic t :slant italic)))) - '(gnus-splash-face ((t (:foreground "Brown")))) - '(gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "RoyalBlue" :weight bold)))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "DarkGreen" :weight bold)))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "firebrick" :weight bold)))) - '(gnus-summary-high-unread-face ((t (:bold t :weight bold)))) - '(gnus-summary-low-ancient-face ((t (:italic t :foreground "RoyalBlue" :slant italic)))) - '(gnus-summary-low-read-face ((t (:italic t :foreground "DarkGreen" :slant italic)))) - '(gnus-summary-low-ticked-face ((t (:italic t :foreground "firebrick" :slant italic)))) - '(gnus-summary-low-unread-face ((t (:italic t :slant italic)))) - '(gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) - '(gnus-summary-normal-read-face ((t (:foreground "DarkGreen")))) - '(gnus-summary-normal-ticked-face ((t (:foreground "firebrick")))) - '(gnus-summary-normal-unread-face ((t (nil)))) - '(gnus-summary-selected-face ((t (:underline t)))) - '(header-line ((t (:box (:line-width -1 :style released-button) :background "grey90" :foreground "grey20" :box nil)))) - '(hi-black-b ((t (:bold t :weight bold)))) - '(hi-black-hb ((t (:bold t :weight bold :height 1.67)))) - '(hi-blue ((t (:background "light blue")))) - '(hi-blue-b ((t (:bold t :foreground "blue" :weight bold)))) - '(hi-green ((t (:background "green")))) - '(hi-green-b ((t (:bold t :foreground "green" :weight bold)))) - '(hi-pink ((t (:background "pink")))) - '(hi-red-b ((t (:bold t :foreground "red" :weight bold)))) - '(hi-yellow ((t (:background "yellow")))) - '(highlight ((t (:background "darkseagreen2")))) - '(highlight-changes-delete-face ((t (:foreground "red" :underline t)))) - '(highlight-changes-face ((t (:foreground "red")))) - '(holiday-face ((t (:background "pink")))) - '(idlwave-help-link-face ((t (:foreground "Blue")))) - '(idlwave-shell-bp-face ((t (:background "Pink" :foreground "Black")))) - '(info-header-node ((t (:italic t :bold t :weight bold :slant italic :foreground "brown")))) - '(info-header-xref ((t (:bold t :weight bold :foreground "magenta4")))) - '(info-menu-5 ((t (:foreground "red1")))) - '(info-menu-header ((t (:bold t :weight bold)))) - '(info-node ((t (:italic t :bold t :foreground "brown" :slant italic :weight bold)))) - '(info-xref ((t (:bold t :foreground "magenta4" :weight bold)))) - '(isearch ((t (:background "magenta4" :foreground "lightskyblue1")))) - '(isearch-lazy-highlight-face ((t (:background "paleturquoise")))) - '(italic ((t (:italic t :slant italic)))) - '(log-view-file-face ((t (:bold t :background "grey70" :weight bold)))) - '(log-view-message-face ((t (:background "grey85")))) - '(makefile-space-face ((t (:background "hotpink")))) - '(menu ((t (nil)))) - '(message-cited-text-face ((t (:foreground "red")))) - '(message-header-cc-face ((t (:foreground "MidnightBlue")))) - '(message-header-name-face ((t (:foreground "cornflower blue")))) - '(message-header-newsgroups-face ((t (:italic t :bold t :foreground "blue4" :slant italic :weight bold)))) - '(message-header-other-face ((t (:foreground "steel blue")))) - '(message-header-subject-face ((t (:bold t :foreground "navy blue" :weight bold)))) - '(message-header-to-face ((t (:bold t :foreground "MidnightBlue" :weight bold)))) - '(message-header-xheader-face ((t (:foreground "blue")))) - '(message-mml-face ((t (:foreground "ForestGreen")))) - '(message-separator-face ((t (:foreground "brown")))) - '(modeline ((t (:background "grey75" :foreground "black" :box (:line-width -1 :style released-button))))) - '(modeline-buffer-id ((t (:bold t :background "grey75" :foreground "black" :box (:line-width -1 :style released-button))))) - '(modeline-mousable ((t (:background "grey75" :foreground "black" :box (:line-width -1 :style released-button))))) - '(modeline-mousable-minor-mode ((t (:background "grey75" :foreground "black" :box (:line-width -1 :style released-button))))) - '(primary-selection ((t (:background "lightgoldenrod2")))) - '(reb-match-0 ((t (:background "lightblue")))) - '(reb-match-1 ((t (:background "aquamarine")))) - '(reb-match-2 ((t (:background "springgreen")))) - '(reb-match-3 ((t (:background "yellow")))) - '(region ((t (:background "lightgoldenrod2")))) - '(scroll-bar ((t (:background "grey75")))) - '(secondary-selection ((t (:background "yellow")))) - '(sh-heredoc-face ((t (:foreground "tan")))) - '(show-paren-match-face ((t (:background "turquoise")))) - '(show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) - '(show-tabs-space-face ((t (:foreground "yellow")))) - '(show-tabs-tab-face ((t (:foreground "red")))) - '(smerge-base-face ((t (:foreground "red")))) - '(smerge-markers-face ((t (:background "grey85")))) - '(smerge-mine-face ((t (:foreground "blue")))) - '(smerge-other-face ((t (:foreground "darkgreen")))) - '(speedbar-button-face ((t (:foreground "green4")))) - '(speedbar-directory-face ((t (:foreground "blue4")))) - '(speedbar-file-face ((t (:foreground "cyan4")))) - '(speedbar-highlight-face ((t (:background "green")))) - '(speedbar-selected-face ((t (:foreground "red" :underline t)))) - '(speedbar-tag-face ((t (:foreground "brown")))) - '(strokes-char-face ((t (:background "lightgray")))) - '(term-black ((t (:stipple nil :background "white" :foreground "black")))) - '(term-blackbg ((t (:stipple nil :background "black" :foreground "black")))) - '(term-blue ((t (:stipple nil :background "white" :foreground "blue")))) - '(term-bluebg ((t (:stipple nil :background "blue" :foreground "black")))) - '(term-bold ((t (:bold t :stipple nil :background "white" :foreground "black")))) - '(term-cyan ((t (:stipple nil :background "white" :foreground "cyan")))) - '(term-cyanbg ((t (:stipple nil :background "cyan" :foreground "black")))) - '(term-default ((t (:stipple nil :background "white" :foreground "black")))) - '(term-default-bg ((t (:stipple nil :foreground "black")))) - '(term-default-bg-inv ((t (:stipple nil :foreground "black")))) - '(term-default-fg ((t (:stipple nil :background "white")))) - '(term-default-fg-inv ((t (:stipple nil :background "white")))) - '(term-green ((t (:stipple nil :background "white" :foreground "green")))) - '(term-greenbg ((t (:stipple nil :background "green" :foreground "black")))) - '(term-invisible ((t (:stipple nil :foreground "black")))) - '(term-invisible-inv ((t (:stipple nil :foreground "black")))) - '(term-magenta ((t (:stipple nil :background "white" :foreground "magenta")))) - '(term-magentabg ((t (:stipple nil :background "magenta" :foreground "black")))) - '(term-red ((t (:stipple nil :background "white" :foreground "red")))) - '(term-redbg ((t (:stipple nil :background "red" :foreground "black")))) - '(term-underline ((t (:stipple nil :background "white" :foreground "black")))) - '(term-white ((t (:stipple nil :background "white" :foreground "white")))) - '(term-whitebg ((t (:stipple nil :background "white" :foreground "black")))) - '(term-yellow ((t (:stipple nil :background "white" :foreground "yellow")))) - '(term-yellowbg ((t (:stipple nil :background "yellow" :foreground "black")))) - '(tex-math-face ((t (:foreground "RosyBrown")))) - '(texinfo-heading-face ((t (:foreground "Blue")))) - '(tool-bar ((t (:background "grey75" :foreground "black" - :box (:line-width 1 :style released-button))))) - '(tooltip ((t (:background "lightyellow" :foreground "black")))) - '(trailing-whitespace ((t (:background "red")))) - '(underline ((t (:underline t)))) - '(vcursor ((t (:background "cyan" :foreground "blue" :underline t)))) - '(vhdl-font-lock-attribute-face ((t (:foreground "Orchid")))) - '(vhdl-font-lock-directive-face ((t (:foreground "CadetBlue")))) - '(vhdl-font-lock-enumvalue-face ((t (:foreground "Gold4")))) - '(vhdl-font-lock-function-face ((t (:foreground "Orchid4")))) - '(vhdl-font-lock-prompt-face ((t (:bold t :foreground "Red" :weight bold)))) - '(vhdl-font-lock-reserved-words-face ((t (:bold t :foreground "Orange" :weight bold)))) - '(vhdl-font-lock-translate-off-face ((t (:background "LightGray")))) - '(vhdl-speedbar-architecture-face ((t (:foreground "Blue")))) - '(vhdl-speedbar-architecture-selected-face ((t (:foreground "Blue" :underline t)))) - '(vhdl-speedbar-configuration-face ((t (:foreground "DarkGoldenrod")))) - '(vhdl-speedbar-configuration-selected-face ((t (:foreground "DarkGoldenrod" :underline t)))) - '(vhdl-speedbar-entity-face ((t (:foreground "ForestGreen")))) - '(vhdl-speedbar-entity-selected-face ((t (:foreground "ForestGreen" :underline t)))) - '(vhdl-speedbar-instantiation-face ((t (:foreground "Brown")))) - '(vhdl-speedbar-instantiation-selected-face ((t (:foreground "Brown" :underline t)))) - '(vhdl-speedbar-package-face ((t (:foreground "Grey50")))) - '(vhdl-speedbar-package-selected-face ((t (:foreground "Grey50" :underline t)))) - '(viper-minibuffer-emacs-face ((t (:background "darkseagreen2" :foreground "Black")))) - '(viper-minibuffer-insert-face ((t (:background "pink" :foreground "Black")))) - '(viper-minibuffer-vi-face ((t (:background "grey" :foreground "DarkGreen")))) - '(viper-replace-overlay-face ((t (:background "darkseagreen2" :foreground "Black")))) - '(viper-search-face ((t (:background "khaki" :foreground "Black")))) - '(widget-button-face ((t (:bold t :weight bold)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "dark green")))) - '(widget-field-face ((t (:background "gray85")))) - '(widget-inactive-face ((t (:foreground "dim gray")))) - '(widget-single-line-field-face ((t (:background "gray85")))) - '(woman-addition-face ((t (:foreground "orange")))) - '(woman-bold-face ((t (:bold t :foreground "blue" :weight bold)))) - '(woman-italic-face ((t (:italic t :foreground "red" :underline t :slant italic)))) - '(woman-unknown-face ((t (:foreground "brown")))) - '(zmacs-region ((t (:background "lightgoldenrod2")))) ) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'emacs-21) - -;;; emacs-21-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/emacs-nw-theme.el b/elpa/color-theme-modern-0.0.3/emacs-nw-theme.el deleted file mode 100644 index dc539d3..0000000 --- a/elpa/color-theme-modern-0.0.3/emacs-nw-theme.el +++ /dev/null @@ -1,400 +0,0 @@ -;;; emacs-nw-theme.el --- emacs-nw theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of emacs-nw theme from `color-themes' - -;;; Code: - -(deftheme emacs-nw - "emacs-nw theme") - -(custom-theme-set-faces - 'emacs-nw - - '(default ((t (:background "white" :foreground "black")))) - '(mouse ((t (:background "black")))) - '(cursor ((t (:background "black")))) - '(border ((t (:background "black")))) - - '(Man-overstrike-face ((t (:bold t :weight bold)))) - '(Man-underline-face ((t (:underline t)))) - '(cperl-here-face ((t (:foreground "RosyBrown")))) - '(cperl-invalid-face ((t (:underline t)))) - '(cperl-pod-face ((t (:foreground "Firebrick")))) - '(cperl-pod-head-face ((t (:foreground "DarkGoldenrod")))) - '(gnus-article-button-face ((t (:bold t :weight bold)))) - '(gnus-article-mouse-face ((t (:background "darkseagreen2")))) - '(gnus-mouse-face ((t (:background "darkseagreen2")))) - '(help-highlight-face ((t (:underline t)))) - '(idlwave-class-arrow-face ((t (:bold t :weight bold)))) - '(idlwave-shell-breakpoint-face ((t (:background "Pink" :foreground "Black")))) - '(idlwave-shell-expression-face ((t (:background "yellow")))) - '(idlwave-shell-stop-line-face ((t (:background "darkseagreen2")))) - '(ispell-highlight-face ((t (:background "darkseagreen2")))) - '(list-matching-lines-face ((t (:bold t :weight bold)))) - '(view-highlight-face ((t (:background "darkseagreen2")))) - '(widget-mouse-face ((t (:background "darkseagreen2")))) - - '(Info-title-1-face ((t (:bold t :weight bold :family "helv" :height 1.728)))) - '(Info-title-2-face ((t (:bold t :family "helv" :weight bold :height 1.44)))) - '(Info-title-3-face ((t (:bold t :weight bold :family "helv" :height 1.2)))) - '(Info-title-4-face ((t (:bold t :family "helv" :weight bold)))) - '(antlr-font-lock-keyword-face ((t (:bold t :foreground "black" :weight bold)))) - '(antlr-font-lock-literal-face ((t (:bold t :foreground "brown4" :weight bold)))) - '(antlr-font-lock-ruledef-face ((t (:bold t :foreground "blue" :weight bold)))) - '(antlr-font-lock-ruleref-face ((t (:foreground "blue4")))) - '(antlr-font-lock-tokendef-face ((t (:bold t :foreground "blue" :weight bold)))) - '(antlr-font-lock-tokenref-face ((t (:foreground "orange4")))) - '(bold ((t (:bold t :weight bold)))) - '(bold-italic ((t (:italic t :bold t :weight bold)))) - '(calendar-today-face ((t (:underline t)))) - '(change-log-acknowledgement-face ((t (:foreground "Firebrick")))) - '(change-log-conditionals-face ((t (:foreground "DarkGoldenrod")))) - '(change-log-date-face ((t (:foreground "RosyBrown")))) - '(change-log-email-face ((t (:foreground "DarkGoldenrod")))) - '(change-log-file-face ((t (:foreground "Blue")))) - '(change-log-function-face ((t (:foreground "DarkGoldenrod")))) - '(change-log-list-face ((t (:foreground "Purple")))) - '(change-log-name-face ((t (:foreground "CadetBlue")))) - '(comint-highlight-input ((t (:bold t :weight bold)))) - '(comint-highlight-prompt ((t (:foreground "dark blue")))) - '(cperl-array-face ((t (:bold t :background "lightyellow2" :foreground "Blue" :weight bold)))) - '(cperl-hash-face ((t (:italic t :bold t :background "lightyellow2" :foreground "Red" :weight bold)))) - '(cperl-nonoverridable-face ((t (:foreground "chartreuse3")))) - '(custom-button-face ((t (:background "lightgrey" :foreground "black" - :box (:line-width 2 :style released-button))))) - '(custom-button-pressed-face ((t (:background "lightgrey" :foreground "black" - :box (:line-width 2 :style pressed-button))))) - '(custom-changed-face ((t (:background "blue" :foreground "white")))) - '(custom-comment-face ((t (:background "gray85")))) - '(custom-comment-tag-face ((t (:foreground "blue4")))) - '(custom-documentation-face ((t (nil)))) - '(custom-face-tag-face ((t (:bold t :family "helv" :weight bold :height 1.2)))) - '(custom-group-tag-face ((t (:bold t :foreground "blue" :weight bold :height 1.2)))) - '(custom-group-tag-face-1 ((t (:bold t :family "helv" :foreground "red" :weight bold :height 1.2)))) - '(custom-invalid-face ((t (:background "red" :foreground "yellow")))) - '(custom-modified-face ((t (:background "blue" :foreground "white")))) - '(custom-rogue-face ((t (:background "black" :foreground "pink")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:background "white" :foreground "blue")))) - '(custom-state-face ((t (:foreground "dark green")))) - '(custom-variable-button-face ((t (:bold t :underline t :weight bold)))) - '(custom-variable-tag-face ((t (:bold t :family "helv" :foreground "blue" :weight bold :height 1.2)))) - '(cvs-filename-face ((t (:foreground "blue4")))) - '(cvs-handled-face ((t (:foreground "pink")))) - '(cvs-header-face ((t (:bold t :foreground "blue4" :weight bold)))) - '(cvs-marked-face ((t (:bold t :foreground "green3" :weight bold)))) - '(cvs-msg-face ((t (:italic t)))) - '(cvs-need-action-face ((t (:foreground "orange")))) - '(cvs-unknown-face ((t (:foreground "red")))) - '(diary-face ((t (:foreground "red")))) - '(diff-added-face ((t (nil)))) - '(diff-changed-face ((t (nil)))) - '(diff-context-face ((t (:foreground "grey50")))) - '(diff-file-header-face ((t (:bold t :background "grey70" :weight bold)))) - '(diff-function-face ((t (:foreground "grey50")))) - '(diff-header-face ((t (:background "grey85")))) - '(diff-hunk-header-face ((t (:background "grey85")))) - '(diff-index-face ((t (:bold t :weight bold :background "grey70")))) - '(diff-nonexistent-face ((t (:bold t :weight bold :background "grey70")))) - '(diff-removed-face ((t (nil)))) - '(dired-face-boring ((t (:foreground "RosyBrown")))) - '(dired-face-directory ((t (:foreground "Blue")))) - '(dired-face-executable ((t (nil)))) - '(dired-face-flagged ((t (:foreground "Red" :weight bold)))) - '(dired-face-marked ((t (:foreground "Red" :weight bold)))) - '(dired-face-permissions ((t (nil)))) - '(dired-face-setuid ((t (nil)))) - '(dired-face-socket ((t (nil)))) - '(dired-face-symlink ((t (:foreground "Purple")))) - '(ebrowse-default-face ((t (nil)))) - '(ebrowse-file-name-face ((t (:italic t)))) - '(ebrowse-member-attribute-face ((t (:foreground "red")))) - '(ebrowse-member-class-face ((t (:foreground "purple")))) - '(ebrowse-progress-face ((t (:background "blue")))) - '(ebrowse-root-class-face ((t (:bold t :foreground "blue" :weight bold)))) - '(ebrowse-tree-mark-face ((t (:foreground "red")))) - '(ediff-current-diff-face-A ((t (:background "pale green" :foreground "firebrick")))) - '(ediff-current-diff-face-Ancestor ((t (:background "VioletRed" :foreground "Black")))) - '(ediff-current-diff-face-B ((t (:background "Yellow" :foreground "DarkOrchid")))) - '(ediff-current-diff-face-C ((t (:background "Pink" :foreground "Navy")))) - '(ediff-even-diff-face-A ((t (:background "light grey" :foreground "Black")))) - '(ediff-even-diff-face-Ancestor ((t (:background "Grey" :foreground "White")))) - '(ediff-even-diff-face-B ((t (:background "Grey" :foreground "White")))) - '(ediff-even-diff-face-C ((t (:background "light grey" :foreground "Black")))) - '(ediff-fine-diff-face-A ((t (:background "sky blue" :foreground "Navy")))) - '(ediff-fine-diff-face-Ancestor ((t (:background "Green" :foreground "Black")))) - '(ediff-fine-diff-face-B ((t (:background "cyan" :foreground "Black")))) - '(ediff-fine-diff-face-C ((t (:background "Turquoise" :foreground "Black")))) - '(ediff-odd-diff-face-A ((t (:background "Grey" :foreground "White")))) - '(ediff-odd-diff-face-Ancestor ((t (:background "light grey" :foreground "Black")))) - '(ediff-odd-diff-face-B ((t (:background "light grey" :foreground "Black")))) - '(ediff-odd-diff-face-C ((t (:background "Grey" :foreground "White")))) - '(eshell-ls-archive-face ((t (:bold t :foreground "Orchid" :weight bold)))) - '(eshell-ls-backup-face ((t (:foreground "OrangeRed")))) - '(eshell-ls-clutter-face ((t (:bold t :foreground "OrangeRed" :weight bold)))) - '(eshell-ls-directory-face ((t (:bold t :foreground "Blue" :weight bold)))) - '(eshell-ls-executable-face ((t (:bold t :foreground "ForestGreen" :weight bold)))) - '(eshell-ls-missing-face ((t (:bold t :foreground "Red" :weight bold)))) - '(eshell-ls-product-face ((t (:foreground "OrangeRed")))) - '(eshell-ls-readonly-face ((t (:foreground "Brown")))) - '(eshell-ls-special-face ((t (:bold t :foreground "Magenta" :weight bold)))) - '(eshell-ls-symlink-face ((t (:bold t :foreground "Dark Cyan" :weight bold)))) - '(eshell-ls-unreadable-face ((t (:foreground "Grey30")))) - '(eshell-prompt-face ((t (:bold t :foreground "Red" :weight bold)))) - '(eshell-test-failed-face ((t (:bold t :foreground "OrangeRed" :weight bold)))) - '(eshell-test-ok-face ((t (:bold t :foreground "Green" :weight bold)))) - '(excerpt ((t (:italic t)))) - '(fixed ((t (:bold t :weight bold)))) - '(fixed-pitch ((t (:family "courier")))) - '(flyspell-duplicate-face ((t (:bold t :foreground "Gold3" :underline t :weight bold)))) - '(flyspell-incorrect-face ((t (:bold t :foreground "OrangeRed" :underline t :weight bold)))) - '(font-lock-builtin-face ((t (:foreground "Orchid")))) - '(font-lock-comment-face ((t (:foreground "Firebrick")))) - '(font-lock-constant-face ((t (:foreground "CadetBlue")))) - '(font-lock-doc-face ((t (:foreground "RosyBrown")))) - '(font-lock-doc-string-face ((t (:foreground "RosyBrown")))) - '(font-lock-function-name-face ((t (:foreground "Blue")))) - '(font-lock-keyword-face ((t (:foreground "Purple")))) - '(font-lock-preprocessor-face ((t (:foreground "CadetBlue")))) - '(font-lock-reference-face ((t (:foreground "Orchid")))) - '(font-lock-string-face ((t (:foreground "RosyBrown")))) - '(font-lock-type-face ((t (:foreground "ForestGreen")))) - '(font-lock-variable-name-face ((t (:foreground "DarkGoldenrod")))) - '(font-lock-warning-face ((t (:bold t :foreground "Red" :weight bold)))) - '(fringe ((t (:background "grey95")))) - '(gnus-cite-attribution-face ((t (:italic t)))) - '(gnus-cite-face-1 ((t (:foreground "MidnightBlue")))) - '(gnus-cite-face-10 ((t (:foreground "medium purple")))) - '(gnus-cite-face-11 ((t (:foreground "turquoise")))) - '(gnus-cite-face-2 ((t (:foreground "firebrick")))) - '(gnus-cite-face-3 ((t (:foreground "dark green")))) - '(gnus-cite-face-4 ((t (:foreground "OrangeRed")))) - '(gnus-cite-face-5 ((t (:foreground "dark khaki")))) - '(gnus-cite-face-6 ((t (:foreground "dark violet")))) - '(gnus-cite-face-7 ((t (:foreground "SteelBlue4")))) - '(gnus-cite-face-8 ((t (:foreground "magenta")))) - '(gnus-cite-face-9 ((t (:foreground "violet")))) - '(gnus-emphasis-bold ((t (:bold t :weight bold)))) - '(gnus-emphasis-bold-italic ((t (:italic t :bold t :weight bold)))) - '(gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) - '(gnus-emphasis-italic ((t (:italic t)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(gnus-emphasis-underline-bold ((t (:bold t :underline t :weight bold)))) - '(gnus-emphasis-underline-bold-italic ((t (:italic t :bold t :underline t :weight bold)))) - '(gnus-emphasis-underline-italic ((t (:italic t :underline t)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "DeepPink3")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "DeepPink3" :weight bold)))) - '(gnus-group-mail-2-empty-face ((t (:foreground "HotPink3")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "HotPink3" :weight bold)))) - '(gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "magenta4" :weight bold)))) - '(gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "DeepPink4" :weight bold)))) - '(gnus-group-news-1-empty-face ((t (:foreground "ForestGreen")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "ForestGreen" :weight bold)))) - '(gnus-group-news-2-empty-face ((t (:foreground "CadetBlue4")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "CadetBlue4" :weight bold)))) - '(gnus-group-news-3-empty-face ((t (nil)))) - '(gnus-group-news-3-face ((t (:bold t :weight bold)))) - '(gnus-group-news-4-empty-face ((t (nil)))) - '(gnus-group-news-4-face ((t (:bold t :weight bold)))) - '(gnus-group-news-5-empty-face ((t (nil)))) - '(gnus-group-news-5-face ((t (:bold t :weight bold)))) - '(gnus-group-news-6-empty-face ((t (nil)))) - '(gnus-group-news-6-face ((t (:bold t :weight bold)))) - '(gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "DarkGreen" :weight bold)))) - '(gnus-header-content-face ((t (:italic t :foreground "indianred4")))) - '(gnus-header-from-face ((t (:foreground "red3")))) - '(gnus-header-name-face ((t (:foreground "maroon")))) - '(gnus-header-newsgroups-face ((t (:italic t :foreground "MidnightBlue")))) - '(gnus-header-subject-face ((t (:foreground "red4")))) - '(gnus-signature-face ((t (:italic t)))) - '(gnus-splash-face ((t (:foreground "Brown")))) - '(gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "RoyalBlue" :weight bold)))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "DarkGreen" :weight bold)))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "firebrick" :weight bold)))) - '(gnus-summary-high-unread-face ((t (:bold t :weight bold)))) - '(gnus-summary-low-ancient-face ((t (:italic t :foreground "RoyalBlue")))) - '(gnus-summary-low-read-face ((t (:italic t :foreground "DarkGreen")))) - '(gnus-summary-low-ticked-face ((t (:italic t :foreground "firebrick")))) - '(gnus-summary-low-unread-face ((t (:italic t)))) - '(gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) - '(gnus-summary-normal-read-face ((t (:foreground "DarkGreen")))) - '(gnus-summary-normal-ticked-face ((t (:foreground "firebrick")))) - '(gnus-summary-normal-unread-face ((t (nil)))) - '(gnus-summary-selected-face ((t (:underline t)))) - '(header-line ((t (:box (:line-width -1 :style released-button) :background "grey90" :foreground "grey20" :box nil)))) - '(hi-black-b ((t (:bold t :weight bold)))) - '(hi-black-hb ((t (:bold t :family "helv" :weight bold :height 1.67)))) - '(hi-blue ((t (:background "light blue")))) - '(hi-blue-b ((t (:bold t :foreground "blue" :weight bold)))) - '(hi-green ((t (:background "green")))) - '(hi-green-b ((t (:bold t :foreground "green" :weight bold)))) - '(hi-pink ((t (:background "pink")))) - '(hi-red-b ((t (:bold t :foreground "red" :weight bold)))) - '(hi-yellow ((t (:background "yellow")))) - '(highlight ((t (:background "darkseagreen2")))) - '(highlight-changes-delete-face ((t (:foreground "red" :underline t)))) - '(highlight-changes-face ((t (:foreground "red")))) - '(holiday-face ((t (:background "pink")))) - '(idlwave-help-link-face ((t (:foreground "Blue")))) - '(idlwave-shell-bp-face ((t (:background "Pink" :foreground "Black")))) - '(info-header-node ((t (:italic t :bold t :weight bold :foreground "brown")))) - '(info-header-xref ((t (:bold t :weight bold :foreground "magenta4")))) - '(info-menu-5 ((t (:foreground "red1")))) - '(info-menu-header ((t (:bold t :family "helv" :weight bold)))) - '(info-node ((t (:italic t :bold t :foreground "brown" :weight bold)))) - '(info-xref ((t (:bold t :foreground "magenta4" :weight bold)))) - '(isearch ((t (:background "magenta4" :foreground "lightskyblue1")))) - '(isearch-lazy-highlight-face ((t (:background "paleturquoise")))) - '(italic ((t (:italic t)))) - '(log-view-file-face ((t (:bold t :background "grey70" :weight bold)))) - '(log-view-message-face ((t (:background "grey85")))) - '(makefile-space-face ((t (:background "hotpink")))) - '(menu ((t (:background "grey50" :foreground "white" - :box (:line-width -1 :style released-button))))) - '(message-cited-text-face ((t (:foreground "red")))) - '(message-header-cc-face ((t (:foreground "MidnightBlue")))) - '(message-header-name-face ((t (:foreground "cornflower blue")))) - '(message-header-newsgroups-face ((t (:italic t :bold t :foreground "blue4" :weight bold)))) - '(message-header-other-face ((t (:foreground "steel blue")))) - '(message-header-subject-face ((t (:bold t :foreground "navy blue" :weight bold)))) - '(message-header-to-face ((t (:bold t :foreground "MidnightBlue" :weight bold)))) - '(message-header-xheader-face ((t (:foreground "blue")))) - '(message-mml-face ((t (:foreground "ForestGreen")))) - '(message-separator-face ((t (:foreground "brown")))) - '(mode-line ((t (:background "grey50" :foreground "white" - :box (:line-width -1 :style released-button))))) - '(modeline ((t (:background "grey50" :foreground "white" - :box (:line-width -1 :style released-button))))) - '(modeline-buffer-id ((t (:bold t :background "grey75" :foreground "black" - :box (:line-width -1 :style released-button))))) - '(modeline-mousable ((t (:background "grey75" :foreground "black" - :box (:line-width -1 :style released-button))))) - '(modeline-mousable-minor-mode ((t (:background "grey75" :foreground "black" - :box (:line-width -1 :style released-button))))) - '(primary-selection ((t (:background "lightgoldenrod2")))) - '(reb-match-0 ((t (:background "lightblue")))) - '(reb-match-1 ((t (:background "aquamarine")))) - '(reb-match-2 ((t (:background "springgreen")))) - '(reb-match-3 ((t (:background "yellow")))) - '(region ((t (:background "lightgoldenrod2")))) - '(scroll-bar ((t (:background "grey75")))) - '(secondary-selection ((t (:background "yellow")))) - '(sh-heredoc-face ((t (:foreground "tan")))) - '(show-paren-match-face ((t (:background "turquoise")))) - '(show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) - '(show-tabs-space-face ((t (:foreground "yellow")))) - '(show-tabs-tab-face ((t (:foreground "red")))) - '(smerge-base-face ((t (:foreground "red")))) - '(smerge-markers-face ((t (:background "grey85")))) - '(smerge-mine-face ((t (:foreground "blue")))) - '(smerge-other-face ((t (:foreground "darkgreen")))) - '(speedbar-button-face ((t (:foreground "green4")))) - '(speedbar-directory-face ((t (:foreground "blue4")))) - '(speedbar-file-face ((t (:foreground "cyan4")))) - '(speedbar-highlight-face ((t (:background "green")))) - '(speedbar-selected-face ((t (:foreground "red" :underline t)))) - '(speedbar-tag-face ((t (:foreground "brown")))) - '(strokes-char-face ((t (:background "lightgray")))) - '(term-black ((t (:background "white" :foreground "black")))) - '(term-blackbg ((t (:foreground "black")))) - '(term-blue ((t (:background "white" :foreground "blue")))) - '(term-bluebg ((t (:background "blue" :foreground "black")))) - '(term-bold ((t (:bold t :background "white" :foreground "black")))) - '(term-cyan ((t (:background "white" :foreground "cyan")))) - '(term-cyanbg ((t (:background "cyan" :foreground "black")))) - '(term-default ((t (:background "white" :foreground "black")))) - '(term-default-bg ((t (:foreground "black")))) - '(term-default-bg-inv ((t (:foreground "black")))) - '(term-default-fg ((t (:background "white")))) - '(term-default-fg-inv ((t (:background "white")))) - '(term-green ((t (:background "white" :foreground "green")))) - '(term-greenbg ((t (:background "green" :foreground "black")))) - '(term-invisible ((t (:foreground "black")))) - '(term-invisible-inv ((t (:foreground "black")))) - '(term-magenta ((t (:background "white" :foreground "magenta")))) - '(term-magentabg ((t (:background "magenta" :foreground "black")))) - '(term-red ((t (:background "white" :foreground "red")))) - '(term-redbg ((t (:background "red" :foreground "black")))) - '(term-underline ((t (:background "white" :foreground "black")))) - '(term-white ((t (:background "white" :foreground "white")))) - '(term-whitebg ((t (:background "white" :foreground "black")))) - '(term-yellow ((t (:background "white" :foreground "yellow")))) - '(term-yellowbg ((t (:background "yellow" :foreground "black")))) - '(tex-math-face ((t (:foreground "RosyBrown")))) - '(texinfo-heading-face ((t (:foreground "Blue")))) - '(tool-bar ((t (:background "grey75" :foreground "black" - :box (:line-width 1 :style released-button))))) - '(tooltip ((t (:background "lightyellow" :foreground "black")))) - '(trailing-whitespace ((t (:background "red")))) - '(underline ((t (:underline t)))) - '(variable-pitch ((t (:family "helv")))) - '(vcursor ((t (:background "cyan" :foreground "blue" :underline t)))) - '(vhdl-font-lock-attribute-face ((t (:foreground "Orchid")))) - '(vhdl-font-lock-directive-face ((t (:foreground "CadetBlue")))) - '(vhdl-font-lock-enumvalue-face ((t (:foreground "Gold4")))) - '(vhdl-font-lock-function-face ((t (:foreground "Orchid4")))) - '(vhdl-font-lock-prompt-face ((t (:bold t :foreground "Red" :weight bold)))) - '(vhdl-font-lock-reserved-words-face ((t (:bold t :foreground "Orange" :weight bold)))) - '(vhdl-font-lock-translate-off-face ((t (:background "LightGray")))) - '(vhdl-speedbar-architecture-face ((t (:foreground "Blue")))) - '(vhdl-speedbar-architecture-selected-face ((t (:foreground "Blue" :underline t)))) - '(vhdl-speedbar-configuration-face ((t (:foreground "DarkGoldenrod")))) - '(vhdl-speedbar-configuration-selected-face ((t (:foreground "DarkGoldenrod" :underline t)))) - '(vhdl-speedbar-entity-face ((t (:foreground "ForestGreen")))) - '(vhdl-speedbar-entity-selected-face ((t (:foreground "ForestGreen" :underline t)))) - '(vhdl-speedbar-instantiation-face ((t (:foreground "Brown")))) - '(vhdl-speedbar-instantiation-selected-face ((t (:foreground "Brown" :underline t)))) - '(vhdl-speedbar-package-face ((t (:foreground "Grey50")))) - '(vhdl-speedbar-package-selected-face ((t (:foreground "Grey50" :underline t)))) - '(viper-minibuffer-emacs-face ((t (:background "darkseagreen2" :foreground "Black")))) - '(viper-minibuffer-insert-face ((t (:background "pink" :foreground "Black")))) - '(viper-minibuffer-vi-face ((t (:background "grey" :foreground "DarkGreen")))) - '(viper-replace-overlay-face ((t (:background "darkseagreen2" :foreground "Black")))) - '(viper-search-face ((t (:background "khaki" :foreground "Black")))) - '(widget-button-face ((t (:bold t :weight bold)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "dark green")))) - '(widget-field-face ((t (:background "gray85")))) - '(widget-inactive-face ((t (:foreground "dim gray")))) - '(widget-single-line-field-face ((t (:background "gray85")))) - '(woman-addition-face ((t (:foreground "orange")))) - '(woman-bold-face ((t (:bold t :foreground "blue" :weight bold)))) - '(woman-italic-face ((t (:italic t :foreground "red" :underline t)))) - '(woman-unknown-face ((t (:foreground "brown")))) - '(zmacs-region ((t (:background "lightgoldenrod2"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'emacs-nw) - -;;; emacs-nw-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/euphoria-theme.el b/elpa/color-theme-modern-0.0.3/euphoria-theme.el deleted file mode 100644 index 0292a9b..0000000 --- a/elpa/color-theme-modern-0.0.3/euphoria-theme.el +++ /dev/null @@ -1,109 +0,0 @@ -;;; euphoria-theme.el --- euphoria theme - -;; Copyright (C) 2000 by oGLOWo -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of euphoria theme from `color-themes' - -;;; Code: - -(deftheme euphoria - "euphoria theme") - -(custom-theme-set-faces - 'euphoria - - '(default ((t (:background "black" :foreground "#00ff00")))) - '(mouse ((t (:background "yellow")))) - '(cursor ((t (:background "yellow")))) - '(border ((t (:background "black")))) - - '(help-highlight-face ((t (:underline t)))) - '(list-matching-lines-face ((t (:bold t :weight bold)))) - '(widget-mouse-face ((t (:background "darkolivegreen")))) - - '(bold ((t (:bold t :weight bold)))) - '(bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) - '(comint-highlight-input ((t (:bold t :weight bold)))) - '(comint-highlight-prompt ((t (:foreground "cyan")))) - '(fixed-pitch ((t (:family "courier")))) - '(font-lock-builtin-face ((t (:foreground "magenta")))) - '(font-lock-comment-face ((t (:foreground "deeppink")))) - '(font-lock-constant-face ((t (:foreground "blue")))) - '(font-lock-doc-face ((t (:foreground "cyan")))) - '(font-lock-doc-string-face ((t (:foreground "cyan")))) - '(font-lock-function-name-face ((t (:foreground "purple")))) - '(font-lock-keyword-face ((t (:foreground "red")))) - '(font-lock-preprocessor-face ((t (:foreground "blue1")))) - '(font-lock-reference-face ((t (nil)))) - '(font-lock-string-face ((t (:foreground "cyan")))) - '(font-lock-type-face ((t (:foreground "yellow")))) - '(font-lock-variable-name-face ((t (:foreground "violet")))) - '(font-lock-warning-face ((t (:bold t :foreground "red" :weight bold)))) - '(fringe ((t (:background "gray16" :foreground "#00ff00")))) - '(header-line ((t (:box (:line-width -1 :style released-button) :background "grey20" :foreground "grey90" :box nil)))) - '(highlight ((t (:background "darkolivegreen")))) - '(horizontal-divider ((t (:background "gray16" :foreground "#00ff00")))) - '(isearch ((t (:background "palevioletred2" :foreground "brown4")))) - '(isearch-lazy-highlight-face ((t (:background "paleturquoise4")))) - '(italic ((t (:italic t :slant italic)))) - '(menu ((t (:background "gray16" :foreground "green")))) - '(modeline ((t (:background "gray16" :foreground "#00ff00" - :box (:line-width -1 :style released-button))))) - '(modeline-buffer-id ((t (:background "gray16" :foreground "#00ff00")))) - '(modeline-mousable ((t (:background "gray16" :foreground "#00ff00")))) - '(modeline-mousable-minor-mode ((t (:background "gray16" :foreground "#00ff00")))) - '(primary-selection ((t (:background "#00ff00" :foreground "black")))) - '(region ((t (:background "steelblue" :foreground "white")))) - '(scroll-bar ((t (:background "gray16" :foreground "#00ff00")))) - '(secondary-selection ((t (:background "#00ff00" :foreground "black")))) - '(show-paren-match-face ((t (:background "turquoise")))) - '(show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) - '(speedbar-button-face ((t (:foreground "#00ff00")))) - '(speedbar-directory-face ((t (:foreground "#00ff00")))) - '(speedbar-file-face ((t (:foreground "cyan")))) - '(speedbar-highlight-face ((t (:background "#00ff00" :foreground "purple")))) - '(speedbar-selected-face ((t (:foreground "deeppink" :underline t)))) - '(speedbar-tag-face ((t (:foreground "yellow")))) - '(tool-bar ((t (:background "gray16" :foreground "green" - :box (:line-width 1 :style released-button))))) - '(tooltip ((t (:background "gray16" :foreground "#00ff00")))) - '(trailing-whitespace ((t (:background "red")))) - '(underline ((t (:underline t)))) - '(variable-pitch ((t (:family "helv")))) - '(vertical-divider ((t (:background "gray16" :foreground "#00ff00")))) - '(widget-button-face ((t (:bold t :weight bold)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "lime green")))) - '(widget-field-face ((t (:background "dim gray")))) - '(widget-inactive-face ((t (:foreground "light gray")))) - '(widget-single-line-field-face ((t (:background "dim gray")))) - '(zmacs-region ((t (:background "steelblue" :foreground "white"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'euphoria) - -;;; euphoria-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/feng-shui-theme.el b/elpa/color-theme-modern-0.0.3/feng-shui-theme.el deleted file mode 100644 index 44d5408..0000000 --- a/elpa/color-theme-modern-0.0.3/feng-shui-theme.el +++ /dev/null @@ -1,88 +0,0 @@ -;;; feng-shui-theme.el --- feng-shui theme - -;; Copyright (C) 2003 by walterh@rocketmail.com -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of feng-shui theme from `color-themes' - -;;; Code: - -(deftheme feng-shui - "feng-shui theme") - -(custom-theme-set-faces - 'feng-shui - - '(default ((t (:background "ivory" :foreground "black")))) - '(mouse ((t (:background "slateblue")))) - '(cursor ((t (:background "slateblue" :foreground "black")))) - '(border ((t (:background "black")))) - - '(help-highlight-face ((t (:underline t)))) - '(list-matching-lines-face ((t (:bold t :weight bold)))) - '(view-highlight-face ((t (:background "mistyRose" :foreground "black")))) - '(widget-mouse-face ((t (:background "mistyRose" :foreground "black")))) - - '(bold ((t (:bold t :weight bold)))) - '(bold-italic ((t (:italic t :bold t :weight bold)))) - '(fixed-pitch ((t (:family "courier")))) - '(font-lock-builtin-face ((t (:foreground "black")))) - '(font-lock-comment-face ((t (:italic t :background "seashell")))) - '(font-lock-constant-face ((t (:foreground "darkblue")))) - '(font-lock-doc-face ((t (:background "lemonChiffon")))) - '(font-lock-function-name-face ((t (:bold t :underline t :weight bold)))) - '(font-lock-keyword-face ((t (:foreground "blue")))) - '(font-lock-string-face ((t (:background "lemonChiffon")))) - '(font-lock-type-face ((t (:foreground "black")))) - '(font-lock-variable-name-face ((t (:foreground "black")))) - '(font-lock-warning-face ((t (:bold t :foreground "Red" :weight bold)))) - '(fringe ((t (:background "grey95")))) - '(header-line ((t (:bold t :weight bold :underline t :background "grey90" :foreground "grey20")))) - '(highlight ((t (:background "mistyRose" :foreground "black")))) - '(isearch ((t (:background "magenta4" :foreground "lightskyblue1")))) - '(isearch-lazy-highlight-face ((t (:background "paleturquoise")))) - '(italic ((t (:italic t)))) - '(menu ((t (nil)))) - '(mode-line ((t (:bold t :background "mistyRose" :foreground "navy" :underline t :weight bold)))) - '(region ((t (:background "lavender" :foreground "black")))) - '(scroll-bar ((t (nil)))) - '(secondary-selection ((t (:background "yellow")))) - '(tool-bar ((t (:background "grey75" :foreground "black" - :box (:line-width 1 :style released-button))))) - '(trailing-whitespace ((t (:background "red")))) - '(underline ((t (:underline t)))) - '(variable-pitch ((t (:family "helv")))) - '(widget-button-face ((t (:bold t :weight bold)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "dark green")))) - '(widget-field-face ((t (:background "gray85")))) - '(widget-inactive-face ((t (:foreground "dim gray")))) - '(widget-single-line-field-face ((t (:background "gray85"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'feng-shui) - -;;; feng-shui-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/fischmeister-theme.el b/elpa/color-theme-modern-0.0.3/fischmeister-theme.el deleted file mode 100644 index ac6daca..0000000 --- a/elpa/color-theme-modern-0.0.3/fischmeister-theme.el +++ /dev/null @@ -1,72 +0,0 @@ -;;; fischmeister-theme.el --- fischmeister theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of fischmeister theme from `color-themes' - -;;; Code: - -(deftheme fischmeister - "fischmeister theme") - -(custom-theme-set-faces - 'fischmeister - - '(default ((t (:background "gray80" :foreground "black")))) - '(mouse ((t (:foreground "red")))) - '(cursor ((t (:background "yellow")))) - '(border ((t (:foreground "black")))) - - '(modeline ((t (:foreground "gray80" :background "black")))) - '(modeline-buffer-id ((t (:foreground "gray80" :background "black")))) - '(modeline-mousable ((t (:foreground "gray80" :background "black")))) - '(modeline-mousable-minor-mode ((t (:foreground "gray80" :background "black")))) - '(highlight ((t (:background "darkseagreen2")))) - '(bold ((t (:bold t)))) - '(italic ((t (:italic t)))) - '(bold-italic ((t (:bold t :italic t)))) - '(region ((t (:background "gray")))) - '(secondary-selection ((t (:background "paleturquoise")))) - '(underline ((t (:underline t)))) - '(show-paren-match-face ((t (:foreground "yellow" :background "darkgreen")))) - '(show-paren-mismatch-face ((t (:foreground "white" :background "red")))) - '(font-lock-comment-face ((t (:foreground "FireBrick" :bold t :italic t)))) - '(font-lock-string-face ((t (:foreground "DarkSlateBlue" :italic t)))) - '(font-lock-keyword-face ((t (:foreground "navy")))) - '(font-lock-builtin-face ((t (:foreground "white")))) - '(font-lock-function-name-face ((t (:foreground "Blue")))) - '(font-lock-variable-name-face ((t (:foreground "Darkblue")))) - '(font-lock-type-face ((t (:foreground "darkgreen")))) - '(font-lock-constant-face ((t (:foreground "CadetBlue")))) - '(font-lock-warning-face ((t (:foreground "Orchid" :bold t)))) - '(font-lock-reference-face ((t (:foreground "SteelBlue"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'fischmeister) - -;;; fischmeister-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/gnome-theme.el b/elpa/color-theme-modern-0.0.3/gnome-theme.el deleted file mode 100644 index 9d7b8df..0000000 --- a/elpa/color-theme-modern-0.0.3/gnome-theme.el +++ /dev/null @@ -1,56 +0,0 @@ -;;; gnome-theme.el --- gnome theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of gnome theme from `color-themes' - -;;; Code: - -(deftheme gnome - "gnome theme") - -(custom-theme-set-faces - 'gnome - - '(default ((t (:background "darkslategrey" :foreground "wheat")))) - - '(region ((t (:foreground "cyan" :background "dark cyan")))) - '(underline ((t (:foreground "yellow" :underline t)))) - '(modeline ((t (:foreground "dark cyan" :background "wheat")))) - '(modeline-buffer-id ((t (:foreground "dark cyan" :background "wheat")))) - '(modeline-mousable ((t (:foreground "dark cyan" :background "wheat")))) - '(modeline-mousable-minor-mode ((t (:foreground "dark cyan" :background "wheat")))) - '(italic ((t (:foreground "dark red" :italic t)))) - '(bold-italic ((t (:foreground "dark red" :bold t :italic t)))) - '(font-lock-comment-face ((t (:foreground "Firebrick")))) - '(bold ((t (:bold))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'gnome) - -;;; gnome-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/gnome2-theme.el b/elpa/color-theme-modern-0.0.3/gnome2-theme.el deleted file mode 100644 index 752bc48..0000000 --- a/elpa/color-theme-modern-0.0.3/gnome2-theme.el +++ /dev/null @@ -1,105 +0,0 @@ -;;; gnome2-theme.el --- gnome2 theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of gnome2 theme from `color-themes' - -;;; Code: - -(deftheme gnome2 - "gnome2 theme") - -(custom-theme-set-faces - 'gnome2 - - '(default ((t (:foreground "wheat" :background "darkslategrey")))) - - '(mouse ((t (:foreground "Grey")))) - '(cursor ((t (:background "LightGray")))) - '(border ((t (:foreground "black")))) - - '(bbdb-company ((t (:foreground "pale green")))) - '(bbdb-name ((t (:bold t :foreground "pale green")))) - '(bbdb-field-name ((t (:foreground "medium sea green")))) - '(bbdb-field-value ((t (:foreground "dark sea green")))) - '(bold ((t (:bold t)))) - '(bold-italic ((t (:italic t :bold t :foreground "beige")))) - '(calendar-today-face ((t (:underline t)))) - '(comint-highlight-prompt ((t (:foreground "medium aquamarine")))) - '(cperl-array-face ((t (:foreground "Yellow")))) - '(cperl-hash-face ((t (:foreground "White")))) - '(cperl-nonoverridable-face ((t (:foreground "SkyBlue")))) - '(custom-button-face ((t (:underline t :foreground "MediumSlateBlue")))) - '(custom-documentation-face ((t (:foreground "Grey")))) - '(custom-group-tag-face ((t (:foreground "MediumAquamarine")))) - '(custom-state-face ((t (:foreground "LightSalmon")))) - '(custom-variable-tag-face ((t (:foreground "Aquamarine")))) - '(diary-face ((t (:foreground "IndianRed")))) - '(dired-face-directory ((t (:bold t :foreground "sky blue")))) - '(dired-face-permissions ((t (:foreground "aquamarine")))) - '(dired-face-flagged ((t (:foreground "tomato")))) - '(dired-face-marked ((t (:foreground "light salmon")))) - '(dired-face-executable ((t (:foreground "green yellow")))) - '(fringe ((t (:background "darkslategrey")))) - '(highlight ((t (:background "PaleGreen" :foreground "DarkGreen")))) - '(highline-face ((t (:background "SeaGreen")))) - '(holiday-face ((t (:background "DimGray")))) - '(hyper-apropos-hyperlink ((t (:bold t :foreground "DodgerBlue1")))) - '(hyper-apropos-documentation ((t (:foreground "LightSalmon")))) - '(info-header-xref ((t (:foreground "DodgerBlue1" :bold t)))) - '(info-menu-5 ((t (:underline t)))) - '(info-node ((t (:underline t :bold t :foreground "DodgerBlue1")))) - '(info-xref ((t (:bold t :foreground "DodgerBlue1")))) - '(isearch ((t (:background "sea green")))) - '(italic ((t (:italic t)))) - '(menu ((t (:foreground "wheat" :background "darkslategrey")))) - '(modeline ((t (:background "dark olive green" :foreground "wheat")))) - '(modeline-buffer-id ((t (:background "dark olive green" :foreground "beige")))) - '(modeline-mousable ((t (:background "dark olive green" :foreground "yellow green")))) - '(modeline-mousable-minor-mode ((t (:background "dark olive green" :foreground "wheat")))) - '(region ((t (:background "dark cyan" :foreground "cyan")))) - '(secondary-selection ((t (:background "Aquamarine" :foreground "SlateBlue")))) - '(show-paren-match-face ((t (:bold t :background "Aquamarine" :foreground "steel blue")))) - '(show-paren-mismatch-face ((t (:background "Red" :foreground "White")))) - '(underline ((t (:underline t)))) - '(widget-field-face ((t (:foreground "LightBlue")))) - '(widget-inactive-face ((t (:foreground "DimGray")))) - '(widget-single-line-field-face ((t (:foreground "LightBlue")))) - '(w3m-anchor-face ((t (:bold t :foreground "DodgerBlue1")))) - '(w3m-arrived-anchor-face ((t (:bold t :foreground "DodgerBlue3")))) - '(w3m-header-line-location-title-face ((t (:foreground "beige" :background "dark olive green")))) - '(w3m-header-line-location-content-face ((t (:foreground "wheat" :background "dark olive green")))) - '(woman-bold-face ((t (:bold t)))) - '(woman-italic-face ((t (:foreground "beige")))) - '(woman-unknown-face ((t (:foreground "LightSalmon")))) - '(zmacs-region ((t (:background "dark cyan" :foreground "cyan"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'gnome2) - -;;; gnome2-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/goldenrod-theme.el b/elpa/color-theme-modern-0.0.3/goldenrod-theme.el deleted file mode 100644 index 43a9b07..0000000 --- a/elpa/color-theme-modern-0.0.3/goldenrod-theme.el +++ /dev/null @@ -1,165 +0,0 @@ -;;; goldenrod-theme.el --- goldenrod theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of goldenrod theme from `color-themes' - -;;; Code: - -(deftheme goldenrod - "goldenrod theme") - -(custom-theme-set-faces - 'goldenrod - - '(default ((t (:background "black" :foreground "goldenrod")))) - '(mouse ((t (:foreground "goldenrod")))) - '(cursor ((t (:background "light goldenrod")))) - '(border ((t (:foreground "black")))) - - '(erc-action-face ((t (nil)))) - '(erc-bold-face ((t (:bold t)))) - '(erc-current-nick-face ((t (:bold t :foreground "yellow")))) - '(erc-default-face ((t (nil)))) - '(erc-direct-msg-face ((t (:foreground "pale green")))) - '(erc-error-face ((t (:bold t :foreground "IndianRed")))) - '(erc-highlight-face ((t (:bold t :foreground "pale green")))) - '(erc-input-face ((t (:foreground "light blue")))) - '(erc-inverse-face ((t (:background "steel blue")))) - '(erc-keyword-face ((t (:foreground "orange" :bold t)))) - '(erc-notice-face ((t (:foreground "light salmon")))) - '(erc-notice-face ((t (:foreground "MediumAquamarine")))) - '(erc-pal-face ((t (:foreground "pale green")))) - '(erc-prompt-face ((t (:foreground "light blue" :bold t)))) - '(fg:erc-color-face0 ((t (:foreground "white")))) - '(fg:erc-color-face1 ((t (:foreground "beige")))) - '(fg:erc-color-face2 ((t (:foreground "lemon chiffon")))) - '(fg:erc-color-face3 ((t (:foreground "light cyan")))) - '(fg:erc-color-face4 ((t (:foreground "powder blue")))) - '(fg:erc-color-face5 ((t (:foreground "sky blue")))) - '(fg:erc-color-face6 ((t (:foreground "dark sea green")))) - '(fg:erc-color-face7 ((t (:foreground "pale green")))) - '(fg:erc-color-face8 ((t (:foreground "medium spring green")))) - '(fg:erc-color-face9 ((t (:foreground "khaki")))) - '(fg:erc-color-face10 ((t (:foreground "pale goldenrod")))) - '(fg:erc-color-face11 ((t (:foreground "light goldenrod yellow")))) - '(fg:erc-color-face12 ((t (:foreground "light yellow")))) - '(fg:erc-color-face13 ((t (:foreground "yellow")))) - '(fg:erc-color-face14 ((t (:foreground "light goldenrod")))) - '(fg:erc-color-face15 ((t (:foreground "lime green")))) - '(bg:erc-color-face0 ((t (nil)))) - '(bg:erc-color-face1 ((t (nil)))) - '(bg:erc-color-face2 ((t (nil)))) - '(bg:erc-color-face3 ((t (nil)))) - '(bg:erc-color-face4 ((t (nil)))) - '(bg:erc-color-face5 ((t (nil)))) - '(bg:erc-color-face6 ((t (nil)))) - '(bg:erc-color-face7 ((t (nil)))) - '(bg:erc-color-face8 ((t (nil)))) - '(bg:erc-color-face9 ((t (nil)))) - '(bg:erc-color-face10 ((t (nil)))) - '(bg:erc-color-face11 ((t (nil)))) - '(bg:erc-color-face12 ((t (nil)))) - '(bg:erc-color-face13 ((t (nil)))) - '(bg:erc-color-face14 ((t (nil)))) - '(bg:erc-color-face15 ((t (nil)))) - - '(ediff-current-diff-face-A ((t (:background "pale green" :foreground "firebrick")))) - '(ediff-current-diff-face-Ancestor ((t (:background "VioletRed" :foreground "Black")))) - '(ediff-current-diff-face-B ((t (:background "Yellow" :foreground "DarkOrchid")))) - '(ediff-current-diff-face-C ((t (:background "Pink" :foreground "Navy")))) - '(ediff-even-diff-face-A ((t (:background "light grey" :foreground "Black")))) - '(ediff-even-diff-face-Ancestor ((t (:background "Grey" :foreground "White")))) - '(ediff-even-diff-face-B ((t (:background "Grey" :foreground "White")))) - '(ediff-even-diff-face-C ((t (:background "light grey" :foreground "Black")))) - '(ediff-fine-diff-face-A ((t (:background "sky blue" :foreground "Navy")))) - '(ediff-fine-diff-face-Ancestor ((t (:background "Green" :foreground "Black")))) - '(ediff-fine-diff-face-B ((t (:background "cyan" :foreground "Black")))) - '(ediff-fine-diff-face-C ((t (:background "Turquoise" :foreground "Black")))) - '(ediff-odd-diff-face-A ((t (:background "Grey" :foreground "White")))) - '(ediff-odd-diff-face-Ancestor ((t (:background "light grey" :foreground "Black")))) - '(ediff-odd-diff-face-B ((t (:background "light grey" :foreground "Black")))) - '(ediff-odd-diff-face-C ((t (:background "Grey" :foreground "White")))) - - '(eshell-ls-archive-face ((t (:bold t :foreground "IndianRed")))) - '(eshell-ls-backup-face ((t (:foreground "Grey")))) - '(eshell-ls-clutter-face ((t (:foreground "DimGray")))) - '(eshell-ls-directory-face ((t (:bold t :foreground "dark khaki")))) - '(eshell-ls-executable-face ((t (:foreground "Coral")))) - '(eshell-ls-missing-face ((t (:foreground "black")))) - '(eshell-ls-picture-face ((t (:foreground "gold")))) ; non-standard face - '(eshell-ls-product-face ((t (:foreground "dark sea green")))) - '(eshell-ls-readonly-face ((t (:foreground "light steel blue")))) - '(eshell-ls-special-face ((t (:foreground "gold")))) - '(eshell-ls-symlink-face ((t (:foreground "peach puff")))) - '(eshell-ls-text-face ((t (:foreground "moccasin")))) ; non-standard face - '(eshell-ls-todo-face ((t (:bold t :foreground "yellow green")))) ; non-standard face - '(eshell-ls-unreadable-face ((t (:foreground "DimGray")))) - '(eshell-prompt-face ((t (:foreground "lemon chiffon")))) - - '(goto-address-mail-face ((t (:bold t :foreground "pale goldenrod")))) - '(list-matching-lines-face ((t (:bold t)))) - '(view-highlight-face ((t (:background "dark slate blue")))) - - '(bold ((t (:bold t)))) - '(bold-italic ((t (:italic t :bold t :foreground "lavender")))) - '(font-lock-builtin-face ((t (:foreground "pale goldenrod")))) - '(font-lock-comment-face ((t (:foreground "indian red")))) - '(font-lock-constant-face ((t (:foreground "pale green")))) - '(font-lock-function-name-face ((t (:bold t :foreground "lemon chiffon")))) - '(font-lock-keyword-face ((t (:foreground "wheat")))) - '(font-lock-string-face ((t (:foreground "gold")))) - '(font-lock-type-face ((t (:foreground "dark khaki" :bold t)))) - '(font-lock-variable-name-face ((t (:bold t :foreground "khaki")))) - '(font-lock-warning-face ((t (:bold t :foreground "orange red")))) - '(fringe ((t (:background "gray25")))) - '(header-line ((t (:background "gray20" :foreground "gray70")))) - '(highlight ((t (:background "dark slate blue")))) - '(info-menu-5 ((t (:underline t)))) - '(info-node ((t (:bold t)))) - '(info-xref ((t (:bold t :foreground "pale goldenrod")))) - '(isearch ((t (:background "SeaGreen4")))) - '(isearch-lazy-highlight-face ((t (:background "DarkOliveGreen4")))) - '(italic ((t (:italic t :foreground "lavender")))) - '(menu ((t (:background "gray25" :foreground "lemon chiffon")))) - '(modeline ((t (:background "gray40" :foreground "lemon chiffon" - :box (:line-width 1 :style released-button))))) - '(modeline-buffer-id ((t (:background "AntiqueWhite4" :foreground "lemon chiffon")))) - '(modeline-mousable ((t (:background "AntiqueWhite4" :foreground "lemon chiffon")))) - '(modeline-mousable-minor-mode ((t (:background "wheat" :foreground "lemon chiffon")))) - '(mode-line-inactive ((t (:background "gray20" :foreground "lemon chiffon")))) - '(region ((t (:background "dark olive green")))) - '(secondary-selection ((t (:background "dark green")))) - '(tool-bar ((t (:background "gray25" :foreground "lemon chiffon" - :box (:line-width 1 :style released-button))))) - '(underline ((t (:underline t))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'goldenrod) - -;;; goldenrod-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/gray1-theme.el b/elpa/color-theme-modern-0.0.3/gray1-theme.el deleted file mode 100644 index 3d7b850..0000000 --- a/elpa/color-theme-modern-0.0.3/gray1-theme.el +++ /dev/null @@ -1,98 +0,0 @@ -;;; gray1-theme.el --- gray1 theme - -;; Copyright (C) 2001 by Paul Pulli -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of gray1 theme from `color-themes' - -;;; Code: - -(deftheme gray1 - "gray1 theme") - -(custom-theme-set-faces - 'gray1 - - '(default ((t (:background "darkgray" :foreground "black")))) - '(cursor ((t (:background "Yellow")))) - '(border ((t (:foreground "black")))) - - '(blue ((t (:foreground "blue")))) - '(bold ((t (:bold t)))) - '(bold-italic ((t (:italic t :bold t)))) - '(border-glyph ((t (nil)))) - '(cperl-here-face ((t (:background "gray68" :foreground "DeepPink")))) - '(font-lock-builtin-face ((t (:bold t :foreground "red3")))) - '(font-lock-comment-face ((t (:foreground "gray50")))) - '(font-lock-constant-face ((t (:bold t :foreground "blue3")))) - '(font-lock-doc-string-face ((t (:foreground "black")))) - '(font-lock-function-name-face ((t (:bold t :foreground "DeepPink3")))) - '(font-lock-keyword-face ((t (:bold t :foreground "red")))) - '(font-lock-other-type-face ((t (:bold t :foreground "green4")))) - '(font-lock-preprocessor-face ((t (:bold t :foreground "blue3")))) - '(font-lock-reference-face ((t (:bold t :foreground "red3")))) - '(font-lock-string-face ((t (:foreground "red")))) - '(font-lock-type-face ((t (:bold t :foreground "white")))) - '(font-lock-variable-name-face ((t (:bold t :foreground "blue3")))) - '(font-lock-warning-face ((t (:bold t :foreground "Red")))) - '(green ((t (:foreground "green4")))) - '(gui-button-face ((t (:background "black" :foreground "red")))) - '(gui-element ((t (:background "gray58")))) - '(highlight ((t (:background "magenta" :foreground "yellow")))) - '(isearch ((t (:background "red" :foreground "yellow")))) - '(italic ((t (:italic t)))) - '(left-margin ((t (nil)))) - '(list-mode-item-selected ((t (:background "gray90" :foreground "purple")))) - '(m4-face ((t (:background "gray90" :foreground "orange3")))) - '(message-cited-text ((t (nil)))) - '(message-header-contents ((t (nil)))) - '(message-headers ((t (nil)))) - '(message-highlighted-header-contents ((t (nil)))) - '(modeline ((t (:background "#aa80aa" :foreground "White")))) - '(modeline-buffer-id ((t (:background "#aa80aa" :foreground "linen")))) - '(modeline-mousable ((t (:background "#aa80aa" :foreground "cyan")))) - '(modeline-mousable-minor-mode ((t (:background "#aa80aa" :foreground "yellow")))) - '(paren-blink-off ((t (:foreground "gray58")))) - '(paren-blink-on ((t (:foreground "purple")))) - '(paren-match ((t (:background "gray68" :foreground "white")))) - '(paren-mismatch ((t (:background "DeepPink" :foreground "black")))) - '(pointer ((t (nil)))) - '(primary-selection ((t (:background "gray")))) - '(red ((t (:foreground "red")))) - '(right-margin ((t (nil)))) - '(secondary-selection ((t (:background "paleturquoise")))) - '(text-cursor ((t (:background "Yellow" :foreground "darkgray")))) - '(toolbar ((t (:background "#aa80aa" :foreground "linen")))) - '(underline ((t (:underline t)))) - '(vertical-divider ((t (nil)))) - '(x-face ((t (:background "black" :foreground "lavenderblush")))) - '(yellow ((t (:foreground "yellow3")))) - '(zmacs-region ((t (:background "paleturquoise" :foreground "black"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'gray1) - -;;; gray1-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/gray30-theme.el b/elpa/color-theme-modern-0.0.3/gray30-theme.el deleted file mode 100644 index e2101eb..0000000 --- a/elpa/color-theme-modern-0.0.3/gray30-theme.el +++ /dev/null @@ -1,200 +0,0 @@ -;;; gray30-theme.el --- gray30 theme - -;; Copyright (C) 2002 by Girish Bharadwaj -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of gray30 theme from `color-themes' - -;;; Code: - -(deftheme gray30 - "gray30 theme") - -(custom-theme-set-faces - 'gray30 - - '(default ((t (:background "gray30" :foreground "gainsboro")))) - '(mouse ((t (:background "black")))) - '(cursor ((t (:background "black")))) - '(border ((t (:background "black")))) - - '(help-highlight-face ((t (:underline t)))) - '(list-matching-lines-face ((t (:bold t :weight bold)))) - '(widget-mouse-face ((t (:background "darkolivegreen")))) - - '(bg:erc-color-face0 ((t (:background "White")))) - '(bg:erc-color-face1 ((t (:background "black")))) - '(bg:erc-color-face10 ((t (:background "lightblue1")))) - '(bg:erc-color-face11 ((t (:background "cyan")))) - '(bg:erc-color-face12 ((t (:background "blue")))) - '(bg:erc-color-face13 ((t (:background "deeppink")))) - '(bg:erc-color-face14 ((t (:background "gray50")))) - '(bg:erc-color-face15 ((t (:background "gray90")))) - '(bg:erc-color-face2 ((t (:background "blue4")))) - '(bg:erc-color-face3 ((t (:background "green4")))) - '(bg:erc-color-face4 ((t (:background "red")))) - '(bg:erc-color-face5 ((t (:background "brown")))) - '(bg:erc-color-face6 ((t (:background "purple")))) - '(bg:erc-color-face7 ((t (:background "orange")))) - '(bg:erc-color-face8 ((t (:background "yellow")))) - '(bg:erc-color-face9 ((t (:background "green")))) - '(bold ((t (:bold t :weight bold)))) - '(bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) - '(button ((t (:underline t)))) - '(comint-highlight-input ((t (:bold t :weight bold)))) - '(comint-highlight-prompt ((t (:foreground "cyan")))) - '(custom-button-face ((t (:background "lightgrey" :foreground "black" - :box (:line-width 2 :style released-button))))) - '(custom-button-pressed-face ((t (:background "lightgrey" :foreground "black" - :box (:line-width 2 :style pressed-button))))) - '(custom-changed-face ((t (:background "blue" :foreground "white")))) - '(custom-comment-face ((t (:background "dim gray")))) - '(custom-comment-tag-face ((t (:foreground "gray80")))) - '(custom-documentation-face ((t (nil)))) - '(custom-face-tag-face ((t (:bold t :weight bold :height 1.2)))) - '(custom-group-tag-face ((t (:bold t :foreground "light blue" :weight bold :height 1.2)))) - '(custom-group-tag-face-1 ((t (:bold t :foreground "pink" :weight bold :height 1.2)))) - '(custom-invalid-face ((t (:background "red" :foreground "yellow")))) - '(custom-modified-face ((t (:background "blue" :foreground "white")))) - '(custom-rogue-face ((t (:background "black" :foreground "pink")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:background "white" :foreground "blue")))) - '(custom-state-face ((t (:foreground "lime green")))) - '(custom-variable-button-face ((t (:bold t :underline t :weight bold)))) - '(custom-variable-tag-face ((t (:bold t :foreground "light blue" :weight bold :height 1.2)))) - '(erc-action-face ((t (:bold t :weight bold)))) - '(erc-bold-face ((t (:bold t :weight bold)))) - '(erc-default-face ((t (nil)))) - '(erc-direct-msg-face ((t (:foreground "IndianRed")))) - '(erc-error-face ((t (:background "Red" :foreground "White")))) - '(erc-input-face ((t (:foreground "brown")))) - '(erc-inverse-face ((t (:background "Black" :foreground "White")))) - '(erc-notice-face ((t (:bold t :foreground "SlateBlue" :weight bold)))) - '(erc-prompt-face ((t (:bold t :background "lightBlue2" :foreground "Black" :weight bold)))) - '(erc-timestamp-face ((t (:bold t :foreground "green" :weight bold)))) - '(erc-underline-face ((t (:underline t)))) - '(eshell-ls-archive-face ((t (:bold t :foreground "Orchid" :weight bold)))) - '(eshell-ls-backup-face ((t (:foreground "LightSalmon")))) - '(eshell-ls-clutter-face ((t (:bold t :foreground "OrangeRed" :weight bold)))) - '(eshell-ls-directory-face ((t (:bold t :foreground "SkyBlue" :weight bold)))) - '(eshell-ls-executable-face ((t (:bold t :foreground "Green" :weight bold)))) - '(eshell-ls-missing-face ((t (:bold t :foreground "Red" :weight bold)))) - '(eshell-ls-product-face ((t (:foreground "LightSalmon")))) - '(eshell-ls-readonly-face ((t (:foreground "Pink")))) - '(eshell-ls-special-face ((t (:bold t :foreground "Magenta" :weight bold)))) - '(eshell-ls-symlink-face ((t (:bold t :foreground "Cyan" :weight bold)))) - '(eshell-ls-unreadable-face ((t (:foreground "DarkGrey")))) - '(fg:erc-color-face0 ((t (:foreground "White")))) - '(fg:erc-color-face1 ((t (:foreground "black")))) - '(fg:erc-color-face10 ((t (:foreground "lightblue1")))) - '(fg:erc-color-face11 ((t (:foreground "cyan")))) - '(fg:erc-color-face12 ((t (:foreground "blue")))) - '(fg:erc-color-face13 ((t (:foreground "deeppink")))) - '(fg:erc-color-face14 ((t (:foreground "gray50")))) - '(fg:erc-color-face15 ((t (:foreground "gray90")))) - '(fg:erc-color-face2 ((t (:foreground "blue4")))) - '(fg:erc-color-face3 ((t (:foreground "green4")))) - '(fg:erc-color-face4 ((t (:foreground "red")))) - '(fg:erc-color-face5 ((t (:foreground "brown")))) - '(fg:erc-color-face6 ((t (:foreground "purple")))) - '(fg:erc-color-face7 ((t (:foreground "orange")))) - '(fg:erc-color-face8 ((t (:foreground "yellow")))) - '(fg:erc-color-face9 ((t (:foreground "green")))) - - '(font-lock-builtin-face ((t (:foreground "LightSkyBlue" :underline t)))) - '(font-lock-comment-face ((t (:italic t :foreground "lightgreen" :slant oblique)))) - '(font-lock-constant-face ((t (:foreground "Aquamarine")))) - '(font-lock-function-name-face ((t (:bold t :foreground "DodgerBlue" :weight bold :height 1.05)))) - '(font-lock-keyword-face ((t (:foreground "LightPink" :height 1.05)))) - '(font-lock-string-face ((t (:foreground "LightSalmon")))) - '(font-lock-type-face ((t (:foreground "yellow" :height 1.05)))) - '(font-lock-variable-name-face ((t (:foreground "gold")))) - '(font-lock-warning-face ((t (:bold t :foreground "Pink" :weight bold)))) - '(fringe ((t (:background "grey10")))) - '(header-line ((t (:box (:line-width -1 :style released-button) :background "grey20" :foreground "grey90" :box nil)))) - '(highlight ((t (:background "darkolivegreen")))) - '(isearch ((t (:background "palevioletred2" :foreground "brown4")))) - '(isearch-lazy-highlight-face ((t (:background "paleturquoise4")))) - '(italic ((t (:italic t :slant italic)))) - '(jde-bug-breakpoint-cursor ((t (:background "brown" :foreground "cyan")))) - '(jde-db-active-breakpoint-face ((t (:background "red" :foreground "black")))) - '(jde-db-requested-breakpoint-face ((t (:background "yellow" :foreground "black")))) - '(jde-db-spec-breakpoint-face ((t (:background "green" :foreground "black")))) - '(jde-java-font-lock-api-face ((t (:foreground "light goldenrod")))) - '(jde-java-font-lock-bold-face ((t (:bold t :weight bold)))) - '(jde-java-font-lock-code-face ((t (nil)))) - '(jde-java-font-lock-constant-face ((t (:foreground "Aquamarine")))) - '(jde-java-font-lock-doc-tag-face ((t (:foreground "light coral")))) - '(jde-java-font-lock-italic-face ((t (:italic t :slant italic)))) - '(jde-java-font-lock-link-face ((t (:foreground "cadetblue" :underline t :slant normal)))) - '(jde-java-font-lock-modifier-face ((t (:foreground "LightSteelBlue")))) - '(jde-java-font-lock-number-face ((t (:foreground "LightSalmon")))) - '(jde-java-font-lock-operator-face ((t (:foreground "medium blue")))) - '(jde-java-font-lock-package-face ((t (:foreground "steelblue1")))) - '(jde-java-font-lock-pre-face ((t (nil)))) - '(jde-java-font-lock-underline-face ((t (:underline t)))) - '(menu ((t (nil)))) - '(minibuffer-prompt ((t (:foreground "cyan")))) - '(mode-line ((t (:background "grey75" :foreground "black" - :box (:line-width -1 :style released-button))))) - '(mode-line-inactive ((t (:background "grey30" :foreground "grey80" :weight light - :box (:line-width -1 :color "grey40" :style nil))))) - '(primary-selection ((t (:background "blue3")))) - '(region ((t (:background "blue3")))) - '(scroll-bar ((t (nil)))) - '(secondary-selection ((t (:background "SkyBlue4")))) - '(semantic-dirty-token-face ((t (:background "lightyellow")))) - '(semantic-unmatched-syntax-face ((t (:underline "red")))) - '(senator-intangible-face ((t (:foreground "gray75")))) - '(senator-momentary-highlight-face ((t (:background "gray30")))) - '(senator-read-only-face ((t (:background "#664444")))) - '(show-paren-match-face ((t (:background "steelblue3")))) - '(show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) - '(speedbar-button-face ((t (:foreground "green3")))) - '(speedbar-directory-face ((t (:foreground "light blue")))) - '(speedbar-file-face ((t (:foreground "cyan")))) - '(speedbar-highlight-face ((t (:background "sea green")))) - '(speedbar-selected-face ((t (:foreground "red" :underline t)))) - '(speedbar-tag-face ((t (:foreground "yellow")))) - '(template-message-face ((t (:bold t :weight bold)))) - '(tool-bar ((t (:background "grey75" :foreground "black" - :box (:line-width 1 :style released-button))))) - '(tooltip ((t (:background "lightyellow" :foreground "black")))) - '(trailing-whitespace ((t (:background "red")))) - '(underline ((t (:underline t)))) - - '(widget-button-face ((t (:bold t :weight bold)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "lime green")))) - '(widget-field-face ((t (:background "dim gray")))) - '(widget-inactive-face ((t (:foreground "light gray")))) - '(widget-single-line-field-face ((t (:background "dim gray")))) - '(zmacs-region ((t (:background "blue3"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'gray30) - -;;; gray30-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/greiner-theme.el b/elpa/color-theme-modern-0.0.3/greiner-theme.el deleted file mode 100644 index bcdb689..0000000 --- a/elpa/color-theme-modern-0.0.3/greiner-theme.el +++ /dev/null @@ -1,100 +0,0 @@ -;;; greiner-theme.el --- greiner theme - -;; Copyright (C) 2000 by Kevin Greiner -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of greiner theme from `color-themes' - -;;; Code: - -(deftheme greiner - "greiner theme") - -(custom-theme-set-faces - 'greiner - - '(default ((t (:background "beige" :foreground "black")))) - '(mouse ((t (:foreground "black")))) - '(cursor ((t (:background "black")))) - '(border ((t (:foreground "black")))) - '(default ((t (nil)))) - '(bold ((t (:bold t)))) - '(bold-italic ((t (:italic t :bold t)))) - '(list-matching-lines-face ((t (:bold t)))) - '(custom-button-face ((t (nil)))) - '(custom-changed-face ((t (:background "blue" :foreground "white")))) - '(custom-documentation-face ((t (nil)))) - '(custom-face-tag-face ((t (:underline t)))) - '(custom-group-tag-face ((t (:underline t :foreground "blue")))) - '(custom-group-tag-face-1 ((t (:underline t :foreground "red")))) - '(custom-invalid-face ((t (:background "red" :foreground "yellow")))) - '(custom-modified-face ((t (:background "blue" :foreground "white")))) - '(custom-rogue-face ((t (:background "black" :foreground "pink")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:background "white" :foreground "blue")))) - '(custom-state-face ((t (:foreground "dark green")))) - '(custom-variable-button-face ((t (:underline t :bold t)))) - '(custom-variable-tag-face ((t (:underline t :foreground "blue")))) - '(font-lock-builtin-face ((t (:foreground "blue4")))) - '(font-lock-comment-face ((t (:foreground "Firebrick")))) - '(font-lock-constant-face ((t (:foreground "CadetBlue")))) - '(font-lock-function-name-face ((t (:foreground "Blue")))) - '(font-lock-keyword-face ((t (:foreground "royal blue")))) - '(font-lock-string-face ((t (:foreground "RosyBrown")))) - '(font-lock-type-face ((t (:foreground "ForestGreen")))) - '(font-lock-variable-name-face ((t (:foreground "DarkGoldenrod")))) - '(font-lock-warning-face ((t (:bold t :foreground "Red")))) - '(highlight ((t (:background "darkseagreen2")))) - '(info-menu-5 ((t (:underline t)))) - '(info-node ((t (:italic t :bold t)))) - '(info-xref ((t (:bold t)))) - '(italic ((t (:italic t)))) - '(modeline ((t (:background "black" :foreground "white")))) - '(modeline-mousable-minor-mode ((t (:background "black" :foreground "white")))) - '(modeline-mousable ((t (:background "black" :foreground "white")))) - '(modeline-buffer-id ((t (:background "black" :foreground "white")))) - '(region ((t (:background "gray")))) - '(secondary-selection ((t (:background "paleturquoise")))) - '(show-paren-match-face ((t (:background "turquoise")))) - '(show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) - '(speedbar-button-face ((t (:foreground "green4")))) - '(speedbar-directory-face ((t (:foreground "blue4")))) - '(speedbar-file-face ((t (:foreground "cyan4")))) - '(speedbar-highlight-face ((t (:background "green")))) - '(speedbar-selected-face ((t (:underline t :foreground "red")))) - '(speedbar-tag-face ((t (:foreground "brown")))) - '(underline ((t (:underline t)))) - '(widget-button-face ((t (:bold t)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "dark green")))) - '(widget-field-face ((t (:background "gray85")))) - '(widget-inactive-face ((t (:foreground "dim gray")))) - '(widget-single-line-field-face ((t (:background "gray85"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'greiner) - -;;; greiner-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/gtk-ide-theme.el b/elpa/color-theme-modern-0.0.3/gtk-ide-theme.el deleted file mode 100644 index 77e31cf..0000000 --- a/elpa/color-theme-modern-0.0.3/gtk-ide-theme.el +++ /dev/null @@ -1,63 +0,0 @@ -;;; gtk-ide-theme.el --- gtk-ide theme - -;; Copyright (C) 2000 by Gordon Messmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of gtk-ide theme from `color-themes' - -;;; Code: - -(deftheme gtk-ide - "gtk-ide theme") - -(custom-theme-set-faces - 'gtk-ide - - '(default ((t (:background "white" :foreground "black")))) - '(mouse ((t (:foreground "grey15")))) - '(cursor ((t (:background "grey15")))) - - '(font-lock-comment-face ((t (:italic t :foreground "grey55")))) - '(font-lock-string-face ((t (:foreground "DarkRed")))) - '(font-lock-keyword-face ((t (:foreground "DarkBlue")))) - '(font-lock-warning-face ((t (:bold t :foreground "VioletRed")))) - '(font-lock-constant-face ((t (:foreground "OliveDrab")))) - '(font-lock-type-face ((t (:foreground "SteelBlue4")))) - '(font-lock-variable-name-face ((t (:foreground "DarkGoldenrod")))) - '(font-lock-function-name-face ((t (:foreground "SlateBlue")))) - '(font-lock-builtin-face ((t (:foreground "ForestGreen")))) - '(highline-face ((t (:background "grey95")))) - '(show-paren-match-face ((t (:background "grey80")))) - '(region ((t (:background "grey80")))) - '(highlight ((t (:background "LightSkyBlue")))) - '(secondary-selection ((t (:background "grey55")))) - '(widget-field-face ((t (:background "navy")))) - '(widget-single-line-field-face ((t (:background "royalblue"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'gtk-ide) - -;;; gtk-ide-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/high-contrast-theme.el b/elpa/color-theme-modern-0.0.3/high-contrast-theme.el deleted file mode 100644 index ad8362f..0000000 --- a/elpa/color-theme-modern-0.0.3/high-contrast-theme.el +++ /dev/null @@ -1,271 +0,0 @@ -;;; high-contrast-theme.el --- high-contrast theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of high-contrast theme from `color-themes' - -;;; Code: - -(deftheme high-contrast - "high-contrast theme") - -(custom-theme-set-faces - 'high-contrast - - '(default ((t (:background "white" :foreground "black")))) - '(mouse ((t (:foreground "black")))) - '(cursor ((t (:background "red")))) - '(border ((t (:foreground "black")))) - - '(Man-overstrike-face ((t (:bold t)))) - '(Man-underline-face ((t (:underline t)))) - '(apropos-keybinding-face ((t (:underline t)))) - '(apropos-label-face ((t (:italic t)))) - '(apropos-match-face ((t (:background "paleturquoise")))) - '(apropos-property-face ((t (:bold t :italic t)))) - '(apropos-symbol-face ((t (:bold t)))) - '(goto-address-mail-face ((t (:italic t)))) - '(goto-address-mail-mouse-face ((t (:background "paleturquoise")))) - '(goto-address-url-face ((t (:bold t)))) - '(goto-address-url-mouse-face ((t (:background "darkseagreen2")))) - '(help-highlight-face ((t (:underline t)))) - '(list-matching-lines-face ((t (:bold t)))) - '(view-highlight-face ((t (:background "darkseagreen2")))) - '(bold ((t (:bold t :underline t)))) - '(bold-italic ((t (:bold t :underline t)))) - '(calendar-today-face ((t (:underline t)))) - '(cperl-array-face ((t (:foreground "Blue" :background "lightyellow2" :bold t)))) - '(cperl-hash-face ((t (:foreground "Red" :background "lightyellow2" :bold t :italic t)))) - '(cperl-nonoverridable-face ((t (:foreground "chartreuse3")))) - '(custom-button-face ((t (nil)))) - '(custom-changed-face ((t (:foreground "white" :background "blue")))) - '(custom-documentation-face ((t (nil)))) - '(custom-face-tag-face ((t (:underline t)))) - '(custom-group-tag-face ((t (:foreground "blue" :underline t)))) - '(custom-group-tag-face-1 ((t (:foreground "red" :underline t)))) - '(custom-invalid-face ((t (:foreground "yellow" :background "red")))) - '(custom-modified-face ((t (:foreground "white" :background "blue")))) - '(custom-rogue-face ((t (:foreground "pink" :background "black")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:foreground "blue" :background "white")))) - '(custom-state-face ((t (:foreground "dark green")))) - '(custom-variable-button-face ((t (:bold t :underline t)))) - '(custom-variable-tag-face ((t (:foreground "blue" :underline t)))) - '(diary-face ((t (:foreground "red")))) - '(ediff-current-diff-face-A ((t (:foreground "firebrick" :background "pale green")))) - '(ediff-current-diff-face-Ancestor ((t (:foreground "Black" :background "VioletRed")))) - '(ediff-current-diff-face-B ((t (:foreground "DarkOrchid" :background "Yellow")))) - '(ediff-current-diff-face-C ((t (:foreground "Navy" :background "Pink")))) - '(ediff-even-diff-face-A ((t (:foreground "Black" :background "light grey")))) - '(ediff-even-diff-face-Ancestor ((t (:foreground "White" :background "Grey")))) - '(ediff-even-diff-face-B ((t (:foreground "White" :background "Grey")))) - '(ediff-even-diff-face-C ((t (:foreground "Black" :background "light grey")))) - '(ediff-fine-diff-face-A ((t (:foreground "Navy" :background "sky blue")))) - '(ediff-fine-diff-face-Ancestor ((t (:foreground "Black" :background "Green")))) - '(ediff-fine-diff-face-B ((t (:foreground "Black" :background "cyan")))) - '(ediff-fine-diff-face-C ((t (:foreground "Black" :background "Turquoise")))) - '(ediff-odd-diff-face-A ((t (:foreground "White" :background "Grey")))) - '(ediff-odd-diff-face-Ancestor ((t (:foreground "Black" :background "light grey")))) - '(ediff-odd-diff-face-B ((t (:foreground "Black" :background "light grey")))) - '(ediff-odd-diff-face-C ((t (:foreground "White" :background "Grey")))) - '(eshell-ls-archive-face ((t (:foreground "Orchid" :bold t)))) - '(eshell-ls-backup-face ((t (:foreground "OrangeRed")))) - '(eshell-ls-clutter-face ((t (:foreground "OrangeRed" :bold t)))) - '(eshell-ls-directory-face ((t (:foreground "Blue" :bold t)))) - '(eshell-ls-executable-face ((t (:foreground "ForestGreen" :bold t)))) - '(eshell-ls-missing-face ((t (:foreground "Red" :bold t)))) - '(eshell-ls-product-face ((t (:foreground "OrangeRed")))) - '(eshell-ls-readonly-face ((t (:foreground "Brown")))) - '(eshell-ls-special-face ((t (:foreground "Magenta" :bold t)))) - '(eshell-ls-symlink-face ((t (:foreground "DarkCyan" :bold t)))) - '(eshell-ls-unreadable-face ((t (:foreground "Grey30")))) - '(eshell-prompt-face ((t (:foreground "Red" :bold t)))) - '(eshell-test-failed-face ((t (:foreground "OrangeRed" :bold t)))) - '(eshell-test-ok-face ((t (:foreground "Green" :bold t)))) - '(excerpt ((t (:italic t)))) - '(fixed ((t (:bold t)))) - '(flyspell-duplicate-face ((t (:foreground "Gold3" :bold t :underline t)))) - '(flyspell-incorrect-face ((t (:foreground "OrangeRed" :bold t :underline t)))) - '(font-lock-builtin-face ((t (:bold t :foreground "Red")))) - '(font-lock-comment-face ((t (:bold t :foreground "Firebrick")))) - '(font-lock-constant-face ((t (:bold t :underline t :foreground "Blue")))) - '(font-lock-function-name-face ((t (:bold t :foreground "Blue")))) - '(font-lock-keyword-face ((t (:bold t :foreground "Purple")))) - '(font-lock-string-face ((t (:bold t :foreground "DarkGreen")))) - '(font-lock-type-face ((t (:bold t :foreground "ForestGreen")))) - '(font-lock-variable-name-face ((t (:bold t :foreground "DarkGoldenrod")))) - '(font-lock-warning-face ((t (:bold t :foreground "Red")))) - '(fringe ((t (:background "grey95")))) - '(gnus-cite-attribution-face ((t (:italic t)))) - '(gnus-cite-face-1 ((t (:foreground "MidnightBlue")))) - '(gnus-cite-face-10 ((t (:foreground "medium purple")))) - '(gnus-cite-face-11 ((t (:foreground "turquoise")))) - '(gnus-cite-face-2 ((t (:foreground "firebrick")))) - '(gnus-cite-face-3 ((t (:foreground "dark green")))) - '(gnus-cite-face-4 ((t (:foreground "OrangeRed")))) - '(gnus-cite-face-5 ((t (:foreground "dark khaki")))) - '(gnus-cite-face-6 ((t (:foreground "dark violet")))) - '(gnus-cite-face-7 ((t (:foreground "SteelBlue4")))) - '(gnus-cite-face-8 ((t (:foreground "magenta")))) - '(gnus-cite-face-9 ((t (:foreground "violet")))) - '(gnus-emphasis-bold ((t (:bold t)))) - '(gnus-emphasis-bold-italic ((t (:bold t :italic t)))) - '(gnus-emphasis-italic ((t (:italic t)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(gnus-emphasis-underline-bold ((t (:bold t :underline t)))) - '(gnus-emphasis-underline-bold-italic ((t (:bold t :italic t :underline t)))) - '(gnus-emphasis-underline-italic ((t (:italic t :underline t)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "DeepPink3")))) - '(gnus-group-mail-1-face ((t (:foreground "DeepPink3" :bold t)))) - '(gnus-group-mail-2-empty-face ((t (:foreground "HotPink3")))) - '(gnus-group-mail-2-face ((t (:foreground "HotPink3" :bold t)))) - '(gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) - '(gnus-group-mail-3-face ((t (:foreground "magenta4" :bold t)))) - '(gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) - '(gnus-group-mail-low-face ((t (:foreground "DeepPink4" :bold t)))) - '(gnus-group-news-1-empty-face ((t (:foreground "ForestGreen")))) - '(gnus-group-news-1-face ((t (:foreground "ForestGreen" :bold t)))) - '(gnus-group-news-2-empty-face ((t (:foreground "CadetBlue4")))) - '(gnus-group-news-2-face ((t (:foreground "CadetBlue4" :bold t)))) - '(gnus-group-news-3-empty-face ((t (nil)))) - '(gnus-group-news-3-face ((t (:bold t)))) - '(gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) - '(gnus-group-news-low-face ((t (:foreground "DarkGreen" :bold t)))) - '(gnus-header-content-face ((t (:foreground "indianred4" :italic t)))) - '(gnus-header-from-face ((t (:foreground "red3")))) - '(gnus-header-name-face ((t (:foreground "maroon")))) - '(gnus-header-newsgroups-face ((t (:foreground "MidnightBlue" :italic t)))) - '(gnus-header-subject-face ((t (:foreground "red4")))) - '(gnus-signature-face ((t (:italic t)))) - '(gnus-splash-face ((t (:foreground "ForestGreen")))) - '(gnus-summary-cancelled-face ((t (:foreground "yellow" :background "black")))) - '(gnus-summary-high-ancient-face ((t (:foreground "RoyalBlue" :bold t)))) - '(gnus-summary-high-read-face ((t (:foreground "DarkGreen" :bold t)))) - '(gnus-summary-high-ticked-face ((t (:foreground "firebrick" :bold t)))) - '(gnus-summary-high-unread-face ((t (:bold t)))) - '(gnus-summary-low-ancient-face ((t (:foreground "RoyalBlue" :italic t)))) - '(gnus-summary-low-read-face ((t (:foreground "DarkGreen" :italic t)))) - '(gnus-summary-low-ticked-face ((t (:foreground "firebrick" :italic t)))) - '(gnus-summary-low-unread-face ((t (:italic t)))) - '(gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) - '(gnus-summary-normal-read-face ((t (:foreground "DarkGreen")))) - '(gnus-summary-normal-ticked-face ((t (:foreground "firebrick")))) - '(gnus-summary-normal-unread-face ((t (nil)))) - '(gnus-summary-selected-face ((t (:underline t)))) - '(highlight ((t (:background "black" :foreground "white" :bold 1)))) - '(highlight-changes-delete-face ((t (:foreground "red" :underline t)))) - '(highlight-changes-face ((t (:foreground "red")))) - '(highline-face ((t (:background "paleturquoise")))) - '(holiday-face ((t (:background "pink")))) - '(info-menu-5 ((t (:underline t :bold t)))) - '(info-node ((t (:bold t)))) - '(info-xref ((t (:bold t)))) - '(italic ((t (:bold t :underline t)))) - '(makefile-space-face ((t (:background "hotpink")))) - '(message-cited-text-face ((t (:foreground "red")))) - '(message-header-cc-face ((t (:foreground "MidnightBlue")))) - '(message-header-name-face ((t (:foreground "cornflower blue")))) - '(message-header-newsgroups-face ((t (:foreground "blue4" :bold t :italic t)))) - '(message-header-other-face ((t (:foreground "steel blue")))) - '(message-header-subject-face ((t (:foreground "navy blue" :bold t)))) - '(message-header-to-face ((t (:foreground "MidnightBlue" :bold t)))) - '(message-header-xheader-face ((t (:foreground "blue")))) - '(message-separator-face ((t (:foreground "brown")))) - '(modeline ((t (:background "black" :foreground "white" :bold 1)))) - '(modeline-buffer-id ((t (:background "black" :foreground "white" :bold 1)))) - '(modeline-mousable ((t (:background "black" :foreground "white" :bold 1)))) - '(modeline-mousable-minor-mode ((t (:background "black" :foreground "white" :bold 1)))) - '(region ((t (:background "black" :foreground "white" :bold 1)))) - '(secondary-selection ((t (:background "black" :foreground "white" :bold 1)))) - '(show-paren-match-face ((t (:background "turquoise")))) - '(show-paren-mismatch-face ((t (:foreground "white" :background "purple")))) - '(speedbar-button-face ((t (:foreground "green4")))) - '(speedbar-directory-face ((t (:foreground "blue4")))) - '(speedbar-file-face ((t (:foreground "cyan4")))) - '(speedbar-highlight-face ((t (:background "green")))) - '(speedbar-selected-face ((t (:foreground "red" :underline t)))) - '(speedbar-tag-face ((t (:foreground "brown")))) - '(term-black ((t (:foreground "black")))) - '(term-blackbg ((t (:background "black")))) - '(term-blue ((t (:foreground "blue")))) - '(term-bluebg ((t (:background "blue")))) - '(term-bold ((t (:bold t)))) - '(term-cyan ((t (:foreground "cyan")))) - '(term-cyanbg ((t (:background "cyan")))) - '(term-default-bg ((t (nil)))) - '(term-default-bg-inv ((t (nil)))) - '(term-default-fg ((t (nil)))) - '(term-default-fg-inv ((t (nil)))) - '(term-green ((t (:foreground "green")))) - '(term-greenbg ((t (:background "green")))) - '(term-invisible ((t (nil)))) - '(term-invisible-inv ((t (nil)))) - '(term-magenta ((t (:foreground "magenta")))) - '(term-magentabg ((t (:background "magenta")))) - '(term-red ((t (:foreground "red")))) - '(term-redbg ((t (:background "red")))) - '(term-underline ((t (:underline t)))) - '(term-white ((t (:foreground "white")))) - '(term-whitebg ((t (:background "white")))) - '(term-yellow ((t (:foreground "yellow")))) - '(term-yellowbg ((t (:background "yellow")))) - '(underline ((t (:bold t :underline t)))) - '(vcursor ((t (:foreground "blue" :background "cyan" :underline t)))) - '(vhdl-font-lock-attribute-face ((t (:foreground "Orchid")))) - '(vhdl-font-lock-directive-face ((t (:foreground "CadetBlue")))) - '(vhdl-font-lock-enumvalue-face ((t (:foreground "Gold4")))) - '(vhdl-font-lock-function-face ((t (:foreground "Orchid4")))) - '(vhdl-font-lock-prompt-face ((t (:foreground "Red" :bold t)))) - '(vhdl-font-lock-reserved-words-face ((t (:foreground "Orange" :bold t)))) - '(vhdl-font-lock-translate-off-face ((t (:background "LightGray")))) - '(vhdl-speedbar-architecture-face ((t (:foreground "Blue")))) - '(vhdl-speedbar-architecture-selected-face ((t (:foreground "Blue" :underline t)))) - '(vhdl-speedbar-configuration-face ((t (:foreground "DarkGoldenrod")))) - '(vhdl-speedbar-configuration-selected-face ((t (:foreground "DarkGoldenrod" :underline t)))) - '(vhdl-speedbar-entity-face ((t (:foreground "ForestGreen")))) - '(vhdl-speedbar-entity-selected-face ((t (:foreground "ForestGreen" :underline t)))) - '(vhdl-speedbar-instantiation-face ((t (:foreground "Brown")))) - '(vhdl-speedbar-instantiation-selected-face ((t (:foreground "Brown" :underline t)))) - '(vhdl-speedbar-package-face ((t (:foreground "Grey50")))) - '(vhdl-speedbar-package-selected-face ((t (:foreground "Grey50" :underline t)))) - '(viper-minibuffer-emacs-face ((t (:foreground "Black" :background "darkseagreen2")))) - '(viper-minibuffer-insert-face ((t (:foreground "Black" :background "pink")))) - '(viper-minibuffer-vi-face ((t (:foreground "DarkGreen" :background "grey")))) - '(viper-replace-overlay-face ((t (:foreground "Black" :background "darkseagreen2")))) - '(viper-search-face ((t (:foreground "Black" :background "khaki")))) - '(widget-button-face ((t (:bold t)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "dark green")))) - '(widget-field-face ((t (:background "gray85")))) - '(widget-inactive-face ((t (:foreground "dim gray")))) - '(widget-single-line-field-face ((t (:background "gray85"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'high-contrast) - -;;; high-contrast-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/hober-theme.el b/elpa/color-theme-modern-0.0.3/hober-theme.el deleted file mode 100644 index 9364d68..0000000 --- a/elpa/color-theme-modern-0.0.3/hober-theme.el +++ /dev/null @@ -1,277 +0,0 @@ -;;; hober-theme.el --- hober theme - -;; Copyright (C) 1999, 2000 Jonadab the Unsightly One -;; Copyright (C) 2000, 2001, 2002, 2003 Alex Schroeder -;; Copyright (C) 2003, 2004, 2005, 2006 Xavier Maillard -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of hober theme from `color-themes' - -;;; Code: - -(deftheme hober - "hober theme") - -(custom-theme-set-faces - 'hober - - '(default ((t (:background "black" :foreground "#c0c0c0")))) - '(bold ((t (:bold t :weight bold)))) - '(bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) - '(border ((t (:background "black")))) - '(buffer-menu-buffer ((t (:bold t :weight bold)))) - '(button ((t (:underline t :foreground "cyan1")))) - '(calendar-today-face ((t (:underline t)))) - '(completions-annotations ((t (:italic t :slant italic)))) - '(completions-common-part ((t (:foreground "#c0c0c0" :background "black")))) - '(completions-first-difference ((t (:bold t :weight bold)))) - '(cperl-array-face ((t (:bold t :background "lightyellow2" - :foreground "Blue" :weight bold)))) - '(cperl-hash-face ((t (:italic t :bold t :background "lightyellow2" - :foreground "Red" :slant italic :weight bold)))) - '(cperl-nonoverridable-face ((t (:foreground "chartreuse3")))) - '(cursor ((t (:background "medium turquoise")))) - '(diary-face ((t (:foreground "red")))) - - '(dired-directory ((t (:foreground "#4186be")))) - '(dired-flagged ((t (:bold t :weight bold :foreground "Pink")))) - '(dired-header ((t (:foreground "Coral")))) - '(dired-ignored ((t (:foreground "grey70")))) - '(dired-mark ((t (:foreground "#00ff00")))) - '(dired-marked ((t (:bold t :weight bold :foreground "DarkOrange")))) - '(dired-perm-write ((t (:foreground "Red")))) - '(dired-symlink ((t (:foreground "#00ffff")))) - '(dired-warning ((t (:bold t :weight bold :foreground "Red")))) - - '(error ((t (:bold t :foreground "Pink" :weight bold)))) - '(escape-glyph ((t (:foreground "cyan")))) - '(excerpt ((t (:italic t :slant italic)))) - '(file-name-shadow ((t (:foreground "grey70")))) - '(fixed ((t (:bold t :weight bold)))) - - '(flyspell-duplicate-face ((t (:bold t :foreground "Gold3" :underline t :weight bold)))) - '(flyspell-incorrect-face ((t (:bold t :foreground "OrangeRed" :underline t :weight bold)))) - - '(font-lock-builtin-face ((t (:foreground "#ffaa00")))) - '(font-lock-comment-delimiter-face ((t (:foreground "Red")))) - '(font-lock-comment-face ((t (:foreground "Red")))) - '(font-lock-constant-face ((t (:foreground "#00ff00")))) - '(font-lock-doc-face ((t (:foreground "#ffff00")))) - '(font-lock-function-name-face ((t (:foreground "#4186be")))) - '(font-lock-keyword-face ((t (:foreground "#00ffff")))) - '(font-lock-negation-char-face ((t (nil)))) - '(font-lock-preprocessor-face ((t (:foreground "#ffaa00")))) - '(font-lock-regexp-grouping-backslash ((t (:bold t :weight bold)))) - '(font-lock-regexp-grouping-construct ((t (:bold t :weight bold)))) - '(font-lock-string-face ((t (:foreground "#ffff00")))) - '(font-lock-type-face ((t (:foreground "Coral")))) - '(font-lock-variable-name-face ((t (:bold t :foreground "white" :weight bold)))) - '(font-lock-warning-face ((t (:bold t :foreground "Red" :weight bold)))) - - '(fringe ((t (:background "grey10")))) - '(glyphless-char ((t (:height 0.6)))) - - '(gnus-cite-attribution-face ((t (:italic t :slant italic)))) - '(gnus-cite-face-1 ((t (:foreground "Khaki")))) - '(gnus-cite-face-2 ((t (:foreground "Coral")))) - '(gnus-cite-face-3 ((t (:foreground "#4186be")))) - '(gnus-cite-face-4 ((t (:foreground "yellow green")))) - '(gnus-cite-face-5 ((t (:foreground "IndianRed")))) - '(gnus-cite-face-list ((t (:bold t :foreground "red" :weight bold)))) - '(gnus-emphasis-bold ((t (:bold t :weight bold)))) - '(gnus-emphasis-bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) - '(gnus-emphasis-italic ((t (:italic t :slant italic)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(gnus-emphasis-underline-bold ((t (:bold t :underline t :weight bold)))) - '(gnus-emphasis-underline-bold-italic ((t (:italic t :bold t :underline t - :slant italic :weight bold)))) - '(gnus-emphasis-underline-italic ((t (:italic t :underline t :slant italic)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "DeepPink3")))) - '(gnus-group-mail-1-face - ((t (:bold t :foreground "DeepPink3" :weight bold)))) - '(gnus-group-mail-2-empty-face - ((t (:foreground "HotPink3")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "HotPink3" :weight bold)))) - '(gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "magenta4" :weight bold)))) - '(gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) - '(gnus-group-mail-low-face - ((t (:bold t :foreground "DeepPink4" :weight bold)))) - '(gnus-group-news-1-empty-face ((t (:foreground "ForestGreen")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "ForestGreen" :weight bold)))) - '(gnus-group-news-2-empty-face ((t (:foreground "CadetBlue4")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "CadetBlue4" :weight bold)))) - '(gnus-group-news-3-empty-face ((t (nil)))) - '(gnus-group-news-3-face ((t (:bold t :weight bold)))) - '(gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "DarkGreen" :weight bold)))) - '(gnus-header-content-face ((t (:italic t :foreground "#4186be" :slant italic)))) - '(gnus-header-from-face ((t (:foreground "Coral")))) - '(gnus-header-name-face ((t (:foreground "white")))) - '(gnus-header-newsgroups-face ((t (:italic t :foreground "#4186be" :slant italic)))) - '(gnus-header-subject-face ((t (:foreground "#4186be")))) - '(gnus-signature-face ((t (:foreground "white")))) - '(gnus-splash-face ((t (:foreground "ForestGreen")))) - '(gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) - '(gnus-summary-high-ancient-face - ((t (:bold t :foreground "RoyalBlue" :weight bold)))) - '(gnus-summary-high-read-face - ((t (:bold t :foreground "DarkGreen" :weight bold)))) - '(gnus-summary-high-ticked-face - ((t (:bold t :foreground "firebrick" :weight bold)))) - '(gnus-summary-high-unread-face - ((t (:bold t :weight bold)))) - '(gnus-summary-low-ancient-face - ((t (:italic t :foreground "RoyalBlue" :slant italic)))) - '(gnus-summary-low-read-face - ((t (:italic t :foreground "DarkGreen" :slant italic)))) - '(gnus-summary-low-ticked-face - ((t (:italic t :foreground "firebrick" :slant italic)))) - '(gnus-summary-low-unread-face - ((t (:italic t :slant italic)))) - '(gnus-summary-normal-ancient-face - ((t (:foreground "RoyalBlue")))) - '(gnus-summary-normal-read-face ((t (:foreground "DarkGreen")))) - '(gnus-summary-normal-ticked-face ((t (:foreground "firebrick")))) - '(gnus-summary-normal-unread-face ((t (nil)))) - '(gnus-summary-selected-face ((t (:underline t)))) - - '(header-line ((t (:box (:line-width -1 :style released-button) - :background "grey20" :foreground "grey90" :box nil)))) - '(help-argument-name ((t (nil)))) - '(highlight ((t (:background "#c0c0c0" :foreground "black")))) - '(highlight-changes-delete-face ((t (:foreground "red" :underline t)))) - '(highlight-changes-face ((t (:foreground "red")))) - '(holiday-face ((t (:background "pink")))) - '(isearch ((t (:background "palevioletred2" :foreground "brown4")))) - '(isearch-fail ((t (:background "red4")))) - '(italic ((t (:italic t :slant italic)))) - '(lazy-highlight ((t (:background "paleturquoise4")))) - '(link ((t (:foreground "cyan1" :underline t)))) - '(link-visited ((t (:underline t :foreground "violet")))) - '(makefile-space-face ((t (:background "hotpink")))) - '(match ((t (:background "RoyalBlue3")))) - '(menu ((t (nil)))) - - '(message-cited-text-face ((t (:foreground "white")))) - '(message-header-cc-face ((t (:foreground "#4186be")))) - '(message-header-name-face ((t (:foreground "white")))) - '(message-header-newsgroups-face - ((t (:bold t :foreground "Coral" :weight bold)))) - '(message-header-other-face ((t (:foreground "steel blue")))) - '(message-header-subject-face - ((t (:bold t :foreground "#4186be" :weight bold)))) - '(message-header-to-face ((t (:bold t :foreground "#4186be" :weight bold)))) - '(message-header-xheader-face ((t (:foreground "blue")))) - '(message-separator-face ((t (:foreground "brown")))) - - '(minibuffer-prompt ((t (:foreground "cyan")))) - '(mode-line - ((t (:background "darkslateblue" :foreground "white" - :box (:line-width -1 :style released-button))))) - '(mode-line-buffer-id ((t (:bold t :background "darkslateblue" - :foreground "white" :weight bold)))) - '(mode-line-emphasis ((t (:bold t :weight bold)))) - '(mode-line-highlight - ((t (:box (:line-width 2 :color "grey40" :style released-button))))) - '(mode-line-inactive - ((t (:background "grey30" - :foreground "grey80" - :box (:line-width -1 :color "grey40" :style nil) - :weight light)))) - '(modeline-mousable ((t (:background "darkslateblue" :foreground "white")))) - '(modeline-mousable-minor-mode - ((t (:background "darkslateblue" :foreground "white")))) - - '(mouse ((t (:background "black")))) - '(next-error ((t (:foreground "white" :background "darkslateblue")))) - '(nobreak-space ((t (:foreground "cyan" :underline t)))) - '(query-replace ((t (:foreground "brown4" :background "palevioletred2")))) - '(region ((t (:background "darkslateblue" :foreground "white")))) - '(scroll-bar ((t (nil)))) - '(secondary-selection ((t (:background "paleturquoise")))) - - '(sgml-doctype-face ((t (:foreground "orange")))) - '(sgml-end-tag-face ((t (:foreground "greenyellow")))) - '(sgml-entity-face ((t (:foreground "gold")))) - '(sgml-ignored-face ((t (:background "gray60" :foreground "gray20")))) - '(sgml-sgml-face ((t (:foreground "yellow")))) - '(sgml-start-tag-face ((t (:foreground "mediumspringgreen")))) - - '(shadow ((t (:foreground "grey70")))) - '(show-paren-match-face ((t (:background "purple" :foreground "white")))) - '(show-paren-mismatch-face ((t (:background "red" :foreground "white")))) - '(success ((t (:bold t :foreground "Green1" :weight bold)))) - - '(term-black ((t (:foreground "black")))) - '(term-blackbg ((t (:background "black")))) - '(term-blue ((t (:foreground "#4186be")))) - '(term-bluebg ((t (:background "#4186be")))) - '(term-bold ((t (:bold t :weight bold)))) - '(term-cyan ((t (:foreground "#71bebe")))) - '(term-cyanbg ((t (:background "#71bebe")))) - '(term-default-bg ((t (nil)))) - '(term-default-bg-inv ((t (nil)))) - '(term-default-fg ((t (nil)))) - '(term-default-fg-inv ((t (nil)))) - '(term-green ((t (:foreground "#e5f779")))) - '(term-greenbg ((t (:background "#e5f779")))) - '(term-invisible ((t (nil)))) - '(term-invisible-inv ((t (nil)))) - '(term-magenta ((t (:foreground "#ef9ebe")))) - '(term-magentabg ((t (:background "#ef9ebe")))) - '(term-red ((t (:foreground "#ef8171")))) - '(term-redbg ((t (:background "#ef8171")))) - '(term-underline ((t (:underline t)))) - '(term-white ((t (:foreground "#c0c0c0")))) - '(term-whitebg ((t (:background "#c0c0c0")))) - '(term-yellow ((t (:foreground "#fff796")))) - '(term-yellowbg ((t (:background "#fff796")))) - - '(tool-bar - ((t (:background "grey75" :foreground "black" - :box (:line-width 1 :style released-button))))) - '(tooltip - ((t (:background "lightyellow" :foreground "black")))) - '(trailing-whitespace ((t (:background "red1")))) - '(underline ((t (:underline t)))) - - '(vertical-border ((t (nil)))) - '(warning ((t (:bold t :foreground "DarkOrange" :weight bold)))) - - '(widget-button ((t (:bold t :weight bold)))) - '(widget-button-pressed ((t (:background "black" :foreground "red")))) - '(widget-documentation ((t (:background "white" :foreground "dark green")))) - '(widget-field ((t (:background "gray85" :foreground "black")))) - '(widget-inactive ((t (:background "red" :foreground "dim gray")))) - '(widget-single-line-field ((t (:background "gray85" :foreground "black")))) - - '(zmacs-region ((t (:background "darkslateblue" :foreground "white"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'hober) - -;;; hober-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/infodoc-theme.el b/elpa/color-theme-modern-0.0.3/infodoc-theme.el deleted file mode 100644 index ac1aa04..0000000 --- a/elpa/color-theme-modern-0.0.3/infodoc-theme.el +++ /dev/null @@ -1,126 +0,0 @@ -;;; infodoc-theme.el --- infodoc theme - -;; Copyright (C) 2000 by Frederic Giroud -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of infodoc theme from `color-themes' - -;;; Code: - -(deftheme infodoc - "infodoc theme") - -(custom-theme-set-faces - 'infodoc - - '(default ((t (:background "wheat" :foreground "black")))) - '(cursor ((t (:background "red")))) - '(border ((t (:foreground "black")))) - - '(blue ((t (:bold t :foreground "blue")))) - '(bold ((t (:background "wheat" :foreground "black")))) - '(bold-italic ((t (:bold t :background "wheat" :foreground "black")))) - '(border-glyph ((t (:bold t)))) - '(calendar-today-face ((t (:underline t :bold t)))) - '(custom-button-face ((t (nil)))) - '(custom-changed-face ((t (:bold t :background "blue" :foreground "white")))) - '(custom-documentation-face ((t (:bold t :background "wheat" :foreground "purple4")))) - '(custom-face-tag-face ((t (:underline t :bold t)))) - '(custom-group-tag-face ((t (:underline t :bold t :background "wheat" :foreground "blue")))) - '(custom-group-tag-face-1 ((t (:underline t :bold t :background "wheat" :foreground "red")))) - '(custom-invalid-face ((t (:bold t :background "red" :foreground "yellow")))) - '(custom-modified-face ((t (:bold t :background "blue" :foreground "white")))) - '(custom-rogue-face ((t (:bold t :background "black" :foreground "pink")))) - '(custom-saved-face ((t (:underline t :bold t)))) - '(custom-set-face ((t (:bold t :background "white" :foreground "blue")))) - '(custom-state-face ((t (:bold t :background "wheat" :foreground "dark green")))) - '(custom-variable-button-face ((t (:underline t)))) - '(custom-variable-tag-face ((t (:underline t :bold t :background "wheat" :foreground "blue")))) - '(diary-face ((t (:bold t :foreground "red")))) - '(display-time-mail-balloon-enhance-face ((t (:bold t :background "wheat" :foreground "black")))) - '(display-time-mail-balloon-gnus-group-face ((t (:bold t :background "wheat" :foreground "blue")))) - '(display-time-time-balloon-face ((t (:bold t :background "light salmon" :foreground "dark green")))) - '(font-lock-comment-face ((t (:bold t :background "wheat" :foreground "turquoise4")))) - '(font-lock-doc-string-face ((t (:bold t :background "wheat" :foreground "purple4")))) - '(font-lock-function-name-face ((t (:bold t :background "wheat" :foreground "blue4")))) - '(font-lock-keyword-face ((t (:bold t :background "wheat" :foreground "dark orchid")))) - '(font-lock-preprocessor-face ((t (:bold t :background "wheat" :foreground "orchid4")))) - '(font-lock-reference-face ((t (:bold t :background "wheat" :foreground "red3")))) - '(font-lock-string-face ((t (:bold t :background "wheat" :foreground "dark goldenrod")))) - '(font-lock-type-face ((t (:bold t :background "wheat" :foreground "brown")))) - '(font-lock-variable-name-face ((t (:bold t :background "wheat" :foreground "chocolate")))) - '(font-lock-warning-face ((t (:bold t :background "wheat" :foreground "black")))) - '(gdb-arrow-face ((t (:bold t :background "LightGreen" :foreground "black")))) - '(green ((t (:bold t :foreground "green")))) - '(gui-button-face ((t (:bold t :background "wheat" :foreground "red")))) - '(gui-element ((t (:bold t :background "wheat" :foreground "black")))) - '(highlight ((t (:bold t :background "darkseagreen2" :foreground "dark green")))) - '(holiday-face ((t (:bold t :background "pink" :foreground "black")))) - '(hproperty:but-face ((t (:bold t :background "wheat" :foreground "medium violet red")))) - '(hproperty:flash-face ((t (:bold t :background "wheat" :foreground "gray80")))) - '(hproperty:highlight-face ((t (:bold t :background "wheat" :foreground "red")))) - '(hproperty:item-face ((t (:bold t)))) - '(isearch ((t (:bold t :background "pale turquoise" :foreground "blue")))) - '(italic ((t (:bold t :background "wheat" :foreground "black")))) - '(left-margin ((t (:bold t :background "wheat" :foreground "black")))) - '(list-mode-item-selected ((t (:bold t :background "gray68" :foreground "black")))) - '(message-cited-text ((t (:bold t :background "wheat" :foreground "brown")))) - '(message-header-contents ((t (:bold t :background "wheat" :foreground "black")))) - '(message-headers ((t (:bold t :background "wheat" :foreground "black")))) - '(message-highlighted-header-contents ((t (:bold t :background "wheat" :foreground "blue")))) - '(message-url ((t (nil)))) - '(modeline ((t (:bold t :background "light salmon" :foreground "dark green")))) - '(modeline-buffer-id ((t (:bold t :background "light salmon" :foreground "blue4")))) - '(modeline-mousable ((t (:bold t :background "light salmon" :foreground "firebrick")))) - '(modeline-mousable-minor-mode ((t (:bold t :background "light salmon" :foreground "green4")))) - '(pointer ((t (:bold t :background "wheat" :foreground "red")))) - '(primary-selection ((t (:bold t :background "medium sea green")))) - '(red ((t (:bold t :foreground "red")))) - '(right-margin ((t (:bold t :background "wheat" :foreground "black")))) - '(secondary-selection ((t (:bold t :background "paleturquoise" :foreground "black")))) - '(shell-input-face ((t (:bold t :background "wheat" :foreground "blue")))) - '(shell-option-face ((t (:bold t :background "wheat" :foreground "turquoise4")))) - '(shell-output-2-face ((t (:bold t :background "wheat" :foreground "dark goldenrod")))) - '(shell-output-3-face ((t (:bold t :background "wheat" :foreground "dark goldenrod")))) - '(shell-output-face ((t (:bold t :background "wheat" :foreground "black")))) - '(shell-prompt-face ((t (:bold t :background "wheat" :foreground "dark orchid")))) - '(text-cursor ((t (:bold t :background "red" :foreground "wheat")))) - '(toolbar ((t (:bold t :background "wheat" :foreground "black")))) - '(underline ((t (:underline t :bold t :background "wheat" :foreground "black")))) - '(vertical-divider ((t (:bold t)))) - '(widget-button-face ((t (nil)))) - '(widget-button-pressed-face ((t (:bold t :background "wheat" :foreground "red")))) - '(widget-documentation-face ((t (:bold t :background "wheat" :foreground "dark green")))) - '(widget-field-face ((t (:bold t :background "gray85")))) - '(widget-inactive-face ((t (:bold t :background "wheat" :foreground "dim gray")))) - '(x-face ((t (:bold t :background "wheat" :foreground "black")))) - '(yellow ((t (:bold t :foreground "yellow")))) - '(zmacs-region ((t (:bold t :background "lightyellow" :foreground "darkgreen"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'infodoc) - -;;; infodoc-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/jb-simple-theme.el b/elpa/color-theme-modern-0.0.3/jb-simple-theme.el deleted file mode 100644 index 36fd321..0000000 --- a/elpa/color-theme-modern-0.0.3/jb-simple-theme.el +++ /dev/null @@ -1,329 +0,0 @@ -;;; jb-simple-theme.el --- jb-simple theme - -;; Copyright (C) 2000 by jeff -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of jb-simple theme from `color-themes' - -;;; Code: - -(deftheme jb-simple - "jb-simple theme") - -(custom-theme-set-faces - 'jb-simple - - '(default ((t (:background "white" :foreground "black")))) - '(mouse ((t (:foreground "black")))) - '(cursor ((t (:background "black")))) - '(border ((t (:foreground "black")))) - - '(gnus-mouse-face ((t (:background "darkseagreen2")))) - '(list-matching-lines-face ((t (:bold t)))) - '(rmail-highlight-face ((t (:bold t :foreground "brown4")))) - '(view-highlight-face ((t (:background "darkseagreen2")))) - - '(blank-space-face ((t (nil)))) - '(blank-tab-face ((t (nil)))) - '(blue ((t (nil)))) - '(bold ((t (:bold t)))) - '(bold-italic ((t (:italic t :bold t)))) - '(border-glyph ((t (nil)))) - '(calendar-today-face ((t (:underline t)))) - '(cperl-array-face ((t (:bold t :background "lightyellow2" :foreground "Blue")))) - '(cperl-hash-face ((t (:italic t :bold t :background "lightyellow2" :foreground "Red")))) - '(cperl-nonoverridable-face ((t (:foreground "chartreuse3")))) - '(custom-button-face ((t (:bold t)))) - '(custom-changed-face ((t (:background "blue" :foreground "white")))) - '(custom-documentation-face ((t (nil)))) - '(custom-face-tag-face ((t (:underline t)))) - '(custom-group-tag-face ((t (:underline t :bold t :foreground "blue")))) - '(custom-group-tag-face-1 ((t (:underline t :foreground "red")))) - '(custom-invalid-face ((t (:background "red" :foreground "yellow")))) - '(custom-modified-face ((t (:background "blue" :foreground "white")))) - '(custom-rogue-face ((t (:background "black" :foreground "pink")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:background "white" :foreground "blue")))) - '(custom-state-face ((t (:foreground "dark green")))) - '(custom-variable-button-face ((t (:underline t :bold t)))) - '(custom-variable-tag-face ((t (:underline t :bold t :foreground "blue")))) - '(diary-face ((t (:bold t :foreground "red")))) - '(ediff-current-diff-face-A ((t (:background "pale green" :foreground "firebrick")))) - '(ediff-current-diff-face-Ancestor ((t (:background "VioletRed" :foreground "Black")))) - '(ediff-current-diff-face-B ((t (:background "Yellow" :foreground "DarkOrchid")))) - '(ediff-current-diff-face-C ((t (:background "Pink" :foreground "Navy")))) - '(ediff-even-diff-face-A ((t (:background "light grey" :foreground "Black")))) - '(ediff-even-diff-face-Ancestor ((t (:background "Grey" :foreground "White")))) - '(ediff-even-diff-face-B ((t (:background "Grey" :foreground "White")))) - '(ediff-even-diff-face-C ((t (:background "light grey" :foreground "Black")))) - '(ediff-fine-diff-face-A ((t (:background "sky blue" :foreground "Navy")))) - '(ediff-fine-diff-face-Ancestor ((t (:background "Green" :foreground "Black")))) - '(ediff-fine-diff-face-B ((t (:background "cyan" :foreground "Black")))) - '(ediff-fine-diff-face-C ((t (:background "Turquoise" :foreground "Black")))) - '(ediff-odd-diff-face-A ((t (:background "Grey" :foreground "White")))) - '(ediff-odd-diff-face-Ancestor ((t (:background "light grey" :foreground "Black")))) - '(ediff-odd-diff-face-B ((t (:background "light grey" :foreground "Black")))) - '(ediff-odd-diff-face-C ((t (:background "Grey" :foreground "White")))) - '(erc-action-face ((t (:bold t)))) - '(erc-bold-face ((t (:bold t)))) - '(erc-default-face ((t (nil)))) - '(erc-direct-msg-face ((t (nil)))) - '(erc-error-face ((t (:bold t)))) - '(erc-input-face ((t (nil)))) - '(erc-inverse-face ((t (nil)))) - '(erc-notice-face ((t (nil)))) - '(erc-pal-face ((t (nil)))) - '(erc-prompt-face ((t (nil)))) - '(erc-underline-face ((t (nil)))) - '(eshell-ls-archive-face ((t (:bold t :foreground "Orchid")))) - '(eshell-ls-backup-face ((t (:foreground "OrangeRed")))) - '(eshell-ls-clutter-face ((t (:bold t :foreground "OrangeRed")))) - '(eshell-ls-directory-face ((t (:bold t :foreground "Blue")))) - '(eshell-ls-executable-face ((t (:bold t :foreground "ForestGreen")))) - '(eshell-ls-missing-face ((t (:bold t :foreground "Red")))) - '(eshell-ls-picture-face ((t (nil)))) - '(eshell-ls-product-face ((t (:foreground "OrangeRed")))) - '(eshell-ls-readonly-face ((t (:foreground "Brown")))) - '(eshell-ls-special-face ((t (:bold t :foreground "Magenta")))) - '(eshell-ls-symlink-face ((t (:bold t :foreground "DarkCyan")))) - '(eshell-ls-unreadable-face ((t (:foreground "Grey30")))) - '(eshell-prompt-face ((t (:bold t :foreground "Red")))) - '(eshell-test-failed-face ((t (:bold t :foreground "OrangeRed")))) - '(eshell-test-ok-face ((t (:bold t :foreground "Green")))) - '(excerpt ((t (:italic t)))) - '(ff-paths-non-existant-file-face ((t (:bold t :foreground "NavyBlue")))) - '(fixed ((t (:bold t)))) - '(flyspell-duplicate-face ((t (:underline t :bold t :foreground "Gold3")))) - '(flyspell-incorrect-face ((t (:underline t :bold t :foreground "OrangeRed")))) - '(font-latex-bold-face ((t (nil)))) - '(font-latex-italic-face ((t (nil)))) - '(font-latex-math-face ((t (nil)))) - '(font-latex-sedate-face ((t (nil)))) - '(font-latex-string-face ((t (nil)))) - '(font-latex-warning-face ((t (nil)))) - '(font-lock-builtin-face ((t (:bold t :foreground "Orchid")))) - '(font-lock-comment-face ((t (:italic t :bold t :foreground "blue4")))) - '(font-lock-constant-face ((t (:bold t :foreground "CadetBlue")))) - '(font-lock-doc-string-face ((t (:italic t :bold t :foreground "blue4")))) - '(font-lock-exit-face ((t (nil)))) - '(font-lock-function-name-face ((t (:bold t :foreground "brown4")))) - '(font-lock-keyword-face ((t (:bold t :foreground "black")))) - '(font-lock-preprocessor-face ((t (:foreground "blue3")))) - '(font-lock-reference-face ((t (:foreground "red3")))) - '(font-lock-string-face ((t (:italic t :bold t :foreground "green4")))) - '(font-lock-type-face ((t (:bold t :foreground "steelblue")))) - '(font-lock-variable-name-face ((t (:italic t :bold t :foreground "magenta4")))) - '(font-lock-warning-face ((t (:bold t :foreground "Red")))) - '(gnus-cite-attribution-face ((t (:italic t :bold t)))) - '(gnus-cite-face-1 ((t (:foreground "MidnightBlue")))) - '(gnus-cite-face-10 ((t (:foreground "medium purple")))) - '(gnus-cite-face-11 ((t (:foreground "turquoise")))) - '(gnus-cite-face-2 ((t (:foreground "firebrick")))) - '(gnus-cite-face-3 ((t (:foreground "dark green")))) - '(gnus-cite-face-4 ((t (:foreground "OrangeRed")))) - '(gnus-cite-face-5 ((t (:foreground "dark khaki")))) - '(gnus-cite-face-6 ((t (:foreground "dark violet")))) - '(gnus-cite-face-7 ((t (:foreground "SteelBlue4")))) - '(gnus-cite-face-8 ((t (:foreground "magenta")))) - '(gnus-cite-face-9 ((t (:foreground "violet")))) - '(gnus-emphasis-bold ((t (:bold t)))) - '(gnus-emphasis-bold-italic ((t (:italic t :bold t)))) - '(gnus-emphasis-highlight-words ((t (nil)))) - '(gnus-emphasis-italic ((t (:italic t)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(gnus-emphasis-underline-bold ((t (:underline t :bold t)))) - '(gnus-emphasis-underline-bold-italic ((t (:underline t :italic t :bold t)))) - '(gnus-emphasis-underline-italic ((t (:underline t :italic t)))) - '(gnus-filterhist-face-1 ((t (nil)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "DeepPink3")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "DeepPink3")))) - '(gnus-group-mail-2-empty-face ((t (:foreground "HotPink3")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "HotPink3")))) - '(gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "magenta4")))) - '(gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "DeepPink4")))) - '(gnus-group-news-1-empty-face ((t (:foreground "ForestGreen")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "ForestGreen")))) - '(gnus-group-news-2-empty-face ((t (:foreground "CadetBlue4")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "CadetBlue4")))) - '(gnus-group-news-3-empty-face ((t (nil)))) - '(gnus-group-news-3-face ((t (:bold t)))) - '(gnus-group-news-4-empty-face ((t (nil)))) - '(gnus-group-news-4-face ((t (:bold t)))) - '(gnus-group-news-5-empty-face ((t (nil)))) - '(gnus-group-news-5-face ((t (:bold t)))) - '(gnus-group-news-6-empty-face ((t (nil)))) - '(gnus-group-news-6-face ((t (:bold t)))) - '(gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "DarkGreen")))) - '(gnus-header-content-face ((t (:italic t :foreground "indianred4")))) - '(gnus-header-from-face ((t (:bold t :foreground "red3")))) - '(gnus-header-name-face ((t (:bold t :foreground "maroon")))) - '(gnus-header-newsgroups-face ((t (:italic t :bold t :foreground "MidnightBlue")))) - '(gnus-header-subject-face ((t (:bold t :foreground "red4")))) - '(gnus-signature-face ((t (:italic t)))) - '(gnus-splash ((t (nil)))) - '(gnus-splash-face ((t (:foreground "ForestGreen")))) - '(gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "RoyalBlue")))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "DarkGreen")))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "firebrick")))) - '(gnus-summary-high-unread-face ((t (:italic t :bold t)))) - '(gnus-summary-low-ancient-face ((t (:italic t :foreground "RoyalBlue")))) - '(gnus-summary-low-read-face ((t (:italic t :foreground "DarkGreen")))) - '(gnus-summary-low-ticked-face ((t (:italic t :bold t :foreground "firebrick")))) - '(gnus-summary-low-unread-face ((t (:italic t)))) - '(gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) - '(gnus-summary-normal-read-face ((t (:foreground "DarkGreen")))) - '(gnus-summary-normal-ticked-face ((t (:bold t :foreground "firebrick")))) - '(gnus-summary-normal-unread-face ((t (:bold t)))) - '(gnus-summary-selected-face ((t (:underline t)))) - '(green ((t (nil)))) - '(gui-button-face ((t (:background "grey75")))) - '(gui-element ((t (:background "Gray80")))) - '(highlight ((t (:background "darkseagreen2")))) - '(highlight-changes-delete-face ((t (:underline t :foreground "red")))) - '(highlight-changes-face ((t (:foreground "red")))) - '(highline-face ((t (:background "paleturquoise")))) - '(holiday-face ((t (:background "pink")))) - '(html-helper-italic-face ((t (:italic t)))) - '(info-menu-5 ((t (:underline t)))) - '(info-node ((t (:italic t :bold t)))) - '(info-xref ((t (:bold t)))) - '(isearch ((t (nil)))) - '(italic ((t (:italic t)))) - '(lazy-highlight-face ((t (:bold t :foreground "dark magenta")))) - '(left-margin ((t (nil)))) - '(linemenu-face ((t (nil)))) - '(list-mode-item-selected ((t (nil)))) - '(makefile-space-face ((t (:background "hotpink")))) - '(message-cited-text-face ((t (:foreground "red")))) - '(message-header-cc-face ((t (:bold t :foreground "MidnightBlue")))) - '(message-header-name-face ((t (:foreground "cornflower blue")))) - '(message-header-newsgroups-face ((t (:italic t :bold t :foreground "blue4")))) - '(message-header-other-face ((t (:foreground "steel blue")))) - '(message-header-subject-face ((t (:bold t :foreground "navy blue")))) - '(message-header-to-face ((t (:bold t :foreground "MidnightBlue")))) - '(message-header-xheader-face ((t (:foreground "blue")))) - '(message-mml-face ((t (:bold t)))) - '(message-separator-face ((t (:foreground "brown")))) - '(modeline ((t (:background "darkblue" :foreground "yellow")))) - '(modeline-buffer-id ((t (:background "black" :foreground "white")))) - '(modeline-mousable ((t (:background "black" :foreground "white")))) - '(modeline-mousable-minor-mode ((t (:background "black" :foreground "white")))) - '(nil ((t (nil)))) - '(paren-mismatch-face ((t (:bold t)))) - '(paren-no-match-face ((t (:bold t)))) - '(pointer ((t (nil)))) - '(primary-selection ((t (nil)))) - '(red ((t (nil)))) - '(region ((t (:background "gray")))) - '(right-margin ((t (nil)))) - '(secondary-selection ((t (:background "paleturquoise")))) - '(sgml-doctype-face ((t (nil)))) - '(sgml-end-tag-face ((t (nil)))) - '(sgml-entity-face ((t (nil)))) - '(sgml-ignored-face ((t (nil)))) - '(sgml-sgml-face ((t (nil)))) - '(sgml-start-tag-face ((t (nil)))) - '(show-paren-match-face ((t (:background "turquoise")))) - '(show-paren-mismatch-face ((t (:bold t :background "purple" :foreground "white")))) - '(speedbar-button-face ((t (:bold t :foreground "green4")))) - '(speedbar-directory-face ((t (:bold t :foreground "blue4")))) - '(speedbar-file-face ((t (:bold t :foreground "cyan4")))) - '(speedbar-highlight-face ((t (:background "green")))) - '(speedbar-selected-face ((t (:underline t :foreground "red")))) - '(speedbar-tag-face ((t (:foreground "brown")))) - '(swbuff-current-buffer-face ((t (:bold t)))) - '(term-black ((t (:foreground "black")))) - '(term-blackbg ((t (:background "black")))) - '(term-blue ((t (:foreground "blue")))) - '(term-bluebg ((t (:background "blue")))) - '(term-bold ((t (:bold t)))) - '(term-cyan ((t (:foreground "cyan")))) - '(term-cyanbg ((t (:background "cyan")))) - '(term-default-bg ((t (nil)))) - '(term-default-bg-inv ((t (nil)))) - '(term-default-fg ((t (nil)))) - '(term-default-fg-inv ((t (nil)))) - '(term-green ((t (:foreground "green")))) - '(term-greenbg ((t (:background "green")))) - '(term-invisible ((t (nil)))) - '(term-invisible-inv ((t (nil)))) - '(term-magenta ((t (:foreground "magenta")))) - '(term-magentabg ((t (:background "magenta")))) - '(term-red ((t (:foreground "red")))) - '(term-redbg ((t (:background "red")))) - '(term-underline ((t (:underline t)))) - '(term-white ((t (:foreground "white")))) - '(term-whitebg ((t (:background "white")))) - '(term-yellow ((t (:foreground "yellow")))) - '(term-yellowbg ((t (:background "yellow")))) - '(text-cursor ((t (nil)))) - '(toolbar ((t (nil)))) - '(underline ((t (:underline t)))) - '(vc-annotate-face-0046FF ((t (nil)))) - '(vcursor ((t (:underline t :background "cyan" :foreground "blue")))) - '(vertical-divider ((t (nil)))) - '(vhdl-font-lock-attribute-face ((t (:foreground "Orchid")))) - '(vhdl-font-lock-directive-face ((t (:foreground "CadetBlue")))) - '(vhdl-font-lock-enumvalue-face ((t (:foreground "Gold4")))) - '(vhdl-font-lock-function-face ((t (:foreground "Orchid4")))) - '(vhdl-font-lock-prompt-face ((t (:bold t :foreground "Red")))) - '(vhdl-font-lock-reserved-words-face ((t (:bold t :foreground "Orange")))) - '(vhdl-font-lock-translate-off-face ((t (:background "LightGray")))) - '(vhdl-speedbar-architecture-face ((t (:foreground "Blue")))) - '(vhdl-speedbar-architecture-selected-face ((t (:underline t :foreground "Blue")))) - '(vhdl-speedbar-configuration-face ((t (:foreground "DarkGoldenrod")))) - '(vhdl-speedbar-configuration-selected-face ((t (:underline t :foreground "DarkGoldenrod")))) - '(vhdl-speedbar-entity-face ((t (:foreground "ForestGreen")))) - '(vhdl-speedbar-entity-selected-face ((t (:underline t :foreground "ForestGreen")))) - '(vhdl-speedbar-instantiation-face ((t (:foreground "Brown")))) - '(vhdl-speedbar-instantiation-selected-face ((t (:underline t :foreground "Brown")))) - '(vhdl-speedbar-package-face ((t (:foreground "Grey50")))) - '(vhdl-speedbar-package-selected-face ((t (:underline t :foreground "Grey50")))) - '(viper-minibuffer-emacs-face ((t (:background "darkseagreen2" :foreground "Black")))) - '(viper-minibuffer-insert-face ((t (:background "pink" :foreground "Black")))) - '(viper-minibuffer-vi-face ((t (:background "grey" :foreground "DarkGreen")))) - '(viper-replace-overlay-face ((t (:background "darkseagreen2" :foreground "Black")))) - '(viper-search-face ((t (:background "khaki" :foreground "Black")))) - '(widget-button-face ((t (:bold t)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "dark green")))) - '(widget-field-face ((t (:background "gray85")))) - '(widget-inactive-face ((t (:foreground "dim gray")))) - '(widget-single-line-field-face ((t (:background "gray85")))) - '(woman-bold-face ((t (:bold t)))) - '(woman-italic-face ((t (nil)))) - '(woman-unknown-face ((t (nil)))) - '(yellow ((t (nil)))) - '(zmacs-region ((t (nil))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'jb-simple) - -;;; jb-simple-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/jedit-grey-theme.el b/elpa/color-theme-modern-0.0.3/jedit-grey-theme.el deleted file mode 100644 index 5d2e176..0000000 --- a/elpa/color-theme-modern-0.0.3/jedit-grey-theme.el +++ /dev/null @@ -1,64 +0,0 @@ -;;; jedit-grey-theme.el --- jedit-grey theme - -;; Copyright (C) 2000 by Gordon Messmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of jedit-grey theme from `color-themes' - -;;; Code: - -(deftheme jedit-grey - "jedit-grey theme") - -(custom-theme-set-faces - 'jedit-grey - - '(default ((t (:background "grey77" :foreground "black")))) - '(mouse ((t (:foreground "black")))) - '(cursor ((t (:background "black")))) - '(border ((t (:foreground "black")))) - - '(font-lock-comment-face ((t (:italic t :foreground "RoyalBlue4")))) - '(font-lock-string-face ((t (:foreground "Gold4")))) - '(font-lock-keyword-face ((t (:bold t :foreground "DarkRed")))) - '(font-lock-warning-face ((t (:bold t :foreground "Pink")))) - '(font-lock-constant-face ((t (:foreground "DarkCyan")))) - '(font-lock-type-face ((t (:foreground "DarkRed")))) - '(font-lock-function-name-face ((t (:foreground "Green4")))) - '(font-lock-builtin-face ((t (:bold t :foreground "DarkRed")))) - '(highline-face ((t (:background "grey84")))) - '(setnu-line-number-face ((t (:background "White" :foreground "MediumPurple3" :italic t)))) - '(show-paren-match-face ((t (:background "grey60")))) - '(region ((t (:background "grey70")))) - '(highlight ((t (:background "grey90")))) - '(secondary-selection ((t (:background "white")))) - '(widget-field-face ((t (:background "royalblue")))) - '(widget-single-line-field-face ((t (:background "royalblue"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'jedit-grey) - -;;; jedit-grey-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/jonadabian-slate-theme.el b/elpa/color-theme-modern-0.0.3/jonadabian-slate-theme.el deleted file mode 100644 index b873b6d..0000000 --- a/elpa/color-theme-modern-0.0.3/jonadabian-slate-theme.el +++ /dev/null @@ -1,158 +0,0 @@ -;;; jonadabian-slate-theme.el --- jonadabian-slate theme - -;; Copyright (C) 2001 by Jonadab the Unsightly One -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of jonadabian-slate theme from `color-themes' - -;;; Code: - -(deftheme jonadabian-slate - "jonadabian-slate theme") - -(custom-theme-set-faces - 'jonadabian-slate - - '(default ((t (:background "#305050" :foreground "#CCBB77")))) - '(mouse ((t (:foreground "black")))) - '(cursor ((t (:background "medium turquoise")))) - '(border ((t (:foreground "black")))) - - '(list-matching-lines-face ((t (:bold t :foreground "#EEDDAA")))) - '(ued-mode-keyname-face ((t (:background "#007080" :foreground "cyan")))) - '(view-highlight-face ((t (:background "#226644")))) - - '(fringe ((t (:background "#007080")))) - '(bold ((t (:bold t :foreground "#EEDDAA")))) - '(gnus-emphasis-bold ((t (:bold t :foreground "#EEDDAA")))) - '(gnus-emphasis-underline-bold ((t (:underline t :bold t :foreground "#EEDDAA")))) - '(bold-italic ((t (:italic t :bold t :foreground "#AA0000")))) - '(gnus-emphasis-bold-italic ((t (:italic t :bold t :foreground "#AA0000")))) - '(gnus-emphasis-underline-bold-italic ((t (:underline t :italic t :bold t :foreground "#AA0000")))) - '(gnus-emphasis-underline-italic ((t (:underline t :italic t :bold t :foreground "#AA0000")))) - '(calendar-today-face ((t (:underline t :background "darkslategrey")))) - '(cperl-array-face ((t (:background "#004060")))) - '(cperl-hash-face ((t (:background "#004400")))) - '(custom-button-face ((t (:background "dark blue" :foreground "rgbi:1.00/1.00/0.00")))) - '(custom-documentation-face ((t (:foreground "#10D010")))) - '(custom-face-tag-face ((t (:underline t :foreground "goldenrod")))) - '(custom-group-tag-face ((t (:underline t :foreground "light blue")))) - '(custom-group-tag-face-1 ((t (:underline t :foreground "pink")))) - '(custom-invalid-face ((t (:background "red" :foreground "yellow")))) - '(custom-modified-face ((t (:background "blue" :foreground "white")))) - '(custom-rogue-face ((t (:background "black" :foreground "pink")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:foreground "#6666dd")))) - '(custom-state-face ((t (:foreground "mediumaquamarine")))) - '(custom-variable-button-face ((t (:underline t :bold t)))) - '(custom-variable-tag-face ((t (:underline t :foreground "light blue")))) - '(diary-face ((t (:foreground "red")))) - '(eshell-ls-archive-face ((t (:foreground "green")))) - '(eshell-ls-backup-face ((t (:foreground "grey60")))) - '(eshell-ls-clutter-face ((t (:bold t :foreground "OrangeRed")))) - '(eshell-ls-directory-face ((t (:bold t :foreground "SkyBlue")))) - '(eshell-ls-executable-face ((t (:foreground "white")))) - '(eshell-ls-missing-face ((t (:foreground "red")))) - '(eshell-ls-product-face ((t (:foreground "LightSalmon")))) - '(eshell-ls-readonly-face ((t (:foreground "indian red")))) - '(eshell-ls-special-face ((t (:foreground "yellow")))) - '(eshell-ls-symlink-face ((t (:foreground "#6666dd")))) - '(eshell-ls-unreadable-face ((t (:foreground "red")))) - '(eshell-prompt-face ((t (:bold t :background "#305050" :foreground "#EEDD99")))) - '(font-lock-builtin-face ((t (:foreground "LightSteelBlue")))) - '(font-lock-comment-face ((t (:italic t :bold t :foreground "grey66")))) - '(font-lock-constant-face ((t (:foreground "indian red")))) - '(font-lock-function-name-face ((t (:foreground "#D0D000")))) - '(font-lock-keyword-face ((t (:foreground "#00BBBB")))) - '(font-lock-string-face ((t (:foreground "#10D010")))) - '(font-lock-type-face ((t (:bold t :foreground "#ff7788")))) - '(font-lock-variable-name-face ((t (:foreground "#eeddaa")))) - '(font-lock-warning-face ((t (:bold t :foreground "Pink")))) - '(header-line ((t (:box (:line-width 1 :style released-button))))) - '(highlight ((t (:background "#226644")))) - '(highlight-changes-delete-face ((t (:background "navy" :foreground "red")))) - '(highlight-changes-face ((t (:background "navy")))) - '(holiday-face ((t (:foreground "#ff7744")))) - '(italic ((t (:italic t :foreground "#AA0000")))) - '(gnus-emphasis-italic ((t (:italic t :foreground "#AA0000")))) - '(modeline ((t (:background "#007080" :foreground "cyan")))) - '(modeline-buffer-id ((t (:background "#007080" :foreground "cyan")))) - '(modeline-mousable ((t (:background "#007080" :foreground "cyan")))) - '(modeline-mousable-minor-mode ((t (:background "#007080" :foreground "cyan")))) - '(region ((t (:background "#226644")))) - '(secondary-selection ((t (:background "darkslategrey")))) - '(sgml-comment-face ((t (:foreground "grey60")))) - '(sgml-doctype-face ((t (:foreground "red")))) - '(sgml-end-tag-face ((t (:foreground "#00D0D0")))) - '(sgml-entity-face ((t (:foreground "indian red")))) - '(sgml-ignored-face ((t (:background "gray60" :foreground "gray40")))) - '(sgml-ms-end-face ((t (:foreground "green")))) - '(sgml-ms-start-face ((t (:foreground "green")))) - '(sgml-pi-face ((t (:foreground "lime green")))) - '(sgml-sgml-face ((t (:foreground "brown")))) - '(sgml-short-ref-face ((t (:foreground "deep sky blue")))) - '(sgml-start-tag-face ((t (:foreground "#D0D000")))) - '(show-paren-match-face ((t (:background "#400055" :foreground "cyan")))) - '(show-paren-mismatch-face ((t (:background "red")))) - '(special-string-face ((t (:foreground "light green")))) - '(term-black ((t (:background "#000055" :foreground "black")))) - '(term-blackbg ((t (:background "black" :foreground "#CCBB77")))) - '(term-blue ((t (:background "#000055" :foreground "blue")))) - '(term-bluebg ((t (:background "blue" :foreground "#CCBB77")))) - '(term-bold ((t (:bold t :background "#000055" :foreground "#CCBB77")))) - '(term-cyan ((t (:background "#000055" :foreground "cyan")))) - '(term-cyanbg ((t (:background "darkcyan")))) - '(term-default-bg ((t (:foreground "#CCBB77")))) - '(term-default-bg-inv ((t (:foreground "#CCBB77")))) - '(term-default-fg ((t (:background "#000055")))) - '(term-default-fg-inv ((t (:background "#000055")))) - '(term-green ((t (:background "#000055" :foreground "green")))) - '(term-greenbg ((t (:background "darkgreen")))) - '(term-invisible ((t (:foreground "#CCBB77")))) - '(term-invisible-inv ((t (:foreground "#CCBB77")))) - '(term-magenta ((t (:background "#000055" :foreground "magenta")))) - '(term-magentabg ((t (:background "darkmagenta")))) - '(term-red ((t (:background "#000055" :foreground "red")))) - '(term-redbg ((t (:background "darkred")))) - '(term-underline ((t (:underline t :background "#000055" :foreground "#CCBB77")))) - '(term-white ((t (:background "#000055" :foreground "white")))) - '(term-whitebg ((t (:background "grey50")))) - '(term-yellow ((t (:background "#000055" :foreground "yellow")))) - '(term-yellowbg ((t (:background "#997700")))) - '(trailing-whitespace ((t (:background "#23415A")))) - '(underline ((t (:underline t)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(widget-button-face ((t (:bold t)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "green")))) - '(widget-field-face ((t (:background "grey35" :foreground "black")))) - '(widget-inactive-face ((t (:foreground "gray")))) - '(widget-single-line-field-face ((t (:background "dim gray"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'jonadabian-slate) - -;;; jonadabian-slate-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/jonadabian-theme.el b/elpa/color-theme-modern-0.0.3/jonadabian-theme.el deleted file mode 100644 index 41674ec..0000000 --- a/elpa/color-theme-modern-0.0.3/jonadabian-theme.el +++ /dev/null @@ -1,66 +0,0 @@ -;;; jonadabian-theme.el --- jonadabian theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of jonadabian theme from `color-themes' - -;;; Code: - -(deftheme jonadabian - "jonadabian theme") - -(custom-theme-set-faces - 'jonadabian - - '(default ((t (:background "#000055" :foreground "#CCBB77")))) - '(cursor ((t (:background "medium turquoise")))) - - '(modeline ((t (:foreground "cyan" :background "#007080")))) - '(modeline-buffer-id ((t (:foreground "cyan" :background "#007080")))) - '(modeline-mousable ((t (:foreground "cyan" :background "#007080")))) - '(modeline-mousable-minor-mode ((t (:foreground "cyan" :background "#007080")))) - '(underline ((t (:underline t)))) - '(region ((t (:background "#004080")))) - '(font-lock-keyword-face ((t (:foreground "#00BBBB")))) - '(font-lock-comment-face ((t (:foreground "grey50" :bold t :italic t)))) - '(font-lock-string-face ((t (:foreground "#10D010")))) - '(font-lock-constant-face ((t (:foreground "indian red")))) - '(highlight-changes-face ((t (:background "navy")))) - '(highlight-changes-delete-face ((t (:foreground "red" :background "navy")))) - '(widget-field-face ((t (:foreground "black" :background "grey35")))) - '(widget-inactive-face ((t (:foreground "gray")))) - '(custom-button-face ((t (:foreground "yellow" :background "dark blue")))) - '(custom-state-face ((t (:foreground "mediumaquamarine")))) - '(custom-face-tag-face ((t (:foreground "goldenrod" :underline t)))) - '(custom-documentation-face ((t (:foreground "#10D010")))) - '(custom-set-face ((t (:foreground "#2020D0"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'jonadabian) - -;;; jonadabian-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/jsc-dark-theme.el b/elpa/color-theme-modern-0.0.3/jsc-dark-theme.el deleted file mode 100644 index bde7130..0000000 --- a/elpa/color-theme-modern-0.0.3/jsc-dark-theme.el +++ /dev/null @@ -1,208 +0,0 @@ -;;; jsc-dark-theme.el --- jsc-dark theme - -;; Copyright (C) 2000 by John S Cooper -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of jsc-dark theme from `color-themes' - -;;; Code: - -(deftheme jsc-dark - "jsc-dark theme") - -(custom-theme-set-faces - 'jsc-dark - - '(default ((t (:background "black" :foreground "cornsilk")))) - '(mouse ((t (:foreground "black")))) - '(cursor ((t (:background "white")))) - '(border ((t (:foreground "black")))) - - '(gnus-mouse-face ((t (:background "darkslategray" :foreground "wheat")))) - '(goto-address-mail-face ((t (:italic t)))) - '(goto-address-mail-mouse-face ((t (:background "deepskyblue4")))) - '(goto-address-url-face ((t (:bold t :foreground "white")))) - '(goto-address-url-mouse-face ((t (:background "darkslategray" :foreground "wheat")))) - '(list-matching-lines-face ((t (:bold t :foreground "white")))) - '(view-highlight-face ((t (:background "darkslategray" :foreground "wheat")))) - - '(blank-space-face ((t (:background "LightGray")))) - '(blank-tab-face ((t (:background "cornsilk" :foreground "black")))) - '(default ((t (nil)))) - '(bold ((t (:bold t :foreground "white")))) - '(bold-italic ((t (:italic t :bold t)))) - '(calendar-today-face ((t (:underline t)))) - '(cperl-array-face ((t (:bold t :background "lightyellow2" :foreground "Blue")))) - '(cperl-hash-face ((t (:italic t :bold t :background "lightyellow2" :foreground "Red")))) - '(cperl-nonoverridable-face ((t (:foreground "chartreuse3")))) - '(custom-button-face ((t (:foreground "white")))) - '(custom-changed-face ((t (:background "skyblue" :foreground "wheat")))) - '(custom-documentation-face ((t (:foreground "white")))) - '(custom-face-tag-face ((t (:underline t :foreground "white")))) - '(custom-group-tag-face ((t (:underline t :foreground "skyblue")))) - '(custom-group-tag-face-1 ((t (:underline t :foreground "pink")))) - '(custom-invalid-face ((t (:background "red" :foreground "yellow")))) - '(custom-modified-face ((t (:background "blue" :foreground "white")))) - '(custom-rogue-face ((t (:background "black" :foreground "pink")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:foreground "blue")))) - '(custom-state-face ((t (:foreground "light green")))) - '(custom-variable-button-face ((t (:underline t :bold t)))) - '(custom-variable-tag-face ((t (:underline t :foreground "skyblue")))) - '(diary-face ((t (:bold t :foreground "orange")))) - '(font-lock-builtin-face ((t (:bold t :foreground "LightSteelBlue")))) - '(font-lock-comment-face ((t (:italic t :foreground "red")))) - '(font-lock-constant-face ((t (:bold t :foreground "salmon")))) - '(font-lock-function-name-face ((t (:bold t :foreground "orange")))) - '(font-lock-keyword-face ((t (:bold t :foreground "gold")))) - '(font-lock-string-face ((t (:italic t :foreground "orange")))) - '(font-lock-type-face ((t (:bold t :foreground "gold")))) - '(font-lock-variable-name-face ((t (:italic t :bold t :foreground "light salmon")))) - '(font-lock-warning-face ((t (:bold t :foreground "gold")))) - '(gnus-cite-attribution-face ((t (:italic t)))) - '(gnus-cite-face-1 ((t (:foreground "light cyan")))) - '(gnus-cite-face-10 ((t (:foreground "medium purple")))) - '(gnus-cite-face-11 ((t (:foreground "turquoise")))) - '(gnus-cite-face-2 ((t (:foreground "light blue")))) - '(gnus-cite-face-3 ((t (:foreground "light yellow")))) - '(gnus-cite-face-4 ((t (:foreground "light pink")))) - '(gnus-cite-face-5 ((t (:foreground "pale green")))) - '(gnus-cite-face-6 ((t (:foreground "beige")))) - '(gnus-cite-face-7 ((t (:foreground "orange")))) - '(gnus-cite-face-8 ((t (:foreground "magenta")))) - '(gnus-cite-face-9 ((t (:foreground "violet")))) - '(gnus-emphasis-bold ((t (:bold t)))) - '(gnus-emphasis-bold-italic ((t (:italic t :bold t)))) - '(gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) - '(gnus-emphasis-italic ((t (:italic t)))) - '(gnus-emphasis-underline ((t (:background "goldenrod4" :foreground "white")))) - '(gnus-emphasis-underline-bold ((t (:underline t :bold t :background "yellow" :foreground "black")))) - '(gnus-emphasis-underline-bold-italic ((t (:underline t :italic t :bold t :background "yellow" :foreground "black")))) - '(gnus-emphasis-underline-italic ((t (:underline t :italic t :background "yellow" :foreground "black")))) - '(gnus-filterhist-face-1 ((t (nil)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "gray80")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "white")))) - '(gnus-group-mail-2-empty-face ((t (:foreground "lightcyan")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "lightcyan")))) - '(gnus-group-mail-3-empty-face ((t (:foreground "tan")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "tan")))) - '(gnus-group-mail-low-empty-face ((t (:foreground "aquamarine4")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "aquamarine4")))) - '(gnus-group-news-1-empty-face ((t (:foreground "white")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "white")))) - '(gnus-group-news-2-empty-face ((t (:foreground "lightcyan")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "lightcyan")))) - '(gnus-group-news-3-empty-face ((t (:foreground "tan")))) - '(gnus-group-news-3-face ((t (:bold t :foreground "tan")))) - '(gnus-group-news-4-empty-face ((t (:foreground "white")))) - '(gnus-group-news-4-face ((t (:bold t :foreground "white")))) - '(gnus-group-news-5-empty-face ((t (:foreground "wheat")))) - '(gnus-group-news-5-face ((t (:bold t :foreground "wheat")))) - '(gnus-group-news-6-empty-face ((t (:foreground "tan")))) - '(gnus-group-news-6-face ((t (:bold t :foreground "tan")))) - '(gnus-group-news-low-empty-face ((t (:foreground "DarkTurquoise")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "DarkTurquoise")))) - '(gnus-header-content-face ((t (:italic t :foreground "plum1")))) - '(gnus-header-from-face ((t (:bold t :foreground "wheat")))) - '(gnus-header-name-face ((t (:bold t :foreground "gold")))) - '(gnus-header-newsgroups-face ((t (:italic t :bold t :foreground "wheat")))) - '(gnus-header-subject-face ((t (:bold t :foreground "red")))) - '(gnus-signature-face ((t (:italic t :foreground "maroon")))) - '(gnus-splash ((t (:foreground "Brown")))) - '(gnus-splash-face ((t (:foreground "gold")))) - '(gnus-summary-cancelled-face ((t (:background "gray" :foreground "black")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "SkyBlue")))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "PaleGreen")))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "gray70")))) - '(gnus-summary-high-unread-face ((t (:italic t :bold t)))) - '(gnus-summary-low-ancient-face ((t (:italic t :foreground "SkyBlue")))) - '(gnus-summary-low-read-face ((t (:italic t :foreground "PaleGreen")))) - '(gnus-summary-low-ticked-face ((t (:italic t :bold t :foreground "gray70")))) - '(gnus-summary-low-unread-face ((t (:italic t)))) - '(gnus-summary-normal-ancient-face ((t (:foreground "SkyBlue")))) - '(gnus-summary-normal-read-face ((t (:foreground "PaleGreen")))) - '(gnus-summary-normal-ticked-face ((t (:bold t :foreground "gray70")))) - '(gnus-summary-normal-unread-face ((t (:bold t)))) - '(gnus-summary-selected-face ((t (:underline t :background "deepskyblue4")))) - '(highlight ((t (:background "darkslategray" :foreground "wheat")))) - '(highlight-changes-delete-face ((t (:underline t :foreground "red")))) - '(highlight-changes-face ((t (:foreground "red")))) - '(highline-face ((t (:background "gray35")))) - '(holiday-face ((t (:background "red")))) - '(info-menu-5 ((t (:underline t)))) - '(info-node ((t (:italic t :bold t :foreground "yellow")))) - '(info-xref ((t (:bold t :foreground "plum")))) - '(italic ((t (:italic t)))) - '(lazy-highlight-face ((t (:bold t :foreground "dark magenta")))) - '(linemenu-face ((t (:background "gray30")))) - '(makefile-space-face ((t (:background "hotpink")))) - '(message-cited-text-face ((t (:foreground "plum1")))) - '(message-header-cc-face ((t (:bold t :foreground "ivory")))) - '(message-header-name-face ((t (:foreground "light sky blue")))) - '(message-header-newsgroups-face ((t (:italic t :bold t :foreground "lavender blush")))) - '(message-header-other-face ((t (:foreground "pale turquoise")))) - '(message-header-subject-face ((t (:bold t :foreground "papaya whip")))) - '(message-header-to-face ((t (:bold t :foreground "floral white")))) - '(message-header-xheader-face ((t (:foreground "blue")))) - '(message-mml-face ((t (:bold t :foreground "ForestGreen")))) - '(message-separator-face ((t (:foreground "sandy brown")))) - '(modeline ((t (:background "tan" :foreground "black")))) - '(modeline-buffer-id ((t (:background "tan" :foreground "black")))) - '(modeline-mousable ((t (:background "tan" :foreground "black")))) - '(modeline-mousable-minor-mode ((t (:background "tan" :foreground "black")))) - '(paren-mismatch-face ((t (:bold t :background "white" :foreground "red")))) - '(paren-no-match-face ((t (:bold t :background "white" :foreground "red")))) - '(region ((t (:background "slategrey")))) - '(secondary-selection ((t (:background "deepskyblue4")))) - '(sgml-doctype-face ((t (:foreground "orange")))) - '(sgml-end-tag-face ((t (:foreground "greenyellow")))) - '(sgml-entity-face ((t (:foreground "gold")))) - '(sgml-ignored-face ((t (:background "gray60" :foreground "gray20")))) - '(sgml-sgml-face ((t (:foreground "yellow")))) - '(sgml-start-tag-face ((t (:foreground "mediumspringgreen")))) - '(show-paren-match-face ((t (:background "deepskyblue4")))) - '(show-paren-mismatch-face ((t (:bold t :background "red" :foreground "white")))) - '(speedbar-button-face ((t (:foreground "green4")))) - '(speedbar-directory-face ((t (:foreground "blue4")))) - '(speedbar-file-face ((t (:bold t :foreground "cyan4")))) - '(speedbar-highlight-face ((t (:background "green")))) - '(speedbar-selected-face ((t (:underline t :foreground "red")))) - '(speedbar-tag-face ((t (:foreground "brown")))) - '(underline ((t (:underline t)))) - '(widget-button-face ((t (:bold t)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "lime green")))) - '(widget-field-face ((t (:background "gray20")))) - '(widget-inactive-face ((t (:foreground "wheat")))) - '(widget-single-line-field-face ((t (:background "gray20")))) - '(woman-bold-face ((t (:bold t)))) - '(woman-italic-face ((t (:foreground "beige")))) - '(woman-unknown-face ((t (:foreground "LightSalmon"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'jsc-dark) - -;;; jsc-dark-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/jsc-light-theme.el b/elpa/color-theme-modern-0.0.3/jsc-light-theme.el deleted file mode 100644 index 90267d1..0000000 --- a/elpa/color-theme-modern-0.0.3/jsc-light-theme.el +++ /dev/null @@ -1,175 +0,0 @@ -;;; jsc-light-theme.el --- jsc-light theme - -;; Copyright (C) 2000 by John S Cooper -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of jsc-light theme from `color-themes' - -;;; Code: - -(deftheme jsc-light - "jsc-light theme") - -(custom-theme-set-faces - 'jsc-light - - '(default ((t (:background "white" :foreground "black")))) - '(mouse ((t (:foreground "black")))) - '(cursor ((t (:background "Red")))) - '(border ((t (:foreground "black")))) - - '(gnus-mouse-face ((t (:background "antiquewhite" :foreground "blue")))) - '(list-matching-lines-face ((t (:bold t :foreground "red3")))) - '(view-highlight-face ((t (:background "antiquewhite" :foreground "blue")))) - - '(default ((t (nil)))) - '(bold ((t (:bold t :foreground "red3")))) - '(bold-italic ((t (:italic t :bold t :foreground "red")))) - '(custom-button-face ((t (nil)))) - '(custom-changed-face ((t (:background "blue" :foreground "white")))) - '(custom-documentation-face ((t (nil)))) - '(custom-face-tag-face ((t (:underline t)))) - '(custom-group-tag-face ((t (:underline t :foreground "blue")))) - '(custom-group-tag-face-1 ((t (:underline t :foreground "red")))) - '(custom-invalid-face ((t (:background "red" :foreground "yellow")))) - '(custom-modified-face ((t (:background "blue" :foreground "white")))) - '(custom-rogue-face ((t (:background "black" :foreground "pink")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:background "white" :foreground "blue")))) - '(custom-state-face ((t (:foreground "dark green")))) - '(custom-variable-button-face ((t (:underline t :bold t)))) - '(custom-variable-tag-face ((t (:underline t :foreground "blue")))) - '(font-lock-builtin-face ((t (:foreground "Orchid")))) - '(font-lock-comment-face ((t (:italic t :bold t :foreground "Red3")))) - '(font-lock-constant-face ((t (:foreground "navy")))) - '(font-lock-function-name-face ((t (:bold t :foreground "Blue")))) - '(font-lock-keyword-face ((t (:bold t :foreground "Purple")))) - '(font-lock-string-face ((t (:foreground "Green4")))) - '(font-lock-type-face ((t (:foreground "Navy")))) - '(font-lock-variable-name-face ((t (:foreground "Tan4")))) - '(font-lock-warning-face ((t (:bold t :foreground "Red")))) - '(gnus-cite-attribution-face ((t (:italic t)))) - '(gnus-cite-face-1 ((t (:foreground "MidnightBlue")))) - '(gnus-cite-face-10 ((t (:foreground "medium purple")))) - '(gnus-cite-face-11 ((t (:foreground "turquoise")))) - '(gnus-cite-face-2 ((t (:foreground "firebrick")))) - '(gnus-cite-face-3 ((t (:foreground "dark green")))) - '(gnus-cite-face-4 ((t (:foreground "OrangeRed")))) - '(gnus-cite-face-5 ((t (:foreground "dark khaki")))) - '(gnus-cite-face-6 ((t (:foreground "dark violet")))) - '(gnus-cite-face-7 ((t (:foreground "SteelBlue4")))) - '(gnus-cite-face-8 ((t (:foreground "magenta")))) - '(gnus-cite-face-9 ((t (:foreground "violet")))) - '(gnus-emphasis-bold ((t (:bold t)))) - '(gnus-emphasis-bold-italic ((t (:italic t :bold t)))) - '(gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) - '(gnus-emphasis-italic ((t (:italic t)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(gnus-emphasis-underline-bold ((t (:underline t :bold t)))) - '(gnus-emphasis-underline-bold-italic ((t (:underline t :italic t :bold t)))) - '(gnus-emphasis-underline-italic ((t (:underline t :italic t)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "DeepPink3")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "DeepPink3")))) - '(gnus-group-mail-2-empty-face ((t (:foreground "HotPink3")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "HotPink3")))) - '(gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "magenta4")))) - '(gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "DeepPink4")))) - '(gnus-group-news-1-empty-face ((t (:foreground "blue2")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "blue2")))) - '(gnus-group-news-2-empty-face ((t (:foreground "CadetBlue4")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "CadetBlue4")))) - '(gnus-group-news-3-empty-face ((t (nil)))) - '(gnus-group-news-3-face ((t (:bold t)))) - '(gnus-group-news-4-empty-face ((t (nil)))) - '(gnus-group-news-4-face ((t (:bold t)))) - '(gnus-group-news-5-empty-face ((t (nil)))) - '(gnus-group-news-5-face ((t (:bold t)))) - '(gnus-group-news-6-empty-face ((t (nil)))) - '(gnus-group-news-6-face ((t (:bold t)))) - '(gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "DarkGreen")))) - '(gnus-header-content-face ((t (:italic t :foreground "blue")))) - '(gnus-header-from-face ((t (:foreground "red3")))) - '(gnus-header-name-face ((t (:foreground "red3")))) - '(gnus-header-newsgroups-face ((t (:italic t :foreground "MidnightBlue")))) - '(gnus-header-subject-face ((t (:bold t :foreground "red")))) - '(gnus-signature-face ((t (:foreground "pink")))) - '(gnus-splash-face ((t (:foreground "Brown")))) - '(gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "RoyalBlue")))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "navy")))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "firebrick")))) - '(gnus-summary-high-unread-face ((t (:bold t :foreground "blue")))) - '(gnus-summary-low-ancient-face ((t (:italic t :foreground "RoyalBlue")))) - '(gnus-summary-low-read-face ((t (:italic t :foreground "DarkGreen")))) - '(gnus-summary-low-ticked-face ((t (:italic t :foreground "firebrick")))) - '(gnus-summary-low-unread-face ((t (:italic t)))) - '(gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) - '(gnus-summary-normal-read-face ((t (:foreground "red3")))) - '(gnus-summary-normal-ticked-face ((t (:foreground "black")))) - '(gnus-summary-normal-unread-face ((t (:bold t :foreground "red3")))) - '(gnus-summary-selected-face ((t (:underline t)))) - '(highlight ((t (:background "antiquewhite" :foreground "blue")))) - '(italic ((t (:italic t)))) - '(makefile-space-face ((t (:background "hotpink")))) - '(message-cited-text-face ((t (:foreground "red")))) - '(message-header-cc-face ((t (:foreground "MidnightBlue")))) - '(message-header-name-face ((t (:foreground "cornflower blue")))) - '(message-header-newsgroups-face ((t (:italic t :bold t :foreground "blue4")))) - '(message-header-other-face ((t (:foreground "steel blue")))) - '(message-header-subject-face ((t (:bold t :foreground "navy blue")))) - '(message-header-to-face ((t (:bold t :foreground "MidnightBlue")))) - '(message-header-xheader-face ((t (:foreground "blue")))) - '(message-mml-face ((t (:foreground "ForestGreen")))) - '(message-separator-face ((t (:foreground "brown")))) - '(modeline ((t (:background "plum" :foreground "black")))) - '(modeline-buffer-id ((t (:background "plum" :foreground "black")))) - '(modeline-mousable ((t (:background "plum" :foreground "black")))) - '(modeline-mousable-minor-mode ((t (:background "plum" :foreground "black")))) - '(region ((t (:background "plum")))) - '(secondary-selection ((t (:background "palegreen")))) - '(show-paren-match-face ((t (:background "plum")))) - '(show-paren-mismatch-face ((t (:background "navy" :foreground "white")))) - '(speedbar-button-face ((t (:foreground "green4")))) - '(speedbar-directory-face ((t (:foreground "blue4")))) - '(speedbar-file-face ((t (:foreground "cyan4")))) - '(speedbar-highlight-face ((t (:background "green")))) - '(speedbar-selected-face ((t (:underline t :foreground "red")))) - '(speedbar-tag-face ((t (:foreground "brown")))) - '(underline ((t (:underline t)))) - '(widget-button-face ((t (:bold t)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "dark green")))) - '(widget-field-face ((t (:background "gray85")))) - '(widget-inactive-face ((t (:foreground "dim gray")))) - '(widget-single-line-field-face ((t (:background "gray85"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'jsc-light) - -;;; jsc-light-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/jsc-light2-theme.el b/elpa/color-theme-modern-0.0.3/jsc-light2-theme.el deleted file mode 100644 index 250e838..0000000 --- a/elpa/color-theme-modern-0.0.3/jsc-light2-theme.el +++ /dev/null @@ -1,185 +0,0 @@ -;;; jsc-light2-theme.el --- jsc-light2 theme - -;; Copyright (C) 2001 by John S Cooper -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of jsc-light2 theme from `color-themes' - -;;; Code: - -(deftheme jsc-light2 - "jsc-light2 theme") - -(custom-theme-set-faces - 'jsc-light2 - - '(default ((t (:background "white" :foreground "black")))) - '(mouse ((t (:foreground "black")))) - '(cursor ((t (:background "Red")))) - '(border ((t (:foreground "black")))) - - '(gnus-mouse-face ((t (:background "antiquewhite" :foreground "blue")))) - '(list-matching-lines-face ((t (:bold t :foreground "red3")))) - '(view-highlight-face ((t (:background "antiquewhite" :foreground "blue")))) - '(default ((t (nil)))) - '(bold ((t (:bold t :weight bold)))) - '(bold-italic ((t (:italic t :bold t :weight bold)))) - '(custom-button-face ((t (:background "lightgrey" :foreground "black" - :box (:line-width 2 :style released-button))))) - '(custom-changed-face ((t (:background "blue" :foreground "white")))) - '(custom-documentation-face ((t (nil)))) - '(custom-face-tag-face ((t (:bold t :weight bold :height 1.2)))) - '(custom-group-tag-face ((t (:bold t :foreground "blue" :weight bold :height 1.2)))) - '(custom-group-tag-face-1 ((t (:bold t :foreground "red" :weight bold :height 1.2)))) - '(custom-invalid-face ((t (:background "red" :foreground "yellow")))) - '(custom-modified-face ((t (:background "blue" :foreground "white")))) - '(custom-rogue-face ((t (:background "black" :foreground "pink")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:background "white" :foreground "blue")))) - '(custom-state-face ((t (:foreground "dark green")))) - '(custom-variable-button-face ((t (:underline t :bold t)))) - '(custom-variable-tag-face ((t (:bold t :foreground "blue" :weight bold :height 1.2)))) - '(font-lock-builtin-face ((t (:foreground "Orchid")))) - '(font-lock-comment-face ((t (:italic t :bold t :foreground "Red3")))) - '(font-lock-constant-face ((t (:foreground "Maroon")))) - '(font-lock-function-name-face ((t (:foreground "Blue")))) - '(font-lock-keyword-face ((t (:bold t :foreground "Purple")))) - '(font-lock-string-face ((t (:foreground "Green4")))) - '(font-lock-type-face ((t (:italic t :foreground "Navy" :slant italic)))) - '(font-lock-variable-name-face ((t (:foreground "Tan4")))) - '(font-lock-warning-face ((t (:bold t :foreground "Red")))) - '(gnus-cite-attribution-face ((t (:italic t)))) - '(gnus-cite-face-1 ((t (:foreground "MidnightBlue")))) - '(gnus-cite-face-10 ((t (:foreground "medium purple")))) - '(gnus-cite-face-11 ((t (:foreground "turquoise")))) - '(gnus-cite-face-2 ((t (:foreground "firebrick")))) - '(gnus-cite-face-3 ((t (:foreground "dark green")))) - '(gnus-cite-face-4 ((t (:foreground "OrangeRed")))) - '(gnus-cite-face-5 ((t (:foreground "dark khaki")))) - '(gnus-cite-face-6 ((t (:foreground "dark violet")))) - '(gnus-cite-face-7 ((t (:foreground "SteelBlue4")))) - '(gnus-cite-face-8 ((t (:foreground "magenta")))) - '(gnus-cite-face-9 ((t (:foreground "violet")))) - '(gnus-emphasis-bold ((t (:bold t)))) - '(gnus-emphasis-bold-italic ((t (:italic t :bold t)))) - '(gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) - '(gnus-emphasis-italic ((t (:italic t)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(gnus-emphasis-underline-bold ((t (:underline t :bold t)))) - '(gnus-emphasis-underline-bold-italic ((t (:underline t :italic t :bold t)))) - '(gnus-emphasis-underline-italic ((t (:underline t :italic t)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "Blue2")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "DeepPink3")))) - '(gnus-group-mail-2-empty-face ((t (:foreground "HotPink3")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "HotPink3")))) - '(gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "magenta4")))) - '(gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "DeepPink4")))) - '(gnus-group-news-1-empty-face ((t (:foreground "blue2")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "ForestGreen" :weight bold)))) - '(gnus-group-news-1-empty-face ((t (:foreground "ForestGreen")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "CadetBlue4")))) - '(gnus-group-news-3-empty-face ((t (nil)))) - '(gnus-group-news-3-face ((t (:bold t)))) - '(gnus-group-news-4-empty-face ((t (nil)))) - '(gnus-group-news-4-face ((t (:bold t)))) - '(gnus-group-news-5-empty-face ((t (nil)))) - '(gnus-group-news-5-face ((t (:bold t)))) - '(gnus-group-news-6-empty-face ((t (nil)))) - '(gnus-group-news-6-face ((t (:bold t)))) - '(gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "DarkGreen")))) - '(gnus-header-content-face ((t (:italic t :foreground "indianred4" :slant italic)))) - '(gnus-header-from-face ((t (:foreground "red3")))) - '(gnus-header-name-face ((t (:bold t :foreground "maroon" :weight bold)))) - '(gnus-header-newsgroups-face ((t (:italic t :foreground "MidnightBlue")))) - '(gnus-header-subject-face ((t (:foreground "red4")))) - '(gnus-signature-face ((t (:italic t :slant italic)))) - '(gnus-splash-face ((t (:foreground "Brown")))) - '(gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "RoyalBlue")))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "DarkGreen" :weight bold)))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "firebrick")))) - '(gnus-summary-high-unread-face ((t (:bold t :weight bold)))) - '(gnus-summary-low-ancient-face ((t (:italic t :foreground "RoyalBlue")))) - '(gnus-summary-low-read-face ((t (:italic t :foreground "DarkGreen")))) - '(gnus-summary-low-ticked-face ((t (:italic t :foreground "firebrick")))) - '(gnus-summary-low-unread-face ((t (:italic t)))) - '(gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) - '(gnus-summary-normal-read-face ((t (:foreground "DarkGreen")))) - '(gnus-summary-normal-ticked-face ((t (:foreground "Navy")))) - '(gnus-summary-normal-unread-face ((t (:bold t :foreground "DarkGreen" :weight bold)))) - '(gnus-summary-selected-face ((t (:underline t)))) - '(highlight ((t (:background "darkseagreen2")))) - '(italic ((t (:italic t)))) - '(makefile-space-face ((t (:background "hotpink")))) - '(message-cited-text-face ((t (:foreground "red")))) - '(message-header-cc-face ((t (:foreground "MidnightBlue")))) - '(message-header-name-face ((t (:foreground "cornflower blue")))) - '(message-header-newsgroups-face ((t (:italic t :bold t :foreground "blue4")))) - '(message-header-other-face ((t (:foreground "steel blue")))) - '(message-header-subject-face ((t (:bold t :foreground "navy blue")))) - '(message-header-to-face ((t (:bold t :foreground "MidnightBlue")))) - '(message-header-xheader-face ((t (:foreground "blue")))) - '(message-mml-face ((t (:foreground "ForestGreen")))) - '(message-separator-face ((t (:foreground "brown")))) - '(modeline ((t (:background "plum" :foreground "black")))) - '(modeline-buffer-id ((t (:background "plum" :foreground "black")))) - '(modeline-mousable ((t (:background "plum" :foreground "black")))) - '(modeline-mousable-minor-mode ((t (:background "plum" :foreground "black")))) - '(region ((t (:background "lightgoldenrod2")))) - '(secondary-selection ((t (:background "yellow")))) - '(show-paren-match-face ((t (:background "turquoise")))) - '(show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) - '(speedbar-button-face ((t (:foreground "green4")))) - '(speedbar-directory-face ((t (:foreground "blue4")))) - '(speedbar-file-face ((t (:foreground "cyan4")))) - '(speedbar-highlight-face ((t (:background "green")))) - '(speedbar-selected-face ((t (:underline t :foreground "red")))) - '(speedbar-tag-face ((t (:foreground "brown")))) - '(underline ((t (:underline t)))) - '(widget-button-face ((t (:bold t)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "dark green")))) - '(widget-field-face ((t (:background "gray85")))) - '(widget-inactive-face ((t (:foreground "dim gray")))) - '(widget-single-line-field-face ((t (:background "gray85")))) - '(change-log-file-face ((t (:foreground "Blue")))) - '(change-log-name-face ((t (:foreground "Maroon")))) - '(comint-highlight-prompt ((t (:foreground "dark blue")))) - '(fringe ((t (:background "grey88")))) - '(header-line ((t (:background "grey90" :foreground "grey20" :box nil)))) - '(ido-subdir-face ((t (:foreground "red")))) - '(isearch ((t (:background "magenta4" :foreground "lightskyblue1")))) - '(mode-line ((t (:background "grey88" :foreground "black" :box (:line-width -1 :style released-button))))) - '(scroll-bar ((t (nil)))) - '(tooltip ((t (:background "lightyellow" :foreground "black"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'jsc-light2) - -;;; jsc-light2-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/julie-theme.el b/elpa/color-theme-modern-0.0.3/julie-theme.el deleted file mode 100644 index c571539..0000000 --- a/elpa/color-theme-modern-0.0.3/julie-theme.el +++ /dev/null @@ -1,432 +0,0 @@ -;;; julie-theme.el --- julie theme - -;; Copyright (C) 2011 Christian Brassat, Bozhidar Batsov -;; Copyright (C) 2014 by Syohei YOSHIDA - -;; Author: Christian Brassat -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of julie theme from `color-themes' - -;;; Code: - -(deftheme julie - "julie theme") - -(let ((julie-fg "#c6a57b") - (julie-bg-1 "#101010") - (julie-bg "#151515") - (julie-bg+1 "#202020") - (julie-bg+2 "#505050") - (julie-red+1 "#8d4a4a") - (julie-red "#953331") - (julie-red-1 "#953331") - (julie-orange "#ff8939") - (julie-yellow "#909737") - (julie-yellow-1 "#909737") - (julie-green-1 "#546a29") - (julie-green "#546a29") - (julie-green+1 "#7e9960") - (julie-cyan "#34676f") - (julie-blue+1 "#5c737c") - (julie-blue "#385e6b") - (julie-blue-1 "#385e6b") - (julie-magenta "#7f355e")) - - (custom-theme-set-faces - 'julie - - ;;; color-theme mapping - `(default ((t (:background ,julie-bg :foreground ,julie-fg)))) - `(cursor ((t (:background ,julie-orange)))) - - ;;; define some reusable julie faces that we can inherit from afterwards - `(julie-strong-1-face ((t (:foreground ,julie-yellow :weight bold)))) - `(julie-strong-2-face ((t (:foreground ,julie-orange :weight bold)))) - `(julie-warning-face ((t (:foreground ,julie-yellow-1 :weight bold :underline t)))) - `(julie-error-face ((t (:foreground ,julie-red-1 :weight bold :underline t)))) - - ;;; custom faces - `(linum ((t (:foreground "#505050" :background ,julie-bg-1 :weight normal)))) - `(tooltip ((t (:foreground ,julie-bg :background ,julie-fg)))) - `(fixed-pitch ((t (:family "Anka/Coder" :height 75)))) - `(variable-pitch ((t (:family "Helvetica Neue LT Std")))) - - ;;; whitespace - `(whitespace-space ((t (:foreground ,julie-bg+1)))) - `(whitespace-tab ((t (:foreground ,julie-bg+1)))) - `(whitespace-trailing ((t (:background ,julie-yellow :weight bold)))) - `(whitespace-newline ((t (:foreground ,julie-bg+1)))) - `(whitespace-empty ((t (:foreground ,julie-fg :background ,julie-bg)))) - - ;;; basic coloring - `(fringe ((t (:foreground "#303030" :background ,julie-bg)))) - `(escape-glyph-face ((t (:foreground ,julie-red)))) - `(header-line ((t (:foreground ,julie-yellow :background ,julie-bg-1 - :box (:line-width 5 :color ,julie-bg-1))))) - `(highlight ((t (:background ,julie-bg+1)))) - - ;; faces used by isearch - `(isearch ((t (:foreground ,julie-yellow :background ,julie-bg-1)))) - `(isearch-fail ((t (:foreground ,julie-fg :background ,julie-red-1)))) - `(lazy-highlight ((t (:foreground ,julie-yellow :background ,julie-bg+2)))) - - `(menu ((t (:foreground ,julie-fg :background ,julie-bg)))) - `(minibuffer-prompt ((t (:foreground ,julie-yellow)))) - `(mode-line - ((t (:foreground ,julie-fg :background ,julie-bg+1 - :box (:line-width 5 :color ,julie-bg+1))))) - `(mode-line-highlight ((t (:inverse-video t)))) - `(mode-line-inactive ((t (:inherit mode-line :background ,julie-bg-1 - :box (:line-width 5 :color ,julie-bg-1))))) - `(mode-line-buffer-id ((t (:inherit julie-strong-1-face)))) - `(mode-line-inactive - ((t (:foreground ,julie-green-1 :background ,julie-bg-1)))) - `(mode-line-folder-face ((t (:foreground ,julie-bg+2)))) - `(mode-line-modified-face ((t (:foreground ,julie-red)))) - `(mode-line-buffer-name ((t (:foreground ,julie-yellow :weight bold)))) - `(mode-line-mode-name ((t (:foreground ,julie-blue)))) - `(mode-line-mode-string ((t (:foreground ,julie-yellow)))) - `(region ((t (:background ,julie-magenta)))) - `(secondary-selection ((t (:background ,julie-bg+2)))) - `(trailing-whitespace ((t (:background ,julie-red)))) - `(vertical-border ((t (:foreground ,julie-fg)))) - - ;;; font lock - `(font-lock-builtin-face ((t (:foreground ,julie-blue)))) - `(font-lock-comment-face ((t (:foreground ,julie-bg+2)))) - `(font-lock-comment-delimiter-face ((t (:foreground ,julie-bg+2)))) - `(font-lock-constant-face ((t (:foreground ,julie-fg)))) - `(font-lock-doc-face ((t (:foreground ,julie-green+1)))) - `(font-lock-doc-string-face ((t (:foreground ,julie-blue+1)))) - `(font-lock-function-name-face ((t (:foreground ,julie-blue)))) - `(font-lock-keyword-face ((t (:inherit julie-strong-1-face)))) - `(font-lock-negation-char-face ((t (:foreground ,julie-fg)))) - `(font-lock-preprocessor-face ((t (:foreground ,julie-blue)))) - `(font-lock-string-face ((t (:foreground ,julie-red)))) - `(font-lock-type-face ((t (:foreground ,julie-yellow)))) - `(font-lock-variable-name-face ((t (:foreground ,julie-yellow)))) - `(font-lock-warning-face ((t (:inherit julie-warning-face)))) - - ;;; external - - ;; diff - `(diff-added ((t (:foreground ,julie-green+1)))) - `(diff-changed ((t (:foreground ,julie-yellow)))) - `(diff-removed ((t (:foreground ,julie-red)))) - `(diff-header ((t (:background ,julie-bg+1)))) - `(diff-file-header - ((t (:background ,julie-bg+2 :foreground ,julie-fg :bold t)))) - - ;; eshell - `(eshell-prompt ((t (:inherit julie-strong-1-face)))) - `(eshell-ls-archive ((t (:foreground ,julie-red-1 :weight bold)))) - `(eshell-ls-backup ((t (:inherit font-lock-comment)))) - `(eshell-ls-clutter ((t (:inherit font-lock-comment)))) - `(eshell-ls-directory ((t (:foreground ,julie-blue+1 :weight bold)))) - `(eshell-ls-executable ((t (:foreground ,julie-red+1 :weight bold)))) - `(eshell-ls-unreadable ((t (:foreground ,julie-fg)))) - `(eshell-ls-missing ((t (:inherit font-lock-warning)))) - `(eshell-ls-product ((t (:inherit font-lock-doc)))) - `(eshell-ls-special ((t (:inherit julie-strong-1-face)))) - `(eshell-ls-symlink ((t (:foreground ,julie-cyan :weight bold)))) - - ;; flymake - `(flymake-errline ((t (:inherit julie-error-face)))) - `(flymake-warnline ((t (:inherit julie-warning-face)))) - - ;; flyspell - `(flyspell-duplicate ((t (:inherit julie-warning-face)))) - `(flyspell-incorrect ((t (:inherit julie-error-face)))) - - ;; erc - `(erc-action-face ((t (:inherit erc-default-face)))) - `(erc-bold-face ((t (:weight bold)))) - `(erc-current-nick-face ((t (:inherit julie-strong-1-face)))) - `(erc-dangerous-host-face ((t (:inherit font-lock-warning)))) - `(erc-default-face ((t (:foreground ,julie-fg)))) - `(erc-direct-msg-face ((t (:inherit erc-default)))) - `(erc-error-face ((t (:inherit font-lock-warning)))) - `(erc-fool-face ((t (:inherit erc-default)))) - `(erc-highlight-face ((t (:inherit hover-highlight)))) - `(erc-input-face ((t (:foreground ,julie-yellow)))) - `(erc-keyword-face ((t (:inherit julie-strong-1-face)))) - `(erc-nick-default-face ((t (:weigth bold)))) - `(erc-nick-msg-face ((t (:inherit erc-default)))) - `(erc-notice-face ((t (:foreground ,julie-green)))) - `(erc-pal-face ((t (:foreground ,julie-orange :weight bold)))) - `(erc-prompt-face ((t (:inherit julie-strong-2-face)))) - `(erc-timestamp-face ((t (:foreground ,julie-green+1)))) - `(erc-underline-face ((t (:underline t)))) - - ;; gnus - `(gnus-group-mail-1-face ((t (:bold t :inherit gnus-group-mail-1-empty)))) - `(gnus-group-mail-1-empty-face ((t (:inherit gnus-group-news-1-empty)))) - `(gnus-group-mail-2-face ((t (:bold t :inherit gnus-group-mail-2-empty)))) - `(gnus-group-mail-2-empty-face ((t (:inherit gnus-group-news-2-empty)))) - `(gnus-group-mail-3-face ((t (:bold t :inherit gnus-group-mail-3-empty)))) - `(gnus-group-mail-3-empty-face ((t (:inherit gnus-group-news-3-empty)))) - `(gnus-group-mail-4-face ((t (:bold t :inherit gnus-group-mail-4-empty)))) - `(gnus-group-mail-4-empty-face ((t (:inherit gnus-group-news-4-empty)))) - `(gnus-group-mail-5-face ((t (:bold t :inherit gnus-group-mail-5-empty)))) - `(gnus-group-mail-5-empty-face ((t (:inherit gnus-group-news-5-empty)))) - `(gnus-group-mail-6-face ((t (:bold t :inherit gnus-group-mail-6-empty)))) - `(gnus-group-mail-6-empty-face ((t (:inherit gnus-group-news-6-empty)))) - `(gnus-group-mail-low-face ((t (:bold t :inherit gnus-group-mail-low-empty)))) - `(gnus-group-mail-low-empty-face ((t (:inherit gnus-group-news-low-empty)))) - `(gnus-group-news-1-face ((t (:bold t :inherit gnus-group-news-1-empty)))) - `(gnus-group-news-2-face ((t (:bold t :inherit gnus-group-news-2-empty)))) - `(gnus-group-news-3-face ((t (:bold t :inherit gnus-group-news-3-empty)))) - `(gnus-group-news-4-face ((t (:bold t :inherit gnus-group-news-4-empty)))) - `(gnus-group-news-5-face ((t (:bold t :inherit gnus-group-news-5-empty)))) - `(gnus-group-news-6-face ((t (:bold t :inherit gnus-group-news-6-empty)))) - `(gnus-group-news-low-face ((t (:bold t :inherit gnus-group-news-low-empty)))) - `(gnus-header-content-face ((t (:inherit message-header-other)))) - `(gnus-header-from-face ((t (:inherit message-header-from)))) - `(gnus-header-name-face ((t (:inherit message-header-name)))) - `(gnus-header-newsgroups-face ((t (:inherit message-header-other)))) - `(gnus-header-subject-face ((t (:inherit message-header-subject)))) - `(gnus-summary-cancelled-face ((t (:foreground ,julie-orange)))) - `(gnus-summary-high-ancient-face ((t (:foreground ,julie-blue)))) - `(gnus-summary-high-read-face ((t (:foreground ,julie-green :weight bold)))) - `(gnus-summary-high-ticked-face ((t (:inherit julie-strong-2-face)))) - `(gnus-summary-high-unread-face ((t (:foreground ,julie-fg :weight bold)))) - `(gnus-summary-low-ancient-face ((t (:foreground ,julie-blue)))) - `(gnus-summary-low-read-face ((t (:foreground ,julie-green)))) - `(gnus-summary-low-ticked-face ((t (:inherit julie-strong-2-face)))) - `(gnus-summary-low-unread-face ((t (:foreground ,julie-fg)))) - `(gnus-summary-normal-ancient-face ((t (:foreground ,julie-blue)))) - `(gnus-summary-normal-read-face ((t (:foreground ,julie-green)))) - `(gnus-summary-normal-ticked-face ((t (:inherit julie-strong-2-face)))) - `(gnus-summary-normal-unread-face ((t (:foreground ,julie-fg)))) - `(gnus-summary-selected-face ((t (:inherit julie-strong-1-face)))) - `(gnus-cite-1-face ((t (:foreground ,julie-blue)))) - `(gnus-cite-10-face ((t (:foreground ,julie-yellow-1)))) - `(gnus-cite-11-face ((t (:foreground ,julie-yellow)))) - `(gnus-cite-2-face ((t (:foreground ,julie-blue-1)))) - `(gnus-cite-3-face ((t (:foreground ,julie-blue-1)))) - `(gnus-cite-4-face ((t (:foreground ,julie-green+1)))) - `(gnus-cite-5-face ((t (:foreground ,julie-green+1)))) - `(gnus-cite-6-face ((t (:foreground ,julie-green)))) - `(gnus-cite-7-face ((t (:foreground ,julie-red)))) - `(gnus-cite-8-face ((t (:foreground ,julie-red-1)))) - `(gnus-cite-9-face ((t (:foreground ,julie-red-1)))) - `(gnus-group-news-1-empty-face ((t (:foreground ,julie-yellow)))) - `(gnus-group-news-2-empty-face ((t (:foreground ,julie-green+1)))) - `(gnus-group-news-3-empty-face ((t (:foreground ,julie-green+1)))) - `(gnus-group-news-4-empty-face ((t (:foreground ,julie-blue-1)))) - `(gnus-group-news-5-empty-face ((t (:foreground ,julie-blue-1)))) - `(gnus-group-news-6-empty-face ((t (:foreground ,julie-bg+2)))) - `(gnus-group-news-low-empty-face ((t (:foreground ,julie-bg+2)))) - `(gnus-signature-face ((t (:foreground ,julie-yellow)))) - `(gnus-x-face ((t (:background ,julie-fg :foreground ,julie-bg)))) - - ;; hl-line-mode - `(hl-line-face ((t (:background ,julie-bg-1)))) - - ;; ido-mode - `(ido-first-match ((t (:inherit julie-strong-1-face)))) - `(ido-only-match ((t (:inherit julie-strong-2-face)))) - `(ido-subdir ((t (:foreground ,julie-yellow)))) - - ;; magit - `(magit-section-title ((t (:inherit julie-strong-1-face)))) - `(magit-branch ((t (:inherit julie-strong-2-face)))) - - ;; markdown - `(markdown-header-face ((t (:inherit variable-pitch)))) - `(markdown-header-face-1 ((t (:height 200 :inherit markdown-header-face)))) - `(markdown-header-face-2 ((t (:height 150 :inherit markdown-header-face)))) - `(markdown-header-face-3 ((t (:height 100 :inherit markdown-header-face)))) - `(markdown-header-face-4 ((t (:height 90 :inherit markdown-header-face)))) - - ;; message-mode - `(message-cited-text-face ((t (:inherit font-lock-comment)))) - `(message-header-name-face ((t (:foreground ,julie-green+1)))) - `(message-header-other-face ((t (:foreground ,julie-green)))) - `(message-header-to-face ((t (:inherit julie-strong-1-face)))) - `(message-header-from-face ((t (:inherit julie-strong-1-face)))) - `(message-header-cc-face ((t (:inherit julie-strong-1-face)))) - `(message-header-newsgroups-face ((t (:inherit julie-strong-1-face)))) - `(message-header-subject-face ((t (:inherit julie-strong-2-face)))) - `(message-header-xheader-face ((t (:foreground ,julie-green)))) - `(message-mml-face ((t (:inherit julie-strong-1-face)))) - `(message-separator-face ((t (:inherit font-lock-comment)))) - - ;; mew - `(mew-face-header-subject ((t (:foreground ,julie-orange)))) - `(mew-face-header-from ((t (:foreground ,julie-yellow)))) - `(mew-face-header-date ((t (:foreground ,julie-green)))) - `(mew-face-header-to ((t (:foreground ,julie-red)))) - `(mew-face-header-key ((t (:foreground ,julie-green)))) - `(mew-face-header-private ((t (:foreground ,julie-green)))) - `(mew-face-header-important ((t (:foreground ,julie-blue)))) - `(mew-face-header-marginal ((t (:foreground ,julie-fg :weight bold)))) - `(mew-face-header-warning ((t (:foreground ,julie-red)))) - `(mew-face-header-xmew ((t (:foreground ,julie-green)))) - `(mew-face-header-xmew-bad ((t (:foreground ,julie-red)))) - `(mew-face-body-url ((t (:foreground ,julie-orange)))) - `(mew-face-body-comment ((t (:foreground ,julie-fg :slant italic)))) - `(mew-face-body-cite1 ((t (:foreground ,julie-green)))) - `(mew-face-body-cite2 ((t (:foreground ,julie-blue)))) - `(mew-face-body-cite3 ((t (:foreground ,julie-orange)))) - `(mew-face-body-cite4 ((t (:foreground ,julie-yellow)))) - `(mew-face-body-cite5 ((t (:foreground ,julie-red)))) - `(mew-face-mark-review ((t (:foreground ,julie-blue)))) - `(mew-face-mark-escape ((t (:foreground ,julie-green)))) - `(mew-face-mark-delete ((t (:foreground ,julie-red)))) - `(mew-face-mark-unlink ((t (:foreground ,julie-yellow)))) - `(mew-face-mark-refile ((t (:foreground ,julie-green)))) - `(mew-face-mark-unread ((t (:foreground ,julie-red-1)))) - `(mew-face-eof-message ((t (:foreground ,julie-green)))) - `(mew-face-eof-part ((t (:foreground ,julie-yellow)))) - - ;; minimap - `(minimap-font-face ((default (:height 30 :family "Anka/Coder")) (nil nil))) - `(minimap-semantic-function-face ((((background dark)) (:inherit (font-lock-function-name-face minimap-font-face) :background "gray10")))) - `(minimap-semantic-type-face ((t (:inherit (font-lock-type-face minimap-font-face) :background "gray10")))) - `(minimap-semantic-variable-face ((t (:inherit (font-lock-variable-name-face minimap-font-face) :background "gray10")))) - - ;; nav - `(nav-face-heading ((t (:foreground ,julie-yellow)))) - `(nav-face-button-num ((t (:foreground ,julie-cyan)))) - `(nav-face-dir ((t (:foreground ,julie-green)))) - `(nav-face-hdir ((t (:foreground ,julie-red)))) - `(nav-face-file ((t (:foreground ,julie-fg)))) - `(nav-face-hfile ((t (:foreground ,julie-red-1)))) - - ;; org-mode - `(org-agenda-date-today - ((t (:foreground "white" :slant italic :weight bold))) t) - `(org-agenda-structure - ((t (:inherit font-lock-comment-face)))) - `(org-archived ((t (:foreground ,julie-fg :weight bold)))) - `(org-checkbox ((t (:background ,julie-bg+2 :foreground "white" - :box (:line-width 1 :style released-button))))) - `(org-date ((t (:foreground ,julie-blue :underline t)))) - `(org-deadline-announce ((t (:foreground ,julie-red-1)))) - `(org-done ((t (:bold t :weight bold :foreground ,julie-green+1)))) - `(org-formula ((t (:foreground ,julie-yellow-1)))) - `(org-headline-done ((t (:foreground ,julie-green+1)))) - `(org-hide ((t (:foreground ,julie-bg-1)))) - `(org-level-1 ((t (:foreground ,julie-orange)))) - `(org-level-2 ((t (:foreground ,julie-green+1)))) - `(org-level-3 ((t (:foreground ,julie-blue-1)))) - `(org-level-4 ((t (:foreground ,julie-yellow-1)))) - `(org-level-5 ((t (:foreground ,julie-cyan)))) - `(org-level-6 ((t (:foreground ,julie-green-1)))) - `(org-level-7 ((t (:foreground ,julie-red-1)))) - `(org-level-8 ((t (:foreground ,julie-blue-1)))) - `(org-link ((t (:foreground ,julie-yellow-1 :underline t)))) - `(org-scheduled ((t (:foreground ,julie-green+1)))) - `(org-scheduled-previously ((t (:foreground ,julie-red-1)))) - `(org-scheduled-today ((t (:foreground ,julie-blue+1)))) - `(org-special-keyword ((t (:foreground ,julie-yellow-1)))) - `(org-table ((t (:foreground ,julie-green+1)))) - `(org-tag ((t (:bold t :weight bold)))) - `(org-time-grid ((t (:foreground ,julie-orange)))) - `(org-todo ((t (:bold t :foreground ,julie-red :weight bold)))) - `(org-upcoming-deadline ((t (:inherit font-lock-keyword-face)))) - `(org-warning ((t (:bold t :foreground ,julie-red :weight bold)))) - - ;; outline - '(outline-8 ((t (:inherit default)))) - '(outline-7 ((t (:inherit outline-8 :height 1.0)))) - '(outline-6 ((t (:inherit outline-7 :height 1.0)))) - '(outline-5 ((t (:inherit outline-6 :height 1.0)))) - '(outline-4 ((t (:inherit outline-5 :height 1.0)))) - '(outline-3 ((t (:inherit outline-4 :height 1.0)))) - '(outline-2 ((t (:inherit outline-3 :height 1.0)))) - '(outline-1 ((t (:inherit outline-2 :height 1.0)))) - - ;; rainbow-delimiters - `(rainbow-delimiters-depth-1-face ((t (:foreground ,julie-cyan)))) - `(rainbow-delimiters-depth-2-face ((t (:foreground ,julie-yellow)))) - `(rainbow-delimiters-depth-3-face ((t (:foreground ,julie-blue+1)))) - `(rainbow-delimiters-depth-4-face ((t (:foreground ,julie-red+1)))) - `(rainbow-delimiters-depth-5-face ((t (:foreground ,julie-orange)))) - `(rainbow-delimiters-depth-6-face ((t (:foreground ,julie-blue-1)))) - `(rainbow-delimiters-depth-7-face ((t (:foreground ,julie-green+1)))) - `(rainbow-delimiters-depth-8-face ((t (:foreground ,julie-red-1)))) - `(rainbow-delimiters-depth-9-face ((t (:foreground ,julie-yellow-1)))) - `(rainbow-delimiters-depth-10-face ((t (:foreground ,julie-green+1)))) - `(rainbow-delimiters-depth-11-face ((t (:foreground ,julie-blue+1)))) - `(rainbow-delimiters-depth-12-face ((t (:foreground ,julie-red-1)))) - - ;; rpm-mode - `(rpm-spec-dir-face ((t (:foreground ,julie-green)))) - `(rpm-spec-doc-face ((t (:foreground ,julie-green)))) - `(rpm-spec-ghost-face ((t (:foreground ,julie-red)))) - `(rpm-spec-macro-face ((t (:foreground ,julie-yellow)))) - `(rpm-spec-obsolete-tag-face ((t (:foreground ,julie-red)))) - `(rpm-spec-package-face ((t (:foreground ,julie-red)))) - `(rpm-spec-section-face ((t (:foreground ,julie-yellow)))) - `(rpm-spec-tag-face ((t (:foreground ,julie-blue)))) - `(rpm-spec-var-face ((t (:foreground ,julie-red)))) - - ;; show-paren - `(show-paren-mismatch ((t (:background ,julie-red-1 :weight bold)))) - `(show-paren-match ((t (:background ,julie-blue-1 :weight bold)))) - - ;; wanderlust - `(wl-highlight-folder-few-face ((t (:foreground ,julie-red-1)))) - `(wl-highlight-folder-many-face ((t (:foreground ,julie-red-1)))) - `(wl-highlight-folder-path-face ((t (:foreground ,julie-orange)))) - `(wl-highlight-folder-unread-face ((t (:foreground ,julie-blue)))) - `(wl-highlight-folder-zero-face ((t (:foreground ,julie-fg)))) - `(wl-highlight-folder-unknown-face ((t (:foreground ,julie-blue)))) - `(wl-highlight-message-citation-header ((t (:foreground ,julie-red-1)))) - `(wl-highlight-message-cited-text-1 ((t (:foreground ,julie-red)))) - `(wl-highlight-message-cited-text-2 ((t (:foreground ,julie-green+1)))) - `(wl-highlight-message-cited-text-3 ((t (:foreground ,julie-blue)))) - `(wl-highlight-message-cited-text-4 ((t (:foreground ,julie-blue+1)))) - `(wl-highlight-message-header-contents-face ((t (:foreground ,julie-green)))) - `(wl-highlight-message-headers-face ((t (:foreground ,julie-red+1)))) - `(wl-highlight-message-important-header-contents ((t (:foreground ,julie-green+1)))) - `(wl-highlight-message-header-contents ((t (:foreground ,julie-green+1)))) - `(wl-highlight-message-important-header-contents2 ((t (:foreground ,julie-green+1)))) - `(wl-highlight-message-signature ((t (:foreground ,julie-green)))) - `(wl-highlight-message-unimportant-header-contents ((t (:foreground ,julie-fg)))) - `(wl-highlight-summary-answered-face ((t (:foreground ,julie-blue)))) - `(wl-highlight-summary-disposed-face ((t (:foreground ,julie-fg - :slant italic)))) - `(wl-highlight-summary-new-face ((t (:foreground ,julie-blue)))) - `(wl-highlight-summary-normal-face ((t (:foreground ,julie-fg)))) - `(wl-highlight-summary-thread-top-face ((t (:foreground ,julie-yellow)))) - `(wl-highlight-thread-indent-face ((t (:foreground ,julie-magenta)))) - `(wl-highlight-summary-refiled-face ((t (:foreground ,julie-fg)))) - `(wl-highlight-summary-displaying-face ((t (:underline t :weight bold)))) - - (eval-after-load 'term - `(setq ansi-term-color-vector - (vector 'unspecified ,julie-bg - ,julie-red ,julie-green - ,julie-yellow ,julie-blue+1 - ,julie-magenta ,julie-cyan - ;; dirty fix - "white"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'julie) - -;;; julie-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/katester-theme.el b/elpa/color-theme-modern-0.0.3/katester-theme.el deleted file mode 100644 index 7a6729c..0000000 --- a/elpa/color-theme-modern-0.0.3/katester-theme.el +++ /dev/null @@ -1,271 +0,0 @@ -;;; katester-theme.el --- katester theme - -;; Copyright (C) 2001 by walterh@rocketmail.com -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of katester theme from `color-themes' - -;;; Code: - -(deftheme katester - "katester theme") - -(custom-theme-set-faces - 'katester - - '(default ((t (:background "ivory" :foreground "black")))) - '(mouse ((t (:foreground "black")))) - '(cursor ((t (:background "slateblue")))) - '(border ((t (:foreground "slateblue")))) - - '(Man-overstrike-face ((t (:bold t)))) - '(Man-underline-face ((t (:underline t)))) - '(apropos-keybinding-face ((t (:underline t)))) - '(apropos-label-face ((t (:italic t)))) - '(apropos-match-face ((t (:background "paleturquoise")))) - '(apropos-property-face ((t (:bold t :italic t)))) - '(apropos-symbol-face ((t (:bold t)))) - '(goto-address-mail-face ((t (:italic t)))) - '(goto-address-mail-mouse-face ((t (:background "paleturquoise")))) - '(goto-address-url-face ((t (:bold t)))) - '(goto-address-url-mouse-face ((t (:background "darkseagreen2")))) - '(help-highlight-face ((t (:underline t)))) - '(list-matching-lines-face ((t (:bold t)))) - '(view-highlight-face ((t (:background "darkseagreen2")))) - - '(bold ((t (:bold t)))) - '(bold-italic ((t (:bold t :italic t)))) - '(calendar-today-face ((t (:underline t)))) - '(cperl-array-face ((t (:foreground "Blue" :background "lightyellow2" :bold t)))) - '(cperl-hash-face ((t (:foreground "Red" :background "lightyellow2" :bold t :italic t)))) - '(cperl-nonoverridable-face ((t (:foreground "chartreuse3")))) - '(custom-button-face ((t (nil)))) - '(custom-changed-face ((t (:foreground "white" :background "blue")))) - '(custom-documentation-face ((t (nil)))) - '(custom-face-tag-face ((t (:underline t)))) - '(custom-group-tag-face ((t (:foreground "blue" :underline t)))) - '(custom-group-tag-face-1 ((t (:foreground "red" :underline t)))) - '(custom-invalid-face ((t (:foreground "yellow" :background "red")))) - '(custom-modified-face ((t (:foreground "white" :background "blue")))) - '(custom-rogue-face ((t (:foreground "pink" :background "black")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:foreground "blue" :background "white")))) - '(custom-state-face ((t (:foreground "dark green")))) - '(custom-variable-button-face ((t (:bold t :underline t)))) - '(custom-variable-tag-face ((t (:foreground "blue" :underline t)))) - '(diary-face ((t (:foreground "red")))) - '(ediff-current-diff-face-A ((t (:foreground "firebrick" :background "pale green")))) - '(ediff-current-diff-face-Ancestor ((t (:foreground "Black" :background "VioletRed")))) - '(ediff-current-diff-face-B ((t (:foreground "DarkOrchid" :background "Yellow")))) - '(ediff-current-diff-face-C ((t (:foreground "Navy" :background "Pink")))) - '(ediff-even-diff-face-A ((t (:foreground "Black" :background "light grey")))) - '(ediff-even-diff-face-Ancestor ((t (:foreground "White" :background "Grey")))) - '(ediff-even-diff-face-B ((t (:foreground "White" :background "Grey")))) - '(ediff-even-diff-face-C ((t (:foreground "Black" :background "light grey")))) - '(ediff-fine-diff-face-A ((t (:foreground "Navy" :background "sky blue")))) - '(ediff-fine-diff-face-Ancestor ((t (:foreground "Black" :background "Green")))) - '(ediff-fine-diff-face-B ((t (:foreground "Black" :background "cyan")))) - '(ediff-fine-diff-face-C ((t (:foreground "Black" :background "Turquoise")))) - '(ediff-odd-diff-face-A ((t (:foreground "White" :background "Grey")))) - '(ediff-odd-diff-face-Ancestor ((t (:foreground "Black" :background "light grey")))) - '(ediff-odd-diff-face-B ((t (:foreground "Black" :background "light grey")))) - '(ediff-odd-diff-face-C ((t (:foreground "White" :background "Grey")))) - '(eshell-ls-archive-face ((t (:foreground "Orchid" :bold t)))) - '(eshell-ls-backup-face ((t (:foreground "OrangeRed")))) - '(eshell-ls-clutter-face ((t (:foreground "OrangeRed" :bold t)))) - '(eshell-ls-directory-face ((t (:foreground "Blue" :bold t)))) - '(eshell-ls-executable-face ((t (:foreground "ForestGreen" :bold t)))) - '(eshell-ls-missing-face ((t (:foreground "Red" :bold t)))) - '(eshell-ls-product-face ((t (:foreground "OrangeRed")))) - '(eshell-ls-readonly-face ((t (:foreground "Brown")))) - '(eshell-ls-special-face ((t (:foreground "Magenta" :bold t)))) - '(eshell-ls-symlink-face ((t (:foreground "DarkCyan" :bold t)))) - '(eshell-ls-unreadable-face ((t (:foreground "Grey30")))) - '(eshell-prompt-face ((t (:foreground "Red" :bold t)))) - '(eshell-test-failed-face ((t (:foreground "OrangeRed" :bold t)))) - '(eshell-test-ok-face ((t (:foreground "Green" :bold t)))) - '(excerpt ((t (:italic t)))) - '(fixed ((t (:bold t)))) - '(flyspell-duplicate-face ((t (:foreground "Gold3" :bold t :underline t)))) - '(flyspell-incorrect-face ((t (:foreground "OrangeRed" :bold t :underline t)))) - '(font-lock-builtin-face ((t (:foreground "Orchid")))) - '(font-lock-comment-face ((t (:background "seashell")))) - '(font-lock-constant-face ((t (:foreground "darkblue")))) - '(font-lock-function-name-face ((t (:bold t :underline t)))) - '(font-lock-keyword-face ((t (:foreground "blue")))) - '(font-lock-string-face ((t (:foreground "maroon")))) - '(font-lock-type-face ((t (:foreground "black")))) - '(font-lock-variable-name-face ((t (:foreground "black")))) - '(font-lock-warning-face ((t (:foreground "Red" :bold t)))) - '(fringe ((t (:background "grey95")))) - '(gnus-cite-attribution-face ((t (:italic t)))) - '(gnus-cite-face-1 ((t (:foreground "MidnightBlue")))) - '(gnus-cite-face-10 ((t (:foreground "medium purple")))) - '(gnus-cite-face-11 ((t (:foreground "turquoise")))) - '(gnus-cite-face-2 ((t (:foreground "firebrick")))) - '(gnus-cite-face-3 ((t (:foreground "dark green")))) - '(gnus-cite-face-4 ((t (:foreground "OrangeRed")))) - '(gnus-cite-face-5 ((t (:foreground "dark khaki")))) - '(gnus-cite-face-6 ((t (:foreground "dark violet")))) - '(gnus-cite-face-7 ((t (:foreground "SteelBlue4")))) - '(gnus-cite-face-8 ((t (:foreground "magenta")))) - '(gnus-cite-face-9 ((t (:foreground "violet")))) - '(gnus-emphasis-bold ((t (:bold t)))) - '(gnus-emphasis-bold-italic ((t (:bold t :italic t)))) - '(gnus-emphasis-italic ((t (:italic t)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(gnus-emphasis-underline-bold ((t (:bold t :underline t)))) - '(gnus-emphasis-underline-bold-italic ((t (:bold t :italic t :underline t)))) - '(gnus-emphasis-underline-italic ((t (:italic t :underline t)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "DeepPink3")))) - '(gnus-group-mail-1-face ((t (:foreground "DeepPink3" :bold t)))) - '(gnus-group-mail-2-empty-face ((t (:foreground "HotPink3")))) - '(gnus-group-mail-2-face ((t (:foreground "HotPink3" :bold t)))) - '(gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) - '(gnus-group-mail-3-face ((t (:foreground "magenta4" :bold t)))) - '(gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) - '(gnus-group-mail-low-face ((t (:foreground "DeepPink4" :bold t)))) - '(gnus-group-news-1-empty-face ((t (:foreground "ForestGreen")))) - '(gnus-group-news-1-face ((t (:foreground "ForestGreen" :bold t)))) - '(gnus-group-news-2-empty-face ((t (:foreground "CadetBlue4")))) - '(gnus-group-news-2-face ((t (:foreground "CadetBlue4" :bold t)))) - '(gnus-group-news-3-empty-face ((t (nil)))) - '(gnus-group-news-3-face ((t (:bold t)))) - '(gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) - '(gnus-group-news-low-face ((t (:foreground "DarkGreen" :bold t)))) - '(gnus-header-content-face ((t (:foreground "indianred4" :italic t)))) - '(gnus-header-from-face ((t (:foreground "red3")))) - '(gnus-header-name-face ((t (:foreground "maroon")))) - '(gnus-header-newsgroups-face ((t (:foreground "MidnightBlue" :italic t)))) - '(gnus-header-subject-face ((t (:foreground "red4")))) - '(gnus-signature-face ((t (:italic t)))) - '(gnus-splash-face ((t (:foreground "ForestGreen")))) - '(gnus-summary-cancelled-face ((t (:foreground "yellow" :background "black")))) - '(gnus-summary-high-ancient-face ((t (:foreground "RoyalBlue" :bold t)))) - '(gnus-summary-high-read-face ((t (:foreground "DarkGreen" :bold t)))) - '(gnus-summary-high-ticked-face ((t (:foreground "firebrick" :bold t)))) - '(gnus-summary-high-unread-face ((t (:bold t)))) - '(gnus-summary-low-ancient-face ((t (:foreground "RoyalBlue" :italic t)))) - '(gnus-summary-low-read-face ((t (:foreground "DarkGreen" :italic t)))) - '(gnus-summary-low-ticked-face ((t (:foreground "firebrick" :italic t)))) - '(gnus-summary-low-unread-face ((t (:italic t)))) - '(gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) - '(gnus-summary-normal-read-face ((t (:foreground "DarkGreen")))) - '(gnus-summary-normal-ticked-face ((t (:foreground "firebrick")))) - '(gnus-summary-normal-unread-face ((t (nil)))) - '(gnus-summary-selected-face ((t (:underline t)))) - '(highlight ((t (:background "lavender")))) - '(highlight-changes-delete-face ((t (:foreground "red" :underline t)))) - '(highlight-changes-face ((t (:foreground "red")))) - '(highline-face ((t (:background "paleturquoise")))) - '(holiday-face ((t (:background "pink")))) - '(info-menu-5 ((t (:underline t)))) - '(info-node ((t (:bold t :italic t)))) - '(info-xref ((t (:bold t)))) - '(italic ((t (:italic t)))) - '(makefile-space-face ((t (:background "hotpink")))) - '(message-cited-text-face ((t (:foreground "red")))) - '(message-header-cc-face ((t (:foreground "MidnightBlue")))) - '(message-header-name-face ((t (:foreground "cornflower blue")))) - '(message-header-newsgroups-face ((t (:foreground "blue4" :bold t :italic t)))) - '(message-header-other-face ((t (:foreground "steel blue")))) - '(message-header-subject-face ((t (:foreground "navy blue" :bold t)))) - '(message-header-to-face ((t (:foreground "MidnightBlue" :bold t)))) - '(message-header-xheader-face ((t (:foreground "blue")))) - '(message-separator-face ((t (:foreground "brown")))) - '(modeline ((t (:background "moccasin" :foreground "black")))) - '(modeline-buffer-id ((t (:foreground "white" :background "black")))) - '(modeline-mousable ((t (:foreground "white" :background "black")))) - '(modeline-mousable-minor-mode ((t (:foreground "white" :background "black")))) - '(region ((t (:background "lavender")))) - '(secondary-selection ((t (:background "paleturquoise")))) - '(show-paren-match-face ((t (:background "turquoise")))) - '(show-paren-mismatch-face ((t (:foreground "white" :background "purple")))) - '(speedbar-button-face ((t (:foreground "green4")))) - '(speedbar-directory-face ((t (:foreground "blue4")))) - '(speedbar-file-face ((t (:foreground "cyan4")))) - '(speedbar-highlight-face ((t (:background "green")))) - '(speedbar-selected-face ((t (:foreground "red" :underline t)))) - '(speedbar-tag-face ((t (:foreground "brown")))) - '(term-black ((t (:foreground "black")))) - '(term-blackbg ((t (:background "black")))) - '(term-blue ((t (:foreground "blue")))) - '(term-bluebg ((t (:background "blue")))) - '(term-bold ((t (:bold t)))) - '(term-cyan ((t (:foreground "cyan")))) - '(term-cyanbg ((t (:background "cyan")))) - '(term-default-bg ((t (nil)))) - '(term-default-bg-inv ((t (nil)))) - '(term-default-fg ((t (nil)))) - '(term-default-fg-inv ((t (nil)))) - '(term-green ((t (:foreground "green")))) - '(term-greenbg ((t (:background "green")))) - '(term-invisible ((t (nil)))) - '(term-invisible-inv ((t (nil)))) - '(term-magenta ((t (:foreground "magenta")))) - '(term-magentabg ((t (:background "magenta")))) - '(term-red ((t (:foreground "red")))) - '(term-redbg ((t (:background "red")))) - '(term-underline ((t (:underline t)))) - '(term-white ((t (:foreground "white")))) - '(term-whitebg ((t (:background "white")))) - '(term-yellow ((t (:foreground "yellow")))) - '(term-yellowbg ((t (:background "yellow")))) - '(underline ((t (:underline t)))) - '(vcursor ((t (:foreground "blue" :background "cyan" :underline t)))) - '(vhdl-font-lock-attribute-face ((t (:foreground "Orchid")))) - '(vhdl-font-lock-directive-face ((t (:foreground "CadetBlue")))) - '(vhdl-font-lock-enumvalue-face ((t (:foreground "Gold4")))) - '(vhdl-font-lock-function-face ((t (:foreground "Orchid4")))) - '(vhdl-font-lock-prompt-face ((t (:foreground "Red" :bold t)))) - '(vhdl-font-lock-reserved-words-face ((t (:foreground "Orange" :bold t)))) - '(vhdl-font-lock-translate-off-face ((t (:background "LightGray")))) - '(vhdl-speedbar-architecture-face ((t (:foreground "Blue")))) - '(vhdl-speedbar-architecture-selected-face ((t (:foreground "Blue" :underline t)))) - '(vhdl-speedbar-configuration-face ((t (:foreground "DarkGoldenrod")))) - '(vhdl-speedbar-configuration-selected-face ((t (:foreground "DarkGoldenrod" :underline t)))) - '(vhdl-speedbar-entity-face ((t (:foreground "ForestGreen")))) - '(vhdl-speedbar-entity-selected-face ((t (:foreground "ForestGreen" :underline t)))) - '(vhdl-speedbar-instantiation-face ((t (:foreground "Brown")))) - '(vhdl-speedbar-instantiation-selected-face ((t (:foreground "Brown" :underline t)))) - '(vhdl-speedbar-package-face ((t (:foreground "Grey50")))) - '(vhdl-speedbar-package-selected-face ((t (:foreground "Grey50" :underline t)))) - '(viper-minibuffer-emacs-face ((t (:foreground "Black" :background "darkseagreen2")))) - '(viper-minibuffer-insert-face ((t (:foreground "Black" :background "pink")))) - '(viper-minibuffer-vi-face ((t (:foreground "DarkGreen" :background "grey")))) - '(viper-replace-overlay-face ((t (:foreground "Black" :background "darkseagreen2")))) - '(viper-search-face ((t (:foreground "Black" :background "khaki")))) - '(widget-button-face ((t (:bold t)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "dark green")))) - '(widget-field-face ((t (:background "gray85")))) - '(widget-inactive-face ((t (:foreground "dim gray")))) - '(widget-single-line-field-face ((t (:background "gray85"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'katester) - -;;; katester-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/kingsajz-theme.el b/elpa/color-theme-modern-0.0.3/kingsajz-theme.el deleted file mode 100644 index e407516..0000000 --- a/elpa/color-theme-modern-0.0.3/kingsajz-theme.el +++ /dev/null @@ -1,281 +0,0 @@ -;;; kingsajz-theme.el --- kingsajz theme - -;; Copyright (C) 2001 by Olgierd "Kingsajz" Ziolko -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of kingsajz theme from `color-themes' - -;;; Code: - -(deftheme kingsajz - "kingsajz theme") - -(custom-theme-set-faces - 'kingsajz - - '(default ((t (:background "darkslategrey" :foreground "wheat")))) - '(mouse ((t (:background "Grey")))) - '(cursor ((t (:background "LightGray")))) - '(border ((t (:background "black")))) - - '(bbdb-field-name ((t (:foreground "green")))) - '(bg:erc-color-face0 ((t (:background "White")))) - '(bg:erc-color-face1 ((t (:background "black")))) - '(bg:erc-color-face10 ((t (:background "lightblue1")))) - '(bg:erc-color-face11 ((t (:background "cyan")))) - '(bg:erc-color-face12 ((t (:background "blue")))) - '(bg:erc-color-face13 ((t (:background "deeppink")))) - '(bg:erc-color-face14 ((t (:background "gray50")))) - '(bg:erc-color-face15 ((t (:background "gray90")))) - '(bg:erc-color-face2 ((t (:background "blue4")))) - '(bg:erc-color-face3 ((t (:background "green4")))) - '(bg:erc-color-face4 ((t (:background "red")))) - '(bg:erc-color-face5 ((t (:background "brown")))) - '(bg:erc-color-face6 ((t (:background "purple")))) - '(bg:erc-color-face7 ((t (:background "orange")))) - '(bg:erc-color-face8 ((t (:background "yellow")))) - '(bg:erc-color-face9 ((t (:background "green")))) - '(blue ((t (:foreground "cyan")))) - '(bold ((t (:bold t :foreground "OrangeRed" :weight bold)))) - '(bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) - '(calendar-today-face ((t (:underline t)))) - '(comint-highlight-input ((t (:bold t :weight bold)))) - '(comint-highlight-prompt ((t (:foreground "cyan")))) - '(cperl-array-face ((t (:foreground "Yellow")))) - '(cperl-hash-face ((t (:foreground "White")))) - '(cperl-nonoverridable-face ((t (:foreground "SkyBlue")))) - '(custom-button-face ((t (:foreground "MediumSlateBlue" :underline t)))) - '(custom-button-pressed-face ((t (:background "lightgrey" :foreground "black" :box (:line-width 2 :style pressed-button))))) - '(custom-changed-face ((t (:background "blue" :foreground "white")))) - '(custom-comment-face ((t (:background "dim gray")))) - '(custom-comment-tag-face ((t (:foreground "gray80")))) - '(custom-documentation-face ((t (:foreground "Grey")))) - '(custom-face-tag-face ((t (:bold t :weight bold :height 1.2)))) - '(custom-group-tag-face ((t (:foreground "MediumAquamarine")))) - '(custom-group-tag-face-1 ((t (:bold t :foreground "pink" :weight bold :height 1.2)))) - '(custom-invalid-face ((t (:background "red" :foreground "yellow")))) - '(custom-modified-face ((t (:background "blue" :foreground "white")))) - '(custom-rogue-face ((t (:background "black" :foreground "pink")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:background "white" :foreground "blue")))) - '(custom-state-face ((t (:foreground "Coral")))) - '(custom-variable-button-face ((t (:underline t)))) - '(custom-variable-tag-face ((t (:foreground "Aquamarine")))) - '(date ((t (:foreground "green")))) - '(diary-face ((t (:bold t :foreground "IndianRed" :weight bold)))) - '(dired-face-directory ((t (:bold t :foreground "sky blue" :weight bold)))) - '(dired-face-executable ((t (:foreground "green yellow")))) - '(dired-face-flagged ((t (:foreground "tomato")))) - '(dired-face-marked ((t (:foreground "light salmon")))) - '(dired-face-permissions ((t (:foreground "aquamarine")))) - '(erc-action-face ((t (:bold t :weight bold)))) - '(erc-bold-face ((t (:bold t :weight bold)))) - '(erc-default-face ((t (nil)))) - '(erc-direct-msg-face ((t (:foreground "pale green")))) - '(erc-error-face ((t (:bold t :foreground "IndianRed" :weight bold)))) - '(erc-highlight-face ((t (:bold t :foreground "pale green" :weight bold)))) - '(erc-host-danger-face ((t (:foreground "red")))) - '(erc-input-face ((t (:foreground "light blue")))) - '(erc-inverse-face ((t (:background "steel blue")))) - '(erc-notice-face ((t (:foreground "light salmon")))) - '(erc-pal-face ((t (:foreground "pale green")))) - '(erc-prompt-face ((t (:bold t :foreground "light blue" :weight bold)))) - '(erc-underline-face ((t (:underline t)))) - '(eshell-ls-archive-face ((t (:bold t :foreground "IndianRed" :weight bold)))) - '(eshell-ls-backup-face ((t (:foreground "Grey")))) - '(eshell-ls-clutter-face ((t (:bold t :foreground "DimGray" :weight bold)))) - '(eshell-ls-directory-face ((t (:bold t :foreground "MediumSlateBlue" :weight bold)))) - '(eshell-ls-executable-face ((t (:bold t :foreground "Coral" :weight bold)))) - '(eshell-ls-missing-face ((t (:bold t :foreground "black" :weight bold)))) - '(eshell-ls-picture-face ((t (:foreground "Violet")))) - '(eshell-ls-product-face ((t (:foreground "LightSalmon")))) - '(eshell-ls-readonly-face ((t (:foreground "Aquamarine")))) - '(eshell-ls-special-face ((t (:bold t :foreground "Gold" :weight bold)))) - '(eshell-ls-symlink-face ((t (:bold t :foreground "White" :weight bold)))) - '(eshell-ls-text-face ((t (:foreground "medium aquamarine")))) - '(eshell-ls-todo-face ((t (:bold t :foreground "aquamarine" :weight bold)))) - '(eshell-ls-unreadable-face ((t (:foreground "DimGray")))) - '(eshell-prompt-face ((t (:foreground "powder blue")))) - '(face-1 ((t (:stipple nil :foreground "royal blue")))) - '(face-2 ((t (:stipple nil :foreground "DeepSkyBlue1")))) - '(face-3 ((t (:stipple nil :foreground "NavajoWhite3")))) - '(fg:erc-color-face0 ((t (:foreground "white")))) - '(fg:erc-color-face1 ((t (:foreground "beige")))) - '(fg:erc-color-face10 ((t (:foreground "pale goldenrod")))) - '(fg:erc-color-face11 ((t (:foreground "light goldenrod yellow")))) - '(fg:erc-color-face12 ((t (:foreground "light yellow")))) - '(fg:erc-color-face13 ((t (:foreground "yellow")))) - '(fg:erc-color-face14 ((t (:foreground "light goldenrod")))) - '(fg:erc-color-face15 ((t (:foreground "lime green")))) - '(fg:erc-color-face2 ((t (:foreground "lemon chiffon")))) - '(fg:erc-color-face3 ((t (:foreground "light cyan")))) - '(fg:erc-color-face4 ((t (:foreground "powder blue")))) - '(fg:erc-color-face5 ((t (:foreground "sky blue")))) - '(fg:erc-color-face6 ((t (:foreground "dark sea green")))) - '(fg:erc-color-face7 ((t (:foreground "pale green")))) - '(fg:erc-color-face8 ((t (:foreground "medium spring green")))) - '(fg:erc-color-face9 ((t (:foreground "khaki")))) - - '(font-lock-builtin-face ((t (:bold t :foreground "PaleGreen" :weight bold)))) - '(font-lock-comment-face ((t (:foreground "White")))) - '(font-lock-constant-face ((t (:bold t :foreground "Aquamarine" :weight bold)))) - '(font-lock-doc-face ((t (:italic t :slant italic :foreground "LightSalmon")))) - '(font-lock-doc-string-face ((t (:foreground "LightSalmon")))) - '(font-lock-function-name-face ((t (:bold t :foreground "MediumSlateBlue" :weight bold)))) - '(font-lock-keyword-face ((t (:foreground "Salmon")))) - '(font-lock-preprocessor-face ((t (:foreground "Salmon")))) - '(font-lock-reference-face ((t (:foreground "pale green")))) - '(font-lock-string-face ((t (:italic t :foreground "LightSalmon" :slant italic)))) - '(font-lock-type-face ((t (:bold t :foreground "YellowGreen" :weight bold)))) - '(font-lock-variable-name-face ((t (:italic t :bold t :foreground "Aquamarine" :slant italic :weight bold)))) - '(font-lock-warning-face ((t (:bold t :foreground "IndianRed" :weight bold)))) - '(fringe ((t (:background "darkslategrey")))) - '(gnus-cite-face-1 ((t (:foreground "DarkGoldenrod3")))) - '(gnus-cite-face-10 ((t (nil)))) - '(gnus-cite-face-11 ((t (nil)))) - '(gnus-cite-face-2 ((t (:foreground "IndianRed3")))) - '(gnus-cite-face-3 ((t (:foreground "tomato")))) - '(gnus-cite-face-4 ((t (:foreground "yellow green")))) - '(gnus-cite-face-5 ((t (:foreground "SteelBlue3")))) - '(gnus-cite-face-6 ((t (:foreground "Azure3")))) - '(gnus-cite-face-7 ((t (:foreground "Azure4")))) - '(gnus-cite-face-8 ((t (:foreground "SpringGreen4")))) - '(gnus-cite-face-9 ((t (:foreground "SlateGray4")))) - '(gnus-emphasis-bold ((t (:bold t :foreground "greenyellow" :weight bold)))) - '(gnus-emphasis-bold-italic ((t (:italic t :bold t :foreground "OrangeRed1" :slant italic :weight bold)))) - '(gnus-emphasis-highlight-words ((t (:background "black" :foreground "khaki")))) - '(gnus-emphasis-italic ((t (:italic t :bold t :foreground "orange" :slant italic :weight bold)))) - '(gnus-emphasis-underline ((t (:foreground "greenyellow" :underline t)))) - '(gnus-emphasis-underline-bold ((t (:bold t :foreground "khaki" :underline t :weight bold)))) - '(gnus-emphasis-underline-bold-italic ((t (:italic t :bold t :underline t :slant italic :weight bold)))) - '(gnus-emphasis-underline-italic ((t (:italic t :foreground "orange" :underline t :slant italic)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "Salmon4")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "firebrick1" :weight bold)))) - '(gnus-group-mail-2-empty-face ((t (:foreground "turquoise4")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "turquoise" :weight bold)))) - '(gnus-group-mail-3-empty-face ((t (:foreground "LightCyan4")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "LightCyan1" :weight bold)))) - '(gnus-group-mail-low-empty-face ((t (:foreground "SteelBlue4")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "SteelBlue2" :weight bold)))) - '(gnus-group-news-1-empty-face ((t (:foreground "Salmon4")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "FireBrick1" :weight bold)))) - '(gnus-group-news-2-empty-face ((t (:foreground "darkorange3")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "dark orange" :weight bold)))) - '(gnus-group-news-3-empty-face ((t (:foreground "turquoise4")))) - '(gnus-group-news-3-face ((t (:bold t :foreground "Aquamarine" :weight bold)))) - '(gnus-group-news-4-empty-face ((t (:foreground "SpringGreen4")))) - '(gnus-group-news-4-face ((t (:bold t :foreground "SpringGreen2" :weight bold)))) - '(gnus-group-news-5-empty-face ((t (:foreground "OliveDrab4")))) - '(gnus-group-news-5-face ((t (:bold t :foreground "OliveDrab2" :weight bold)))) - '(gnus-group-news-6-empty-face ((t (:foreground "DarkGoldenrod4")))) - '(gnus-group-news-6-face ((t (:bold t :foreground "DarkGoldenrod3" :weight bold)))) - '(gnus-group-news-low-empty-face ((t (:foreground "wheat4")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "tan4" :weight bold)))) - '(gnus-header-content-face ((t (:foreground "LightSkyBlue3")))) - '(gnus-header-from-face ((t (:bold t :foreground "light cyan" :weight bold)))) - '(gnus-header-name-face ((t (:bold t :foreground "DodgerBlue1" :weight bold)))) - '(gnus-header-newsgroups-face ((t (:italic t :bold t :foreground "LightSkyBlue3" :slant italic :weight bold)))) - '(gnus-header-subject-face ((t (:bold t :foreground "light cyan" :weight bold)))) - '(gnus-signature-face ((t (:italic t :foreground "salmon" :slant italic)))) - '(gnus-splash-face ((t (:foreground "Firebrick1")))) - '(gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "MistyRose4" :weight bold)))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "tomato3" :weight bold)))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "coral" :weight bold)))) - '(gnus-summary-high-unread-face ((t (:italic t :bold t :foreground "red1" :slant italic :weight bold)))) - '(gnus-summary-low-ancient-face ((t (:italic t :foreground "DarkSeaGreen4" :slant italic)))) - '(gnus-summary-low-read-face ((t (:foreground "SeaGreen4")))) - '(gnus-summary-low-ticked-face ((t (:italic t :foreground "Green4" :slant italic)))) - '(gnus-summary-low-unread-face ((t (:italic t :foreground "green3" :slant italic)))) - '(gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) - '(gnus-summary-normal-read-face ((t (:foreground "khaki4")))) - '(gnus-summary-normal-ticked-face ((t (:foreground "khaki3")))) - '(gnus-summary-normal-unread-face ((t (:foreground "khaki")))) - '(gnus-summary-selected-face ((t (:foreground "gold" :underline t)))) - '(green ((t (:foreground "green")))) - '(gui-button-face ((t (:foreground "red" :background "black")))) - '(gui-element ((t (:bold t :background "#ffffff" :foreground "#000000" :weight bold)))) - '(header-line ((t (:box (:line-width -1 :style released-button) :background "grey20" :foreground "grey90" :box nil)))) - '(highlight ((t (:background "PaleGreen" :foreground "DarkGreen")))) - '(highline-face ((t (:background "SeaGreen")))) - '(holiday-face ((t (:background "DimGray")))) - '(info-menu-5 ((t (:underline t)))) - '(info-node ((t (:bold t :foreground "DodgerBlue1" :underline t :weight bold)))) - '(info-xref ((t (:bold t :foreground "DodgerBlue3" :weight bold)))) - '(isearch ((t (:background "sea green" :foreground "black")))) - '(isearch-lazy-highlight-face ((t (:background "paleturquoise4")))) - '(italic ((t (:italic t :foreground "chocolate3" :slant italic)))) - '(menu ((t (nil)))) - '(message-cited-text-face ((t (:foreground "White")))) - '(message-header-cc-face ((t (:foreground "light cyan")))) - '(message-header-name-face ((t (:foreground "DodgerBlue1")))) - '(message-header-newsgroups-face ((t (:italic t :bold t :foreground "LightSkyBlue3" :slant italic :weight bold)))) - '(message-header-other-face ((t (:foreground "LightSkyBlue3")))) - '(message-header-subject-face ((t (:bold t :foreground "light cyan" :weight bold)))) - '(message-header-to-face ((t (:bold t :foreground "light cyan" :weight bold)))) - '(message-header-xheader-face ((t (:foreground "DodgerBlue3")))) - '(message-mml-face ((t (:foreground "ForestGreen")))) - '(message-separator-face ((t (:background "cornflower blue" :foreground "chocolate")))) - '(modeline ((t (:background "dark olive green" :foreground "wheat" :box (:line-width -1 :style released-button))))) - '(modeline-buffer-id ((t (:bold t :background "dark olive green" :foreground "beige" :weight bold)))) - '(modeline-mousable ((t (:bold t :background "dark olive green" :foreground "yellow green" :weight bold)))) - '(modeline-mousable-minor-mode ((t (:bold t :background "dark olive green" :foreground "wheat" :weight bold)))) - '(paren-blink-off ((t (:foreground "brown")))) - '(region ((t (:background "dark cyan" :foreground "cyan")))) - '(ruler-mode-column-number-face ((t (:box (:color "grey76" :line-width 1 :style released-button) :background "grey76" :foreground "black")))) - '(ruler-mode-current-column-face ((t (:bold t :box (:color "grey76" :line-width 1 :style released-button) :background "grey76" :foreground "yellow" :weight bold)))) - '(ruler-mode-default-face ((t (:background "grey76" :foreground "grey64" :box (:color "grey76" :line-width 1 :style released-button))))) - '(ruler-mode-fill-column-face ((t (:box (:color "grey76" :line-width 1 :style released-button) :background "grey76" :foreground "red")))) - '(ruler-mode-margins-face ((t (:box (:color "grey76" :line-width 1 :style released-button) :foreground "grey64" :background "grey64")))) - '(ruler-mode-tab-stop-face ((t (:box (:color "grey76" :line-width 1 :style released-button) :background "grey76" :foreground "steelblue")))) - '(scroll-bar ((t (nil)))) - '(secondary-selection ((t (:background "Aquamarine" :foreground "SlateBlue")))) - '(show-paren-match-face ((t (:bold t :background "Aquamarine" :foreground "steel blue" :weight bold)))) - '(show-paren-mismatch-face ((t (:background "Red" :foreground "White")))) - '(swbuff-current-buffer-face ((t (:bold t :foreground "red" :weight bold)))) - '(text-cursor ((t (:background "Red" :foreground "white")))) - '(tool-bar ((t (:background "grey75" :foreground "black" :box (:line-width 1 :style released-button))))) - '(trailing-whitespace ((t (:background "red")))) - '(underline ((t (:underline t)))) - '(w3m-anchor-face ((t (:bold t :foreground "DodgerBlue1" :weight bold)))) - '(w3m-arrived-anchor-face ((t (:bold t :foreground "DodgerBlue3" :weight bold)))) - '(w3m-header-line-location-content-face ((t (:background "dark olive green" :foreground "wheat")))) - '(w3m-header-line-location-title-face ((t (:background "dark olive green" :foreground "beige")))) - '(widget-button-face ((t (:bold t :foreground "green" :weight bold)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "lime green")))) - '(widget-field-face ((t (:foreground "LightBlue")))) - '(widget-inactive-face ((t (:foreground "DimGray")))) - '(widget-single-line-field-face ((t (:foreground "LightBlue")))) - '(woman-bold-face ((t (:bold t :weight bold)))) - '(woman-italic-face ((t (:italic t :foreground "beige" :slant italic)))) - '(woman-unknown-face ((t (:foreground "LightSalmon")))) - '(zmacs-region ((t (:background "dark cyan" :foreground "cyan"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'kingsajz) - -;;; kingsajz-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/late-night-theme.el b/elpa/color-theme-modern-0.0.3/late-night-theme.el deleted file mode 100644 index e7eef22..0000000 --- a/elpa/color-theme-modern-0.0.3/late-night-theme.el +++ /dev/null @@ -1,214 +0,0 @@ -;;; late-night-theme.el --- late-night theme - -;; Copyright (C) 2002 by Alex Schroeder -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of late-night theme from `color-themes' - -;;; Code: - -(deftheme late-night - "late-night theme") - -(custom-theme-set-faces - 'late-night - - '(default ((t (:background "#000" :foreground "#666")))) - '(cursor ((t (:background "#888")))) - '(border ((t (:foreground "#000")))) - - '(erc-action-face ((t (nil)))) - '(erc-bold-face ((t (:bold t)))) - '(erc-current-nick-face ((t (:bold t)))) - '(erc-default-face ((t (nil)))) - '(erc-direct-msg-face ((t (nil)))) - '(erc-error-face ((t (:bold t :foreground "IndianRed")))) - '(erc-highlight-face ((t (:bold t :foreground "pale green")))) - '(erc-input-face ((t (:foreground "#555")))) - '(erc-inverse-face ((t (:background "steel blue")))) - '(erc-keyword-face ((t (:foreground "#999" :bold t)))) - '(erc-nick-msg-face ((t (:foreground "#888")))) - '(erc-notice-face ((t (:foreground "#444")))) - '(erc-pal-face ((t (:foreground "#888")))) - '(erc-prompt-face ((t (:foreground "#777" :bold t)))) - '(erc-timestamp-face ((t (:foreground "#777" :bold t)))) - '(fg:erc-color-face0 ((t (:foreground "white")))) - '(fg:erc-color-face1 ((t (:foreground "beige")))) - '(fg:erc-color-face2 ((t (:foreground "lemon chiffon")))) - '(fg:erc-color-face3 ((t (:foreground "light cyan")))) - '(fg:erc-color-face4 ((t (:foreground "powder blue")))) - '(fg:erc-color-face5 ((t (:foreground "sky blue")))) - '(fg:erc-color-face6 ((t (:foreground "dark sea green")))) - '(fg:erc-color-face7 ((t (:foreground "pale green")))) - '(fg:erc-color-face8 ((t (:foreground "medium spring green")))) - '(fg:erc-color-face9 ((t (:foreground "khaki")))) - '(fg:erc-color-face10 ((t (:foreground "pale goldenrod")))) - '(fg:erc-color-face11 ((t (:foreground "light goldenrod yellow")))) - '(fg:erc-color-face12 ((t (:foreground "light yellow")))) - '(fg:erc-color-face13 ((t (:foreground "yellow")))) - '(fg:erc-color-face14 ((t (:foreground "light goldenrod")))) - '(fg:erc-color-face15 ((t (:foreground "lime green")))) - '(bg:erc-color-face0 ((t (nil)))) - '(bg:erc-color-face1 ((t (nil)))) - '(bg:erc-color-face2 ((t (nil)))) - '(bg:erc-color-face3 ((t (nil)))) - '(bg:erc-color-face4 ((t (nil)))) - '(bg:erc-color-face5 ((t (nil)))) - '(bg:erc-color-face6 ((t (nil)))) - '(bg:erc-color-face7 ((t (nil)))) - '(bg:erc-color-face8 ((t (nil)))) - '(bg:erc-color-face9 ((t (nil)))) - '(bg:erc-color-face10 ((t (nil)))) - '(bg:erc-color-face11 ((t (nil)))) - '(bg:erc-color-face12 ((t (nil)))) - '(bg:erc-color-face13 ((t (nil)))) - '(bg:erc-color-face14 ((t (nil)))) - '(bg:erc-color-face15 ((t (nil)))) - - '(gnus-cite-attribution-face ((t (:foreground "#bbb")))) - '(gnus-cite-face-1 ((t (:foreground "#aaa")))) - '(gnus-cite-face-2 ((t (:foreground "#aaa")))) - '(gnus-cite-face-3 ((t (:foreground "#aaa")))) - '(gnus-cite-face-4 ((t (:foreground "#aaa")))) - '(gnus-cite-face-5 ((t (:foreground "#aaa")))) - '(gnus-cite-face-6 ((t (:foreground "#aaa")))) - '(gnus-cite-face-7 ((t (:foreground "#aaa")))) - '(gnus-cite-face-8 ((t (:foreground "#aaa")))) - '(gnus-cite-face-9 ((t (:foreground "#aaa")))) - '(gnus-emphasis-bold ((t (:bold t)))) - '(gnus-emphasis-bold-italic ((t (:italic t :bold t)))) - '(gnus-emphasis-highlight-words ((t (:foreground "#ccc")))) - '(gnus-emphasis-italic ((t (:italic t)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(gnus-emphasis-underline-bold ((t (:bold t :underline t)))) - '(gnus-emphasis-underline-bold-italic ((t (:italic t :bold t :underline t)))) - '(gnus-emphasis-underline-italic ((t (:italic t :underline t)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "#999")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "#999")))) - '(gnus-group-mail-2-empty-face ((t (:foreground "#999")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "#999")))) - '(gnus-group-mail-3-empty-face ((t (:foreground "#888")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "#888")))) - '(gnus-group-mail-low-empty-face ((t (:foreground "#777")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "#777")))) - '(gnus-group-news-1-empty-face ((t (:foreground "#999")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "#999")))) - '(gnus-group-news-2-empty-face ((t (:foreground "#888")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "#888")))) - '(gnus-group-news-3-empty-face ((t (:foreground "#777")))) - '(gnus-group-news-3-face ((t (:bold t :foreground "#777")))) - '(gnus-group-news-4-empty-face ((t (:foreground "#666")))) - '(gnus-group-news-4-face ((t (:bold t :foreground "#666")))) - '(gnus-group-news-5-empty-face ((t (:foreground "#666")))) - '(gnus-group-news-5-face ((t (:bold t :foreground "#666")))) - '(gnus-group-news-6-empty-face ((t (:foreground "#666")))) - '(gnus-group-news-6-face ((t (:bold t :foreground "#666")))) - '(gnus-group-news-low-empty-face ((t (:foreground "#666")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "#666")))) - '(gnus-header-content-face ((t (:foreground "#888")))) - '(gnus-header-from-face ((t (:bold t :foreground "#888")))) - '(gnus-header-name-face ((t (:bold t :foreground "#777")))) - '(gnus-header-newsgroups-face ((t (:bold t :foreground "#777")))) - '(gnus-header-subject-face ((t (:bold t :foreground "#999")))) - '(gnus-signature-face ((t (:foreground "#444")))) - '(gnus-splash-face ((t (:foreground "#ccc")))) - '(gnus-summary-cancelled-face ((t (:background "#555" :foreground "#000")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "#555")))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "#666")))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "#777")))) - '(gnus-summary-high-unread-face ((t (:bold t :foreground "#888")))) - '(gnus-summary-low-ancient-face ((t (:foreground "#444")))) - '(gnus-summary-low-read-face ((t (:foreground "#555")))) - '(gnus-summary-low-ticked-face ((t (:foreground "#666")))) - '(gnus-summary-low-unread-face ((t (:foreground "#777")))) - '(gnus-summary-normal-ancient-face ((t (:foreground "#555")))) - '(gnus-summary-normal-read-face ((t (:foreground "#666")))) - '(gnus-summary-normal-ticked-face ((t (:foreground "#777")))) - '(gnus-summary-normal-unread-face ((t (:foreground "#888")))) - '(gnus-summary-selected-face ((t (:background "#333")))) - '(message-cited-text-face ((t (:foreground "#aaa")))) - '(message-header-cc-face ((t (:foreground "#888")))) - '(message-header-name-face ((t (:bold t :foreground "#777")))) - '(message-header-newsgroups-face ((t (:bold t :foreground "#777")))) - '(message-header-other-face ((t (:foreground "#666")))) - '(message-header-subject-face ((t (:bold t :foreground "#999")))) - '(message-header-to-face ((t (:bold t :foreground "#777")))) - '(message-header-xheader-face ((t (:foreground "#666")))) - '(message-separator-face ((t (:foreground "#999")))) - - '(info-header-node ((t (:foreground "#666")))) - '(info-header-xref ((t (:foreground "#666")))) - '(info-menu-5 ((t (:underline t)))) - '(info-menu-header ((t (:bold t :foreground "#666")))) - '(info-node ((t (:bold t :foreground "#888")))) - '(info-xref ((t (:bold t :foreground "#777")))) - - '(font-lock-builtin-face ((t (:bold t :foreground "#777")))) - '(font-lock-comment-face ((t (:foreground "#555")))) - '(font-lock-constant-face ((t (:foreground "#777")))) - '(font-lock-doc-string-face ((t (:foreground "#777")))) - '(font-lock-doc-face ((t (:foreground "#777")))) - '(font-lock-function-name-face ((t (:bold t :foreground "#777")))) - '(font-lock-keyword-face ((t (:foreground "#777")))) - '(font-lock-preprocessor-face ((t (:foreground "#777")))) - '(font-lock-reference-face ((t (:foreground "#777")))) - '(font-lock-string-face ((t (:foreground "#777")))) - '(font-lock-type-face ((t (:bold t)))) - '(font-lock-variable-name-face ((t (:bold t :foreground "#888")))) - '(font-lock-warning-face ((t (:bold t :foreground "#999")))) - - '(bold ((t (:bold t)))) - '(button ((t (:bold t)))) - '(custom-button-face ((t (:bold t :foreground "#999")))) - '(fringe ((t (:background "#111" :foreground "#444")))) - '(header-line ((t (:background "#333" :foreground "#000")))) - '(highlight ((t (:background "dark slate blue" :foreground "light blue")))) - '(holiday-face ((t (:background "#000" :foreground "#777")))) - '(isearch ((t (:foreground "pink" :background "red")))) - '(isearch-lazy-highlight-face ((t (:foreground "red")))) - '(italic ((t (:bold t)))) - '(menu ((t (:background "#111" :foreground "#444")))) - '(minibuffer-prompt ((t (:foreground "555")))) - '(modeline ((t (:background "#111" :foreground "#444")))) - '(mode-line-inactive ((t (:background "#000" :foreground "#444")))) - '(modeline-buffer-id ((t (:background "#000" :foreground "#555")))) - '(modeline-mousable ((t (:background "#000" :foreground "#555")))) - '(modeline-mousable-minor-mode ((t (:background "#000" :foreground "#555")))) - '(region ((t (:background "dark cyan" :foreground "cyan")))) - '(secondary-selection ((t (:background "Aquamarine" :foreground "SlateBlue")))) - '(show-paren-match-face ((t (:foreground "white" :background "light slate blue")))) - '(show-paren-mismatch-face ((t (:foreground "white" :background "red")))) - '(tool-bar ((t (:background "#111" :foreground "#777")))) - '(tooltip ((t (:background "#333" :foreground "#777")))) - '(underline ((t (:bold t)))) - '(variable-pitch ((t (nil)))) - '(widget-button-face ((t (:bold t :foreground "#888")))) - '(widget-field-face ((t (:bold t :foreground "#999")))) ) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'late-night) - -;;; late-night-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/lawrence-theme.el b/elpa/color-theme-modern-0.0.3/lawrence-theme.el deleted file mode 100644 index 39ea45c..0000000 --- a/elpa/color-theme-modern-0.0.3/lawrence-theme.el +++ /dev/null @@ -1,278 +0,0 @@ -;;; lawrence-theme.el --- lawrence theme - -;; Copyright (C) 2003 by lawrence mitchell -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of lawrence theme from `color-themes' - -;;; Code: - -(deftheme lawrence - "lawrence theme") - -(custom-theme-set-faces - 'lawrence - - '(default ((t (:background "black" :foreground "#00CC00")))) - '(mouse ((t (:background "black")))) - '(cursor ((t (:background "green")))) - '(border ((t (:background "black")))) - - '(erc-button-face ((t (:bold t :foreground "#00CC00" :background "black")))) - '(erc-button-mouse-face ((t (:foreground "#00CC00" :background "darkgreen")))) - '(gnus-article-button-face ((t (:bold t :foreground "#00CC00" :background "black")))) - '(gnus-article-mouse-face ((t (:foreground "#00CC00" :background "darkgreen")))) - '(gnus-mouse-face ((t (:foreground "#00CC00" :background "darkgreen")))) - '(list-matching-lines-buffer-name-face ((t (:foreground "#00CC00" :background "black" :underline t)))) - '(list-matching-lines-face ((t (:bold t :foreground "#00CC00" :background "black")))) - '(paren-match-face ((t (:background "black" :foreground "darkgreen")))) - '(paren-mismatch-face ((t (:foreground "#00CC00" :background "black" :strike-through t)))) - '(paren-no-match-face ((t (:background "black" :foreground "red")))) - '(view-highlight-face ((t (:bold t :foreground "#00CC00" :background "black")))) - '(widget-mouse-face ((t (:bold t :foreground "#00CC00" :background "black")))) - - '(Buffer-menu-buffer-face ((t (:bold t :weight bold)))) - '(bg:erc-color-face0 ((t (:background "White")))) - '(bg:erc-color-face1 ((t (:background "black")))) - '(bg:erc-color-face10 ((t (:background "lightblue1")))) - '(bg:erc-color-face11 ((t (:background "cyan")))) - '(bg:erc-color-face12 ((t (:background "blue")))) - '(bg:erc-color-face13 ((t (:background "deeppink")))) - '(bg:erc-color-face14 ((t (:background "gray50")))) - '(bg:erc-color-face15 ((t (:background "gray90")))) - '(bg:erc-color-face2 ((t (:background "blue4")))) - '(bg:erc-color-face3 ((t (:background "green4")))) - '(bg:erc-color-face4 ((t (:background "red")))) - '(bg:erc-color-face5 ((t (:background "brown")))) - '(bg:erc-color-face6 ((t (:background "purple")))) - '(bg:erc-color-face7 ((t (:background "orange")))) - '(bg:erc-color-face8 ((t (:background "yellow")))) - '(bg:erc-color-face9 ((t (:background "green")))) - '(bold ((t (:bold t :foreground "#00CC00" :background "black")))) - '(bold-italic ((t (:italic t :bold t :slant oblique :weight semi-bold)))) - '(button ((t (:underline t)))) - '(comint-highlight-input ((t (nil)))) - '(comint-highlight-prompt ((t (:bold t :foreground "#00CC00" :background "black" :weight bold)))) - '(custom-button-face ((t (:bold t :foreground "#00CC00" :background "black")))) - '(custom-button-pressed-face ((t (nil)))) - '(custom-changed-face ((t (:italic t :foreground "#00CC00" :background "black" :slant oblique)))) - '(custom-comment-face ((t (nil)))) - '(custom-comment-tag-face ((t (nil)))) - '(custom-documentation-face ((t (nil)))) - '(custom-face-tag-face ((t (nil)))) - '(custom-group-tag-face ((t (nil)))) - '(custom-group-tag-face-1 ((t (nil)))) - '(custom-invalid-face ((t (:foreground "#00CC00" :background "black" :strike-through t)))) - '(custom-modified-face ((t (nil)))) - '(custom-rogue-face ((t (nil)))) - '(custom-saved-face ((t (nil)))) - '(custom-set-face ((t (nil)))) - '(custom-state-face ((t (nil)))) - '(custom-variable-button-face ((t (nil)))) - '(custom-variable-tag-face ((t (nil)))) - '(erc-action-face ((t (:bold t :weight semi-bold)))) - '(erc-bold-face ((t (:bold t :weight bold)))) - '(erc-current-nick-face ((t (:bold t :foreground "LightSeaGreen" :weight semi-bold)))) - '(erc-dangerous-host-face ((t (:foreground "red")))) - '(erc-default-face ((t (nil)))) - '(erc-direct-msg-face ((t (:foreground "IndianRed")))) - '(erc-error-face ((t (:bold t :weight semi-bold :background "darkblue" :foreground "#00CC00")))) - '(erc-fool-face ((t (:foreground "dim gray")))) - '(erc-input-face ((t (:foreground "springgreen")))) - '(erc-inverse-face ((t (:bold t :background "Darkgreen" :foreground "Black" :weight semi-bold)))) - '(erc-keyword-face ((t (:bold t :foreground "pale green" :weight bold)))) - '(erc-nick-default-face ((t (:bold t :weight semi-bold)))) - '(erc-nick-msg-face ((t (:bold t :foreground "springgreen" :weight semi-bold)))) - '(erc-notice-face ((t (:foreground "seagreen" :weight normal)))) - '(erc-pal-face ((t (:bold t :foreground "Magenta" :weight bold)))) - '(erc-prompt-face ((t (:bold t :background "lightBlue2" :foreground "Black" :weight semi-bold)))) - '(erc-timestamp-face ((t (:foreground "seagreen" :weight normal)))) - '(erc-underline-face ((t (:underline t)))) - '(fg:erc-color-face0 ((t (:foreground "White")))) - '(fg:erc-color-face1 ((t (:foreground "black")))) - '(fg:erc-color-face10 ((t (:foreground "lightblue1")))) - '(fg:erc-color-face11 ((t (:foreground "cyan")))) - '(fg:erc-color-face12 ((t (:foreground "blue")))) - '(fg:erc-color-face13 ((t (:foreground "deeppink")))) - '(fg:erc-color-face14 ((t (:foreground "gray50")))) - '(fg:erc-color-face15 ((t (:foreground "gray90")))) - '(fg:erc-color-face2 ((t (:foreground "blue4")))) - '(fg:erc-color-face3 ((t (:foreground "green4")))) - '(fg:erc-color-face4 ((t (:foreground "red")))) - '(fg:erc-color-face5 ((t (:foreground "brown")))) - '(fg:erc-color-face6 ((t (:foreground "purple")))) - '(fg:erc-color-face7 ((t (:foreground "orange")))) - '(fg:erc-color-face8 ((t (:foreground "yellow")))) - '(fg:erc-color-face9 ((t (:foreground "green")))) - '(fixed-pitch ((t (nil)))) - '(font-latex-string-face ((t (:bold t :weight semi-bold :foreground "seagreen" :background "black")))) - '(font-latex-warning-face ((t (:bold t :weight semi-bold :background "darkblue" :foreground "#00CC00")))) - '(font-lock-builtin-face ((t (:foreground "seagreen1")))) - '(font-lock-comment-face ((t (:background "black" :foreground "medium spring green")))) - '(font-lock-constant-face ((t (nil)))) - '(font-lock-doc-face ((t (:bold t :background "black" :foreground "seagreen" :weight semi-bold)))) - '(font-lock-function-name-face ((t (:bold t :foreground "#00CC00" :background "black")))) - '(font-lock-keyword-face ((t (:bold t :background "black" :foreground "green" :underline t :weight semi-bold)))) - '(font-lock-preprocessor-face ((t (:foreground "#00ccdd")))) - '(font-lock-string-face ((t (:bold t :background "black" :foreground "seagreen" :weight semi-bold)))) - '(font-lock-type-face ((t (nil)))) - '(font-lock-variable-name-face ((t (nil)))) - '(font-lock-warning-face ((t (:bold t :foreground "#00CC00" :background "darkblue" :weight semi-bold)))) - '(fringe ((t (:foreground "#00CC00" :background "#151515")))) - '(gnus-cite-attribution-face ((t (:italic t :foreground "#00CC00" :background "black" :slant italic)))) - '(gnus-cite-face-1 ((t (:background "black" :foreground "springgreen")))) - '(gnus-cite-face-10 ((t (nil)))) - '(gnus-cite-face-11 ((t (nil)))) - '(gnus-cite-face-2 ((t (:background "black" :foreground "lightseagreen")))) - '(gnus-cite-face-3 ((t (:background "black" :foreground "darkseagreen")))) - '(gnus-cite-face-4 ((t (:background "black" :foreground "forestgreen")))) - '(gnus-cite-face-5 ((t (:background "black" :foreground "springgreen")))) - '(gnus-cite-face-6 ((t (:background "black" :foreground "springgreen")))) - '(gnus-cite-face-7 ((t (:background "black" :foreground "springgreen")))) - '(gnus-cite-face-8 ((t (:background "black" :foreground "springgreen")))) - '(gnus-cite-face-9 ((t (:background "black" :foreground "springgreen")))) - '(gnus-emphasis-bold ((t (:bold t :weight semi-bold)))) - '(gnus-emphasis-bold-italic ((t (:italic t :bold t :slant italic :weight semi-bold)))) - '(gnus-emphasis-highlight-words ((t (:bold t :foreground "#00CC00" :background "black" :underline t :weight bold)))) - '(gnus-emphasis-italic ((t (:italic t :slant italic)))) - '(gnus-emphasis-strikethru ((t (nil)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(gnus-emphasis-underline-bold ((t (:bold t :underline t :weight semi-bold)))) - '(gnus-emphasis-underline-bold-italic ((t (:italic t :bold t :underline t :slant italic :weight semi-bold)))) - '(gnus-emphasis-underline-italic ((t (:italic t :underline t :slant italic)))) - '(gnus-group-mail-1-empty-face ((t (nil)))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "#00CC00" :background "black" :weight bold)))) - '(gnus-group-mail-2-empty-face ((t (nil)))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "#00CC00" :background "black" :weight bold)))) - '(gnus-group-mail-3-empty-face ((t (nil)))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "#00CC00" :background "black" :weight bold)))) - '(gnus-group-mail-low-empty-face ((t (nil)))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "#00CC00" :background "black" :weight bold)))) - '(gnus-group-news-1-empty-face ((t (nil)))) - '(gnus-group-news-1-face ((t (:bold t :foreground "#00CC00" :background "black" :weight bold)))) - '(gnus-group-news-2-empty-face ((t (nil)))) - '(gnus-group-news-2-face ((t (:bold t :foreground "#00CC00" :background "black" :weight bold)))) - '(gnus-group-news-3-empty-face ((t (nil)))) - '(gnus-group-news-3-face ((t (:bold t :foreground "#00CC00" :background "black" :weight bold)))) - '(gnus-group-news-4-empty-face ((t (nil)))) - '(gnus-group-news-4-face ((t (:bold t :foreground "#00CC00" :background "black" :weight bold)))) - '(gnus-group-news-5-empty-face ((t (nil)))) - '(gnus-group-news-5-face ((t (:bold t :foreground "#00CC00" :background "black" :weight bold)))) - '(gnus-group-news-6-empty-face ((t (nil)))) - '(gnus-group-news-6-face ((t (:bold t :foreground "#00CC00" :background "black" :weight bold)))) - '(gnus-group-news-low-empty-face ((t (nil)))) - '(gnus-group-news-low-face ((t (:bold t :foreground "#00CC00" :background "black" :weight bold)))) - '(gnus-header-content-face ((t (:background "black" :foreground "springgreen")))) - '(gnus-header-from-face ((t (nil)))) - '(gnus-header-name-face ((t (nil)))) - '(gnus-header-newsgroups-face ((t (nil)))) - '(gnus-header-subject-face ((t (nil)))) - '(gnus-server-agent-face ((t (:bold t :foreground "PaleTurquoise" :weight bold)))) - '(gnus-server-closed-face ((t (:italic t :foreground "Light Steel Blue" :slant italic)))) - '(gnus-server-denied-face ((t (:bold t :foreground "Pink" :weight semi-bold)))) - '(gnus-server-offline-face ((t (:bold t :foreground "Yellow" :weight bold)))) - '(gnus-server-opened-face ((t (:bold t :foreground "Green1" :weight semi-bold)))) - '(gnus-signature-face ((t (:background "black" :foreground "springgreen" :slant normal)))) - '(gnus-splash-face ((t (:bold t :foreground "#00CC00" :background "black" :weight bold)))) - '(gnus-summary-cancelled-face ((t (:foreground "#00CC00" :background "black" :strike-through t)))) - '(gnus-summary-high-ancient-face ((t (nil)))) - '(gnus-summary-high-read-face ((t (nil)))) - '(gnus-summary-high-ticked-face ((t (:background "black" :foreground "seagreen")))) - '(gnus-summary-high-undownloaded-face ((t (:bold t :foreground "LightGray" :weight bold)))) - '(gnus-summary-high-unread-face ((t (:bold t :foreground "#00CC00" :background "black" :weight bold)))) - '(gnus-summary-low-ancient-face ((t (nil)))) - '(gnus-summary-low-read-face ((t (nil)))) - '(gnus-summary-low-ticked-face ((t (nil)))) - '(gnus-summary-low-undownloaded-face ((t (:italic t :foreground "LightGray" :slant italic :weight normal)))) - '(gnus-summary-low-unread-face ((t (:bold t :foreground "#00CC00" :background "black" :weight bold)))) - '(gnus-summary-normal-ancient-face ((t (nil)))) - '(gnus-summary-normal-read-face ((t (nil)))) - '(gnus-summary-normal-ticked-face ((t (:bold t :foreground "#00CC00" :background "black")))) - '(gnus-summary-normal-undownloaded-face ((t (:foreground "LightGray" :weight normal)))) - '(gnus-summary-normal-unread-face ((t (nil)))) - '(gnus-summary-selected-face ((t (:background "#101010")))) - '(gnus-x-face ((t (:background "white" :foreground "black")))) - '(header-line ((t (nil)))) - '(highlight ((t (:foreground "#00CC00" :background "darkgreen")))) - '(ido-first-match-face ((t (:bold t :weight bold)))) - '(ido-indicator-face ((t (:background "red" :foreground "yellow" :width condensed)))) - '(ido-only-match-face ((t (:foreground "ForestGreen")))) - '(ido-subdir-face ((t (:foreground "red")))) - '(isearch ((t (:background "seagreen" :foreground "black")))) - '(isearch-lazy-highlight-face ((t (:background "darkseagreen" :foreground "black")))) - '(italic ((t (:italic t :foreground "#00CC00" :background "black" :slant oblique)))) - '(menu ((t (:bold t :background "black" :foreground "green" :weight semi-bold - :box (:line-width -1 :color "#606060"))))) - '(message-cited-text-face ((t (:italic t :foreground "#00CC00" :background "black" :slant oblique)))) - '(message-header-cc-face ((t (nil)))) - '(message-header-name-face ((t (nil)))) - '(message-header-newsgroups-face ((t (:bold t :foreground "#00CC00" :background "black")))) - '(message-header-other-face ((t (:bold t :foreground "#00CC00" :background "black")))) - '(message-header-subject-face ((t (:bold t :foreground "#00CC00" :background "black")))) - '(message-header-to-face ((t (:bold t :foreground "#00CC00" :background "black")))) - '(message-header-xheader-face ((t (nil)))) - '(message-mml-face ((t (:italic t :foreground "#00CC00" :background "black" :slant oblique)))) - '(message-separator-face ((t (nil)))) - '(minibuffer-prompt ((t (:background "black" :foreground "seagreen")))) - '(mode-line ((t (:bold t :background "#404040" :foreground "green" :weight semi-bold - :box (:line-width -1 :color "#606060"))))) - '(mode-line-inactive ((t (:bold t :weight semi-bold :foreground "green" - :box (:line-width -1 :color "#606060") :background "#101010")))) - '(paren-face ((t (:background "black" :foreground "darkgreen")))) - '(paren-face-match ((t (:background "black" :foreground "springgreen")))) - '(paren-face-mismatch ((t (:foreground "#00CC00" :background "black" :strike-through t)))) - '(paren-face-no-match ((t (:background "black" :foreground "red")))) - '(region ((t (:background "seagreen" :foreground "black")))) - '(scroll-bar ((t (nil)))) - '(secondary-selection ((t (:background "darkseagreen" :foreground "black")))) - '(semantic-dirty-token-face ((t (:background "gray10")))) - '(semantic-unmatched-syntax-face ((t (:underline "red")))) - '(sgml-end-tag-face ((t (:foreground "seagreen")))) - '(sgml-start-tag-face ((t (:foreground "seagreen")))) - '(tabbar-button-face ((t (:background "black" :foreground "#00cc00" - :box (:line-width 2 :color "black" :style released-button))))) - '(tabbar-default-face ((t (:background "black" :foreground "#00cc00")))) - '(tabbar-selected-face ((t (:background "black" :foreground "springgreen" - :box (:line-width 2 :color "black" :style released-button))))) - '(tabbar-separator-face ((t (:foreground "#00cc00" :background "black" - :box (:line-width 2 :color "black" :style pressed-button))))) - '(tabbar-unselected-face ((t (:background "black" :foreground "seagreen")))) - '(tool-bar ((t (:box (:line-width 1 :style released-button))))) - '(tooltip ((t (nil)))) - '(trailing-whitespace ((t (:background "lightseagreen" :foreground "black")))) - '(underline ((t (:foreground "#00CC00" :background "black" :underline t)))) - '(variable-pitch ((t (:underline nil :foreground "#00CC00" :background "black")))) - '(widget-button-face ((t (:bold t :foreground "#00CC00" :background "black")))) - '(widget-button-pressed-face ((t (nil)))) - '(widget-documentation-face ((t (nil)))) - '(widget-field-face ((t (:italic t :foreground "#00CC00" :background "black" :slant oblique)))) - '(widget-inactive-face ((t (nil)))) - '(widget-single-line-field-face ((t (nil))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'lawrence) - -;;; lawrence-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/ld-dark-theme.el b/elpa/color-theme-modern-0.0.3/ld-dark-theme.el deleted file mode 100644 index 672940c..0000000 --- a/elpa/color-theme-modern-0.0.3/ld-dark-theme.el +++ /dev/null @@ -1,353 +0,0 @@ -;;; ld-dark-theme.el --- ld dark theme - -;; Copyright (C) 2001 by Linh Dang -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of `ld-dark' theme from `color-themes' - -;;; Code: - -(deftheme ld-dark - "ld-dark theme") - -(custom-theme-set-faces - 'ld-dark - '(default ((t (:background "black" :foreground "white")))) - '(Info-title-1-face ((t (:bold t :weight bold :height 1.728)))) - '(Info-title-2-face ((t (:bold t :weight bold :height 1.44)))) - '(Info-title-3-face ((t (:bold t :weight bold :height 1.2)))) - '(Info-title-4-face ((t (:bold t :weight bold)))) - - '(bbdb-company ((t (:italic t :slant italic)))) - '(bbdb-field-name ((t (:bold t :weight bold)))) - '(bbdb-field-value ((t (nil)))) - '(bbdb-name ((t (:underline t)))) - '(bold ((t (:bold t :weight bold)))) - '(bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) - '(border ((t (:background "black")))) - '(buffer-menu-buffer ((t (:bold t :weight bold)))) - '(button ((t (:underline t :foreground "cyan1")))) - '(calendar-today-face ((t (:underline t)))) - - '(change-log-acknowledgement-face ((t (:italic t :foreground "AntiqueWhite3" :slant oblique)))) - '(change-log-conditionals-face ((t (:foreground "Aquamarine")))) - '(change-log-date-face ((t (:italic t :foreground "BurlyWood" :slant oblique)))) - '(change-log-email-face ((t (:foreground "Aquamarine")))) - '(change-log-file-face - ((t (:bold t :foreground "LightSkyBlue" :weight bold :height 0.9)))) - '(change-log-function-face ((t (:foreground "Aquamarine")))) - '(change-log-list-face ((t (:foreground "LightSkyBlue")))) - '(change-log-name-face ((t (:bold t :foreground "Gold" :weight bold)))) - - '(clear-case-mode-string-face - ((t (:bold t :background "grey" :foreground "black" - :box (:line-width 2 :color "grey" :style released-button) - :weight bold :height 0.9)))) - '(comint-highlight-input ((t (:bold t :weight bold)))) - '(comint-highlight-prompt ((t (:foreground "cyan")))) - '(completions-annotations ((t (:italic t :slant italic)))) - '(completions-common-part ((t (::foreground "white" :background "black")))) - '(completions-first-difference ((t (:bold t :weight bold)))) - - '(cperl-array-face - ((t (:bold t :background "lightyellow2" :foreground "Blue" :weight bold)))) - '(cperl-hash-face - ((t (:italic t :bold t :background "lightyellow2" :foreground "Red" :slant italic :weight bold)))) - '(cperl-nonoverridable-face ((t (:foreground "chartreuse3")))) - - '(cursor ((t (:background "yellow")))) - - '(custom-button-face - ((t (:background "lightgrey" :foreground "black" - :box (:line-width 2 :style released-button))))) - '(custom-button-pressed-face - ((t (:background "lightgrey" :foreground "black" - :box (:line-width 2 :style pressed-button))))) - '(custom-changed-face ((t (:background "blue" :foreground "white")))) - '(custom-comment-face ((t (:background "dim gray")))) - '(custom-comment-tag-face ((t (:foreground "gray80")))) - '(custom-documentation-face ((t (nil)))) - '(custom-face-tag-face ((t (:bold t :weight bold :height 1.1)))) - '(custom-group-tag-face - ((t (:bold t :foreground "light blue" :weight bold :height 1.1)))) - '(custom-group-tag-face-1 - ((t (:bold t :foreground "pink" :weight bold :height 1.1)))) - '(custom-invalid-face ((t (:background "red" :foreground "yellow")))) - '(custom-modified-face ((t (:background "blue" :foreground "white")))) - '(custom-rogue-face ((t (:background "black" :foreground "pink")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:background "white" :foreground "blue")))) - '(custom-state-face ((t (:foreground "lime green")))) - '(custom-variable-button-face ((t (:bold t :underline t :weight bold)))) - '(custom-variable-tag-face - ((t (:bold t :foreground "light blue" :weight bold :height 1.2)))) - '(diary-face ((t (:foreground "red")))) - '(diff-added-face ((t (nil)))) - '(diff-changed-face ((t (nil)))) - '(diff-context-face ((t (:foreground "grey70")))) - '(diff-file-header-face ((t (:bold t :background "grey60" :weight bold)))) - '(diff-function-face ((t (:foreground "grey70")))) - '(diff-header-face ((t (:background "grey45")))) - '(diff-hunk-header-face ((t (:background "grey45")))) - '(diff-index-face ((t (:bold t :background "grey60" :weight bold)))) - '(diff-nonexistent-face ((t (:bold t :background "grey60" :weight bold)))) - '(diff-removed-face ((t (nil)))) - '(dired-directory ((t (:bold t :weight bold :foreground "LightSkyBlue" :height 0.9)))) - '(dired-flagged ((t (:bold t :weight bold :foreground "Pink")))) - '(dired-header ((t (:bold t :weight bold :foreground "PaleGreen" :height 0.9)))) - '(dired-ignored ((t (:foreground "grey70")))) - '(dired-mark ((t (:bold t :weight bold :foreground "Gold")))) - '(dired-marked ((t (:bold t :weight bold :foreground "DarkOrange")))) - '(dired-perm-write ((t (:italic t :foreground "AntiqueWhite3" :slant oblique)))) - '(dired-symlink ((t (:foreground "LightSkyBlue")))) - '(dired-warning ((t (:bold t :weight bold :foreground "chocolate")))) - '(error ((t (:bold t :foreground "Pink" :weight bold)))) - '(escape-glyph ((t (:foreground "cyan")))) - '(excerpt ((t (:italic t :slant italic)))) - '(file-name-shadow ((t (:foreground "grey70")))) - '(fixed ((t (:bold t :weight bold)))) - - '(flyspell-duplicate-face ((t (:bold t :foreground "Gold3" :underline t :weight bold)))) - '(flyspell-incorrect-face ((t (:bold t :foreground "OrangeRed" :underline t :weight bold)))) - - '(font-lock-builtin-face ((t (:foreground "SteelBlue")))) - '(font-lock-comment-delimiter-face ((t (:italic t :slant oblique :foreground "AntiqueWhite3")))) - '(font-lock-comment-face ((t (:italic t :foreground "AntiqueWhite3" :slant oblique)))) - '(font-lock-constant-face ((t (:bold t :foreground "Gold" :weight bold)))) - '(font-lock-doc-face ((t (:italic t :foreground "BurlyWood" :slant oblique)))) - '(font-lock-doc-string-face ((t (:italic t :foreground "BurlyWood" :slant oblique)))) - '(font-lock-function-name-face ((t (:bold t :foreground "LightSkyBlue" :weight bold :height 0.9)))) - '(font-lock-keyword-face ((t (:foreground "LightSkyBlue")))) - '(font-lock-negation-char-face ((t (nil)))) - '(font-lock-preprocessor-face ((t (:bold t :foreground "Gold" :weight bold)))) - '(font-lock-reference-face ((t (:foreground "SteelBlue")))) - '(font-lock-regexp-grouping-backslash ((t (:bold t :weight bold)))) - '(font-lock-regexp-grouping-construct ((t (:bold t :weight bold)))) - '(font-lock-string-face ((t (:italic t :foreground "BurlyWood" :slant oblique)))) - '(font-lock-type-face ((t (:bold t :foreground "PaleGreen" :weight bold :height 0.9)))) - '(font-lock-variable-name-face ((t (:bold t :foreground "Aquamarine" :weight bold)))) - '(font-lock-warning-face ((t (:bold t :foreground "chocolate" :weight bold)))) - '(fringe - ((t (:background "grey4" :foreground "Wheat" - :slant normal :weight normal :width normal - :foundry "outline")))) - '(glyphless-char ((t (:height 0.6)))) - - '(gnus-cite-attribution-face ((t (:italic t :slant italic)))) - '(gnus-cite-face-1 ((t (:foreground "light blue")))) - '(gnus-cite-face-10 ((t (:foreground "medium purple")))) - '(gnus-cite-face-11 ((t (:foreground "turquoise")))) - '(gnus-cite-face-2 ((t (:foreground "light cyan")))) - '(gnus-cite-face-3 ((t (:foreground "light yellow")))) - '(gnus-cite-face-4 ((t (:foreground "light pink")))) - '(gnus-cite-face-5 ((t (:foreground "pale green")))) - '(gnus-cite-face-6 ((t (:foreground "beige")))) - '(gnus-cite-face-7 ((t (:foreground "orange")))) - '(gnus-cite-face-8 ((t (:foreground "magenta")))) - '(gnus-cite-face-9 ((t (:foreground "violet")))) - '(gnus-cite-face-list ((t (:bold t :foreground "red" :weight bold)))) - '(gnus-emphasis-bold ((t (:bold t :weight bold)))) - '(gnus-emphasis-bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) - '(gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) - '(gnus-emphasis-italic ((t (:italic t :slant italic)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(gnus-emphasis-underline-bold ((t (:bold t :underline t :weight bold)))) - '(gnus-emphasis-underline-bold-italic ((t (:italic t :bold t :underline t :slant italic :weight bold)))) - '(gnus-emphasis-underline-italic ((t (:italic t :underline t :slant italic)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "aquamarine1")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "aquamarine1" :weight bold)))) - '(gnus-group-mail-2-empty-face ((t (:foreground "aquamarine2")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "aquamarine2" :weight bold)))) - '(gnus-group-mail-3-empty-face ((t (:foreground "aquamarine3")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "aquamarine3" :weight bold)))) - '(gnus-group-mail-low-empty-face ((t (:foreground "aquamarine4")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "aquamarine4" :weight bold)))) - '(gnus-group-news-1-empty-face ((t (:foreground "PaleTurquoise")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "PaleTurquoise" :weight bold)))) - '(gnus-group-news-2-empty-face ((t (:foreground "turquoise")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "turquoise" :weight bold)))) - '(gnus-group-news-3-empty-face ((t (nil)))) - '(gnus-group-news-3-face ((t (:bold t :weight bold)))) - '(gnus-group-news-4-empty-face ((t (nil)))) - '(gnus-group-news-4-face ((t (:bold t :weight bold)))) - '(gnus-group-news-5-empty-face ((t (nil)))) - '(gnus-group-news-5-face ((t (:bold t :weight bold)))) - '(gnus-group-news-6-empty-face ((t (nil)))) - '(gnus-group-news-6-face ((t (:bold t :weight bold)))) - '(gnus-group-news-low-empty-face ((t (:foreground "DarkTurquoise")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "DarkTurquoise" :weight bold)))) - '(gnus-header-content-face ((t (:italic t :foreground "forest green" :slant italic)))) - '(gnus-header-from-face ((t (:foreground "spring green")))) - '(gnus-header-name-face ((t (:foreground "SeaGreen")))) - '(gnus-header-newsgroups-face ((t (:italic t :foreground "yellow" :slant italic)))) - '(gnus-header-subject-face ((t (:foreground "SeaGreen3")))) - '(gnus-signature-face ((t (:italic t :foreground "white" :slant italic)))) - '(gnus-splash-face ((t (:foreground "Brown")))) - '(gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "SkyBlue" :weight bold)))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "PaleGreen" :weight bold)))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "pink" :weight bold)))) - '(gnus-summary-high-unread-face ((t (:bold t :weight bold)))) - '(gnus-summary-low-ancient-face ((t (:italic t :foreground "SkyBlue" :slant italic)))) - '(gnus-summary-low-read-face ((t (:italic t :foreground "PaleGreen" :slant italic)))) - '(gnus-summary-low-ticked-face ((t (:italic t :foreground "pink" :slant italic)))) - '(gnus-summary-low-unread-face ((t (:italic t :slant italic)))) - '(gnus-summary-normal-ancient-face ((t (:foreground "SkyBlue")))) - '(gnus-summary-normal-read-face ((t (:foreground "PaleGreen")))) - '(gnus-summary-normal-ticked-face ((t (:foreground "pink")))) - '(gnus-summary-normal-unread-face ((t (nil)))) - '(gnus-summary-selected-face ((t (:underline t)))) - - '(header-line - ((t (:background "grey20" :foreground "grey75" - :box (:line-width 3 :color "grey20" :style released-button) - :height 0.81)))) - '(help-argument-name ((t (nil)))) - '(highlight ((t (:background "darkolivegreen" :foreground "black")))) - '(highlight-changes-delete-face ((t (:foreground "red" :underline t)))) - '(highlight-changes-face ((t (:foreground "red")))) - '(holiday-face ((t (:background "pink")))) - '(info-header-node ((t (:italic t :bold t :foreground "white" :slant italic :weight bold)))) - '(info-header-xref ((t (:bold t :foreground "cyan" :weight bold)))) - '(info-menu-5 ((t (:foreground "red1")))) - '(info-menu-header ((t (:bold t :weight bold)))) - '(info-node ((t (:italic t :bold t :foreground "white" :slant italic :weight bold)))) - '(info-xref ((t (:bold t :foreground "cyan" :weight bold)))) - '(isearch ((t (:background "palevioletred2" :foreground "brown4")))) - '(isearch-fail ((t (:background "red4")))) - '(italic ((t (:italic t :slant italic)))) - '(lazy-highlight ((t (:background "paleturquoise4")))) - '(link ((t (:foreground "cyan1" :underline t)))) - '(link-visited ((t (:underline t :foreground "violet")))) - '(makefile-space-face ((t (:background "hotpink")))) - '(match ((t (:background "RoyalBlue3")))) - '(menu ((t (nil)))) - - '(message-cited-text-face ((t (:foreground "red")))) - '(message-header-cc-face ((t (:bold t :foreground "green4" :weight bold)))) - '(message-header-name-face ((t (:foreground "DarkGreen")))) - '(message-header-newsgroups-face - ((t (:italic t :bold t :foreground "yellow" :slant italic :weight bold)))) - '(message-header-other-face ((t (:foreground "#b00000")))) - '(message-header-subject-face ((t (:bold t :foreground "green3" :weight bold)))) - '(message-header-to-face ((t (:bold t :foreground "green2" :weight bold)))) - '(message-header-xheader-face ((t (:foreground "blue")))) - '(message-mml-face ((t (:foreground "ForestGreen")))) - '(message-separator-face ((t (:foreground "blue3")))) - - '(minibuffer-prompt ((t (:foreground "cyan")))) - '(mode-line ((t (:background "grey" :foreground "black" - :box (:line-width 2 :color "grey" :style released-button) - :height 0.9)))) - '(mode-line-buffer-id - ((t (:background "grey" :foreground "black" - :box (:line-width 2 :color "grey" :style released-button) - :height 0.9)))) - '(mode-line-emphasis ((t (:bold t :weight bold)))) - '(mode-line-highlight - ((t (:box (:line-width 2 :color "grey40" :style released-button))))) - '(mode-line-inactive - ((t (:background "grey30" :foreground "grey80" - :box (:line-width -1 :color "grey40" :style nil) - :weight light :height 0.9)))) - '(modeline-mousable - ((t (:background "grey" :foreground "black" - :box (:line-width 2 :color "grey" :style released-button) - :height 0.9)))) - '(modeline-mousable-minor-mode - ((t (:background "grey" :foreground "black" - :box (:line-width 2 :color "grey" :style released-button) - :height 0.9)))) - - '(mouse ((t (:background "white")))) - '(next-error ((t (:foreground "white" :background "DarkSlateGray")))) - '(nobreak-space ((t (:foreground "cyan" :underline t)))) - '(primary-selection ((t (:background "DarkSlateGray")))) - '(query-replace ((t (:foreground "brown4" :background "palevioletred2")))) - '(region ((t (:background "DarkSlateGray" :foreground "white")))) - '(scroll-bar ((t (nil)))) - '(secondary-selection ((t (:background "SkyBlue4")))) - - '(sgml-doctype-face ((t (:foreground "orange")))) - '(sgml-end-tag-face ((t (:foreground "greenyellow")))) - '(sgml-entity-face ((t (:foreground "gold")))) - '(sgml-ignored-face ((t (:background "gray60" :foreground "gray20")))) - '(sgml-sgml-face ((t (:foreground "yellow")))) - '(sgml-start-tag-face ((t (:foreground "mediumspringgreen")))) - - '(shadow ((t (:foreground "grey70")))) - '(show-paren-match-face ((t (:background "purple" :foreground "white")))) - '(show-paren-mismatch-face ((t (:background "red" :foreground "white")))) - '(success ((t (:bold t :foreground "Green1" :weight bold)))) - - '(term-black ((t (:foreground "black")))) - '(term-blackbg ((t (:background "black")))) - '(term-blue ((t (:foreground "#4186be")))) - '(term-bluebg ((t (:background "#4186be")))) - '(term-bold ((t (:bold t :weight bold)))) - '(term-cyan ((t (:foreground "#71bebe")))) - '(term-cyanbg ((t (:background "#71bebe")))) - '(term-default-bg ((t (nil)))) - '(term-default-bg-inv ((t (nil)))) - '(term-default-fg ((t (nil)))) - '(term-default-fg-inv ((t (nil)))) - '(term-green ((t (:foreground "#e5f779")))) - '(term-greenbg ((t (:background "#e5f779")))) - '(term-invisible ((t (nil)))) - '(term-invisible-inv ((t (nil)))) - '(term-magenta ((t (:foreground "#ef9ebe")))) - '(term-magentabg ((t (:background "#ef9ebe")))) - '(term-red ((t (:foreground "#ef8171")))) - '(term-redbg ((t (:background "#ef8171")))) - '(term-underline ((t (:underline t)))) - '(term-white ((t (:foreground "#c0c0c0")))) - '(term-whitebg ((t (:background "#c0c0c0")))) - '(term-yellow ((t (:foreground "#fff796")))) - '(term-yellowbg ((t (:background "#fff796")))) - - '(tool-bar - ((t (:background "grey75" :foreground "black" - :box (:line-width 1 :style released-button))))) - '(tooltip ((t (:background "lightyellow" :foreground "black")))) - '(trailing-whitespace ((t (:background "white")))) - '(underline ((t (:underline t)))) - - '(vertical-border ((t (nil)))) - '(warning ((t (:bold t :foreground "DarkOrange" :weight bold)))) - - '(widget-button ((t (:bold t :weight bold)))) - '(widget-button-pressed ((t (:background "black" :foreground "red")))) - '(widget-documentation ((t (:background "white" :foreground "lime green")))) - '(widget-field ((t (:background "dim gray" :foreground "black")))) - '(widget-inactive ((t (:background "red" :foreground "light gray")))) - '(widget-single-line-field ((t (:background "dim gray" :foreground "black")))) - - '(zmacs-region ((t (:background "DarkSlateGray" :foreground "white"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'ld-dark) - -;;; ld-dark-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/lethe-theme.el b/elpa/color-theme-modern-0.0.3/lethe-theme.el deleted file mode 100644 index 23a3f9d..0000000 --- a/elpa/color-theme-modern-0.0.3/lethe-theme.el +++ /dev/null @@ -1,440 +0,0 @@ -;;; lethe-theme.el --- lethe theme - -;; Copyright (C) 2002 by Ivica Loncar -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of lethe theme from `color-themes' - -;;; Code: - -(deftheme lethe - "lethe theme") - -(custom-theme-set-faces - 'lethe - - '(default ((t (:background "black" :foreground "peachpuff")))) - '(mouse ((t (:background "red")))) - '(cursor ((t (:background "red")))) - '(border ((t (:background "black")))) - - '(bg:erc-color-face0 ((t (:background "White")))) - '(bg:erc-color-face1 ((t (nil)))) - '(bg:erc-color-face10 ((t (:background "lightblue1")))) - '(bg:erc-color-face11 ((t (:background "cyan")))) - '(bg:erc-color-face12 ((t (:background "blue")))) - '(bg:erc-color-face13 ((t (:background "deeppink")))) - '(bg:erc-color-face14 ((t (:background "gray50")))) - '(bg:erc-color-face15 ((t (:background "gray90")))) - '(bg:erc-color-face2 ((t (:background "blue4")))) - '(bg:erc-color-face3 ((t (:background "green4")))) - '(bg:erc-color-face4 ((t (:background "red")))) - '(bg:erc-color-face5 ((t (:background "brown")))) - '(bg:erc-color-face6 ((t (:background "purple")))) - '(bg:erc-color-face7 ((t (:background "orange")))) - '(bg:erc-color-face8 ((t (:background "yellow")))) - '(bg:erc-color-face9 ((t (:background "green")))) - '(blue ((t (:foreground "blue")))) - '(bold ((t (:bold t)))) - '(bold-italic ((t (:italic t :bold t)))) - '(border-glyph ((t (nil)))) - '(buffers-tab ((t (:bold t :foreground "red")))) - '(button ((t (:underline t)))) - '(calendar-today-face ((t (:underline t)))) - '(comint-highlight-input ((t (:bold t)))) - '(comint-highlight-prompt ((t (:foreground "cyan")))) - '(cperl-array-face ((t (:bold t :background "lightyellow2" :foreground "Blue")))) - '(cperl-hash-face ((t (:italic t :bold t :background "lightyellow2" :foreground "Red")))) - '(cperl-nonoverridable-face ((t (:foreground "chartreuse3")))) - '(cscope-file-face ((t (:foreground "blue")))) - '(cscope-function-face ((t (:foreground "magenta")))) - '(cscope-line-face ((t (:foreground "green")))) - '(cscope-line-number-face ((t (:foreground "red")))) - '(cscope-mouse-face ((t (:background "blue" :foreground "white")))) - '(custom-button-face ((t (nil)))) - '(custom-button-pressed-face ((t (:background "lightgrey" :foreground "black")))) - '(custom-changed-face ((t (:background "blue" :foreground "white")))) - '(custom-comment-face ((t (:background "dim gray")))) - '(custom-comment-tag-face ((t (:foreground "gray80")))) - '(custom-documentation-face ((t (nil)))) - '(custom-face-tag-face ((t (:underline t)))) - '(custom-group-tag-face ((t (:underline t :foreground "blue")))) - '(custom-group-tag-face-1 ((t (:underline t :foreground "red")))) - '(custom-invalid-face ((t (:background "red" :foreground "yellow")))) - '(custom-modified-face ((t (:background "blue" :foreground "white")))) - '(custom-rogue-face ((t (:foreground "pink")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:background "white" :foreground "blue")))) - '(custom-state-face ((t (:foreground "dark green")))) - '(custom-variable-button-face ((t (:underline t :bold t)))) - '(custom-variable-tag-face ((t (:underline t :foreground "blue")))) - '(cyan ((t (:foreground "cyan")))) - '(diary-face ((t (:foreground "red")))) - '(dired-face-boring ((t (:foreground "Gray65")))) - '(dired-face-directory ((t (:bold t)))) - '(dired-face-executable ((t (:foreground "SeaGreen")))) - '(dired-face-flagged ((t (:background "LightSlateGray")))) - '(dired-face-marked ((t (:background "PaleVioletRed")))) - '(dired-face-permissions ((t (:background "grey75" :foreground "black")))) - '(dired-face-setuid ((t (:foreground "Red")))) - '(dired-face-socket ((t (:foreground "magenta")))) - '(dired-face-symlink ((t (:foreground "cyan")))) - '(display-time-mail-balloon-enhance-face ((t (:background "orange")))) - '(display-time-mail-balloon-gnus-group-face ((t (:foreground "blue")))) - '(display-time-time-balloon-face ((t (:foreground "red")))) - '(ediff-current-diff-face-A ((t (:background "pale green" :foreground "firebrick")))) - '(ediff-current-diff-face-Ancestor ((t (:background "VioletRed" :foreground "Black")))) - '(ediff-current-diff-face-B ((t (:background "Yellow" :foreground "DarkOrchid")))) - '(ediff-current-diff-face-C ((t (:background "Pink" :foreground "Navy")))) - '(ediff-even-diff-face-A ((t (:background "light grey" :foreground "Black")))) - '(ediff-even-diff-face-Ancestor ((t (:background "Grey" :foreground "White")))) - '(ediff-even-diff-face-B ((t (:background "Grey" :foreground "White")))) - '(ediff-even-diff-face-C ((t (:background "light grey" :foreground "Black")))) - '(ediff-fine-diff-face-A ((t (:background "sky blue" :foreground "Navy")))) - '(ediff-fine-diff-face-Ancestor ((t (:background "Green" :foreground "Black")))) - '(ediff-fine-diff-face-B ((t (:background "cyan" :foreground "Black")))) - '(ediff-fine-diff-face-C ((t (:background "Turquoise" :foreground "Black")))) - '(ediff-odd-diff-face-A ((t (:background "Grey" :foreground "White")))) - '(ediff-odd-diff-face-Ancestor ((t (:background "light grey" :foreground "Black")))) - '(ediff-odd-diff-face-B ((t (:background "light grey" :foreground "Black")))) - '(ediff-odd-diff-face-C ((t (:background "Grey" :foreground "White")))) - '(erc-action-face ((t (:bold t)))) - '(erc-bold-face ((t (:bold t)))) - '(erc-default-face ((t (nil)))) - '(erc-direct-msg-face ((t (:foreground "IndianRed")))) - '(erc-error-face ((t (:background "Red" :foreground "White")))) - '(erc-input-face ((t (:foreground "brown")))) - '(erc-inverse-face ((t (:background "Black" :foreground "White")))) - '(erc-notice-face ((t (:bold t :foreground "SlateBlue")))) - '(erc-prompt-face ((t (:bold t :background "lightBlue2" :foreground "Black")))) - '(erc-timestamp-face ((t (:bold t :foreground "green")))) - '(erc-underline-face ((t (:underline t)))) - '(eshell-ls-archive-face ((t (:bold t :foreground "Orchid")))) - '(eshell-ls-backup-face ((t (:foreground "OrangeRed")))) - '(eshell-ls-clutter-face ((t (:bold t :foreground "OrangeRed")))) - '(eshell-ls-directory-face ((t (:bold t :foreground "Blue")))) - '(eshell-ls-executable-face ((t (:bold t :foreground "ForestGreen")))) - '(eshell-ls-missing-face ((t (:bold t :foreground "Red")))) - '(eshell-ls-product-face ((t (:foreground "OrangeRed")))) - '(eshell-ls-readonly-face ((t (:foreground "Brown")))) - '(eshell-ls-special-face ((t (:bold t :foreground "Magenta")))) - '(eshell-ls-symlink-face ((t (:bold t :foreground "DarkCyan")))) - '(eshell-ls-unreadable-face ((t (:foreground "Grey30")))) - '(eshell-prompt-face ((t (:bold t :foreground "Red")))) - '(eshell-test-failed-face ((t (:bold t :foreground "OrangeRed")))) - '(eshell-test-ok-face ((t (:bold t :foreground "Green")))) - '(excerpt ((t (:italic t)))) - '(fg:erc-color-face0 ((t (:foreground "White")))) - '(fg:erc-color-face1 ((t (:foreground "black")))) - '(fg:erc-color-face10 ((t (:foreground "lightblue1")))) - '(fg:erc-color-face11 ((t (:foreground "cyan")))) - '(fg:erc-color-face12 ((t (:foreground "blue")))) - '(fg:erc-color-face13 ((t (:foreground "deeppink")))) - '(fg:erc-color-face14 ((t (:foreground "gray50")))) - '(fg:erc-color-face15 ((t (:foreground "gray90")))) - '(fg:erc-color-face2 ((t (:foreground "blue4")))) - '(fg:erc-color-face3 ((t (:foreground "green4")))) - '(fg:erc-color-face4 ((t (:foreground "red")))) - '(fg:erc-color-face5 ((t (:foreground "brown")))) - '(fg:erc-color-face6 ((t (:foreground "purple")))) - '(fg:erc-color-face7 ((t (:foreground "orange")))) - '(fg:erc-color-face8 ((t (:foreground "yellow")))) - '(fg:erc-color-face9 ((t (:foreground "green")))) - '(fixed ((t (:bold t)))) - '(fixed-pitch ((t (:size "16")))) - '(flyspell-duplicate-face ((t (:underline t :bold t :foreground "Gold3")))) - '(flyspell-incorrect-face ((t (:underline t :bold t :foreground "OrangeRed")))) - '(font-lock-builtin-face ((t (:foreground "Orchid")))) - '(font-lock-comment-face ((t (:bold t :foreground "cyan")))) - '(font-lock-constant-face ((t (:foreground "CadetBlue")))) - '(font-lock-doc-face ((t (:bold t :foreground "red")))) - '(font-lock-doc-string-face ((t (:bold t :foreground "red")))) - '(font-lock-function-name-face ((t (:bold t :foreground "white")))) - '(font-lock-keyword-face ((t (:bold t :foreground "yellow")))) - '(font-lock-preprocessor-face ((t (:bold t :foreground "blue")))) - '(font-lock-reference-face ((t (:foreground "red3")))) - '(font-lock-string-face ((t (:bold t :foreground "magenta")))) - '(font-lock-type-face ((t (:bold t :foreground "lightgreen")))) - '(font-lock-variable-name-face ((t (:bold t :foreground "white")))) - '(font-lock-warning-face ((t (:bold t :foreground "Red")))) - '(fringe ((t (:background "grey95")))) - '(gdb-arrow-face ((t (:bold t :background "yellow" :foreground "red")))) - '(gnus-cite-attribution-face ((t (:italic t)))) - '(gnus-cite-face-1 ((t (:foreground "MidnightBlue")))) - '(gnus-cite-face-10 ((t (:foreground "medium purple")))) - '(gnus-cite-face-11 ((t (:foreground "turquoise")))) - '(gnus-cite-face-2 ((t (:foreground "firebrick")))) - '(gnus-cite-face-3 ((t (:foreground "dark green")))) - '(gnus-cite-face-4 ((t (:foreground "OrangeRed")))) - '(gnus-cite-face-5 ((t (:foreground "dark khaki")))) - '(gnus-cite-face-6 ((t (:foreground "dark violet")))) - '(gnus-cite-face-7 ((t (:foreground "SteelBlue4")))) - '(gnus-cite-face-8 ((t (:foreground "magenta")))) - '(gnus-cite-face-9 ((t (:foreground "violet")))) - '(gnus-emphasis-bold ((t (:bold t)))) - '(gnus-emphasis-bold-italic ((t (:italic t :bold t)))) - '(gnus-emphasis-highlight-words ((t (:foreground "yellow")))) - '(gnus-emphasis-italic ((t (:italic t)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(gnus-emphasis-underline-bold ((t (:underline t :bold t)))) - '(gnus-emphasis-underline-bold-italic ((t (:underline t :italic t :bold t)))) - '(gnus-emphasis-underline-italic ((t (:underline t :italic t)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "DeepPink3")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "DeepPink3")))) - '(gnus-group-mail-2-empty-face ((t (:foreground "HotPink3")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "HotPink3")))) - '(gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "magenta4")))) - '(gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "DeepPink4")))) - '(gnus-group-news-1-empty-face ((t (:foreground "ForestGreen")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "ForestGreen")))) - '(gnus-group-news-2-empty-face ((t (:foreground "CadetBlue4")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "CadetBlue4")))) - '(gnus-group-news-3-empty-face ((t (nil)))) - '(gnus-group-news-3-face ((t (:bold t)))) - '(gnus-group-news-4-empty-face ((t (nil)))) - '(gnus-group-news-4-face ((t (:bold t)))) - '(gnus-group-news-5-empty-face ((t (nil)))) - '(gnus-group-news-5-face ((t (:bold t)))) - '(gnus-group-news-6-empty-face ((t (nil)))) - '(gnus-group-news-6-face ((t (:bold t)))) - '(gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "DarkGreen")))) - '(gnus-header-content-face ((t (:italic t :foreground "indianred4")))) - '(gnus-header-from-face ((t (:foreground "red3")))) - '(gnus-header-name-face ((t (:foreground "maroon")))) - '(gnus-header-newsgroups-face ((t (:italic t :foreground "MidnightBlue")))) - '(gnus-header-subject-face ((t (:foreground "red4")))) - '(gnus-picons-face ((t (:background "white" :foreground "black")))) - '(gnus-picons-xbm-face ((t (:background "white" :foreground "black")))) - '(gnus-signature-face ((t (:italic t)))) - '(gnus-splash-face ((t (:foreground "ForestGreen")))) - '(gnus-summary-cancelled-face ((t (:foreground "yellow")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "RoyalBlue")))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "DarkGreen")))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "firebrick")))) - '(gnus-summary-high-unread-face ((t (:bold t)))) - '(gnus-summary-low-ancient-face ((t (:italic t :foreground "RoyalBlue")))) - '(gnus-summary-low-read-face ((t (:italic t :foreground "DarkGreen")))) - '(gnus-summary-low-ticked-face ((t (:italic t :foreground "firebrick")))) - '(gnus-summary-low-unread-face ((t (:italic t)))) - '(gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) - '(gnus-summary-normal-read-face ((t (:foreground "DarkGreen")))) - '(gnus-summary-normal-ticked-face ((t (:foreground "firebrick")))) - '(gnus-summary-normal-unread-face ((t (nil)))) - '(gnus-summary-selected-face ((t (:underline t)))) - '(gnus-x-face ((t (:background "white" :foreground "black")))) - '(green ((t (:foreground "green")))) - '(gui-button-face ((t (:background "grey75" :foreground "black")))) - '(gui-element ((t (:size "12" :background "Gray80" :foreground "black")))) - '(header-line ((t (:background "grey20" :foreground "grey90")))) - '(highlight ((t (:bold t :background "yellow" :foreground "red")))) - '(highlight-changes-delete-face ((t (:underline t :foreground "red")))) - '(highlight-changes-face ((t (:foreground "red")))) - '(highline-face ((t (:background "paleturquoise")))) - '(holiday-face ((t (:background "pink")))) - '(hyper-apropos-documentation ((t (:foreground "#aaaaaa")))) - '(hyper-apropos-heading ((t (:bold t :foreground "#999999")))) - '(hyper-apropos-hyperlink ((t (:foreground "Violet")))) - '(hyper-apropos-major-heading ((t (:bold t :foreground "#ff0000")))) - '(hyper-apropos-section-heading ((t (:italic t :bold t :foreground "#33aa55")))) - '(hyper-apropos-warning ((t (:bold t :foreground "red")))) - '(info-menu-5 ((t (:underline t)))) - '(info-node ((t (:italic t :bold t)))) - '(info-xref ((t (:bold t)))) - '(isearch ((t (:background "paleturquoise")))) - '(isearch-lazy-highlight-face ((t (:background "paleturquoise4")))) - '(isearch-secondary ((t (:foreground "red3")))) - '(italic ((t (:italic t)))) - '(jde-bug-breakpoint-cursor ((t (:background "brown" :foreground "cyan")))) - '(jde-db-active-breakpoint-face ((t (:background "red" :foreground "black")))) - '(jde-db-requested-breakpoint-face ((t (:background "yellow" :foreground "black")))) - '(jde-db-spec-breakpoint-face ((t (:background "green" :foreground "black")))) - '(jde-java-font-lock-api-face ((t (:foreground "light goldenrod")))) - '(jde-java-font-lock-bold-face ((t (:bold t)))) - '(jde-java-font-lock-code-face ((t (nil)))) - '(jde-java-font-lock-constant-face ((t (:foreground "Aquamarine")))) - '(jde-java-font-lock-doc-tag-face ((t (:foreground "light coral")))) - '(jde-java-font-lock-italic-face ((t (:italic t)))) - '(jde-java-font-lock-link-face ((t (:underline t :foreground "cadetblue")))) - '(jde-java-font-lock-modifier-face ((t (:foreground "LightSteelBlue")))) - '(jde-java-font-lock-number-face ((t (:foreground "LightSalmon")))) - '(jde-java-font-lock-operator-face ((t (:foreground "medium blue")))) - '(jde-java-font-lock-package-face ((t (:foreground "steelblue1")))) - '(jde-java-font-lock-pre-face ((t (nil)))) - '(jde-java-font-lock-underline-face ((t (:underline t)))) - '(left-margin ((t (nil)))) - '(list-mode-item-selected ((t (:background "gray68")))) - '(magenta ((t (:foreground "magenta")))) - '(makefile-space-face ((t (:background "hotpink")))) - '(menu ((t (nil)))) - '(message-cited-text-face ((t (:foreground "red")))) - '(message-header-cc-face ((t (:foreground "MidnightBlue")))) - '(message-header-name-face ((t (:foreground "cornflower blue")))) - '(message-header-newsgroups-face ((t (:italic t :bold t :foreground "blue4")))) - '(message-header-other-face ((t (:foreground "steel blue")))) - '(message-header-subject-face ((t (:bold t :foreground "navy blue")))) - '(message-header-to-face ((t (:bold t :foreground "MidnightBlue")))) - '(message-header-xheader-face ((t (:foreground "blue")))) - '(message-mml-face ((t (:bold t :foreground "cyan")))) - '(message-separator-face ((t (:foreground "brown")))) - '(minibuffer-prompt ((t (:foreground "cyan")))) - '(mode-line ((t (:background "grey75" :foreground "black")))) - '(mode-line-inactive ((t (:background "grey30" :foreground "grey80")))) - '(modeline ((t (:bold t :background "red" :foreground "yellow")))) - '(modeline-buffer-id ((t (:bold t :background "red" :foreground "yellow")))) - '(modeline-mousable ((t (:background "red" :foreground "yellow")))) - '(modeline-mousable-minor-mode ((t (:background "red" :foreground "green4")))) - '(paren-blink-off ((t (:foreground "black")))) - '(paren-match ((t (:bold t :background "yellow" :foreground "red")))) - '(paren-mismatch ((t (:background "DeepPink")))) - '(pointer ((t (nil)))) - '(primary-selection ((t (:background "gray65")))) - '(red ((t (:foreground "red")))) - '(region ((t (:background "gray75")))) - '(right-margin ((t (nil)))) - '(scroll-bar ((t (nil)))) - '(secondary-selection ((t (:background "paleturquoise")))) - '(semantic-dirty-token-face ((t (:background "lightyellow")))) - '(semantic-unmatched-syntax-face ((t (nil)))) - '(senator-intangible-face ((t (:foreground "gray75")))) - '(senator-momentary-highlight-face ((t (:background "gray30")))) - '(senator-read-only-face ((t (:background "#664444")))) - '(show-paren-match-face ((t (:background "turquoise")))) - '(show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) - '(speedbar-button-face ((t (:foreground "green4")))) - '(speedbar-directory-face ((t (:foreground "blue4")))) - '(speedbar-file-face ((t (:foreground "cyan4")))) - '(speedbar-highlight-face ((t (:background "green")))) - '(speedbar-selected-face ((t (:underline t :foreground "red")))) - '(speedbar-tag-face ((t (:foreground "brown")))) - '(template-message-face ((t (:bold t)))) - '(term-black ((t (:foreground "black")))) - '(term-blackbg ((t (nil)))) - '(term-blue ((t (:foreground "blue")))) - '(term-blue-bold-face ((t (:bold t :foreground "blue")))) - '(term-blue-face ((t (:foreground "blue")))) - '(term-blue-inv-face ((t (:background "blue")))) - '(term-blue-ul-face ((t (:underline t :foreground "blue")))) - '(term-bluebg ((t (:background "blue")))) - '(term-bold ((t (:bold t)))) - '(term-cyan ((t (:foreground "cyan")))) - '(term-cyan-bold-face ((t (:bold t :foreground "cyan")))) - '(term-cyan-face ((t (:foreground "cyan")))) - '(term-cyan-inv-face ((t (:background "cyan")))) - '(term-cyan-ul-face ((t (:underline t :foreground "cyan")))) - '(term-cyanbg ((t (:background "cyan")))) - '(term-default-bg ((t (nil)))) - '(term-default-bg-inv ((t (nil)))) - '(term-default-bold-face ((t (:bold t)))) - '(term-default-face ((t (nil)))) - '(term-default-fg ((t (nil)))) - '(term-default-fg-inv ((t (nil)))) - '(term-default-inv-face ((t (:background "peachpuff" :foreground "black")))) - '(term-default-ul-face ((t (:underline t)))) - '(term-green ((t (:foreground "green")))) - '(term-green-bold-face ((t (:bold t :foreground "green")))) - '(term-green-face ((t (:foreground "green")))) - '(term-green-inv-face ((t (:background "green")))) - '(term-green-ul-face ((t (:underline t :foreground "green")))) - '(term-greenbg ((t (:background "green")))) - '(term-invisible ((t (nil)))) - '(term-invisible-inv ((t (nil)))) - '(term-magenta ((t (:foreground "magenta")))) - '(term-magenta-bold-face ((t (:bold t :foreground "magenta")))) - '(term-magenta-face ((t (:foreground "magenta")))) - '(term-magenta-inv-face ((t (:background "magenta")))) - '(term-magenta-ul-face ((t (:underline t :foreground "magenta")))) - '(term-magentabg ((t (:background "magenta")))) - '(term-red ((t (:foreground "red")))) - '(term-red-bold-face ((t (:bold t :foreground "red")))) - '(term-red-face ((t (:foreground "red")))) - '(term-red-inv-face ((t (:background "red")))) - '(term-red-ul-face ((t (:underline t :foreground "red")))) - '(term-redbg ((t (:background "red")))) - '(term-underline ((t (:underline t)))) - '(term-white ((t (:foreground "white")))) - '(term-white-bold-face ((t (:bold t :foreground "white")))) - '(term-white-face ((t (:foreground "white")))) - '(term-white-inv-face ((t (nil)))) - '(term-white-ul-face ((t (:underline t :foreground "white")))) - '(term-whitebg ((t (:background "white")))) - '(term-yellow ((t (:foreground "yellow")))) - '(term-yellow-bold-face ((t (:bold t :foreground "yellow")))) - '(term-yellow-face ((t (:foreground "yellow")))) - '(term-yellow-inv-face ((t (:background "yellow")))) - '(term-yellow-ul-face ((t (:underline t :foreground "yellow")))) - '(term-yellowbg ((t (:background "yellow")))) - '(text-cursor ((t (:background "red" :foreground "black")))) - '(tool-bar ((t (:background "grey75" :foreground "black")))) - '(toolbar ((t (:background "Gray80" :foreground "black")))) - '(tooltip ((t (:background "lightyellow" :foreground "black")))) - '(trailing-whitespace ((t (:background "red")))) - '(underline ((t (:underline t)))) - '(variable-pitch ((t (nil)))) - '(vcursor ((t (:underline t :background "cyan" :foreground "blue")))) - '(vertical-divider ((t (:background "Gray80" :foreground "black")))) - '(vhdl-font-lock-attribute-face ((t (:foreground "Orchid")))) - '(vhdl-font-lock-directive-face ((t (:foreground "CadetBlue")))) - '(vhdl-font-lock-enumvalue-face ((t (:foreground "Gold4")))) - '(vhdl-font-lock-function-face ((t (:foreground "Orchid4")))) - '(vhdl-font-lock-prompt-face ((t (:bold t :foreground "Red")))) - '(vhdl-font-lock-reserved-words-face ((t (:bold t :foreground "Orange")))) - '(vhdl-font-lock-translate-off-face ((t (:background "LightGray")))) - '(vhdl-speedbar-architecture-face ((t (:foreground "Blue")))) - '(vhdl-speedbar-architecture-selected-face ((t (:underline t :foreground "Blue")))) - '(vhdl-speedbar-configuration-face ((t (:foreground "DarkGoldenrod")))) - '(vhdl-speedbar-configuration-selected-face ((t (:underline t :foreground "DarkGoldenrod")))) - '(vhdl-speedbar-entity-face ((t (:foreground "ForestGreen")))) - '(vhdl-speedbar-entity-selected-face ((t (:underline t :foreground "ForestGreen")))) - '(vhdl-speedbar-instantiation-face ((t (:foreground "Brown")))) - '(vhdl-speedbar-instantiation-selected-face ((t (:underline t :foreground "Brown")))) - '(vhdl-speedbar-package-face ((t (:foreground "Grey50")))) - '(vhdl-speedbar-package-selected-face ((t (:underline t :foreground "Grey50")))) - '(viper-minibuffer-emacs-face ((t (:background "darkseagreen2" :foreground "Black")))) - '(viper-minibuffer-insert-face ((t (:background "pink" :foreground "Black")))) - '(viper-minibuffer-vi-face ((t (:background "grey" :foreground "DarkGreen")))) - '(viper-replace-overlay-face ((t (:background "darkseagreen2" :foreground "Black")))) - '(viper-search-face ((t (:background "khaki" :foreground "Black")))) - '(white ((t (:foreground "white")))) - '(widget ((t (:size "12" :background "Gray80" :foreground "black")))) - '(widget-button-face ((t (:bold t)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "dark green")))) - '(widget-field-face ((t (nil)))) - '(widget-inactive-face ((t (:foreground "dim gray")))) - '(widget-single-line-field-face ((t (:background "gray85")))) - '(x-face ((t (:bold t :background "wheat" :foreground "black")))) - '(xrdb-option-name-face ((t (:bold t :foreground "yellow")))) - '(xrdb-option-value-face ((t (:bold t :foreground "magenta")))) - '(yellow ((t (:foreground "yellow")))) - '(zmacs-region ((t (:background "white" :foreground "black"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'lethe) - -;;; lethe-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/marine-theme.el b/elpa/color-theme-modern-0.0.3/marine-theme.el deleted file mode 100644 index 261987f..0000000 --- a/elpa/color-theme-modern-0.0.3/marine-theme.el +++ /dev/null @@ -1,123 +0,0 @@ -;;; marine-theme.el --- marine theme - -;; Copyright (C) 2001 by Girish Bharadwaj -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of marine theme from `color-themes' - -;;; Code: - -(deftheme marine - "marine theme") - -(custom-theme-set-faces - 'marine - - '(default ((t (:background "#9dcec9" :foreground "darkslategray")))) - '(mouse ((t (:foreground "sienna1")))) - '(cursor ((t (:background "yellow")))) - '(border ((t (:foreground "black")))) - - '(blue ((t (:foreground "blue")))) - '(bold ((t (:bold t)))) - '(bold-italic ((t (nil)))) - '(border-glyph ((t (nil)))) - '(buffers-tab ((t (:background "#9dcec9" :foreground "darkslategray")))) - '(buffers-tab-face ((t (:background "#9dcec9" :foreground "darkslategray")))) - '(custom-button-face ((t (nil)))) - '(custom-changed-face ((t (:background "blue" :foreground "white")))) - '(custom-comment-face ((t (:background "gray85")))) - '(custom-comment-tag-face ((t (:foreground "blue4")))) - '(custom-documentation-face ((t (nil)))) - '(custom-face-tag-face ((t (:underline t)))) - '(custom-group-tag-face ((t (:underline t :foreground "blue")))) - '(custom-group-tag-face-1 ((t (:underline t :foreground "deeppink")))) - '(custom-invalid-face ((t (:background "red" :foreground "yellow")))) - '(custom-modified-face ((t (:background "blue" :foreground "white")))) - '(custom-rogue-face ((t (:background "black" :foreground "pink")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:background "white" :foreground "blue")))) - '(custom-state-face ((t (:foreground "darkgreen")))) - '(custom-variable-button-face ((t (:underline t :bold t)))) - '(custom-variable-tag-face ((t (:underline t :foreground "blue")))) - '(display-time-mail-balloon-enhance-face ((t (:background "orange")))) - '(display-time-mail-balloon-gnus-group-face ((t (:foreground "blue")))) - '(display-time-time-balloon-face ((t (:foreground "red")))) - '(font-lock-builtin-face ((t (:foreground "SteelBlue")))) - '(font-lock-comment-face ((t (:foreground "cadetblue")))) - '(font-lock-constant-face ((t (:foreground "OrangeRed")))) - '(font-lock-doc-string-face ((t (:foreground "Salmon")))) - '(font-lock-function-name-face ((t (:bold t :foreground "NavyBlue")))) - '(font-lock-keyword-face ((t (:bold t :foreground "purple")))) - '(font-lock-preprocessor-face ((t (:foreground "SteelBlue")))) - '(font-lock-reference-face ((t (:foreground "SteelBlue")))) - '(font-lock-string-face ((t (:foreground "royalblue")))) - '(font-lock-type-face ((t (:foreground "darkmagenta")))) - '(font-lock-variable-name-face ((t (:foreground "violetred")))) - '(font-lock-warning-face ((t (:bold t :foreground "red")))) - '(green ((t (:foreground "green")))) - '(gnus-mouse-face ((t (:background "darkolivegreen" :foreground "white")))) - '(gui-button-face ((t (:background "grey75" :foreground "black")))) - '(gui-element ((t (:background "#489088" :foreground "black")))) - '(highlight ((t (:background "darkolivegreen" :foreground "white")))) - '(isearch ((t (:background "blue")))) - '(isearch-secondary ((t (:foreground "red3")))) - '(italic ((t (nil)))) - '(left-margin ((t (nil)))) - '(list-mode-item-selected ((t (:background "gray68" :foreground "darkslategray")))) - '(modeline ((t (:background "black" :foreground "white")))) - '(modeline-buffer-id ((t (:background "black" :foreground "white")))) - '(modeline-mousable ((t (:background "black" :foreground "white")))) - '(modeline-mousable-minor-mode ((t (:background "black" :foreground "white")))) - '(paren-blink-off ((t (:foreground "black")))) - '(paren-match ((t (:background "darkolivegreen" :foreground "white")))) - '(paren-mismatch ((t (:background "#9dcec9" :foreground "darkslategray")))) - '(pointer ((t (nil)))) - '(primary-selection ((t (:background "blue")))) - '(red ((t (:foreground "red")))) - '(region ((t (:background "blue")))) - '(right-margin ((t (nil)))) - '(secondary-selection ((t (:background "darkslateblue" :foreground "white")))) - '(smiley-mouse-face ((t (:background "darkolivegreen" :foreground "white")))) - '(template-message-face ((t (:bold t)))) - '(text-cursor ((t (:background "yellow" :foreground "#9dcec9")))) - '(toolbar ((t (nil)))) - '(underline ((t (:underline t)))) - '(vertical-divider ((t (nil)))) - '(widget ((t (nil)))) - '(widget-button-face ((t (:bold t)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "forestgreen")))) - '(widget-field-face ((t (:background "gray")))) - '(widget-inactive-face ((t (:foreground "dimgray")))) - '(widget-single-line-field-face ((t (:background "dim gray" :foreground "white")))) - '(yellow ((t (:foreground "yellow")))) - '(zmacs-region ((t (:background "blue"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'marine) - -;;; marine-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/marquardt-theme.el b/elpa/color-theme-modern-0.0.3/marquardt-theme.el deleted file mode 100644 index e3ff60c..0000000 --- a/elpa/color-theme-modern-0.0.3/marquardt-theme.el +++ /dev/null @@ -1,149 +0,0 @@ -;;; marquardt-theme.el --- marquardt theme - -;; Copyright (C) 2000 by Colin Marquardt -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of marquardt theme from `color-themes' - -;;; Code: - -(deftheme marquardt - "marquardt theme") - -(custom-theme-set-faces - 'marquardt - - '(default ((t (:background "bisque" :foreground "black")))) - '(mouse ((t (:foreground "black")))) - '(cursor ((t (:background "Red3")))) - '(border ((t (:foreground "black")))) - - '(blue ((t (:foreground "blue")))) - '(bold ((t (:bold t)))) - '(bold-italic ((t (:bold t)))) - '(border-glyph ((t (nil)))) - '(calendar-today-face ((t (:underline t)))) - '(diary-face ((t (:foreground "red")))) - '(display-time-mail-balloon-enhance-face ((t (:background "orange")))) - '(display-time-mail-balloon-gnus-group-face ((t (:foreground "blue")))) - '(display-time-time-balloon-face ((t (:foreground "red")))) - '(ff-paths-non-existant-file-face ((t (:bold t :foreground "NavyBlue")))) - '(font-lock-comment-face ((t (:foreground "gray50")))) - '(font-lock-doc-string-face ((t (:foreground "green4")))) - '(font-lock-function-name-face ((t (:foreground "darkorange")))) - '(font-lock-keyword-face ((t (:foreground "blue3")))) - '(font-lock-preprocessor-face ((t (:foreground "blue3")))) - '(font-lock-reference-face ((t (:foreground "red3")))) - '(font-lock-special-comment-face ((t (:foreground "blue4")))) - '(font-lock-special-keyword-face ((t (:foreground "red4")))) - '(font-lock-string-face ((t (:foreground "green4")))) - '(font-lock-type-face ((t (:foreground "steelblue")))) - '(font-lock-variable-name-face ((t (:foreground "black")))) - '(font-lock-warning-face ((t (:bold t :foreground "Red")))) - '(green ((t (:foreground "green")))) - '(gui-button-face ((t (:background "grey75" :foreground "black")))) - '(gui-element ((t (:background "azure1" :foreground "Black")))) - '(highlight ((t (:background "darkseagreen2" :foreground "blue")))) - '(holiday-face ((t (:background "pink" :foreground "black")))) - '(info-node ((t (:bold t)))) - '(info-xref ((t (:bold t)))) - '(isearch ((t (:background "yellow" :foreground "red")))) - '(italic ((t (:bold t)))) - '(left-margin ((t (nil)))) - '(list-mode-item-selected ((t (:background "gray68" :foreground "black")))) - '(message-cited-text-face ((t (:foreground "red")))) - '(message-header-cc-face ((t (:foreground "MidnightBlue")))) - '(message-header-name-face ((t (:foreground "cornflower blue")))) - '(message-header-newsgroups-face ((t (:bold t :foreground "blue4")))) - '(message-header-other-face ((t (:foreground "steel blue")))) - '(message-header-subject-face ((t (:bold t :foreground "navy blue")))) - '(message-header-to-face ((t (:bold t :foreground "MidnightBlue")))) - '(message-header-xheader-face ((t (:foreground "blue")))) - '(message-mml-face ((t (:foreground "ForestGreen")))) - '(message-separator-face ((t (:foreground "brown")))) - '(modeline ((t (:background "bisque2" :foreground "steelblue4")))) - '(modeline-buffer-id ((t (:background "bisque2" :foreground "blue4")))) - '(modeline-mousable ((t (:background "bisque2" :foreground "firebrick")))) - '(modeline-mousable-minor-mode ((t (:background "bisque2" :foreground "green4")))) - '(paren-blink-off ((t (:foreground "azure1")))) - '(paren-face ((t (:background "lightgoldenrod")))) - '(paren-match ((t (:background "bisque2")))) - '(paren-mismatch ((t (:background "DeepPink" :foreground "black")))) - '(paren-mismatch-face ((t (:background "DeepPink")))) - '(paren-no-match-face ((t (:background "yellow")))) - '(pointer ((t (:background "white" :foreground "blue")))) - '(primary-selection ((t (:background "gray65")))) - '(red ((t (:foreground "red")))) - '(right-margin ((t (nil)))) - '(secondary-selection ((t (:background "paleturquoise")))) - '(shell-option-face ((t (:foreground "gray50")))) - '(shell-output-2-face ((t (:foreground "green4")))) - '(shell-output-3-face ((t (:foreground "green4")))) - '(shell-output-face ((t (:bold t)))) - '(shell-prompt-face ((t (:foreground "blue3")))) - '(speedbar-button-face ((t (:foreground "green4")))) - '(speedbar-directory-face ((t (:foreground "blue4")))) - '(speedbar-file-face ((t (:foreground "cyan4")))) - '(speedbar-highlight-face ((t (:background "green")))) - '(speedbar-selected-face ((t (:underline t :foreground "red")))) - '(speedbar-tag-face ((t (:foreground "brown")))) - '(text-cursor ((t (:background "Red3" :foreground "bisque")))) - '(toolbar ((t (:background "Gray80")))) - '(underline ((t (:underline t)))) - '(vertical-divider ((t (nil)))) - '(vhdl-font-lock-attribute-face ((t (:foreground "Orchid")))) - '(vhdl-font-lock-directive-face ((t (:foreground "CadetBlue")))) - '(vhdl-font-lock-enumvalue-face ((t (:foreground "SaddleBrown")))) - '(vhdl-font-lock-function-face ((t (:foreground "DarkCyan")))) - '(vhdl-font-lock-generic-/constant-face ((t (:foreground "Gold3")))) - '(vhdl-font-lock-prompt-face ((t (:bold t :foreground "Red")))) - '(vhdl-font-lock-reserved-words-face ((t (:bold t :foreground "Orange")))) - '(vhdl-font-lock-translate-off-face ((t (:background "LightGray")))) - '(vhdl-font-lock-type-face ((t (:foreground "ForestGreen")))) - '(vhdl-font-lock-variable-face ((t (:foreground "Grey50")))) - '(vhdl-speedbar-architecture-face ((t (:foreground "Blue")))) - '(vhdl-speedbar-architecture-selected-face ((t (:underline t :foreground "Blue")))) - '(vhdl-speedbar-configuration-face ((t (:foreground "DarkGoldenrod")))) - '(vhdl-speedbar-configuration-selected-face ((t (:underline t :foreground "DarkGoldenrod")))) - '(vhdl-speedbar-entity-face ((t (:foreground "ForestGreen")))) - '(vhdl-speedbar-entity-selected-face ((t (:underline t :foreground "ForestGreen")))) - '(vhdl-speedbar-instantiation-face ((t (:foreground "Brown")))) - '(vhdl-speedbar-instantiation-selected-face ((t (:underline t :foreground "Brown")))) - '(vhdl-speedbar-package-face ((t (:foreground "Grey50")))) - '(vhdl-speedbar-package-selected-face ((t (:underline t :foreground "Grey50")))) - '(vhdl-speedbar-subprogram-face ((t (:foreground "Orchid4")))) - '(widget-button-face ((t (:bold t)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "dark green")))) - '(widget-field-face ((t (:background "gray85")))) - '(widget-inactive-face ((t (:foreground "dim gray")))) - '(yellow ((t (:foreground "yellow")))) - '(zmacs-region ((t (:background "steelblue" :foreground "yellow"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'marquardt) - -;;; marquardt-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/matrix-theme.el b/elpa/color-theme-modern-0.0.3/matrix-theme.el deleted file mode 100644 index 3e19534..0000000 --- a/elpa/color-theme-modern-0.0.3/matrix-theme.el +++ /dev/null @@ -1,683 +0,0 @@ -;;; matrix-theme.el --- matrix theme - -;; Copyright (C) 2003 by walterh@rocketmail.com -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of matrix theme from `color-themes' - -;;; Code: - -(deftheme matrix - "matrix theme") - -(custom-theme-set-faces - 'matrix - - '(default ((t (:background "black" :foreground "#7eff00")))) - '(mouse ((t (:background "#7eff00")))) - '(cursor ((t (:background "#7eff00" :foreground "black")))) - '(border ((t (:background "orange")))) - - '(Buffer-menu-buffer-face ((t (nil)))) - '(CUA-global-mark-face ((t (nil)))) - '(CUA-rectangle-face ((t (nil)))) - '(CUA-rectangle-noselect-face ((t (nil)))) - '(Info-title-1-face ((t (nil)))) - '(Info-title-2-face ((t (nil)))) - '(Info-title-3-face ((t (nil)))) - '(Info-title-4-face ((t (nil)))) - '(antlr-font-lock-keyword-face ((t (nil)))) - '(antlr-font-lock-literal-face ((t (nil)))) - '(antlr-font-lock-ruledef-face ((t (nil)))) - '(antlr-font-lock-ruleref-face ((t (nil)))) - '(antlr-font-lock-tokendef-face ((t (nil)))) - '(antlr-font-lock-tokenref-face ((t (nil)))) - '(bbdb-company ((t (nil)))) - '(bbdb-field-name ((t (nil)))) - '(bbdb-field-value ((t (nil)))) - '(bbdb-name ((t (nil)))) - '(bg:erc-color-face0 ((t (nil)))) - '(bg:erc-color-face1 ((t (nil)))) - '(bg:erc-color-face10 ((t (nil)))) - '(bg:erc-color-face11 ((t (nil)))) - '(bg:erc-color-face12 ((t (nil)))) - '(bg:erc-color-face13 ((t (nil)))) - '(bg:erc-color-face14 ((t (nil)))) - '(bg:erc-color-face15 ((t (nil)))) - '(bg:erc-color-face2 ((t (nil)))) - '(bg:erc-color-face3 ((t (nil)))) - '(bg:erc-color-face4 ((t (nil)))) - '(bg:erc-color-face5 ((t (nil)))) - '(bg:erc-color-face6 ((t (nil)))) - '(bg:erc-color-face7 ((t (nil)))) - '(bg:erc-color-face8 ((t (nil)))) - '(bg:erc-color-face9 ((t (nil)))) - '(blank-space-face ((t (nil)))) - '(blank-tab-face ((t (nil)))) - '(blue ((t (nil)))) - '(bold ((t (:bold t :weight bold)))) - '(bold-italic ((t (:bold t :weight bold)))) - '(border-glyph ((t (nil)))) - '(buffers-tab ((t (nil)))) - '(button ((t (nil)))) - '(calendar-today-face ((t (nil)))) - '(change-log-acknowledgement-face ((t (nil)))) - '(change-log-conditionals-face ((t (nil)))) - '(change-log-date-face ((t (nil)))) - '(change-log-email-face ((t (nil)))) - '(change-log-file-face ((t (nil)))) - '(change-log-function-face ((t (nil)))) - '(change-log-list-face ((t (nil)))) - '(change-log-name-face ((t (nil)))) - '(clearcase-dired-checkedout-face ((t (nil)))) - '(comint-highlight-input ((t (nil)))) - '(comint-highlight-prompt ((t (nil)))) - '(cparen-around-andor-face ((t (nil)))) - '(cparen-around-begin-face ((t (nil)))) - '(cparen-around-conditional-face ((t (nil)))) - '(cparen-around-define-face ((t (nil)))) - '(cparen-around-lambda-face ((t (nil)))) - '(cparen-around-letdo-face ((t (nil)))) - '(cparen-around-quote-face ((t (nil)))) - '(cparen-around-set!-face ((t (nil)))) - '(cparen-around-syntax-rules-face ((t (nil)))) - '(cparen-around-vector-face ((t (nil)))) - '(cparen-binding-face ((t (nil)))) - '(cparen-binding-list-face ((t (nil)))) - '(cparen-conditional-clause-face ((t (nil)))) - '(cparen-normal-paren-face ((t (nil)))) - '(cperl-array-face ((t (nil)))) - '(cperl-hash-face ((t (nil)))) - '(cperl-invalid-face ((t (nil)))) - '(cperl-nonoverridable-face ((t (nil)))) - '(custom-button-face ((t (nil)))) - '(custom-button-pressed-face ((t (nil)))) - '(custom-changed-face ((t (nil)))) - '(custom-comment-face ((t (nil)))) - '(custom-comment-tag-face ((t (nil)))) - '(custom-documentation-face ((t (nil)))) - '(custom-face-tag-face ((t (nil)))) - '(custom-group-tag-face ((t (nil)))) - '(custom-group-tag-face-1 ((t (nil)))) - '(custom-invalid-face ((t (nil)))) - '(custom-modified-face ((t (nil)))) - '(custom-rogue-face ((t (nil)))) - '(custom-saved-face ((t (nil)))) - '(custom-set-face ((t (nil)))) - '(custom-state-face ((t (nil)))) - '(custom-variable-button-face ((t (nil)))) - '(custom-variable-tag-face ((t (nil)))) - '(cvs-filename-face ((t (nil)))) - '(cvs-handled-face ((t (nil)))) - '(cvs-header-face ((t (nil)))) - '(cvs-marked-face ((t (nil)))) - '(cvs-msg-face ((t (nil)))) - '(cvs-need-action-face ((t (nil)))) - '(cvs-unknown-face ((t (nil)))) - '(cyan ((t (nil)))) - '(diary-face ((t (nil)))) - '(diff-added-face ((t (nil)))) - '(diff-changed-face ((t (nil)))) - '(diff-context-face ((t (nil)))) - '(diff-file-header-face ((t (nil)))) - '(diff-function-face ((t (nil)))) - '(diff-header-face ((t (nil)))) - '(diff-hunk-header-face ((t (nil)))) - '(diff-index-face ((t (nil)))) - '(diff-nonexistent-face ((t (nil)))) - '(diff-removed-face ((t (nil)))) - '(dired-face-boring ((t (nil)))) - '(dired-face-directory ((t (nil)))) - '(dired-face-executable ((t (nil)))) - '(dired-face-flagged ((t (nil)))) - '(dired-face-header ((t (nil)))) - '(dired-face-marked ((t (nil)))) - '(dired-face-permissions ((t (nil)))) - '(dired-face-setuid ((t (nil)))) - '(dired-face-socket ((t (nil)))) - '(dired-face-symlink ((t (nil)))) - '(display-time-mail-balloon-enhance-face ((t (nil)))) - '(display-time-mail-balloon-gnus-group-face ((t (nil)))) - '(display-time-time-balloon-face ((t (nil)))) - '(ebrowse-default-face ((t (nil)))) - '(ebrowse-file-name-face ((t (nil)))) - '(ebrowse-member-attribute-face ((t (nil)))) - '(ebrowse-member-class-face ((t (nil)))) - '(ebrowse-progress-face ((t (nil)))) - '(ebrowse-root-class-face ((t (nil)))) - '(ebrowse-tree-mark-face ((t (nil)))) - '(ecb-sources-face ((t (nil)))) - '(edb-inter-field-face ((t (nil)))) - '(edb-normal-summary-face ((t (nil)))) - '(ediff-current-diff-face-A ((t (nil)))) - '(ediff-current-diff-face-Ancestor ((t (nil)))) - '(ediff-current-diff-face-B ((t (nil)))) - '(ediff-current-diff-face-C ((t (nil)))) - '(ediff-even-diff-face-A ((t (nil)))) - '(ediff-even-diff-face-Ancestor ((t (nil)))) - '(ediff-even-diff-face-B ((t (nil)))) - '(ediff-even-diff-face-C ((t (nil)))) - '(ediff-fine-diff-face-A ((t (nil)))) - '(ediff-fine-diff-face-Ancestor ((t (nil)))) - '(ediff-fine-diff-face-B ((t (nil)))) - '(ediff-fine-diff-face-C ((t (nil)))) - '(ediff-odd-diff-face-A ((t (nil)))) - '(ediff-odd-diff-face-Ancestor ((t (nil)))) - '(ediff-odd-diff-face-B ((t (nil)))) - '(ediff-odd-diff-face-C ((t (nil)))) - '(eieio-custom-slot-tag-face ((t (nil)))) - '(emacs-wiki-bad-link-face ((t (nil)))) - '(emacs-wiki-link-face ((t (nil)))) - '(erc-action-face ((t (nil)))) - '(erc-bold-face ((t (nil)))) - '(erc-current-nick-face ((t (nil)))) - '(erc-dangerous-host-face ((t (nil)))) - '(erc-default-face ((t (nil)))) - '(erc-direct-msg-face ((t (nil)))) - '(erc-error-face ((t (nil)))) - '(erc-fool-face ((t (nil)))) - '(erc-highlight-face ((t (nil)))) - '(erc-input-face ((t (nil)))) - '(erc-inverse-face ((t (nil)))) - '(erc-keyword-face ((t (nil)))) - '(erc-nick-default-face ((t (nil)))) - '(erc-nick-msg-face ((t (nil)))) - '(erc-notice-face ((t (nil)))) - '(erc-pal-face ((t (nil)))) - '(erc-prompt-face ((t (nil)))) - '(erc-timestamp-face ((t (nil)))) - '(erc-underline-face ((t (nil)))) - '(eshell-ls-archive-face ((t (nil)))) - '(eshell-ls-backup-face ((t (nil)))) - '(eshell-ls-clutter-face ((t (nil)))) - '(eshell-ls-directory-face ((t (nil)))) - '(eshell-ls-executable-face ((t (nil)))) - '(eshell-ls-missing-face ((t (nil)))) - '(eshell-ls-picture-face ((t (nil)))) - '(eshell-ls-product-face ((t (nil)))) - '(eshell-ls-readonly-face ((t (nil)))) - '(eshell-ls-special-face ((t (nil)))) - '(eshell-ls-symlink-face ((t (nil)))) - '(eshell-ls-text-face ((t (nil)))) - '(eshell-ls-todo-face ((t (nil)))) - '(eshell-ls-unreadable-face ((t (nil)))) - '(eshell-prompt-face ((t (nil)))) - '(eshell-test-failed-face ((t (nil)))) - '(eshell-test-ok-face ((t (nil)))) - '(excerpt ((t (nil)))) - '(extra-whitespace-face ((t (nil)))) - '(ff-paths-non-existant-file-face ((t (nil)))) - '(fg:black ((t (nil)))) - '(fg:erc-color-face0 ((t (nil)))) - '(fg:erc-color-face1 ((t (nil)))) - '(fg:erc-color-face10 ((t (nil)))) - '(fg:erc-color-face11 ((t (nil)))) - '(fg:erc-color-face12 ((t (nil)))) - '(fg:erc-color-face13 ((t (nil)))) - '(fg:erc-color-face14 ((t (nil)))) - '(fg:erc-color-face15 ((t (nil)))) - '(fg:erc-color-face2 ((t (nil)))) - '(fg:erc-color-face3 ((t (nil)))) - '(fg:erc-color-face4 ((t (nil)))) - '(fg:erc-color-face5 ((t (nil)))) - '(fg:erc-color-face6 ((t (nil)))) - '(fg:erc-color-face7 ((t (nil)))) - '(fg:erc-color-face8 ((t (nil)))) - '(fg:erc-color-face9 ((t (nil)))) - '(fixed ((t (nil)))) - '(fixed-pitch ((t (nil)))) - '(fl-comment-face ((t (nil)))) - '(fl-function-name-face ((t (nil)))) - '(fl-keyword-face ((t (nil)))) - '(fl-string-face ((t (nil)))) - '(fl-type-face ((t (nil)))) - '(flash-paren-face-off ((t (nil)))) - '(flash-paren-face-on ((t (nil)))) - '(flash-paren-face-region ((t (nil)))) - '(flyspell-duplicate-face ((t (nil)))) - '(flyspell-incorrect-face ((t (nil)))) - '(font-latex-bold-face ((t (nil)))) - '(font-latex-italic-face ((t (nil)))) - '(font-latex-math-face ((t (nil)))) - '(font-latex-sedate-face ((t (nil)))) - '(font-latex-string-face ((t (nil)))) - '(font-latex-warning-face ((t (nil)))) - '(font-lock-builtin-face ((t (:foreground "pink2")))) - '(font-lock-comment-face ((t (:italic t :background "black" :slant italic)))) - '(font-lock-constant-face ((t (:foreground "magenta")))) - '(font-lock-doc-face ((t (nil)))) - '(font-lock-doc-string-face ((t (nil)))) - '(font-lock-exit-face ((t (nil)))) - '(font-lock-function-name-face ((t (:bold t :underline t :weight bold)))) - '(font-lock-keyword-face ((t (:foreground "yellow1")))) - '(font-lock-other-emphasized-face ((t (nil)))) - '(font-lock-other-type-face ((t (nil)))) - '(font-lock-preprocessor-face ((t (nil)))) - '(font-lock-reference-face ((t (nil)))) - '(font-lock-special-comment-face ((t (nil)))) - '(font-lock-special-keyword-face ((t (nil)))) - '(font-lock-string-face ((t (:foreground "yellow2")))) - '(font-lock-type-face ((t (:foreground "LightYellow1")))) - '(font-lock-variable-name-face ((t (:foreground "light green")))) - '(font-lock-warning-face ((t (nil)))) - '(fringe ((t (nil)))) - '(gnus-cite-attribution-face ((t (nil)))) - '(gnus-cite-face-1 ((t (nil)))) - '(gnus-cite-face-10 ((t (nil)))) - '(gnus-cite-face-11 ((t (nil)))) - '(gnus-cite-face-2 ((t (nil)))) - '(gnus-cite-face-3 ((t (nil)))) - '(gnus-cite-face-4 ((t (nil)))) - '(gnus-cite-face-5 ((t (nil)))) - '(gnus-cite-face-6 ((t (nil)))) - '(gnus-cite-face-7 ((t (nil)))) - '(gnus-cite-face-8 ((t (nil)))) - '(gnus-cite-face-9 ((t (nil)))) - '(gnus-emphasis-bold ((t (nil)))) - '(gnus-emphasis-bold-italic ((t (nil)))) - '(gnus-emphasis-highlight-words ((t (nil)))) - '(gnus-emphasis-italic ((t (nil)))) - '(gnus-emphasis-strikethru ((t (nil)))) - '(gnus-emphasis-underline ((t (nil)))) - '(gnus-emphasis-underline-bold ((t (nil)))) - '(gnus-emphasis-underline-bold-italic ((t (nil)))) - '(gnus-emphasis-underline-italic ((t (nil)))) - '(gnus-filterhist-face-1 ((t (nil)))) - '(gnus-group-mail-1-empty-face ((t (nil)))) - '(gnus-group-mail-1-face ((t (nil)))) - '(gnus-group-mail-2-empty-face ((t (nil)))) - '(gnus-group-mail-2-face ((t (nil)))) - '(gnus-group-mail-3-empty-face ((t (nil)))) - '(gnus-group-mail-3-face ((t (nil)))) - '(gnus-group-mail-low-empty-face ((t (nil)))) - '(gnus-group-mail-low-face ((t (nil)))) - '(gnus-group-news-1-empty-face ((t (nil)))) - '(gnus-group-news-1-face ((t (nil)))) - '(gnus-group-news-2-empty-face ((t (nil)))) - '(gnus-group-news-2-face ((t (nil)))) - '(gnus-group-news-3-empty-face ((t (nil)))) - '(gnus-group-news-3-face ((t (nil)))) - '(gnus-group-news-4-empty-face ((t (nil)))) - '(gnus-group-news-4-face ((t (nil)))) - '(gnus-group-news-5-empty-face ((t (nil)))) - '(gnus-group-news-5-face ((t (nil)))) - '(gnus-group-news-6-empty-face ((t (nil)))) - '(gnus-group-news-6-face ((t (nil)))) - '(gnus-group-news-low-empty-face ((t (nil)))) - '(gnus-group-news-low-face ((t (nil)))) - '(gnus-header-content-face ((t (nil)))) - '(gnus-header-from-face ((t (nil)))) - '(gnus-header-name-face ((t (nil)))) - '(gnus-header-newsgroups-face ((t (nil)))) - '(gnus-header-subject-face ((t (nil)))) - '(gnus-picon-face ((t (nil)))) - '(gnus-picon-xbm-face ((t (nil)))) - '(gnus-picons-face ((t (nil)))) - '(gnus-picons-xbm-face ((t (nil)))) - '(gnus-server-agent-face ((t (nil)))) - '(gnus-server-closed-face ((t (nil)))) - '(gnus-server-denied-face ((t (nil)))) - '(gnus-server-offline-face ((t (nil)))) - '(gnus-server-opened-face ((t (nil)))) - '(gnus-signature-face ((t (nil)))) - '(gnus-splash ((t (nil)))) - '(gnus-splash-face ((t (nil)))) - '(gnus-summary-cancelled-face ((t (nil)))) - '(gnus-summary-high-ancient-face ((t (nil)))) - '(gnus-summary-high-read-face ((t (nil)))) - '(gnus-summary-high-ticked-face ((t (nil)))) - '(gnus-summary-high-undownloaded-face ((t (nil)))) - '(gnus-summary-high-unread-face ((t (nil)))) - '(gnus-summary-low-ancient-face ((t (nil)))) - '(gnus-summary-low-read-face ((t (nil)))) - '(gnus-summary-low-ticked-face ((t (nil)))) - '(gnus-summary-low-undownloaded-face ((t (nil)))) - '(gnus-summary-low-unread-face ((t (nil)))) - '(gnus-summary-normal-ancient-face ((t (nil)))) - '(gnus-summary-normal-read-face ((t (nil)))) - '(gnus-summary-normal-ticked-face ((t (nil)))) - '(gnus-summary-normal-undownloaded-face ((t (nil)))) - '(gnus-summary-normal-unread-face ((t (nil)))) - '(gnus-summary-selected-face ((t (nil)))) - '(gnus-x-face ((t (nil)))) - '(green ((t (nil)))) - '(gui-button-face ((t (nil)))) - '(gui-element ((t (nil)))) - '(header-line ((t (nil)))) - '(hi-black-b ((t (nil)))) - '(hi-black-hb ((t (nil)))) - '(hi-blue ((t (nil)))) - '(hi-blue-b ((t (nil)))) - '(hi-green ((t (nil)))) - '(hi-green-b ((t (nil)))) - '(hi-pink ((t (nil)))) - '(hi-red-b ((t (nil)))) - '(hi-yellow ((t (nil)))) - '(highlight ((t (:background "#7eff00" :foreground "black")))) - '(highlight-changes-delete-face ((t (nil)))) - '(highlight-changes-face ((t (nil)))) - '(highline-face ((t (nil)))) - '(holiday-face ((t (nil)))) - '(html-helper-bold-face ((t (nil)))) - '(html-helper-bold-italic-face ((t (nil)))) - '(html-helper-builtin-face ((t (nil)))) - '(html-helper-italic-face ((t (nil)))) - '(html-helper-underline-face ((t (nil)))) - '(html-tag-face ((t (nil)))) - '(hyper-apropos-documentation ((t (nil)))) - '(hyper-apropos-heading ((t (nil)))) - '(hyper-apropos-hyperlink ((t (nil)))) - '(hyper-apropos-major-heading ((t (nil)))) - '(hyper-apropos-section-heading ((t (nil)))) - '(hyper-apropos-warning ((t (nil)))) - '(ibuffer-deletion-face ((t (nil)))) - '(ibuffer-marked-face ((t (nil)))) - '(idlwave-help-link-face ((t (nil)))) - '(idlwave-shell-bp-face ((t (nil)))) - '(ido-first-match-face ((t (nil)))) - '(ido-indicator-face ((t (nil)))) - '(ido-only-match-face ((t (nil)))) - '(ido-subdir-face ((t (nil)))) - '(info-header-node ((t (nil)))) - '(info-header-xref ((t (nil)))) - '(info-menu-5 ((t (nil)))) - '(info-menu-6 ((t (nil)))) - '(info-menu-header ((t (nil)))) - '(info-node ((t (nil)))) - '(info-xref ((t (nil)))) - '(isearch ((t (nil)))) - '(isearch-lazy-highlight-face ((t (nil)))) - '(isearch-secondary ((t (nil)))) - '(italic ((t (:underline t)))) - '(jde-bug-breakpoint-cursor ((t (nil)))) - '(jde-bug-breakpoint-marker ((t (nil)))) - '(jde-db-active-breakpoint-face ((t (nil)))) - '(jde-db-requested-breakpoint-face ((t (nil)))) - '(jde-db-spec-breakpoint-face ((t (nil)))) - '(jde-java-font-lock-api-face ((t (nil)))) - '(jde-java-font-lock-bold-face ((t (nil)))) - '(jde-java-font-lock-code-face ((t (nil)))) - '(jde-java-font-lock-constant-face ((t (nil)))) - '(jde-java-font-lock-doc-tag-face ((t (nil)))) - '(jde-java-font-lock-italic-face ((t (nil)))) - '(jde-java-font-lock-link-face ((t (nil)))) - '(jde-java-font-lock-modifier-face ((t (nil)))) - '(jde-java-font-lock-number-face ((t (nil)))) - '(jde-java-font-lock-operator-face ((t (nil)))) - '(jde-java-font-lock-package-face ((t (nil)))) - '(jde-java-font-lock-pre-face ((t (nil)))) - '(jde-java-font-lock-underline-face ((t (nil)))) - '(lazy-highlight-face ((t (nil)))) - '(left-margin ((t (nil)))) - '(linemenu-face ((t (nil)))) - '(list-mode-item-selected ((t (nil)))) - '(log-view-file-face ((t (nil)))) - '(log-view-message-face ((t (nil)))) - '(magenta ((t (nil)))) - '(makefile-space-face ((t (nil)))) - '(man-bold ((t (nil)))) - '(man-heading ((t (nil)))) - '(man-italic ((t (nil)))) - '(man-xref ((t (nil)))) - '(menu ((t (nil)))) - '(message-cited-text ((t (nil)))) - '(message-cited-text-face ((t (nil)))) - '(message-header-cc-face ((t (nil)))) - '(message-header-contents ((t (nil)))) - '(message-header-name-face ((t (nil)))) - '(message-header-newsgroups-face ((t (nil)))) - '(message-header-other-face ((t (nil)))) - '(message-header-subject-face ((t (nil)))) - '(message-header-to-face ((t (nil)))) - '(message-header-xheader-face ((t (nil)))) - '(message-headers ((t (nil)))) - '(message-highlighted-header-contents ((t (nil)))) - '(message-mml-face ((t (nil)))) - '(message-separator-face ((t (nil)))) - '(message-url ((t (nil)))) - '(minibuffer-prompt ((t (nil)))) - '(mmm-face ((t (nil)))) - '(mode-line ((t (:bold t :background "gray" :foreground "black" :weight bold)))) - '(mode-line-inactive ((t (nil)))) - '(modeline-buffer-id ((t (:background "orange" :foreground "black")))) - '(modeline-mousable ((t (:background "orange" :foreground "black")))) - '(modeline-mousable-minor-mode ((t (:background "orange" :foreground "black")))) - '(mpg123-face-cur ((t (nil)))) - '(mpg123-face-slider ((t (nil)))) - '(my-tab-face ((t (nil)))) - '(nil ((t (nil)))) - '(overlay-empty-face ((t (nil)))) - '(p4-diff-del-face ((t (nil)))) - '(paren-blink-off ((t (nil)))) - '(paren-face ((t (nil)))) - '(paren-face-match ((t (nil)))) - '(paren-face-mismatch ((t (nil)))) - '(paren-face-no-match ((t (nil)))) - '(paren-match ((t (nil)))) - '(paren-mismatch ((t (nil)))) - '(paren-mismatch-face ((t (nil)))) - '(paren-no-match-face ((t (nil)))) - '(pointer ((t (nil)))) - '(primary-selection ((t (nil)))) - '(reb-match-0 ((t (nil)))) - '(reb-match-1 ((t (nil)))) - '(reb-match-2 ((t (nil)))) - '(reb-match-3 ((t (nil)))) - '(red ((t (nil)))) - '(region ((t (:background "#7eff00" :foreground "black")))) - '(right-margin ((t (nil)))) - '(rpm-spec-dir-face ((t (nil)))) - '(rpm-spec-doc-face ((t (nil)))) - '(rpm-spec-ghost-face ((t (nil)))) - '(rpm-spec-macro-face ((t (nil)))) - '(rpm-spec-package-face ((t (nil)))) - '(rpm-spec-tag-face ((t (nil)))) - '(rpm-spec-var-face ((t (nil)))) - '(scroll-bar ((t (nil)))) - '(secondary-selection ((t (:background "orange" :foreground "black")))) - '(semantic-dirty-token-face ((t (nil)))) - '(semantic-intangible-face ((t (nil)))) - '(semantic-read-only-face ((t (nil)))) - '(semantic-unmatched-syntax-face ((t (nil)))) - '(senator-intangible-face ((t (nil)))) - '(senator-momentary-highlight-face ((t (nil)))) - '(senator-read-only-face ((t (nil)))) - '(sgml-comment-face ((t (nil)))) - '(sgml-doctype-face ((t (nil)))) - '(sgml-end-tag-face ((t (nil)))) - '(sgml-entity-face ((t (nil)))) - '(sgml-ignored-face ((t (nil)))) - '(sgml-ms-end-face ((t (nil)))) - '(sgml-ms-start-face ((t (nil)))) - '(sgml-pi-face ((t (nil)))) - '(sgml-sgml-face ((t (nil)))) - '(sgml-short-ref-face ((t (nil)))) - '(sgml-shortref-face ((t (nil)))) - '(sgml-start-tag-face ((t (nil)))) - '(sh-heredoc-face ((t (nil)))) - '(shell-option-face ((t (nil)))) - '(shell-output-2-face ((t (nil)))) - '(shell-output-3-face ((t (nil)))) - '(shell-output-face ((t (nil)))) - '(shell-prompt-face ((t (nil)))) - '(show-block-face1 ((t (nil)))) - '(show-block-face2 ((t (nil)))) - '(show-block-face3 ((t (nil)))) - '(show-block-face4 ((t (nil)))) - '(show-block-face5 ((t (nil)))) - '(show-block-face6 ((t (nil)))) - '(show-block-face7 ((t (nil)))) - '(show-block-face8 ((t (nil)))) - '(show-block-face9 ((t (nil)))) - '(show-paren-match-face ((t (:background "orange" :foreground "black")))) - '(show-paren-mismatch-face ((t (:underline t)))) - '(show-tabs-space-face ((t (nil)))) - '(show-tabs-tab-face ((t (nil)))) - '(smerge-base-face ((t (nil)))) - '(smerge-markers-face ((t (nil)))) - '(smerge-mine-face ((t (nil)))) - '(smerge-other-face ((t (nil)))) - '(speedbar-button-face ((t (nil)))) - '(speedbar-directory-face ((t (nil)))) - '(speedbar-file-face ((t (nil)))) - '(speedbar-highlight-face ((t (nil)))) - '(speedbar-selected-face ((t (nil)))) - '(speedbar-separator-face ((t (nil)))) - '(speedbar-tag-face ((t (nil)))) - '(strokes-char-face ((t (nil)))) - '(swbuff-current-buffer-face ((t (nil)))) - '(tabbar-button-face ((t (nil)))) - '(tabbar-default-face ((t (nil)))) - '(tabbar-selected-face ((t (nil)))) - '(tabbar-separator-face ((t (nil)))) - '(tabbar-unselected-face ((t (nil)))) - '(template-message-face ((t (nil)))) - '(term-black ((t (nil)))) - '(term-blackbg ((t (nil)))) - '(term-blue ((t (nil)))) - '(term-blue-bold-face ((t (nil)))) - '(term-blue-face ((t (nil)))) - '(term-blue-inv-face ((t (nil)))) - '(term-blue-ul-face ((t (nil)))) - '(term-bluebg ((t (nil)))) - '(term-bold ((t (nil)))) - '(term-cyan ((t (nil)))) - '(term-cyan-bold-face ((t (nil)))) - '(term-cyan-face ((t (nil)))) - '(term-cyan-inv-face ((t (nil)))) - '(term-cyan-ul-face ((t (nil)))) - '(term-cyanbg ((t (nil)))) - '(term-default ((t (nil)))) - '(term-default-bg ((t (nil)))) - '(term-default-bg-inv ((t (nil)))) - '(term-default-bold-face ((t (nil)))) - '(term-default-face ((t (nil)))) - '(term-default-fg ((t (nil)))) - '(term-default-fg-inv ((t (nil)))) - '(term-default-inv-face ((t (nil)))) - '(term-default-ul-face ((t (nil)))) - '(term-green ((t (nil)))) - '(term-green-bold-face ((t (nil)))) - '(term-green-face ((t (nil)))) - '(term-green-inv-face ((t (nil)))) - '(term-green-ul-face ((t (nil)))) - '(term-greenbg ((t (nil)))) - '(term-invisible ((t (nil)))) - '(term-invisible-inv ((t (nil)))) - '(term-magenta ((t (nil)))) - '(term-magenta-bold-face ((t (nil)))) - '(term-magenta-face ((t (nil)))) - '(term-magenta-inv-face ((t (nil)))) - '(term-magenta-ul-face ((t (nil)))) - '(term-magentabg ((t (nil)))) - '(term-red ((t (nil)))) - '(term-red-bold-face ((t (nil)))) - '(term-red-face ((t (nil)))) - '(term-red-inv-face ((t (nil)))) - '(term-red-ul-face ((t (nil)))) - '(term-redbg ((t (nil)))) - '(term-underline ((t (nil)))) - '(term-white ((t (nil)))) - '(term-white-bold-face ((t (nil)))) - '(term-white-face ((t (nil)))) - '(term-white-inv-face ((t (nil)))) - '(term-white-ul-face ((t (nil)))) - '(term-whitebg ((t (nil)))) - '(term-yellow ((t (nil)))) - '(term-yellow-bold-face ((t (nil)))) - '(term-yellow-face ((t (nil)))) - '(term-yellow-inv-face ((t (nil)))) - '(term-yellow-ul-face ((t (nil)))) - '(term-yellowbg ((t (nil)))) - '(tex-math-face ((t (nil)))) - '(texinfo-heading-face ((t (nil)))) - '(text-cursor ((t (nil)))) - '(tool-bar ((t (nil)))) - '(tooltip ((t (nil)))) - '(trailing-whitespace ((t (nil)))) - '(underline ((t (:underline t)))) - '(variable-pitch ((t (nil)))) - '(vc-annotate-face-0046FF ((t (nil)))) - '(vcursor ((t (nil)))) - '(vertical-divider ((t (nil)))) - '(vhdl-font-lock-attribute-face ((t (nil)))) - '(vhdl-font-lock-directive-face ((t (nil)))) - '(vhdl-font-lock-enumvalue-face ((t (nil)))) - '(vhdl-font-lock-function-face ((t (nil)))) - '(vhdl-font-lock-generic-/constant-face ((t (nil)))) - '(vhdl-font-lock-prompt-face ((t (nil)))) - '(vhdl-font-lock-reserved-words-face ((t (nil)))) - '(vhdl-font-lock-translate-off-face ((t (nil)))) - '(vhdl-font-lock-type-face ((t (nil)))) - '(vhdl-font-lock-variable-face ((t (nil)))) - '(vhdl-speedbar-architecture-face ((t (nil)))) - '(vhdl-speedbar-architecture-selected-face ((t (nil)))) - '(vhdl-speedbar-configuration-face ((t (nil)))) - '(vhdl-speedbar-configuration-selected-face ((t (nil)))) - '(vhdl-speedbar-entity-face ((t (nil)))) - '(vhdl-speedbar-entity-selected-face ((t (nil)))) - '(vhdl-speedbar-instantiation-face ((t (nil)))) - '(vhdl-speedbar-instantiation-selected-face ((t (nil)))) - '(vhdl-speedbar-package-face ((t (nil)))) - '(vhdl-speedbar-package-selected-face ((t (nil)))) - '(vhdl-speedbar-subprogram-face ((t (nil)))) - '(viper-minibuffer-emacs-face ((t (nil)))) - '(viper-minibuffer-insert-face ((t (nil)))) - '(viper-minibuffer-vi-face ((t (nil)))) - '(viper-replace-overlay-face ((t (nil)))) - '(viper-search-face ((t (nil)))) - '(vm-xface ((t (nil)))) - '(vmpc-pre-sig-face ((t (nil)))) - '(vmpc-sig-face ((t (nil)))) - '(w3m-anchor-face ((t (nil)))) - '(w3m-arrived-anchor-face ((t (nil)))) - '(w3m-header-line-location-content-face ((t (nil)))) - '(w3m-header-line-location-title-face ((t (nil)))) - '(white ((t (nil)))) - '(widget ((t (nil)))) - '(widget-button-face ((t (nil)))) - '(widget-button-pressed-face ((t (nil)))) - '(widget-documentation-face ((t (nil)))) - '(widget-field-face ((t (nil)))) - '(widget-inactive-face ((t (nil)))) - '(widget-single-line-field-face ((t (nil)))) - '(woman-addition-face ((t (nil)))) - '(woman-bold-face ((t (nil)))) - '(woman-italic-face ((t (nil)))) - '(woman-unknown-face ((t (nil)))) - '(x-face ((t (nil)))) - '(xrdb-option-name-face ((t (nil)))) - '(xref-keyword-face ((t (nil)))) - '(xref-list-default-face ((t (nil)))) - '(xref-list-pilot-face ((t (nil)))) - '(xref-list-symbol-face ((t (nil)))) - '(yellow ((t (nil)))) - '(zmacs-region ((t (nil))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'matrix) - -;;; matrix-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/midnight-theme.el b/elpa/color-theme-modern-0.0.3/midnight-theme.el deleted file mode 100644 index 879296b..0000000 --- a/elpa/color-theme-modern-0.0.3/midnight-theme.el +++ /dev/null @@ -1,64 +0,0 @@ -;;; midnight-theme.el --- midnight theme - -;; Copyright (C) 2000 by Gordon Messmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of midnight theme from `color-themes' - -;;; Code: - -(deftheme midnight - "midnight theme") - -(custom-theme-set-faces - 'midnight - - '(default ((t (:background "black" :foreground "grey85")))) - '(mouse ((t (:foreground "grey85")))) - '(cursor ((t (:background "grey85")))) - - '(font-lock-comment-face ((t (:italic t :foreground "grey60")))) - '(font-lock-string-face ((t (:foreground "Magenta")))) - '(font-lock-keyword-face ((t (:foreground "Cyan")))) - '(font-lock-warning-face ((t (:bold t :foreground "Pink")))) - '(font-lock-constant-face ((t (:foreground "OliveDrab")))) - '(font-lock-type-face ((t (:foreground "DarkCyan")))) - '(font-lock-variable-name-face ((t (:foreground "DarkGoldenrod")))) - '(font-lock-function-name-face ((t (:foreground "SlateBlue")))) - '(font-lock-builtin-face ((t (:foreground "SkyBlue")))) - '(highline-face ((t (:background "grey12")))) - '(setnu-line-number-face ((t (:background "Grey15" :foreground "White" :bold t)))) - '(show-paren-match-face ((t (:background "grey30")))) - '(region ((t (:background "grey15")))) - '(highlight ((t (:background "blue")))) - '(secondary-selection ((t (:background "navy")))) - '(widget-field-face ((t (:background "navy")))) - '(widget-single-line-field-face ((t (:background "royalblue"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'midnight) - -;;; midnight-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/mistyday-theme.el b/elpa/color-theme-modern-0.0.3/mistyday-theme.el deleted file mode 100644 index 687c4f5..0000000 --- a/elpa/color-theme-modern-0.0.3/mistyday-theme.el +++ /dev/null @@ -1,101 +0,0 @@ -;;; mistyday-theme.el --- mistyday theme - -;; Copyright (C) 2001 by K.C. Hari Kumar -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of mistyday theme from `color-themes' - -;;; Code: - -(deftheme mistyday - "mistyday theme") - -(custom-theme-set-faces - 'mistyday - - '(default ((t (:background "mistyrose" :foreground "Black")))) - '(mouse ((t (:foreground "black")))) - '(cursor ((t (:background "deep pink")))) - '(border ((t (:foreground "black")))) - - '(goto-address-mail-face ((t (:italic t)))) - '(goto-address-mail-mouse-face ((t (:background "forest green" :foreground "white smoke")))) - '(goto-address-url-face ((t (:bold t)))) - '(goto-address-url-mouse-face ((t (:background "dark slate grey" :foreground "light cyan")))) - '(list-matching-lines-face ((t (:bold t)))) - - '(default ((t (nil)))) - '(CUA-global-mark-face ((t (:background "cyan" :foreground "black")))) - '(CUA-rectangle-face ((t (:background "maroon" :foreground "white")))) - '(CUA-rectangle-noselect-face ((t (:background "dimgray" :foreground "white")))) - '(bold ((t (:bold t)))) - '(bold-italic ((t (:italic t :bold t)))) - '(calendar-today-face ((t (:underline t :background "Spring Green" :foreground "Brown")))) - '(custom-button-face ((t (:background "dark slate grey" :foreground "azure")))) - '(custom-documentation-face ((t (:background "white" :foreground "blue")))) - '(diary-face ((t (:background "navy" :foreground "yellow")))) - '(font-latex-bold-face ((t (:bold t :foreground "DarkOliveGreen")))) - '(font-latex-italic-face ((t (:italic t :foreground "DarkOliveGreen")))) - '(font-latex-math-face ((t (:foreground "navy")))) - '(font-latex-sedate-face ((t (:foreground "DimGray")))) - '(font-latex-string-face ((t (nil)))) - '(font-latex-warning-face ((t (nil)))) - '(font-lock-builtin-face ((t (:background "DarkTurquoise" :foreground "Navy")))) - '(font-lock-comment-face ((t (:italic t :foreground "royal blue")))) - '(font-lock-constant-face ((t (:background "pale green" :foreground "dark slate blue")))) - '(font-lock-doc-string-face ((t (:background "medium aquamarine" :foreground "deep pink")))) - '(font-lock-function-name-face ((t (:background "SpringGreen" :foreground "MidnightBlue")))) - '(font-lock-keyword-face ((t (:foreground "dark magenta")))) - '(font-lock-preprocessor-face ((t (:background "pale green" :foreground "dark slate blue")))) - '(font-lock-reference-face ((t (:background "DarkTurquoise" :foreground "Navy")))) - '(font-lock-string-face ((t (:background "medium aquamarine" :foreground "deep pink")))) - '(font-lock-type-face ((t (:background "steel blue" :foreground "khaki")))) - '(font-lock-variable-name-face ((t (:background "thistle" :foreground "orange red")))) - '(font-lock-warning-face ((t (:background "LemonChiffon" :foreground "Red")))) - '(highlight ((t (:background "dark slate grey" :foreground "light cyan")))) - '(holiday-face ((t (:background "orangered" :foreground "lightyellow")))) - '(ido-first-match-face ((t (:bold t)))) - '(ido-only-match-face ((t (:foreground "ForestGreen")))) - '(ido-subdir-face ((t (:foreground "red")))) - '(italic ((t (:italic t)))) - '(isearch ((t (:background "sienna" :foreground "light cyan")))) - '(modeline ((t (:background "Royalblue4" :foreground "lawn green")))) - '(modeline-buffer-id ((t (:background "Royalblue4" :foreground "lawn green")))) - '(modeline-mousable ((t (:background "Royalblue4" :foreground "lawn green")))) - '(modeline-mousable-minor-mode ((t (:background "Royalblue4" :foreground "lawn green")))) - '(paren-face-match ((t (:background "turquoise")))) - '(paren-face-mismatch ((t (:background "purple" :foreground "white")))) - '(paren-face-no-match ((t (:background "yellow" :foreground "black")))) - '(primary-selection ((t (:background "sienna" :foreground "light cyan")))) - '(region ((t (:background "sienna" :foreground "light cyan")))) - '(secondary-selection ((t (:background "forest green" :foreground "white smoke")))) - '(underline ((t (:underline t)))) - '(zmacs-region ((t (:background "sienna" :foreground "light cyan"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'mistyday) - -;;; mistyday-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/montz-theme.el b/elpa/color-theme-modern-0.0.3/montz-theme.el deleted file mode 100644 index 5a011ba..0000000 --- a/elpa/color-theme-modern-0.0.3/montz-theme.el +++ /dev/null @@ -1,196 +0,0 @@ -;;; montz-theme.el --- montz theme - -;; Copyright (C) 2000 by Brady Montz -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of montz theme from `color-themes' - -;;; Code: - -(deftheme montz - "montz theme") - -(custom-theme-set-faces - 'montz - - '(default ((t (:background "gray80" :foreground "black")))) - '(cursor ((t (:background "Red3")))) - '(border ((t (:foreground "black")))) - - '(gnus-mouse-face ((t (:background "darkseagreen2")))) - '(smiley-mouse-face ((t (:background "darkseagreen2")))) - - '(bbdb-company ((t (:italic t)))) - '(bbdb-field-name ((t (:bold t)))) - '(bbdb-field-value ((t (nil)))) - '(bbdb-name ((t (:underline t)))) - '(blue ((t (:foreground "blue")))) - '(bold ((t (:bold t)))) - '(bold-italic ((t (:italic t :bold t)))) - '(border-glyph ((t (nil)))) - '(dired-face-boring ((t (:foreground "Gray65")))) - '(dired-face-directory ((t (:bold t)))) - '(dired-face-executable ((t (:foreground "SeaGreen")))) - '(dired-face-flagged ((t (:background "LightSlateGray")))) - '(dired-face-marked ((t (:background "PaleVioletRed")))) - '(dired-face-permissions ((t (:background "grey75" :foreground "black")))) - '(dired-face-setuid ((t (:foreground "Red")))) - '(dired-face-socket ((t (:foreground "magenta")))) - '(dired-face-symlink ((t (:foreground "cyan")))) - '(display-time-mail-balloon-enhance-face ((t (:background "orange")))) - '(display-time-mail-balloon-gnus-group-face ((t (:foreground "blue")))) - '(display-time-time-balloon-face ((t (:foreground "red")))) - '(font-lock-builtin-face ((t (:foreground "red3")))) - '(font-lock-comment-face ((t (:foreground "blue")))) - '(font-lock-constant-face ((t (:foreground "red3")))) - '(font-lock-doc-string-face ((t (:foreground "mediumvioletred")))) - '(font-lock-function-name-face ((t (:foreground "firebrick")))) - '(font-lock-keyword-face ((t (:bold t :foreground "black")))) - '(font-lock-preprocessor-face ((t (:foreground "blue3")))) - '(font-lock-reference-face ((t (:foreground "red3")))) - '(font-lock-string-face ((t (:foreground "mediumvioletred")))) - '(font-lock-type-face ((t (:foreground "darkgreen")))) - '(font-lock-variable-name-face ((t (:foreground "black")))) - '(font-lock-warning-face ((t (:bold t :foreground "Red")))) - '(gnus-cite-attribution-face ((t (:italic t)))) - '(gnus-cite-face-1 ((t (:foreground "MidnightBlue")))) - '(gnus-cite-face-10 ((t (:foreground "medium purple")))) - '(gnus-cite-face-11 ((t (:foreground "turquoise")))) - '(gnus-cite-face-2 ((t (:foreground "firebrick")))) - '(gnus-cite-face-3 ((t (:foreground "dark green")))) - '(gnus-cite-face-4 ((t (:foreground "OrangeRed")))) - '(gnus-cite-face-5 ((t (:foreground "dark khaki")))) - '(gnus-cite-face-6 ((t (:foreground "dark violet")))) - '(gnus-cite-face-7 ((t (:foreground "SteelBlue4")))) - '(gnus-cite-face-8 ((t (:foreground "magenta")))) - '(gnus-cite-face-9 ((t (:foreground "violet")))) - '(gnus-emphasis-bold ((t (:bold t)))) - '(gnus-emphasis-bold-italic ((t (:bold t)))) - '(gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) - '(gnus-emphasis-italic ((t (:italic t)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(gnus-emphasis-underline-bold ((t (:underline t :bold t)))) - '(gnus-emphasis-underline-bold-italic ((t (:underline t :bold t)))) - '(gnus-emphasis-underline-italic ((t (:underline t :italic t)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "DeepPink3")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "DeepPink3")))) - '(gnus-group-mail-2-empty-face ((t (:foreground "HotPink3")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "HotPink3")))) - '(gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "magenta4")))) - '(gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "DeepPink4")))) - '(gnus-group-news-1-empty-face ((t (:foreground "ForestGreen")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "ForestGreen")))) - '(gnus-group-news-2-empty-face ((t (:foreground "CadetBlue4")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "CadetBlue4")))) - '(gnus-group-news-3-empty-face ((t (nil)))) - '(gnus-group-news-3-face ((t (:bold t)))) - '(gnus-group-news-4-empty-face ((t (nil)))) - '(gnus-group-news-4-face ((t (:bold t)))) - '(gnus-group-news-5-empty-face ((t (nil)))) - '(gnus-group-news-5-face ((t (:bold t)))) - '(gnus-group-news-6-empty-face ((t (nil)))) - '(gnus-group-news-6-face ((t (:bold t)))) - '(gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "DarkGreen")))) - '(gnus-header-content-face ((t (:italic t :foreground "indianred4")))) - '(gnus-header-from-face ((t (:foreground "red3")))) - '(gnus-header-name-face ((t (:foreground "maroon")))) - '(gnus-header-newsgroups-face ((t (:italic t :foreground "MidnightBlue")))) - '(gnus-header-subject-face ((t (:foreground "red4")))) - '(gnus-picons-face ((t (:background "white" :foreground "black")))) - '(gnus-picons-xbm-face ((t (:background "white" :foreground "black")))) - '(gnus-signature-face ((t (:italic t)))) - '(gnus-splash-face ((t (:foreground "Brown")))) - '(gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "RoyalBlue")))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "DarkGreen")))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "firebrick")))) - '(gnus-summary-high-unread-face ((t (:bold t)))) - '(gnus-summary-low-ancient-face ((t (:italic t :foreground "RoyalBlue")))) - '(gnus-summary-low-read-face ((t (:italic t :foreground "DarkGreen")))) - '(gnus-summary-low-ticked-face ((t (:italic t :foreground "firebrick")))) - '(gnus-summary-low-unread-face ((t (:italic t)))) - '(gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) - '(gnus-summary-normal-read-face ((t (:foreground "DarkGreen")))) - '(gnus-summary-normal-ticked-face ((t (:foreground "firebrick")))) - '(gnus-summary-normal-unread-face ((t (nil)))) - '(gnus-summary-selected-face ((t (:underline t)))) - '(gnus-x-face ((t (:background "white" :foreground "black")))) - '(green ((t (:foreground "green")))) - '(gui-button-face ((t (:background "grey75" :foreground "black")))) - '(gui-element ((t (nil)))) - '(highlight ((t (:background "darkseagreen2")))) - '(info-node ((t (:bold t)))) - '(info-xref ((t (:bold t)))) - '(isearch ((t (:background "paleturquoise")))) - '(italic ((t (:italic t)))) - '(left-margin ((t (nil)))) - '(list-mode-item-selected ((t (:background "gray68" :foreground "black")))) - '(message-cited-text-face ((t (:foreground "red")))) - '(message-header-cc-face ((t (:foreground "MidnightBlue")))) - '(message-header-name-face ((t (:foreground "cornflower blue")))) - '(message-header-newsgroups-face ((t (:bold t :foreground "blue4")))) - '(message-header-other-face ((t (:foreground "steel blue")))) - '(message-header-subject-face ((t (:bold t :foreground "navy blue")))) - '(message-header-to-face ((t (:bold t :foreground "MidnightBlue")))) - '(message-header-xheader-face ((t (:foreground "blue")))) - '(message-mml-face ((t (:foreground "ForestGreen")))) - '(message-separator-face ((t (:foreground "brown")))) - '(modeline ((t (nil)))) - '(modeline-buffer-id ((t (:background "Gray80" :foreground "blue4")))) - '(modeline-mousable ((t (:background "Gray80" :foreground "firebrick")))) - '(modeline-mousable-minor-mode ((t (:background "Gray80" :foreground "green4")))) - '(paren-face-match ((t (:background "turquoise")))) - '(paren-face-mismatch ((t (:background "purple" :foreground "white")))) - '(paren-face-no-match ((t (:background "yellow" :foreground "black")))) - '(pointer ((t (nil)))) - '(primary-selection ((t (:background "gray65")))) - '(red ((t (:foreground "red")))) - '(right-margin ((t (nil)))) - '(secondary-selection ((t (:background "paleturquoise")))) - '(text-cursor ((t (:background "Red3" :foreground "gray80")))) - '(toolbar ((t (nil)))) - '(underline ((t (:underline t)))) - '(vertical-divider ((t (nil)))) - '(viper-minibuffer-emacs-face ((t (:background "gray80" :foreground "black")))) - '(viper-minibuffer-insert-face ((t (:background "gray80" :foreground "black")))) - '(viper-minibuffer-vi-face ((t (:background "gray80" :foreground "black")))) - '(viper-replace-overlay-face ((t (:background "black" :foreground "white")))) - '(viper-search-face ((t (:background "black" :foreground "white")))) - '(widget-button-face ((t (:bold t)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "dark green")))) - '(widget-field-face ((t (:background "gray85")))) - '(widget-inactive-face ((t (:foreground "dim gray")))) - '(yellow ((t (:foreground "yellow")))) - '(zmacs-region ((t (:background "black" :foreground "white"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'montz) - -;;; montz-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/oswald-theme.el b/elpa/color-theme-modern-0.0.3/oswald-theme.el deleted file mode 100644 index 5269185..0000000 --- a/elpa/color-theme-modern-0.0.3/oswald-theme.el +++ /dev/null @@ -1,97 +0,0 @@ -;;; oswald-theme.el --- oswald theme - -;; Copyright (C) 2001 by Tom Oswald -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of oswald theme from `color-themes' - -;;; Code: - -(deftheme oswald - "oswald theme") - -(custom-theme-set-faces - 'oswald - - '(default ((t (:background "black" :foreground "green")))) - '(mouse ((t (:foreground "black")))) - '(cursor ((t (:background "black")))) - '(border ((t (:foreground "black")))) - - '(list-matching-lines-face ((t (:bold t)))) - '(view-highlight-face ((t (:background "yellow" :foreground "red")))) - - '(blank-space-face ((t (:background "LightGray")))) - '(blank-tab-face ((t (:background "green" :foreground "black")))) - '(bold ((t (:bold t)))) - '(bold-italic ((t (:italic t :bold t)))) - '(ediff-current-diff-face-A ((t (:background "pale green" :foreground "firebrick")))) - '(ediff-current-diff-face-Ancestor ((t (:background "VioletRed" :foreground "Black")))) - '(ediff-current-diff-face-B ((t (:background "Yellow" :foreground "DarkOrchid")))) - '(ediff-current-diff-face-C ((t (:background "Pink" :foreground "Navy")))) - '(ediff-even-diff-face-A ((t (:background "light grey" :foreground "Black")))) - '(ediff-even-diff-face-Ancestor ((t (:background "Grey" :foreground "White")))) - '(ediff-even-diff-face-B ((t (:background "Grey" :foreground "White")))) - '(ediff-even-diff-face-C ((t (:background "light grey" :foreground "Black")))) - '(ediff-fine-diff-face-A ((t (:background "sky blue" :foreground "Navy")))) - '(ediff-fine-diff-face-Ancestor ((t (:background "Green" :foreground "Black")))) - '(ediff-fine-diff-face-B ((t (:background "cyan" :foreground "Black")))) - '(ediff-fine-diff-face-C ((t (:background "Turquoise" :foreground "Black")))) - '(ediff-odd-diff-face-A ((t (:background "Grey" :foreground "White")))) - '(ediff-odd-diff-face-Ancestor ((t (:background "light grey" :foreground "Black")))) - '(ediff-odd-diff-face-B ((t (:background "light grey" :foreground "Black")))) - '(ediff-odd-diff-face-C ((t (:background "Grey" :foreground "White")))) - '(font-lock-builtin-face ((t (:italic t :bold t :foreground "LightSteelBlue")))) - '(font-lock-comment-face ((t (:italic t :foreground "LightGoldenrod4")))) - '(font-lock-constant-face ((t (:italic t :foreground "HotPink")))) - '(font-lock-doc-string-face ((t (:italic t :foreground "orange")))) - '(font-lock-function-name-face ((t (:italic t :bold t :foreground "red")))) - '(font-lock-keyword-face ((t (:foreground "red")))) - '(font-lock-preprocessor-face ((t (:italic t :foreground "HotPink")))) - '(font-lock-string-face ((t (:italic t :foreground "orange")))) - '(font-lock-reference-face ((t (:italic t :bold t :foreground "LightSteelBlue")))) - '(font-lock-type-face ((t (:italic t :foreground "LightSlateBlue")))) - '(font-lock-variable-name-face ((t (:underline t :foreground "LightGoldenrod")))) - '(font-lock-warning-face ((t (:bold t :foreground "Pink")))) - '(highlight ((t (:background "yellow" :foreground "red")))) - '(isearch ((t (:background "dim gray" :foreground "aquamarine")))) - '(ispell-face ((t (:bold t :background "#3454b4" :foreground "yellow")))) - '(italic ((t (:italic t)))) - '(modeline ((t (:background "green" :foreground "black")))) - '(modeline-buffer-id ((t (:background "green" :foreground "black")))) - '(modeline-mousable ((t (:background "green" :foreground "black")))) - '(modeline-mousable-minor-mode ((t (:background "green" :foreground "black")))) - '(region ((t (:background "dim gray" :foreground "aquamarine")))) - '(secondary-selection ((t (:background "darkslateblue" :foreground "light goldenrod")))) - '(show-paren-match-face ((t (:background "turquoise" :foreground "black")))) - '(show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) - '(underline ((t (:underline t)))) - '(zmacs-region ((t (:background "dim gray" :foreground "aquamarine"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'oswald) - -;;; oswald-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/parus-theme.el b/elpa/color-theme-modern-0.0.3/parus-theme.el deleted file mode 100644 index 99430ab..0000000 --- a/elpa/color-theme-modern-0.0.3/parus-theme.el +++ /dev/null @@ -1,165 +0,0 @@ -;;; parus-theme.el --- parus theme - -;; Copyright (C) 2000 by Jon K Hellank -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of parus theme from `color-themes' - -;;; Code: - -(deftheme parus - "parus theme") - -(custom-theme-set-faces - 'parus - - '(default ((t (:background "#00005a" :foreground "White")))) - '(mouse ((t (:foreground "yellow")))) - '(cursor ((t (:background "yellow")))) - '(border ((t (:foreground "black")))) - - '(gnus-mouse-face ((t (:background "darkolivegreen")))) - '(list-matching-lines-face ((t (:bold t)))) - '(paren-face ((t (:bold t)))) - '(view-highlight-face ((t (:background "darkolivegreen")))) - - '(bold ((t (:bold t)))) - '(bold-italic ((t (:italic t :bold t)))) - '(font-latex-bold-face ((t (:bold t :foreground "OliveDrab")))) - '(font-latex-italic-face ((t (:italic t :foreground "OliveDrab")))) - '(font-latex-math-face ((t (:foreground "burlywood")))) - '(font-latex-sedate-face ((t (:foreground "LightGray")))) - '(font-latex-string-face ((t (:foreground "LightSalmon")))) - '(font-latex-warning-face ((t (:foreground "Pink")))) - '(font-lock-builtin-face ((t (:foreground "#e0e0ff")))) - '(font-lock-reference-face ((t (:foreground "#e0e0ff")))) - '(font-lock-comment-face ((t (:foreground "#FFd1d1")))) - '(font-lock-constant-face ((t (:foreground "Aquamarine")))) - '(font-lock-preprocessor-face ((t (:foreground "Aquamarine")))) - '(font-lock-function-name-face ((t (:foreground "#b2e4ff")))) - '(font-lock-keyword-face ((t (:foreground "#a0ffff")))) - '(font-lock-string-face ((t (:foreground "#efca10")))) - '(font-lock-doc-string-face ((t (:foreground "#efca10")))) - '(font-lock-type-face ((t (:foreground "PaleGreen")))) - '(font-lock-variable-name-face ((t (:foreground "LightGoldenrod")))) - '(font-lock-warning-face ((t (:bold t :foreground "Pink")))) - '(gnus-cite-attribution-face ((t (:italic t)))) - '(gnus-cite-face-1 ((t (:foreground "#dfdfff")))) - '(gnus-cite-face-10 ((t (:foreground "medium purple")))) - '(gnus-cite-face-11 ((t (:foreground "turquoise")))) - '(gnus-cite-face-2 ((t (:foreground "light cyan")))) - '(gnus-cite-face-3 ((t (:foreground "light yellow")))) - '(gnus-cite-face-4 ((t (:foreground "light pink")))) - '(gnus-cite-face-5 ((t (:foreground "pale green")))) - '(gnus-cite-face-6 ((t (:foreground "beige")))) - '(gnus-cite-face-7 ((t (:foreground "orange")))) - '(gnus-cite-face-8 ((t (:foreground "magenta")))) - '(gnus-cite-face-9 ((t (:foreground "violet")))) - '(gnus-emphasis-bold ((t (:bold t)))) - '(gnus-emphasis-bold-italic ((t (:italic t :bold t)))) - '(gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) - '(gnus-emphasis-italic ((t (:italic t)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(gnus-emphasis-underline-bold ((t (:underline t :bold t)))) - '(gnus-emphasis-underline-bold-italic ((t (:underline t :italic t :bold t)))) - '(gnus-emphasis-underline-italic ((t (:underline t :italic t)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "aquamarine1")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "aquamarine1")))) - '(gnus-group-mail-2-empty-face ((t (:foreground "aquamarine2")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "aquamarine2")))) - '(gnus-group-mail-3-empty-face ((t (:foreground "aquamarine3")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "aquamarine3")))) - '(gnus-group-mail-low-empty-face ((t (:foreground "aquamarine4")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "aquamarine4")))) - '(gnus-group-news-1-empty-face ((t (:foreground "PaleTurquoise")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "PaleTurquoise")))) - '(gnus-group-news-2-empty-face ((t (:foreground "turquoise")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "turquoise")))) - '(gnus-group-news-3-empty-face ((t (nil)))) - '(gnus-group-news-3-face ((t (:bold t)))) - '(gnus-group-news-4-empty-face ((t (nil)))) - '(gnus-group-news-4-face ((t (:bold t)))) - '(gnus-group-news-5-empty-face ((t (nil)))) - '(gnus-group-news-5-face ((t (:bold t)))) - '(gnus-group-news-6-empty-face ((t (nil)))) - '(gnus-group-news-6-face ((t (:bold t)))) - '(gnus-group-news-low-empty-face ((t (:foreground "DarkTurquoise")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "DarkTurquoise")))) - '(gnus-header-content-face ((t (:italic t :foreground "#90f490")))) - '(gnus-header-from-face ((t (:foreground "#aaffaa")))) - '(gnus-header-name-face ((t (:foreground "#c7e3c7")))) - '(gnus-header-newsgroups-face ((t (:italic t :foreground "yellow")))) - '(gnus-header-subject-face ((t (:foreground "#a0f0a0")))) - '(gnus-signature-face ((t (:italic t)))) - '(gnus-splash-face ((t (:foreground "Brown")))) - '(gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "SkyBlue")))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "PaleGreen")))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "pink")))) - '(gnus-summary-high-unread-face ((t (:bold t)))) - '(gnus-summary-low-ancient-face ((t (:italic t :foreground "SkyBlue")))) - '(gnus-summary-low-read-face ((t (:italic t :foreground "PaleGreen")))) - '(gnus-summary-low-ticked-face ((t (:italic t :foreground "pink")))) - '(gnus-summary-low-unread-face ((t (:italic t)))) - '(gnus-summary-normal-ancient-face ((t (:foreground "SkyBlue")))) - '(gnus-summary-normal-read-face ((t (:foreground "PaleGreen")))) - '(gnus-summary-normal-ticked-face ((t (:foreground "pink")))) - '(gnus-summary-normal-unread-face ((t (nil)))) - '(gnus-summary-selected-face ((t (:underline t)))) - '(highlight ((t (:background "darkolivegreen")))) - '(italic ((t (:italic t)))) - '(message-cited-text-face ((t (:foreground "#dfdfff")))) - '(message-header-cc-face ((t (:bold t :foreground "#a0f0a0")))) - '(message-header-name-face ((t (:foreground "#c7e3c7")))) - '(message-header-newsgroups-face ((t (:italic t :bold t :foreground "yellow")))) - '(message-header-other-face ((t (:foreground "#db9b9b")))) - '(message-header-subject-face ((t (:foreground "#a0f0a0")))) - '(message-header-to-face ((t (:bold t :foreground "#aaffaa")))) - '(message-header-xheader-face ((t (:foreground "#e2e2ff")))) - '(message-mml-face ((t (:foreground "#abdbab")))) - '(message-separator-face ((t (:foreground "#dfdfff")))) - '(modeline ((t (:background "White" :foreground "#00005a")))) - '(modeline-buffer-id ((t (:background "White" :foreground "#00005a")))) - '(modeline-mousable ((t (:background "White" :foreground "#00005a")))) - '(modeline-mousable-minor-mode ((t (:background "White" :foreground "#00005a")))) - '(paren-mismatch-face ((t (:background "DeepPink")))) - '(paren-no-match-face ((t (:background "yellow")))) - '(region ((t (:background "blue")))) - '(primary-selection ((t (:background "blue")))) - '(isearch ((t (:background "blue")))) - '(secondary-selection ((t (:background "darkslateblue")))) - '(underline ((t (:underline t)))) - '(widget-button-face ((t (:bold t)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "lime green")))) - '(widget-field-face ((t (:background "dim gray")))) - '(widget-inactive-face ((t (:foreground "light gray")))) - '(widget-single-line-field-face ((t (:background "dim gray"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'parus) - -;;; parus-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/pierson-theme.el b/elpa/color-theme-modern-0.0.3/pierson-theme.el deleted file mode 100644 index f3b49e4..0000000 --- a/elpa/color-theme-modern-0.0.3/pierson-theme.el +++ /dev/null @@ -1,70 +0,0 @@ -;;; pierson-theme.el --- pierson theme - -;; Copyright (C) 2000 by Dan L. Pierson -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of pierson theme from `color-themes' - -;;; Code: - -(deftheme pierson - "pierson theme") - -(custom-theme-set-faces - 'pierson - - '(default ((t (:background "AntiqueWhite" :foreground "black")))) - '(cursor ((t (:background "Orchid")))) - '(border ((t (:foreground "black")))) - - '(bold ((t (:bold t)))) - '(list-matching-lines-face ((t (:bold t)))) - '(bold-italic ((t (:italic t :bold t)))) - '(font-lock-builtin-face ((t (:foreground "Orchid")))) - '(font-lock-comment-face ((t (:foreground "ForestGreen")))) - '(font-lock-constant-face ((t (:foreground "CadetBlue")))) - '(font-lock-function-name-face ((t (:foreground "blue3")))) - '(font-lock-keyword-face ((t (:foreground "Blue")))) - '(font-lock-string-face ((t (:foreground "Firebrick")))) - '(font-lock-type-face ((t (:foreground "Purple")))) - '(font-lock-variable-name-face ((t (:foreground "blue3")))) - '(font-lock-warning-face ((t (:bold t :foreground "Red")))) - '(highlight ((t (:background "darkseagreen2")))) - '(italic ((t (:italic t)))) - '(modeline ((t (:foreground "antiquewhite" :background "black")))) - '(modeline-mousable-minor-mode ((t (:foreground "antiquewhite" :background "black")))) - '(modeline-mousable ((t (:foreground "antiquewhite" :background "black")))) - '(modeline-buffer-id ((t (:foreground "antiquewhite" :background "black")))) - '(region ((t (:background "gray")))) - '(secondary-selection ((t (:background "paleturquoise")))) - '(show-paren-match-face ((t (:background "turquoise")))) - '(show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) - '(underline ((t (:underline t))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'pierson) - -;;; pierson-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/pok-wob-theme.el b/elpa/color-theme-modern-0.0.3/pok-wob-theme.el deleted file mode 100644 index a563218..0000000 --- a/elpa/color-theme-modern-0.0.3/pok-wob-theme.el +++ /dev/null @@ -1,181 +0,0 @@ -;;; pok-wob-theme.el --- pok-wob theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of pok-wob theme from `color-themes' - -;;; Code: - -(deftheme pok-wob - "pok-wob theme") - -(custom-theme-set-faces - 'pok-wob - - '(default ((t (:background "black" :foreground "white")))) - '(mouse ((t (:foreground "gold")))) - '(cursor ((t (:background "yellow")))) - '(border ((t (:foreground "black")))) - - '(bold ((t (:bold t :foreground "light gray")))) - '(bold-italic ((t (:italic t :bold t :foreground "cyan")))) - '(calendar-today-face ((t (:underline t :foreground "white")))) - '(custom-button-face ((t (nil)))) - '(custom-changed-face ((t (:background "blue" :foreground "white")))) - '(custom-documentation-face ((t (nil)))) - '(custom-face-tag-face ((t (:underline t)))) - '(custom-group-tag-face ((t (:underline t)))) - '(custom-group-tag-face-1 ((t (:underline t)))) - '(custom-invalid-face ((t (:background "red" :foreground "white")))) - '(custom-modified-face ((t (:background "blue" :foreground "white")))) - '(custom-rogue-face ((t (:background "black" :foreground "pink")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:background "white" :foreground "blue")))) - '(custom-state-face ((t (nil)))) - '(custom-variable-button-face ((t (:underline t :bold t)))) - '(custom-variable-tag-face ((t (:underline t)))) - '(diary-face ((t (:foreground "gold")))) - '(font-lock-builtin-face ((t (:bold t :foreground "cyan")))) - '(font-lock-comment-face ((t (:foreground "Gold")))) - '(font-lock-constant-face ((t (:bold t :foreground "LightSteelBlue")))) - '(font-lock-function-name-face ((t (:bold t :foreground "gold")))) - '(font-lock-keyword-face ((t (:bold t :foreground "Cyan")))) - '(font-lock-string-face ((t (:foreground "Khaki")))) - '(font-lock-type-face ((t (:bold t :foreground "Cyan")))) - '(font-lock-variable-name-face ((t (:italic t :foreground "gold")))) - '(font-lock-warning-face ((t (:bold t :foreground "Pink")))) - '(gnus-cite-attribution-face ((t (:underline t :foreground "beige")))) - '(gnus-cite-face-1 ((t (:foreground "gold")))) - '(gnus-cite-face-10 ((t (:foreground "coral")))) - '(gnus-cite-face-11 ((t (:foreground "turquoise")))) - '(gnus-cite-face-2 ((t (:foreground "wheat")))) - '(gnus-cite-face-3 ((t (:foreground "light pink")))) - '(gnus-cite-face-4 ((t (:foreground "khaki")))) - '(gnus-cite-face-5 ((t (:foreground "pale green")))) - '(gnus-cite-face-6 ((t (:foreground "beige")))) - '(gnus-cite-face-7 ((t (:foreground "orange")))) - '(gnus-cite-face-8 ((t (:foreground "magenta")))) - '(gnus-cite-face-9 ((t (:foreground "violet")))) - '(gnus-emphasis-bold ((t (:bold t :foreground "light gray")))) - '(gnus-emphasis-bold-italic ((t (:italic t :bold t :foreground "cyan")))) - '(gnus-emphasis-highlight-words ((t (:background "black" :foreground "gold")))) - '(gnus-emphasis-italic ((t (:italic t :foreground "cyan")))) - '(gnus-emphasis-underline ((t (:underline t :foreground "white")))) - '(gnus-emphasis-underline-bold ((t (:underline t :bold t :foreground "white")))) - '(gnus-emphasis-underline-bold-italic ((t (:underline t :italic t :bold t :foreground "white")))) - '(gnus-emphasis-underline-italic ((t (:underline t :italic t :foreground "white")))) - '(gnus-group-mail-1-empty-face ((t (:foreground "Magenta")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "Magenta")))) - '(gnus-group-mail-2-empty-face ((t (:foreground "aquamarine2")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "aquamarine2")))) - '(gnus-group-mail-3-empty-face ((t (:foreground "Cyan")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "Cyan")))) - '(gnus-group-mail-low-empty-face ((t (:foreground "Wheat")))) - '(gnus-group-mail-low-face ((t (:foreground "aquamarine4")))) - '(gnus-group-news-1-empty-face ((t (:foreground "PaleTurquoise")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "PaleTurquoise")))) - '(gnus-group-news-2-empty-face ((t (:foreground "turquoise")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "turquoise")))) - '(gnus-group-news-3-empty-face ((t (:foreground "wheat")))) - '(gnus-group-news-3-face ((t (:bold t :foreground "Wheat")))) - '(gnus-group-news-4-empty-face ((t (nil)))) - '(gnus-group-news-4-face ((t (:bold t)))) - '(gnus-group-news-5-empty-face ((t (nil)))) - '(gnus-group-news-5-face ((t (:bold t)))) - '(gnus-group-news-6-empty-face ((t (nil)))) - '(gnus-group-news-6-face ((t (:bold t)))) - '(gnus-group-news-low-empty-face ((t (:foreground "MediumAquamarine")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "MediumAquamarine")))) - '(gnus-header-content-face ((t (:italic t :foreground "Wheat")))) - '(gnus-header-from-face ((t (:foreground "light yellow")))) - '(gnus-header-name-face ((t (:foreground "Wheat")))) - '(gnus-header-newsgroups-face ((t (:italic t :foreground "gold")))) - '(gnus-header-subject-face ((t (:bold t :foreground "Gold")))) - '(gnus-signature-face ((t (:italic t :foreground "white")))) - '(gnus-splash-face ((t (:foreground "orange")))) - '(gnus-summary-cancelled-face ((t (:background "black" :foreground "orange")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "SkyBlue")))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "red")))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "coral")))) - '(gnus-summary-high-unread-face ((t (:bold t :foreground "gold")))) - '(gnus-summary-low-ancient-face ((t (:italic t :foreground "SkyBlue")))) - '(gnus-summary-low-read-face ((t (:italic t :foreground "red")))) - '(gnus-summary-low-ticked-face ((t (:italic t :foreground "coral")))) - '(gnus-summary-low-unread-face ((t (:italic t :foreground "white")))) - '(gnus-summary-normal-ancient-face ((t (:foreground "SkyBlue")))) - '(gnus-summary-normal-read-face ((t (:foreground "PaleGreen")))) - '(gnus-summary-normal-ticked-face ((t (:foreground "pink")))) - '(gnus-summary-normal-unread-face ((t (:foreground "white")))) - '(gnus-summary-selected-face ((t (:underline t :foreground "white")))) - '(highlight ((t (:background "Blue" :foreground "white")))) - '(highline-face ((t (:background "dark slate gray" :foreground "white")))) - '(holiday-face ((t (:background "red" :foreground "white")))) - '(info-menu-5 ((t (:underline t)))) - '(info-node ((t (:italic t :bold t :foreground "white")))) - '(info-xref ((t (:bold t :foreground "light gray")))) - '(italic ((t (:italic t :foreground "cyan")))) - '(makefile-space-face ((t (:background "hotpink" :foreground "white")))) - '(message-cited-text-face ((t (:foreground "green")))) - '(message-header-cc-face ((t (:bold t :foreground "Aquamarine")))) - '(message-header-name-face ((t (:foreground "Gold")))) - '(message-header-newsgroups-face ((t (:italic t :bold t :foreground "gold")))) - '(message-header-other-face ((t (:foreground "lightGray")))) - '(message-header-subject-face ((t (:foreground "Yellow")))) - '(message-header-to-face ((t (:bold t :foreground "green2")))) - '(message-header-xheader-face ((t (:foreground "sky blue")))) - '(message-mml-face ((t (:bold t :foreground "khaki")))) - '(message-separator-face ((t (:background "aquamarine" :foreground "black")))) - '(modeline ((t (:background "dark gray" :foreground "black")))) - '(modeline-buffer-id ((t (:background "dark gray" :foreground "black")))) - '(modeline-mousable ((t (:background "dark gray" :foreground "black")))) - '(modeline-mousable-minor-mode ((t (:background "dark gray" :foreground "black")))) - '(paren-mismatch-face ((t (:bold t :background "white" :foreground "red")))) - '(paren-no-match-face ((t (:bold t :background "white" :foreground "red")))) - '(region ((t (:background "MediumSlateBlue" :foreground "white")))) - '(secondary-selection ((t (:background "Sienna" :foreground "white")))) - '(show-paren-match-face ((t (:background "purple" :foreground "white")))) - '(show-paren-mismatch-face ((t (:bold t :background "white" :foreground "red")))) - '(speedbar-button-face ((t (nil)))) - '(speedbar-directory-face ((t (nil)))) - '(speedbar-file-face ((t (:bold t)))) - '(speedbar-highlight-face ((t (nil)))) - '(speedbar-selected-face ((t (:underline t)))) - '(speedbar-tag-face ((t (nil)))) - '(swbuff-current-buffer-face ((t (:bold t :foreground "red")))) - '(underline ((t (:underline t :foreground "white")))) - '(widget-button-face ((t (:bold t :foreground "coral")))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "lime green")))) - '(widget-field-face ((t (:background "dim gray" :foreground "white")))) - '(widget-inactive-face ((t (:foreground "light gray")))) - '(widget-single-line-field-face ((t (:background "dim gray" :foreground "white"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'pok-wob) - -;;; pok-wob-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/pok-wog-theme.el b/elpa/color-theme-modern-0.0.3/pok-wog-theme.el deleted file mode 100644 index 72e1c84..0000000 --- a/elpa/color-theme-modern-0.0.3/pok-wog-theme.el +++ /dev/null @@ -1,167 +0,0 @@ -;;; pok-wog-theme.el --- pok-wog theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of pok-wog theme from `color-themes' - -;;; Code: - -(deftheme pok-wog - "pok-wog theme") - -(custom-theme-set-faces - 'pok-wog - - '(default ((t (:background "DarkSlateGray" :foreground "White")))) - '(mouse ((t (:foreground "gold")))) - '(cursor ((t (:background "Cyan")))) - '(border ((t (:foreground "black")))) - - '(bold ((t (:bold t :foreground "Wheat")))) - '(bold-italic ((t (:italic t :bold t :foreground "wheat")))) - '(calendar-today-face ((t (:underline t :foreground "white")))) - '(diary-face ((t (:foreground "red")))) - '(font-lock-builtin-face ((t (:bold t :foreground "cyan")))) - '(font-lock-comment-face ((t (:foreground "Gold")))) - '(font-lock-constant-face ((t (:bold t :foreground "LightSteelBlue")))) - '(font-lock-function-name-face ((t (:bold t :foreground "Yellow")))) - '(font-lock-keyword-face ((t (:bold t :foreground "Cyan")))) - '(font-lock-string-face ((t (:foreground "Khaki")))) - '(font-lock-type-face ((t (:bold t :foreground "Cyan")))) - '(font-lock-variable-name-face ((t (:foreground "LightGoldenrod")))) - '(font-lock-warning-face ((t (:bold t :foreground "Pink")))) - '(gnus-cite-attribution-face ((t (:bold t :foreground "Wheat")))) - '(gnus-cite-face-1 ((t (:foreground "wheat")))) - '(gnus-cite-face-10 ((t (:foreground "wheat")))) - '(gnus-cite-face-11 ((t (:foreground "turquoise")))) - '(gnus-cite-face-2 ((t (:foreground "cyan")))) - '(gnus-cite-face-3 ((t (:foreground "light yellow")))) - '(gnus-cite-face-4 ((t (:foreground "light pink")))) - '(gnus-cite-face-5 ((t (:foreground "pale green")))) - '(gnus-cite-face-6 ((t (:foreground "beige")))) - '(gnus-cite-face-7 ((t (:foreground "orange")))) - '(gnus-cite-face-8 ((t (:foreground "magenta")))) - '(gnus-cite-face-9 ((t (:foreground "violet")))) - '(gnus-emphasis-bold ((t (:bold t :foreground "wheat")))) - '(gnus-emphasis-bold-italic ((t (:italic t :bold t)))) - '(gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) - '(gnus-emphasis-italic ((t (:italic t :foreground "white")))) - '(gnus-emphasis-underline ((t (:underline t :foreground "white")))) - '(gnus-emphasis-underline-bold ((t (:underline t :bold t :foreground "wheat")))) - '(gnus-emphasis-underline-bold-italic ((t (:underline t :italic t :bold t)))) - '(gnus-emphasis-underline-italic ((t (:underline t :italic t :foreground "white")))) - '(gnus-group-mail-1-empty-face ((t (:foreground "aquamarine1")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "aquamarine1")))) - '(gnus-group-mail-2-empty-face ((t (:foreground "aquamarine2")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "aquamarine2")))) - '(gnus-group-mail-3-empty-face ((t (:foreground "Salmon")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "gold")))) - '(gnus-group-mail-low-empty-face ((t (:foreground "Wheat")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "aquamarine4")))) - '(gnus-group-news-1-empty-face ((t (:foreground "PaleTurquoise")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "PaleTurquoise")))) - '(gnus-group-news-2-empty-face ((t (:foreground "turquoise")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "turquoise")))) - '(gnus-group-news-3-empty-face ((t (nil)))) - '(gnus-group-news-3-face ((t (:bold t :foreground "Wheat")))) - '(gnus-group-news-4-empty-face ((t (nil)))) - '(gnus-group-news-4-face ((t (:bold t)))) - '(gnus-group-news-5-empty-face ((t (nil)))) - '(gnus-group-news-5-face ((t (:bold t)))) - '(gnus-group-news-6-empty-face ((t (nil)))) - '(gnus-group-news-6-face ((t (:bold t)))) - '(gnus-group-news-low-empty-face ((t (:foreground "DarkTurquoise")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "DarkTurquoise")))) - '(gnus-header-content-face ((t (:italic t :foreground "Wheat")))) - '(gnus-header-from-face ((t (:foreground "light yellow")))) - '(gnus-header-name-face ((t (:foreground "cyan")))) - '(gnus-header-newsgroups-face ((t (:italic t :foreground "yellow")))) - '(gnus-header-subject-face ((t (:bold t :foreground "Gold")))) - '(gnus-signature-face ((t (:italic t :foreground "wheat")))) - '(gnus-splash-face ((t (:foreground "orange")))) - '(gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "SkyBlue")))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "PaleGreen")))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "pink")))) - '(gnus-summary-high-unread-face ((t (:bold t :foreground "gold")))) - '(gnus-summary-low-ancient-face ((t (:italic t :foreground "SkyBlue")))) - '(gnus-summary-low-read-face ((t (:italic t :foreground "PaleGreen")))) - '(gnus-summary-low-ticked-face ((t (:italic t :foreground "pink")))) - '(gnus-summary-low-unread-face ((t (:italic t)))) - '(gnus-summary-normal-ancient-face ((t (:foreground "SkyBlue")))) - '(gnus-summary-normal-read-face ((t (:foreground "PaleGreen")))) - '(gnus-summary-normal-ticked-face ((t (:foreground "pink")))) - '(gnus-summary-normal-unread-face ((t (:foreground "wheat")))) - '(gnus-summary-selected-face ((t (:underline t :foreground "white")))) - '(highlight ((t (:background "Blue" :foreground "white")))) - '(highline-face ((t (:background "black" :foreground "white")))) - '(holiday-face ((t (:background "pink" :foreground "white")))) - '(info-menu-5 ((t (:underline t)))) - '(info-node ((t (:italic t :bold t :foreground "white")))) - '(info-xref ((t (:bold t :foreground "wheat")))) - '(italic ((t (:italic t :foreground "white")))) - '(makefile-space-face ((t (:background "hotpink")))) - '(message-cited-text-face ((t (:foreground "green")))) - '(message-header-cc-face ((t (:bold t :foreground "Aquamarine")))) - '(message-header-name-face ((t (:foreground "Gold")))) - '(message-header-newsgroups-face ((t (:italic t :bold t :foreground "yellow")))) - '(message-header-other-face ((t (:foreground "lightGray")))) - '(message-header-subject-face ((t (:foreground "Yellow")))) - '(message-header-to-face ((t (:bold t :foreground "green2")))) - '(message-header-xheader-face ((t (:foreground "blue")))) - '(message-mml-face ((t (:bold t :foreground "khaki")))) - '(message-separator-face ((t (:background "aquamarine" :foreground "black")))) - '(modeline ((t (:background "DarkGray" :foreground "Black")))) - '(modeline-buffer-id ((t (:background "DarkGray" :foreground "Black")))) - '(modeline-mousable ((t (:background "DarkGray" :foreground "Black")))) - '(modeline-mousable-minor-mode ((t (:background "DarkGray" :foreground "Black")))) - '(paren-mismatch-face ((t (:background "DeepPink" :foreground "white")))) - '(paren-no-match-face ((t (:background "yellow" :foreground "white")))) - '(region ((t (:background "MediumSlateBlue" :foreground "white")))) - '(secondary-selection ((t (:background "Sienna" :foreground "white")))) - '(show-paren-match-face ((t (:background "turquoise" :foreground "white")))) - '(show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) - '(speedbar-button-face ((t (:bold t :foreground "magenta")))) - '(speedbar-directory-face ((t (:bold t :foreground "orchid")))) - '(speedbar-file-face ((t (:foreground "pink")))) - '(speedbar-highlight-face ((t (:background "black")))) - '(speedbar-selected-face ((t (:underline t :foreground "cyan")))) - '(speedbar-tag-face ((t (:foreground "yellow")))) - '(swbuff-current-buffer-face ((t (:bold t :foreground "red")))) - '(underline ((t (:underline t :foreground "white")))) - '(widget-button-face ((t (:bold t :foreground "wheat")))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "lime green")))) - '(widget-field-face ((t (:background "dim gray" :foreground "white")))) - '(widget-inactive-face ((t (:foreground "light gray")))) - '(widget-single-line-field-face ((t (:background "dim gray" :foreground "white"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'pok-wog) - -;;; pok-wog-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/railscast-theme.el b/elpa/color-theme-modern-0.0.3/railscast-theme.el deleted file mode 100644 index f3c3483..0000000 --- a/elpa/color-theme-modern-0.0.3/railscast-theme.el +++ /dev/null @@ -1,91 +0,0 @@ -;;; railscast-theme.el --- railscast theme - -;; Copyright (C) 2009 Oleg Shaldybin -;; Copyright (C) 2014 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;;; License: - -;; MIT License -;; ----------- -;; Permission is hereby granted, free of charge, to any person -;; obtaining a copy of this software and associated documentation -;; files (the "Software"), to deal in the Software without -;; restriction, including without limitation the rights to use, -;; copy, modify, merge, publish, distribute, sublicense, and/or -;; sell copies of the Software, and to permit persons to whom the -;; Software is furnished to do so, subject to the following -;; conditions: -;; -;; The above copyright notice and this permission notice shall -;; be included in all copies or substantial portions of the -;; Software. -;; -;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -;; OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -;; HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -;; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -;; OTHER DEALINGS IN THE SOFTWARE. - -;;; Commentary: -;; -;; Port of railscast theme from https://github.com/olegshaldybin/color-theme-railscasts.git - -;;; Code: - -(deftheme railscast - "railscast theme") - -(custom-theme-set-faces - 'railscast - - '(default ((t (:background "#232323" :foreground "#E6E1DC")))) - '(border ((t (:foreground "#232323")))) - '(mouse ((t (:foreground "sienna1")))) - '(cursor ((t (:background "#5A647E")))) - - '(blue ((t (:foreground "blue")))) - '(bold ((t (:bold t)))) - '(bold-italic ((t (:italic t :bold t)))) - '(fringe ((t (:background "#232323")))) - '(font-lock-builtin-face ((t (:foreground "#D0D0FF")))) - '(font-lock-comment-face ((t (:foreground "#BC9458" :italic t)))) - '(font-lock-constant-face ((t (:foreground "#6D9CBE")))) - '(font-lock-doc-string-face ((t (:foreground "#A5C261")))) - '(font-lock-function-name-face ((t (:foreground "#FFC66D")))) - '(font-lock-keyword-face ((t (:foreground "#CC7833")))) - '(font-lock-preprocessor-face ((t (:foreground "#CC7833")))) - '(font-lock-reference-face ((t (:foreground "LightSteelBlue")))) - '(font-lock-string-face ((t (:foreground "#A5C261")))) - '(font-lock-type-face ((t (:foreground "white")))) - '(font-lock-variable-name-face ((t (:foreground "LightSteelBlue")))) - '(font-lock-warning-face ((t (:foreground "Pink")))) - '(paren-face-match-light ((t (:foreground "#FFC66D" :background "#555577")))) - '(highlight ((t (:background "darkolivegreen")))) - '(italic ((t (:italic t)))) - '(mode-line ((t (:background "#A5BAF1" :foreground "black")))) - '(mode-line-buffer-id ((t (:background "#A5BAF1" :foreground "black")))) - '(region ((t (:background "#555577")))) - '(primary-selection ((t (:background "#555577")))) - '(isearch ((t (:background "#555555")))) - '(zmacs-region ((t (:background "#555577")))) - '(secondary-selection ((t (:background "darkslateblue")))) - '(flymake-errline ((t (:background "LightSalmon" :foreground "black")))) - '(flymake-warnline ((t (:background "LightSteelBlue" :foreground "black")))) - '(underline ((t (:underline t)))) - '(minibuffer-prompt ((t (:bold t :foreground "#FF6600"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'railscast) - -;;; railscast-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/ramangalahy-theme.el b/elpa/color-theme-modern-0.0.3/ramangalahy-theme.el deleted file mode 100644 index c02a443..0000000 --- a/elpa/color-theme-modern-0.0.3/ramangalahy-theme.el +++ /dev/null @@ -1,211 +0,0 @@ -;;; ramangalahy-theme.el --- ramangalahy theme - -;; Copyright (C) 2000 by Solofo Ramangalahy -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of ramangalahy theme from `color-themes' - -;;; Code: - -(deftheme ramangalahy - "ramangalahy theme") - -(custom-theme-set-faces - 'ramangalahy - - '(default ((t (:background "lightgrey" :foreground "black")))) - '(cursor ((t (:background "blue")))) - '(border ((t (:foreground "black")))) - - '(gnus-mouse-face ((t (:background "darkseagreen2")))) - '(goto-address-mail-face ((t (:underline t :bold t :foreground "#0000ee")))) - '(ispell-highlight-face ((t (:background "darkseagreen2")))) - '(setnu-line-number-face ((t (:bold t)))) - '(tinyreplace-face ((t (:background "darkseagreen2")))) - '(vm-highlight-url-face ((t (:italic t :bold t)))) - '(vm-highlighted-header-face ((t (:bold t)))) - '(vm-mime-button-face ((t (:background "grey75" :foreground "black")))) - '(vm-summary-highlight-face ((t (:bold t)))) - - '(bbdb-company ((t (nil)))) - '(blue ((t (:foreground "blue")))) - '(bold ((t (:bold t)))) - '(bold-italic ((t (:italic t :bold t)))) - '(border-glyph ((t (nil)))) - '(cperl-here-face ((t (:foreground "green4")))) - '(cperl-pod-face ((t (:foreground "brown4")))) - '(cperl-pod-head-face ((t (:foreground "steelblue")))) - '(custom-button-face ((t (:bold t)))) - '(custom-changed-face ((t (:background "blue" :foreground "white")))) - '(custom-documentation-face ((t (nil)))) - '(custom-face-tag-face ((t (:underline t)))) - '(custom-group-tag-face ((t (:underline t :foreground "blue")))) - '(custom-group-tag-face-1 ((t (:underline t :foreground "red")))) - '(custom-invalid-face ((t (:background "red" :foreground "yellow")))) - '(custom-modified-face ((t (:background "blue" :foreground "white")))) - '(custom-rogue-face ((t (:background "black" :foreground "pink")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:background "white" :foreground "blue")))) - '(custom-state-face ((t (:foreground "dark green")))) - '(custom-variable-button-face ((t (:underline t :bold t)))) - '(custom-variable-tag-face ((t (:underline t :foreground "blue")))) - '(dired-face-boring ((t (:foreground "Gray65")))) - '(dired-face-directory ((t (:bold t)))) - '(dired-face-executable ((t (:foreground "SeaGreen")))) - '(dired-face-flagged ((t (:background "LightSlateGray")))) - '(dired-face-marked ((t (:background "PaleVioletRed")))) - '(dired-face-permissions ((t (:background "grey75" :foreground "black")))) - '(dired-face-setuid ((t (:foreground "Red")))) - '(dired-face-socket ((t (:foreground "magenta")))) - '(dired-face-symlink ((t (:foreground "blue")))) - '(display-time-mail-balloon-enhance-face ((t (:background "orange")))) - '(display-time-mail-balloon-gnus-group-face ((t (:foreground "blue")))) - '(display-time-time-balloon-face ((t (:foreground "red")))) - '(ff-paths-non-existant-file-face ((t (:bold t :foreground "NavyBlue")))) - '(font-lock-comment-face ((t (:bold t :foreground "purple")))) - '(font-lock-doc-string-face ((t (:bold t :foreground "slateblue")))) - '(font-lock-emphasized-face ((t (:bold t :background "lightyellow2")))) - '(font-lock-function-name-face ((t (:bold t :foreground "blue")))) - '(font-lock-keyword-face ((t (:bold t :foreground "violetred")))) - '(font-lock-other-emphasized-face ((t (:italic t :bold t :background "lightyellow2")))) - '(font-lock-other-type-face ((t (:bold t :foreground "orange3")))) - '(font-lock-preprocessor-face ((t (:bold t :foreground "mediumblue")))) - '(font-lock-reference-face ((t (:foreground "red3")))) - '(font-lock-string-face ((t (:foreground "green4")))) - '(font-lock-type-face ((t (:bold t :foreground "steelblue")))) - '(font-lock-variable-name-face ((t (:foreground "magenta4")))) - '(font-lock-warning-face ((t (:bold t :background "yellow" :foreground "Red")))) - '(gnus-emphasis-bold ((t (:bold t)))) - '(gnus-emphasis-bold-italic ((t (nil)))) - '(gnus-emphasis-italic ((t (nil)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(gnus-emphasis-underline-bold ((t (:underline t :bold t)))) - '(gnus-emphasis-underline-bold-italic ((t (:underline t)))) - '(gnus-emphasis-underline-italic ((t (:underline t)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "DeepPink3")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "DeepPink3")))) - '(gnus-group-mail-2-empty-face ((t (:foreground "HotPink3")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "HotPink3")))) - '(gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "magenta4")))) - '(gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "DeepPink4")))) - '(gnus-group-news-1-empty-face ((t (:foreground "ForestGreen")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "ForestGreen")))) - '(gnus-group-news-2-empty-face ((t (:foreground "CadetBlue4")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "CadetBlue4")))) - '(gnus-group-news-3-empty-face ((t (:foreground "DeepPink4")))) - '(gnus-group-news-3-face ((t (:bold t :foreground "DeepPink4")))) - '(gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "DarkGreen")))) - '(gnus-header-content-face ((t (:foreground "indianred4")))) - '(gnus-header-from-face ((t (:foreground "red3")))) - '(gnus-header-name-face ((t (:foreground "maroon")))) - '(gnus-header-newsgroups-face ((t (:foreground "MidnightBlue")))) - '(gnus-header-subject-face ((t (:foreground "red4")))) - '(gnus-signature-face ((t (:bold t)))) - '(gnus-splash-face ((t (:foreground "ForestGreen")))) - '(gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "RoyalBlue")))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "DarkGreen")))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "firebrick")))) - '(gnus-summary-high-unread-face ((t (:bold t)))) - '(gnus-summary-low-ancient-face ((t (:foreground "RoyalBlue")))) - '(gnus-summary-low-read-face ((t (:foreground "DarkGreen")))) - '(gnus-summary-low-ticked-face ((t (:foreground "firebrick")))) - '(gnus-summary-low-unread-face ((t (nil)))) - '(gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) - '(gnus-summary-normal-read-face ((t (:foreground "DarkGreen")))) - '(gnus-summary-normal-ticked-face ((t (:foreground "firebrick")))) - '(gnus-summary-normal-unread-face ((t (nil)))) - '(gnus-summary-selected-face ((t (:underline t)))) - '(gnus-x-face ((t (:background "lightgrey" :foreground "black")))) - '(green ((t (:foreground "green")))) - '(gui-button-face ((t (:background "grey75" :foreground "black")))) - '(gui-element ((t (:background "lightgrey")))) - '(highlight ((t (:background "darkseagreen2")))) - '(info-node ((t (:underline t :bold t :foreground "mediumpurple")))) - '(info-xref ((t (:underline t :bold t :foreground "#0000ee")))) - '(isearch ((t (:background "paleturquoise")))) - '(italic ((t (:italic t)))) - '(left-margin ((t (nil)))) - '(list-mode-item-selected ((t (:background "gray68" :foreground "black")))) - '(message-cited-text ((t (:foreground "slategrey")))) - '(message-cited-text-face ((t (:foreground "red")))) - '(message-header-cc-face ((t (:foreground "MidnightBlue")))) - '(message-header-contents ((t (:italic t)))) - '(message-header-name-face ((t (:foreground "cornflower blue")))) - '(message-header-newsgroups-face ((t (:bold t :foreground "blue4")))) - '(message-header-other-face ((t (:foreground "steel blue")))) - '(message-header-subject-face ((t (:bold t :foreground "navy blue")))) - '(message-header-to-face ((t (:bold t :foreground "MidnightBlue")))) - '(message-header-xheader-face ((t (:foreground "blue")))) - '(message-headers ((t (:bold t)))) - '(message-highlighted-header-contents ((t (:bold t)))) - '(message-separator-face ((t (:foreground "brown")))) - '(message-url ((t (:bold t)))) - '(modeline ((t (:bold t :background "Gray75" :foreground "Black")))) - '(modeline-buffer-id ((t (:bold t :background "Gray75" :foreground "blue4")))) - '(modeline-mousable ((t (:bold t :background "Gray75" :foreground "firebrick")))) - '(modeline-mousable-minor-mode ((t (:bold t :background "Gray75" :foreground "green4")))) - '(paren-blink-off ((t (:foreground "lightgrey")))) - '(paren-match ((t (:background "darkseagreen2")))) - '(paren-mismatch ((t (:background "DeepPink" :foreground "black")))) - '(pointer ((t (:foreground "blue")))) - '(primary-selection ((t (:background "gray65")))) - '(red ((t (:foreground "red")))) - '(region ((t (:background "black" :foreground "white")))) - '(right-margin ((t (nil)))) - '(searchm-buffer ((t (:bold t :background "white" :foreground "red")))) - '(searchm-button ((t (:bold t :background "CadetBlue" :foreground "white")))) - '(searchm-field ((t (:background "grey89")))) - '(searchm-field-label ((t (:bold t)))) - '(searchm-highlight ((t (:bold t :background "darkseagreen2" :foreground "black")))) - '(secondary-selection ((t (:background "paleturquoise")))) - '(template-message-face ((t (:bold t)))) - '(text-cursor ((t (:background "blue" :foreground "lightgrey")))) - '(toolbar ((t (nil)))) - '(underline ((t (:underline t)))) - '(vertical-divider ((t (nil)))) - '(widget-button-face ((t (:bold t)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "dark green")))) - '(widget-field-face ((t (:background "gray85")))) - '(widget-inactive-face ((t (:foreground "dim gray")))) - '(x-face ((t (:background "white" :foreground "black")))) - '(x-symbol-adobe-fontspecific-face ((t (nil)))) - '(x-symbol-face ((t (nil)))) - '(x-symbol-heading-face ((t (:underline t :bold t :foreground "green4")))) - '(x-symbol-info-face ((t (:foreground "green4")))) - '(x-symbol-invisible-face ((t (nil)))) - '(x-symbol-revealed-face ((t (:background "pink")))) - '(yellow ((t (:foreground "yellow")))) - '(zmacs-region ((t (:background "yellow"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'ramangalahy) - -;;; ramangalahy-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/raspopovic-theme.el b/elpa/color-theme-modern-0.0.3/raspopovic-theme.el deleted file mode 100644 index 1589c95..0000000 --- a/elpa/color-theme-modern-0.0.3/raspopovic-theme.el +++ /dev/null @@ -1,105 +0,0 @@ -;;; raspopovic-theme.el --- raspopovic theme - -;; Copyright (C) 2000 by Pedja Raspopovic -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of raspopovic theme from `color-themes' - -;;; Code: - -(deftheme raspopovic - "raspopovic theme") - -(custom-theme-set-faces - 'raspopovic - - '(default ((t (:background "darkblue" :foreground "yellow")))) - '(cursor ((t (:background "Red3")))) - '(border ((t (:foreground "black")))) - - '(setnu-line-number-face ((t (:bold t :background "darkblue" :foreground "yellow")))) - '(goto-address-mail-face ((t (:bold t :background "darkblue" :foreground "yellow")))) - - '(blue ((t (:background "darkblue" :foreground "blue")))) - '(bold ((t (:bold t :background "darkblue" :foreground "yellow")))) - '(bold-italic ((t (:bold t :background "darkblue" :foreground "red3")))) - '(comint-input-face ((t (:foreground "deepskyblue")))) - '(dired-face-boring ((t (:foreground "Gray65")))) - '(dired-face-directory ((t (:foreground "lightgreen")))) - '(dired-face-executable ((t (:foreground "indianred")))) - '(dired-face-flagged ((t (:background "LightSlateGray")))) - '(dired-face-marked ((t (:background "darkblue" :foreground "deepskyblue")))) - '(dired-face-permissions ((t (:background "darkblue" :foreground "white")))) - '(dired-face-setuid ((t (:foreground "Red")))) - '(dired-face-socket ((t (:foreground "magenta")))) - '(dired-face-symlink ((t (:foreground "grey95")))) - '(font-lock-comment-face ((t (:background "darkblue" :foreground "lightgreen")))) - '(font-lock-doc-string-face ((t (:background "darkblue" :foreground "darkseagreen")))) - '(font-lock-function-name-face ((t (:bold t :background "darkblue" :foreground "indianred")))) - '(font-lock-keyword-face ((t (:background "darkblue" :foreground "skyblue")))) - '(font-lock-preprocessor-face ((t (:background "darkblue" :foreground "orange")))) - '(font-lock-reference-face ((t (:background "darkblue" :foreground "deepskyblue")))) - '(font-lock-string-face ((t (:background "darkblue" :foreground "lightgrey")))) - '(font-lock-type-face ((t (:background "darkblue" :foreground "orange")))) - '(font-lock-variable-name-face ((t (:background "darkblue" :foreground "white")))) - '(green ((t (:background "darkblue" :foreground "green")))) - '(gui-button-face ((t (:background "grey75" :foreground "black")))) - '(highlight ((t (:background "yellow" :foreground "darkblue")))) - '(info-node ((t (:bold t :background "darkblue" :foreground "red3")))) - '(info-xref ((t (:bold t :background "darkblue" :foreground "yellow")))) - '(isearch ((t (:background "yellow" :foreground "darkblue")))) - '(isearch-secondary ((t (:foreground "red3")))) - '(italic ((t (:background "darkblue" :foreground "red3")))) - '(left-margin ((t (:background "darkblue" :foreground "yellow")))) - '(list-mode-item-selected ((t (:background "gray68" :foreground "yellow")))) - '(makefile-space-face ((t (:background "hotpink")))) - '(modeline ((t (:background "Gray75" :foreground "Black")))) - '(modeline-buffer-id ((t (:background "Gray75" :foreground "blue")))) - '(modeline-mousable ((t (:background "Gray75" :foreground "red")))) - '(modeline-mousable-minor-mode ((t (:background "Gray75" :foreground "green4")))) - '(paren-blink-off ((t (:foreground "darkblue")))) - '(paren-match ((t (:background "yellow" :foreground "darkblue")))) - '(paren-mismatch ((t (:background "DeepPink" :foreground "yellow")))) - '(pointer ((t (:background "darkblue" :foreground "red3")))) - '(primary-selection ((t (:background "yellow" :foreground "darkblue")))) - '(red ((t (:background "darkblue" :foreground "red")))) - '(right-margin ((t (:background "darkblue" :foreground "yellow")))) - '(secondary-selection ((t (:background "darkblue" :foreground "yellow")))) - '(shell-option-face ((t (:background "darkblue" :foreground "cyan2")))) - '(shell-output-2-face ((t (:background "darkblue" :foreground "darkseagreen")))) - '(shell-output-3-face ((t (:background "darkblue" :foreground "lightgrey")))) - '(shell-output-face ((t (:background "darkblue" :foreground "white")))) - '(shell-prompt-face ((t (:background "darkblue" :foreground "red")))) - '(text-cursor ((t (:background "Red3" :foreground "white")))) - '(underline ((t (:underline t :background "darkblue" :foreground "yellow")))) - '(vvb-face ((t (:background "pink" :foreground "black")))) - '(yellow ((t (:background "darkblue" :foreground "yellow")))) - '(zmacs-region ((t (:background "gray" :foreground "black"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'raspopovic) - -;;; raspopovic-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/renegade-theme.el b/elpa/color-theme-modern-0.0.3/renegade-theme.el deleted file mode 100644 index 84a6330..0000000 --- a/elpa/color-theme-modern-0.0.3/renegade-theme.el +++ /dev/null @@ -1,75 +0,0 @@ -;;; renegade-theme.el --- renegade theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of renegade theme from `color-themes' - -;;; Code: - -(deftheme renegade - "renegade theme") - -(custom-theme-set-faces - 'renegade - - '(default ((t (:background "black" :foreground "cyan3")))) - '(mouse ((t (:foreground "white")))) - '(cursor ((t (:background "black")))) - '(border ((t (:foreground "black")))) - - '(bold ((t (:bold t :foreground "cyan" :weight bold)))) - '(bold-italic ((t (:italic t :bold t :foreground "cyan" :slant italic :weight bold)))) - '(fixed-pitch ((t (:family "courier")))) - '(font-lock-builtin-face ((t (:bold t :foreground "cornflower blue" :weight bold)))) - '(font-lock-comment-face ((t (:bold t :foreground "yellow" :weight bold)))) - '(font-lock-constant-face ((t (:foreground "magenta3")))) - '(font-lock-doc-face ((t (:bold t :weight bold :foreground "red")))) - '(font-lock-function-name-face ((t (:foreground "gray")))) - '(font-lock-keyword-face ((t (:bold t :foreground "cyan" :weight bold)))) - '(font-lock-string-face ((t (:bold t :foreground "red" :weight bold)))) - '(font-lock-type-face ((t (:bold t :foreground "cyan" :weight bold)))) - '(font-lock-variable-name-face ((t (:foreground "cyan3")))) - '(font-lock-warning-face ((t (:bold t :foreground "red" :weight bold)))) - '(fringe ((t (:background "gray32")))) - '(highlight ((t (:background "blue")))) - '(isearch ((t (:background "blue" :foreground "cyan3")))) - '(isearch-lazy-highlight-face ((t (:background "turquoise3" :foreground "black")))) - '(menu ((t (nil)))) - '(mode-line ((t (:bold t :background "blue3" :foreground "white" :weight bold - :box (:line-width -1 :style released-button))))) - '(mouse ((t (:background "white")))) - '(region ((t (:bold t :background "white" :foreground "blue" :weight bold)))) - '(scroll-bar ((t (nil)))) - '(trailing-whitespace ((t (:background "red")))) - '(underline ((t (:underline t)))) - '(variable-pitch ((t (:family "helv"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'renegade) - -;;; renegade-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/resolve-theme.el b/elpa/color-theme-modern-0.0.3/resolve-theme.el deleted file mode 100644 index d435b89..0000000 --- a/elpa/color-theme-modern-0.0.3/resolve-theme.el +++ /dev/null @@ -1,193 +0,0 @@ -;;; resolve-theme.el --- resolve theme - -;; Copyright (C) 2002 by Damien Elmes -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of resolve theme from `color-themes' - -;;; Code: - -(deftheme resolve - "resolve theme") - -(custom-theme-set-faces - 'resolve - - '(default ((t (:background "#00457f" :foreground "white smoke")))) - '(mouse ((t (:background "white")))) - '(cursor ((t (:background "DarkGoldenrod1")))) - '(border ((t (:background "black")))) - - '(display-time-mail-face ((t (:foreground "white" :background "#001040")))-line) - '(help-highlight-face ((t (:underline t)))) - '(list-matching-lines-face ((t (:bold t :foreground "snow2" :weight bold)))) - '(view-highlight-face ((t (:background "gray91" :foreground "firebrick")))) - '(widget-mouse-face ((t (:background "gray91" :foreground "firebrick")))) - - '(bold ((t (:bold t :foreground "snow2" :weight bold)))) - '(bold-italic ((t (:italic t :bold t :weight bold)))) - '(calendar-today-face ((t (:underline t)))) - '(comint-highlight-input ((t (:bold t :weight bold)))) - '(comint-highlight-prompt ((t (:foreground "cyan")))) - '(cperl-array-face ((t (:bold t :foreground "wheat" :weight bold)))) - '(cperl-hash-face ((t (:bold t :foreground "chartreuse" :weight bold)))) - '(diary-face ((t (:foreground "yellow")))) - '(erc-input-face ((t (:foreground "lightblue2")))) - '(erc-notice-face ((t (:foreground "lightyellow3")))) - - '(font-latex-bold-face ((t (:bold t :foreground "DarkOliveGreen" :weight bold)))) - '(font-latex-italic-face ((t (:italic t :foreground "DarkOliveGreen")))) - '(font-latex-math-face ((t (:foreground "burlywood")))) - '(font-latex-sedate-face ((t (:foreground "LightGray")))) - '(font-latex-string-face ((t (:foreground "RosyBrown")))) - '(font-latex-warning-face ((t (:bold t :foreground "Red" :weight bold)))) - '(font-lock-builtin-face ((t (:foreground "wheat")))) - '(font-lock-comment-face ((t (:foreground "light steel blue")))) - '(font-lock-constant-face ((t (:foreground "seashell3")))) - '(font-lock-doc-face ((t (:foreground "plum")))) - '(font-lock-doc-string-face ((t (:foreground "#008000")))) - '(font-lock-function-name-face ((t (:foreground "thistle1")))) - '(font-lock-keyword-face ((t (:foreground "wheat")))) - '(font-lock-other-emphasized-face ((t (:bold t :foreground "gold1" :weight bold)))) - '(font-lock-other-type-face ((t (:bold t :foreground "gold1" :weight bold)))) - '(font-lock-preprocessor-face ((t (:foreground "#800080")))) - '(font-lock-reference-face ((t (:foreground "wheat")))) - '(font-lock-string-face ((t (:foreground "plum")))) - '(font-lock-type-face ((t (:foreground "lawn green")))) - '(font-lock-variable-name-face ((t (:foreground "light yellow")))) - '(font-lock-warning-face ((t (:foreground "plum")))) - '(fringe ((t (:background "#000000")))) - '(gnus-cite-attribution-face ((t (:italic t)))) - '(gnus-cite-face-1 ((t (:foreground "light blue")))) - '(gnus-cite-face-10 ((t (:foreground "medium purple")))) - '(gnus-cite-face-11 ((t (:foreground "turquoise")))) - '(gnus-cite-face-2 ((t (:foreground "light cyan")))) - '(gnus-cite-face-3 ((t (:foreground "light yellow")))) - '(gnus-cite-face-4 ((t (:foreground "light pink")))) - '(gnus-cite-face-5 ((t (:foreground "pale green")))) - '(gnus-cite-face-6 ((t (:foreground "beige")))) - '(gnus-cite-face-7 ((t (:foreground "orange")))) - '(gnus-cite-face-8 ((t (:foreground "magenta")))) - '(gnus-cite-face-9 ((t (:foreground "violet")))) - '(gnus-emphasis-bold ((t (:bold t :weight bold)))) - '(gnus-emphasis-bold-italic ((t (:italic t :bold t :weight bold)))) - '(gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) - '(gnus-emphasis-italic ((t (:italic t)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(gnus-emphasis-underline-bold ((t (:bold t :underline t :weight bold)))) - '(gnus-emphasis-underline-bold-italic ((t (:italic t :bold t :underline t :weight bold)))) - '(gnus-emphasis-underline-italic ((t (:italic t :underline t)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "aquamarine1")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "aquamarine1" :weight bold)))) - '(gnus-group-mail-2-empty-face ((t (:foreground "aquamarine2")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "aquamarine2" :weight bold)))) - '(gnus-group-mail-3-empty-face ((t (:foreground "aquamarine3")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "aquamarine3" :weight bold)))) - '(gnus-group-mail-low-empty-face ((t (:foreground "aquamarine4")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "aquamarine4" :weight bold)))) - '(gnus-group-news-1-empty-face ((t (:foreground "PaleTurquoise")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "PaleTurquoise" :weight bold)))) - '(gnus-group-news-2-empty-face ((t (:foreground "turquoise")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "turquoise" :weight bold)))) - '(gnus-group-news-3-empty-face ((t (nil)))) - '(gnus-group-news-3-face ((t (:bold t :weight bold)))) - '(gnus-group-news-4-empty-face ((t (nil)))) - '(gnus-group-news-4-face ((t (:bold t :weight bold)))) - '(gnus-group-news-5-empty-face ((t (nil)))) - '(gnus-group-news-5-face ((t (:bold t :weight bold)))) - '(gnus-group-news-6-empty-face ((t (nil)))) - '(gnus-group-news-6-face ((t (:bold t :weight bold)))) - '(gnus-group-news-low-empty-face ((t (:foreground "DarkTurquoise")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "DarkTurquoise" :weight bold)))) - '(gnus-header-content-face ((t (:italic t :foreground "snow2")))) - '(gnus-header-from-face ((t (:foreground "spring green")))) - '(gnus-header-name-face ((t (:bold t :foreground "snow2" :weight bold)))) - '(gnus-header-newsgroups-face ((t (:italic t :foreground "yellow")))) - '(gnus-header-subject-face ((t (:bold t :foreground "peach puff" :weight bold)))) - '(gnus-signature-face ((t (:italic t)))) - '(gnus-splash-face ((t (:foreground "Brown")))) - '(gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "SkyBlue" :weight bold)))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "PaleGreen" :weight bold)))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "pink" :weight bold)))) - '(gnus-summary-high-unread-face ((t (:bold t :weight bold)))) - '(gnus-summary-low-ancient-face ((t (:italic t :foreground "SkyBlue")))) - '(gnus-summary-low-read-face ((t (:italic t :foreground "PaleGreen")))) - '(gnus-summary-low-ticked-face ((t (:italic t :foreground "pink")))) - '(gnus-summary-low-unread-face ((t (:italic t)))) - '(gnus-summary-normal-ancient-face ((t (:foreground "SkyBlue")))) - '(gnus-summary-normal-read-face ((t (:foreground "PaleGreen")))) - '(gnus-summary-normal-ticked-face ((t (:foreground "pink")))) - '(gnus-summary-normal-unread-face ((t (nil)))) - '(gnus-summary-selected-face ((t (:underline t)))) - '(header-line ((t (:background "grey20" :foreground "grey90")))) - '(highlight ((t (:background "gray91" :foreground "firebrick")))) - '(highline-face ((t (:background "paleturquoise" :foreground "black")))) - '(holiday-face ((t (:background "chocolate4")))) - '(isearch ((t (:background "palevioletred2" :foreground "brown4")))) - '(isearch-lazy-highlight-face ((t (:background "paleturquoise4")))) - '(italic ((t (:italic t)))) - '(menu ((t (nil)))) - '(message-cited-text-face ((t (:foreground "seashell3")))) - '(message-header-cc-face ((t (:bold t :foreground "snow2" :weight bold)))) - '(message-header-name-face ((t (:bold t :foreground "snow1" :weight bold)))) - '(message-header-newsgroups-face ((t (:italic t :bold t :foreground "blue4" :weight bold)))) - '(message-header-other-face ((t (:foreground "snow2")))) - '(message-header-subject-face ((t (:bold t :foreground "snow2" :weight bold)))) - '(message-header-to-face ((t (:bold t :foreground "snow2" :weight bold)))) - '(message-header-xheader-face ((t (:foreground "blue")))) - '(message-mml-face ((t (:foreground "ForestGreen")))) - '(message-separator-face ((t (:foreground "misty rose")))) - '(modeline ((t (:foreground "white" :background "#001040" - :box (:line-width -1 :style released-button))))) - '(modeline-buffer-id ((t (:foreground "white" :background "#001040")))) - '(modeline-mousable ((t (:foreground "white" :background "#001040")))) - '(modeline-mousable-minor-mode ((t (:foreground "white" :background "#001040")))) - '(my-tab-face ((t (:background "SlateBlue1")))) - '(p4-diff-del-face ((t (:bold t :foreground "salmon" :weight bold)))) - '(primary-selection ((t (:background "gray91" :foreground "DodgerBlue4")))) - '(region ((t (:background "gray91" :foreground "DodgerBlue4")))) - '(scroll-bar ((t (:background "grey75")))) - '(secondary-selection ((t (:background "gray91" :foreground "sienna3")))) - '(show-paren-match-face ((t (:background "cyan3" :foreground "blue")))) - '(show-paren-mismatch-face ((t (:background "red" :foreground "blue")))) - '(tool-bar ((t (:background "grey75" :foreground "black")))) - '(tooltip ((t (:background "lightyellow" :foreground "black")))) - '(trailing-whitespace ((t (:background "red")))) - '(underline ((t (:underline t)))) - - '(widget-button-face ((t (:bold t :weight bold)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "dark green")))) - '(widget-field-face ((t (:background "steel blue")))) - '(widget-inactive-face ((t (:foreground "grey")))) - '(widget-single-line-field-face ((t (:background "gray85")))) - '(zmacs-region ((t (:background "gray91" :foreground "DodgerBlue4"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'resolve) - -;;; resolve-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/retro-green-theme.el b/elpa/color-theme-modern-0.0.3/retro-green-theme.el deleted file mode 100644 index 2628813..0000000 --- a/elpa/color-theme-modern-0.0.3/retro-green-theme.el +++ /dev/null @@ -1,60 +0,0 @@ -;;; retro-green-theme.el --- retro-green theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of retro-green theme from `color-themes' - -;;; Code: - -(deftheme retro-green - "retro-green theme") - -(let ((foreground "green") - (faces '((default ((t (:background "black" :foreground "green")))) - (mouse ((t (:foreground "green")))) - (cursor ((t (:background "green")))) - (border ((t (:foreground "green"))))))) - (dolist (face (face-list)) - (cond ((memq face '(bold bold-italic)) - (add-to-list 'faces `(,face ((t (:bold t)))))) - ((memq face '(italic underline show-paren-mismatch-face)) - (add-to-list 'faces `(,face ((t (:underline t)))))) - ((memq face '(modeline modeline-buffer-id modeline-mousable - modeline-mousable-minor-mode highlight region - secondary-selection show-paren-match-face)) - (add-to-list 'faces `(,face ((t (:foreground "black" - :background ,foreground - :inverse t)))))) - (t - (add-to-list 'faces `(,face ((t (nil)))))))) - (apply 'custom-theme-set-faces 'retro-green faces)) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'retro-green) - -;;; retro-green-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/retro-orange-theme.el b/elpa/color-theme-modern-0.0.3/retro-orange-theme.el deleted file mode 100644 index 098a1a6..0000000 --- a/elpa/color-theme-modern-0.0.3/retro-orange-theme.el +++ /dev/null @@ -1,60 +0,0 @@ -;;; retro-orange-theme.el --- retro-orange theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of retro-orange theme from `color-themes' - -;;; Code: - -(deftheme retro-orange - "retro-orange theme") - -(let ((foreground "orange") - (faces '((default ((t (:background "black" :foreground "orange")))) - (mouse ((t (:foreground "orange")))) - (cursor ((t (:background "orange")))) - (border ((t (:foreground "orange"))))))) - (dolist (face (face-list)) - (cond ((memq face '(bold bold-italic)) - (add-to-list 'faces `(,face ((t (:bold t)))))) - ((memq face '(italic underline show-paren-mismatch-face)) - (add-to-list 'faces `(,face ((t (:underline t)))))) - ((memq face '(modeline modeline-buffer-id modeline-mousable - modeline-mousable-minor-mode highlight region - secondary-selection show-paren-match-face)) - (add-to-list 'faces `(,face ((t (:foreground "black" - :background ,foreground - :inverse t)))))) - (t - (add-to-list 'faces `(,face ((t (nil)))))))) - (apply 'custom-theme-set-faces 'retro-orange faces)) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'retro-orange) - -;;; retro-orange-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/robin-hood-theme.el b/elpa/color-theme-modern-0.0.3/robin-hood-theme.el deleted file mode 100644 index 6e01f60..0000000 --- a/elpa/color-theme-modern-0.0.3/robin-hood-theme.el +++ /dev/null @@ -1,114 +0,0 @@ -;;; robin-hood-theme.el --- robin-hood theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of robin-hood theme from `color-themes' - -;;; Code: - -(deftheme robin-hood - "robin-hood theme") - -(custom-theme-set-faces - 'robin-hood - - '(default ((t (:background "#304020" :foreground "navajo white")))) - '(mouse ((t (:foreground "Grey")))) - '(cursor ((t (:background "LightGray")))) - '(border ((t (:foreground "black")))) - - '(button ((t (:bold t)))) - '(header-line ((t (:background "#030" :foreground "#AA7")))) - '(ido-subdir-face ((t (:foreground "MediumSlateBlue")))) - '(minibuffer-prompt ((t (:foreground "pale green")))) - '(semantic-dirty-token-face ((t (:background "grey22")))) - '(tool-bar ((t (:background "#304020" :foreground "wheat" :box (:line-width 1 :style released-button))))) - '(tooltip ((t (:background "lemon chiffon" :foreground "black")))) - - '(bbdb-company ((t (:foreground "pale green")))) - '(bbdb-name ((t (:bold t :foreground "pale green")))) - '(bbdb-field-name ((t (:foreground "medium sea green")))) - '(bbdb-field-value ((t (:foreground "dark sea green")))) - '(bold ((t (:bold t)))) - '(bold-italic ((t (:italic t :bold t :foreground "beige")))) - '(calendar-today-face ((t (:underline t :foreground "lemon chiffon")))) - '(comint-highlight-prompt ((t (:foreground "medium aquamarine")))) - '(cperl-array-face ((t (:foreground "Yellow")))) - '(cperl-hash-face ((t (:foreground "White")))) - '(cperl-nonoverridable-face ((t (:foreground "SkyBlue")))) - '(custom-button-face ((t (:bold t :foreground "DodgerBlue1" :underline t)))) - '(custom-documentation-face ((t (:foreground "Grey")))) - '(custom-group-tag-face ((t (:foreground "MediumAquamarine")))) - '(custom-state-face ((t (:foreground "LightSalmon")))) - '(custom-variable-tag-face ((t (:foreground "Aquamarine")))) - '(diary-face ((t (:bold t :foreground "yellow")))) - '(dired-face-directory ((t (:bold t :foreground "sky blue")))) - '(dired-face-permissions ((t (:foreground "aquamarine")))) - '(dired-face-flagged ((t (:foreground "tomato")))) - '(dired-face-marked ((t (:foreground "light salmon")))) - '(dired-face-executable ((t (:foreground "green yellow")))) - '(fringe ((t (:background "#003700")))) - '(highlight ((t (:background "PaleGreen" :foreground "DarkGreen")))) - '(highline-face ((t (:background "SeaGreen")))) - '(holiday-face ((t (:bold t :foreground "peru")))) - '(hyper-apropos-hyperlink ((t (:bold t :foreground "DodgerBlue1")))) - '(hyper-apropos-documentation ((t (:foreground "LightSalmon")))) - '(info-header-xref ((t (:foreground "DodgerBlue1" :bold t)))) - '(info-menu-5 ((t (:underline t)))) - '(info-node ((t (:underline t :bold t :foreground "DodgerBlue1")))) - '(info-xref ((t (:bold t :foreground "DodgerBlue1")))) - '(isearch ((t (:foreground "pink" :background "red")))) - '(isearch-lazy-highlight-face ((t (:foreground "red")))) - '(italic ((t (:italic t)))) - '(menu ((t (:background "#304020" :foreground "navajo white")))) - '(modeline ((t (:background "dark olive green" :foreground "wheat" :box (:line-width 1 :style released-button))))) - '(mode-line-inactive ((t (:background "dark olive green" :foreground "khaki" :box (:line-width 1 :style released-button))))) - '(modeline-buffer-id ((t (:background "dark olive green" :foreground "beige")))) - '(modeline-mousable ((t (:background "dark olive green" :foreground "yellow green")))) - '(modeline-mousable-minor-mode ((t (:background "dark olive green" :foreground "wheat")))) - '(region ((t (:background "dark cyan" :foreground "cyan")))) - '(secondary-selection ((t (:background "Aquamarine" :foreground "SlateBlue")))) - '(show-paren-match-face ((t (:bold t :background "Aquamarine" :foreground "steel blue")))) - '(show-paren-mismatch-face ((t (:background "Red" :foreground "White")))) - '(underline ((t (:underline t)))) - '(widget-field-face ((t (:foreground "LightBlue")))) - '(widget-inactive-face ((t (:foreground "DimGray")))) - '(widget-single-line-field-face ((t (:foreground "LightBlue")))) - '(w3m-anchor-face ((t (:bold t :foreground "DodgerBlue1")))) - '(w3m-arrived-anchor-face ((t (:bold t :foreground "DodgerBlue3")))) - '(w3m-header-line-location-title-face ((t (:foreground "beige" :background "dark olive green")))) - '(w3m-header-line-location-content-face ((t (:foreground "wheat" :background "dark olive green")))) - '(woman-bold-face ((t (:bold t)))) - '(woman-italic-face ((t (:foreground "beige")))) - '(woman-unknown-face ((t (:foreground "LightSalmon")))) - '(zmacs-region ((t (:background "dark cyan" :foreground "cyan")))) ) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'robin-hood) - -;;; robin-hood-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/rotor-theme.el b/elpa/color-theme-modern-0.0.3/rotor-theme.el deleted file mode 100644 index 73a466e..0000000 --- a/elpa/color-theme-modern-0.0.3/rotor-theme.el +++ /dev/null @@ -1,113 +0,0 @@ -;;; rotor-theme.el --- rotor theme - -;; Copyright (C) 2000 Jinwei Shen -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of rotor theme from `color-themes' - -;;; Code: - -(deftheme rotor - "rotor theme") - -(custom-theme-set-faces - 'rotor - - '(default ((t (:background "Beige" :foreground "black")))) - '(mouse ((t (:foreground "black")))) - '(cursor ((t (:background "Maroon")))) - '(border ((t (:foreground "black")))) - - '(Man-overstrike-face ((t (:foreground "MediumSlateBlue")))) - '(Man-underline-face ((t (:foreground "ForestGreen")))) - '(list-matching-lines-face ((t (:bold t :background "grey40" :foreground "yellow")))) - '(rmail-highlight-face ((t (:foreground "MediumSlateBlue")))) - '(watson-attribution-face ((t (:italic t :foreground "yellow3")))) - '(watson-url-face ((t (:bold t :background "grey40" :foreground "yellow")))) - '(watson-url-mouse-face ((t (:background "PaleGreen" :foreground "black")))) - - '(bold ((t (:bold t :background "grey40" :foreground "yellow")))) - '(bold-italic ((t (:italic t :bold t :foreground "yellow green")))) - '(custom-button-face ((t (nil)))) - '(custom-changed-face ((t (:background "blue" :foreground "white")))) - '(custom-documentation-face ((t (nil)))) - '(custom-face-tag-face ((t (:underline t)))) - '(custom-group-tag-face ((t (:underline t :foreground "blue")))) - '(custom-group-tag-face-1 ((t (:underline t :foreground "red")))) - '(custom-invalid-face ((t (:background "red" :foreground "yellow")))) - '(custom-modified-face ((t (:background "blue" :foreground "white")))) - '(custom-rogue-face ((t (:background "black" :foreground "pink")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:background "white" :foreground "blue")))) - '(custom-state-face ((t (:foreground "dark green")))) - '(custom-variable-button-face ((t (:underline t :bold t)))) - '(custom-variable-tag-face ((t (:underline t :foreground "blue")))) - '(font-lock-builtin-face ((t (:foreground "Orchid")))) - '(font-lock-comment-face ((t (:foreground "MediumBlue")))) - '(font-lock-constant-face ((t (:foreground "CadetBlue")))) - '(font-lock-function-name-face ((t (:foreground "MediumSlateBlue")))) - '(font-lock-keyword-face ((t (:foreground "#80a0ff")))) - '(font-lock-string-face ((t (:foreground "red")))) - '(font-lock-type-face ((t (:foreground "ForestGreen")))) - '(font-lock-variable-name-face ((t (:foreground "DarkGoldenrod")))) - '(font-lock-warning-face ((t (:bold t :foreground "Red")))) - '(highlight ((t (:background "PaleGreen" :foreground "black")))) - '(italic ((t (:italic t :foreground "yellow3")))) - '(message-cited-text-face ((t (:foreground "red")))) - '(message-header-cc-face ((t (:foreground "MidnightBlue")))) - '(message-header-name-face ((t (:foreground "cornflower blue")))) - '(message-header-newsgroups-face ((t (:italic t :bold t :foreground "blue4")))) - '(message-header-other-face ((t (:foreground "steel blue")))) - '(message-header-subject-face ((t (:bold t :foreground "navy blue")))) - '(message-header-to-face ((t (:bold t :foreground "MidnightBlue")))) - '(message-header-xheader-face ((t (:foreground "blue")))) - '(message-separator-face ((t (:foreground "brown")))) - '(modeline ((t (:background "wheat" :foreground "DarkOliveGreen")))) - '(modeline-buffer-id ((t (:background "wheat" :foreground "DarkOliveGreen")))) - '(modeline-mousable ((t (:background "wheat" :foreground "DarkOliveGreen")))) - '(modeline-mousable-minor-mode ((t (:background "wheat" :foreground "DarkOliveGreen")))) - '(nil ((t (nil)))) - '(region ((t (:background "dark cyan" :foreground "cyan")))) - '(secondary-selection ((t (:background "Turquoise" :foreground "black")))) - '(show-paren-match-face ((t (:background "turquoise")))) - '(show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) - '(underline ((t (:underline t)))) - '(viper-minibuffer-emacs-face ((t (:background "darkseagreen2" :foreground "Black")))) - '(viper-minibuffer-insert-face ((t (:background "pink" :foreground "Black")))) - '(viper-minibuffer-vi-face ((t (:background "grey" :foreground "DarkGreen")))) - '(viper-replace-overlay-face ((t (:background "darkseagreen2" :foreground "Black")))) - '(viper-search-face ((t (:background "khaki" :foreground "Black")))) - '(widget-button-face ((t (:bold t)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "dark green")))) - '(widget-field-face ((t (:background "gray85")))) - '(widget-inactive-face ((t (:foreground "dim gray")))) - '(widget-single-line-field-face ((t (:background "gray85"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'rotor) - -;;; rotor-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/ryerson-theme.el b/elpa/color-theme-modern-0.0.3/ryerson-theme.el deleted file mode 100644 index 67291e3..0000000 --- a/elpa/color-theme-modern-0.0.3/ryerson-theme.el +++ /dev/null @@ -1,52 +0,0 @@ -;;; ryerson-theme.el --- ryerson theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of ryerson theme from `color-themes' - -;;; Code: - -(deftheme ryerson - "ryerson theme") - -(custom-theme-set-faces - 'ryerson - - '(default ((t (:background "midnightblue" :foreground "white")))) - '(cursor ((t (:background "red")))) - - '(modeline-buffer-id ((t (:foreground "black" :background "slategray3")))) - '(modeline-mousable ((t (:foreground "black" :background "slategray3")))) - '(modeline-mousable-minor-mode ((t (:foreground "black" :background "slategray3")))) - '(underline ((t (:underline t)))) - '(region ((t (:foreground "black" :background "slategray3"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'ryerson) - -;;; ryerson-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/salmon-diff-theme.el b/elpa/color-theme-modern-0.0.3/salmon-diff-theme.el deleted file mode 100644 index b8d6107..0000000 --- a/elpa/color-theme-modern-0.0.3/salmon-diff-theme.el +++ /dev/null @@ -1,63 +0,0 @@ -;;; salmon-diff-theme.el --- salmon-diff theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of salmon-diff theme from `color-themes' - -;;; Code: - -(deftheme salmon-diff - "salmon-diff theme") - -(custom-theme-set-faces - 'salmon-diff - - '(change-log-acknowledgement-face ((t (:foreground "LightBlue")))) - '(change-log-conditionals-face ((t (:bold t :weight bold :foreground "Aquamarine")))) - '(change-log-date-face ((t (:foreground "LightSalmon")))) - '(change-log-email-face ((t (:bold t :weight bold :foreground "Aquamarine")))) - '(change-log-file-face ((t (:bold t :weight bold :foreground "Aquamarine")))) - '(change-log-function-face ((t (:bold t :weight bold :foreground "Aquamarine")))) - '(change-log-list-face ((t (:foreground "Salmon")))) - '(change-log-name-face ((t (:foreground "Aquamarine")))) - '(diff-added-face ((t (nil)))) - '(diff-changed-face ((t (nil)))) - '(diff-context-face ((t (:foreground "grey70")))) - '(diff-file-header-face ((t (:bold t)))) - '(diff-function-face ((t (:foreground "grey70")))) - '(diff-header-face ((t (:foreground "light salmon")))) - '(diff-hunk-header-face ((t (:foreground "light salmon")))) - '(diff-index-face ((t (:bold t)))) - '(diff-nonexistent-face ((t (:bold t)))) - '(diff-removed-face ((t (nil)))) - '(log-view-message-face ((t (:foreground "light salmon"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'salmon-diff) - -;;; salmon-diff-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/salmon-font-lock-theme.el b/elpa/color-theme-modern-0.0.3/salmon-font-lock-theme.el deleted file mode 100644 index 0a91510..0000000 --- a/elpa/color-theme-modern-0.0.3/salmon-font-lock-theme.el +++ /dev/null @@ -1,56 +0,0 @@ -;;; salmon-font-lock-theme.el --- salmon-font-lock theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of salmon-font-lock theme from `color-themes' - -;;; Code: - -(deftheme salmon-font-lock - "salmon-font-lock theme") - -(custom-theme-set-faces - 'salmon-font-lock - - '(font-lock-builtin-face ((t (:bold t :foreground "PaleGreen")))) - '(font-lock-comment-face ((t (:foreground "LightBlue")))) - '(font-lock-constant-face ((t (:foreground "Aquamarine")))) - '(font-lock-doc-string-face ((t (:foreground "LightSalmon")))) - '(font-lock-function-name-face ((t (:bold t :foreground "Aquamarine")))) - '(font-lock-keyword-face ((t (:foreground "Salmon")))) - '(font-lock-preprocessor-face ((t (:foreground "Salmon")))) - '(font-lock-reference-face ((t (:foreground "pale green")))) - '(font-lock-string-face ((t (:foreground "LightSalmon")))) - '(font-lock-type-face ((t (:bold t :foreground "YellowGreen")))) - '(font-lock-variable-name-face ((t (:bold t :foreground "Aquamarine")))) - '(font-lock-warning-face ((t (:bold t :foreground "red"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'salmon-font-lock) - -;;; salmon-font-lock-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/scintilla-theme.el b/elpa/color-theme-modern-0.0.3/scintilla-theme.el deleted file mode 100644 index 1945506..0000000 --- a/elpa/color-theme-modern-0.0.3/scintilla-theme.el +++ /dev/null @@ -1,63 +0,0 @@ -;;; scintilla-theme.el --- scintilla theme - -;; Copyright (C) 2000 by Gordon Messmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of scintilla theme from `color-themes' - -;;; Code: - -(deftheme scintilla - "scintilla theme") - -(custom-theme-set-faces - 'scintilla - - '(default ((t (:background "white" :foreground "black")))) - '(mouse ((t (:foreground "grey15")))) - '(cursor ((t (:background "grey15")))) - - '(font-lock-comment-face ((t (:italic t :foreground "ForestGreen")))) - '(font-lock-string-face ((t (:foreground "DarkMagenta")))) - '(font-lock-keyword-face ((t (:foreground "NavyBlue")))) - '(font-lock-warning-face ((t (:bold t :foreground "VioletRed")))) - '(font-lock-constant-face ((t (:foreground "Blue")))) - '(font-lock-type-face ((t (:foreground "NavyBlue")))) - '(font-lock-variable-name-face ((t (:foreground "DarkCyan")))) - '(font-lock-function-name-face ((t (:foreground "DarkCyan")))) - '(font-lock-builtin-face ((t (:foreground "NavyBlue")))) - '(highline-face ((t (:background "Grey95")))) - '(show-paren-match-face ((t (:background "Grey80")))) - '(region ((t (:background "Grey80")))) - '(highlight ((t (:foreground "ForestGreen")))) - '(secondary-selection ((t (:background "NavyBlue" :foreground "white")))) - '(widget-field-face ((t (:background "NavyBlue")))) - '(widget-single-line-field-face ((t (:background "RoyalBlue"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'scintilla) - -;;; scintilla-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/shaman-theme.el b/elpa/color-theme-modern-0.0.3/shaman-theme.el deleted file mode 100644 index 0f55d48..0000000 --- a/elpa/color-theme-modern-0.0.3/shaman-theme.el +++ /dev/null @@ -1,115 +0,0 @@ -;;; shaman-theme.el --- shaman theme - -;; Copyright (C) 2002 by shaman -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of shaman theme from `color-themes' - -;;; Code: - -(deftheme shaman - "shaman theme") - -(custom-theme-set-faces - 'shaman - - '(default ((t (:background "#456345" :foreground "White")))) - '(blue ((t (:foreground "blue")))) - '(bold ((t (:bold t :size "12")))) - '(bold-italic ((t (:italic t :bold t)))) - '(border-glyph ((t (nil)))) - '(buffers-tab ((t (:background "Gray80" :foreground "black")))) - '(buffers-tab-face ((t (:background "Gray80" :foreground "black")))) - '(font-lock-builtin-face ((t (:foreground "cadetblue2")))) - '(font-lock-comment-face ((t (:foreground "gray80")))) - '(font-lock-constant-face ((t (:foreground "steelblue1")))) - '(font-lock-doc-face ((t (:foreground "light coral")))) - '(font-lock-doc-string-face ((t (:foreground "light coral")))) - '(font-lock-function-name-face ((t (:foreground "aquamarine")))) - '(font-lock-keyword-face ((t (:foreground "cyan")))) - '(font-lock-preprocessor-face ((t (:foreground "steelblue1")))) - '(font-lock-reference-face ((t (:foreground "cadetblue2")))) - '(font-lock-string-face ((t (:foreground "tan")))) - '(font-lock-type-face ((t (:foreground "wheat")))) - '(font-lock-variable-name-face ((t (:foreground "cyan3")))) - '(font-lock-warning-face ((t (:bold t :foreground "Pink")))) - '(fringe ((t (nil)))) - '(gnus-x-face ((t (:background "white" :foreground "black")))) - '(green ((t (:foreground "green")))) - '(gui-button-face ((t (:background "grey75" :foreground "black")))) - '(gui-element ((t (:background "Gray80" :foreground "black")))) - '(highlight ((t (:background "darkseagreen2")))) - '(isearch ((t (:background "paleturquoise")))) - '(isearch-secondary ((t (:foreground "red3")))) - '(italic ((t (:italic t)))) - '(left-margin ((t (nil)))) - '(list-mode-item-selected ((t (:background "gray68")))) - '(message-cited-text-face ((t (:foreground "red")))) - '(message-header-cc-face ((t (:bold t :foreground "green4")))) - '(message-header-name-face ((t (:foreground "DarkGreen")))) - '(message-header-newsgroups-face ((t (:bold t :foreground "yellow")))) - '(message-header-other-face ((t (:foreground "#b00000")))) - '(message-header-subject-face ((t (:foreground "green3")))) - '(message-header-to-face ((t (:bold t :foreground "green2")))) - '(message-header-xheader-face ((t (:foreground "blue")))) - '(message-mml-face ((t (:foreground "ForestGreen")))) - '(message-separator-face ((t (:foreground "blue3")))) - '(mode-line ((t (:background "Gray80" :foreground "black")))) - '(modeline ((t (:background "Gray80" :foreground "black")))) - '(modeline-buffer-id ((t (:background "Gray80" :foreground "blue4")))) - '(modeline-mousable ((t (:background "Gray80" :foreground "firebrick")))) - '(modeline-mousable-minor-mode ((t (:background "Gray80" :foreground "green4")))) - '(pointer ((t (:foreground "White")))) - '(primary-selection ((t (:background "gray65")))) - '(red ((t (:foreground "red")))) - '(region ((t (:background "gray65")))) - '(right-margin ((t (nil)))) - '(rpm-spec-dir-face ((t (:foreground "green")))) - '(rpm-spec-doc-face ((t (:foreground "magenta")))) - '(rpm-spec-ghost-face ((t (:foreground "red")))) - '(rpm-spec-macro-face ((t (:foreground "yellow")))) - '(rpm-spec-package-face ((t (:foreground "red")))) - '(rpm-spec-tag-face ((t (:foreground "blue")))) - '(rpm-spec-var-face ((t (:foreground "maroon")))) - '(secondary-selection ((t (:background "paleturquoise")))) - '(text-cursor ((t (:background "Pink" :foreground "Black")))) - '(tool-bar ((t (nil)))) - '(toolbar ((t (:background "Gray80" :foreground "black")))) - '(underline ((t (:underline t)))) - '(vertical-divider ((t (:background "Gray80" :foreground "black")))) - '(widget ((t (:background "Gray80" :foreground "black")))) - '(widget-button-face ((t (:bold t)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "lime green")))) - '(widget-field-face ((t (:background "dim gray")))) - '(widget-inactive-face ((t (:foreground "light gray")))) - '(yellow ((t (:foreground "yellow")))) - '(zmacs-region ((t (:background "gray65"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'shaman) - -;;; shaman-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/simple-1-theme.el b/elpa/color-theme-modern-0.0.3/simple-1-theme.el deleted file mode 100644 index 5422783..0000000 --- a/elpa/color-theme-modern-0.0.3/simple-1-theme.el +++ /dev/null @@ -1,55 +0,0 @@ -;;; simple-1-theme.el --- simple-1 theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of simple-1 theme from `color-themes' - -;;; Code: - -(deftheme simple-1 - "simple-1 theme") - -(custom-theme-set-faces - 'simple-1 - - '(default ((t (:background "black" :foreground "white")))) - '(mouse ((t (:foreground "white")))) - '(cursor ((t (:background "indian red")))) - '(border ((t (:foreground "white")))) - - '(modeline ((t (:foreground "black" :background "white")))) - '(modeline-buffer-id ((t (:foreground "black" :background "white")))) - '(modeline-mousable ((t (:foreground "black" :background "white")))) - '(modeline-mousable-minor-mode ((t (:foreground "black" :background "white")))) - '(underline ((t (:underline t)))) - '(region ((t (:background "grey"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'simple-1) - -;;; simple-1-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/sitaramv-nt-theme.el b/elpa/color-theme-modern-0.0.3/sitaramv-nt-theme.el deleted file mode 100644 index e09b202..0000000 --- a/elpa/color-theme-modern-0.0.3/sitaramv-nt-theme.el +++ /dev/null @@ -1,99 +0,0 @@ -;;; sitaramv-nt-theme.el --- sitaramv-nt theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of sitaramv-nt theme from `color-themes' - -;;; Code: - -(deftheme sitaramv-nt - "sitaramv-nt theme") - -(custom-theme-set-faces - 'sitaramv-nt - - '(default ((t (:background "white" :foreground "black")))) - '(mouse ((t (:foreground "sienna3")))) - '(cursor ((t (:background "HotPink")))) - '(border ((t (:foreground "Blue")))) - - '(modeline ((t (:foreground "black" :background "gold2")))) - '(modeline-buffer-id ((t (:foreground "black" :background "gold2")))) - '(modeline-mousable ((t (:foreground "black" :background "gold2")))) - '(modeline-mousable-minor-mode ((t (:foreground "black" :background "gold2")))) - '(highlight ((t (:foreground "black" :background "darkseagreen2")))) - '(bold ((t (:bold t)))) - '(italic ((t (:italic t)))) - '(bold-italic ((t (:bold t :italic t)))) - '(region ((t (:foreground "black" :background "snow3")))) - '(secondary-selection ((t (:background "paleturquoise")))) - '(underline ((t (:underline t)))) - '(lazy-highlight-face ((t (:foreground "dark magenta" :bold t)))) - '(font-lock-comment-face ((t (:foreground "ForestGreen" :italic t)))) - '(font-lock-string-face ((t (:foreground "red")))) - '(font-lock-keyword-face ((t (:foreground "blue" :bold t)))) - '(font-lock-builtin-face ((t (:foreground "black")))) - '(font-lock-function-name-face ((t (:foreground "dark magenta" :bold t)))) - '(font-lock-variable-name-face ((t (:foreground "black")))) - '(font-lock-type-face ((t (:foreground "blue")))) - '(font-lock-constant-face ((t (:foreground "CadetBlue")))) - '(font-lock-warning-face ((t (:foreground "Red" :bold t)))) - '(widget-documentation-face ((t (:foreground "dark green")))) - '(widget-button-face ((t (:bold t)))) - '(widget-field-face ((t (:background "gray85")))) - '(widget-single-line-field-face ((t (:background "gray85")))) - '(widget-inactive-face ((t (:foreground "dim gray")))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(custom-invalid-face ((t (:foreground "yellow" :background "red")))) - '(custom-rogue-face ((t (:foreground "pink" :background "black")))) - '(custom-modified-face ((t (:foreground "white" :background "blue")))) - '(custom-set-face ((t (:foreground "blue" :background "white")))) - '(custom-changed-face ((t (:foreground "white" :background "blue")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-button-face ((t (nil)))) - '(custom-documentation-face ((t (nil)))) - '(custom-state-face ((t (:foreground "dark green")))) - '(custom-variable-tag-face ((t (:foreground "blue" :underline t)))) - '(custom-variable-button-face ((t (:bold t :underline t)))) - '(custom-face-tag-face ((t (:underline t)))) - '(custom-group-tag-face-1 ((t (:foreground "red" :underline t)))) - '(custom-group-tag-face ((t (:foreground "blue" :underline t)))) - '(speedbar-button-face ((t (:foreground "green4")))) - '(speedbar-file-face ((t (:foreground "cyan4")))) - '(speedbar-directory-face ((t (:foreground "blue4")))) - '(speedbar-tag-face ((t (:foreground "brown")))) - '(speedbar-selected-face ((t (:foreground "red" :underline t)))) - '(speedbar-highlight-face ((t (:background "green")))) - '(ff-paths-non-existant-file-face ((t (:foreground "NavyBlue" :bold t)))) - '(show-paren-match-face ((t (:background "light blue")))) - '(show-paren-mismatch-face ((t (:foreground "white" :background "purple"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'sitaramv-nt) - -;;; sitaramv-nt-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/sitaramv-solaris-theme.el b/elpa/color-theme-modern-0.0.3/sitaramv-solaris-theme.el deleted file mode 100644 index beecef5..0000000 --- a/elpa/color-theme-modern-0.0.3/sitaramv-solaris-theme.el +++ /dev/null @@ -1,210 +0,0 @@ -;;; sitaramv-solaris-theme.el --- sitaramv-solaris theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of sitaramv-solaris theme from `color-themes' - -;;; Code: - -(deftheme sitaramv-solaris - "sitaramv-solaris theme") - -(custom-theme-set-faces - 'sitaramv-solaris - - '(default ((t (:background "MidnightBlue" :foreground "white")))) - '(mouse ((t (:foreground "yellow")))) - '(cursor ((t (:background "magenta2")))) - '(border ((t (:foreground "black")))) - - '(modeline ((t (:foreground "black" :background "gold2")))) - '(modeline-buffer-id ((t (:foreground "black" :background "gold2")))) - '(modeline-mousable ((t (:foreground "black" :background "gold2")))) - '(modeline-mousable-minor-mode ((t (:foreground "black" :background "gold2")))) - '(highlight ((t (:foreground "black" :background "Aquamarine")))) - '(bold ((t (:bold t)))) - '(italic ((t (:italic t)))) - '(bold-italic ((t (:bold t :italic t)))) - '(region ((t (:foreground "black" :background "snow3")))) - '(secondary-selection ((t (:foreground "black" :background "aquamarine")))) - '(underline ((t (:underline t)))) - '(lazy-highlight-face ((t (:foreground "yellow")))) - '(font-lock-comment-face ((t (:foreground "orange" :italic t)))) - '(font-lock-string-face ((t (:foreground "orange")))) - '(font-lock-keyword-face ((t (:foreground "green")))) - '(font-lock-builtin-face ((t (:foreground "LightSteelBlue")))) - '(font-lock-function-name-face ((t (:foreground "cyan" :bold t)))) - '(font-lock-variable-name-face ((t (:foreground "white")))) - '(font-lock-type-face ((t (:foreground "cyan")))) - '(font-lock-constant-face ((t (:foreground "Aquamarine")))) - '(font-lock-warning-face ((t (:foreground "Pink" :bold t)))) - '(widget-documentation-face ((t (:foreground "lime green")))) - '(widget-button-face ((t (:bold t)))) - '(widget-field-face ((t (:background "dim gray")))) - '(widget-single-line-field-face ((t (:background "dim gray")))) - '(widget-inactive-face ((t (:foreground "light gray")))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(custom-invalid-face ((t (:foreground "yellow" :background "red")))) - '(custom-rogue-face ((t (:foreground "pink" :background "black")))) - '(custom-modified-face ((t (:foreground "white" :background "blue")))) - '(custom-set-face ((t (:foreground "blue" :background "white")))) - '(custom-changed-face ((t (:foreground "white" :background "blue")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-button-face ((t (nil)))) - '(custom-documentation-face ((t (nil)))) - '(custom-state-face ((t (:foreground "lime green")))) - '(custom-variable-tag-face ((t (:foreground "light blue" :underline t)))) - '(custom-variable-button-face ((t (:bold t :underline t)))) - '(custom-face-tag-face ((t (:underline t)))) - '(custom-group-tag-face-1 ((t (:foreground "pink" :underline t)))) - '(custom-group-tag-face ((t (:foreground "light blue" :underline t)))) - '(speedbar-button-face ((t (:foreground "green3")))) - '(speedbar-file-face ((t (:foreground "cyan")))) - '(speedbar-directory-face ((t (:foreground "light blue")))) - '(speedbar-tag-face ((t (:foreground "yellow")))) - '(speedbar-selected-face ((t (:foreground "red" :underline t)))) - '(speedbar-highlight-face ((t (:background "sea green")))) - '(font-lock-doc-string-face ((t (:foreground "Plum1" :bold t)))) - '(font-lock-exit-face ((t (:foreground "green")))) - '(ff-paths-non-existant-file-face ((t (:foreground "NavyBlue" :bold t)))) - '(show-paren-match-face ((t (:background "red")))) - '(show-paren-mismatch-face ((t (:foreground "white" :background "purple")))) - '(message-header-to-face ((t (:foreground "green2" :bold t)))) - '(message-header-cc-face ((t (:foreground "LightGoldenrod" :bold t)))) - '(message-header-subject-face ((t (:foreground "green3")))) - '(message-header-newsgroups-face ((t (:foreground "yellow" :bold t :italic t)))) - '(message-header-other-face ((t (:foreground "Salmon")))) - '(message-header-name-face ((t (:foreground "green3")))) - '(message-header-xheader-face ((t (:foreground "GreenYellow")))) - '(message-separator-face ((t (:foreground "Tan")))) - '(message-cited-text-face ((t (:foreground "Gold")))) - '(message-mml-face ((t (:foreground "ForestGreen")))) - '(gnus-group-news-1-face ((t (:foreground "PaleTurquoise" :bold t)))) - '(gnus-group-news-1-empty-face ((t (:foreground "PaleTurquoise")))) - '(gnus-group-news-2-face ((t (:foreground "turquoise" :bold t)))) - '(gnus-group-news-2-empty-face ((t (:foreground "turquoise")))) - '(gnus-group-news-3-face ((t (:bold t)))) - '(gnus-group-news-3-empty-face ((t (nil)))) - '(gnus-group-news-4-face ((t (:bold t)))) - '(gnus-group-news-4-empty-face ((t (nil)))) - '(gnus-group-news-5-face ((t (:bold t)))) - '(gnus-group-news-5-empty-face ((t (nil)))) - '(gnus-group-news-6-face ((t (:bold t)))) - '(gnus-group-news-6-empty-face ((t (nil)))) - '(gnus-group-news-low-face ((t (:foreground "DarkTurquoise" :bold t)))) - '(gnus-group-news-low-empty-face ((t (:foreground "DarkTurquoise")))) - '(gnus-group-mail-1-face ((t (:foreground "aquamarine1" :bold t)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "aquamarine1")))) - '(gnus-group-mail-2-face ((t (:foreground "aquamarine2" :bold t)))) - '(gnus-group-mail-2-empty-face ((t (:foreground "aquamarine2")))) - '(gnus-group-mail-3-face ((t (:foreground "aquamarine3" :bold t)))) - '(gnus-group-mail-3-empty-face ((t (:foreground "aquamarine3")))) - '(gnus-group-mail-low-face ((t (:foreground "aquamarine4" :bold t)))) - '(gnus-group-mail-low-empty-face ((t (:foreground "aquamarine4")))) - '(gnus-summary-selected-face ((t (:underline t)))) - '(gnus-summary-cancelled-face ((t (:foreground "yellow" :background "black")))) - '(gnus-summary-high-ticked-face ((t (:foreground "pink" :bold t)))) - '(gnus-summary-low-ticked-face ((t (:foreground "pink" :italic t)))) - '(gnus-summary-normal-ticked-face ((t (:foreground "pink")))) - '(gnus-summary-high-ancient-face ((t (:foreground "SkyBlue" :bold t)))) - '(gnus-summary-low-ancient-face ((t (:foreground "SkyBlue" :italic t)))) - '(gnus-summary-normal-ancient-face ((t (:foreground "SkyBlue")))) - '(gnus-summary-high-unread-face ((t (:bold t)))) - '(gnus-summary-low-unread-face ((t (:italic t)))) - '(gnus-summary-normal-unread-face ((t (nil)))) - '(gnus-summary-high-read-face ((t (:foreground "PaleGreen" :bold t)))) - '(gnus-summary-low-read-face ((t (:foreground "PaleGreen" :italic t)))) - '(gnus-summary-normal-read-face ((t (:foreground "PaleGreen")))) - '(gnus-splash-face ((t (:foreground "Brown")))) - '(eshell-ls-directory-face ((t (:foreground "SkyBlue" :bold t)))) - '(eshell-ls-symlink-face ((t (:foreground "Cyan" :bold t)))) - '(eshell-ls-executable-face ((t (:foreground "Green" :bold t)))) - '(eshell-ls-readonly-face ((t (:foreground "Pink")))) - '(eshell-ls-unreadable-face ((t (:foreground "DarkGrey")))) - '(eshell-ls-special-face ((t (:foreground "Magenta" :bold t)))) - '(eshell-ls-missing-face ((t (:foreground "Red" :bold t)))) - '(eshell-ls-archive-face ((t (:foreground "Orchid" :bold t)))) - '(eshell-ls-backup-face ((t (:foreground "LightSalmon")))) - '(eshell-ls-product-face ((t (:foreground "LightSalmon")))) - '(eshell-ls-clutter-face ((t (:foreground "OrangeRed" :bold t)))) - '(eshell-prompt-face ((t (:foreground "Pink" :bold t)))) - '(term-default-fg ((t (nil)))) - '(term-default-bg ((t (nil)))) - '(term-default-fg-inv ((t (nil)))) - '(term-default-bg-inv ((t (nil)))) - '(term-bold ((t (:bold t)))) - '(term-underline ((t (:underline t)))) - '(term-invisible ((t (nil)))) - '(term-invisible-inv ((t (nil)))) - '(term-black ((t (:foreground "black")))) - '(term-red ((t (:foreground "red")))) - '(term-green ((t (:foreground "green")))) - '(term-yellow ((t (:foreground "yellow")))) - '(term-blue ((t (:foreground "blue")))) - '(term-magenta ((t (:foreground "magenta")))) - '(term-cyan ((t (:foreground "cyan")))) - '(term-white ((t (:foreground "white")))) - '(term-blackbg ((t (:background "black")))) - '(term-redbg ((t (:background "red")))) - '(term-greenbg ((t (:background "green")))) - '(term-yellowbg ((t (:background "yellow")))) - '(term-bluebg ((t (:background "blue")))) - '(term-magentabg ((t (:background "magenta")))) - '(term-cyanbg ((t (:background "cyan")))) - '(term-whitebg ((t (:background "white")))) - '(gnus-emphasis-bold ((t (:bold t)))) - '(gnus-emphasis-italic ((t (:italic t)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(gnus-emphasis-underline-bold ((t (:bold t :underline t)))) - '(gnus-emphasis-underline-italic ((t (:italic t :underline t)))) - '(gnus-emphasis-bold-italic ((t (:bold t :italic t)))) - '(gnus-emphasis-underline-bold-italic ((t (:bold t :italic t :underline t)))) - '(gnus-emphasis-highlight-words ((t (:foreground "yellow" :background "black")))) - '(gnus-signature-face ((t (:italic t)))) - '(gnus-header-from-face ((t (:foreground "spring green")))) - '(gnus-header-subject-face ((t (:foreground "yellow" :bold t)))) - '(gnus-header-newsgroups-face ((t (:foreground "SeaGreen3" :bold t :italic t)))) - '(gnus-header-name-face ((t (:foreground "pink")))) - '(gnus-header-content-face ((t (:foreground "lime green" :italic t)))) - '(gnus-cite-attribution-face ((t (:italic t)))) - '(gnus-cite-face-1 ((t (:foreground "light blue")))) - '(gnus-cite-face-2 ((t (:foreground "light cyan")))) - '(gnus-cite-face-3 ((t (:foreground "light yellow")))) - '(gnus-cite-face-4 ((t (:foreground "light pink")))) - '(gnus-cite-face-5 ((t (:foreground "pale green")))) - '(gnus-cite-face-6 ((t (:foreground "beige")))) - '(gnus-cite-face-7 ((t (:foreground "orange")))) - '(gnus-cite-face-8 ((t (:foreground "magenta")))) - '(gnus-cite-face-9 ((t (:foreground "violet")))) - '(gnus-cite-face-10 ((t (:foreground "medium purple")))) - '(gnus-cite-face-11 ((t (:foreground "turquoise"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'sitaramv-solaris) - -;;; sitaramv-solaris-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/snow-theme.el b/elpa/color-theme-modern-0.0.3/snow-theme.el deleted file mode 100644 index 169c347..0000000 --- a/elpa/color-theme-modern-0.0.3/snow-theme.el +++ /dev/null @@ -1,139 +0,0 @@ -;;; snow-theme.el --- snow theme - -;; Copyright (C) 2001 by Nicolas Rist -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of snow theme from `color-themes' - -;;; Code: - -(deftheme snow - "snow theme") - -(custom-theme-set-faces - 'snow - - '(default ((t (:background "snow2" :foreground "black")))) - '(mouse ((t (:foreground "black")))) - '(cursor ((t (:background "RoyalBlue2")))) - '(border ((t (:foreground "black")))) - - '(gnus-mouse-face ((t (:background "LightSteelBlue1")))) - '(list-matching-lines-face ((t (:bold t)))) - '(view-highlight-face ((t (:background "LightSteelBlue1")))) - - '(bold ((t (:bold t)))) - '(bold-italic ((t (:italic t :bold t)))) - '(calendar-today-face ((t (:underline t)))) - '(custom-button-face ((t (:background "gainsboro" :foreground "dark cyan")))) - '(custom-documentation-face ((t (:background "gainsboro")))) - '(diary-face ((t (:foreground "red")))) - '(fg:black ((t (:foreground "black")))) - '(font-lock-builtin-face ((t (:background "gainsboro" :foreground "medium orchid")))) - '(font-lock-comment-face ((t (:background "gainsboro" :foreground "SteelBlue3")))) - '(font-lock-constant-face ((t (:background "gainsboro" :foreground "orange3")))) - '(font-lock-function-name-face ((t (:background "gainsboro" :foreground "blue3")))) - '(font-lock-keyword-face ((t (:background "gainsboro" :foreground "red3")))) - '(font-lock-string-face ((t (:background "gainsboro" :foreground "SpringGreen3")))) - '(font-lock-type-face ((t (:background "gainsboro" :foreground "dark cyan")))) - '(font-lock-variable-name-face ((t (:background "gainsboro" :foreground "purple2")))) - '(font-lock-warning-face ((t (:bold t :background "gainsboro" :foreground "red")))) - '(gnus-group-mail-1-empty-face ((t (:foreground "DeepPink3")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "DeepPink3")))) - '(gnus-group-mail-2-empty-face ((t (:foreground "HotPink3")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "HotPink3")))) - '(gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "magenta4")))) - '(gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "DeepPink4")))) - '(gnus-group-news-1-empty-face ((t (:foreground "ForestGreen")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "ForestGreen")))) - '(gnus-group-news-2-empty-face ((t (:foreground "CadetBlue4")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "CadetBlue4")))) - '(gnus-group-news-3-empty-face ((t (nil)))) - '(gnus-group-news-3-face ((t (:bold t)))) - '(gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "DarkGreen")))) - '(gnus-splash-face ((t (:foreground "ForestGreen")))) - '(gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "RoyalBlue")))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "DarkGreen")))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "firebrick")))) - '(gnus-summary-high-unread-face ((t (:bold t)))) - '(gnus-summary-low-ancient-face ((t (:italic t :foreground "RoyalBlue")))) - '(gnus-summary-low-read-face ((t (:italic t :foreground "DarkGreen")))) - '(gnus-summary-low-ticked-face ((t (:italic t :foreground "firebrick")))) - '(gnus-summary-low-unread-face ((t (:italic t)))) - '(gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) - '(gnus-summary-normal-read-face ((t (:foreground "DarkGreen")))) - '(gnus-summary-normal-ticked-face ((t (:foreground "firebrick")))) - '(gnus-summary-normal-unread-face ((t (nil)))) - '(gnus-summary-selected-face ((t (:underline t)))) - '(gui-button-face ((t (:foreground "light grey")))) - '(highlight ((t (:background "LightSteelBlue1")))) - '(holiday-face ((t (:background "pink")))) - '(ibuffer-marked-face ((t (:foreground "red")))) - '(italic ((t (:italic t)))) - '(message-cited-text-face ((t (:foreground "red")))) - '(message-header-cc-face ((t (:foreground "MidnightBlue")))) - '(message-header-name-face ((t (:foreground "cornflower blue")))) - '(message-header-newsgroups-face ((t (:italic t :bold t :foreground "blue4")))) - '(message-header-other-face ((t (:foreground "steel blue")))) - '(message-header-subject-face ((t (:bold t :foreground "navy blue")))) - '(message-header-to-face ((t (:bold t :foreground "MidnightBlue")))) - '(message-header-xheader-face ((t (:foreground "blue")))) - '(message-separator-face ((t (:foreground "brown")))) - '(modeline ((t (:background "dark slate gray" :foreground "gainsboro")))) - '(modeline-buffer-id ((t (:background "dark slate gray" :foreground "gainsboro")))) - '(modeline-mousable ((t (:background "dark slate gray" :foreground "gainsboro")))) - '(modeline-mousable-minor-mode ((t (:background "dark slate gray" :foreground "gainsboro")))) - '(region ((t (:background "lavender")))) - '(secondary-selection ((t (:background "paleturquoise")))) - '(sgml-comment-face ((t (:foreground "dark green")))) - '(sgml-doctype-face ((t (:foreground "maroon")))) - '(sgml-end-tag-face ((t (:foreground "blue2")))) - '(sgml-entity-face ((t (:foreground "red2")))) - '(sgml-ignored-face ((t (:background "gray90" :foreground "maroon")))) - '(sgml-ms-end-face ((t (:foreground "maroon")))) - '(sgml-ms-start-face ((t (:foreground "maroon")))) - '(sgml-pi-face ((t (:foreground "maroon")))) - '(sgml-sgml-face ((t (:foreground "maroon")))) - '(sgml-short-ref-face ((t (:foreground "goldenrod")))) - '(sgml-start-tag-face ((t (:foreground "blue2")))) - '(show-paren-match-face ((t (:background "SlateGray1")))) - '(show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) - '(speedbar-button-face ((t (:foreground "green4")))) - '(speedbar-directory-face ((t (:foreground "blue4")))) - '(speedbar-file-face ((t (:foreground "cyan4")))) - '(speedbar-highlight-face ((t (:background "dark turquoise" :foreground "white")))) - '(speedbar-selected-face ((t (:underline t :foreground "red")))) - '(speedbar-tag-face ((t (:foreground "brown")))) - '(underline ((t (:underline t))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'snow) - -;;; snow-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/snowish-theme.el b/elpa/color-theme-modern-0.0.3/snowish-theme.el deleted file mode 100644 index a8b2731..0000000 --- a/elpa/color-theme-modern-0.0.3/snowish-theme.el +++ /dev/null @@ -1,267 +0,0 @@ -;;; snowish-theme.el --- snowish theme - -;; Copyright (C) 2001 by Girish Bharadwaj -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of snowish theme from `color-themes' - -;;; Code: - -(deftheme snowish - "snowish theme") - -(custom-theme-set-faces - 'snowish - - '(default ((t (:background "snow2" :foreground "darkslategray")))) - '(mouse ((t (:foreground "black")))) - '(cursor ((t (:background "Red3")))) - '(border ((t (:foreground "black")))) - - '(blue ((t (:foreground "blue")))) - '(bold ((t (:bold t :foreground "peru")))) - '(bold-italic ((t (:italic t :bold t)))) - '(border-glyph ((t (nil)))) - '(buffers-tab ((t (:background "snow2" :foreground "darkslategray")))) - '(custom-button-face ((t (:bold t)))) - '(custom-changed-face ((t (:background "blue" :foreground "white")))) - '(custom-comment-face ((t (:background "gray85")))) - '(custom-comment-tag-face ((t (:foreground "blue4")))) - '(custom-documentation-face ((t (nil)))) - '(custom-face-tag-face ((t (:underline t)))) - '(custom-group-tag-face ((t (:underline t :foreground "blue")))) - '(custom-group-tag-face-1 ((t (:underline t :foreground "red")))) - '(custom-invalid-face ((t (:background "red" :foreground "yellow")))) - '(custom-modified-face ((t (:background "blue" :foreground "white")))) - '(custom-rogue-face ((t (:background "black" :foreground "pink")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:background "white" :foreground "blue")))) - '(custom-state-face ((t (:foreground "dark green")))) - '(custom-variable-button-face ((t (:underline t :bold t)))) - '(custom-variable-tag-face ((t (:underline t :foreground "blue")))) - '(cyan ((t (:foreground "cyan")))) - '(display-time-mail-balloon-enhance-face ((t (:background "orange")))) - '(display-time-mail-balloon-gnus-group-face ((t (:foreground "blue")))) - '(display-time-time-balloon-face ((t (:foreground "red")))) - '(eshell-ls-archive-face ((t (:bold t :foreground "Orchid")))) - '(eshell-ls-backup-face ((t (:foreground "OrangeRed")))) - '(eshell-ls-clutter-face ((t (:bold t :foreground "OrangeRed")))) - '(eshell-ls-directory-face ((t (:bold t :foreground "Blue")))) - '(eshell-ls-executable-face ((t (:bold t :foreground "ForestGreen")))) - '(eshell-ls-missing-face ((t (:bold t :foreground "Red")))) - '(eshell-ls-product-face ((t (:foreground "OrangeRed")))) - '(eshell-ls-readonly-face ((t (:foreground "Brown")))) - '(eshell-ls-special-face ((t (:bold t :foreground "Magenta")))) - '(eshell-ls-symlink-face ((t (:bold t :foreground "Dark Cyan")))) - '(eshell-ls-unreadable-face ((t (:foreground "Grey30")))) - '(eshell-prompt-face ((t (:bold t :foreground "Red")))) - '(font-lock-builtin-face ((t (:underline t :foreground "blue")))) - '(font-lock-comment-face ((t (:foreground "snow4")))) - '(font-lock-constant-face ((t (:foreground "CadetBlue")))) - '(font-lock-doc-string-face ((t (:foreground "mediumblue")))) - '(font-lock-function-name-face ((t (:bold t :foreground "darkblue")))) - '(font-lock-keyword-face ((t (:bold t :foreground "dodgerblue")))) - '(font-lock-preprocessor-face ((t (:underline t :foreground "blue3")))) - '(font-lock-reference-face ((t (:foreground "red3")))) - '(font-lock-string-face ((t (:foreground "darkviolet")))) - '(font-lock-type-face ((t (:foreground "goldenrod")))) - '(font-lock-variable-name-face ((t (:foreground "tomato")))) - '(font-lock-warning-face ((t (:bold t :foreground "Red")))) - '(gnus-cite-attribution-face ((t (nil)))) - '(gnus-cite-face-1 ((t (:foreground "MidnightBlue")))) - '(gnus-cite-face-10 ((t (:foreground "medium purple")))) - '(gnus-cite-face-11 ((t (:foreground "turquoise")))) - '(gnus-cite-face-2 ((t (:foreground "firebrick")))) - '(gnus-cite-face-3 ((t (:foreground "dark green")))) - '(gnus-cite-face-4 ((t (:foreground "OrangeRed")))) - '(gnus-cite-face-5 ((t (:foreground "dark khaki")))) - '(gnus-cite-face-6 ((t (:foreground "dark violet")))) - '(gnus-cite-face-7 ((t (:foreground "SteelBlue4")))) - '(gnus-cite-face-8 ((t (:foreground "magenta")))) - '(gnus-cite-face-9 ((t (:foreground "violet")))) - '(gnus-emphasis-bold ((t (:bold t)))) - '(gnus-emphasis-bold-italic ((t (nil)))) - '(gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) - '(gnus-emphasis-italic ((t (nil)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(gnus-emphasis-underline-bold ((t (:underline t :bold t)))) - '(gnus-emphasis-underline-bold-italic ((t (:underline t)))) - '(gnus-emphasis-underline-italic ((t (:underline t)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "DeepPink3")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "DeepPink3")))) - '(gnus-group-mail-2-empty-face ((t (:foreground "HotPink3")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "HotPink3")))) - '(gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "magenta4")))) - '(gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "DeepPink4")))) - '(gnus-group-news-1-empty-face ((t (:foreground "ForestGreen")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "ForestGreen")))) - '(gnus-group-news-2-empty-face ((t (:foreground "CadetBlue4")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "CadetBlue4")))) - '(gnus-group-news-3-empty-face ((t (nil)))) - '(gnus-group-news-3-face ((t (:bold t)))) - '(gnus-group-news-4-empty-face ((t (nil)))) - '(gnus-group-news-4-face ((t (:bold t)))) - '(gnus-group-news-5-empty-face ((t (nil)))) - '(gnus-group-news-5-face ((t (:bold t)))) - '(gnus-group-news-6-empty-face ((t (nil)))) - '(gnus-group-news-6-face ((t (:bold t)))) - '(gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "DarkGreen")))) - '(gnus-header-content-face ((t (:foreground "indianred4")))) - '(gnus-header-from-face ((t (:foreground "red3")))) - '(gnus-header-name-face ((t (:foreground "maroon")))) - '(gnus-header-newsgroups-face ((t (:foreground "MidnightBlue")))) - '(gnus-header-subject-face ((t (:foreground "red4")))) - '(gnus-picons-face ((t (:background "white" :foreground "black")))) - '(gnus-picons-xbm-face ((t (:background "white" :foreground "black")))) - '(gnus-signature-face ((t (nil)))) - '(gnus-splash-face ((t (:foreground "Brown")))) - '(gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "RoyalBlue")))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "DarkGreen")))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "firebrick")))) - '(gnus-summary-high-unread-face ((t (:bold t)))) - '(gnus-summary-low-ancient-face ((t (:foreground "RoyalBlue")))) - '(gnus-summary-low-read-face ((t (:foreground "DarkGreen")))) - '(gnus-summary-low-ticked-face ((t (:foreground "firebrick")))) - '(gnus-summary-low-unread-face ((t (nil)))) - '(gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) - '(gnus-summary-normal-read-face ((t (:foreground "DarkGreen")))) - '(gnus-summary-normal-ticked-face ((t (:foreground "firebrick")))) - '(gnus-summary-normal-unread-face ((t (nil)))) - '(gnus-summary-selected-face ((t (:underline t)))) - '(gnus-x-face ((t (:background "white" :foreground "black")))) - '(green ((t (:foreground "green")))) - '(gui-button-face ((t (:background "grey75" :foreground "black")))) - '(gui-element ((t (:background "#D4D0C8" :foreground "black")))) - '(highlight ((t (:background "darkseagreen2")))) - '(html-helper-bold-face ((t (:bold t)))) - '(html-helper-bold-italic-face ((t (nil)))) - '(html-helper-builtin-face ((t (:underline t :foreground "blue3")))) - '(html-helper-italic-face ((t (:foreground "medium sea green")))) - '(html-helper-underline-face ((t (:underline t)))) - '(html-tag-face ((t (:bold t)))) - '(hyper-apropos-documentation ((t (:foreground "darkred")))) - '(hyper-apropos-heading ((t (:bold t)))) - '(hyper-apropos-hyperlink ((t (:foreground "blue4")))) - '(hyper-apropos-major-heading ((t (:bold t)))) - '(hyper-apropos-section-heading ((t (nil)))) - '(hyper-apropos-warning ((t (:bold t :foreground "red")))) - '(info-menu-6 ((t (nil)))) - '(isearch ((t (:background "paleturquoise")))) - '(isearch-secondary ((t (:foreground "red3")))) - '(italic ((t (nil)))) - '(jde-bug-breakpoint-cursor ((t (:background "brown" :foreground "cyan")))) - '(jde-bug-breakpoint-marker ((t (:background "yellow" :foreground "red")))) - '(jde-java-font-lock-link-face ((t (:underline t :foreground "blue")))) - '(jde-java-font-lock-number-face ((t (:foreground "RosyBrown")))) - '(left-margin ((t (nil)))) - '(list-mode-item-selected ((t (:background "gray68" :foreground "darkslategray")))) - '(magenta ((t (:foreground "magenta")))) - '(message-cited-text-face ((t (:foreground "red")))) - '(message-header-cc-face ((t (:foreground "MidnightBlue")))) - '(message-header-name-face ((t (:foreground "cornflower blue")))) - '(message-header-newsgroups-face ((t (:foreground "blue4")))) - '(message-header-other-face ((t (:foreground "steel blue")))) - '(message-header-subject-face ((t (:bold t :foreground "navy blue")))) - '(message-header-to-face ((t (:bold t :foreground "MidnightBlue")))) - '(message-header-xheader-face ((t (:foreground "blue")))) - '(message-mml-face ((t (:foreground "ForestGreen")))) - '(message-separator-face ((t (:foreground "brown")))) - '(modeline ((t (nil)))) - '(modeline-buffer-id ((t (:background "#D4D0C8" :foreground "blue4")))) - '(modeline-mousable ((t (:background "#D4D0C8" :foreground "firebrick")))) - '(modeline-mousable-minor-mode ((t (:background "#D4D0C8" :foreground "green4")))) - '(paren-blink-off ((t (:foreground "snow2")))) - '(paren-match ((t (:background "darkseagreen2")))) - '(paren-mismatch ((t (:background "snow2" :foreground "darkslategray")))) - '(pointer ((t (nil)))) - '(primary-selection ((t (:background "gray65")))) - '(red ((t (:foreground "red")))) - '(right-margin ((t (nil)))) - '(secondary-selection ((t (:background "paleturquoise")))) - '(semantic-intangible-face ((t (:foreground "gray25")))) - '(semantic-read-only-face ((t (:background "gray25")))) - '(senator-momentary-highlight-face ((t (:background "gray70")))) - '(speedbar-button-face ((t (:foreground "green4")))) - '(speedbar-directory-face ((t (:foreground "blue4")))) - '(speedbar-file-face ((t (:foreground "cyan4")))) - '(speedbar-highlight-face ((t (:background "green")))) - '(speedbar-selected-face ((t (:underline t :foreground "red")))) - '(speedbar-tag-face ((t (:foreground "brown")))) - '(template-message-face ((t (:bold t)))) - '(term-blue-bold-face ((t (:bold t :background "snow2" :foreground "blue")))) - '(term-blue-face ((t (:foreground "blue")))) - '(term-blue-inv-face ((t (:background "blue")))) - '(term-blue-ul-face ((t (:underline t :background "snow2" :foreground "blue")))) - '(term-cyan-bold-face ((t (:bold t :background "snow2" :foreground "cyan")))) - '(term-cyan-face ((t (:foreground "cyan")))) - '(term-cyan-inv-face ((t (:background "cyan")))) - '(term-cyan-ul-face ((t (:underline t :background "snow2" :foreground "cyan")))) - '(term-default-bold-face ((t (:bold t :background "snow2" :foreground "darkslategray")))) - '(term-default-face ((t (:background "snow2" :foreground "darkslategray")))) - '(term-default-inv-face ((t (:background "darkslategray" :foreground "snow2")))) - '(term-default-ul-face ((t (:underline t :background "snow2" :foreground "darkslategray")))) - '(term-green-bold-face ((t (:bold t :background "snow2" :foreground "green")))) - '(term-green-face ((t (:foreground "green")))) - '(term-green-inv-face ((t (:background "green")))) - '(term-green-ul-face ((t (:underline t :background "snow2" :foreground "green")))) - '(term-magenta-bold-face ((t (:bold t :background "snow2" :foreground "magenta")))) - '(term-magenta-face ((t (:foreground "magenta")))) - '(term-magenta-inv-face ((t (:background "magenta")))) - '(term-magenta-ul-face ((t (:underline t :background "snow2" :foreground "magenta")))) - '(term-red-bold-face ((t (:bold t :background "snow2" :foreground "red")))) - '(term-red-face ((t (:foreground "red")))) - '(term-red-inv-face ((t (:background "red")))) - '(term-red-ul-face ((t (:underline t :background "snow2" :foreground "red")))) - '(term-white-bold-face ((t (:bold t :background "snow2" :foreground "white")))) - '(term-white-face ((t (:foreground "white")))) - '(term-white-inv-face ((t (:background "snow2")))) - '(term-white-ul-face ((t (:underline t :background "snow2" :foreground "white")))) - '(term-yellow-bold-face ((t (:bold t :background "snow2" :foreground "yellow")))) - '(term-yellow-face ((t (:foreground "yellow")))) - '(term-yellow-inv-face ((t (:background "yellow")))) - '(term-yellow-ul-face ((t (:underline t :background "snow2" :foreground "yellow")))) - '(text-cursor ((t (:background "Red3" :foreground "snow2")))) - '(toolbar ((t (nil)))) - '(underline ((t (:underline t)))) - '(vertical-divider ((t (nil)))) - '(white ((t (:foreground "white")))) - '(widget ((t (nil)))) - '(widget-button-face ((t (:bold t)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "dark green")))) - '(widget-field-face ((t (:background "gray85")))) - '(widget-inactive-face ((t (:foreground "dim gray")))) - '(yellow ((t (:foreground "yellow")))) - '(zmacs-region ((t (:background "gray65"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'snowish) - -;;; snowish-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/standard-ediff-theme.el b/elpa/color-theme-modern-0.0.3/standard-ediff-theme.el deleted file mode 100644 index 0bed478..0000000 --- a/elpa/color-theme-modern-0.0.3/standard-ediff-theme.el +++ /dev/null @@ -1,60 +0,0 @@ -;;; standard-ediff-theme.el --- standard-ediff theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of standard-ediff theme from `color-themes' - -;;; Code: - -(deftheme standard-ediff - "standard-ediff theme") - -(custom-theme-set-faces - 'standard-ediff - - '(ediff-current-diff-face-A ((t (:background "pale green" :foreground "firebrick")))) - '(ediff-current-diff-face-Ancestor ((t (:background "VioletRed" :foreground "Black")))) - '(ediff-current-diff-face-B ((t (:background "Yellow" :foreground "DarkOrchid")))) - '(ediff-current-diff-face-C ((t (:background "Pink" :foreground "Navy")))) - '(ediff-even-diff-face-A ((t (:background "light grey" :foreground "Black")))) - '(ediff-even-diff-face-Ancestor ((t (:background "Grey" :foreground "White")))) - '(ediff-even-diff-face-B ((t (:background "Grey" :foreground "White")))) - '(ediff-even-diff-face-C ((t (:background "light grey" :foreground "Black")))) - '(ediff-fine-diff-face-A ((t (:background "sky blue" :foreground "Navy")))) - '(ediff-fine-diff-face-Ancestor ((t (:background "Green" :foreground "Black")))) - '(ediff-fine-diff-face-B ((t (:background "cyan" :foreground "Black")))) - '(ediff-fine-diff-face-C ((t (:background "Turquoise" :foreground "Black")))) - '(ediff-odd-diff-face-A ((t (:background "Grey" :foreground "White")))) - '(ediff-odd-diff-face-Ancestor ((t (:background "light grey" :foreground "Black")))) - '(ediff-odd-diff-face-B ((t (:background "light grey" :foreground "Black")))) - '(ediff-odd-diff-face-C ((t (:background "Grey" :foreground "White"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'standard-ediff) - -;;; standard-ediff-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/standard-theme.el b/elpa/color-theme-modern-0.0.3/standard-theme.el deleted file mode 100644 index 9b43d5b..0000000 --- a/elpa/color-theme-modern-0.0.3/standard-theme.el +++ /dev/null @@ -1,273 +0,0 @@ - -;;; standard-theme.el --- standard theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of standard theme from `color-themes' - -;;; Code: - -(deftheme standard - "standard theme") - -(custom-theme-set-faces - 'standard - - '(default ((t (:background "white" :foreground "black")))) - '(mouse ((t (:foreground "black")))) - '(cursor ((t (:background "black")))) - '(border ((t (:foreground "black")))) - - '(Man-overstrike-face ((t (:bold t)))) - '(Man-underline-face ((t (:underline t)))) - '(apropos-keybinding-face ((t (:underline t)))) - '(apropos-label-face ((t (:italic t)))) - '(apropos-match-face ((t (:background "paleturquoise")))) - '(apropos-property-face ((t (:bold t :italic t)))) - '(apropos-symbol-face ((t (:bold t)))) - '(goto-address-mail-face ((t (:italic t)))) - '(goto-address-mail-mouse-face ((t (:background "paleturquoise")))) - '(goto-address-url-face ((t (:bold t)))) - '(goto-address-url-mouse-face ((t (:background "darkseagreen2")))) - '(help-highlight-face ((t (:underline t)))) - '(list-matching-lines-face ((t (:bold t)))) - '(view-highlight-face ((t (:background "darkseagreen2")))) - - '(bold ((t (:bold t)))) - '(bold-italic ((t (:bold t :italic t)))) - '(calendar-today-face ((t (:underline t)))) - '(cperl-array-face ((t (:foreground "Blue" :background "lightyellow2" :bold t)))) - '(cperl-hash-face ((t (:foreground "Red" :background "lightyellow2" :bold t :italic t)))) - '(cperl-nonoverridable-face ((t (:foreground "chartreuse3")))) - '(custom-button-face ((t (nil)))) - '(custom-changed-face ((t (:foreground "white" :background "blue")))) - '(custom-documentation-face ((t (nil)))) - '(custom-face-tag-face ((t (:underline t)))) - '(custom-group-tag-face ((t (:foreground "blue" :underline t)))) - '(custom-group-tag-face-1 ((t (:foreground "red" :underline t)))) - '(custom-invalid-face ((t (:foreground "yellow" :background "red")))) - '(custom-modified-face ((t (:foreground "white" :background "blue")))) - '(custom-rogue-face ((t (:foreground "pink" :background "black")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:foreground "blue" :background "white")))) - '(custom-state-face ((t (:foreground "dark green")))) - '(custom-variable-button-face ((t (:bold t :underline t)))) - '(custom-variable-tag-face ((t (:foreground "blue" :underline t)))) - '(diary-face ((t (:foreground "red")))) - '(ediff-current-diff-face-A ((t (:foreground "firebrick" :background "pale green")))) - '(ediff-current-diff-face-Ancestor ((t (:foreground "Black" :background "VioletRed")))) - '(ediff-current-diff-face-B ((t (:foreground "DarkOrchid" :background "Yellow")))) - '(ediff-current-diff-face-C ((t (:foreground "Navy" :background "Pink")))) - '(ediff-even-diff-face-A ((t (:foreground "Black" :background "light grey")))) - '(ediff-even-diff-face-Ancestor ((t (:foreground "White" :background "Grey")))) - '(ediff-even-diff-face-B ((t (:foreground "White" :background "Grey")))) - '(ediff-even-diff-face-C ((t (:foreground "Black" :background "light grey")))) - '(ediff-fine-diff-face-A ((t (:foreground "Navy" :background "sky blue")))) - '(ediff-fine-diff-face-Ancestor ((t (:foreground "Black" :background "Green")))) - '(ediff-fine-diff-face-B ((t (:foreground "Black" :background "cyan")))) - '(ediff-fine-diff-face-C ((t (:foreground "Black" :background "Turquoise")))) - '(ediff-odd-diff-face-A ((t (:foreground "White" :background "Grey")))) - '(ediff-odd-diff-face-Ancestor ((t (:foreground "Black" :background "light grey")))) - '(ediff-odd-diff-face-B ((t (:foreground "Black" :background "light grey")))) - '(ediff-odd-diff-face-C ((t (:foreground "White" :background "Grey")))) - '(eshell-ls-archive-face ((t (:foreground "Orchid" :bold t)))) - '(eshell-ls-backup-face ((t (:foreground "OrangeRed")))) - '(eshell-ls-clutter-face ((t (:foreground "OrangeRed" :bold t)))) - '(eshell-ls-directory-face ((t (:foreground "Blue" :bold t)))) - '(eshell-ls-executable-face ((t (:foreground "ForestGreen" :bold t)))) - '(eshell-ls-missing-face ((t (:foreground "Red" :bold t)))) - '(eshell-ls-product-face ((t (:foreground "OrangeRed")))) - '(eshell-ls-readonly-face ((t (:foreground "Brown")))) - '(eshell-ls-special-face ((t (:foreground "Magenta" :bold t)))) - '(eshell-ls-symlink-face ((t (:foreground "DarkCyan" :bold t)))) - '(eshell-ls-unreadable-face ((t (:foreground "Grey30")))) - '(eshell-prompt-face ((t (:foreground "Red" :bold t)))) - '(eshell-test-failed-face ((t (:foreground "OrangeRed" :bold t)))) - '(eshell-test-ok-face ((t (:foreground "Green" :bold t)))) - '(excerpt ((t (:italic t)))) - '(fixed ((t (:bold t)))) - '(flyspell-duplicate-face ((t (:foreground "Gold3" :bold t :underline t)))) - '(flyspell-incorrect-face ((t (:foreground "OrangeRed" :bold t :underline t)))) - '(font-lock-builtin-face ((t (:foreground "Orchid")))) - '(font-lock-comment-face ((t (:foreground "Firebrick")))) - '(font-lock-constant-face ((t (:foreground "CadetBlue")))) - '(font-lock-function-name-face ((t (:foreground "Blue")))) - '(font-lock-keyword-face ((t (:foreground "Purple")))) - '(font-lock-string-face ((t (:foreground "RosyBrown")))) - '(font-lock-type-face ((t (:foreground "ForestGreen")))) - '(font-lock-variable-name-face ((t (:foreground "DarkGoldenrod")))) - '(font-lock-warning-face ((t (:foreground "Red" :bold t)))) - '(fringe ((t (:background "grey95")))) - '(gnus-cite-attribution-face ((t (:italic t)))) - '(gnus-cite-face-1 ((t (:foreground "MidnightBlue")))) - '(gnus-cite-face-10 ((t (:foreground "medium purple")))) - '(gnus-cite-face-11 ((t (:foreground "turquoise")))) - '(gnus-cite-face-2 ((t (:foreground "firebrick")))) - '(gnus-cite-face-3 ((t (:foreground "dark green")))) - '(gnus-cite-face-4 ((t (:foreground "OrangeRed")))) - '(gnus-cite-face-5 ((t (:foreground "dark khaki")))) - '(gnus-cite-face-6 ((t (:foreground "dark violet")))) - '(gnus-cite-face-7 ((t (:foreground "SteelBlue4")))) - '(gnus-cite-face-8 ((t (:foreground "magenta")))) - '(gnus-cite-face-9 ((t (:foreground "violet")))) - '(gnus-emphasis-bold ((t (:bold t)))) - '(gnus-emphasis-bold-italic ((t (:bold t :italic t)))) - '(gnus-emphasis-italic ((t (:italic t)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(gnus-emphasis-underline-bold ((t (:bold t :underline t)))) - '(gnus-emphasis-underline-bold-italic ((t (:bold t :italic t :underline t)))) - '(gnus-emphasis-underline-italic ((t (:italic t :underline t)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "DeepPink3")))) - '(gnus-group-mail-1-face ((t (:foreground "DeepPink3" :bold t)))) - '(gnus-group-mail-2-empty-face ((t (:foreground "HotPink3")))) - '(gnus-group-mail-2-face ((t (:foreground "HotPink3" :bold t)))) - '(gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) - '(gnus-group-mail-3-face ((t (:foreground "magenta4" :bold t)))) - '(gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) - '(gnus-group-mail-low-face ((t (:foreground "DeepPink4" :bold t)))) - '(gnus-group-news-1-empty-face ((t (:foreground "ForestGreen")))) - '(gnus-group-news-1-face ((t (:foreground "ForestGreen" :bold t)))) - '(gnus-group-news-2-empty-face ((t (:foreground "CadetBlue4")))) - '(gnus-group-news-2-face ((t (:foreground "CadetBlue4" :bold t)))) - '(gnus-group-news-3-empty-face ((t (nil)))) - '(gnus-group-news-3-face ((t (:bold t)))) - '(gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) - '(gnus-group-news-low-face ((t (:foreground "DarkGreen" :bold t)))) - '(gnus-header-content-face ((t (:foreground "indianred4" :italic t)))) - '(gnus-header-from-face ((t (:foreground "red3")))) - '(gnus-header-name-face ((t (:foreground "maroon")))) - '(gnus-header-newsgroups-face ((t (:foreground "MidnightBlue" :italic t)))) - '(gnus-header-subject-face ((t (:foreground "red4")))) - '(gnus-signature-face ((t (:italic t)))) - '(gnus-splash-face ((t (:foreground "ForestGreen")))) - '(gnus-summary-cancelled-face ((t (:foreground "yellow" :background "black")))) - '(gnus-summary-high-ancient-face ((t (:foreground "RoyalBlue" :bold t)))) - '(gnus-summary-high-read-face ((t (:foreground "DarkGreen" :bold t)))) - '(gnus-summary-high-ticked-face ((t (:foreground "firebrick" :bold t)))) - '(gnus-summary-high-unread-face ((t (:bold t)))) - '(gnus-summary-low-ancient-face ((t (:foreground "RoyalBlue" :italic t)))) - '(gnus-summary-low-read-face ((t (:foreground "DarkGreen" :italic t)))) - '(gnus-summary-low-ticked-face ((t (:foreground "firebrick" :italic t)))) - '(gnus-summary-low-unread-face ((t (:italic t)))) - '(gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) - '(gnus-summary-normal-read-face ((t (:foreground "DarkGreen")))) - '(gnus-summary-normal-ticked-face ((t (:foreground "firebrick")))) - '(gnus-summary-normal-unread-face ((t (nil)))) - '(gnus-summary-selected-face ((t (:underline t)))) - '(highlight ((t (:background "darkseagreen2")))) - '(highlight-changes-delete-face ((t (:foreground "red" :underline t)))) - '(highlight-changes-face ((t (:foreground "red")))) - '(highline-face ((t (:background "paleturquoise")))) - '(holiday-face ((t (:background "pink")))) - '(info-menu-5 ((t (:underline t)))) - '(info-node ((t (:bold t :italic t)))) - '(info-xref ((t (:bold t)))) - '(italic ((t (:italic t)))) - '(makefile-space-face ((t (:background "hotpink")))) - '(message-cited-text-face ((t (:foreground "red")))) - '(message-header-cc-face ((t (:foreground "MidnightBlue")))) - '(message-header-name-face ((t (:foreground "cornflower blue")))) - '(message-header-newsgroups-face ((t (:foreground "blue4" :bold t :italic t)))) - '(message-header-other-face ((t (:foreground "steel blue")))) - '(message-header-subject-face ((t (:foreground "navy blue" :bold t)))) - '(message-header-to-face ((t (:foreground "MidnightBlue" :bold t)))) - '(message-header-xheader-face ((t (:foreground "blue")))) - '(message-separator-face ((t (:foreground "brown")))) - '(modeline ((t (:foreground "white" :background "black")))) - '(modeline-buffer-id ((t (:foreground "white" :background "black")))) - '(modeline-mousable ((t (:foreground "white" :background "black")))) - '(modeline-mousable-minor-mode ((t (:foreground "white" :background "black")))) - '(region ((t (:background "gray")))) - '(secondary-selection ((t (:background "paleturquoise")))) - '(show-paren-match-face ((t (:background "turquoise")))) - '(show-paren-mismatch-face ((t (:foreground "white" :background "purple")))) - '(speedbar-button-face ((t (:foreground "green4")))) - '(speedbar-directory-face ((t (:foreground "blue4")))) - '(speedbar-file-face ((t (:foreground "cyan4")))) - '(speedbar-highlight-face ((t (:background "green")))) - '(speedbar-selected-face ((t (:foreground "red" :underline t)))) - '(speedbar-tag-face ((t (:foreground "brown")))) - '(term-black ((t (:foreground "black")))) - '(term-blackbg ((t (:background "black")))) - '(term-blue ((t (:foreground "blue")))) - '(term-bluebg ((t (:background "blue")))) - '(term-bold ((t (:bold t)))) - '(term-cyan ((t (:foreground "cyan")))) - '(term-cyanbg ((t (:background "cyan")))) - '(term-default-bg ((t (nil)))) - '(term-default-bg-inv ((t (nil)))) - '(term-default-fg ((t (nil)))) - '(term-default-fg-inv ((t (nil)))) - '(term-green ((t (:foreground "green")))) - '(term-greenbg ((t (:background "green")))) - '(term-invisible ((t (nil)))) - '(term-invisible-inv ((t (nil)))) - '(term-magenta ((t (:foreground "magenta")))) - '(term-magentabg ((t (:background "magenta")))) - '(term-red ((t (:foreground "red")))) - '(term-redbg ((t (:background "red")))) - '(term-underline ((t (:underline t)))) - '(term-white ((t (:foreground "white")))) - '(term-whitebg ((t (:background "white")))) - '(term-yellow ((t (:foreground "yellow")))) - '(term-yellowbg ((t (:background "yellow")))) - '(underline ((t (:underline t)))) - '(vcursor ((t (:foreground "blue" :background "cyan" :underline t)))) - '(vhdl-font-lock-attribute-face ((t (:foreground "Orchid")))) - '(vhdl-font-lock-directive-face ((t (:foreground "CadetBlue")))) - '(vhdl-font-lock-enumvalue-face ((t (:foreground "Gold4")))) - '(vhdl-font-lock-function-face ((t (:foreground "Orchid4")))) - '(vhdl-font-lock-prompt-face ((t (:foreground "Red" :bold t)))) - '(vhdl-font-lock-reserved-words-face ((t (:foreground "Orange" :bold t)))) - '(vhdl-font-lock-translate-off-face ((t (:background "LightGray")))) - '(vhdl-speedbar-architecture-face ((t (:foreground "Blue")))) - '(vhdl-speedbar-architecture-selected-face ((t (:foreground "Blue" :underline t)))) - '(vhdl-speedbar-configuration-face ((t (:foreground "DarkGoldenrod")))) - '(vhdl-speedbar-configuration-selected-face ((t (:foreground "DarkGoldenrod" :underline t)))) - '(vhdl-speedbar-entity-face ((t (:foreground "ForestGreen")))) - '(vhdl-speedbar-entity-selected-face ((t (:foreground "ForestGreen" :underline t)))) - '(vhdl-speedbar-instantiation-face ((t (:foreground "Brown")))) - '(vhdl-speedbar-instantiation-selected-face ((t (:foreground "Brown" :underline t)))) - '(vhdl-speedbar-package-face ((t (:foreground "Grey50")))) - '(vhdl-speedbar-package-selected-face ((t (:foreground "Grey50" :underline t)))) - '(viper-minibuffer-emacs-face ((t (:foreground "Black" :background "darkseagreen2")))) - '(viper-minibuffer-insert-face ((t (:foreground "Black" :background "pink")))) - '(viper-minibuffer-vi-face ((t (:foreground "DarkGreen" :background "grey")))) - '(viper-replace-overlay-face ((t (:foreground "Black" :background "darkseagreen2")))) - '(viper-search-face ((t (:foreground "Black" :background "khaki")))) - '(widget-button-face ((t (:bold t)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "dark green")))) - '(widget-field-face ((t (:background "gray85")))) - '(widget-inactive-face ((t (:foreground "dim gray")))) - '(widget-single-line-field-face ((t (:background "gray85"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'standard) - -;;; standard-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/subdued-theme.el b/elpa/color-theme-modern-0.0.3/subdued-theme.el deleted file mode 100644 index 0be4bd3..0000000 --- a/elpa/color-theme-modern-0.0.3/subdued-theme.el +++ /dev/null @@ -1,110 +0,0 @@ -;;; subdued-theme.el --- subdued theme - -;; Copyright (C) 2009-2010 Jason R. Blevins -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of subdued theme from http://jblevins.org/projects/emacs-color-themes/ - -;;; Code: - -(deftheme subdued - "subdued theme") - -(custom-theme-set-faces - 'subdued - - '(default ((t (:background "#000" :foreground "#d3d7cf")))) - '(mouse ((t (:foreground "black")))) - '(cursor ((t (:background "#73d216")))) - '(border ((t (:foreground "#73d216")))) - - '(font-lock-comment-face ((t (:foreground "#61635e")))) ; dark aluminum - '(font-lock-comment-delimiter-face ((t (:foreground "#61635e")))) ; dark aluminum - '(font-lock-doc-face ((t (:foreground "#77507b")))) ; plum - '(font-lock-doc-string-face ((t (:foreground "#77507b")))) ; plum - '(font-lock-string-face ((t (:foreground "#77507b")))) ; plum - '(font-lock-keyword-face ((t (:foreground "#729fcf")))) ; light sky blue - '(font-lock-builtin-face ((t (:foreground "#855c1b")))) ; med-dark chocolate - '(font-lock-function-name-face ((t (:foreground "#c4a000")))) ; dark butter - '(font-lock-variable-name-face ((t (nil)))) - '(font-lock-preprocessor-face ((t (:foreground "#888a85")))) ; aluminum - '(font-lock-constant-face ((t (:foreground "#4e9a06")))) ; dark chameleon - '(font-lock-type-face ((t (:foreground "#ad7fa8")))) ; light plum - '(font-lock-warning-face ((t (:bold t :foreground "#cc0000")))) ; scarlet red - - ;; Search - '(isearch ((t (:foreground "#080808" :background "#edd400")))) - '(isearch-lazy-highlight-face ((t (:foreground "#080808" :background "#2e3436")))) - - ;; Emacs Interface - '(fringe ((t (:background "#0f0f0f")))) - '(border ((t (:background "#0f0f0f")))) - '(mode-line ((t (:background "#1f1f1f" :foreground "#eeeeec")))) - '(mode-line-buffer-id ((t (:background "#1f1f1f" :foreground "#eeeeec")))) - '(mode-line-inactive ((t (:background "#1f1f1f" :foreground "#888a85")))) - '(minibuffer-prompt ((t (:foreground "#729fcf")))) ; light sky blue - '(region ((t (:background "#2e3436")))) - - ;; Parenthesis matching - '(show-paren-match-face ((t (:foreground "#2e3436" :background "#73d216")))) - '(show-paren-mismatch-face ((t (:foreground "#2e3436" :background "#ef2929")))) - - ;; Line highlighting - '(highlight ((t (:background "#1f1f1f" :foreground nil)))) - '(highlight-current-line-face ((t (:background "#1f1f1f" :foreground nil)))) - - ;; Calendar - '(holiday-face ((t (:foreground "#cc0000")))) ; dark scarlet red - - ;; Info - '(info-xref ((t (:foreground "#729fcf")))) ; light sky blue - '(info-xref-visited ((t (:foreground "#ad7fa8")))) ; light plum - -;;; AUCTeX - '(font-latex-sectioning-5-face ((t (:foreground "#c4a000" :bold t)))) ; dark butter - '(font-latex-bold-face ((t (:foreground "#4e9a06" :bold t)))) ; dark chameleon - '(font-latex-italic-face ((t (:foreground "#4e9a06" :italic t)))) ; dark chameleon - '(font-latex-math-face ((t (:foreground "#855c1b")))) ; med-dark chocolate - '(font-latex-string-face ((t (:foreground "#77507b")))) ; plum - '(font-latex-warning-face ((t (:foreground "#cc0000")))) ; dark scarlet red - '(font-latex-slide-title-face ((t (:foreground "#c4a000")))) ; dark butter - -;;; post-mode - '(post-emoticon-face ((t (:background "#edd400" :foreground "#000000")))) ; medium butter - '(post-header-value-face ((t (:foreground "#4e9a06")))) ; dark chameleon - '(post-header-keyword-face ((t (:foreground "#4e9a06" :bold t)))) ; dark chameleon - '(post-signature-text-face ((t (:foreground "#cc0000")))) ; dark scarlet red - '(post-quoted-text-face ((t (:foreground "#855c1b" :slant normal)))) ; med-dark chocolate - '(post-double-quoted-text-face ((t (:foreground "#77507b" :slant normal)))) ; plum - '(post-multiply-quoted-text-face ((t (:foreground "#61635e" :slant normal)))) ; dark aluminum - '(post-email-address-text-face ((t (:foreground "#729fcf" :bold t)))) ; light sky blue - '(post-url-face ((t (:foreground "#729fcf" :bold t)))) ; light sky blue - ) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'subdued) - -;;; subdued-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/subtle-blue-theme.el b/elpa/color-theme-modern-0.0.3/subtle-blue-theme.el deleted file mode 100644 index 37e3399..0000000 --- a/elpa/color-theme-modern-0.0.3/subtle-blue-theme.el +++ /dev/null @@ -1,437 +0,0 @@ -;;; subtle-blue-theme.el --- subtle-blue theme - -;; Copyright (C) 2001 by Chris McMahan -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of subtle-blue theme from `color-themes' - -;;; Code: - -(deftheme subtle-blue - "subtle-blue theme") - -(custom-theme-set-faces - 'subtle-blue - - '(default ((t (:background "#65889C" :foreground "#eedfcc")))) - '(mouse ((t (:background "Grey")))) - '(cursor ((t (:background "white")))) - '(border ((t (:background "black")))) - - '(bbdb-company ((t (:italic t)))) - '(bbdb-field-name ((t (:bold t :foreground "MediumAquamarine")))) - '(bbdb-field-value ((t (nil)))) - '(bbdb-name ((t (:underline t)))) - '(blank-space-face ((t (:background "gray80")))) - '(blank-tab-face ((t (:background "LightBlue" :foreground "DarkSlateGray")))) - '(blue ((t (:foreground "blue")))) - '(bold ((t (:bold t :foreground "MediumAquamarine")))) - '(bold-italic ((t (:italic t :bold t :foreground "SkyBlue")))) - '(border-glyph ((t (nil)))) - '(calendar-today-face ((t (:underline t)))) - '(comint-highlight-input ((t (:bold t)))) - '(comint-highlight-prompt ((t (:foreground "cyan")))) - '(comint-input-face ((t (:foreground "deepskyblue")))) - '(cperl-array-face ((t (:bold t :foreground "Yellow")))) - '(cperl-hash-face ((t (:italic t :bold t :foreground "White")))) - '(cperl-nonoverridable-face ((t (:foreground "SkyBlue")))) - '(custom-button-face ((t (:underline t :bold t :foreground "MediumAquaMarine")))) - '(custom-button-pressed-face ((t (:background "lightgrey" :foreground "black")))) - '(custom-changed-face ((t (:background "blue" :foreground "white")))) - '(custom-comment-face ((t (:background "dim gray")))) - '(custom-comment-tag-face ((t (:foreground "gray80")))) - '(custom-documentation-face ((t (:foreground "Grey")))) - '(custom-face-tag-face ((t (:underline t)))) - '(custom-group-tag-face ((t (:bold t :foreground "MediumAquamarine")))) - '(custom-group-tag-face-1 ((t (:foreground "MediumAquaMarine")))) - '(custom-invalid-face ((t (:background "red" :foreground "yellow")))) - '(custom-modified-face ((t (:background "blue" :foreground "white")))) - '(custom-rogue-face ((t (:background "black" :foreground "pink")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:background "white" :foreground "blue")))) - '(custom-state-face ((t (:foreground "yellow")))) - '(custom-variable-button-face ((t (:underline t :bold t)))) - '(custom-variable-tag-face ((t (:bold t :foreground "Aquamarine")))) - '(cvs-filename-face ((t (:foreground "blue4")))) - '(cvs-handled-face ((t (:foreground "pink")))) - '(cvs-header-face ((t (:bold t :foreground "blue4")))) - '(cvs-marked-face ((t (:bold t :foreground "green3")))) - '(cvs-msg-face ((t (:italic t)))) - '(cvs-need-action-face ((t (:foreground "orange")))) - '(cvs-unknown-face ((t (:foreground "red")))) - '(diary-face ((t (:bold t :foreground "cyan")))) - '(dired-face-boring ((t (:foreground "Gray65")))) - '(dired-face-directory ((t (:bold t :foreground "sky blue")))) - '(dired-face-executable ((t (:foreground "MediumAquaMarine")))) - '(dired-face-flagged ((t (:foreground "Cyan")))) - '(dired-face-marked ((t (:foreground "cyan")))) - '(dired-face-permissions ((t (:foreground "aquamarine")))) - '(dired-face-setuid ((t (:foreground "LightSalmon")))) - '(dired-face-socket ((t (:foreground "LightBlue")))) - '(dired-face-symlink ((t (:foreground "gray95")))) - '(display-time-mail-balloon-enhance-face ((t (:background "orange")))) - '(display-time-mail-balloon-gnus-group-face ((t (:foreground "blue")))) - '(display-time-time-balloon-face ((t (:foreground "red")))) - '(ecb-sources-face ((t (:foreground "LightBlue1")))) - '(ediff-current-diff-face-A ((t (:background "pale green" :foreground "firebrick")))) - '(ediff-current-diff-face-Ancestor ((t (:background "VioletRed" :foreground "Black")))) - '(ediff-current-diff-face-B ((t (:background "Yellow" :foreground "DarkOrchid")))) - '(ediff-current-diff-face-C ((t (:background "indianred" :foreground "white")))) - '(ediff-even-diff-face-A ((t (:background "light gray" :foreground "Black")))) - '(ediff-even-diff-face-Ancestor ((t (:background "Gray" :foreground "White")))) - '(ediff-even-diff-face-B ((t (:background "Gray" :foreground "White")))) - '(ediff-even-diff-face-C ((t (:background "light gray" :foreground "Black")))) - '(ediff-fine-diff-face-A ((t (:background "sky blue" :foreground "Navy")))) - '(ediff-fine-diff-face-Ancestor ((t (:background "Green" :foreground "Black")))) - '(ediff-fine-diff-face-B ((t (:background "cyan" :foreground "Black")))) - '(ediff-fine-diff-face-C ((t (:background "Turquoise" :foreground "Black")))) - '(ediff-odd-diff-face-A ((t (:background "Gray" :foreground "White")))) - '(ediff-odd-diff-face-Ancestor ((t (:background "light gray" :foreground "Black")))) - '(ediff-odd-diff-face-B ((t (:background "light gray" :foreground "Black")))) - '(ediff-odd-diff-face-C ((t (:background "Gray" :foreground "White")))) - '(erc-action-face ((t (:bold t)))) - '(erc-bold-face ((t (:bold t)))) - '(erc-default-face ((t (nil)))) - '(erc-direct-msg-face ((t (:foreground "LightSalmon")))) - '(erc-error-face ((t (:bold t :foreground "yellow")))) - '(erc-input-face ((t (:foreground "Beige")))) - '(erc-inverse-face ((t (:background "wheat" :foreground "darkslategrey")))) - '(erc-notice-face ((t (:foreground "MediumAquamarine")))) - '(erc-pal-face ((t (:foreground "PaleGreen")))) - '(erc-prompt-face ((t (:foreground "MediumAquamarine")))) - '(erc-underline-face ((t (:underline t)))) - '(eshell-ls-archive-face ((t (:bold t :foreground "wheat")))) - '(eshell-ls-backup-face ((t (:foreground "Grey")))) - '(eshell-ls-clutter-face ((t (:bold t :foreground "wheat")))) - '(eshell-ls-directory-face ((t (:bold t :foreground "Yellow")))) - '(eshell-ls-executable-face ((t (:bold t :foreground "wheat")))) - '(eshell-ls-missing-face ((t (:bold t :foreground "wheat")))) - '(eshell-ls-picture-face ((t (:foreground "wheat")))) - '(eshell-ls-product-face ((t (:foreground "wheat")))) - '(eshell-ls-readonly-face ((t (:foreground "wheat")))) - '(eshell-ls-special-face ((t (:bold t :foreground "wheat")))) - '(eshell-ls-symlink-face ((t (:bold t :foreground "White")))) - '(eshell-ls-text-face ((t (:foreground "wheat")))) - '(eshell-ls-todo-face ((t (:foreground "wheat")))) - '(eshell-ls-unreadable-face ((t (:foreground "wheat3")))) - '(eshell-prompt-face ((t (:bold t :foreground "PaleGreen")))) - '(eshell-test-failed-face ((t (:bold t :foreground "OrangeRed")))) - '(eshell-test-ok-face ((t (:bold t :foreground "Green")))) - '(excerpt ((t (:italic t)))) - '(ff-paths-non-existant-file-face ((t (:bold t :foreground "NavyBlue")))) - '(flyspell-duplicate-face ((t (:underline t :bold t :foreground "Gold3")))) - '(flyspell-incorrect-face ((t (:underline t :bold t :foreground "OrangeRed")))) - '(font-latex-italic-face ((t (nil)))) - '(font-latex-math-face ((t (nil)))) - '(font-latex-sedate-face ((t (:foreground "Gray85")))) - '(font-latex-string-face ((t (:foreground "orange")))) - '(font-latex-warning-face ((t (:foreground "gold")))) - '(font-lock-builtin-face ((t (:foreground "PaleGreen")))) - '(font-lock-comment-face ((t (:italic t :foreground "Wheat3")))) - '(font-lock-constant-face ((t (:foreground "LightBlue")))) - '(font-lock-doc-face ((t (:bold t :foreground "DarkSeaGreen")))) - '(font-lock-doc-string-face ((t (:bold t :foreground "DarkSeaGreen")))) - '(font-lock-exit-face ((t (:foreground "green")))) - '(font-lock-function-name-face ((t (:italic t :bold t :foreground "cyan")))) - '(font-lock-keyword-face ((t (:bold t :foreground "LightBlue")))) - '(font-lock-preprocessor-face ((t (:foreground "blue3")))) - '(font-lock-reference-face ((t (:foreground "PaleGreen")))) - '(font-lock-string-face ((t (:italic t :foreground "MediumAquamarine")))) - '(font-lock-type-face ((t (:bold t :foreground "LightBlue")))) - '(font-lock-variable-name-face ((t (:italic t :bold t :foreground "LightBlue")))) - '(font-lock-warning-face ((t (:bold t :foreground "LightSalmon")))) - '(fringe ((t (:background "darkslategrey")))) - '(gnus-cite-attribution-face ((t (:italic t :bold t)))) - '(gnus-cite-face-1 ((t (:foreground "LightBlue")))) - '(gnus-cite-face-10 ((t (:foreground "LightBlue")))) - '(gnus-cite-face-11 ((t (:foreground "LightBlue")))) - '(gnus-cite-face-2 ((t (:foreground "LightBlue")))) - '(gnus-cite-face-3 ((t (:foreground "LightBlue")))) - '(gnus-cite-face-4 ((t (:foreground "LightBlue")))) - '(gnus-cite-face-5 ((t (:foreground "LightBlue")))) - '(gnus-cite-face-6 ((t (:foreground "LightBlue")))) - '(gnus-cite-face-7 ((t (:foreground "LightBlue")))) - '(gnus-cite-face-8 ((t (:foreground "LightBlue")))) - '(gnus-cite-face-9 ((t (:foreground "LightBlue")))) - '(gnus-emphasis-bold ((t (:bold t)))) - '(gnus-emphasis-bold-italic ((t (:italic t :bold t)))) - '(gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) - '(gnus-emphasis-italic ((t (:italic t)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(gnus-emphasis-underline-bold ((t (:underline t :bold t)))) - '(gnus-emphasis-underline-bold-italic ((t (:underline t :italic t :bold t)))) - '(gnus-emphasis-underline-italic ((t (:underline t :italic t)))) - '(gnus-filterhist-face-1 ((t (nil)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "gray80")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "light cyan")))) - '(gnus-group-mail-2-empty-face ((t (:foreground "gray80")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "turquoise")))) - '(gnus-group-mail-3-empty-face ((t (:foreground "gray80")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "LightBlue")))) - '(gnus-group-mail-low-empty-face ((t (:foreground "gray80")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "LightBlue")))) - '(gnus-group-news-1-empty-face ((t (:foreground "gray80")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "green yellow")))) - '(gnus-group-news-2-empty-face ((t (:foreground "gray80")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "Aquamarine")))) - '(gnus-group-news-3-empty-face ((t (:foreground "gray80")))) - '(gnus-group-news-3-face ((t (:bold t :foreground "LightBlue")))) - '(gnus-group-news-4-empty-face ((t (:foreground "gray80")))) - '(gnus-group-news-4-face ((t (:bold t :foreground "Wheat")))) - '(gnus-group-news-5-empty-face ((t (:foreground "gray80")))) - '(gnus-group-news-5-face ((t (:bold t :foreground "MediumAquamarine")))) - '(gnus-group-news-6-empty-face ((t (:foreground "gray80")))) - '(gnus-group-news-6-face ((t (:bold t :foreground "MediumAquamarine")))) - '(gnus-group-news-low-empty-face ((t (:foreground "gray80")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "yellow green")))) - '(gnus-header-content-face ((t (:italic t :foreground "LightSkyBlue3")))) - '(gnus-header-from-face ((t (:bold t :foreground "light cyan")))) - '(gnus-header-name-face ((t (:bold t :foreground "LightBlue")))) - '(gnus-header-newsgroups-face ((t (:italic t :bold t :foreground "LightSkyBlue3")))) - '(gnus-header-subject-face ((t (:bold t :foreground "light cyan")))) - '(gnus-picons-face ((t (:background "white" :foreground "black")))) - '(gnus-picons-xbm-face ((t (:background "white" :foreground "black")))) - '(gnus-signature-face ((t (:italic t :foreground "LightBlue")))) - '(gnus-splash ((t (:foreground "Brown")))) - '(gnus-splash-face ((t (:foreground "LightBlue")))) - '(gnus-summary-cancelled-face ((t (:background "black" :foreground "gray80")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "LightBlue")))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "gray80")))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "burlywood")))) - '(gnus-summary-high-unread-face ((t (:italic t :bold t :foreground "wheat")))) - '(gnus-summary-low-ancient-face ((t (:italic t :foreground "LightBlue")))) - '(gnus-summary-low-read-face ((t (:italic t :foreground "light sea green")))) - '(gnus-summary-low-ticked-face ((t (:italic t :bold t :foreground "LightBlue")))) - '(gnus-summary-low-unread-face ((t (:italic t :foreground "light sea green")))) - '(gnus-summary-normal-ancient-face ((t (:foreground "gray80")))) - '(gnus-summary-normal-read-face ((t (:foreground "gray80")))) - '(gnus-summary-normal-ticked-face ((t (:bold t :foreground "sandy brown")))) - '(gnus-summary-normal-unread-face ((t (:bold t :foreground "wheat")))) - '(gnus-summary-selected-face ((t (:underline t)))) - '(gnus-x-face ((t (:background "white" :foreground "black")))) - '(green ((t (:foreground "green")))) - '(gui-button-face ((t (:background "cyan" :foreground "#65889C")))) - '(gui-element ((t (:background "Gray")))) - '(header-line ((t (:background "grey20" :foreground "grey90")))) - '(highlight ((t (:background "PaleGreen" :foreground "DarkGreen")))) - '(highlight-changes-delete-face ((t (:underline t :foreground "red")))) - '(highlight-changes-face ((t (:foreground "red")))) - '(highline-face ((t (:background "SeaGreen")))) - '(holiday-face ((t (:background "DimGray")))) - '(html-helper-bold-face ((t (:foreground "DarkRed")))) - '(html-helper-italic-face ((t (:foreground "DarkBlue")))) - '(html-helper-underline-face ((t (:underline t :foreground "Black")))) - '(html-tag-face ((t (:foreground "Blue")))) - '(info-menu-5 ((t (:underline t)))) - '(info-node ((t (:underline t :italic t :bold t :foreground "light blue")))) - '(info-xref ((t (:bold t :foreground "light blue")))) - '(isearch ((t (:background "Aquamarine" :foreground "SteelBlue")))) - '(isearch-lazy-highlight-face ((t (:background "paleturquoise4")))) - '(isearch-secondary ((t (:foreground "red3")))) - '(italic ((t (:italic t)))) - '(jde-bug-breakpoint-cursor ((t (:background "brown" :foreground "cyan")))) - '(jde-bug-breakpoint-marker ((t (:background "yellow" :foreground "red")))) - '(jde-java-font-lock-api-face ((t (:foreground "LightBlue")))) - '(jde-java-font-lock-bold-face ((t (:bold t)))) - '(jde-java-font-lock-code-face ((t (nil)))) - '(jde-java-font-lock-constant-face ((t (:foreground "LightBlue")))) - '(jde-java-font-lock-doc-tag-face ((t (:foreground "LightBlue")))) - '(jde-java-font-lock-italic-face ((t (:italic t)))) - '(jde-java-font-lock-link-face ((t (:underline t :foreground "LightBlue")))) - '(jde-java-font-lock-modifier-face ((t (:foreground "LightBlue")))) - '(jde-java-font-lock-number-face ((t (:foreground "LightBlue")))) - '(jde-java-font-lock-package-face ((t (:foreground "LightBlue")))) - '(jde-java-font-lock-pre-face ((t (nil)))) - '(jde-java-font-lock-underline-face ((t (:underline t)))) - '(lazy-highlight-face ((t (:bold t :foreground "dark magenta")))) - '(left-margin ((t (nil)))) - '(linemenu-face ((t (:background "gray30")))) - '(list-mode-item-selected ((t (nil)))) - '(makefile-space-face ((t (:background "hotpink")))) - '(menu ((t (:background "wheat" :foreground "gray30")))) - '(message-cited-text-face ((t (:foreground "White")))) - '(message-header-cc-face ((t (:bold t :foreground "light cyan")))) - '(message-header-name-face ((t (:foreground "LightBlue")))) - '(message-header-newsgroups-face ((t (:italic t :bold t :foreground "LightSkyBlue3")))) - '(message-header-other-face ((t (:foreground "LightSkyBlue3")))) - '(message-header-subject-face ((t (:bold t :foreground "light cyan")))) - '(message-header-to-face ((t (:bold t :foreground "light cyan")))) - '(message-header-xheader-face ((t (:foreground "LightBlue")))) - '(message-mml-face ((t (:bold t :foreground "LightBlue")))) - '(message-separator-face ((t (:foreground "LightBlue")))) - '(mmm-default-submode-face ((t (:background "#c0c0c5")))) - '(modeline ((t (:background "#4f657d" :foreground "gray80")))) - '(modeline-buffer-id ((t (:background "#4f657d" :foreground "gray80")))) - '(modeline-mousable ((t (:background "#4f657d" :foreground "gray80")))) - '(modeline-mousable-minor-mode ((t (:background "#4f657d" :foreground "gray80")))) - '(my-summary-highlight-face ((t (:foreground "White")))) - '(my-url-face ((t (:foreground "PaleTurquoise")))) - '(nil ((t (nil)))) - '(paren-blink-off ((t (:foreground "gray")))) - '(paren-face-match ((t (:background "turquoise")))) - '(paren-face-mismatch ((t (:background "purple" :foreground "white")))) - '(paren-face-no-match ((t (:background "yellow" :foreground "black")))) - '(paren-match ((t (:background "darkseagreen2")))) - '(paren-mismatch ((t (:background "DeepPink" :foreground "black")))) - '(paren-mismatch-face ((t (:bold t)))) - '(paren-no-match-face ((t (:bold t)))) - '(pointer ((t (nil)))) - '(primary-selection ((t (:background "gray65")))) - '(red ((t (:foreground "red")))) - '(region ((t (:background "CadetBlue" :foreground "gray80")))) - '(right-margin ((t (nil)))) - '(scroll-bar ((t (nil)))) - '(secondary-selection ((t (:background "LightBlue" :foreground "#4f657d")))) - '(semantic-dirty-token-face ((t (:background "gray10")))) - '(semantic-intangible-face ((t (:foreground "gray25")))) - '(semantic-read-only-face ((t (:background "gray25")))) - '(senator-intangible-face ((t (:foreground "gray75")))) - '(senator-momentary-highlight-face ((t (:background "gray80")))) - '(senator-read-only-face ((t (:background "#664444")))) - '(sgml-comment-face ((t (:foreground "dark turquoise")))) - '(sgml-doctype-face ((t (:foreground "red")))) - '(sgml-end-tag-face ((t (:foreground "blue")))) - '(sgml-entity-face ((t (:foreground "magenta")))) - '(sgml-ignored-face ((t (:background "gray60" :foreground "gray40")))) - '(sgml-ms-end-face ((t (:foreground "green")))) - '(sgml-ms-start-face ((t (:foreground "yellow")))) - '(sgml-pi-face ((t (:foreground "lime green")))) - '(sgml-sgml-face ((t (:foreground "brown")))) - '(sgml-short-ref-face ((t (:foreground "deep sky blue")))) - '(sgml-start-tag-face ((t (:foreground "dark green")))) - '(shell-option-face ((t (:foreground "blue")))) - '(shell-output-2-face ((t (:foreground "darkseagreen")))) - '(shell-output-3-face ((t (:foreground "slategray")))) - '(shell-output-face ((t (:foreground "palegreen")))) - '(shell-prompt-face ((t (:foreground "red")))) - '(show-paren-match-face ((t (:background "Aquamarine" :foreground "steel blue")))) - '(show-paren-mismatch-face ((t (:bold t :background "IndianRed" :foreground "White")))) - '(speedbar-button-face ((t (:bold t :foreground "LightBlue")))) - '(speedbar-directory-face ((t (:bold t :foreground "yellow")))) - '(speedbar-file-face ((t (:bold t :foreground "wheat")))) - '(speedbar-highlight-face ((t (:background "sea green")))) - '(speedbar-selected-face ((t (:underline t)))) - '(speedbar-tag-face ((t (:foreground "LightBlue")))) - '(swbuff-current-buffer-face ((t (:bold t :foreground "red")))) - '(template-message-face ((t (:bold t)))) - '(term-black ((t (:foreground "black")))) - '(term-blackbg ((t (:background "black")))) - '(term-blue ((t (:foreground "blue")))) - '(term-bluebg ((t (:background "blue")))) - '(term-bold ((t (:bold t)))) - '(term-cyan ((t (:foreground "cyan")))) - '(term-cyanbg ((t (:background "cyan")))) - '(term-default-bg ((t (nil)))) - '(term-default-bg-inv ((t (nil)))) - '(term-default-fg ((t (nil)))) - '(term-default-fg-inv ((t (nil)))) - '(term-green ((t (:foreground "green")))) - '(term-greenbg ((t (:background "green")))) - '(term-invisible ((t (nil)))) - '(term-invisible-inv ((t (nil)))) - '(term-magenta ((t (:foreground "magenta")))) - '(term-magentabg ((t (:background "magenta")))) - '(term-red ((t (:foreground "red")))) - '(term-redbg ((t (:background "red")))) - '(term-underline ((t (:underline t)))) - '(term-white ((t (:foreground "white")))) - '(term-whitebg ((t (:background "white")))) - '(term-yellow ((t (:foreground "yellow")))) - '(term-yellowbg ((t (:background "yellow")))) - '(text-cursor ((t (:background "Red3" :foreground "white")))) - '(tool-bar ((t (:background "grey75" :foreground "black")))) - '(toolbar ((t (:background "Gray")))) - '(trailing-whitespace ((t (:background "red")))) - '(underline ((t (:underline t)))) - '(variable-pitch ((t (nil)))) - '(vc-annotate-face-0046FF ((t (:background "black" :foreground "wheat")))) - '(vcursor ((t (:underline t :background "cyan" :foreground "blue")))) - '(vertical-divider ((t (:background "Gray")))) - '(vhdl-font-lock-attribute-face ((t (:foreground "Orchid")))) - '(vhdl-font-lock-directive-face ((t (:foreground "CadetBlue")))) - '(vhdl-font-lock-enumvalue-face ((t (:foreground "Gold4")))) - '(vhdl-font-lock-function-face ((t (:foreground "Orchid4")))) - '(vhdl-font-lock-prompt-face ((t (:bold t :foreground "Red")))) - '(vhdl-font-lock-reserved-words-face ((t (:bold t :foreground "Orange")))) - '(vhdl-font-lock-translate-off-face ((t (:background "LightGray")))) - '(vhdl-speedbar-architecture-face ((t (:foreground "Blue")))) - '(vhdl-speedbar-architecture-selected-face ((t (:underline t :foreground "Blue")))) - '(vhdl-speedbar-configuration-face ((t (:foreground "DarkGoldenrod")))) - '(vhdl-speedbar-configuration-selected-face ((t (:underline t :foreground "DarkGoldenrod")))) - '(vhdl-speedbar-entity-face ((t (:foreground "ForestGreen")))) - '(vhdl-speedbar-entity-selected-face ((t (:underline t :foreground "ForestGreen")))) - '(vhdl-speedbar-instantiation-face ((t (:foreground "Brown")))) - '(vhdl-speedbar-instantiation-selected-face ((t (:underline t :foreground "Brown")))) - '(vhdl-speedbar-package-face ((t (:foreground "Gray50")))) - '(vhdl-speedbar-package-selected-face ((t (:underline t :foreground "Gray50")))) - '(viper-minibuffer-emacs-face ((t (:background "darkseagreen2" :foreground "Black")))) - '(viper-minibuffer-insert-face ((t (:background "pink" :foreground "Black")))) - '(viper-minibuffer-vi-face ((t (:background "gray" :foreground "DarkGreen")))) - '(viper-replace-overlay-face ((t (:background "darkseagreen2" :foreground "Black")))) - '(viper-search-face ((t (:background "khaki" :foreground "Black")))) - '(vm-header-content-face ((t (:italic t :foreground "gray80")))) - '(vm-header-from-face ((t (:italic t :background "#65889C" :foreground "cyan")))) - '(vm-header-name-face ((t (:foreground "cyan")))) - '(vm-header-subject-face ((t (:foreground "cyan")))) - '(vm-header-to-face ((t (:italic t :foreground "cyan")))) - '(vm-message-cited-face ((t (:foreground "Gray80")))) - '(vm-summary-face-1 ((t (:foreground "MediumAquamarine")))) - '(vm-summary-face-2 ((t (:foreground "MediumAquamarine")))) - '(vm-summary-face-3 ((t (:foreground "MediumAquamarine")))) - '(vm-summary-face-4 ((t (:foreground "MediumAquamarine")))) - '(vm-summary-highlight-face ((t (:foreground "White")))) - '(vmpc-pre-sig-face ((t (:foreground "Aquamarine")))) - '(vmpc-sig-face ((t (:foreground "LightBlue")))) - '(vvb-face ((t (:background "pink" :foreground "black")))) - '(widget-button-face ((t (:bold t)))) - '(widget-button-pressed-face ((t (:foreground "cyan")))) - '(widget-documentation-face ((t (:foreground "LightBlue")))) - '(widget-field-face ((t (:foreground "LightBlue")))) - '(widget-inactive-face ((t (:foreground "Wheat3")))) - '(widget-single-line-field-face ((t (:foreground "LightBlue")))) - '(woman-bold-face ((t (:bold t)))) - '(woman-italic-face ((t (:foreground "beige")))) - '(woman-unknown-face ((t (:foreground "LightSalmon")))) - '(xref-keyword-face ((t (:foreground "Cyan")))) - '(xref-list-pilot-face ((t (:foreground "navy")))) - '(xref-list-symbol-face ((t (:foreground "navy")))) - '(xxml-emph-1-face ((t (:background "lightyellow")))) - '(xxml-emph-2-face ((t (:background "lightyellow")))) - '(xxml-header-1-face ((t (:background "seashell1" :foreground "MediumAquamarine")))) - '(xxml-header-2-face ((t (:background "seashell1" :foreground "SkyBlue")))) - '(xxml-header-3-face ((t (:background "seashell1")))) - '(xxml-header-4-face ((t (:background "seashell1")))) - '(xxml-interaction-face ((t (:background "lightcyan")))) - '(xxml-rug-face ((t (:background "cyan")))) - '(xxml-sparkle-face ((t (:background "yellow")))) - '(xxml-unbreakable-space-face ((t (:underline t :foreground "grey")))) - '(yellow ((t (:foreground "yellow")))) - '(zmacs-region ((t (:background "#4f657d"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'subtle-blue) - -;;; subtle-blue-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/subtle-hacker-theme.el b/elpa/color-theme-modern-0.0.3/subtle-hacker-theme.el deleted file mode 100644 index af3850e..0000000 --- a/elpa/color-theme-modern-0.0.3/subtle-hacker-theme.el +++ /dev/null @@ -1,156 +0,0 @@ -;;; subtle-hacker-theme.el --- subtle-hacker theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of subtle-hacker theme from `color-themes' - -;;; Code: - -(deftheme subtle-hacker - "subtle-hacker theme") - -(custom-theme-set-faces - 'subtle-hacker - - '(default ((t (:foreground "wheat" :background "darkslategrey")))) - - '(mouse ((t (:foreground "Grey")))) - '(cursor ((t (:background "LightGray")))) - '(border ((t (:foreground "black")))) - - '(bbdb-company ((t (:foreground "pale green")))) - '(bbdb-name ((t (:bold t :foreground "pale green")))) - '(bbdb-field-name ((t (:foreground "medium sea green")))) - '(bbdb-field-value ((t (:foreground "dark sea green")))) - '(bold ((t (:bold t)))) - '(bold-italic ((t (:italic t :bold t :foreground "beige")))) - '(calendar-today-face ((t (:underline t)))) - '(comint-highlight-prompt ((t (:foreground "medium aquamarine")))) - '(cperl-array-face ((t (:foreground "Yellow")))) - '(cperl-hash-face ((t (:foreground "White")))) - '(cperl-nonoverridable-face ((t (:foreground "SkyBlue")))) - '(custom-button-face ((t (:underline t :foreground "MediumSlateBlue")))) - '(custom-documentation-face ((t (:foreground "Grey")))) - '(custom-group-tag-face ((t (:foreground "MediumAquamarine")))) - '(custom-state-face ((t (:foreground "Coral")))) - '(custom-variable-tag-face ((t (:foreground "Aquamarine")))) - '(diary-face ((t (:bold t :foreground "IndianRed")))) - '(dired-face-directory ((t (:bold t :foreground "sky blue")))) - '(dired-face-permissions ((t (:foreground "aquamarine")))) - '(dired-face-flagged ((t (:foreground "tomato")))) - '(dired-face-marked ((t (:foreground "light salmon")))) - '(dired-face-executable ((t (:foreground "green yellow")))) - '(fringe ((t (:background "darkslategrey")))) - '(highlight ((t (:background "PaleGreen" :foreground "DarkGreen")))) - '(highline-face ((t (:background "SeaGreen")))) - '(holiday-face ((t (:background "DimGray")))) - '(hyper-apropos-hyperlink ((t (:bold t :foreground "DodgerBlue1")))) - '(hyper-apropos-documentation ((t (:foreground "LightSalmon")))) - '(info-header-xref ((t (:foreground "DodgerBlue1" :bold t)))) - '(info-menu-5 ((t (:underline t)))) - '(info-node ((t (:underline t :bold t :foreground "DodgerBlue1")))) - '(info-xref ((t (:bold t :foreground "DodgerBlue1")))) - '(isearch ((t (:background "sea green")))) - '(italic ((t (:italic t)))) - '(menu ((t (:foreground "wheat" :background "darkslategrey")))) - '(modeline ((t (:background "dark olive green" :foreground "wheat")))) - '(modeline-buffer-id ((t (:background "dark olive green" :foreground "beige")))) - '(modeline-mousable ((t (:background "dark olive green" :foreground "yellow green")))) - '(modeline-mousable-minor-mode ((t (:background "dark olive green" :foreground "wheat")))) - '(region ((t (:background "dark cyan" :foreground "cyan")))) - '(secondary-selection ((t (:background "Aquamarine" :foreground "SlateBlue")))) - '(show-paren-match-face ((t (:bold t :background "Aquamarine" :foreground "steel blue")))) - '(show-paren-mismatch-face ((t (:background "Red" :foreground "White")))) - '(underline ((t (:underline t)))) - '(widget-field-face ((t (:foreground "LightBlue")))) - '(widget-inactive-face ((t (:foreground "DimGray")))) - '(widget-single-line-field-face ((t (:foreground "LightBlue")))) - '(w3m-anchor-face ((t (:bold t :foreground "DodgerBlue1")))) - '(w3m-arrived-anchor-face ((t (:bold t :foreground "DodgerBlue3")))) - '(w3m-header-line-location-title-face ((t (:foreground "beige" :background "dark olive green")))) - '(w3m-header-line-location-content-face ((t (:foreground "wheat" :background "dark olive green")))) - '(woman-bold-face ((t (:bold t)))) - '(woman-italic-face ((t (:foreground "beige")))) - '(woman-unknown-face ((t (:foreground "LightSalmon")))) - '(zmacs-region ((t (:background "dark cyan" :foreground "cyan")))) - - '(eshell-ls-clutter-face ((t (:bold t :foreground "DimGray")))) - '(eshell-ls-executable-face ((t (:bold t :foreground "Coral")))) - '(eshell-ls-missing-face ((t (:bold t :foreground "black")))) - '(eshell-ls-special-face ((t (:bold t :foreground "Gold")))) - '(eshell-ls-symlink-face ((t (:bold t :foreground "White")))) - '(font-lock-comment-face ((t (:foreground "White")))) - '(font-lock-constant-face ((t (:bold t :foreground "Aquamarine")))) - '(font-lock-function-name-face ((t (:bold t :foreground "MediumSlateBlue")))) - '(font-lock-string-face ((t (:italic t :foreground "LightSalmon")))) - '(font-lock-variable-name-face ((t (:italic t :bold t :foreground "Aquamarine")))) - '(gnus-cite-face-1 ((t (:foreground "dark khaki")))) - '(gnus-cite-face-2 ((t (:foreground "chocolate")))) - '(gnus-cite-face-3 ((t (:foreground "tomato")))) - '(gnus-group-mail-1-empty-face ((t (:foreground "light cyan")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "light cyan")))) - '(gnus-group-mail-2-empty-face ((t (:foreground "turquoise")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "turquoise")))) - '(gnus-group-mail-3-empty-face ((t (:foreground "tomato")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "tomato")))) - '(gnus-group-mail-low-empty-face ((t (:foreground "dodger blue")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "dodger blue")))) - '(gnus-group-news-1-empty-face ((t (:foreground "green yellow")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "green yellow")))) - '(gnus-group-news-2-empty-face ((t (:foreground "dark orange")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "dark orange")))) - '(gnus-group-news-3-empty-face ((t (:foreground "tomato")))) - '(gnus-group-news-3-face ((t (:bold t :foreground "tomato")))) - '(gnus-group-news-low-empty-face ((t (:foreground "yellow green")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "yellow green")))) - '(gnus-header-name-face ((t (:bold t :foreground "DodgerBlue1")))) - '(gnus-header-newsgroups-face ((t (:italic t :bold t :foreground "LightSkyBlue3")))) - '(gnus-signature-face ((t (:foreground "salmon")))) - '(gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "RoyalBlue")))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "forest green")))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "burlywood")))) - '(gnus-summary-high-unread-face ((t (:italic t :bold t :foreground "cyan")))) - '(gnus-summary-low-ancient-face ((t (:italic t :foreground "chocolate")))) - '(gnus-summary-low-read-face ((t (:foreground "light sea green")))) - '(gnus-summary-low-ticked-face ((t (:italic t :foreground "chocolate")))) - '(gnus-summary-low-unread-face ((t (:italic t :foreground "light sea green")))) - '(gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) - '(gnus-summary-normal-read-face ((t (:foreground "khaki")))) - '(gnus-summary-normal-ticked-face ((t (:foreground "sandy brown")))) - '(gnus-summary-normal-unread-face ((t (:foreground "aquamarine")))) - '(message-cited-text-face ((t (:foreground "White")))) - '(message-header-name-face ((t (:foreground "DodgerBlue1")))) - '(message-header-newsgroups-face ((t (:italic t :bold t :foreground "LightSkyBlue3")))) - '(message-header-other-face ((t (:foreground "LightSkyBlue3")))) - '(message-header-xheader-face ((t (:foreground "DodgerBlue3")))) ) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'subtle-hacker) - -;;; subtle-hacker-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/taming-mr-arneson-theme.el b/elpa/color-theme-modern-0.0.3/taming-mr-arneson-theme.el deleted file mode 100644 index 3c0f7eb..0000000 --- a/elpa/color-theme-modern-0.0.3/taming-mr-arneson-theme.el +++ /dev/null @@ -1,178 +0,0 @@ -;;; taming-mr-arneson-theme.el --- taming-mr-arneson theme - -;; Copyright (C) 2001 by Erik Arneson -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of taming-mr-arneson theme from `color-themes' - -;;; Code: - -(deftheme taming-mr-arneson - "taming-mr-arneson theme") - -(custom-theme-set-faces - 'taming-mr-arneson - - '(default ((t (:background "black" :foreground "LightSkyBlue")))) - '(cursor ((t (:background "Red3")))) - '(border ((t (:foreground "black")))) - - '(bbdb-company ((t (nil)))) - '(bbdb-field-name ((t (:bold t)))) - '(bbdb-field-value ((t (nil)))) - '(bbdb-name ((t (:underline t)))) - '(blue ((t (:foreground "blue")))) - '(bold ((t (:bold t)))) - '(bold-italic ((t (:bold t :foreground "yellow")))) - '(border-glyph ((t (nil)))) - '(buffers-tab ((t (:background "black" :foreground "LightSkyBlue")))) - '(cperl-array-face ((t (:bold t :foreground "SkyBlue2")))) - '(cperl-hash-face ((t (:foreground "LightBlue2")))) - '(cperl-invalid-face ((t (:foreground "white")))) - '(cperl-nonoverridable-face ((t (:foreground "chartreuse3")))) - '(custom-button-face ((t (:bold t)))) - '(custom-changed-face ((t (:background "blue" :foreground "white")))) - '(custom-comment-face ((t (:foreground "white")))) - '(custom-comment-tag-face ((t (:foreground "white")))) - '(custom-documentation-face ((t (nil)))) - '(custom-face-tag-face ((t (:underline t)))) - '(custom-group-tag-face ((t (:underline t :foreground "blue")))) - '(custom-group-tag-face-1 ((t (:underline t :foreground "red")))) - '(custom-invalid-face ((t (:background "red" :foreground "yellow")))) - '(custom-modified-face ((t (:background "blue" :foreground "white")))) - '(custom-rogue-face ((t (:background "black" :foreground "pink")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:background "white" :foreground "blue")))) - '(custom-state-face ((t (:foreground "white")))) - '(custom-variable-button-face ((t (:underline t :bold t)))) - '(custom-variable-tag-face ((t (:underline t :foreground "blue")))) - '(cvs-filename-face ((t (:foreground "white")))) - '(cvs-handled-face ((t (:foreground "pink")))) - '(cvs-header-face ((t (:foreground "green")))) - '(cvs-marked-face ((t (:bold t :foreground "green3")))) - '(cvs-msg-face ((t (:foreground "red")))) - '(cvs-need-action-face ((t (:foreground "yellow")))) - '(cvs-unknown-face ((t (:foreground "grey")))) - '(diff-added-face ((t (nil)))) - '(diff-changed-face ((t (nil)))) - '(diff-file-header-face ((t (:bold t :background "grey70")))) - '(diff-hunk-header-face ((t (:background "grey85")))) - '(diff-index-face ((t (:bold t :background "grey70")))) - '(diff-removed-face ((t (nil)))) - '(dired-face-boring ((t (:foreground "Gray65")))) - '(dired-face-directory ((t (:bold t :foreground "SkyBlue2")))) - '(dired-face-executable ((t (:foreground "Green")))) - '(dired-face-flagged ((t (:background "LightSlateGray")))) - '(dired-face-header ((t (:background "grey75" :foreground "black")))) - '(dired-face-marked ((t (:background "PaleVioletRed")))) - '(dired-face-permissions ((t (:background "grey75" :foreground "black")))) - '(dired-face-setuid ((t (:foreground "Red")))) - '(dired-face-socket ((t (:foreground "magenta")))) - '(dired-face-symlink ((t (:foreground "cyan")))) - '(excerpt ((t (nil)))) - '(fixed ((t (:bold t)))) - '(font-lock-builtin-face ((t (:foreground "red3")))) - '(font-lock-comment-face ((t (:foreground "red")))) - '(font-lock-constant-face ((t (nil)))) - '(font-lock-doc-string-face ((t (:foreground "turquoise")))) - '(font-lock-function-name-face ((t (:foreground "white")))) - '(font-lock-keyword-face ((t (:foreground "green")))) - '(font-lock-preprocessor-face ((t (:foreground "green3")))) - '(font-lock-reference-face ((t (:foreground "red3")))) - '(font-lock-string-face ((t (:foreground "turquoise")))) - '(font-lock-type-face ((t (:foreground "steelblue")))) - '(font-lock-variable-name-face ((t (:foreground "magenta2")))) - '(font-lock-warning-face ((t (:bold t :foreground "Red")))) - '(green ((t (:foreground "green")))) - '(gui-button-face ((t (:background "grey75" :foreground "black")))) - '(gui-element ((t (nil)))) - '(highlight ((t (:background "darkseagreen2" :foreground "blue")))) - '(html-helper-bold-face ((t (:bold t)))) - '(html-helper-italic-face ((t (:bold t :foreground "yellow")))) - '(html-helper-underline-face ((t (:underline t)))) - '(hyper-apropos-documentation ((t (:foreground "white")))) - '(hyper-apropos-heading ((t (:bold t)))) - '(hyper-apropos-hyperlink ((t (:foreground "sky blue")))) - '(hyper-apropos-major-heading ((t (:bold t)))) - '(hyper-apropos-section-heading ((t (:bold t)))) - '(hyper-apropos-warning ((t (:bold t :foreground "red")))) - '(info-node ((t (:bold t :foreground "yellow")))) - '(info-xref ((t (:bold t)))) - '(isearch ((t (:background "paleturquoise" :foreground "dark red")))) - '(isearch-secondary ((t (:foreground "red3")))) - '(italic ((t (:bold t :foreground "yellow")))) - '(left-margin ((t (nil)))) - '(list-mode-item-selected ((t (:background "gray68" :foreground "dark green")))) - '(man-bold ((t (:bold t)))) - '(man-heading ((t (:bold t)))) - '(man-italic ((t (:foreground "yellow")))) - '(man-xref ((t (:underline t)))) - '(message-cited-text ((t (:foreground "orange")))) - '(message-header-contents ((t (:foreground "white")))) - '(message-headers ((t (:bold t :foreground "orange")))) - '(message-highlighted-header-contents ((t (:bold t)))) - '(message-url ((t (:bold t :foreground "pink")))) - '(mmm-face ((t (:background "black" :foreground "green")))) - '(modeline ((t (nil)))) - '(modeline-buffer-id ((t (:background "Gray80" :foreground "blue4")))) - '(modeline-mousable ((t (:background "Gray80" :foreground "firebrick")))) - '(modeline-mousable-minor-mode ((t (:background "Gray80" :foreground "green4")))) - '(paren-blink-off ((t (:foreground "gray80")))) - '(paren-match ((t (:background "dark blue")))) - '(paren-mismatch ((t (:background "DeepPink" :foreground "LightSkyBlue")))) - '(pointer ((t (nil)))) - '(primary-selection ((t (:background "gray65" :foreground "DarkBlue")))) - '(red ((t (:foreground "red")))) - '(region ((t (:background "gray65" :foreground "DarkBlue")))) - '(right-margin ((t (nil)))) - '(secondary-selection ((t (:background "paleturquoise" :foreground "black")))) - '(shell-option-face ((t (:foreground "blue4")))) - '(shell-output-2-face ((t (:foreground "green4")))) - '(shell-output-3-face ((t (:foreground "green4")))) - '(shell-output-face ((t (:bold t)))) - '(shell-prompt-face ((t (:foreground "red4")))) - '(text-cursor ((t (:background "Red3" :foreground "black")))) - '(toolbar ((t (:background "Gray80" :foreground "black")))) - '(underline ((t (:underline t)))) - '(vertical-divider ((t (nil)))) - '(vm-xface ((t (:background "white" :foreground "black")))) - '(vmpc-pre-sig-face ((t (:foreground "forestgreen")))) - '(vmpc-sig-face ((t (:foreground "steelblue")))) - '(widget ((t (nil)))) - '(widget-button-face ((t (:bold t)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "dark green")))) - '(widget-field-face ((t (:background "gray85" :foreground "black")))) - '(widget-inactive-face ((t (:foreground "dim gray")))) - '(x-face ((t (:background "white" :foreground "black")))) - '(xrdb-option-name-face ((t (:foreground "red")))) - '(yellow ((t (:foreground "yellow")))) - '(zmacs-region ((t (:background "gray65"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'taming-mr-arneson) - -;;; taming-mr-arneson-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/taylor-theme.el b/elpa/color-theme-modern-0.0.3/taylor-theme.el deleted file mode 100644 index 2e2bd08..0000000 --- a/elpa/color-theme-modern-0.0.3/taylor-theme.el +++ /dev/null @@ -1,129 +0,0 @@ -;;; taylor-theme.el --- taylor theme - -;; Copyright (C) 2000 by Art Taylor -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of taylor theme from `color-themes' - -;;; Code: - -(deftheme taylor - "taylor theme") - -(custom-theme-set-faces - 'taylor - - '(default ((t (:background "black" :foreground "wheat")))) - '(cursor ((t (:background "red")))) - '(border ((t (:foreground "black")))) - - '(gnus-mouse-face ((t (:background "black" :foreground "black")))) - '(list-matching-lines-face ((t (:bold t :background "grey40" :foreground "yellow")))) - '(view-highlight-face ((t (:background "black" :foreground "black")))) - - '(bold ((t (:bold t :background "grey40" :foreground "yellow")))) - '(bold-italic ((t (:italic t :bold t :foreground "yellow green")))) - '(fl-comment-face ((t (:foreground "medium purple")))) - '(fl-function-name-face ((t (:foreground "green")))) - '(fl-keyword-face ((t (:foreground "LightGreen")))) - '(fl-string-face ((t (:foreground "light coral")))) - '(fl-type-face ((t (:foreground "cyan")))) - '(font-lock-builtin-face ((t (:foreground "LightSteelBlue")))) - '(font-lock-comment-face ((t (:foreground "OrangeRed")))) - '(font-lock-constant-face ((t (:foreground "Aquamarine")))) - '(font-lock-function-name-face ((t (:foreground "LightSkyBlue")))) - '(font-lock-keyword-face ((t (:foreground "Cyan")))) - '(font-lock-string-face ((t (:foreground "LightSalmon")))) - '(font-lock-type-face ((t (:foreground "PaleGreen")))) - '(font-lock-variable-name-face ((t (:foreground "LightGoldenrod")))) - '(font-lock-warning-face ((t (:bold t :foreground "Pink")))) - '(gnus-group-mail-1-empty-face ((t (:foreground "aquamarine1")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "aquamarine1")))) - '(gnus-group-mail-2-empty-face ((t (:foreground "aquamarine2")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "aquamarine2")))) - '(gnus-group-mail-3-empty-face ((t (:foreground "aquamarine3")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "aquamarine3")))) - '(gnus-group-mail-low-empty-face ((t (:foreground "aquamarine4")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "aquamarine4")))) - '(gnus-group-news-1-empty-face ((t (:foreground "PaleTurquoise")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "PaleTurquoise")))) - '(gnus-group-news-2-empty-face ((t (:foreground "turquoise")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "turquoise")))) - '(gnus-group-news-3-empty-face ((t (nil)))) - '(gnus-group-news-3-face ((t (:bold t)))) - '(gnus-group-news-4-empty-face ((t (nil)))) - '(gnus-group-news-4-face ((t (:bold t)))) - '(gnus-group-news-5-empty-face ((t (nil)))) - '(gnus-group-news-5-face ((t (:bold t)))) - '(gnus-group-news-6-empty-face ((t (nil)))) - '(gnus-group-news-6-face ((t (:bold t)))) - '(gnus-group-news-low-empty-face ((t (:foreground "DarkTurquoise")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "DarkTurquoise")))) - '(gnus-splash-face ((t (:foreground "Brown")))) - '(gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "SkyBlue")))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "PaleGreen")))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "pink")))) - '(gnus-summary-high-unread-face ((t (:bold t)))) - '(gnus-summary-low-ancient-face ((t (:italic t :foreground "SkyBlue")))) - '(gnus-summary-low-read-face ((t (:italic t :foreground "PaleGreen")))) - '(gnus-summary-low-ticked-face ((t (:italic t :foreground "pink")))) - '(gnus-summary-low-unread-face ((t (:italic t)))) - '(gnus-summary-normal-ancient-face ((t (:foreground "SkyBlue")))) - '(gnus-summary-normal-read-face ((t (:foreground "PaleGreen")))) - '(gnus-summary-normal-ticked-face ((t (:foreground "pink")))) - '(gnus-summary-normal-unread-face ((t (nil)))) - '(gnus-summary-selected-face ((t (:underline t)))) - '(highlight ((t (:background "black" :foreground "black")))) - '(italic ((t (:italic t :foreground "yellow3")))) - '(message-cited-text-face ((t (:foreground "red")))) - '(message-header-cc-face ((t (:bold t :foreground "green4")))) - '(message-header-name-face ((t (:foreground "DarkGreen")))) - '(message-header-newsgroups-face ((t (:italic t :bold t :foreground "yellow")))) - '(message-header-other-face ((t (:foreground "#b00000")))) - '(message-header-subject-face ((t (:foreground "green3")))) - '(message-header-to-face ((t (:bold t :foreground "green2")))) - '(message-header-xheader-face ((t (:foreground "blue")))) - '(message-mml-face ((t (:foreground "ForestGreen")))) - '(message-separator-face ((t (:foreground "blue3")))) - '(modeline ((t (:background "wheat" :foreground "black")))) - '(modeline-buffer-id ((t (:background "wheat" :foreground "black")))) - '(modeline-mousable ((t (:background "wheat" :foreground "black")))) - '(modeline-mousable-minor-mode ((t (:background "wheat" :foreground "black")))) - '(region ((t (:background "blue")))) - '(secondary-selection ((t (:background "darkslateblue" :foreground "black")))) - '(show-paren-match-face ((t (:background "turquoise")))) - '(show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) - '(underline ((t (:underline t)))) - '(xref-keyword-face ((t (:foreground "blue")))) - '(xref-list-default-face ((t (nil)))) - '(xref-list-pilot-face ((t (:foreground "navy")))) - '(xref-list-symbol-face ((t (:foreground "navy"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'taylor) - -;;; taylor-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/tty-dark-theme.el b/elpa/color-theme-modern-0.0.3/tty-dark-theme.el deleted file mode 100644 index 179b1f6..0000000 --- a/elpa/color-theme-modern-0.0.3/tty-dark-theme.el +++ /dev/null @@ -1,88 +0,0 @@ -;;; tty-dark-theme.el --- tty-dark theme - -;; Copyright (C) 2001 by Oivvio Polite -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of tty-dark theme from `color-themes' - -;;; Code: - -(deftheme tty-dark - "tty-dark theme") - -(custom-theme-set-faces - 'tty-dark - - '(default ((t (:background "black" :foreground "white")))) - '(mouse ((t (:foreground "black")))) - '(cursor ((t (:background "red")))) - '(border ((t (:foreground "blue")))) - - '(bold ((t (:underline t :background "black" :foreground "white")))) - '(bold-italic ((t (:underline t :foreground "white")))) - '(calendar-today-face ((t (:underline t)))) - '(diary-face ((t (:foreground "red")))) - '(font-lock-builtin-face ((t (:foreground "blue")))) - '(font-lock-comment-face ((t (:foreground "cyan")))) - '(font-lock-constant-face ((t (:foreground "magenta")))) - '(font-lock-function-name-face ((t (:foreground "cyan")))) - '(font-lock-keyword-face ((t (:foreground "red")))) - '(font-lock-string-face ((t (:foreground "green")))) - '(font-lock-type-face ((t (:foreground "yellow")))) - '(font-lock-variable-name-face ((t (:foreground "blue")))) - '(font-lock-warning-face ((t (:bold t :foreground "magenta")))) - '(highlight ((t (:background "blue" :foreground "yellow")))) - '(holiday-face ((t (:background "cyan")))) - '(info-menu-5 ((t (:underline t)))) - '(info-node ((t (:italic t :bold t)))) - '(info-xref ((t (:bold t)))) - '(italic ((t (:underline t :background "red")))) - '(message-cited-text-face ((t (:foreground "red")))) - '(message-header-cc-face ((t (:bold t :foreground "green")))) - '(message-header-name-face ((t (:foreground "green")))) - '(message-header-newsgroups-face ((t (:italic t :bold t :foreground "yellow")))) - '(message-header-other-face ((t (:foreground "#b00000")))) - '(message-header-subject-face ((t (:foreground "green")))) - '(message-header-to-face ((t (:bold t :foreground "green")))) - '(message-header-xheader-face ((t (:foreground "blue")))) - '(message-mml-face ((t (:foreground "green")))) - '(message-separator-face ((t (:foreground "blue")))) - - '(modeline ((t (:background "white" :foreground "blue")))) - '(modeline-buffer-id ((t (:background "white" :foreground "red")))) - '(modeline-mousable ((t (:background "white" :foreground "magenta")))) - '(modeline-mousable-minor-mode ((t (:background "white" :foreground "yellow")))) - '(region ((t (:background "white" :foreground "black")))) - '(zmacs-region ((t (:background "cyan" :foreground "black")))) - '(secondary-selection ((t (:background "blue")))) - '(show-paren-match-face ((t (:background "red")))) - '(show-paren-mismatch-face ((t (:background "magenta" :foreground "white")))) - '(underline ((t (:underline t))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'tty-dark) - -;;; tty-dark-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/vim-colors-theme.el b/elpa/color-theme-modern-0.0.3/vim-colors-theme.el deleted file mode 100644 index ad4f99a..0000000 --- a/elpa/color-theme-modern-0.0.3/vim-colors-theme.el +++ /dev/null @@ -1,125 +0,0 @@ -;;; vim-colors-theme.el --- vim-colors theme - -;; Copyright (C) 2003 by Michael Soulier -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of vim-colors theme from `color-themes' - -;;; Code: - -(deftheme vim-colors - "vim-colors theme") - -(custom-theme-set-faces - 'vim-colors - - '(default ((t (:background "#ffffff" :foreground "#000000")))) - '(mouse ((t (:background "#000000")))) - '(cursor ((t (:background "#000000")))) - '(border ((t (:background "black")))) - - '(Man-overstrike-face ((t (:weight bold)))) - '(Man-underline-face ((t (:underline t)))) - '(apropos-keybinding-face ((t (:underline t)))) - '(apropos-label-face ((t (:italic t)))) - - '(apropos-match-face ((t (:background "yellow")))) - '(apropos-property-face ((t (:italic t :weight bold)))) - '(apropos-symbol-face ((t (:weight bold)))) - '(cperl-here-face ((t (:background "#f2f2f2" :foreground "#ff00ff")))) - '(cperl-invalid-face ((t (:underline t)))) - '(cperl-pod-face ((t (:foreground "blue")))) - '(cperl-pod-head-face ((t (:foreground "#008b8b")))) - '(help-highlight-face ((t (:underline t)))) - '(ispell-highlight-face ((t (:background "darkseagreen2")))) - '(list-matching-lines-face ((t (:weight bold)))) - - '(tags-tag-face ((t (:background "#ffffff" :foreground "#000000")))) - '(view-highlight-face ((t (:background "darkseagreen2")))) - '(widget-mouse-face ((t (:background "darkseagreen2")))) - - '(default ((t (:background "#ffffff" :foreground "#000000")))) - '(Info-title-4-face ((t (:weight bold)))) - '(bold ((t (:weight bold)))) - '(bold-italic ((t (:italic t :weight bold)))) - '(comint-highlight-input ((t (:weight bold)))) - '(comint-highlight-prompt ((t (:foreground "dark blue")))) - '(cperl-array-face ((t (:foreground "brown")))) - '(cperl-hash-face ((t (:foreground "red")))) - '(cperl-nonoverridable-face ((t (:foreground "#008b8b")))) - - '(font-lock-builtin-face ((t (:foreground "purple")))) - '(font-lock-comment-face ) - '(font-lock-constant-face ((t (:foreground "green4")))) - '(font-lock-doc-face ((t (:background "#f2f2f2")))) - '(font-lock-function-name-face ((t (:foreground "#008b8b")))) - '(font-lock-keyword-face ((t (:weight bold :foreground "#a52a2a")))) - '(font-lock-string-face ((t (:background "#f2f2f2" :foreground "#ff00ff")))) - '(font-lock-type-face ((t (:foreground "ForestGreen")))) - '(font-lock-variable-name-face ((t (:foreground "#008b8b")))) - '(font-lock-warning-face ((t (:weight bold :foreground "Red")))) - '(fringe ((t (:background "#e5e5e5")))) - '(header-line ((t (:background "grey90" :foreground "grey20")))) - '(highlight ((t (:background "darkseagreen2")))) - '(info-header-node ((t (nil)))) - '(info-header-xref ((t (nil)))) - '(info-menu-5 ((t (:foreground "red1")))) - '(info-menu-header ((t (:weight bold)))) - '(info-node ((t (:italic t :weight bold :foreground "brown")))) - '(info-xref ((t (:weight bold :foreground "magenta4")))) - '(isearch ((t (:background "magenta4" :foreground "lightskyblue1")))) - '(isearch-lazy-highlight-face ((t (:background "paleturquoise")))) - '(italic ((t (:italic t)))) - - '(mode-line ((t (:background "grey75" :foreground "black")))) - '(region ((t (:background "lightgoldenrod2")))) - '(rpm-spec-dir-face ((t (:foreground "green")))) - '(rpm-spec-doc-face ((t (:foreground "magenta")))) - '(rpm-spec-ghost-face ((t (:foreground "red")))) - '(rpm-spec-macro-face ((t (:foreground "purple")))) - '(rpm-spec-package-face ((t (:foreground "red")))) - '(rpm-spec-tag-face ((t (:foreground "blue")))) - '(scroll-bar ((t (:background "grey75" :foreground "#000000")))) - '(secondary-selection ((t (:background "yellow")))) - '(sh-heredoc-face ((t (:foreground "tan")))) - '(show-paren-match-face ((t (:background "turquoise")))) - '(show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) - '(tool-bar ((t (:background "grey75" :foreground "black")))) - '(tooltip ((t (:background "lightyellow" :foreground "black")))) - '(trailing-whitespace ((t (:background "red")))) - '(underline ((t (:underline t)))) - - '(widget-button-face ((t (:weight bold)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "dark green")))) - '(widget-field-face ((t (:background "gray85")))) - '(widget-inactive-face ((t (:foreground "dim gray")))) - '(widget-single-line-field-face ((t (:background "gray85"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'vim-colors) - -;;; vim-colors-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/whateveryouwant-theme.el b/elpa/color-theme-modern-0.0.3/whateveryouwant-theme.el deleted file mode 100644 index 35b65f5..0000000 --- a/elpa/color-theme-modern-0.0.3/whateveryouwant-theme.el +++ /dev/null @@ -1,410 +0,0 @@ -;;; whateveryouwant-theme.el --- whateveryouwant theme - -;; Copyright (C) 2002 by Fabien Penso -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of whateveryouwant theme from `color-themes' - -;;; Code: - -(deftheme whateveryouwant - "whateveryouwant theme") - -(custom-theme-set-faces - 'whateveryouwant - - '(default ((t (:background "white" :foreground "black")))) - '(mouse ((t (:foreground "black")))) - '(cursor ((t (:background "black")))) - '(border ((t (:background "black")))) - - '(Info-title-1-face ((t (:bold t :weight bold :height 1.728)))) - '(Info-title-2-face ((t (:bold t :weight bold :height 1.44)))) - '(Info-title-3-face ((t (:bold t :weight bold :height 1.2)))) - '(Info-title-4-face ((t (:bold t :weight bold)))) - '(antlr-font-lock-keyword-face ((t (:bold t :foreground "black" :weight bold)))) - '(antlr-font-lock-literal-face ((t (:bold t :foreground "brown4" :weight bold)))) - '(antlr-font-lock-ruledef-face ((t (:bold t :foreground "blue" :weight bold)))) - '(antlr-font-lock-ruleref-face ((t (:foreground "blue4")))) - '(antlr-font-lock-tokendef-face ((t (:bold t :foreground "blue" :weight bold)))) - '(antlr-font-lock-tokenref-face ((t (:foreground "orange4")))) - '(bbdb-company ((t (:italic t :slant italic)))) - '(bbdb-field-name ((t (:bold t :foreground "gray40" :weight bold)))) - '(bbdb-field-value ((t (nil)))) - '(bbdb-name ((t (:underline t)))) - '(bold ((t (:bold t :foreground "gray40" :weight bold)))) - '(bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) - '(calendar-today-face ((t (:underline t)))) - '(change-log-acknowledgement-face ((t (:foreground "Firebrick")))) - '(change-log-conditionals-face ((t (:foreground "DarkGoldenrod")))) - '(change-log-date-face ((t (:foreground "RosyBrown")))) - '(change-log-email-face ((t (:foreground "DarkGoldenrod")))) - '(change-log-file-face ((t (:foreground "Blue")))) - '(change-log-function-face ((t (:foreground "DarkGoldenrod")))) - '(change-log-list-face ((t (:foreground "Purple")))) - '(change-log-name-face ((t (:foreground "CadetBlue")))) - '(comint-highlight-input ((t (:bold t :weight bold)))) - '(comint-highlight-prompt ((t (:foreground "dark blue")))) - '(cperl-array-face ((t (:bold t :background "lightyellow2" :foreground "Blue" :weight bold)))) - '(cperl-hash-face ((t (:italic t :bold t :background "lightyellow2" :foreground "Red" :slant italic :weight bold)))) - '(cperl-nonoverridable-face ((t (:foreground "chartreuse3")))) - '(custom-button-face ((t (:background "lightgrey" :foreground "black" :box (:line-width 2 :style released-button))))) - '(custom-button-pressed-face ((t (:background "lightgrey" :foreground "black" :box (:line-width 2 :style pressed-button))))) - '(custom-changed-face ((t (:background "blue" :foreground "white")))) - '(custom-comment-face ((t (:background "gray85")))) - '(custom-comment-tag-face ((t (:foreground "blue4")))) - '(custom-documentation-face ((t (nil)))) - '(custom-face-tag-face ((t (:bold t :weight bold :height 1.2)))) - '(custom-group-tag-face ((t (:bold t :foreground "blue" :weight bold :height 1.2)))) - '(custom-group-tag-face-1 ((t (:bold t :foreground "red" :weight bold :height 1.2)))) - '(custom-invalid-face ((t (:background "red" :foreground "yellow")))) - '(custom-modified-face ((t (:background "blue" :foreground "white")))) - '(custom-rogue-face ((t (:background "black" :foreground "pink")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:background "white" :foreground "blue")))) - '(custom-state-face ((t (:foreground "dark green")))) - '(custom-variable-button-face ((t (:bold t :underline t :weight bold)))) - '(custom-variable-tag-face ((t (:bold t :foreground "blue" :weight bold :height 1.2)))) - '(cvs-filename-face ((t (:foreground "blue4")))) - '(cvs-handled-face ((t (:foreground "pink")))) - '(cvs-header-face ((t (:bold t :foreground "blue4" :weight bold)))) - '(cvs-marked-face ((t (:bold t :foreground "green3" :weight bold)))) - '(cvs-msg-face ((t (:italic t :slant italic)))) - '(cvs-need-action-face ((t (:foreground "orange")))) - '(cvs-unknown-face ((t (:foreground "red")))) - '(diary-face ((t (:foreground "red")))) - '(diff-added-face ((t (nil)))) - '(diff-changed-face ((t (nil)))) - '(diff-context-face ((t (:foreground "grey50")))) - '(diff-file-header-face ((t (:bold t :background "grey70" :weight bold)))) - '(diff-function-face ((t (:foreground "grey50")))) - '(diff-header-face ((t (:background "grey85")))) - '(diff-hunk-header-face ((t (:background "grey85")))) - '(diff-index-face ((t (:bold t :background "grey70" :weight bold)))) - '(diff-nonexistent-face ((t (:bold t :background "grey70" :weight bold)))) - '(diff-removed-face ((t (nil)))) - '(dired-face-boring ((t (:foreground "RosyBrown")))) - '(dired-face-directory ((t (:foreground "Blue")))) - '(dired-face-executable ((t (nil)))) - '(dired-face-flagged ((t (:bold t :foreground "Red" :weight bold)))) - '(dired-face-marked ((t (:bold t :foreground "Red" :weight bold)))) - '(dired-face-permissions ((t (nil)))) - '(dired-face-setuid ((t (nil)))) - '(dired-face-socket ((t (nil)))) - '(dired-face-symlink ((t (:foreground "Purple")))) - '(ebrowse-default-face ((t (nil)))) - '(ebrowse-file-name-face ((t (:italic t :slant italic)))) - '(ebrowse-member-attribute-face ((t (:foreground "red")))) - '(ebrowse-member-class-face ((t (:foreground "purple")))) - '(ebrowse-progress-face ((t (:background "blue")))) - '(ebrowse-root-class-face ((t (:bold t :foreground "blue" :weight bold)))) - '(ebrowse-tree-mark-face ((t (:foreground "red")))) - '(ediff-current-diff-face-A ((t (:background "pale green" :foreground "firebrick")))) - '(ediff-current-diff-face-Ancestor ((t (:background "VioletRed" :foreground "Black")))) - '(ediff-current-diff-face-B ((t (:background "Yellow" :foreground "DarkOrchid")))) - '(ediff-current-diff-face-C ((t (:background "Pink" :foreground "Navy")))) - '(ediff-even-diff-face-A ((t (:background "light grey" :foreground "Black")))) - '(ediff-even-diff-face-Ancestor ((t (:background "Grey" :foreground "White")))) - '(ediff-even-diff-face-B ((t (:background "Grey" :foreground "White")))) - '(ediff-even-diff-face-C ((t (:background "light grey" :foreground "Black")))) - '(ediff-fine-diff-face-A ((t (:background "sky blue" :foreground "Navy")))) - '(ediff-fine-diff-face-Ancestor ((t (:background "Green" :foreground "Black")))) - '(ediff-fine-diff-face-B ((t (:background "cyan" :foreground "Black")))) - '(ediff-fine-diff-face-C ((t (:background "Turquoise" :foreground "Black")))) - '(ediff-odd-diff-face-A ((t (:background "Grey" :foreground "White")))) - '(ediff-odd-diff-face-Ancestor ((t (:background "light grey" :foreground "Black")))) - '(ediff-odd-diff-face-B ((t (:background "light grey" :foreground "Black")))) - '(ediff-odd-diff-face-C ((t (:background "Grey" :foreground "White")))) - '(erc-action-face ((t (:bold t :weight bold)))) - '(erc-bold-face ((t (:bold t :weight bold)))) - '(erc-default-face ((t (nil)))) - '(erc-direct-msg-face ((t (:foreground "LightSalmon")))) - '(erc-error-face ((t (:bold t :foreground "IndianRed" :weight bold)))) - '(erc-input-face ((t (:foreground "Beige")))) - '(erc-inverse-face ((t (:background "wheat" :foreground "darkslategrey")))) - '(erc-notice-face ((t (:foreground "MediumAquamarine")))) - '(erc-pal-face ((t (:foreground "pale green")))) - '(erc-prompt-face ((t (:foreground "MediumAquamarine")))) - '(erc-underline-face ((t (:underline t)))) - '(eshell-ls-archive-face ((t (:bold t :foreground "Orchid" :weight bold)))) - '(eshell-ls-backup-face ((t (:foreground "OrangeRed")))) - '(eshell-ls-clutter-face ((t (:bold t :foreground "OrangeRed" :weight bold)))) - '(eshell-ls-directory-face ((t (:bold t :foreground "Blue" :weight bold)))) - '(eshell-ls-executable-face ((t (:bold t :foreground "ForestGreen" :weight bold)))) - '(eshell-ls-missing-face ((t (:bold t :foreground "Red" :weight bold)))) - '(eshell-ls-picture-face ((t (:foreground "Violet")))) - '(eshell-ls-product-face ((t (:foreground "OrangeRed")))) - '(eshell-ls-readonly-face ((t (:foreground "Brown")))) - '(eshell-ls-special-face ((t (:bold t :foreground "Magenta" :weight bold)))) - '(eshell-ls-symlink-face ((t (:bold t :foreground "Dark Cyan" :weight bold)))) - '(eshell-ls-unreadable-face ((t (:foreground "Grey30")))) - '(eshell-prompt-face ((t (:bold t :foreground "#aa0000" :weight bold :width condensed)))) - '(eshell-test-failed-face ((t (:bold t :foreground "OrangeRed" :weight bold)))) - '(eshell-test-ok-face ((t (:bold t :foreground "Green" :weight bold)))) - '(excerpt ((t (:italic t :slant italic)))) - '(fixed ((t (:bold t :weight bold)))) - - '(flyspell-duplicate-face ((t (:bold t :foreground "Gold3" :underline t :weight bold)))) - '(flyspell-incorrect-face ((t (:bold t :foreground "OrangeRed" :underline t :weight bold)))) - '(font-latex-bold-face ((t (:bold t :foreground "DarkOliveGreen" :weight bold)))) - '(font-latex-italic-face ((t (:italic t :foreground "DarkOliveGreen" :slant italic)))) - '(font-latex-math-face ((t (:foreground "SaddleBrown")))) - '(font-latex-sedate-face ((t (:foreground "DimGray")))) - '(font-latex-string-face ((t (:foreground "RosyBrown")))) - '(font-latex-warning-face ((t (:bold t :foreground "Red" :weight bold)))) - '(font-lock-builtin-face ((t (:foreground "dodgerblue3")))) - '(font-lock-comment-face ((t (:foreground "#cc0000" :width semi-condensed)))) - '(font-lock-constant-face ((t (:foreground "CadetBlue")))) - '(font-lock-doc-face ((t (:foreground "RosyBrown")))) - '(font-lock-doc-string-face ((t (:foreground "RosyBrown")))) - '(font-lock-function-name-face ((t (:bold t :foreground "navy" :weight bold :height 100)))) - '(font-lock-keyword-face ((t (:bold t :foreground "red4" :weight bold)))) - '(font-lock-preprocessor-face ((t (:foreground "CadetBlue")))) - '(font-lock-reference-face ((t (:foreground "Orchid")))) - '(font-lock-string-face ((t (:foreground "navy")))) - '(font-lock-type-face ((t (:bold t :foreground "black" :weight bold)))) - '(font-lock-variable-name-face ((t (:foreground "black")))) - '(font-lock-warning-face ((t (:foreground "orange2")))) - '(fringe ((t (:background "white")))) - '(gnus-cite-attribution-face ((t (:italic t :slant italic)))) - '(gnus-cite-face-1 ((t (:foreground "MidnightBlue")))) - '(gnus-cite-face-10 ((t (:foreground "medium purple")))) - '(gnus-cite-face-11 ((t (:foreground "turquoise")))) - '(gnus-cite-face-2 ((t (:foreground "firebrick")))) - '(gnus-cite-face-3 ((t (:foreground "dark green")))) - '(gnus-cite-face-4 ((t (:foreground "OrangeRed")))) - '(gnus-cite-face-5 ((t (:foreground "dark khaki")))) - '(gnus-cite-face-6 ((t (:foreground "dark violet")))) - '(gnus-cite-face-7 ((t (:foreground "SteelBlue4")))) - '(gnus-cite-face-8 ((t (:foreground "magenta")))) - '(gnus-cite-face-9 ((t (:foreground "violet")))) - '(gnus-emphasis-bold ((t (:bold t :weight bold)))) - '(gnus-emphasis-bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) - '(gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow")))) - '(gnus-emphasis-italic ((t (:italic t :slant italic)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(gnus-emphasis-underline-bold ((t (:bold t :underline t :weight bold)))) - '(gnus-emphasis-underline-bold-italic ((t (:italic t :bold t :underline t :slant italic :weight bold)))) - '(gnus-emphasis-underline-italic ((t (:italic t :underline t :slant italic)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "DeepPink3")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "DeepPink3" :weight bold)))) - '(gnus-group-mail-2-empty-face ((t (:foreground "HotPink3")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "HotPink3" :weight bold)))) - '(gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "magenta4" :weight bold)))) - '(gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "DeepPink4" :weight bold)))) - '(gnus-group-news-1-empty-face ((t (:foreground "red" :weight normal :height 120)))) - '(gnus-group-news-1-face ((t (:foreground "red" :weight normal :height 120)))) - '(gnus-group-news-2-empty-face ((t (:foreground "CadetBlue4")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "CadetBlue4" :weight bold)))) - '(gnus-group-news-3-empty-face ((t (nil)))) - '(gnus-group-news-3-face ((t (:bold t :weight bold)))) - '(gnus-group-news-4-empty-face ((t (nil)))) - '(gnus-group-news-4-face ((t (:bold t :weight bold)))) - '(gnus-group-news-5-empty-face ((t (nil)))) - '(gnus-group-news-5-face ((t (:bold t :weight bold)))) - '(gnus-group-news-6-empty-face ((t (nil)))) - '(gnus-group-news-6-face ((t (:bold t :weight bold)))) - '(gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "DarkGreen" :weight bold)))) - '(gnus-header-content-face ((t (:foreground "goldenrod" :slant normal)))) - '(gnus-header-from-face ((t (:bold t :foreground "grey75" :weight bold :height 140)))) - '(gnus-header-name-face ((t (:foreground "grey75" :height 120)))) - '(gnus-header-newsgroups-face ((t (:italic t :foreground "MidnightBlue" :slant italic)))) - '(gnus-header-subject-face ((t (:bold t :foreground "firebrick" :weight bold :height 160)))) - '(gnus-picon-face ((t (:background "white" :foreground "black")))) - '(gnus-picon-xbm-face ((t (:background "white" :foreground "black")))) - '(gnus-signature-face ((t (:italic t :slant italic)))) - '(gnus-splash-face ((t (:foreground "Brown")))) - '(gnus-summary-cancelled-face ((t (:background "black" :foreground "yellow")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "RoyalBlue" :weight bold)))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "DarkGreen" :weight bold)))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "firebrick" :weight bold)))) - '(gnus-summary-high-unread-face ((t (:bold t :weight bold)))) - '(gnus-summary-low-ancient-face ((t (:italic t :foreground "RoyalBlue" :slant italic)))) - '(gnus-summary-low-read-face ((t (:italic t :foreground "DarkGreen" :slant italic)))) - '(gnus-summary-low-ticked-face ((t (:italic t :foreground "firebrick" :slant italic)))) - '(gnus-summary-low-unread-face ((t (:italic t :slant italic)))) - '(gnus-summary-normal-ancient-face ((t (:foreground "grey65" :height 110 :width condensed)))) - '(gnus-summary-normal-read-face ((t (:foreground "grey75" :height 110 :width condensed )))) - '(gnus-summary-normal-ticked-face ((t (:bold t :foreground "firebrick" :weight bold :height 110 :width condensed)))) - '(gnus-summary-normal-unread-face ((t (:foreground "firebrick" :height 110 :width condensed)))) - '(gnus-summary-selected-face ((t (:background "gold" :foreground "black" :box (:line-width 1 :color "yellow" :style released-button) :height 140 :width condensed)))) - '(header-line ((t (:background "grey90" :foreground "grey20" :box nil)))) - '(hi-black-b ((t (:bold t :weight bold)))) - '(hi-black-hb ((t (:bold t :weight bold :height 1.67)))) - '(hi-blue ((t (:background "light blue")))) - '(hi-blue-b ((t (:bold t :foreground "blue" :weight bold)))) - '(hi-green ((t (:background "green")))) - '(hi-green-b ((t (:bold t :foreground "green" :weight bold)))) - '(hi-pink ((t (:background "pink")))) - '(hi-red-b ((t (:bold t :foreground "red" :weight bold)))) - '(hi-yellow ((t (:background "yellow")))) - '(highlight ((t (:background "black" :foreground "white")))) - '(highlight-changes-delete-face ((t (:foreground "red" :underline t)))) - '(highlight-changes-face ((t (:foreground "red")))) - '(highline-face ((t (:background "gray80")))) - '(holiday-face ((t (:background "pink")))) - '(idlwave-help-link-face ((t (:foreground "Blue")))) - '(idlwave-shell-bp-face ((t (:background "Pink" :foreground "Black")))) - '(info-header-node ((t (:italic t :bold t :foreground "brown" :slant italic :weight bold)))) - '(info-header-xref ((t (:bold t :foreground "magenta4" :weight bold)))) - '(info-menu-5 ((t (:foreground "red1")))) - '(info-menu-header ((t (:bold t :weight bold)))) - '(info-node ((t (:italic t :bold t :foreground "brown" :slant italic :weight bold)))) - '(info-xref ((t (:bold t :foreground "magenta4" :weight bold)))) - '(isearch ((t (:background "magenta4" :foreground "lightskyblue1")))) - '(isearch-lazy-highlight-face ((t (:background "paleturquoise")))) - '(italic ((t (:italic t :slant italic)))) - '(log-view-file-face ((t (:bold t :background "grey70" :weight bold)))) - '(log-view-message-face ((t (:background "grey85")))) - '(makefile-space-face ((t (:background "hotpink")))) - '(menu ((t (nil)))) - '(message-cited-text-face ((t (:foreground "red")))) - '(message-header-cc-face ((t (:foreground "grey45" :weight normal)))) - '(message-header-name-face ((t (:foreground "cornflower blue")))) - '(message-header-newsgroups-face ((t (:italic t :bold t :foreground "blue4" :slant italic :weight bold)))) - '(message-header-other-face ((t (:foreground "steel blue")))) - '(message-header-subject-face ((t (:bold t :foreground "navy blue" :weight bold)))) - '(message-header-to-face ((t (:bold t :foreground "grey60" :weight bold :height 120)))) - '(message-header-xheader-face ((t (:foreground "blue")))) - '(message-mml-face ((t (:foreground "ForestGreen")))) - '(message-separator-face ((t (:foreground "brown")))) - '(mode-line ((t (:background "grey90" :foreground "black" :box (:line-width 1 :style none) :width condensed)))) - '(modeline-buffer-id ((t (:bold t :background "grey75" :foreground "black" :box (:line-width -1 :style released-button) :weight bold)))) - '(modeline-mousable ((t (:background "grey75" :foreground "black" :box (:line-width -1 :style released-button))))) - '(modeline-mousable-minor-mode ((t (:background "grey75" :foreground "black" :box (:line-width -1 :style released-button))))) - '(mouse ((t (:background "black")))) - '(mpg123-face-cur ((t (:background "#004080" :foreground "yellow")))) - '(mpg123-face-slider ((t (:background "yellow" :foreground "black")))) - '(primary-selection ((t (:background "lightgoldenrod2")))) - '(reb-match-0 ((t (:background "lightblue")))) - '(reb-match-1 ((t (:background "aquamarine")))) - '(reb-match-2 ((t (:background "springgreen")))) - '(reb-match-3 ((t (:background "yellow")))) - '(region ((t (:background "#aa0000" :foreground "white")))) - '(scroll-bar ((t (:background "grey75")))) - '(secondary-selection ((t (:background "yellow")))) - '(sgml-comment-face ((t (:italic t :foreground "SeaGreen" :slant italic)))) - '(sgml-doctype-face ((t (:bold t :foreground "FireBrick" :weight bold)))) - '(sgml-end-tag-face ((t (:background "white" :foreground "SlateBlue" :height 116)))) - '(sgml-entity-face ((t (:stipple nil :background "SlateBlue" :foreground "Red" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 116 :width normal)))) - '(sgml-ignored-face ((t (nil)))) - '(sgml-ms-end-face ((t (nil)))) - '(sgml-ms-start-face ((t (nil)))) - '(sgml-pi-face ((t (:bold t :foreground "gray40" :weight bold)))) - '(sgml-sgml-face ((t (:bold t :foreground "gray40" :weight bold)))) - '(sgml-short-ref-face ((t (nil)))) - '(sgml-shortref-face ((t (:bold t :foreground "gray40" :weight bold)))) - '(sgml-start-tag-face ((t (:background "white" :foreground "SlateBlue" :height 116)))) - '(sh-heredoc-face ((t (:foreground "tan")))) - '(show-paren-match-face ((t (:background "gray80" :foreground "black")))) - '(show-paren-mismatch-face ((t (:background "red" :foreground "yellow")))) - '(show-tabs-space-face ((t (:foreground "yellow")))) - '(show-tabs-tab-face ((t (:foreground "red")))) - '(smerge-base-face ((t (:foreground "red")))) - '(smerge-markers-face ((t (:background "grey85")))) - '(smerge-mine-face ((t (:foreground "blue")))) - '(smerge-other-face ((t (:foreground "darkgreen")))) - '(speedbar-button-face ((t (:foreground "green4")))) - '(speedbar-directory-face ((t (:foreground "blue4")))) - '(speedbar-file-face ((t (:foreground "cyan4")))) - '(speedbar-highlight-face ((t (:background "green")))) - '(speedbar-selected-face ((t (:foreground "red" :underline t)))) - '(speedbar-tag-face ((t (:foreground "brown")))) - '(strokes-char-face ((t (:background "lightgray")))) - '(term-black ((t (:background "white" :foreground "black")))) - '(term-blackbg ((t (:background "black" :foreground "black")))) - '(term-blue ((t (:background "white" :foreground "blue")))) - '(term-bluebg ((t (:background "blue" :foreground "black")))) - '(term-bold ((t (:bold t :background "white" :foreground "black")))) - '(term-cyan ((t (:background "white" :foreground "cyan")))) - '(term-cyanbg ((t (:background "cyan" :foreground "black")))) - '(term-default ((t (:background "white" :foreground "black")))) - '(term-default-bg ((t (:foreground "black")))) - '(term-default-bg-inv ((t (:foreground "black")))) - '(term-default-fg ((t (:background "white")))) - '(term-default-fg-inv ((t (:background "white")))) - '(term-green ((t (:background "white" :foreground "green")))) - '(term-greenbg ((t (:background "green" :foreground "black")))) - '(term-invisible ((t (:foreground "black")))) - '(term-invisible-inv ((t (:foreground "black")))) - '(term-magenta ((t (:background "white" :foreground "magenta")))) - '(term-magentabg ((t (:background "magenta" :foreground "black")))) - '(term-red ((t (:background "white" :foreground "red")))) - '(term-redbg ((t (:background "red" :foreground "black")))) - '(term-underline ((t (:background "white" :foreground "black")))) - '(term-white ((t (:background "white" :foreground "white")))) - '(term-whitebg ((t (:background "white" :foreground "black")))) - '(term-yellow ((t (:background "white" :foreground "yellow")))) - '(term-yellowbg ((t (:background "yellow" :foreground "black")))) - '(tex-math-face ((t (:foreground "RosyBrown")))) - '(texinfo-heading-face ((t (:foreground "Blue")))) - '(tool-bar ((t (:background "grey75" :foreground "black" :box (:line-width 1 :style released-button))))) - '(tooltip ((t (:background "lightyellow" :foreground "black")))) - '(trailing-whitespace ((t (:background "red")))) - '(underline ((t (:foreground "navy" :underline t)))) - - '(vcursor ((t (:background "cyan" :foreground "blue" :underline t)))) - '(vhdl-font-lock-attribute-face ((t (:foreground "Orchid")))) - '(vhdl-font-lock-directive-face ((t (:foreground "CadetBlue")))) - '(vhdl-font-lock-enumvalue-face ((t (:foreground "Gold4")))) - '(vhdl-font-lock-function-face ((t (:foreground "Orchid4")))) - '(vhdl-font-lock-prompt-face ((t (:bold t :foreground "Red" :weight bold)))) - '(vhdl-font-lock-reserved-words-face ((t (:bold t :foreground "Orange" :weight bold)))) - '(vhdl-font-lock-translate-off-face ((t (:background "LightGray")))) - '(vhdl-speedbar-architecture-face ((t (:foreground "Blue")))) - '(vhdl-speedbar-architecture-selected-face ((t (:foreground "Blue" :underline t)))) - '(vhdl-speedbar-configuration-face ((t (:foreground "DarkGoldenrod")))) - '(vhdl-speedbar-configuration-selected-face ((t (:foreground "DarkGoldenrod" :underline t)))) - '(vhdl-speedbar-entity-face ((t (:foreground "ForestGreen")))) - '(vhdl-speedbar-entity-selected-face ((t (:foreground "ForestGreen" :underline t)))) - '(vhdl-speedbar-instantiation-face ((t (:foreground "Brown")))) - '(vhdl-speedbar-instantiation-selected-face ((t (:foreground "Brown" :underline t)))) - '(vhdl-speedbar-package-face ((t (:foreground "Grey50")))) - '(vhdl-speedbar-package-selected-face ((t (:foreground "Grey50" :underline t)))) - '(viper-minibuffer-emacs-face ((t (:background "darkseagreen2" :foreground "Black")))) - '(viper-minibuffer-insert-face ((t (:background "pink" :foreground "Black")))) - '(viper-minibuffer-vi-face ((t (:background "grey" :foreground "DarkGreen")))) - '(viper-replace-overlay-face ((t (:background "darkseagreen2" :foreground "Black")))) - '(viper-search-face ((t (:background "khaki" :foreground "Black")))) - '(widget-button-face ((t (:bold t :weight bold)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "dark green")))) - '(widget-field-face ((t (:background "gray85")))) - '(widget-inactive-face ((t (:foreground "dim gray")))) - '(widget-single-line-field-face ((t (:background "gray85")))) - '(woman-addition-face ((t (:foreground "orange")))) - '(woman-bold-face ((t (:bold t :foreground "blue" :weight bold)))) - '(woman-italic-face ((t (:italic t :foreground "red" :underline t :slant italic)))) - '(woman-unknown-face ((t (:foreground "brown")))) - '(zmacs-region ((t (:background "lightgoldenrod2"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'whateveryouwant) - -;;; whateveryouwant-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/wheat-theme.el b/elpa/color-theme-modern-0.0.3/wheat-theme.el deleted file mode 100644 index af7e5d9..0000000 --- a/elpa/color-theme-modern-0.0.3/wheat-theme.el +++ /dev/null @@ -1,274 +0,0 @@ -;;; wheat-theme.el --- wheat theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of wheat theme from `color-themes' - -;;; Code: - -(deftheme wheat - "wheat theme") - -(custom-theme-set-faces - 'wheat - - '(default ((t (:background "Wheat" :foreground "black")))) - '(mouse ((t (:foreground "black")))) - '(cursor ((t (:background "black")))) - '(border ((t (:foreground "black")))) - - '(Man-overstrike-face ((t (:bold t)))) - '(Man-underline-face ((t (:underline t)))) - '(apropos-keybinding-face ((t (:underline t)))) - '(apropos-label-face ((t (:italic t)))) - '(apropos-match-face ((t (:background "paleturquoise")))) - '(apropos-property-face ((t (:bold t :italic t)))) - '(apropos-symbol-face ((t (:bold t)))) - '(goto-address-mail-face ((t (:italic t)))) - '(goto-address-mail-mouse-face ((t (:background "paleturquoise")))) - '(goto-address-url-face ((t (:bold t)))) - '(goto-address-url-mouse-face ((t (:background "darkseagreen2")))) - '(help-highlight-face ((t (:underline t)))) - '(list-matching-lines-face ((t (:bold t)))) - '(view-highlight-face ((t (:background "darkseagreen2")))) - - - '(default ((t (nil)))) - '(bold ((t (:bold t)))) - '(bold-italic ((t (:bold t :italic t)))) - '(calendar-today-face ((t (:underline t)))) - '(cperl-array-face ((t (:foreground "Blue" :background "lightyellow2" :bold t)))) - '(cperl-hash-face ((t (:foreground "Red" :background "lightyellow2" :bold t :italic t)))) - '(cperl-nonoverridable-face ((t (:foreground "chartreuse3")))) - '(custom-button-face ((t (nil)))) - '(custom-changed-face ((t (:foreground "white" :background "blue")))) - '(custom-documentation-face ((t (nil)))) - '(custom-face-tag-face ((t (:underline t)))) - '(custom-group-tag-face ((t (:foreground "blue" :underline t)))) - '(custom-group-tag-face-1 ((t (:foreground "red" :underline t)))) - '(custom-invalid-face ((t (:foreground "yellow" :background "red")))) - '(custom-modified-face ((t (:foreground "white" :background "blue")))) - '(custom-rogue-face ((t (:foreground "pink" :background "black")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:foreground "blue" :background "white")))) - '(custom-state-face ((t (:foreground "dark green")))) - '(custom-variable-button-face ((t (:bold t :underline t)))) - '(custom-variable-tag-face ((t (:foreground "blue" :underline t)))) - '(diary-face ((t (:foreground "red")))) - '(ediff-current-diff-face-A ((t (:foreground "firebrick" :background "pale green")))) - '(ediff-current-diff-face-Ancestor ((t (:foreground "Black" :background "VioletRed")))) - '(ediff-current-diff-face-B ((t (:foreground "DarkOrchid" :background "Yellow")))) - '(ediff-current-diff-face-C ((t (:foreground "Navy" :background "Pink")))) - '(ediff-even-diff-face-A ((t (:foreground "Black" :background "light grey")))) - '(ediff-even-diff-face-Ancestor ((t (:foreground "White" :background "Grey")))) - '(ediff-even-diff-face-B ((t (:foreground "White" :background "Grey")))) - '(ediff-even-diff-face-C ((t (:foreground "Black" :background "light grey")))) - '(ediff-fine-diff-face-A ((t (:foreground "Navy" :background "sky blue")))) - '(ediff-fine-diff-face-Ancestor ((t (:foreground "Black" :background "Green")))) - '(ediff-fine-diff-face-B ((t (:foreground "Black" :background "cyan")))) - '(ediff-fine-diff-face-C ((t (:foreground "Black" :background "Turquoise")))) - '(ediff-odd-diff-face-A ((t (:foreground "White" :background "Grey")))) - '(ediff-odd-diff-face-Ancestor ((t (:foreground "Black" :background "light grey")))) - '(ediff-odd-diff-face-B ((t (:foreground "Black" :background "light grey")))) - '(ediff-odd-diff-face-C ((t (:foreground "White" :background "Grey")))) - '(eshell-ls-archive-face ((t (:foreground "Orchid" :bold t)))) - '(eshell-ls-backup-face ((t (:foreground "OrangeRed")))) - '(eshell-ls-clutter-face ((t (:foreground "OrangeRed" :bold t)))) - '(eshell-ls-directory-face ((t (:foreground "Blue" :bold t)))) - '(eshell-ls-executable-face ((t (:foreground "ForestGreen" :bold t)))) - '(eshell-ls-missing-face ((t (:foreground "Red" :bold t)))) - '(eshell-ls-product-face ((t (:foreground "OrangeRed")))) - '(eshell-ls-readonly-face ((t (:foreground "Brown")))) - '(eshell-ls-special-face ((t (:foreground "Magenta" :bold t)))) - '(eshell-ls-symlink-face ((t (:foreground "DarkCyan" :bold t)))) - '(eshell-ls-unreadable-face ((t (:foreground "Grey30")))) - '(eshell-prompt-face ((t (:foreground "Red" :bold t)))) - '(eshell-test-failed-face ((t (:foreground "OrangeRed" :bold t)))) - '(eshell-test-ok-face ((t (:foreground "Green" :bold t)))) - '(excerpt ((t (:italic t)))) - '(fixed ((t (:bold t)))) - '(flyspell-duplicate-face ((t (:foreground "Gold3" :bold t :underline t)))) - '(flyspell-incorrect-face ((t (:foreground "OrangeRed" :bold t :underline t)))) - '(font-lock-builtin-face ((t (:foreground "Orchid")))) - '(font-lock-comment-face ((t (:foreground "Firebrick")))) - '(font-lock-constant-face ((t (:foreground "CadetBlue")))) - '(font-lock-function-name-face ((t (:foreground "Blue")))) - '(font-lock-keyword-face ((t (:foreground "Purple")))) - '(font-lock-string-face ((t (:foreground "RosyBrown")))) - '(font-lock-type-face ((t (:foreground "ForestGreen")))) - '(font-lock-variable-name-face ((t (:foreground "DarkGoldenrod")))) - '(font-lock-warning-face ((t (:foreground "Red" :bold t)))) - '(fringe ((t (:background "grey95")))) - '(gnus-cite-attribution-face ((t (:italic t)))) - '(gnus-cite-face-1 ((t (:foreground "MidnightBlue")))) - '(gnus-cite-face-10 ((t (:foreground "medium purple")))) - '(gnus-cite-face-11 ((t (:foreground "turquoise")))) - '(gnus-cite-face-2 ((t (:foreground "firebrick")))) - '(gnus-cite-face-3 ((t (:foreground "dark green")))) - '(gnus-cite-face-4 ((t (:foreground "OrangeRed")))) - '(gnus-cite-face-5 ((t (:foreground "dark khaki")))) - '(gnus-cite-face-6 ((t (:foreground "dark violet")))) - '(gnus-cite-face-7 ((t (:foreground "SteelBlue4")))) - '(gnus-cite-face-8 ((t (:foreground "magenta")))) - '(gnus-cite-face-9 ((t (:foreground "violet")))) - '(gnus-emphasis-bold ((t (:bold t)))) - '(gnus-emphasis-bold-italic ((t (:bold t :italic t)))) - '(gnus-emphasis-italic ((t (:italic t)))) - '(gnus-emphasis-underline ((t (:underline t)))) - '(gnus-emphasis-underline-bold ((t (:bold t :underline t)))) - '(gnus-emphasis-underline-bold-italic ((t (:bold t :italic t :underline t)))) - '(gnus-emphasis-underline-italic ((t (:italic t :underline t)))) - '(gnus-group-mail-1-empty-face ((t (:foreground "DeepPink3")))) - '(gnus-group-mail-1-face ((t (:foreground "DeepPink3" :bold t)))) - '(gnus-group-mail-2-empty-face ((t (:foreground "HotPink3")))) - '(gnus-group-mail-2-face ((t (:foreground "HotPink3" :bold t)))) - '(gnus-group-mail-3-empty-face ((t (:foreground "magenta4")))) - '(gnus-group-mail-3-face ((t (:foreground "magenta4" :bold t)))) - '(gnus-group-mail-low-empty-face ((t (:foreground "DeepPink4")))) - '(gnus-group-mail-low-face ((t (:foreground "DeepPink4" :bold t)))) - '(gnus-group-news-1-empty-face ((t (:foreground "ForestGreen")))) - '(gnus-group-news-1-face ((t (:foreground "ForestGreen" :bold t)))) - '(gnus-group-news-2-empty-face ((t (:foreground "CadetBlue4")))) - '(gnus-group-news-2-face ((t (:foreground "CadetBlue4" :bold t)))) - '(gnus-group-news-3-empty-face ((t (nil)))) - '(gnus-group-news-3-face ((t (:bold t)))) - '(gnus-group-news-low-empty-face ((t (:foreground "DarkGreen")))) - '(gnus-group-news-low-face ((t (:foreground "DarkGreen" :bold t)))) - '(gnus-header-content-face ((t (:foreground "indianred4" :italic t)))) - '(gnus-header-from-face ((t (:foreground "red3")))) - '(gnus-header-name-face ((t (:foreground "maroon")))) - '(gnus-header-newsgroups-face ((t (:foreground "MidnightBlue" :italic t)))) - '(gnus-header-subject-face ((t (:foreground "red4")))) - '(gnus-signature-face ((t (:italic t)))) - '(gnus-splash-face ((t (:foreground "ForestGreen")))) - '(gnus-summary-cancelled-face ((t (:foreground "yellow" :background "black")))) - '(gnus-summary-high-ancient-face ((t (:foreground "RoyalBlue" :bold t)))) - '(gnus-summary-high-read-face ((t (:foreground "DarkGreen" :bold t)))) - '(gnus-summary-high-ticked-face ((t (:foreground "firebrick" :bold t)))) - '(gnus-summary-high-unread-face ((t (:bold t)))) - '(gnus-summary-low-ancient-face ((t (:foreground "RoyalBlue" :italic t)))) - '(gnus-summary-low-read-face ((t (:foreground "DarkGreen" :italic t)))) - '(gnus-summary-low-ticked-face ((t (:foreground "firebrick" :italic t)))) - '(gnus-summary-low-unread-face ((t (:italic t)))) - '(gnus-summary-normal-ancient-face ((t (:foreground "RoyalBlue")))) - '(gnus-summary-normal-read-face ((t (:foreground "DarkGreen")))) - '(gnus-summary-normal-ticked-face ((t (:foreground "firebrick")))) - '(gnus-summary-normal-unread-face ((t (nil)))) - '(gnus-summary-selected-face ((t (:underline t)))) - '(highlight ((t (:background "darkseagreen2")))) - '(highlight-changes-delete-face ((t (:foreground "red" :underline t)))) - '(highlight-changes-face ((t (:foreground "red")))) - '(highline-face ((t (:background "paleturquoise")))) - '(holiday-face ((t (:background "pink")))) - '(info-menu-5 ((t (:underline t)))) - '(info-node ((t (:bold t :italic t)))) - '(info-xref ((t (:bold t)))) - '(italic ((t (:italic t)))) - '(makefile-space-face ((t (:background "hotpink")))) - '(message-cited-text-face ((t (:foreground "red")))) - '(message-header-cc-face ((t (:foreground "MidnightBlue")))) - '(message-header-name-face ((t (:foreground "cornflower blue")))) - '(message-header-newsgroups-face ((t (:foreground "blue4" :bold t :italic t)))) - '(message-header-other-face ((t (:foreground "steel blue")))) - '(message-header-subject-face ((t (:foreground "navy blue" :bold t)))) - '(message-header-to-face ((t (:foreground "MidnightBlue" :bold t)))) - '(message-header-xheader-face ((t (:foreground "blue")))) - '(message-separator-face ((t (:foreground "brown")))) - '(modeline ((t (:foreground "white" :background "black")))) - '(modeline-buffer-id ((t (:foreground "white" :background "black")))) - '(modeline-mousable ((t (:foreground "white" :background "black")))) - '(modeline-mousable-minor-mode ((t (:foreground "white" :background "black")))) - '(region ((t (:background "gray")))) - '(secondary-selection ((t (:background "paleturquoise")))) - '(show-paren-match-face ((t (:background "turquoise")))) - '(show-paren-mismatch-face ((t (:foreground "white" :background "purple")))) - '(speedbar-button-face ((t (:foreground "green4")))) - '(speedbar-directory-face ((t (:foreground "blue4")))) - '(speedbar-file-face ((t (:foreground "cyan4")))) - '(speedbar-highlight-face ((t (:background "green")))) - '(speedbar-selected-face ((t (:foreground "red" :underline t)))) - '(speedbar-tag-face ((t (:foreground "brown")))) - '(term-black ((t (:foreground "black")))) - '(term-blackbg ((t (:background "black")))) - '(term-blue ((t (:foreground "blue")))) - '(term-bluebg ((t (:background "blue")))) - '(term-bold ((t (:bold t)))) - '(term-cyan ((t (:foreground "cyan")))) - '(term-cyanbg ((t (:background "cyan")))) - '(term-default-bg ((t (nil)))) - '(term-default-bg-inv ((t (nil)))) - '(term-default-fg ((t (nil)))) - '(term-default-fg-inv ((t (nil)))) - '(term-green ((t (:foreground "green")))) - '(term-greenbg ((t (:background "green")))) - '(term-invisible ((t (nil)))) - '(term-invisible-inv ((t (nil)))) - '(term-magenta ((t (:foreground "magenta")))) - '(term-magentabg ((t (:background "magenta")))) - '(term-red ((t (:foreground "red")))) - '(term-redbg ((t (:background "red")))) - '(term-underline ((t (:underline t)))) - '(term-white ((t (:foreground "white")))) - '(term-whitebg ((t (:background "white")))) - '(term-yellow ((t (:foreground "yellow")))) - '(term-yellowbg ((t (:background "yellow")))) - '(underline ((t (:underline t)))) - '(vcursor ((t (:foreground "blue" :background "cyan" :underline t)))) - '(vhdl-font-lock-attribute-face ((t (:foreground "Orchid")))) - '(vhdl-font-lock-directive-face ((t (:foreground "CadetBlue")))) - '(vhdl-font-lock-enumvalue-face ((t (:foreground "Gold4")))) - '(vhdl-font-lock-function-face ((t (:foreground "Orchid4")))) - '(vhdl-font-lock-prompt-face ((t (:foreground "Red" :bold t)))) - '(vhdl-font-lock-reserved-words-face ((t (:foreground "Orange" :bold t)))) - '(vhdl-font-lock-translate-off-face ((t (:background "LightGray")))) - '(vhdl-speedbar-architecture-face ((t (:foreground "Blue")))) - '(vhdl-speedbar-architecture-selected-face ((t (:foreground "Blue" :underline t)))) - '(vhdl-speedbar-configuration-face ((t (:foreground "DarkGoldenrod")))) - '(vhdl-speedbar-configuration-selected-face ((t (:foreground "DarkGoldenrod" :underline t)))) - '(vhdl-speedbar-entity-face ((t (:foreground "ForestGreen")))) - '(vhdl-speedbar-entity-selected-face ((t (:foreground "ForestGreen" :underline t)))) - '(vhdl-speedbar-instantiation-face ((t (:foreground "Brown")))) - '(vhdl-speedbar-instantiation-selected-face ((t (:foreground "Brown" :underline t)))) - '(vhdl-speedbar-package-face ((t (:foreground "Grey50")))) - '(vhdl-speedbar-package-selected-face ((t (:foreground "Grey50" :underline t)))) - '(viper-minibuffer-emacs-face ((t (:foreground "Black" :background "darkseagreen2")))) - '(viper-minibuffer-insert-face ((t (:foreground "Black" :background "pink")))) - '(viper-minibuffer-vi-face ((t (:foreground "DarkGreen" :background "grey")))) - '(viper-replace-overlay-face ((t (:foreground "Black" :background "darkseagreen2")))) - '(viper-search-face ((t (:foreground "Black" :background "khaki")))) - '(widget-button-face ((t (:bold t)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "dark green")))) - '(widget-field-face ((t (:background "gray85")))) - '(widget-inactive-face ((t (:foreground "dim gray")))) - '(widget-single-line-field-face ((t (:background "gray85"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'wheat) - -;;; wheat-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/word-perfect-theme.el b/elpa/color-theme-modern-0.0.3/word-perfect-theme.el deleted file mode 100644 index 78bed1a..0000000 --- a/elpa/color-theme-modern-0.0.3/word-perfect-theme.el +++ /dev/null @@ -1,154 +0,0 @@ -;;; word-perfect-theme.el --- word-perfect theme - -;; Copyright (C) 2001 by Thomas Gehrlein -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of word-perfect theme from `color-themes' - -;;; Code: - -(deftheme word-perfect - "word-perfect theme") - -(custom-theme-set-faces - 'word-perfect - - '(default ((t (:background "blue4" :foreground "white")))) - '(mouse ((t (:foreground "black")))) - '(cursor ((t (:background "gold")))) - '(border ((t (:foreground "black")))) - - '(ecb-source-in-directories-buffer-face ((t (:foreground "LightBlue1")))) - '(gnus-mouse-face ((t (:background "steel blue" :foreground "black")))) - '(goto-address-mail-face ((t (:italic t :foreground "yellow2")))) - '(goto-address-mail-mouse-face ((t (:background "yellow2" :foreground "black")))) - '(goto-address-url-face ((t (:bold t :foreground "white")))) - '(goto-address-url-mouse-face ((t (:background "steel blue" :foreground "black")))) - '(list-matching-lines-face ((t (:bold t :foreground "white")))) - '(view-highlight-face ((t (:background "steel blue" :foreground "black")))) - - '(bbdb-field-name ((t (:foreground "lime green")))) - '(bbdb-field-value ((t (:foreground "white")))) - '(bbdb-name ((t (:underline t :foreground "lime green")))) - '(bold ((t (:bold t :foreground "white")))) - '(bold-italic ((t (:italic t :bold t :foreground "yellow")))) - '(calendar-today-face ((t (:underline t :foreground "deep sky blue")))) - '(diary-face ((t (:foreground "gold")))) - '(ecb-sources-face ((t (:foreground "LightBlue1")))) - '(edb-inter-field-face ((t (:foreground "deep sky blue")))) - '(edb-normal-summary-face ((t (:foreground "gold")))) - '(emacs-wiki-bad-link-face ((t (:underline "coral" :bold t :foreground "coral")))) - '(emacs-wiki-link-face ((t (:underline "cyan" :bold t :foreground "cyan")))) - '(font-lock-builtin-face ((t (:foreground "LightSteelBlue")))) - '(font-lock-comment-face ((t (:foreground "deep sky blue")))) - '(font-lock-constant-face ((t (:foreground "lime green")))) - '(font-lock-doc-face ((t (:foreground "gold")))) - '(font-lock-doc-string-face ((t (:foreground "gold")))) - '(font-lock-function-name-face ((t (:background "blue4" :foreground "IndianRed")))) - '(font-lock-keyword-face ((t (:foreground "lime green")))) - '(font-lock-preprocessor-face ((t (:foreground "lime green")))) - '(font-lock-reference-face ((t (:foreground "LightSteelBlue")))) - '(font-lock-string-face ((t (:foreground "gold")))) - '(font-lock-type-face ((t (:foreground "lime green")))) - '(font-lock-variable-name-face ((t (:foreground "LightGoldenrod")))) - '(font-lock-warning-face ((t (:bold t :foreground "firebrick")))) - '(gnus-emphasis-bold ((t (:foreground "yellow2")))) - '(gnus-emphasis-bold-italic ((t (:foreground "yellow2")))) - '(gnus-emphasis-italic ((t (:foreground "yellow2")))) - '(gnus-emphasis-underline ((t (:foreground "yellow2")))) - '(gnus-emphasis-underline-bold ((t (:foreground "yellow2")))) - '(gnus-emphasis-underline-bold-italic ((t (:foreground "yellow2")))) - '(gnus-emphasis-underline-italic ((t (:foreground "yellow2")))) - '(gnus-group-mail-1-empty-face ((t (:foreground "aquamarine1")))) - '(gnus-group-mail-1-face ((t (:bold t :foreground "aquamarine1")))) - '(gnus-group-mail-2-empty-face ((t (:foreground "aquamarine2")))) - '(gnus-group-mail-2-face ((t (:bold t :foreground "aquamarine2")))) - '(gnus-group-mail-3-empty-face ((t (:foreground "aquamarine3")))) - '(gnus-group-mail-3-face ((t (:bold t :foreground "aquamarine3")))) - '(gnus-group-mail-low-empty-face ((t (:foreground "aquamarine4")))) - '(gnus-group-mail-low-face ((t (:bold t :foreground "aquamarine4")))) - '(gnus-group-news-1-empty-face ((t (:foreground "PaleTurquoise")))) - '(gnus-group-news-1-face ((t (:bold t :foreground "PaleTurquoise")))) - '(gnus-group-news-2-empty-face ((t (:foreground "turquoise")))) - '(gnus-group-news-2-face ((t (:bold t :foreground "turquoise")))) - '(gnus-group-news-3-empty-face ((t (:foreground "deep sky blue")))) - '(gnus-group-news-3-face ((t (:bold t :foreground "deep sky blue")))) - '(gnus-group-news-low-empty-face ((t (:foreground "DarkTurquoise")))) - '(gnus-group-news-low-face ((t (:bold t :foreground "DarkTurquoise")))) - '(gnus-header-content-face ((t (:foreground "gold")))) - '(gnus-header-from-face ((t (:foreground "gold")))) - '(gnus-header-name-face ((t (:foreground "deep sky blue")))) - '(gnus-header-newsgroups-face ((t (:foreground "gold")))) - '(gnus-header-subject-face ((t (:foreground "gold")))) - '(gnus-signature-face ((t (:foreground "gold")))) - '(gnus-splash-face ((t (:foreground "firebrick")))) - '(gnus-summary-cancelled-face ((t (:background "black" :foreground "deep sky blue")))) - '(gnus-summary-high-ancient-face ((t (:bold t :foreground "deep sky blue")))) - '(gnus-summary-high-read-face ((t (:bold t :foreground "deep sky blue")))) - '(gnus-summary-high-ticked-face ((t (:bold t :foreground "deep sky blue")))) - '(gnus-summary-high-unread-face ((t (:bold t :foreground "lime green")))) - '(gnus-summary-low-ancient-face ((t (:italic t :foreground "deep sky blue")))) - '(gnus-summary-low-read-face ((t (:italic t :foreground "deep sky blue")))) - '(gnus-summary-low-ticked-face ((t (:italic t :foreground "deep sky blue")))) - '(gnus-summary-low-unread-face ((t (:italic t :foreground "lime green")))) - '(gnus-summary-normal-ancient-face ((t (:foreground "deep sky blue")))) - '(gnus-summary-normal-read-face ((t (:foreground "deep sky blue")))) - '(gnus-summary-normal-ticked-face ((t (:foreground "deep sky blue")))) - '(gnus-summary-normal-unread-face ((t (:foreground "lime green")))) - '(gnus-summary-selected-face ((t (:underline t :foreground "gold")))) - '(highlight ((t (:background "steel blue" :foreground "black")))) - '(holiday-face ((t (:background "blue4" :foreground "IndianRed1")))) - '(info-menu-5 ((t (:underline t :foreground "gold")))) - '(info-node ((t (:italic t :bold t :foreground "gold")))) - '(info-xref ((t (:bold t :foreground "gold")))) - '(isearch ((t (:background "firebrick" :foreground "white")))) - '(italic ((t (:italic t :foreground "yellow2")))) - '(message-cited-text-face ((t (:foreground "gold")))) - '(message-header-cc-face ((t (:bold t :foreground "green4")))) - '(message-header-name-face ((t (:foreground "deep sky blue")))) - '(message-header-newsgroups-face ((t (:italic t :bold t :foreground "gold")))) - '(message-header-other-face ((t (:foreground "gold")))) - '(message-header-subject-face ((t (:foreground "gold")))) - '(message-header-to-face ((t (:bold t :foreground "gold")))) - '(message-header-xheader-face ((t (:foreground "blue")))) - '(message-separator-face ((t (:foreground "lime green")))) - '(modeline ((t (:foreground "white" :background "black")))) - '(modeline-buffer-id ((t (:foreground "white" :background "black")))) - '(modeline-mousable ((t (:foreground "white" :background "black")))) - '(modeline-mousable-minor-mode ((t (:foreground "white" :background "black")))) - '(overlay-empty-face ((t (nil)))) - '(primary-selection ((t (:background "firebrick" :foreground "white")))) - '(region ((t (:background "firebrick" :foreground "white")))) - '(secondary-selection ((t (:background "yellow2" :foreground "black")))) - '(semantic-dirty-token-face ((t (:background "gray10")))) - '(show-paren-match-face ((t (:background "deep sky blue" :foreground "black")))) - '(show-paren-mismatch-face ((t (:background "firebrick" :foreground "white")))) - '(underline ((t (:underline t :background "blue4" :foreground "white"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'word-perfect) - -;;; word-perfect-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/xemacs-theme.el b/elpa/color-theme-modern-0.0.3/xemacs-theme.el deleted file mode 100644 index 02b69da..0000000 --- a/elpa/color-theme-modern-0.0.3/xemacs-theme.el +++ /dev/null @@ -1,121 +0,0 @@ -;;; xemacs-theme.el --- xemacs theme - -;; Copyright (C) 2005, 2006 Xavier Maillard -;; Copyright (C) 2005, 2006 Brian Palmer -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of xemacs theme from `color-themes' - -;;; Code: - -(deftheme xemacs - "xemacs theme") - -(custom-theme-set-faces - 'xemacs - - '(default ((t (:background "gray80" :foreground "black")))) - '(cursor ((t (:background "Red3")))) - '(border ((t (:foreground "black")))) - - '(blue ((t (:foreground "blue")))) - '(bold ((t (:bold t)))) - '(bold-italic ((t (:italic t :bold t)))) - '(border-glyph ((t (nil)))) - '(custom-button-face ((t (:bold t)))) - '(custom-changed-face ((t (:background "blue" :foreground "white")))) - '(custom-documentation-face ((t (nil)))) - '(custom-face-tag-face ((t (:underline t)))) - '(custom-group-tag-face ((t (:underline t :foreground "blue")))) - '(custom-group-tag-face-1 ((t (:underline t :foreground "red")))) - '(custom-invalid-face ((t (:background "red" :foreground "yellow")))) - '(custom-modified-face ((t (:background "blue" :foreground "white")))) - '(custom-rogue-face ((t (:background "black" :foreground "pink")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:background "white" :foreground "blue")))) - '(custom-state-face ((t (:foreground "dark green")))) - '(custom-variable-button-face ((t (:underline t :bold t)))) - '(custom-variable-tag-face ((t (:underline t :foreground "blue")))) - '(dired-face-boring ((t (:foreground "Gray65")))) - '(dired-face-directory ((t (:bold t)))) - '(dired-face-executable ((t (:foreground "SeaGreen")))) - '(dired-face-flagged ((t (:background "LightSlateGray")))) - '(dired-face-marked ((t (:background "PaleVioletRed")))) - '(dired-face-permissions ((t (:background "grey75" :foreground "black")))) - '(dired-face-setuid ((t (:foreground "Red")))) - '(dired-face-socket ((t (:foreground "magenta")))) - '(dired-face-symlink ((t (:foreground "cyan")))) - '(font-lock-builtin-face ((t (:foreground "red3")))) - '(font-lock-comment-face ((t (:foreground "blue4")))) - '(font-lock-constant-face ((t (:foreground "red3")))) - '(font-lock-doc-string-face ((t (:foreground "green4")))) - '(font-lock-function-name-face ((t (:foreground "brown4")))) - '(font-lock-keyword-face ((t (:foreground "red4")))) - '(font-lock-preprocessor-face ((t (:foreground "blue3")))) - '(font-lock-reference-face ((t (:foreground "red3")))) - '(font-lock-string-face ((t (:foreground "green4")))) - '(font-lock-type-face ((t (:foreground "steelblue")))) - '(font-lock-variable-name-face ((t (:foreground "magenta4")))) - '(font-lock-warning-face ((t (:bold t :foreground "Red")))) - '(green ((t (:foreground "green")))) - '(gui-button-face ((t (:background "grey75" :foreground "black")))) - '(gui-element ((t (:background "Gray80")))) - '(highlight ((t (:background "darkseagreen2")))) - '(info-node ((t (:italic t :bold t)))) - '(info-xref ((t (:bold t)))) - '(isearch ((t (:background "paleturquoise")))) - '(italic ((t (:italic t)))) - '(left-margin ((t (nil)))) - '(list-mode-item-selected ((t (:background "gray68")))) - '(modeline ((t (:background "Gray80")))) - '(modeline-buffer-id ((t (:background "Gray80" :foreground "blue4")))) - '(modeline-mousable ((t (:background "Gray80" :foreground "firebrick")))) - '(modeline-mousable-minor-mode ((t (:background "Gray80" :foreground "green4")))) - '(paren-blink-off ((t (:foreground "gray80")))) - '(paren-match ((t (:background "darkseagreen2")))) - '(paren-mismatch ((t (:background "DeepPink" :foreground "black")))) - '(pointer ((t (nil)))) - '(primary-selection ((t (:background "gray65")))) - '(red ((t (:foreground "red")))) - '(region ((t (:background "gray65")))) - '(right-margin ((t (nil)))) - '(secondary-selection ((t (:background "paleturquoise")))) - '(text-cursor ((t (:background "Red3" :foreground "gray80")))) - '(toolbar ((t (:background "Gray80")))) - '(underline ((t (:underline t)))) - '(vertical-divider ((t (:background "Gray80")))) - '(widget-button-face ((t (:bold t)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "dark green")))) - '(widget-field-face ((t (:background "gray85")))) - '(widget-inactive-face ((t (:foreground "dim gray")))) - '(yellow ((t (:foreground "yellow")))) - '(zmacs-region ((t (:background "gray65"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'xemacs) - -;;; xemacs-theme.el ends here diff --git a/elpa/color-theme-modern-0.0.3/xp-theme.el b/elpa/color-theme-modern-0.0.3/xp-theme.el deleted file mode 100644 index 3a06e6b..0000000 --- a/elpa/color-theme-modern-0.0.3/xp-theme.el +++ /dev/null @@ -1,191 +0,0 @@ -;;; xp-theme.el --- xp theme - -;; Copyright (C) 2002 by Girish Bharadwaj -;; Copyright (C) 2013 by Syohei YOSHIDA - -;; Author: Syohei YOSHIDA -;; URL: https://github.com/emacs-jp/replace-colorthemes -;; Version: 0.01 - -;; 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: -;; -;; Port of xp theme from `color-themes' - -;;; Code: - -(deftheme xp - "xp theme") - -(custom-theme-set-faces - 'xp - - '(default ((t (:background "lightyellow2" :foreground "gray20")))) - '(mouse ((t (:background "black")))) - '(cursor ((t (:background "black")))) - '(border ((t (:background "black")))) - - '(help-highlight-face ((t (:underline t)))) - '(list-matching-lines-face ((t (:bold t :weight bold)))) - '(view-highlight-face ((t (:background "darkseagreen2")))) - '(widget-mouse-face ((t (:background "darkseagreen2")))) - - '(bg:erc-color-face0 ((t (:background "White")))) - '(bg:erc-color-face1 ((t (:background "black")))) - '(bg:erc-color-face10 ((t (:background "lightblue1")))) - '(bg:erc-color-face11 ((t (:background "cyan")))) - '(bg:erc-color-face12 ((t (:background "blue")))) - '(bg:erc-color-face13 ((t (:background "deeppink")))) - '(bg:erc-color-face14 ((t (:background "gray50")))) - '(bg:erc-color-face15 ((t (:background "gray90")))) - '(bg:erc-color-face2 ((t (:background "blue4")))) - '(bg:erc-color-face3 ((t (:background "green4")))) - '(bg:erc-color-face4 ((t (:background "red")))) - '(bg:erc-color-face5 ((t (:background "brown")))) - '(bg:erc-color-face6 ((t (:background "purple")))) - '(bg:erc-color-face7 ((t (:background "orange")))) - '(bg:erc-color-face8 ((t (:background "yellow")))) - '(bg:erc-color-face9 ((t (:background "green")))) - '(bold ((t (:bold t :weight bold)))) - '(bold-italic ((t (:italic t :bold t :slant italic :weight bold)))) - '(button ((t (:underline t)))) - '(comint-highlight-input ((t (:bold t :weight bold)))) - '(comint-highlight-prompt ((t (:foreground "dark blue")))) - '(custom-button-face ((t (:background "lightgrey" :foreground "black" - :box (:line-width 2 :style released-button))))) - '(custom-button-pressed-face ((t (:background "lightgrey" :foreground "black" - :box (:line-width 2 :style pressed-button))))) - '(custom-changed-face ((t (:background "blue" :foreground "white")))) - '(custom-comment-face ((t (:background "gray85")))) - '(custom-comment-tag-face ((t (:foreground "blue4")))) - '(custom-documentation-face ((t (nil)))) - '(custom-face-tag-face ((t (:bold t :family "helv" :weight bold :height 1.2)))) - '(custom-group-tag-face ((t (:bold t :foreground "blue" :weight bold :height 1.2)))) - '(custom-group-tag-face-1 ((t (:bold t :family "helv" :foreground "red" :weight bold :height 1.2)))) - '(custom-invalid-face ((t (:background "red" :foreground "yellow")))) - '(custom-modified-face ((t (:background "blue" :foreground "white")))) - '(custom-rogue-face ((t (:background "black" :foreground "pink")))) - '(custom-saved-face ((t (:underline t)))) - '(custom-set-face ((t (:background "white" :foreground "blue")))) - '(custom-state-face ((t (:foreground "dark green")))) - '(custom-variable-button-face ((t (:bold t :underline t :weight bold)))) - '(custom-variable-tag-face ((t (:bold t :family "helv" :foreground "blue" :weight bold :height 1.2)))) - '(erc-action-face ((t (:bold t :weight bold)))) - '(erc-bold-face ((t (:bold t :weight bold)))) - '(erc-default-face ((t (nil)))) - '(erc-direct-msg-face ((t (:foreground "IndianRed")))) - '(erc-error-face ((t (:background "Red" :foreground "White")))) - '(erc-input-face ((t (:foreground "brown")))) - '(erc-inverse-face ((t (:background "Black" :foreground "White")))) - '(erc-notice-face ((t (:bold t :foreground "SlateBlue" :weight bold)))) - '(erc-prompt-face ((t (:bold t :background "lightBlue2" :foreground "Black" :weight bold)))) - '(erc-timestamp-face ((t (:bold t :foreground "green" :weight bold)))) - '(erc-underline-face ((t (:underline t)))) - '(fg:erc-color-face0 ((t (:foreground "White")))) - '(fg:erc-color-face1 ((t (:foreground "black")))) - '(fg:erc-color-face10 ((t (:foreground "lightblue1")))) - '(fg:erc-color-face11 ((t (:foreground "cyan")))) - '(fg:erc-color-face12 ((t (:foreground "blue")))) - '(fg:erc-color-face13 ((t (:foreground "deeppink")))) - '(fg:erc-color-face14 ((t (:foreground "gray50")))) - '(fg:erc-color-face15 ((t (:foreground "gray90")))) - '(fg:erc-color-face2 ((t (:foreground "blue4")))) - '(fg:erc-color-face3 ((t (:foreground "green4")))) - '(fg:erc-color-face4 ((t (:foreground "red")))) - '(fg:erc-color-face5 ((t (:foreground "brown")))) - '(fg:erc-color-face6 ((t (:foreground "purple")))) - '(fg:erc-color-face7 ((t (:foreground "orange")))) - '(fg:erc-color-face8 ((t (:foreground "yellow")))) - '(fg:erc-color-face9 ((t (:foreground "green")))) - '(fixed-pitch ((t (:family "courier")))) - '(font-lock-builtin-face ((t (:foreground "magenta3" :underline t :height 0.9)))) - '(font-lock-comment-face ((t (:italic t :foreground "gray60" :slant oblique :height 0.9)))) - '(font-lock-constant-face ((t (:bold t :foreground "medium purple" :weight bold :height 0.9)))) - '(font-lock-function-name-face ((t (:bold t :foreground "black" :weight bold)))) - '(font-lock-keyword-face ((t (:bold t :foreground "blue" :weight bold)))) - '(font-lock-string-face ((t (:foreground "red" :height 0.9)))) - '(font-lock-type-face ((t (:foreground "Royalblue")))) - '(font-lock-variable-name-face ((t (:bold t :foreground "maroon" :weight bold :height 0.9)))) - '(font-lock-warning-face ((t (:bold t :foreground "Red" :weight bold)))) - '(fringe ((t (:background "dodgerblue")))) - '(header-line ((t (:underline "red" :overline "red" :background "grey90" :foreground "grey20" :box nil)))) - '(highlight ((t (:background "darkseagreen2")))) - '(isearch ((t (:background "magenta2" :foreground "lightskyblue1")))) - '(isearch-lazy-highlight-face ((t (:background "paleturquoise")))) - '(italic ((t (:italic t :slant italic)))) - '(jde-bug-breakpoint-cursor ((t (:background "brown" :foreground "cyan")))) - '(jde-db-active-breakpoint-face ((t (:background "red" :foreground "black")))) - '(jde-db-requested-breakpoint-face ((t (:background "yellow" :foreground "black")))) - '(jde-db-spec-breakpoint-face ((t (:background "green" :foreground "black")))) - '(jde-java-font-lock-api-face ((t (:foreground "dark goldenrod")))) - '(jde-java-font-lock-bold-face ((t (:bold t :weight bold)))) - '(jde-java-font-lock-code-face ((t (nil)))) - '(jde-java-font-lock-constant-face ((t (:foreground "CadetBlue")))) - '(jde-java-font-lock-doc-tag-face ((t (:foreground "green4")))) - '(jde-java-font-lock-italic-face ((t (:italic t :slant italic)))) - '(jde-java-font-lock-link-face ((t (:foreground "cadetblue" :underline t :slant normal)))) - '(jde-java-font-lock-modifier-face ((t (:foreground "Orchid")))) - '(jde-java-font-lock-number-face ((t (:foreground "RosyBrown")))) - '(jde-java-font-lock-operator-face ((t (:foreground "medium blue")))) - '(jde-java-font-lock-package-face ((t (:foreground "blue3")))) - '(jde-java-font-lock-pre-face ((t (nil)))) - '(jde-java-font-lock-underline-face ((t (:underline t)))) - '(menu ((t (nil)))) - '(minibuffer-prompt ((t (:foreground "dark blue")))) - '(modeline ((t (:background "dodgerblue" :foreground "black" :overline "red" :underline "red")))) - '(modeline-buffer-id ((t (:background "dodgerblue" :foreground "black")))) - '(modeline-mousable ((t (:background "dodgerblue" :foreground "black")))) - '(modeline-mousable-minor-mode ((t (:background "dodgerblue" :foreground "black")))) - '(mode-line-inactive ((t (:italic t :underline "red" :overline "red" :background "white" :foreground "cadetblue" :box (:line-width -1 :color "grey75") :slant oblique :weight light)))) - '(primary-selection ((t (:background "lightgoldenrod2")))) - '(region ((t (:background "lightgoldenrod2")))) - '(scroll-bar ((t (nil)))) - '(secondary-selection ((t (:background "yellow")))) - '(semantic-dirty-token-face ((t (:background "lightyellow")))) - '(semantic-unmatched-syntax-face ((t (:underline "red")))) - '(senator-intangible-face ((t (:foreground "gray25")))) - '(senator-momentary-highlight-face ((t (:background "gray70")))) - '(senator-read-only-face ((t (:background "#CCBBBB")))) - '(show-paren-match-face ((t (:background "turquoise")))) - '(show-paren-mismatch-face ((t (:background "purple" :foreground "white")))) - '(speedbar-button-face ((t (:foreground "green4")))) - '(speedbar-directory-face ((t (:foreground "blue4")))) - '(speedbar-file-face ((t (:foreground "cyan4")))) - '(speedbar-highlight-face ((t (:background "green")))) - '(speedbar-selected-face ((t (:foreground "red" :underline t)))) - '(speedbar-tag-face ((t (:foreground "brown")))) - '(template-message-face ((t (:bold t :weight bold)))) - '(tool-bar ((t (:background "grey75" :foreground "black" - :box (:line-width 1 :style released-button))))) - '(tooltip ((t (:background "lightyellow" :foreground "black")))) - '(trailing-whitespace ((t (:background "red")))) - '(underline ((t (:underline t)))) - '(variable-pitch ((t (:family "helv")))) - '(widget-button-face ((t (:bold t :weight bold)))) - '(widget-button-pressed-face ((t (:foreground "red")))) - '(widget-documentation-face ((t (:foreground "dark green")))) - '(widget-field-face ((t (:background "gray85")))) - '(widget-inactive-face ((t (:foreground "dim gray")))) - '(widget-single-line-field-face ((t (:background "gray85")))) - '(zmacs-region ((t (:background "lightgoldenrod2"))))) - -;;;###autoload -(when load-file-name - (add-to-list 'custom-theme-load-path - (file-name-as-directory (file-name-directory load-file-name)))) - -(provide-theme 'xp) - -;;; xp-theme.el ends here diff --git a/elpa/cond-let-0.2.1/cond-let-autoloads.el b/elpa/cond-let-0.2.1/cond-let-autoloads.el deleted file mode 100644 index 889b2af..0000000 --- a/elpa/cond-let-0.2.1/cond-let-autoloads.el +++ /dev/null @@ -1,28 +0,0 @@ -;;; cond-let-autoloads.el --- automatically extracted autoloads (do not edit) -*- lexical-binding: t -*- -;; Generated by the `loaddefs-generate' function. - -;; This file is part of GNU Emacs. - -;;; Code: - -(add-to-list 'load-path (or (and load-file-name (directory-file-name (file-name-directory load-file-name))) (car load-path))) - - - -;;; Generated autoloads from cond-let.el - -(register-definition-prefixes "cond-let" '("cond-let")) - -;;; End of scraped data - -(provide 'cond-let-autoloads) - -;; Local Variables: -;; version-control: never -;; no-byte-compile: t -;; no-update-autoloads: t -;; no-native-compile: t -;; coding: utf-8-emacs-unix -;; End: - -;;; cond-let-autoloads.el ends here diff --git a/elpa/cond-let-0.2.1/cond-let-pkg.el b/elpa/cond-let-0.2.1/cond-let-pkg.el deleted file mode 100644 index 53d12eb..0000000 --- a/elpa/cond-let-0.2.1/cond-let-pkg.el +++ /dev/null @@ -1,8 +0,0 @@ -;; -*- no-byte-compile: t; lexical-binding: nil -*- -(define-package "cond-let" "0.2.1" - "Additional and improved binding conditionals." - '((emacs "28.1")) - :url "https://github.com/tarsius/cond-let" - :commit "0430bd1eb3493ea90d69feb6b7eb7dac3e10d0ba" - :revdesc "v0.2.1-0-g0430bd1eb349" - :keywords '("extensions")) diff --git a/elpa/cond-let-0.2.1/cond-let.el b/elpa/cond-let-0.2.1/cond-let.el deleted file mode 100644 index 1372736..0000000 --- a/elpa/cond-let-0.2.1/cond-let.el +++ /dev/null @@ -1,534 +0,0 @@ -;;; cond-let.el --- Additional and improved binding conditionals -*- lexical-binding:t -*- - -;; Copyright (C) 2025-2026 Jonas Bernoulli - -;; May contain traces of Emacs, which is -;; Copyright (C) 1985-2025 Free Software Foundation, Inc. - -;; Authors: Jonas Bernoulli -;; Homepage: https://github.com/tarsius/cond-let -;; Keywords: extensions - -;; Package-Version: 0.2.1 -;; Package-Revision: v0.2.1-0-g0430bd1eb349 -;; Package-Requires: ((emacs "28.1")) - -;; SPDX-License-Identifier: GPL-3.0-or-later - -;; 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 of the License, -;; 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: - -;; This is an ALPHA release! -;; Breaking changes are possible! - -;; Emacs provides the binding conditionals `if-let', `if-let*', -;; `when-let', `when-let*', `and-let*' and `while-let'. - -;; This package implements the missing `and-let' and `while-let*', -;; and the original `cond-let', `cond-let*', `and$' and `and>'. - -;; This package additionally provides more consistent and improved -;; implementations of the binding conditionals already provided by -;; Emacs. Merely loading this library does not shadow the built-in -;; implementations; this can optionally be done in the context of -;; an individual library, as described below. - -;; `cond-let' and `cond-let*' are provided exactly under these names. -;; The names of all other macros implemented by this package begin -;; with `cond-let--', the package's prefix for private symbol. - -;; Users of this package are not expected to use these unwieldy -;; names. Instead one should use Emacs' shorthand feature to use -;; all or some of these macros by their conceptual names. E.g., if -;; you want to use all of the available macros, add this at the end -;; of a library. - -;; Local Variables: -;; read-symbol-shorthands: ( -;; ("and$" . "cond-let--and$") -;; ("and>" . "cond-let--and>") -;; ("and-let" . "cond-let--and-let") -;; ("if-let" . "cond-let--if-let") -;; ("when-let" . "cond-let--when-let") -;; ("while-let" . "cond-let--while-let")) -;; End: - -;; You can think of these file-local settings as import statements of -;; sorts. If you do this, then this package's implementations shadow -;; the built-in implementations. Doing so does not affect any other -;; libraries, which continue to use the built-in implementations. - -;; Due to limitations of the shorthand implementation this has to be -;; done for each individual library. "dir-locals.el" cannot be used. - -;; If you use `and$' and `and>', you might want to add this to your -;; configuration: - -;; (with-eval-after-load 'cond-let -;; (font-lock-add-keywords 'emacs-lisp-mode -;; cond-let-font-lock-keywords t)) - -;; For information about the individual macros, please refer to their -;; docstrings. - -;; See also https://github.com/tarsius/cond-let/wiki. - -;;; Code: -;;; Cond - -(defun cond-let--prepare-clauses (tag sequential clauses) - "Used by macros `cond-let*' and `cond-let'." - (let (body) - (dolist (clause (nreverse clauses)) - (cond - ((vectorp clause) - (setq body - `((,(if (and sequential (length> clause 1)) 'let* 'let) - ,(mapcar (lambda (vec) (append vec nil)) clause) - ,@body)))) - ((let (varlist) - (while (vectorp (car clause)) - (push (append (pop clause) nil) varlist)) - (push (cond - (varlist - `(,(pcase (list (and body t) - (and sequential (length> varlist 1))) - ('(t t ) 'cond-let--when-let*) - (`(t ,_) 'cond-let--when-let) - ('(nil t ) 'cond-let--and-let*) - (`(nil ,_) 'cond-let--and-let)) - ,(nreverse varlist) - ,(if body - `(throw ',tag ,(macroexp-progn clause)) - (macroexp-progn clause)))) - ((length= clause 1) - (if body - (let ((a (gensym "anon"))) - `(let ((,a ,(car clause))) - (when ,a (throw ',tag ,a)))) - (car clause))) - ((and (eq (car clause) t) (not body)) - (macroexp-progn (cdr clause))) - (t - `(when ,(pop clause) - (throw ',tag ,(macroexp-progn clause))))) - body))))) - body)) - -(defmacro cond-let* (&rest clauses) - "Try each clause until one succeeds. - -Each clause has one of these forms: -- a plain clause (CONDITION BODY...) -- a binding clause ([SYMBOL VALUEFORM]... BODY...) -- a binding vector [[SYMBOL VALUEFORM]...] - -A (CONDITION BODY...) clause works as for `cond'. Evaluate CONDITION, -and if it yields non-nil, the clause succeeds. Then evaluate BODY forms -sequentially and return the value of the last; or if there are no BODY -forms, return the value of CONDITION. If CONDITION yields nil, do not -evaluate the BODY forms and instead proceed to the next clause. - -A ([SYMBOL VALUEFORM]... BODY...) clause begins with one or more binding -vectors, followed by one or more BODY forms. Bind SYMBOL to the value -of VALUEFORM. Each VALUEFORM can refer to symbols already bound by this -VARLIST (as for `let*'). - -If all VALUEFORMs yield non-nil, evaluate BODY forms sequentially, with -VARLIST's bindings in effect, and return the value of the last form. - -If any VALUEFORM yields nil, evaluate neither the remaining VALUEFORMs -nor the BODY forms, and proceed to the next clause. - -A [[SYMBOL VALUEFORM]...] form creates bindings, which extend to all -remaining clauses and binding vectors. Unlike for the previous form, -always bind all SYMBOLs, even if a VALUEFORM yields nil. Always proceed -to the next clause." - (declare (indent 0) - (debug (&rest [&or - (vector &rest (vector symbolp form)) - ([&rest (vector symbolp form)] body) - (form body)]))) - (let ((tag (gensym ":cond-let*"))) - `(catch ',tag - ,@(cond-let--prepare-clauses tag t clauses)))) - -(defmacro cond-let (&rest clauses) - "Try each clause until one succeeds. - -Each clause has one of these forms: -- a plain clause (CONDITION BODY...) -- a binding clause ([SYMBOL VALUEFORM]... BODY...) -- a binding vector [[SYMBOL VALUEFORM]...] - -A (CONDITION BODY...) clause works as for `cond'. Evaluate CONDITION, -and if it yields non-nil, the clause succeeds. Then evaluate BODY forms -sequentially and return the value of the last; or if there are no BODY -forms, return the value of CONDITION. If CONDITION yields nil, do not -evaluate the BODY forms and instead proceed to the next clause. - -A ([SYMBOL VALUEFORM]... BODY...) clause begins with one or more binding -vectors, followed by one or more BODY forms. Bind SYMBOL to the value -of VALUEFORM. Evaluate all VALUEFORMs before binding their respective -SYMBOLs (as for `let'). - -If all VALUEFORMs yield non-nil, evaluate BODY forms sequentially, with -VARLIST's bindings in effect, and return the value of the last form. - -If any VALUEFORM yields nil, evaluate neither the remaining VALUEFORMs -nor the BODY forms, and proceed to the next clause. - -A [[SYMBOL VALUEFORM]...] form creates bindings, which extend to all -remaining clauses and binding vectors. Evaluate all VALUEFORMs before -binding their respective SYMBOLs. Unlike for the previous form, bind -all SYMBOLs, even if a VALUEFORM yields nil. Always proceed to the -next clause." - (declare (indent 0) (debug cond-let*)) - (let ((tag (gensym ":cond-let"))) - `(catch ',tag - ,@(cond-let--prepare-clauses tag nil clauses)))) - -;;; Common - -(defun cond-let--prepare-varlist (varlist) - "Used by Cond-Let's `when-let*', `and-let*' and `while-let*'. -Also used by other macros via `cond-let--prepare-varforms'. -Return (VARLIST LASTVAR)." - (let (prevvar) - (list (mapcar (lambda (binding) - (unless (length= binding 2) - (signal 'error (cons "Invalid binding" binding))) - (pcase-let ((`(,var ,form) binding)) - (when (string-prefix-p "_" (symbol-name var)) - (setq var (gensym "anon"))) - (prog1 (if prevvar - `(,var (and ,prevvar ,form)) - (list var form)) - (setq prevvar var)))) - varlist) - prevvar))) - -(defun cond-let--prepare-varforms (varlist &optional if-let) - "Used by Cond-Let's `when-let', `and-let', `while-let' and `if-let'. -Return (ANON-VARLIST ANON-SETQ VARLIST LASTVAR), or if the length of -VARLIST is 1 and IF-LET is nil, return (nil nil VARLIST LASTVAR)." - (if (and (not if-let) - (length= varlist 1)) - `(nil nil ,@(cond-let--prepare-varlist varlist)) - (let ((triples - (mapcar (lambda (binding) - (unless (length= binding 2) - (signal 'error (cons "Invalid binding" binding))) - (pcase-let ((`(,var ,form) binding)) - (when (string-prefix-p "_" (symbol-name var)) - (setq var nil)) - (list (and var (gensym "anon")) - var - form))) - varlist))) - (list (mapcan (pcase-lambda (`(,anon ,_ ,_)) - (and anon (list anon))) - triples) - (mapcar (pcase-lambda (`(,anon ,_ ,form)) - (if anon - `(setq ,anon ,form) - form)) - triples) - (mapcan (pcase-lambda (`(,anon ,var ,_)) - (and var `((,var ,anon)))) - triples) - (cadr (car (last triples))))))) - -;;; And - -(defmacro cond-let--and-let* (varlist &optional bodyform) - "Bind according to VARLIST until one yields nil, else evaluate BODYFORM. - -Each element of VARLIST is a list (SYMBOL VALUEFORM), which binds SYMBOL -to the value of VALUEFORM. Each VALUEFORM can refer to symbols already -bound by this VARLIST (as for `let*'). - -Evaluate VALUEFORMs until on of them yields nil. If that happens return -nil, and evaluate neither the remaining VALUEFORMs nor BODYFORM. If all -VALUEFORMs yield non-nil, evaluate BODYFORM with the bindings in effect, -and return its value; or if there is no BODYFORM, the value of the last -VALUEFORM." - (declare (indent 1) - (debug ((&rest (symbolp form)) form))) - (pcase-let ((`(,varlist ,lastvar) - (cond-let--prepare-varlist varlist))) - `(let* ,varlist - ,(if bodyform - `(and ,lastvar ,bodyform) - lastvar)))) - -(defmacro cond-let--and-let (varlist &optional bodyform) - "Bind according to VARLIST until one yields nil, else evaluate BODYFORM. - -Each element of VARLIST is a list (SYMBOL VALUEFORM), which binds SYMBOL -to the value of VALUEFORM. Evaluate all VALUEFORMs before binding their -respective SYMBOLs (as for `let'). - -Evaluate VALUEFORMs until on of them yields nil. If that happens return -nil, and evaluate neither the remaining VALUEFORMs nor BODYFORM. If all -VALUEFORMs yield non-nil, evaluate BODYFORM with the bindings in effect, -and return its value; or if there is no BODYFORM, the value of the last -VALUEFORM." - (declare (indent 1) (debug cond-let--and-let*)) - (pcase-let ((`(,anon ,set ,bind ,lastvar) - (cond-let--prepare-varforms varlist))) - (cond (anon - `(let ,anon - (and ,@set - (let ,bind - ,(or bodyform lastvar))))) - (t - `(let ,bind - ,(if bodyform - `(and ,lastvar ,bodyform) - lastvar)))))) - -(defmacro cond-let--and$ (varform bodyform) - "Bind variable `$' to value of VARFORM and conditionally evaluate BODYFORM. - -If VARFORM yields a non-nil value, bind the symbol `$' to that value, -evaluate BODYFORM with that binding in effect, and return the value of -BODYFORM. If VARFORM yields nil, do not evaluate BODYFORM, and return -nil." - (declare (debug (form form))) - `(let (($ ,varform)) - (and $ ,bodyform))) - -(defmacro cond-let--and> (form form2 &rest forms) - "Bind variables according to each VARFORM until one of them yields nil. - -Evaluate the first FORM and if that yields a non-nil value, bind the -symbol `$' to that value, and evaluate the next FORM with that binding -in effect. Repeat this process with subsequent FORMs until one yields -nil, then return nil without evaluate the remaining FORMs. If all -FORMs yield non-nil, return the value of the last FORM. - -\(fn FORM FORM...)" - (declare (debug (form form body))) - `(,(if forms 'let* 'let) - (($ ,form) - ,@(and forms - (mapcar (lambda (form) - `($ (and $ ,form))) - (cons form2 (butlast forms))))) - (and $ - ,(or (car (last forms)) - form2)))) - -;;; If - -(defmacro cond-let--if-let* (varlist then &rest else) - "Bind variables according to VARLIST and evaluate THEN or ELSE. - -Each element of VARLIST is a list (SYMBOL VALUEFORM), which binds SYMBOL -to the value of VALUEFORM. Each VALUEFORM can refer to symbols already -bound by this VARLIST (as for `let*'). - -If all VALUEFORMs yield non-nil, evaluate THEN with VARLIST's bindings -in effect, and return its value. THEN must be one expression. - -If any VALUEFORM yields nil, evaluate ELSE sequentially and return the -value of the last form; or if there are no ELSE forms return nil. The -bindings from VARLIST do _not_ extend to the ELSE forms. - -\(fn VARLIST THEN [ELSE...])" - (declare (indent 2) - (debug ((&rest (symbolp form)) form body))) - (pcase-let ((`(,varlist ,lastvar) - (cond-let--prepare-varlist varlist)) - (tag (gensym ":if-let*"))) - `(catch ',tag - (let* ,varlist - (when ,lastvar - (throw ',tag ,then))) - ,@else))) - -(defmacro cond-let--if-let (varlist then &rest else) - "Bind variables according to VARLIST and evaluate THEN or ELSE. - -Each element of VARLIST is a list (SYMBOL VALUEFORM), which binds SYMBOL -to the value of VALUEFORM. Evaluate all VALUEFORMs before binding their -respective SYMBOLs (as for `let'). - -If all VALUEFORMs yield non-nil, evaluate THEN with VARLIST's bindings -in effect, and return its value. THEN must be one expression. - -If any VALUEFORM yields nil, evaluate ELSE sequentially and return the -value of the last form; or if there are no ELSE forms return nil. The -bindings from VARLIST do _not_ extend to the ELSE forms. - -\(fn VARLIST THEN [ELSE...])" - (declare (indent 2) (debug cond-let--if-let*)) - (pcase-let* ((`(,anon ,set ,bind ,_) - (cond-let--prepare-varforms varlist t)) - (set (if (length= set 1) (car set) (cons 'and set)))) - `(let ,anon - (if ,set - (let ,bind - ,then) - ,@else)))) - -;;; When - -(defmacro cond-let--when-let* (varlist bodyform &rest body) - "Bind variables according to VARLIST and conditionally evaluate BODY. - -Each element of VARLIST is a list (SYMBOL VALUEFORM), which binds SYMBOL -to the value of VALUEFORM. Each VALUEFORM can refer to symbols already -bound by this VARLIST (as for `let*'). - -If all VALUEFORMs yield non-nil, evaluate BODY forms sequentially, with -VARLIST's bindings in effect, and return the value of the last form. - -If any VALUEFORM yields nil, evaluate neither the remaining VALUEFORMs -nor the BODY forms, and instead return nil. - -BODY must be one or more expressions. If VARLIST is empty, do nothing -and return nil. - -\(fn VARLIST BODY...)" - (declare (indent 1) - (debug ((&rest (symbolp form)) form body))) - (pcase-let ((`(,varlist ,lastvar) - (cond-let--prepare-varlist varlist))) - `(let* ,varlist - (when ,lastvar - ,bodyform ,@body)))) - -(defmacro cond-let--when-let (varlist bodyform &rest body) - "Bind variables according to VARLIST and conditionally evaluate BODY. - -Each element of VARLIST is a list (SYMBOL VALUEFORM), which binds SYMBOL -to the value of VALUEFORM. Evaluate all VALUEFORMs before binding their -respective SYMBOLs (as for `let'). - -If all VALUEFORMs yield non-nil, evaluate BODY forms sequentially, with -VARLIST's bindings in effect, and return the value of the last form. - -If any VALUEFORM yields nil, evaluate neither the remaining VALUEFORMs -nor the BODY forms, and instead return nil. - -BODY must be one or more expressions. If VARLIST is empty, do nothing -and return nil. - -\(fn VARLIST BODY...)" - (declare (indent 1) (debug cond-let--when-let*)) - (pcase-let ((`(,anon ,set ,bind ,lastvar) - (cond-let--prepare-varforms varlist))) - (cond (anon - `(let ,anon - (when (and ,@set) - (let ,bind - ,bodyform ,@body)))) - (t - `(let ,bind - (when ,lastvar - ,bodyform ,@body)))))) - -(defmacro cond-let--when$ (varform bodyform &rest body) - "Bind variable `$' to value of VARFORM and conditionally evaluate BODY. - -If VARFORM yields a non-nil value, bind the symbol `$' to that value, -evaluate BODY with that binding in effect, and return the value of the -last form. If VARFORM yields nil, do not evaluate BODY, and return nil. -BODY must be one or more expressions. If VARLIST is empty, do nothing -and return nil. - -\(fn VARLIST BODY...)" - (declare (debug (form form))) - `(let (($ ,varform)) - (when $ - ,bodyform ,@body))) - -;;; While - -(defmacro cond-let--while-let* (varlist &rest body) - "Bind variables according to VARLIST, conditionally evaluate BODY, and repeat. - -Each element of VARLIST is a list (SYMBOL VALUEFORM), which binds SYMBOL -to the value of VALUEFORM. Each VALUEFORM can refer to symbols already -bound by this VARLIST (as for `let*'). - -If all VALUEFORMs yield non-nil, evaluate BODY forms sequentially, with -VARLIST's bindings in effect, and repeat the loop. - -If any VALUEFORM yields nil, evaluate neither the remaining VALUEFORMs -nor the BODY forms, and instead return, always yielding nil. - -BODY can be zero or more expressions. - -\(fn VARLIST [BODY...])" - (declare (indent 1) (debug cond-let--if-let*)) - (pcase-let ((`(,varlist ,lastvar) - (cond-let--prepare-varlist varlist)) - (tag (gensym ":while-let*"))) - `(catch ',tag - (while t - (let* ,varlist - (if ,lastvar - ,(macroexp-progn body) - (throw ',tag nil))))))) - -(defmacro cond-let--while-let (varlist bodyform &rest body) - "Bind variables according to VARLIST, conditionally evaluate BODY, and repeat. - -Each element of VARLIST is a list (SYMBOL VALUEFORM), which binds SYMBOL -to the value of VALUEFORM. Evaluate all VALUEFORMs before binding their -respective SYMBOLs (as for `let'). - -If all VALUEFORMs yield non-nil, evaluate BODY forms sequentially, with -VARLIST's bindings in effect, and repeat the loop. - -If any VALUEFORM yields nil, evaluate neither the remaining VALUEFORMs -nor the BODY forms, and instead return, always yielding nil. - -BODY can be one or more expressions. - -\(fn VARLIST BODY...)" - (declare (indent 1) (debug cond-let--if-let*)) - (pcase-let ((`(,anon ,set ,bind ,lastvar) - (cond-let--prepare-varforms varlist)) - (tag (gensym ":while-let"))) - (cond (anon - `(catch ',tag - (while t - (let ,anon - (if (and ,@set) - (let ,bind - ,bodyform ,@body) - (throw ',tag nil)))))) - (t - `(catch ',tag - (while t - (let ,bind - (if ,lastvar - ,(macroexp-progn (cons bodyform body)) - (throw ',tag nil))))))))) - -;;; Font-Lock - -(defvar cond-let-font-lock-keywords - '(("\\_<\\$\\_>" 0 'font-lock-variable-name-face)) - "Highlight `$' using `font-lock-variable-name-face'. -To add these keywords, add this to your configuration: -\(font-lock-add-keywords \\='emacs-lisp-mode cond-let-font-lock-keywords t)") - -(provide 'cond-let) -;;; cond-let.el ends here diff --git a/elpa/dash-2.20.0/dash-autoloads.el b/elpa/dash-2.20.0/dash-autoloads.el deleted file mode 100644 index 3d8c46f..0000000 --- a/elpa/dash-2.20.0/dash-autoloads.el +++ /dev/null @@ -1,83 +0,0 @@ -;;; dash-autoloads.el --- automatically extracted autoloads (do not edit) -*- lexical-binding: t -*- -;; Generated by the `loaddefs-generate' function. - -;; This file is part of GNU Emacs. - -;;; Code: - -(add-to-list 'load-path (or (and load-file-name (directory-file-name (file-name-directory load-file-name))) (car load-path))) - - - -;;; Generated autoloads from dash.el - -(autoload 'dash-fontify-mode "dash" "\ -Toggle fontification of Dash special variables. - -Dash-Fontify mode is a buffer-local minor mode intended for Emacs -Lisp buffers. Enabling it causes the special variables bound in -anaphoric Dash macros to be fontified. These anaphoras include -`it', `it-index', `acc', and `other'. In older Emacs versions -which do not dynamically detect macros, Dash-Fontify mode -additionally fontifies Dash macro calls. - -See also `dash-fontify-mode-lighter' and -`global-dash-fontify-mode'. - -This is a minor mode. If called interactively, toggle the `Dash-Fontify -mode' mode. If the prefix argument is positive, enable the mode, and if -it is zero or negative, disable the mode. - -If called from Lisp, toggle the mode if ARG is `toggle'. Enable the -mode if ARG is nil, omitted, or is a positive number. Disable the mode -if ARG is a negative number. - -To check whether the minor mode is enabled in the current buffer, -evaluate the variable `dash-fontify-mode'. - -The mode's hook is called both when the mode is enabled and when it is -disabled. - -(fn &optional ARG)" t) -(put 'global-dash-fontify-mode 'globalized-minor-mode t) -(defvar global-dash-fontify-mode nil "\ -Non-nil if Global Dash-Fontify mode is enabled. -See the `global-dash-fontify-mode' command -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-dash-fontify-mode'.") -(custom-autoload 'global-dash-fontify-mode "dash" nil) -(autoload 'global-dash-fontify-mode "dash" "\ -Toggle Dash-Fontify mode in all buffers. -With prefix ARG, enable Global Dash-Fontify mode if ARG is positive; -otherwise, disable it. - -If called from Lisp, toggle the mode if ARG is `toggle'. -Enable the mode if ARG is nil, omitted, or is a positive number. -Disable the mode if ARG is a negative number. - -Dash-Fontify mode is enabled in all buffers where -`dash--turn-on-fontify-mode' would do it. - -See `dash-fontify-mode' for more information on Dash-Fontify mode. - -(fn &optional ARG)" t) -(autoload 'dash-register-info-lookup "dash" "\ -Register the Dash Info manual with `info-lookup-symbol'. -This allows Dash symbols to be looked up with \\[info-lookup-symbol]." t) -(register-definition-prefixes "dash" '("!cdr" "!cons" "--" "->" "-a" "-butlast" "-c" "-d" "-e" "-f" "-gr" "-i" "-juxt" "-keep" "-l" "-m" "-no" "-o" "-p" "-r" "-s" "-t" "-u" "-value-to-list" "-when-let" "-zip" "dash-")) - -;;; End of scraped data - -(provide 'dash-autoloads) - -;; Local Variables: -;; version-control: never -;; no-byte-compile: t -;; no-update-autoloads: t -;; no-native-compile: t -;; coding: utf-8-emacs-unix -;; End: - -;;; dash-autoloads.el ends here diff --git a/elpa/dash-2.20.0/dash-pkg.el b/elpa/dash-2.20.0/dash-pkg.el deleted file mode 100644 index 933285c..0000000 --- a/elpa/dash-2.20.0/dash-pkg.el +++ /dev/null @@ -1,10 +0,0 @@ -;; -*- no-byte-compile: t; lexical-binding: nil -*- -(define-package "dash" "2.20.0" - "A modern list library for Emacs." - '((emacs "24")) - :url "https://github.com/magnars/dash.el" - :commit "fcb5d831fc08a43f984242c7509870f30983c27c" - :revdesc "2.20.0-0-gfcb5d831fc08" - :keywords '("extensions" "lisp") - :authors '(("Magnar Sveen" . "magnars@gmail.com")) - :maintainers '(("Basil L. Contovounesios" . "basil@contovou.net"))) diff --git a/elpa/dash-2.20.0/dash.el b/elpa/dash-2.20.0/dash.el deleted file mode 100644 index 07638c9..0000000 --- a/elpa/dash-2.20.0/dash.el +++ /dev/null @@ -1,4165 +0,0 @@ -;;; dash.el --- A modern list library for Emacs -*- lexical-binding: t -*- - -;; Copyright (C) 2012-2025 Free Software Foundation, Inc. - -;; Author: Magnar Sveen -;; Maintainer: Basil L. Contovounesios -;; Package-Version: 2.20.0 -;; Package-Revision: 2.20.0-0-gfcb5d831fc08 -;; Package-Requires: ((emacs "24")) -;; Keywords: extensions, lisp -;; URL: https://github.com/magnars/dash.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: - -;; A modern list API for Emacs. -;; -;; See its overview at https://github.com/magnars/dash.el#functions. - -;;; Code: - -(eval-when-compile - (unless (fboundp 'static-if) - (defmacro static-if (condition then-form &rest else-forms) - "Expand to THEN-FORM or ELSE-FORMS based on compile-time CONDITION. -Polyfill for Emacs 30 `static-if'." - (declare (debug (sexp sexp &rest sexp)) (indent 2)) - (if (eval condition lexical-binding) - then-form - (cons 'progn else-forms)))) - - ;; TODO: Emacs 24.3 first introduced `gv', so remove this and all - ;; calls to `defsetf' when support for earlier versions is dropped. - (unless (fboundp 'gv-define-setter) - (require 'cl)) - - ;; - 24.3 started complaining about unknown `declare' props. - ;; - 25 introduced `pure' and `side-effect-free'. - ;; - 30 introduced `important-return-value'. - (when (boundp 'defun-declarations-alist) - (dolist (prop '(important-return-value pure side-effect-free)) - (unless (assq prop defun-declarations-alist) - (push (list prop #'ignore) defun-declarations-alist))))) - -(defgroup dash () - "Customize group for Dash, a modern list library." - :group 'extensions - :group 'lisp - :prefix "dash-") - -(defmacro !cons (car cdr) - "Destructive: Set CDR to the cons of CAR and CDR." - (declare (debug (form symbolp))) - `(setq ,cdr (cons ,car ,cdr))) - -(defmacro !cdr (list) - "Destructive: Set LIST to the cdr of LIST." - (declare (debug (symbolp))) - `(setq ,list (cdr ,list))) - -(defmacro --each (list &rest body) - "Evaluate BODY for each element of LIST and return nil. -Each element of LIST in turn is bound to `it' and its index -within LIST to `it-index' before evaluating BODY. -This is the anaphoric counterpart to `-each'." - (declare (debug (form body)) (indent 1)) - (let ((l (make-symbol "list")) - (i (make-symbol "i"))) - `(let ((,l ,list) - (,i 0)) - (while ,l - (let ((it (pop ,l)) (it-index ,i)) - (ignore it it-index) - ,@body) - (setq ,i (1+ ,i)))))) - -(defun -each (list fn) - "Call FN on each element of LIST. -Return nil; this function is intended for side effects. - -Its anaphoric counterpart is `--each'. - -For access to the current element's index in LIST, see -`-each-indexed'." - (declare (indent 1)) - (ignore (mapc fn list))) - -(defalias '--each-indexed '--each) - -(defun -each-indexed (list fn) - "Call FN on each index and element of LIST. -For each ITEM at INDEX in LIST, call (funcall FN INDEX ITEM). -Return nil; this function is intended for side effects. - -See also: `-map-indexed'." - (declare (indent 1)) - (--each list (funcall fn it-index it))) - -(defmacro --each-while (list pred &rest body) - "Evaluate BODY for each item in LIST, while PRED evaluates to non-nil. -Each element of LIST in turn is bound to `it' and its index -within LIST to `it-index' before evaluating PRED or BODY. Once -an element is reached for which PRED evaluates to nil, no further -BODY is evaluated. The return value is always nil. -This is the anaphoric counterpart to `-each-while'." - (declare (debug (form form body)) (indent 2)) - (let ((l (make-symbol "list")) - (i (make-symbol "i")) - (elt (make-symbol "elt"))) - `(let ((,l ,list) - (,i 0) - ,elt) - (while (when ,l - (setq ,elt (car-safe ,l)) - (let ((it ,elt) (it-index ,i)) - (ignore it it-index) - ,pred)) - (let ((it ,elt) (it-index ,i)) - (ignore it it-index) - ,@body) - (setq ,i (1+ ,i) ,l (cdr ,l)))))) - -(defun -each-while (list pred fn) - "Call FN on each ITEM in LIST, while (PRED ITEM) is non-nil. -Once an ITEM is reached for which PRED returns nil, FN is no -longer called. Return nil; this function is intended for side -effects. - -Its anaphoric counterpart is `--each-while'." - (declare (indent 2)) - (--each-while list (funcall pred it) (funcall fn it))) - -(defmacro --each-r (list &rest body) - "Evaluate BODY for each element of LIST in reversed order. -Each element of LIST in turn, starting at its end, is bound to -`it' and its index within LIST to `it-index' before evaluating -BODY. The return value is always nil. -This is the anaphoric counterpart to `-each-r'." - (declare (debug (form body)) (indent 1)) - (let ((v (make-symbol "vector")) - (i (make-symbol "i"))) - ;; Implementation note: building a vector is considerably faster - ;; than building a reversed list (vector takes less memory, so - ;; there is less GC), plus `length' comes naturally. In-place - ;; `nreverse' would be faster still, but BODY would be able to see - ;; that, even if the modification was undone before we return. - `(let* ((,v (vconcat ,list)) - (,i (length ,v)) - it it-index) - (ignore it it-index) - (while (> ,i 0) - (setq ,i (1- ,i) it-index ,i it (aref ,v ,i)) - ,@body)))) - -(defun -each-r (list fn) - "Call FN on each element of LIST in reversed order. -Return nil; this function is intended for side effects. - -Its anaphoric counterpart is `--each-r'." - (--each-r list (funcall fn it))) - -(defmacro --each-r-while (list pred &rest body) - "Eval BODY for each item in reversed LIST, while PRED evals to non-nil. -Each element of LIST in turn, starting at its end, is bound to -`it' and its index within LIST to `it-index' before evaluating -PRED or BODY. Once an element is reached for which PRED -evaluates to nil, no further BODY is evaluated. The return value -is always nil. -This is the anaphoric counterpart to `-each-r-while'." - (declare (debug (form form body)) (indent 2)) - (let ((v (make-symbol "vector")) - (i (make-symbol "i")) - (elt (make-symbol "elt"))) - `(let* ((,v (vconcat ,list)) - (,i (length ,v)) - ,elt it it-index) - (ignore it it-index) - (while (when (> ,i 0) - (setq ,i (1- ,i) it-index ,i) - (setq ,elt (aref ,v ,i) it ,elt) - ,pred) - (setq it-index ,i it ,elt) - ,@body)))) - -(defun -each-r-while (list pred fn) - "Call FN on each ITEM in reversed LIST, while (PRED ITEM) is non-nil. -Once an ITEM is reached for which PRED returns nil, FN is no -longer called. Return nil; this function is intended for side -effects. - -Its anaphoric counterpart is `--each-r-while'." - (--each-r-while list (funcall pred it) (funcall fn it))) - -(defmacro --dotimes (num &rest body) - "Evaluate BODY NUM times, presumably for side effects. -BODY is evaluated with the local variable `it' temporarily bound -to successive integers running from 0, inclusive, to NUM, -exclusive. BODY is not evaluated if NUM is less than 1. -This is the anaphoric counterpart to `-dotimes'." - (declare (debug (form body)) (indent 1)) - (let ((n (make-symbol "num")) - (i (make-symbol "i"))) - `(let ((,n ,num) - (,i 0) - it) - (ignore it) - (while (< ,i ,n) - (setq it ,i ,i (1+ ,i)) - ,@body)))) - -(defun -dotimes (num fn) - "Call FN NUM times, presumably for side effects. -FN is called with a single argument on successive integers -running from 0, inclusive, to NUM, exclusive. FN is not called -if NUM is less than 1. - -This function's anaphoric counterpart is `--dotimes'." - (declare (indent 1)) - (--dotimes num (funcall fn it))) - -(defun -map (fn list) - "Apply FN to each item in LIST and return the list of results. - -This function's anaphoric counterpart is `--map'." - (declare (important-return-value t)) - (mapcar fn list)) - -(defmacro --map (form list) - "Eval FORM for each item in LIST and return the list of results. -Each element of LIST in turn is bound to `it' before evaluating -FORM. -This is the anaphoric counterpart to `-map'." - (declare (debug (def-form form))) - `(mapcar (lambda (it) (ignore it) ,form) ,list)) - -(defmacro --reduce-from (form init list) - "Accumulate a value by evaluating FORM across LIST. -This macro is like `--each' (which see), but it additionally -provides an accumulator variable `acc' which it successively -binds to the result of evaluating FORM for the current LIST -element before processing the next element. For the first -element, `acc' is initialized with the result of evaluating INIT. -The return value is the resulting value of `acc'. If LIST is -empty, FORM is not evaluated, and the return value is the result -of INIT. -This is the anaphoric counterpart to `-reduce-from'." - (declare (debug (form form form))) - `(let ((acc ,init)) - (--each ,list (setq acc ,form)) - acc)) - -(defun -reduce-from (fn init list) - "Reduce the function FN across LIST, starting with INIT. -Return the result of applying FN to INIT and the first element of -LIST, then applying FN to that result and the second element, -etc. If LIST is empty, return INIT without calling FN. - -This function's anaphoric counterpart is `--reduce-from'. - -For other folds, see also `-reduce' and `-reduce-r'." - (declare (important-return-value t)) - (--reduce-from (funcall fn acc it) init list)) - -(defmacro --reduce (form list) - "Accumulate a value by evaluating FORM across LIST. -This macro is like `--reduce-from' (which see), except the first -element of LIST is taken as INIT. Thus if LIST contains a single -item, it is returned without evaluating FORM. If LIST is empty, -FORM is evaluated with `it' and `acc' bound to nil. -This is the anaphoric counterpart to `-reduce'." - (declare (debug (form form))) - (let ((lv (make-symbol "list-value"))) - `(let ((,lv ,list)) - (if ,lv - (--reduce-from ,form (car ,lv) (cdr ,lv)) - ;; Explicit nil binding pacifies lexical "variable left uninitialized" - ;; warning. See issue #377 and upstream https://bugs.gnu.org/47080. - (let ((acc nil) (it nil)) - (ignore acc it) - ,form))))) - -(defun -reduce (fn list) - "Reduce the function FN across LIST. -Return the result of applying FN to the first two elements of -LIST, then applying FN to that result and the third element, etc. -If LIST contains a single element, return it without calling FN. -If LIST is empty, return the result of calling FN with no -arguments. - -This function's anaphoric counterpart is `--reduce'. - -For other folds, see also `-reduce-from' and `-reduce-r'." - (declare (important-return-value t)) - (if list - (-reduce-from fn (car list) (cdr list)) - (funcall fn))) - -(defmacro --reduce-r-from (form init list) - "Accumulate a value by evaluating FORM across LIST in reverse. -This macro is like `--reduce-from', except it starts from the end -of LIST. -This is the anaphoric counterpart to `-reduce-r-from'." - (declare (debug (form form form))) - `(let ((acc ,init)) - (--each-r ,list (setq acc ,form)) - acc)) - -(defun -reduce-r-from (fn init list) - "Reduce the function FN across LIST in reverse, starting with INIT. -Return the result of applying FN to the last element of LIST and -INIT, then applying FN to the second-to-last element and the -previous result of FN, etc. That is, the first argument of FN is -the current element, and its second argument the accumulated -value. If LIST is empty, return INIT without calling FN. - -This function is like `-reduce-from' but the operation associates -from the right rather than left. In other words, it starts from -the end of LIST and flips the arguments to FN. Conceptually, it -is like replacing the conses in LIST with applications of FN, and -its last link with INIT, and evaluating the resulting expression. - -This function's anaphoric counterpart is `--reduce-r-from'. - -For other folds, see also `-reduce-r' and `-reduce'." - (declare (important-return-value t)) - (--reduce-r-from (funcall fn it acc) init list)) - -(defmacro --reduce-r (form list) - "Accumulate a value by evaluating FORM across LIST in reverse order. -This macro is like `--reduce', except it starts from the end of -LIST. -This is the anaphoric counterpart to `-reduce-r'." - (declare (debug (form form))) - `(--reduce ,form (reverse ,list))) - -(defun -reduce-r (fn list) - "Reduce the function FN across LIST in reverse. -Return the result of applying FN to the last two elements of -LIST, then applying FN to the third-to-last element and the -previous result of FN, etc. That is, the first argument of FN is -the current element, and its second argument the accumulated -value. If LIST contains a single element, return it without -calling FN. If LIST is empty, return the result of calling FN -with no arguments. - -This function is like `-reduce' but the operation associates from -the right rather than left. In other words, it starts from the -end of LIST and flips the arguments to FN. Conceptually, it is -like replacing the conses in LIST with applications of FN, -ignoring its last link, and evaluating the resulting expression. - -This function's anaphoric counterpart is `--reduce-r'. - -For other folds, see also `-reduce-r-from' and `-reduce'." - (declare (important-return-value t)) - (if list - (--reduce-r (funcall fn it acc) list) - (funcall fn))) - -(defmacro --reductions-from (form init list) - "Return a list of FORM's intermediate reductions across LIST. -That is, a list of the intermediate values of the accumulator -when `--reduce-from' (which see) is called with the same -arguments. -This is the anaphoric counterpart to `-reductions-from'." - (declare (debug (form form form))) - `(nreverse - (--reduce-from (cons (let ((acc (car acc))) (ignore acc) ,form) acc) - (list ,init) - ,list))) - -(defun -reductions-from (fn init list) - "Return a list of FN's intermediate reductions across LIST. -That is, a list of the intermediate values of the accumulator -when `-reduce-from' (which see) is called with the same -arguments. - -This function's anaphoric counterpart is `--reductions-from'. - -For other folds, see also `-reductions' and `-reductions-r'." - (declare (important-return-value t)) - (--reductions-from (funcall fn acc it) init list)) - -(defmacro --reductions (form list) - "Return a list of FORM's intermediate reductions across LIST. -That is, a list of the intermediate values of the accumulator -when `--reduce' (which see) is called with the same arguments. -This is the anaphoric counterpart to `-reductions'." - (declare (debug (form form))) - (let ((lv (make-symbol "list-value"))) - `(let ((,lv ,list)) - (if ,lv - (--reductions-from ,form (car ,lv) (cdr ,lv)) - ;; Explicit nil binding pacifies lexical "variable left uninitialized" - ;; warning. See issue #377 and upstream https://bugs.gnu.org/47080. - (let ((acc nil) (it nil)) - (ignore acc it) - (list ,form)))))) - -(defun -reductions (fn list) - "Return a list of FN's intermediate reductions across LIST. -That is, a list of the intermediate values of the accumulator -when `-reduce' (which see) is called with the same arguments. - -This function's anaphoric counterpart is `--reductions'. - -For other folds, see also `-reductions' and `-reductions-r'." - (declare (important-return-value t)) - (if list - (--reductions-from (funcall fn acc it) (car list) (cdr list)) - (list (funcall fn)))) - -(defmacro --reductions-r-from (form init list) - "Return a list of FORM's intermediate reductions across reversed LIST. -That is, a list of the intermediate values of the accumulator -when `--reduce-r-from' (which see) is called with the same -arguments. -This is the anaphoric counterpart to `-reductions-r-from'." - (declare (debug (form form form))) - `(--reduce-r-from (cons (let ((acc (car acc))) (ignore acc) ,form) acc) - (list ,init) - ,list)) - -(defun -reductions-r-from (fn init list) - "Return a list of FN's intermediate reductions across reversed LIST. -That is, a list of the intermediate values of the accumulator -when `-reduce-r-from' (which see) is called with the same -arguments. - -This function's anaphoric counterpart is `--reductions-r-from'. - -For other folds, see also `-reductions' and `-reductions-r'." - (declare (important-return-value t)) - (--reductions-r-from (funcall fn it acc) init list)) - -(defmacro --reductions-r (form list) - "Return a list of FORM's intermediate reductions across reversed LIST. -That is, a list of the intermediate values of the accumulator -when `--reduce-re' (which see) is called with the same arguments. -This is the anaphoric counterpart to `-reductions-r'." - (declare (debug (form list))) - (let ((lv (make-symbol "list-value"))) - `(let ((,lv (reverse ,list))) - (if ,lv - (--reduce-from (cons (let ((acc (car acc))) (ignore acc) ,form) acc) - (list (car ,lv)) - (cdr ,lv)) - ;; Explicit nil binding pacifies lexical "variable left uninitialized" - ;; warning. See issue #377 and upstream https://bugs.gnu.org/47080. - (let ((acc nil) (it nil)) - (ignore acc it) - (list ,form)))))) - -(defun -reductions-r (fn list) - "Return a list of FN's intermediate reductions across reversed LIST. -That is, a list of the intermediate values of the accumulator -when `-reduce-r' (which see) is called with the same arguments. - -This function's anaphoric counterpart is `--reductions-r'. - -For other folds, see also `-reductions-r-from' and -`-reductions'." - (declare (important-return-value t)) - (if list - (--reductions-r (funcall fn it acc) list) - (list (funcall fn)))) - -(defmacro --filter (form list) - "Return a new list of the items in LIST for which FORM evals to non-nil. -Each element of LIST in turn is bound to `it' and its index -within LIST to `it-index' before evaluating FORM. -This is the anaphoric counterpart to `-filter'. -For the opposite operation, see also `--remove'." - (declare (debug (form form))) - (let ((r (make-symbol "result"))) - `(let (,r) - (--each ,list (when ,form (push it ,r))) - (nreverse ,r)))) - -(defun -filter (pred list) - "Return a new list of the items in LIST for which PRED returns non-nil. - -Alias: `-select'. - -This function's anaphoric counterpart is `--filter'. - -For similar operations, see also `-keep' and `-remove'." - (declare (important-return-value t)) - (--filter (funcall pred it) list)) - -(defalias '-select '-filter) -(defalias '--select '--filter) - -(defmacro --remove (form list) - "Return a new list of the items in LIST for which FORM evals to nil. -Each element of LIST in turn is bound to `it' and its index -within LIST to `it-index' before evaluating FORM. -This is the anaphoric counterpart to `-remove'. -For the opposite operation, see also `--filter'." - (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'. - -This function's anaphoric counterpart is `--remove'. - -For similar operations, see also `-keep' and `-filter'." - (declare (important-return-value t)) - (--remove (funcall pred it) list)) - -(defalias '-reject '-remove) -(defalias '--reject '--remove) - -(defmacro --remove-first (form list) - "Remove the first item from LIST for which FORM evals to non-nil. -Each element of LIST in turn is bound to `it' and its index -within LIST to `it-index' before evaluating FORM. This is a -non-destructive operation, but only the front of LIST leading up -to the removed item is a copy; the rest is LIST's original tail. -If no item is removed, then the result is a complete copy. -This is the anaphoric counterpart to `-remove-first'." - (declare (debug (form form))) - (let ((front (make-symbol "front")) - (tail (make-symbol "tail"))) - `(let ((,tail ,list) ,front) - (--each-while ,tail (not ,form) - (push (pop ,tail) ,front)) - (if ,tail - (nconc (nreverse ,front) (cdr ,tail)) - (nreverse ,front))))) - -(defun -remove-first (pred list) - "Remove the first item from LIST for which PRED returns non-nil. -This is a non-destructive operation, but only the front of LIST -leading up to the removed item is a copy; the rest is LIST's -original tail. If no item is removed, then the result is a -complete copy. - -Alias: `-reject-first'. - -This function's anaphoric counterpart is `--remove-first'. - -See also `-map-first', `-remove-item', and `-remove-last'." - (declare (important-return-value t)) - (--remove-first (funcall pred it) list)) - -;; TODO: #'-quoting the macro upsets Emacs 24. -(defalias '-reject-first #'-remove-first) -(defalias '--reject-first '--remove-first) - -(defmacro --remove-last (form list) - "Remove the last item from LIST for which FORM evals to non-nil. -Each element of LIST in turn is bound to `it' before evaluating -FORM. The result is a copy of LIST regardless of whether an -element is removed. -This is the anaphoric counterpart to `-remove-last'." - (declare (debug (form form))) - `(nreverse (--remove-first ,form (reverse ,list)))) - -(defun -remove-last (pred list) - "Remove the last item from LIST for which PRED returns non-nil. -The result is a copy of LIST regardless of whether an element is -removed. - -Alias: `-reject-last'. - -This function's anaphoric counterpart is `--remove-last'. - -See also `-map-last', `-remove-item', and `-remove-first'." - (declare (important-return-value t)) - (--remove-last (funcall pred it) list)) - -(defalias '-reject-last '-remove-last) -(defalias '--reject-last '--remove-last) - -(defalias '-remove-item #'remove - "Return a copy of LIST with all occurrences of ITEM removed. -The comparison is done with `equal'. -\n(fn ITEM LIST)") - -(defmacro --keep (form list) - "Eval FORM for each item in LIST and return the non-nil results. -Like `--filter', but returns the non-nil results of FORM instead -of the corresponding elements of LIST. Each element of LIST in -turn is bound to `it' and its index within LIST to `it-index' -before evaluating FORM. -This is the anaphoric counterpart to `-keep'." - (declare (debug (form form))) - (let ((r (make-symbol "result")) - (m (make-symbol "mapped"))) - `(let (,r) - (--each ,list (let ((,m ,form)) (when ,m (push ,m ,r)))) - (nreverse ,r)))) - -(defun -keep (fn list) - "Return a new list of the non-nil results of applying FN to each item in LIST. -Like `-filter', but returns the non-nil results of FN instead of -the corresponding elements of LIST. - -Its anaphoric counterpart is `--keep'." - (declare (important-return-value t)) - (--keep (funcall fn it) list)) - -(defun -non-nil (list) - "Return a copy of LIST with all nil items removed." - (declare (side-effect-free t)) - (--filter it list)) - -(defmacro --map-indexed (form list) - "Eval FORM for each item in LIST and return the list of results. -Each element of LIST in turn is bound to `it' and its index -within LIST to `it-index' before evaluating FORM. This is like -`--map', but additionally makes `it-index' available to FORM. - -This is the anaphoric counterpart to `-map-indexed'." - (declare (debug (form form))) - (let ((r (make-symbol "result"))) - `(let (,r) - (--each ,list - (push ,form ,r)) - (nreverse ,r)))) - -(defun -map-indexed (fn list) - "Apply FN to each index and item in LIST and return the list of results. -This is like `-map', but FN takes two arguments: the index of the -current element within LIST, and the element itself. - -This function's anaphoric counterpart is `--map-indexed'. - -For a side-effecting variant, see also `-each-indexed'." - (declare (important-return-value t)) - (--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) - "Use PRED to conditionally apply REP to each item in LIST. -Return a copy of LIST where the items for which PRED returns nil -are unchanged, and the rest are mapped through the REP function. - -Alias: `-replace-where' - -See also: `-update-at'" - (declare (important-return-value t)) - (--map-when (funcall pred it) (funcall rep it) list)) - -(defalias '-replace-where '-map-when) -(defalias '--replace-where '--map-when) - -(defun -map-first (pred rep list) - "Use PRED to determine the first item in LIST to call REP on. -Return a copy of LIST where the first item for which PRED returns -non-nil is replaced with the result of calling REP on that item. - -See also: `-map-when', `-replace-first'" - (declare (important-return-value t)) - (let (front) - (while (and list (not (funcall pred (car list)))) - (push (car list) front) - (!cdr list)) - (if list - (-concat (nreverse front) (cons (funcall rep (car list)) (cdr list))) - (nreverse front)))) - -(defmacro --map-first (pred rep list) - "Anaphoric form of `-map-first'." - (declare (debug (def-form def-form form))) - `(-map-first (lambda (it) (ignore it) ,pred) - (lambda (it) (ignore it) ,rep) - ,list)) - -(defun -map-last (pred rep list) - "Use PRED to determine the last item in LIST to call REP on. -Return a copy of LIST where the last item for which PRED returns -non-nil is replaced with the result of calling REP on that item. - -See also: `-map-when', `-replace-last'" - (declare (important-return-value t)) - (nreverse (-map-first pred rep (reverse list)))) - -(defmacro --map-last (pred rep list) - "Anaphoric form of `-map-last'." - (declare (debug (def-form def-form form))) - `(-map-last (lambda (it) (ignore it) ,pred) - (lambda (it) (ignore it) ,rep) - ,list)) - -(defun -replace (old new list) - "Replace all OLD items in LIST with NEW. - -Elements are compared using `equal'. - -See also: `-replace-at'" - (declare (pure t) (side-effect-free t)) - (--map-when (equal it old) new list)) - -(defun -replace-first (old new list) - "Replace the first occurrence of OLD with NEW in LIST. - -Elements are compared using `equal'. - -See also: `-map-first'" - (declare (pure t) (side-effect-free t)) - (--map-first (equal old it) new list)) - -(defun -replace-last (old new list) - "Replace the last occurrence of OLD with NEW in LIST. - -Elements are compared using `equal'. - -See also: `-map-last'" - (declare (pure t) (side-effect-free t)) - (--map-last (equal old it) new list)) - -(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." - (declare (important-return-value t)) - (--mapcat (funcall fn it) list)) - -(defmacro --iterate (form init n) - "Anaphoric version of `-iterate'." - (declare (debug (form form form))) - (let ((res (make-symbol "result")) - (len (make-symbol "n"))) - `(let ((,len ,n)) - (when (> ,len 0) - (let* ((it ,init) - (,res (list it))) - (dotimes (_ (1- ,len)) - (push (setq it ,form) ,res)) - (nreverse ,res)))))) - -(defun -iterate (fun init n) - "Return a list of iterated applications of FUN to INIT. - -This means a list of the form: - - (INIT (FUN INIT) (FUN (FUN INIT)) ...) - -N is the length of the returned list." - (declare (important-return-value t)) - (--iterate (funcall fun it) init n)) - -(defun -flatten (l) - "Take a nested list L and return its contents as a single, flat list. - -Note that because nil represents a list of zero elements (an -empty list), any mention of nil in L will disappear after -flattening. If you need to preserve nils, consider `-flatten-n' -or map them to some unique symbol and then map them back. - -Conses of two atoms are considered \"terminals\", that is, they -aren't flattened further. - -See also: `-flatten-n'" - (declare (pure t) (side-effect-free t)) - (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'" - (declare (pure t) (side-effect-free t)) - (dotimes (_ num) - (setq list (apply #'append (mapcar #'-list list)))) - list) - -(defalias '-concat #'append - "Concatenate all SEQUENCES and make the result a list. -The result is a list whose elements are the elements of all the arguments. -Each argument may be a list, vector or string. - -All arguments except the last argument are copied. The last argument -is just used as the tail of the new list. If the last argument is not -a list, this results in a dotted list. - -As an exception, if all the arguments except the last are nil, and the -last argument is not a list, the return value is that last argument -unaltered, not a list. - -\(fn &rest SEQUENCES)") - -(defalias '-copy #'copy-sequence - "Create a shallow copy of LIST. -The elements of LIST are not copied; they are shared with the original. -\n(fn LIST)") - -(defmacro --splice (pred form list) - "Splice lists generated by FORM in place of items satisfying PRED in LIST. - -Evaluate PRED for each element of LIST in turn bound to `it'. -Whenever the result of PRED is nil, leave that `it' is-is. -Otherwise, evaluate FORM with the same `it' binding still in -place. The result should be a (possibly empty) list of items to -splice in place of `it' in LIST. - -This can be useful as an alternative to the `,@' construct in a -`\\=`' structure, in case you need to splice several lists at -marked positions (for example with keywords). - -This is the anaphoric counterpart to `-splice'." - (declare (debug (form form form))) - (let ((r (make-symbol "result"))) - `(let (,r) - (--each ,list - (if ,pred - (--each ,form (push it ,r)) - (push it ,r))) - (nreverse ,r)))) - -(defun -splice (pred fun list) - "Splice lists generated by FUN in place of items satisfying PRED in LIST. - -Call PRED on each element of LIST. Whenever the result of PRED -is nil, leave that `it' as-is. Otherwise, call FUN on the same -`it' that satisfied PRED. The result should be a (possibly -empty) list of items to splice in place of `it' in LIST. - -This can be useful as an alternative to the `,@' construct in a -`\\=`' structure, in case you need to splice several lists at -marked positions (for example with keywords). - -This function's anaphoric counterpart is `--splice'. - -See also: `-splice-list', `-insert-at'." - (declare (important-return-value t)) - (--splice (funcall pred it) (funcall fun it) list)) - -(defun -splice-list (pred new-list list) - "Splice NEW-LIST in place of elements matching PRED in LIST. - -See also: `-splice', `-insert-at'" - (declare (important-return-value t)) - (-splice pred (lambda (_) new-list) list)) - -(defmacro --splice-list (pred new-list list) - "Anaphoric form of `-splice-list'." - (declare (debug (def-form form form))) - `(-splice-list (lambda (it) (ignore it) ,pred) ,new-list ,list)) - -(defun -cons* (&rest args) - "Make a new list from the elements of ARGS. -The last 2 elements of ARGS are used as the final cons of the -result, so if the final element of ARGS is not a list, the result -is a dotted list. With no ARGS, return nil." - (declare (side-effect-free t)) - (let* ((len (length args)) - (tail (nthcdr (- len 2) args)) - (last (cdr tail))) - (if (null last) - (car args) - (setcdr tail (car last)) - 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 any ELEMENTS are given, append them to the list as well." - (declare (side-effect-free t)) - (-concat list (list elem) elements)) - -(defmacro --first (form list) - "Return the first item in LIST for which FORM evals to non-nil. -Return nil if no such element is found. -Each element of LIST in turn is bound to `it' and its index -within LIST to `it-index' before evaluating FORM. -This is the anaphoric counterpart to `-first'." - (declare (debug (form form))) - (let ((n (make-symbol "needle"))) - `(let (,n) - (--each-while ,list (or (not ,form) - (ignore (setq ,n it)))) - ,n))) - -(defun -first (pred list) - "Return the first item in LIST for which PRED returns non-nil. -Return nil if no such element is found. - -To get the first item in the list no questions asked, -use `-first-item'. - -Alias: `-find'. - -This function's anaphoric counterpart is `--first'." - (declare (important-return-value t)) - (--first (funcall pred it) list)) - -(defalias '-find #'-first) -(defalias '--find '--first) - -(defmacro --some (form list) - "Return non-nil if FORM evals to non-nil for at least one item in LIST. -If so, return the first such result of FORM. -Each element of LIST in turn is bound to `it' and its index -within LIST to `it-index' before evaluating FORM. -This is the anaphoric counterpart to `-some'." - (declare (debug (form form))) - (let ((n (make-symbol "needle"))) - `(let (,n) - (--each-while ,list (not (setq ,n ,form))) - ,n))) - -(defun -some (pred list) - "Return (PRED x) for the first LIST item where (PRED x) is non-nil, else nil. - -Alias: `-any'. - -This function's anaphoric counterpart is `--some'." - (declare (important-return-value t)) - (--some (funcall pred it) list)) - -(defalias '-any '-some) -(defalias '--any '--some) - -(defmacro --every (form list) - "Return non-nil if FORM evals to non-nil for all items in LIST. -If so, return the last such result of FORM. Otherwise, once an -item is reached for which FORM yields nil, return nil without -evaluating FORM for any further LIST elements. -Each element of LIST in turn is bound to `it' and its index -within LIST to `it-index' before evaluating FORM. - -This macro is like `--every-p', but on success returns the last -non-nil result of FORM instead of just t. - -This is the anaphoric counterpart to `-every'." - (declare (debug (form form))) - (let ((a (make-symbol "all"))) - `(let ((,a t)) - (--each-while ,list (setq ,a ,form)) - ,a))) - -(defun -every (pred list) - "Return non-nil if PRED returns non-nil for all items in LIST. -If so, return the last such result of PRED. Otherwise, once an -item is reached for which PRED returns nil, return nil without -calling PRED on any further LIST elements. - -This function is like `-every-p', but on success returns the last -non-nil result of PRED instead of just t. - -This function's anaphoric counterpart is `--every'." - (declare (important-return-value t)) - (--every (funcall pred it) list)) - -(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." - (declare (important-return-value t)) - (--last (funcall pred it) list)) - -(defalias '-first-item #'car - "Return the first item of LIST, or nil on an empty list. - -See also: `-second-item', `-last-item', etc. - -\(fn LIST)") - -;; Ensure that calls to `-first-item' are compiled to a single opcode, -;; just like `car'. -(put '-first-item 'byte-opcode 'byte-car) -(put '-first-item 'byte-compile 'byte-compile-one-arg) -(put '-first-item 'pure t) -(put '-first-item 'side-effect-free t) - -(defalias '-second-item #'cadr - "Return the second item of LIST, or nil if LIST is too short. - -See also: `-first-item', `-third-item', etc. - -\(fn LIST)") - -(put '-second-item 'pure t) -(put '-second-item 'side-effect-free t) - -(defalias '-third-item - (if (fboundp 'caddr) - #'caddr - (lambda (list) (car (cddr list)))) - "Return the third item of LIST, or nil if LIST is too short. - -See also: `-second-item', `-fourth-item', etc. - -\(fn LIST)") - -(put '-third-item 'pure t) -(put '-third-item 'side-effect-free t) - -(defalias '-fourth-item - (if (fboundp 'cadddr) - #'cadddr - (lambda (list) (cadr (cddr list)))) - "Return the fourth item of LIST, or nil if LIST is too short. - -See also: `-third-item', `-fifth-item', etc. - -\(fn LIST)") - -(put '-fourth-item 'pure t) -(put '-fourth-item 'side-effect-free t) - -(defun -fifth-item (list) - "Return the fifth item of LIST, or nil if LIST is too short. - -See also: `-fourth-item', `-last-item', etc." - (declare (pure t) (side-effect-free t)) - (car (cddr (cddr list)))) - -(defun -last-item (list) - "Return the last item of LIST, or nil on an empty list. - -See also: `-first-item', etc." - (declare (pure t) (side-effect-free t)) - (car (last list))) - -(static-if (fboundp 'gv-define-setter) - (gv-define-setter -last-item (val x) `(setcar (last ,x) ,val)) - (defsetf -last-item (x) (val) `(setcar (last ,x) ,val))) - -(defun -butlast (list) - "Return a list of all items in list except for the last." - ;; no alias as we don't want magic optional argument - (declare (pure t) (side-effect-free t)) - (butlast list)) - -(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." - (declare (important-return-value t)) - (--count (funcall pred it) list)) - -(defun ---truthy? (obj) - "Return OBJ as a boolean value (t or nil)." - (declare (pure t) (side-effect-free error-free)) - (and obj t)) - -(defmacro --any? (form list) - "Anaphoric form of `-any?'." - (declare (debug (form form))) - `(and (--some ,form ,list) t)) - -(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'" - (declare (important-return-value t)) - (--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) - "Return t if FORM evals to non-nil for all items in LIST. -Otherwise, once an item is reached for which FORM yields nil, -return nil without evaluating FORM for any further LIST elements. -Each element of LIST in turn is bound to `it' and its index -within LIST to `it-index' before evaluating FORM. - -The similar macro `--every' is more widely useful, since it -returns the last non-nil result of FORM instead of just t on -success. - -Alias: `--all-p', `--every-p', `--every?'. - -This is the anaphoric counterpart to `-all?'." - (declare (debug (form form))) - `(and (--every ,form ,list) t)) - -(defun -all? (pred list) - "Return t if (PRED X) is non-nil for all X in LIST, else nil. -In the latter case, stop after the first X for which (PRED X) is -nil, without calling PRED on any subsequent elements of LIST. - -The similar function `-every' is more widely useful, since it -returns the last non-nil result of PRED instead of just t on -success. - -Alias: `-all-p', `-every-p', `-every?'. - -This function's anaphoric counterpart is `--all?'." - (declare (important-return-value t)) - (--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'" - (declare (important-return-value t)) - (--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 different LIST items both satisfy and do not satisfy PRED. -That is, if PRED returns both nil for at least one item, and -non-nil for at least one other item in LIST. Return nil if all -items satisfy the predicate or none of them do. - -Alias: `-only-some-p'" - (declare (important-return-value t)) - (--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." - (declare (side-effect-free t)) - (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))) - -(defmacro --take-while (form list) - "Take successive items from LIST for which FORM evals to non-nil. -Each element of LIST in turn is bound to `it' and its index -within LIST to `it-index' before evaluating FORM. Return a new -list of the successive elements from the start of LIST for which -FORM evaluates to non-nil. -This is the anaphoric counterpart to `-take-while'." - (declare (debug (form form))) - (let ((r (make-symbol "result"))) - `(let (,r) - (--each-while ,list ,form (push it ,r)) - (nreverse ,r)))) - -(defun -take-while (pred list) - "Take successive items from LIST for which PRED returns non-nil. -PRED is a function of one argument. Return a new list of the -successive elements from the start of LIST for which PRED returns -non-nil. - -This function's anaphoric counterpart is `--take-while'. - -For another variant, see also `-drop-while'." - (declare (important-return-value t)) - (--take-while (funcall pred it) list)) - -(defmacro --drop-while (form list) - "Drop successive items from LIST for which FORM evals to non-nil. -Each element of LIST in turn is bound to `it' and its index -within LIST to `it-index' before evaluating FORM. Return the -tail (not a copy) of LIST starting from its first element for -which FORM evaluates to nil. -This is the anaphoric counterpart to `-drop-while'." - (declare (debug (form form))) - (let ((l (make-symbol "list"))) - `(let ((,l ,list)) - (--each-while ,l ,form (pop ,l)) - ,l))) - -(defun -drop-while (pred list) - "Drop successive items from LIST for which PRED returns non-nil. -PRED is a function of one argument. Return the tail (not a copy) -of LIST starting from its first element for which PRED returns -nil. - -This function's anaphoric counterpart is `--drop-while'. - -For another variant, see also `-take-while'." - (declare (important-return-value t)) - (--drop-while (funcall pred it) list)) - -;; Added in Emacs 29. -(static-if (fboundp 'take) - (defun dash--take (n list) - "Return the first N elements of LIST. -Like `take', but ensure result is fresh." - (let ((prefix (take n list))) - (if (eq prefix list) - ;; If same list is returned, make a copy. - (copy-sequence prefix) - prefix)))) - -(defun -take (n list) - "Return a copy of the first N items in LIST. -Return a copy of LIST if it contains N items or fewer. -Return nil if N is zero or less. - -See also: `-take-last'." - (declare (side-effect-free t)) - (static-if (fboundp 'dash--take) - (dash--take n list) - (--take-while (< it-index n) list))) - -(defun -take-last (n list) - "Return a copy of the last N items of LIST in order. -Return a copy of LIST if it contains N items or fewer. -Return nil if N is zero or less. - -See also: `-take'." - (declare (side-effect-free t)) - (copy-sequence (last list n))) - -(defalias '-drop #'nthcdr - "Return the tail (not a copy) of LIST without the first N items. -Return nil if LIST contains N items or fewer. -Return LIST if N is zero or less. - -For another variant, see also `-drop-last'. -\n(fn N LIST)") - -(defun -drop-last (n list) - "Return a copy of LIST without its last N items. -Return a copy of LIST if N is zero or less. -Return nil if LIST contains N items or fewer. - -See also: `-drop'." - (declare (side-effect-free t)) - (static-if (fboundp 'dash--take) - (dash--take (- (length list) n) list) - (nbutlast (copy-sequence list) n))) - -(defun -split-at (n list) - "Split LIST into two sublists after the Nth element. -The result is a list of two elements (TAKE DROP) where TAKE is a -new list of the first N elements of LIST, and DROP is the -remaining elements of LIST (not a copy). TAKE and DROP are like -the results of `-take' and `-drop', respectively, but the split -is done in a single list traversal." - (declare (side-effect-free t)) - (let (result) - (--each-while list (< it-index n) - (push (pop list) result)) - (list (nreverse result) list))) - -(defun -rotate (n list) - "Rotate LIST N places to the right (left if N is negative). -The time complexity is O(n)." - (declare (pure t) (side-effect-free t)) - (cond ((null list) ()) - ((zerop n) (copy-sequence list)) - ((let* ((len (length list)) - (n-mod-len (mod n len)) - (new-tail-len (- len n-mod-len))) - (append (nthcdr new-tail-len list) (-take new-tail-len list)))))) - -(defun -insert-at (n x list) - "Return a list with X inserted into LIST at position N. - -See also: `-splice', `-splice-list'" - (declare (pure t) (side-effect-free t)) - (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'" - (declare (pure t) (side-effect-free t)) - (let ((split-list (-split-at n list))) - (nconc (car split-list) (cons x (cdr (cadr split-list)))))) - -(defun -update-at (n func list) - "Use FUNC to update the Nth element of LIST. -Return a copy of LIST where the Nth element is replaced with the -result of calling FUNC on it. - -See also: `-map-when'" - (declare (important-return-value t)) - (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 def-form form))) - `(-update-at ,n (lambda (it) (ignore it) ,form) ,list)) - -(defun -remove-at (n list) - "Return LIST with its element at index N removed. -That is, remove any element selected as (nth N LIST) from LIST -and return the result. - -This is a non-destructive operation: parts of LIST (but not -necessarily all of it) are copied as needed to avoid -destructively modifying it. - -See also: `-remove-at-indices', `-remove'." - (declare (pure t) (side-effect-free t)) - (if (zerop n) - (cdr list) - (--remove-first (= it-index n) list))) - -(defun -remove-at-indices (indices list) - "Return LIST with its elements at INDICES removed. -That is, for each index I in INDICES, remove any element selected -as (nth I LIST) from LIST. - -This is a non-destructive operation: parts of LIST (but not -necessarily all of it) are copied as needed to avoid -destructively modifying it. - -See also: `-remove-at', `-remove'." - (declare (pure t) (side-effect-free t)) - (setq indices (--drop-while (< it 0) (-sort #'< indices))) - (let ((i (pop indices)) res) - (--each-while list i - (pop list) - (if (/= it-index i) - (push it res) - (while (and indices (= (car indices) i)) - (pop indices)) - (setq i (pop indices)))) - (nconc (nreverse res) list))) - -(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) - "Split LIST into a prefix satisfying PRED, and the rest. -The first sublist is the prefix of LIST with successive elements -satisfying PRED, and the second sublist is the remaining elements -that do not. The result is like performing - - ((-take-while PRED LIST) (-drop-while PRED LIST)) - -but in no more than a single pass through LIST." - (declare (important-return-value t)) - (--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 (def-form form))) - `(-split-when (lambda (it) (equal it ,item)) ,list)) - -(defmacro --split-when (form list) - "Anaphoric version of `-split-when'." - (declare (debug (def-form form))) - `(-split-when (lambda (it) (ignore 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'." - (declare (important-return-value t)) - (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) - "Split LIST into two sublists based on whether items satisfy PRED. -The result is like performing - - ((-filter PRED LIST) (-remove PRED LIST)) - -but in a single pass through LIST." - (declare (important-return-value t)) - (--separate (funcall pred it) list)) - -(defun dash--partition-all-in-steps-reversed (n step list) - "Like `-partition-all-in-steps', but the result is reversed." - (when (< step 1) - (signal 'wrong-type-argument - `("Step size < 1 results in juicy infinite loops" ,step))) - (let (result) - (while list - (push (-take n list) result) - (setq list (nthcdr step list))) - result)) - -(defun -partition-all-in-steps (n step list) - "Partition LIST into sublists of length N that are STEP items apart. -Adjacent groups may overlap if N exceeds the STEP stride. -Trailing groups may contain less than N items." - (declare (pure t) (side-effect-free t)) - (nreverse (dash--partition-all-in-steps-reversed n step list))) - -(defun -partition-in-steps (n step list) - "Partition LIST into sublists of length N that are STEP items apart. -Like `-partition-all-in-steps', but if there are not enough items -to make the last group N-sized, those items are discarded." - (declare (pure t) (side-effect-free t)) - (let ((result (dash--partition-all-in-steps-reversed n step list))) - (while (and result (< (length (car result)) n)) - (pop 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." - (declare (pure t) (side-effect-free t)) - (-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." - (declare (pure t) (side-effect-free t)) - (-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." - (declare (important-return-value t)) - (--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)." - (declare (important-return-value t)) - (--partition-by-header (funcall fn it) list)) - -(defmacro --partition-after-pred (form list) - "Partition LIST after each element for which FORM evaluates to non-nil. -Each element of LIST in turn is bound to `it' before evaluating -FORM. - -This is the anaphoric counterpart to `-partition-after-pred'." - (let ((l (make-symbol "list")) - (r (make-symbol "result")) - (s (make-symbol "sublist"))) - `(let ((,l ,list) ,r ,s) - (when ,l - (--each ,l - (push it ,s) - (when ,form - (push (nreverse ,s) ,r) - (setq ,s ()))) - (when ,s - (push (nreverse ,s) ,r)) - (nreverse ,r))))) - -(defun -partition-after-pred (pred list) - "Partition LIST after each element for which PRED returns non-nil. - -This function's anaphoric counterpart is `--partition-after-pred'." - (declare (important-return-value t)) - (--partition-after-pred (funcall pred it) list)) - -(defun -partition-before-pred (pred list) - "Partition directly before each time PRED is true on an element of LIST." - (declare (important-return-value t)) - (nreverse (-map #'reverse - (-partition-after-pred pred (reverse list))))) - -(defun -partition-after-item (item list) - "Partition directly after each time ITEM appears in LIST." - (declare (pure t) (side-effect-free t)) - (-partition-after-pred (lambda (ele) (equal ele item)) - list)) - -(defun -partition-before-item (item list) - "Partition directly before each time ITEM appears in LIST." - (declare (pure t) (side-effect-free t)) - (-partition-before-pred (lambda (ele) (equal ele item)) - list)) - -(defmacro --group-by (form list) - "Anaphoric form of `-group-by'." - (declare (debug t)) - (let ((n (make-symbol "n")) - (k (make-symbol "k")) - (grp (make-symbol "grp"))) - `(nreverse - (-map - (lambda (,n) - (cons (car ,n) - (nreverse (cdr ,n)))) - (--reduce-from - (let* ((,k (,@form)) - (,grp (assoc ,k acc))) - (if ,grp - (setcdr ,grp (cons it (cdr ,grp))) - (push - (list ,k it) - acc)) - acc) - nil ,list))))) - -(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'." - (declare (important-return-value t)) - (--group-by (funcall fn it) list)) - -(defun -interpose (sep list) - "Return a new list of all elements in LIST separated by SEP." - (declare (side-effect-free t)) - (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." - (declare (side-effect-free t)) - (when lists - (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) - "Zip LIST1 and LIST2 into a new list according to FORM. -That is, evaluate FORM for each item pair from the two lists, and -return the list of results. The result is as long as the shorter -list. - -Each element of LIST1 and each element of LIST2 in turn are bound -pairwise to `it' and `other', respectively, and their index -within the list to `it-index', before evaluating FORM. - -This is the anaphoric counterpart to `-zip-with'." - (declare (debug (form form form))) - (let ((r (make-symbol "result")) - (l2 (make-symbol "list2"))) - `(let ((,l2 ,list2) ,r) - (--each-while ,list1 ,l2 - (let ((other (pop ,l2))) - (ignore other) - (push ,form ,r))) - (nreverse ,r)))) - -(defun -zip-with (fn list1 list2) - "Zip LIST1 and LIST2 into a new list using the function FN. -That is, apply FN pairwise taking as first argument the next -element of LIST1 and as second argument the next element of LIST2 -at the corresponding position. The result is as long as the -shorter list. - -This function's anaphoric counterpart is `--zip-with'. - -For other zips, see also `-zip-lists' and `-zip-fill'." - (declare (important-return-value t)) - (--zip-with (funcall fn it other) list1 list2)) - -(defun -zip-lists (&rest lists) - "Zip LISTS together. - -Group the head of each list, followed by the second element of -each list, and so on. The number of returned groupings is equal -to the length of the shortest input list, and the length of each -grouping is equal to the number of input LISTS. - -The return value is always a list of proper lists, in contrast to -`-zip' which returns a list of dotted pairs when only two input -LISTS are provided. - -See also: `-zip-pair'." - (declare (pure t) (side-effect-free t)) - (when lists - (let (results) - (while (--every it lists) - (push (mapcar #'car lists) results) - (setq lists (mapcar #'cdr lists))) - (nreverse results)))) - -(defun -zip-lists-fill (fill-value &rest lists) - "Zip LISTS together, padding shorter lists with FILL-VALUE. -This is like `-zip-lists' (which see), except it retains all -elements at positions beyond the end of the shortest list. The -number of returned groupings is equal to the length of the -longest input list, and the length of each grouping is equal to -the number of input LISTS." - (declare (pure t) (side-effect-free t)) - (when lists - (let (results) - (while (--some it lists) - (push (--map (if it (car it) fill-value) lists) results) - (setq lists (mapcar #'cdr lists))) - (nreverse results)))) - -(defun -unzip-lists (lists) - "Unzip LISTS. - -This works just like `-zip-lists' (which see), but takes a list -of lists instead of a variable number of arguments, such that - - (-unzip-lists (-zip-lists ARGS...)) - -is identity (given that the lists comprising ARGS are of the same -length)." - (declare (pure t) (side-effect-free t)) - (apply #'-zip-lists lists)) - -(defalias 'dash--length= - (if (fboundp 'length=) - #'length= - (lambda (list length) - (cond ((< length 0) nil) - ((zerop length) (null list)) - ((let ((last (nthcdr (1- length) list))) - (and last (null (cdr last)))))))) - "Return non-nil if LIST is of LENGTH. -This is a compatibility shim for `length=' in Emacs 28. -\n(fn LIST LENGTH)") - -(defun dash--zip-lists-or-pair (_form &rest lists) - "Return a form equivalent to applying `-zip' to LISTS. -This `compiler-macro' warns about discouraged `-zip' usage and -delegates to `-zip-lists' or `-zip-pair' depending on the number -of LISTS." - (if (not (dash--length= lists 2)) - (cons #'-zip-lists lists) - (let ((pair (cons #'-zip-pair lists)) - (msg "Use -zip-pair instead of -zip to get a list of pairs")) - (if (fboundp 'macroexp-warn-and-return) - (macroexp-warn-and-return msg pair) - (message msg) - pair)))) - -(defun -zip (&rest lists) - "Zip LISTS together. - -Group the head of each list, followed by the second element of -each list, and so on. The number of returned groupings is equal -to the length of the shortest input list, and the number of items -in each grouping is equal to the number of input LISTS. - -If only two LISTS are provided as arguments, return the groupings -as a list of dotted pairs. Otherwise, return the groupings as a -list of proper lists. - -Since the return value changes form depending on the number of -arguments, it is generally recommended to use `-zip-lists' -instead, or `-zip-pair' if a list of dotted pairs is desired. - -See also: `-unzip'." - (declare (compiler-macro dash--zip-lists-or-pair) - (pure t) (side-effect-free t)) - ;; For backward compatibility, return a list of dotted pairs if two - ;; arguments were provided. - (apply (if (dash--length= lists 2) #'-zip-pair #'-zip-lists) lists)) - -(defun -zip-pair (&rest lists) - "Zip LIST1 and LIST2 together. - -Make a pair with the head of each list, followed by a pair with -the second element of each list, and so on. The number of pairs -returned is equal to the length of the shorter input list. - -See also: `-zip-lists'." - (declare (advertised-calling-convention (list1 list2) "2.20.0") - (pure t) (side-effect-free t)) - (if (dash--length= lists 2) - (--zip-with (cons it other) (car lists) (cadr lists)) - (apply #'-zip-lists lists))) - -(defun -zip-fill (fill-value &rest lists) - "Zip LISTS together, padding shorter lists with FILL-VALUE. -This is like `-zip' (which see), except it retains all elements -at positions beyond the end of the shortest list. The number of -returned groupings is equal to the length of the longest input -list, and the length of each grouping is equal to the number of -input LISTS. - -Since the return value changes form depending on the number of -arguments, it is generally recommended to use `-zip-lists-fill' -instead, unless a list of dotted pairs is explicitly desired." - (declare (pure t) (side-effect-free t)) - (cond ((null lists) ()) - ((dash--length= lists 2) - (let ((list1 (car lists)) - (list2 (cadr lists)) - results) - (while (or list1 list2) - (push (cons (if list1 (pop list1) fill-value) - (if list2 (pop list2) fill-value)) - results)) - (nreverse results))) - ((apply #'-zip-lists-fill fill-value lists)))) - -(defun -unzip (lists) - "Unzip LISTS. - -This works just like `-zip' (which see), but takes a list of -lists instead of a variable number of arguments, such that - - (-unzip (-zip L1 L2 L3 ...)) - -is identity (given that the lists are of the same length, and -that `-zip' is not called with two arguments, because of the -caveat described in its docstring). - -Note in particular that calling `-unzip' on a list of two lists -will return a list of dotted pairs. - -Since the return value changes form depending on the number of -LISTS, it is generally recommended to use `-unzip-lists' instead." - (declare (pure t) (side-effect-free t)) - (apply #'-zip lists)) - -(defun -cycle (list) - "Return an infinite circular copy of LIST. -The returned list cycles through the elements of LIST and repeats -from the beginning." - (declare (pure t) (side-effect-free t)) - ;; Also works with sequences that aren't lists. - (let ((newlist (append list ()))) - (nconc newlist newlist))) - -(defun -pad (fill-value &rest lists) - "Pad each of LISTS with FILL-VALUE until they all have equal lengths. - -Ensure all LISTS are as long as the longest one by repeatedly -appending FILL-VALUE to the shorter lists, and return the -resulting LISTS." - (declare (pure t) (side-effect-free t)) - (let* ((lens (mapcar #'length lists)) - (maxlen (apply #'max 0 lens))) - (--map (append it (make-list (- maxlen (pop lens)) fill-value)) lists))) - -(defmacro --annotate (form list) - "Pair each item in LIST with the result of evaluating FORM. - -Return an alist of (RESULT . ITEM), where each ITEM is the -corresponding element of LIST, and RESULT is the value obtained -by evaluating FORM with ITEM bound to `it'. - -This is the anaphoric counterpart to `-annotate'." - (declare (debug (form form))) - `(--map (cons ,form it) ,list)) - -(defun -annotate (fn list) - "Pair each item in LIST with the result of passing it to FN. - -Return an alist of (RESULT . ITEM), where each ITEM is the -corresponding element of LIST, and RESULT is the value obtained -by calling FN on ITEM. - -This function's anaphoric counterpart is `--annotate'." - (declare (important-return-value t)) - (--annotate (funcall fn it) 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." - (while (not (or (car lists) - (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'" - (declare (important-return-value t)) - (let ((restore-lists (copy-sequence lists)) - (last-list (last lists)) - (re (make-list (length lists) nil))) - (while (car last-list) - (let ((item (apply fn (-map 'car lists)))) - (push item (car re)) - (setcar lists (cdar lists)) ;; silence byte compiler - (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)) (apply \\='-table fn lists)) - -but the implementation here is much more efficient. - -See also: `-flatten-n', `-table'" - (declare (important-return-value t)) - (let ((restore-lists (copy-sequence lists)) - (last-list (last lists)) - re) - (while (car last-list) - (let ((item (apply fn (-map 'car lists)))) - (push item re) - (setcar lists (cdar lists)) ;; silence byte compiler - (dash--table-carry lists restore-lists))) - (nreverse re))) - -(defmacro --find-index (form list) - "Return the first index in LIST for which FORM evals to non-nil. -Return nil if no such index is found. -Each element of LIST in turn is bound to `it' and its index -within LIST to `it-index' before evaluating FORM. -This is the anaphoric counterpart to `-find-index'." - (declare (debug (form form))) - `(--some (and ,form it-index) ,list)) - -(defun -find-index (pred list) - "Return the index of the first item satisfying PRED in LIST. -Return nil if no such item is found. - -PRED is called with one argument, the current list element, until -it returns non-nil, at which point the search terminates. - -This function's anaphoric counterpart is `--find-index'. - -See also: `-first', `-find-last-index'." - (declare (important-return-value t)) - (--find-index (funcall pred it) list)) - -(defun -elem-index (elem list) - "Return the first index of ELEM in LIST. -That is, the index within LIST of the first element that is -`equal' to ELEM. Return nil if there is no such element. - -See also: `-find-index'." - (declare (pure t) (side-effect-free t)) - (--find-index (equal elem it) list)) - -(defmacro --find-indices (form list) - "Return the list of indices in LIST for which FORM evals to non-nil. -Each element of LIST in turn is bound to `it' and its index -within LIST to `it-index' before evaluating FORM. -This is the anaphoric counterpart to `-find-indices'." - (declare (debug (form form))) - `(--keep (and ,form it-index) ,list)) - -(defun -find-indices (pred list) - "Return the list of indices in LIST satisfying PRED. - -Each element of LIST in turn is passed to PRED. If the result is -non-nil, the index of that element in LIST is included in the -result. The returned indices are in ascending order, i.e., in -the same order as they appear in LIST. - -This function's anaphoric counterpart is `--find-indices'. - -See also: `-find-index', `-elem-indices'." - (declare (important-return-value t)) - (--find-indices (funcall pred it) list)) - -(defun -elem-indices (elem list) - "Return the list of indices at which ELEM appears in LIST. -That is, the indices of all elements of LIST `equal' to ELEM, in -the same ascending order as they appear in LIST." - (declare (pure t) (side-effect-free t)) - (--find-indices (equal elem it) list)) - -(defmacro --find-last-index (form list) - "Return the last index in LIST for which FORM evals to non-nil. -Return nil if no such index is found. -Each element of LIST in turn is bound to `it' and its index -within LIST to `it-index' before evaluating FORM. -This is the anaphoric counterpart to `-find-last-index'." - (declare (debug (form form))) - (let ((i (make-symbol "index"))) - `(let (,i) - (--each ,list - (when ,form (setq ,i it-index))) - ,i))) - -(defun -find-last-index (pred list) - "Return the index of the last item satisfying PRED in LIST. -Return nil if no such item is found. - -Predicate PRED is called with one argument each time, namely the -current list element. - -This function's anaphoric counterpart is `--find-last-index'. - -See also: `-last', `-find-index'." - (declare (important-return-value t)) - (--find-last-index (funcall pred it) 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." - (declare (pure t) (side-effect-free t)) - (let (r) - (--each indices - (!cons (nth it list) r)) - (nreverse r))) - -(defun -select-columns (columns table) - "Select COLUMNS from TABLE. - -TABLE is a list of lists where each element represents one row. -It is assumed each row has the same length. - -Each row is transformed such that only the specified COLUMNS are -selected. - -See also: `-select-column', `-select-by-indices'" - (declare (pure t) (side-effect-free t)) - (--map (-select-by-indices columns it) table)) - -(defun -select-column (column table) - "Select COLUMN from TABLE. - -TABLE is a list of lists where each element represents one row. -It is assumed each row has the same length. - -The single selected column is returned as a list. - -See also: `-select-columns', `-select-by-indices'" - (declare (pure t) (side-effect-free t)) - (--mapcat (-select-by-indices (list column) it) table)) - -(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." - (declare (debug (form &rest [&or symbolp (sexp &rest form)]))) - (cond - ((null form) x) - ((null more) (if (listp form) - `(,(car form) ,x ,@(cdr form)) - (list form x))) - (:else `(-> (-> ,x ,form) ,@more)))) - -(defmacro ->> (x &optional 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." - (declare (debug ->)) - (cond - ((null form) x) - ((null more) (if (listp form) - `(,@form ,x) - (list form x))) - (:else `(->> (->> ,x ,form) ,@more)))) - -(defmacro --> (x &rest forms) - "Starting with the value of X, thread each expression through FORMS. - -Insert X at the position signified by the symbol `it' in the first -form. If there are more forms, insert the first form at the position -signified by `it' in the second form, etc." - (declare (debug (form body))) - `(-as-> ,x it ,@forms)) - -(defmacro -as-> (value variable &rest forms) - "Starting with VALUE, thread VARIABLE through FORMS. - -In the first form, bind VARIABLE to VALUE. In the second form, bind -VARIABLE to the result of the first form, and so forth." - (declare (debug (form symbolp body))) - (if (null forms) - `,value - `(let ((,variable ,value)) - (-as-> ,(if (symbolp (car forms)) - (list (car forms) variable) - (car forms)) - ,variable - ,@(cdr forms))))) - -(defmacro -some-> (x &optional form &rest more) - "When expr is non-nil, thread it through the first form (via `->'), -and when that result is non-nil, through the next form, etc." - (declare (debug ->) - (indent 1)) - (if (null form) x - (let ((result (make-symbol "result"))) - `(-some-> (-when-let (,result ,x) - (-> ,result ,form)) - ,@more)))) - -(defmacro -some->> (x &optional form &rest more) - "When expr is non-nil, thread it through the first form (via `->>'), -and when that result is non-nil, through the next form, etc." - (declare (debug ->) - (indent 1)) - (if (null form) x - (let ((result (make-symbol "result"))) - `(-some->> (-when-let (,result ,x) - (->> ,result ,form)) - ,@more)))) - -(defmacro -some--> (expr &rest forms) - "Thread EXPR through FORMS via `-->', while the result is non-nil. -When EXPR evaluates to non-nil, thread the result through the -first of FORMS, and when that result is non-nil, thread it -through the next form, etc." - (declare (debug (form &rest &or symbolp consp)) (indent 1)) - (if (null forms) expr - (let ((result (make-symbol "result"))) - `(-some--> (-when-let (,result ,expr) - (--> ,result ,(car forms))) - ,@(cdr forms))))) - -(defmacro -doto (init &rest forms) - "Evaluate INIT and pass it as argument to FORMS with `->'. -The RESULT of evaluating INIT is threaded through each of FORMS -individually using `->', which see. The return value is RESULT, -which FORMS may have modified by side effect." - (declare (debug (form &rest &or symbolp consp)) (indent 1)) - (let ((retval (make-symbol "result"))) - `(let ((,retval ,init)) - ,@(mapcar (lambda (form) `(-> ,retval ,form)) forms) - ,retval))) - -(defmacro --doto (init &rest forms) - "Anaphoric form of `-doto'. -This just evaluates INIT, binds the result to `it', evaluates -FORMS, and returns the final value of `it'. -Note: `it' need not be used in each form." - (declare (debug (form body)) (indent 1)) - `(let ((it ,init)) - ,@forms - it)) - -(defun -grade-up (comparator list) - "Grade elements of LIST using COMPARATOR relation. -This yields a permutation vector such that applying this -permutation to LIST sorts it in ascending order." - (declare (important-return-value t)) - (->> (--map-indexed (cons it it-index) list) - (-sort (lambda (it other) (funcall comparator (car it) (car other)))) - (mapcar #'cdr))) - -(defun -grade-down (comparator list) - "Grade elements of LIST using COMPARATOR relation. -This yields a permutation vector such that applying this -permutation to LIST sorts it in descending order." - (declare (important-return-value t)) - (->> (--map-indexed (cons it it-index) list) - (-sort (lambda (it other) (funcall comparator (car other) (car it)))) - (mapcar #'cdr))) - -(defvar dash--source-counter 0 - "Monotonic counter for generated symbols.") - -(defun dash--match-make-source-symbol () - "Generate a new dash-source symbol. - -All returned symbols are guaranteed to be unique." - (prog1 (make-symbol (format "--dash-source-%d--" dash--source-counter)) - (setq dash--source-counter (1+ dash--source-counter)))) - -(defun dash--match-ignore-place-p (symbol) - "Return non-nil if SYMBOL is a symbol and starts with _." - (and (symbolp symbol) - (eq (aref (symbol-name symbol) 0) ?_))) - -(defun dash--match-cons-skip-cdr (skip-cdr source) - "Helper function generating idiomatic shifting code." - (cond - ((= skip-cdr 0) - `(pop ,source)) - (t - `(prog1 ,(dash--match-cons-get-car skip-cdr source) - (setq ,source ,(dash--match-cons-get-cdr (1+ skip-cdr) source)))))) - -(defun dash--match-cons-get-car (skip-cdr source) - "Helper function generating idiomatic code to get nth car." - (cond - ((= skip-cdr 0) - `(car ,source)) - ((= skip-cdr 1) - `(cadr ,source)) - (t - `(nth ,skip-cdr ,source)))) - -(defun dash--match-cons-get-cdr (skip-cdr source) - "Helper function generating idiomatic code to get nth cdr." - (cond - ((= skip-cdr 0) - source) - ((= skip-cdr 1) - `(cdr ,source)) - (t - `(nthcdr ,skip-cdr ,source)))) - -(defun dash--match-cons (match-form source) - "Setup a cons matching environment and call the real matcher." - (let ((s (dash--match-make-source-symbol)) - (n 0) - (m match-form)) - (while (and (consp m) - (dash--match-ignore-place-p (car m))) - (setq n (1+ n)) (!cdr m)) - (cond - ;; when we only have one pattern in the list, we don't have to - ;; create a temporary binding (--dash-source--) for the source - ;; and just use the input directly - ((and (consp m) - (not (cdr m))) - (dash--match (car m) (dash--match-cons-get-car n source))) - ;; handle other special types - ((> n 0) - (dash--match m (dash--match-cons-get-cdr n source))) - ;; this is the only entry-point for dash--match-cons-1, that's - ;; why we can't simply use the above branch, it would produce - ;; infinite recursion - (t - (cons (list s source) (dash--match-cons-1 match-form s)))))) - -(defun dash--get-expand-function (type) - "Get expand function name for TYPE." - (intern-soft (format "dash-expand:%s" type))) - -(defun dash--match-cons-1 (match-form source &optional props) - "Match MATCH-FORM against SOURCE. - -MATCH-FORM is a proper or improper list. Each element of -MATCH-FORM is either a symbol, which gets bound to the respective -value in source or another match form which gets destructured -recursively. - -If the cdr of last cons cell in the list is nil, matching stops -there. - -SOURCE is a proper or improper list." - (let ((skip-cdr (or (plist-get props :skip-cdr) 0))) - (cond - ((consp match-form) - (cond - ((cdr match-form) - (cond - ((and (symbolp (car match-form)) - (functionp (dash--get-expand-function (car match-form)))) - (dash--match-kv (dash--match-kv-normalize-match-form match-form) (dash--match-cons-get-cdr skip-cdr source))) - ((dash--match-ignore-place-p (car match-form)) - (dash--match-cons-1 (cdr match-form) source - (plist-put props :skip-cdr (1+ skip-cdr)))) - (t - (-concat (dash--match (car match-form) (dash--match-cons-skip-cdr skip-cdr source)) - (dash--match-cons-1 (cdr match-form) source))))) - (t ;; Last matching place, no need for shift - (dash--match (car match-form) (dash--match-cons-get-car skip-cdr source))))) - ((eq match-form nil) - nil) - (t ;; Handle improper lists. Last matching place, no need for shift - (dash--match match-form (dash--match-cons-get-cdr skip-cdr source)))))) - -(defun dash--match-vector (match-form source) - "Setup a vector matching environment and call the real matcher." - (let ((s (dash--match-make-source-symbol))) - (cond - ;; don't bind `s' if we only have one sub-pattern - ((= (length match-form) 1) - (dash--match (aref match-form 0) `(aref ,source 0))) - ;; if the source is a symbol, we don't need to re-bind it - ((symbolp source) - (dash--match-vector-1 match-form source)) - ;; don't bind `s' if we only have one sub-pattern which is not ignored - ((let* ((ignored-places (mapcar 'dash--match-ignore-place-p match-form)) - (ignored-places-n (length (-remove 'null ignored-places)))) - (when (= ignored-places-n (1- (length match-form))) - (let ((n (-find-index 'null ignored-places))) - (dash--match (aref match-form n) `(aref ,source ,n)))))) - (t - (cons (list s source) (dash--match-vector-1 match-form s)))))) - -(defun dash--match-vector-1 (match-form source) - "Match MATCH-FORM against SOURCE. - -MATCH-FORM is a vector. Each element of MATCH-FORM is either a -symbol, which gets bound to the respective value in source or -another match form which gets destructured recursively. - -If second-from-last place in MATCH-FORM is the symbol &rest, the -next element of the MATCH-FORM is matched against the tail of -SOURCE, starting at index of the &rest symbol. This is -conceptually the same as the (head . tail) match for improper -lists, where dot plays the role of &rest. - -SOURCE is a vector. - -If the MATCH-FORM vector is shorter than SOURCE vector, only -the (length MATCH-FORM) places are bound, the rest of the SOURCE -is discarded." - (let ((i 0) - (l (length match-form)) - (re)) - (while (< i l) - (let ((m (aref match-form i))) - (push (cond - ((and (symbolp m) - (eq m '&rest)) - (prog1 (dash--match - (aref match-form (1+ i)) - `(substring ,source ,i)) - (setq i l))) - ((and (symbolp m) - ;; do not match symbols starting with _ - (not (eq (aref (symbol-name m) 0) ?_))) - (list (list m `(aref ,source ,i)))) - ((not (symbolp m)) - (dash--match m `(aref ,source ,i)))) - re) - (setq i (1+ i)))) - (-flatten-n 1 (nreverse re)))) - -(defun dash--match-kv-normalize-match-form (pattern) - "Normalize kv PATTERN. - -This method normalizes PATTERN to the format expected by -`dash--match-kv'. See `-let' for the specification." - (let ((normalized (list (car pattern))) - (skip nil) - (fill-placeholder (make-symbol "--dash-fill-placeholder--"))) - (-each (-zip-fill fill-placeholder (cdr pattern) (cddr pattern)) - (lambda (pair) - (let ((current (car pair)) - (next (cdr pair))) - (if skip - (setq skip nil) - (if (or (eq fill-placeholder next) - (not (or (and (symbolp next) - (not (keywordp next)) - (not (eq next t)) - (not (eq next nil))) - (and (consp next) - (not (eq (car next) 'quote))) - (vectorp next)))) - (progn - (cond - ((keywordp current) - (push current normalized) - (push (intern (substring (symbol-name current) 1)) normalized)) - ((stringp current) - (push current normalized) - (push (intern current) normalized)) - ((and (consp current) - (eq (car current) 'quote)) - (push current normalized) - (push (cadr current) normalized)) - (t (error "-let: found key `%s' in kv destructuring but its pattern `%s' is invalid and can not be derived from the key" current next))) - (setq skip nil)) - (push current normalized) - (push next normalized) - (setq skip t)))))) - (nreverse normalized))) - -(defun dash--match-kv (match-form source) - "Setup a kv matching environment and call the real matcher. - -kv can be any key-value store, such as plist, alist or hash-table." - (let ((s (dash--match-make-source-symbol))) - (cond - ;; don't bind `s' if we only have one sub-pattern (&type key val) - ((= (length match-form) 3) - (dash--match-kv-1 (cdr match-form) source (car match-form))) - ;; if the source is a symbol, we don't need to re-bind it - ((symbolp source) - (dash--match-kv-1 (cdr match-form) source (car match-form))) - (t - (cons (list s source) (dash--match-kv-1 (cdr match-form) s (car match-form))))))) - -(defun dash-expand:&hash (key source) - "Generate extracting KEY from SOURCE for &hash destructuring." - `(gethash ,key ,source)) - -(defun dash-expand:&plist (key source) - "Generate extracting KEY from SOURCE for &plist destructuring." - `(plist-get ,source ,key)) - -(defun dash-expand:&alist (key source) - "Generate extracting KEY from SOURCE for &alist destructuring." - `(cdr (assoc ,key ,source))) - -(defun dash-expand:&hash? (key source) - "Generate extracting KEY from SOURCE for &hash? destructuring. -Similar to &hash but check whether the map is not nil." - (let ((src (make-symbol "src"))) - `(let ((,src ,source)) - (when ,src (gethash ,key ,src))))) - -(defalias 'dash-expand:&keys #'dash-expand:&plist) - -(defun dash--match-kv-1 (match-form source type) - "Match MATCH-FORM against SOURCE of type TYPE. - -MATCH-FORM is a proper list of the form (key1 place1 ... keyN -placeN). Each placeK is either a symbol, which gets bound to the -value of keyK retrieved from the key-value store, or another -match form which gets destructured recursively. - -SOURCE is a key-value store of type TYPE, which can be a plist, -an alist or a hash table. - -TYPE is a token specifying the type of the key-value store. -Valid values are &plist, &alist and &hash." - (-flatten-n 1 (-map - (lambda (kv) - (let* ((k (car kv)) - (v (cadr kv)) - (getter - (funcall (dash--get-expand-function type) k source))) - (cond - ((symbolp v) - (list (list v getter))) - (t (dash--match v getter))))) - (-partition 2 match-form)))) - -(defun dash--match-symbol (match-form source) - "Bind a symbol. - -This works just like `let', there is no destructuring." - (list (list match-form source))) - -(defun dash--match (match-form source) - "Match MATCH-FORM against SOURCE. - -This function tests the MATCH-FORM and dispatches to specific -matchers based on the type of the expression. - -Key-value stores are disambiguated by placing a token &plist, -&alist or &hash as a first item in the MATCH-FORM." - (cond - ((and (symbolp match-form) - ;; Don't bind things like &keys as if they were vars (#395). - (not (functionp (dash--get-expand-function match-form)))) - (dash--match-symbol match-form source)) - ((consp match-form) - (cond - ;; Handle the "x &as" bindings first. - ((and (consp (cdr match-form)) - (symbolp (car match-form)) - (eq '&as (cadr match-form))) - (let ((s (car match-form))) - (cons (list s source) - (dash--match (cddr match-form) s)))) - ((functionp (dash--get-expand-function (car match-form))) - (dash--match-kv (dash--match-kv-normalize-match-form match-form) source)) - (t (dash--match-cons match-form source)))) - ((vectorp match-form) - ;; We support the &as binding in vectors too - (cond - ((and (> (length match-form) 2) - (symbolp (aref match-form 0)) - (eq '&as (aref match-form 1))) - (let ((s (aref match-form 0))) - (cons (list s source) - (dash--match (substring match-form 2) s)))) - (t (dash--match-vector match-form source)))))) - -(defun dash--normalize-let-varlist (varlist) - "Normalize VARLIST so that every binding is a list. - -`let' allows specifying a binding which is not a list but simply -the place which is then automatically bound to nil, such that all -three of the following are identical and evaluate to nil. - - (let (a) a) - (let ((a)) a) - (let ((a nil)) a) - -This function normalizes all of these to the last form." - (--map (if (consp it) it (list it nil)) varlist)) - -(defmacro -let* (varlist &rest body) - "Bind variables according to VARLIST then eval BODY. - -VARLIST is a list of lists of the form (PATTERN SOURCE). Each -PATTERN is matched against the SOURCE structurally. SOURCE is -only evaluated once for each PATTERN. - -Each SOURCE can refer to the symbols already bound by this -VARLIST. This is useful if you want to destructure SOURCE -recursively but also want to name the intermediate structures. - -See `-let' for the list of all possible patterns." - (declare (debug ((&rest [&or (sexp form) sexp]) body)) - (indent 1)) - (let* ((varlist (dash--normalize-let-varlist varlist)) - (bindings (--mapcat (dash--match (car it) (cadr it)) varlist))) - `(let* ,bindings - ,@body))) - -(defmacro -let (varlist &rest body) - "Bind variables according to VARLIST then eval BODY. - -VARLIST is a list of lists of the form (PATTERN SOURCE). Each -PATTERN is matched against the SOURCE \"structurally\". SOURCE -is only evaluated once for each PATTERN. Each PATTERN is matched -recursively, and can therefore contain sub-patterns which are -matched against corresponding sub-expressions of SOURCE. - -All the SOURCEs are evalled before any symbols are -bound (i.e. \"in parallel\"). - -If VARLIST only contains one (PATTERN SOURCE) element, you can -optionally specify it using a vector and discarding the -outer-most parens. Thus - - (-let ((PATTERN SOURCE)) ...) - -becomes - - (-let [PATTERN SOURCE] ...). - -`-let' uses a convention of not binding places (symbols) starting -with _ whenever it's possible. You can use this to skip over -entries you don't care about. However, this is not *always* -possible (as a result of implementation) and these symbols might -get bound to undefined values. - -Following is the overview of supported patterns. Remember that -patterns can be matched recursively, so every a, b, aK in the -following can be a matching construct and not necessarily a -symbol/variable. - -Symbol: - - a - bind the SOURCE to A. This is just like regular `let'. - -Conses and lists: - - (a) - bind `car' of cons/list to A - - (a . b) - bind car of cons to A and `cdr' to B - - (a b) - bind car of list to A and `cadr' to B - - (a1 a2 a3 ...) - bind 0th car of list to A1, 1st to A2, 2nd to A3... - - (a1 a2 a3 ... aN . rest) - as above, but bind the Nth cdr to REST. - -Vectors: - - [a] - bind 0th element of a non-list sequence to A (works with - vectors, strings, bit arrays...) - - [a1 a2 a3 ...] - bind 0th element of non-list sequence to A0, 1st to - A1, 2nd to A2, ... - If the PATTERN is shorter than SOURCE, the values at - places not in PATTERN are ignored. - If the PATTERN is longer than SOURCE, an `error' is - thrown. - - [a1 a2 a3 ... &rest rest] - as above, but bind the rest of - the sequence to REST. This is - conceptually the same as improper list - matching (a1 a2 ... aN . rest) - -Key/value stores: - - (&plist key0 a0 ... keyN aN) - bind value mapped by keyK in the - SOURCE plist to aK. If the - value is not found, aK is nil. - Uses `plist-get' to fetch values. - - (&alist key0 a0 ... keyN aN) - bind value mapped by keyK in the - SOURCE alist to aK. If the - value is not found, aK is nil. - Uses `assoc' to fetch values. - - (&hash key0 a0 ... keyN aN) - bind value mapped by keyK in the - SOURCE hash table to aK. If the - value is not found, aK is nil. - Uses `gethash' to fetch values. - -Further, special keyword &keys supports \"inline\" matching of -plist-like key-value pairs, similarly to &keys keyword of -`cl-defun'. - - (a1 a2 ... aN &keys key1 b1 ... keyN bK) - -This binds N values from the list to a1 ... aN, then interprets -the cdr as a plist (see key/value matching above). - -A shorthand notation for kv-destructuring exists which allows the -patterns be optionally left out and derived from the key name in -the following fashion: - -- a key :foo is converted into `foo' pattern, -- a key \\='bar is converted into `bar' pattern, -- a key \"baz\" is converted into `baz' pattern. - -That is, the entire value under the key is bound to the derived -variable without any further destructuring. - -This is possible only when the form following the key is not a -valid pattern (i.e. not a symbol, a cons cell or a vector). -Otherwise the matching proceeds as usual and in case of an -invalid spec fails with an error. - -Thus the patterns are normalized as follows: - - ;; derive all the missing patterns - (&plist :foo \\='bar \"baz\") => (&plist :foo foo \\='bar bar \"baz\" baz) - - ;; we can specify some but not others - (&plist :foo \\='bar explicit-bar) => (&plist :foo foo \\='bar explicit-bar) - - ;; nothing happens, we store :foo in x - (&plist :foo x) => (&plist :foo x) - - ;; nothing happens, we match recursively - (&plist :foo (a b c)) => (&plist :foo (a b c)) - -You can name the source using the syntax SYMBOL &as PATTERN. -This syntax works with lists (proper or improper), vectors and -all types of maps. - - (list &as a b c) (list 1 2 3) - -binds A to 1, B to 2, C to 3 and LIST to (1 2 3). - -Similarly: - - (bounds &as beg . end) (cons 1 2) - -binds BEG to 1, END to 2 and BOUNDS to (1 . 2). - - (items &as first . rest) (list 1 2 3) - -binds FIRST to 1, REST to (2 3) and ITEMS to (1 2 3) - - [vect &as _ b c] [1 2 3] - -binds B to 2, C to 3 and VECT to [1 2 3] (_ avoids binding as usual). - - (plist &as &plist :b b) (list :a 1 :b 2 :c 3) - -binds B to 2 and PLIST to (:a 1 :b 2 :c 3). Same for &alist and &hash. - -This is especially useful when we want to capture the result of a -computation and destructure at the same time. Consider the -form (function-returning-complex-structure) returning a list of -two vectors with two items each. We want to capture this entire -result and pass it to another computation, but at the same time -we want to get the second item from each vector. We can achieve -it with pattern - - (result &as [_ a] [_ b]) (function-returning-complex-structure) - -Note: Clojure programmers may know this feature as the \":as -binding\". The difference is that we put the &as at the front -because we need to support improper list binding." - (declare (debug ([&or (&rest [&or (sexp form) sexp]) - (vector [&rest [sexp form]])] - body)) - (indent 1)) - (if (vectorp varlist) - `(let* ,(dash--match (aref varlist 0) (aref varlist 1)) - ,@body) - (let* ((varlist (dash--normalize-let-varlist varlist)) - (inputs (--map-indexed (list (make-symbol (format "input%d" it-index)) (cadr it)) varlist)) - (new-varlist (--zip-with (list (car it) (car other)) - varlist inputs))) - `(let ,inputs - (-let* ,new-varlist ,@body))))) - -(defmacro -lambda (match-form &rest body) - "Return a lambda which destructures its input as MATCH-FORM and executes BODY. - -Note that you have to enclose the MATCH-FORM in a pair of parens, -such that: - - (-lambda (x) body) - (-lambda (x y ...) body) - -has the usual semantics of `lambda'. Furthermore, these get -translated into normal `lambda', so there is no performance -penalty. - -See `-let' for a description of the destructuring mechanism." - (declare (doc-string 2) (indent defun) - (debug (&define sexp - [&optional stringp] - [&optional ("interactive" interactive)] - def-body))) - (cond - ((nlistp match-form) - (signal 'wrong-type-argument (list #'listp match-form))) - ;; No destructuring, so just return regular `lambda' for speed. - ((-all? #'symbolp match-form) - `(lambda ,match-form ,@body)) - ((let ((inputs (--map-indexed - (list it (make-symbol (format "input%d" it-index))) - match-form))) - ;; TODO: because inputs to the `lambda' are evaluated only once, - ;; `-let*' need not create the extra bindings to ensure that. - ;; We should find a way to optimize that. Not critical however. - `(lambda ,(mapcar #'cadr inputs) - (-let* ,inputs ,@body)))))) - -(defmacro -setq (&rest forms) - "Bind each MATCH-FORM to the value of its VAL. - -MATCH-FORM destructuring is done according to the rules of `-let'. - -This macro allows you to bind multiple variables by destructuring -the value, so for example: - - (-setq (a b) x - (&plist :c c) plist) - -expands roughly speaking to the following code - - (setq a (car x) - b (cadr x) - c (plist-get plist :c)) - -Care is taken to only evaluate each VAL once so that in case of -multiple assignments it does not cause unexpected side effects. - -\(fn [MATCH-FORM VAL]...)" - (declare (debug (&rest sexp form)) - (indent 1)) - (when (= (mod (length forms) 2) 1) - (signal 'wrong-number-of-arguments (list '-setq (1+ (length forms))))) - (let* ((forms-and-sources - ;; First get all the necessary mappings with all the - ;; intermediate bindings. - (-map (lambda (x) (dash--match (car x) (cadr x))) - (-partition 2 forms))) - ;; To preserve the logic of dynamic scoping we must ensure - ;; that we `setq' the variables outside of the `let*' form - ;; which holds the destructured intermediate values. For - ;; this we generate for each variable a placeholder which is - ;; bound to (lexically) the result of the destructuring. - ;; Then outside of the helper `let*' form we bind all the - ;; original variables to their respective placeholders. - ;; TODO: There is a lot of room for possible optimization, - ;; for start playing with `special-variable-p' to eliminate - ;; unnecessary re-binding. - (variables-to-placeholders - (-mapcat - (lambda (bindings) - (-map - (lambda (binding) - (let ((var (car binding))) - (list var (make-symbol (concat "--dash-binding-" (symbol-name var) "--"))))) - (--filter (not (string-prefix-p "--" (symbol-name (car it)))) bindings))) - forms-and-sources))) - `(let ,(-map 'cadr variables-to-placeholders) - (let* ,(-flatten-n 1 forms-and-sources) - (setq ,@(-flatten (-map 'reverse variables-to-placeholders)))) - (setq ,@(-flatten variables-to-placeholders))))) - -(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. - -Note: binding is done according to `-let*'. VALS are evaluated -sequentially, and evaluation stops after the first nil VAL is -encountered." - (declare (debug ((&rest (sexp form)) form body)) - (indent 2)) - (->> vars-vals - (--mapcat (dash--match (car it) (cadr it))) - (--reduce-r-from - (let ((var (car it)) - (val (cadr it))) - `(let ((,var ,val)) - (if ,var ,acc ,@else))) - then))) - -(defmacro -if-let (var-val then &rest else) - "If VAL evaluates to non-nil, bind it to VAR and do THEN, -otherwise do ELSE. - -Note: binding is done according to `-let'. - -\(fn (VAR VAL) THEN &rest ELSE)" - (declare (debug ((sexp form) form body)) - (indent 2)) - `(-if-let* (,var-val) ,then ,@else)) - -(defmacro --if-let (val then &rest else) - "If VAL evaluates to non-nil, bind it to symbol `it' and do THEN, -otherwise do ELSE." - (declare (debug (form form body)) - (indent 2)) - `(-if-let (it ,val) ,then ,@else)) - -(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. - -Note: binding is done according to `-let*'. VALS are evaluated -sequentially, and evaluation stops after the first nil VAL is -encountered." - (declare (debug ((&rest (sexp form)) body)) - (indent 1)) - `(-if-let* ,vars-vals (progn ,@body))) - -(defmacro -when-let (var-val &rest body) - "If VAL evaluates to non-nil, bind it to VAR and execute body. - -Note: binding is done according to `-let'. - -\(fn (VAR VAL) &rest BODY)" - (declare (debug ((sexp form) body)) - (indent 1)) - `(-if-let ,var-val (progn ,@body))) - -(defmacro --when-let (val &rest body) - "If VAL evaluates to non-nil, bind it to symbol `it' and -execute body." - (declare (debug (form body)) - (indent 1)) - `(--if-let ,val (progn ,@body))) - -;; TODO: Get rid of this dynamic variable, passing it as an argument -;; instead? -(defvar -compare-fn nil - "Tests for equality use this function, or `equal' if this is nil. - -As a dynamic variable, this should be temporarily bound around -the relevant operation, rather than permanently modified. For -example: - - (let ((-compare-fn #\\='=)) - (-union \\='(1 2 3) \\='(2 3 4)))") - -(defun dash--member-fn () - "Return the flavor of `member' that goes best with `-compare-fn'." - (declare (side-effect-free error-free)) - (let ((cmp -compare-fn)) - (cond ((memq cmp '(nil equal)) #'member) - ((eq cmp #'eq) #'memq) - ((eq cmp #'eql) #'memql) - ((lambda (elt list) - (while (and list (not (funcall cmp elt (car list)))) - (pop list)) - list))))) - -(defun dash--assoc-fn () - "Return the flavor of `assoc' that goes best with `-compare-fn'." - (declare (side-effect-free error-free)) - (let ((cmp -compare-fn)) - (cond ((memq cmp '(nil equal)) #'assoc) - ((eq cmp #'eq) #'assq) - ((lambda (key alist) - ;; Since Emacs 26, `assoc' accepts a custom `testfn'. - ;; Version testing would be simpler here, but feature - ;; testing gets more brownie points, I guess. - (static-if (condition-case nil - (assoc nil () #'eql) - (wrong-number-of-arguments t)) - (--first (and (consp it) (funcall cmp (car it) key)) alist) - (assoc key alist cmp))))))) - -(defun dash--hash-test-fn () - "Return the hash table test function corresponding to `-compare-fn'. -Return nil if `-compare-fn' is not a known test function." - (declare (side-effect-free error-free)) - ;; In theory this could also recognize values that are custom - ;; `hash-table-test's, but too often the :test name is different - ;; from the equality function, so it doesn't seem worthwhile. - (car (memq (or -compare-fn #'equal) '(equal eq eql)))) - -(defvar dash--short-list-length 32 - "Maximum list length considered short, for optimizations. -For example, the speedup afforded by hash table lookup may start -to outweigh its runtime and memory overhead for problem sizes -greater than this value. See also the discussion in PR #305.") - -(defun -distinct (list) - "Return a copy of LIST with all duplicate elements removed. - -The test for equality is done with `equal', or with `-compare-fn' -if that is non-nil. - -Alias: `-uniq'." - (declare (important-return-value t)) - (let (test len) - (cond ((null list) ()) - ;; Use a hash table if `-compare-fn' is a known hash table - ;; test function and the list is long enough. - ((and (setq test (dash--hash-test-fn)) - (> (setq len (length list)) dash--short-list-length)) - (let ((ht (make-hash-table :test test :size len))) - (--filter (unless (gethash it ht) (puthash it t ht)) list))) - ((let ((member (dash--member-fn)) uniq) - (--each list (unless (funcall member it uniq) (push it uniq))) - (nreverse uniq)))))) - -(defalias '-uniq #'-distinct) - -(defun dash--size+ (size1 size2) - "Return the sum of nonnegative fixnums SIZE1 and SIZE2. -Return `most-positive-fixnum' on overflow. This ensures the -result is a valid size, particularly for allocating hash tables, -even in the presence of bignum support." - (declare (side-effect-free t)) - (if (< size1 (- most-positive-fixnum size2)) - (+ size1 size2) - most-positive-fixnum)) - -(defun -union (list1 list2) - "Return a new list of distinct elements appearing in either LIST1 or LIST2. - -The test for equality is done with `equal', or with `-compare-fn' -if that is non-nil." - (declare (important-return-value t)) - (let ((lists (list list1 list2)) test len union) - (cond ((null (or list1 list2))) - ;; Use a hash table if `-compare-fn' is a known hash table - ;; test function and the lists are long enough. - ((and (setq test (dash--hash-test-fn)) - (> (setq len (dash--size+ (length list1) (length list2))) - dash--short-list-length)) - (let ((ht (make-hash-table :test test :size len))) - (dolist (l lists) - (--each l (unless (gethash it ht) - (puthash it t ht) - (push it union)))))) - ((let ((member (dash--member-fn))) - (dolist (l lists) - (--each l (unless (funcall member it union) (push it union))))))) - (nreverse union))) - -(defun -intersection (list1 list2) - "Return a new list of distinct elements appearing in both LIST1 and LIST2. - -The test for equality is done with `equal', or with `-compare-fn' -if that is non-nil." - (declare (important-return-value t)) - (let (test len) - (cond ((null (and list1 list2)) ()) - ;; Use a hash table if `-compare-fn' is a known hash table - ;; test function and either list is long enough. - ((and (setq test (dash--hash-test-fn)) - (> (setq len (length list2)) dash--short-list-length)) - (let ((ht (make-hash-table :test test :size len))) - (--each list2 (puthash it t ht)) - ;; Remove visited elements to avoid duplicates. - (--filter (when (gethash it ht) (remhash it ht) t) list1))) - ((let ((member (dash--member-fn)) intersection) - (--each list1 (and (funcall member it list2) - (not (funcall member it intersection)) - (push it intersection))) - (nreverse intersection)))))) - -(defun -difference (list1 list2) - "Return a new list with the distinct members of LIST1 that are not in LIST2. - -The test for equality is done with `equal', or with `-compare-fn' -if that is non-nil." - (declare (important-return-value t)) - (let (test len1 len2) - (cond ((null list1) ()) - ((null list2) (-distinct list1)) - ;; Use a hash table if `-compare-fn' is a known hash table - ;; test function and the subtrahend is long enough. - ((and (setq test (dash--hash-test-fn)) - (setq len1 (length list1)) - (setq len2 (length list2)) - (> (max len1 len2) dash--short-list-length)) - (let ((ht1 (make-hash-table :test test :size len1)) - (ht2 (make-hash-table :test test :size len2))) - (--each list2 (puthash it t ht2)) - ;; Avoid duplicates by tracking visited items in `ht1'. - (--filter (unless (or (gethash it ht2) (gethash it ht1)) - (puthash it t ht1)) - list1))) - ((let ((member (dash--member-fn)) difference) - (--each list1 - (unless (or (funcall member it list2) - (funcall member it difference)) - (push it difference))) - (nreverse difference)))))) - -(defun -powerset (list) - "Return the power set of LIST." - (declare (pure t) (side-effect-free t)) - (if (null list) (list ()) - (let ((last (-powerset (cdr list)))) - (nconc (mapcar (lambda (x) (cons (car list) x)) last) - last)))) - -(defun -frequencies (list) - "Count the occurrences of each distinct element of LIST. - -Return an alist of (ELEMENT . N), where each ELEMENT occurs N -times in LIST. - -The test for equality is done with `equal', or with `-compare-fn' -if that is non-nil. - -See also `-count' and `-group-by'." - (declare (important-return-value t)) - (let (test len freqs) - (cond ((null list)) - ((and (setq test (dash--hash-test-fn)) - (> (setq len (length list)) dash--short-list-length)) - (let ((ht (make-hash-table :test test :size len))) - ;; Share structure between hash table and returned list. - ;; This affords a single pass that preserves the input - ;; order, conses less garbage, and is faster than a - ;; second traversal (e.g., with `maphash'). - (--each list - (let ((freq (gethash it ht))) - (if freq - (setcdr freq (1+ (cdr freq))) - (push (puthash it (cons it 1) ht) freqs)))))) - ((let ((assoc (dash--assoc-fn))) - (--each list - (let ((freq (funcall assoc it freqs))) - (if freq - (setcdr freq (1+ (cdr freq))) - (push (cons it 1) freqs))))))) - (nreverse freqs))) - -(defun dash--numbers<= (nums) - "Return non-nil if NUMS is a list of non-decreasing numbers." - (declare (pure t) (side-effect-free t)) - (or (null nums) - (let ((prev (pop nums))) - (and (numberp prev) - (--every (and (numberp it) (<= prev (setq prev it))) nums))))) - -(defun dash--next-lex-perm (array n) - "Update ARRAY of N numbers with its next lexicographic permutation. -Return nil if there is no such successor. N should be nonzero. - -This implements the salient steps of Algorithm L (Lexicographic -permutation generation) as described in DE Knuth's The Art of -Computer Programming, Volume 4A / Combinatorial Algorithms, -Part I, Addison-Wesley, 2011, § 7.2.1.2, p. 319." - (setq n (1- n)) - (let* ((l n) - (j (1- n)) - (al (aref array n)) - (aj al)) - ;; L2. [Find j]. - ;; Decrement j until a[j] < a[j+1]. - (while (and (<= 0 j) - (<= aj (setq aj (aref array j)))) - (setq j (1- j))) - ;; Terminate algorithm if j not found. - (when (>= j 0) - ;; L3. [Increase a[j]]. - ;; Decrement l until a[j] < a[l]. - (while (>= aj al) - (setq l (1- l) al (aref array l))) - ;; Swap a[j] and a[l]. - (aset array j al) - (aset array l aj) - ;; L4. [Reverse a[j+1]...a[n]]. - (setq l n) - (while (< (setq j (1+ j)) l) - (setq aj (aref array j)) - (aset array j (aref array l)) - (aset array l aj) - (setq l (1- l))) - array))) - -(defun dash--lex-perms (vec &optional original) - "Return a list of permutations of VEC in lexicographic order. -Specifically, return only the successors of VEC in lexicographic -order. Each returned permutation is a list. VEC should comprise -one or more numbers, and may be destructively modified. - -If ORIGINAL is a vector, then VEC is interpreted as a set of -indices into ORIGINAL. In this case, the indices are permuted, -and the resulting index permutations are used to dereference -elements of ORIGINAL." - (let ((len (length vec)) perms) - (while vec - (push (if original - (--map (aref original it) vec) - (append vec ())) - perms) - (setq vec (dash--next-lex-perm vec len))) - (nreverse perms))) - -(defun dash--uniq-perms (list) - "Return a list of permutations of LIST. -LIST is treated as if all its elements are distinct." - (let* ((vec (vconcat list)) - (idxs (copy-sequence vec))) - ;; Just construct a vector of the list's indices and permute that. - (dotimes (i (length idxs)) - (aset idxs i i)) - (dash--lex-perms idxs vec))) - -(defun dash--multi-perms (list freqs) - "Return a list of permutations of the multiset LIST. -FREQS should be an alist describing the frequency of each element -in LIST, as returned by `-frequencies'." - (let (;; Distinct items in `list', aka the cars of `freqs'. - (uniq (make-vector (length freqs) nil)) - ;; Indices into `uniq'. - (idxs (make-vector (length list) nil)) - ;; Current index into `idxs'. - (i 0)) - (--each freqs - (aset uniq it-index (car it)) - ;; Populate `idxs' with as many copies of each `it-index' as - ;; there are corresponding duplicates. - (dotimes (_ (cdr it)) - (aset idxs i it-index) - (setq i (1+ i)))) - (dash--lex-perms idxs uniq))) - -(defun -permutations (list) - "Return the distinct permutations of LIST. - -Duplicate elements of LIST are determined by `equal', or by -`-compare-fn' if that is non-nil." - (declare (important-return-value t)) - (cond ((null list) (list ())) - ;; Optimization: a traversal of `list' is faster than the - ;; round trip via `dash--uniq-perms' or `dash--multi-perms'. - ((dash--numbers<= list) - (dash--lex-perms (vconcat list))) - ((let ((freqs (-frequencies list))) - ;; Is each element distinct? - (unless (--every (= (cdr it) 1) freqs) - (dash--multi-perms list freqs)))) - ((dash--uniq-perms list)))) - -(defun -inits (list) - "Return all prefixes of LIST." - (declare (pure t) (side-effect-free t)) - (let ((res (list list))) - (setq list (reverse list)) - (while list - (push (reverse (!cdr list)) res)) - res)) - -(defun -tails (list) - "Return all suffixes of LIST." - (declare (pure t) (side-effect-free t)) - (-reductions-r-from #'cons nil list)) - -(defun -common-prefix (&rest lists) - "Return the longest common prefix of LISTS." - (declare (pure t) (side-effect-free t)) - (--reduce (--take-while (and acc (equal (pop acc) it)) it) - lists)) - -(defun -common-suffix (&rest lists) - "Return the longest common suffix of LISTS." - (declare (pure t) (side-effect-free t)) - (nreverse (apply #'-common-prefix (mapcar #'reverse lists)))) - -(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 is non-nil. As with `member', the return value is -actually the tail of LIST whose car is ELEMENT. - -Alias: `-contains-p'." - (declare (important-return-value t)) - (funcall (dash--member-fn) element list)) - -(defalias '-contains-p #'-contains?) - -(defun -same-items? (list1 list2) - "Return non-nil if LIST1 and LIST2 have the same distinct elements. - -The order of the elements in the lists does not matter. The -lists may be of different lengths, i.e., contain duplicate -elements. The test for equality is done with `equal', or with -`-compare-fn' if that is non-nil. - -Alias: `-same-items-p'." - (declare (important-return-value t)) - (let (test len1 len2) - (cond ((null (or list1 list2))) - ((null (and list1 list2)) nil) - ;; Use a hash table if `-compare-fn' is a known hash table - ;; test function and either list is long enough. - ((and (setq test (dash--hash-test-fn)) - (setq len1 (length list1)) - (setq len2 (length list2)) - (> (max len1 len2) dash--short-list-length)) - (let ((ht1 (make-hash-table :test test :size len1)) - (ht2 (make-hash-table :test test :size len2))) - (--each list1 (puthash it t ht1)) - ;; Move visited elements from `ht1' to `ht2'. This way, - ;; if visiting all of `list2' leaves `ht1' empty, then - ;; all elements from both lists have been accounted for. - (and (--every (cond ((gethash it ht1) - (remhash it ht1) - (puthash it t ht2)) - ((gethash it ht2))) - list2) - (zerop (hash-table-count ht1))))) - ((let ((member (dash--member-fn))) - (and (--all? (funcall member it list2) list1) - (--all? (funcall member it list1) list2))))))) - -(defalias '-same-items-p #'-same-items?) - -(defun -is-prefix? (prefix list) - "Return non-nil if PREFIX is a prefix of LIST. - -Alias: `-is-prefix-p'." - (declare (pure t) (side-effect-free t)) - (--each-while list (and (equal (car prefix) it) - (!cdr prefix))) - (null prefix)) - -(defun -is-suffix? (suffix list) - "Return non-nil if SUFFIX is a suffix of LIST. - -Alias: `-is-suffix-p'." - (declare (pure t) (side-effect-free t)) - (equal suffix (last list (length suffix)))) - -(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'" - (declare (pure t) (side-effect-free t)) - (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." - (declare (important-return-value t)) - (static-if (condition-case nil (sort []) (wrong-number-of-arguments)) - ;; Since Emacs 30. - (sort list :lessp comparator) - (sort (copy-sequence list) comparator))) - -(defmacro --sort (form list) - "Anaphoric form of `-sort'." - (declare (debug (def-form form))) - `(-sort (lambda (it other) (ignore it other) ,form) ,list)) - -(defun -list (&optional arg &rest args) - "Ensure ARG is a list. -If ARG is already a list, return it as is (not a copy). -Otherwise, return a new list with ARG as its only element. - -Another supported calling convention is (-list &rest ARGS). -In this case, if ARG is not a list, a new list with all of -ARGS as elements is returned. This use is supported for -backward compatibility and is otherwise deprecated." - (declare (advertised-calling-convention (arg) "2.18.0") - (pure t) (side-effect-free error-free)) - (if (listp arg) arg (cons arg args))) - -(defun -repeat (n x) - "Return a new list of length N with each element being X. -Return nil if N is less than 1." - (declare (side-effect-free t)) - (and (>= n 0) (make-list n x))) - -(defun -sum (list) - "Return the sum of LIST." - (declare (pure t) (side-effect-free t)) - (apply #'+ list)) - -(defun -running-sum (list) - "Return a list with running sums of items in LIST. -LIST must be non-empty." - (declare (pure t) (side-effect-free t)) - (or list (signal 'wrong-type-argument (list #'consp list))) - (-reductions #'+ list)) - -(defun -product (list) - "Return the product of LIST." - (declare (pure t) (side-effect-free t)) - (apply #'* list)) - -(defun -running-product (list) - "Return a list with running products of items in LIST. -LIST must be non-empty." - (declare (pure t) (side-effect-free t)) - (or list (signal 'wrong-type-argument (list #'consp list))) - (-reductions #'* list)) - -(defun -max (list) - "Return the largest value from LIST of numbers or markers." - (declare (pure t) (side-effect-free t)) - (apply #'max list)) - -(defun -min (list) - "Return the smallest value from LIST of numbers or markers." - (declare (pure t) (side-effect-free t)) - (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." - (declare (important-return-value t)) - (--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." - (declare (important-return-value t)) - (--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 (def-form form))) - `(-max-by (lambda (it other) (ignore 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 (def-form form))) - `(-min-by (lambda (it other) (ignore it other) ,form) ,list)) - -(defun -iota (count &optional start step) - "Return a list containing COUNT numbers. -Starts from START and adds STEP each time. The default START is -zero, the default STEP is 1. -This function takes its name from the corresponding primitive in -the APL language." - (declare (side-effect-free t)) - (unless (natnump count) - (signal 'wrong-type-argument (list #'natnump count))) - (or start (setq start 0)) - (or step (setq step 1)) - (if (zerop step) - (make-list count start) - (--iterate (+ it step) start count))) - -(defun -fix (fn list) - "Compute the (least) fixpoint of FN with initial input LIST. - -FN is called at least once, results are compared with `equal'." - (declare (important-return-value t)) - (let ((re (funcall fn list))) - (while (not (equal list re)) - (setq list re) - (setq re (funcall fn re))) - re)) - -(defmacro --fix (form list) - "Anaphoric form of `-fix'." - (declare (debug (def-form form))) - `(-fix (lambda (it) (ignore it) ,form) ,list)) - -(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." - (declare (important-return-value t)) - (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 (def-form form))) - `(-unfold (lambda (it) (ignore it) ,form) ,seed)) - -(defun -cons-pair? (obj) - "Return non-nil if OBJ is a true cons pair. -That is, a cons (A . B) where B is not a list. - -Alias: `-cons-pair-p'." - (declare (pure t) (side-effect-free error-free)) - (nlistp (cdr-safe obj))) - -(defalias '-cons-pair-p '-cons-pair?) - -(defun -cons-to-list (con) - "Convert a cons pair to a list with `car' and `cdr' of the pair respectively." - (declare (pure t) (side-effect-free t)) - (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." - (declare (pure t) (side-effect-free t)) - (if (-cons-pair? val) (-cons-to-list val) (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." - (declare (important-return-value t)) - (cond - ((null tree) ()) - ((-cons-pair? tree) (funcall fn tree)) - ((consp tree) - (-reduce-r-from - folder init-value - (mapcar (lambda (x) (-tree-mapreduce-from fn folder init-value x)) tree))) - ((funcall fn tree)))) - -(defmacro --tree-mapreduce-from (form folder init-value tree) - "Anaphoric form of `-tree-mapreduce-from'." - (declare (debug (def-form def-form form form))) - `(-tree-mapreduce-from (lambda (it) (ignore it) ,form) - (lambda (it acc) (ignore 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." - (declare (important-return-value t)) - (cond - ((null tree) ()) - ((-cons-pair? tree) (funcall fn tree)) - ((consp tree) - (-reduce-r folder (mapcar (lambda (x) (-tree-mapreduce fn folder x)) tree))) - ((funcall fn tree)))) - -(defmacro --tree-mapreduce (form folder tree) - "Anaphoric form of `-tree-mapreduce'." - (declare (debug (def-form def-form form))) - `(-tree-mapreduce (lambda (it) (ignore it) ,form) - (lambda (it acc) (ignore it acc) ,folder) - ,tree)) - -(defun -tree-map (fn tree) - "Apply FN to each element of TREE while preserving the tree structure." - (declare (important-return-value t)) - (cond - ((null tree) ()) - ((-cons-pair? tree) (funcall fn tree)) - ((consp tree) - (mapcar (lambda (x) (-tree-map fn x)) tree)) - ((funcall fn tree)))) - -(defmacro --tree-map (form tree) - "Anaphoric form of `-tree-map'." - (declare (debug (def-form form))) - `(-tree-map (lambda (it) (ignore 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." - (declare (important-return-value t)) - (cond - ((null tree) ()) - ((-cons-pair? tree) tree) - ((consp tree) - (-reduce-r-from - fn init-value - (mapcar (lambda (x) (-tree-reduce-from fn init-value x)) tree))) - (tree))) - -(defmacro --tree-reduce-from (form init-value tree) - "Anaphoric form of `-tree-reduce-from'." - (declare (debug (def-form form form))) - `(-tree-reduce-from (lambda (it acc) (ignore 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." - (declare (important-return-value t)) - (cond - ((null tree) ()) - ((-cons-pair? tree) tree) - ((consp tree) - (-reduce-r fn (mapcar (lambda (x) (-tree-reduce fn x)) tree))) - (tree))) - -(defmacro --tree-reduce (form tree) - "Anaphoric form of `-tree-reduce'." - (declare (debug (def-form form))) - `(-tree-reduce (lambda (it acc) (ignore 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." - (cond ((funcall pred tree) (funcall fun tree)) - ((and (listp tree) (listp (cdr 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'." - (declare (debug (def-form def-form form))) - `(-tree-map-nodes (lambda (it) (ignore it) ,pred) - (lambda (it) (ignore 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." - (declare (important-return-value t)) - (cons tree - (and (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'." - (declare (debug (def-form def-form form))) - `(-tree-seq (lambda (it) (ignore it) ,branch) - (lambda (it) (ignore 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." - (declare (side-effect-free t)) - (-tree-map #'identity list)) - -;;; Combinators - -(defalias '-partial #'apply-partially - "Return a function that is a partial application of FUN to ARGS. -ARGS is a list of the first N arguments to pass to FUN. -The result is a new function which does the same as FUN, except that -the first N arguments are fixed at the values with which this function -was called. -\n(fn FUN &rest ARGS)") - -(defun -rpartial (fn &rest args) - "Return a function that is a partial application of FN to ARGS. -ARGS is a list of the last N arguments to pass to FN. The result -is a new function which does the same as FN, except that the last -N arguments are fixed at the values with which this function was -called. This is like `-partial', except the arguments are fixed -starting from the right rather than the left." - (declare (pure t) (side-effect-free error-free)) - (lambda (&rest args-before) (apply fn (append args-before args)))) - -(defun -juxt (&rest fns) - "Return a function that is the juxtaposition of FNS. -The returned function takes a variable number of ARGS, applies -each of FNS in turn to ARGS, and returns the list of results." - (declare (pure t) (side-effect-free error-free)) - (lambda (&rest args) (mapcar (lambda (x) (apply x args)) fns))) - -(defun -compose (&rest fns) - "Compose FNS into a single composite function. -Return a function that takes a variable number of ARGS, applies -the last function in FNS to ARGS, and returns the result of -calling each remaining function on the result of the previous -function, right-to-left. If no FNS are given, return a variadic -`identity' function." - (declare (pure t) (side-effect-free error-free)) - (let* ((fns (nreverse fns)) - (head (car fns)) - (tail (cdr fns))) - (cond (tail - (lambda (&rest args) - (--reduce-from (funcall it acc) (apply head args) tail))) - (fns head) - ((lambda (&optional arg &rest _) arg))))) - -(defun -applify (fn) - "Return a function that applies FN to a single list of args. -This changes the arity of FN from taking N distinct arguments to -taking 1 argument which is a list of N arguments." - (declare (pure t) (side-effect-free error-free)) - (lambda (args) (apply fn args))) - -(defun -on (op trans) - "Return a function that calls TRANS on each arg and OP on the results. -The returned function takes a variable number of arguments, calls -the function TRANS on each one in turn, and then passes those -results as the list of arguments to OP, in the same order. - -For example, the following pairs of expressions are morally -equivalent: - - (funcall (-on #\\='+ #\\='1+) 1 2 3) = (+ (1+ 1) (1+ 2) (1+ 3)) - (funcall (-on #\\='+ #\\='1+)) = (+)" - (declare (pure t) (side-effect-free error-free)) - (lambda (&rest args) - ;; This unrolling seems to be a relatively cheap way to keep the - ;; overhead of `mapcar' + `apply' in check. - (cond ((cddr args) - (apply op (mapcar trans args))) - ((cdr args) - (funcall op (funcall trans (car args)) (funcall trans (cadr args)))) - (args - (funcall op (funcall trans (car args)))) - ((funcall op))))) - -(defun -flip (fn) - "Return a function that calls FN with its arguments reversed. -The returned function takes the same number of arguments as FN. - -For example, the following two expressions are morally -equivalent: - - (funcall (-flip #\\='-) 1 2) = (- 2 1) - -See also: `-rotate-args'." - (declare (pure t) (side-effect-free error-free)) - (lambda (&rest args) ;; Open-code for speed. - (cond ((cddr args) (apply fn (nreverse args))) - ((cdr args) (funcall fn (cadr args) (car args))) - (args (funcall fn (car args))) - ((funcall fn))))) - -(defun -rotate-args (n fn) - "Return a function that calls FN with args rotated N places to the right. -The returned function takes the same number of arguments as FN, -rotates the list of arguments N places to the right (left if N is -negative) just like `-rotate', and applies FN to the result. - -See also: `-flip'." - (declare (pure t) (side-effect-free t)) - (if (zerop n) - fn - (let ((even (= (% n 2) 0))) - (lambda (&rest args) - (cond ((cddr args) ;; Open-code for speed. - (apply fn (-rotate n args))) - ((cdr args) - (let ((fst (car args)) - (snd (cadr args))) - (funcall fn (if even fst snd) (if even snd fst)))) - (args - (funcall fn (car args))) - ((funcall fn))))))) - -(defun -const (c) - "Return a function that returns C ignoring any additional arguments. - -In types: a -> b -> a" - (declare (pure t) (side-effect-free error-free)) - (lambda (&rest _) c)) - -(defmacro -cut (&rest params) - "Take n-ary function and n arguments and specialize some of them. -Arguments denoted by <> will be left unspecialized. - -See SRFI-26 for detailed description." - (declare (debug (&optional sexp &rest &or "<>" form))) - (let* ((i 0) - (args (--keep (when (eq it '<>) - (setq i (1+ i)) - (make-symbol (format "D%d" i))) - params))) - `(lambda ,args - ,(let ((body (--map (if (eq it '<>) (pop args) it) params))) - (if (eq (car params) '<>) - (cons #'funcall body) - body))))) - -(defun -not (pred) - "Return a predicate that negates the result of PRED. -The returned predicate passes its arguments to PRED. If PRED -returns nil, the result is non-nil; otherwise the result is nil. - -See also: `-andfn' and `-orfn'." - (declare (pure t) (side-effect-free error-free)) - (lambda (&rest args) (not (apply pred args)))) - -(defun -orfn (&rest preds) - "Return a predicate that returns the first non-nil result of PREDS. -The returned predicate takes a variable number of arguments, -passes them to each predicate in PREDS in turn until one of them -returns non-nil, and returns that non-nil result without calling -the remaining PREDS. If all PREDS return nil, or if no PREDS are -given, the returned predicate returns nil. - -See also: `-andfn' and `-not'." - (declare (pure t) (side-effect-free error-free)) - ;; Open-code for speed. - (cond ((cdr preds) (lambda (&rest args) (--some (apply it args) preds))) - (preds (car preds)) - (#'ignore))) - -(defun -andfn (&rest preds) - "Return a predicate that returns non-nil if all PREDS do so. -The returned predicate P takes a variable number of arguments and -passes them to each predicate in PREDS in turn. If any one of -PREDS returns nil, P also returns nil without calling the -remaining PREDS. If all PREDS return non-nil, P returns the last -such value. If no PREDS are given, P always returns non-nil. - -See also: `-orfn' and `-not'." - (declare (pure t) (side-effect-free error-free)) - ;; Open-code for speed. - (cond ((cdr preds) (lambda (&rest args) (--every (apply it args) preds))) - (preds (car preds)) - ((static-if (fboundp 'always) - #'always - (lambda (&rest _) t))))) - -(defun -iteratefn (fn n) - "Return a function FN composed N times with itself. - -FN is a unary function. If you need to use a function of higher -arity, use `-applify' first to turn it into a unary function. - -With n = 0, this acts as identity function. - -In types: (a -> a) -> Int -> a -> a. - -This function satisfies the following law: - - (funcall (-iteratefn fn n) init) = (-last-item (-iterate fn init (1+ n)))." - (declare (pure t) (side-effect-free error-free)) - (lambda (x) (--dotimes n (setq x (funcall fn x))) x)) - -(defun -counter (&optional beg end inc) - "Return a closure that counts from BEG to END, with increment INC. - -The closure will return the next value in the counting sequence -each time it is called, and nil after END is reached. BEG -defaults to 0, INC defaults to 1, and if END is nil, the counter -will increment indefinitely. - -The closure accepts any number of arguments, which are discarded." - (declare (pure t) (side-effect-free error-free)) - (let ((inc (or inc 1)) - (n (or beg 0))) - (lambda (&rest _) - (when (or (not end) (< n end)) - (prog1 n - (setq n (+ n inc))))))) - -(defvar -fixfn-max-iterations 1000 - "The default maximum number of iterations performed by `-fixfn' - unless otherwise specified.") - -(defun -fixfn (fn &optional equal-test halt-test) - "Return a function that computes the (least) fixpoint of FN. - -FN must be a unary function. The returned lambda takes a single -argument, X, the initial value for the fixpoint iteration. The -iteration halts when either of the following conditions is satisfied: - - 1. Iteration converges to the fixpoint, with equality being - tested using EQUAL-TEST. If EQUAL-TEST is not specified, - `equal' is used. For functions over the floating point - numbers, it may be necessary to provide an appropriate - approximate comparison test. - - 2. HALT-TEST returns a non-nil value. HALT-TEST defaults to a - simple counter that returns t after `-fixfn-max-iterations', - to guard against infinite iteration. Otherwise, HALT-TEST - must be a function that accepts a single argument, the - current value of X, and returns non-nil as long as iteration - should continue. In this way, a more sophisticated - convergence test may be supplied by the caller. - -The return value of the lambda is either the fixpoint or, if -iteration halted before converging, a cons with car `halted' and -cdr the final output from HALT-TEST. - -In types: (a -> a) -> a -> a." - (declare (important-return-value t)) - (let ((eqfn (or equal-test 'equal)) - (haltfn (or halt-test - (-not - (-counter 0 -fixfn-max-iterations))))) - (lambda (x) - (let ((re (funcall fn x)) - (halt? (funcall haltfn x))) - (while (and (not halt?) (not (funcall eqfn x re))) - (setq x re - re (funcall fn re) - halt? (funcall haltfn re))) - (if halt? (cons 'halted halt?) - re))))) - -(defun -prodfn (&rest fns) - "Return a function that applies each of FNS to each of a list of arguments. - -Takes a list of N functions and returns a function that takes a -list of length N, applying Ith function to Ith element of the -input list. Returns a list of length N. - -In types (for N=2): ((a -> b), (c -> d)) -> (a, c) -> (b, d) - -This function satisfies the following laws: - - (-compose (-prodfn f g ...) - (-prodfn f\\=' g\\=' ...)) - = (-prodfn (-compose f f\\=') - (-compose g g\\=') - ...) - - (-prodfn f g ...) - = (-juxt (-compose f (-partial #\\='nth 0)) - (-compose g (-partial #\\='nth 1)) - ...) - - (-compose (-prodfn f g ...) - (-juxt f\\=' g\\=' ...)) - = (-juxt (-compose f f\\=') - (-compose g g\\=') - ...) - - (-compose (-partial #\\='nth n) - (-prod f1 f2 ...)) - = (-compose fn (-partial #\\='nth n))" - (declare (pure t) (side-effect-free t)) - (lambda (x) (--zip-with (funcall it other) fns x))) - -;;; Font lock - -(defvar dash--keywords - `(;; TODO: Do not fontify the following automatic variables - ;; globally; detect and limit to their local anaphoric scope. - (,(rx symbol-start (| "acc" "it" "it-index" "other") symbol-end) - . 'font-lock-variable-name-face) - ;; Macros in dev/examples.el. Based on `lisp-mode-symbol-regexp'. - (,(rx ?\( (group (| "defexamples" "def-example-group")) symbol-end - (+ (in "\t ")) - (group (* (| (syntax word) (syntax symbol) (: ?\\ nonl))))) - (1 'font-lock-keyword-face) - (2 'font-lock-function-name-face)) - ;; Symbols in dev/examples.el. - ,(rx symbol-start (| "=>" "~>" "!!>") symbol-end) - ;; Elisp macro fontification was static prior to Emacs 25. - ,@(when (< emacs-major-version 25) - (let ((macs '("!cdr" - "!cons" - "-->" - "--all-p" - "--all?" - "--annotate" - "--any" - "--any-p" - "--any?" - "--count" - "--dotimes" - "--doto" - "--drop-while" - "--each" - "--each-indexed" - "--each-r" - "--each-r-while" - "--each-while" - "--every" - "--every-p" - "--every?" - "--filter" - "--find" - "--find-index" - "--find-indices" - "--find-last-index" - "--first" - "--fix" - "--group-by" - "--if-let" - "--iterate" - "--keep" - "--last" - "--map" - "--map-first" - "--map-indexed" - "--map-last" - "--map-when" - "--mapcat" - "--max-by" - "--min-by" - "--none-p" - "--none?" - "--only-some-p" - "--only-some?" - "--partition-after-pred" - "--partition-by" - "--partition-by-header" - "--reduce" - "--reduce-from" - "--reduce-r" - "--reduce-r-from" - "--reductions" - "--reductions-from" - "--reductions-r" - "--reductions-r-from" - "--reject" - "--reject-first" - "--reject-last" - "--remove" - "--remove-first" - "--remove-last" - "--replace-where" - "--select" - "--separate" - "--some" - "--some-p" - "--some?" - "--sort" - "--splice" - "--splice-list" - "--split-when" - "--split-with" - "--take-while" - "--tree-map" - "--tree-map-nodes" - "--tree-mapreduce" - "--tree-mapreduce-from" - "--tree-reduce" - "--tree-reduce-from" - "--tree-seq" - "--unfold" - "--update-at" - "--when-let" - "--zip-with" - "->" - "->>" - "-as->" - "-cut" - "-doto" - "-if-let" - "-if-let*" - "-lambda" - "-let" - "-let*" - "-setq" - "-some-->" - "-some->" - "-some->>" - "-split-on" - "-when-let" - "-when-let*"))) - `((,(concat "(" (regexp-opt macs 'symbols)) . 1))))) - "Font lock keywords for `dash-fontify-mode'.") - -(defcustom dash-fontify-mode-lighter nil - "Mode line lighter for `dash-fontify-mode'. -Either a string to display in the mode line when -`dash-fontify-mode' is on, or nil to display -nothing (the default)." - :package-version '(dash . "2.18.0") - :type '(choice (string :tag "Lighter" :value " Dash") - (const :tag "Nothing" nil))) - -;;;###autoload -(define-minor-mode dash-fontify-mode - "Toggle fontification of Dash special variables. - -Dash-Fontify mode is a buffer-local minor mode intended for Emacs -Lisp buffers. Enabling it causes the special variables bound in -anaphoric Dash macros to be fontified. These anaphoras include -`it', `it-index', `acc', and `other'. In older Emacs versions -which do not dynamically detect macros, Dash-Fontify mode -additionally fontifies Dash macro calls. - -See also `dash-fontify-mode-lighter' and -`global-dash-fontify-mode'." - :lighter dash-fontify-mode-lighter - (if dash-fontify-mode - (font-lock-add-keywords nil dash--keywords t) - (font-lock-remove-keywords nil dash--keywords)) - (static-if (fboundp 'font-lock-flush) - ;; Added in Emacs 25. - (font-lock-flush) - (when font-lock-mode - ;; Unconditionally enables `font-lock-mode' and is marked - ;; `interactive-only' in later Emacs versions which have - ;; `font-lock-flush'. - (font-lock-fontify-buffer)))) - -(defun dash--turn-on-fontify-mode () - "Enable `dash-fontify-mode' if in an Emacs Lisp buffer." - (when (derived-mode-p #'emacs-lisp-mode) - (dash-fontify-mode))) - -;;;###autoload -(define-globalized-minor-mode global-dash-fontify-mode - dash-fontify-mode dash--turn-on-fontify-mode) - -(defcustom dash-enable-fontlock nil - "If non-nil, fontify Dash macro calls and special variables." - :set (lambda (sym val) - (set-default sym val) - (global-dash-fontify-mode (if val 1 0))) - :type 'boolean) - -(make-obsolete-variable - 'dash-enable-fontlock #'global-dash-fontify-mode "2.18.0") - -(define-obsolete-function-alias - 'dash-enable-font-lock #'global-dash-fontify-mode "2.18.0") - -;;; Info - -(defvar dash--info-doc-spec '("(dash) Index" nil "^ -+ .*: " "\\( \\|$\\)") - "The Dash :doc-spec entry for `info-lookup-alist'. -It is based on that for `emacs-lisp-mode'.") - -(defun dash--info-elisp-docs () - "Return the `emacs-lisp-mode' symbol docs from `info-lookup-alist'. -Specifically, return the cons containing their -`info-lookup->doc-spec' so that we can modify it." - (defvar info-lookup-alist) - (nthcdr 3 (assq #'emacs-lisp-mode (cdr (assq 'symbol info-lookup-alist))))) - -;;;###autoload -(defun dash-register-info-lookup () - "Register the Dash Info manual with `info-lookup-symbol'. -This allows Dash symbols to be looked up with \\[info-lookup-symbol]." - (interactive) - (require 'info-look) - (let ((docs (dash--info-elisp-docs))) - (setcar docs (append (car docs) (list dash--info-doc-spec))) - (info-lookup-reset))) - -(defun dash-unload-function () - "Remove Dash from `info-lookup-alist'. -Used by `unload-feature', which see." - (let ((docs (and (featurep 'info-look) - (dash--info-elisp-docs)))) - (when (member dash--info-doc-spec (car docs)) - (setcar docs (remove dash--info-doc-spec (car docs))) - (info-lookup-reset))) - nil) - -(provide 'dash) -;;; dash.el ends here diff --git a/elpa/dash-2.20.0/dash.info b/elpa/dash-2.20.0/dash.info deleted file mode 100644 index 6c0ef89..0000000 --- a/elpa/dash-2.20.0/dash.info +++ /dev/null @@ -1,4954 +0,0 @@ -This is dash.info, produced by makeinfo version 6.8 from dash.texi. - -This manual is for Dash version 2.20.0. - - Copyright © 2012–2025 Free Software Foundation, Inc. - - Permission is granted to copy, distribute and/or modify this - document under the terms of the GNU Free Documentation License, - Version 1.3 or any later version published by the Free Software - Foundation; with the Invariant Sections being “GNU General Public - License,” and no Front-Cover Texts or Back-Cover Texts. A copy of - the license is included in the section entitled “GNU Free - Documentation License”. -INFO-DIR-SECTION Emacs -START-INFO-DIR-ENTRY -* Dash: (dash.info). A modern list library for GNU Emacs. -END-INFO-DIR-ENTRY - - -File: dash.info, Node: Top, Next: Installation, Up: (dir) - -Dash -**** - -This manual is for Dash version 2.20.0. - - Copyright © 2012–2025 Free Software Foundation, Inc. - - Permission is granted to copy, distribute and/or modify this - document under the terms of the GNU Free Documentation License, - Version 1.3 or any later version published by the Free Software - Foundation; with the Invariant Sections being “GNU General Public - License,” and no Front-Cover Texts or Back-Cover Texts. A copy of - the license is included in the section entitled “GNU Free - Documentation License”. - -* Menu: - -* Installation:: Installing and configuring Dash. -* Functions:: Dash API reference. -* Development:: Contributing to Dash development. - -Appendices - -* FDL:: The license for this documentation. -* GPL:: Conditions for copying and changing Dash. -* Index:: Index including functions and macros. - - — The Detailed Node Listing — - -Installation - -* Using in a package:: Listing Dash as a package dependency. -* Fontification of special variables:: Font Lock of anaphoric macro variables. -* Info symbol lookup:: Looking up Dash symbols in this manual. - -Functions - -* Maps:: -* Sublist selection:: -* List to list:: -* Reductions:: -* Unfolding:: -* Predicates:: -* Partitioning:: -* Indexing:: -* Set operations:: -* Other list operations:: -* Tree operations:: -* Threading macros:: -* Binding:: -* Side effects:: -* Destructive operations:: -* Function combinators:: - -Development - -* Contribute:: How to contribute. -* Contributors:: List of contributors. - - -File: dash.info, Node: Installation, Next: Functions, Prev: Top, Up: Top - -1 Installation -************** - -Dash is available on GNU ELPA (https://elpa.gnu.org/), GNU-devel ELPA -(https://elpa.gnu.org/devel/), and MELPA (https://melpa.org/), and can -be installed with the standard command ‘package-install’ (*note -(emacs)Package Installation::). - -‘M-x package-install dash ’ - Install the Dash library. - - Alternatively, you can just dump ‘dash.el’ in your ‘load-path’ -somewhere (*note (emacs)Lisp Libraries::). - -* Menu: - -* Using in a package:: Listing Dash as a package dependency. -* Fontification of special variables:: Font Lock of anaphoric macro variables. -* Info symbol lookup:: Looking up Dash symbols in this manual. - - -File: dash.info, Node: Using in a package, Next: Fontification of special variables, Up: Installation - -1.1 Using in a package -====================== - -If you use Dash in your own package, be sure to list it as a dependency -in the library’s headers as follows (*note (elisp)Library Headers::). - - ;; Package-Requires: ((dash "2.20.0")) - - -File: dash.info, Node: Fontification of special variables, Next: Info symbol lookup, Prev: Using in a package, Up: Installation - -1.2 Fontification of special variables -====================================== - -The autoloaded minor mode ‘dash-fontify-mode’ is provided for optional -fontification of anaphoric Dash variables (‘it’, ‘acc’, etc.) in Emacs -Lisp buffers using search-based Font Lock (*note (emacs)Font Lock::). -In older Emacs versions which do not dynamically detect macros, the -minor mode also fontifies calls to Dash macros. - - To automatically enable the minor mode in all Emacs Lisp buffers, -just call its autoloaded global counterpart ‘global-dash-fontify-mode’, -either interactively or from your ‘user-init-file’: - - (global-dash-fontify-mode) - - -File: dash.info, Node: Info symbol lookup, Prev: Fontification of special variables, Up: Installation - -1.3 Info symbol lookup -====================== - -While editing Elisp files, you can use ‘C-h S’ (‘info-lookup-symbol’) to -look up Elisp symbols in the relevant Info manuals (*note (emacs)Info -Lookup::). To enable the same for Dash symbols, use the command -‘dash-register-info-lookup’. It can be called directly when needed, or -automatically from your ‘user-init-file’. For example: - - (with-eval-after-load 'info-look - (dash-register-info-lookup)) - - -File: dash.info, Node: Functions, Next: Development, Prev: Installation, Up: Top - -2 Functions -*********** - -This chapter contains reference documentation for the Dash API -(Application Programming Interface). The names of all public functions -defined in the library are prefixed with a dash character (‘-’). - - The library also provides anaphoric macro versions of functions where -that makes sense. The names of these macros are prefixed with two -dashes (‘--’) instead of one. - - For instance, while the function ‘-map’ applies a function to each -element of a list, its anaphoric counterpart ‘--map’ evaluates a form -with the local variable ‘it’ temporarily bound to the current list -element instead. - - ;; Normal version. - (-map (lambda (n) (* n n)) '(1 2 3 4)) - ⇒ (1 4 9 16) - - ;; Anaphoric version. - (--map (* it it) '(1 2 3 4)) - ⇒ (1 4 9 16) - - The normal version can, of course, also be written as in the -following example, which demonstrates the utility of both versions. - - (defun my-square (n) - "Return N multiplied by itself." - (* n n)) - - (-map #'my-square '(1 2 3 4)) - ⇒ (1 4 9 16) - -* Menu: - -* Maps:: -* Sublist selection:: -* List to list:: -* Reductions:: -* Unfolding:: -* Predicates:: -* Partitioning:: -* Indexing:: -* Set operations:: -* Other list operations:: -* Tree operations:: -* Threading macros:: -* Binding:: -* Side effects:: -* Destructive operations:: -* Function combinators:: - - -File: dash.info, Node: Maps, Next: Sublist selection, Up: Functions - -2.1 Maps -======== - -Functions in this category take a transforming function, which is then -applied sequentially to each or selected elements of the input list. -The results are collected in order and returned as a new list. - - -- Function: -map (fn list) - Apply FN to each item in LIST and return the list of results. - - This function’s anaphoric counterpart is ‘--map’. - - (-map (lambda (num) (* num num)) '(1 2 3 4)) - ⇒ (1 4 9 16) - (-map #'1+ '(1 2 3 4)) - ⇒ (2 3 4 5) - (--map (* it it) '(1 2 3 4)) - ⇒ (1 4 9 16) - - -- Function: -map-when (pred rep list) - Use PRED to conditionally apply REP to each item in LIST. Return a - copy of LIST where the items for which PRED returns ‘nil’ are - unchanged, and the rest are mapped through the REP function. - - Alias: ‘-replace-where’ - - See also: ‘-update-at’ (*note -update-at::) - - (-map-when 'even? 'square '(1 2 3 4)) - ⇒ (1 4 3 16) - (--map-when (> it 2) (* it it) '(1 2 3 4)) - ⇒ (1 2 9 16) - (--map-when (= it 2) 17 '(1 2 3 4)) - ⇒ (1 17 3 4) - - -- Function: -map-first (pred rep list) - Use PRED to determine the first item in LIST to call REP on. - Return a copy of LIST where the first item for which PRED returns - non-‘nil’ is replaced with the result of calling REP on that item. - - See also: ‘-map-when’ (*note -map-when::), ‘-replace-first’ (*note - -replace-first::) - - (-map-first 'even? 'square '(1 2 3 4)) - ⇒ (1 4 3 4) - (--map-first (> it 2) (* it it) '(1 2 3 4)) - ⇒ (1 2 9 4) - (--map-first (= it 2) 17 '(1 2 3 2)) - ⇒ (1 17 3 2) - - -- Function: -map-last (pred rep list) - Use PRED to determine the last item in LIST to call REP on. Return - a copy of LIST where the last item for which PRED returns non-‘nil’ - is replaced with the result of calling REP on that item. - - See also: ‘-map-when’ (*note -map-when::), ‘-replace-last’ (*note - -replace-last::) - - (-map-last 'even? 'square '(1 2 3 4)) - ⇒ (1 2 3 16) - (--map-last (> it 2) (* it it) '(1 2 3 4)) - ⇒ (1 2 3 16) - (--map-last (= it 2) 17 '(1 2 3 2)) - ⇒ (1 2 3 17) - - -- Function: -map-indexed (fn list) - Apply FN to each index and item in LIST and return the list of - results. This is like ‘-map’ (*note -map::), but FN takes two - arguments: the index of the current element within LIST, and the - element itself. - - This function’s anaphoric counterpart is ‘--map-indexed’. - - For a side-effecting variant, see also ‘-each-indexed’ (*note - -each-indexed::). - - (-map-indexed (lambda (index item) (- item index)) '(1 2 3 4)) - ⇒ (1 1 1 1) - (--map-indexed (- it it-index) '(1 2 3 4)) - ⇒ (1 1 1 1) - (-map-indexed #'* '(1 2 3 4)) - ⇒ (0 2 6 12) - - -- Function: -annotate (fn list) - Pair each item in LIST with the result of passing it to FN. - - Return an alist of (RESULT . ITEM), where each ITEM is the - corresponding element of LIST, and RESULT is the value obtained by - calling FN on ITEM. - - This function’s anaphoric counterpart is ‘--annotate’. - - (-annotate #'1+ '(1 2 3)) - ⇒ ((2 . 1) (3 . 2) (4 . 3)) - (-annotate #'length '((f o o) (bar baz))) - ⇒ ((3 f o o) (2 bar baz)) - (--annotate (> it 1) '(0 1 2 3)) - ⇒ ((nil . 0) (nil . 1) (t . 2) (t . 3)) - - -- Function: -splice (pred fun list) - Splice lists generated by FUN in place of items satisfying PRED in - LIST. - - Call PRED on each element of LIST. Whenever the result of PRED is - ‘nil’, leave that ‘it’ as-is. Otherwise, call FUN on the same ‘it’ - that satisfied PRED. The result should be a (possibly empty) list - of items to splice in place of ‘it’ in LIST. - - This can be useful as an alternative to the ‘,@’ construct in a ‘`’ - structure, in case you need to splice several lists at marked - positions (for example with keywords). - - This function’s anaphoric counterpart is ‘--splice’. - - See also: ‘-splice-list’ (*note -splice-list::), ‘-insert-at’ - (*note -insert-at::). - - (-splice #'numberp (lambda (n) (list n n)) '(a 1 b 2)) - ⇒ (a 1 1 b 2 2) - (--splice t (list it it) '(1 2 3 4)) - ⇒ (1 1 2 2 3 3 4 4) - (--splice (eq it :magic) '((magical) (code)) '((foo) :magic (bar))) - ⇒ ((foo) (magical) (code) (bar)) - - -- Function: -splice-list (pred new-list list) - Splice NEW-LIST in place of elements matching PRED in LIST. - - See also: ‘-splice’ (*note -splice::), ‘-insert-at’ (*note - -insert-at::) - - (-splice-list 'keywordp '(a b c) '(1 :foo 2)) - ⇒ (1 a b c 2) - (-splice-list 'keywordp nil '(1 :foo 2)) - ⇒ (1 2) - (--splice-list (keywordp it) '(a b c) '(1 :foo 2)) - ⇒ (1 a b c 2) - - -- Function: -mapcat (fn list) - Return the concatenation of the result of mapping FN over LIST. - Thus function FN should return a list. - - (-mapcat 'list '(1 2 3)) - ⇒ (1 2 3) - (-mapcat (lambda (item) (list 0 item)) '(1 2 3)) - ⇒ (0 1 0 2 0 3) - (--mapcat (list 0 it) '(1 2 3)) - ⇒ (0 1 0 2 0 3) - - -- Function: -copy (list) - Create a shallow copy of LIST. The elements of LIST are not - copied; they are shared with the original. - - (-copy '(1 2 3)) - ⇒ (1 2 3) - (let ((a '(1 2 3))) (eq a (-copy a))) - ⇒ nil - - -File: dash.info, Node: Sublist selection, Next: List to list, Prev: Maps, Up: Functions - -2.2 Sublist selection -===================== - -Functions returning a sublist of the original list. - - -- Function: -filter (pred list) - Return a new list of the items in LIST for which PRED returns - non-‘nil’. - - Alias: ‘-select’. - - This function’s anaphoric counterpart is ‘--filter’. - - For similar operations, see also ‘-keep’ (*note -keep::) and - ‘-remove’ (*note -remove::). - - (-filter (lambda (num) (= 0 (% num 2))) '(1 2 3 4)) - ⇒ (2 4) - (-filter #'natnump '(-2 -1 0 1 2)) - ⇒ (0 1 2) - (--filter (= 0 (% it 2)) '(1 2 3 4)) - ⇒ (2 4) - - -- Function: -remove (pred list) - Return a new list of the items in LIST for which PRED returns - ‘nil’. - - Alias: ‘-reject’. - - This function’s anaphoric counterpart is ‘--remove’. - - For similar operations, see also ‘-keep’ (*note -keep::) and - ‘-filter’ (*note -filter::). - - (-remove (lambda (num) (= 0 (% num 2))) '(1 2 3 4)) - ⇒ (1 3) - (-remove #'natnump '(-2 -1 0 1 2)) - ⇒ (-2 -1) - (--remove (= 0 (% it 2)) '(1 2 3 4)) - ⇒ (1 3) - - -- Function: -remove-first (pred list) - Remove the first item from LIST for which PRED returns non-‘nil’. - This is a non-destructive operation, but only the front of LIST - leading up to the removed item is a copy; the rest is LIST’s - original tail. If no item is removed, then the result is a - complete copy. - - Alias: ‘-reject-first’. - - This function’s anaphoric counterpart is ‘--remove-first’. - - See also ‘-map-first’ (*note -map-first::), ‘-remove-item’ (*note - -remove-item::), and ‘-remove-last’ (*note -remove-last::). - - (-remove-first #'natnump '(-2 -1 0 1 2)) - ⇒ (-2 -1 1 2) - (-remove-first #'stringp '(1 2 "first" "second")) - ⇒ (1 2 "second") - (--remove-first (> it 3) '(1 2 3 4 5 6)) - ⇒ (1 2 3 5 6) - - -- Function: -remove-last (pred list) - Remove the last item from LIST for which PRED returns non-‘nil’. - The result is a copy of LIST regardless of whether an element is - removed. - - Alias: ‘-reject-last’. - - This function’s anaphoric counterpart is ‘--remove-last’. - - See also ‘-map-last’ (*note -map-last::), ‘-remove-item’ (*note - -remove-item::), and ‘-remove-first’ (*note -remove-first::). - - (-remove-last #'natnump '(1 3 5 4 7 8 10 -11)) - ⇒ (1 3 5 4 7 8 -11) - (-remove-last #'stringp '(1 2 "last" "second")) - ⇒ (1 2 "last") - (--remove-last (> it 3) '(1 2 3 4 5 6 7 8 9 10)) - ⇒ (1 2 3 4 5 6 7 8 9) - - -- Function: -remove-item (item list) - Return a copy of LIST with all occurrences of ITEM removed. The - comparison is done with ‘equal’. - - (-remove-item 3 '(1 2 3 2 3 4 5 3)) - ⇒ (1 2 2 4 5) - (-remove-item 'foo '(foo bar baz foo)) - ⇒ (bar baz) - (-remove-item "bob" '("alice" "bob" "eve" "bob")) - ⇒ ("alice" "eve") - - -- Function: -non-nil (list) - Return a copy of LIST with all ‘nil’ items removed. - - (-non-nil '(nil 1 nil 2 nil nil 3 4 nil 5 nil)) - ⇒ (1 2 3 4 5) - (-non-nil '((nil))) - ⇒ ((nil)) - (-non-nil ()) - ⇒ () - - -- Function: -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. - - (-slice '(1 2 3 4 5) 1) - ⇒ (2 3 4 5) - (-slice '(1 2 3 4 5) 0 3) - ⇒ (1 2 3) - (-slice '(1 2 3 4 5 6 7 8 9) 1 -1 2) - ⇒ (2 4 6 8) - - -- Function: -take (n list) - Return a copy of the first N items in LIST. Return a copy of LIST - if it contains N items or fewer. Return ‘nil’ if N is zero or - less. - - See also: ‘-take-last’ (*note -take-last::). - - (-take 3 '(1 2 3 4 5)) - ⇒ (1 2 3) - (-take 17 '(1 2 3 4 5)) - ⇒ (1 2 3 4 5) - (-take 0 '(1 2 3 4 5)) - ⇒ () - - -- Function: -take-last (n list) - Return a copy of the last N items of LIST in order. Return a copy - of LIST if it contains N items or fewer. Return ‘nil’ if N is zero - or less. - - See also: ‘-take’ (*note -take::). - - (-take-last 3 '(1 2 3 4 5)) - ⇒ (3 4 5) - (-take-last 17 '(1 2 3 4 5)) - ⇒ (1 2 3 4 5) - (-take-last 1 '(1 2 3 4 5)) - ⇒ (5) - - -- Function: -drop (n list) - Return the tail (not a copy) of LIST without the first N items. - Return ‘nil’ if LIST contains N items or fewer. Return LIST if N - is zero or less. - - For another variant, see also ‘-drop-last’ (*note -drop-last::). - - (-drop 3 '(1 2 3 4 5)) - ⇒ (4 5) - (-drop 17 '(1 2 3 4 5)) - ⇒ () - (-drop 0 '(1 2 3 4 5)) - ⇒ (1 2 3 4 5) - - -- Function: -drop-last (n list) - Return a copy of LIST without its last N items. Return a copy of - LIST if N is zero or less. Return ‘nil’ if LIST contains N items - or fewer. - - See also: ‘-drop’ (*note -drop::). - - (-drop-last 3 '(1 2 3 4 5)) - ⇒ (1 2) - (-drop-last 17 '(1 2 3 4 5)) - ⇒ () - (-drop-last 0 '(1 2 3 4 5)) - ⇒ (1 2 3 4 5) - - -- Function: -take-while (pred list) - Take successive items from LIST for which PRED returns non-‘nil’. - PRED is a function of one argument. Return a new list of the - successive elements from the start of LIST for which PRED returns - non-‘nil’. - - This function’s anaphoric counterpart is ‘--take-while’. - - For another variant, see also ‘-drop-while’ (*note -drop-while::). - - (-take-while #'even? '(1 2 3 4)) - ⇒ () - (-take-while #'even? '(2 4 5 6)) - ⇒ (2 4) - (--take-while (< it 4) '(1 2 3 4 3 2 1)) - ⇒ (1 2 3) - - -- Function: -drop-while (pred list) - Drop successive items from LIST for which PRED returns non-‘nil’. - PRED is a function of one argument. Return the tail (not a copy) - of LIST starting from its first element for which PRED returns - ‘nil’. - - This function’s anaphoric counterpart is ‘--drop-while’. - - For another variant, see also ‘-take-while’ (*note -take-while::). - - (-drop-while #'even? '(1 2 3 4)) - ⇒ (1 2 3 4) - (-drop-while #'even? '(2 4 5 6)) - ⇒ (5 6) - (--drop-while (< it 4) '(1 2 3 4 3 2 1)) - ⇒ (4 3 2 1) - - -- Function: -select-by-indices (indices list) - Return a list whose elements are elements from LIST selected as - ‘(nth i list)‘ for all i from INDICES. - - (-select-by-indices '(4 10 2 3 6) '("v" "e" "l" "o" "c" "i" "r" "a" "p" "t" "o" "r")) - ⇒ ("c" "o" "l" "o" "r") - (-select-by-indices '(2 1 0) '("a" "b" "c")) - ⇒ ("c" "b" "a") - (-select-by-indices '(0 1 2 0 1 3 3 1) '("f" "a" "r" "l")) - ⇒ ("f" "a" "r" "f" "a" "l" "l" "a") - - -- Function: -select-columns (columns table) - Select COLUMNS from TABLE. - - TABLE is a list of lists where each element represents one row. It - is assumed each row has the same length. - - Each row is transformed such that only the specified COLUMNS are - selected. - - See also: ‘-select-column’ (*note -select-column::), - ‘-select-by-indices’ (*note -select-by-indices::) - - (-select-columns '(0 2) '((1 2 3) (a b c) (:a :b :c))) - ⇒ ((1 3) (a c) (:a :c)) - (-select-columns '(1) '((1 2 3) (a b c) (:a :b :c))) - ⇒ ((2) (b) (:b)) - (-select-columns nil '((1 2 3) (a b c) (:a :b :c))) - ⇒ (nil nil nil) - - -- Function: -select-column (column table) - Select COLUMN from TABLE. - - TABLE is a list of lists where each element represents one row. It - is assumed each row has the same length. - - The single selected column is returned as a list. - - See also: ‘-select-columns’ (*note -select-columns::), - ‘-select-by-indices’ (*note -select-by-indices::) - - (-select-column 1 '((1 2 3) (a b c) (:a :b :c))) - ⇒ (2 b :b) - - -File: dash.info, Node: List to list, Next: Reductions, Prev: Sublist selection, Up: Functions - -2.3 List to list -================ - -Functions returning a modified copy of the input list. - - -- Function: -keep (fn list) - Return a new list of the non-‘nil’ results of applying FN to each - item in LIST. Like ‘-filter’ (*note -filter::), but returns the - non-‘nil’ results of FN instead of the corresponding elements of - LIST. - - Its anaphoric counterpart is ‘--keep’. - - (-keep #'cdr '((1 2 3) (4 5) (6))) - ⇒ ((2 3) (5)) - (-keep (lambda (n) (and (> n 3) (* 10 n))) '(1 2 3 4 5 6)) - ⇒ (40 50 60) - (--keep (and (> it 3) (* 10 it)) '(1 2 3 4 5 6)) - ⇒ (40 50 60) - - -- Function: -concat (&rest sequences) - Concatenate all SEQUENCES and make the result a list. The result - is a list whose elements are the elements of all the arguments. - Each argument may be a list, vector or string. - - All arguments except the last argument are copied. The last - argument is just used as the tail of the new list. If the last - argument is not a list, this results in a dotted list. - - As an exception, if all the arguments except the last are ‘nil’, - and the last argument is not a list, the return value is that last - argument unaltered, not a list. - - (-concat '(1)) - ⇒ (1) - (-concat '(1) '(2)) - ⇒ (1 2) - (-concat '(1) '(2 3) '(4)) - ⇒ (1 2 3 4) - - -- Function: -flatten (l) - Take a nested list L and return its contents as a single, flat - list. - - Note that because ‘nil’ represents a list of zero elements (an - empty list), any mention of ‘nil’ in L will disappear after - flattening. If you need to preserve nils, consider ‘-flatten-n’ - (*note -flatten-n::) or map them to some unique symbol and then map - them back. - - Conses of two atoms are considered "terminals", that is, they - aren’t flattened further. - - See also: ‘-flatten-n’ (*note -flatten-n::) - - (-flatten '((1))) - ⇒ (1) - (-flatten '((1 (2 3) (((4 (5))))))) - ⇒ (1 2 3 4 5) - (-flatten '(1 2 (3 . 4))) - ⇒ (1 2 (3 . 4)) - - -- Function: -flatten-n (num list) - Flatten NUM levels of a nested LIST. - - See also: ‘-flatten’ (*note -flatten::) - - (-flatten-n 1 '((1 2) ((3 4) ((5 6))))) - ⇒ (1 2 (3 4) ((5 6))) - (-flatten-n 2 '((1 2) ((3 4) ((5 6))))) - ⇒ (1 2 3 4 (5 6)) - (-flatten-n 3 '((1 2) ((3 4) ((5 6))))) - ⇒ (1 2 3 4 5 6) - - -- Function: -replace (old new list) - Replace all OLD items in LIST with NEW. - - Elements are compared using ‘equal’. - - See also: ‘-replace-at’ (*note -replace-at::) - - (-replace 1 "1" '(1 2 3 4 3 2 1)) - ⇒ ("1" 2 3 4 3 2 "1") - (-replace "foo" "bar" '("a" "nice" "foo" "sentence" "about" "foo")) - ⇒ ("a" "nice" "bar" "sentence" "about" "bar") - (-replace 1 2 nil) - ⇒ nil - - -- Function: -replace-first (old new list) - Replace the first occurrence of OLD with NEW in LIST. - - Elements are compared using ‘equal’. - - See also: ‘-map-first’ (*note -map-first::) - - (-replace-first 1 "1" '(1 2 3 4 3 2 1)) - ⇒ ("1" 2 3 4 3 2 1) - (-replace-first "foo" "bar" '("a" "nice" "foo" "sentence" "about" "foo")) - ⇒ ("a" "nice" "bar" "sentence" "about" "foo") - (-replace-first 1 2 nil) - ⇒ nil - - -- Function: -replace-last (old new list) - Replace the last occurrence of OLD with NEW in LIST. - - Elements are compared using ‘equal’. - - See also: ‘-map-last’ (*note -map-last::) - - (-replace-last 1 "1" '(1 2 3 4 3 2 1)) - ⇒ (1 2 3 4 3 2 "1") - (-replace-last "foo" "bar" '("a" "nice" "foo" "sentence" "about" "foo")) - ⇒ ("a" "nice" "foo" "sentence" "about" "bar") - (-replace-last 1 2 nil) - ⇒ nil - - -- Function: -insert-at (n x list) - Return a list with X inserted into LIST at position N. - - See also: ‘-splice’ (*note -splice::), ‘-splice-list’ (*note - -splice-list::) - - (-insert-at 1 'x '(a b c)) - ⇒ (a x b c) - (-insert-at 12 'x '(a b c)) - ⇒ (a b c x) - - -- Function: -replace-at (n x list) - Return a list with element at Nth position in LIST replaced with X. - - See also: ‘-replace’ (*note -replace::) - - (-replace-at 0 9 '(0 1 2 3 4 5)) - ⇒ (9 1 2 3 4 5) - (-replace-at 1 9 '(0 1 2 3 4 5)) - ⇒ (0 9 2 3 4 5) - (-replace-at 4 9 '(0 1 2 3 4 5)) - ⇒ (0 1 2 3 9 5) - - -- Function: -update-at (n func list) - Use FUNC to update the Nth element of LIST. Return a copy of LIST - where the Nth element is replaced with the result of calling FUNC - on it. - - See also: ‘-map-when’ (*note -map-when::) - - (-update-at 0 (lambda (x) (+ x 9)) '(0 1 2 3 4 5)) - ⇒ (9 1 2 3 4 5) - (-update-at 1 (lambda (x) (+ x 8)) '(0 1 2 3 4 5)) - ⇒ (0 9 2 3 4 5) - (--update-at 2 (length it) '("foo" "bar" "baz" "quux")) - ⇒ ("foo" "bar" 3 "quux") - - -- Function: -remove-at (n list) - Return LIST with its element at index N removed. That is, remove - any element selected as (nth N LIST) from LIST and return the - result. - - This is a non-destructive operation: parts of LIST (but not - necessarily all of it) are copied as needed to avoid destructively - modifying it. - - See also: ‘-remove-at-indices’ (*note -remove-at-indices::), - ‘-remove’ (*note -remove::). - - (-remove-at 0 '(a b c)) - ⇒ (b c) - (-remove-at 1 '(a b c)) - ⇒ (a c) - (-remove-at 2 '(a b c)) - ⇒ (a b) - - -- Function: -remove-at-indices (indices list) - Return LIST with its elements at INDICES removed. That is, for - each index I in INDICES, remove any element selected as (nth I - LIST) from LIST. - - This is a non-destructive operation: parts of LIST (but not - necessarily all of it) are copied as needed to avoid destructively - modifying it. - - See also: ‘-remove-at’ (*note -remove-at::), ‘-remove’ (*note - -remove::). - - (-remove-at-indices '(0) '(a b c d e)) - ⇒ (b c d e) - (-remove-at-indices '(1 3) '(a b c d e)) - ⇒ (a c e) - (-remove-at-indices '(4 0 2) '(a b c d e)) - ⇒ (b d) - - -File: dash.info, Node: Reductions, Next: Unfolding, Prev: List to list, Up: Functions - -2.4 Reductions -============== - -Functions reducing lists to a single value (which may also be a list). - - -- Function: -reduce-from (fn init list) - Reduce the function FN across LIST, starting with INIT. Return the - result of applying FN to INIT and the first element of LIST, then - applying FN to that result and the second element, etc. If LIST is - empty, return INIT without calling FN. - - This function’s anaphoric counterpart is ‘--reduce-from’. - - For other folds, see also ‘-reduce’ (*note -reduce::) and - ‘-reduce-r’ (*note -reduce-r::). - - (-reduce-from #'- 10 '(1 2 3)) - ⇒ 4 - (-reduce-from #'list 10 '(1 2 3)) - ⇒ (((10 1) 2) 3) - (--reduce-from (concat acc " " it) "START" '("a" "b" "c")) - ⇒ "START a b c" - - -- Function: -reduce-r-from (fn init list) - Reduce the function FN across LIST in reverse, starting with INIT. - Return the result of applying FN to the last element of LIST and - INIT, then applying FN to the second-to-last element and the - previous result of FN, etc. That is, the first argument of FN is - the current element, and its second argument the accumulated value. - If LIST is empty, return INIT without calling FN. - - This function is like ‘-reduce-from’ (*note -reduce-from::) but the - operation associates from the right rather than left. In other - words, it starts from the end of LIST and flips the arguments to - FN. Conceptually, it is like replacing the conses in LIST with - applications of FN, and its last link with INIT, and evaluating the - resulting expression. - - This function’s anaphoric counterpart is ‘--reduce-r-from’. - - For other folds, see also ‘-reduce-r’ (*note -reduce-r::) and - ‘-reduce’ (*note -reduce::). - - (-reduce-r-from #'- 10 '(1 2 3)) - ⇒ -8 - (-reduce-r-from #'list 10 '(1 2 3)) - ⇒ (1 (2 (3 10))) - (--reduce-r-from (concat it " " acc) "END" '("a" "b" "c")) - ⇒ "a b c END" - - -- Function: -reduce (fn list) - Reduce the function FN across LIST. Return the result of applying - FN to the first two elements of LIST, then applying FN to that - result and the third element, etc. If LIST contains a single - element, return it without calling FN. If LIST is empty, return - the result of calling FN with no arguments. - - This function’s anaphoric counterpart is ‘--reduce’. - - For other folds, see also ‘-reduce-from’ (*note -reduce-from::) and - ‘-reduce-r’ (*note -reduce-r::). - - (-reduce #'- '(1 2 3 4)) - ⇒ -8 - (-reduce #'list '(1 2 3 4)) - ⇒ (((1 2) 3) 4) - (--reduce (format "%s-%d" acc it) '(1 2 3)) - ⇒ "1-2-3" - - -- Function: -reduce-r (fn list) - Reduce the function FN across LIST in reverse. Return the result - of applying FN to the last two elements of LIST, then applying FN - to the third-to-last element and the previous result of FN, etc. - That is, the first argument of FN is the current element, and its - second argument the accumulated value. If LIST contains a single - element, return it without calling FN. If LIST is empty, return - the result of calling FN with no arguments. - - This function is like ‘-reduce’ (*note -reduce::) but the operation - associates from the right rather than left. In other words, it - starts from the end of LIST and flips the arguments to FN. - Conceptually, it is like replacing the conses in LIST with - applications of FN, ignoring its last link, and evaluating the - resulting expression. - - This function’s anaphoric counterpart is ‘--reduce-r’. - - For other folds, see also ‘-reduce-r-from’ (*note -reduce-r-from::) - and ‘-reduce’ (*note -reduce::). - - (-reduce-r #'- '(1 2 3 4)) - ⇒ -2 - (-reduce-r #'list '(1 2 3 4)) - ⇒ (1 (2 (3 4))) - (--reduce-r (format "%s-%d" acc it) '(1 2 3)) - ⇒ "3-2-1" - - -- Function: -reductions-from (fn init list) - Return a list of FN’s intermediate reductions across LIST. That - is, a list of the intermediate values of the accumulator when - ‘-reduce-from’ (*note -reduce-from::) (which see) is called with - the same arguments. - - This function’s anaphoric counterpart is ‘--reductions-from’. - - For other folds, see also ‘-reductions’ (*note -reductions::) and - ‘-reductions-r’ (*note -reductions-r::). - - (-reductions-from #'max 0 '(2 1 4 3)) - ⇒ (0 2 2 4 4) - (-reductions-from #'* 1 '(1 2 3 4)) - ⇒ (1 1 2 6 24) - (--reductions-from (format "(FN %s %d)" acc it) "INIT" '(1 2 3)) - ⇒ ("INIT" "(FN INIT 1)" "(FN (FN INIT 1) 2)" "(FN (FN (FN INIT 1) 2) 3)") - - -- Function: -reductions-r-from (fn init list) - Return a list of FN’s intermediate reductions across reversed LIST. - That is, a list of the intermediate values of the accumulator when - ‘-reduce-r-from’ (*note -reduce-r-from::) (which see) is called - with the same arguments. - - This function’s anaphoric counterpart is ‘--reductions-r-from’. - - For other folds, see also ‘-reductions’ (*note -reductions::) and - ‘-reductions-r’ (*note -reductions-r::). - - (-reductions-r-from #'max 0 '(2 1 4 3)) - ⇒ (4 4 4 3 0) - (-reductions-r-from #'* 1 '(1 2 3 4)) - ⇒ (24 24 12 4 1) - (--reductions-r-from (format "(FN %d %s)" it acc) "INIT" '(1 2 3)) - ⇒ ("(FN 1 (FN 2 (FN 3 INIT)))" "(FN 2 (FN 3 INIT))" "(FN 3 INIT)" "INIT") - - -- Function: -reductions (fn list) - Return a list of FN’s intermediate reductions across LIST. That - is, a list of the intermediate values of the accumulator when - ‘-reduce’ (*note -reduce::) (which see) is called with the same - arguments. - - This function’s anaphoric counterpart is ‘--reductions’. - - For other folds, see also ‘-reductions’ (*note -reductions::) and - ‘-reductions-r’ (*note -reductions-r::). - - (-reductions #'+ '(1 2 3 4)) - ⇒ (1 3 6 10) - (-reductions #'* '(1 2 3 4)) - ⇒ (1 2 6 24) - (--reductions (format "(FN %s %d)" acc it) '(1 2 3)) - ⇒ (1 "(FN 1 2)" "(FN (FN 1 2) 3)") - - -- Function: -reductions-r (fn list) - Return a list of FN’s intermediate reductions across reversed LIST. - That is, a list of the intermediate values of the accumulator when - ‘-reduce-r’ (*note -reduce-r::) (which see) is called with the same - arguments. - - This function’s anaphoric counterpart is ‘--reductions-r’. - - For other folds, see also ‘-reductions-r-from’ (*note - -reductions-r-from::) and ‘-reductions’ (*note -reductions::). - - (-reductions-r #'+ '(1 2 3 4)) - ⇒ (10 9 7 4) - (-reductions-r #'* '(1 2 3 4)) - ⇒ (24 24 12 4) - (--reductions-r (format "(FN %d %s)" it acc) '(1 2 3)) - ⇒ ("(FN 1 (FN 2 3))" "(FN 2 3)" 3) - - -- Function: -count (pred list) - Counts the number of items in LIST where (PRED item) is non-‘nil’. - - (-count 'even? '(1 2 3 4 5)) - ⇒ 2 - (--count (< it 4) '(1 2 3 4)) - ⇒ 3 - - -- Function: -sum (list) - Return the sum of LIST. - - (-sum ()) - ⇒ 0 - (-sum '(1)) - ⇒ 1 - (-sum '(1 2 3 4)) - ⇒ 10 - - -- Function: -running-sum (list) - Return a list with running sums of items in LIST. LIST must be - non-empty. - - (-running-sum '(1 2 3 4)) - ⇒ (1 3 6 10) - (-running-sum '(1)) - ⇒ (1) - (-running-sum ()) - error→ Wrong type argument: consp, nil - - -- Function: -product (list) - Return the product of LIST. - - (-product ()) - ⇒ 1 - (-product '(1)) - ⇒ 1 - (-product '(1 2 3 4)) - ⇒ 24 - - -- Function: -running-product (list) - Return a list with running products of items in LIST. LIST must be - non-empty. - - (-running-product '(1 2 3 4)) - ⇒ (1 2 6 24) - (-running-product '(1)) - ⇒ (1) - (-running-product ()) - error→ Wrong type argument: consp, nil - - -- Function: -inits (list) - Return all prefixes of LIST. - - (-inits '(1 2 3 4)) - ⇒ (nil (1) (1 2) (1 2 3) (1 2 3 4)) - (-inits nil) - ⇒ (nil) - (-inits '(1)) - ⇒ (nil (1)) - - -- Function: -tails (list) - Return all suffixes of LIST. - - (-tails '(1 2 3 4)) - ⇒ ((1 2 3 4) (2 3 4) (3 4) (4) nil) - (-tails nil) - ⇒ (nil) - (-tails '(1)) - ⇒ ((1) nil) - - -- Function: -common-prefix (&rest lists) - Return the longest common prefix of LISTS. - - (-common-prefix '(1)) - ⇒ (1) - (-common-prefix '(1 2) '(3 4) '(1 2)) - ⇒ () - (-common-prefix '(1 2) '(1 2 3) '(1 2 3 4)) - ⇒ (1 2) - - -- Function: -common-suffix (&rest lists) - Return the longest common suffix of LISTS. - - (-common-suffix '(1)) - ⇒ (1) - (-common-suffix '(1 2) '(3 4) '(1 2)) - ⇒ () - (-common-suffix '(1 2 3 4) '(2 3 4) '(3 4)) - ⇒ (3 4) - - -- Function: -min (list) - Return the smallest value from LIST of numbers or markers. - - (-min '(0)) - ⇒ 0 - (-min '(3 2 1)) - ⇒ 1 - (-min '(1 2 3)) - ⇒ 1 - - -- Function: -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’ (*note -on::) which can transform the - values before comparing them. - - (-min-by '> '(4 3 6 1)) - ⇒ 1 - (--min-by (> (car it) (car other)) '((1 2 3) (2) (3 2))) - ⇒ (1 2 3) - (--min-by (> (length it) (length other)) '((1 2 3) (2) (3 2))) - ⇒ (2) - - -- Function: -max (list) - Return the largest value from LIST of numbers or markers. - - (-max '(0)) - ⇒ 0 - (-max '(3 2 1)) - ⇒ 3 - (-max '(1 2 3)) - ⇒ 3 - - -- Function: -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’ (*note -on::) which can transform the - values before comparing them. - - (-max-by '> '(4 3 6 1)) - ⇒ 6 - (--max-by (> (car it) (car other)) '((1 2 3) (2) (3 2))) - ⇒ (3 2) - (--max-by (> (length it) (length other)) '((1 2 3) (2) (3 2))) - ⇒ (1 2 3) - - -- Function: -frequencies (list) - Count the occurrences of each distinct element of LIST. - - Return an alist of (ELEMENT . N), where each ELEMENT occurs N - times in LIST. - - The test for equality is done with ‘equal’, or with ‘-compare-fn’ - if that is non-‘nil’. - - See also ‘-count’ (*note -count::) and ‘-group-by’ (*note - -group-by::). - - (-frequencies ()) - ⇒ () - (-frequencies '(1 2 3 1 2 1)) - ⇒ ((1 . 3) (2 . 2) (3 . 1)) - (let ((-compare-fn #'string=)) (-frequencies '(a "a"))) - ⇒ ((a . 2)) - - -File: dash.info, Node: Unfolding, Next: Predicates, Prev: Reductions, Up: Functions - -2.5 Unfolding -============= - -Operations dual to reductions, building lists from a seed value rather -than consuming a list to produce a single value. - - -- Function: -iterate (fun init n) - Return a list of iterated applications of FUN to INIT. - - This means a list of the form: - - (INIT (FUN INIT) (FUN (FUN INIT)) ...) - - N is the length of the returned list. - - (-iterate #'1+ 1 10) - ⇒ (1 2 3 4 5 6 7 8 9 10) - (-iterate (lambda (x) (+ x x)) 2 5) - ⇒ (2 4 8 16 32) - (--iterate (* it it) 2 5) - ⇒ (2 4 16 256 65536) - - -- Function: -unfold (fun seed) - Build a list from SEED using FUN. - - This is "dual" operation to ‘-reduce-r’ (*note -reduce-r::): while - -reduce-r consumes a list to produce a single value, ‘-unfold’ - (*note -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. - - (-unfold (lambda (x) (unless (= x 0) (cons x (1- x)))) 10) - ⇒ (10 9 8 7 6 5 4 3 2 1) - (--unfold (when it (cons it (cdr it))) '(1 2 3 4)) - ⇒ ((1 2 3 4) (2 3 4) (3 4) (4)) - (--unfold (when it (cons it (butlast it))) '(1 2 3 4)) - ⇒ ((1 2 3 4) (1 2 3) (1 2) (1)) - - -- Function: -repeat (n x) - Return a new list of length N with each element being X. Return - ‘nil’ if N is less than 1. - - (-repeat 3 :a) - ⇒ (:a :a :a) - (-repeat 1 :a) - ⇒ (:a) - (-repeat 0 :a) - ⇒ () - - -- Function: -cycle (list) - Return an infinite circular copy of LIST. The returned list cycles - through the elements of LIST and repeats from the beginning. - - (-take 5 (-cycle '(1 2 3))) - ⇒ (1 2 3 1 2) - (-take 7 (-cycle '(1 "and" 3))) - ⇒ (1 "and" 3 1 "and" 3 1) - (-zip-lists (-cycle '(3)) '(1 2)) - ⇒ ((3 1) (3 2)) - - -File: dash.info, Node: Predicates, Next: Partitioning, Prev: Unfolding, Up: Functions - -2.6 Predicates -============== - -Reductions of one or more lists to a boolean value. - - -- Function: -some (pred list) - Return (PRED x) for the first LIST item where (PRED x) is - non-‘nil’, else ‘nil’. - - Alias: ‘-any’. - - This function’s anaphoric counterpart is ‘--some’. - - (-some #'stringp '(1 "2" 3)) - ⇒ t - (--some (string-match-p "x" it) '("foo" "axe" "xor")) - ⇒ 1 - (--some (= it-index 3) '(0 1 2)) - ⇒ nil - - -- Function: -every (pred list) - Return non-‘nil’ if PRED returns non-‘nil’ for all items in LIST. - If so, return the last such result of PRED. Otherwise, once an - item is reached for which PRED returns ‘nil’, return ‘nil’ without - calling PRED on any further LIST elements. - - This function is like ‘-every-p’, but on success returns the last - non-‘nil’ result of PRED instead of just ‘t’. - - This function’s anaphoric counterpart is ‘--every’. - - (-every #'numberp '(1 2 3)) - ⇒ t - (--every (string-match-p "x" it) '("axe" "xor")) - ⇒ 0 - (--every (= it it-index) '(0 1 3)) - ⇒ nil - - -- Function: -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? #'numberp '(nil 0 t)) - ⇒ t - (-any? #'numberp '(nil t t)) - ⇒ nil - (-any? #'null '(1 3 5)) - ⇒ nil - - -- Function: -all? (pred list) - Return ‘t’ if (PRED X) is non-‘nil’ for all X in LIST, else ‘nil’. - In the latter case, stop after the first X for which (PRED X) is - ‘nil’, without calling PRED on any subsequent elements of LIST. - - The similar function ‘-every’ (*note -every::) is more widely - useful, since it returns the last non-‘nil’ result of PRED instead - of just ‘t’ on success. - - Alias: ‘-all-p’, ‘-every-p’, ‘-every?’. - - This function’s anaphoric counterpart is ‘--all?’. - - (-all? #'numberp '(1 2 3)) - ⇒ t - (-all? #'numberp '(2 t 6)) - ⇒ nil - (--all? (= 0 (% it 2)) '(2 4 6)) - ⇒ t - - -- Function: -none? (pred list) - Return ‘t’ if (PRED X) is ‘nil’ for all X in LIST, else ‘nil’. - - Alias: ‘-none-p’ - - (-none? 'even? '(1 2 3)) - ⇒ nil - (-none? 'even? '(1 3 5)) - ⇒ t - (--none? (= 0 (% it 2)) '(1 2 3)) - ⇒ nil - - -- Function: -only-some? (pred list) - Return ‘t’ if different LIST items both satisfy and do not satisfy - PRED. That is, if PRED returns both ‘nil’ for at least one item, - and non-‘nil’ for at least one other item in LIST. Return ‘nil’ if - all items satisfy the predicate or none of them do. - - Alias: ‘-only-some-p’ - - (-only-some? 'even? '(1 2 3)) - ⇒ t - (-only-some? 'even? '(1 3 5)) - ⇒ nil - (-only-some? 'even? '(2 4 6)) - ⇒ nil - - -- Function: -contains? (list element) - Return non-‘nil’ if LIST contains ELEMENT. - - The test for equality is done with ‘equal’, or with ‘-compare-fn’ - if that is non-‘nil’. As with ‘member’, the return value is - actually the tail of LIST whose car is ELEMENT. - - Alias: ‘-contains-p’. - - (-contains? '(1 2 3) 1) - ⇒ (1 2 3) - (-contains? '(1 2 3) 2) - ⇒ (2 3) - (-contains? '(1 2 3) 4) - ⇒ () - - -- Function: -is-prefix? (prefix list) - Return non-‘nil’ if PREFIX is a prefix of LIST. - - Alias: ‘-is-prefix-p’. - - (-is-prefix? '(1 2 3) '(1 2 3 4 5)) - ⇒ t - (-is-prefix? '(1 2 3 4 5) '(1 2 3)) - ⇒ nil - (-is-prefix? '(1 3) '(1 2 3 4 5)) - ⇒ nil - - -- Function: -is-suffix? (suffix list) - Return non-‘nil’ if SUFFIX is a suffix of LIST. - - Alias: ‘-is-suffix-p’. - - (-is-suffix? '(3 4 5) '(1 2 3 4 5)) - ⇒ t - (-is-suffix? '(1 2 3 4 5) '(3 4 5)) - ⇒ nil - (-is-suffix? '(3 5) '(1 2 3 4 5)) - ⇒ nil - - -- Function: -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’ - - (-is-infix? '(1 2 3) '(1 2 3 4 5)) - ⇒ t - (-is-infix? '(2 3 4) '(1 2 3 4 5)) - ⇒ t - (-is-infix? '(3 4 5) '(1 2 3 4 5)) - ⇒ t - - -- Function: -cons-pair? (obj) - Return non-‘nil’ if OBJ is a true cons pair. That is, a cons (A . - B) where B is not a list. - - Alias: ‘-cons-pair-p’. - - (-cons-pair? '(1 . 2)) - ⇒ t - (-cons-pair? '(1 2)) - ⇒ nil - (-cons-pair? '(1)) - ⇒ nil - - -File: dash.info, Node: Partitioning, Next: Indexing, Prev: Predicates, Up: Functions - -2.7 Partitioning -================ - -Functions partitioning the input list into a list of lists. - - -- Function: -split-at (n list) - Split LIST into two sublists after the Nth element. The result is - a list of two elements (TAKE DROP) where TAKE is a new list of the - first N elements of LIST, and DROP is the remaining elements of - LIST (not a copy). TAKE and DROP are like the results of ‘-take’ - (*note -take::) and ‘-drop’ (*note -drop::), respectively, but the - split is done in a single list traversal. - - (-split-at 3 '(1 2 3 4 5)) - ⇒ ((1 2 3) (4 5)) - (-split-at 17 '(1 2 3 4 5)) - ⇒ ((1 2 3 4 5) nil) - (-split-at 0 '(1 2 3 4 5)) - ⇒ (nil (1 2 3 4 5)) - - -- Function: -split-with (pred list) - Split LIST into a prefix satisfying PRED, and the rest. The first - sublist is the prefix of LIST with successive elements satisfying - PRED, and the second sublist is the remaining elements that do not. - The result is like performing - - ((-take-while PRED LIST) (-drop-while PRED LIST)) - - but in no more than a single pass through LIST. - - (-split-with 'even? '(1 2 3 4)) - ⇒ (nil (1 2 3 4)) - (-split-with 'even? '(2 4 5 6)) - ⇒ ((2 4) (5 6)) - (--split-with (< it 4) '(1 2 3 4 3 2 1)) - ⇒ ((1 2 3) (4 3 2 1)) - - -- Macro: -split-on (item list) - Split the LIST each time ITEM is found. - - Unlike ‘-partition-by’ (*note -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’ (*note -split-when::) - - (-split-on '| '(Nil | Leaf a | Node [Tree a])) - ⇒ ((Nil) (Leaf a) (Node [Tree a])) - (-split-on :endgroup '("a" "b" :endgroup "c" :endgroup "d" "e")) - ⇒ (("a" "b") ("c") ("d" "e")) - (-split-on :endgroup '("a" "b" :endgroup :endgroup "d" "e")) - ⇒ (("a" "b") ("d" "e")) - - -- Function: -split-when (fn list) - Split the LIST on each element where FN returns non-‘nil’. - - Unlike ‘-partition-by’ (*note -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’. - - (-split-when 'even? '(1 2 3 4 5 6)) - ⇒ ((1) (3) (5)) - (-split-when 'even? '(1 2 3 4 6 8 9)) - ⇒ ((1) (3) (9)) - (--split-when (memq it '(&optional &rest)) '(a b &optional c d &rest args)) - ⇒ ((a b) (c d) (args)) - - -- Function: -separate (pred list) - Split LIST into two sublists based on whether items satisfy PRED. - The result is like performing - - ((-filter PRED LIST) (-remove PRED LIST)) - - but in a single pass through LIST. - - (-separate (lambda (num) (= 0 (% num 2))) '(1 2 3 4 5 6 7)) - ⇒ ((2 4 6) (1 3 5 7)) - (--separate (< it 5) '(3 7 5 9 3 2 1 4 6)) - ⇒ ((3 3 2 1 4) (7 5 9 6)) - (-separate 'cdr '((1 2) (1) (1 2 3) (4))) - ⇒ (((1 2) (1 2 3)) ((1) (4))) - - -- Function: -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 2 '(1 2 3 4 5 6)) - ⇒ ((1 2) (3 4) (5 6)) - (-partition 2 '(1 2 3 4 5 6 7)) - ⇒ ((1 2) (3 4) (5 6)) - (-partition 3 '(1 2 3 4 5 6 7)) - ⇒ ((1 2 3) (4 5 6)) - - -- Function: -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 2 '(1 2 3 4 5 6)) - ⇒ ((1 2) (3 4) (5 6)) - (-partition-all 2 '(1 2 3 4 5 6 7)) - ⇒ ((1 2) (3 4) (5 6) (7)) - (-partition-all 3 '(1 2 3 4 5 6 7)) - ⇒ ((1 2 3) (4 5 6) (7)) - - -- Function: -partition-in-steps (n step list) - Partition LIST into sublists of length N that are STEP items apart. - Like ‘-partition-all-in-steps’ (*note -partition-all-in-steps::), - but if there are not enough items to make the last group N-sized, - those items are discarded. - - (-partition-in-steps 2 1 '(1 2 3 4)) - ⇒ ((1 2) (2 3) (3 4)) - (-partition-in-steps 3 2 '(1 2 3 4)) - ⇒ ((1 2 3)) - (-partition-in-steps 3 2 '(1 2 3 4 5)) - ⇒ ((1 2 3) (3 4 5)) - - -- Function: -partition-all-in-steps (n step list) - Partition LIST into sublists of length N that are STEP items apart. - Adjacent groups may overlap if N exceeds the STEP stride. Trailing - groups may contain less than N items. - - (-partition-all-in-steps 2 1 '(1 2 3 4)) - ⇒ ((1 2) (2 3) (3 4) (4)) - (-partition-all-in-steps 3 2 '(1 2 3 4)) - ⇒ ((1 2 3) (3 4)) - (-partition-all-in-steps 3 2 '(1 2 3 4 5)) - ⇒ ((1 2 3) (3 4 5) (5)) - - -- Function: -partition-by (fn list) - Apply FN to each item in LIST, splitting it each time FN returns a - new value. - - (-partition-by 'even? ()) - ⇒ () - (-partition-by 'even? '(1 1 2 2 2 3 4 6 8)) - ⇒ ((1 1) (2 2 2) (3) (4 6 8)) - (--partition-by (< it 3) '(1 2 3 4 3 2 1)) - ⇒ ((1 2) (3 4 3) (2 1)) - - -- Function: -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 (= it 1) '(1 2 3 1 2 1 2 3 4)) - ⇒ ((1 2 3) (1 2) (1 2 3 4)) - (--partition-by-header (> it 0) '(1 2 0 1 0 1 2 3 0)) - ⇒ ((1 2 0) (1 0) (1 2 3 0)) - (-partition-by-header 'even? '(2 1 1 1 4 1 3 5 6 6 1)) - ⇒ ((2 1 1 1) (4 1 3 5) (6 6 1)) - - -- Function: -partition-after-pred (pred list) - Partition LIST after each element for which PRED returns non-‘nil’. - - This function’s anaphoric counterpart is ‘--partition-after-pred’. - - (-partition-after-pred #'booleanp ()) - ⇒ () - (-partition-after-pred #'booleanp '(t t)) - ⇒ ((t) (t)) - (-partition-after-pred #'booleanp '(0 0 t t 0 t)) - ⇒ ((0 0 t) (t) (0 t)) - - -- Function: -partition-before-pred (pred list) - Partition directly before each time PRED is true on an element of - LIST. - - (-partition-before-pred #'booleanp ()) - ⇒ () - (-partition-before-pred #'booleanp '(0 t)) - ⇒ ((0) (t)) - (-partition-before-pred #'booleanp '(0 0 t 0 t t)) - ⇒ ((0 0) (t 0) (t) (t)) - - -- Function: -partition-before-item (item list) - Partition directly before each time ITEM appears in LIST. - - (-partition-before-item 3 ()) - ⇒ () - (-partition-before-item 3 '(1)) - ⇒ ((1)) - (-partition-before-item 3 '(3)) - ⇒ ((3)) - - -- Function: -partition-after-item (item list) - Partition directly after each time ITEM appears in LIST. - - (-partition-after-item 3 ()) - ⇒ () - (-partition-after-item 3 '(1)) - ⇒ ((1)) - (-partition-after-item 3 '(3)) - ⇒ ((3)) - - -- Function: -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 'even? ()) - ⇒ () - (-group-by 'even? '(1 1 2 2 2 3 4 6 8)) - ⇒ ((nil 1 1 3) (t 2 2 2 4 6 8)) - (--group-by (car (split-string it "/")) '("a/b" "c/d" "a/e")) - ⇒ (("a" "a/b" "a/e") ("c" "c/d")) - - -File: dash.info, Node: Indexing, Next: Set operations, Prev: Partitioning, Up: Functions - -2.8 Indexing -============ - -Functions retrieving or sorting based on list indices and related -predicates. - - -- Function: -elem-index (elem list) - Return the first index of ELEM in LIST. That is, the index within - LIST of the first element that is ‘equal’ to ELEM. Return ‘nil’ if - there is no such element. - - See also: ‘-find-index’ (*note -find-index::). - - (-elem-index 2 '(6 7 8 3 4)) - ⇒ nil - (-elem-index "bar" '("foo" "bar" "baz")) - ⇒ 1 - (-elem-index '(1 2) '((3) (5 6) (1 2) nil)) - ⇒ 2 - - -- Function: -elem-indices (elem list) - Return the list of indices at which ELEM appears in LIST. That is, - the indices of all elements of LIST ‘equal’ to ELEM, in the same - ascending order as they appear in LIST. - - (-elem-indices 2 '(6 7 8 3 4 1)) - ⇒ () - (-elem-indices "bar" '("foo" "bar" "baz")) - ⇒ (1) - (-elem-indices '(1 2) '((3) (1 2) (5 6) (1 2) nil)) - ⇒ (1 3) - - -- Function: -find-index (pred list) - Return the index of the first item satisfying PRED in LIST. Return - ‘nil’ if no such item is found. - - PRED is called with one argument, the current list element, until - it returns non-‘nil’, at which point the search terminates. - - This function’s anaphoric counterpart is ‘--find-index’. - - See also: ‘-first’ (*note -first::), ‘-find-last-index’ (*note - -find-last-index::). - - (-find-index #'numberp '(a b c)) - ⇒ nil - (-find-index #'natnump '(1 0 -1)) - ⇒ 0 - (--find-index (> it 5) '(2 4 1 6 3 3 5 8)) - ⇒ 3 - - -- Function: -find-last-index (pred list) - Return the index of the last item satisfying PRED in LIST. Return - ‘nil’ if no such item is found. - - Predicate PRED is called with one argument each time, namely the - current list element. - - This function’s anaphoric counterpart is ‘--find-last-index’. - - See also: ‘-last’ (*note -last::), ‘-find-index’ (*note - -find-index::). - - (-find-last-index #'numberp '(a b c)) - ⇒ nil - (--find-last-index (> it 5) '(2 7 1 6 3 8 5 2)) - ⇒ 5 - (-find-last-index (-partial #'string< 'a) '(c b a)) - ⇒ 1 - - -- Function: -find-indices (pred list) - Return the list of indices in LIST satisfying PRED. - - Each element of LIST in turn is passed to PRED. If the result is - non-‘nil’, the index of that element in LIST is included in the - result. The returned indices are in ascending order, i.e., in the - same order as they appear in LIST. - - This function’s anaphoric counterpart is ‘--find-indices’. - - See also: ‘-find-index’ (*note -find-index::), ‘-elem-indices’ - (*note -elem-indices::). - - (-find-indices #'numberp '(a b c)) - ⇒ () - (-find-indices #'numberp '(8 1 d 2 b c a 3)) - ⇒ (0 1 3 7) - (--find-indices (> it 5) '(2 4 1 6 3 3 5 8)) - ⇒ (3 7) - - -- Function: -grade-up (comparator list) - Grade elements of LIST using COMPARATOR relation. This yields a - permutation vector such that applying this permutation to LIST - sorts it in ascending order. - - (-grade-up #'< '(3 1 4 2 1 3 3)) - ⇒ (1 4 3 0 5 6 2) - (let ((l '(3 1 4 2 1 3 3))) (-select-by-indices (-grade-up #'< l) l)) - ⇒ (1 1 2 3 3 3 4) - - -- Function: -grade-down (comparator list) - Grade elements of LIST using COMPARATOR relation. This yields a - permutation vector such that applying this permutation to LIST - sorts it in descending order. - - (-grade-down #'< '(3 1 4 2 1 3 3)) - ⇒ (2 0 5 6 3 1 4) - (let ((l '(3 1 4 2 1 3 3))) (-select-by-indices (-grade-down #'< l) l)) - ⇒ (4 3 3 3 2 1 1) - - -File: dash.info, Node: Set operations, Next: Other list operations, Prev: Indexing, Up: Functions - -2.9 Set operations -================== - -Operations pretending lists are sets. - - -- Function: -union (list1 list2) - Return a new list of distinct elements appearing in either LIST1 or - LIST2. - - The test for equality is done with ‘equal’, or with ‘-compare-fn’ - if that is non-‘nil’. - - (-union '(1 2 3) '(3 4 5)) - ⇒ (1 2 3 4 5) - (-union '(1 2 2 4) ()) - ⇒ (1 2 4) - (-union '(1 1 2 2) '(4 4 3 2 1)) - ⇒ (1 2 4 3) - - -- Function: -difference (list1 list2) - Return a new list with the distinct members of LIST1 that are not - in LIST2. - - The test for equality is done with ‘equal’, or with ‘-compare-fn’ - if that is non-‘nil’. - - (-difference () ()) - ⇒ () - (-difference '(1 2 3) '(4 5 6)) - ⇒ (1 2 3) - (-difference '(1 2 3 4) '(3 4 5 6)) - ⇒ (1 2) - - -- Function: -intersection (list1 list2) - Return a new list of distinct elements appearing in both LIST1 and - LIST2. - - The test for equality is done with ‘equal’, or with ‘-compare-fn’ - if that is non-‘nil’. - - (-intersection () ()) - ⇒ () - (-intersection '(1 2 3) '(4 5 6)) - ⇒ () - (-intersection '(1 2 2 3) '(4 3 3 2)) - ⇒ (2 3) - - -- Function: -powerset (list) - Return the power set of LIST. - - (-powerset ()) - ⇒ (nil) - (-powerset '(x y)) - ⇒ ((x y) (x) (y) nil) - (-powerset '(x y z)) - ⇒ ((x y z) (x y) (x z) (x) (y z) (y) (z) nil) - - -- Function: -permutations (list) - Return the distinct permutations of LIST. - - Duplicate elements of LIST are determined by ‘equal’, or by - ‘-compare-fn’ if that is non-‘nil’. - - (-permutations ()) - ⇒ (nil) - (-permutations '(a a b)) - ⇒ ((a a b) (a b a) (b a a)) - (-permutations '(a b c)) - ⇒ ((a b c) (a c b) (b a c) (b c a) (c a b) (c b a)) - - -- Function: -distinct (list) - Return a copy of LIST with all duplicate elements removed. - - The test for equality is done with ‘equal’, or with ‘-compare-fn’ - if that is non-‘nil’. - - Alias: ‘-uniq’. - - (-distinct ()) - ⇒ () - (-distinct '(1 1 2 3 3)) - ⇒ (1 2 3) - (-distinct '(t t t)) - ⇒ (t) - - -- Function: -same-items? (list1 list2) - Return non-‘nil’ if LIST1 and LIST2 have the same distinct - elements. - - The order of the elements in the lists does not matter. The lists - may be of different lengths, i.e., contain duplicate elements. The - test for equality is done with ‘equal’, or with ‘-compare-fn’ if - that is non-‘nil’. - - Alias: ‘-same-items-p’. - - (-same-items? '(1 2 3) '(1 2 3)) - ⇒ t - (-same-items? '(1 1 2 3) '(3 3 2 1)) - ⇒ t - (-same-items? '(1 2 3) '(1 2 3 4)) - ⇒ nil - - -File: dash.info, Node: Other list operations, Next: Tree operations, Prev: Set operations, Up: Functions - -2.10 Other list operations -========================== - -Other list functions not fit to be classified elsewhere. - - -- Function: -rotate (n list) - Rotate LIST N places to the right (left if N is negative). The - time complexity is O(n). - - (-rotate 3 '(1 2 3 4 5 6 7)) - ⇒ (5 6 7 1 2 3 4) - (-rotate -3 '(1 2 3 4 5 6 7)) - ⇒ (4 5 6 7 1 2 3) - (-rotate 16 '(1 2 3 4 5 6 7)) - ⇒ (6 7 1 2 3 4 5) - - -- Function: -cons* (&rest args) - Make a new list from the elements of ARGS. The last 2 elements of - ARGS are used as the final cons of the result, so if the final - element of ARGS is not a list, the result is a dotted list. With - no ARGS, return ‘nil’. - - (-cons* 1 2) - ⇒ (1 . 2) - (-cons* 1 2 3) - ⇒ (1 2 . 3) - (-cons* 1) - ⇒ 1 - - -- Function: -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 any ELEMENTS are given, append them to the list as well. - - (-snoc '(1 2 3) 4) - ⇒ (1 2 3 4) - (-snoc '(1 2 3) 4 5 6) - ⇒ (1 2 3 4 5 6) - (-snoc '(1 2 3) '(4 5 6)) - ⇒ (1 2 3 (4 5 6)) - - -- Function: -interpose (sep list) - Return a new list of all elements in LIST separated by SEP. - - (-interpose "-" ()) - ⇒ () - (-interpose "-" '("a")) - ⇒ ("a") - (-interpose "-" '("a" "b" "c")) - ⇒ ("a" "-" "b" "-" "c") - - -- Function: -interleave (&rest lists) - Return a new list of the first item in each list, then the second - etc. - - (-interleave '(1 2) '("a" "b")) - ⇒ (1 "a" 2 "b") - (-interleave '(1 2) '("a" "b") '("A" "B")) - ⇒ (1 "a" "A" 2 "b" "B") - (-interleave '(1 2 3) '("a" "b")) - ⇒ (1 "a" 2 "b") - - -- Function: -iota (count &optional start step) - Return a list containing COUNT numbers. Starts from START and adds - STEP each time. The default START is zero, the default STEP is 1. - This function takes its name from the corresponding primitive in - the APL language. - - (-iota 6) - ⇒ (0 1 2 3 4 5) - (-iota 4 2.5 -2) - ⇒ (2.5 0.5 -1.5 -3.5) - (-iota -1) - error→ Wrong type argument: natnump, -1 - - -- Function: -zip-with (fn list1 list2) - Zip LIST1 and LIST2 into a new list using the function FN. That - is, apply FN pairwise taking as first argument the next element of - LIST1 and as second argument the next element of LIST2 at the - corresponding position. The result is as long as the shorter list. - - This function’s anaphoric counterpart is ‘--zip-with’. - - For other zips, see also ‘-zip-lists’ (*note -zip-lists::) and - ‘-zip-fill’ (*note -zip-fill::). - - (-zip-with #'+ '(1 2 3 4) '(5 6 7)) - ⇒ (6 8 10) - (-zip-with #'cons '(1 2 3) '(4 5 6 7)) - ⇒ ((1 . 4) (2 . 5) (3 . 6)) - (--zip-with (format "%s & %s" it other) '(Batman Jekyll) '(Robin Hyde)) - ⇒ ("Batman & Robin" "Jekyll & Hyde") - - -- Function: -zip-pair (list1 list2) - Zip LIST1 and LIST2 together. - - Make a pair with the head of each list, followed by a pair with the - second element of each list, and so on. The number of pairs - returned is equal to the length of the shorter input list. - - See also: ‘-zip-lists’ (*note -zip-lists::). - - (-zip-pair '(1 2 3 4) '(5 6 7)) - ⇒ ((1 . 5) (2 . 6) (3 . 7)) - (-zip-pair '(1 2 3) '(4 5 6)) - ⇒ ((1 . 4) (2 . 5) (3 . 6)) - (-zip-pair '(1 2) '(3)) - ⇒ ((1 . 3)) - - -- Function: -zip-lists (&rest lists) - Zip LISTS together. - - Group the head of each list, followed by the second element of each - list, and so on. The number of returned groupings is equal to the - length of the shortest input list, and the length of each grouping - is equal to the number of input LISTS. - - The return value is always a list of proper lists, in contrast to - ‘-zip’ (*note -zip::) which returns a list of dotted pairs when - only two input LISTS are provided. - - See also: ‘-zip-pair’ (*note -zip-pair::). - - (-zip-lists '(1 2 3) '(4 5 6)) - ⇒ ((1 4) (2 5) (3 6)) - (-zip-lists '(1 2 3) '(4 5 6 7)) - ⇒ ((1 4) (2 5) (3 6)) - (-zip-lists '(1 2) '(3 4 5) '(6)) - ⇒ ((1 3 6)) - - -- Function: -zip-lists-fill (fill-value &rest lists) - Zip LISTS together, padding shorter lists with FILL-VALUE. This is - like ‘-zip-lists’ (*note -zip-lists::) (which see), except it - retains all elements at positions beyond the end of the shortest - list. The number of returned groupings is equal to the length of - the longest input list, and the length of each grouping is equal to - the number of input LISTS. - - (-zip-lists-fill 0 '(1 2) '(3 4 5) '(6)) - ⇒ ((1 3 6) (2 4 0) (0 5 0)) - (-zip-lists-fill 0 '(1 2) '(3 4) '(5 6)) - ⇒ ((1 3 5) (2 4 6)) - (-zip-lists-fill 0 '(1 2 3) nil) - ⇒ ((1 0) (2 0) (3 0)) - - -- Function: -zip (&rest lists) - Zip LISTS together. - - Group the head of each list, followed by the second element of each - list, and so on. The number of returned groupings is equal to the - length of the shortest input list, and the number of items in each - grouping is equal to the number of input LISTS. - - If only two LISTS are provided as arguments, return the groupings - as a list of dotted pairs. Otherwise, return the groupings as a - list of proper lists. - - Since the return value changes form depending on the number of - arguments, it is generally recommended to use ‘-zip-lists’ (*note - -zip-lists::) instead, or ‘-zip-pair’ (*note -zip-pair::) if a list - of dotted pairs is desired. - - See also: ‘-unzip’ (*note -unzip::). - - (-zip '(1 2 3 4) '(5 6 7) '(8 9)) - ⇒ ((1 5 8) (2 6 9)) - (-zip '(1 2 3) '(4 5 6) '(7 8 9)) - ⇒ ((1 4 7) (2 5 8) (3 6 9)) - (-zip '(1 2 3)) - ⇒ ((1) (2) (3)) - - -- Function: -zip-fill (fill-value &rest lists) - Zip LISTS together, padding shorter lists with FILL-VALUE. This is - like ‘-zip’ (*note -zip::) (which see), except it retains all - elements at positions beyond the end of the shortest list. The - number of returned groupings is equal to the length of the longest - input list, and the length of each grouping is equal to the number - of input LISTS. - - Since the return value changes form depending on the number of - arguments, it is generally recommended to use ‘-zip-lists-fill’ - (*note -zip-lists-fill::) instead, unless a list of dotted pairs is - explicitly desired. - - (-zip-fill 0 '(1 2 3) '(4 5)) - ⇒ ((1 . 4) (2 . 5) (3 . 0)) - (-zip-fill 0 () '(1 2 3)) - ⇒ ((0 . 1) (0 . 2) (0 . 3)) - (-zip-fill 0 '(1 2) '(3 4) '(5 6)) - ⇒ ((1 3 5) (2 4 6)) - - -- Function: -unzip-lists (lists) - Unzip LISTS. - - This works just like ‘-zip-lists’ (*note -zip-lists::) (which see), - but takes a list of lists instead of a variable number of - arguments, such that - - (-unzip-lists (-zip-lists ARGS...)) - - is identity (given that the lists comprising ARGS are of the same - length). - - (-unzip-lists (-zip-lists '(1 2) '(3 4) '(5 6))) - ⇒ ((1 2) (3 4) (5 6)) - (-unzip-lists '((1 2 3) (4 5) (6 7) (8 9))) - ⇒ ((1 4 6 8) (2 5 7 9)) - (-unzip-lists '((1 2 3) (4 5 6))) - ⇒ ((1 4) (2 5) (3 6)) - - -- Function: -unzip (lists) - Unzip LISTS. - - This works just like ‘-zip’ (*note -zip::) (which see), but takes a - list of lists instead of a variable number of arguments, such that - - (-unzip (-zip L1 L2 L3 ...)) - - is identity (given that the lists are of the same length, and that - ‘-zip’ (*note -zip::) is not called with two arguments, because of - the caveat described in its docstring). - - Note in particular that calling ‘-unzip’ (*note -unzip::) on a list - of two lists will return a list of dotted pairs. - - Since the return value changes form depending on the number of - LISTS, it is generally recommended to use ‘-unzip-lists’ (*note - -unzip-lists::) instead. - - (-unzip (-zip '(1 2) '(3 4) '(5 6))) - ⇒ ((1 . 2) (3 . 4) (5 . 6)) - (-unzip '((1 2 3) (4 5 6))) - ⇒ ((1 . 4) (2 . 5) (3 . 6)) - (-unzip '((1 2 3) (4 5) (6 7) (8 9))) - ⇒ ((1 4 6 8) (2 5 7 9)) - - -- Function: -pad (fill-value &rest lists) - Pad each of LISTS with FILL-VALUE until they all have equal - lengths. - - Ensure all LISTS are as long as the longest one by repeatedly - appending FILL-VALUE to the shorter lists, and return the resulting - LISTS. - - (-pad 0 ()) - ⇒ (nil) - (-pad 0 '(1 2) '(3 4)) - ⇒ ((1 2) (3 4)) - (-pad 0 '(1 2) '(3 4 5 6) '(7 8 9)) - ⇒ ((1 2 0 0) (3 4 5 6) (7 8 9 0)) - - -- Function: -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’ (*note -table-flat::) - - (-table '* '(1 2 3) '(1 2 3)) - ⇒ ((1 2 3) (2 4 6) (3 6 9)) - (-table (lambda (a b) (-sum (-zip-with '* a b))) '((1 2) (3 4)) '((1 3) (2 4))) - ⇒ ((7 15) (10 22)) - (apply '-table 'list (-repeat 3 '(1 2))) - ⇒ ((((1 1 1) (2 1 1)) ((1 2 1) (2 2 1))) (((1 1 2) (2 1 2)) ((1 2 2) (2 2 2)))) - - -- Function: -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)) (apply ’-table fn lists)) - - but the implementation here is much more efficient. - - See also: ‘-flatten-n’ (*note -flatten-n::), ‘-table’ (*note - -table::) - - (-table-flat 'list '(1 2 3) '(a b c)) - ⇒ ((1 a) (2 a) (3 a) (1 b) (2 b) (3 b) (1 c) (2 c) (3 c)) - (-table-flat '* '(1 2 3) '(1 2 3)) - ⇒ (1 2 3 2 4 6 3 6 9) - (apply '-table-flat 'list (-repeat 3 '(1 2))) - ⇒ ((1 1 1) (2 1 1) (1 2 1) (2 2 1) (1 1 2) (2 1 2) (1 2 2) (2 2 2)) - - -- Function: -first (pred list) - Return the first item in LIST for which PRED returns non-‘nil’. - Return ‘nil’ if no such element is found. - - To get the first item in the list no questions asked, use - ‘-first-item’ (*note -first-item::). - - Alias: ‘-find’. - - This function’s anaphoric counterpart is ‘--first’. - - (-first #'natnump '(-1 0 1)) - ⇒ 0 - (-first #'null '(1 2 3)) - ⇒ nil - (--first (> it 2) '(1 2 3)) - ⇒ 3 - - -- Function: -last (pred list) - Return the last x in LIST where (PRED x) is non-‘nil’, else ‘nil’. - - (-last 'even? '(1 2 3 4 5 6 3 3 3)) - ⇒ 6 - (-last 'even? '(1 3 7 5 9)) - ⇒ nil - (--last (> (length it) 3) '("a" "looong" "word" "and" "short" "one")) - ⇒ "short" - - -- Function: -first-item (list) - Return the first item of LIST, or ‘nil’ on an empty list. - - See also: ‘-second-item’ (*note -second-item::), ‘-last-item’ - (*note -last-item::), etc. - - (-first-item ()) - ⇒ () - (-first-item '(1 2 3 4 5)) - ⇒ 1 - (let ((list (list 1 2 3))) (setf (-first-item list) 5) list) - ⇒ (5 2 3) - - -- Function: -second-item (list) - Return the second item of LIST, or ‘nil’ if LIST is too short. - - See also: ‘-first-item’ (*note -first-item::), ‘-third-item’ (*note - -third-item::), etc. - - (-second-item ()) - ⇒ () - (-second-item '(1 2 3 4 5)) - ⇒ 2 - (let ((list (list 1 2))) (setf (-second-item list) 5) list) - ⇒ (1 5) - - -- Function: -third-item (list) - Return the third item of LIST, or ‘nil’ if LIST is too short. - - See also: ‘-second-item’ (*note -second-item::), ‘-fourth-item’ - (*note -fourth-item::), etc. - - (-third-item ()) - ⇒ () - (-third-item '(1 2)) - ⇒ () - (-third-item '(1 2 3 4 5)) - ⇒ 3 - - -- Function: -fourth-item (list) - Return the fourth item of LIST, or ‘nil’ if LIST is too short. - - See also: ‘-third-item’ (*note -third-item::), ‘-fifth-item’ (*note - -fifth-item::), etc. - - (-fourth-item ()) - ⇒ () - (-fourth-item '(1 2 3)) - ⇒ () - (-fourth-item '(1 2 3 4 5)) - ⇒ 4 - - -- Function: -fifth-item (list) - Return the fifth item of LIST, or ‘nil’ if LIST is too short. - - See also: ‘-fourth-item’ (*note -fourth-item::), ‘-last-item’ - (*note -last-item::), etc. - - (-fifth-item ()) - ⇒ () - (-fifth-item '(1 2 3 4)) - ⇒ () - (-fifth-item '(1 2 3 4 5)) - ⇒ 5 - - -- Function: -last-item (list) - Return the last item of LIST, or ‘nil’ on an empty list. - - See also: ‘-first-item’ (*note -first-item::), etc. - - (-last-item ()) - ⇒ () - (-last-item '(1 2 3 4 5)) - ⇒ 5 - (let ((list (list 1 2 3))) (setf (-last-item list) 5) list) - ⇒ (1 2 5) - - -- Function: -butlast (list) - Return a list of all items in list except for the last. - - (-butlast '(1 2 3)) - ⇒ (1 2) - (-butlast '(1 2)) - ⇒ (1) - (-butlast '(1)) - ⇒ nil - - -- Function: -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 #'< '(3 1 2)) - ⇒ (1 2 3) - (-sort #'> '(3 1 2)) - ⇒ (3 2 1) - (--sort (< it other) '(3 1 2)) - ⇒ (1 2 3) - - -- Function: -list (arg) - Ensure ARG is a list. If ARG is already a list, return it as is - (not a copy). Otherwise, return a new list with ARG as its only - element. - - Another supported calling convention is (-list &rest ARGS). In - this case, if ARG is not a list, a new list with all of ARGS as - elements is returned. This use is supported for backward - compatibility and is otherwise deprecated. - - (-list 1) - ⇒ (1) - (-list ()) - ⇒ () - (-list '(1 2 3)) - ⇒ (1 2 3) - - -- Function: -fix (fn list) - Compute the (least) fixpoint of FN with initial input LIST. - - FN is called at least once, results are compared with ‘equal’. - - (-fix (lambda (l) (-non-nil (--mapcat (-split-at (/ (length it) 2) it) l))) '((1 2 3))) - ⇒ ((1) (2) (3)) - (let ((l '((starwars scifi) (jedi starwars warrior)))) (--fix (-uniq (--mapcat (cons it (cdr (assq it l))) it)) '(jedi book))) - ⇒ (jedi starwars warrior scifi book) - - -File: dash.info, Node: Tree operations, Next: Threading macros, Prev: Other list operations, Up: Functions - -2.11 Tree operations -==================== - -Functions pretending lists are trees. - - -- Function: -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. - - (-tree-seq 'listp 'identity '(1 (2 3) 4 (5 (6 7)))) - ⇒ ((1 (2 3) 4 (5 (6 7))) 1 (2 3) 2 3 4 (5 (6 7)) 5 (6 7) 6 7) - (-tree-seq 'listp 'reverse '(1 (2 3) 4 (5 (6 7)))) - ⇒ ((1 (2 3) 4 (5 (6 7))) (5 (6 7)) (6 7) 7 6 5 4 (2 3) 3 2 1) - (--tree-seq (vectorp it) (append it nil) [1 [2 3] 4 [5 [6 7]]]) - ⇒ ([1 [2 3] 4 [5 [6 7]]] 1 [2 3] 2 3 4 [5 [6 7]] 5 [6 7] 6 7) - - -- Function: -tree-map (fn tree) - Apply FN to each element of TREE while preserving the tree - structure. - - (-tree-map '1+ '(1 (2 3) (4 (5 6) 7))) - ⇒ (2 (3 4) (5 (6 7) 8)) - (-tree-map '(lambda (x) (cons x (expt 2 x))) '(1 (2 3) 4)) - ⇒ ((1 . 2) ((2 . 4) (3 . 8)) (4 . 16)) - (--tree-map (length it) '("" ("

" "text" "

") "")) - ⇒ (6 (3 4 4) 7) - - -- Function: -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. - - (-tree-map-nodes 'vectorp (lambda (x) (-sum (append x nil))) '(1 [2 3] 4 (5 [6 7] 8))) - ⇒ (1 5 4 (5 13 8)) - (-tree-map-nodes 'keywordp (lambda (x) (symbol-name x)) '(1 :foo 4 ((5 6 :bar) :baz 8))) - ⇒ (1 ":foo" 4 ((5 6 ":bar") ":baz" 8)) - (--tree-map-nodes (eq (car-safe it) 'add-mode) (-concat it (list :mode 'emacs-lisp-mode)) '(with-mode emacs-lisp-mode (foo bar) (add-mode a b) (baz (add-mode c d)))) - ⇒ (with-mode emacs-lisp-mode (foo bar) (add-mode a b :mode emacs-lisp-mode) (baz (add-mode c d :mode emacs-lisp-mode))) - - -- Function: -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’ (*note -reduce-r::) for how exactly are lists of - zero or one element handled. - - (-tree-reduce '+ '(1 (2 3) (4 5))) - ⇒ 15 - (-tree-reduce 'concat '("strings" (" on" " various") ((" levels")))) - ⇒ "strings on various levels" - (--tree-reduce (cond ((stringp it) (concat it " " acc)) (t (let ((sn (symbol-name it))) (concat "<" sn ">" acc "")))) '(body (p "some words") (div "more" (b "bold") "words"))) - ⇒ "

some words

more bold words
" - - -- Function: -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. - - (-tree-reduce-from '+ 1 '(1 (1 1) ((1)))) - ⇒ 8 - (--tree-reduce-from (-concat acc (list it)) nil '(1 (2 3 (4 5)) (6 7))) - ⇒ ((7 6) ((5 4) 3 2) 1) - - -- Function: -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’ (*note -reduce-r-from::). - - This is the same as calling ‘-tree-reduce’ (*note -tree-reduce::) - after ‘-tree-map’ (*note -tree-map::) but is twice as fast as it - only traverse the structure once. - - (-tree-mapreduce 'list 'append '(1 (2 (3 4) (5 6)) (7 (8 9)))) - ⇒ (1 2 3 4 5 6 7 8 9) - (--tree-mapreduce 1 (+ it acc) '(1 (2 (4 9) (2 1)) (7 (4 3)))) - ⇒ 9 - (--tree-mapreduce 0 (max acc (1+ it)) '(1 (2 (4 9) (2 1)) (7 (4 3)))) - ⇒ 3 - - -- Function: -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’ (*note -reduce-r-from::). - - This is the same as calling ‘-tree-reduce-from’ (*note - -tree-reduce-from::) after ‘-tree-map’ (*note -tree-map::) but is - twice as fast as it only traverse the structure once. - - (-tree-mapreduce-from 'identity '* 1 '(1 (2 (3 4) (5 6)) (7 (8 9)))) - ⇒ 362880 - (--tree-mapreduce-from (+ it it) (cons it acc) nil '(1 (2 (4 9) (2 1)) (7 (4 3)))) - ⇒ (2 (4 (8 18) (4 2)) (14 (8 6))) - (concat "{" (--tree-mapreduce-from (cond ((-cons-pair? it) (concat (symbol-name (car it)) " -> " (symbol-name (cdr it)))) (t (concat (symbol-name it) " : {"))) (concat it (unless (or (equal acc "}") (equal (substring it (1- (length it))) "{")) ", ") acc) "}" '((elisp-mode (foo (bar . booze)) (baz . qux)) (c-mode (foo . bla) (bum . bam))))) - ⇒ "{elisp-mode : {foo : {bar -> booze}, baz -> qux}, c-mode : {foo -> bla, bum -> bam}}" - - -- Function: -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. - - (let* ((a (list (list 1))) (b (-clone a))) (setcar (car a) 2) b) - ⇒ ((1)) - - -File: dash.info, Node: Threading macros, Next: Binding, Prev: Tree operations, Up: Functions - -2.12 Threading macros -===================== - -Macros that conditionally combine sequential forms for brevity or -readability. - - -- Macro: -> (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. - - (-> '(2 3 5)) - ⇒ (2 3 5) - (-> '(2 3 5) (append '(8 13))) - ⇒ (2 3 5 8 13) - (-> '(2 3 5) (append '(8 13)) (-slice 1 -1)) - ⇒ (3 5 8) - - -- Macro: ->> (x &optional 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. - - (->> '(1 2 3) (-map 'square)) - ⇒ (1 4 9) - (->> '(1 2 3) (-map 'square) (-remove 'even?)) - ⇒ (1 9) - (->> '(1 2 3) (-map 'square) (-reduce '+)) - ⇒ 14 - - -- Macro: --> (x &rest forms) - Starting with the value of X, thread each expression through FORMS. - - Insert X at the position signified by the symbol ‘it’ in the first - form. If there are more forms, insert the first form at the - position signified by ‘it’ in the second form, etc. - - (--> "def" (concat "abc" it "ghi")) - ⇒ "abcdefghi" - (--> "def" (concat "abc" it "ghi") (upcase it)) - ⇒ "ABCDEFGHI" - (--> "def" (concat "abc" it "ghi") upcase) - ⇒ "ABCDEFGHI" - - -- Macro: -as-> (value variable &rest forms) - Starting with VALUE, thread VARIABLE through FORMS. - - In the first form, bind VARIABLE to VALUE. In the second form, - bind VARIABLE to the result of the first form, and so forth. - - (-as-> 3 my-var (1+ my-var) (list my-var) (mapcar (lambda (ele) (* 2 ele)) my-var)) - ⇒ (8) - (-as-> 3 my-var 1+) - ⇒ 4 - (-as-> 3 my-var) - ⇒ 3 - - -- Macro: -some-> (x &optional form &rest more) - When expr is non-‘nil’, thread it through the first form (via ‘->’ - (*note ->::)), and when that result is non-‘nil’, through the next - form, etc. - - (-some-> '(2 3 5)) - ⇒ (2 3 5) - (-some-> 5 square) - ⇒ 25 - (-some-> 5 even? square) - ⇒ nil - - -- Macro: -some->> (x &optional form &rest more) - When expr is non-‘nil’, thread it through the first form (via ‘->>’ - (*note ->>::)), and when that result is non-‘nil’, through the next - form, etc. - - (-some->> '(1 2 3) (-map 'square)) - ⇒ (1 4 9) - (-some->> '(1 3 5) (-last 'even?) (+ 100)) - ⇒ nil - (-some->> '(2 4 6) (-last 'even?) (+ 100)) - ⇒ 106 - - -- Macro: -some--> (expr &rest forms) - Thread EXPR through FORMS via ‘-->’ (*note -->::), while the result - is non-‘nil’. When EXPR evaluates to non-‘nil’, thread the result - through the first of FORMS, and when that result is non-‘nil’, - thread it through the next form, etc. - - (-some--> "def" (concat "abc" it "ghi")) - ⇒ "abcdefghi" - (-some--> nil (concat "abc" it "ghi")) - ⇒ nil - (-some--> '(0 1) (-remove #'natnump it) (append it it) (-map #'1+ it)) - ⇒ () - - -- Macro: -doto (init &rest forms) - Evaluate INIT and pass it as argument to FORMS with ‘->’ (*note - ->::). The RESULT of evaluating INIT is threaded through each of - FORMS individually using ‘->’ (*note ->::), which see. The return - value is RESULT, which FORMS may have modified by side effect. - - (-doto (list 1 2 3) pop pop) - ⇒ (3) - (-doto (cons 1 2) (setcar 3) (setcdr 4)) - ⇒ (3 . 4) - (gethash 'k (--doto (make-hash-table) (puthash 'k 'v it))) - ⇒ v - - -File: dash.info, Node: Binding, Next: Side effects, Prev: Threading macros, Up: Functions - -2.13 Binding -============ - -Macros that combine ‘let’ and ‘let*’ with destructuring and flow -control. - - -- Macro: -when-let ((var val) &rest body) - If VAL evaluates to non-‘nil’, bind it to VAR and execute body. - - Note: binding is done according to ‘-let’ (*note -let::). - - (-when-let (match-index (string-match "d" "abcd")) (+ match-index 2)) - ⇒ 5 - (-when-let ((&plist :foo foo) (list :foo "foo")) foo) - ⇒ "foo" - (-when-let ((&plist :foo foo) (list :bar "bar")) foo) - ⇒ nil - - -- Macro: -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. - - Note: binding is done according to ‘-let*’ (*note -let*::). VALS - are evaluated sequentially, and evaluation stops after the first - ‘nil’ VAL is encountered. - - (-when-let* ((x 5) (y 3) (z (+ y 4))) (+ x y z)) - ⇒ 15 - (-when-let* ((x 5) (y nil) (z 7)) (+ x y z)) - ⇒ nil - - -- Macro: -if-let ((var val) then &rest else) - If VAL evaluates to non-‘nil’, bind it to VAR and do THEN, - otherwise do ELSE. - - Note: binding is done according to ‘-let’ (*note -let::). - - (-if-let (match-index (string-match "d" "abc")) (+ match-index 3) 7) - ⇒ 7 - (--if-let (even? 4) it nil) - ⇒ t - - -- Macro: -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. - - Note: binding is done according to ‘-let*’ (*note -let*::). VALS - are evaluated sequentially, and evaluation stops after the first - ‘nil’ VAL is encountered. - - (-if-let* ((x 5) (y 3) (z 7)) (+ x y z) "foo") - ⇒ 15 - (-if-let* ((x 5) (y nil) (z 7)) (+ x y z) "foo") - ⇒ "foo" - (-if-let* (((_ _ x) '(nil nil 7))) x) - ⇒ 7 - - -- Macro: -let (varlist &rest body) - Bind variables according to VARLIST then eval BODY. - - VARLIST is a list of lists of the form (PATTERN SOURCE). Each - PATTERN is matched against the SOURCE "structurally". SOURCE is - only evaluated once for each PATTERN. Each PATTERN is matched - recursively, and can therefore contain sub-patterns which are - matched against corresponding sub-expressions of SOURCE. - - All the SOURCEs are evalled before any symbols are bound (i.e. "in - parallel"). - - If VARLIST only contains one (PATTERN SOURCE) element, you can - optionally specify it using a vector and discarding the outer-most - parens. Thus - - (-let ((PATTERN SOURCE)) ...) - - becomes - - (-let [PATTERN SOURCE] ...). - - ‘-let’ (*note -let::) uses a convention of not binding places - (symbols) starting with _ whenever it’s possible. You can use this - to skip over entries you don’t care about. However, this is not - *always* possible (as a result of implementation) and these symbols - might get bound to undefined values. - - Following is the overview of supported patterns. Remember that - patterns can be matched recursively, so every a, b, aK in the - following can be a matching construct and not necessarily a - symbol/variable. - - Symbol: - - a - bind the SOURCE to A. This is just like regular ‘let’. - - Conses and lists: - - (a) - bind ‘car’ of cons/list to A - - (a . b) - bind car of cons to A and ‘cdr’ to B - - (a b) - bind car of list to A and ‘cadr’ to B - - (a1 a2 a3 ...) - bind 0th car of list to A1, 1st to A2, 2nd to - A3... - - (a1 a2 a3 ... aN . rest) - as above, but bind the Nth cdr to REST. - - Vectors: - - [a] - bind 0th element of a non-list sequence to A (works with - vectors, strings, bit arrays...) - - [a1 a2 a3 ...] - bind 0th element of non-list sequence to A0, 1st - to A1, 2nd to A2, ... If the PATTERN is shorter than SOURCE, the - values at places not in PATTERN are ignored. If the PATTERN is - longer than SOURCE, an ‘error’ is thrown. - - [a1 a2 a3 ... &rest rest] - as above, but bind the rest of the - sequence to REST. This is conceptually the same as improper list - matching (a1 a2 ... aN . rest) - - Key/value stores: - - (&plist key0 a0 ... keyN aN) - bind value mapped by keyK in the - SOURCE plist to aK. If the value is not found, aK is ‘nil’. Uses - ‘plist-get’ to fetch values. - - (&alist key0 a0 ... keyN aN) - bind value mapped by keyK in the - SOURCE alist to aK. If the value is not found, aK is ‘nil’. Uses - ‘assoc’ to fetch values. - - (&hash key0 a0 ... keyN aN) - bind value mapped by keyK in the - SOURCE hash table to aK. If the value is not found, aK is ‘nil’. - Uses ‘gethash’ to fetch values. - - Further, special keyword &keys supports "inline" matching of - plist-like key-value pairs, similarly to &keys keyword of - ‘cl-defun’. - - (a1 a2 ... aN &keys key1 b1 ... keyN bK) - - This binds N values from the list to a1 ... aN, then interprets the - cdr as a plist (see key/value matching above). - - A shorthand notation for kv-destructuring exists which allows the - patterns be optionally left out and derived from the key name in - the following fashion: - - - a key :foo is converted into ‘foo’ pattern, - a key ’bar is - converted into ‘bar’ pattern, - a key "baz" is converted into ‘baz’ - pattern. - - That is, the entire value under the key is bound to the derived - variable without any further destructuring. - - This is possible only when the form following the key is not a - valid pattern (i.e. not a symbol, a cons cell or a vector). - Otherwise the matching proceeds as usual and in case of an invalid - spec fails with an error. - - Thus the patterns are normalized as follows: - - ;; derive all the missing patterns (&plist :foo ’bar "baz") => - (&plist :foo foo ’bar bar "baz" baz) - - ;; we can specify some but not others (&plist :foo ’bar - explicit-bar) => (&plist :foo foo ’bar explicit-bar) - - ;; nothing happens, we store :foo in x (&plist :foo x) => (&plist - :foo x) - - ;; nothing happens, we match recursively (&plist :foo (a b c)) => - (&plist :foo (a b c)) - - You can name the source using the syntax SYMBOL &as PATTERN. This - syntax works with lists (proper or improper), vectors and all types - of maps. - - (list &as a b c) (list 1 2 3) - - binds A to 1, B to 2, C to 3 and LIST to (1 2 3). - - Similarly: - - (bounds &as beg . end) (cons 1 2) - - binds BEG to 1, END to 2 and BOUNDS to (1 . 2). - - (items &as first . rest) (list 1 2 3) - - binds FIRST to 1, REST to (2 3) and ITEMS to (1 2 3) - - [vect &as _ b c] [1 2 3] - - binds B to 2, C to 3 and VECT to [1 2 3] (_ avoids binding as - usual). - - (plist &as &plist :b b) (list :a 1 :b 2 :c 3) - - binds B to 2 and PLIST to (:a 1 :b 2 :c 3). Same for &alist and - &hash. - - This is especially useful when we want to capture the result of a - computation and destructure at the same time. Consider the form - (function-returning-complex-structure) returning a list of two - vectors with two items each. We want to capture this entire result - and pass it to another computation, but at the same time we want to - get the second item from each vector. We can achieve it with - pattern - - (result &as [_ a] [_ b]) (function-returning-complex-structure) - - Note: Clojure programmers may know this feature as the ":as - binding". The difference is that we put the &as at the front - because we need to support improper list binding. - - (-let (([a (b c) d] [1 (2 3) 4])) (list a b c d)) - ⇒ (1 2 3 4) - (-let [(a b c . d) (list 1 2 3 4 5 6)] (list a b c d)) - ⇒ (1 2 3 (4 5 6)) - (-let [(&plist :foo foo :bar bar) (list :baz 3 :foo 1 :qux 4 :bar 2)] (list foo bar)) - ⇒ (1 2) - - -- Macro: -let* (varlist &rest body) - Bind variables according to VARLIST then eval BODY. - - VARLIST is a list of lists of the form (PATTERN SOURCE). Each - PATTERN is matched against the SOURCE structurally. SOURCE is only - evaluated once for each PATTERN. - - Each SOURCE can refer to the symbols already bound by this VARLIST. - This is useful if you want to destructure SOURCE recursively but - also want to name the intermediate structures. - - See ‘-let’ (*note -let::) for the list of all possible patterns. - - (-let* (((a . b) (cons 1 2)) ((c . d) (cons 3 4))) (list a b c d)) - ⇒ (1 2 3 4) - (-let* (((a . b) (cons 1 (cons 2 3))) ((c . d) b)) (list a b c d)) - ⇒ (1 (2 . 3) 2 3) - (-let* (((&alist "foo" foo "bar" bar) (list (cons "foo" 1) (cons "bar" (list 'a 'b 'c)))) ((a b c) bar)) (list foo a b c bar)) - ⇒ (1 a b c (a b c)) - - -- Macro: -lambda (match-form &rest body) - Return a lambda which destructures its input as MATCH-FORM and - executes BODY. - - Note that you have to enclose the MATCH-FORM in a pair of parens, - such that: - - (-lambda (x) body) (-lambda (x y ...) body) - - has the usual semantics of ‘lambda’. Furthermore, these get - translated into normal ‘lambda’, so there is no performance - penalty. - - See ‘-let’ (*note -let::) for a description of the destructuring - mechanism. - - (-map (-lambda ((x y)) (+ x y)) '((1 2) (3 4) (5 6))) - ⇒ (3 7 11) - (-map (-lambda ([x y]) (+ x y)) '([1 2] [3 4] [5 6])) - ⇒ (3 7 11) - (funcall (-lambda ((_ . a) (_ . b)) (-concat a b)) '(1 2 3) '(4 5 6)) - ⇒ (2 3 5 6) - - -- Macro: -setq ([match-form val] ...) - Bind each MATCH-FORM to the value of its VAL. - - MATCH-FORM destructuring is done according to the rules of ‘-let’ - (*note -let::). - - This macro allows you to bind multiple variables by destructuring - the value, so for example: - - (-setq (a b) x (&plist :c c) plist) - - expands roughly speaking to the following code - - (setq a (car x) b (cadr x) c (plist-get plist :c)) - - Care is taken to only evaluate each VAL once so that in case of - multiple assignments it does not cause unexpected side effects. - - (let (a) (-setq a 1) a) - ⇒ 1 - (let (a b) (-setq (a b) (list 1 2)) (list a b)) - ⇒ (1 2) - (let (c) (-setq (&plist :c c) (list :c "c")) c) - ⇒ "c" - - -File: dash.info, Node: Side effects, Next: Destructive operations, Prev: Binding, Up: Functions - -2.14 Side effects -================= - -Functions iterating over lists for side effect only. - - -- Function: -each (list fn) - Call FN on each element of LIST. Return ‘nil’; this function is - intended for side effects. - - Its anaphoric counterpart is ‘--each’. - - For access to the current element’s index in LIST, see - ‘-each-indexed’ (*note -each-indexed::). - - (let (l) (-each '(1 2 3) (lambda (x) (push x l))) l) - ⇒ (3 2 1) - (let (l) (--each '(1 2 3) (push it l)) l) - ⇒ (3 2 1) - (-each '(1 2 3) #'identity) - ⇒ nil - - -- Function: -each-while (list pred fn) - Call FN on each ITEM in LIST, while (PRED ITEM) is non-‘nil’. Once - an ITEM is reached for which PRED returns ‘nil’, FN is no longer - called. Return ‘nil’; this function is intended for side effects. - - Its anaphoric counterpart is ‘--each-while’. - - (let (l) (-each-while '(2 4 5 6) #'even? (lambda (x) (push x l))) l) - ⇒ (4 2) - (let (l) (--each-while '(1 2 3 4) (< it 3) (push it l)) l) - ⇒ (2 1) - (let ((s 0)) (--each-while '(1 3 4 5) (< it 5) (setq s (+ s it))) s) - ⇒ 8 - - -- Function: -each-indexed (list fn) - Call FN on each index and element of LIST. For each ITEM at INDEX - in LIST, call (funcall FN INDEX ITEM). Return ‘nil’; this function - is intended for side effects. - - See also: ‘-map-indexed’ (*note -map-indexed::). - - (let (l) (-each-indexed '(a b c) (lambda (i x) (push (list x i) l))) l) - ⇒ ((c 2) (b 1) (a 0)) - (let (l) (--each-indexed '(a b c) (push (list it it-index) l)) l) - ⇒ ((c 2) (b 1) (a 0)) - (let (l) (--each-indexed () (push it l)) l) - ⇒ () - - -- Function: -each-r (list fn) - Call FN on each element of LIST in reversed order. Return ‘nil’; - this function is intended for side effects. - - Its anaphoric counterpart is ‘--each-r’. - - (let (l) (-each-r '(1 2 3) (lambda (x) (push x l))) l) - ⇒ (1 2 3) - (let (l) (--each-r '(1 2 3) (push it l)) l) - ⇒ (1 2 3) - (-each-r '(1 2 3) #'identity) - ⇒ nil - - -- Function: -each-r-while (list pred fn) - Call FN on each ITEM in reversed LIST, while (PRED ITEM) is - non-‘nil’. Once an ITEM is reached for which PRED returns ‘nil’, - FN is no longer called. Return ‘nil’; this function is intended - for side effects. - - Its anaphoric counterpart is ‘--each-r-while’. - - (let (l) (-each-r-while '(2 4 5 6) #'even? (lambda (x) (push x l))) l) - ⇒ (6) - (let (l) (--each-r-while '(1 2 3 4) (>= it 3) (push it l)) l) - ⇒ (3 4) - (let ((s 0)) (--each-r-while '(1 2 3 5) (> it 1) (setq s (+ s it))) s) - ⇒ 10 - - -- Function: -dotimes (num fn) - Call FN NUM times, presumably for side effects. FN is called with - a single argument on successive integers running from 0, inclusive, - to NUM, exclusive. FN is not called if NUM is less than 1. - - This function’s anaphoric counterpart is ‘--dotimes’. - - (let (s) (-dotimes 3 (lambda (n) (push n s))) s) - ⇒ (2 1 0) - (let (s) (-dotimes 0 (lambda (n) (push n s))) s) - ⇒ () - (let (s) (--dotimes 5 (push it s)) s) - ⇒ (4 3 2 1 0) - - -File: dash.info, Node: Destructive operations, Next: Function combinators, Prev: Side effects, Up: Functions - -2.15 Destructive operations -=========================== - -Macros that modify variables holding lists. - - -- Macro: !cons (car cdr) - Destructive: Set CDR to the cons of CAR and CDR. - - (let (l) (!cons 5 l) l) - ⇒ (5) - (let ((l '(3))) (!cons 5 l) l) - ⇒ (5 3) - - -- Macro: !cdr (list) - Destructive: Set LIST to the cdr of LIST. - - (let ((l '(3))) (!cdr l) l) - ⇒ () - (let ((l '(3 5))) (!cdr l) l) - ⇒ (5) - - -File: dash.info, Node: Function combinators, Prev: Destructive operations, Up: Functions - -2.16 Function combinators -========================= - -Functions that manipulate and compose other functions. - - -- Function: -partial (fun &rest args) - Return a function that is a partial application of FUN to ARGS. - ARGS is a list of the first N arguments to pass to FUN. The result - is a new function which does the same as FUN, except that the first - N arguments are fixed at the values with which this function was - called. - - (funcall (-partial #'+ 5)) - ⇒ 5 - (funcall (-partial #'- 5) 3) - ⇒ 2 - (funcall (-partial #'+ 5 2) 3) - ⇒ 10 - - -- Function: -rpartial (fn &rest args) - Return a function that is a partial application of FN to ARGS. - ARGS is a list of the last N arguments to pass to FN. The result - is a new function which does the same as FN, except that the last N - arguments are fixed at the values with which this function was - called. This is like ‘-partial’ (*note -partial::), except the - arguments are fixed starting from the right rather than the left. - - (funcall (-rpartial #'- 5)) - ⇒ -5 - (funcall (-rpartial #'- 5) 8) - ⇒ 3 - (funcall (-rpartial #'- 5 2) 10) - ⇒ 3 - - -- Function: -juxt (&rest fns) - Return a function that is the juxtaposition of FNS. The returned - function takes a variable number of ARGS, applies each of FNS in - turn to ARGS, and returns the list of results. - - (funcall (-juxt) 1 2) - ⇒ () - (funcall (-juxt #'+ #'- #'* #'/) 7 5) - ⇒ (12 2 35 1) - (mapcar (-juxt #'number-to-string #'1+) '(1 2)) - ⇒ (("1" 2) ("2" 3)) - - -- Function: -compose (&rest fns) - Compose FNS into a single composite function. Return a function - that takes a variable number of ARGS, applies the last function in - FNS to ARGS, and returns the result of calling each remaining - function on the result of the previous function, right-to-left. If - no FNS are given, return a variadic ‘identity’ function. - - (funcall (-compose #'- #'1+ #'+) 1 2 3) - ⇒ -7 - (funcall (-compose #'identity #'1+) 3) - ⇒ 4 - (mapcar (-compose #'not #'stringp) '(nil "")) - ⇒ (t nil) - - -- Function: -applify (fn) - Return a function that applies FN to a single list of args. This - changes the arity of FN from taking N distinct arguments to taking - 1 argument which is a list of N arguments. - - (funcall (-applify #'+) nil) - ⇒ 0 - (mapcar (-applify #'+) '((1 1 1) (1 2 3) (5 5 5))) - ⇒ (3 6 15) - (funcall (-applify #'<) '(3 6)) - ⇒ t - - -- Function: -on (op trans) - Return a function that calls TRANS on each arg and OP on the - results. The returned function takes a variable number of - arguments, calls the function TRANS on each one in turn, and then - passes those results as the list of arguments to OP, in the same - order. - - For example, the following pairs of expressions are morally - equivalent: - - (funcall (-on #’+ #’1+) 1 2 3) = (+ (1+ 1) (1+ 2) (1+ 3)) (funcall - (-on #’+ #’1+)) = (+) - - (-sort (-on #'< #'length) '((1 2 3) (1) (1 2))) - ⇒ ((1) (1 2) (1 2 3)) - (funcall (-on #'min #'string-to-number) "22" "2" "1" "12") - ⇒ 1 - (-min-by (-on #'> #'length) '((1 2 3) (4) (1 2))) - ⇒ (4) - - -- Function: -flip (fn) - Return a function that calls FN with its arguments reversed. The - returned function takes the same number of arguments as FN. - - For example, the following two expressions are morally equivalent: - - (funcall (-flip #’-) 1 2) = (- 2 1) - - See also: ‘-rotate-args’ (*note -rotate-args::). - - (-sort (-flip #'<) '(4 3 6 1)) - ⇒ (6 4 3 1) - (funcall (-flip #'-) 3 2 1 10) - ⇒ 4 - (funcall (-flip #'1+) 1) - ⇒ 2 - - -- Function: -rotate-args (n fn) - Return a function that calls FN with args rotated N places to the - right. The returned function takes the same number of arguments as - FN, rotates the list of arguments N places to the right (left if N - is negative) just like ‘-rotate’ (*note -rotate::), and applies FN - to the result. - - See also: ‘-flip’ (*note -flip::). - - (funcall (-rotate-args -1 #'list) 1 2 3 4) - ⇒ (2 3 4 1) - (funcall (-rotate-args 1 #'-) 1 10 100) - ⇒ 89 - (funcall (-rotate-args 2 #'list) 3 4 5 1 2) - ⇒ (1 2 3 4 5) - - -- Function: -const (c) - Return a function that returns C ignoring any additional arguments. - - In types: a -> b -> a - - (funcall (-const 2) 1 3 "foo") - ⇒ 2 - (mapcar (-const 1) '("a" "b" "c" "d")) - ⇒ (1 1 1 1) - (-sum (mapcar (-const 1) '("a" "b" "c" "d"))) - ⇒ 4 - - -- Macro: -cut (&rest params) - Take n-ary function and n arguments and specialize some of them. - Arguments denoted by <> will be left unspecialized. - - See SRFI-26 for detailed description. - - (funcall (-cut list 1 <> 3 <> 5) 2 4) - ⇒ (1 2 3 4 5) - (-map (-cut funcall <> 5) `(1+ 1- ,(lambda (x) (/ 1.0 x)))) - ⇒ (6 4 0.2) - (-map (-cut <> 1 2 3) '(list vector string)) - ⇒ ((1 2 3) [1 2 3] "\1\2\3") - - -- Function: -not (pred) - Return a predicate that negates the result of PRED. The returned - predicate passes its arguments to PRED. If PRED returns ‘nil’, the - result is non-‘nil’; otherwise the result is ‘nil’. - - See also: ‘-andfn’ (*note -andfn::) and ‘-orfn’ (*note -orfn::). - - (funcall (-not #'numberp) "5") - ⇒ t - (-sort (-not #'<) '(5 2 1 0 6)) - ⇒ (6 5 2 1 0) - (-filter (-not (-partial #'< 4)) '(1 2 3 4 5 6 7 8)) - ⇒ (1 2 3 4) - - -- Function: -orfn (&rest preds) - Return a predicate that returns the first non-‘nil’ result of - PREDS. The returned predicate takes a variable number of - arguments, passes them to each predicate in PREDS in turn until one - of them returns non-‘nil’, and returns that non-‘nil’ result - without calling the remaining PREDS. If all PREDS return ‘nil’, or - if no PREDS are given, the returned predicate returns ‘nil’. - - See also: ‘-andfn’ (*note -andfn::) and ‘-not’ (*note -not::). - - (-filter (-orfn #'natnump #'booleanp) '(1 nil "a" -4 b c t)) - ⇒ (1 nil t) - (funcall (-orfn #'symbolp (-cut string-match-p "x" <>)) "axe") - ⇒ 1 - (funcall (-orfn #'= #'+) 1 1) - ⇒ t - - -- Function: -andfn (&rest preds) - Return a predicate that returns non-‘nil’ if all PREDS do so. The - returned predicate P takes a variable number of arguments and - passes them to each predicate in PREDS in turn. If any one of - PREDS returns ‘nil’, P also returns ‘nil’ without calling the - remaining PREDS. If all PREDS return non-‘nil’, P returns the last - such value. If no PREDS are given, P always returns non-‘nil’. - - See also: ‘-orfn’ (*note -orfn::) and ‘-not’ (*note -not::). - - (-filter (-andfn #'numberp (-cut < <> 5)) '(a 1 b 6 c 2)) - ⇒ (1 2) - (mapcar (-andfn #'numberp #'1+) '(a 1 b 6)) - ⇒ (nil 2 nil 7) - (funcall (-andfn #'= #'+) 1 1) - ⇒ 2 - - -- Function: -iteratefn (fn n) - Return a function FN composed N times with itself. - - FN is a unary function. If you need to use a function of higher - arity, use ‘-applify’ (*note -applify::) first to turn it into a - unary function. - - With n = 0, this acts as identity function. - - In types: (a -> a) -> Int -> a -> a. - - This function satisfies the following law: - - (funcall (-iteratefn fn n) init) = (-last-item (-iterate fn init - (1+ n))). - - (funcall (-iteratefn (lambda (x) (* x x)) 3) 2) - ⇒ 256 - (funcall (-iteratefn '1+ 3) 1) - ⇒ 4 - (funcall (-iteratefn 'cdr 3) '(1 2 3 4 5)) - ⇒ (4 5) - - -- Function: -fixfn (fn &optional equal-test halt-test) - Return a function that computes the (least) fixpoint of FN. - - FN must be a unary function. The returned lambda takes a single - argument, X, the initial value for the fixpoint iteration. The - iteration halts when either of the following conditions is - satisfied: - - 1. Iteration converges to the fixpoint, with equality being tested - using EQUAL-TEST. If EQUAL-TEST is not specified, ‘equal’ is used. - For functions over the floating point numbers, it may be necessary - to provide an appropriate approximate comparison test. - - 2. HALT-TEST returns a non-‘nil’ value. HALT-TEST defaults to a - simple counter that returns ‘t’ after ‘-fixfn-max-iterations’, to - guard against infinite iteration. Otherwise, HALT-TEST must be a - function that accepts a single argument, the current value of X, - and returns non-‘nil’ as long as iteration should continue. In - this way, a more sophisticated convergence test may be supplied by - the caller. - - The return value of the lambda is either the fixpoint or, if - iteration halted before converging, a cons with car ‘halted’ and - cdr the final output from HALT-TEST. - - In types: (a -> a) -> a -> a. - - (funcall (-fixfn #'cos #'approx=) 0.7) - ⇒ 0.7390851332151607 - (funcall (-fixfn (lambda (x) (expt (+ x 10) 0.25))) 2.0) - ⇒ 1.8555845286409378 - (funcall (-fixfn #'sin #'approx=) 0.1) - ⇒ (halted . t) - - -- Function: -prodfn (&rest fns) - Return a function that applies each of FNS to each of a list of - arguments. - - Takes a list of N functions and returns a function that takes a - list of length N, applying Ith function to Ith element of the input - list. Returns a list of length N. - - In types (for N=2): ((a -> b), (c -> d)) -> (a, c) -> (b, d) - - This function satisfies the following laws: - - (-compose (-prodfn f g ...) (-prodfn f’ g’ ...)) = (-prodfn - (-compose f f’) (-compose g g’) ...) - - (-prodfn f g ...) = (-juxt (-compose f (-partial #’nth 0)) - (-compose g (-partial #’nth 1)) ...) - - (-compose (-prodfn f g ...) (-juxt f’ g’ ...)) = (-juxt (-compose f - f’) (-compose g g’) ...) - - (-compose (-partial #’nth n) (-prod f1 f2 ...)) = (-compose fn - (-partial #’nth n)) - - (funcall (-prodfn #'1+ #'1- #'number-to-string) '(1 2 3)) - ⇒ (2 1 "3") - (-map (-prodfn #'1- #'1+) '((1 2) (3 4) (5 6))) - ⇒ ((0 3) (2 5) (4 7)) - (apply #'+ (funcall (-prodfn #'length #'string-to-number) '((t) "5"))) - ⇒ 6 - - -File: dash.info, Node: Development, Next: FDL, Prev: Functions, Up: Top - -3 Development -************* - -The Dash repository is hosted on GitHub at -. - -* Menu: - -* Contribute:: How to contribute. -* Contributors:: List of contributors. - - -File: dash.info, Node: Contribute, Next: Contributors, Up: Development - -3.1 Contribute -============== - -Yes, please do. Pure functions in the list manipulation realm only, -please. There’s a suite of examples/tests in ‘dev/examples.el’, so -remember to add tests for your additions, or they may get broken later. - - Run the tests with ‘make check’. Regenerate the docs with ‘make -docs’. Contributors are encouraged to install these commands as a Git -pre-commit hook, so that the tests are always running and the docs are -always in sync: - - $ cp dev/pre-commit.sh .git/hooks/pre-commit - - Oh, and don’t edit ‘README.md’ or ‘dash.texi’ directly, as they are -auto-generated. Instead, change their respective templates -‘readme-template.md’ or ‘dash-template.texi’. - - To ensure that Dash can be distributed with GNU ELPA or Emacs, we -require that all contributors assign copyright to the Free Software -Foundation. For more on this, *note (emacs)Copyright Assignment::. - - -File: dash.info, Node: Contributors, Prev: Contribute, Up: Development - -3.2 Contributors -================ - - • Matus Goljer (https://github.com/Fuco1) contributed lots of - features and functions. - • Takafumi Arakaki (https://github.com/tkf) contributed ‘-group-by’. - • tali713 (https://github.com/tali713) is the author of ‘-applify’. - • Víctor M. Valenzuela (https://github.com/vemv) contributed - ‘-repeat’. - • Nic Ferrier (https://github.com/nicferrier) contributed ‘-cons*’. - • Wilfred Hughes (https://github.com/Wilfred) contributed ‘-slice’, - ‘-first-item’, and ‘-last-item’. - • Emanuel Evans (https://github.com/shosti) contributed ‘-if-let’, - ‘-when-let’, and ‘-insert-at’. - • Johan Andersson (https://github.com/rejeep) contributed ‘-sum’, - ‘-product’, and ‘-same-items?’. - • Christina Whyte (https://github.com/kurisuwhyte) contributed - ‘-compose’. - • Steve Lamb (https://github.com/steventlamb) contributed ‘-cycle’, - ‘-pad’, ‘-annotate’, ‘-zip-fill’, and a variadic version of ‘-zip’. - • Fredrik Bergroth (https://github.com/fbergroth) made the ‘-if-let’ - family use ‘-let’ destructuring and improved the script for - generating documentation. - • Mark Oteiza (https://github.com/holomorph) contributed ‘-iota’ and - the script to create an Info manual. - • Vasilij Schneidermann (https://github.com/wasamasa) contributed - ‘-some’. - • William West (https://github.com/occidens) made ‘-fixfn’ more - robust at handling floats. - • Cam Saul (https://github.com/camsaul) contributed ‘-some->’, - ‘-some->>’, and ‘-some-->’. - • Basil L. Contovounesios (https://github.com/basil-conto) - contributed ‘-common-prefix’, ‘-common-suffix’, and various other - improvements. - • Paul Pogonyshev (https://github.com/doublep) contributed ‘-each-r’ - and ‘-each-r-while’. - - Thanks! - - New contributors are very welcome. *Note Contribute::. - - -File: dash.info, Node: FDL, Next: GPL, Prev: Development, Up: Top - -Appendix A GNU Free Documentation License -***************************************** - - Version 1.3, 3 November 2008 - - Copyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. - - - 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. - - The “publisher” means any person or entity that distributes copies - of the Document to the public. - - 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 under this License. Any attempt - otherwise to copy, modify, sublicense, or distribute it is void, - and will automatically terminate your rights under this License. - - However, if you cease all violation of this License, then your - license from a particular copyright holder is reinstated (a) - provisionally, unless and until the copyright holder explicitly and - finally terminates your license, and (b) permanently, if the - copyright holder fails to notify you of the violation by some - reasonable means prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is - reinstated permanently if the copyright holder notifies you of the - violation by some reasonable means, this is the first time you have - received notice of violation of this License (for any work) from - that copyright holder, and you cure the violation prior to 30 days - after your receipt of the notice. - - Termination of your rights under this section does not terminate - the licenses of parties who have received copies or rights from you - under this License. If your rights have been terminated and not - permanently reinstated, receipt of a copy of some or all of the - same material does not give you any rights to use it. - - 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 - . - - 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. If the Document specifies that a proxy can - decide which future versions of this License can be used, that - proxy’s public statement of acceptance of a version permanently - authorizes you to choose that version for the Document. - - 11. RELICENSING - - “Massive Multiauthor Collaboration Site” (or “MMC Site”) means any - World Wide Web server that publishes copyrightable works and also - provides prominent facilities for anybody to edit those works. A - public wiki that anybody can edit is an example of such a server. - A “Massive Multiauthor Collaboration” (or “MMC”) contained in the - site means any set of copyrightable works thus published on the MMC - site. - - “CC-BY-SA” means the Creative Commons Attribution-Share Alike 3.0 - license published by Creative Commons Corporation, a not-for-profit - corporation with a principal place of business in San Francisco, - California, as well as future copyleft versions of that license - published by that same organization. - - “Incorporate” means to publish or republish a Document, in whole or - in part, as part of another Document. - - An MMC is “eligible for relicensing” if it is licensed under this - License, and if all works that were first published under this - License somewhere other than this MMC, and subsequently - incorporated in whole or in part into the MMC, (1) had no cover - texts or invariant sections, and (2) were thus incorporated prior - to November 1, 2008. - - The operator of an MMC Site may republish an MMC contained in the - site under CC-BY-SA on the same site at any time before August 1, - 2009, provided the MMC is eligible for relicensing. - -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.3 - 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. - - -File: dash.info, Node: GPL, Next: Index, Prev: FDL, Up: Top - -Appendix B GNU General Public License -************************************* - - Version 3, 29 June 2007 - - Copyright © 2007 Free Software Foundation, Inc. - - Everyone is permitted to copy and distribute verbatim copies of this - license document, but changing it is not allowed. - -Preamble -======== - -The GNU General Public License is a free, copyleft license for software -and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program—to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers’ and authors’ protection, the GPL clearly explains -that there is no warranty for this free software. For both users’ and -authors’ sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users’ freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - -TERMS AND CONDITIONS -==================== - - 0. Definitions. - - “This License” refers to version 3 of the GNU General Public - License. - - “Copyright” also means copyright-like laws that apply to other - kinds of works, such as semiconductor masks. - - “The Program” refers to any copyrightable work licensed under this - License. Each licensee is addressed as “you”. “Licensees” and - “recipients” may be individuals or organizations. - - To “modify” a work means to copy from or adapt all or part of the - work in a fashion requiring copyright permission, other than the - making of an exact copy. The resulting work is called a “modified - version” of the earlier work or a work “based on” the earlier work. - - A “covered work” means either the unmodified Program or a work - based on the Program. - - To “propagate” a work means to do anything with it that, without - permission, would make you directly or secondarily liable for - infringement under applicable copyright law, except executing it on - a computer or modifying a private copy. Propagation includes - copying, distribution (with or without modification), making - available to the public, and in some countries other activities as - well. - - To “convey” a work means any kind of propagation that enables other - parties to make or receive copies. Mere interaction with a user - through a computer network, with no transfer of a copy, is not - conveying. - - An interactive user interface displays “Appropriate Legal Notices” - to the extent that it includes a convenient and prominently visible - feature that (1) displays an appropriate copyright notice, and (2) - tells the user that there is no warranty for the work (except to - the extent that warranties are provided), that licensees may convey - the work under this License, and how to view a copy of this - License. If the interface presents a list of user commands or - options, such as a menu, a prominent item in the list meets this - criterion. - - 1. Source Code. - - The “source code” for a work means the preferred form of the work - for making modifications to it. “Object code” means any non-source - form of a work. - - A “Standard Interface” means an interface that either is an - official standard defined by a recognized standards body, or, in - the case of interfaces specified for a particular programming - language, one that is widely used among developers working in that - language. - - The “System Libraries” of an executable work include anything, - other than the work as a whole, that (a) is included in the normal - form of packaging a Major Component, but which is not part of that - Major Component, and (b) serves only to enable use of the work with - that Major Component, or to implement a Standard Interface for - which an implementation is available to the public in source code - form. A “Major Component”, in this context, means a major - essential component (kernel, window system, and so on) of the - specific operating system (if any) on which the executable work - runs, or a compiler used to produce the work, or an object code - interpreter used to run it. - - The “Corresponding Source” for a work in object code form means all - the source code needed to generate, install, and (for an executable - work) run the object code and to modify the work, including scripts - to control those activities. However, it does not include the - work’s System Libraries, or general-purpose tools or generally - available free programs which are used unmodified in performing - those activities but which are not part of the work. For example, - Corresponding Source includes interface definition files associated - with source files for the work, and the source code for shared - libraries and dynamically linked subprograms that the work is - specifically designed to require, such as by intimate data - communication or control flow between those subprograms and other - parts of the work. - - The Corresponding Source need not include anything that users can - regenerate automatically from other parts of the Corresponding - Source. - - The Corresponding Source for a work in source code form is that - same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of - copyright on the Program, and are irrevocable provided the stated - conditions are met. This License explicitly affirms your unlimited - permission to run the unmodified Program. The output from running - a covered work is covered by this License only if the output, given - its content, constitutes a covered work. This License acknowledges - your rights of fair use or other equivalent, as provided by - copyright law. - - You may make, run and propagate covered works that you do not - convey, without conditions so long as your license otherwise - remains in force. You may convey covered works to others for the - sole purpose of having them make modifications exclusively for you, - or provide you with facilities for running those works, provided - that you comply with the terms of this License in conveying all - material for which you do not control copyright. Those thus making - or running the covered works for you must do so exclusively on your - behalf, under your direction and control, on terms that prohibit - them from making any copies of your copyrighted material outside - their relationship with you. - - Conveying under any other circumstances is permitted solely under - the conditions stated below. Sublicensing is not allowed; section - 10 makes it unnecessary. - - 3. Protecting Users’ Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological - measure under any applicable law fulfilling obligations under - article 11 of the WIPO copyright treaty adopted on 20 December - 1996, or similar laws prohibiting or restricting circumvention of - such measures. - - When you convey a covered work, you waive any legal power to forbid - circumvention of technological measures to the extent such - circumvention is effected by exercising rights under this License - with respect to the covered work, and you disclaim any intention to - limit operation or modification of the work as a means of - enforcing, against the work’s users, your or third parties’ legal - rights to forbid circumvention of technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program’s source code as you - receive it, in any medium, provided that you conspicuously and - appropriately publish on each copy an appropriate copyright notice; - keep intact all notices stating that this License and any - non-permissive terms added in accord with section 7 apply to the - code; keep intact all notices of the absence of any warranty; and - give all recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, - and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to - produce it from the Program, in the form of source code under the - terms of section 4, provided that you also meet all of these - conditions: - - a. The work must carry prominent notices stating that you - modified it, and giving a relevant date. - - b. The work must carry prominent notices stating that it is - released under this License and any conditions added under - section 7. This requirement modifies the requirement in - section 4 to “keep intact all notices”. - - c. You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable - section 7 additional terms, to the whole of the work, and all - its parts, regardless of how they are packaged. This License - gives no permission to license the work in any other way, but - it does not invalidate such permission if you have separately - received it. - - d. If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has - interactive interfaces that do not display Appropriate Legal - Notices, your work need not make them do so. - - A compilation of a covered work with other separate and independent - works, which are not by their nature extensions of the covered - work, and which are not combined with it such as to form a larger - program, in or on a volume of a storage or distribution medium, is - called an “aggregate” if the compilation and its resulting - copyright are not used to limit the access or legal rights of the - compilation’s users beyond what the individual works permit. - Inclusion of a covered work in an aggregate does not cause this - License to apply to the other parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms - of sections 4 and 5, provided that you also convey the - machine-readable Corresponding Source under the terms of this - License, in one of these ways: - - a. Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b. Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that - product model, to give anyone who possesses the object code - either (1) a copy of the Corresponding Source for all the - software in the product that is covered by this License, on a - durable physical medium customarily used for software - interchange, for a price no more than your reasonable cost of - physically performing this conveying of source, or (2) access - to copy the Corresponding Source from a network server at no - charge. - - c. Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, - and only if you received the object code with such an offer, - in accord with subsection 6b. - - d. Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to - the Corresponding Source in the same way through the same - place at no further charge. You need not require recipients - to copy the Corresponding Source along with the object code. - If the place to copy the object code is a network server, the - Corresponding Source may be on a different server (operated by - you or a third party) that supports equivalent copying - facilities, provided you maintain clear directions next to the - object code saying where to find the Corresponding Source. - Regardless of what server hosts the Corresponding Source, you - remain obligated to ensure that it is available for as long as - needed to satisfy these requirements. - - e. Convey the object code using peer-to-peer transmission, - provided you inform other peers where the object code and - Corresponding Source of the work are being offered to the - general public at no charge under subsection 6d. - - A separable portion of the object code, whose source code is - excluded from the Corresponding Source as a System Library, need - not be included in conveying the object code work. - - A “User Product” is either (1) a “consumer product”, which means - any tangible personal property which is normally used for personal, - family, or household purposes, or (2) anything designed or sold for - incorporation into a dwelling. In determining whether a product is - a consumer product, doubtful cases shall be resolved in favor of - coverage. For a particular product received by a particular user, - “normally used” refers to a typical or common use of that class of - product, regardless of the status of the particular user or of the - way in which the particular user actually uses, or expects or is - expected to use, the product. A product is a consumer product - regardless of whether the product has substantial commercial, - industrial or non-consumer uses, unless such uses represent the - only significant mode of use of the product. - - “Installation Information” for a User Product means any methods, - procedures, authorization keys, or other information required to - install and execute modified versions of a covered work in that - User Product from a modified version of its Corresponding Source. - The information must suffice to ensure that the continued - functioning of the modified object code is in no case prevented or - interfered with solely because modification has been made. - - If you convey an object code work under this section in, or with, - or specifically for use in, a User Product, and the conveying - occurs as part of a transaction in which the right of possession - and use of the User Product is transferred to the recipient in - perpetuity or for a fixed term (regardless of how the transaction - is characterized), the Corresponding Source conveyed under this - section must be accompanied by the Installation Information. But - this requirement does not apply if neither you nor any third party - retains the ability to install modified object code on the User - Product (for example, the work has been installed in ROM). - - The requirement to provide Installation Information does not - include a requirement to continue to provide support service, - warranty, or updates for a work that has been modified or installed - by the recipient, or for the User Product in which it has been - modified or installed. Access to a network may be denied when the - modification itself materially and adversely affects the operation - of the network or violates the rules and protocols for - communication across the network. - - Corresponding Source conveyed, and Installation Information - provided, in accord with this section must be in a format that is - publicly documented (and with an implementation available to the - public in source code form), and must require no special password - or key for unpacking, reading or copying. - - 7. Additional Terms. - - “Additional permissions” are terms that supplement the terms of - this License by making exceptions from one or more of its - conditions. Additional permissions that are applicable to the - entire Program shall be treated as though they were included in - this License, to the extent that they are valid under applicable - law. If additional permissions apply only to part of the Program, - that part may be used separately under those permissions, but the - entire Program remains governed by this License without regard to - the additional permissions. - - When you convey a copy of a covered work, you may at your option - remove any additional permissions from that copy, or from any part - of it. (Additional permissions may be written to require their own - removal in certain cases when you modify the work.) You may place - additional permissions on material, added by you to a covered work, - for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material - you add to a covered work, you may (if authorized by the copyright - holders of that material) supplement the terms of this License with - terms: - - a. Disclaiming warranty or limiting liability differently from - the terms of sections 15 and 16 of this License; or - - b. Requiring preservation of specified reasonable legal notices - or author attributions in that material or in the Appropriate - Legal Notices displayed by works containing it; or - - c. Prohibiting misrepresentation of the origin of that material, - or requiring that modified versions of such material be marked - in reasonable ways as different from the original version; or - - d. Limiting the use for publicity purposes of names of licensors - or authors of the material; or - - e. Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f. Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified - versions of it) with contractual assumptions of liability to - the recipient, for any liability that these contractual - assumptions directly impose on those licensors and authors. - - All other non-permissive additional terms are considered “further - restrictions” within the meaning of section 10. If the Program as - you received it, or any part of it, contains a notice stating that - it is governed by this License along with a term that is a further - restriction, you may remove that term. If a license document - contains a further restriction but permits relicensing or conveying - under this License, you may add to a covered work material governed - by the terms of that license document, provided that the further - restriction does not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you - must place, in the relevant source files, a statement of the - additional terms that apply to those files, or a notice indicating - where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in - the form of a separately written license, or stated as exceptions; - the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly - provided under this License. Any attempt otherwise to propagate or - modify it is void, and will automatically terminate your rights - under this License (including any patent licenses granted under the - third paragraph of section 11). - - However, if you cease all violation of this License, then your - license from a particular copyright holder is reinstated (a) - provisionally, unless and until the copyright holder explicitly and - finally terminates your license, and (b) permanently, if the - copyright holder fails to notify you of the violation by some - reasonable means prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is - reinstated permanently if the copyright holder notifies you of the - violation by some reasonable means, this is the first time you have - received notice of violation of this License (for any work) from - that copyright holder, and you cure the violation prior to 30 days - after your receipt of the notice. - - Termination of your rights under this section does not terminate - the licenses of parties who have received copies or rights from you - under this License. If your rights have been terminated and not - permanently reinstated, you do not qualify to receive new licenses - for the same material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or - run a copy of the Program. Ancillary propagation of a covered work - occurring solely as a consequence of using peer-to-peer - transmission to receive a copy likewise does not require - acceptance. However, nothing other than this License grants you - permission to propagate or modify any covered work. These actions - infringe copyright if you do not accept this License. Therefore, - by modifying or propagating a covered work, you indicate your - acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically - receives a license from the original licensors, to run, modify and - propagate that work, subject to this License. You are not - responsible for enforcing compliance by third parties with this - License. - - An “entity transaction” is a transaction transferring control of an - organization, or substantially all assets of one, or subdividing an - organization, or merging organizations. If propagation of a - covered work results from an entity transaction, each party to that - transaction who receives a copy of the work also receives whatever - licenses to the work the party’s predecessor in interest had or - could give under the previous paragraph, plus a right to possession - of the Corresponding Source of the work from the predecessor in - interest, if the predecessor has it or can get it with reasonable - efforts. - - You may not impose any further restrictions on the exercise of the - rights granted or affirmed under this License. For example, you - may not impose a license fee, royalty, or other charge for exercise - of rights granted under this License, and you may not initiate - litigation (including a cross-claim or counterclaim in a lawsuit) - alleging that any patent claim is infringed by making, using, - selling, offering for sale, or importing the Program or any portion - of it. - - 11. Patents. - - A “contributor” is a copyright holder who authorizes use under this - License of the Program or a work on which the Program is based. - The work thus licensed is called the contributor’s “contributor - version”. - - A contributor’s “essential patent claims” are all patent claims - owned or controlled by the contributor, whether already acquired or - hereafter acquired, that would be infringed by some manner, - permitted by this License, of making, using, or selling its - contributor version, but do not include claims that would be - infringed only as a consequence of further modification of the - contributor version. For purposes of this definition, “control” - includes the right to grant patent sublicenses in a manner - consistent with the requirements of this License. - - Each contributor grants you a non-exclusive, worldwide, - royalty-free patent license under the contributor’s essential - patent claims, to make, use, sell, offer for sale, import and - otherwise run, modify and propagate the contents of its contributor - version. - - In the following three paragraphs, a “patent license” is any - express agreement or commitment, however denominated, not to - enforce a patent (such as an express permission to practice a - patent or covenant not to sue for patent infringement). To “grant” - such a patent license to a party means to make such an agreement or - commitment not to enforce a patent against the party. - - If you convey a covered work, knowingly relying on a patent - license, and the Corresponding Source of the work is not available - for anyone to copy, free of charge and under the terms of this - License, through a publicly available network server or other - readily accessible means, then you must either (1) cause the - Corresponding Source to be so available, or (2) arrange to deprive - yourself of the benefit of the patent license for this particular - work, or (3) arrange, in a manner consistent with the requirements - of this License, to extend the patent license to downstream - recipients. “Knowingly relying” means you have actual knowledge - that, but for the patent license, your conveying the covered work - in a country, or your recipient’s use of the covered work in a - country, would infringe one or more identifiable patents in that - country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or - arrangement, you convey, or propagate by procuring conveyance of, a - covered work, and grant a patent license to some of the parties - receiving the covered work authorizing them to use, propagate, - modify or convey a specific copy of the covered work, then the - patent license you grant is automatically extended to all - recipients of the covered work and works based on it. - - A patent license is “discriminatory” if it does not include within - the scope of its coverage, prohibits the exercise of, or is - conditioned on the non-exercise of one or more of the rights that - are specifically granted under this License. You may not convey a - covered work if you are a party to an arrangement with a third - party that is in the business of distributing software, under which - you make payment to the third party based on the extent of your - activity of conveying the work, and under which the third party - grants, to any of the parties who would receive the covered work - from you, a discriminatory patent license (a) in connection with - copies of the covered work conveyed by you (or copies made from - those copies), or (b) primarily for and in connection with specific - products or compilations that contain the covered work, unless you - entered into that arrangement, or that patent license was granted, - prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting - any implied license or other defenses to infringement that may - otherwise be available to you under applicable patent law. - - 12. No Surrender of Others’ Freedom. - - If conditions are imposed on you (whether by court order, agreement - or otherwise) that contradict the conditions of this License, they - do not excuse you from the conditions of this License. If you - cannot convey a covered work so as to satisfy simultaneously your - obligations under this License and any other pertinent obligations, - then as a consequence you may not convey it at all. For example, - if you agree to terms that obligate you to collect a royalty for - further conveying from those to whom you convey the Program, the - only way you could satisfy both those terms and this License would - be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have - permission to link or combine any covered work with a work licensed - under version 3 of the GNU Affero General Public License into a - single combined work, and to convey the resulting work. The terms - of this License will continue to apply to the part which is the - covered work, but the special requirements of the GNU Affero - General Public License, section 13, concerning interaction through - a network will apply to the combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new - versions of the GNU General Public 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. - - Each version is given a distinguishing version number. If the - Program specifies that a certain numbered version of the GNU - General Public License “or any later version” applies to it, you - have the option of following the terms and conditions either of - that numbered version or of any later version published by the Free - Software Foundation. If the Program does not specify a version - number of the GNU General Public License, you may choose any - version ever published by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future - versions of the GNU General Public License can be used, that - proxy’s public statement of acceptance of a version permanently - authorizes you to choose that version for the Program. - - Later license versions may give you additional or different - permissions. However, no additional obligations are imposed on any - author or copyright holder as a result of your choosing to follow a - later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY - APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE - COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” - WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE - RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. - SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL - NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN - WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES - AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR - DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR - CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE - THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA - BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD - PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER - PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF - THE POSSIBILITY OF SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided - above cannot be given local legal effect according to their terms, - reviewing courts shall apply local law that most closely - approximates an absolute waiver of all civil liability in - connection with the Program, unless a warranty or assumption of - liability accompanies a copy of the Program in return for a fee. - -END OF TERMS AND CONDITIONS -=========================== - -How to Apply These Terms to Your New Programs -============================================= - -If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these -terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least the -“copyright” line and a pointer to where the full notice is found. - - ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES. - Copyright (C) YEAR NAME OF AUTHOR - - 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 . - - Also add information on how to contact you by electronic and paper -mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - PROGRAM Copyright (C) YEAR NAME OF AUTHOR - This program comes with ABSOLUTELY NO WARRANTY; for details type ‘show w’. - This is free software, and you are welcome to redistribute it - under certain conditions; type ‘show c’ for details. - - The hypothetical commands ‘show w’ and ‘show c’ should show the -appropriate parts of the General Public License. Of course, your -program’s commands might be different; for a GUI interface, you would -use an “about box”. - - You should also get your employer (if you work as a programmer) or -school, if any, to sign a “copyright disclaimer” for the program, if -necessary. For more information on this, and how to apply and follow -the GNU GPL, see . - - The GNU General Public License does not permit incorporating your -program into proprietary programs. If your program is a subroutine -library, you may consider it more useful to permit linking proprietary -applications with the library. If this is what you want to do, use the -GNU Lesser General Public License instead of this License. But first, -please read . - - -File: dash.info, Node: Index, Prev: GPL, Up: Top - -Index -***** - -[index] -* Menu: - -* !cdr: Destructive operations. - (line 16) -* !cons: Destructive operations. - (line 8) -* -->: Threading macros. (line 35) -* ->: Threading macros. (line 9) -* ->>: Threading macros. (line 22) -* -all?: Predicates. (line 53) -* -andfn: Function combinators. - (line 184) -* -annotate: Maps. (line 86) -* -any?: Predicates. (line 41) -* -applify: Function combinators. - (line 63) -* -as->: Threading macros. (line 49) -* -butlast: Other list operations. - (line 405) -* -clone: Tree operations. (line 123) -* -common-prefix: Reductions. (line 242) -* -common-suffix: Reductions. (line 252) -* -compose: Function combinators. - (line 49) -* -concat: List to list. (line 23) -* -cons*: Other list operations. - (line 19) -* -cons-pair?: Predicates. (line 154) -* -const: Function combinators. - (line 128) -* -contains?: Predicates. (line 100) -* -copy: Maps. (line 151) -* -count: Reductions. (line 172) -* -cut: Function combinators. - (line 140) -* -cycle: Unfolding. (line 55) -* -difference: Set operations. (line 22) -* -distinct: Set operations. (line 73) -* -dotimes: Side effects. (line 80) -* -doto: Threading macros. (line 99) -* -drop: Sublist selection. (line 149) -* -drop-last: Sublist selection. (line 163) -* -drop-while: Sublist selection. (line 194) -* -each: Side effects. (line 8) -* -each-indexed: Side effects. (line 38) -* -each-r: Side effects. (line 52) -* -each-r-while: Side effects. (line 65) -* -each-while: Side effects. (line 24) -* -elem-index: Indexing. (line 9) -* -elem-indices: Indexing. (line 23) -* -every: Predicates. (line 23) -* -fifth-item: Other list operations. - (line 380) -* -filter: Sublist selection. (line 8) -* -find-index: Indexing. (line 35) -* -find-indices: Indexing. (line 73) -* -find-last-index: Indexing. (line 54) -* -first: Other list operations. - (line 300) -* -first-item: Other list operations. - (line 328) -* -fix: Other list operations. - (line 445) -* -fixfn: Function combinators. - (line 224) -* -flatten: List to list. (line 43) -* -flatten-n: List to list. (line 65) -* -flip: Function combinators. - (line 95) -* -fourth-item: Other list operations. - (line 367) -* -frequencies: Reductions. (line 310) -* -grade-down: Indexing. (line 103) -* -grade-up: Indexing. (line 93) -* -group-by: Partitioning. (line 205) -* -if-let: Binding. (line 34) -* -if-let*: Binding. (line 45) -* -inits: Reductions. (line 222) -* -insert-at: List to list. (line 119) -* -interleave: Other list operations. - (line 56) -* -interpose: Other list operations. - (line 46) -* -intersection: Set operations. (line 36) -* -iota: Other list operations. - (line 67) -* -is-infix?: Predicates. (line 140) -* -is-prefix?: Predicates. (line 116) -* -is-suffix?: Predicates. (line 128) -* -iterate: Unfolding. (line 9) -* -iteratefn: Function combinators. - (line 201) -* -juxt: Function combinators. - (line 37) -* -keep: List to list. (line 8) -* -lambda: Binding. (line 247) -* -last: Other list operations. - (line 318) -* -last-item: Other list operations. - (line 393) -* -let: Binding. (line 61) -* -let*: Binding. (line 227) -* -list: Other list operations. - (line 428) -* -map: Maps. (line 10) -* -map-first: Maps. (line 38) -* -map-indexed: Maps. (line 68) -* -map-last: Maps. (line 53) -* -map-when: Maps. (line 22) -* -mapcat: Maps. (line 140) -* -max: Reductions. (line 286) -* -max-by: Reductions. (line 296) -* -min: Reductions. (line 262) -* -min-by: Reductions. (line 272) -* -non-nil: Sublist selection. (line 95) -* -none?: Predicates. (line 73) -* -not: Function combinators. - (line 153) -* -on: Function combinators. - (line 75) -* -only-some?: Predicates. (line 85) -* -orfn: Function combinators. - (line 167) -* -pad: Other list operations. - (line 241) -* -partial: Function combinators. - (line 8) -* -partition: Partitioning. (line 90) -* -partition-after-item: Partitioning. (line 195) -* -partition-after-pred: Partitioning. (line 162) -* -partition-all: Partitioning. (line 102) -* -partition-all-in-steps: Partitioning. (line 126) -* -partition-before-item: Partitioning. (line 185) -* -partition-before-pred: Partitioning. (line 174) -* -partition-by: Partitioning. (line 138) -* -partition-by-header: Partitioning. (line 149) -* -partition-in-steps: Partitioning. (line 113) -* -permutations: Set operations. (line 60) -* -powerset: Set operations. (line 50) -* -prodfn: Function combinators. - (line 258) -* -product: Reductions. (line 201) -* -reduce: Reductions. (line 53) -* -reduce-from: Reductions. (line 8) -* -reduce-r: Reductions. (line 72) -* -reduce-r-from: Reductions. (line 26) -* -reductions: Reductions. (line 136) -* -reductions-from: Reductions. (line 100) -* -reductions-r: Reductions. (line 154) -* -reductions-r-from: Reductions. (line 118) -* -remove: Sublist selection. (line 26) -* -remove-at: List to list. (line 156) -* -remove-at-indices: List to list. (line 175) -* -remove-first: Sublist selection. (line 44) -* -remove-item: Sublist selection. (line 84) -* -remove-last: Sublist selection. (line 65) -* -repeat: Unfolding. (line 44) -* -replace: List to list. (line 77) -* -replace-at: List to list. (line 130) -* -replace-first: List to list. (line 91) -* -replace-last: List to list. (line 105) -* -rotate: Other list operations. - (line 8) -* -rotate-args: Function combinators. - (line 112) -* -rpartial: Function combinators. - (line 22) -* -running-product: Reductions. (line 211) -* -running-sum: Reductions. (line 190) -* -same-items?: Set operations. (line 88) -* -second-item: Other list operations. - (line 341) -* -select-by-indices: Sublist selection. (line 211) -* -select-column: Sublist selection. (line 241) -* -select-columns: Sublist selection. (line 222) -* -separate: Partitioning. (line 75) -* -setq: Binding. (line 270) -* -slice: Sublist selection. (line 105) -* -snoc: Other list operations. - (line 32) -* -some: Predicates. (line 8) -* -some-->: Threading macros. (line 86) -* -some->: Threading macros. (line 62) -* -some->>: Threading macros. (line 74) -* -sort: Other list operations. - (line 415) -* -splice: Maps. (line 102) -* -splice-list: Maps. (line 127) -* -split-at: Partitioning. (line 8) -* -split-on: Partitioning. (line 40) -* -split-when: Partitioning. (line 58) -* -split-with: Partitioning. (line 23) -* -sum: Reductions. (line 180) -* -table: Other list operations. - (line 256) -* -table-flat: Other list operations. - (line 275) -* -tails: Reductions. (line 232) -* -take: Sublist selection. (line 121) -* -take-last: Sublist selection. (line 135) -* -take-while: Sublist selection. (line 177) -* -third-item: Other list operations. - (line 354) -* -tree-map: Tree operations. (line 28) -* -tree-map-nodes: Tree operations. (line 39) -* -tree-mapreduce: Tree operations. (line 85) -* -tree-mapreduce-from: Tree operations. (line 104) -* -tree-reduce: Tree operations. (line 53) -* -tree-reduce-from: Tree operations. (line 70) -* -tree-seq: Tree operations. (line 8) -* -unfold: Unfolding. (line 25) -* -union: Set operations. (line 8) -* -unzip: Other list operations. - (line 215) -* -unzip-lists: Other list operations. - (line 196) -* -update-at: List to list. (line 142) -* -when-let: Binding. (line 9) -* -when-let*: Binding. (line 21) -* -zip: Other list operations. - (line 150) -* -zip-fill: Other list operations. - (line 176) -* -zip-lists: Other list operations. - (line 114) -* -zip-lists-fill: Other list operations. - (line 135) -* -zip-pair: Other list operations. - (line 98) -* -zip-with: Other list operations. - (line 80) -* dash-fontify-mode: Fontification of special variables. - (line 6) -* dash-register-info-lookup: Info symbol lookup. (line 6) -* global-dash-fontify-mode: Fontification of special variables. - (line 12) - - - -Tag Table: -Node: Top742 -Node: Installation2397 -Node: Using in a package3159 -Node: Fontification of special variables3504 -Node: Info symbol lookup4294 -Node: Functions4877 -Node: Maps6361 -Ref: -map6658 -Ref: -map-when7031 -Ref: -map-first7605 -Ref: -map-last8200 -Ref: -map-indexed8790 -Ref: -annotate9476 -Ref: -splice10080 -Ref: -splice-list11155 -Ref: -mapcat11614 -Ref: -copy11987 -Node: Sublist selection12253 -Ref: -filter12446 -Ref: -remove12999 -Ref: -remove-first13548 -Ref: -remove-last14396 -Ref: -remove-item15126 -Ref: -non-nil15526 -Ref: -slice15808 -Ref: -take16337 -Ref: -take-last16755 -Ref: -drop17192 -Ref: -drop-last17639 -Ref: -take-while18071 -Ref: -drop-while18698 -Ref: -select-by-indices19331 -Ref: -select-columns19842 -Ref: -select-column20545 -Node: List to list21008 -Ref: -keep21200 -Ref: -concat21776 -Ref: -flatten22556 -Ref: -flatten-n23318 -Ref: -replace23702 -Ref: -replace-first24163 -Ref: -replace-last24658 -Ref: -insert-at25146 -Ref: -replace-at25471 -Ref: -update-at25858 -Ref: -remove-at26399 -Ref: -remove-at-indices27026 -Node: Reductions27716 -Ref: -reduce-from27912 -Ref: -reduce-r-from28636 -Ref: -reduce29899 -Ref: -reduce-r30650 -Ref: -reductions-from31928 -Ref: -reductions-r-from32734 -Ref: -reductions33564 -Ref: -reductions-r34275 -Ref: -count35020 -Ref: -sum35250 -Ref: -running-sum35438 -Ref: -product35759 -Ref: -running-product35967 -Ref: -inits36308 -Ref: -tails36553 -Ref: -common-prefix36798 -Ref: -common-suffix37092 -Ref: -min37386 -Ref: -min-by37612 -Ref: -max38133 -Ref: -max-by38358 -Ref: -frequencies38884 -Node: Unfolding39499 -Ref: -iterate39740 -Ref: -unfold40187 -Ref: -repeat40992 -Ref: -cycle41276 -Node: Predicates41673 -Ref: -some41850 -Ref: -every42279 -Ref: -any?42993 -Ref: -all?43342 -Ref: -none?44084 -Ref: -only-some?44404 -Ref: -contains?44949 -Ref: -is-prefix?45455 -Ref: -is-suffix?45787 -Ref: -is-infix?46119 -Ref: -cons-pair?46479 -Node: Partitioning46810 -Ref: -split-at46998 -Ref: -split-with47662 -Ref: -split-on48302 -Ref: -split-when48973 -Ref: -separate49616 -Ref: -partition50150 -Ref: -partition-all50599 -Ref: -partition-in-steps51024 -Ref: -partition-all-in-steps51570 -Ref: -partition-by52084 -Ref: -partition-by-header52462 -Ref: -partition-after-pred53063 -Ref: -partition-before-pred53516 -Ref: -partition-before-item53901 -Ref: -partition-after-item54208 -Ref: -group-by54510 -Node: Indexing54943 -Ref: -elem-index55145 -Ref: -elem-indices55632 -Ref: -find-index56091 -Ref: -find-last-index56760 -Ref: -find-indices57411 -Ref: -grade-up58173 -Ref: -grade-down58580 -Node: Set operations58994 -Ref: -union59177 -Ref: -difference59607 -Ref: -intersection60035 -Ref: -powerset60464 -Ref: -permutations60741 -Ref: -distinct61179 -Ref: -same-items?61573 -Node: Other list operations62182 -Ref: -rotate62407 -Ref: -cons*62760 -Ref: -snoc63182 -Ref: -interpose63594 -Ref: -interleave63888 -Ref: -iota64254 -Ref: -zip-with64737 -Ref: -zip-pair65545 -Ref: -zip-lists66111 -Ref: -zip-lists-fill66909 -Ref: -zip67619 -Ref: -zip-fill68646 -Ref: -unzip-lists69560 -Ref: -unzip70183 -Ref: -pad71176 -Ref: -table71661 -Ref: -table-flat72447 -Ref: -first73452 -Ref: -last73985 -Ref: -first-item74331 -Ref: -second-item74743 -Ref: -third-item75160 -Ref: -fourth-item75535 -Ref: -fifth-item75913 -Ref: -last-item76288 -Ref: -butlast76649 -Ref: -sort76894 -Ref: -list77388 -Ref: -fix77957 -Node: Tree operations78446 -Ref: -tree-seq78642 -Ref: -tree-map79503 -Ref: -tree-map-nodes79943 -Ref: -tree-reduce80807 -Ref: -tree-reduce-from81689 -Ref: -tree-mapreduce82289 -Ref: -tree-mapreduce-from83148 -Ref: -clone84433 -Node: Threading macros84771 -Ref: ->84996 -Ref: ->>85484 -Ref: -->85987 -Ref: -as->86544 -Ref: -some->86998 -Ref: -some->>87383 -Ref: -some-->87830 -Ref: -doto88397 -Node: Binding88950 -Ref: -when-let89157 -Ref: -when-let*89618 -Ref: -if-let90147 -Ref: -if-let*90513 -Ref: -let91136 -Ref: -let*97226 -Ref: -lambda98163 -Ref: -setq98969 -Node: Side effects99770 -Ref: -each99964 -Ref: -each-while100491 -Ref: -each-indexed101111 -Ref: -each-r101703 -Ref: -each-r-while102145 -Ref: -dotimes102789 -Node: Destructive operations103342 -Ref: !cons103560 -Ref: !cdr103764 -Node: Function combinators103957 -Ref: -partial104161 -Ref: -rpartial104679 -Ref: -juxt105327 -Ref: -compose105779 -Ref: -applify106386 -Ref: -on106816 -Ref: -flip107588 -Ref: -rotate-args108112 -Ref: -const108741 -Ref: -cut109083 -Ref: -not109563 -Ref: -orfn110107 -Ref: -andfn110900 -Ref: -iteratefn111687 -Ref: -fixfn112389 -Ref: -prodfn113963 -Node: Development115114 -Node: Contribute115403 -Node: Contributors116415 -Node: FDL118508 -Node: GPL143828 -Node: Index181577 - -End Tag Table - - -Local Variables: -coding: utf-8 -End: diff --git a/elpa/dash-2.20.0/dir b/elpa/dash-2.20.0/dir deleted file mode 100644 index 7d473f4..0000000 --- a/elpa/dash-2.20.0/dir +++ /dev/null @@ -1,18 +0,0 @@ -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, "H" 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 -* Dash: (dash.info). A modern list library for GNU Emacs. diff --git a/elpa/edit-indirect-0.1.13/edit-indirect-autoloads.el b/elpa/edit-indirect-0.1.13/edit-indirect-autoloads.el deleted file mode 100644 index 91d4308..0000000 --- a/elpa/edit-indirect-0.1.13/edit-indirect-autoloads.el +++ /dev/null @@ -1,60 +0,0 @@ -;;; edit-indirect-autoloads.el --- automatically extracted autoloads (do not edit) -*- lexical-binding: t -*- -;; Generated by the `loaddefs-generate' function. - -;; This file is part of GNU Emacs. - -;;; Code: - -(add-to-list 'load-path (or (and load-file-name (directory-file-name (file-name-directory load-file-name))) (car load-path))) - - - -;;; Generated autoloads from edit-indirect.el - -(autoload 'edit-indirect-region "edit-indirect" "\ -Edit the region BEG..END in a separate buffer. -The region is copied, without text properties, to a separate -buffer, called edit-indirect buffer, and -`edit-indirect-guess-mode-function' is called to set the major -mode. -When done, exit with `edit-indirect-commit', which will remove the -original region and replace it with the edited version; or with -`edit-indirect-abort', which will drop the modifications. - -This differs from `clone-indirect-buffer' with narrowing in that -the text properties are not shared, so the parent buffer major mode -and the edit-indirect buffer major mode will not be able to tread -on each other's toes by setting up potentially conflicting text -properties, which happens surprisingly often when the font-lock -mode is used. - -Edit-indirect buffers use the `edit-indirect-mode-map' keymap. -Regions with active edit-indirect buffers use the -`edit-indirect-overlay-map' keymap. - -If there's already an edit-indirect buffer for BEG..END, use that. -If there's already an edit-indirect buffer active overlapping any -portion of BEG..END, an `edit-indirect-overlapping' error is -signaled. - -When DISPLAY-BUFFER is non-nil or when called interactively, -display the edit-indirect buffer in some window and select it. - -In any case, return the edit-indirect buffer. - -(fn BEG END &optional DISPLAY-BUFFER)" t) -(register-definition-prefixes "edit-indirect" '("edit-indirect-")) - -;;; End of scraped data - -(provide 'edit-indirect-autoloads) - -;; Local Variables: -;; version-control: never -;; no-byte-compile: t -;; no-update-autoloads: t -;; no-native-compile: t -;; coding: utf-8-emacs-unix -;; End: - -;;; edit-indirect-autoloads.el ends here diff --git a/elpa/edit-indirect-0.1.13/edit-indirect-pkg.el b/elpa/edit-indirect-0.1.13/edit-indirect-pkg.el deleted file mode 100644 index 22bcacb..0000000 --- a/elpa/edit-indirect-0.1.13/edit-indirect-pkg.el +++ /dev/null @@ -1,9 +0,0 @@ -;; -*- no-byte-compile: t; lexical-binding: nil -*- -(define-package "edit-indirect" "0.1.13" - "Edit regions in separate buffers." - '((emacs "24.3")) - :url "https://github.com/Fanael/edit-indirect" - :commit "82a28d8a85277cfe453af464603ea330eae41c05" - :revdesc "82a28d8a8527" - :authors '(("Fanael Linithien" . "fanael4@gmail.com")) - :maintainers '(("Fanael Linithien" . "fanael4@gmail.com"))) diff --git a/elpa/edit-indirect-0.1.13/edit-indirect.el b/elpa/edit-indirect-0.1.13/edit-indirect.el deleted file mode 100644 index 4644427..0000000 --- a/elpa/edit-indirect-0.1.13/edit-indirect.el +++ /dev/null @@ -1,435 +0,0 @@ -;;; edit-indirect.el --- Edit regions in separate buffers -*- lexical-binding: t -*- - -;; Author: Fanael Linithien -;; URL: https://github.com/Fanael/edit-indirect -;; Package-Version: 0.1.13 -;; Package-Revision: 82a28d8a8527 -;; Package-Requires: ((emacs "24.3")) - -;; This file is NOT part of GNU Emacs. - -;; SPDX-License-Identifier: BSD-2-clause -;; -;; Copyright (c) 2014-2024, Fanael Linithien -;; All rights reserved. -;; -;; Redistribution and use in source and binary forms, with or without -;; modification, are permitted provided that the following conditions are -;; met: -;; -;; * Redistributions of source code must retain the above copyright -;; notice, this list of conditions and the following disclaimer. -;; * Redistributions in binary form must reproduce the above copyright -;; notice, this list of conditions and the following disclaimer in the -;; documentation and/or other materials provided with the distribution. -;; -;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -;; IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -;; TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -;; PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER -;; OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -;; EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -;; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -;; PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -;; LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -;;; Commentary: - -;; Edit regions in separate buffers, like `org-edit-src-code' but for arbitrary -;; regions. -;; -;; See the docstring of `edit-indirect-region' for details. - -;;; Code: -(defgroup edit-indirect nil - "Editing regions in separate buffers." - :group 'editing) - -(defcustom edit-indirect-guess-mode-function #'edit-indirect-default-guess-mode - "The function used to guess the major mode of an edit-indirect buffer. -It's called with the edit-indirect buffer as the current buffer. -It's called with three arguments, the parent buffer, the beginning -and the end of the parent buffer region being editing. - -Note that the buffer-local value from the parent buffer is used." - :type 'function - :group 'edit-indirect) - -(defcustom edit-indirect-after-creation-hook nil - "Functions called after the edit-indirect buffer is created. -The functions are called with the edit-indirect buffer as the -current buffer. - -Note that the buffer-local value from the parent buffer is used." - :type 'hook - :group 'edit-indirect) - -(defcustom edit-indirect-before-commit-hook nil - "Functions called before the edit-indirect buffer is committed. -The functions are called with the edit-indirect buffer as the -current buffer. - -Note that the buffer-local value from the edit-indirect buffer is -used." - :type 'hook - :group 'edit-indirect) - -(defcustom edit-indirect-before-commit-functions nil - "Functions called before an edit-indirect buffer is committed. -The functions are called with the parent buffer as the current -buffer. -Each function is called with two arguments, the beginning and the -end of the region to be changed." - :type 'hook - :group 'edit-indirect) - -(defcustom edit-indirect-after-commit-functions nil - "Functions called after an edit-indirect buffer has been committed. -The functions are called with the parent buffer as the current -buffer. -Each function is called with two arguments, the beginning and the -end of the changed region." - :type 'hook - :group 'edit-indirect) - -(defgroup edit-indirect-faces nil - "Faces used in `edit-indirect'." - :group 'edit-indirect - :group 'faces - :prefix "edit-indirect") - -(defface edit-indirect-edited-region - '((t :inherit secondary-selection)) - "Face used to highlight an indirectly edited region." - :group 'edit-indirect-faces) - -;; Emacs <= 24.3 has no `define-error'. -(let* ((user-error-conditions (get 'user-error 'error-conditions)) - (define-user-error (lambda (name message) - (put name 'error-conditions - (cons name user-error-conditions)) - (put name 'error-message message)))) - (funcall define-user-error 'edit-indirect-overlapping - "Indirectly edited regions cannot overlap") - (funcall define-user-error 'edit-indirect-read-only - "Text is read-only, modify the edit-indirect buffer instead") - (funcall define-user-error 'edit-indirect-not-indirect - "This is not an edit-indirect buffer")) - -(defvar edit-indirect--overlay) -(defvar edit-indirect--should-quit-window nil) -(put 'edit-indirect--should-quit-window 'permanent-local t) - -;;;###autoload -(defun edit-indirect-region (beg end &optional display-buffer) - "Edit the region BEG..END in a separate buffer. -The region is copied, without text properties, to a separate -buffer, called edit-indirect buffer, and -`edit-indirect-guess-mode-function' is called to set the major -mode. -When done, exit with `edit-indirect-commit', which will remove the -original region and replace it with the edited version; or with -`edit-indirect-abort', which will drop the modifications. - -This differs from `clone-indirect-buffer' with narrowing in that -the text properties are not shared, so the parent buffer major mode -and the edit-indirect buffer major mode will not be able to tread -on each other's toes by setting up potentially conflicting text -properties, which happens surprisingly often when the font-lock -mode is used. - -Edit-indirect buffers use the `edit-indirect-mode-map' keymap. -Regions with active edit-indirect buffers use the -`edit-indirect-overlay-map' keymap. - -If there's already an edit-indirect buffer for BEG..END, use that. -If there's already an edit-indirect buffer active overlapping any -portion of BEG..END, an `edit-indirect-overlapping' error is -signaled. - -When DISPLAY-BUFFER is non-nil or when called interactively, -display the edit-indirect buffer in some window and select it. - -In any case, return the edit-indirect buffer." - (interactive - (if (or (use-region-p) (not transient-mark-mode)) - (prog1 (list (region-beginning) (region-end) t) - (deactivate-mark)) - (user-error "No region"))) - (let ((buffer (edit-indirect--get-edit-indirect-buffer beg end))) - (when display-buffer - (edit-indirect--display-buffer buffer)) - buffer)) - -(defvar edit-indirect-mode-map - (let ((map (make-sparse-keymap))) - (define-key map [remap save-buffer] #'edit-indirect-save) - (define-key map (kbd "C-c '") #'edit-indirect-commit) - (define-key map (kbd "C-c C-c") #'edit-indirect-commit) - (define-key map (kbd "C-c C-k") #'edit-indirect-abort) - map) - "Keymap for edit-indirect buffers. - -\\{edit-indirect-mode-map}") - -(defvar edit-indirect-overlay-map - (let ((map (make-sparse-keymap))) - (define-key map (kbd "RET") #'edit-indirect-display-active-buffer) - map) - "Keymap for regions with active edit-indirect buffers. - -\\{edit-indirect-overlay-map}") - -(defun edit-indirect-commit () - "Commit the modifications done in an edit-indirect buffer. -That is, replace the original region in the parent buffer with the -contents of the edit-indirect buffer. -The edit-indirect buffer is then killed. - -Can be called only when the current buffer is an edit-indirect -buffer." - (interactive) - (edit-indirect--barf-if-not-indirect) - (edit-indirect--commit) - (edit-indirect--abort t)) - -(defun edit-indirect-save () - "Save the modifications done in an edit-indirect buffer. -That is, replace the original region in the parent buffer with the -contents of the edit-indirect buffer. - -Can be called only when the current buffer is an edit-indirect -buffer." - (interactive) - (edit-indirect--barf-if-not-indirect) - (edit-indirect--commit)) - -(defun edit-indirect-abort () - "Abort indirect editing in the current buffer and kill the buffer. - -Can be called only when the current buffer is an edit-indirect -buffer." - (interactive) - (edit-indirect--barf-if-not-indirect) - (edit-indirect--abort t)) - -(defun edit-indirect-buffer-indirect-p (&optional buffer) - "Non-nil iff the BUFFER is an edit-indirect buffer. -BUFFER defaults to the current buffer." - (save-current-buffer - (when buffer - (set-buffer buffer)) - ;; (not (null)) so we don't leak the overlay to the outside world. - (not (null edit-indirect--overlay)))) - -(defun edit-indirect-default-guess-mode (_parent-buffer _beg _end) - "Guess the major mode for an edit-indirect buffer. -It's done by calling `normal-mode'." - (normal-mode)) - -(defun edit-indirect-display-active-buffer () - "Display the active edit-indirect buffer of the region the point is in." - (interactive) - (let ((overlay - (let ((p (point))) - (edit-indirect--search-for-edit-indirect p (1+ p))))) - (unless overlay - (signal 'edit-indirect-not-indirect '())) - (edit-indirect--display-buffer (overlay-get overlay 'edit-indirect-buffer)))) - -(defvar edit-indirect--overlay nil - "The overlay spanning the region of the parent buffer being edited. - -It's also used as the variable determining if we're in an -edit-indirect buffer at all.") -(make-variable-buffer-local 'edit-indirect--overlay) -(put 'edit-indirect--overlay 'permanent-local t) - -;; Normally this would use `define-minor-mode', but that makes the mode function -;; interactive, which we don't want, because it's just an implementation detail. -(defun edit-indirect--mode (overlay) - "Turn the `edit-indirect--mode' \"minor mode\" on. -OVERLAY is the value to set `edit-indirect--overlay' to." - (setq edit-indirect--overlay overlay) - (add-hook 'kill-buffer-hook #'edit-indirect--abort-on-kill-buffer nil t)) -(with-no-warnings - (add-minor-mode - 'edit-indirect--overlay " indirect" edit-indirect-mode-map nil #'ignore)) - -(defun edit-indirect--display-buffer (buffer) - "Display the given BUFFER in some window and select it." - (with-current-buffer buffer - (setq-local edit-indirect--should-quit-window t)) - (select-window (display-buffer buffer)) - nil) - -(defun edit-indirect--get-edit-indirect-buffer (beg end) - "Return an edit-indirect buffer for the region BEG..END. -If there's already an edit-indirect buffer active overlapping any -portion of BEG..END, an `edit-indirect-overlapping' error is -signaled." - (let ((old-overlay (edit-indirect--search-for-edit-indirect beg end))) - (cond - ((null old-overlay) - (let ((overlay (edit-indirect--create-overlay beg end))) - (edit-indirect--create-indirect-buffer beg end overlay))) - ((and (= beg (overlay-start old-overlay)) - (= end (overlay-end old-overlay))) - (overlay-get old-overlay 'edit-indirect-buffer)) - (t - (signal 'edit-indirect-overlapping '()))))) - -(defun edit-indirect--search-for-edit-indirect (beg end) - "Return an existing edit-indirect overlay for some region inside BEG..END. -If there's no indirectly edited region inside BEG..END, return -nil." - (catch 'done - (dolist (overlay (overlays-in beg end)) - (when (overlay-get overlay 'edit-indirect-buffer) - (throw 'done overlay))) - nil)) - -(defmacro edit-indirect--buffer-local-value (buffer variable) - "Get the BUFFER local value of VARIABLE. -VARIABLE shall be a symbol." - (unless (symbolp variable) - (signal 'wrong-type-argument (list #'symbolp variable))) - ;; `with-current-buffer' is used instead of `buffer-local-value' because - ;; the latter doesn't give warnings about free variables when - ;; byte-compiled. - `(with-current-buffer ,buffer ,variable)) - -(defun edit-indirect--create-indirect-buffer (beg end overlay) - "Create an edit-indirect buffer and return it. - -BEG..END is the parent buffer region to insert. -OVERLAY is the overlay, see `edit-indirect--overlay'." - (add-hook 'after-change-major-mode-hook #'edit-indirect--rebind-save-hooks) - (let ((buffer (generate-new-buffer (format "*edit-indirect %s*" (buffer-name)))) - (parent-buffer (current-buffer))) - (overlay-put overlay 'edit-indirect-buffer buffer) - (with-current-buffer buffer - (insert-buffer-substring-no-properties parent-buffer beg end) - (set-buffer-modified-p nil) - (edit-indirect--mode overlay) - ;; Use the buffer-local values from the parent buffer. Don't retrieve the - ;; values before actual uses in case these variables are changed by some - ;; of the many possible hooks. - (funcall (edit-indirect--buffer-local-value - parent-buffer edit-indirect-guess-mode-function) - parent-buffer beg end) - (if (local-variable-p 'edit-indirect-after-creation-hook parent-buffer) - ;; Copy the parent buffer hook to the indirect buffer instead of - ;; let-binding it to avoid running it twice. - (setq-local edit-indirect-after-creation-hook - (edit-indirect--buffer-local-value - parent-buffer edit-indirect-after-creation-hook)) - ;; No need to do copy anything if the parent buffer has no local value, - ;; the global value will be used instead. Just kill the local value in - ;; the indirect buffer in case a prior hook set it, because we're not - ;; supposed to use it. - (kill-local-variable 'edit-indirect-after-creation-hook)) - (run-hooks 'edit-indirect-after-creation-hook)) - buffer)) - -(defun edit-indirect--create-overlay (beg end) - "Create the edit-indirect overlay and return it. - -BEG and END specify the region the overlay should encompass." - (let ((overlay (make-overlay beg end))) - (overlay-put overlay 'face 'edit-indirect-edited-region) - (overlay-put overlay 'modification-hooks '(edit-indirect--barf-read-only)) - (overlay-put overlay 'insert-in-front-hooks '(edit-indirect--barf-read-only)) - (overlay-put overlay 'keymap edit-indirect-overlay-map) - overlay)) - -(defvar edit-indirect--inhibit-read-only nil - "Non-nil means disregard read-only status of indirectly-edited region.") - -(defun edit-indirect--barf-read-only (_ov _after _beg _end &optional _len) - "Signal an error because the text is read-only. -No error is signaled if `inhibit-read-only' or -`edit-indirect--inhibit-read-only' is non-nil." - (unless (or inhibit-read-only edit-indirect--inhibit-read-only) - (signal 'edit-indirect-read-only '()))) - -(defun edit-indirect--commit () - "Commit the modifications done in an edit-indirect buffer." - (run-hooks 'edit-indirect-before-commit-hook) - (let ((beg (overlay-start edit-indirect--overlay)) - (end (overlay-end edit-indirect--overlay)) - (buffer (current-buffer)) - (edit-indirect--inhibit-read-only t)) - (with-current-buffer (overlay-buffer edit-indirect--overlay) - (save-excursion - (let ((beg-marker (copy-marker beg)) - (end-marker (copy-marker end))) - (edit-indirect--run-hook-with-positions - 'edit-indirect-before-commit-functions beg-marker end-marker) - (save-match-data - (set-match-data (list beg-marker end-marker)) - (let ((new-data - (with-current-buffer buffer - (buffer-substring-no-properties 1 (1+ (buffer-size)))))) - (unless (string= new-data (match-string 0)) - (replace-match new-data t t)))) - (edit-indirect--run-hook-with-positions - 'edit-indirect-after-commit-functions beg-marker end-marker) - (set-marker beg-marker nil) - (set-marker end-marker nil)))) - (set-buffer-modified-p nil))) - -(defun edit-indirect--run-hook-with-positions (hook beg end) - "Run HOOK with the specified markers BEG and END. -HOOK should be a symbol, a hook variable. -The functions are passed integer positions instead of markers. -If a function changes the buffer contents, the next function will be -called with updated positions." - (run-hook-wrapped hook - (lambda (f beg end) - (funcall f (marker-position beg) (marker-position end)) - nil) - beg end)) - -(defun edit-indirect--abort (kill) - "Abort an indirect edit and clean up the edit-indirect buffer." - (delete-overlay edit-indirect--overlay) - ;; Kill the overlay reference so that `edit-indirect--abort-on-kill-buffer' - ;; won't try to call us again. - (setq edit-indirect--overlay nil) - ;; If we created a window, get rid of it. Kill the buffer we created. - (if (and edit-indirect--should-quit-window - (eq (window-buffer (selected-window)) - (current-buffer))) - (quit-window kill) - (and kill (kill-buffer)))) - -(defun edit-indirect--rebind-save-hooks () - "Bind our `save-buffer' hooks in the current buffer. -Does nothing if the current buffer is not an edit-indirect buffer." - (when (edit-indirect-buffer-indirect-p) - (setq buffer-offer-save t) - (add-hook 'write-contents-functions #'edit-indirect--commit-on-save nil t))) - -(defun edit-indirect--commit-on-save () - "Commit the indirect edit. -Should only be called from `write-contents-functions'." - (edit-indirect--commit) - t) - -(defun edit-indirect--abort-on-kill-buffer () - "Abort indirect edit. -Should be called only from `kill-buffer-hook'." - (when edit-indirect--overlay - (edit-indirect--abort nil))) - -(defun edit-indirect--barf-if-not-indirect () - "Signal an error if the current buffer is not an edit-indirect buffer. -The error signaled is `edit-indirect-not-indirect'." - (unless edit-indirect--overlay - (signal 'edit-indirect-not-indirect '()))) - -(provide 'edit-indirect) -;;; edit-indirect.el ends here diff --git a/elpa/epl-0.9/epl-autoloads.el b/elpa/epl-0.9/epl-autoloads.el deleted file mode 100644 index c6221c5..0000000 --- a/elpa/epl-0.9/epl-autoloads.el +++ /dev/null @@ -1,22 +0,0 @@ -;;; epl-autoloads.el --- automatically extracted autoloads -;; -;;; Code: - -(add-to-list 'load-path (directory-file-name - (or (file-name-directory #$) (car load-path)))) - - -;;;### (autoloads nil "epl" "epl.el" (0 0 0 0)) -;;; Generated autoloads from epl.el - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "epl" '("epl-"))) - -;;;*** - -;; Local Variables: -;; version-control: never -;; no-byte-compile: t -;; no-update-autoloads: t -;; coding: utf-8 -;; End: -;;; epl-autoloads.el ends here diff --git a/elpa/epl-0.9/epl-pkg.el b/elpa/epl-0.9/epl-pkg.el deleted file mode 100644 index 487cc37..0000000 --- a/elpa/epl-0.9/epl-pkg.el +++ /dev/null @@ -1,2 +0,0 @@ -;;; -*- no-byte-compile: t -*- -(define-package "epl" "0.9" "Emacs Package Library" '((cl-lib "0.3")) :commit "fd906d3f92d58ecf24169055744409886ceb06ce" :keywords '("convenience") :authors '(("Sebastian Wiesner" . "swiesner@lunaryorn.com")) :maintainer '("Johan Andersson" . "johan.rejeep@gmail.com") :url "http://github.com/cask/epl") diff --git a/elpa/epl-0.9/epl.el b/elpa/epl-0.9/epl.el deleted file mode 100644 index b2d2e31..0000000 --- a/elpa/epl-0.9/epl.el +++ /dev/null @@ -1,711 +0,0 @@ -;;; epl.el --- Emacs Package Library -*- lexical-binding: t; -*- - -;; Copyright (C) 2013-2015 Sebastian Wiesner -;; Copyright (C) 1985-1986, 1992, 1994-1995, 1999-2015 Free Software - -;; Author: Sebastian Wiesner -;; Maintainer: Johan Andersson -;; Sebastian Wiesner -;; Version: 0.9 -;; Package-Version: 0.9 -;; 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, either -;; built-in or explicitly installed. - -;; `epl-package-outdated-p' determines whether a package is outdated, that is, -;; whether a package with a higher version number is available. - -;; `epl-built-in-packages', `epl-installed-packages', `epl-outdated-packages' -;; and `epl-available-packages' get all packages built-in, installed, outdated, -;; or available for installation respectively. - -;; `epl-find-built-in-package', `epl-find-installed-packages' and -;; `epl-find-available-packages' find built-in, 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) - - -(unless (fboundp #'define-error) - ;; `define-error' for 24.3 and earlier, copied from subr.el - (defun define-error (name message &optional parent) - "Define NAME as a new error signal. -MESSAGE is a string that will be output to the echo area if such an error -is signaled without being caught by a `condition-case'. -PARENT is either a signal or a list of signals from which it inherits. -Defaults to `error'." - (unless parent (setq parent 'error)) - (let ((conditions - (if (consp parent) - (apply #'append - (mapcar (lambda (parent) - (cons parent - (or (get parent 'error-conditions) - (error "Unknown signal `%s'" parent)))) - parent)) - (cons parent (get parent 'error-conditions))))) - (put name 'error-conditions - (delete-dups (copy-sequence (cons name conditions)))) - (when message (put name 'error-message message))))) - -(defsubst 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))) - - -;;; EPL errors -(define-error 'epl-error "EPL error") - -(define-error 'epl-invalid-package "Invalid EPL package" 'epl-error) - -(define-error 'epl-invalid-package-file "Invalid EPL package file" - 'epl-invalid-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)))) - -(defsubst 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))))) - -(defsubst epl-requirement--from-req (req) - "Create a `epl-requirement' from a `package-desc' REQ." - (let ((version (cadr req))) - (epl-requirement-create :name (car req) - :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. - -Signal `epl-invalid-package' if the buffer does not contain a -valid package file." - (let ((info (with-current-buffer (or buffer (current-buffer)) - (condition-case err - (package-buffer-info) - (error (signal 'epl-invalid-package (cdr err))))))) - (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) - (condition-case err - (epl-package-from-buffer (current-buffer)) - ;; Attach file names to invalid package errors - (epl-invalid-package - (signal 'epl-invalid-package-file (cons file-name (cdr err)))) - ;; Forward other errors - (error (signal (car err) (cdr err)))))) - -(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 &optional min-version) - "Determine whether a PACKAGE, of MIN-VERSION or newer, is installed. - -PACKAGE is either a package name as symbol, or a package object. -When a explicit MIN-VERSION is provided it overwrites the version of the PACKAGE object." - (let ((name (if (epl-package-p package) - (epl-package-name package) - package)) - (min-version (or min-version (and (epl-package-p package) - (epl-package-version package))))) - (package-installed-p name min-version))) - -(defun epl--parse-built-in-entry (entry) - "Parse an ENTRY from the list of built-in packages. - -Return the corresponding `epl-package' object." - (if (fboundp 'package--from-builtin) - ;; In package-desc package.el, convert the built-in package to a - ;; `package-desc' and convert that to an `epl-package' - (epl-package--from-package-desc (package--from-builtin entry)) - (epl-package-create :name (car entry) :description (cdr entry)))) - -(defun epl-built-in-packages () - "Get all built-in packages. - -Return a list of `epl-package' objects." - ;; This looks mighty strange, but it's the only way to force package.el to - ;; build the list of built-in packages. Without this, `package--builtins' - ;; might be empty. - (package-built-in-p 'foo) - (mapcar #'epl--parse-built-in-entry package--builtins)) - -(defun epl-find-built-in-package (name) - "Find a built-in package with NAME. - -NAME is a package name, as symbol. - -Return the built-in package as `epl-package' object, or nil if -there is no built-in package with NAME." - (when (package-built-in-p name) - ;; We must call `package-built-in-p' *before* inspecting - ;; `package--builtins', because otherwise `package--builtins' might be - ;; empty. - (epl--parse-built-in-entry (assq name package--builtins)))) - -(defun epl-package-outdated-p (package) - "Determine whether a PACKAGE is outdated. - -A package is outdated, if there is an available package with a -higher version. - -PACKAGE is either a package name as symbol, or a package object. -In the former case, test the installed or built-in package with -the highest version number, in the later case, test the package -object itself. - -Return t, if the package is outdated, or nil otherwise." - (let* ((package (if (epl-package-p package) - package - (or (car (epl-find-installed-packages package)) - (epl-find-built-in-package package)))) - (available (car (epl-find-available-packages - (epl-package-name package))))) - (and package available (version-list-< (epl-package-version package) - (epl-package-version available))))) - -(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))) - -(defsubst epl--filter-outdated-packages (packages) - "Filter outdated packages from PACKAGES." - (let (res) - (dolist (package packages) - (when (epl-package-outdated-p package) - (push package res))) - (nreverse res))) - -(defun epl-outdated-packages () - "Get all outdated packages, as in `epl-package-outdated-p'. - -Return a list of package objects." - (epl--filter-outdated-packages (epl-installed-packages))) - -(defsubst 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 the latest installed package by NAME. - -NAME is a package name, as symbol. - -Return the installed package with the highest version number as -`epl-package' object, or nil, if no package with NAME is -installed." - (car (epl-find-installed-packages name))) -(make-obsolete 'epl-find-installed-package 'epl-find-installed-packages "0.7") - -(defun epl-find-installed-packages (name) - "Find all installed packages by NAME. - -NAME is a package name, as symbol. - -Return a list of all installed packages with NAME, sorted by -version number in descending order. Return nil, if there are no -packages with NAME." - (epl--find-package-in-list name package-alist)) - -(defun epl-available-packages () - "Get all packages available for installation. - -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 - -(defun epl-install-file (file) - "Install a package from FILE, like `package-install-file'." - (interactive (advice-eval-interactive-spec - (cadr (interactive-form #'package-install-file)))) - (apply #'package-install-file (list file)) - (let ((package (epl-package-from-file file))) - (unless (epl-package--package-desc-p package) - (epl--kill-autoload-buffer package)))) - -(defun epl--kill-autoload-buffer (package) - "Kill the buffer associated with autoloads for PACKAGE." - (let* ((auto-name (format "%s-autoloads.el" (epl-package-name package))) - (generated-autoload-file (expand-file-name auto-name (epl-package-directory package))) - (buf (find-buffer-visiting generated-autoload-file))) - (when buf (kill-buffer buf)))) - -(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)) - (epl--kill-autoload-buffer 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/flycheck-35.0/flycheck-autoloads.el b/elpa/flycheck-35.0/flycheck-autoloads.el deleted file mode 100644 index c29ab30..0000000 --- a/elpa/flycheck-35.0/flycheck-autoloads.el +++ /dev/null @@ -1,306 +0,0 @@ -;;; flycheck-autoloads.el --- automatically extracted autoloads (do not edit) -*- lexical-binding: t -*- -;; Generated by the `loaddefs-generate' function. - -;; This file is part of GNU Emacs. - -;;; Code: - -(add-to-list 'load-path (or (and load-file-name (directory-file-name (file-name-directory load-file-name))) (car load-path))) - - - -;;; Generated autoloads from flycheck.el - -(autoload 'flycheck-manual "flycheck" "\ -Open the Flycheck manual." t) -(autoload 'flycheck-quick-help "flycheck" "\ -Display brief Flycheck help." t) -(autoload 'flycheck-mode "flycheck" "\ -Flycheck is a minor mode for on-the-fly syntax checking. - -In `flycheck-mode' the buffer is automatically syntax-checked -using the first suitable syntax checker from `flycheck-checkers'. -Use `flycheck-select-checker' to select a checker for the current -buffer manually. - -If you run into issues, use `\\[flycheck-verify-setup]' to get help. - -Flycheck supports many languages out of the box, and many -additional ones are available on MELPA. Adding new ones is very -easy. Complete documentation is available online at URL -`https://www.flycheck.org/en/latest/'. Please report issues and -request features at URL `https://github.com/flycheck/flycheck'. - -Flycheck displays its status in the mode line. In the default -configuration, it looks like this: - -`FlyC' This buffer has not been checked yet. -`FlyC*' Flycheck is running. Expect results soon! -`FlyC:0' Last check resulted in no errors and no warnings. -`FlyC:3|5' This buffer contains three errors and five warnings. - Use `\\[flycheck-list-errors]' to see the list. -`FlyC-' Flycheck doesn't have a checker for this buffer. - -You may also see the following icons: -`FlyC!' The checker crashed. -`FlyC.' The last syntax check was manually interrupted. -`FlyC?' The checker did something unexpected, like exiting with 1 - but returning no errors. - -The following keybindings are available in `flycheck-mode': - -\\{flycheck-mode-map} -(you can change the prefix by customizing -`flycheck-keymap-prefix') - -If called interactively, enable Flycheck mode if ARG is positive, -and disable it if ARG is zero or negative. If called from Lisp, -also enable the mode if ARG is omitted or nil, and toggle it if -ARG is ‘toggle’; disable the mode otherwise. - -(fn &optional ARG)" t) -(put 'global-flycheck-mode 'globalized-minor-mode t) -(defvar global-flycheck-mode nil "\ -Non-nil if Global Flycheck mode is enabled. -See the `global-flycheck-mode' command -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-flycheck-mode'.") -(custom-autoload 'global-flycheck-mode "flycheck" nil) -(autoload 'global-flycheck-mode "flycheck" "\ -Toggle Flycheck mode in all buffers. -With prefix ARG, enable Global Flycheck mode if ARG is positive; -otherwise, disable it. - -If called from Lisp, toggle the mode if ARG is `toggle'. -Enable the mode if ARG is nil, omitted, or is a positive number. -Disable the mode if ARG is a negative number. - -Flycheck mode is enabled in all buffers where `flycheck-mode-on-safe' -would do it. - -See `flycheck-mode' for more information on Flycheck mode. - -(fn &optional ARG)" t) -(autoload 'flycheck-define-error-level "flycheck" "\ -Define a new error LEVEL with PROPERTIES. - -The following PROPERTIES constitute an error level: - -`:severity SEVERITY' - A number denoting the severity of this level. The higher - the number, the more severe is this level compared to other - levels. Defaults to 0; info is -10, warning is 10, and - error is 100. - - The severity is used by `flycheck-error-level-<' to - determine the ordering of errors according to their levels. - -`:compilation-level LEVEL' - - A number indicating the broad class of messages that errors - at this level belong to: one of 0 (info), 1 (warning), or - 2 or nil (error). Defaults to nil. - - This is used by `flycheck-checker-pattern-to-error-regexp' - to map error levels into `compilation-mode''s hierarchy and - to get proper highlighting of errors in `compilation-mode'. - -`:overlay-category CATEGORY' - A symbol denoting the overlay category to use for error - highlight overlays for this level. See Info - node `(elisp)Overlay Properties' for more information about - overlay categories. - - A category for an error level overlay should at least define - the `face' property, for error highlighting. Another useful - property for error level categories is `priority', to - influence the stacking of multiple error level overlays. - -`:fringe-bitmap BITMAPS' - A fringe bitmap symbol denoting the bitmap to use for fringe - indicators for this level, or a cons of two bitmaps (one for - narrow fringes and one for wide fringes). See Info node - `(elisp)Fringe Bitmaps' for more information about fringe - bitmaps, including a list of built-in fringe bitmaps. - -`:fringe-face FACE' - A face symbol denoting the face to use for fringe indicators - for this level. - -`:margin-spec SPEC' - A display specification indicating what to display in the - margin when `flycheck-indication-mode' is `left-margin' or - `right-margin'. See Info node `(elisp)Displaying in the - Margins'. If omitted, Flycheck generates an image spec from - the fringe bitmap. - -`:error-list-face FACE' - A face symbol denoting the face to use for messages of this - level in the error list. See `flycheck-list-errors'. - -(fn LEVEL &rest PROPERTIES)") -(function-put 'flycheck-define-error-level 'lisp-indent-function 1) -(autoload 'flycheck-define-command-checker "flycheck" "\ -Define SYMBOL as syntax checker to run a command. - -Define SYMBOL as generic syntax checker via -`flycheck-define-generic-checker', which uses an external command -to check the buffer. SYMBOL and DOCSTRING are the same as for -`flycheck-define-generic-checker'. - -In addition to the properties understood by -`flycheck-define-generic-checker', the following PROPERTIES -constitute a command syntax checker. Unless otherwise noted, all -properties are mandatory. Note that the default `:error-filter' -of command checkers is `flycheck-sanitize-errors'. - -`:command COMMAND' - The command to run for syntax checking. - - COMMAND is a list of the form `(EXECUTABLE [ARG ...])'. - - EXECUTABLE is a string with the executable of this syntax - checker. It can be overridden with the variable - `flycheck-SYMBOL-executable'. Note that this variable is - NOT implicitly defined by this function. Use - `flycheck-def-executable-var' to define this variable. - - Each ARG is an argument to the executable, either as string, - or as special symbol or form for - `flycheck-substitute-argument', which see. - -`:error-patterns PATTERNS' - A list of patterns to parse the output of the `:command'. - - Each ITEM in PATTERNS is a list `(LEVEL SEXP ...)', where - LEVEL is a Flycheck error level (see - `flycheck-define-error-level'), followed by one or more RX - `SEXP's which parse an error of that level and extract line, - column, file name and the message. - - See `rx' for general information about RX, and - `flycheck-rx-to-string' for some special RX forms provided - by Flycheck. - - All patterns are applied in the order of declaration to the - whole output of the syntax checker. Output already matched - by a pattern will not be matched by subsequent patterns. In - other words, the first pattern wins. - - This property is optional. If omitted, however, an - `:error-parser' is mandatory. - -`:error-parser FUNCTION' - A function to parse errors with. - - The function shall accept three arguments OUTPUT CHECKER - BUFFER. OUTPUT is the syntax checker output as string, - CHECKER the syntax checker that was used, and BUFFER a - buffer object representing the checked buffer. The function - must return a list of `flycheck-error' objects parsed from - OUTPUT. - - This property is optional. If omitted, it defaults to - `flycheck-parse-with-patterns'. In this case, - `:error-patterns' is mandatory. - -`:standard-input t' - Whether to send the buffer contents on standard input. - - If this property is given and has a non-nil value, send the - contents of the buffer on standard input. - - Some checkers that support reading from standard input have - a separate flag to indicate the name of the file whose - contents are being passed on standard input (typically - `stdin-filename'). In that case, use the `(option)' form in - `:command' to pass the value of variable `buffer-file-name' - when the current buffer has a file name (that is, - use `option \"--stdin-file-name\" buffer-file-name'). - - For buffers not backed by files, checkers that support input - on stdin typically report a file name like `-' or `'. - Make sure your error parser or patterns expect these file - names (for example, use `(or \"\" (file-name))') or - call `flycheck-remove-error-file-names' in a custom - `:error-filter'. - - Defaults to nil. - -Note that you may not give `:start', `:interrupt', and -`:print-doc' for a command checker. You can give a custom -`:verify' function, though, whose results will be appended to the -default `:verify' function of command checkers. - -(fn SYMBOL DOCSTRING &rest PROPERTIES)") -(function-put 'flycheck-define-command-checker 'lisp-indent-function 1) -(function-put 'flycheck-define-command-checker 'doc-string-elt 2) -(autoload 'flycheck-def-config-file-var "flycheck" "\ -Define SYMBOL as config file variable for CHECKER, with default FILE-NAME. - -SYMBOL is declared as customizable variable using `defcustom', to -provide configuration files for the given syntax CHECKER. -CUSTOM-ARGS are forwarded to `defcustom'. - -FILE-NAME is the initial value of the new variable. If omitted, -the default value is nil. It can be either a string or a list of -strings. - -Use this together with the `config-file' form in the `:command' -argument to `flycheck-define-checker'. - -(fn SYMBOL CHECKER &optional FILE-NAME &rest CUSTOM-ARGS)" nil t) -(function-put 'flycheck-def-config-file-var 'lisp-indent-function 3) -(autoload 'flycheck-def-option-var "flycheck" "\ -Define SYMBOL as option variable with INIT-VALUE for CHECKER. - -SYMBOL is declared as customizable variable using `defcustom', to -provide an option for the given syntax CHECKERS (a checker or a -list of checkers). INIT-VALUE is the initial value of the -variable, and DOCSTRING is its docstring. CUSTOM-ARGS are -forwarded to `defcustom'. - -Use this together with the `option', `option-list' and -`option-flag' forms in the `:command' argument to -`flycheck-define-checker'. - -(fn SYMBOL INIT-VALUE CHECKERS DOCSTRING &rest CUSTOM-ARGS)" nil t) -(function-put 'flycheck-def-option-var 'lisp-indent-function 3) -(function-put 'flycheck-def-option-var 'doc-string-elt 4) -(autoload 'flycheck-define-checker "flycheck" "\ -Define SYMBOL as command syntax checker with DOCSTRING and PROPERTIES. - -Like `flycheck-define-command-checker', but PROPERTIES must not -be quoted. Also, implicitly define the executable variable for -SYMBOL with `flycheck-def-executable-var'. - -(fn SYMBOL DOCSTRING &rest PROPERTIES)" nil t) -(function-put 'flycheck-define-checker 'lisp-indent-function 1) -(function-put 'flycheck-define-checker 'doc-string-elt 2) -(register-definition-prefixes "flycheck" '("flycheck-" "help-flycheck-checker-d" "list-flycheck-errors")) - - -;;; Generated autoloads from flycheck-buttercup.el - -(register-definition-prefixes "flycheck-buttercup" '("flycheck-buttercup-format-error-list")) - - -;;; Generated autoloads from flycheck-ert.el - -(register-definition-prefixes "flycheck-ert" '("flycheck-er")) - -;;; End of scraped data - -(provide 'flycheck-autoloads) - -;; Local Variables: -;; version-control: never -;; no-byte-compile: t -;; no-update-autoloads: t -;; no-native-compile: t -;; coding: utf-8-emacs-unix -;; End: - -;;; flycheck-autoloads.el ends here diff --git a/elpa/flycheck-35.0/flycheck-buttercup.el b/elpa/flycheck-35.0/flycheck-buttercup.el deleted file mode 100644 index 5782980..0000000 --- a/elpa/flycheck-35.0/flycheck-buttercup.el +++ /dev/null @@ -1,157 +0,0 @@ -;;; flycheck-buttercup.el --- Flycheck: Extensions to Buttercup -*- lexical-binding: t; -*- - -;; Copyright (C) 2017-2025 Flycheck contributors -;; Copyright (C) 2016 Sebastian Wiesner and Flycheck contributors - -;; Author: Sebastian Wiesner -;; Maintainer: Clément Pit-Claudel -;; fmdkdd -;; Keywords: lisp, tools - -;; 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: - -;; Extensions to Buttercup to write BDD tests for Flycheck. -;; -;; Buttercup is a BDD testing framework for Emacs, see URL -;; `https://github.com/jorgenschaefer/emacs-buttercup/'. Flycheck uses -;; Buttercup extensively for new tests. -;; -;; This library provides extensions to Buttercup to write Specs for Flycheck. -;; -;; * Custom matchers -;; -;; (expect 'foo :to-be-local) - Is `foo' a local variable in the current buffer? - -;;; Code: - -(require 'buttercup) -(require 'flycheck) -(require 'seq) - - -;;; Buttercup helpers - -(defun flycheck-buttercup-format-error-list (errors) - "Format ERRORS into a human-readable string." - (mapconcat (lambda (e) (flycheck-error-format e 'with-file-name)) - errors "\n")) - - -;;; Data matchers - -(buttercup-define-matcher :to-be-empty-string (s) - (let ((s (funcall s))) - (if (equal s "") - (cons t (format "Expected %S not be an empty string" s)) - (cons nil (format "Expected %S to be an empty string" s))))) - -(buttercup-define-matcher :to-match-with-group (re s index match) - (let* ((re (funcall re)) - (s (funcall s)) - (index (funcall index)) - (match (funcall match)) - (matches? (string-match re s)) - (result (and matches? (match-string index s)))) - (if (and matches? (equal result match)) - (cons t (format "Expected %S not to match %S with %S in group %s" - re s match index)) - - (cons nil (format "Expected %S to match %S with %S in group %s, %s" - re s match index - (if matches? - (format "but got %S" result) - "but did not match")))))) - - -;;; Emacs feature matchers - -(buttercup-define-matcher :to-be-live (buffer) - (let ((buffer (get-buffer (funcall buffer)))) - (if (buffer-live-p buffer) - (cons t (format "Expected %S not to be a live buffer, but it is" - buffer)) - (cons nil (format "Expected %S to be a live buffer, but it is not" - buffer))))) - -(buttercup-define-matcher :to-be-visible (buffer) - (let ((buffer (get-buffer (funcall buffer)))) - (cond - ((and buffer (get-buffer-window buffer)) - (cons t (format "Expected %S not to be a visible buffer, but it is" - buffer))) - ((not (bufferp buffer)) - (cons nil - (format "Expected %S to be a visible buffer, but it is not a buffer" - buffer))) - (t (cons - nil - (format "Expected %S to be a visible buffer, but it is not visible" - buffer)))))) - -(buttercup-define-matcher :to-be-local (symbol) - (let ((symbol (funcall symbol))) - (if (local-variable-p symbol) - (cons t (format "Expected %S not to be a local variable, but it is" - symbol)) - (cons nil (format "Expected %S to be a local variable, but it is not" - symbol))))) - -(buttercup-define-matcher :to-contain-match (buffer re) - (let ((buffer (funcall buffer)) - (re (funcall re))) - (if (not (get-buffer buffer)) - (cons nil (format "Expected %S to contain a match of %s, \ -but is not a buffer" buffer re)) - (with-current-buffer buffer - (save-excursion - (goto-char (point-min)) - (if (re-search-forward re nil 'noerror) - (cons t (format "Expected %S to contain a match \ -for %s, but it did not" buffer re)) - (cons nil (format "Expected %S not to contain a match for \ -%s but it did not." buffer re)))))))) - - -;;; Flycheck matchers - -(buttercup-define-matcher :to-be-equal-flycheck-errors (a b) - (let* ((a (funcall a)) - (b (funcall b)) - (a-formatted (flycheck-buttercup-format-error-list a)) - (b-formatted (flycheck-buttercup-format-error-list b))) - (if (equal a b) - (cons t (format "Expected -%s -not to be equal to -%s" a-formatted b-formatted)) - (cons nil (format "Expected -%s -to be equal to -%s" a-formatted b-formatted))))) - -(provide 'flycheck-buttercup) - -;; Disable byte compilation for this library, to prevent package.el choking on a -;; missing `buttercup' library. See -;; https://github.com/flycheck/flycheck/issues/860 - -;; Local Variables: -;; no-byte-compile: t -;; End: - -;;; flycheck-buttercup.el ends here diff --git a/elpa/flycheck-35.0/flycheck-ert.el b/elpa/flycheck-35.0/flycheck-ert.el deleted file mode 100644 index f8219e9..0000000 --- a/elpa/flycheck-35.0/flycheck-ert.el +++ /dev/null @@ -1,451 +0,0 @@ -;;; flycheck-ert.el --- Flycheck: ERT extensions -*- lexical-binding: t; -*- - -;; Copyright (C) 2017-2018 Flycheck contributors -;; Copyright (C) 2013-2016 Sebastian Wiesner and Flycheck contributors - -;; Author: Sebastian Wiesner -;; Maintainer: Clément Pit-Claudel -;; fmdkdd -;; URL: https://github.com/flycheck/flycheck - -;; 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: - -;; Unit testing library for Flycheck, the modern on-the-fly syntax checking -;; extension for GNU Emacs. - -;; Provide various utility functions and unit test helpers to test Flycheck and -;; Flycheck extensions. - -;;; Code: - -(require 'flycheck) -(require 'ert) -(require 'macroexp) ; For macro utilities - - -;;; Internal variables - -(defvar flycheck-ert--resource-directory nil - "The directory to get resources from in this test suite.") - - -;;; Resource management macros - -(defmacro flycheck-ert-with-temp-buffer (&rest body) - "Eval BODY within a temporary buffer. - -Like `with-temp-buffer', but resets the modification state of the -temporary buffer to make sure that it is properly killed even if -it has a backing file and is modified." - (declare (indent 0) (debug t)) - `(with-temp-buffer - (unwind-protect - ,(macroexp-progn body) - ;; Reset modification state of the buffer, and unlink it from its backing - ;; file, if any, because Emacs refuses to kill modified buffers with - ;; backing files, even if they are temporary. - (set-buffer-modified-p nil) - (set-visited-file-name nil 'no-query)))) - -(defmacro flycheck-ert-with-file-buffer (file-name &rest body) - "Create a buffer from FILE-NAME and eval BODY. - -BODY is evaluated with `current-buffer' being a buffer with the -contents FILE-NAME." - (declare (indent 1) (debug t)) - `(let ((file-name ,file-name)) - (unless (file-exists-p file-name) - (error "%s does not exist" file-name)) - (flycheck-ert-with-temp-buffer - (insert-file-contents file-name 'visit) - (set-visited-file-name file-name 'no-query) - (cd (file-name-directory file-name)) - ;; Mark the buffer as not modified, because we just loaded the file up to - ;; now. - (set-buffer-modified-p nil) - ,@body))) - -(defmacro flycheck-ert-with-help-buffer (&rest body) - "Execute BODY and kill the help buffer afterwards. - -Use this macro to test functions that create a Help buffer." - (declare (indent 0)) - `(unwind-protect - ,(macroexp-progn body) - (when (buffer-live-p (get-buffer (help-buffer))) - (kill-buffer (help-buffer))))) - -(defmacro flycheck-ert-with-global-mode (&rest body) - "Execute BODY with Global Flycheck Mode enabled. - -After BODY, restore the old state of Global Flycheck Mode." - (declare (indent 0)) - `(let ((old-state global-flycheck-mode)) - (unwind-protect - (progn - (global-flycheck-mode 1) - ,@body) - (global-flycheck-mode (if old-state 1 -1))))) - -(defmacro flycheck-ert-with-env (env &rest body) - "Add ENV to `process-environment' in BODY. - -Execute BODY with a `process-environment' which contains all -variables from ENV added. - -ENV is an alist, where each cons cell `(VAR . VALUE)' is a -environment variable VAR to be added to `process-environment' -with VALUE." - (declare (indent 1)) - `(let ((process-environment (copy-sequence process-environment))) - (pcase-dolist (`(,var . ,value) ,env) - (setenv var value)) - ,@body)) - - -;;; Test resources -(defun flycheck-ert-resource-filename (resource-file) - "Determine the absolute file name of a RESOURCE-FILE. - -Relative file names are expanded against -`flycheck-ert--resource-directory'." - (expand-file-name resource-file flycheck-ert--resource-directory)) - -(defmacro flycheck-ert-with-resource-buffer (resource-file &rest body) - "Create a temp buffer from a RESOURCE-FILE and execute BODY. - -The absolute file name of RESOURCE-FILE is determined with -`flycheck-ert-resource-filename'." - (declare (indent 1)) - `(flycheck-ert-with-file-buffer - (flycheck-ert-resource-filename ,resource-file) - ,@body)) - - -;;; Test suite initialization - -(defun flycheck-ert-initialize (resource-dir) - "Initialize a test suite with RESOURCE-DIR. - -RESOURCE-DIR is the directory, `flycheck-ert-resource-filename' -should use to lookup resource files." - (when flycheck-ert--resource-directory - (error "Test suite already initialized")) - (let ((tests (ert-select-tests t t))) - ;; Select all tests - (unless tests - (error "No tests defined. \ -Call `flycheck-ert-initialize' after defining all tests!")) - - (setq flycheck-ert--resource-directory resource-dir))) - - -;;; Test case definitions -(defmacro flycheck-ert-def-checker-test (checker language name - &rest keys-and-body) - "Define a test case for a syntax CHECKER for LANGUAGE. - -CHECKER is a symbol or a list of symbols denoting syntax checkers -being tested by the test. The test case is skipped, if any of -these checkers cannot be used. LANGUAGE is a symbol or a list of -symbols denoting the programming languages supported by the -syntax checkers. This is currently only used for tagging the -test appropriately. - -NAME is a symbol denoting the local name of the test. The test -itself is ultimately named -`flycheck-define-checker/CHECKER/NAME'. If CHECKER is a list, -the first checker in the list is used for naming the test. - -Optionally, the keyword arguments `:tags' and `:expected-result' -may be given. They have the same meaning as in `ert-deftest.', -and are added to the tags and result expectations set up by this -macro. - -The remaining forms KEYS-AND-BODY denote the body of the test -case, including assertions and setup code." - (declare (indent 3)) - (unless checker - (error "No syntax checkers specified")) - (unless language - (error "No languages specified")) - (let* ((checkers (if (symbolp checker) (list checker) checker)) - (checker (car checkers)) - (languages (if (symbolp language) (list language) language)) - (language-tags (mapcar (lambda (l) (intern (format "language-%s" l))) - languages)) - (checker-tags (mapcar (lambda (c) (intern (format "checker-%s" c))) - checkers)) - (local-name (or name 'default)) - (full-name (intern (format "flycheck-define-checker/%s/%s" - checker local-name))) - (keys-and-body (ert--parse-keys-and-body keys-and-body)) - (body (cadr keys-and-body)) - (keys (car keys-and-body)) - (default-tags '(syntax-checker external-tool))) - `(ert-deftest ,full-name () - :expected-result ,(or (plist-get keys :expected-result) :passed) - :tags (append ',(append default-tags language-tags checker-tags) - ,(plist-get keys :tags)) - ,@(mapcar (lambda (c) - `(skip-unless - ;; Ignore non-command checkers - (or (not (flycheck-checker-get ',c 'command)) - (executable-find (flycheck-checker-executable ',c))))) - checkers) - ,@body))) - - -;;; Test case results - -(defun flycheck-ert-syntax-check-timed-out-p (result) - "Whether RESULT denotes a timed-out test. - -RESULT is an ERT test result object." - (and (ert-test-failed-p result) - (eq (car (ert-test-failed-condition result)) - 'flycheck-ert-syntax-check-timed-out))) - - -;;; Syntax checking in tests - -(defvar-local flycheck-ert-syntax-checker-finished nil - "Non-nil if the current checker has finished.") - -(add-hook 'flycheck-after-syntax-check-hook - (lambda () (setq flycheck-ert-syntax-checker-finished t))) - -(defconst flycheck-ert-checker-wait-time 10 - "Time to wait until a checker is finished in seconds. - -After this time has elapsed, the checker is considered to have -failed, and the test aborted with failure.") - -(define-error 'flycheck-ert-syntax-check-timed-out "Syntax check timed out.") - -(defun flycheck-ert-wait-for-syntax-checker () - "Wait until the syntax check in the current buffer is finished." - (let ((starttime (float-time))) - (while (and (not flycheck-ert-syntax-checker-finished) - (< (- (float-time) starttime) flycheck-ert-checker-wait-time)) - (accept-process-output nil 0.02)) - (unless (< (- (float-time) starttime) flycheck-ert-checker-wait-time) - (flycheck-stop) - (signal 'flycheck-ert-syntax-check-timed-out nil))) - (setq flycheck-ert-syntax-checker-finished nil)) - -(defun flycheck-ert-buffer-sync () - "Like `flycheck-buffer', but synchronously." - (setq flycheck-ert-syntax-checker-finished nil) - (should (not (flycheck-running-p))) - (flycheck-mode) ;; This will only start a deferred check, - (should (flycheck-get-checker-for-buffer)) - (flycheck-buffer) ;; …so we need an explicit manual check - ;; After starting the check, the checker should either be running now, or - ;; already be finished (if it was fast). - (should (or flycheck-current-syntax-check - flycheck-ert-syntax-checker-finished)) - ;; Also there should be no deferred check pending anymore - (should-not (flycheck-deferred-check-p)) - (flycheck-ert-wait-for-syntax-checker)) - -(defun flycheck-ert-ensure-clear () - "Clear the current buffer. - -Raise an assertion error if the buffer is not clear afterwards." - (flycheck-clear) - (should (not flycheck-current-errors)) - (should (not (seq-find (lambda (ov) (overlay-get ov 'flycheck-overlay)) - (overlays-in (point-min) (point-max)))))) - - -;;; Test assertions - -(defun flycheck-error-without-group (err) - "Return a copy ERR with the `group' property set to nil." - (let ((copy (copy-flycheck-error err))) - (setf (flycheck-error-group copy) nil) - copy)) - -(defun flycheck-ert-should-overlay (error) - "Test that ERROR has a proper overlay in the current buffer. - -ERROR is a Flycheck error object." - (let* ((overlay (seq-find (lambda (ov) - (equal (flycheck-error-without-group - (overlay-get ov 'flycheck-error)) - (flycheck-error-without-group error))) - (flycheck-overlays-in 0 (+ 1 (buffer-size))))) - (region - ;; Overlays of errors from other files are on the first line - (if (flycheck-relevant-error-other-file-p error) - (cons (point-min) - (save-excursion (goto-char (point-min)) - (line-end-position))) - (flycheck-error-region-for-mode error 'symbols))) - (level (flycheck-error-level error)) - (category (flycheck-error-level-overlay-category level)) - (face (get category 'face)) - (fringe-bitmap (flycheck-error-level-fringe-bitmap level)) - (fringe-face (flycheck-error-level-fringe-face level)) - (fringe-icon (list 'left-fringe fringe-bitmap fringe-face))) - (should overlay) - (should (overlay-get overlay 'flycheck-overlay)) - (should (= (overlay-start overlay) (car region))) - (should (= (overlay-end overlay) (cdr region))) - (should (eq (overlay-get overlay 'face) face)) - (should (equal (get-char-property 0 'display - (overlay-get overlay 'before-string)) - fringe-icon)) - (should (eq (overlay-get overlay 'category) category)) - (should (equal (flycheck-error-without-group (overlay-get overlay - 'flycheck-error)) - (flycheck-error-without-group error))))) - -(defun flycheck-ert-sort-errors (errors) - "Sort ERRORS by `flycheck-error-<'." - (seq-sort #'flycheck-error-< errors)) - -(defun flycheck-ert-should-errors (&rest errors) - "Test that the current buffers has ERRORS. - -ERRORS is a list of errors expected to be present in the current -buffer. Each error is given as a list of arguments to -`flycheck-error-new-at'. - -If ERRORS are omitted, test that there are no errors at all in -the current buffer. - -With ERRORS, test that each error in ERRORS is present in the -current buffer, and that the number of errors in the current -buffer is equal to the number of given ERRORS. In other words, -check that the buffer has all ERRORS, and no other errors." - (let ((expected (flycheck-ert-sort-errors - (mapcar (apply-partially #'apply #'flycheck-error-new-at) - errors))) - (current (flycheck-ert-sort-errors flycheck-current-errors))) - (should (equal (mapcar #'flycheck-error-without-group expected) - (mapcar #'flycheck-error-without-group current))) - ;; Check that related errors are the same - (cl-mapcar - (lambda (err1 err2) - (should (equal (flycheck-ert-sort-errors - (mapcar #'flycheck-error-without-group - (flycheck-related-errors err1 expected))) - (flycheck-ert-sort-errors - (mapcar #'flycheck-error-without-group - (flycheck-related-errors err2)))))) - expected current) - (mapc #'flycheck-ert-should-overlay expected)) - (should (= (length errors) - (length (flycheck-overlays-in (point-min) (point-max)))))) - -(define-error 'flycheck-ert-suspicious-checker "Suspicious state from checker") - -(defun flycheck-ert-should-syntax-check-in-buffer (&rest errors) - "Test a syntax check in BUFFER, expecting ERRORS. - -This is like `flycheck-ert-should-syntax-check', but with a -buffer in the right mode instead of a file." - ;; Load safe file-local variables because some tests depend on them - (let ((enable-local-variables :safe) - ;; Disable all hooks at this place, to prevent 3rd party packages - ;; from interfering - (hack-local-variables-hook)) - (hack-local-variables)) - ;; Configure config file locating for unit tests - (let ((process-hook-called 0) - (suspicious nil)) - (add-hook 'flycheck-process-error-functions - (lambda (_err) - (setq process-hook-called (1+ process-hook-called)) - nil) - nil :local) - (add-hook 'flycheck-status-changed-functions - (lambda (status) - (when (eq status 'suspicious) - (setq suspicious t))) - nil :local) - (flycheck-ert-buffer-sync) - (when suspicious - (signal 'flycheck-ert-suspicious-checker nil)) - (apply #'flycheck-ert-should-errors errors) - (should (= process-hook-called (length errors)))) - (flycheck-ert-ensure-clear)) - -(defun flycheck-ert-should-syntax-check (resource-file modes &rest errors) - "Test a syntax check in RESOURCE-FILE with MODES. - -RESOURCE-FILE is the file to check. MODES is a single major mode -symbol or a list thereof, specifying the major modes to syntax -check with. If more than one major mode is specified, the test -is run for each mode separately, so if you give three major -modes, the entire test will run three times. ERRORS is the list -of expected errors, as in `flycheck-ert-should-errors'. If -omitted, the syntax check must not emit any errors. The errors -are cleared after each test. - -The syntax checker is selected via standard syntax checker -selection. To test a specific checker, you need to set -`flycheck-checker' or `flycheck-disabled-checkers' accordingly -before using this predicate, depending on whether you want to use -manual or automatic checker selection. - -During the syntax check, configuration files of syntax checkers -are also searched in the `config-files' sub-directory of the -resource directory." - (when (symbolp modes) - (setq modes (list modes))) - (dolist (mode modes) - (unless (fboundp mode) - (ert-skip (format "%S missing" mode))) - (flycheck-ert-with-resource-buffer resource-file - (funcall mode) - (apply #'flycheck-ert-should-syntax-check-in-buffer errors)))) - -(defun flycheck-ert-at-nth-error (n) - "Determine whether point is at the N'th Flycheck error. - -Return non-nil if the point is at the N'th Flycheck error in the -current buffer. Otherwise return nil." - (let* ((error (nth (1- n) flycheck-current-errors)) - (mode flycheck-highlighting-mode) - (region (flycheck-error-region-for-mode error mode))) - (and (member error (flycheck-overlay-errors-at (point))) - (= (point) (car region))))) - -(defun flycheck-ert-explain--at-nth-error (n) - "Explain a failed at-nth-error predicate at N." - (let ((errors (flycheck-overlay-errors-at (point)))) - (if (null errors) - (format "Expected to be at error %s, but no error at point %s" - n (point)) - (let ((pos (cl-position (car errors) flycheck-current-errors))) - (format "Expected to be at point %s and error %s, \ -but point %s is at error %s" - (car (flycheck-error-region-for-mode - (nth (1- n) flycheck-current-errors) - flycheck-highlighting-mode)) - n (point) (1+ pos)))))) - -(put 'flycheck-ert-at-nth-error 'ert-explainer - 'flycheck-ert-explain--at-nth-error) - -(provide 'flycheck-ert) - -;;; flycheck-ert.el ends here diff --git a/elpa/flycheck-35.0/flycheck-pkg.el b/elpa/flycheck-35.0/flycheck-pkg.el deleted file mode 100644 index f329c73..0000000 --- a/elpa/flycheck-35.0/flycheck-pkg.el +++ /dev/null @@ -1,12 +0,0 @@ -;; -*- no-byte-compile: t; lexical-binding: nil -*- -(define-package "flycheck" "35.0" - "On-the-fly syntax checking." - '((emacs "27.1")) - :url "https://www.flycheck.org" - :commit "6e43c07e83406cdd3f75952ee988d61d7573ec11" - :revdesc "6e43c07e8340" - :keywords '("convenience" "languages" "tools") - :authors '(("Sebastian Wiesner" . "swiesner@lunaryorn.com")) - :maintainers '(("Clément Pit-Claudel" . "clement.pitclaudel@live.com") - ("fmdkdd" . "fmdkdd@gmail.com") - ("Bozhidar Batsov" . "bozhidar@batsov.dev"))) diff --git a/elpa/flycheck-35.0/flycheck.el b/elpa/flycheck-35.0/flycheck.el deleted file mode 100644 index 7bd3d3f..0000000 --- a/elpa/flycheck-35.0/flycheck.el +++ /dev/null @@ -1,13034 +0,0 @@ -;;; flycheck.el --- On-the-fly syntax checking -*- lexical-binding: t; -*- - -;; Copyright (C) 2017-2025 Flycheck contributors -;; Copyright (C) 2012-2016 Sebastian Wiesner and Flycheck contributors -;; Copyright (C) 2013, 2014 Free Software Foundation, Inc. -;; -;; Author: Sebastian Wiesner -;; Maintainer: Clément Pit-Claudel -;; fmdkdd -;; Bozhidar Batsov -;; URL: https://www.flycheck.org -;; Keywords: convenience, languages, tools -;; Package-Version: 35.0 -;; Package-Revision: 6e43c07e8340 -;; Package-Requires: ((emacs "27.1")) - -;; 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: - -;; On-the-fly syntax checking for GNU Emacs. -;; -;; Flycheck is a modern on-the-fly syntax checking extension for GNU Emacs, -;; intended as replacement for the older Flymake extension which is part of GNU -;; Emacs. -;; -;; Flycheck automatically checks buffers for errors while you type, and reports -;; warnings and errors directly in the buffer and in an optional IDE-like error -;; list. -;; -;; It comes with a rich interface for custom syntax checkers and other -;; extensions, and has already many 3rd party extensions adding new features. -;; -;; Please read the online manual at https://www.flycheck.org for more -;; information. You can open the manual directly from Emacs with `M-x -;; flycheck-manual'. -;; -;; # Setup -;; -;; Flycheck works best on Unix systems. It does not officially support Windows, -;; but tries to maintain Windows compatibility and should generally work fine on -;; Windows, too. -;; -;; To enable Flycheck add the following to your init file: -;; -;; (add-hook 'after-init-hook #'global-flycheck-mode) -;; -;; Flycheck will then automatically check buffers in supported languages, as -;; long as all necessary tools are present. Use `flycheck-verify-setup' to -;; troubleshoot your Flycheck setup. - -;;; Code: - -(eval-when-compile - (require 'let-alist) ; `let-alist' - (require 'compile) ; Compile Mode integration - (require 'jka-compr) ; To inhibit compression of temp files - (require 'pcase) ; `pcase-dolist' (`pcase' itself is autoloaded) - ) - -(require 'seq) ; Sequence functions -(require 'subr-x) ; Additional utilities -(require 'cl-lib) ; `cl-defstruct' and CL utilities -(require 'tabulated-list) ; To list errors -(require 'easymenu) ; Flycheck Mode menu definition -(require 'rx) ; Regexp fanciness in `flycheck-define-checker' -(require 'help-mode) ; `define-button-type' -(require 'find-func) ; `find-function-regexp-alist' -(require 'json) ; `flycheck-parse-json' -(require 'ansi-color) ; `flycheck-parse-with-patterns-without-color' - - -;; Declare a bunch of dynamic variables that we need from other modes -(defvar sh-shell) ; For shell script checker predicates -(defvar ess-language) ; For r-lintr predicate -(defvar markdown-hide-markup) ; -(defvar markdown-fontify-code-block-default-mode) ; For rust-error-explainer -(defvar markdown-fontify-code-blocks-natively) ; - -;; Tell the byte compiler about autoloaded functions from packages -(declare-function pkg-info-version-info "pkg-info" (package)) - - -;;; Customization -(defgroup flycheck nil - "Modern on-the-fly syntax checking for GNU Emacs." - :prefix "flycheck-" - :group 'tools - :link '(url-link :tag "Website" "https://www.flycheck.org") - :link '(url-link :tag "Github" "https://github.com/flycheck/flycheck")) - -(defgroup flycheck-config-files nil - "Configuration files for on-the-fly syntax checkers." - :prefix "flycheck-" - :group 'flycheck) - -(defgroup flycheck-options nil - "Options for on-the-fly syntax checkers." - :prefix "flycheck-" - :group 'flycheck) - -(defgroup flycheck-executables nil - "Executables of syntax checkers." - :prefix "flycheck-" - :group 'flycheck) - -(defgroup flycheck-faces nil - "Faces used by on-the-fly syntax checking." - :prefix "flycheck-" - :group 'flycheck) - -(defcustom flycheck-checkers - '(ada-gnat - asciidoctor - asciidoc - awk-gawk - bazel-build-buildifier - bazel-module-buildifier - bazel-starlark-buildifier - bazel-workspace-buildifier - c/c++-clang - c/c++-gcc - c/c++-cppcheck - cfengine - coffee - coffee-coffeelint - css-csslint - css-stylelint - cuda-nvcc - cwl - d-dmd - dockerfile-hadolint - elixir-credo - emacs-lisp - emacs-lisp-checkdoc - ember-template - erlang-rebar3 - erlang - eruby-erubis - eruby-ruumba - fortran-gfortran - go-gofmt - go-vet - go-build - go-test - go-errcheck - go-unconvert - go-staticcheck - groovy - haml - haml-lint - handlebars - haskell-stack-ghc - haskell-ghc - haskell-hlint - html-tidy - javascript-eslint - javascript-jshint - javascript-standard - json-jsonlint - json-python-json - json-jq - jsonnet - less - less-stylelint - llvm-llc - lua-luacheck - lua - markdown-markdownlint-cli - markdown-markdownlint-cli2 - markdown-mdl - markdown-pymarkdown - nix - nix-linter - opam - perl - perl-perlcritic - perl-perlimports - php - php-phpmd - php-phpcs - php-phpcs-changed - processing - proselint - protobuf-protoc - protobuf-prototool - pug - puppet-parser - puppet-lint - python-flake8 - python-ruff - python-pylint - python-pycompile - python-pyright - python-mypy - r-lintr - r - racket - rpm-rpmlint - rst-sphinx - rst - ruby-rubocop - ruby-chef-cookstyle - ruby-standard - ruby-reek - ruby - ruby-jruby - rust-cargo - rust - rust-clippy - salt-lint - scala - scala-scalastyle - scheme-chicken - scss-lint - sass-stylelint - scss-stylelint - sass/scss-sass-lint - sass - scss - sh-bash - sh-posix-dash - sh-posix-bash - sh-zsh - sh-shellcheck - slim - slim-lint - sql-sqlint - statix - systemd-analyze - tcl-nagelfar - terraform - terraform-tflint - tex-chktex - tex-lacheck - texinfo - textlint - typescript-tslint - verilog-verilator - vhdl-ghdl - xml-xmlstarlet - xml-xmllint - yaml-actionlint - yaml-jsyaml - yaml-ruby - yaml-yamllint) - "Syntax checkers available for automatic selection. - -A list of Flycheck syntax checkers to choose from when syntax -checking a buffer. Flycheck will automatically select a suitable -syntax checker from this list, unless `flycheck-checker' is set, -either directly or with `flycheck-select-checker'. - -You should not need to change this variable normally. In order -to disable syntax checkers, please use -`flycheck-disabled-checkers'. This variable is intended for 3rd -party extensions to tell Flycheck about new syntax checkers. - -Syntax checkers in this list must be defined with -`flycheck-define-checker'." - :group 'flycheck - :type '(repeat (symbol :tag "Checker")) - :risky t) - -(defcustom flycheck-disabled-checkers nil - "Syntax checkers excluded from automatic selection. - -A list of Flycheck syntax checkers to exclude from automatic -selection. Flycheck will never automatically select a syntax -checker in this list, regardless of the value of -`flycheck-checkers'. - -However, syntax checkers in this list are still available for -manual selection with `flycheck-select-checker'. - -Use this variable to disable syntax checkers, instead of removing -the syntax checkers from `flycheck-checkers'. You may also use -this option as a file or directory local variable to disable -specific checkers in individual files and directories -respectively." - :group 'flycheck - :type '(repeat (symbol :tag "Checker")) - :package-version '(flycheck . "0.16") - :safe #'flycheck-symbol-list-p) -(make-variable-buffer-local 'flycheck-disabled-checkers) - -(defvar-local flycheck--automatically-disabled-checkers nil - "List of syntax checkers automatically disabled for this buffer. - -A checker can be automatically disabled in two cases: - -1. Its `:enabled' predicate returned false. -2. It returned too many errors (see `flycheck-checker-error-threshold'). - -To trigger a reverification from Emacs Lisp code, do not modify -this variable: use `flycheck-reset-enabled-checker'.") - -(defvar-local flycheck-checker nil - "Syntax checker to use for the current buffer. - -If unset or nil, automatically select a suitable syntax checker -from `flycheck-checkers' on every syntax check. - -If set to a syntax checker only use this syntax checker and never -select one from `flycheck-checkers' automatically. The syntax -checker is used regardless of whether it is contained in -`flycheck-checkers' or `flycheck-disabled-checkers'. If the -syntax checker is unusable in the current buffer an error is -signaled. - -A syntax checker assigned to this variable must be defined with -`flycheck-define-checker'. - -Use the command `flycheck-select-checker' to select a syntax -checker for the current buffer, or set this variable as file -local variable to always use a specific syntax checker for a -file. See Info Node `(Emacs)Specifying File Variables' for more -information about file variables.") -(put 'flycheck-checker 'safe-local-variable 'flycheck-registered-checker-p) - -(defcustom flycheck-locate-config-file-functions nil - "Functions to locate syntax checker configuration files. - -Each function in this hook must accept two arguments: The value -of the configuration file variable, and the syntax checker -symbol. It must return either a string with an absolute path to -the configuration file, or nil, if it cannot locate the -configuration file. - -The functions in this hook are called in order of appearance, until a -function returns non-nil. The configuration file returned by that -function is then given to the syntax checker if it exists. - -This variable is an abnormal hook. See Info -node `(elisp)Hooks'." - :group 'flycheck - :type 'hook - :risky t) - -(defcustom flycheck-checker-error-threshold 400 - "Maximum errors allowed per syntax checker. - -The value of this variable is either an integer denoting the -maximum number of errors per syntax checker and buffer, or nil to -not limit the errors reported from a syntax checker. - -If this variable is a number and a syntax checker reports more -errors than the value of this variable, its errors are not -discarded, and not highlighted in the buffer or available in the -error list. The affected syntax checker is also disabled for -future syntax checks of the buffer." - :group 'flycheck - :type '(choice (const :tag "Do not limit reported errors" nil) - (integer :tag "Maximum number of errors")) - :risky t - :package-version '(flycheck . "0.22")) - -(defcustom flycheck-process-error-functions nil - "Functions to process errors. - -Each function in this hook must accept a single argument: A -Flycheck error to process. - -All functions in this hook are called in order of appearance, -until a function returns non-nil. Thus, a function in this hook -may return nil, to allow for further processing of the error, or -any non-nil value, to indicate that the error was fully processed -and inhibit any further processing. - -The functions are called for each newly parsed error immediately -after the corresponding syntax checker finished. At this stage, -the overlays from the previous syntax checks are still present, -and there may be further syntax checkers in the chain. - -This variable is an abnormal hook. See Info -node `(elisp)Hooks'." - :group 'flycheck - :type 'hook - :package-version '(flycheck . "0.13") - :risky t) - -(defcustom flycheck-auto-display-errors-after-checking t - "Whether to automatically display errors at the current point after checking. - -When being set to `nil', it will prevent Flycheck from automatically displaying -error messages. This setting is useful when Flycheck is used together with -`flycheck-posframe', to prevent `flycheck-posframe' from repeatedly displaying -errors at point." - :group 'flycheck - :type 'boolean - :package-version '(flycheck . "35") - :safe #'booleanp) - -(defcustom flycheck-display-errors-delay 0.9 - "Delay in seconds before displaying errors at point. - -Use floating point numbers to express fractions of seconds." - :group 'flycheck - :type 'number - :package-version '(flycheck . "0.15") - :safe #'numberp) - -(defcustom flycheck-display-errors-function #'flycheck-display-error-messages - "Function to display error messages. - -If set to a function, call the function with the list of errors -to display as single argument. Each error is an instance of the -`flycheck-error' struct. - -If set to nil, do not display errors at all." - :group 'flycheck - :type '(choice (const :tag "Display error messages" - flycheck-display-error-messages) - (const :tag "Display error messages only if no error list" - flycheck-display-error-messages-unless-error-list) - (function :tag "Error display function")) - :package-version '(flycheck . "0.13") - :risky t) - -(defcustom flycheck-clear-displayed-errors-function #'flycheck-clear-displayed-error-messages - "Function to hide error message displayed by `flycheck-display-errors-function'. - -If set to a function, it will be called with no arguments to -clear all displayed errors at point." - :group 'flycheck - :type '(choice (const :tag "Clear displayed error messages" - flycheck-clear-displayed-error-messages) - (function :tag "Clear displayed errors function")) - :package-version '(flycheck . "34.2") - :risky t) - -(defcustom flycheck-help-echo-function #'flycheck-help-echo-all-error-messages - "Function to compute the contents of the error tooltips. - -If set to a function, call the function with the list of errors -to display as single argument. Each error is an instance of the -`flycheck-error' struct. The function is used to set the -help-echo property of flycheck error overlays. It should return -a string, which is displayed when the user hovers over an error -or presses \\[display-local-help]. - -If set to nil, do not show error tooltips." - :group 'flycheck - :type '(choice (const :tag "Concatenate error messages to form a tooltip" - flycheck-help-echo-all-error-messages) - (function :tag "Help echo function")) - :package-version '(flycheck . "0.25") - :risky t) - -(defcustom flycheck-command-wrapper-function #'identity - "Function to modify checker commands before execution. - -The value of this option is a function which is given a list -containing the full command of a syntax checker after -substitution through `flycheck-substitute-argument' but before -execution. The function may return a new command for Flycheck to -execute. - -The default value is `identity' which does not change the -command. You may provide your own function to run Flycheck -commands through `bundle exec', `nix-shell' or similar wrappers." - :group 'flycheck - :type '(choice (const :tag "Do not modify commands" identity) - (function :tag "Modify command with a custom function")) - :package-version '(flycheck . "0.25") - :risky t) - -(defcustom flycheck-executable-find #'flycheck-default-executable-find - "Function to search for executables. - -The value of this option is a function which is given the name or -path of an executable and shall return the full path to the -executable, or nil if the executable does not exit. - -The default is `flycheck-default-executable-find', which searches -variable `exec-path' when given a command name, and resolves -paths to absolute ones. You can customize this option to search -for checkers in other environments such as bundle or NixOS -sandboxes." - :group 'flycheck - :type '(choice - (const :tag "Search executables in `exec-path'" - flycheck-default-executable-find) - (function :tag "Search executables with a custom function")) - :package-version '(flycheck . "32") - :risky t) - -(defun flycheck-default-executable-find (executable) - "Resolve EXECUTABLE to a full path. - -Like `executable-find', but supports relative paths. - -Attempts invoking `executable-find' first; if that returns nil, -and EXECUTABLE contains a directory component, expands to a full -path and tries invoking `executable-find' again." - ;; file-name-directory returns non-nil iff the given path has a - ;; directory component. - (or - (executable-find executable) - (when (file-name-directory executable) - (executable-find (expand-file-name executable))))) - -(defcustom flycheck-indication-mode 'left-fringe - "The indication mode for Flycheck errors. - -This variable controls how Flycheck indicates errors in buffers. -May be `left-fringe', `right-fringe', `left-margin', -`right-margin', or nil. - -If set to `left-fringe' or `right-fringe', indicate errors via -icons in the left and right fringe respectively. If set to -`left-margin' or `right-margin', use the margins instead. - -If set to nil, do not indicate errors and warnings, but just -highlight them according to `flycheck-highlighting-mode'." - :group 'flycheck - :type '(choice (const :tag "Indicate in the left fringe" left-fringe) - (const :tag "Indicate in the right fringe" right-fringe) - (const :tag "Indicate in the left margin" left-margin) - (const :tag "Indicate in the right margin" right-margin) - (const :tag "Do not indicate" nil)) - :safe #'symbolp) - -(defcustom flycheck-highlighting-mode 'symbols - "The highlighting mode for Flycheck errors and warnings. - -The highlighting mode controls how Flycheck highlights errors in -buffers when a checker only reports the starting position of an -error. The following modes are known: - -`columns' - Highlight a single character. If the error does not have a column, - highlight the whole line. - -`symbols' - Highlight a full symbol if there is any, otherwise behave like `columns'. - This is the default. - -`sexps' - Highlight a full expression, if there is any, otherwise behave like - `columns'. Note that this mode can be *very* slow in some major modes. - -`lines' - Highlight the whole line. - -nil - Do not highlight errors at all. However, errors will still - be reported in the mode line and in error message popups, - and indicated according to `flycheck-indication-mode'." - :group 'flycheck - :type '(choice (const :tag "Highlight columns only" columns) - (const :tag "Highlight symbols" symbols) - (const :tag "Highlight expressions" sexps) - (const :tag "Highlight whole lines" lines) - (const :tag "Do not highlight errors" nil)) - :package-version '(flycheck . "0.14") - :safe #'symbolp) - -(defvar flycheck-current-errors) -(defun flycheck-refresh-fringes-and-margins () - "Refresh fringes and margins of all windows displaying the current buffer. - -If any errors are currently shown, launch a new check, to adjust -to a potential new indication mode." - (dolist (win (get-buffer-window-list)) - (set-window-margins win left-margin-width right-margin-width) - (set-window-fringes win left-fringe-width right-fringe-width)) - (when flycheck-current-errors - (flycheck-buffer))) - -(defun flycheck-set-indication-mode (&optional mode) - "Set `flycheck-indication-mode' to MODE and adjust margins and fringes. - -When MODE is nil, adjust window parameters without changing the -mode. This function can be useful as a `flycheck-mode-hook', -especially if you use margins only in Flycheck buffers. - -When MODE is `left-margin', the left fringe is reduced to 1 pixel -to save space." - (interactive (list (intern (completing-read - "Mode: " '("left-fringe" "right-fringe" - "left-margin" "right-margin") - nil t nil nil - (prin1-to-string flycheck-indication-mode))))) - (setq mode (or mode flycheck-indication-mode)) - (pcase mode - ((or `left-fringe `right-fringe) - (setq left-fringe-width 8 right-fringe-width 8 - left-margin-width 0 right-margin-width 0)) - (`left-margin - (setq left-fringe-width 1 right-fringe-width 8 - left-margin-width 1 right-margin-width 0)) - (`right-margin - (setq left-fringe-width 8 right-fringe-width 8 - left-margin-width 0 right-margin-width 1)) - (_ (user-error "Invalid indication mode"))) - (setq-local flycheck-indication-mode mode) - (flycheck-refresh-fringes-and-margins)) - -(define-widget 'flycheck-highlighting-style 'lazy - "A value for `flycheck-highlighting-style'." - :offset 2 - :format "%t: Use %v" - :type '(choice - :format "%[Value Menu%] %v" - (const :tag "no highlighting" nil) - (const :tag "a face indicating the error level" level-face) - (list :tag "a pair of delimiters" - (const :format "" delimiters) - (string :tag "Before") - (string :tag "After")) - (list :tag "a conditional mix of styles" - (const :format "" conditional) - (integer :tag "Up to this many lines") - (flycheck-highlighting-style :format "Use %v") - (flycheck-highlighting-style :format "Otherwise, use %v")))) - -(defun flycheck--make-highlighting-delimiter (char) - "Make a highlighting bracket symbol by repeating CHAR twice." - (compose-chars ?\s - ;; '(Bl . Br) ?\s - '(Bc Br 30 0) char - '(Bc Bl -30 0) char)) - -(defcustom flycheck-highlighting-style - `(conditional 4 level-face (delimiters "" "")) - "The highlighting style for Flycheck errors and warnings. - -The highlighting style controls how Flycheck highlights error -regions in buffers. The following styles are supported: - -nil - Do not highlight errors. Same as setting - `flycheck-highlighting-mode' to nil. - -`level-face' - Chose a face depending on the severity of the error, and - apply it to the whole error text. See also the - `flycheck-define-error-level' and `flycheck-error', - `flycheck-warning', and `flycheck-info' faces. - -\(`delimiters' BEFORE AFTER) - Draw delimiters on each side of the error. BEFORE and AFTER - indicate which delimiters to use. If they are strings, they - are used as-is. If they are characters, they are repeated - twice and composed into a single character. Delimiters use - the fringe face corresponding to the severity of each error, - as well as the `flycheck-error-delimiter' face. Delimited - text has the `flycheck-delimited-error' face. - -\(`conditional' NLINES S1 S2) - Use style S1 for errors spanning up to NLINES lines, and - style S2 otherwise. - -See also `flycheck-highlighting-mode' and -`flycheck-indication-mode'." - :group 'flycheck - :type 'flycheck-highlighting-style - :package-version '(flycheck . "32") - :safe t) - -(defcustom flycheck-check-syntax-automatically '(save - idle-change - new-line - mode-enabled) - "When Flycheck should check syntax automatically. - -This variable is a list of events that may trigger syntax checks. -The following events are known: - -`save' - Check syntax immediately after the buffer was saved. - -`idle-change' - Check syntax a short time (see `flycheck-idle-change-delay') - after the last change to the buffer. - -`idle-buffer-switch' - Check syntax a short time (see `flycheck-idle-buffer-switch-delay') - after the user switches to a buffer. - -`new-line' - Check syntax immediately after a new line was inserted into - the buffer. - -`mode-enabled' - Check syntax immediately when variable `flycheck-mode' is - non-nil. - -Flycheck performs a syntax checks only on events, which are -contained in this list. For instance, if the value of this -variable is `(mode-enabled save)', Flycheck will only check if -the mode is enabled or the buffer was saved, but never after -changes to the buffer contents. - -If nil, never check syntax automatically. In this case, use -`flycheck-buffer' to start a syntax check manually." - :group 'flycheck - :type '(set (const :tag "After the buffer was saved" save) - (const :tag "After the buffer was changed and idle" idle-change) - (const - :tag "After switching the current buffer" idle-buffer-switch) - (const :tag "After a new line was inserted" new-line) - (const :tag "After `flycheck-mode' was enabled" mode-enabled)) - :package-version '(flycheck . "0.12") - :safe #'flycheck-symbol-list-p) - -(defcustom flycheck-idle-change-delay 0.5 - "How many seconds to wait after a change before checking syntax. - -After the buffer was changed, Flycheck will wait as many seconds -as the value of this variable before starting a syntax check. If -the buffer is modified during this time, Flycheck will wait -again. - -This variable has no effect, if `idle-change' is not contained in -`flycheck-check-syntax-automatically'." - :group 'flycheck - :type 'number - :package-version '(flycheck . "0.13") - :safe #'numberp) - -(defcustom flycheck-idle-buffer-switch-delay 0.5 - "How many seconds to wait after switching buffers before checking syntax. - -After the user switches to a new buffer, Flycheck will wait as -many seconds as the value of this variable before starting a -syntax check. If the user switches to another buffer during this -time, whether a syntax check is still performed depends on the -value of `flycheck-buffer-switch-check-intermediate-buffers'. - -This variable has no effect if `idle-buffer-switch' is not -contained in `flycheck-check-syntax-automatically'." - :group 'flycheck - :type 'number - :package-version '(flycheck . "32") - :safe #'numberp) - -(defcustom flycheck-buffer-switch-check-intermediate-buffers nil - "Whether to check syntax in a buffer you only visit briefly. - -If nil, then when you switch to a buffer but switch to another -buffer before the syntax check is performed, then the check is -canceled. If non-nil, then syntax checks due to switching -buffers are always performed. This only affects buffer switches -that happen less than `flycheck-idle-buffer-switch-delay' seconds -apart. - -This variable has no effect if `idle-buffer-switch' is not -contained in `flycheck-check-syntax-automatically'." - :group 'flycheck - :type 'boolean - :package-version '(flycheck . "32") - :safe #'booleanp) - -(defcustom flycheck-standard-error-navigation t - "Whether to support error navigation with `next-error'. - -If non-nil, enable navigation of Flycheck errors with -`next-error', `previous-error' and `first-error'. Otherwise, -these functions just navigate errors from compilation modes. - -Flycheck error navigation with `flycheck-next-error', -`flycheck-previous-error' and `flycheck-first-error' is always -enabled, regardless of the value of this variable. - -Note that this setting only takes effect when variable -`flycheck-mode' is non-nil. Changing it will not affect buffers -where variable `flycheck-mode' is already non-nil." - :group 'flycheck - :type 'boolean - :package-version '(flycheck . "0.15") - :safe #'booleanp) - -(define-widget 'flycheck-minimum-level 'lazy - "A radio-type choice of minimum error levels. - -See `flycheck-navigation-minimum-level' and -`flycheck-error-list-minimum-level'." - :type '(radio (const :tag "All locations" nil) - (const :tag "Informational messages" info) - (const :tag "Warnings" warning) - (const :tag "Errors" error) - (symbol :tag "Custom error level"))) - -(defcustom flycheck-navigation-minimum-level nil - "The minimum level of errors to navigate. - -If set to an error level, only navigate errors whose error level -is at least as severe as this one. If nil, navigate all errors." - :group 'flycheck - :type 'flycheck-minimum-level - :safe #'flycheck-error-level-p - :package-version '(flycheck . "0.21")) - -(defcustom flycheck-error-list-minimum-level nil - "The minimum level of errors to display in the error list. - -If set to an error level, only display errors whose error level -is at least as severe as this one in the error list. If nil, -display all errors. - -This is the default level, used when the error list is opened. -You can temporarily change the level using -\\[flycheck-error-list-set-filter], or reset it to this value -using \\[flycheck-error-list-reset-filter]." - :group 'flycheck - :type 'flycheck-minimum-level - :safe #'flycheck-error-level-p - :package-version '(flycheck . "0.24")) - -(defcustom flycheck-relevant-error-other-file-minimum-level 'error - "The minimum level of errors from other files to display in this buffer. - -If set to an error level, only display errors from other files -whose error level is at least as severe as this one. If nil, -display all errors from other files." - :group 'flycheck - :type 'flycheck-minimum-level - :safe #'flycheck-error-level-p - :package-version '(flycheck . "32")) - -(defcustom flycheck-relevant-error-other-file-show t - "Whether to show errors from other files." - :group 'flycheck - :type 'boolean - :package-version '(flycheck . "32") - :safe #'booleanp) - -(defcustom flycheck-completing-read-function #'completing-read - "Function to read from minibuffer with completion. - -The function must be compatible to the built-in `completing-read' -function." - :group 'flycheck - :type '(choice (const :tag "Default" completing-read) - (const :tag "IDO" ido-completing-read) - (function :tag "Custom function")) - :risky t - :package-version '(flycheck . "26")) - -(defcustom flycheck-temp-prefix "flycheck" - "Prefix for temporary files created by Flycheck." - :group 'flycheck - :type 'string - :package-version '(flycheck . "0.19") - :risky t) - -(defcustom flycheck-mode-hook nil - "Hooks to run after command `flycheck-mode' is toggled." - :group 'flycheck - :type 'hook - :risky t) - -(defcustom flycheck-after-syntax-check-hook nil - "Functions to run after each syntax check. - -This hook is run after a syntax check was finished. - -At this point, *all* chained checkers were run, and all errors -were parsed, highlighted and reported. The variable -`flycheck-current-errors' contains all errors from all syntax -checkers run during the syntax check, so you can apply any error -analysis functions. - -Note that this hook does *not* run after each individual syntax -checker in the syntax checker chain, but only after the *last -checker*. - -This variable is a normal hook. See Info node `(elisp)Hooks'." - :group 'flycheck - :type 'hook - :risky t) - -(defcustom flycheck-before-syntax-check-hook nil - "Functions to run before each syntax check. - -This hook is run right before a syntax check starts. - -Error information from the previous syntax check is *not* -cleared before this hook runs. - -Note that this hook does *not* run before each individual syntax -checker in the syntax checker chain, but only before the *first -checker*. - -This variable is a normal hook. See Info node `(elisp)Hooks'." - :group 'flycheck - :type 'hook - :risky t) - -(defcustom flycheck-syntax-check-failed-hook nil - "Functions to run if a syntax check failed. - -This hook is run whenever an error occurs during Flycheck's -internal processing. No information about the error is given to -this hook. - -You should use this hook to conduct additional cleanup actions -when Flycheck failed. - -This variable is a normal hook. See Info node `(elisp)Hooks'." - :group 'flycheck - :type 'hook - :risky t) - -(defcustom flycheck-status-changed-functions nil - "Functions to run if the Flycheck status changed. - -This hook is run whenever the status of Flycheck changes. Each -hook function takes the status symbol as single argument, as -given to `flycheck-report-status', which see. - -This variable is an abnormal hook. See Info -node `(elisp)Hooks'." - :group 'flycheck - :type 'hook - :risky t - :package-version '(flycheck . "0.20")) - -(defcustom flycheck-error-list-after-refresh-hook nil - "Functions to run after the error list was refreshed. - -This hook is run whenever the error list is refreshed. - -This variable is a normal hook. See Info node `(elisp)Hooks'." - :group 'flycheck - :type 'hook - :risky t - :package-version '(flycheck . "0.21")) - -(defface flycheck-error-delimiter - `((t)) - "Flycheck face for errors spanning multiple lines. - -See `flycheck-highlighting-style' for details on when this face -is used." - :package-version '(flycheck . "32") - :group 'flycheck-faces) - -(defface flycheck-delimited-error - `((t)) - "Flycheck face for errors spanning multiple lines. - -See `flycheck-highlighting-style' for details on when this face -is used." - :package-version '(flycheck . "32") - :group 'flycheck-faces) - -(defface flycheck-error - '((((supports :underline (:style wave))) - :underline (:style wave :color "Red1")) - (t - :underline t :inherit error)) - "Flycheck face for errors." - :package-version '(flycheck . "0.13") - :group 'flycheck-faces) - -(defface flycheck-warning - '((((supports :underline (:style wave))) - :underline (:style wave :color "DarkOrange")) - (t - :underline t :inherit warning)) - "Flycheck face for warnings." - :package-version '(flycheck . "0.13") - :group 'flycheck-faces) - -(defface flycheck-info - '((((supports :underline (:style wave))) - :underline (:style wave :color "ForestGreen")) - (t - :underline t :inherit success)) - "Flycheck face for informational messages." - :package-version '(flycheck . "0.15") - :group 'flycheck-faces) - -(defface flycheck-fringe-error - '((t :inherit error)) - "Flycheck face for fringe error indicators." - :package-version '(flycheck . "0.13") - :group 'flycheck-faces) - -(defface flycheck-fringe-warning - '((t :inherit warning)) - "Flycheck face for fringe warning indicators." - :package-version '(flycheck . "0.13") - :group 'flycheck-faces) - -(defface flycheck-fringe-info - ;; Semantically `success' is probably not the right face, but it looks nice as - ;; a base face - '((t :inherit success)) - "Flycheck face for fringe info indicators." - :package-version '(flycheck . "0.15") - :group 'flycheck-faces) - -(defface flycheck-error-list-error - '((t :inherit error)) - "Flycheck face for error messages in the error list." - :package-version '(flycheck . "0.16") - :group 'flycheck-faces) - -(defface flycheck-error-list-warning - '((t :inherit warning)) - "Flycheck face for warning messages in the error list." - :package-version '(flycheck . "0.16") - :group 'flycheck-faces) - -(defface flycheck-error-list-info - '((t :inherit success)) - "Flycheck face for info messages in the error list." - :package-version '(flycheck . "0.16") - :group 'flycheck-faces) - -(defface flycheck-error-list-line-number - '((t)) - "Face for line numbers in the error list." - :group 'flycheck-faces - :package-version '(flycheck . "0.16")) - -(defface flycheck-error-list-column-number - '((t)) - "Face for line numbers in the error list." - :group 'flycheck-faces - :package-version '(flycheck . "0.16")) - -(defface flycheck-error-list-filename - '((t :inherit mode-line-buffer-id :bold nil)) - "Face for filenames in the error list." - :group 'flycheck-faces - :package-version '(flycheck . "32")) - -(defface flycheck-error-list-id - '((t :inherit font-lock-type-face)) - "Face for the error ID in the error list." - :group 'flycheck-faces - :package-version '(flycheck . "0.22")) - -(defface flycheck-error-list-id-with-explainer - '((t :inherit flycheck-error-list-id - :box (:style released-button))) - "Face for the error ID in the error list, for errors that have an explainer." - :group 'flycheck-faces - :package-version '(flycheck . "30")) - -(defface flycheck-error-list-checker-name - '((t :inherit font-lock-function-name-face)) - "Face for the syntax checker name in the error list." - :group 'flycheck-faces - :package-version '(flycheck . "0.21")) - -(defface flycheck-error-list-error-message - '((t)) - "Face for the error message in the error list." - :group 'flycheck-faces - :package-version '(flycheck . "33")) - -(defface flycheck-error-list-highlight - '((t :bold t)) - "Flycheck face to highlight errors in the error list." - :package-version '(flycheck . "0.15") - :group 'flycheck-faces) - -(defface flycheck-verify-select-checker - '((t :box (:style released-button))) - "Flycheck face for the `select' button in the verify setup buffer." - :package-version '(flycheck . "32") - :group 'flycheck-faces) - -(defvar flycheck-command-map - (let ((map (make-sparse-keymap))) - (define-key map "c" #'flycheck-buffer) - (define-key map "C" #'flycheck-clear) - (define-key map (kbd "C-c") #'flycheck-compile) - (define-key map "n" #'flycheck-next-error) - (define-key map "p" #'flycheck-previous-error) - (define-key map "l" #'flycheck-list-errors) - (define-key map (kbd "C-w") #'flycheck-copy-errors-as-kill) - (define-key map "s" #'flycheck-select-checker) - (define-key map "?" #'flycheck-describe-checker) - (define-key map "h" #'flycheck-display-error-at-point) - (define-key map "e" #'flycheck-explain-error-at-point) - (define-key map "H" #'display-local-help) - (define-key map "i" #'flycheck-manual) - (define-key map "V" #'flycheck-version) - (define-key map "v" #'flycheck-verify-setup) - (define-key map "x" #'flycheck-disable-checker) - map) - "Keymap of Flycheck interactive commands.") - -(defcustom flycheck-keymap-prefix (kbd "C-c !") - "Prefix for key bindings of Flycheck. - -Changing this variable outside Customize does not have any -effect. To change the keymap prefix from Lisp, you need to -explicitly re-define the prefix key: - - (define-key flycheck-mode-map flycheck-keymap-prefix nil) - (setq flycheck-keymap-prefix (kbd \"C-c f\")) - (define-key flycheck-mode-map flycheck-keymap-prefix - flycheck-command-map) - -Please note that Flycheck's manual documents the default -keybindings. Changing this variable is at your own risk." - :group 'flycheck - :package-version '(flycheck . "0.19") - :type 'string - :risky t - :set - (lambda (variable key) - (when (and (boundp variable) (boundp 'flycheck-mode-map)) - (define-key flycheck-mode-map (symbol-value variable) nil) - (define-key flycheck-mode-map key flycheck-command-map)) - (set-default variable key))) - -(defcustom flycheck-mode-line '(:eval (flycheck-mode-line-status-text)) - "Mode line lighter for Flycheck. - -The value of this variable is a mode line template as in -`mode-line-format'. See Info Node `(elisp)Mode Line Format' for -more information. Note that it should contain a _single_ mode -line construct only. - -Customize this variable to change how Flycheck reports its status -in the mode line. You may use `flycheck-mode-line-status-text' -to obtain a human-readable status text, including an -error/warning count. - -You may also assemble your own status text. The current status -of Flycheck is available in `flycheck-last-status-change'. The -errors in the current buffer are stored in -`flycheck-current-errors', and the function -`flycheck-count-errors' may be used to obtain the number of -errors grouped by error level. - -Set this variable to nil to disable the mode line completely." - :group 'flycheck - :type 'sexp - :risky t - :package-version '(flycheck . "0.20")) - -(defcustom flycheck-mode-line-color t - "Use colors for Flycheck mode line status." - :group 'flycheck - :type 'boolean - :package-version '(flycheck . "35")) - -(defcustom flycheck-mode-line-prefix "FlyC" - "Base mode line lighter for Flycheck. - -This will have an effect only with the default -`flycheck-mode-line'. - -If you've customized `flycheck-mode-line' then the customized -function must be updated to use this variable." - :group 'flycheck - :type 'string - :package-version '(flycheck . "26")) - -(defcustom flycheck-mode-success-indicator ":0" - "Success indicator appended to `flycheck-mode-line-prefix'." - :group 'flycheck - :type 'string - :package-version '(flycheck . "35")) - -(defcustom flycheck-error-list-mode-line - `(,(propertized-buffer-identification "%12b") - " for buffer " - (:eval (flycheck-error-list-propertized-source-name)) - (:eval (flycheck-error-list-mode-line-filter-indicator))) - "Mode line construct for Flycheck error list. - -The value of this variable is a mode line template as in -`mode-line-format', to be used as -`mode-line-buffer-identification' in `flycheck-error-list-mode'. -See Info Node `(elisp)Mode Line Format' for more information. - -Customize this variable to change how the error list appears in -the mode line. The default shows the name of the buffer and the -name of the source buffer, i.e. the buffer whose errors are -currently listed." - :group 'flycheck - :type 'sexp - :risky t - :package-version '(flycheck . "0.20")) - -(defcustom flycheck-global-modes t - "Modes for which option `flycheck-mode' is turned on. - -If t, Flycheck Mode is turned on for all major modes. If a list, -Flycheck Mode is turned on for all `major-mode' symbols in that -list. If the `car' of the list is `not', Flycheck Mode is turned -on for all `major-mode' symbols _not_ in that list. If nil, -Flycheck Mode is never turned on by command -`global-flycheck-mode'. - -Note that Flycheck is never turned on for modes whose -`mode-class' property is `special' (see Info node `(elisp)Major -Mode Conventions'), regardless of the value of this option. - -Only has effect when variable `global-flycheck-mode' is non-nil." - :group 'flycheck - :type '(choice (const :tag "none" nil) - (const :tag "all" t) - (set :menu-tag "mode specific" :tag "modes" - :value (not) - (const :tag "Except" not) - (repeat :inline t (symbol :tag "mode")))) - :risky t - :package-version '(flycheck . "0.23")) - -;; Add built-in functions to our hooks, via `add-hook', to make sure that our -;; functions are really present, even if the variable was implicitly defined by -;; another call to `add-hook' that occurred before Flycheck was loaded. See -;; https://lists.gnu.org/archive/html/emacs-devel/2015-02/msg01271.html for why -;; we don't initialize the hook variables right away. We append our own -;; functions, because a user likely expects that their functions come first, -;; even if they added them before Flycheck was loaded. -(dolist (hook (list #'flycheck-locate-config-file-by-path - #'flycheck-locate-config-file-ancestor-directories - #'flycheck-locate-config-file-home)) - (add-hook 'flycheck-locate-config-file-functions hook 'append)) - -(add-hook 'flycheck-process-error-functions #'flycheck-add-overlay 'append) - - -;;; Global Flycheck menu -(defvar flycheck-mode-menu-map - (easy-menu-create-menu - "Syntax Checking" - '(["Enable on-the-fly syntax checking" flycheck-mode - :style toggle :selected flycheck-mode - :enable (or flycheck-mode - ;; Don't let users toggle the mode if there is no syntax - ;; checker for this buffer - (seq-find #'flycheck-checker-supports-major-mode-p - flycheck-checkers))] - ["Check current buffer" flycheck-buffer flycheck-mode] - ["Clear errors in buffer" flycheck-clear t] - ["Run checker as compile command" flycheck-compile flycheck-mode] - "---" - ["Go to next error" flycheck-next-error flycheck-mode] - ["Go to previous error" flycheck-previous-error flycheck-mode] - ["Show all errors" flycheck-list-errors flycheck-mode] - "---" - ["Copy messages at point" flycheck-copy-errors-as-kill - (flycheck-overlays-at (point))] - ["Explain error at point" flycheck-explain-error-at-point] - "---" - ["Select syntax checker" flycheck-select-checker flycheck-mode] - ["Disable syntax checker" flycheck-disable-checker flycheck-mode] - ["Set executable of syntax checker" flycheck-set-checker-executable - flycheck-mode] - "---" - ["Describe syntax checker" flycheck-describe-checker t] - ["Verify setup" flycheck-verify-setup t] - ["Show Flycheck version" flycheck-version t] - ["Flycheck quick help" flycheck-quick-help t] - ["Read the Flycheck manual" flycheck-manual t])) - "Menu of command `flycheck-mode'.") - -(easy-menu-add-item nil '("Tools") flycheck-mode-menu-map "Spell Checking") - - - -(defconst flycheck-version "35.0" - "The current version of Flycheck. - -Should be kept in sync with the package version metadata. -Used only when `package-get-function' is not available -or fails.") - -(defun flycheck--pkg-version () - "Extract FLYCHECK's package version from its package metadata." - ;; Use `cond' below to avoid a compiler unused return value warning - ;; when `package-get-version' returns nil. See #3181. - (cond ((fboundp 'package-get-version) - (package-get-version)) - ((fboundp 'pkg-info-version-info) - (pkg-info-version-info 'flycheck)) - (t - flycheck-version))) - -;;; Version information, manual and loading of Flycheck -(defun flycheck-version (&optional show-version) - "Get the Flycheck 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 (flycheck--pkg-version))) - (when show-version - (message "Flycheck version: %s" version)) - version)) - -(defun flycheck-unload-function () - "Unload function for Flycheck." - (global-flycheck-mode -1) - (easy-menu-remove-item nil '("Tools") (cadr flycheck-mode-menu-map)) - (remove-hook 'kill-emacs-hook #'flycheck-global-teardown) - (setq find-function-regexp-alist - (assq-delete-all 'flycheck-checker find-function-regexp-alist))) - -;;;###autoload -(defun flycheck-manual () - "Open the Flycheck manual." - (interactive) - (browse-url "https://www.flycheck.org")) - -;;;###autoload -(defun flycheck-quick-help () - "Display brief Flycheck help." - (interactive) - (with-current-buffer (get-buffer-create "*flycheck-quick-help*") - (with-help-window (current-buffer) - (flycheck-mode) ;; so that we can exapnd \\[flycheck-] - (let ((help - (substitute-command-keys - "Flycheck automatically runs checks on writable files when changed. -Mode line status for the current buffer: - FlyC Not been checked yet - FlyC* Flycheck is running - FlyC:0 Last check resulted in no errors and no warnings - FlyC:3|5 Checker reported three errors and five warnings - FlyC- No checker available - FlyC! The checker crashed - FlyC. The last syntax check was manually interrupted - FlyC? The checker did something unexpected - -Key bindings: - \\[flycheck-buffer] Check current buffer - \\[flycheck-clear] Clear errors in current buffer - \\[flycheck-compile] Run checker as compile command - - \\[flycheck-next-error] Next error - \\[flycheck-previous-error] Previous error - \\[flycheck-list-errors] List all errors - - \\[flycheck-copy-errors-as-kill] Copy error messages at point - \\[flycheck-display-error-at-point] Explain error at point -"))) - (help-mode) - (read-only-mode 0) - (insert help))))) - -(define-obsolete-function-alias 'flycheck-info - 'flycheck-manual "Flycheck 26" "Open the Flycheck manual.") - - -;;; Utility functions -(defun flycheck-sexp-to-string (sexp) - "Convert SEXP to a string. - -Like `prin1-to-string' but ensure that the returned string -is loadable." - (let ((print-quoted t) - (print-length nil) - (print-level nil)) - (prin1-to-string sexp))) - -(defun flycheck-string-to-number-safe (string) - "Safely convert STRING to a number. - -If STRING is of string type and a numeric string, convert STRING -to a number and return it. Otherwise return nil." - (let ((number-re (rx string-start (one-or-more (any digit)) string-end))) - (when (and (stringp string) (string-match-p number-re string)) - (string-to-number string)))) - -(defun flycheck-string-or-nil-p (obj) - "Determine if OBJ is a string or nil." - (or (null obj) (stringp obj))) - -(defun flycheck-string-list-p (obj) - "Determine if OBJ is a list of strings." - (and (listp obj) (seq-every-p #'stringp obj))) - -(defun flycheck-string-or-string-list-p (obj) - "Determine if OBJ is a string or a list of strings." - (or (stringp obj) (flycheck-string-list-p obj))) - -(defun flycheck-symbol-list-p (obj) - "Determine if OBJ is a list of symbols." - (and (listp obj) (seq-every-p #'symbolp obj))) - -(defvar-local flycheck--file-truename-cache nil) - -(defun flycheck--file-truename (file) - "Memoize the result of `file-truename' on (directory-file-name FILE)." - ;; `file-truename' is slow, but alternatives are incomplete, so memoizing is - ;; our best bet. See https://github.com/flycheck/flycheck/pull/1698. - (unless flycheck--file-truename-cache - (setq-local flycheck--file-truename-cache (make-hash-table :test 'equal))) - (or (gethash file flycheck--file-truename-cache) - (puthash file (file-truename (directory-file-name file)) - flycheck--file-truename-cache))) - -(defun flycheck-same-files-p (file-a file-b) - "Determine whether FILE-A and FILE-B refer to the same file. - -Files are the same if (in the order checked) they are equal, or -if they resolve to the same canonical paths." - (or (string= file-a file-b) - (string= (flycheck--file-truename file-a) - (flycheck--file-truename file-b)))) - -(defvar-local flycheck-temporaries nil - "Temporary files and directories created by Flycheck.") - -(defun flycheck-temp-dir-system () - "Create a unique temporary directory. - -Use `flycheck-temp-prefix' as prefix, and add the directory to -`flycheck-temporaries'. - -Return the path of the directory" - (let* ((tempdir (make-temp-file flycheck-temp-prefix 'directory))) - (push tempdir flycheck-temporaries) - tempdir)) - -(defun flycheck-temp-file-system (filename &optional suffix) - "Create a temporary file named after FILENAME. - -If FILENAME is non-nil, this function creates a temporary -directory with `flycheck-temp-dir-system', and creates a file -with the same name as FILENAME in this directory. - -Otherwise this function creates a temporary file starting with -`flycheck-temp-prefix'. If present, SUFFIX is appended; -otherwise, a random suffix is used. The path of the file is -added to `flycheck-temporaries'. - -Return the path of the file." - (let ((tempfile (convert-standard-filename - (if filename - (expand-file-name (file-name-nondirectory filename) - (flycheck-temp-dir-system)) - (make-temp-file flycheck-temp-prefix nil suffix))))) - (push tempfile flycheck-temporaries) - tempfile)) - -(defun flycheck-temp-file-inplace (filename &optional suffix) - "Create an in-place copy of FILENAME. - -Prefix the file with `flycheck-temp-prefix' and add the path of -the file to `flycheck-temporaries'. - -If FILENAME is nil, fall back to `flycheck-temp-file-system' with -the specified SUFFIX. - -Return the path of the file." - (if filename - (let* ((tempname (format "%s_%s" - flycheck-temp-prefix - (file-name-nondirectory filename))) - (tempfile (convert-standard-filename - (expand-file-name tempname - (file-name-directory filename))))) - (push tempfile flycheck-temporaries) - tempfile) - (flycheck-temp-file-system filename suffix))) - -(defun flycheck-temp-directory (checker) - "Return the directory where CHECKER writes temporary files. - -Return nil if the CHECKER does not write temporary files." - (let ((args (flycheck-checker-arguments checker))) - (cond - ((memq 'source args) temporary-file-directory) - ((memq 'source-inplace args) - (if buffer-file-name (file-name-directory buffer-file-name) - temporary-file-directory)) - (t nil)))) - -(defun flycheck-temp-files-writable-p (checker) - "Whether CHECKER can write temporary files. - -If CHECKER has `source' or `source-inplace' in its `:command', -return whether flycheck has the permissions to create the -respective temporary files. - -Return t if CHECKER does not use temporary files." - (let ((dir (flycheck-temp-directory checker))) - (or (not dir) (file-writable-p dir)))) - -(defun flycheck-save-buffer-to-file (file-name) - "Save the contents of the current buffer to FILE-NAME." - (make-directory (file-name-directory file-name) t) - (let ((jka-compr-inhibit t)) - (write-region nil nil file-name nil 0))) - -(defun flycheck-save-buffer-to-temp (temp-file-fn) - "Save buffer to temp file returned by TEMP-FILE-FN. - -Return the name of the temporary file." - (let ((filename (funcall temp-file-fn (buffer-file-name)))) - ;; Do not flush short-lived temporary files onto disk - (let ((write-region-inhibit-fsync t)) - (flycheck-save-buffer-to-file filename)) - filename)) - -(defun flycheck-prepend-with-option (option items &optional prepend-fn) - "Prepend OPTION to each item in ITEMS, using PREPEND-FN. - -Prepend OPTION to each item in ITEMS. - -ITEMS is a list of strings to pass to the syntax checker. OPTION -is the option, as string. PREPEND-FN is a function called to -prepend OPTION to each item in ITEMS. It receives the option and -a single item from ITEMS as argument, and must return a string or -a list of strings with OPTION prepended to the item. If -PREPEND-FN is nil or omitted, use `list'. - -Return a list of strings where OPTION is prepended to each item -in ITEMS using PREPEND-FN. If PREPEND-FN returns a list, it is -spliced into the resulting list." - (unless (stringp option) - (error "Option %S is not a string" option)) - (unless prepend-fn - (setq prepend-fn #'list)) - (let ((prepend - (lambda (item) - (let ((result (funcall prepend-fn option item))) - (cond - ((and (listp result) (seq-every-p #'stringp result)) result) - ((stringp result) (list result)) - (t (error "Invalid result type for option: %S" result))))))) - (apply #'append (seq-map prepend items)))) - -(defun flycheck-find-in-buffer (pattern) - "Find PATTERN in the current buffer. - -Return the result of the first matching group of PATTERN, or nil, -if PATTERN did not match." - (save-excursion - (save-restriction - (widen) - (goto-char (point-min)) - (when (re-search-forward pattern nil 'no-error) - (match-string-no-properties 1))))) - -(defun flycheck-buffer-empty-p (&optional buffer) - "Check whether a BUFFER is empty, defaulting to the current one." - (= (buffer-size buffer) 0)) - -(defun flycheck-buffer-nonempty-p (&optional buffer) - "Check whether a BUFFER is nonempty, defaulting to the current one." - (> (buffer-size buffer) 0)) - -(defun flycheck-ephemeral-buffer-p () - "Determine whether the current buffer is an ephemeral buffer. - -See Info node `(elisp)Buffer Names' for information about -ephemeral buffers." - (string-prefix-p " " (buffer-name))) - -(defun flycheck-encrypted-buffer-p () - "Determine whether the current buffer is an encrypted file. - -See Info node `(epa)Top' for Emacs' interface to encrypted -files." - ;; The EPA file handler sets this variable locally to remember the recipients - ;; of the encrypted file for re-encryption. Hence, a local binding of this - ;; variable is a good indication that the buffer is encrypted. I haven't - ;; found any better indicator anyway. - (local-variable-p 'epa-file-encrypt-to)) - -(defun flycheck-autoloads-file-p () - "Determine whether the current buffer is an autoloads file. - -Autoloads are generated by package.el during installation." - (string-suffix-p "-autoloads.el" (buffer-name))) - -(defun flycheck-in-user-emacs-directory-p (filename) - "Whether FILENAME is in `user-emacs-directory'." - (string-prefix-p (file-name-as-directory - (flycheck--file-truename user-emacs-directory)) - (flycheck--file-truename filename))) - -(defun flycheck-safe-delete (file-or-dir) - "Safely delete FILE-OR-DIR." - (ignore-errors - (if (file-directory-p file-or-dir) - (delete-directory file-or-dir 'recursive) - (delete-file file-or-dir)))) - -(defun flycheck-safe-delete-temporaries () - "Safely delete all temp files and directories of Flycheck. - -Safely delete all files and directories listed in -`flycheck-temporaries' and set the variable's value to nil." - (seq-do #'flycheck-safe-delete flycheck-temporaries) - (setq flycheck-temporaries nil)) - -(defun flycheck-rx-file-name (form) - "Translate the `(file-name)' FORM into a regular expression." - (let ((body (or (cdr form) '((minimal-match - (one-or-more not-newline)))))) - (rx-to-string `(group-n 1 ,@body) t))) - -(defun flycheck-rx-message (form) - "Translate the `(message)' FORM into a regular expression." - (let ((body (or (cdr form) '((one-or-more not-newline))))) - (rx-to-string `(group-n 4 ,@body) t))) - -(defun flycheck-rx-id (form) - "Translate the `(id)' FORM into a regular expression." - (rx-to-string `(group-n 5 ,@(cdr form)) t)) - -(defun flycheck-rx-to-string (form &optional no-group) - "Like `rx-to-string' for FORM, but with special keywords: - -`line' - matches the initial line number. - -`column' - matches the initial column number. - -`end-line' - matches the final line number. - -`end-column' - matches the final column number (exclusive). - - -`(file-name SEXP ...)' - matches the file name. SEXP describes the file name. If no - SEXP is given, use a default body of `(minimal-match - (one-or-more not-newline))'. - -`(message SEXP ...)' - matches the message. SEXP constitutes the body of the - message. If no SEXP is given, use a default body - of `(one-or-more not-newline)'. - -`(id SEXP ...)' - matches an error ID. SEXP describes the ID. - -NO-GROUP is passed to `rx-to-string'. - -See `rx' for a complete list of all built-in `rx' forms." - (let ((rx-constituents - (append - `((file-name flycheck-rx-file-name 0 nil) ;; group 1 - (line . ,(rx (group-n 2 (one-or-more digit)))) - (column . ,(rx (group-n 3 (one-or-more digit)))) - (message flycheck-rx-message 0 nil) ;; group 4 - (id flycheck-rx-id 0 nil) ;; group 5 - (end-line . ,(rx (group-n 6 (one-or-more digit)))) - (end-column . ,(rx (group-n 7 (one-or-more digit))))) - rx-constituents nil))) - (rx-to-string form no-group))) - -(defun flycheck-current-load-file () - "Get the source file currently being loaded. - -Always return the name of the corresponding source file, never -any byte-compiled file. - -Return nil, if the currently loaded file cannot be determined." - (when-let* ((this-file (cond - (load-in-progress load-file-name) - ((bound-and-true-p byte-compile-current-file)) - (t (buffer-file-name)))) - ;; A best guess for the source file of a compiled library. Works - ;; well in most cases, and especially for ELPA packages - (source-file (concat (file-name-sans-extension this-file) - ".el"))) - (when (file-exists-p source-file) - source-file))) - -(defun flycheck-module-root-directory (module &optional file-name) - "Get the root directory for a MODULE in FILE-NAME. - -MODULE is a qualified module name, either a string with -components separated by a dot, or as list of components. -FILE-NAME is the name of the file or directory containing the -module as string. When nil or omitted, defaults to the return -value of function `buffer-file-name'. - -Return the root directory of the module, that is, the directory, -from which FILE-NAME can be reached by descending directories -along each part of MODULE. - -If the MODULE name does not match the directory hierarchy upwards -from FILE-NAME, return the directory containing FILE-NAME. When -FILE-NAME is nil, return `default-directory'." - (let ((file-name (or file-name (buffer-file-name))) - (module-components (if (stringp module) - (split-string module (rx ".")) - (copy-sequence module)))) - (if (and module-components file-name) - (let ((parts (nreverse module-components)) - (base-directory (directory-file-name - (file-name-sans-extension file-name)))) - (while (and parts - (string= (file-name-nondirectory base-directory) - (car parts))) - (pop parts) - (setq base-directory (directory-file-name - (file-name-directory base-directory)))) - (file-name-as-directory base-directory)) - (if file-name - (file-name-directory file-name) - (expand-file-name default-directory))))) - -(cl-defstruct (flycheck-line-cache - (:constructor flycheck-line-cache-new)) - "Cache structure used to speed up `flycheck-goto-line'." - tick point line) - -(defvar-local flycheck--line-cache nil - "Cache used to speed ip `flycheck-goto-line'.") - -(defsubst flycheck--init-line-cache () - "Initialize or reinitialize `flycheck--line-cache'." - (let ((tick (buffer-modified-tick))) - (if flycheck--line-cache - (unless (= (flycheck-line-cache-tick flycheck--line-cache) tick) - (setf (flycheck-line-cache-tick flycheck--line-cache) tick - (flycheck-line-cache-point flycheck--line-cache) 1 - (flycheck-line-cache-line flycheck--line-cache) 1)) - (setq-local flycheck--line-cache - (flycheck-line-cache-new :tick tick :point 1 :line 1))))) - -(defun flycheck-goto-line (line) - "Move point to beginning of line number LINE. - -This function assumes that the current buffer is not narrowed." - (flycheck--init-line-cache) - (goto-char (flycheck-line-cache-point flycheck--line-cache)) - (let ((delta (- line (flycheck-line-cache-line flycheck--line-cache)))) - (when (= 0 (forward-line delta)) - (setf (flycheck-line-cache-point flycheck--line-cache) (point)) - (setf (flycheck-line-cache-line flycheck--line-cache) line)))) - -(defun flycheck-line-column-to-position (line column) - "Return the point closest to LINE, COLUMN on line LINE. - -COLUMN is one-based." - (save-excursion - (flycheck-goto-line line) - (min (+ (point) (1- column)) (line-end-position)))) - -(defun flycheck-line-column-at-point () - "Return the line and column number at point." - (cons (line-number-at-pos) (1+ (- (point) (line-beginning-position))))) - -(defun flycheck-line-column-at-pos (pos) - "Return the line and column number at position POS. - -COLUMN is one-based." - (let ((inhibit-field-text-motion t)) - (save-excursion - (goto-char pos) - (flycheck-line-column-at-point)))) - - -;;; Minibuffer tools -(defvar flycheck-read-checker-history nil - "`completing-read' history of `flycheck-read-checker'.") - -(defun flycheck-completing-read (prompt candidates default &optional history) - "Read a value from the minibuffer. - -Use `flycheck-completing-read-function' to read input from the -minibuffer with completion. - -Show PROMPT and read one of CANDIDATES, defaulting to DEFAULT. -HISTORY is passed to `flycheck-completing-read-function'. - -Note that `flycheck-completing-read-function' may return an empty -string instead of nil, even when \"\" isn't among the candidates. -See `completing-read' for more details." - (funcall flycheck-completing-read-function - prompt candidates nil 'require-match nil history default)) - -(defun flycheck-read-checker (prompt &optional default property candidates) - "Read a flycheck checker from minibuffer with PROMPT and DEFAULT. - -PROMPT is a string to show in the minibuffer as prompt. It -should end with a single space. DEFAULT is a symbol denoting the -default checker to use, if the user did not select any checker. -PROPERTY is a symbol denoting a syntax checker property. If -non-nil, only complete syntax checkers which have a non-nil value -for PROPERTY. CANDIDATES is an optional list of all syntax -checkers available for completion, defaulting to all defined -checkers. If given, PROPERTY is ignored. - -Return the checker as symbol, or DEFAULT if no checker was -chosen. If DEFAULT is nil and no checker was chosen, signal a -`user-error' if the underlying completion system does not provide -a default on its own." - (when (and default (not (flycheck-valid-checker-p default))) - (error "%S is no valid Flycheck checker" default)) - (let* ((candidates (seq-map #'symbol-name - (or candidates - (flycheck-defined-checkers property)))) - (default (and default (symbol-name default))) - (input (flycheck-completing-read - prompt candidates default - 'flycheck-read-checker-history))) - (when (string-empty-p input) - (unless default - (user-error "No syntax checker selected")) - (setq input default)) - (let ((checker (intern input))) - (unless (flycheck-valid-checker-p checker) - (error "%S is not a valid Flycheck syntax checker" checker)) - checker))) - -(defun flycheck-read-error-level (prompt) - "Read an error level from the user with PROMPT. - -Only offers level for which errors currently exist, in addition -to the default levels." - (let* ((levels (seq-map #'flycheck-error-level - (flycheck-error-list-current-errors))) - (levels-with-defaults (append '(info warning error) levels)) - (uniq-levels (seq-uniq levels-with-defaults)) - (level (flycheck-completing-read prompt uniq-levels nil))) - (when (string-empty-p level) (setq level nil)) - (and level (intern level)))) - - -;;; Checker API -(defun flycheck-defined-checkers (&optional property) - "Find all defined syntax checkers, optionally with PROPERTY. - -PROPERTY is a symbol. If given, only return syntax checkers with -a non-nil value for PROPERTY. - -The returned list is sorted alphapetically by the symbol name of -the syntax checkers." - (let (defined-checkers) - (mapatoms (lambda (symbol) - (when (and (flycheck-valid-checker-p symbol) - (or (null property) - (flycheck-checker-get symbol property))) - (push symbol defined-checkers)))) - (sort defined-checkers #'string<))) - -(defun flycheck-registered-checker-p (checker) - "Determine whether CHECKER is registered. - -A checker is registered if it is contained in -`flycheck-checkers'." - (and (flycheck-valid-checker-p checker) - (memq checker flycheck-checkers))) - -(defun flycheck-disabled-checker-p (checker) - "Determine whether CHECKER is disabled, manually or automatically." - (or (flycheck-manually-disabled-checker-p checker) - (flycheck-automatically-disabled-checker-p checker))) - -(defun flycheck-manually-disabled-checker-p (checker) - "Determine whether CHECKER has been manually disabled. - -A checker has been manually disabled if it is contained in -`flycheck-disabled-checkers'." - (memq checker flycheck-disabled-checkers)) - -(defun flycheck-automatically-disabled-checker-p (checker) - "Determine whether CHECKER has been automatically disabled. - -A checker has been automatically disabled if it is contained in -`flycheck--automatically-disabled-checkers'." - (memq checker flycheck--automatically-disabled-checkers)) - - -;;; Generic syntax checkers -(defconst flycheck-generic-checker-version 2 - "The internal version of generic syntax checker declarations. - -Flycheck will not use syntax checkers whose generic version is -less than this constant.") - -(defsubst flycheck--checker-property-name (property) - "Return the SYMBOL property for checker PROPERTY." - (intern (concat "flycheck-" (symbol-name property)))) - -(defun flycheck-checker-get (checker property) - "Get the value of CHECKER's PROPERTY." - (get checker (flycheck--checker-property-name property))) - -(gv-define-setter flycheck-checker-get (value checker property) - `(setf (get ,checker (flycheck--checker-property-name ,property)) ,value)) - -(defun flycheck-validate-next-checker (next &optional strict) - "Validate NEXT checker. - -With STRICT non-nil, also check whether the syntax checker and -the error level in NEXT are valid. Otherwise just check whether -these are symbols. - -Signal an error if NEXT is not a valid entry for -`:next-checkers'." - (when (symbolp next) - (setq next (cons t next))) - (pcase next - (`(,level . ,checker) - (if strict - (progn - (unless (or (eq level t) (flycheck-error-level-p level)) - (error "%S is not a valid Flycheck error level" level)) - (unless (flycheck-valid-checker-p checker) - (error "%s is not a valid Flycheck syntax checker" checker))) - (unless (symbolp level) - (error "Error level %S must be a symbol" level)) - (unless (symbolp checker) - (error "Checker %S must be a symbol" checker)))) - (_ (error "%S must be a symbol or cons cell" next))) - t) - -(defun flycheck-define-generic-checker (symbol docstring &rest properties) - "Define SYMBOL as generic syntax checker. - -Any syntax checker defined with this macro is eligible for manual -syntax checker selection with `flycheck-select-checker'. To make -the new syntax checker available for automatic selection, it must -be registered in `flycheck-checkers'. - -DOCSTRING is the documentation of the syntax checker, for -`flycheck-describe-checker'. The following PROPERTIES constitute -a generic syntax checker. Unless otherwise noted, all properties -are mandatory. - -`:start FUNCTION' - A function to start the syntax checker. - - FUNCTION shall take two arguments and return a context - object if the checker is started successfully. Otherwise it - shall signal an error. - - The first argument is the syntax checker being started. The - second is a callback function to report state changes to - Flycheck. The callback takes two arguments STATUS DATA, - where STATUS is a symbol denoting the syntax checker status - and DATA an optional argument with additional data for the - status report. See `flycheck-report-buffer-checker-status' - for more information about STATUS and DATA. - - FUNCTION may be synchronous or asynchronous, i.e. it may - call the given callback either immediately, or at some later - point (e.g. from a process sentinel). - - A syntax checker _must_ call CALLBACK at least once with a - STATUS that finishes the current syntax checker. Otherwise - Flycheck gets stuck at the current syntax check with this - syntax checker. - - The context object returned by FUNCTION is passed to - `:interrupt'. - -`:interrupt FUNCTION' - A function to interrupt the syntax check. - - FUNCTION is called with the syntax checker and the context - object returned by the `:start' function and shall try to - interrupt the syntax check. The context may be nil, if the - syntax check is interrupted before actually started. - FUNCTION should handle this situation. - - If it cannot interrupt the syntax check, it may either - signal an error or silently ignore the attempt to interrupt - the syntax checker, depending on the severity of the - situation. - - If interrupting the syntax check failed, Flycheck will let - the syntax check continue, but ignore any status reports. - Notably, it won't highlight any errors reported by the - syntax check in the buffer. - - This property is optional. If omitted, Flycheck won't - attempt to interrupt syntax checks with this syntax checker, - and simply ignore their results. - -`:print-doc FUNCTION' - A function to print additional documentation into the Help - buffer of this checker. - - FUNCTION is called when creating the Help buffer for the - syntax checker, with the syntax checker as single argument, - after printing the name of the syntax checker and its modes - and predicate, but before printing DOCSTRING. It may insert - additional documentation into the current buffer. - - The call occurs within `with-help-window'. Hence - `standard-output' points to the current buffer, so you may - use `princ' and friends to add content. Also, the current - buffer is put into Help mode afterwards, which automatically - turns symbols into references, if possible. - - This property is optional. If omitted, no additional - documentation is printed for this syntax checker. - -:verify FUNCTION - A function to verify the checker for the current buffer. - - FUNCTION is called with the syntax checker as single - argument, and shall return a list of - `flycheck-verification-result' objects indicating whether - the syntax checker could be used in the current buffer, and - highlighting potential setup problems. - - This property is optional. If omitted, no additional - verification occurs for this syntax checker. It is however - absolutely recommended that you add a `:verify' function to - your syntax checker, because it will help users to spot - potential setup problems. - -`:modes MODES' - A major mode symbol or a list thereof, denoting major modes - to use this syntax checker in. - - This syntax checker will only be used in buffers whose - `major-mode' is contained in MODES. - - If `:predicate' is also given the syntax checker will only - be used in buffers for which the `:predicate' returns - non-nil. - -`:predicate FUNCTION' - A function to determine whether to use the syntax checker in - the current buffer. - - FUNCTION is called without arguments and shall return - non-nil if this syntax checker shall be used to check the - current buffer. Otherwise it shall return nil. - - If this checker has a `:working-directory' FUNCTION is - called with `default-directory' bound to the checker's - working directory. - - FUNCTION is only called in matching major modes. - - This property is optional. - -`:enabled FUNCTION' - A function to determine whether to use the syntax checker in - the current buffer. - - This property behaves as `:predicate', except that it's only - called the first time a syntax checker is to be used in a buffer. - - FUNCTION is called without arguments and shall return - non-nil if this syntax checker shall be used to check the - current buffer. Otherwise it shall return nil. - - If FUNCTION returns a non-nil value the checker is put in a - whitelist in `flycheck--automatically-enabled-checkers' to - prevent further invocations of `:enabled'. Otherwise it is - disabled via `flycheck--automatically-disabled-checkers' to - prevent any further use of it. - - If this checker has a `:working-directory' FUNCTION is - called with `default-directory' bound to the checker's - working directory. - - FUNCTION is only called in matching major modes. - - This property is optional. - -`:error-filter FUNCTION' - A function to filter the errors returned by this checker. - - FUNCTION is called with the list of `flycheck-error' objects - returned by the syntax checker and shall return another list - of `flycheck-error' objects, which is considered the final - result of this syntax checker. - - FUNCTION is free to add, remove or modify errors, whether in - place or by copying. - - This property is optional. The default filter is - `identity'. - -`:error-explainer FUNCTION' - A function to return an explanation text for errors - generated by this checker. - - FUNCTION is called with a `flycheck-error' object, in the - buffer of that error. It shall return an explanation - message for the error. - - The message can take any of the following forms: - - A string, which will be displayed to the user - - A function (likely a closure), which will be called with - `standard-output' set to a `flycheck-explain-error-mode' - buffer, and should write to it. - - A cons `(url . ,URL), indicating that the explanation can - be found online at URL. - - nil if there is no explanation for this error. - - If URL is provided by the checker, and cannot be composed - from other elements in the `flycheck-error' object, consider - passing the URL via text properties: - - ;; During the error object creation - (put-text-property 0 1 \\='explainer-url .url .check_id) - - ;; In the error-explainer FUNCTION - (let ((id (flycheck-error-id err))) - (and id `(url . ,(get-text-property 0 \\='explainer-url id)))) - - This property is optional. - -`:next-checkers NEXT-CHECKERS' - A list denoting syntax checkers to apply after this syntax - checker, in what we call \"chaining\" of syntax checkers. - - Each ITEM is a cons cell `(LEVEL . CHECKER)'. CHECKER is a - syntax checker to run after this syntax checker. LEVEL is - an error level. CHECKER will only be used if there are no - current errors of at least LEVEL. LEVEL may also be t, in - which case CHECKER is used regardless of the current errors. - - ITEM may also be a syntax checker symbol, which is - equivalent to `(t . ITEM)'. - - Flycheck tries all items in order of declaration, and uses - the first whose LEVEL matches and whose CHECKER is - registered and can be used for the current buffer. - - This feature is typically used to apply more than one syntax - checker to a buffer. For instance, you might first use a - compiler to check a buffer for syntax and type errors, and - then run a linting tool that checks for insecure code, or - questionable style. - - This property is optional. If omitted, it defaults to the - nil, i.e. no other syntax checkers are applied after this - syntax checker. - -`:working-directory FUNCTION' - The value of `default-directory' when invoking `:start'. - - FUNCTION is a function taking the syntax checker as sole - argument. It shall return the absolute path to an existing - directory to use as `default-directory' for `:start' or - nil to fall back to the `default-directory' of the current - buffer. - - This property is optional. If omitted, invoke `:start' - from the `default-directory' of the buffer being checked. - -Signal an error, if any property has an invalid value." - (declare (indent 1) - (doc-string 2)) - (let ((start (plist-get properties :start)) - (interrupt (plist-get properties :interrupt)) - (print-doc (plist-get properties :print-doc)) - (modes (plist-get properties :modes)) - (predicate (plist-get properties :predicate)) - (verify (plist-get properties :verify)) - (enabled (plist-get properties :enabled)) - (filter (or (plist-get properties :error-filter) #'identity)) - (explainer (plist-get properties :error-explainer)) - (next-checkers (plist-get properties :next-checkers)) - (file (flycheck-current-load-file)) - (working-directory (plist-get properties :working-directory))) - - (unless (listp modes) - (setq modes (list modes))) - - (unless (functionp start) - (error ":start %S of syntax checker %s is not a function" start symbol)) - (unless (or (null interrupt) (functionp interrupt)) - (error ":interrupt %S of syntax checker %s is not a function" - interrupt symbol)) - (unless (or (null print-doc) (functionp print-doc)) - (error ":print-doc %S of syntax checker %s is not a function" - print-doc symbol)) - (unless (or (null verify) (functionp verify)) - (error ":verify %S of syntax checker %S is not a function" - verify symbol)) - (unless (or (null enabled) (functionp enabled)) - (error ":enabled %S of syntax checker %S is not a function" - enabled symbol)) - (unless modes - (error "Missing :modes in syntax checker %s" symbol)) - (dolist (mode modes) - (unless (symbolp mode) - (error "Invalid :modes %s in syntax checker %s, %s must be a symbol" - modes symbol mode))) - (unless (or (null predicate) (functionp predicate)) - (error ":predicate %S of syntax checker %s is not a function" - predicate symbol)) - (unless (functionp filter) - (error ":error-filter %S of syntax checker %s is not a function" - filter symbol)) - (unless (or (null explainer) (functionp explainer)) - (error ":error-explainer %S of syntax checker %S is not a function" - explainer symbol)) - (dolist (checker next-checkers) - (flycheck-validate-next-checker checker)) - - (let ((real-predicate - (and predicate - (lambda () - ;; Run predicate in the checker's default directory - (let ((default-directory - (flycheck-compute-working-directory symbol))) - (funcall predicate))))) - (real-enabled - (lambda () - (if (flycheck-valid-checker-p symbol) - (or (null enabled) - ;; Run enabled in the checker's default directory - (let ((default-directory - (flycheck-compute-working-directory symbol))) - (funcall enabled))) - (lwarn 'flycheck - :warning "%S is no valid Flycheck syntax checker. -Try to reinstall the package defining this syntax checker." symbol) - nil)))) - (pcase-dolist (`(,prop . ,value) - `((start . ,start) - (interrupt . ,interrupt) - (print-doc . ,print-doc) - (modes . ,modes) - (predicate . ,real-predicate) - (verify . ,verify) - (enabled . ,real-enabled) - (error-filter . ,filter) - (error-explainer . ,explainer) - (next-checkers . ,next-checkers) - (documentation . ,docstring) - (file . ,file) - (working-directory . ,working-directory))) - (setf (flycheck-checker-get symbol prop) value))) - - ;; Track the version, to avoid breakage if the internal format changes - (setf (flycheck-checker-get symbol 'generic-checker-version) - flycheck-generic-checker-version))) - -(defun flycheck-valid-checker-p (checker) - "Check whether a CHECKER is valid. - -A valid checker is a symbol defined as syntax checker with -`flycheck-define-checker'." - (and (symbolp checker) - (= (or (get checker 'flycheck-generic-checker-version) 0) - flycheck-generic-checker-version))) - -(defun flycheck-checker-supports-major-mode-p (checker &optional mode) - "Whether CHECKER supports the given major MODE. - -CHECKER is a syntax checker symbol and MODE a major mode symbol. -Look at the `modes' property of CHECKER to determine whether -CHECKER supports buffers in the given major MODE. - -MODE defaults to the value of `major-mode' if omitted or nil. - -Return non-nil if CHECKER supports MODE and nil otherwise." - (let ((mode (or mode major-mode))) - (memq mode (flycheck-checker-get checker 'modes)))) - -(define-obsolete-variable-alias 'flycheck-enabled-checkers - 'flycheck--automatically-enabled-checkers "32") - -(defvar flycheck--automatically-enabled-checkers nil - "Syntax checkers included in automatic selection. - -A list of Flycheck syntax checkers included in automatic -selection for the current buffer.") -(make-variable-buffer-local 'flycheck--automatically-enabled-checkers) - -(defun flycheck-may-enable-checker (checker) - "Whether a generic CHECKER may be enabled for current buffer. - -Return non-nil if CHECKER may be used for the current buffer, and -nil otherwise. The result of the `:enabled' check, if any, is -cached." - (and - ;; May only enable valid checkers - (flycheck-valid-checker-p checker) - ;; Don't run the :enabled check if the checker is already disabled… - (not (flycheck-disabled-checker-p checker)) - (or - ;; …or if we've already cached the result - (memq checker flycheck--automatically-enabled-checkers) - (let* ((enabled (flycheck-checker-get checker 'enabled)) - (may-enable (or (null enabled) (funcall enabled)))) - ;; Cache the result - (if may-enable - (cl-pushnew checker flycheck--automatically-enabled-checkers) - (cl-pushnew checker flycheck--automatically-disabled-checkers)) - may-enable)))) - -(defun flycheck-reset-enabled-checker (checker) - "Reset the `:enabled' test of CHECKER. - -Forget that CHECKER has been enabled or automatically disabled -from a previous `:enabled' test. The result of the `:enabled' -test is cached in `flycheck-may-enable-checker': if you wish to -test the `:enabled' predicate again, you must first reset its -state using this function." - (when (memq checker flycheck--automatically-disabled-checkers) - (setq flycheck--automatically-disabled-checkers - (remq checker flycheck--automatically-disabled-checkers))) - (when (memq checker flycheck--automatically-enabled-checkers) - (setq flycheck--automatically-enabled-checkers - (remq checker flycheck--automatically-enabled-checkers))) - (flycheck-buffer)) - -(defun flycheck-may-use-checker (checker) - "Whether a generic CHECKER may be used. - -Return non-nil if CHECKER may be used for the current buffer, and -nil otherwise." - (let ((predicate (flycheck-checker-get checker 'predicate))) - (and (flycheck-valid-checker-p checker) - (flycheck-checker-supports-major-mode-p checker) - (flycheck-may-enable-checker checker) - (or (null predicate) (funcall predicate))))) - -(defun flycheck-may-use-next-checker (next-checker) - "Determine whether NEXT-CHECKER may be used." - (when (symbolp next-checker) - (push t next-checker)) - (let ((level (car next-checker)) - (next-checker (cdr next-checker))) - (and (or (eq level t) - (flycheck-has-max-current-errors-p level)) - (flycheck-registered-checker-p next-checker) - (flycheck-may-use-checker next-checker)))) - - -;;; Help for generic syntax checkers -(define-button-type 'help-flycheck-checker-def - :supertype 'help-xref - 'help-function #'flycheck-goto-checker-definition - 'help-echo "mouse-1, RET: find Flycheck checker definition") - -(defconst flycheck-find-checker-regexp - (rx line-start (zero-or-more (syntax whitespace)) - "(" symbol-start - (or "flycheck-define-checker" "flycheck-define-command-checker") - symbol-end - (eval (list 'regexp find-function-space-re)) - (? "'") - symbol-start "%s" symbol-end - (or (syntax whitespace) line-end)) - "Regular expression to find a checker definition.") - -(add-to-list 'find-function-regexp-alist - '(flycheck-checker . flycheck-find-checker-regexp)) - -(defun flycheck-goto-checker-definition (checker file) - "Go to to the definition of CHECKER in FILE." - (let ((location (find-function-search-for-symbol - checker 'flycheck-checker file))) - (pop-to-buffer (car location)) - (if (cdr location) - (goto-char (cdr location)) - (message "Unable to find checker location in file")))) - -(defun flycheck-checker-at-point () - "Return the Flycheck checker found at or before point. - -Return nil if there is no checker." - (let ((symbol (variable-at-point 'any-symbol))) - (when (flycheck-valid-checker-p symbol) - symbol))) - -(defun flycheck-describe-checker (checker) - "Display the documentation of CHECKER. - -CHECKER is a checker symbol. - -Pop up a help buffer with the documentation of CHECKER." - (interactive - (let* ((enable-recursive-minibuffers t) - (default (or (flycheck-checker-at-point) - (ignore-errors (flycheck-get-checker-for-buffer)))) - (prompt (if default - (format "Describe syntax checker (default %s): " default) - "Describe syntax checker: "))) - (list (flycheck-read-checker prompt default)))) - (unless (flycheck-valid-checker-p checker) - (user-error "You didn't specify a Flycheck syntax checker")) - (let ((filename (flycheck-checker-get checker 'file)) - (modes (flycheck-checker-get checker 'modes)) - (predicate (flycheck-checker-get checker 'predicate)) - (print-doc (flycheck-checker-get checker 'print-doc)) - (next-checkers (flycheck-checker-get checker 'next-checkers)) - (help-xref-following - ;; Ensure that we don't reuse buffers like `flycheck-verify-checker', - ;; and that we don't error out if a `help-flycheck-checker-doc' button - ;; is added outside of a documentation window. - (and help-xref-following (eq major-mode 'help-mode)))) - (help-setup-xref (list #'flycheck-describe-checker checker) - (called-interactively-p 'interactive)) - (save-excursion - (with-help-window (help-buffer) - (princ (format "%s is a Flycheck syntax checker" checker)) - (when filename - (princ (format " in `%s'" (file-name-nondirectory filename))) - (with-current-buffer standard-output - (save-excursion - (re-search-backward "`\\([^`']+\\)'" nil t) - (help-xref-button 1 'help-flycheck-checker-def - checker filename)))) - (princ ".\n\n") - - (let ((modes-start (with-current-buffer standard-output (point-max)))) - ;; Track the start of the modes documentation, to properly re-fill - ;; it later - (princ " This syntax checker checks syntax in the major mode(s) ") - (princ (string-join - (seq-map (apply-partially #'format "`%s'") modes) - ", ")) - (when predicate - (princ ", and uses a custom predicate")) - (princ ".") - (when next-checkers - (princ " It runs the following checkers afterwards:")) - (with-current-buffer standard-output - (save-excursion - (fill-region-as-paragraph modes-start (point-max)))) - (princ "\n") - - ;; Print the list of next checkers - (when next-checkers - (princ "\n") - (let ((beg-checker-list (with-current-buffer standard-output - (point)))) - (dolist (next-checker next-checkers) - (if (symbolp next-checker) - (princ (format " * `%s'\n" next-checker)) - (princ (format " * `%s' (maximum level `%s')\n" - (cdr next-checker) (car next-checker))))) - ;; - (with-current-buffer standard-output - (save-excursion - (while (re-search-backward "`\\([^`']+\\)'" - beg-checker-list t) - (let ((checker (intern-soft (match-string 1)))) - (when (flycheck-valid-checker-p checker) - (help-xref-button 1 'help-flycheck-checker-doc - checker))))))))) - ;; Call the custom print-doc function of the checker, if present - (when print-doc - (funcall print-doc checker)) - ;; Ultimately, print the docstring - (princ "\nDocumentation:\n") - (princ (flycheck-checker-get checker 'documentation)))))) - - -;;; Syntax checker verification -(cl-defstruct (flycheck-verification-result - (:constructor flycheck-verification-result-new)) - "Structure for storing a single verification result. - -Slots: - -`label' - A label for this result, as string - -`message' - A message for this result, as string - -`face' - The face to use for the `message'. - - You can either use a face symbol, or a list of face symbols." - label message face) - -(defun flycheck-verify-generic-checker (checker) - "Verify a generic CHECKER in the current buffer. - -Return a list of `flycheck-verification-result' objects." - (let (results - (predicate (flycheck-checker-get checker 'predicate)) - (enabled (flycheck-checker-get checker 'enabled)) - (verify (flycheck-checker-get checker 'verify))) - (when enabled - (let ((result (funcall enabled))) - (push (flycheck-verification-result-new - :label (propertize "may enable" 'help-echo ":enable") - :message (if result "yes" "no") - :face (if result 'success '(bold warning))) - results))) - (when predicate - (let ((result (funcall predicate))) - (push (flycheck-verification-result-new - :label (propertize "may run" 'help-echo ":predicate") - :message (prin1-to-string (not (null result))) - :face (if result 'success '(bold warning))) - results))) - (append (nreverse results) - (and verify (funcall verify checker))))) - -(define-button-type 'help-flycheck-checker-doc - :supertype 'help-xref - 'help-function #'flycheck-describe-checker - 'help-echo "mouse-1, RET: describe Flycheck checker") - -(define-button-type 'flycheck-button - 'follow-link t - 'action (lambda (pos) - (apply (get-text-property pos 'flycheck-action) - (get-text-property pos 'flycheck-data)) - ;; Revert the verify-setup buffer since it is now stale - (revert-buffer)) - 'face 'flycheck-verify-select-checker) - -(define-button-type 'flycheck-checker-select - :supertype 'flycheck-button - 'flycheck-action (lambda (buffer checker) - (with-current-buffer buffer - (flycheck-select-checker checker))) - 'help-echo "mouse-1, RET: select this checker") - -(define-button-type 'flycheck-checker-enable - :supertype 'flycheck-button - 'flycheck-action (lambda (buffer checker) - (interactive) - (with-current-buffer buffer - (flycheck--toggle-checker checker t) - (flycheck-buffer))) - 'help-echo "mouse-1, RET: re-enable this checker in this buffer") - -(define-button-type 'flycheck-checker-reset-enabled - :supertype 'flycheck-button - 'flycheck-action (lambda (buffer checker) - (with-current-buffer buffer - (flycheck-reset-enabled-checker checker))) - 'help-echo "mouse-1, RET: try to re-enable this checker") - -(defun flycheck--verify-princ-checker (checker buffer - &optional with-mm with-select) - "Print verification result of CHECKER for BUFFER. - -When WITH-MM is given and non-nil, also include the major mode -into the verification results. - -When WITH-SELECT is non-nil, add a button to select this checker." - (princ " ") - (insert-button (symbol-name checker) - 'type 'help-flycheck-checker-doc - 'help-args (list checker)) - (cond - ((with-current-buffer buffer - (flycheck-manually-disabled-checker-p checker)) - (insert (propertize " (manually disabled) " 'face '(bold error))) - (insert-text-button "enable" - 'type 'flycheck-checker-enable - 'flycheck-data (list buffer checker))) - ((with-current-buffer buffer - (flycheck-automatically-disabled-checker-p checker)) - (insert (propertize " (automatically disabled) " 'face '(bold error))) - (insert-text-button "reset" - 'type 'flycheck-checker-reset-enabled - 'flycheck-data (list buffer checker)))) - (when (eq checker (buffer-local-value 'flycheck-checker buffer)) - (insert (propertize " (explicitly selected)" 'face 'bold))) - (when with-select - (princ " ") - (insert-text-button "select" - 'type 'flycheck-checker-select - 'flycheck-data (list buffer checker))) - (princ "\n") - (let ((results (with-current-buffer buffer - (append (flycheck-verify-generic-checker checker) - (flycheck--verify-next-checkers checker))))) - (when with-mm - (with-current-buffer buffer - (let ((message-and-face - (if (flycheck-checker-supports-major-mode-p checker) - (cons (format "`%s' supported" major-mode) 'success) - (cons (format "`%s' not supported" major-mode) 'error)))) - (push (flycheck-verification-result-new - :label "major mode" - :message (car message-and-face) - :face (cdr message-and-face)) - results)))) - (let* ((label-length - (seq-max (mapcar - (lambda (res) - (length (flycheck-verification-result-label res))) - results))) - (message-column (+ 8 label-length))) - (dolist (result results) - (princ " - ") - (princ (flycheck-verification-result-label result)) - (princ ": ") - (princ (make-string (- message-column (current-column)) ?\ )) - (let ((message (flycheck-verification-result-message result)) - (face (flycheck-verification-result-face result))) - ;; If face is nil, using propertize erases the face already contained - ;; by the message. We don't want that, since this would remove the - ;; button face from the checker chain result. - (insert (if face (propertize message 'face face) message))) - (princ "\n")))) - (princ "\n")) - -(defun flycheck--get-next-checker-symbol (next) - "Get the checker symmbol of NEXT checker. - -NEXT should be either a cons (NEXT-CHECKER . LEVEL) or a -symbol." - (if (consp next) (cdr next) next)) - -(defun flycheck-get-next-checkers (checker) - "Return the immediate next checkers of CHECKER. - -This is a list of checker symbols. The error levels of the -`:next-checker' property are ignored." - (mapcar #'flycheck--get-next-checker-symbol - (flycheck-checker-get checker 'next-checkers))) - -(defun flycheck-all-next-checkers (checker) - "Return all checkers that may follow CHECKER. - -Return the transitive closure of the next-checker relation. The -return value is a list of checkers, not including CHECKER." - (let ((next-checkers) - (visited) - (queue (list checker))) - (while queue - (let ((c (pop queue))) - (push c visited) - (dolist (n (flycheck-get-next-checkers c)) - (push n next-checkers) - (unless (memq n visited) - (cl-pushnew n queue))))) - (seq-uniq next-checkers))) - -(defun flycheck--verify-next-checkers (checker) - "Return a verification result for the next checkers of CHECKER." - (when-let (next (flycheck-get-next-checkers checker)) - (list - (flycheck-verification-result-new - :label "next checkers" - ;; We use `make-text-button' to preserve the button properties in the - ;; string - :message (mapconcat - (lambda (checker) - (make-text-button (symbol-name checker) nil - 'type 'help-flycheck-checker-doc - 'help-args (list checker))) - next - ", "))))) - -(defun flycheck--verify-print-header (desc buffer) - "Print a title with DESC for BUFFER in the current buffer. - -DESC is an arbitrary string containing a description, and BUFFER -is the buffer being verified. The name and the major mode mode -of BUFFER are printed. - -DESC and information about BUFFER are printed in the current -buffer." - (princ desc) - (insert (propertize (buffer-name buffer) 'face 'bold)) - (princ " in ") - (let ((mode (buffer-local-value 'major-mode buffer))) - (insert-button (symbol-name mode) - 'type 'help-function - 'help-args (list mode))) - (princ ":\n\n")) - -(defun flycheck--verify-print-footer (buffer) - "Print a footer for BUFFER in the current buffer. - -BUFFER is the buffer being verified." - (princ "Flycheck Mode is ") - (let ((enabled (buffer-local-value 'flycheck-mode buffer))) - (insert (propertize (if enabled "enabled" "disabled") - 'face (if enabled 'success '(warning bold))))) - (princ - (with-current-buffer buffer - ;; Use key binding state in the verified buffer to print the help. - (substitute-command-keys - ". Use \\[universal-argument] \\[flycheck-disable-checker] \ -to enable disabled checkers."))) - (save-excursion - (let ((end (point))) - (backward-paragraph) - (fill-region-as-paragraph (point) end))) - - (princ "\n\n--------------------\n\n") - (princ (format "Flycheck version: %s\n" (flycheck--pkg-version))) - (princ (format "Emacs version: %s\n" emacs-version)) - (princ (format "System: %s\n" system-configuration)) - (princ (format "Window system: %S\n" window-system))) - -(define-derived-mode flycheck-verify-mode help-mode - "Flycheck verification" - "Major mode to display Flycheck verification results." - ;; `help-mode-finish' will restore `buffer-read-only' - (setq buffer-read-only nil)) - -(defun flycheck-verify-checker (checker) - "Check whether a CHECKER can be used in this buffer. - -Show a buffer listing possible problems that prevent CHECKER from -being used for the current buffer. - -Note: Do not use this function to check whether a syntax checker -is applicable from Emacs Lisp code. Use -`flycheck-may-use-checker' instead." - (interactive (list (flycheck-read-checker "Checker to verify: "))) - (unless (flycheck-valid-checker-p checker) - (user-error "%s is not a syntax checker" checker)) - - ;; Save the buffer to make sure that all predicates are good - ;; FIXME: this may be surprising to users, with unintended side-effects. - (when (and (buffer-file-name) (buffer-modified-p)) - (save-buffer)) - - (let ((buffer (current-buffer))) - (with-help-window "*Flycheck checker*" - (with-current-buffer standard-output - (flycheck-verify-mode) - (flycheck--verify-print-header "Syntax checker in buffer " buffer) - (flycheck--verify-princ-checker checker buffer 'with-mm) - (if (with-current-buffer buffer (flycheck-may-use-checker checker)) - (insert (propertize - "Flycheck can use this syntax checker for this buffer.\n" - 'face 'success)) - (insert (propertize - "Flycheck cannot use this syntax checker for this buffer.\n" - 'face 'error))) - (insert "\n") - (flycheck--verify-print-footer buffer))))) - -(defun flycheck-verify-setup () - "Check whether Flycheck can be used in this buffer. - -Display a new buffer listing all syntax checkers that could be -applicable in the current buffer. For each syntax checkers, -possible problems are shown." - (interactive) - ;; Save to make sure checkers that only work on saved buffers will pass the - ;; verification - (when (and (buffer-file-name) (buffer-modified-p)) - (save-buffer)) - - (let* ((buffer (current-buffer)) - (first-checker (flycheck-get-checker-for-buffer)) - (valid-checkers - (remq first-checker - (seq-filter #'flycheck-may-use-checker flycheck-checkers))) - (valid-next-checkers - (when first-checker - (seq-intersection valid-checkers - (flycheck-all-next-checkers first-checker)))) - (valid-remaining (seq-difference valid-checkers valid-next-checkers)) - (other-checkers - (seq-difference (seq-filter #'flycheck-checker-supports-major-mode-p - flycheck-checkers) - (cons first-checker valid-checkers)))) - - ;; Print all applicable checkers for this buffer - (with-help-window "*Flycheck checkers*" - (with-current-buffer standard-output - (flycheck-verify-mode) - - (flycheck--verify-print-header "Syntax checkers for buffer " buffer) - - (if first-checker - (progn - (princ "First checker to run:\n\n") - (flycheck--verify-princ-checker first-checker buffer)) - (insert (propertize - "No checker to run in this buffer.\n\n" - 'face '(bold error)))) - - (when valid-next-checkers - (princ - "Checkers that may run as part of the first checker's chain:\n\n") - (dolist (checker valid-next-checkers) - (flycheck--verify-princ-checker checker buffer))) - - (when valid-remaining - (princ "Checkers that could run if selected:\n\n") - (dolist (checker valid-remaining) - (flycheck--verify-princ-checker checker buffer nil 'with-select))) - - (when other-checkers - (princ - "Checkers that are compatible with this mode, \ -but will not run until properly configured:\n\n") - (dolist (checker other-checkers) - (flycheck--verify-princ-checker checker buffer))) - - ;; If we have no checkers at all, that's worth mentioning - (unless (or first-checker valid-checkers other-checkers) - (insert (propertize - "No checkers are available for this buffer.\n\n" - 'face '(bold error)))) - - (let ((unregistered-checkers - (seq-difference (flycheck-defined-checkers) flycheck-checkers))) - (when unregistered-checkers - (insert (propertize - "The following syntax checkers are not registered:\n" - 'face '(bold warning))) - (dolist (checker unregistered-checkers) - (princ " - ") - (princ checker) - (princ "\n")) - (princ - "Try adding these syntax checkers to `flycheck-checkers'.\n\n"))) - - (flycheck--verify-print-footer buffer) - - (setq-local revert-buffer-function - (lambda (_ignore-auto _noconfirm) - (with-current-buffer buffer (flycheck-verify-setup)))))))) - - -;;; Predicates for generic syntax checkers -(defun flycheck-buffer-saved-p (&optional buffer) - "Determine whether BUFFER is saved to a file. - -BUFFER is the buffer to check. If omitted or nil, use the -current buffer as BUFFER. - -Return non-nil if the BUFFER is backed by a file, and not -modified, or nil otherwise." - (let ((file-name (buffer-file-name buffer))) - (and file-name (file-exists-p file-name) (not (buffer-modified-p buffer))))) - - -;;; Extending generic checkers -(defun flycheck-remove-next-checker (checker next) - "After CHECKER remove a NEXT checker. - -CHECKER is a syntax checker symbol, from which to remove NEXT -checker. - -NEXT is a cons or a symbol, as documented in -`flycheck-add-next-checker'." - (unless (flycheck-valid-checker-p checker) - (error "%s is not a valid syntax checker" checker)) - (let* ((next-symbol (flycheck--get-next-checker-symbol next))) - (setf - (flycheck-checker-get checker 'next-checkers) - (seq-remove - (lambda (next) (eq (flycheck--get-next-checker-symbol next) next-symbol)) - (flycheck-checker-get checker 'next-checkers))))) - -(defun flycheck-add-next-checker (checker next &optional append) - "After CHECKER add a NEXT checker. - -CHECKER is a syntax checker symbol, to which to add NEXT checker. - -NEXT is a cons cell `(LEVEL . NEXT-CHECKER)'. NEXT-CHECKER is a -symbol denoting the syntax checker to run after CHECKER. LEVEL -is an error level. NEXT-CHECKER will only be used if there is no -current error whose level is more severe than LEVEL. LEVEL may -also be t, in which case NEXT-CHECKER is used regardless of the -current errors. - -NEXT can also be a syntax checker symbol only, which is -equivalent to `(t . NEXT)'. - -NEXT-CHECKER is prepended before other next checkers, unless -APPEND is non-nil." - (unless (flycheck-valid-checker-p checker) - (error "%s is not a valid syntax checker" checker)) - (flycheck-validate-next-checker next 'strict) - (flycheck-remove-next-checker checker next) - (let ((next-checkers (flycheck-checker-get checker 'next-checkers))) - (setf (flycheck-checker-get checker 'next-checkers) - (if append (append next-checkers (list next)) - (cons next next-checkers))))) - -(defun flycheck-add-mode (checker mode) - "To CHECKER add a new major MODE. - -CHECKER and MODE are symbols denoting a syntax checker and a -major mode respectively. - -Add MODE to the `:modes' property of CHECKER, so that CHECKER -will be used in buffers with MODE." - (unless (flycheck-valid-checker-p checker) - (error "%s is not a valid syntax checker" checker)) - (unless (symbolp mode) - (error "%s is not a symbol" mode)) - (push mode (flycheck-checker-get checker 'modes))) - - -;;; Generic syntax checks -(cl-defstruct (flycheck-syntax-check - (:constructor flycheck-syntax-check-new)) - "Structure for storing syntax check state. - -Slots: - -`buffer' - The buffer being checked. - -`checker' - The syntax checker being used. - -`context' - The context object. - -`working-directory' - Working directory for the syntax checker. Serve as a value for - `default-directory' for a checker." - buffer checker context working-directory) - -(defun flycheck-syntax-check-start (syntax-check callback) - "Start a SYNTAX-CHECK with CALLBACK." - (let ((checker (flycheck-syntax-check-checker syntax-check)) - (default-directory - (flycheck-syntax-check-working-directory syntax-check))) - (setf (flycheck-syntax-check-context syntax-check) - (funcall (flycheck-checker-get checker 'start) checker callback)))) - -(defun flycheck-syntax-check-interrupt (syntax-check) - "Interrupt a SYNTAX-CHECK." - (let* ((checker (flycheck-syntax-check-checker syntax-check)) - (interrupt-fn (flycheck-checker-get checker 'interrupt)) - (context (flycheck-syntax-check-context syntax-check))) - (when interrupt-fn - (funcall interrupt-fn checker context)))) - - -;;; Syntax checking mode - -(defvar flycheck-mode-map - (let ((map (make-sparse-keymap))) - (define-key map flycheck-keymap-prefix flycheck-command-map) - ;; We place the menu under a custom menu key. Since this menu key is not - ;; present in the menu of the global map, no top-level menu entry is added - ;; to the global menu bar. However, it still appears on the mode line - ;; lighter. - (define-key map [menu-bar flycheck] flycheck-mode-menu-map) - map) - "Keymap of command `flycheck-mode'.") - -(defvar-local flycheck-old-next-error-function nil - "Remember the old `next-error-function'.") - -(defconst flycheck-hooks-alist - '( - ;; Handle events that may start automatic syntax checks - (after-save-hook . flycheck-handle-save) - (after-change-functions . flycheck-handle-change) - ;; Handle events that may triggered pending deferred checks - (window-configuration-change-hook . flycheck-perform-deferred-syntax-check) - (post-command-hook . flycheck-perform-deferred-syntax-check) - ;; Teardown Flycheck whenever the buffer state is about to get lost, to - ;; clean up temporary files and directories. - (kill-buffer-hook . flycheck-teardown) - (change-major-mode-hook . flycheck-teardown) - (before-revert-hook . flycheck-teardown) - ;; Update the error list if necessary - (post-command-hook . flycheck-error-list-update-source) - (post-command-hook . flycheck-error-list-highlight-errors) - ;; Display errors. Show errors at point after commands (like movements) and - ;; when Emacs gets focus. Cancel the display timer when Emacs looses focus - ;; (as there's no need to display errors if the user can't see them), and - ;; hide the error buffer (for large error messages) if necessary. Note that - ;; the focus hooks only work on Emacs 24.4 and upwards, but since undefined - ;; hooks are perfectly ok we don't need a version guard here. They'll just - ;; not work silently. - (post-command-hook . flycheck-display-error-at-point-soon) - (focus-in-hook . flycheck-display-error-at-point-soon) - (focus-out-hook . flycheck-cancel-error-display-error-at-point-timer) - (post-command-hook . flycheck-hide-error-buffer) - ;; Immediately show error popups when navigating to an error - (next-error-hook . flycheck-display-error-at-point)) - "Hooks which Flycheck needs to hook in. - -The `car' of each pair is a hook variable, the `cdr' a function -to be added or removed from the hook variable if Flycheck mode is -enabled and disabled respectively.") - -;;;###autoload -(define-minor-mode flycheck-mode - "Flycheck is a minor mode for on-the-fly syntax checking. - -In `flycheck-mode' the buffer is automatically syntax-checked -using the first suitable syntax checker from `flycheck-checkers'. -Use `flycheck-select-checker' to select a checker for the current -buffer manually. - -If you run into issues, use `\\[flycheck-verify-setup]' to get help. - -Flycheck supports many languages out of the box, and many -additional ones are available on MELPA. Adding new ones is very -easy. Complete documentation is available online at URL -`https://www.flycheck.org/en/latest/'. Please report issues and -request features at URL `https://github.com/flycheck/flycheck'. - -Flycheck displays its status in the mode line. In the default -configuration, it looks like this: - -`FlyC' This buffer has not been checked yet. -`FlyC*' Flycheck is running. Expect results soon! -`FlyC:0' Last check resulted in no errors and no warnings. -`FlyC:3|5' This buffer contains three errors and five warnings. - Use `\\[flycheck-list-errors]' to see the list. -`FlyC-' Flycheck doesn't have a checker for this buffer. - -You may also see the following icons: -`FlyC!' The checker crashed. -`FlyC.' The last syntax check was manually interrupted. -`FlyC?' The checker did something unexpected, like exiting with 1 - but returning no errors. - -The following keybindings are available in `flycheck-mode': - -\\{flycheck-mode-map} -\(you can change the prefix by customizing -`flycheck-keymap-prefix') - -If called interactively, enable Flycheck mode if ARG is positive, -and disable it if ARG is zero or negative. If called from Lisp, -also enable the mode if ARG is omitted or nil, and toggle it if -ARG is ‘toggle’; disable the mode otherwise." - :init-value nil - :keymap flycheck-mode-map - :lighter flycheck-mode-line - :after-hook (flycheck-buffer-automatically 'mode-enabled 'force-deferred) - (cond - (flycheck-mode - (flycheck-clear) - - (pcase-dolist (`(,hook . ,fn) (reverse flycheck-hooks-alist)) - (add-hook hook fn nil 'local)) - - (setq flycheck-old-next-error-function - (if flycheck-standard-error-navigation - next-error-function - :unset)) - (when flycheck-standard-error-navigation - (setq next-error-function #'flycheck-next-error-function)) - - ;; This hook must be added globally since otherwise we cannot - ;; detect a change from a buffer where Flycheck is enabled to a - ;; buffer where Flycheck is not enabled, and therefore cannot - ;; notice that there has been any change when the user switches - ;; back to the buffer where Flycheck is enabled. - (add-hook 'buffer-list-update-hook #'flycheck-handle-buffer-switch)) - (t - (unless (eq flycheck-old-next-error-function :unset) - (setq next-error-function flycheck-old-next-error-function)) - - (pcase-dolist (`(,hook . ,fn) flycheck-hooks-alist) - (remove-hook hook fn 'local)) - - (flycheck-teardown)))) - - -;;; Syntax checker selection for the current buffer -(defun flycheck-get-checker-for-buffer () - "Find the checker for the current buffer. - -Use the selected checker for the current buffer, if any, -otherwise search for the best checker from `flycheck-checkers'. - -Return checker if there is a checker for the current buffer, or -nil otherwise." - (if flycheck-checker - (when (flycheck-may-use-checker flycheck-checker) - flycheck-checker) - (seq-find #'flycheck-may-use-checker flycheck-checkers))) - -(defun flycheck-get-next-checker-for-buffer (checker) - "Get the checker to run after CHECKER for the current buffer." - (let ((next (seq-find #'flycheck-may-use-next-checker - (flycheck-checker-get checker 'next-checkers)))) - (when next - (if (symbolp next) next (cdr next))))) - -(defun flycheck-select-checker (checker) - "Select CHECKER for the current buffer. - -CHECKER is a syntax checker symbol (see `flycheck-checkers') or -nil. In the former case, use CHECKER for the current buffer, -otherwise deselect the current syntax checker (if any) and use -automatic checker selection via `flycheck-checkers'. - -If called interactively prompt for CHECKER. With prefix arg -deselect the current syntax checker and enable automatic -selection again. - -Set `flycheck-checker' to CHECKER and automatically start a new -syntax check if the syntax checker changed. - -CHECKER will be used, even if it is not contained in -`flycheck-checkers', or if it is disabled via -`flycheck-disabled-checkers'." - (interactive - (if current-prefix-arg - (list nil) - (list (flycheck-read-checker "Select checker: " - (flycheck-get-checker-for-buffer))))) - (when (not (eq checker flycheck-checker)) - (unless (or (not checker) (flycheck-may-use-checker checker)) - (flycheck-verify-checker checker) - (user-error "Can't use syntax checker %S in this buffer" checker)) - (setq flycheck-checker checker) - (when flycheck-mode - (flycheck-buffer)))) - -(defun flycheck--toggle-checker (checker enable) - "Enable or disable CHECKER for the current buffer. - -If ENABLE, re-enable CHECKER by removing it from the buffer-local -value of `flycheck-disabled-checkers'. Otherwise, add the syntax -checker to the buffer-local value of `flycheck-disabled-checkers'." - (cond - (enable - ;; We must use `remq' instead of `delq', because we must _not_ modify the - ;; list. Otherwise we could potentially modify the global default value, - ;; in case the list is the global default. - (when (memq checker flycheck-disabled-checkers) - (setq flycheck-disabled-checkers - (remq checker flycheck-disabled-checkers))) - (when (memq checker flycheck--automatically-disabled-checkers) - (setq flycheck--automatically-disabled-checkers - (remq checker flycheck--automatically-disabled-checkers)))) - (t (unless (memq checker flycheck-disabled-checkers) - (push checker flycheck-disabled-checkers))))) - -(defun flycheck-disable-checker (checker &optional enable) - "Interactively disable CHECKER for the current buffer. - -Prompt for a syntax checker to disable, and add the syntax -checker to the buffer-local value of -`flycheck-disabled-checkers'. - -With non-nil ENABLE or with prefix arg, prompt for a disabled -syntax checker and re-enable it by removing it from the -buffer-local value of `flycheck-disabled-checkers'." - (declare - (interactive-only "Directly set `flycheck-disabled-checkers' instead")) - (interactive - (let* ((enable current-prefix-arg) - (candidates (if enable - (append flycheck-disabled-checkers - flycheck--automatically-disabled-checkers) - flycheck-checkers)) - (prompt (if enable "Enable syntax checker: " - "Disable syntax checker: "))) - (when (and enable (not candidates)) - (user-error "No syntax checkers disabled in this buffer")) - (list (flycheck-read-checker prompt nil nil candidates) enable))) - (unless checker - (user-error "No syntax checker given")) - (flycheck--toggle-checker checker enable) - (flycheck-buffer)) - - -;;; Syntax checks for the current buffer -(defvar-local flycheck-current-syntax-check nil - "The current syntax check in the this buffer.") -(put 'flycheck-current-syntax-check 'permanent-local t) - -(defun flycheck-start-current-syntax-check (checker) - "Start a syntax check in the current buffer with CHECKER. - -Set `flycheck-current-syntax-check' accordingly." - ;; Allocate the current syntax check *before* starting it. This allows for - ;; synchronous checks, which call the status callback immediately in their - ;; start function. - (let* ((check - (flycheck-syntax-check-new - :buffer (current-buffer) - :checker checker - :context nil - :working-directory (flycheck-compute-working-directory checker))) - (callback (flycheck-buffer-status-callback check))) - (setq flycheck-current-syntax-check check) - (flycheck-report-status 'running) - (flycheck-syntax-check-start check callback))) - -(defun flycheck-running-p () - "Determine whether a syntax check is running in the current buffer." - (not (null flycheck-current-syntax-check))) - -(defun flycheck-stop () - "Stop any ongoing syntax check in the current buffer." - (when (flycheck-running-p) - (flycheck-syntax-check-interrupt flycheck-current-syntax-check) - ;; Remove the current syntax check, to reset Flycheck into a non-running - ;; state, and to make `flycheck-report-buffer-checker-status' ignore any - ;; status reports from the current syntax check. - (setq flycheck-current-syntax-check nil) - (flycheck-report-status 'interrupted))) - -(defun flycheck-buffer-status-callback (syntax-check) - "Create a status callback for SYNTAX-CHECK in the current buffer." - (lambda (&rest args) - (apply #'flycheck-report-buffer-checker-status - syntax-check args))) - -(defun flycheck-buffer () - "Start checking syntax in the current buffer. - -Get a syntax checker for the current buffer with -`flycheck-get-checker-for-buffer', and start it." - (interactive) - (flycheck-clean-deferred-check) - (if flycheck-mode - (unless (flycheck-running-p) - ;; Clear error list and mark all overlays for deletion. We do not - ;; delete all overlays immediately to avoid excessive re-displays and - ;; flickering, if the same errors gets highlighted again after the check - ;; completed. - (run-hooks 'flycheck-before-syntax-check-hook) - (flycheck-clear-errors) - (flycheck-mark-all-overlays-for-deletion) - (condition-case err - (let* ((checker (flycheck-get-checker-for-buffer))) - (if checker - (flycheck-start-current-syntax-check checker) - (flycheck-clear) - (flycheck-report-status 'no-checker))) - (error - (flycheck-report-failed-syntax-check) - (signal (car err) (cdr err))))) - (user-error "Flycheck mode disabled"))) - -(defun flycheck-report-buffer-checker-status - (syntax-check status &optional data) - "In BUFFER, report a SYNTAX-CHECK STATUS with DATA. - -SYNTAX-CHECK is the `flycheck-syntax-check' which reported -STATUS. STATUS denotes the status of CHECKER, with an optional -DATA. STATUS may be one of the following symbols: - -`errored' - The syntax checker has errored. DATA is an optional error - message. - - This report finishes the current syntax check. - -`interrupted' - The syntax checker was interrupted. DATA is ignored. - - This report finishes the current syntax check. - -`finished' - The syntax checker has finished with a proper error report - for the current buffer. DATA is the (potentially empty) - list of `flycheck-error' objects reported by the syntax - check. - - This report finishes the current syntax check. - -`suspicious' - The syntax checker encountered a suspicious state, which the - user needs to be informed about. DATA is an optional - message. - -A syntax checker _must_ report a status at least once with any -symbol that finishes the current syntax checker. Otherwise -Flycheck gets stuck with the current syntax check. - -If CHECKER is not the currently used syntax checker in -`flycheck-current-syntax-check', the status report is largely -ignored. Notably, any errors reported by the checker are -discarded." - (let ((buffer (flycheck-syntax-check-buffer syntax-check))) - ;; Ignore the status report if the buffer is gone, or if this syntax check - ;; isn't the current one in buffer (which can happen if this is an old - ;; report of an interrupted syntax check, and a new syntax check was started - ;; since this check was interrupted) - (when (and (buffer-live-p buffer) - (eq syntax-check - (buffer-local-value 'flycheck-current-syntax-check buffer))) - (with-current-buffer buffer - (let ((checker (flycheck-syntax-check-checker syntax-check))) - (pcase status - ((or `errored `interrupted) - (flycheck-report-failed-syntax-check status) - (when (eq status 'errored) - ;; In case of error, show the error message - (message "Error from syntax checker %s: %s" - checker (or data "UNKNOWN!")))) - (`suspicious - (when flycheck-mode - (message "Suspicious state from syntax checker %s: %s" - checker (or data "UNKNOWN!"))) - (flycheck-report-status 'suspicious)) - (`finished - (when flycheck-mode - ;; Only report errors from the checker if Flycheck Mode is - ;; still enabled. - (flycheck-finish-current-syntax-check - data - (flycheck-syntax-check-working-directory syntax-check)))) - (_ - (error "Unknown status %s from syntax checker %s" - status checker)))))))) - -(defun flycheck-finish-current-syntax-check (errors working-dir) - "Finish the current syntax-check in the current buffer with ERRORS. - -ERRORS is a list of `flycheck-error' objects reported by the -current syntax check in `flycheck-current-syntax-check'. - -Report all ERRORS and potentially start any next syntax checkers. - -If the current syntax checker reported excessive errors, it is -disabled via `flycheck-disable-excessive-checker' for subsequent -syntax checks. - -Relative file names in ERRORS will be expanded relative to -WORKING-DIR." - (let* ((syntax-check flycheck-current-syntax-check) - (checker (flycheck-syntax-check-checker syntax-check)) - (errors (flycheck-relevant-errors - (flycheck-fill-and-expand-error-file-names - (flycheck-filter-errors - (flycheck-assert-error-list-p errors) checker) - working-dir)))) - (unless (flycheck-disable-excessive-checker checker errors) - (flycheck-report-current-errors errors)) - (let ((next-checker (flycheck-get-next-checker-for-buffer checker))) - (if next-checker - (flycheck-start-current-syntax-check next-checker) - (setq flycheck-current-syntax-check nil) - (flycheck-report-status 'finished) - ;; Delete overlays only after the very last checker has run, to avoid - ;; flickering on intermediate re-displays - (flycheck-delete-marked-overlays) - (flycheck-error-list-refresh) - (run-hooks 'flycheck-after-syntax-check-hook) - (when (and flycheck-auto-display-errors-after-checking - (eq (current-buffer) (window-buffer))) - (flycheck-display-error-at-point)) - ;; Immediately try to run any pending deferred syntax check, which - ;; were triggered by intermediate automatic check event, to make sure - ;; that we quickly refine outdated error information - (flycheck-perform-deferred-syntax-check))))) - -(defun flycheck-disable-excessive-checker (checker errors) - "Disable CHECKER if it reported excessive ERRORS. - -If ERRORS has more items than `flycheck-checker-error-threshold', -add CHECKER to `flycheck--automatically-disabled-checkers', and -show a warning. - -Return t when CHECKER was disabled, or nil otherwise." - (when (and flycheck-checker-error-threshold - (> (length errors) flycheck-checker-error-threshold)) - ;; Disable CHECKER for this buffer - ;; (`flycheck--automatically-disabled-checkers' is a local variable). - (lwarn '(flycheck syntax-checker) :warning - (substitute-command-keys - "Syntax checker %s reported too many errors (%s) and is disabled. -Use `\\[customize-variable] RET flycheck-checker-error-threshold' to -change the threshold or `\\[universal-argument] \ -\\[flycheck-disable-checker]' to re-enable the checker.") - checker (length errors)) - (push checker flycheck--automatically-disabled-checkers) - t)) - -(defun flycheck-clear (&optional shall-interrupt) - "Clear all errors in the current buffer. - -With prefix arg or SHALL-INTERRUPT non-nil, also interrupt the -current syntax check." - (interactive "P") - (when shall-interrupt - (flycheck-stop)) - (flycheck-delete-all-overlays) - (flycheck-clear-errors) - (flycheck-clear-displayed-error-messages) - (flycheck-error-list-refresh) - (flycheck-hide-error-buffer)) - -(defun flycheck--empty-variables () - "Empty variables used by Flycheck." - (kill-local-variable 'flycheck--file-truename-cache) - (kill-local-variable 'flycheck--idle-trigger-timer) - (kill-local-variable 'flycheck--idle-trigger-conditions) - (kill-local-variable 'flycheck--last-error-display-tick)) - -(defun flycheck-teardown (&optional ignore-global) - "Teardown Flycheck in the current buffer. - -Completely clear the whole Flycheck state. Remove overlays, kill -running checks, and empty all variables used by Flycheck. - -Unless optional argument IGNORE-GLOBAL is non-nil, check to see -if no more Flycheck buffers remain (aside from the current -buffer), and if so then clean up global hooks." - (flycheck-safe-delete-temporaries) - (flycheck-stop) - (flycheck-clean-deferred-check) - (flycheck-clear) - (flycheck-cancel-error-display-error-at-point-timer) - (flycheck--clear-idle-trigger-timer) - (flycheck--empty-variables) - (unless (or ignore-global - (seq-some (lambda (buf) - (and (not (equal buf (current-buffer))) - (buffer-local-value 'flycheck-mode buf))) - (buffer-list))) - (flycheck-global-teardown 'ignore-local))) - - -;;; Automatic syntax checking in a buffer -(defun flycheck-may-check-automatically (&rest conditions) - "Determine whether the buffer may be checked under one of CONDITIONS. - -Read-only buffers may never be checked automatically. - -If CONDITIONS are given, determine whether syntax may be checked -under at least one of them, according to -`flycheck-check-syntax-automatically'." - (and (not (or buffer-read-only (flycheck-ephemeral-buffer-p))) - (file-exists-p default-directory) - (or (not conditions) - (seq-some - (lambda (condition) - (memq condition flycheck-check-syntax-automatically)) - conditions)))) - -(defvar-local flycheck--idle-trigger-timer nil - "Timer used to trigger a syntax check after an idle delay.") - -(defvar-local flycheck--idle-trigger-conditions nil - "List of conditions under which an idle syntax check will be triggered. -This will be some subset of the allowable values for -`flycheck-check-syntax-automatically'. - -For example, if the user switches to a buffer and then makes an -edit, this list will have the values `idle-change' and -`idle-buffer-switch' in it, at least until the idle timer -expires.") - -(defun flycheck-buffer-automatically (&optional condition force-deferred) - "Automatically check syntax at CONDITION. - -Syntax is not checked if `flycheck-may-check-automatically' -returns nil for CONDITION. (CONDITION may be a single condition -or a list of them.) - -The syntax check is deferred if FORCE-DEFERRED is non-nil, or if -`flycheck-must-defer-check' returns t." - (when (and flycheck-mode (if (listp condition) - (apply #'flycheck-may-check-automatically - condition) - (flycheck-may-check-automatically condition))) - (flycheck--clear-idle-trigger-timer) - (setq flycheck--idle-trigger-conditions nil) - (if (or force-deferred (flycheck-must-defer-check)) - (flycheck-buffer-deferred) - (with-demoted-errors "Error while checking syntax automatically: %S" - (flycheck-buffer))))) - -(defun flycheck--clear-idle-trigger-timer () - "Clear the idle trigger timer." - (when flycheck--idle-trigger-timer - (cancel-timer flycheck--idle-trigger-timer) - (setq flycheck--idle-trigger-timer nil))) - -(defun flycheck--handle-idle-trigger (buffer) - "Run a syntax check in BUFFER if appropriate. -This function is called by `flycheck--idle-trigger-timer'." - (let ((current-buffer (current-buffer))) - (when (buffer-live-p buffer) - (with-current-buffer buffer - (unless (or flycheck-buffer-switch-check-intermediate-buffers - (eq buffer current-buffer)) - (setq flycheck--idle-trigger-conditions - (delq 'idle-buffer-switch - flycheck--idle-trigger-conditions))) - (when flycheck--idle-trigger-conditions - (flycheck-buffer-automatically flycheck--idle-trigger-conditions) - (setq flycheck--idle-trigger-conditions nil)))))) - -(defun flycheck-handle-change (beg end _len) - "Handle a buffer change between BEG and END. - -BEG and END mark the beginning and end of the change text. _LEN -is ignored. - -Start a syntax check if a new line has been inserted into the -buffer." - ;; Save and restore the match data, as recommended in (elisp)Change Hooks - (save-match-data - (when flycheck-mode - (if (string-match-p (rx "\n") (buffer-substring beg end)) - (flycheck-buffer-automatically 'new-line 'force-deferred) - (when (memq 'idle-change flycheck-check-syntax-automatically) - (flycheck--clear-idle-trigger-timer) - (cl-pushnew 'idle-change flycheck--idle-trigger-conditions) - (setq flycheck--idle-trigger-timer - (run-at-time flycheck-idle-change-delay nil - #'flycheck--handle-idle-trigger - (current-buffer)))))))) - -(defvar flycheck--last-buffer (current-buffer) - "The current buffer or the buffer that was previously current. -This is usually equal to the current buffer, unless the user just -switched buffers. After a buffer switch, it is the previous -buffer.") - -(defun flycheck-handle-buffer-switch () - "Handle a possible switch to another buffer. - -If a buffer switch actually happened, schedule a syntax check." - ;; Switching buffers here is weird, but unfortunately necessary. It - ;; turns out that `with-temp-buffer' triggers - ;; `buffer-list-update-hook' twice, and the value of - ;; `current-buffer' is bogus in one of those triggers (the one just - ;; after the temp buffer is killed). If we rely on the bogus value, - ;; Flycheck will think that the user is switching back and forth - ;; between different buffers during the `with-temp-buffer' call - ;; (note: two different normal buffers, not the current buffer and - ;; the temp buffer!), and that would trigger spurious syntax checks. - ;; It seems that reading (window-buffer) gets us the correct current - ;; buffer in all important real-life situations (although it doesn't - ;; necessarily catch uses of `set-buffer'). - (with-current-buffer (window-buffer) - (unless (or (equal flycheck--last-buffer (current-buffer)) - ;; Don't bother keeping track of changes to and from - ;; the minibuffer, as they will never require us to - ;; run a syntax check. - (minibufferp)) - (setq flycheck--last-buffer (current-buffer)) - (when (and flycheck-mode - (memq 'idle-buffer-switch flycheck-check-syntax-automatically)) - (flycheck--clear-idle-trigger-timer) - (cl-pushnew 'idle-buffer-switch flycheck--idle-trigger-conditions) - (setq flycheck--idle-trigger-timer - (run-at-time flycheck-idle-buffer-switch-delay nil - #'flycheck--handle-idle-trigger - (current-buffer))))))) - -(defun flycheck-handle-save () - "Handle a save of the buffer." - (flycheck-buffer-automatically 'save)) - - -;;; Deferred syntax checking -(defvar-local flycheck-deferred-syntax-check nil - "If non-nil, a deferred syntax check is pending.") - -(defun flycheck-must-defer-check () - "Determine whether the syntax check has to be deferred. - -A check has to be deferred if the buffer is not visible, or if the buffer is -currently being reverted. - -Return t if the check is to be deferred, or nil otherwise." - (or (not (get-buffer-window)) - ;; We defer the syntax check if Flycheck is already running, to - ;; immediately start a new syntax check after the current one finished, - ;; because the result of the current check will most likely be outdated by - ;; the time it is finished. - (flycheck-running-p) - ;; We must defer checks while a buffer is being reverted, to avoid race - ;; conditions while the buffer contents are being restored. - revert-buffer-in-progress-p)) - -(defun flycheck-deferred-check-p () - "Determine whether the current buffer has a deferred check. - -Return t if so, or nil otherwise." - flycheck-deferred-syntax-check) - -(defun flycheck-buffer-deferred () - "Defer syntax check for the current buffer." - (setq flycheck-deferred-syntax-check t)) - -(defun flycheck-clean-deferred-check () - "Clean a deferred syntax checking state." - (setq flycheck-deferred-syntax-check nil)) - -(defun flycheck-perform-deferred-syntax-check () - "Perform the deferred syntax check." - (when (flycheck-deferred-check-p) - (flycheck-clean-deferred-check) - (flycheck-buffer-automatically))) - - -;;; Syntax checking in all buffers -(defun flycheck-may-enable-mode () - "Determine whether Flycheck mode may be enabled. - -Flycheck mode is not enabled for - -- the minibuffer, -- `fundamental-mode' -- major modes whose `mode-class' property is `special', -- ephemeral buffers (see `flycheck-ephemeral-buffer-p'), -- encrypted buffers (see `flycheck-encrypted-buffer-p'), -- remote files (see `file-remote-p'), -- and major modes excluded by `flycheck-global-modes'. - -Return non-nil if Flycheck mode may be enabled, and nil -otherwise." - (and (pcase flycheck-global-modes - ;; Whether `major-mode' is disallowed by `flycheck-global-modes' - (`t t) - (`(not . ,modes) (not (memq major-mode modes))) - (modes (memq major-mode modes))) - (not (or (minibufferp) - (eq major-mode 'fundamental-mode) - (eq (get major-mode 'mode-class) 'special) - (flycheck-ephemeral-buffer-p) - (flycheck-encrypted-buffer-p) - (and (buffer-file-name) - (file-remote-p (buffer-file-name) 'method)))))) - -(defun flycheck-mode-on-safe () - "Enable command `flycheck-mode' if it is safe to do so. - -Command `flycheck-mode' is only enabled if -`flycheck-may-enable-mode' returns a non-nil result." - (when (flycheck-may-enable-mode) - (flycheck-mode))) - -;;;###autoload -(define-globalized-minor-mode global-flycheck-mode flycheck-mode - flycheck-mode-on-safe - :init-value nil - :group 'flycheck) - -(defun flycheck-global-teardown (&optional ignore-local) - "Teardown Flycheck in all buffers. - -Completely clear the whole Flycheck state in all buffers, stop -all running checks, remove all temporary files, and empty all -variables of Flycheck. - -Also remove global hooks. (If optional argument IGNORE-LOCAL is -non-nil, then only do this and skip per-buffer teardown.)" - (unless ignore-local - (dolist (buffer (buffer-list)) - (when (buffer-live-p buffer) - (with-current-buffer buffer - (when flycheck-mode - (flycheck-teardown 'ignore-global)))))) - (remove-hook 'buffer-list-update-hook #'flycheck-handle-buffer-switch)) - -;; Clean up the entire state of Flycheck when Emacs is killed, to get rid of any -;; pending temporary files. -(add-hook 'kill-emacs-hook #'flycheck-global-teardown) - - -;;; Errors from syntax checks -(cl-defstruct (flycheck-error - (:constructor nil) - (:constructor - flycheck-error-new - (&key - line column end-line end-column - buffer checker filename message level id group - &aux (-end-line end-line) (-end-column end-column))) - (:constructor - flycheck-error-new-at - (line - column - &optional level message - &key end-line end-column checker id group - (filename (buffer-file-name)) (buffer (current-buffer)) - &aux (-end-line end-line) (-end-column end-column))) - (:constructor - flycheck-error-new-at-pos - (pos - &optional level message - &key end-pos checker id group - (filename (buffer-file-name)) (buffer (current-buffer)) - &aux - ((line . column) - (if pos (flycheck-line-column-at-pos pos) - '(nil . nil))) - ((-end-line . -end-column) - (if end-pos (flycheck-line-column-at-pos end-pos) - '(nil . nil)))))) - "Structure representing an error reported by a syntax checker. -Slots: - -`buffer' - The buffer that the error was reported for, as buffer object. - -`checker' - The syntax checker which reported this error, as symbol. - -`filename' - The file name the error refers to, as string. - -`line' - The line on which the error starts, as number. - -`column' (optional) - The column at which the error starts, as number. - - For compatibility with external tools and unlike Emacs - itself (e.g. in Compile Mode) Flycheck uses _1-based_ - columns: The first character on a line is column 1. - - Occasionally some tools try to proactively adapt to Emacs - and emit 0-based columns automatically. In these cases, the - columns must be adjusted for Flycheck, see - `flycheck-increment-error-columns'. - - If nil, the whole line is highlighted. - -`end-line' (optional) - The line on which the error ends. If nil, this is computed according to - `flycheck-highlighting-mode'. - -`end-column' - The column at which the error ends. If nil, this is computed according to - `flycheck-highlighting-mode'. Error intervals are right-open: the - end-column points to the first character not included in the error. For - example, 1:1 is an empty range. and in \"line-number-at-pos\", the range - 6:12 covers the word \"number\". - -`message' (optional) - The error message as a string, if any. - -`level' - The error level, as either `info', `warning' or `error'. - -`id' (optional) - An ID identifying the kind of error. - -`group' (optional) - A symbol identifying the group the error belongs to. - - Some tools will emit multiple errors that relate to the same - issue (e.g., lifetime errors in Rust). All related errors - collected by a checker should have the same `group` value, - in order to be able to present them to the user. - - See `flycheck-related-errors`." - buffer checker filename line column message level id group - ;; The fields below are at the end of the record to preserve backwards - ;; compatibility; see https://github.com/flycheck/flycheck/pull/1400 and - ;; https://lists.gnu.org/archive/html/emacs-devel/2018-07/msg00436.html - -end-line -end-column) - -;; These accessors are defined for backwards compatibility -;; FIXME: Clean up once package.el learns how to recompile dependencies. - -(defun flycheck-error-end-line (err) - "Return the end line of a Flycheck error ERR." - (condition-case nil (flycheck-error--end-line err) - (args-out-of-range nil))) - -(defun flycheck-error-end-column (err) - "Return the end column of a Flycheck error ERR." - (condition-case nil (flycheck-error--end-column err) - (args-out-of-range nil))) - -(defun flycheck-error--set-end-line (err line) - "Set the end line of a Flycheck error ERR to LINE." - (condition-case nil (setf (flycheck-error--end-line err) line) - (args-out-of-range nil))) - -(defun flycheck-error--set-end-column (err column) - "Set the end column of a Flycheck error ERR to COLUMN." - (condition-case nil (setf (flycheck-error--end-column err) column) - (args-out-of-range nil))) - -(gv-define-simple-setter flycheck-error-end-line - flycheck-error--set-end-line) -(gv-define-simple-setter flycheck-error-end-column - flycheck-error--set-end-column) - -(defmacro flycheck-error-with-buffer (err &rest forms) - "Switch to the buffer of ERR and evaluate FORMS. - -If the buffer of ERR is not live, FORMS are not evaluated." - (declare (indent 1) (debug t)) - `(when (buffer-live-p (flycheck-error-buffer ,err)) - (with-current-buffer (flycheck-error-buffer ,err) - ,@forms))) - -(defun flycheck--exact-region (err) - "Get the region of ERR, if ERR specifies a range. - -Return a cons cell `(BEG . END)'. If the input range is empty, -it is expanded to cover at least one character so that END is -always greater than BEG. If ERR doesn't specify an end-column -return nil." - (if-let* ((line (flycheck-error-line err)) - (column (flycheck-error-column err)) - (end-line (or (flycheck-error-end-line err) line)) - (end-column (flycheck-error-end-column err))) - ;; Ignoring fields speeds up calls to `line-end-position'. - (let* ((inhibit-field-text-motion t) - (beg (flycheck-line-column-to-position line column)) - (end (flycheck-line-column-to-position end-line end-column))) - (cond - ((< beg end) (cons beg end)) - ((= end (point-max)) (cons (1- end) end)) - (t (cons end (1+ end))))))) - -(defun flycheck--line-region (pos) - "Get the line region of position POS. - -Return a cons cell `(BEG . END)' where BEG is the first -non-whitespace character on the line ERR refers to, and END the -end of the line." - (save-excursion - (goto-char pos) - (forward-line 0) - (let ((bol (point)) - (end (line-end-position))) - ;; Move to the beginning of this line's indentation, similar to - ;; `back-to-indentation' - (skip-syntax-forward " " end) - (backward-prefix-chars) - ;; If the current line is blank, highlight it in full; if it's - ;; empty, include the previous line break character(s) to have - ;; any region at all (when called with 0, `line-end-position' - ;; gives us the end of the previous line). - (cons (if (eolp) (if (= bol end) (line-end-position 0) bol) (point)) - end)))) - -(defun flycheck--column-region (pos) - "Get the column region of position POS. - -Return a cons cell `(BEG . END)' where BEG is the character -before the column, and END the actual column." - (save-excursion - (goto-char pos) - ;; (eobp): No enough lines in the buffer - (if (eobp) (cons (1- (point-max)) (point-max)) - (cons pos (1+ pos))))) - -(defun flycheck-bounds-of-thing-at-point (thing pos) - "Get the region of THING at position POS. - -THING is a understood by `thing-at-point'. - -Return a cons cell `(BEG . END)' where BEG is the beginning of -the THING at the column, and END the end of the THING." - (save-excursion - (goto-char pos) - (bounds-of-thing-at-point thing))) - -(defun flycheck--approximate-region (err mode) - "Compute the region of ERR based on MODE and ERR's line and column." - ;; Ignoring fields speeds up calls to `line-end-position'. - (let* ((inhibit-field-text-motion t) - (line (flycheck-error-line err)) - (column (flycheck-error-column err)) - (beg (flycheck-line-column-to-position line (or column 1)))) - (if (or (null column) - (eq mode 'lines)) - (flycheck--line-region beg) - (or (pcase mode - (`symbols - ;; Ensure that we're on a word or symbol. See - ;; https://github.com/flycheck/flycheck/issues/1519 - (and (<= (point-min) beg) (< beg (point-max)) - (memq (char-syntax (char-after beg)) '(?w ?_)) - (flycheck-bounds-of-thing-at-point 'symbol beg))) - (`sexps - (flycheck-bounds-of-thing-at-point 'sexp beg))) - (flycheck--column-region beg))))) - -(defun flycheck-error-region-for-mode (err mode) - "Get the region of ERR for the highlighting MODE. - -ERR is a Flycheck error. If its position is fully specified, use -that to compute a region; otherwise, use MODE, as documented in -`flycheck-highlighting-mode'. If MODE is nil, signal an error." - (flycheck-error-with-buffer err - (save-restriction - (widen) - (or (flycheck--exact-region err) - (flycheck--approximate-region err mode))))) - -(defun flycheck-error-pos (err) - "Get the buffer position of ERR. - -ERR is a Flycheck error whose position to get. - -The error position is the error column, or the first -non-whitespace character of the error line, if ERR has no error column." - (car (flycheck-error-region-for-mode - err flycheck-highlighting-mode))) - -(defun flycheck-error-format-snippet (err &optional max-length) - "Extract the text that ERR refers to from the buffer. - -Newlines and blanks are replaced by single spaces. If ERR -doesn't include an end-position, return nil. - -MAX-LENGTH is how many characters to read from the buffer, at -most. It defaults to 20." - (flycheck-error-with-buffer err - (save-restriction - (widen) - (pcase (flycheck--exact-region err) - (`(,beg . ,end) - (truncate-string-to-width - (replace-regexp-in-string - "\\s-+" " " (buffer-substring beg (min end (point-max)))) - (or max-length 20) nil nil t)))))) - -(defun flycheck-error-format-message-and-id (err &optional include-snippet) - "Format the message and id of ERR as human-readable string. - -If INCLUDE-SNIPPET is non-nil, prepend the message with a snippet -of the text that the error applies to (such text can only be -determined if the error contains a full span, not just a -beginning position)." - (let* ((id (flycheck-error-id err)) - (fname (flycheck-error-filename err)) - (other-file-p (and fname (not (equal fname (buffer-file-name)))))) - (concat (and other-file-p (format "In %S:\n" (file-relative-name fname))) - (and include-snippet - (when-let* ((snippet (flycheck-error-format-snippet err))) - (format-message "`%s': " snippet))) - (or (flycheck-error-message err) - (format "Unknown %S" (flycheck-error-level err))) - (and id (format " [%s]" id))))) - -(defun flycheck-error-format-position (err) - "Format the position of ERR as a human-readable string." - (let ((line (flycheck-error-line err)) - (column (flycheck-error-column err)) - (end-line (flycheck-error-end-line err)) - (end-column (flycheck-error-end-column err))) - (if (and line column) - (if (or (null end-line) (equal line end-line)) - (if (or (null end-column) (equal column (1- end-column))) - (format "%d:%d" line column) - (format "%d:%d-%d" line column end-column)) - (format "(%d:%d)-(%d:%d)" line column end-line end-column)) - (if (or (null end-line) (equal line end-line)) - (format "%d" line) - (format "%d-%d" line end-line))))) - -(defun flycheck-error-format (err &optional with-file-name) - "Format ERR as human-readable string, optionally WITH-FILE-NAME. - -Return a string that represents the given ERR. If WITH-FILE-NAME -is given and non-nil, include the file-name as well, otherwise -omit it." - (let* ((level (symbol-name (flycheck-error-level err))) - (checker (symbol-name (flycheck-error-checker err))) - (format `(,@(when with-file-name - (list (flycheck-error-filename err) ":")) - ,(flycheck-error-format-position err) ":" - ,level ": " - ,(flycheck-error-format-message-and-id err) - " (" ,checker ")"))) - (apply #'concat format))) - -(defun flycheck-error-< (err1 err2) - "Determine whether ERR1 is less than ERR2 by location." - (let ((l1 (flycheck-error-line err1)) - (l2 (flycheck-error-line err2))) - (if (/= l1 l2) - (< l1 l2) - (let ((c1 (or (flycheck-error-column err1) 1)) - (c2 (or (flycheck-error-column err2) 1))) - (if (/= c1 c2) - (< c1 c2) - (let ((el1 (or (flycheck-error-end-line err1) l1)) - (el2 (or (flycheck-error-end-line err2) l2))) - (if (/= el1 el2) - (< el1 el2) - (let ((cl1 (or (flycheck-error-end-column err1) 1)) - (cl2 (or (flycheck-error-end-column err2) 1))) - (< cl1 cl2))))))))) - -(defun flycheck-error-level-< (err1 err2) - "Determine whether ERR1 is less than ERR2 by error level. - -Like `flycheck-error-<', but compares by error level severity -first. Levels of the same severity are compared by name." - (let* ((level1 (flycheck-error-level err1)) - (level2 (flycheck-error-level err2)) - (severity1 (flycheck-error-level-severity level1)) - (severity2 (flycheck-error-level-severity level2))) - (cond - ((= severity1 severity2) - (if (string= level1 level2) - (flycheck-error-< err1 err2) - (string< level1 level2))) - (t (< severity1 severity2))))) - -(defun flycheck-assert-error-list-p (errors) - "Assert that all items in ERRORS are of `flycheck-error' type. - -Signal an error if any item in ERRORS is not a `flycheck-error' -object, as by `flycheck-error-p'. Otherwise return ERRORS -again." - (unless (listp errors) - (signal 'wrong-type-argument (list 'listp errors))) - (dolist (err errors) - (unless (flycheck-error-p err) - (signal 'wrong-type-argument (list 'flycheck-error-p err)))) - errors) - - -;;; Errors in the current buffer -(defvar-local flycheck-current-errors nil - "A list of all errors and warnings in the current buffer.") - -(defun flycheck-report-current-errors (errors) - "Report ERRORS in the current buffer. - -Add ERRORS to `flycheck-current-errors' and process each error -with `flycheck-process-error-functions'." - (setq flycheck-current-errors (append errors flycheck-current-errors)) - (overlay-recenter (point-max)) - ;; We can't use `seq-sort-by' because it's not in Emacs 25's built-in `seq', - ;; and installing an updated version doesn't help (this is a package.el bug; - ;; see https://lists.gnu.org/archive/html/emacs-devel/2020-04/msg01974.html). - (seq-do (lambda (err) - (run-hook-with-args-until-success 'flycheck-process-error-functions - err)) - (seq-sort (lambda (e1 e2) - (< (flycheck-error-line e1) (flycheck-error-line e2))) - errors))) - -(defun flycheck-clear-errors () - "Remove all error information from the current buffer." - (setq flycheck-current-errors nil) - (flycheck-report-status 'not-checked)) - -(defun flycheck-fill-and-expand-error-file-names (errors directory) - "Fill and expand file names in ERRORS relative to DIRECTORY. - -Expand all file names of ERRORS against DIRECTORY. If the file -name of an error is nil fill in the result of function -`buffer-file-name' in the current buffer. - -Return ERRORS, modified in-place." - (seq-do (lambda (err) - (setf (flycheck-error-filename err) - (if-let (filename (flycheck-error-filename err)) - (expand-file-name filename directory) - (buffer-file-name)))) - errors) - errors) - -(defun flycheck-relevant-error-other-file-p (err) - "Determine whether ERR is a relevant error for another file." - (let ((file-name (flycheck-error-filename err))) - (and file-name - flycheck-relevant-error-other-file-show - (or (null buffer-file-name) - (not (flycheck-same-files-p buffer-file-name file-name))) - (<= (flycheck-error-level-severity - flycheck-relevant-error-other-file-minimum-level) - (flycheck-error-level-severity (flycheck-error-level err)))))) - -(defun flycheck-relevant-error-p (err) - "Determine whether ERR is relevant for the current buffer. - -Return t if ERR may be shown for the current buffer, or nil -otherwise." - (flycheck-error-with-buffer err - (let ((file-name (flycheck-error-filename err)) - (message (flycheck-error-message err))) - (and - (or - ;; Neither the error nor buffer have a file name - (and (not file-name) (not buffer-file-name)) - ;; Both have files, and they match - (and buffer-file-name file-name - (flycheck-same-files-p file-name buffer-file-name)) - ;; This is a significant error from another file - (flycheck-relevant-error-other-file-p err)) - message - (not (string-empty-p message)) - ;; Errors without line numbers are discarded. If a linter - ;; reports relevant errors without line numbers, use - ;; `flycheck-fill-empty-line-numbers' as the checker's - ;; `:error-filter' to set them to line 0. - (flycheck-error-line err))))) - -(defun flycheck-relevant-errors (errors) - "Filter the relevant errors from ERRORS. - -Return a list of all errors that are relevant for their -corresponding buffer." - (seq-filter #'flycheck-relevant-error-p errors)) - -(defun flycheck-related-errors (err &optional error-set) - "Get all the errors that are in the same group as ERR. - -Return a list of all errors (from ERROR-SET) that have the same -`flycheck-error-group' as ERR, including ERR itself. - -If ERROR-SET is nil, `flycheck-current-errors' is used instead." - (let ((group (flycheck-error-group err)) - (checker (flycheck-error-checker err))) - (if group - (seq-filter (lambda (e) - (and (eq (flycheck-error-checker e) checker) - (eq (flycheck-error-group e) group))) - (or error-set flycheck-current-errors)) - (list err)))) - - -;;; Status reporting for the current buffer -(defvar-local flycheck-last-status-change 'not-checked - "The last status change in the current buffer.") - -(defun flycheck-report-failed-syntax-check (&optional status) - "Report a failed Flycheck syntax check with STATUS. - -STATUS is a status symbol for `flycheck-report-status', -defaulting to `errored'. - -Clear Flycheck state, run `flycheck-syntax-check-failed-hook' and -report an error STATUS." - (flycheck-clear) - (setq flycheck-current-syntax-check nil) - (run-hooks 'flycheck-syntax-check-failed-hook) - (flycheck-report-status (or status 'errored))) - -(defun flycheck-report-status (status) - "Report Flycheck STATUS. - -STATUS is one of the following symbols: - -`not-checked' - The current buffer was not checked. - -`no-checker' - Automatic syntax checker selection did not find a suitable - syntax checker. - -`running' - A syntax check is now running in the current buffer. - -`errored' - The current syntax check has errored. - -`finished' - The current syntax check was finished normally. - -`interrupted' - The current syntax check was interrupted. - -`suspicious' - The last syntax check had a suspicious result. - -Set `flycheck-last-status-change' and call -`flycheck-status-changed-functions' with STATUS. Afterwards -refresh the mode line." - (setq flycheck-last-status-change status) - (run-hook-with-args 'flycheck-status-changed-functions status) - (force-mode-line-update)) - -(defun flycheck-mode-line-status-text (&optional status) - "Get a text describing STATUS for use in the mode line. - -STATUS defaults to `flycheck-last-status-change' if omitted or -nil." - (let* ((current-status (or status flycheck-last-status-change)) - (indicator (pcase current-status - (`not-checked "") - (`no-checker "-") - (`running "*") - (`errored "!") - (`finished - (let-alist (flycheck-count-errors flycheck-current-errors) - (if (or .error .warning) - (format ":%s|%s" (or .error 0) (or .warning 0)) - flycheck-mode-success-indicator))) - (`interrupted ".") - (`suspicious "?"))) - (face (when flycheck-mode-line-color - (pcase current-status - (`errored 'error) - (`finished - (let-alist (flycheck-count-errors flycheck-current-errors) - (if (or .error .warning) 'error 'success)))))) - (text (format " %s%s" flycheck-mode-line-prefix indicator))) - (when face - (setq text (propertize text 'face face))) - text)) - - -;;; Error levels -(defun flycheck-make-margin-spec (margin-str face) - "Make a display spec to indicate errors in the margins. - -Returns MARGIN-STR with FACE applied." - (propertize margin-str 'face `(,face default))) - -(defconst flycheck-default-margin-str "»" - "String used to indicate errors in the margins.") - -(defconst flycheck-default-margin-continuation-str "⋮" - "String used to indicate continuation lines in the margins.") - -;;;###autoload -(defun flycheck-define-error-level (level &rest properties) - "Define a new error LEVEL with PROPERTIES. - -The following PROPERTIES constitute an error level: - -`:severity SEVERITY' - A number denoting the severity of this level. The higher - the number, the more severe is this level compared to other - levels. Defaults to 0; info is -10, warning is 10, and - error is 100. - - The severity is used by `flycheck-error-level-<' to - determine the ordering of errors according to their levels. - -`:compilation-level LEVEL' - - A number indicating the broad class of messages that errors - at this level belong to: one of 0 (info), 1 (warning), or - 2 or nil (error). Defaults to nil. - - This is used by `flycheck-checker-pattern-to-error-regexp' - to map error levels into `compilation-mode''s hierarchy and - to get proper highlighting of errors in `compilation-mode'. - -`:overlay-category CATEGORY' - A symbol denoting the overlay category to use for error - highlight overlays for this level. See Info - node `(elisp)Overlay Properties' for more information about - overlay categories. - - A category for an error level overlay should at least define - the `face' property, for error highlighting. Another useful - property for error level categories is `priority', to - influence the stacking of multiple error level overlays. - -`:fringe-bitmap BITMAPS' - A fringe bitmap symbol denoting the bitmap to use for fringe - indicators for this level, or a cons of two bitmaps (one for - narrow fringes and one for wide fringes). See Info node - `(elisp)Fringe Bitmaps' for more information about fringe - bitmaps, including a list of built-in fringe bitmaps. - -`:fringe-face FACE' - A face symbol denoting the face to use for fringe indicators - for this level. - -`:margin-spec SPEC' - A display specification indicating what to display in the - margin when `flycheck-indication-mode' is `left-margin' or - `right-margin'. See Info node `(elisp)Displaying in the - Margins'. If omitted, Flycheck generates an image spec from - the fringe bitmap. - -`:error-list-face FACE' - A face symbol denoting the face to use for messages of this - level in the error list. See `flycheck-list-errors'." - (declare (indent 1)) - (setf (get level 'flycheck-error-level) t) - (setf (get level 'flycheck-error-severity) - (or (plist-get properties :severity) 0)) - (setf (get level 'flycheck-compilation-level) - (plist-get properties :compilation-level)) - (setf (get level 'flycheck-overlay-category) - (plist-get properties :overlay-category)) - (setf (get level 'flycheck-fringe-bitmaps) - (let ((bitmap (plist-get properties :fringe-bitmap))) - (if (consp bitmap) bitmap (cons bitmap bitmap)))) - ;; Kept for compatibility - (setf (get level 'flycheck-fringe-bitmap-double-arrow) - (car (get level 'flycheck-fringe-bitmaps))) - (setf (get level 'flycheck-fringe-face) - (plist-get properties :fringe-face)) - (setf (get level 'flycheck-margin-spec) - (or (plist-get properties :margin-spec) - (flycheck-make-margin-spec - flycheck-default-margin-str - (or (get level 'flycheck-fringe-face) 'default)))) - (setf (get level 'flycheck-margin-continuation) - (flycheck-make-margin-spec - flycheck-default-margin-continuation-str - (or (get level 'flycheck-fringe-face) 'default))) - (setf (get level 'flycheck-error-list-face) - (plist-get properties :error-list-face))) - -(defun flycheck-error-level-p (level) - "Determine whether LEVEL is a Flycheck error level." - (get level 'flycheck-error-level)) - -(defun flycheck-error-level-severity (level) - "Get the numeric severity of LEVEL." - (or (get level 'flycheck-error-severity) 0)) - -(defun flycheck-error-level-compilation-level (level) - "Get the compilation level for LEVEL." - (get level 'flycheck-compilation-level)) - -(defun flycheck-error-level-overlay-category (level) - "Get the overlay category for LEVEL." - (get level 'flycheck-overlay-category)) - -(defun flycheck-error-level-margin-spec (level) - "Get the margin spec for LEVEL." - (get level 'flycheck-margin-spec)) - -(defun flycheck-error-level-margin-continuation-spec (level) - "Get the margin continuation spec for LEVEL." - (get level 'flycheck-margin-continuation)) - -(defun flycheck-error-level-fringe-bitmap (level &optional hi-res) - "Get the fringe bitmap for LEVEL. - -Optional argument HI-RES non-nil means that the returned bitmap -will be the high resolution version." - (let ((bitmaps (get level 'flycheck-fringe-bitmaps))) - (if hi-res (cdr bitmaps) (car bitmaps)))) - -(defun flycheck-error-level-fringe-face (level) - "Get the fringe face for LEVEL." - (get level 'flycheck-fringe-face)) - -(defun flycheck-error-level-error-list-face (level) - "Get the error list face for LEVEL." - (get level 'flycheck-error-list-face)) - -(defun flycheck-error-level-make-indicator (level side &optional continuation) - "Create the fringe or margin icon for LEVEL at SIDE. - -Return a propertized string that shows an indicator according -to LEVEL and the given fringe or margin SIDE. - -LEVEL is a Flycheck error level defined with -`flycheck-define-error-level', and SIDE is either `left-fringe', -`right-fringe', `left-margin', or `right-margin'. - -CONTINUATION indicates which fringe bitmap or margin spec to use: -either the `:fringe-bitmap' and `:margin-spec' properties of -LEVEL when CONTINUATION is nil or omitted, or bitmaps and specs -indicating an error spanning more than one line. - -Return a propertized string representing the fringe icon, -intended for use as `before-string' of an overlay to actually -show the indicator." - (propertize - "!" 'display - (pcase side - ((or `left-fringe `right-fringe) - (list side - (if continuation 'flycheck-fringe-bitmap-continuation - (let* ((fringe-width - (pcase side - (`left-fringe (car (window-fringes))) - (`right-fringe (cadr (window-fringes))))) - (high-res (>= fringe-width 16))) - (flycheck-error-level-fringe-bitmap level high-res))) - (flycheck-error-level-fringe-face level))) - ((or `left-margin `right-margin) - `((margin ,side) - ,(or (if continuation - (flycheck-error-level-margin-continuation-spec level) - (flycheck-error-level-margin-spec level)) - ""))) - (_ (error "Invalid fringe side: %S" side))))) - -(define-obsolete-function-alias - 'flycheck-error-level-make-fringe-icon - 'flycheck-error-level-make-indicator - "33") - - -;;; Built-in error levels -(defconst flycheck-fringe-bitmap-double-arrow - [#b11011000 - #b01101100 - #b00110110 - #b00011011 - #b00110110 - #b01101100 - #b11011000] - "Bitmaps used to indicate errors in the left fringes.") - -(defconst flycheck-fringe-bitmap-double-left-arrow - [#b00011011 - #b00110110 - #b01101100 - #b11011000 - #b01101100 - #b00110110 - #b00011011] - "Bitmaps used to indicate errors in the right fringes.") - -(defconst flycheck-fringe-bitmap-double-arrow-hi-res - [#b1111001111000000 - #b0111100111100000 - #b0011110011110000 - #b0001111001111000 - #b0000111100111100 - #b0000011110011110 - #b0000011110011110 - #b0000111100111100 - #b0001111001111000 - #b0011110011110000 - #b0111100111100000 - #b1111001111000000] - "High-resolution bitmap used to indicate errors in the left fringes.") - -(defconst flycheck-fringe-bitmap-double-left-arrow-hi-res - [#b0000001111001111 - #b0000011110011110 - #b0000111100111100 - #b0001111001111000 - #b0011110011110000 - #b0111100111100000 - #b0111100111100000 - #b0011110011110000 - #b0001111001111000 - #b0000111100111100 - #b0000011110011110 - #b0000001111001111] - "High-resolution bitmap used to indicate errors in the right fringes.") - -(defconst flycheck-fringe-bitmap-continuation - [#b1000000010000000 - #b0010000000100000 - #b0000100000001000 - #b0000001000000010] - "Bitmap used to indicate continuation lines in the fringes.") - -(when (fboundp 'define-fringe-bitmap) ;; #ifdef HAVE_WINDOW_SYSTEM - (define-fringe-bitmap - 'flycheck-fringe-bitmap-double-arrow - flycheck-fringe-bitmap-double-arrow) - (define-fringe-bitmap - 'flycheck-fringe-bitmap-double-arrow-hi-res - flycheck-fringe-bitmap-double-arrow-hi-res - nil 16) - (define-fringe-bitmap - 'flycheck-fringe-bitmap-double-left-arrow - flycheck-fringe-bitmap-double-left-arrow) - (define-fringe-bitmap - 'flycheck-fringe-bitmap-double-left-arrow-hi-res - flycheck-fringe-bitmap-double-left-arrow-hi-res - nil 16) - (define-fringe-bitmap - 'flycheck-fringe-bitmap-continuation - flycheck-fringe-bitmap-continuation - nil 16 '(top repeat))) - -(defun flycheck-redefine-standard-error-levels - (&optional margin-str fringe-bitmap) - "Redefine Flycheck's standard error levels. - -This is useful to change the character drawn in the -margins (MARGIN-STR, a string) or the bitmap drawn in the -fringes (FRINGE-BITMAP, a fringe bitmap symbol or a cons of such -symbols, as in `flycheck-define-error-level')." - (unless margin-str - (setq margin-str flycheck-default-margin-str)) - - (unless fringe-bitmap - (setq fringe-bitmap - (cons 'flycheck-fringe-bitmap-double-arrow - 'flycheck-fringe-bitmap-double-arrow-hi-res))) - - (setf (get 'flycheck-error-overlay 'face) 'flycheck-error) - (setf (get 'flycheck-error-overlay 'priority) 110) - - (flycheck-define-error-level 'error - :severity 100 - :compilation-level 2 - :overlay-category 'flycheck-error-overlay - :margin-spec (flycheck-make-margin-spec margin-str 'flycheck-fringe-error) - :fringe-bitmap fringe-bitmap - :fringe-face 'flycheck-fringe-error - :error-list-face 'flycheck-error-list-error) - - (setf (get 'flycheck-warning-overlay 'face) 'flycheck-warning) - (setf (get 'flycheck-warning-overlay 'priority) 100) - - (flycheck-define-error-level 'warning - :severity 10 - :compilation-level 1 - :overlay-category 'flycheck-warning-overlay - :margin-spec (flycheck-make-margin-spec margin-str 'flycheck-fringe-warning) - :fringe-bitmap fringe-bitmap - :fringe-face 'flycheck-fringe-warning - :error-list-face 'flycheck-error-list-warning) - - (setf (get 'flycheck-info-overlay 'face) 'flycheck-info) - (setf (get 'flycheck-info-overlay 'priority) 90) - - (flycheck-define-error-level 'info - :severity -10 - :compilation-level 0 - :overlay-category 'flycheck-info-overlay - :margin-spec (flycheck-make-margin-spec margin-str 'flycheck-fringe-info) - :fringe-bitmap fringe-bitmap - :fringe-face 'flycheck-fringe-info - :error-list-face 'flycheck-error-list-info)) - -(flycheck-redefine-standard-error-levels) - - -;;; Error filtering -(defun flycheck-filter-errors (errors checker) - "Filter ERRORS from CHECKER. - -Apply the error filter of CHECKER to ERRORs and return the -result. If CHECKER has no error filter, fall back to -`flycheck-sanitize-errors'." - (let ((filter (or (flycheck-checker-get checker 'error-filter) - #'flycheck-sanitize-errors))) - (funcall filter errors))) - -(defun flycheck-sanitize-errors (errors) - "Sanitize ERRORS. - -Sanitize ERRORS by trimming leading and trailing whitespace in -all error messages, and by replacing 0 columns and empty error -messages with nil. - -Returns sanitized ERRORS." - (dolist (err errors) - (flycheck-error-with-buffer err - (let ((message (flycheck-error-message err)) - (id (flycheck-error-id err))) - (when message - (setq message (string-trim message)) - (setf (flycheck-error-message err) - (if (string-empty-p message) nil message))) - (when (and id (string-empty-p id)) - (setf (flycheck-error-id err) nil)) - (when (eq (flycheck-error-column err) 0) - (setf (flycheck-error-column err) nil)) - (when (eq (flycheck-error-end-column err) 0) - (setf (flycheck-error-end-column err) nil))))) - errors) - -(defun flycheck-remove-error-file-names (file-name errors) - "Remove matching FILE-NAME from ERRORS. - -Use as `:error-filter' for syntax checkers that output faulty -filenames. Flycheck will later fill in the buffer file name. - -Return ERRORS." - (seq-do (lambda (err) - (when (and (flycheck-error-filename err) - (string= (flycheck-error-filename err) file-name)) - (setf (flycheck-error-filename err) nil))) - errors) - errors) - -(defun flycheck-increment-error-columns (errors &optional offset) - "Increment all columns of ERRORS by OFFSET (default: 1). - - Use this as `:error-filter' if a syntax checker outputs 0-based - columns." - (setq offset (or offset 1)) ;; Emacs bug #31715 - (seq-do (lambda (err) - (when (flycheck-error-column err) - (cl-incf (flycheck-error-column err) offset)) - (when (flycheck-error-end-column err) - (cl-incf (flycheck-error-end-column err) offset))) - errors) - errors) - -(defun flycheck-collapse-error-message-whitespace (errors) - "Collapse whitespace in all messages of ERRORS. - -Return ERRORS." - (dolist (err errors) - (when-let (message (flycheck-error-message err)) - (setf (flycheck-error-message err) - (replace-regexp-in-string (rx (one-or-more (any space "\n" "\r"))) - " " message 'fixed-case 'literal)))) - errors) - -(defun flycheck-dedent-error-messages (errors) - "Dedent all messages of ERRORS. - -For each error in ERRORS, determine the indentation offset from -the leading whitespace of the first line, and dedent all further -lines accordingly. - -Return ERRORS, with in-place modifications." - (dolist (err errors) - (when-let (message (flycheck-error-message err)) - (with-temp-buffer - (insert message) - ;; Determine the indentation offset - (goto-char (point-min)) - (back-to-indentation) - (let* ((indent-offset (- (point) (point-min)))) - ;; Now iterate over all lines and dedent each according to - ;; `indent-offset' - (while (not (eobp)) - (back-to-indentation) - ;; If the current line starts with sufficient whitespace, delete the - ;; indentation offset. Otherwise keep the line intact, as we might - ;; loose valuable information - (when (>= (- (point) (line-beginning-position)) indent-offset) - (delete-char (- indent-offset))) - (forward-line 1))) - (delete-trailing-whitespace (point-min) (point-max)) - (setf (flycheck-error-message err) - (buffer-substring-no-properties (point-min) (point-max)))))) - errors) - -(defun flycheck-fold-include-levels (errors sentinel-message) - "Fold levels of ERRORS from included files. - -ERRORS is a list of `flycheck-error' objects. SENTINEL-MESSAGE -is a regular expression matched against the error message to -determine whether the error denotes errors from an included -file. Alternatively, it is a function that is given an error and -shall return non-nil, if the error denotes errors from an -included file." - (unless (or (stringp sentinel-message) (functionp sentinel-message)) - (error "Sentinel must be string or function: %S" sentinel-message)) - (let ((sentinel (if (functionp sentinel-message) - sentinel-message - (lambda (err) - (string-match-p sentinel-message - (flycheck-error-message err))))) - (remaining-errors errors)) - (while remaining-errors - (let* ((current-error (pop remaining-errors))) - (when (funcall sentinel current-error) - ;; We found an error denoting errors in the included file: - ;; 1. process all subsequent errors until faulty include file is found - ;; 2. process again all subsequent errors until an error has the - ;; current file name again - ;; 3. find the most severe error level - (let ((current-filename (flycheck-error-filename current-error)) - (current-level nil) - (faulty-include-filename nil) - (filename nil) - (done (null remaining-errors))) - - (while (not done) - (setq filename (flycheck-error-filename (car remaining-errors))) - (unless faulty-include-filename - (unless (string= filename current-filename) - (setq faulty-include-filename filename))) - - (let* ((error-in-include (pop remaining-errors)) - (in-include-level (flycheck-error-level error-in-include))) - (unless (funcall sentinel error-in-include) - ;; Ignore nested "included file" errors, we are only - ;; interested in real errors because these define our level - (when (or (not current-level) - (> (flycheck-error-level-severity in-include-level) - (flycheck-error-level-severity current-level))) - (setq current-level in-include-level)))) - - (setq done (or (null remaining-errors) - (and faulty-include-filename - (string= filename current-filename))))) - - (setf (flycheck-error-level current-error) current-level - (flycheck-error-message current-error) - (format "In include %s" faulty-include-filename)))))) - errors)) - -(defun flycheck-dequalify-error-ids (errors) - "De-qualify error ids in ERRORS. - -Remove all qualifications from error ids in ERRORS, by stripping -all leading dotted components from error IDs. For instance, if -the error ID is com.foo.E100, replace it with E100. - -This error filter is mainly useful to simplify error IDs obtained -from parsing Checkstyle XML, which frequently has very verbose -IDs, that include the name of the tool." - (seq-do (lambda (err) - (let ((id (flycheck-error-id err))) - (when id - (setf (flycheck-error-id err) - (replace-regexp-in-string - (rx string-start - (group - (optional (zero-or-more not-newline) ".")) - (one-or-more (not (any "."))) - string-end) - "" id 'fixedcase 'literal 1))))) - errors) - errors) - -(defun flycheck-remove-error-ids (errors) - "Remove all error ids from ERRORS." - (seq-do (lambda (err) (setf (flycheck-error-id err) nil)) errors) - errors) - -(defun flycheck-fill-empty-line-numbers (errors) - "Set ERRORS without lines to line 0. - -Use as `:error-filter' for syntax checkers that output errors -without line numbers. - -Return ERRORS." - (seq-do (lambda (err) - (unless (flycheck-error-line err) - (setf (flycheck-error-line err) 0))) - errors) - errors) - - -;;; Error analysis -(defun flycheck-count-errors (errors) - "Count the number of ERRORS, grouped by level. - -Return an alist, where each ITEM is a cons cell whose `car' is an -error level, and whose `cdr' is the number of errors of that -level." - (let (counts-by-level) - (dolist (err errors) - (let* ((level (flycheck-error-level err)) - (item (assq level counts-by-level))) - (if item - (cl-incf (cdr item)) - (push (cons level 1) counts-by-level)))) - counts-by-level)) - -(defun flycheck-has-max-errors-p (errors level) - "Check if there is no error in ERRORS more severe than LEVEL." - (let ((severity (flycheck-error-level-severity level))) - (seq-every-p (lambda (e) (<= (flycheck-error-level-severity - (flycheck-error-level e)) - severity)) - errors))) - -(defun flycheck-has-max-current-errors-p (level) - "Check if there is no current error more severe than LEVEL." - (flycheck-has-max-errors-p flycheck-current-errors level)) - -(defun flycheck-has-errors-p (errors level) - "Determine if there are any ERRORS with LEVEL." - (seq-some (lambda (e) (eq (flycheck-error-level e) level)) errors)) - -(defun flycheck-has-current-errors-p (&optional level) - "Determine if the current buffer has errors with LEVEL. - -If LEVEL is omitted if the current buffer has any errors at all." - (if level - (flycheck-has-errors-p flycheck-current-errors level) - (and flycheck-current-errors t))) - - -;;; Error overlays in the current buffer -(defvar-local flycheck--last-overlay-index 0 - "Last index given to a Flycheck overlay. - -These indices are used to preserve error order (Emacs doesn't -preserve overlay order when calling `overlays-at').") - -(defun flycheck--next-overlay-index () - "Compute the index to assign to a new Flycheck overlay." - (cl-incf flycheck--last-overlay-index)) - -(defun flycheck--highlighting-style (err) - "Determine the highlighting style to apply to ERR. - -Styles are documented in `flycheck-highlighting-style'; this -functions resolves `conditional' style specifications." - (let* ((style flycheck-highlighting-style) - (first-line (flycheck-error-line err)) - (end-line (or (flycheck-error-end-line err) first-line)) - (nlines (- end-line first-line))) - (while (eq (car-safe style) 'conditional) - (pcase-let ((`(,threshold ,s1 ,s2) (cdr style))) - (setq style (if (< nlines threshold) s1 s2)))) - (pcase style - (`(delimiters ,before ,after) - (when (characterp before) - (setq before (flycheck--make-highlighting-delimiter before))) - (when (characterp after) - (setq after (flycheck--make-highlighting-delimiter after))) - (setq style `(delimiters ,before ,after)))) - style)) - -(defun flycheck--setup-highlighting (err overlay) - "Apply properties to OVERLAY to highlight ERR." - (let ((level (flycheck-error-level err))) - (unless flycheck-highlighting-mode - ;; Erase the highlighting from the overlay if requested by the user - (setf (overlay-get overlay 'face) nil)) - (when flycheck-indication-mode - (setf (overlay-get overlay 'before-string) - (flycheck-error-level-make-indicator - level flycheck-indication-mode)) - (setf (overlay-get overlay 'line-prefix) - (flycheck-error-level-make-indicator - level flycheck-indication-mode t))) - (pcase (flycheck--highlighting-style err) - ((or `nil (guard (null flycheck-highlighting-mode))) - ;; Erase the highlighting - (setf (overlay-get overlay 'face) nil)) - (`level-face) - (`(delimiters ,before ,after) - ;; Replace the highlighting with delimiters - (let* ((fringe-face (flycheck-error-level-fringe-face level)) - (delim-face `(flycheck-error-delimiter ,fringe-face))) - (setf (overlay-get overlay 'face) 'flycheck-delimited-error) - (setf (overlay-get overlay 'before-string) - (concat (propertize before 'face delim-face) - (or (overlay-get overlay 'before-string) ""))) - (setf (overlay-get overlay 'after-string) - (propertize after 'face delim-face)))) - (other (error "Unsupported highlighting style: %S" other))))) - -(defun flycheck-add-overlay (err) - "Add overlay for ERR. - -Return the created overlay." - ;; We must have a proper error region for the sake of fringe indication, - ;; error display and error navigation, even if the highlighting is disabled. - ;; We erase the highlighting later on in this case - (pcase-let* ((`(,beg . ,end) - (if (flycheck-relevant-error-other-file-p err) - ;; Display overlays for other-file errors on the first line - (cons (point-min) - (save-excursion (goto-char (point-min)) - (line-end-position))) - (flycheck-error-region-for-mode - err (or flycheck-highlighting-mode 'lines)))) - (overlay (make-overlay beg end)) - (level (flycheck-error-level err)) - (category (flycheck-error-level-overlay-category level)) - (index (flycheck--next-overlay-index))) - (unless (flycheck-error-level-p level) - (error "Undefined error level: %S" level)) - (setf (overlay-get overlay 'flycheck-error-index) index) - (setf (overlay-get overlay 'flycheck-overlay) t) - (setf (overlay-get overlay 'flycheck-error) err) - (setf (overlay-get overlay 'category) category) - (setf (overlay-get overlay 'help-echo) #'flycheck-help-echo) - (flycheck--setup-highlighting err overlay) - overlay)) - -(defun flycheck-help-echo (_window object pos) - "Construct a tooltip message. - -Most of the actual work is done by calling -`flycheck-help-echo-function' with the appropriate list of -errors. Arguments WINDOW, OBJECT and POS are as described in -info node `(elisp)Special properties', as this function is -intended to be used as the \\='help-echo property of flycheck error -overlays." - (when-let (buf (cond ((bufferp object) object) - ((overlayp object) (overlay-buffer object)))) - (with-current-buffer buf - (when-let* ((fn flycheck-help-echo-function) - (errs (flycheck-overlay-errors-at pos))) - (propertize (funcall fn errs) 'help-echo-inhibit-substitution t))))) - -(defun flycheck-help-echo-all-error-messages (errs) - "Concatenate error messages and ids from ERRS." - (pcase (delq nil errs) ;; FIXME why would errors be nil here? - (`(,err) ;; A single error - (flycheck-error-format-message-and-id err)) - (_ ;; Zero or multiple errors - (mapconcat - (lambda (err) - (flycheck-error-format-message-and-id err 'include-snippet)) - errs "\n")))) - -(defun flycheck-filter-overlays (overlays) - "Get all Flycheck overlays from OVERLAYS, in original order." - ;; The order of errors returned from overlays is not stable, so we sort - ;; them again using the internal index to guarantee errors are always - ;; displayed in the same order. - (seq-sort - ;; We can't use `seq-sort-by' here; see above - (lambda (o1 o2) (< (overlay-get o1 'flycheck-error-index) - (overlay-get o2 'flycheck-error-index))) - (seq-filter (lambda (o) (overlay-get o 'flycheck-overlay)) overlays))) - -(defun flycheck-overlays-at (pos) - "Get all Flycheck overlays at POS." - (flycheck-filter-overlays (overlays-at pos))) - -(defun flycheck-overlays-in (beg end) - "Get all Flycheck overlays between BEG and END." - (flycheck-filter-overlays (overlays-in beg end))) - -(defun flycheck-overlay-errors-at (pos) - "Return a list of all flycheck errors overlaid at POS." - (seq-map (lambda (o) (overlay-get o 'flycheck-error)) - (flycheck-overlays-at pos))) - -(defun flycheck-overlay-errors-in (beg end) - "Return a list of all flycheck errors overlaid between BEG and END." - (seq-map (lambda (o) (overlay-get o 'flycheck-error)) - (flycheck-overlays-in beg end))) - -(defvar-local flycheck-overlays-to-delete nil - "Overlays mark for deletion after all syntax checks completed.") -(put 'flycheck-overlays-to-delete 'permanent-local t) - -(defun flycheck-delete-all-overlays () - "Remove all flycheck overlays in the current buffer." - (overlay-recenter (point-max)) - (flycheck-delete-marked-overlays) - (setq flycheck--last-overlay-index 0) - (save-restriction - (widen) - (seq-do #'delete-overlay (flycheck-overlays-in (point-min) (point-max))))) - -(defun flycheck-mark-all-overlays-for-deletion () - "Mark all current overlays for deletion." - (setq flycheck-overlays-to-delete - (append (flycheck-overlays-in (point-min) (point-max)) - flycheck-overlays-to-delete))) - -(defun flycheck-delete-marked-overlays () - "Delete all overlays marked for deletion." - (overlay-recenter (point-max)) - (seq-do #'delete-overlay flycheck-overlays-to-delete) - (setq flycheck-overlays-to-delete nil)) - - -;;; Error navigation in the current buffer -(defun flycheck-error-level-interesting-at-pos-p (pos) - "Check if error severity at POS passes `flycheck-error-level-interesting-p'." - (flycheck-error-level-interesting-p (get-char-property pos 'flycheck-error))) - -(defun flycheck-error-level-interesting-p (err) - "Check if ERR severity is >= `flycheck-navigation-minimum-level'. - -ERR is also interesting (the function returns true) if there are -no errors as or more severe than `flycheck-navigation-minimum-level'." - (when (flycheck-error-p err) - (if-let (min-level flycheck-navigation-minimum-level) - (or (<= (flycheck-error-level-severity min-level) - (flycheck-error-level-severity (flycheck-error-level err))) - (not (flycheck-has-current-errors-p min-level))) - t))) - -(defun flycheck-next-error-pos (n &optional reset) - "Get the position of the N-th next error. - -With negative N, get the position of the (-N)-th previous error -instead. With non-nil RESET, search from `point-min', otherwise -search from the current point. - -Return the position of the next or previous error, or nil if -there is none. If N is zero, return `point', or `point-min' if -RESET is non-nil." - (let ((n (or n 1)) - (pos (if reset (point-min) (point)))) - (if (>= n 0) - ;; Search forwards - (while (and pos (> n 0)) - (setq n (1- n)) - (when (get-char-property pos 'flycheck-error) - ;; Move beyond from the current error if any - (setq pos (next-single-char-property-change pos 'flycheck-error))) - (while (not (or (= pos (point-max)) - (flycheck-error-level-interesting-at-pos-p pos))) - ;; Scan for the next error - (setq pos (next-single-char-property-change pos 'flycheck-error))) - (when (and (= pos (point-max)) - (not (flycheck-error-level-interesting-at-pos-p pos))) - ;; If we reached the end of the buffer, but no error, we didn't find - ;; any - (setq pos nil))) - ;; Search backwards - (while (and pos (< n 0)) - (setq n (1+ n)) - ;; Loop until we find an error. We need to check the position *before* - ;; the current one, because `previous-single-char-property-change' - ;; always moves to the position *of* the change. - (while (not (or (= pos (point-min)) - (flycheck-error-level-interesting-at-pos-p (1- pos)))) - (setq pos (previous-single-char-property-change pos 'flycheck-error))) - (when (and (= pos (point-min)) - (not (flycheck-error-level-interesting-at-pos-p pos))) - ;; We didn't find any error. - (setq pos nil)) - (when pos - ;; We found an error, so move to its beginning - (setq pos (previous-single-char-property-change pos - 'flycheck-error))))) - pos)) - -(defun flycheck-next-error-function (n reset) - "Visit the N-th error from the current point. - -N is the number of errors to advance by, where a negative N -advances backwards. With non-nil RESET, advance from the -beginning of the buffer, otherwise advance from the current -position. - -Intended for use with `next-error-function'." - (if-let* ((pos (flycheck-next-error-pos n reset)) - (err (get-char-property pos 'flycheck-error))) - (flycheck-jump-to-error err) - (user-error "No more Flycheck errors"))) - -(defun flycheck-next-error (&optional n reset) - "Visit the N-th error from the current point. - -N is the number of errors to advance by, where a negative N -advances backwards. With non-nil RESET, advance from the -beginning of the buffer, otherwise advance from the current -position." - (interactive "P") - (when (consp n) - ;; Universal prefix argument means reset - (setq reset t n nil)) - (flycheck-next-error-function n reset) - (flycheck-display-error-at-point)) - -(defun flycheck-previous-error (&optional n) - "Visit the N-th previous error. - -If given, N specifies the number of errors to move backwards by. -If N is negative, move forwards instead." - (interactive "P") - (flycheck-next-error (- (or n 1)))) - -(defun flycheck-first-error (&optional n) - "Visit the N-th error from beginning of the buffer. - -If given, N specifies the number of errors to move forward from -the beginning of the buffer." - (interactive "P") - (flycheck-next-error n 'reset)) - - -;;; Listing errors in buffers -(defconst flycheck-error-list-buffer "*Flycheck errors*" - "The name of the buffer to show error lists.") - -(defmacro flycheck-error-list-with-buffer (&rest body) - "Evaluate BODY in flycheck-error-list-buffer, if it exists." - (declare (indent 0) (debug t)) - `(when (get-buffer flycheck-error-list-buffer) - (with-current-buffer flycheck-error-list-buffer - ,@body))) - -(defvar flycheck-error-list-mode-map - (let ((map (make-sparse-keymap))) - (define-key map (kbd "f") #'flycheck-error-list-set-filter) - (define-key map (kbd "F") #'flycheck-error-list-reset-filter) - (define-key map (kbd "n") #'flycheck-error-list-next-error) - (define-key map (kbd "p") #'flycheck-error-list-previous-error) - (define-key map (kbd "g") #'flycheck-error-list-check-source) - (define-key map (kbd "e") #'flycheck-error-list-explain-error) - (define-key map (kbd "RET") #'flycheck-error-list-goto-error) - map) - "The keymap of `flycheck-error-list-mode'.") - -(defun flycheck-error-list-make-last-column (message checker) - "Compute contents of the last error list cell. - -MESSAGE and CHECKER are displayed in a single column to allow the -message to stretch arbitrarily far." - (let ((checker-name (propertize (symbol-name checker) - 'face 'flycheck-error-list-checker-name)) - (message (propertize message - 'face 'flycheck-error-list-error-message))) - (format "%s (%s)" message checker-name))) - -(defconst flycheck-error-list-format - `[("File" 6) - ("Line" 5 flycheck-error-list-entry-< :right-align t) - ("Col" 3 nil :right-align t) - ("Level" 8 flycheck-error-list-entry-level-<) - ("ID" 6 t) - (,(flycheck-error-list-make-last-column "Message" 'Checker) 0 t)] - "Table format for the error list.") - -(defconst flycheck-error-list-padding 1 - "Padding used in error list.") - -(defconst flycheck--error-list-msg-offset - (seq-reduce - (lambda (offset fmt) - (pcase-let* ((`(,_ ,width ,_ . ,props) fmt) - (padding (or (plist-get props :pad-right) 1))) - (+ offset width padding))) - (seq-subseq flycheck-error-list-format 0 -1) - flycheck-error-list-padding) - "Amount of space to use in `flycheck-flush-multiline-message'.") - -(define-derived-mode flycheck-error-list-mode tabulated-list-mode - "Flycheck errors" - "Major mode for listing Flycheck errors. - -\\{flycheck-error-list-mode-map}" - (setq tabulated-list-format flycheck-error-list-format - ;; Sort by location initially - tabulated-list-sort-key (cons "Line" nil) - tabulated-list-padding flycheck-error-list-padding - tabulated-list-entries #'flycheck-error-list-entries - ;; `revert-buffer' updates the mode line for us, so all we need to do is - ;; set the corresponding mode line construct. - mode-line-buffer-identification flycheck-error-list-mode-line) - ;; See https://github.com/flycheck/flycheck/issues/1101 - (setq-local truncate-string-ellipsis "…") - (tabulated-list-init-header)) - -(defvar-local flycheck-error-list-source-buffer nil - "The current source buffer of the error list.") -;; Needs to permanently local to preserve the source buffer across buffer -;; reversions -(put 'flycheck-error-list-source-buffer 'permanent-local t) - -(defun flycheck-error-list-set-source (buffer) - "Set BUFFER as the source buffer of the error list." - (flycheck-error-list-with-buffer - (setq flycheck-error-list-source-buffer buffer) - (flycheck-error-list-refresh))) - -(defun flycheck-error-list-update-source () - "Make the error list display errors from the current buffer. - -The update is skipped if the current buffer is the error list or -if the error list is already pointing to the current buffer." - (unless (memq (current-buffer) - (list (get-buffer flycheck-error-list-buffer) - (flycheck-error-list-with-buffer - flycheck-error-list-source-buffer))) - (flycheck-error-list-set-source (current-buffer)))) - -(defun flycheck-error-list-check-source () - "Trigger a syntax check in the source buffer of the error list." - (interactive) - (let ((buffer (get-buffer flycheck-error-list-source-buffer))) - (when (buffer-live-p buffer) - (with-current-buffer buffer - (flycheck-buffer))))) - -(define-button-type 'flycheck-error-list - 'action #'flycheck-error-list-goto-error - 'help-echo "mouse-1, RET: goto error" - 'face nil) - -(define-button-type 'flycheck-error-list-explain-error - 'action #'flycheck-error-list-explain-error - 'help-echo "mouse-1, RET: explain error") - -(defsubst flycheck-error-list-make-cell (text &optional face help-echo type) - "Make an error list cell with TEXT and FACE. - -If FACE is nil don't set a FACE on TEXT. If TEXT already has -face properties, do not specify a FACE. Note though, that if -TEXT gets truncated it will not inherit any previous face -properties. If you expect TEXT to be truncated in the error -list, do specify a FACE explicitly! - -If HELP-ECHO is non-nil, set a help-echo property on TEXT, with -value HELP-ECHO. This is convenient if you expect TEXT to be -truncated. - -The cell will have the type TYPE unless TYPE is nil, and the -default type `flycheck-error-list' will be used instead." - (append (list text 'type (if type type - 'flycheck-error-list)) - (and face (list 'face face)) - (and help-echo (list 'help-echo help-echo)))) - -(defsubst flycheck-error-list-make-number-cell (number face) - "Make a table cell for a NUMBER with FACE. - -Convert NUMBER to string, fontify it with FACE and return the -string with attached text properties." - (flycheck-error-list-make-cell - (if (numberp number) (number-to-string number) "") - face)) - -(defun flycheck-error-list-make-entry (error) - "Make a table cell for the given ERROR. - -Return a list with the contents of the table cell." - (let* ((level (flycheck-error-level error)) - (level-face (flycheck-error-level-error-list-face level)) - (filename (flycheck-error-filename error)) - (line (flycheck-error-line error)) - (column (flycheck-error-column error)) - (message (or (flycheck-error-message error) - (format "Unknown %S" level))) - (flushed-msg (flycheck-flush-multiline-message message)) - (id (flycheck-error-id error)) - (id-str (if id (format "%s" id) "")) - (checker (flycheck-error-checker error)) - (msg-and-checker - (flycheck-error-list-make-last-column flushed-msg checker)) - (explainer (flycheck-checker-get checker 'error-explainer))) - (list error - (vector (flycheck-error-list-make-cell - (if filename - (file-name-nondirectory filename) - "") - 'flycheck-error-list-filename) - (flycheck-error-list-make-number-cell - line 'flycheck-error-list-line-number) - (flycheck-error-list-make-number-cell - column 'flycheck-error-list-column-number) - (flycheck-error-list-make-cell - (symbol-name (flycheck-error-level error)) level-face) - ;; Error ID use a different face when an error-explainer is - ;; present - (flycheck-error-list-make-cell - id-str (if explainer 'flycheck-error-list-id-with-explainer - 'flycheck-error-list-id) - id-str 'flycheck-error-list-explain-error) - (flycheck-error-list-make-cell - msg-and-checker nil msg-and-checker))))) - -(defun flycheck-flush-multiline-message (msg) - "Prepare error message MSG for display in the error list. - -Prepend all lines of MSG except the first with enough space to -ensure that they line up properly once the message is displayed." - (let* ((spc-spec `(space . (:width ,flycheck--error-list-msg-offset))) - (spc (propertize " " 'display spc-spec)) - (rep (concat "\\1" spc "\\2"))) - (replace-regexp-in-string "\\([\r\n]+\\)\\(.\\)" rep msg))) - -(defun flycheck-error-list-current-errors () - "Read the list of errors in `flycheck-error-list-source-buffer'." - (when (buffer-live-p flycheck-error-list-source-buffer) - (buffer-local-value 'flycheck-current-errors - flycheck-error-list-source-buffer))) - -(defun flycheck-error-list-entries () - "Create the entries for the error list." - (when-let* ((errors (flycheck-error-list-current-errors)) - (filtered (flycheck-error-list-apply-filter errors))) - (seq-map #'flycheck-error-list-make-entry filtered))) - -(defun flycheck-error-list-entry-< (entry1 entry2) - "Determine whether ENTRY1 is before ENTRY2 by location. - -See `flycheck-error-<'." - (flycheck-error-< (car entry1) (car entry2))) - -(defun flycheck-error-list-entry-level-< (entry1 entry2) - "Determine whether ENTRY1 is before ENTRY2 by level. - -See `flycheck-error-level-<'." - (not (flycheck-error-level-< (car entry1) (car entry2)))) - -(defvar flycheck-error-list-mode-line-map - (let ((map (make-sparse-keymap))) - (define-key map [mode-line mouse-1] - #'flycheck-error-list-mouse-switch-to-source) - map) - "Keymap for error list mode line.") - -(defun flycheck-error-list-propertized-source-name () - "Get the name of the current source buffer for the mode line. - -Propertize the name of the current source buffer for use in the -mode line indication of `flycheck-error-list-mode'." - (let ((name (replace-regexp-in-string - (rx "%") "%%" - (buffer-name flycheck-error-list-source-buffer) - 'fixed-case 'literal))) - (propertize name 'face 'mode-line-buffer-id - 'mouse-face 'mode-line-highlight - 'help-echo "mouse-1: switch to source" - 'local-map flycheck-error-list-mode-line-map))) - -(defun flycheck-error-list-mouse-switch-to-source (event) - "Switch to the error list source buffer of the EVENT window." - (interactive "e") - (save-selected-window - (when (eventp event) - (select-window (posn-window (event-start event)))) - (when (buffer-live-p flycheck-error-list-source-buffer) - (switch-to-buffer flycheck-error-list-source-buffer)))) - -(defun flycheck-get-error-list-window-list (&optional all-frames) - "Get all windows displaying the error list. - -ALL-FRAMES specifies the frames to consider, as in -`get-buffer-window-list'." - (when-let (buf (get-buffer flycheck-error-list-buffer)) - (get-buffer-window-list buf nil all-frames))) - -(defun flycheck-get-error-list-window (&optional all-frames) - "Get a window displaying the error list, or nil if none. - -ALL-FRAMES specifies the frames to consider, as in -`get-buffer-window'." - (when-let (buf (get-buffer flycheck-error-list-buffer)) - (get-buffer-window buf all-frames))) - -(defun flycheck-error-list-recenter-at (pos) - "Recenter the error list at POS." - (dolist (window (flycheck-get-error-list-window-list t)) - (with-selected-window window - (goto-char pos) - (let ((recenter-redisplay nil)) - (recenter))))) - -(defun flycheck-error-list-refresh () - "Refresh the current error list. - -Add all errors currently reported for the current -`flycheck-error-list-source-buffer', and recenter the error -list." - ;; We only refresh the error list, when it is visible in a window, and we - ;; select this window while reverting, because Tabulated List mode attempts to - ;; recenter the error at the old location, so it must have the proper window - ;; selected. - (when-let (window (flycheck-get-error-list-window t)) - (with-selected-window window - (revert-buffer)) - (run-hooks 'flycheck-error-list-after-refresh-hook) - (let ((preserve-pos (eq (current-buffer) - (get-buffer flycheck-error-list-buffer)))) - ;; If the error list is the current buffer, don't recenter when - ;; highlighting - (flycheck-error-list-highlight-errors preserve-pos)))) - -(defun flycheck-error-list-mode-line-filter-indicator () - "Create a string representing the current error list filter." - (if flycheck-error-list-minimum-level - (format " [>= %s]" flycheck-error-list-minimum-level) - "")) - -(defun flycheck-error-list-set-filter (level) - "Restrict the error list to errors at level LEVEL or higher. - -LEVEL is either an error level symbol, or nil, to remove the filter." - (interactive - (list (flycheck-read-error-level - "Minimum error level (errors at lower levels will be hidden): "))) - (when (and level (not (flycheck-error-level-p level))) - (user-error "Invalid level: %s" level)) - (flycheck-error-list-with-buffer - (setq-local flycheck-error-list-minimum-level level) - (force-mode-line-update) - (flycheck-error-list-refresh) - (flycheck-error-list-recenter-at (point-min)))) - -(defun flycheck-error-list-reset-filter (&optional refresh) - "Remove local error filters and reset to the default filter. - -Interactively, or with non-nil REFRESH, refresh the error list." - (interactive '(t)) - (flycheck-error-list-with-buffer - (kill-local-variable 'flycheck-error-list-minimum-level) - (when refresh - (flycheck-error-list-refresh) - (flycheck-error-list-recenter-at (point-min)) - (force-mode-line-update)))) - -(defun flycheck-error-list-apply-filter (errors) - "Filter ERRORS according to `flycheck-error-list-minimum-level'." - (if-let* ((min-level flycheck-error-list-minimum-level) - (min-severity (flycheck-error-level-severity min-level))) - (seq-filter (lambda (err) (>= (flycheck-error-level-severity - (flycheck-error-level err)) - min-severity)) - errors) - errors)) - -(defun flycheck-error-list-goto-error (&optional pos) - "Go to the location of the error at POS in the error list. - -POS defaults to `point'." - (interactive) - (when-let* ((error (tabulated-list-get-id pos))) - (flycheck-jump-to-error error))) - -(defun flycheck-jump-to-error (error) - "Go to the location of ERROR." - (let* ((error-copy (copy-flycheck-error error)) - (filename (flycheck-error-filename error)) - (other-file-error (flycheck-relevant-error-other-file-p error)) - (buffer (if filename - (find-file-noselect filename) - (flycheck-error-buffer error)))) - (when (buffer-live-p buffer) - (setf (flycheck-error-buffer error-copy) buffer) - (flycheck-jump-in-buffer buffer error-copy) - ;; When jumping to an error in another file, it may not have - ;; this error available for highlighting yet, so we trigger a check - ;; if necessary. - (when other-file-error - (with-current-buffer buffer - ;; `seq-contains-p' is only in seq >= 2.21 - (unless (with-no-warnings - (seq-contains flycheck-current-errors error-copy 'equal)) - (when flycheck-mode - (flycheck-buffer)))))))) - -(defun flycheck-jump-in-buffer (buffer error) - "In BUFFER, jump to ERROR." - ;; FIXME: we assume BUFFER and the buffer of ERROR are the same. We don't - ;; need the first argument then. - (if (eq (window-buffer) (get-buffer flycheck-error-list-buffer)) - ;; When called from within the error list, keep the error list, - ;; otherwise replace the current buffer. - (pop-to-buffer buffer 'other-window) - (switch-to-buffer buffer)) - (let ((pos (flycheck-error-pos error))) - (unless (eq (goto-char pos) (point)) - ;; If widening gets in the way of moving to the right place, remove it - ;; and try again - (widen) - (goto-char pos))) - ;; Re-highlight the errors. We have post-command-hook for that, but calls to - ;; `flycheck-jump-in-buffer' that come from other buffers (e.g. from the error - ;; list) won't trigger it. - (flycheck-error-list-highlight-errors 'preserve-pos)) - -(defun flycheck-error-list-explain-error (&optional pos) - "Explain the error at POS in the error list. - -POS defaults to `point'." - (interactive) - (when-let* ((error (tabulated-list-get-id pos)) - (explainer (flycheck-checker-get (flycheck-error-checker error) - 'error-explainer))) - (flycheck-error-with-buffer error - (when-let (explanation (funcall explainer error)) - (flycheck-display-error-explanation explanation))))) - -(defun flycheck-error-list-next-error-pos (pos &optional n) - "Starting from POS get the N'th next error in the error list. - -N defaults to 1. If N is negative, search for the previous error -instead. - -Get the beginning position of the N'th next error from POS, or -nil, if there is no next error." - (let ((n (or n 1))) - (if (>= n 0) - ;; Search forward - (while (and pos (/= n 0)) - (setq n (1- n)) - (setq pos (next-single-property-change pos 'tabulated-list-id))) - ;; Search backwards - (while (/= n 0) - (setq n (1+ n)) - ;; We explicitly give the limit here to explicitly have the minimum - ;; point returned, to be able to move to the first error (which starts - ;; at `point-min') - (setq pos (previous-single-property-change pos 'tabulated-list-id - nil (point-min))))) - pos)) - -(defun flycheck-error-list-previous-error (n) - "Go to the N'th previous error in the error list." - (interactive "P") - (flycheck-error-list-next-error (- (or n 1)))) - -(defun flycheck-error-list-next-error (n) - "Go to the N'th next error in the error list." - (interactive "P") - (let ((pos (flycheck-error-list-next-error-pos (point) n))) - (when (and pos (/= pos (point))) - (goto-char pos) - (save-selected-window - ;; Keep the error list selected, so that the user can navigate errors by - ;; repeatedly pressing n/p, without having to re-select the error list - ;; window. - (flycheck-error-list-goto-error))))) - -(defvar-local flycheck-error-list-highlight-overlays nil - "Error highlight overlays in the error list buffer.") -(put 'flycheck-error-list-highlight-overlays 'permanent-local t) - -(defun flycheck-error-list-highlight-errors (&optional preserve-pos) - "Highlight errors in the error list. - -Highlight all errors in the error list that are at point in the -source buffer, and on the same line as point. Then recenter the -error list to the highlighted error, unless PRESERVE-POS is -non-nil." - (when (get-buffer flycheck-error-list-buffer) - (with-current-buffer flycheck-error-list-buffer - (let ((current-errors - (when (buffer-live-p flycheck-error-list-source-buffer) - (with-current-buffer flycheck-error-list-source-buffer - (flycheck-overlay-errors-in (line-beginning-position) - (line-end-position)))))) - (let ((old-overlays flycheck-error-list-highlight-overlays) - (min-point (point-max)) - (max-point (point-min))) - ;; Display the new overlays first, to avoid re-display flickering - (setq flycheck-error-list-highlight-overlays nil) - (when current-errors - (let ((next-error-pos (point-min))) - (while next-error-pos - (let* ((beg next-error-pos) - (end (flycheck-error-list-next-error-pos beg)) - (err (tabulated-list-get-id beg))) - (when (member err current-errors) - (setq min-point (min min-point beg) - max-point (max max-point beg)) - (let ((ov (make-overlay beg - ;; Extend overlay to the beginning - ;; of the next line, to highlight - ;; the whole line - (or end (point-max))))) - (push ov flycheck-error-list-highlight-overlays) - (setf (overlay-get ov 'flycheck-error-highlight-overlay) - t) - (setf (overlay-get ov 'face) - 'flycheck-error-list-highlight))) - (setq next-error-pos end))))) - ;; Delete the old overlays - (seq-do #'delete-overlay old-overlays) - (when (and (not preserve-pos) current-errors) - ;; Move point to the middle error - (goto-char (+ min-point (/ (- max-point min-point) 2))) - (beginning-of-line) - ;; And recenter the error list at this position - (flycheck-error-list-recenter-at (point)))))))) - -(defun flycheck-list-errors () - "Show the error list for the current buffer." - (interactive) - (unless flycheck-mode - (user-error "Flycheck mode not enabled")) - ;; Create and initialize the error list - (unless (get-buffer flycheck-error-list-buffer) - (with-current-buffer (get-buffer-create flycheck-error-list-buffer) - (flycheck-error-list-mode))) - ;; Reset the error filter - (flycheck-error-list-reset-filter) - (let ((source (current-buffer))) - ;; Show the error list in a side window. Under some configurations of - ;; `display-buffer', this may select `flycheck-error-list-buffer' (see URL - ;; `https://github.com/flycheck/flycheck/issues/1776'). - (display-buffer flycheck-error-list-buffer) - ;; Adjust the source, causing a refresh - (flycheck-error-list-set-source source))) - -(defalias 'list-flycheck-errors 'flycheck-list-errors) - - -;;; Displaying errors in the current buffer -(defun flycheck-display-errors (errors) - "Display ERRORS using `flycheck-display-errors-function'." - (when flycheck-display-errors-function - (funcall flycheck-display-errors-function errors))) - -(defun flycheck-clear-displayed-errors () - "Clear errors using `flycheck-clear-displayed-errors-function'." - (when flycheck-clear-displayed-errors-function - (funcall flycheck-clear-displayed-errors-function))) - -(defvar-local flycheck-display-error-at-point-timer nil - "Timer to automatically show errors.") - -(defun flycheck-cancel-error-display-error-at-point-timer () - "Cancel the error display timer for the current buffer." - (when flycheck-display-error-at-point-timer - (cancel-timer flycheck-display-error-at-point-timer) - (setq flycheck-display-error-at-point-timer nil))) - -(defun flycheck-display-error-at-point () - "Display all the error messages at point. - -If there are no errors, clears the error messages at point." - (interactive) - ;; This function runs from a timer, so we must take care to not ignore any - ;; errors - (with-demoted-errors "Flycheck error display error: %s" - (flycheck-cancel-error-display-error-at-point-timer) - (when flycheck-mode - (let ((errors (flycheck-overlay-errors-at (point)))) - (if errors - (flycheck-display-errors errors) - (flycheck-clear-displayed-errors)))))) - -(defun flycheck-display-error-at-point-soon () - "Display error messages at point, with a delay." - (flycheck-cancel-error-display-error-at-point-timer) - (setq flycheck-display-error-at-point-timer - (run-at-time flycheck-display-errors-delay nil - 'flycheck-display-error-at-point))) - - -;;; Functions to display errors -(defconst flycheck-error-message-buffer "*Flycheck error messages*" - "The name of the buffer to show long error messages in.") - -(defun flycheck-error-message-buffer () - "Get the buffer object to show long error messages in. - -Get the buffer named by variable `flycheck-error-message-buffer', -or nil if the buffer does not exist." - (get-buffer flycheck-error-message-buffer)) - -(defun flycheck-may-use-echo-area-p () - "Determine whether the echo area may be used. - -The echo area may be used if the cursor is not in the echo area, -and if the echo area is not occupied by minibuffer input." - (not (or cursor-in-echo-area (active-minibuffer-window)))) - -(define-derived-mode flycheck-error-message-mode text-mode - "Flycheck error messages" - "Major mode for extended error messages.") - -(defvar flycheck--last-displayed-message nil - "Reference to the last displayed message so it can be cleared. - -This value is the return value from `display-message-or-buffer', -thus it can be a string or a window. - -See `flycheck-clear-displayed-error-messages'.") - -(defun flycheck-display-error-messages (errors) - "Display the messages of ERRORS. - -Concatenate all non-nil messages of ERRORS as with -`flycheck-help-echo-all-error-messages', and display them with -`display-message-or-buffer', which shows the messages either in -the echo area or in a separate buffer, depending on the number of -lines. See Info node `(elisp)Displaying Messages' for more -information. - -In the latter case, show messages in the buffer denoted by -variable `flycheck-error-message-buffer'." - (when (and errors (flycheck-may-use-echo-area-p)) - (let* ((message (flycheck-help-echo-all-error-messages errors)) - (retval (display-message-or-buffer - message flycheck-error-message-buffer 'not-this-window))) - ;; We cannot rely on `display-message-or-buffer' returning the right - ;; window. See URL `https://github.com/flycheck/flycheck/issues/1643'. - (when-let (buf (get-buffer flycheck-error-message-buffer)) - (with-current-buffer buf - (unless (derived-mode-p 'flycheck-error-message-mode) - (flycheck-error-message-mode)))) - (setq flycheck--last-displayed-message retval) - retval))) - -(defun flycheck-display-error-messages-unless-error-list (errors) - "Show messages of ERRORS unless the error list is visible. - -Like `flycheck-display-error-messages', but only if the error -list (see `flycheck-list-errors') is not visible in any window in -the current frame." - (unless (flycheck-get-error-list-window 'current-frame) - (flycheck-display-error-messages errors))) - -(defun flycheck-hide-error-buffer () - "Hide the Flycheck error buffer if necessary. - -Hide the error buffer if there is no error under point." - (when-let* ((buffer (flycheck-error-message-buffer)) - (window (get-buffer-window buffer))) - (unless (flycheck-overlays-at (point)) - ;; save-selected-window prevents `quit-window' from changing the current - ;; buffer (see https://github.com/flycheck/flycheck/issues/648). - (save-selected-window - (quit-window nil window))))) - -(defun flycheck-clear-displayed-error-messages () - "Clear error messages displayed by `flycheck-display-error-messages'." - (when flycheck--last-displayed-message - (if (and (stringp flycheck--last-displayed-message) - (equal (current-message) flycheck--last-displayed-message)) - (message nil) - (flycheck-hide-error-buffer)))) - - -;;; Working with errors -(defun flycheck-copy-errors-as-kill (pos &optional formatter) - "Copy each error at POS into kill ring, using FORMATTER. - -FORMATTER is a function to turn an error into a string, -defaulting to `flycheck-error-message'. - -Interactively, use `flycheck-error-format-message-and-id' as -FORMATTER with universal prefix arg, and `flycheck-error-id' with -normal prefix arg, i.e. copy the message and the ID with -universal prefix arg, and only the id with normal prefix arg." - (interactive (list (point) - (pcase current-prefix-arg - ((pred not) #'flycheck-error-message) - ((pred consp) #'flycheck-error-format-message-and-id) - (_ #'flycheck-error-id)))) - (let ((messages (delq nil (seq-map (or formatter #'flycheck-error-message) - (flycheck-overlay-errors-at pos))))) - (when messages - (seq-do #'kill-new (reverse messages)) - (message (string-join messages "\n"))))) - -(defun flycheck-explain-error-at-point () - "Display an explanation for the first explainable error at point. - -The first explainable error at point is the first error at point -with a non-nil `:error-explainer' function defined in its -checker. The `:error-explainer' function is then called with -this error to produce the explanation to display." - (interactive) - (when-let* ((first-error - ;; Get the first error at point that has an `error-explainer'. - (seq-find (lambda (error) - (flycheck-checker-get - (flycheck-error-checker error) 'error-explainer)) - (flycheck-overlay-errors-at (point)))) - (explainer - (flycheck-checker-get (flycheck-error-checker first-error) - 'error-explainer)) - (explanation (funcall explainer first-error))) - (flycheck-display-error-explanation explanation))) - -(defconst flycheck-explain-error-buffer "*Flycheck error explanation*" - "The name of the buffer to show error explanations.") - -(define-derived-mode flycheck-explain-error-mode help-mode - "Error explanation" - "Major mode for displaying error explanations." - (setq buffer-read-only t)) - -(defun flycheck-display-error-explanation (explanation) - "Display the EXPLANATION for an error." - (pcase explanation - (`nil) - (`(url . ,url) (browse-url url)) - (_ (let ((inhibit-read-only t) - (standard-output (temp-buffer-window-setup - flycheck-explain-error-buffer))) - (with-current-buffer standard-output - (flycheck-explain-error-mode)) - (cond - ((functionp explanation) (funcall explanation)) - ((stringp explanation) (princ explanation)) - (t (error "Unsupported error explanation: %S" explanation))) - (display-message-or-buffer standard-output nil 'not-this-window))))) - - -;;; Syntax checkers using external commands -(defun flycheck-command-argument-p (arg) - "Check whether ARG is a valid command argument." - (pcase arg - ((pred stringp) t) - ((or `source `source-inplace `source-original) t) - (`(,(or `source `source-inplace) ,suffix) - (stringp suffix)) - ((or `temporary-directory `temporary-file-name) t) - (`null-device t) - (`(config-file ,option-name ,config-file-var) - (and (stringp option-name) - (symbolp config-file-var))) - (`(config-file ,option-name ,config-file-var ,prepender) - (and (stringp option-name) - (symbolp config-file-var) - (symbolp prepender))) - (`(,(or `option `option-list) ,option-name ,option-var) - (and (stringp option-name) - (symbolp option-var))) - (`(,(or `option `option-list) ,option-name ,option-var ,prepender) - (and (stringp option-name) - (symbolp option-var) - (symbolp prepender))) - (`(,(or `option `option-list) ,option-name ,option-var ,prepender ,filter) - (and (stringp option-name) - (symbolp option-var) - (symbolp prepender) - (symbolp filter))) - (`(option-flag ,option-name ,option-var) - (and (stringp option-name) - (symbolp option-var))) - (`(eval ,_) t) - (_ nil))) - -(defun flycheck-compute-working-directory (checker) - "Get the default working directory for CHECKER. - -Compute the value of `default-directory' for the invocation of -the syntax checker command, by calling the function in the -`working-directory' property of CHECKER, with CHECKER as sole -argument, and returning its value. Signal an error if the -function returns a non-existing working directory. - -If the property is undefined or if the function returns nil -return the `default-directory' of the current buffer." - (let* ((def-directory-fn (flycheck-checker-get checker 'working-directory)) - (directory (or (and def-directory-fn - (funcall def-directory-fn checker)) - ;; Default to the `default-directory' of the current - ;; buffer - default-directory))) - (unless (file-exists-p directory) - (error ":working-directory %s of syntax checker %S does not exist" - directory checker)) - directory)) - -;;;###autoload -(defun flycheck-define-command-checker (symbol docstring &rest properties) - "Define SYMBOL as syntax checker to run a command. - -Define SYMBOL as generic syntax checker via -`flycheck-define-generic-checker', which uses an external command -to check the buffer. SYMBOL and DOCSTRING are the same as for -`flycheck-define-generic-checker'. - -In addition to the properties understood by -`flycheck-define-generic-checker', the following PROPERTIES -constitute a command syntax checker. Unless otherwise noted, all -properties are mandatory. Note that the default `:error-filter' -of command checkers is `flycheck-sanitize-errors'. - -`:command COMMAND' - The command to run for syntax checking. - - COMMAND is a list of the form `(EXECUTABLE [ARG ...])'. - - EXECUTABLE is a string with the executable of this syntax - checker. It can be overridden with the variable - `flycheck-SYMBOL-executable'. Note that this variable is - NOT implicitly defined by this function. Use - `flycheck-def-executable-var' to define this variable. - - Each ARG is an argument to the executable, either as string, - or as special symbol or form for - `flycheck-substitute-argument', which see. - -`:error-patterns PATTERNS' - A list of patterns to parse the output of the `:command'. - - Each ITEM in PATTERNS is a list `(LEVEL SEXP ...)', where - LEVEL is a Flycheck error level (see - `flycheck-define-error-level'), followed by one or more RX - `SEXP's which parse an error of that level and extract line, - column, file name and the message. - - See `rx' for general information about RX, and - `flycheck-rx-to-string' for some special RX forms provided - by Flycheck. - - All patterns are applied in the order of declaration to the - whole output of the syntax checker. Output already matched - by a pattern will not be matched by subsequent patterns. In - other words, the first pattern wins. - - This property is optional. If omitted, however, an - `:error-parser' is mandatory. - -`:error-parser FUNCTION' - A function to parse errors with. - - The function shall accept three arguments OUTPUT CHECKER - BUFFER. OUTPUT is the syntax checker output as string, - CHECKER the syntax checker that was used, and BUFFER a - buffer object representing the checked buffer. The function - must return a list of `flycheck-error' objects parsed from - OUTPUT. - - This property is optional. If omitted, it defaults to - `flycheck-parse-with-patterns'. In this case, - `:error-patterns' is mandatory. - -`:standard-input t' - Whether to send the buffer contents on standard input. - - If this property is given and has a non-nil value, send the - contents of the buffer on standard input. - - Some checkers that support reading from standard input have - a separate flag to indicate the name of the file whose - contents are being passed on standard input (typically - `stdin-filename'). In that case, use the `(option)' form in - `:command' to pass the value of variable `buffer-file-name' - when the current buffer has a file name (that is, - use `option \"--stdin-file-name\" buffer-file-name'). - - For buffers not backed by files, checkers that support input - on stdin typically report a file name like `-' or `'. - Make sure your error parser or patterns expect these file - names (for example, use `(or \"\" (file-name))') or - call `flycheck-remove-error-file-names' in a custom - `:error-filter'. - - Defaults to nil. - -Note that you may not give `:start', `:interrupt', and -`:print-doc' for a command checker. You can give a custom -`:verify' function, though, whose results will be appended to the -default `:verify' function of command checkers." - (declare (indent 1) - (doc-string 2)) - (dolist (prop '(:start :interrupt :print-doc)) - (when (plist-get properties prop) - (error "%s not allowed in definition of command syntax checker %s" - prop symbol))) - - (unless (plist-get properties :error-filter) - ;; Default to `flycheck-sanitize-errors' as error filter - (setq properties (plist-put properties :error-filter - #'flycheck-sanitize-errors))) - (let ((verify-fn (plist-get properties :verify))) - (setq properties - (plist-put properties :verify - (lambda (checker) - (append (flycheck-verify-command-checker checker) - (and verify-fn - (funcall verify-fn checker))))))) - - (let ((command (plist-get properties :command)) - (patterns (plist-get properties :error-patterns)) - (parser (or (plist-get properties :error-parser) - #'flycheck-parse-with-patterns)) - (enabled (plist-get properties :enabled)) - (standard-input (plist-get properties :standard-input))) - (unless command - (error "Missing :command in syntax checker %s" symbol)) - (unless (stringp (car command)) - (error "Command executable for syntax checker %s must be a string: %S" - symbol (car command))) - (dolist (arg (cdr command)) - (unless (flycheck-command-argument-p arg) - (error "Invalid command argument %S in syntax checker %s" arg symbol))) - (when (and (eq parser 'flycheck-parse-with-patterns) - (not patterns)) - (error "Missing :error-patterns in syntax checker %s" symbol)) - - (setq properties - ;; Automatically disable command checkers if the executable does not - ;; exist. - (plist-put properties :enabled - (lambda () - (and (flycheck-find-checker-executable symbol) - (flycheck-temp-files-writable-p symbol) - (or (not enabled) (funcall enabled)))))) - - (apply #'flycheck-define-generic-checker symbol docstring - :start #'flycheck-start-command-checker - :interrupt #'flycheck-interrupt-command-checker - :print-doc #'flycheck-command-checker-print-doc - properties) - - ;; Pre-compile all errors patterns into strings, so that we don't need to do - ;; that on each error parse - (let ((patterns (seq-map (lambda (p) - (cons (flycheck-rx-to-string `(and ,@(cdr p)) - 'no-group) - (car p))) - patterns))) - (pcase-dolist (`(,prop . ,value) - `((command . ,command) - (error-parser . ,parser) - (error-patterns . ,patterns) - (standard-input . ,standard-input))) - (setf (flycheck-checker-get symbol prop) value))))) - -(eval-and-compile - ;; Make this function available during byte-compilation, since we need it - ;; at macro expansion of `flycheck-def-executable-var'. - (defun flycheck-checker-executable-variable (checker) - "Get the executable variable of CHECKER. - -The executable variable is named `flycheck-CHECKER-executable'." - (intern (format "flycheck-%s-executable" checker)))) - -(defun flycheck-checker-default-executable (checker) - "Get the default executable of CHECKER." - (car (flycheck-checker-get checker 'command))) - -(defun flycheck-checker-executable (checker) - "Get the command executable of CHECKER. - -The executable is either the value of the variable -`flycheck-CHECKER-executable', or the default executable given in -the syntax checker definition, if the variable is nil." - (let ((var (flycheck-checker-executable-variable checker))) - (or (and (boundp var) (symbol-value var)) - (flycheck-checker-default-executable checker)))) - -(defun flycheck-find-checker-executable (checker) - "Get the full path of the executable of CHECKER. - -Return the full absolute path to the executable of CHECKER, or -nil if the executable does not exist." - (funcall flycheck-executable-find (flycheck-checker-executable checker))) - -(defun flycheck-call-checker-process - (checker infile destination error &rest args) - "Call CHECKER's executable with ARGS. - -Return nil (or raise an error if ERROR is non-nil) when CHECKER's -executable cannot be found, and return a numeric exit status or a -signal description string otherwise. CHECKER's input is taken -from INFILE, and its output is sent to DESTINATION, as in -`call-process'." - (if-let (executable (flycheck-find-checker-executable checker)) - (condition-case err - (apply #'call-process executable infile destination nil args) - (error (when error (signal (car err) (cdr err))))) - (when error - (user-error "Cannot find `%s' using `flycheck-executable-find'" - (flycheck-checker-executable checker))))) - -(defun flycheck-call-checker-process-for-output - (checker infile error &rest args) - "Call CHECKER's executable with ARGS and return its output. - -Call `flycheck-call-checker-process' with INFILE, ERROR, and -ARGS. If it returns 0, return the process' output. Otherwise, -return nil or throw an error. - -This function is similar to `flycheck-call-checker-process' -called in a `with-output-to-string' block, but it takes care of -the error checking automatically." - (let ((temp (generate-new-buffer " *temp*"))) - (unwind-protect - ;; We need to call the checker process in the right buffer, so that it - ;; uses the right exec-path, checker executable, etc. See URL - ;; `https://github.com/flycheck/flycheck/issues/1770'. - (let ((exit-code (apply #'flycheck-call-checker-process - checker infile temp error args)) - (output (with-current-buffer temp (buffer-string)))) - (if (eql 0 exit-code) output - (when error - (error "Process %s failed with %S (%s)" - checker exit-code output)))) - (kill-buffer temp)))) - -(defun flycheck-checker-arguments (checker) - "Get the command arguments of CHECKER." - (cdr (flycheck-checker-get checker 'command))) - -(defun flycheck-substitute-argument (arg checker) - "Substitute ARG for CHECKER. - -Return a list of real arguments for the executable of CHECKER, -substituted for the symbolic argument ARG. Single arguments, -e.g. if ARG is a literal strings, are wrapped in a list. - -ARG may be one of the following forms: - -STRING - Return ARG unchanged. - -`source', `source-inplace' - Create a temporary file to check and return its path. With - `source-inplace' create the temporary file in the same - directory as the original file. The value of - `flycheck-temp-prefix' is used as prefix of the file name. - - With `source', try to retain the non-directory component of - the buffer's file name in the temporary file. - - `source' is the preferred way to pass the input file to a - syntax checker. `source-inplace' should only be used if the - syntax checker needs other files from the source directory, - such as include files in C. - -`(source SUFFIX)', `(source-inplace SUFFIX)' - Like `source' and `source-inplace', but ensure generated - file names end with the given suffix. Use this when the - checker requires that file names on its command line have a - certain suffix (file extension). - -`source-original' - Return the path of the actual file to check, or an empty - string if the buffer has no file name. - - Note that the contents of the file may not be up to date - with the contents of the buffer to check. Do not use this - as primary input to a checker, unless absolutely necessary. - - When using this symbol as primary input to the syntax - checker, add `flycheck-buffer-saved-p' to the `:predicate'. - -`temporary-directory' - Create a unique temporary directory and return its path. - -`temporary-file-name' - Return a unique temporary filename. The file is *not* - created. - - To ignore the output of syntax checkers, try symbol - `null-device' first. - -symbol `null-device' - Return the value of variable `null-device', i.e the system - null device. - - Use this option to ignore the output of a syntax checker. - If the syntax checker cannot handle the null device, or - won't write to an existing file, try `temporary-file-name' - instead. - -`(config-file OPTION VARIABLE [PREPEND-FN])' - Search the configuration file bound to VARIABLE with - `flycheck-locate-config-file' and return a list of arguments - that pass this configuration file to the syntax checker, or - nil if the configuration file was not found. - - PREPEND-FN is called with the OPTION and the located - configuration file, and should return OPTION prepended - before the file, either a string or as list. If omitted, - PREPEND-FN defaults to `list'. - -`(option OPTION VARIABLE [PREPEND-FN [FILTER]])' - Retrieve the value of VARIABLE and return a list of - arguments that pass this value as value for OPTION to the - syntax checker. - - PREPEND-FN is called with the OPTION and the value of - VARIABLE, and should return OPTION prepended before the - file, either a string or as list. If omitted, PREPEND-FN - defaults to `list'. - - FILTER is an optional function to be applied to the value of - VARIABLE before prepending. This function must return nil - or a string. In the former case, return nil. In the latter - case, return a list of arguments as described above. - -`(option-list OPTION VARIABLE [PREPEND-FN [FILTER]])' - Retrieve the value of VARIABLE, which must be a list, - and prepend OPTION before each item in this list, using - PREPEND-FN. - - PREPEND-FN is called with the OPTION and each item of the - list as second argument, and should return OPTION prepended - before the item, either as string or as list. If omitted, - PREPEND-FN defaults to `list'. - - FILTER is an optional function to be applied to each item in - the list before prepending OPTION. It shall return the - option value for each item as string, or nil, if the item is - to be ignored. - -`(option-flag OPTION VARIABLE)' - Retrieve the value of VARIABLE and return OPTION, if the - value is non-nil. Otherwise return nil. - -`(eval FORM)' - Return the result of evaluating FORM in the buffer to be - checked. FORM must either return a string or a list of - strings, or nil to indicate that nothing should be - substituted for CELL. For all other return types, signal an - error - - _No_ further substitutions are performed, neither in FORM - before it is evaluated, nor in the result of evaluating - FORM. - -In all other cases, signal an error. - -Note that substitution is *not* recursive. No symbols or cells -are substituted within the body of cells!" - (pcase arg - ((pred stringp) (list arg)) - (`source - (list (flycheck-save-buffer-to-temp #'flycheck-temp-file-system))) - (`source-inplace - (list (flycheck-save-buffer-to-temp #'flycheck-temp-file-inplace))) - (`(source ,suffix) - (list (flycheck-save-buffer-to-temp - (lambda (filename) (flycheck-temp-file-system filename suffix))))) - (`(source-inplace ,suffix) - (list (flycheck-save-buffer-to-temp - (lambda (filename) (flycheck-temp-file-inplace filename suffix))))) - (`source-original (list (or (buffer-file-name) ""))) - (`temporary-directory (list (flycheck-temp-dir-system))) - (`temporary-file-name - (let ((directory (flycheck-temp-dir-system))) - (list (make-temp-name (expand-file-name "flycheck" directory))))) - (`null-device (list null-device)) - (`(config-file ,option-name ,file-name-var) - (when-let* ((value (symbol-value file-name-var)) - (file-name (flycheck-locate-config-file value checker))) - (flycheck-prepend-with-option option-name (list file-name)))) - (`(config-file ,option-name ,file-name-var ,prepend-fn) - (when-let* ((value (symbol-value file-name-var)) - (file-name (flycheck-locate-config-file value checker))) - (flycheck-prepend-with-option option-name (list file-name) prepend-fn))) - (`(option ,option-name ,variable) - (when-let (value (symbol-value variable)) - (unless (stringp value) - (error "Value %S of %S for option %s is not a string" - value variable option-name)) - (flycheck-prepend-with-option option-name (list value)))) - (`(option ,option-name ,variable ,prepend-fn) - (when-let (value (symbol-value variable)) - (unless (stringp value) - (error "Value %S of %S for option %s is not a string" - value variable option-name)) - (flycheck-prepend-with-option option-name (list value) prepend-fn))) - (`(option ,option-name ,variable ,prepend-fn ,filter) - (when-let (value (funcall filter (symbol-value variable))) - (unless (stringp value) - (error "Value %S of %S (filter: %S) for option %s is not a string" - value variable filter option-name)) - (flycheck-prepend-with-option option-name (list value) prepend-fn))) - (`(option-list ,option-name ,variable) - (let ((value (symbol-value variable))) - (unless (and (listp value) (seq-every-p #'stringp value)) - (error "Value %S of %S for option %S is not a list of strings" - value variable option-name)) - (flycheck-prepend-with-option option-name value))) - (`(option-list ,option-name ,variable ,prepend-fn) - (let ((value (symbol-value variable))) - (unless (and (listp value) (seq-every-p #'stringp value)) - (error "Value %S of %S for option %S is not a list of strings" - value variable option-name)) - (flycheck-prepend-with-option option-name value prepend-fn))) - (`(option-list ,option-name ,variable ,prepend-fn ,filter) - (let ((value (delq nil (seq-map filter (symbol-value variable))))) - (unless (and (listp value) (seq-every-p #'stringp value)) - (error "Value %S of %S for option %S is not a list of strings" - value variable option-name)) - (flycheck-prepend-with-option option-name value prepend-fn))) - (`(option-flag ,option-name ,variable) - (when (symbol-value variable) - (list option-name))) - (`(eval ,form) - (let ((result (eval form))) - (cond - ((and (listp result) (seq-every-p #'stringp result)) result) - ((stringp result) (list result)) - (t (error "Invalid result from evaluation of %S: %S" form result))))) - (_ (error "Unsupported argument %S" arg)))) - -(defun flycheck-checker-substituted-arguments (checker) - "Get the substituted arguments of a CHECKER. - -Substitute each argument of CHECKER using -`flycheck-substitute-argument'. This replaces any special -symbols in the command." - (apply #'append - (seq-map (lambda (arg) (flycheck-substitute-argument arg checker)) - (flycheck-checker-arguments checker)))) - -(defun flycheck--process-send-buffer-contents-chunked (process) - "Send contents of current buffer to PROCESS in small batches. - -Send the entire buffer to the standard input of PROCESS in chunks -of 4096 characters. Chunking is done in Emacs Lisp, hence this -function is probably far less efficient than -`send-process-region'. Use only when required." - (let ((from (point-min))) - (while (< from (point-max)) - (let ((to (min (+ from 4096) (point-max)))) - (process-send-region process from to) - (setq from to))))) - -(defvar flycheck-chunked-process-input - ;; Chunk process output on Windows to work around - ;; https://github.com/flycheck/flycheck/issues/794 and - ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=22344. The presence of - ;; `w32-pipe-buffer-size' denotes an Emacs version (> Emacs 25.1) where pipe - ;; writes on Windows are fixed. - ;; - ;; TODO: Remove option and chunking when dropping Emacs 24 support, see - ;; https://github.com/flycheck/flycheck/issues/856 - (and (eq system-type 'windows-nt) (not (boundp 'w32-pipe-buffer-size))) - "If non-nil send process input in small chunks. - -If this variable is non-nil `flycheck-process-send-buffer' sends -buffer contents in small chunks. - -Defaults to nil, except on Windows to work around Emacs bug -#22344.") - -(defun flycheck-process-send-buffer (process) - "Send all contents of current buffer to PROCESS. - -Sends all contents of the current buffer to the standard input of -PROCESS, and terminates standard input with EOF. - -If `flycheck-chunked-process-input' is non-nil, send buffer -contents in chunks via -`flycheck--process-send-buffer-contents-chunked', which see. -Otherwise use `process-send-region' to send all contents at once -and rely on Emacs' own buffering and chunking." - (save-restriction - (widen) - (if flycheck-chunked-process-input - (flycheck--process-send-buffer-contents-chunked process) - (process-send-region process (point-min) (point-max)))) - (process-send-eof process)) - -(defun flycheck--wrap-command (prog args) - "Wrap PROG and ARGS using `flycheck-command-wrapper-function'." - ;; We don't call `flycheck-executable-find' on the output of the wrapper - ;; function, since it might not expect it (an executable-find function - ;; designed to find binaries in a sandbox could get confused if we asked it - ;; about the sandboxing program itself). - (funcall flycheck-command-wrapper-function (cons prog args))) - -(defun flycheck-start-command-checker (checker callback) - "Start a command CHECKER with CALLBACK." - (let (process) - (condition-case err - (let* ((program (flycheck-find-checker-executable checker)) - (args (flycheck-checker-substituted-arguments checker)) - (command (flycheck--wrap-command program args)) - (sentinel-events nil) - ;; Use pipes to receive output from the syntax checker. They are - ;; more efficient and more robust than PTYs, which Emacs uses by - ;; default, and since we don't need any job control features, we - ;; can easily use pipes. - (process-connection-type nil)) - ;; We pass do not associate the process with any buffer, by - ;; passing nil for the BUFFER argument of `start-process'. - ;; Instead, we just remember the buffer being checked in a - ;; process property (see below). This neatly avoids all - ;; side-effects implied by attached a process to a buffer, which - ;; may cause conflicts with other packages. - ;; - ;; See https://github.com/flycheck/flycheck/issues/298 for an - ;; example for such a conflict. - (setq process (apply 'start-process (format "flycheck-%s" checker) - nil command)) - ;; Process sentinels can be called while sending input to the process. - ;; We want to record errors raised by process-send before calling - ;; `flycheck-handle-signal', so initially just accumulate events. - (setf (process-sentinel process) - (lambda (_ event) (push event sentinel-events))) - (setf (process-filter process) #'flycheck-receive-checker-output) - (set-process-query-on-exit-flag process nil) - ;; Remember the syntax checker, the buffer and the callback - (process-put process 'flycheck-checker checker) - (process-put process 'flycheck-callback callback) - (process-put process 'flycheck-buffer (current-buffer)) - ;; The default directory is bound in the `flycheck-syntax-check-start' - ;; function. - (process-put process 'flycheck-working-directory default-directory) - ;; Track the temporaries created by argument substitution in the - ;; process itself, to get rid of the global state ASAP. - (process-put process 'flycheck-temporaries flycheck-temporaries) - (setq flycheck-temporaries nil) - ;; Send the buffer to the process on standard input, if enabled. - (when (flycheck-checker-get checker 'standard-input) - (condition-case err - (flycheck-process-send-buffer process) - ;; Some checkers exit before reading all input, causing errors - ;; such as a `file-error' for a closed pipe, or a plain “no longer - ;; connected to pipe; closed it” error for a disconnection. We - ;; report them if needed in `flycheck-finish-checker-process' (see - ;; `https://github.com/flycheck/flycheck/issues/1278'). - (error (process-put process 'flycheck-error err)))) - ;; Set the actual sentinel and process any events that might have - ;; happened while we were sending input. - (setf (process-sentinel process) #'flycheck-handle-signal) - (dolist (event (nreverse sentinel-events)) - (flycheck-handle-signal process event)) - ;; Return the process. - process) - (error - ;; In case of error, clean up our resources, and report the error back to - ;; Flycheck. - (flycheck-safe-delete-temporaries) - (when process - ;; No need to explicitly delete the temporary files of the process, - ;; because deleting runs the sentinel, which will delete them anyway. - (delete-process process)) - (signal (car err) (cdr err)))))) - -(defun flycheck-interrupt-command-checker (_checker process) - "Interrupt a PROCESS." - ;; Deleting the process always triggers the sentinel, which does the cleanup - (when process - (delete-process process))) - -(defun flycheck-command-checker-print-doc (checker) - "Print additional documentation for a command CHECKER." - (let ((executable (flycheck-checker-default-executable checker)) - (config-file-var (flycheck-checker-get checker 'config-file-var)) - (option-vars (seq-sort #'string< - (flycheck-checker-get checker 'option-vars)))) - (princ "\n") - - (let ((doc-start (with-current-buffer standard-output (point-max)))) - ;; Track the start of our documentation so that we can re-indent it - ;; properly - (princ " This syntax checker executes \"") - (princ executable) - (princ "\"") - (when config-file-var - (princ ", using a configuration file from `") - (princ (symbol-name config-file-var)) - (princ "'")) - (princ ". The executable can be overridden with `") - (princ (symbol-name (flycheck-checker-executable-variable checker))) - (princ "'.") - - (with-current-buffer standard-output - (save-excursion - (fill-region-as-paragraph doc-start (point-max))))) - (princ "\n") - (when option-vars - (princ - "\n This syntax checker can be configured with these options:\n\n") - (dolist (var option-vars) - (princ (format " * `%s'\n" var)))))) - -(defun flycheck-verify-command-checker (checker) - "Verify a command CHECKER in the current buffer. - -Return a list of `flycheck-verification-result' objects for -CHECKER." - (let ((executable (flycheck-find-checker-executable checker)) - (config-file-var (flycheck-checker-get checker 'config-file-var))) - `( - ,(flycheck-verification-result-new - :label "executable" - :message (if executable (format "Found at %s" executable) "Not found") - :face (if executable 'success '(bold error))) - ,@(when config-file-var - (let* ((value (symbol-value config-file-var)) - (path (and value (flycheck-locate-config-file value checker)))) - (list (flycheck-verification-result-new - :label "configuration file" - :message (if path (format "Found at %S" path) "Not found") - :face (if path 'success 'warning))))) - ,@(when (not (flycheck-temp-files-writable-p checker)) - (list (flycheck-verification-result-new - :label "temp directory" - :message (format "%s is not writable" - (flycheck-temp-directory checker)) - :face 'error)))))) - - -;;; Process management for command syntax checkers -(defun flycheck-receive-checker-output (process output) - "Receive a syntax checking PROCESS OUTPUT." - (push output (process-get process 'flycheck-pending-output))) - -(defun flycheck-get-output (process) - "Get the complete output of PROCESS." - (with-demoted-errors "Error while retrieving process output: %S" - (let ((pending-output (process-get process 'flycheck-pending-output))) - (apply #'concat (nreverse pending-output))))) - -(defun flycheck-handle-signal (process _event) - "Handle a signal from the syntax checking PROCESS. - -_EVENT is ignored." - (when (memq (process-status process) '(signal exit)) - (let ((files (process-get process 'flycheck-temporaries)) - (buffer (process-get process 'flycheck-buffer)) - (callback (process-get process 'flycheck-callback)) - (cwd (process-get process 'flycheck-working-directory)) - (err (process-get process 'flycheck-error))) - ;; Delete the temporary files - (seq-do #'flycheck-safe-delete files) - (when (buffer-live-p buffer) - (with-current-buffer buffer - (condition-case err - (pcase (process-status process) - (`signal - (funcall callback 'interrupted)) - (`exit - (flycheck-finish-checker-process - (process-get process 'flycheck-checker) - (or err (process-exit-status process)) - files - (flycheck-get-output process) callback cwd))) - ((debug error) - (funcall callback 'errored (error-message-string err))))))))) - -(defun flycheck-finish-checker-process - (checker exit-status files output callback cwd) - "Finish a checker process from CHECKER with EXIT-STATUS. - -EXIT-STATUS can be a number or an arbitrary form (if it is not 0, -a `suspicious' status is reported to CALLBACK). - -FILES is a list of files given as input to the checker. OUTPUT -is the output of the syntax checker. CALLBACK is the status -callback to use for reporting. - -Parse the OUTPUT and report an appropriate error status. - -Resolve all errors in OUTPUT using CWD as working directory." - (let ((errors (flycheck-parse-output output checker (current-buffer)))) - (when (and (not (equal exit-status 0)) (null errors)) - ;; Warn about a suspicious result from the syntax checker. We do right - ;; after parsing the errors, before filtering, because a syntax checker - ;; might report errors from other files (e.g. includes) even if there - ;; are no errors in the file being checked. - (funcall callback 'suspicious - (format "Flycheck checker %S returned %S, but \ -its output contained no errors: %s\nTry installing a more \ -recent version of %S, and please open a bug report if the issue \ -persists in the latest release. Thanks!" checker exit-status -output checker))) - (funcall callback 'finished - ;; Fix error file names, by substituting them backwards from the - ;; temporaries. - (seq-map (lambda (e) (flycheck-fix-error-filename e files cwd)) - errors)))) - - -;;; Executables of command checkers. -(defmacro flycheck-def-executable-var (checker default-executable) - "Define the executable variable for CHECKER. - -DEFAULT-EXECUTABLE is the default executable. It is only used in -the docstring of the variable. - -The variable is defined with `defcustom' in the -`flycheck-executables' group. It's also defined to be risky as -file-local variable, to avoid arbitrary executables being used -for syntax checking." - (let ((executable-var (flycheck-checker-executable-variable checker))) - `(progn - (defcustom ,executable-var nil - ,(format "The executable of the %s syntax checker. - -Either a string containing the name or the path of the -executable, or nil to use the default executable from the syntax -checker declaration. - -The default executable is %S." checker default-executable) - :type '(choice (const :tag "Default executable" nil) - (string :tag "Name or path")) - :group 'flycheck-executables - :risky t)))) - -(defun flycheck-set-checker-executable (checker &optional executable) - "Set the executable of CHECKER in the current buffer. - -CHECKER is a syntax checker symbol. EXECUTABLE is a string with -the name of an executable or the path to an executable file, which -is to be used as executable for CHECKER. If omitted or nil, -reset the executable of CHECKER. - -Interactively, prompt for a syntax checker and an executable -file, and set the executable of the selected syntax checker. -With prefix arg, prompt for a syntax checker only, and reset the -executable of the select checker to the default. - -Set the executable variable of CHECKER, that is, -`flycheck-CHECKER-executable' to EXECUTABLE. Signal -`user-error', if EXECUTABLE does not denote a command or an -executable file. - -This command is intended for interactive use only. In Lisp, just -`let'-bind the corresponding variable, or set it directly. Use -`flycheck-checker-executable-variable' to obtain the executable -variable symbol for a syntax checker." - (declare (interactive-only "Set the executable variable directly instead")) - (interactive - (let* ((checker (flycheck-read-checker "Syntax checker: ")) - (default-executable (flycheck-checker-default-executable checker)) - (executable (if current-prefix-arg - nil - (read-file-name "Executable: " nil default-executable - nil nil flycheck-executable-find)))) - (list checker executable))) - (when (and executable (not (funcall flycheck-executable-find executable))) - (user-error "%s is no executable" executable)) - (let ((variable (flycheck-checker-executable-variable checker))) - (set (make-local-variable variable) executable))) - - -;;; Configuration files and options for command checkers -(defun flycheck-register-config-file-var (var checkers) - "Register VAR as config file var for CHECKERS. - -CHECKERS is a single syntax checker or a list thereof." - (when (symbolp checkers) - (setq checkers (list checkers))) - (dolist (checker checkers) - (setf (flycheck-checker-get checker 'config-file-var) var))) - -;;;###autoload -(defmacro flycheck-def-config-file-var (symbol checker &optional file-name - &rest custom-args) - "Define SYMBOL as config file variable for CHECKER, with default FILE-NAME. - -SYMBOL is declared as customizable variable using `defcustom', to -provide configuration files for the given syntax CHECKER. -CUSTOM-ARGS are forwarded to `defcustom'. - -FILE-NAME is the initial value of the new variable. If omitted, -the default value is nil. It can be either a string or a list of -strings. - -Use this together with the `config-file' form in the `:command' -argument to `flycheck-define-checker'." - (declare (indent 3)) - `(progn - (defcustom ,symbol ,file-name - ,(format "Configuration file for `%s'. - -If set to a string, locate the configuration file using the -functions from `flycheck-locate-config-file-functions'. If the -file is found pass it to the syntax checker as configuration -file. - -If no configuration file is found, or if this variable is set to -nil, invoke the syntax checker without a configuration file. - -Use this variable as file-local variable if you need a specific -configuration file for a buffer." checker) - :type '(choice (const :tag "No configuration file" nil) - (string :tag "File name or path") - (repeat :tag "File names or paths" string)) - :safe #'flycheck-string-or-string-list-p - :group 'flycheck-config-files - ,@custom-args) - (flycheck-register-config-file-var ',symbol ',checker))) - -(defun flycheck-locate-config-file (filenames checker) - "Locate the configuration file for CHECKER, based on FILENAMES. - -FILENAMES can be either a single file, or a list. Each filename -is passed to all `flycheck-locate-config-file-functions', until -one returns non-nil. - -Return the absolute path of the configuration file, or nil if no -configuration file was found." - (when (stringp filenames) - (setq filenames (list filenames))) - (let ((config-file nil)) - (while (and filenames (null config-file)) - (setq config-file (run-hook-with-args-until-success - 'flycheck-locate-config-file-functions - (pop filenames) checker))) - (when (and config-file (file-exists-p config-file)) - config-file))) - -(defun flycheck-locate-config-file-by-path (filepath _checker) - "Locate a configuration file by a FILEPATH. - -If FILEPATH is a contains a path separator, expand it against the -default directory and return it if it points to an existing file. -Otherwise return nil. - -_CHECKER is ignored." - ;; If the path is just a plain file name, skip it. - (unless (string= (file-name-nondirectory filepath) filepath) - (let ((file-name (expand-file-name filepath))) - (and (file-exists-p file-name) file-name)))) - -(defun flycheck-locate-config-file-ancestor-directories (filename _checker) - "Locate a configuration FILENAME in ancestor directories. - -If the current buffer has a file name, search FILENAME in the -directory of the current buffer and all ancestors thereof (see -`locate-dominating-file'). If the file is found, return its -absolute path. Otherwise return nil. - -_CHECKER is ignored." - (when-let* ((basefile (buffer-file-name)) - (directory (locate-dominating-file basefile filename))) - (expand-file-name filename directory))) - -(defun flycheck-locate-config-file-home (filename _checker) - "Locate a configuration FILENAME in the home directory. - -Return the absolute path, if FILENAME exists in the user's home -directory, or nil otherwise." - (let ((path (expand-file-name filename "~"))) - (when (file-exists-p path) - path))) - -(seq-do (apply-partially #'custom-add-frequent-value - 'flycheck-locate-config-file-functions) - '(flycheck-locate-config-file-by-path - flycheck-locate-config-file-ancestor-directories - flycheck-locate-config-file-home)) - -(defun flycheck-register-option-var (var checkers) - "Register an option VAR with CHECKERS. - -VAR is an option symbol, and CHECKERS a syntax checker symbol or -a list thereof. Register VAR with all CHECKERS so that it -appears in the help output." - (when (symbolp checkers) - (setq checkers (list checkers))) - (dolist (checker checkers) - (cl-pushnew var (flycheck-checker-get checker 'option-vars)))) - -;;;###autoload -(defmacro flycheck-def-option-var (symbol init-value checkers docstring - &rest custom-args) - "Define SYMBOL as option variable with INIT-VALUE for CHECKER. - -SYMBOL is declared as customizable variable using `defcustom', to -provide an option for the given syntax CHECKERS (a checker or a -list of checkers). INIT-VALUE is the initial value of the -variable, and DOCSTRING is its docstring. CUSTOM-ARGS are -forwarded to `defcustom'. - -Use this together with the `option', `option-list' and -`option-flag' forms in the `:command' argument to -`flycheck-define-checker'." - (declare (indent 3) - (doc-string 4)) - `(progn - (defcustom ,symbol ,init-value - ,(concat docstring " - -This variable is an option for the following syntax checkers: - -" - (mapconcat (lambda (c) (format " - `%s'" c)) - (if (symbolp checkers) (list checkers) checkers) - "\n")) - :group 'flycheck-options - ,@custom-args) - (flycheck-register-option-var ',symbol ',checkers))) - -(defun flycheck-option-int (value) - "Convert an integral option VALUE to a string. - -If VALUE is nil, return nil. Otherwise return VALUE converted to -a string." - (and value (number-to-string value))) - -(defun flycheck-option-symbol (value) - "Convert a symbol option VALUE to string. - -If VALUE is nil return nil. Otherwise return VALUE converted to -a string." - (and value (symbol-name value))) - -(defun flycheck-option-comma-separated-list (value &optional separator filter) - "Convert VALUE into a list separated by SEPARATOR. - -SEPARATOR is a string to separate items in VALUE, defaulting to -\",\". FILTER is an optional function, which takes a single -argument and returns either a string or nil. - -If VALUE is a list, apply FILTER to each item in VALUE, remove -all nil items, and return a single string of all remaining items -separated by SEPARATOR. - -Otherwise, apply FILTER to VALUE and return the result. -SEPARATOR is ignored in this case." - (let ((filter (or filter #'identity)) - (separator (or separator ","))) - (if (listp value) - (when-let (value (delq nil (seq-map filter value))) - (string-join value separator)) - (funcall filter value)))) - -(defmacro flycheck-def-args-var (symbol checkers &rest custom-args) - "Define SYMBOL as argument variable for CHECKERS. - -SYMBOL is declared as customizable, risky and buffer-local -variable using `defcustom' to provide an option for arbitrary -arguments for the given syntax CHECKERS (either a single checker -or a list of checkers). CUSTOM-ARGS is forwarded to `defcustom'. - -Use the `eval' form to splice this variable into the -`:command'." - (declare (indent 2)) - `(flycheck-def-option-var ,symbol nil ,checkers - "A list of additional command line arguments. - -The value of this variable is a list of strings with additional -command line arguments." - :risky t - :type '(repeat (string :tag "Argument")) - ,@custom-args)) - - -;;; Command syntax checkers as compile commands -(defun flycheck-checker-pattern-to-error-regexp (pattern) - "Convert PATTERN into an error regexp for compile.el. - -Return a list representing PATTERN, suitable as element in -`compilation-error-regexp-alist'." - (let* ((regexp (car pattern)) - (level (cdr pattern)) - (level-no (flycheck-error-level-compilation-level level))) - `(,regexp 1 (2 . 6) (3 . 7) ,level-no))) - -(defun flycheck-checker-compilation-error-regexp-alist (checker) - "Convert error patterns of CHECKER for use with compile.el. - -Return an alist of all error patterns of CHECKER, suitable for -use with `compilation-error-regexp-alist'." - (seq-map #'flycheck-checker-pattern-to-error-regexp - (flycheck-checker-get checker 'error-patterns))) - -(defun flycheck--substitute-shell-command-argument (arg checker) - "Substitute ARG for CHECKER. - -Like `flycheck-substitute-argument', except for source, -source-inplace, and source-original." - (if (memq arg '(source source-inplace source-original)) - (list buffer-file-name) - (flycheck-substitute-argument arg checker))) - -(defun flycheck--checker-substituted-shell-command-arguments (checker) - "Get the substituted arguments of a CHECKER to run as a shell command. - -Substitute each argument of CHECKER using -`flycheck-substitute-shell-command-argument'." - (apply #'append - (seq-map (lambda (arg) - (flycheck--substitute-shell-command-argument arg checker)) - (flycheck-checker-arguments checker)))) - -(defun flycheck-checker-shell-command (checker) - "Get a shell command for CHECKER. - -Perform substitution in the arguments of CHECKER, but with -`flycheck--substitute-shell-command-argument'. - -Return the command of CHECKER as single string, suitable for -shell execution." - ;; Note: Do NOT use `combine-and-quote-strings' here. Despite it's name it - ;; does not properly quote shell arguments, and actually breaks for special - ;; characters. See https://github.com/flycheck/flycheck/pull/522 - (let* ((args (flycheck--checker-substituted-shell-command-arguments checker)) - (program - (or (flycheck-find-checker-executable checker) - (user-error "Cannot find `%s' using `flycheck-executable-find'" - (flycheck-checker-executable checker)))) - (wrapped (flycheck--wrap-command program args)) - (abs-prog - ;; The executable path returned by `flycheck-command-wrapper-function' - ;; may not be absolute, so expand it here. See URL - ;; `https://github.com/flycheck/flycheck/issues/1461'. - (or (executable-find (car wrapped)) - (user-error "Cannot find `%s' using `executable-find'" - (car wrapped)))) - (command (mapconcat #'shell-quote-argument - (cons abs-prog (cdr wrapped)) " "))) - (if (flycheck-checker-get checker 'standard-input) - ;; If the syntax checker expects the source from standard input add an - ;; appropriate shell redirection - (concat command " < " (shell-quote-argument (buffer-file-name))) - command))) - -(defun flycheck-compile-name (_name) - "Get a name for a Flycheck compilation buffer. - -_NAME is ignored." - (format "*Flycheck %s*" (buffer-file-name))) - -(defun flycheck-compile (checker) - "Run CHECKER via `compile'. - -CHECKER must be a valid syntax checker. Interactively, prompt -for a syntax checker to run. - -Instead of highlighting errors in the buffer, this command pops -up a separate buffer with the entire output of the syntax checker -tool, just like `compile' (\\[compile])." - (interactive - (let* ((default (flycheck-get-checker-for-buffer)) - (prompt (concat - "Run syntax checker as compile command" - (when default (concat " [" (format "%S" default) "]")) - ": "))) - (list (flycheck-read-checker prompt - (when (flycheck-checker-get default 'command) - default) - 'command)))) - (unless (flycheck-valid-checker-p checker) - (user-error "%S is not a valid syntax checker" checker)) - (unless (buffer-file-name) - (user-error "Cannot compile a buffer without a backing file")) - (unless (flycheck-may-use-checker checker) - (user-error "Cannot use syntax checker %S in this buffer" checker)) - (unless (flycheck-checker-executable checker) - (user-error "Cannot run checker %S as shell command" checker)) - (save-some-buffers) - (let* ((default-directory (flycheck-compute-working-directory checker)) - (command (flycheck-checker-shell-command checker)) - (buffer (compilation-start command nil #'flycheck-compile-name))) - (with-current-buffer buffer - (setq-local compilation-error-regexp-alist - (flycheck-checker-compilation-error-regexp-alist checker))))) - - -;;; General error parsing for command checkers -(defun flycheck-parse-output (output checker buffer) - "Parse OUTPUT from CHECKER in BUFFER. - -OUTPUT is a string with the output from the checker symbol -CHECKER. BUFFER is the buffer which was checked. - -Return the errors parsed with the error patterns of CHECKER." - (funcall (flycheck-checker-get checker 'error-parser) output checker buffer)) - -(defun flycheck-fix-error-filename (err buffer-files cwd) - "Fix the file name of ERR from BUFFER-FILES. - -Resolves error file names relative to CWD directory. - -Make the file name of ERR absolute. If the absolute file name of -ERR is in BUFFER-FILES, replace it with the value of variable -`buffer-file-name'." - (flycheck-error-with-buffer err - (when-let (filename (flycheck-error-filename err)) - (when (seq-some (apply-partially #'flycheck-same-files-p - (expand-file-name filename cwd)) - buffer-files) - (setf (flycheck-error-filename err) buffer-file-name) - (when (and buffer-file-name (flycheck-error-message err)) - (setf (flycheck-error-message err) - (replace-regexp-in-string - (regexp-quote filename) buffer-file-name - (flycheck-error-message err) 'fixed-case 'literal)))))) - err) - - -;;; Error parsers for command syntax checkers -(defun flycheck-parse-xml-region (beg end) - "Parse the xml region between BEG and END. - -Wrapper around `xml-parse-region' which transforms the return -value of this function into one compatible to -`libxml-parse-xml-region' by simply returning the first element -from the node list." - (ignore-errors (car (xml-parse-region beg end)))) - -(defun flycheck-parse-xml-region-with-fallback (beg end) - "Parse the xml region between BEG and END. - -Try parsing with libxml first; if that fails, revert to -`flycheck-parse-xml-region'. Failures can be caused by incorrect -XML (see URL `https://github.com/flycheck/flycheck/issues/1298'), -or on Windows by a missing libxml DLL with a libxml-enabled Emacs -\(see URL `https://github.com/flycheck/flycheck/issues/1330')." - ;; FIXME use `libxml-available-p' when it gets implemented. - (or (and (fboundp 'libxml-parse-xml-region) - (libxml-parse-xml-region beg end)) - (flycheck-parse-xml-region beg end))) - -(defvar flycheck-xml-parser 'flycheck-parse-xml-region-with-fallback - "Function used to parse an xml string from a region. - -The default uses libxml if available, and falls back to -`flycheck-parse-xml-region' otherwise.") - -(defun flycheck-parse-xml-string (xml) - "Parse an XML string. - -Return the document tree parsed from XML in the form `(ROOT ATTRS -BODY...)'. ROOT is a symbol identifying the name of the root -element. ATTRS is an alist of the attributes of the root node. -BODY is zero or more body elements, either as strings (in case of -text nodes) or as XML nodes, in the same for as the root node." - (with-temp-buffer - (insert xml) - (funcall flycheck-xml-parser (point-min) (point-max)))) - -(defun flycheck-parse-checkstyle (output checker buffer) - "Parse Checkstyle errors from OUTPUT. - -Parse Checkstyle-like XML output. Use this error parser for -checkers that have an option to output errors in this format. - -CHECKER and BUFFER denoted the CHECKER that returned OUTPUT and -the BUFFER that was checked respectively. - -See URL `https://checkstyle.sourceforge.net/' for information -about Checkstyle." - (pcase (flycheck-parse-xml-string output) - (`(checkstyle ,_ . ,file-nodes) - (let (errors) - (dolist (node file-nodes) - (pcase node - (`(file ,file-attrs . ,error-nodes) - (dolist (node error-nodes) - (pcase node - (`(error ,error-attrs . ,_) - (let-alist error-attrs - (push (flycheck-error-new-at - (flycheck-string-to-number-safe .line) - (flycheck-string-to-number-safe .column) - (pcase .severity - (`"error" 'error) - (`"warning" 'warning) - (`"info" 'info) - ;; Default to error for unknown .severity - (_ 'error)) - .message - :checker checker :id .source - :buffer buffer - :filename (cdr (assq 'name file-attrs))) - errors)))))))) - (nreverse errors))))) - -(defun flycheck-parse-cppcheck (output checker buffer) - "Parse Cppcheck errors from OUTPUT. - -Parse Cppcheck XML v2 output. - -CHECKER and BUFFER denoted the CHECKER that returned OUTPUT and -the BUFFER that was checked respectively. - -See URL `https://cppcheck.sourceforge.net/' for more information -about Cppcheck." - (pcase (flycheck-parse-xml-string output) - (`(results ,_ . ,body) - (let (errors) - (dolist (node body) - (pcase node - (`(errors ,_ . ,error-nodes) - (dolist (node error-nodes) - (pcase node - (`(error ,error-attrs . ,loc-nodes) - (let ((id (cdr (assq 'id error-attrs))) - (message (cdr (assq 'verbose error-attrs))) - (level (pcase (cdr (assq 'severity error-attrs)) - (`"error" 'error) - (`"style" 'info) - (`"information" 'info) - (_ 'warning)))) - (dolist (node loc-nodes) - (pcase node - (`(location ,loc-attrs . ,_) - (let-alist loc-attrs - (push (flycheck-error-new-at - (flycheck-string-to-number-safe .line) - nil - level - ;; cppcheck return newline characters as "\012" - (replace-regexp-in-string "\\\\012" "\n" - message) - :id id - :checker checker - :buffer buffer - :filename .file) - errors)))))))))))) - (nreverse errors))))) - -(defun flycheck-parse-phpmd (output checker buffer) - "Parse phpmd errors from OUTPUT. - -CHECKER and BUFFER denoted the CHECKER that returned OUTPUT and -the BUFFER that was checked respectively. - -See URL `https://phpmd.org/' for more information about phpmd." - (pcase (flycheck-parse-xml-string output) - (`(pmd ,_ . ,body) - (let (errors) - (dolist (node body) - (pcase node - (`(file ,file-attrs . ,violation-nodes) - (let ((filename (cdr (assq 'name file-attrs)))) - (dolist (node violation-nodes) - (pcase node - (`(violation ,vio-attrs ,(and message (pred stringp))) - (let-alist vio-attrs - (push - (flycheck-error-new-at - (flycheck-string-to-number-safe .beginline) - nil - 'warning (string-trim message) - ;; Ignore .endline (phpmd marks giant spans as errors) - ;; :end-line (flycheck-string-to-number-safe .endline) - :id .rule - :checker checker - :buffer buffer - :filename filename) - errors))))))))) - (nreverse errors))))) - -(defun flycheck-parse-reek (output checker buffer) - "Parse Reek warnings from JSON OUTPUT. - -CHECKER and BUFFER denote the CHECKER that returned OUTPUT and -the BUFFER that was checked respectively. - -See URL `https://github.com/troessner/reek' for more information -about Reek." - (let ((errors nil)) - (dolist (message (car (flycheck-parse-json output))) - (let-alist message - (dolist (line (delete-dups .lines)) - (push - (flycheck-error-new-at - line - nil - 'warning (concat .context " " .message) - :id .smell_type - :checker checker - :buffer buffer - :filename .source) - errors)))) - (nreverse errors))) - -(defun flycheck-parse-go-staticcheck (output checker buffer) - "Parse staticheck warnings from JSON OUTPUT. - -CHECKER and BUFFER denote the CHECKER that returned OUTPUT and -the BUFFER that was checked respectively. - -See URL `https://staticcheck.io/docs/formatters' for more -information about staticheck." - (let ((errors nil)) - (dolist (msg (flycheck-parse-json output)) - (let-alist msg - (push - (flycheck-error-new-at - .location.line - .location.column - (pcase .severity - (`"error" 'error) - (`"warning" 'warning) - (`"ignored" 'info) - ;; Default to warning for unknown .severity - (_ 'warning)) - .message - :id .code - :checker checker - :buffer buffer - :filename .location.file) - errors))) - (nreverse errors))) - -(defun flycheck-parse-tslint (output checker buffer) - "Parse TSLint errors from JSON OUTPUT. - -CHECKER and BUFFER denoted the CHECKER that returned OUTPUT and -the BUFFER that was checked respectively. - -See URL `https://palantir.github.io/tslint/' for more information -about TSLint." - (seq-map (lambda (message) - (let-alist message - (flycheck-error-new-at - (+ 1 .startPosition.line) - (+ 1 .startPosition.character) - (pcase .ruleSeverity - ("ERROR" 'error) - ("WARNING" 'warning) - (_ 'warning)) - .failure - :id .ruleName - :checker checker - :buffer buffer - :filename .name - :end-line (+ 1 .endPosition.line) - :end-column (+ 1 .endPosition.character)))) - (car (flycheck-parse-json output)))) - -(defun flycheck-parse-rust-collect-spans (span) - "Return a list of spans contained in a SPAN object." - (let ((spans)) - (let-alist span - ;; With macro expansion errors, some spans will point to phony file names - ;; to indicate an error inside the std rust lib. We skip these spans as - ;; they won't appear in flycheck anyway. - (unless (string= .file_name "") - (push span spans)) - - ;; Macro expansion errors will have a span in the 'expansion' field, so we - ;; recursively collect it. - (if .expansion.span - (append (flycheck-parse-rust-collect-spans .expansion.span) - spans) - spans)))) - -(defun flycheck-parse-rustc-diagnostic (diagnostic checker buffer) - "Turn a rustc DIAGNOSTIC into a `flycheck-error'. - -CHECKER and BUFFER denote the CHECKER that returned DIAGNOSTIC -and the BUFFER that was checked respectively. - -DIAGNOSTIC should be a parsed JSON object describing a rustc -diagnostic, following the format described there: - -https://github.com/rust-lang/rust/blob/master/src/librustc_errors/json.rs#L154" - (let ((error-message) - (error-level) - (error-code) - (primary-filename) - (primary-line) - (primary-column) - (primary-end-line) - (primary-end-column) - (group (make-symbol "group")) - (spans) - (children) - (errors)) - ;; The diagnostic format is described in the link above. The gist of it is - ;; that a diagnostic can have several causes in the source text; these - ;; causes are represented by spans. The diagnostic has a message and a - ;; level (error, warning), while the spans have a filename, line, column, - ;; and an optional label. The primary span points to the root cause of the - ;; error in the source text, while non-primary spans point to related - ;; causes. Spans may have an 'expansion' field for macro expansion errors; - ;; these expansion fields will contain another span (and so on). In - ;; addition, a diagnostic can also have children diagnostics that are used - ;; to provide additional information through their message field, but do not - ;; seem to contain any spans (yet). - ;; - ;; We first gather spans in order to turn every span into a flycheck error - ;; object, that we collect into the `errors' list. - - ;; Nested `let-alist' cause compilation warnings, hence we `setq' all - ;; these values here first to avoid nesting. - (let-alist diagnostic - (setq error-message .message - error-level (pcase .level - (`"error" 'error) - (`"warning" 'warning) - (`"note" 'info) - (_ 'error)) - ;; The 'code' field of the diagnostic contains the actual error - ;; code and an optional explanation that we ignore - error-code .code.code - ;; Collect all spans recursively - spans (seq-mapcat #'flycheck-parse-rust-collect-spans .spans) - children .children)) - - ;; Turn each span into a flycheck error - (dolist (span spans) - (let-alist span - ;; Children may not have filename/line/column information, so we use - ;; those from the primary span - (when .is_primary - (setq primary-filename .file_name - primary-line .line_start - primary-column .column_start - primary-end-line .line_end - primary-end-column .column_end)) - (push - (flycheck-error-new-at - .line_start - .column_start - ;; Non-primary spans are used for notes - (if .is_primary error-level 'info) - (if .is_primary - ;; Primary spans may have labels with additional information - (concat error-message (when .label - (format " (%s)" .label))) - ;; If the label is empty, fallback on the error message, - ;; otherwise we won't be able to display anything - (or .label error-message)) - :id error-code - :checker checker - :buffer buffer - :filename .file_name - :group group - :end-line .line_end - :end-column .column_end) - errors))) - - ;; Then we turn children messages into flycheck errors pointing to the - ;; location of the primary span. - (dolist (child children) - (let ((message (let-alist child .message))) - (let-alist (car (let-alist child .spans)) - (push - (flycheck-error-new-at - ;; Use the line/column from the first span if there is one, or - ;; fallback to the line/column information from the primary span of - ;; the diagnostic. - (or .line_start primary-line) - (or .column_start primary-column) - 'info - ;; Messages from `cargo clippy' may suggest replacement code. In - ;; these cases, the `message' field itself is an unhelpful `try' or - ;; `change this to'. We add the `suggested_replacement' field in - ;; these cases. - (if .suggested_replacement - (format "%s: `%s`" message .suggested_replacement) - message) - :id error-code - :checker checker - :buffer buffer - :filename primary-filename - :group group - :end-line (or .line_end primary-end-line) - :end-column (or .column_end primary-end-column)) - errors)))) - - ;; If there are no spans, the error is not associated with a specific - ;; file but with the project as a whole. We still need to report it to - ;; the user by emitting a corresponding flycheck-error object. - ;; Check whether the code is non-nil because Rust≥1.44 includes the - ;; warning count upon completion. - (when (and error-code (not spans)) - (push (flycheck-error-new-at - ;; We have no specific position to attach the error to, so - ;; let's use the top of the file. - 1 1 - error-level - error-message - :id error-code - :checker checker - :buffer buffer - :group group) - errors)) - (nreverse errors))) - -(defconst flycheck--json-parser - (if (and (functionp 'json-parse-buffer) - ;; json-parse-buffer only supports keyword arguments in Emacs 27+ - (>= emacs-major-version 27)) - (lambda () - (json-parse-buffer - :object-type 'alist :array-type 'list - :null-object nil :false-object nil)) - #'json-read) - "Function to use to parse JSON strings.") - -(defun flycheck-parse-json (output) - "Return parsed JSON data from OUTPUT. - -OUTPUT is a string that contains JSON data. Each line of OUTPUT -may be either plain text, a JSON array (starting with `['), or a -JSON object (starting with `{'). - -This function ignores the plain text lines, parses the JSON -lines, and returns the parsed JSON lines in a list." - (let ((objects nil) - (json-array-type 'list) - (json-false nil)) - (with-temp-buffer - (insert output) - (goto-char (point-min)) - (while (not (eobp)) - (when (memq (char-after) '(?\{ ?\[)) - (push (funcall flycheck--json-parser) objects)) - (forward-line))) - (nreverse objects))) - -(defun flycheck-parse-rustc (output checker buffer) - "Parse rustc errors from OUTPUT and return a list of `flycheck-error'. - -CHECKER and BUFFER denote the CHECKER that returned OUTPUT and -the BUFFER that was checked respectively. - -The expected format for OUTPUT is a mix of plain text lines and -JSON lines. This function ignores the plain text lines and -parses only JSON lines. Each JSON line is expected to be a JSON -object that corresponds to a diagnostic from the compiler. The -expected diagnostic format is described there: - -https://github.com/rust-lang/rust/blob/master/src/libsyntax/json.rs#L67-L139" - (seq-mapcat (lambda (msg) - (flycheck-parse-rustc-diagnostic msg checker buffer)) - (flycheck-parse-json output))) - -(defun flycheck-parse-cargo-rustc (output checker buffer) - "Parse Cargo errors from OUTPUT and return a list of `flycheck-error'. - -CHECKER and BUFFER denote the CHECKER that returned OUTPUT and -the BUFFER that was checked respectively. - -The expected format for OUTPUT is a mix of plain text lines and -JSON lines. This function ignores the plain text lines and -parses only JSON lines. Each JSON line is expected to be a JSON -object that represents a message from Cargo. The format of -messages emitted by Cargo is described in cargo's -machine_message.rs at URL `https://git.io/vh24R'." - (let ((errors)) - (dolist (msg (flycheck-parse-json output)) - (let-alist msg - ;; Errors and warnings from rustc are wrapped by cargo, so we filter and - ;; unwrap them, and delegate the actual construction of `flycheck-error' - ;; objects to `flycheck-parse-rustc-diagnostic'. - ;; We put the error record with nil code since flycheck regards - ;; the case of nonzero return code without any error report - ;; as abnormal result. - (when (string= .reason "compiler-message") - (push (flycheck-parse-rustc-diagnostic .message checker buffer) - errors)))) - (apply #'nconc errors))) - -;; Some checkers output ANSI terminal colors, which don't match up -;; with :error-patterns, so we strip those color codes from the output -;; here before passing it along to the default behavior. This is -;; originally only used in the rebar3 checker, but the systemd checker -;; now also makes use of it. -;; -;; The relevant discussion can be found at -;; https://github.com/flycheck/flycheck/pull/1144 -(defun flycheck-parse-with-patterns-without-color (output checker buffer) - "Strip color codes from OUTPUT before passing it to the default behavior. - -CHECKER and BUFFER are passed along as well." - (flycheck-parse-with-patterns - (and (fboundp 'ansi-color-filter-apply) (ansi-color-filter-apply output)) - checker buffer)) - - -;;; Error parsing with regular expressions -(defun flycheck-get-regexp (patterns) - "Create a single regular expression from PATTERNS." - (rx-to-string `(or ,@(seq-map (lambda (p) (list 'regexp (car p))) patterns)) - 'no-group)) - -(defun flycheck-tokenize-output-with-patterns (output patterns) - "Tokenize OUTPUT with PATTERNS. - -Split the output into error tokens, using all regular expressions -from the error PATTERNS. An error token is simply a string -containing a single error from OUTPUT. Such a token can then be -parsed into a structured error by applying the PATTERNS again, -see `flycheck-parse-error-with-patterns'. - -Return a list of error tokens." - (let ((regexp (flycheck-get-regexp patterns)) - (last-match 0) - errors) - (while (string-match regexp output last-match) - (push (match-string 0 output) errors) - (setq last-match (match-end 0))) - (reverse errors))) - -(defun flycheck-try-parse-error-with-pattern (err pattern checker) - "Try to parse a single ERR with a PATTERN for CHECKER. - -Return the parsed error if PATTERN matched ERR, or nil -otherwise. - -`end-line' defaults to the value of `line' when `end-column' is -set, since checkers often omit redundant end lines (as in -::-)." - (let ((regexp (car pattern)) - (level (cdr pattern))) - (when (string-match regexp err) - (let ((filename (match-string 1 err)) - (line (flycheck-string-to-number-safe (match-string 2 err))) - (column (flycheck-string-to-number-safe (match-string 3 err))) - (message (match-string 4 err)) - (id (match-string 5 err)) - (end-line (flycheck-string-to-number-safe (match-string 6 err))) - (end-column (flycheck-string-to-number-safe (match-string 7 err)))) - (flycheck-error-new-at - line - column - level - (unless (string-empty-p message) message) - :id (unless (string-empty-p id) id) - :checker checker - :filename (if (or (null filename) (string-empty-p filename)) - (buffer-file-name) - filename) - :end-line (or end-line (and end-column line)) - :end-column end-column))))) - -(defun flycheck-parse-error-with-patterns (err patterns checker) - "Parse a single ERR with error PATTERNS for CHECKER. - -Apply each pattern in PATTERNS to ERR, in the given order, and -return the first parsed error." - ;; Try to parse patterns in the order of declaration to make sure that the - ;; first match wins. - (let (parsed-error) - (while (and patterns - (not (setq parsed-error - (flycheck-try-parse-error-with-pattern - err (car patterns) checker)))) - (setq patterns (cdr patterns))) - parsed-error)) - -(defun flycheck-parse-with-patterns (output checker buffer) - "Parse OUTPUT from CHECKER with error patterns. - -Uses the error patterns of CHECKER to tokenize the output and -tries to parse each error token with all patterns, in the order -of declaration. Hence an error is never matched twice by two -different patterns. The pattern declared first always wins. - -_BUFFER is ignored. - -Return a list of parsed errors and warnings (as `flycheck-error' -objects)." - (with-current-buffer buffer - (let ((patterns (flycheck-checker-get checker 'error-patterns))) - (seq-map (lambda (err) - (flycheck-parse-error-with-patterns err patterns checker)) - (flycheck-tokenize-output-with-patterns output patterns))))) - - -;;; Convenience definition of command-syntax checkers - -;; This macro is autoloaded to prevent `with-eval-after-load' from expanding its -;; arguments. See https://github.com/flycheck/flycheck/issues/1398. -;;;###autoload -(defmacro flycheck-define-checker (symbol docstring &rest properties) - "Define SYMBOL as command syntax checker with DOCSTRING and PROPERTIES. - -Like `flycheck-define-command-checker', but PROPERTIES must not -be quoted. Also, implicitly define the executable variable for -SYMBOL with `flycheck-def-executable-var'." - (declare (indent 1) - (doc-string 2)) - (let ((command (plist-get properties :command)) - (parser (plist-get properties :error-parser)) - (filter (plist-get properties :error-filter)) - (explainer (plist-get properties :error-explainer)) - (predicate (plist-get properties :predicate)) - (enabled-fn (plist-get properties :enabled)) - (verify-fn (plist-get properties :verify))) - - `(progn - (flycheck-def-executable-var ,symbol ,(car command)) - - (flycheck-define-command-checker ',symbol - ,docstring - :command ',command - ,@(when parser - `(:error-parser #',parser)) - :error-patterns ',(plist-get properties :error-patterns) - ,@(when filter - `(:error-filter #',filter)) - ,@(when explainer - `(:error-explainer #',explainer)) - :modes ',(plist-get properties :modes) - ,@(when predicate - `(:predicate #',predicate)) - :next-checkers ',(plist-get properties :next-checkers) - ,@(when enabled-fn - `(:enabled #',enabled-fn)) - ,@(when verify-fn - `(:verify #',verify-fn)) - :standard-input ',(plist-get properties :standard-input) - :working-directory ',(plist-get properties :working-directory))))) - - -;;; Built-in checkers -(flycheck-def-args-var flycheck-gnat-args ada-gnat - :package-version '(flycheck . "0.20")) - -(flycheck-def-option-var flycheck-gnat-include-path nil ada-gnat - "A list of include directories for GNAT. - -The value of this variable is a list of strings, where each -string is a directory to add to the include path of gcc. -Relative paths are relative to the file being checked." - :type '(repeat (directory :tag "Include directory")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "0.20")) - -(flycheck-def-option-var flycheck-gnat-language-standard "2012" ada-gnat - "The language standard to use in GNAT. - -The value of this variable is either a string denoting a language -standard, or nil, to use the default standard. When non-nil, pass -the language standard via the `-std' option." - :type '(choice (const :tag "Default standard" nil) - (string :tag "Language standard")) - :safe #'flycheck-string-or-nil-p - :package-version '(flycheck . "0.20")) - -(flycheck-def-option-var flycheck-gnat-warnings - '("wa") ada-gnat - "A list of additional Ada warnings to enable in GNAT. - -The value of this variable is a list of strings, where each -string is the name of a warning category to enable. By default, -most optional warnings are recommended, as in `-gnata'. - -Refer to Info Node `(gnat_ugn_unw)Warning Message Control' for -more information about GNAT warnings." - :type '(repeat :tag "Warnings" (string :tag "Warning name")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "0.20")) - -(flycheck-define-checker ada-gnat - "An Ada syntax checker using GNAT. - -Uses the GNAT compiler from GCC. See URL -`https://www.adacore.com/community/'." - :command ("gnatmake" - "-c" ; Just compile, don't bind - "-f" ; Force re-compilation - "-u" ; Compile the main file only - "-gnatf" ; Full error information - "-gnatef" ; Full source file name - "-D" temporary-directory - (option-list "-gnat" flycheck-gnat-warnings concat) - (option-list "-I" flycheck-gnat-include-path concat) - (option "-gnat" flycheck-gnat-language-standard concat) - (eval flycheck-gnat-args) - source) - :error-patterns - ((error line-start - (message "In file included from") " " (file-name) ":" line ":" - column ":" - line-end) - (info line-start (file-name) ":" line ":" column - ": note: " (message) line-end) - (warning line-start (file-name) ":" line ":" column - ": warning: " (message) line-end) - ;; no specific error prefix in Ada - (error line-start (file-name) ":" line ":" column - ": " (message) line-end)) - :modes ada-mode) - -(flycheck-define-checker asciidoc - "A AsciiDoc syntax checker using the AsciiDoc compiler. - -See URL `https://www.methods.co.nz/asciidoc'." - :command ("asciidoc" "-o" null-device "-") - :standard-input t - :error-patterns - ((error line-start - "asciidoc: ERROR: : Line " line ": " (message) - line-end) - (warning line-start - "asciidoc: WARNING: : Line " line ": " (message) - line-end) - (info line-start - "asciidoc: DEPRECATED: : Line " line ": " (message) - line-end)) - :modes adoc-mode) - -(flycheck-define-checker asciidoctor - "An AsciiDoc syntax checker using the Asciidoctor compiler. - -See URL `https://asciidoctor.org'." - :command ("asciidoctor" "-o" null-device "-") - :standard-input t - :error-patterns - ((error line-start - "asciidoctor: ERROR: : Line " line ": " (message) - line-end) - (warning line-start - "asciidoctor: WARNING: : Line " line ": " (message) - line-end)) - :modes adoc-mode) - -(defun flycheck-awk-gawk-fix-message (err) - "Remove the repeated file-name/line from the error message of ERR." - (setf (flycheck-error-message err) - (replace-regexp-in-string - (rx line-start - (group (zero-or-more (any " " "\t"))) - (group (zero-or-more nonl) "\n") - (backref 1)) - "\\2" - (replace-regexp-in-string - (rx "\ngawk: " (zero-or-more (not (any " "))) ":") - "\n" - (flycheck-error-message err)))) - err) - -(defun flycheck-awk-gawk-error-filter (errors) - "Remove repeated file-name/line from ERRORS." - (seq-do #'flycheck-awk-gawk-fix-message errors) - errors) - -(flycheck-define-checker awk-gawk - "GNU awk's built-in --lint checker." - :command ("gawk" - ;; Avoid code execution. See https://github.com/w0rp/ale/pull/1411 - "--source" "'BEGIN{exit} END{exit 1}'" - "-f" source - "--lint" - "/dev/null") - :standard-input nil - :error-patterns - ((warning line-start - "gawk: " - (file-name) ":" line ":" (optional column ":") - (message (one-or-more not-newline) - (optional "\n" - (one-or-more not-newline) - " ^ " - (one-or-more not-newline))) - line-end)) - :error-filter flycheck-awk-gawk-error-filter - :modes awk-mode) - -(flycheck-define-checker bazel-build-buildifier - "A checker for Bazel BUILD and BUILD.bazel files using buildifier. - -See URL `https://github.com/bazelbuild/buildtools/blob/master/buildifier'." - :command ("buildifier" "-lint=warn" "--type=build") - :standard-input t - :error-patterns - ((error line-start - ":" line ":" column ": " (message) - line-end) - (warning line-start - ":" line ": " (id (one-or-more (in word "-"))) ": " (message) - line-end)) - :modes bazel-build-mode) - -(flycheck-define-checker bazel-module-buildifier - "A checker for Bazel MODULE.bazel files using buildifier. - -See URL `https://github.com/bazelbuild/buildtools/blob/master/buildifier'." - :command ("buildifier" "-lint=warn" "--type=default") - :standard-input t - :error-patterns - ((error line-start - ":" line ":" column ": " (message) - line-end) - (warning line-start - ":" line ": " (id (one-or-more (in word "-"))) ": " (message) - line-end)) - :modes bazel-module-mode) - -(flycheck-define-checker bazel-starlark-buildifier - "A checker for Starlark bzl files using buildifier. - -See URL `https://github.com/bazelbuild/buildtools/blob/master/buildifier'." - :command ("buildifier" "-lint=warn" "--type=bzl") - :standard-input t - :error-patterns - ((error line-start - ":" line ":" column ": " (message) - line-end) - (warning line-start - ":" line ": " (id (one-or-more (in word "-"))) ": " (message) - line-end)) - :modes bazel-starlark-mode) - -(flycheck-define-checker bazel-workspace-buildifier - "A checker for Bazel WORKSPACE and WORKSPACE.bazel files using buildifier. - -See URL `https://github.com/bazelbuild/buildtools/blob/master/buildifier'." - :command ("buildifier" "-lint=warn" "--type=workspace") - :standard-input t - :error-patterns - ((error line-start - ":" line ":" column ": " (message) - line-end) - (warning line-start - ":" line ": " (id (one-or-more (in word "-"))) ": " (message) - line-end)) - :modes bazel-workspace-mode) - -(flycheck-def-args-var flycheck-clang-args c/c++-clang - :package-version '(flycheck . "0.22")) - -(flycheck-def-option-var flycheck-clang-blocks nil c/c++-clang - "Enable blocks in Clang. - -When non-nil, enable blocks in Clang with `-fblocks'. See URL -`https://clang.llvm.org/docs/BlockLanguageSpec.html' for more -information about blocks." - :type 'boolean - :safe #'booleanp - :package-version '(flycheck . "0.20")) - -(flycheck-def-option-var flycheck-clang-definitions nil c/c++-clang - "Additional preprocessor definitions for Clang. - -The value of this variable is a list of strings, where each -string is an additional definition to pass to Clang, via the `-D' -option." - :type '(repeat (string :tag "Definition")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "0.15")) - -(flycheck-def-option-var flycheck-clang-include-path nil c/c++-clang - "A list of include directories for Clang. - -The value of this variable is a list of strings, where each -string is a directory to add to the include path of Clang. -Relative paths are relative to the file being checked." - :type '(repeat (directory :tag "Include directory")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "0.14")) - -(flycheck-def-option-var flycheck-clang-includes nil c/c++-clang - "A list of additional include files for Clang. - -The value of this variable is a list of strings, where each -string is a file to include before syntax checking. Relative -paths are relative to the file being checked." - :type '(repeat (file :tag "Include file")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "0.15")) - -(flycheck-def-option-var flycheck-clang-language-standard nil c/c++-clang - "The language standard to use in Clang. - -The value of this variable is either a string denoting a language -standard, or nil, to use the default standard. When non-nil, -pass the language standard via the `-std' option." - :type '(choice (const :tag "Default standard" nil) - (string :tag "Language standard")) - :safe #'flycheck-string-or-nil-p - :package-version '(flycheck . "0.15")) -(make-variable-buffer-local 'flycheck-clang-language-standard) - -(flycheck-def-option-var flycheck-clang-ms-extensions nil c/c++-clang - "Whether to enable Microsoft extensions to C/C++ in Clang. - -When non-nil, enable Microsoft extensions to C/C++ via -`-fms-extensions'." - :type 'boolean - :safe #'booleanp - :package-version '(flycheck . "0.16")) - -(flycheck-def-option-var flycheck-clang-no-exceptions nil c/c++-clang - "Whether to disable exceptions in Clang. - -When non-nil, disable exceptions for syntax checks, via -`-fno-exceptions'." - :type 'boolean - :safe #'booleanp - :package-version '(flycheck . "0.20")) - -(flycheck-def-option-var flycheck-clang-no-rtti nil c/c++-clang - "Whether to disable RTTI in Clang. - -When non-nil, disable RTTI for syntax checks, via `-fno-rtti'." - :type 'boolean - :safe #'booleanp - :package-version '(flycheck . "0.15")) - -(flycheck-def-option-var flycheck-clang-pedantic nil c/c++-clang - "Whether to warn about language extensions in Clang. - -For ISO C, follows the version specified by any -std option used. -When non-nil, disable non-ISO extensions to C/C++ via -`-pedantic'." - :type 'boolean - :safe #'booleanp - :package-version '(flycheck . "0.23")) - -(flycheck-def-option-var flycheck-clang-pedantic-errors nil c/c++-clang - "Whether to error on language extensions in Clang. - -For ISO C, follows the version specified by any -std option used. -When non-nil, disable non-ISO extensions to C/C++ via -`-pedantic-errors'." - :type 'boolean - :safe #'booleanp - :package-version '(flycheck . "0.23")) - -(flycheck-def-option-var flycheck-clang-standard-library nil c/c++-clang - "The standard library to use for Clang. - -The value of this variable is the name of a standard library as -string, or nil to use the default standard library. - -Refer to the Clang manual at URL -`https://clang.llvm.org/docs/UsersManual.html' for more -information about the standard library." - :type '(choice (const :tag "Default standard library" nil) - (const "libc++") - (const :tag "GNU libstdc++" "libstdc++") - (string :tag "Library name")) - :safe #'flycheck-string-or-nil-p - :package-version '(flycheck . "0.15")) - -(flycheck-def-option-var flycheck-clang-warnings '("all" "extra") c/c++-clang - "A list of additional warnings to enable in Clang. - -The value of this variable is a list of strings, where each string -is the name of a warning category to enable. By default, all -recommended warnings and some extra warnings are enabled (as by -`-Wall' and `-Wextra' respectively). - -Refer to the Clang manual at URL -`https://clang.llvm.org/docs/UsersManual.html' for more -information about warnings." - :type '(choice (const :tag "No additional warnings" nil) - (repeat :tag "Additional warnings" - (string :tag "Warning name"))) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "0.14")) - -(defun flycheck-c/c++-quoted-include-directory () - "Get the directory for quoted includes. - -C/C++ compilers typically look up includes with quotation marks -in the directory of the file being compiled. However, since -Flycheck uses temporary copies for syntax checking, it needs to -explicitly determine the directory for quoted includes. - -This function determines the directory by looking at function -`buffer-file-name', or if that is nil, at `default-directory'." - (if-let (fn (buffer-file-name)) - (file-name-directory fn) - ;; If the buffer has no file name, fall back to its default directory - default-directory)) - -(flycheck-define-checker c/c++-clang - "A C/C++ syntax checker using Clang. - -See URL `https://clang.llvm.org/'." - :command ("clang" - "-fsyntax-only" - "-fno-color-diagnostics" ; Do not include color codes in output - "-fno-caret-diagnostics" ; Do not visually indicate the source - ; location - "-fno-diagnostics-show-option" ; Do not show the corresponding - ; warning group - "-iquote" (eval (flycheck-c/c++-quoted-include-directory)) - (option "-std=" flycheck-clang-language-standard concat) - (option-flag "-pedantic" flycheck-clang-pedantic) - (option-flag "-pedantic-errors" flycheck-clang-pedantic-errors) - (option "-stdlib=" flycheck-clang-standard-library concat) - (option-flag "-fms-extensions" flycheck-clang-ms-extensions) - (option-flag "-fno-exceptions" flycheck-clang-no-exceptions) - (option-flag "-fno-rtti" flycheck-clang-no-rtti) - (option-flag "-fblocks" flycheck-clang-blocks) - (option-list "-include" flycheck-clang-includes) - (option-list "-W" flycheck-clang-warnings concat) - (option-list "-D" flycheck-clang-definitions concat) - (option-list "-I" flycheck-clang-include-path) - (eval flycheck-clang-args) - "-x" (eval - (pcase major-mode - ((or `c++-mode `c++-ts-mode) "c++") - ((or `c-mode `c-ts-mode) "c"))) - ;; Read from standard input - "-") - :standard-input t - :error-patterns - ((info line-start (or "" (file-name)) ":" line ":" column - ": note: " (optional (message)) line-end) - (warning line-start (or "" (file-name)) ":" line ":" column - ": warning: " (optional (message)) line-end) - (error line-start (or "" (file-name)) ":" line ":" column - ": " (or "fatal error" "error") ": " (optional (message)) line-end)) - :error-filter - (lambda (errors) - (let ((errors (flycheck-sanitize-errors errors))) - (dolist (err errors) - ;; Clang will output empty messages for #error/#warning pragmas without - ;; messages. We fill these empty errors with a dummy message to get - ;; them past our error filtering - (setf (flycheck-error-message err) - (or (flycheck-error-message err) "no message"))) - errors)) - :modes (c-mode c++-mode c-ts-mode c++-ts-mode) - :next-checkers ((warning . c/c++-cppcheck))) - -(flycheck-def-args-var flycheck-gcc-args c/c++-gcc - :package-version '(flycheck . "0.22")) - -(flycheck-def-option-var flycheck-gcc-definitions nil c/c++-gcc - "Additional preprocessor definitions for GCC. - -The value of this variable is a list of strings, where each -string is an additional definition to pass to GCC, via the `-D' -option." - :type '(repeat (string :tag "Definition")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "0.20")) - -(flycheck-def-option-var flycheck-gcc-include-path nil c/c++-gcc - "A list of include directories for GCC. - -The value of this variable is a list of strings, where each -string is a directory to add to the include path of gcc. -Relative paths are relative to the file being checked." - :type '(repeat (directory :tag "Include directory")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "0.20")) - -(flycheck-def-option-var flycheck-gcc-includes nil c/c++-gcc - "A list of additional include files for GCC. - -The value of this variable is a list of strings, where each -string is a file to include before syntax checking. Relative -paths are relative to the file being checked." - :type '(repeat (file :tag "Include file")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "0.20")) - -(flycheck-def-option-var flycheck-gcc-language-standard nil c/c++-gcc - "The language standard to use in GCC. - -The value of this variable is either a string denoting a language -standard, or nil, to use the default standard. When non-nil, -pass the language standard via the `-std' option." - :type '(choice (const :tag "Default standard" nil) - (string :tag "Language standard")) - :safe #'flycheck-string-or-nil-p - :package-version '(flycheck . "0.20")) -(make-variable-buffer-local 'flycheck-gcc-language-standard) - -(flycheck-def-option-var flycheck-gcc-no-exceptions nil c/c++-gcc - "Whether to disable exceptions in GCC. - -When non-nil, disable exceptions for syntax checks, via -`-fno-exceptions'." - :type 'boolean - :safe #'booleanp - :package-version '(flycheck . "0.20")) - -(flycheck-def-option-var flycheck-gcc-no-rtti nil c/c++-gcc - "Whether to disable RTTI in GCC. - -When non-nil, disable RTTI for syntax checks, via `-fno-rtti'." - :type 'boolean - :safe #'booleanp - :package-version '(flycheck . "0.20")) - -(flycheck-def-option-var flycheck-gcc-openmp nil c/c++-gcc - "Whether to enable OpenMP in GCC. - -When non-nil, enable OpenMP for syntax checkers, via -`-fopenmp'." - :type 'boolean - :safe #'booleanp - :package-version '(flycheck . "0.21")) - -(flycheck-def-option-var flycheck-gcc-pedantic nil c/c++-gcc - "Whether to warn about language extensions in GCC. - -For ISO C, follows the version specified by any -std option used. -When non-nil, disable non-ISO extensions to C/C++ via -`-pedantic'." - :type 'boolean - :safe #'booleanp - :package-version '(flycheck . "0.23")) - -(flycheck-def-option-var flycheck-gcc-pedantic-errors nil c/c++-gcc - "Whether to error on language extensions in GCC. - -For ISO C, follows the version specified by any -std option used. -When non-nil, disable non-ISO extensions to C/C++ via -`-pedantic-errors'." - :type 'boolean - :safe #'booleanp - :package-version '(flycheck . "0.23")) - -(flycheck-def-option-var flycheck-gcc-warnings '("all" "extra") c/c++-gcc - "A list of additional warnings to enable in GCC. - -The value of this variable is a list of strings, where each string -is the name of a warning category to enable. By default, all -recommended warnings and some extra warnings are enabled (as by -`-Wall' and `-Wextra' respectively). - -Refer to the gcc manual at URL -`https://gcc.gnu.org/onlinedocs/gcc/' for more information about -warnings." - :type '(choice (const :tag "No additional warnings" nil) - (repeat :tag "Additional warnings" - (string :tag "Warning name"))) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "0.20")) - -(flycheck-define-checker c/c++-gcc - "A C/C++ syntax checker using GCC. - -Requires GCC 4.4 or newer. See URL `https://gcc.gnu.org/'." - :command ("gcc" - "-fshow-column" - "-iquote" (eval (flycheck-c/c++-quoted-include-directory)) - (option "-std=" flycheck-gcc-language-standard concat) - (option-flag "-pedantic" flycheck-gcc-pedantic) - (option-flag "-pedantic-errors" flycheck-gcc-pedantic-errors) - (option-flag "-fno-exceptions" flycheck-gcc-no-exceptions) - (option-flag "-fno-rtti" flycheck-gcc-no-rtti) - (option-flag "-fopenmp" flycheck-gcc-openmp) - (option-list "-include" flycheck-gcc-includes) - (option-list "-W" flycheck-gcc-warnings concat) - (option-list "-D" flycheck-gcc-definitions concat) - (option-list "-I" flycheck-gcc-include-path) - (eval flycheck-gcc-args) - "-x" (eval - (pcase major-mode - ((or `c++-mode `c++-ts-mode) "c++") - ((or `c-mode `c-ts-mode) "c"))) - ;; GCC performs full checking only when actually compiling, so - ;; `-fsyntax-only' is not enough. Just let it generate assembly - ;; code. - "-S" "-o" null-device - ;; Read from standard input - "-") - :standard-input t - :error-patterns - ((info line-start (or "" (file-name)) - ":" line (optional ":" column) - ": note: " (message) line-end) - (warning line-start (or "" (file-name)) - ":" line (optional ":" column) - ": warning: " (message (one-or-more (not (any "\n[")))) - (optional "[" (id (one-or-more not-newline)) "]") line-end) - (error line-start (or "" (file-name)) - ":" line (optional ":" column) - ": " (or "fatal error" "error") ": " (message) line-end)) - :modes (c-mode c++-mode c-ts-mode c++-ts-mode) - :next-checkers ((warning . c/c++-cppcheck))) - -(flycheck-def-args-var flycheck-cppcheck-args c/c++-cppcheck - :package-version '(flycheck . "35")) - -(flycheck-def-option-var flycheck-cppcheck-checks '("style") c/c++-cppcheck - "Enabled checks for Cppcheck. - -The value of this variable is a list of strings, where each -string is the name of an additional check to enable. By default, -all coding style checks are enabled. - -See section \"Enable message\" in the Cppcheck manual at URL -`https://cppcheck.sourceforge.net/manual.pdf', and the -documentation of the `--enable' option for more information, -including a list of supported checks." - :type '(repeat :tag "Additional checks" - (string :tag "Check name")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "0.14")) - -(flycheck-def-option-var flycheck-cppcheck-standards nil c/c++-cppcheck - "The standards to use in cppcheck. - -The value of this variable is either a list of strings denoting -the standards to use, or nil to pass nothing to cppcheck. When -non-nil, pass the standards via one or more `--std=' options." - :type '(choice (const :tag "Default" nil) - (repeat :tag "Custom standards" - (string :tag "Standard name"))) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "28")) -(make-variable-buffer-local 'flycheck-cppcheck-standards) - -(flycheck-def-option-var flycheck-cppcheck-suppressions-file nil c/c++-cppcheck - "The suppressions file to use in cppcheck. - -The value of this variable is a file with the suppressions to -use, or nil to pass nothing to cppcheck. When non-nil, pass the -suppressions file via the `--suppressions-list=' option." - :type '(choice (const :tag "Default" nil) - (file :tag "Suppressions file")) - :safe #'flycheck-string-or-nil-p - :package-version '(flycheck . "32")) -(make-variable-buffer-local 'flycheck-cppcheck-suppressions-file) - -(flycheck-def-option-var flycheck-cppcheck-suppressions nil c/c++-cppcheck - "The suppressions to use in cppcheck. - -The value of this variable is either a list of strings denoting -the suppressions to use, or nil to pass nothing to cppcheck. -When non-nil, pass the suppressions via one or more `--suppress=' -options." - :type '(choice (const :tag "Default" nil) - (repeat :tag "Additional suppressions" - (string :tag "Suppression"))) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "28")) - -(flycheck-def-option-var flycheck-cppcheck-inconclusive nil c/c++-cppcheck - "Whether to enable Cppcheck inconclusive checks. - -When non-nil, enable Cppcheck inconclusive checks. This allows Cppcheck to -report warnings it's not certain of, but it may result in false positives. - -This will have no effect when using Cppcheck 1.53 and older." - :type 'boolean - :safe #'booleanp - :package-version '(flycheck . "0.19")) - -(flycheck-def-option-var flycheck-cppcheck-include-path nil c/c++-cppcheck - "A list of include directories for cppcheck. - -The value of this variable is a list of strings, where each -string is a directory to add to the include path of cppcheck. -Relative paths are relative to the file being checked." - :type '(repeat (directory :tag "Include directory")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "0.24")) - -(flycheck-define-checker c/c++-cppcheck - "A C/C++ checker using cppcheck. - -See URL `https://cppcheck.sourceforge.net/'." - :command ("cppcheck" "--quiet" "--xml-version=2" "--inline-suppr" - (option "--enable=" flycheck-cppcheck-checks concat - flycheck-option-comma-separated-list) - (option-flag "--inconclusive" flycheck-cppcheck-inconclusive) - (option-list "-I" flycheck-cppcheck-include-path) - (option-list "--std=" flycheck-cppcheck-standards concat) - (option-list "--suppress=" flycheck-cppcheck-suppressions concat) - (option "--suppressions-list=" - flycheck-cppcheck-suppressions-file concat) - "-x" (eval - (pcase major-mode - ((or `c++-mode `c++-ts-mode) "c++") - ((or `c-mode `c-ts-mode) "c"))) - (eval flycheck-cppcheck-args) - source) - :error-parser flycheck-parse-cppcheck - :modes (c-mode c++-mode c-ts-mode c++-ts-mode)) - -(flycheck-define-checker cfengine - "A CFEngine syntax checker using cf-promises. - -See URL `https://cfengine.com/'." - :command ("cf-promises" "-Wall" "-f" - ;; We must stay in the same directory to resolve @include - source-inplace) - :error-patterns - ((warning line-start (file-name) ":" line ":" column - ": warning: " (message) line-end) - (error line-start (file-name) ":" line ":" column - ": error: " (message) line-end)) - :modes (cfengine-mode cfengine3-mode)) - -(flycheck-define-checker coffee - "A CoffeeScript syntax checker using coffee. - -See URL `https://coffeescript.org/'." - ;; --print suppresses generation of compiled .js files - :command ("coffee" "--compile" "--print" "--stdio") - :standard-input t - :error-patterns - ((error line-start "[stdin]:" line ":" column - ": error: " (message) line-end)) - :modes coffee-mode - :next-checkers ((warning . coffee-coffeelint))) - -(flycheck-def-config-file-var flycheck-coffeelintrc coffee-coffeelint - ".coffeelint.json") - -(flycheck-define-checker coffee-coffeelint - "A CoffeeScript style checker using coffeelint. - -See URL `https://www.coffeelint.org/'." - :command - ("coffeelint" - (config-file "--file" flycheck-coffeelintrc) - "--stdin" "--reporter" "checkstyle") - :standard-input t - :error-parser flycheck-parse-checkstyle - :error-filter (lambda (errors) - (flycheck-remove-error-file-names - "stdin" (flycheck-remove-error-ids - (flycheck-sanitize-errors errors)))) - :modes coffee-mode) - -(flycheck-define-checker css-csslint - "A CSS syntax and style checker using csslint. - -See URL `https://github.com/CSSLint/csslint'." - :command ("csslint" "--format=checkstyle-xml" source) - :error-parser flycheck-parse-checkstyle - :error-filter flycheck-dequalify-error-ids - :modes (css-mode css-ts-mode)) - -(defconst flycheck-stylelint-args '("--formatter" "json") - "Common arguments to stylelint invocations.") - -;; Limit the length of the generated docstring by including only the first three -;; checker symbols, otherwise emacs will complain about the docstring length -;; and may refuse to compile the package. -(let ((print-length 3)) - (flycheck-def-config-file-var flycheck-stylelintrc - (css-stylelint scss-stylelint sass-stylelint less-stylelint) nil)) - -(flycheck-def-option-var flycheck-stylelint-quiet - nil (css-stylelint scss-stylelint sass-stylelint less-stylelint) - "Whether to run stylelint in quiet mode. - -When non-nil, enable quiet mode, via `--quiet'." - :type 'boolean - :safe #'booleanp - :package-version '(flycheck . 26)) - -(defconst flycheck-stylelint-error-re - (flycheck-rx-to-string - '(: line-start (id (one-or-more word)) ": " (message) line-end))) - -(defun flycheck-parse-stylelint (output checker buffer) - "Parse stylelint errors from OUTPUT. - -CHECKER and BUFFER denoted the CHECKER that returned OUTPUT and -the BUFFER that was checked respectively. - -The CHECKER usually returns the errors as JSON. - -If the CHECKER throws an Error it returns an Error message with a stacktrace." - (condition-case nil - (flycheck-parse-stylelint-json output checker buffer) - - ;; The output could not be parsed as JSON - (json-error - - ;; Extract a flycheck error from the output (with a regular expression) - ;; For match-string 4/5 see flycheck-rx-message/flycheck-rx-id - (when (string-match flycheck-stylelint-error-re output) - (list (flycheck-error-new-at - 1 nil 'error - (match-string 4 output) - :id (match-string 5 output) - :checker checker - :buffer buffer - :filename (buffer-file-name buffer))))))) - -(defun flycheck-parse-stylelint-json (output checker buffer) - "Parse stylelint JSON errors from OUTPUT. - -CHECKER and BUFFER denoted the CHECKER that returned OUTPUT and -the BUFFER that was checked respectively. - -See URL `https://stylelint.io/developer-guide/formatters/' for information -about the JSON format of stylelint." - (let ((json-object-type 'plist)) - - ;; stylelint returns a vector of result objects - ;; Since we only passed one file, the first element is enough - (let* ((stylelint-output (elt (json-read-from-string output) 0)) - (filename (buffer-file-name buffer)) - - ;; Turn all deprecations into warnings - (deprecations - (mapcar (lambda (d) - (flycheck-error-new-at - 1 nil 'warning - (plist-get d :text) - :id "Deprecation Warning" - :checker checker - :buffer buffer - :filename filename)) - (plist-get stylelint-output :deprecations))) - - ;; Turn all invalid options into errors - (invalid-options - (mapcar (lambda (io) - (flycheck-error-new-at - 1 nil 'error - (plist-get io :text) - :id "Invalid Option" - :checker checker - :buffer buffer - :filename filename)) - (plist-get stylelint-output :invalidOptionWarnings))) - - ;; Read all linting warnings - (warnings - (mapcar (lambda (w) - (flycheck-error-new-at - (plist-get w :line) (plist-get w :column) - (pcase (plist-get w :severity) - (`"error" 'error) - (`"warning" 'warning) - ;; Default to info for unknown .severity - (_ 'info)) - (plist-get w :text) - :id (plist-get w :rule) - :checker checker - :buffer buffer - :filename filename)) - (plist-get stylelint-output :warnings)))) - - ;; Return the combined errors (deprecations, invalid options, warnings) - (append deprecations invalid-options warnings)))) - -(defun flycheck--stylelint-config-exists-p (checker) - "Whether there is a valid stylelint CHECKER config for the current buffer." - (eql 0 (flycheck-call-checker-process - checker nil nil nil - "--print-config" (or buffer-file-name "index.js")))) - -(defun flycheck--stylelint-get-major-version (checker) - "Return major version of stylelint CHECKER." - (let ((cb (current-buffer))) - (with-temp-buffer - (let ((temp-buffer (current-buffer))) - (with-current-buffer cb - (flycheck-call-checker-process - checker nil temp-buffer nil "--version")) - (string-to-number (car (split-string (buffer-string) "\\."))))))) - -(defun flycheck--stylelint-verify (checker) - "Verify stylelint setup for CHECKER." - (let ((have-config (flycheck--stylelint-config-exists-p checker))) - (list - (flycheck-verification-result-new - :label "configuration available" - :message (if have-config "yes" "no config file found") - :face (if have-config 'success '(bold error))) - (flycheck-verification-result-new - :label "stylecheck version" - :message (number-to-string (flycheck--stylelint-get-major-version checker)) - :face 'success)))) - -(flycheck-define-checker css-stylelint - "A CSS syntax and style checker using stylelint. - -See URL `https://stylelint.io/'." - :command ("stylelint" - (eval flycheck-stylelint-args) - (option-flag "--quiet" flycheck-stylelint-quiet) - (config-file "--config" flycheck-stylelintrc) - "--stdin-filename" (eval (or (buffer-file-name) "style.css"))) - :standard-input t - :verify (lambda (_) (flycheck--stylelint-verify 'css-stylelint)) - :error-parser flycheck-parse-stylelint - :predicate flycheck-buffer-nonempty-p - :modes (css-mode css-ts-mode) - :error-explainer - (lambda (err) - (let ((error-code (flycheck-error-id err)) - (url "https://stylelint.io/user-guide/rules/%s")) - (and error-code `(url . ,(format url error-code)))))) - -(flycheck-def-option-var flycheck-cuda-language-standard nil cuda-nvcc - "Our CUDA Language Standard." - :type '(choice (const :tag "Default standard" nil) - (string :tag "Language standard")) - :safe #'flycheck-string-or-nil-p - :package-version '(flycheck . "32")) -(make-variable-buffer-local 'flycheck-cuda-language-standard) - -(flycheck-def-option-var flycheck-cuda-compiler-options '("-Wall" "-Wextra") cuda-nvcc - "Specify options directly to the compiler/preprocessor." - :type '(choice (const :tag "No additional compiler options" nil) - (repeat :tag "Addition compiler options" - (string :tag "Compiler option"))) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "35")) - -(flycheck-def-option-var flycheck-cuda-gencodes nil cuda-nvcc - "Our real and virtual GPU architectures to pass to nvcc." - :type '(repeat (file :tag "GPU architecture")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "32")) - -(flycheck-def-option-var flycheck-cuda-includes nil cuda-nvcc - "Our include directories to pass to nvcc." - :type '(repeat (file :tag "Include file")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "32")) - -(flycheck-def-option-var flycheck-cuda-definitions nil cuda-nvcc - "Additional preprocessor definitions for nvcc. -A list of strings to pass to cuda, a la flycheck-clang" - :type '(repeat (string :tag "Definitions")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "32")) - -(flycheck-def-option-var flycheck-cuda-include-path nil cuda-nvcc - "A list of include directories for nvcc." - :type '(repeat (directory :tag "Include directory")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "32")) - -(flycheck-def-option-var flycheck-cuda-relaxed-constexpr nil cuda-nvcc - "Enable calling host constexpr from device function for nvcc. - -When non-nil, enable experimental calling of a constexpr __host__ -function from a __device__ function." - :type 'boolean - :safe #'booleanp - :package-version '(flycheck . "35")) - -(flycheck-def-option-var flycheck-cuda-extended-lambda nil cuda-nvcc - "Enable annotating lambda functions with __host__ or __device__. - -When non-nil, enable experimental compilation of __host__ and -__device__ lambda functions." - :type 'boolean - :safe #'booleanp - :package-version '(flycheck . "35")) - -(flycheck-define-checker cuda-nvcc - "A CUDA C/C++ syntax checker using nvcc. - -See URL `https://developer.nvidia.com/cuda-llvm-compiler'." - :command ("nvcc" - "-c" ;; Compile Only - "--output-file" "/dev/null" ;; avoid creating output .o - "--x=cu" ;; explicitly specify it's a CUDA language file - "-rdc=true" ;; Allow linking with external cuda funcions - (option "-std=" flycheck-cuda-language-standard concat) - (option-flag "--expt-relaxed-constexpr" flycheck-cuda-relaxed-constexpr) - (option-flag "--expt-extended-lambda" flycheck-cuda-extended-lambda) - (option-list "-include" flycheck-cuda-includes) - (option-list "-gencode" flycheck-cuda-gencodes) - (option-list "-Xcompiler" flycheck-cuda-compiler-options) - (option-list "-D" flycheck-cuda-definitions concat) - (option-list "-I" flycheck-cuda-include-path) - source) - :error-patterns - ((error line-start - (message "In file included from") - " " (or "" (file-name)) - ":" line ":" line-end) - (error line-start (or "" (file-name)) - "(" line "): error" - (optional " #" (id (one-or-more digit) (optional "-D"))) - ": " (message) line-end) - (error line-start (or "" (file-name)) - ":" line ":" column - ": fatal error" - (optional " #" (id (one-or-more digit) (optional "-D"))) - ": " (optional (message)) line-end) - (warning line-start (or "" (file-name)) - "(" line "): warning" - (optional " #" (id (one-or-more digit) (optional "-D"))) - ": " (message) line-end)) - :modes cuda-mode) - - -(flycheck-def-option-var flycheck-cwl-schema-path nil cwl - "A path for the schema file for Common Workflow Language. - -The value of this variable is a string that denotes a path for -the schema file of Common Workflow Language." - :type '(choice (const :tag "None" nil) - (file :tag "Schema file")) - :safe #'flycheck-string-or-nil-p) - -(flycheck-define-checker cwl - "A CWL syntax checker using Schema Salad validator. - -Requires Schema Salad 2.6.20171101113912 or newer. -See URL `https://www.commonwl.org/v1.0/SchemaSalad.html'." - :command ("schema-salad-tool" - "--quiet" - "--print-oneline" - (eval flycheck-cwl-schema-path) - source-inplace) - :error-patterns - ((error line-start - (file-name) ":" line ":" column ":" (zero-or-more blank) - (message (one-or-more not-newline)) - line-end)) - :modes cwl-mode) - -(defconst flycheck-d-module-re - (rx "module" (one-or-more (syntax whitespace)) - (group (one-or-more (not (syntax whitespace)))) - (zero-or-more (syntax whitespace)) - ";") - "Regular expression to match a D module declaration.") - -(defun flycheck-d-base-directory () - "Get the relative base directory path for this module." - (let* ((file-name (buffer-file-name)) - (module-file (if (and file-name - (string= (file-name-nondirectory file-name) - "package.d")) - (directory-file-name (file-name-directory file-name)) - file-name))) - (flycheck-module-root-directory - (flycheck-find-in-buffer flycheck-d-module-re) - module-file))) - -(flycheck-def-option-var flycheck-dmd-include-path nil d-dmd - "A list of include directories for dmd. - -The value of this variable is a list of strings, where each -string is a directory to add to the include path of dmd. -Relative paths are relative to the file being checked." - :type '(repeat (directory :tag "Include directory")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "0.18")) - -(flycheck-def-args-var flycheck-dmd-args d-dmd - :package-version '(flycheck . "0.24")) - -(flycheck-define-checker d-dmd - "A D syntax checker using the DMD compiler. - -Requires DMD 2.066 or newer. See URL `https://dlang.org/'." - :command ("dmd" - "-debug" ; Compile in debug mode - "-o-" ; Don't generate an object file - "-vcolumns" ; Add columns in output - "-wi" ; Compilation will continue even if there are warnings - (eval (concat "-I" (flycheck-d-base-directory))) - (option-list "-I" flycheck-dmd-include-path concat) - (eval flycheck-dmd-args) - (source ".d")) - :error-patterns - ((error line-start - (file-name) "(" line "," column "): Error: " (message) - line-end) - (warning line-start (file-name) "(" line "," column "): " - (or "Warning" "Deprecation") ": " (message) line-end) - (info line-start (file-name) "(" line "," column "): " - (one-or-more " ") (message) line-end)) - :modes d-mode) - -(flycheck-define-checker dockerfile-hadolint - "A Dockerfile syntax checker using the hadolint. - -See URL `https://github.com/hadolint/hadolint/'." - :command ("hadolint" "--no-color" "-") - :standard-input t - :error-patterns - ((error line-start - (file-name) ":" line " " (id (one-or-more alnum)) " error: " (message) - line-end) - (warning line-start - (file-name) ":" line " " (id (one-or-more alnum)) - " warning: " (message) line-end) - (info line-start - (file-name) ":" line " " (id (one-or-more alnum)) " info: " (message) - line-end) - (error line-start - (file-name) ":" line ":" column " " (message) - line-end)) - :error-filter - (lambda (errors) - (flycheck-sanitize-errors - (flycheck-remove-error-file-names "-" errors))) - :modes (dockerfile-mode dockerfile-ts-mode)) - -(defun flycheck-credo--working-directory (&rest _ignored) - "Check if `credo' is installed as dependency in the application." - (and buffer-file-name - (locate-dominating-file buffer-file-name "deps/credo"))) - -(flycheck-def-option-var flycheck-elixir-credo-strict nil elixir-credo - "Enable strict mode in `credo'. - -When non-nil, pass the `--strict' flag to credo." - :type 'boolean - :safe #'booleanp - :package-version '(flycheck . "32")) - -(flycheck-define-checker elixir-credo - "An Elixir checker for static code analysis using Credo. - -See `https://credo-ci.org/'." - :command ("mix" "credo" - (option-flag "--strict" flycheck-elixir-credo-strict) - "--format" "flycheck" - "--read-from-stdin" source-original) - :standard-input t - :working-directory flycheck-credo--working-directory - :enabled flycheck-credo--working-directory - :error-patterns - ((info line-start - (file-name) ":" line (optional ":" column) ": " - (or "F" "R" "C") ": " (message) line-end) - (warning line-start - (file-name) ":" line (optional ":" column) ": " - (or "D" "W") ": " (message) line-end)) - :modes elixir-mode) - -(defconst flycheck-this-emacs-executable - (concat invocation-directory invocation-name) - "The path to the currently running Emacs executable.") - -(defconst flycheck-emacs-args '("-Q" "--batch") - "Common arguments to Emacs invocations.") - -(defmacro flycheck-prepare-emacs-lisp-form (&rest body) - "Prepare BODY for use as check form in a subprocess." - (declare (indent 0)) - `(flycheck-sexp-to-string - '(progn - (defvar jka-compr-inhibit) - (unwind-protect - ;; Flycheck inhibits compression of temporary files, thus we - ;; must not attempt to decompress. - (let ((jka-compr-inhibit t)) - ;; Strip option-argument separator from arguments, if present - (when (equal (car command-line-args-left) "--") - (setq command-line-args-left (cdr command-line-args-left))) - ,@body) - ;; Prevent Emacs from processing the arguments on its own, see - ;; https://github.com/flycheck/flycheck/issues/319 - (setq command-line-args-left nil))))) - -(defun flycheck-emacs-lisp-bytecomp-config-form () - "Prepare an Emacs Lisp form to set byte-compiler variables." - (flycheck-sexp-to-string - `(progn - (require 'bytecomp) - (setq byte-compile-root-dir - ,(if buffer-file-name - (file-name-directory buffer-file-name) - default-directory))))) - -(defconst flycheck-emacs-lisp-check-form - (flycheck-prepare-emacs-lisp-form - ;; Keep track of the generated bytecode files, to delete them after byte - ;; compilation. - (require 'bytecomp) - (defvar flycheck-byte-compiled-files nil) - (let ((byte-compile-dest-file-function - (lambda (source) - (let ((temp-file (make-temp-file (file-name-nondirectory source)))) - (push temp-file flycheck-byte-compiled-files) - temp-file)))) - (unwind-protect - (byte-compile-file (car command-line-args-left)) - (mapc (lambda (f) (ignore-errors (delete-file f))) - flycheck-byte-compiled-files)) - (when (bound-and-true-p flycheck-emacs-lisp-check-declare) - (check-declare-file (car command-line-args-left)))))) - -(flycheck-def-option-var flycheck-emacs-lisp-load-path nil emacs-lisp - "Load path to use in the Emacs Lisp syntax checker. - -When set to `inherit', use the `load-path' of the current Emacs -session during syntax checking. - -When set to a list of strings, add each directory in this list to -the `load-path' before invoking the byte compiler. Relative -paths in this list are expanded against the `default-directory' -of the buffer to check. - -When nil, do not explicitly set the `load-path' during syntax -checking. The syntax check only uses the built-in `load-path' of -Emacs in this case. - -Note that changing this variable can lead to wrong results of the -syntax check, e.g. if an unexpected version of a required library -is used." - :type '(choice (const :tag "Inherit current `load-path'" inherit) - (repeat :tag "Load path" directory)) - :risky t - :package-version '(flycheck . "0.14")) - -(flycheck-def-option-var flycheck-emacs-lisp-initialize-packages - 'auto emacs-lisp - "Whether to initialize packages in the Emacs Lisp syntax checker. - -When nil, never initialize packages. When `auto', initialize -packages only when checking `user-init-file' or files from -`user-emacs-directory'. For any other non-nil value, always -initialize packages. - -When initializing packages is enabled the `emacs-lisp' syntax -checker calls `package-initialize' before byte-compiling the file -to be checked. It also sets `package-user-dir' according to -`flycheck-emacs-lisp-package-user-dir'." - :type '(choice (const :tag "Do not initialize packages" nil) - (const :tag "Initialize packages for configuration only" auto) - (const :tag "Always initialize packages" t)) - :risky t - :package-version '(flycheck . "0.14")) - -(defconst flycheck-emacs-lisp-package-initialize-form - (flycheck-sexp-to-string - '(with-demoted-errors "Error during package initialization: %S" - (package-initialize))) - "Form used to initialize packages.") - -(defun flycheck-option-emacs-lisp-package-initialize (value) - "Option VALUE filter for `flycheck-emacs-lisp-initialize-packages'." - (let ((shall-initialize - (if (eq value 'auto) - (or (flycheck-in-user-emacs-directory-p - (or buffer-file-name default-directory)) - ;; `user-init-file' is nil in non-interactive sessions. Now, - ;; no user would possibly use Flycheck in a non-interactive - ;; session, but our unit tests run non-interactively, so we - ;; have to handle this case anyway - (and user-init-file buffer-file-name - (flycheck-same-files-p buffer-file-name user-init-file))) - value))) - (when shall-initialize - ;; If packages shall be initialized, return the corresponding form, - ;; otherwise make Flycheck ignore the option by returning nil. - flycheck-emacs-lisp-package-initialize-form))) - -(flycheck-def-option-var flycheck-emacs-lisp-package-user-dir nil emacs-lisp - "Package directory for the Emacs Lisp syntax checker. - -If set to a string set `package-user-dir' to the value of this -variable before initializing packages. If set to nil just inherit -the value of `package-user-dir' from the running Emacs session. - -This variable has no effect, if -`flycheck-emacs-lisp-initialize-packages' is nil." - :type '(choice (const :tag "Default package directory" nil) - (directory :tag "Custom package directory")) - :risky t - :package-version '(flycheck . "0.14")) - -(defun flycheck-option-emacs-lisp-package-user-dir (value) - "Option VALUE filter for `flycheck-emacs-lisp-package-user-dir'." - ;; Inherit the package directory from our Emacs session - (let ((value (or value (bound-and-true-p package-user-dir)))) - (when value - (flycheck-sexp-to-string `(setq package-user-dir ,value))))) - -(flycheck-def-option-var flycheck-emacs-lisp-check-declare nil emacs-lisp - "If non-nil, check ‘declare-function’ forms using ‘check-declare-file’." - :type '(choice (const :tag "Do not check declare forms" nil) - (const :tag "Check declare forms" t)) - :risky t - :package-version '(flycheck . "31")) - -(defun flycheck-option-emacs-lisp-check-declare (value) - "Option VALUE filter for `flycheck-emacs-lisp-check-declare'." - (when value - (flycheck-sexp-to-string - `(progn - (defvar flycheck-emacs-lisp-check-declare) - (setq flycheck-emacs-lisp-check-declare ,value))))) - -(defun flycheck--emacs-lisp-enabled-p () - "Check whether to enable Emacs Lisp checker in the current buffer." - (not - (or - ;; Do not check buffers used for autoloads generation during package - ;; installation. These buffers are too short-lived for being checked, and - ;; doing so causes spurious errors. See - ;; https://github.com/flycheck/flycheck/issues/45 and - ;; https://github.com/bbatsov/prelude/issues/248. We must also not check - ;; compilation buffers, but as these are ephemeral, Flycheck won't check - ;; them anyway. - (flycheck-autoloads-file-p) - ;; Cask/Carton and dir-locals files contain data, not code, and don't need - ;; to follow Checkdoc conventions either. - (and (buffer-file-name) - (member (file-name-nondirectory (buffer-file-name)) - '("Cask" "Carton" ".dir-locals.el" ".dir-locals-2.el")))))) - -(defun flycheck--emacs-lisp-checkdoc-enabled-p () - "Check whether to enable Emacs Lisp Checkdoc in the current buffer." - (and (flycheck--emacs-lisp-enabled-p) - ;; These files are valid Lisp, but don't contain "standard" comments. - (not (member (buffer-file-name) '("Eldev" "Eldev-local"))))) - -(flycheck-define-checker emacs-lisp - "An Emacs Lisp syntax checker using the Emacs Lisp Byte compiler. - -See Info Node `(elisp)Byte Compilation'." - :command ("emacs" (eval flycheck-emacs-args) - (eval - (let ((path (pcase flycheck-emacs-lisp-load-path - (`inherit load-path) - (p (seq-map #'expand-file-name p))))) - (flycheck-prepend-with-option "--directory" path))) - (option "--eval" flycheck-emacs-lisp-package-user-dir nil - flycheck-option-emacs-lisp-package-user-dir) - (option "--eval" flycheck-emacs-lisp-initialize-packages nil - flycheck-option-emacs-lisp-package-initialize) - (option "--eval" flycheck-emacs-lisp-check-declare nil - flycheck-option-emacs-lisp-check-declare) - "--eval" (eval (flycheck-emacs-lisp-bytecomp-config-form)) - "--eval" (eval flycheck-emacs-lisp-check-form) - "--" - source-inplace) - :error-patterns - ((error line-start (file-name) ":" line ":" column ":" - (zero-or-more whitespace) "Error:" (zero-or-more whitespace) - (message (zero-or-more not-newline) - (zero-or-more "\n " (zero-or-more not-newline))) - line-end) - (warning line-start (file-name) ":" line ":" column ":" - (zero-or-more whitespace) "Warning:" (zero-or-more whitespace) - (message (zero-or-more not-newline) - (zero-or-more "\n " (zero-or-more not-newline))) - line-end) - (warning line-start (file-name) ":" line (optional ":" column) ":" - (zero-or-more whitespace) "Warning (check-declare): said\n" - (message (zero-or-more " " (zero-or-more not-newline)) - (zero-or-more "\n " (zero-or-more not-newline))) - line-end) - ;; The following is for Emacs 24 ‘check-declare-file’, which uses a - ;; less informative format. - (warning line-start "Warning (check-declare): " (file-name) " said " - (message (zero-or-more not-newline)) - line-end)) - :error-filter - (lambda (errors) - (flycheck-fill-empty-line-numbers - (flycheck-collapse-error-message-whitespace - (flycheck-sanitize-errors errors)))) - :modes (emacs-lisp-mode lisp-interaction-mode) - :enabled flycheck--emacs-lisp-enabled-p - :predicate - (lambda () - ;; Do not check buffers that should not be byte-compiled. The checker - ;; process will refuse to compile these, which would confuse Flycheck - (not (bound-and-true-p no-byte-compile))) - :next-checkers (emacs-lisp-checkdoc)) - -(defconst flycheck-emacs-lisp-checkdoc-form - (flycheck-prepare-emacs-lisp-form - (unless (require 'elisp-mode nil 'no-error) - ;; TODO: Fallback for Emacs 24, remove when dropping support for 24 - (require 'lisp-mode)) - (require 'checkdoc) - - (let ((source (car command-line-args-left)) - ;; Remember the default directory of the process - (process-default-directory default-directory)) - ;; Note that we deliberately use our custom approach even despite of - ;; `checkdoc-file' which was added to Emacs 25.1. While it's conceptually - ;; the better thing, its implementation has too many flaws to be of use - ;; for us. - (with-temp-buffer - (insert-file-contents source 'visit) - (setq buffer-file-name source) - ;; And change back to the process default directory to make file-name - ;; back-substutition work - (setq default-directory process-default-directory) - (with-demoted-errors "Error in checkdoc: %S" - ;; Checkdoc needs the Emacs Lisp syntax table and comment syntax to - ;; parse sexps and identify docstrings correctly; see - ;; https://github.com/flycheck/flycheck/issues/833 - (delay-mode-hooks (emacs-lisp-mode)) - (setq delayed-mode-hooks nil) - (checkdoc-current-buffer t) - (with-current-buffer checkdoc-diagnostic-buffer - (princ (buffer-substring-no-properties (point-min) (point-max))) - (kill-buffer))))))) - -(defconst flycheck-emacs-lisp-checkdoc-variables - `(checkdoc-symbol-words - checkdoc-arguments-in-order-flag - checkdoc-force-history-flag - checkdoc-permit-comma-termination-flag - checkdoc-force-docstrings-flag - checkdoc-package-keywords-flag - checkdoc-spellcheck-documentation-flag - checkdoc-verb-check-experimental-flag - checkdoc-max-keyref-before-warn - sentence-end-double-space - ,@(and (>= emacs-major-version 28) - '(checkdoc-column-zero-backslash-before-paren))) - "Variables inherited by the checkdoc subprocess.") - -(defun flycheck-emacs-lisp-checkdoc-variables-form () - "Make a sexp to pass relevant variables to a checkdoc subprocess. - -Variables are taken from `flycheck-emacs-lisp-checkdoc-variables'." - `(progn - ,@(seq-map (lambda (opt) `(setq-default ,opt ',(symbol-value opt))) - (seq-filter #'boundp flycheck-emacs-lisp-checkdoc-variables)))) - -(flycheck-define-checker emacs-lisp-checkdoc - "An Emacs Lisp style checker using CheckDoc. - -The checker runs `checkdoc-current-buffer'." - :command ("emacs" (eval flycheck-emacs-args) - "--eval" (eval (flycheck-sexp-to-string - (flycheck-emacs-lisp-checkdoc-variables-form))) - "--eval" (eval flycheck-emacs-lisp-checkdoc-form) - "--" source) - :error-patterns - ((info line-start (file-name) ":" line ": " (message) line-end)) - :modes (emacs-lisp-mode) - :enabled flycheck--emacs-lisp-checkdoc-enabled-p) - -(dolist (checker '(emacs-lisp emacs-lisp-checkdoc)) - (setf (car (flycheck-checker-get checker 'command)) - flycheck-this-emacs-executable)) - -(defun flycheck-ember-template--check-for-config (&rest _ignored) - "Check the required config file is available up the file system." - (and buffer-file-name - (locate-dominating-file buffer-file-name ".template-lintrc.js"))) - -(defun flycheck-ember-template--parse-error (output checker buffer) - "Parse Ember-template-lint errors/warnings from JSON OUTPUT. -CHECKER and BUFFER denote the CHECKER that returned OUTPUT and -the BUFFER that was checked respectively." - (mapcar (lambda (err) - (let-alist err - (flycheck-error-new-at - .line - .column - (pcase .severity - (2 'error) - (1 'warning) - (_ 'warning)) - .message - :id .rule - :checker checker - :buffer buffer - :filename (buffer-file-name buffer)))) - (cdr (car (car (flycheck-parse-json output)))))) - -(flycheck-def-config-file-var flycheck-ember-template-lintrc - ember-template - ".template-lintrc.js") - -(flycheck-define-checker ember-template - "An Ember template checker using ember-template-lint." - :command ("ember-template-lint" - (config-file "--config-path" flycheck-ember-template-lintrc) - "--filename" source-original - "--format=json") - :standard-input t - :error-parser flycheck-ember-template--parse-error - :modes web-mode - :enabled flycheck-ember-template--check-for-config - :working-directory flycheck-ember-template--check-for-config) - -(flycheck-def-option-var flycheck-erlang-include-path nil erlang - "A list of include directories for Erlang. - -The value of this variable is a list of strings, where each -string is a directory to add to the include path of erlc. -Relative paths are relative to the file being checked." - :type '(repeat (directory :tag "Include directory")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "0.24")) - -(flycheck-def-option-var flycheck-erlang-library-path nil erlang - "A list of library directories for Erlang. - -The value of this variable is a list of strings, where each -string is a directory to add to the library path of erlc. -Relative paths are relative to the file being checked." - :type '(repeat (directory :tag "Library directory")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "0.24")) - -(flycheck-define-checker erlang - "An Erlang syntax checker using the Erlang interpreter. - -See URL `https://www.erlang.org/'." - :command ("erlc" - "-o" temporary-directory - (option-list "-I" flycheck-erlang-include-path) - (option-list "-pa" flycheck-erlang-library-path) - "-Wall" - source) - :error-patterns - ((warning line-start (file-name) ":" line ":" (optional column ":") - " Warning:" (message) line-end) - (error line-start (file-name) ":" line ":" (optional column ":") " " - (message) line-end)) - :modes erlang-mode - :enabled (lambda () (string-suffix-p ".erl" (buffer-file-name)))) - -(defun flycheck--contains-rebar-config (dir-name) - "Return DIR-NAME if rebar config file exists in DIR-NAME, nil otherwise." - (when (or (file-exists-p (expand-file-name "rebar.config" dir-name)) - (file-exists-p (expand-file-name "rebar.config.script" dir-name))) - dir-name)) - -(defun flycheck--locate-rebar3-project-root - (file-name &optional prev-file-name acc) - "Find the top-most rebar project root for source FILE-NAME. - -A project root directory is any directory containing a -rebar.config file. Find the top-most directory to move out of any -nested dependencies. - -FILE-NAME is a source file for which to find the project. - -PREV-FILE-NAME helps us prevent infinite looping - -ACC is an accumulator that keeps the list of results, the first -non-nil of which will be our project root. - -Return the absolute path to the directory" - (if (string= file-name prev-file-name) - (car (remove nil acc)) - (let ((current-dir (file-name-directory file-name))) - (flycheck--locate-rebar3-project-root - (directory-file-name current-dir) - file-name - (cons (flycheck--contains-rebar-config current-dir) acc))))) - -(defun flycheck-rebar3-project-root (&optional _checker) - "Return directory where rebar.config is located." - (flycheck--locate-rebar3-project-root buffer-file-name)) - -(flycheck-def-option-var flycheck-erlang-rebar3-profile nil erlang-rebar3 - "The rebar3 profile to use. - -The profile used when compiling, if VALUE is nil \"test\" will be used -when the file is located in test directory, otherwise \"default\" will be -used as profile." - :type '(choice (const :tag "Automatic" nil) - (string :tag "Profile")) - :safe #'flycheck-string-or-nil-p - :package-version '(flycheck . "32")) - -(defun flycheck-erlang-rebar3-get-profile () - "Return rebar3 profile. - -Use flycheck-erlang-rebar3-profile if set, otherwise use test or eqc profile if -directory name is \"test\" or \"eqc\", or else \"default\"." - (or - flycheck-erlang-rebar3-profile - (with-no-warnings - ;; `seq-contains-p' is only in seq >= 2.21 - (seq-contains '("test" "eqc") - (and buffer-file-name - (file-name-base - (directory-file-name - (file-name-directory buffer-file-name)))))) - "default")) - -(flycheck-define-checker erlang-rebar3 - "An Erlang syntax checker using the rebar3 build tool." - :command ("rebar3" "as" (eval (flycheck-erlang-rebar3-get-profile)) "compile") - :error-parser flycheck-parse-with-patterns-without-color - :error-patterns - ((warning line-start (file-name) ":" line ":" (optional column ":") - " Warning:" (message) line-end) - (error line-start (file-name) ":" line ":" (optional column ":") " " - (message) line-end)) - :modes erlang-mode - :enabled flycheck-rebar3-project-root - :predicate flycheck-buffer-saved-p - :working-directory flycheck-rebar3-project-root) - -(flycheck-define-checker eruby-erubis - "An eRuby syntax checker using the `erubis' command. - -See URL `https://www.kuwata-lab.com/erubis/'." - :command ("erubis" "-z" source) - :error-patterns - ((error line-start (file-name) ":" line ": " (message) line-end)) - :modes (html-erb-mode rhtml-mode) - :next-checkers ((warning . eruby-ruumba))) - -(flycheck-def-config-file-var flycheck-ruumbarc eruby-ruumba ".ruumba.yml") - -(flycheck-def-option-var flycheck-ruumba-lint-only nil eruby-ruumba - "Whether to only report code issues in Ruumba. - -When non-nil, only report code issues in Ruumba, via `--lint'. -Otherwise report style issues as well." - :safe #'booleanp - :type 'boolean - :package-version '(flycheck . "32")) - -(flycheck-define-checker eruby-ruumba - "An eRuby syntax and style checker using the Ruumba tool. - -You need at least Ruumba 0.1.7 for this syntax checker. - -See URL `https://github.com/ericqweinstein/ruumba'." - :command ("ruumba" - "--display-cop-names" - "--force-exclusion" - "--format" "emacs" - "--cache" "false" - (config-file "--config" flycheck-ruumbarc) - (option-flag "--lint" flycheck-ruumba-lint-only) - ;; Ruumba takes the original file name as argument when reading - ;; from standard input - "--stdin" source-original) - :standard-input t - :working-directory flycheck-ruby--find-project-root - :error-patterns - ((info line-start (file-name) ":" line ":" column ": C: " - (optional (id (one-or-more (not (any ":")))) ": ") (message) line-end) - (warning line-start (file-name) ":" line ":" column ": W: " - (optional (id (one-or-more (not (any ":")))) ": ") (message) - line-end) - (error line-start (file-name) ":" line ":" column ": " (or "E" "F") ": " - (optional (id (one-or-more (not (any ":")))) ": ") (message) - line-end)) - :modes (html-erb-mode rhtml-mode)) - -(flycheck-def-args-var flycheck-gfortran-args fortran-gfortran - :package-version '(flycheck . "0.22")) - -(flycheck-def-option-var flycheck-gfortran-include-path nil fortran-gfortran - "A list of include directories for GCC Fortran. - -The value of this variable is a list of strings, where each -string is a directory to add to the include path of gcc. -Relative paths are relative to the file being checked." - :type '(repeat (directory :tag "Include directory")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "0.20")) - -(flycheck-def-option-var flycheck-gfortran-language-standard "f95" - fortran-gfortran - "The language standard to use in GFortran. - -The value of this variable is either a string denoting a language -standard, or nil, to use the default standard. When non-nil, -pass the language standard via the `-std' option." - :type '(choice (const :tag "Default standard" nil) - (string :tag "Language standard")) - :package-version '(flycheck . "0.20")) - -(flycheck-def-option-var flycheck-gfortran-layout nil fortran-gfortran - "The source code layout to use in GFortran. - -The value of this variable is one of the following symbols: - -nil - Let gfortran determine the layout from the extension - -`free' - Use free form layout - - -`fixed' - Use fixed form layout - -In any other case, an error is signaled." - :type '(choice (const :tag "Guess layout from extension" nil) - (const :tag "Free form layout" free) - (const :tag "Fixed form layout" fixed)) - :safe (lambda (value) (or (not value) (memq value '(free fixed)))) - :package-version '(flycheck . "0.20")) - -(defun flycheck-option-gfortran-layout (value) - "Option VALUE filter for `flycheck-gfortran-layout'." - (pcase value - (`nil nil) - (`free "free-form") - (`fixed "fixed-form") - (_ (error "Invalid value for flycheck-gfortran-layout: %S" value)))) - -(flycheck-def-option-var flycheck-gfortran-warnings '("all" "extra") - fortran-gfortran - "A list of warnings for GCC Fortran. - -The value of this variable is a list of strings, where each string -is the name of a warning category to enable. By default, all -recommended warnings and some extra warnings are enabled (as by -`-Wall' and `-Wextra' respectively). - -Refer to the gfortran manual at URL -`https://gcc.gnu.org/onlinedocs/gfortran/' for more information -about warnings" - :type '(choice (const :tag "No additional warnings" nil) - (repeat :tag "Additional warnings" - (string :tag "Warning name"))) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "0.20")) - -(flycheck-define-checker fortran-gfortran - "An Fortran syntax checker using GCC. - -Uses GCC's Fortran compiler gfortran. See URL -`https://gcc.gnu.org/onlinedocs/gfortran/'." - :command ("gfortran" - "-fsyntax-only" - "-fshow-column" - ;; Do not visually indicate the source location - "-fno-diagnostics-show-caret" - ;; Do not show the corresponding warning group - "-fno-diagnostics-show-option" - ;; Fortran has similar include processing as C/C++ - "-iquote" (eval (flycheck-c/c++-quoted-include-directory)) - (option "-std=" flycheck-gfortran-language-standard concat) - (option "-f" flycheck-gfortran-layout concat - flycheck-option-gfortran-layout) - (option-list "-W" flycheck-gfortran-warnings concat) - (option-list "-I" flycheck-gfortran-include-path concat) - (eval flycheck-gfortran-args) - source) - :error-patterns - ((error line-start (file-name) ":" line (or ":" ".") column (or ": " ":\n") - (or (= 3 (zero-or-more not-newline) "\n") "") - (or "Error" "Fatal Error") ": " - (message) line-end) - (warning line-start (file-name) ":" line (or ":" ".") column (or ": " ":\n") - (or (= 3 (zero-or-more not-newline) "\n") "") - "Warning: " (message) line-end)) - :modes (fortran-mode f90-mode)) - -(flycheck-define-checker yaml-actionlint - "A YAML syntax checker using actionlint. - -See URL https://github.com/rhysd/actionlint/." - :command ("actionlint" "-oneline" source) - :error-patterns ((error line-start (file-name) ":" line ":" column ": " (message) line-end)) - :modes (yaml-mode yaml-ts-mode) - :predicate (lambda () - (string-match-p - (rx (or ".github/workflows" ".github\\workflows")) - (buffer-file-name)))) - -(flycheck-define-checker go-gofmt - "A Go syntax and style checker using the gofmt utility. - -See URL `https://golang.org/cmd/gofmt/'." - :command ("gofmt") - :standard-input t - :error-patterns - ((error line-start ":" line ":" column ": " - (message) line-end)) - :modes (go-mode go-ts-mode) - :next-checkers ((warning . go-vet) - ;; Fall back, if go-vet doesn't exist - (warning . go-build) (warning . go-test) - (warning . go-errcheck) - (warning . go-unconvert) - (warning . go-staticcheck))) - -(flycheck-def-option-var flycheck-go-vet-print-functions nil go-vet - "A list of print-like functions for `go vet'. - -Go vet will check these functions for format string problems and -issues, such as a mismatch between the number of formats used, -and the number of arguments given. - -Each entry is in the form Name:N where N is the zero-based -argument position of the first argument involved in the print: -either the format or the first print argument for non-formatted -prints. For example, if you have Warn and Warnf functions that -take an io.Writer as their first argument, like Fprintf, --printfuncs=Warn:1,Warnf:1 " - :type '(repeat :tag "print-like functions" - (string :tag "function")) - :safe #'flycheck-string-list-p) - -(flycheck-define-checker go-vet - "A Go syntax checker using the `go vet' command. - -See URL `https://golang.org/cmd/go/' and URL -`https://golang.org/cmd/vet/'." - :command ("go" "vet" - (option "-printf.funcs=" flycheck-go-vet-print-functions concat - flycheck-option-comma-separated-list) - (source ".go")) - :error-patterns - ((warning line-start (file-name) ":" line ": " (message) line-end)) - :modes (go-mode go-ts-mode) - :next-checkers (go-build - go-test - ;; Fall back if `go build' or `go test' can be used - go-errcheck - go-unconvert - go-staticcheck) - :verify (lambda (_) - (let* ((go (flycheck-checker-executable 'go-vet)) - (have-vet (member "vet" (ignore-errors - (process-lines go "tool"))))) - (list - (flycheck-verification-result-new - :label "go tool vet" - :message (if have-vet "present" "missing") - :face (if have-vet 'success '(bold error))))))) - -(flycheck-def-option-var flycheck-go-build-install-deps nil (go-build go-test) - "Whether to install dependencies in `go build' and `go test'. - -If non-nil automatically install dependencies with `go build' -while syntax checking." - :type 'boolean - :safe #'booleanp - :package-version '(flycheck . "0.25")) - -(flycheck-def-option-var flycheck-go-build-tags nil - (go-build go-test go-errcheck go-staticcheck) - "A list of tags for `go build'. - -Each item is a string with a tag to be given to `go build'." - :type '(repeat (string :tag "Tag")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "0.25")) - - -(flycheck-def-option-var flycheck-go-version nil go-staticcheck - "The version of go that should be targeted by `staticcheck'. - -Should be a string representing a version, like 1.6 or 1.11.4. -See `https://staticcheck.io/docs/#targeting-go-versions' for -details." - :type '(choice (const :tag "Unspecified" nil) - (string :tag "Version")) - :safe #'flycheck-string-or-nil-p - :package-version '(flycheck . "0.32")) - -(flycheck-define-checker go-build - "A Go syntax and type checker using the `go build' command. - -Requires Go 1.6 or newer. See URL `https://golang.org/cmd/go'." - :command ("go" "build" - (option-flag "-i" flycheck-go-build-install-deps) - ;; multiple tags are listed as "dev debug ..." - (option-list "-tags=" flycheck-go-build-tags concat) - "-o" null-device) - :error-patterns - ((error line-start (file-name) ":" line ":" - (optional column ":") " " - (message (one-or-more not-newline) - (zero-or-more "\n\t" (one-or-more not-newline))) - line-end) - ;; Catch error message about multiple packages in a directory, which doesn't - ;; follow the standard error message format. - (info line-start - (message "can't load package: package " - (one-or-more (not (any ?: ?\n))) - ": found packages " - (one-or-more not-newline)) - line-end)) - :error-filter - (lambda (errors) - (dolist (error errors) - (unless (flycheck-error-line error) - ;; Flycheck ignores errors without line numbers, but the error - ;; message about multiple packages in a directory doesn't come with a - ;; line number, so inject a fake one. - (setf (flycheck-error-line error) 1))) - errors) - :modes (go-mode go-ts-mode) - :predicate (lambda () - (and (flycheck-buffer-saved-p) - (not (string-suffix-p "_test.go" (buffer-file-name))))) - :next-checkers ((warning . go-errcheck) - (warning . go-unconvert) - (warning . go-staticcheck))) - -(flycheck-define-checker go-test - "A Go syntax and type checker using the `go test' command. - -Requires Go 1.6 or newer. See URL `https://golang.org/cmd/go'." - :command ("go" "test" - (option-flag "-i" flycheck-go-build-install-deps) - (option-list "-tags=" flycheck-go-build-tags concat) - "-c" "-o" null-device) - :error-patterns - ((error line-start (file-name) ":" line ":" - (optional column ":") " " - (message (one-or-more not-newline) - (zero-or-more "\n\t" (one-or-more not-newline))) - line-end)) - :modes (go-mode go-ts-mode) - :predicate - (lambda () (and (flycheck-buffer-saved-p) - (string-suffix-p "_test.go" (buffer-file-name)))) - :next-checkers ((warning . go-errcheck) - (warning . go-unconvert) - (warning . go-staticcheck))) - -(flycheck-define-checker go-errcheck - "A Go checker for unchecked errors. - -Requires errcheck newer than commit 8515d34 (Aug 28th, 2015). - -See URL `https://github.com/kisielk/errcheck'." - :command ("errcheck" - "-abspath" - (option-list "-tags=" flycheck-go-build-tags concat) - ".") - :error-patterns - ((warning line-start - (file-name) ":" line ":" column (or (one-or-more "\t") ": " ":\t") - (message) - line-end)) - :error-filter - (lambda (errors) - (let ((errors (flycheck-sanitize-errors errors))) - (dolist (err errors) - (when-let (message (flycheck-error-message err)) - ;; Improve the messages reported by errcheck to make them more clear. - (setf (flycheck-error-message err) - (format "Ignored `error` returned from `%s`" message))))) - errors) - :modes (go-mode go-ts-mode) - :predicate (lambda () (flycheck-buffer-saved-p)) - :next-checkers ((warning . go-unconvert) - (warning . go-staticcheck))) - -(flycheck-define-checker go-unconvert - "A Go checker looking for unnecessary type conversions. - -See URL `https://github.com/mdempsky/unconvert'." - :command ("unconvert" ".") - :error-patterns - ((warning line-start (file-name) ":" line ":" column ": " (message) line-end)) - :modes (go-mode go-ts-mode) - :predicate (lambda () (flycheck-buffer-saved-p))) - -(flycheck-define-checker go-staticcheck - "A Go checker that performs static analysis and linting using -the `staticcheck' command. - -`staticcheck' is explicitly fully compatible with \"the last two -versions of go\". `staticheck' can target earlier versions (with -limited features) if `flycheck-go-version' is set. See URL -`https://staticcheck.io/'." - :command ("staticcheck" "-f" "json" - (option-list "-tags" flycheck-go-build-tags concat) - (option "-go" flycheck-go-version)) - - :error-parser flycheck-parse-go-staticcheck - :modes (go-mode go-ts-mode)) - -(flycheck-define-checker groovy - "A groovy syntax checker using groovy compiler API. - -See URL `https://www.groovy-lang.org'." - :command ("groovy" "-e" - "import org.codehaus.groovy.control.* - -unit = new CompilationUnit() -unit.addSource(\"input\", System.in) - -try { - unit.compile(Phases.CONVERSION) -} catch (MultipleCompilationErrorsException e) { - e.errorCollector.write(new PrintWriter(System.out, true), null) -}") - :standard-input t - :error-patterns - ((error line-start "input: " line ":" (message) - " @ line " line ", column " column "." line-end)) - :modes groovy-mode) - -(flycheck-define-checker haml - "A Haml syntax checker using the Haml compiler. - -See URL `https://haml.info'." - :command ("haml" "-c" "--stdin") - :standard-input t - :error-patterns - ((error line-start "Syntax error on line " line ": " (message) line-end) - (error line-start ":" line ": syntax error, " (message) line-end)) - :modes haml-mode) - -(flycheck-define-checker haml-lint - "HAML-Lint style checker. - -See URL `https://github.com/sds/haml-lint'." - :command ("haml-lint" "--no-color" "--no-summary" source) - :error-patterns - ((error line-start (file-name) ":" line " [E]" (message) line-end) - (warning line-start (file-name) ":" line " [W]" (message) line-end)) - :modes haml-mode) - -(flycheck-define-checker handlebars - "A Handlebars syntax checker using the Handlebars compiler. - -See URL `https://handlebarsjs.com/'." - :command ("handlebars" "-i-") - :standard-input t - :error-patterns - ((error line-start - "Error: Parse error on line " line ":" (optional "\r") "\n" - (zero-or-more not-newline) "\n" (zero-or-more not-newline) "\n" - (message) line-end)) - :modes (handlebars-mode handlebars-sgml-mode web-mode) - :predicate - (lambda () - (if (eq major-mode 'web-mode) - ;; Check if this is a handlebars file since web-mode does not store the - ;; non-canonical engine name - (let* ((regexp-alist (bound-and-true-p web-mode-engine-file-regexps)) - (pattern (cdr (assoc "handlebars" regexp-alist)))) - (and pattern (buffer-file-name) - (string-match-p pattern (buffer-file-name)))) - t))) - -(defconst flycheck-haskell-module-re - (rx line-start (zero-or-more (or "\n" (any space))) - "module" (one-or-more (or "\n" (any space))) - (group (one-or-more (not (any space "(" "\n"))))) - "Regular expression for a Haskell module name.") - -(flycheck-def-args-var flycheck-ghc-args (haskell-stack-ghc haskell-ghc) - :package-version '(flycheck . "0.22")) - -(flycheck-def-option-var flycheck-ghc-stack-use-nix nil haskell-stack-ghc - "Whether to enable nix support in stack. - -When non-nil, stack will append '--nix' flag to any call." - :type 'boolean - :safe #'booleanp - :package-version '(flycheck . "26")) - -(flycheck-def-option-var flycheck-ghc-stack-project-file nil haskell-stack-ghc - "Override project stack.yaml file. - -The value of this variable is a file path that refers to a yaml -file for the current stack project. Relative file paths are -resolved against the checker's working directory. When non-nil, -stack will get overridden value via `--stack-yaml'." - :type '(choice (const :tag "Unspecified" nil) - (file :tag "Project file")) - :safe #'flycheck-string-or-nil-p - :package-version '(flycheck . "32")) - -(flycheck-def-option-var flycheck-ghc-no-user-package-database nil haskell-ghc - "Whether to disable the user package database in GHC. - -When non-nil, disable the user package database in GHC, via -`-no-user-package-db'." - :type 'boolean - :safe #'booleanp - :package-version '(flycheck . "0.16")) - -(flycheck-def-option-var flycheck-ghc-package-databases nil haskell-ghc - "Additional module databases for GHC. - -The value of this variable is a list of strings, where each -string is a directory of a package database. Each package -database is given to GHC via `-package-db'." - :type '(repeat (directory :tag "Package database")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "0.16")) - -(flycheck-def-option-var flycheck-ghc-search-path nil - (haskell-stack-ghc haskell-ghc) - "Module search path for (Stack) GHC. - -The value of this variable is a list of strings, where each -string is a directory containing Haskell modules. Each directory -is added to the GHC search path via `-i'." - :type '(repeat (directory :tag "Module directory")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "0.16")) - -(flycheck-def-option-var flycheck-ghc-language-extensions nil - (haskell-stack-ghc haskell-ghc) - "Language extensions for (Stack) GHC. - -The value of this variable is a list of strings, where each -string is a Haskell language extension, as in the LANGUAGE -pragma. Each extension is enabled via `-X'." - :type '(repeat (string :tag "Language extension")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "0.19")) - -(defvar flycheck-haskell-ghc-cache-directory nil - "The cache directory for `ghc' output.") - -(defun flycheck-haskell-ghc-cache-directory () - "Get the cache location for `ghc' output. - -If no cache directory exists yet, create one and return it. -Otherwise return the previously used cache directory." - (setq flycheck-haskell-ghc-cache-directory - (or flycheck-haskell-ghc-cache-directory - (make-temp-file "flycheck-haskell-ghc-cache" 'directory)))) - -(defun flycheck--locate-dominating-file-matching (directory regexp) - "Search for a file in directory hierarchy starting at DIRECTORY. - -Look up the directory hierarchy from DIRECTORY for a directory -containing a file that matches REGEXP." - (locate-dominating-file - directory - (lambda (dir) - (directory-files dir nil regexp t)))) - -(defun flycheck-haskell--find-stack-default-directory () - "Find a directory to run haskell-stack-ghc. - -Return a parent directory with a stack*.y[a]ml file, or the -directory returned by \"stack path --project-root\"." - (or - (when (buffer-file-name) - (flycheck--locate-dominating-file-matching - (file-name-directory (buffer-file-name)) - (rx "stack" (* any) "." (or "yml" "yaml") eos))) - (when-let* ((stack (funcall flycheck-executable-find "stack")) - (output (ignore-errors - (process-lines stack - "--no-install-ghc" - "path" "--project-root"))) - (stack-dir (car output))) - (and (file-directory-p stack-dir) stack-dir)))) - -(defun flycheck-haskell--ghc-find-default-directory (_checker) - "Find a parent directory containing a cabal or package.yaml file." - (when (buffer-file-name) - (flycheck--locate-dominating-file-matching - (file-name-directory (buffer-file-name)) - "\\.cabal\\'\\|\\`package\\.yaml\\'"))) - -(flycheck-define-checker haskell-stack-ghc - "A Haskell syntax and type checker using `stack ghc'. - -See URL `https://github.com/commercialhaskell/stack'." - :command ("stack" - "--no-install-ghc" - (option "--stack-yaml" flycheck-ghc-stack-project-file) - (option-flag "--nix" flycheck-ghc-stack-use-nix) - "ghc" "--" "-Wall" "-no-link" - "-outputdir" (eval (flycheck-haskell-ghc-cache-directory)) - (option-list "-X" flycheck-ghc-language-extensions concat) - (option-list "-i" flycheck-ghc-search-path concat) - (eval (concat - "-i" - (flycheck-module-root-directory - (flycheck-find-in-buffer flycheck-haskell-module-re)))) - (eval flycheck-ghc-args) - "-x" (eval - (pcase major-mode - (`haskell-mode "hs") - (`haskell-literate-mode "lhs"))) - source) - :error-patterns - ((warning line-start (file-name) ":" line ":" column ":" - (or " " "\n ") (in "Ww") "arning:" - (optional " " "[" (id (one-or-more not-newline)) "]") - (optional "\n") - (message - (one-or-more " ") (one-or-more not-newline) - (zero-or-more "\n" - (one-or-more " ") - (one-or-more (not (any ?\n ?|))))) - line-end) - (error line-start (file-name) ":" line ":" column ":" (optional " error:") - (optional " " "[" (id (one-or-more not-newline)) "]") - (or (message (one-or-more not-newline)) - (and "\n" - (message - (one-or-more " ") (one-or-more not-newline) - (zero-or-more "\n" - (one-or-more " ") - (one-or-more (not (any ?\n ?|))))))) - line-end)) - :error-filter - (lambda (errors) - (flycheck-sanitize-errors (flycheck-dedent-error-messages errors))) - :modes (haskell-mode haskell-literate-mode) - :next-checkers ((warning . haskell-hlint)) - :working-directory (lambda (_) - (flycheck-haskell--find-stack-default-directory)) - :enabled flycheck-haskell--find-stack-default-directory - :verify (lambda (_) - (let* ((stack (flycheck-haskell--find-stack-default-directory))) - (list - (flycheck-verification-result-new - :label "stack config" - :message (or stack "Not found") - :face (if stack 'success '(bold error))))))) - -(flycheck-define-checker haskell-ghc - "A Haskell syntax and type checker using ghc. - -See URL `https://www.haskell.org/ghc/'." - :command ("ghc" "-Wall" "-no-link" - "-outputdir" (eval (flycheck-haskell-ghc-cache-directory)) - (option-flag "-no-user-package-db" - flycheck-ghc-no-user-package-database) - (option-list "-package-db" flycheck-ghc-package-databases) - (option-list "-i" flycheck-ghc-search-path concat) - ;; Include the parent directory of the current module tree, to - ;; properly resolve local imports - (eval (concat - "-i" - (flycheck-module-root-directory - (flycheck-find-in-buffer flycheck-haskell-module-re)))) - (option-list "-X" flycheck-ghc-language-extensions concat) - (eval flycheck-ghc-args) - "-x" (eval - (pcase major-mode - (`haskell-mode "hs") - (`haskell-literate-mode "lhs"))) - source) - :error-patterns - ((warning line-start (file-name) ":" line ":" column ":" - (or " " "\n ") (in "Ww") "arning:" - (optional " " "[" (id (one-or-more not-newline)) "]") - (optional "\n") - (message - (one-or-more " ") (one-or-more not-newline) - (zero-or-more "\n" - (one-or-more " ") - (one-or-more (not (any ?\n ?|))))) - line-end) - (error line-start (file-name) ":" line ":" column ":" (optional " error:") - (optional " " "[" (id (one-or-more not-newline)) "]") - (or (message (one-or-more not-newline)) - (and "\n" - (message - (one-or-more " ") (one-or-more not-newline) - (zero-or-more "\n" - (one-or-more " ") - (one-or-more (not (any ?\n ?|))))))) - line-end)) - :error-filter - (lambda (errors) - (flycheck-sanitize-errors (flycheck-dedent-error-messages errors))) - :modes (haskell-mode haskell-literate-mode) - :next-checkers ((warning . haskell-hlint)) - :working-directory flycheck-haskell--ghc-find-default-directory) - -(flycheck-def-config-file-var flycheck-hlintrc haskell-hlint ".hlint.yaml") - -(flycheck-def-args-var flycheck-hlint-args haskell-hlint - :package-version '(flycheck . "0.25")) - -(flycheck-def-option-var flycheck-hlint-language-extensions - nil haskell-hlint - "Extensions list to enable for hlint. - -The value of this variable is a list of strings, where each -string is a name of extension to enable in -hlint (e.g. \"QuasiQuotes\")." - :type '(repeat :tag "Extensions" (string :tag "Extension")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "0.24")) - -(flycheck-def-option-var flycheck-hlint-ignore-rules - nil haskell-hlint - "Ignore rules list for hlint checks. - -The value of this variable is a list of strings, where each -string is an ignore rule (e.g. \"Use fmap\")." - :type '(repeat :tag "Ignore rules" (string :tag "Ignore rule")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "0.24")) - -(flycheck-def-option-var flycheck-hlint-hint-packages - nil haskell-hlint - "Hint packages to include for hlint checks. - -The value of this variable is a list of strings, where each -string is a default hint package (e.g. (\"Generalise\" -\"Default\" \"Dollar\"))." - :type '(repeat :tag "Hint packages" (string :tag "Hint package")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "0.24")) - -(flycheck-define-checker haskell-hlint - "A Haskell style checker using hlint. - -See URL `https://github.com/ndmitchell/hlint'." - :command ("hlint" - "--no-exit-code" - (option-list "-X" flycheck-hlint-language-extensions concat) - (option-list "-i=" flycheck-hlint-ignore-rules concat) - (option-list "-h" flycheck-hlint-hint-packages concat) - (config-file "-h" flycheck-hlintrc) - (eval flycheck-hlint-args) - source-inplace) - :error-patterns - ((info line-start - (file-name) ":" - (or (seq line ":" column (optional "-" end-column)) - (seq "(" line "," column ")-(" end-line "," end-column ")")) - ": Suggestion: " - (message (one-or-more (and (one-or-more (not (any ?\n))) ?\n))) - line-end) - (warning line-start - (file-name) ":" - (or (seq line ":" column (optional "-" end-column)) - (seq "(" line "," column ")-(" end-line "," end-column ")")) - ": Warning: " - (message (one-or-more (and (one-or-more (not (any ?\n))) ?\n))) - line-end) - (error line-start - (file-name) ":" - (or (seq line ":" column (optional "-" end-column)) - (seq "(" line "," column ")-(" end-line "," end-column ")")) - ": Error: " - (message (one-or-more (and (one-or-more (not (any ?\n))) ?\n))) - line-end)) - :modes (haskell-mode haskell-literate-mode)) - -(flycheck-def-config-file-var flycheck-tidyrc html-tidy ".tidyrc") - -(flycheck-define-checker html-tidy - "A HTML syntax and style checker using Tidy. - -See URL `https://github.com/htacg/tidy-html5'." - :command ("tidy" (config-file "-config" flycheck-tidyrc) - "-lang" "en" - "-e" "-q") - :standard-input t - :error-patterns - ((error line-start - "line " line - " column " column - " - Error: " (message) line-end) - (warning line-start - "line " line - " column " column - " - Warning: " (message) line-end)) - :modes (html-mode mhtml-mode nxhtml-mode)) - -(flycheck-def-config-file-var flycheck-jshintrc javascript-jshint ".jshintrc") - -(flycheck-def-option-var flycheck-jshint-extract-javascript nil - javascript-jshint - "Whether jshint should extract Javascript from HTML. - -If nil no extract rule is given to jshint. If `auto' only -extract Javascript if a HTML file is detected. If `always' or -`never' extract Javascript always or never respectively. - -Refer to the jshint manual at the URL -`https://jshint.com/docs/cli/#flags' for more information." - :type - '(choice (const :tag "No extraction rule" nil) - (const :tag "Try to extract Javascript when detecting HTML files" - auto) - (const :tag "Always try to extract Javascript" always) - (const :tag "Never try to extract Javascript" never)) - :safe #'symbolp - :package-version '(flycheck . "26")) - -(flycheck-define-checker javascript-jshint - "A Javascript syntax and style checker using jshint. - -See URL `https://www.jshint.com'." - :command ("jshint" "--reporter=checkstyle" - "--filename" source-original - (config-file "--config" flycheck-jshintrc) - (option "--extract=" flycheck-jshint-extract-javascript - concat flycheck-option-symbol) - "-") - :standard-input t - :error-parser flycheck-parse-checkstyle - :error-filter - (lambda (errors) - (flycheck-remove-error-file-names - "stdin" (flycheck-dequalify-error-ids errors))) - :modes (js-mode js2-mode js3-mode rjsx-mode js-ts-mode)) - -(flycheck-def-args-var flycheck-eslint-args javascript-eslint - :package-version '(flycheck . "32")) - -(flycheck-def-option-var flycheck-eslint-rules-directories nil javascript-eslint - "A list of directories with custom rules for ESLint. - -The value of this variable is a list of strings, where each -string is a directory with custom rules for ESLint. - -Refer to the ESLint manual at URL -`https://eslint.org/docs/user-guide/command-line-interface#--rulesdir' -for more information about the custom directories." - :type '(repeat (directory :tag "Custom rules directory")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "29")) - -(defun flycheck-eslint-config-exists-p () - "Whether there is a valid eslint config for the current buffer." - (eql 0 (flycheck-call-checker-process - 'javascript-eslint nil nil nil - "--print-config" (or buffer-file-name "index.js")))) - -(defun flycheck-parse-eslint (output checker buffer) - "Parse ESLint errors/warnings from JSON OUTPUT. - -CHECKER and BUFFER denote the CHECKER that returned OUTPUT and -the BUFFER that was checked respectively. - -See URL `https://eslint.org' for more information about ESLint." - (mapcar (lambda (err) - (let-alist err - (flycheck-error-new-at - .line - .column - (pcase .severity - (2 'error) - (1 'warning) - (_ 'warning)) - .message - :id .ruleId - :checker checker - :buffer buffer - :filename (buffer-file-name buffer) - :end-line .endLine - :end-column .endColumn))) - (let-alist (caar (flycheck-parse-json output)) - .messages))) - -(defun flycheck-eslint--find-working-directory (_checker) - "Look for a working directory to run ESLint CHECKER in. - -This will be the directory that contains the `node_modules' -directory. If no such directory is found in the directory -hierarchy, it looks first for `.eslintignore' and then for -`.eslintrc' files to detect the project root." - (let* ((regex-config (concat "\\`\\.eslintrc" - "\\(\\.\\(js\\|ya?ml\\|json\\)\\)?\\'"))) - (when buffer-file-name - (or (locate-dominating-file buffer-file-name "node_modules") - (locate-dominating-file buffer-file-name ".eslintignore") - (locate-dominating-file - (file-name-directory buffer-file-name) - (lambda (directory) - (> (length (directory-files directory nil regex-config t)) 0))))))) - -(flycheck-define-checker javascript-eslint - "A Javascript syntax and style checker using eslint. - -See URL `https://eslint.org/'." - :command ("eslint" "--format=json" - (option-list "--rulesdir" flycheck-eslint-rules-directories) - (eval flycheck-eslint-args) - "--stdin" "--stdin-filename" source-original) - :standard-input t - :error-parser flycheck-parse-eslint - :enabled (lambda () (flycheck-eslint-config-exists-p)) - :modes (js-mode js-jsx-mode js2-mode js2-jsx-mode js3-mode rjsx-mode - typescript-mode js-ts-mode typescript-ts-mode tsx-ts-mode) - :working-directory flycheck-eslint--find-working-directory - :verify - (lambda (_) - (let* ((default-directory - (flycheck-compute-working-directory 'javascript-eslint)) - (have-config (flycheck-eslint-config-exists-p))) - (list - (flycheck-verification-result-new - :label "config file" - :message (if have-config "found" "missing or incorrect") - :face (if have-config 'success '(bold error)))))) - :error-explainer - (lambda (err) - (let ((error-code (flycheck-error-id err)) - (url "https://eslint.org/docs/rules/%s")) - (and error-code - ;; skip non-builtin rules - (not ;; `seq-contains-p' is only in seq >= 2.21 - (with-no-warnings (seq-contains error-code ?/))) - `(url . ,(format url error-code)))))) - -(flycheck-define-checker javascript-standard - "A Javascript code and style checker for the (Semi-)Standard Style. - -This checker works with `standard' and `semistandard', defaulting -to the former. To use it with the latter, set -`flycheck-javascript-standard-executable' to `semistandard'. - -See URL `https://github.com/standard/standard' and URL -`https://github.com/Flet/semistandard'." - :command ("standard" "--stdin") - :standard-input t - :error-patterns - ((error line-start " :" line ":" column ":" (message) line-end)) - :modes (js-mode js-jsx-mode js2-mode js2-jsx-mode js3-mode rjsx-mode - js-ts-mode)) - -(flycheck-define-checker json-jsonlint - "A JSON syntax and style checker using jsonlint. - -See URL `https://github.com/zaach/jsonlint'." - ;; We can't use standard input for jsonlint, because it doesn't output errors - ;; anymore when using -c -q with standard input :/ - :command ("jsonlint" "-c" "-q" source) - :error-patterns - ((error line-start - (file-name) - ": line " line - ", col " column ", " - (message) line-end)) - :error-filter - (lambda (errors) - (flycheck-sanitize-errors (flycheck-increment-error-columns errors))) - :modes (json-mode js-json-mode json-ts-mode)) - -(flycheck-define-checker json-python-json - "A JSON syntax checker using Python json.tool module. - -See URL `https://docs.python.org/3.5/library/json.html#command-line-interface'." - :command ("python3" "-m" "json.tool" source - ;; Send the pretty-printed output to the null device - null-device) - :error-patterns - ((error line-start - (message) ": line " line " column " column - ;; Ignore the rest of the line which shows the char position. - (one-or-more not-newline) - line-end)) - :modes (json-mode js-json-mode json-ts-mode) - ;; The JSON parser chokes if the buffer is empty and has no JSON inside - :predicate flycheck-buffer-nonempty-p) - -(flycheck-define-checker json-jq - "JSON checker using the jq tool. - -This checker accepts multiple consecutive JSON values in a -single input, which is useful for jsonlines data. - -See URL `https://stedolan.github.io/jq/'." - :command ("jq" "." source null-device) - ;; Example error message: - ;; parse error: Expected another key-value pair at line 3, column 1 - :error-patterns - ((error line-start - (optional "parse error: ") - (message) "at line " line ", column " column - (zero-or-more not-newline) line-end)) - :modes (json-mode js-json-mode json-ts-mode)) - -(flycheck-def-option-var flycheck-jsonnet-include-paths nil jsonnet - "a list of include paths to specify to the jsonnet binary, via -J . - -For example (\"./lib\") ." - :type '(repeat (directory :tag "Include directory")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "35.0")) - -(flycheck-def-args-var flycheck-jsonnet-command-args jsonnet - :package-version '(flycheck . "35.0")) - -(flycheck-define-checker jsonnet - "A Jsonnet syntax checker using the jsonnet binary. - -See URL `https://jsonnet.org'." - :command - ("jsonnet" - (option-list "-J" flycheck-jsonnet-include-paths) - (eval flycheck-jsonnet-command-args) - source-inplace) - :error-patterns - ((error line-start "STATIC ERROR: " (file-name) ":" - (or (seq line ":" column (zero-or-one (seq "-" end-column))) - (seq "(" line ":" column ")" "-" - "(" end-line ":" end-column ")")) - ": " (message) line-end) - (error line-start "RUNTIME ERROR: " (message) "\n" - (? "\t" (file-name) ":" ;; first line of the backtrace - (or (seq line ":" column (zero-or-one (seq "-" end-column))) - (seq "(" line ":" column ")" "-" - "(" end-line ":" end-column ")"))))) - :error-filter - (lambda (errs) - ;; Some errors are missing line numbers. See URL - ;; `https://github.com/google/jsonnet/issues/786'. - (dolist (err errs) - (unless (flycheck-error-line err) - (setf (flycheck-error-line err) 1))) - (flycheck-sanitize-errors errs)) - :modes jsonnet-mode) - -(flycheck-define-checker less - "A LESS syntax checker using lessc. - -Requires lessc 1.4 or newer. - -See URL `https://lesscss.org'." - :command ("lessc" "--lint" "--no-color" - "-") - :standard-input t - :error-patterns - ((error line-start (one-or-more word) ":" - (message) - " in - on line " line - ", column " column ":" - line-end)) - :modes less-css-mode) - -(flycheck-define-checker less-stylelint - "A LESS syntax and style checker using stylelint. - -See URL `https://stylelint.io/'." - :command ("stylelint" - (eval flycheck-stylelint-args) - (option-flag "--quiet" flycheck-stylelint-quiet) - (config-file "--config" flycheck-stylelintrc)) - :standard-input t - :verify (lambda (_) (flycheck--stylelint-verify 'less-stylelint)) - :error-parser flycheck-parse-stylelint - :predicate flycheck-buffer-nonempty-p - :modes (less-css-mode)) - -(flycheck-define-checker llvm-llc - "Flycheck LLVM IR checker using llc. - -See URL `https://llvm.org/docs/CommandGuide/llc.html'." - :command ("llc" "-o" null-device source) - :error-patterns - ((error line-start - ;; llc prints the executable path - (zero-or-one (minimal-match (one-or-more not-newline)) ": ") - (file-name) ":" line ":" column ": error: " (message) - line-end)) - :error-filter - (lambda (errors) - ;; sanitize errors occurring in inline assembly - (flycheck-sanitize-errors - (flycheck-remove-error-file-names "" errors))) - :modes llvm-mode) - -(flycheck-def-config-file-var flycheck-luacheckrc lua-luacheck ".luacheckrc") - -(flycheck-def-option-var flycheck-luacheck-standards nil lua-luacheck - "The standards to use in luacheck. - -The value of this variable is either a list of strings denoting -the standards to use, or nil to pass nothing to luacheck. When -non-nil, pass the standards via one or more `--std' options." - :type '(choice (const :tag "Default" nil) - (repeat :tag "Custom standards" - (string :tag "Standard name"))) - :safe #'flycheck-string-list-p) -(make-variable-buffer-local 'flycheck-luacheck-standards) - -(flycheck-define-checker lua-luacheck - "A Lua syntax checker using luacheck. - -See URL `https://github.com/mpeterv/luacheck'." - :command ("luacheck" - "--formatter" "plain" - "--codes" ; Show warning codes - "--no-color" - (option-list "--std" flycheck-luacheck-standards) - (config-file "--config" flycheck-luacheckrc) - "--filename" source-original - ;; Read from standard input - "-") - :standard-input t - :error-patterns - ((warning line-start - (optional (file-name)) - ":" line ":" column - ": (" (id "W" (one-or-more digit)) ") " - (message) line-end) - (error line-start - (optional (file-name)) - ":" line ":" column ":" - ;; `luacheck' before 0.11.0 did not output codes for errors, hence - ;; the ID is optional here - (optional " (" (id "E" (one-or-more digit)) ") ") - (message) line-end)) - :modes (lua-mode lua-ts-mode)) - -(flycheck-define-checker lua - "A Lua syntax checker using the Lua compiler. - -See URL `https://www.lua.org/'." - :command ("luac" "-p" "-") - :standard-input t - :error-patterns - ((error line-start - ;; Skip the name of the luac executable. - (minimal-match (zero-or-more not-newline)) - ": stdin:" line ": " (message) line-end)) - :modes (lua-mode lua-ts-mode)) - -(flycheck-define-checker opam - "A Opam syntax and style checker using opam lint. - -See URL `https://opam.ocaml.org/doc/man/opam-lint.html'." - :command ("opam" "lint" "-") - :standard-input t - :error-patterns - ((error line-start ; syntax error - (one-or-more space) "error " (id ?2) - ": File format error" - (or (and " at line " line ", column " column ": " (message)) - (and ": " (message))) - line-end) - (error line-start - (one-or-more space) "error " (id ?3) - (minimal-match (zero-or-more not-newline)) - "at line " line ", column " column ": " (message) - line-end) - (error line-start - (one-or-more space) "error " (id (one-or-more num)) - ": " (message (one-or-more not-newline)) - line-end) - (warning line-start - (one-or-more space) "warning " (id (one-or-more num)) - ": " (message) - line-end)) - :error-filter - (lambda (errors) - (flycheck-increment-error-columns - (flycheck-fill-empty-line-numbers errors))) - :modes tuareg-opam-mode) - -(flycheck-def-option-var flycheck-perl-include-path nil perl - "A list of include directories for Perl. - -The value of this variable is a list of strings, where each -string is a directory to add to the include path of Perl. -Relative paths are relative to the file being checked." - :type '(repeat (directory :tag "Include directory")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "0.24")) - -(flycheck-def-option-var flycheck-perl-module-list nil perl - "A list of modules to use for Perl. - -The value of this variable is a list of strings, where each -string is a module to `use' in Perl." - :type '(repeat :tag "Module") - :safe #'flycheck-string-list-p - :package-version '(flycheck . "32")) - -(flycheck-define-checker perl - "A Perl syntax checker using the Perl interpreter. - -See URL `https://www.perl.org'." - :command ("perl" "-w" "-c" - (option-list "-I" flycheck-perl-include-path) - (option-list "-M" flycheck-perl-module-list concat)) - :standard-input t - :error-patterns - ((error line-start (minimal-match (message)) - " at - line " line - (or "." (and ", " (zero-or-more not-newline))) line-end)) - :modes (perl-mode cperl-mode) - :next-checkers (perl-perlcritic)) - -(flycheck-def-option-var flycheck-perlcritic-severity nil perl-perlcritic - "The message severity for Perl Critic. - -The value of this variable is a severity level as integer, for -the `--severity' option to Perl Critic." - :type '(integer :tag "Severity level") - :safe #'integerp - :package-version '(flycheck . "0.18")) - -(flycheck-def-option-var flycheck-perlcritic-theme nil perl-perlcritic - "The theme expression for Perl Critic. - -The value of this variable is passed as the `--theme' option to -`Perl::Critic'. See the documentation of `Perl::Critic' for -details." - :type '(choice (const :tag "None" nil) - (string :tag "Theme expression")) - :safe #'flycheck-string-or-nil-p - :package-version '(flycheck . "32-csv")) - -(flycheck-def-config-file-var flycheck-perlcriticrc perl-perlcritic - ".perlcriticrc" - :package-version '(flycheck . "26")) - -(flycheck-define-checker perl-perlcritic - "A Perl syntax checker using Perl::Critic. - -See URL `https://metacpan.org/pod/Perl::Critic'." - :command ("perlcritic" "--no-color" "--verbose" "%f/%l/%c/%s/%p/%m (%e)\n" - (config-file "--profile" flycheck-perlcriticrc) - (option "--severity" flycheck-perlcritic-severity nil - flycheck-option-int) - (option "--theme" flycheck-perlcritic-theme)) - :standard-input t - :error-patterns - ((info line-start - "STDIN/" line "/" column "/" (any "1") "/" - (id (one-or-more (not (any "/")))) "/" (message) - line-end) - (warning line-start - "STDIN/" line "/" column "/" (any "234") "/" - (id (one-or-more (not (any "/")))) "/" (message) - line-end) - (error line-start - "STDIN/" line "/" column "/" (any "5") "/" - (id (one-or-more (not (any "/")))) "/" (message) - line-end)) - :modes (cperl-mode perl-mode) - :next-checkers (perl-perlimports) - - :error-explainer - (lambda (err) - (let ((error-code (flycheck-error-id err)) - (url "https://metacpan.org/pod/Perl::Critic::Policy::%s")) - (and error-code `(url . ,(format url error-code)))))) - -(defun flycheck-perl-perlimports-parse-errors (output checker buffer) - "Parse perlimports json output errors from OUTPUT. - -CHECKER and BUFFER denoted the CHECKER that returned OUTPUT and -the BUFFER that was checked respectively. - -See URL `https://metacpan.org/dist/App-perlimports/view/script/perlimports' -for more information about perlimports." - (mapcar (lambda (err) - (let-alist err - (flycheck-error-new-at - .location.start.line - .location.start.column - 'info - (concat .module " " .reason ":" - (with-temp-buffer - (insert (substring .diff (string-match-p "\n" .diff))) - (diff-mode) - (font-lock-ensure) - (buffer-string))) - :end-line .location.end.line - :end-column .location.end.column - :checker checker - :buffer buffer))) - (flycheck-parse-json output))) - -(flycheck-define-checker perl-perlimports - "A checker for cleaning up Perl import statements. - -See URL `https://metacpan.org/dist/App-perlimports/view/script/perlimports'." - :command ("perlimports" - "--filename" source - "--json" - "--lint" - "--no-preserve-duplicates" - "--no-preserve-unused" - "--no-tidy-whitespace" - "--read-stdin") - :standard-input t - :error-parser flycheck-perl-perlimports-parse-errors - :modes (cperl-mode perl-mode)) - -(flycheck-define-checker php - "A PHP syntax checker using the PHP command line interpreter. - -See URL `https://php.net/manual/en/features.commandline.php'." - :command ("php" "-l" "-d" "error_reporting=E_ALL" "-d" "display_errors=1" - "-d" "log_errors=0" source) - :error-patterns - ((error line-start (or "Parse" "Fatal" "syntax") " error" (any ":" ",") " " - (message) " in " (file-name) " on line " line line-end)) - :modes (php-mode php-ts-mode php+-mode) - :next-checkers ((warning . php-phpmd) - (warning . php-phpcs))) - -(flycheck-def-option-var flycheck-phpmd-rulesets - '("cleancode" "codesize" "controversial" "design" "naming" "unusedcode") - php-phpmd - "The rule sets for PHP Mess Detector. - -Set default rule sets and custom rule set files. - -See section \"Using multiple rule sets\" in the PHP Mess Detector -manual at URL `https://phpmd.org/documentation/index.html'." - :type '(repeat :tag "rule sets" - (string :tag "A filename or rule set")) - :safe #'flycheck-string-list-p) - -(flycheck-define-checker php-phpmd - "A PHP style checker using PHP Mess Detector. - -See URL `https://phpmd.org/'." - :command ("phpmd" source "xml" - (eval (flycheck-option-comma-separated-list - flycheck-phpmd-rulesets))) - :error-parser flycheck-parse-phpmd - :modes (php-mode php-ts-mode php+-mode) - :next-checkers (php-phpcs)) - -(flycheck-def-option-var flycheck-phpcs-standard nil php-phpcs - "The coding standard for PHP CodeSniffer. - -When nil, use the default standard from the global PHP -CodeSniffer configuration. When set to a string, pass the string -to PHP CodeSniffer which will interpret it as name as a standard, -or as path to a standard specification." - :type '(choice (const :tag "Default standard" nil) - (string :tag "Standard name or file")) - :safe #'flycheck-string-or-nil-p) - -(flycheck-define-checker php-phpcs - "A PHP style checker using PHP Code Sniffer. - -Needs PHP Code Sniffer 2.6 or newer. - -See URL `https://pear.php.net/package/PHP_CodeSniffer/'." - :command ("phpcs" "--report=checkstyle" - ;; Use -q flag to force quiet mode - ;; Quiet mode prevents errors from extra output when phpcs has - ;; been configured with show_progress enabled - "-q" - (option "--standard=" flycheck-phpcs-standard concat) - ;; Some files are not detected correctly - ;; so it is necessary to pass the extension. - (eval - (when-let* ((fname buffer-file-name) - (ext (file-name-extension fname))) - (concat "--extensions=" ext))) - - ;; Pass original file name to phpcs. We need to concat explicitly - ;; here, because phpcs really insists to get option and argument as - ;; a single command line argument :| - (eval (when (buffer-file-name) - (concat "--stdin-path=" (buffer-file-name)))) - ;; Read from standard input - "-") - :standard-input t - :error-parser flycheck-parse-checkstyle - :error-filter - (lambda (errors) - (flycheck-sanitize-errors - (flycheck-remove-error-file-names "STDIN" errors))) - :modes (php-mode php-ts-mode php+-mode) - ;; phpcs seems to choke on empty standard input, hence skip phpcs if the - ;; buffer is empty, see https://github.com/flycheck/flycheck/issues/907 - :predicate flycheck-buffer-nonempty-p) - -(flycheck-define-checker php-phpcs-changed - "A PHP style checker using PHPCS-Changed. - Needs PHP Code Sniffer 2.6 or newer. - See `https://github.com/sirbrillig/phpcs-changed'." - :command ("phpcs-changed" - "--git" - "--git-base trunk" - "--git-unstaged" - (option "--standard=" flycheck-phpcs-standard concat) - (eval (buffer-file-name)) - ) - :standard-input t - :error-parser flycheck-parse-checkstyle - :error-filter - (lambda (errors) - (flycheck-sanitize-errors - (flycheck-remove-error-file-names "STDIN" errors))) - :modes (php-mode php+-mode) - ;; phpcs seems to choke on empty standard input, hence skip phpcs if the - ;; buffer is empty, see https://github.com/flycheck/flycheck/issues/907 - :predicate flycheck-buffer-nonempty-p) - -(flycheck-define-checker processing - "Processing command line tool. - -See https://github.com/processing/processing/wiki/Command-Line" - :command ("processing-java" "--force" - ;; Don't change the order of these arguments, processing is pretty - ;; picky - (eval (concat "--sketch=" (file-name-directory (buffer-file-name)))) - (eval (concat "--output=" (flycheck-temp-dir-system))) - "--build") - :error-patterns - ((error line-start (file-name) ":" line ":" column - (zero-or-more (or digit ":")) (message) line-end)) - :modes processing-mode - ;; This syntax checker needs a file name - :predicate (lambda () (buffer-file-name))) - -(defun flycheck-proselint-parse-errors (output checker buffer) - "Parse proselint json output errors from OUTPUT. - -CHECKER and BUFFER denoted the CHECKER that returned OUTPUT and -the BUFFER that was checked respectively. - -See URL `https://proselint.com/' for more information about proselint." - (mapcar (lambda (err) - (let-alist err - (flycheck-error-new-at-pos - .start - (pcase .severity - (`"suggestion" 'info) - (`"warning" 'warning) - (`"error" 'error) - ;; Default to error - (_ 'error)) - .message - :id .check - :buffer buffer - :checker checker - ;; See https://github.com/amperser/proselint/issues/1048 - :end-pos .end))) - (let-alist (car (flycheck-parse-json output)) - .data.errors))) - -(flycheck-define-checker proselint - "Flycheck checker using Proselint. - -See URL `https://proselint.com/'." - :command ("proselint" "--json" "-") - :standard-input t - :error-parser flycheck-proselint-parse-errors - :modes (text-mode markdown-mode gfm-mode message-mode org-mode)) - -(flycheck-def-option-var flycheck-protoc-import-path nil protobuf-protoc - "A list of directories to resolve import directives. - -The value of this variable is a list of strings, where each -string is a directory to add to the import path. Relative paths -are relative to the file being checked." - :type '(repeat (directory :tag "Import directory")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "32")) - -(flycheck-define-checker protobuf-protoc - "A protobuf syntax checker using the protoc compiler. - -See URL `https://developers.google.com/protocol-buffers/'." - :command ("protoc" "--error_format" "gcc" - (eval (concat "--java_out=" (flycheck-temp-dir-system))) - ;; Add the current directory to resolve imports - (eval (concat "--proto_path=" - (file-name-directory (buffer-file-name)))) - ;; Add other import paths; this needs to be after the current - ;; directory to produce the right output. See URL - ;; `https://github.com/flycheck/flycheck/pull/1655' - (option-list "--proto_path=" flycheck-protoc-import-path concat) - source-inplace) - :error-patterns - ((info line-start (file-name) ":" line ":" column - ": note: " (message) line-end) - (error line-start (file-name) ":" line ":" column - ": " (message) line-end) - (error line-start - (message "In file included from") " " (file-name) ":" line ":" - column ":" line-end)) - :modes protobuf-mode - :predicate (lambda () (buffer-file-name))) - -(defun flycheck-prototool-project-root (&optional _checker) - "Return the nearest directory holding the prototool.yaml configuration." - (and buffer-file-name - (locate-dominating-file buffer-file-name "prototool.yaml"))) - -(flycheck-define-checker protobuf-prototool - "A protobuf syntax checker using prototool. - -See URL `https://github.com/uber/prototool'." - :command ("prototool" "lint" source-original) - :error-patterns - ((warning line-start (file-name) ":" line ":" column ":" (message) line-end)) - :modes protobuf-mode - :enabled flycheck-prototool-project-root - :predicate flycheck-buffer-saved-p) - -(flycheck-define-checker pug - "A Pug syntax checker using the pug compiler. - -See URL `https://pugjs.org/'." - :command ("pug" "-p" (eval (expand-file-name (buffer-file-name)))) - :standard-input t - :error-patterns - ;; errors with includes/extends (e.g. missing files) - ((error "Error: " (message) (zero-or-more not-newline) "\n" - (zero-or-more not-newline) "at " - (zero-or-more not-newline) " line " line) - ;; error when placing anything other than a mixin or - ;; block at the top-level of an extended template - ;; also unknown filters - (error line-start "Error: " (file-name) ":" - line ":" column "\n\n" (message) line-end) - ;; syntax/runtime errors (e.g. type errors, bad indentation, etc.) - (error line-start - (optional "Type") "Error: " (file-name) ":" - line (optional ":" column) - (zero-or-more not-newline) "\n" - (one-or-more (or (zero-or-more not-newline) "|" - (zero-or-more not-newline) "\n") - (zero-or-more "-") (zero-or-more not-newline) "|" - (zero-or-more not-newline) "\n") - (zero-or-more not-newline) "\n" - (one-or-more - (zero-or-more not-newline) "|" - (zero-or-more not-newline) "\n") - (zero-or-more not-newline) "\n" - (message) - line-end)) - :modes pug-mode) - -(flycheck-define-checker puppet-parser - "A Puppet DSL syntax checker using puppet's own parser. - -See URL `https://puppet.com/'." - :command ("puppet" "parser" "validate" "--color=false") - :standard-input t - :error-patterns - ( - ;; Patterns for Puppet 4 - (error line-start "Error: Could not parse for environment " - (one-or-more (in "a-z" "0-9" "_")) ":" - (message) "(line: " line ", column: " column ")" line-end) - ;; Errors from Puppet < 4 - (error line-start "Error: Could not parse for environment " - (one-or-more (in "a-z" "0-9" "_")) ":" - (message (minimal-match (one-or-more anything))) - " at line " line line-end) - (error line-start - ;; Skip over the path of the Puppet executable - (minimal-match (zero-or-more not-newline)) - ": Could not parse for environment " (one-or-more word) - ": " (message (minimal-match (zero-or-more anything))) - " at " (file-name "/" (zero-or-more not-newline)) ":" line line-end)) - :modes (puppet-mode puppet-ts-mode) - :next-checkers ((warning . puppet-lint))) - -(flycheck-def-config-file-var flycheck-puppet-lint-rc puppet-lint - ".puppet-lint.rc" - :package-version '(flycheck . "26")) - -(flycheck-def-option-var flycheck-puppet-lint-disabled-checks nil puppet-lint - "Disabled checkers for `puppet-lint'. - -The value of this variable is a list of strings, where each -string is the name of a check to disable (e.g. \"80chars\" or -\"double_quoted_strings\"). - -See URL `https://puppet-lint.com/checks/' for a list of all checks -and their names." - :type '(repeat (string :tag "Check Name")) - :package-version '(flycheck . "26")) - -(defun flycheck-puppet-lint-disabled-arg-name (check) - "Create an argument to disable a puppetlint CHECK." - (concat "--no-" check "-check")) - -(flycheck-define-checker puppet-lint - "A Puppet DSL style checker using puppet-lint. - -See URL `https://puppet-lint.com/'." - ;; We must check the original file, because Puppetlint is quite picky on the - ;; names of files and there place in the directory structure, to comply with - ;; Puppet's autoload directory layout. For instance, a class foo::bar is - ;; required to be in a file foo/bar.pp. Any other place, such as a Flycheck - ;; temporary file will cause an error. - :command ("puppet-lint" - (config-file "--config" flycheck-puppet-lint-rc) - "--log-format" - "%{path}:%{line}:%{kind}: %{message} (%{check})" - (option-list "" flycheck-puppet-lint-disabled-checks concat - flycheck-puppet-lint-disabled-arg-name) - source-original) - :error-patterns - ((warning line-start (file-name) ":" line ":warning: " (message) line-end) - (error line-start (file-name) ":" line ":error: " (message) line-end)) - :modes (puppet-mode puppet-ts-mode) - ;; Since we check the original file, we can only use this syntax checker if - ;; the buffer is actually linked to a file, and if it is not modified. - :predicate flycheck-buffer-saved-p) - -(defun flycheck-python-run-snippet (checker snippet) - "Run a python SNIPPET and return the output. - -CHECKER's executable is assumed to be a Python REPL." - (when-let (output (flycheck-call-checker-process-for-output - checker nil nil "-c" snippet)) - (string-trim output))) - -(defun flycheck-python-get-path (checker) - "Compute the current Python path (CHECKER is a Python REPL) ." - (flycheck-python-run-snippet checker "import sys; print(sys.path[1:])")) - -(defun flycheck-python-find-module (checker module) - "Check if a Python MODULE is available (CHECKER is a Python REPL)." - (flycheck-python-run-snippet - checker (concat "import sys; sys.path.pop(0);" - (format "import %s; print(%s.__file__)" module module)))) - -(defun flycheck-python-needs-module-p (checker) - "Determine whether CHECKER needs to be invoked through Python. - -Previous versions of Flycheck called pylint and flake8 directly, -while new version call them through `python -c'. This check -ensures that we don't break existing code; it also allows people -who use virtualenvs to run globally-installed checkers." - (not (string-match-p (rx (or "pylint" "pylint3" "flake8") - (or "-script.pyw" ".exe" ".bat" "") - eos) - (flycheck-checker-executable checker)))) - -(defun flycheck-python-verify-module (checker module) - "Verify that a Python MODULE is available. - -Return nil if CHECKER's executable is not a Python REPL. This -function's is suitable for a checker's :verify." - (when (flycheck-python-needs-module-p checker) - (let ((mod-path (flycheck-python-find-module checker module))) - (list (flycheck-verification-result-new - :label (format "`%s' module" module) - :message (if mod-path (format "Found at %S" mod-path) - (format "Missing; sys.path is %s" - (flycheck-python-get-path checker))) - :face (if mod-path 'success '(bold error))))))) - -(defun flycheck-python-module-args (checker module-name) - "Compute arguments to pass to CHECKER's executable to run MODULE-NAME. - -Return nil if CHECKER's executable is not a Python REPL. -Otherwise, return a list starting with -c (-m is not enough -because it adds the current directory to Python's path)." - (when (flycheck-python-needs-module-p checker) - `("-c" ,(concat "import sys;sys.path.pop(0);import runpy;" - (format "runpy.run_module(%S, run_name='__main__')" module-name ))))) - -(defcustom flycheck-python-project-files - '("pyproject.toml" "setup.cfg" "mypy.ini" "pyrightconfig.json") - "Files used to find where to run Python checkers from. -Currently used for pylint, flake8, and pyright. - -The presence of one in these files indicates the root of the -current project; `.pylintrc' is not part of the list because it -is commonly found in ~/." - :group 'flycheck - :type '(repeat (string :tag "File name")) - :package-version '(flycheck . "33") - :safe #'flycheck-string-list-p) - -(defun flycheck-python-find-project-root (_checker) - "Find the root directory of a Python project. - -The root directory is assumed to be the nearest parent directory -that contains one of `flycheck-python-project-files'. If no such -file is found, we use the same heuristic as epylint: the nearest -parent directory that doesn't have a __init__.py file." - (let ((start (if buffer-file-name - (file-name-directory buffer-file-name) - default-directory))) - (or (flycheck--locate-dominating-file-matching - start (regexp-opt flycheck-python-project-files)) - (locate-dominating-file - start (lambda (dir) - (not (file-exists-p (expand-file-name "__init__.py" dir)))))))) - -(flycheck-def-config-file-var flycheck-flake8rc python-flake8 - '(".flake8" "setup.cfg" "tox.ini")) - -(flycheck-def-option-var flycheck-flake8-error-level-alist - '(("^E9.*$" . error) ; Syntax errors from pep8 - ("^F82.*$" . error) ; undefined variables from pyflakes - ("^F83.*$" . error) ; Duplicate arguments from flake8 - ("^D.*$" . info) ; Docstring issues from flake8-pep257 - ("^N.*$" . info) ; Naming issues from pep8-naming - ) - python-flake8 - "An alist mapping flake8 error IDs to Flycheck error levels. - -Each item in this list is a cons cell `(PATTERN . LEVEL)' where -PATTERN is a regular expression matched against the error ID, and -LEVEL is a Flycheck error level symbol. - -Each PATTERN is matched in the order of appearance in this list -against the error ID. If it matches the ID, the level of the -corresponding error is set to LEVEL. An error that is not -matched by any PATTERN defaults to warning level. - -The default value of this option matches errors from flake8 -itself and from the following flake8 plugins: - -- pep8-naming -- flake8-pep257 - -You may add your own mappings to this option in order to support -further flake8 plugins." - :type '(repeat (cons (regexp :tag "Error ID pattern") - (symbol :tag "Error level"))) - :package-version '(flycheck . "0.22")) - -(flycheck-def-option-var flycheck-flake8-maximum-complexity nil python-flake8 - "The maximum McCabe complexity of methods. - -If nil, do not check the complexity of methods. If set to an -integer, report any complexity greater than the value of this -variable as warning. - -If set to an integer, this variable overrules any similar setting -in the configuration file denoted by `flycheck-flake8rc'." - :type '(choice (const :tag "Do not check McCabe complexity" nil) - (integer :tag "Maximum complexity")) - :safe #'integerp) - -(flycheck-def-option-var flycheck-flake8-maximum-line-length nil python-flake8 - "The maximum length of lines. - -If set to an integer, the value of this variable denotes the -maximum length of lines, overruling any similar setting in the -configuration file denoted by `flycheck-flake8rc'. An error will -be reported for any line longer than the value of this variable. - -If set to nil, use the maximum line length from the configuration -file denoted by `flycheck-flake8rc', or the PEP 8 recommendation -of 79 characters if there is no configuration with this setting." - :type '(choice (const :tag "Default value") - (integer :tag "Maximum line length in characters")) - :safe #'integerp) - -(defun flycheck-flake8-fix-error-level (err) - "Fix the error level of ERR. - -Update the error level of ERR according to -`flycheck-flake8-error-level-alist'." - (pcase-dolist (`(,pattern . ,level) flycheck-flake8-error-level-alist) - (when (string-match-p pattern (flycheck-error-id err)) - (setf (flycheck-error-level err) level))) - err) - -(defun flycheck-flake8--find-project-root (_checker) - "Find setup.cfg in a parent directory of the current buffer." - ;; This is a workaround for `https://gitlab.com/pycqa/flake8/issues/517'; see - ;; also `https://github.com/flycheck/flycheck/issues/1722' - (locate-dominating-file (or buffer-file-name default-directory) "setup.cfg")) - -(flycheck-define-checker python-flake8 - "A Python syntax and style checker using Flake8. - -Requires Flake8 3.0 or newer. See URL -`https://flake8.readthedocs.io/'." - ;; Not calling flake8 directly makes it easier to switch between different - ;; Python versions; see https://github.com/flycheck/flycheck/issues/1055. - :command ("python3" - (eval (flycheck-python-module-args 'python-flake8 "flake8")) - "--format=default" - (config-file "--append-config" flycheck-flake8rc) - (option "--max-complexity" flycheck-flake8-maximum-complexity nil - flycheck-option-int) - (option "--max-line-length" flycheck-flake8-maximum-line-length nil - flycheck-option-int) - (eval (when buffer-file-name - (concat "--stdin-display-name=" buffer-file-name))) - "-") - :standard-input t - :working-directory flycheck-python-find-project-root - :error-filter (lambda (errors) - (let ((errors (flycheck-sanitize-errors errors))) - (seq-map #'flycheck-flake8-fix-error-level errors))) - :error-patterns - ((warning line-start - (file-name) ":" line ":" (optional column ":") " " - (id (one-or-more (any alpha)) (one-or-more digit)) " " - (message (one-or-more not-newline)) - line-end)) - :enabled (lambda () - (or (not (flycheck-python-needs-module-p 'python-flake8)) - (flycheck-python-find-module 'python-flake8 "flake8"))) - :verify (lambda (_) (flycheck-python-verify-module 'python-flake8 "flake8")) - :modes (python-mode python-ts-mode) - :next-checkers ((warning . python-pylint) - (warning . python-mypy))) - -(flycheck-def-config-file-var flycheck-python-ruff-config python-ruff - '("pyproject.toml" "ruff.toml" ".ruff.toml")) - -(flycheck-define-checker python-ruff - "A Python syntax and style checker using Ruff. - -See URL `https://docs.astral.sh/ruff/'." - :command ("ruff" - "check" - (config-file "--config" flycheck-python-ruff-config) - "--output-format=concise" - (option "--stdin-filename" buffer-file-name) - "-") - :standard-input t - :error-filter (lambda (errors) - (let* ((errors (flycheck-sanitize-errors errors)) - (errors-with-ids (seq-filter #'flycheck-error-id errors))) - (seq-union - (seq-difference errors errors-with-ids) - (seq-map #'flycheck-flake8-fix-error-level errors-with-ids)))) - :error-patterns - ((error line-start - (or "-" (file-name)) ":" line ":" (optional column ":") " " - "SyntaxError: " - (message (one-or-more not-newline)) - line-end) - (warning line-start - (or "-" (file-name)) ":" line ":" (optional column ":") " " - (id (one-or-more (any alpha)) (one-or-more digit) " ") - (message (one-or-more not-newline)) - line-end)) - :working-directory flycheck-python-find-project-root - :modes (python-mode python-ts-mode) - :next-checkers ((warning . python-mypy))) - -(flycheck-def-config-file-var - flycheck-pylintrc python-pylint - '("pylintrc" ".pylintrc" "pyproject.toml" "setup.cfg")) - -(flycheck-def-option-var flycheck-pylint-use-symbolic-id t python-pylint - "Whether to use pylint message symbols or message codes. - -A pylint message has both an opaque identifying code (such as `F0401') and a -more meaningful symbolic code (such as `import-error'). This option governs -which should be used and reported to the user." - :type 'boolean - :safe #'booleanp - :package-version '(flycheck . "0.25")) - -(defun flycheck-parse-pylint (output checker buffer) - "Parse JSON OUTPUT of CHECKER on BUFFER as Pylint errors." - (mapcar (lambda (err) - (let-alist err - ;; Pylint can return -1 as a line or a column, hence the call to - ;; `max'. See `https://github.com/flycheck/flycheck/issues/1383'. - (flycheck-error-new-at - (and .line (max .line 1)) - (and .column (max (1+ .column) 1)) - (pcase .type - ;; See "pylint/utils.py" - ((or "fatal" "error") 'error) - ((or "info" "convention") 'info) - ((or "warning" "refactor" _) 'warning)) - ;; Drop lines showing the error in context - (and (string-match (rx (*? nonl) eol) .message) - (match-string 0 .message)) - :id (if flycheck-pylint-use-symbolic-id .symbol .message-id) - :checker checker - :buffer buffer - :filename .path))) - (car (flycheck-parse-json output)))) - -(flycheck-define-checker python-pylint - "A Python syntax and style checker using Pylint. - -This syntax checker requires Pylint 1.0 or newer. - -See URL `https://www.pylint.org/'." - ;; --reports=n disables the scoring report. - ;; Not calling pylint directly makes it easier to switch between different - ;; Python versions; see https://github.com/flycheck/flycheck/issues/1055. - :command ("python3" - (eval (flycheck-python-module-args 'python-pylint "pylint")) - "--reports=n" - "--output-format=json" - (config-file "--rcfile=" flycheck-pylintrc concat) - ;; Need `source-inplace' for relative imports (e.g. `from .foo - ;; import bar'), see https://github.com/flycheck/flycheck/issues/280 - source-inplace) - :error-parser flycheck-parse-pylint - :working-directory flycheck-python-find-project-root - :enabled (lambda () - (or (not (flycheck-python-needs-module-p 'python-pylint)) - (flycheck-python-find-module 'python-pylint "pylint"))) - :verify (lambda (_) (flycheck-python-verify-module 'python-pylint "pylint")) - :error-explainer (lambda (err) - (when-let (id (flycheck-error-id err)) - (apply - #'flycheck-call-checker-process-for-output - 'python-pylint nil t - (append - (flycheck-python-module-args 'python-pylint "pylint") - (list (format "--help-msg=%s" id)))))) - :modes (python-mode python-ts-mode) - :next-checkers ((warning . python-mypy))) - -(flycheck-define-checker python-pycompile - "A Python syntax checker using Python's builtin compiler. - -See URL `https://docs.python.org/3.4/library/py_compile.html'." - :command ("python3" "-m" "py_compile" source) - :error-patterns - ;; Python 2.7 - ((error line-start " File \"" (file-name) "\", line " line "\n" - (>= 2 (zero-or-more not-newline) "\n") - "SyntaxError: " (message) line-end) - (error line-start "Sorry: IndentationError: " - (message) "(" (file-name) ", line " line ")" - line-end) - ;; 2.6 - (error line-start "SyntaxError: ('" (message (one-or-more (not (any "'")))) - "', ('" (file-name (one-or-more (not (any "'")))) "', " - line ", " column ", " (one-or-more not-newline) line-end)) - :working-directory flycheck-python-find-project-root - :modes (python-mode python-ts-mode) - :next-checkers ((warning . python-mypy))) - -(defun flycheck-pyright--parse-error (output checker buffer) - "Parse pyright errors/warnings from JSON OUTPUT. -CHECKER and BUFFER denote the CHECKER that returned OUTPUT and -the BUFFER that was checked respectively." - (seq-map - (lambda (err) - (let-alist err - (flycheck-error-new-at - (+ 1 .range.start.line) - (+ 1 .range.start.character) - (pcase .severity - ("error" 'error) - ("warning" 'warning) - (_ 'warning)) - .message - :end-line (+ 1 .range.end.line) - :end-column (+ 1 .range.end.character) - :checker checker - :buffer buffer - :filename (buffer-file-name buffer)))) - (cdr (nth 2 (car (flycheck-parse-json output)))))) - -(flycheck-define-checker python-pyright - "Static type checker for Python - -See URL https://github.com/microsoft/pyright." - :command ("pyright" - "--outputjson" - source-inplace) - :working-directory flycheck-python-find-project-root - :error-parser flycheck-pyright--parse-error - :modes (python-mode python-ts-mode)) - -(define-obsolete-variable-alias 'flycheck-python-mypy-ini - 'flycheck-python-mypy-config "32") - -(flycheck-def-config-file-var flycheck-python-mypy-config python-mypy - '("mypy.ini" "pyproject.toml" "setup.cfg")) - -(flycheck-def-option-var flycheck-python-mypy-cache-dir nil python-mypy - "Directory used to write .mypy_cache directories." - :type '(choice - (const :tag "Write to the working directory" nil) - (const :tag "Never write .mypy_cache directories" null-device) - (string :tag "Path")) - :safe #'flycheck-string-or-nil-p - :package-version '(flycheck . "32")) - -(flycheck-def-option-var flycheck-python-mypy-python-executable nil python-mypy - "Python executable to find the installed PEP 561 packages." - :type '(choice (const :tag "Same as mypy's" nil) - (string :tag "Path")) - :safe #'flycheck-string-or-nil-p - :package-version '(flycheck . "33")) - -(flycheck-define-checker python-mypy - "Mypy syntax and type checker. Requires mypy>=0.730. - -See URL `https://mypy-lang.org/'." - :command ("mypy" - "--show-column-numbers" - "--no-pretty" - (config-file "--config-file" flycheck-python-mypy-config) - (option "--cache-dir" flycheck-python-mypy-cache-dir) - (option "--python-executable" flycheck-python-mypy-python-executable) - source-original) - :error-patterns - ((error line-start (file-name) ":" line (optional ":" column) - ": error:" (message) line-end) - (warning line-start (file-name) ":" line (optional ":" column) - ": warning:" (message) line-end) - (info line-start (file-name) ":" line (optional ":" column) - ": note:" (message) line-end)) - :working-directory flycheck-python-find-project-root - :modes (python-mode python-ts-mode) - ;; Ensure the file is saved, to work around - ;; https://github.com/python/mypy/issues/4746. - :predicate flycheck-buffer-saved-p) - -(flycheck-def-option-var flycheck-lintr-caching t r-lintr - "Whether to enable caching in lintr. - -By default, lintr caches all expressions in a file and re-checks -only those that have changed. Setting this option to nil -disables caching in case there are problems." - :type 'boolean - :safe #'booleanp - :package-version '(flycheck . "0.23")) - -(flycheck-def-option-var flycheck-lintr-linters "default_linters" r-lintr - "Linters to use with lintr. - -The value of this variable is a string containing an R -expression, which selects linters for lintr." - :type 'string - :risky t - :package-version '(flycheck . "0.23")) - -(defun flycheck-r-has-lintr (checker) - "Whether CHECKER (R) has installed the `lintr' library." - (eql 0 (flycheck-call-checker-process - checker nil nil nil - "--slave" "--no-restore" "--no-save" "-e" - "library('lintr')"))) - -(flycheck-define-checker r-lintr - "An R style and syntax checker using the lintr package. - -See URL `https://github.com/jimhester/lintr'." - :command ("R" "--slave" "--no-restore" "--no-save" "-e" - (eval (concat - "library(lintr);" - "try(lint(commandArgs(TRUE)" - ", cache=" (if flycheck-lintr-caching "TRUE" "FALSE") - ", " flycheck-lintr-linters - "))")) - "--args" source) - :error-patterns - ((info line-start (file-name) ":" line ":" column ": style: " (message) - line-end) - (warning line-start (file-name) ":" line ":" column ": warning: " (message) - line-end) - (error line-start (file-name) ":" line ":" column ": error: " (message) - line-end)) - :modes (ess-mode ess-r-mode) - :predicate - ;; Don't check ESS files which do not contain R, and make sure that lintr is - ;; actually available - (lambda () - (and (equal ess-language "S") - (flycheck-r-has-lintr 'r-lintr))) - :verify (lambda (checker) - (let ((has-lintr (flycheck-r-has-lintr checker))) - (list - (flycheck-verification-result-new - :label "lintr library" - :message (if has-lintr "present" "missing") - :face (if has-lintr 'success '(bold error))))))) - -(flycheck-define-checker r - "An R syntax checker using the builtin `parse' function. - -See URL: `https://www.r-project.org/'." - :command ("R" "--slave" "--no-restore" "--no-save" "-e" - "parse(file=file('stdin'), srcfile='')") - :standard-input t - :error-patterns - ((error line-start (zero-or-more space) ":" line ":" column ": " - (message) line-end)) - :modes (ess-mode ess-r-mode) - :predicate - ;; Don't check ESS files which do not contain R - (lambda () (equal ess-language "S"))) - -(defun flycheck-racket-has-expand-p (checker) - "Whether the executable of CHECKER provides the `expand' command." - (eql 0 (flycheck-call-checker-process checker nil nil nil "expand"))) - -(flycheck-define-checker racket - "A Racket syntax checker with `raco expand'. - -The `compiler-lib' racket package is required for this syntax -checker. - -See URL `https://racket-lang.org/'." - :command ("raco" "expand" source-inplace) - :predicate - (lambda () - (and (or (not (eq major-mode 'scheme-mode)) - ;; In `scheme-mode' we must check the current Scheme implementation - ;; being used - (and (boundp 'geiser-impl--implementation) - (eq geiser-impl--implementation 'racket))) - (flycheck-racket-has-expand-p 'racket))) - :verify - (lambda (checker) - (let ((has-expand (flycheck-racket-has-expand-p checker)) - (in-scheme-mode (eq major-mode 'scheme-mode)) - (geiser-impl (bound-and-true-p geiser-impl--implementation))) - (list - (flycheck-verification-result-new - :label "compiler-lib package" - :message (if has-expand "present" "missing") - :face (if has-expand 'success '(bold error))) - (flycheck-verification-result-new - :label "Geiser Implementation" - :message (cond - ((not in-scheme-mode) "Using Racket Mode") - ((eq geiser-impl 'racket) "Racket") - (geiser-impl (format "Other: %s" geiser-impl)) - (t "Geiser not active")) - :face (cond - ((or (not in-scheme-mode) (eq geiser-impl 'racket)) 'success) - (t '(bold error))))))) - :error-filter - (lambda (errors) - (flycheck-sanitize-errors - (flycheck-increment-error-columns - (seq-remove - (lambda (err) - (string-suffix-p - "/share/racket/pkgs/compiler-lib/compiler/commands/expand.rkt" - (flycheck-error-filename err))) - errors)))) - :error-patterns - ((error line-start (zero-or-more space) - (file-name) ":" line ":" column ":" (message) line-end)) - :modes (racket-mode scheme-mode)) - -(flycheck-define-checker rpm-rpmlint - "A RPM SPEC file syntax checker using rpmlint. - -See URL `https://github.com/rpm-software-management/rpmlint'." - :command ("rpmlint" source) - :error-patterns - ((error line-start - (file-name) ":" (optional line ":") " E: " (message) - line-end) - (warning line-start - (file-name) ":" (optional line ":") " W: " (message) - line-end)) - :error-filter - ;; rpmlint 1.1 outputs a spurious error for the temp file created by flycheck - (lambda (errors) - (dolist (err (seq-remove - (lambda (err) - (string-suffix-p "(none)" (flycheck-error-filename err))) - errors)) - ;; Add fake line numbers if they are missing in the lint output - (unless (flycheck-error-line err) - (setf (flycheck-error-line err) 1))) - errors) - :error-explainer - (lambda (error) - (when-let* ((error-message (flycheck-error-message error)) - (message-id (save-match-data - (string-match "\\([^ ]+\\)" error-message) - (match-string 1 error-message)))) - (flycheck-call-checker-process-for-output - 'rpm-rpmlint nil t "-I" message-id))) - :modes (sh-mode rpm-spec-mode) - :predicate (lambda () (or (not (eq major-mode 'sh-mode)) - ;; In `sh-mode', we need the proper shell - (eq sh-shell 'rpm)))) - -(flycheck-def-config-file-var flycheck-markdown-markdownlint-cli-config - markdown-markdownlint-cli - '(".markdownlint.json" ".markdownlint.jsonc" ".markdownlint.yaml") - :package-version '(flycheck . "33")) - -(flycheck-def-option-var flycheck-markdown-markdownlint-cli-disable-rules - nil markdown-markdownlint-cli - "Rules to disable for markdownlint-cli." - :type '(repeat :tag "Disabled rule" - (string :tag "Rule name")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "33")) - -(flycheck-def-option-var flycheck-markdown-markdownlint-cli-enable-rules - nil markdown-markdownlint-cli - "Rules to enable for markdownlint-cli." - :type '(repeat :tag "Enabled rule" - (string :tag "Rule name")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "33")) - -(flycheck-define-checker markdown-markdownlint-cli - "Markdown checker using markdownlint-cli. - -See URL `https://github.com/igorshubovych/markdownlint-cli'." - :command ("markdownlint" - (config-file "--config" flycheck-markdown-markdownlint-cli-config) - (option-list "--disable" flycheck-markdown-markdownlint-cli-disable-rules) - (option-list "--enable" flycheck-markdown-markdownlint-cli-enable-rules) - "--" - source) - :error-patterns - ((error line-start - (file-name) ":" line - (? ":" column) " " (id (one-or-more (not (any space)))) - " " (message) line-end)) - :error-filter - (lambda (errors) - (flycheck-sanitize-errors - (flycheck-remove-error-file-names "(string)" errors))) - :modes (markdown-mode gfm-mode) - :error-explainer - (lambda (err) - (let ((error-code (substring (flycheck-error-id err) 0 5)) - (url "https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#%s")) - (and error-code `(url . ,(format url error-code)))))) - -(flycheck-def-config-file-var flycheck-markdown-markdownlint-cli2-config - markdown-markdownlint-cli2 - '(".markdownlint-cli2.json" ".markdownlint-cli2.jsonc" ".markdownlint-cli2.yaml") - :package-version '(flycheck . "35")) - -(flycheck-define-checker markdown-markdownlint-cli2 - "Markdown checker using markdownlint-cli2. - -See URL `https://github.com/DavidAnson/markdownlint-cli2'." - :command ("markdownlint-cli2" - (config-file "--config" flycheck-markdown-markdownlint-cli2-config) - "--" - source) - :error-patterns - ((error line-start - (file-name) ":" line - (? ":" column) " " (id (one-or-more (not (any space)))) - " " (message) line-end)) - :error-filter - (lambda (errors) - (flycheck-sanitize-errors - (flycheck-remove-error-file-names "(string)" errors))) - :modes (markdown-mode gfm-mode) - :error-explainer - (lambda (err) - (let ((error-code (substring (flycheck-error-id err) 0 5)) - (url "https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#%s")) - (and error-code `(url . ,(format url error-code)))))) - -(flycheck-def-option-var flycheck-markdown-mdl-rules nil markdown-mdl - "Rules to enable for mdl. - -The value of this variable is a list of strings each of which is -the name of a rule to enable. - -By default all rules are enabled. - -See URL `https://git.io/vhi2t'." - :type '(repeat :tag "Enabled rules" - (string :tag "rule name")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "27")) - -(flycheck-def-option-var flycheck-markdown-mdl-tags nil markdown-mdl - "Rule tags to enable for mdl. - -The value of this variable is a list of strings each of which is -the name of a rule tag. Only rules with these tags are enabled. - -By default all rules are enabled. - -See URL `https://git.io/vhi2t'." - :type '(repeat :tag "Enabled tags" - (string :tag "tag name")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "27")) - -(flycheck-def-config-file-var flycheck-markdown-mdl-style markdown-mdl nil - :package-version '(flycheck . "27")) - -(flycheck-define-checker markdown-mdl - "Markdown checker using mdl. - -See URL `https://github.com/markdownlint/markdownlint'." - :command ("mdl" - (config-file "--style" flycheck-markdown-mdl-style) - (option "--tags=" flycheck-markdown-mdl-tags concat - flycheck-option-comma-separated-list) - (option "--rules=" flycheck-markdown-mdl-rules concat - flycheck-option-comma-separated-list)) - :standard-input t - :error-patterns - ((error line-start - (file-name) ":" line ": " (id (one-or-more alnum)) " " (message) - line-end)) - :error-filter - (lambda (errors) - (flycheck-sanitize-errors - (flycheck-remove-error-file-names "(stdin)" errors))) - :modes (markdown-mode gfm-mode)) - -(flycheck-def-config-file-var flycheck-markdown-pymarkdown-config - markdown-pymarkdown nil - :package-version '(flycheck . "34")) - -(flycheck-define-checker markdown-pymarkdown - "Markdown checker using PyMarkdown. - -See URL `https://pypi.org/project/pymarkdownlnt/'." - :command ("pymarkdown" - (config-file "--config" flycheck-markdown-markdownlint-cli-config) - "scan" - source) - :error-patterns - ((error line-start - (file-name) ":" line - (? ":" column) ": " (id (one-or-more alnum)) - ": " (message) line-end)) - :error-filter - (lambda (errors) - (flycheck-sanitize-errors - (flycheck-remove-error-file-names "(string)" errors))) - :modes (markdown-mode gfm-mode)) - -(flycheck-define-checker nix - "Nix checker using nix-instantiate. - -See URL `https://nixos.org/nix/manual/#sec-nix-instantiate'." - :command ("nix-instantiate" "--parse" "-") - :standard-input t - :error-patterns - ((error line-start - "error: " (message) - (one-or-more "\n") - (zero-or-more space) "at «stdin»:" line ":" column ":" line-end) - (error line-start - "at: (" line ":" column ") from stdin" - (one-or-more "\n" (zero-or-more space (one-or-more not-newline))) - (message) line-end) - (error line-start - "error: " (message) " at " (file-name) ":" line ":" column - line-end)) - :error-filter - (lambda (errors) - (flycheck-sanitize-errors - (flycheck-remove-error-file-names "(string)" errors))) - :next-checkers ((warning . nix-linter)) - :modes (nix-mode nix-ts-mode)) - -(defun flycheck-parse-nix-linter (output checker buffer) - "Parse nix-linter warnings from JSON OUTPUT. - -CHECKER and BUFFER denote the CHECKER that returned OUTPUT and -the BUFFER that was checked respectively. - -See URL `https://github.com/Synthetica9/nix-linter' for more -information about nix-linter." - (mapcar (lambda (err) - (let-alist err - (flycheck-error-new-at - .pos.spanBegin.sourceLine - .pos.spanBegin.sourceColumn - 'warning - .description - :id .offense - :checker checker - :buffer buffer - :filename (buffer-file-name buffer) - :end-line .pos.spanEnd.sourceLine - :end-column .pos.spanEnd.sourceColumn))) - (flycheck-parse-json output))) - -(flycheck-define-checker nix-linter - "Nix checker using nix-linter. - -See URL `https://github.com/Synthetica9/nix-linter'." - :command ("nix-linter" "--json-stream" "-") - :standard-input t - :error-parser flycheck-parse-nix-linter - :error-explainer - (lambda (error) - (when-let (error-code (flycheck-error-id error)) - (flycheck-call-checker-process-for-output - 'nix-linter nil t "--help-for" error-code))) - :modes (nix-mode nix-ts-mode)) - -(defun flycheck-parse-statix (output checker buffer) - "Parse statix warnings from JSON OUTPUT. - -CHECKER and BUFFER denote the CHECKER that returned OUTPUT and -the BUFFER that was checked respectively. - -See URL `https://github.com/nerdypepper/statix' for more -information about statix." - (mapcar (lambda (err) - ;; Diagnostic information is a (seemingly always) 1 element array. - (let-alist (car (alist-get 'diagnostics err)) - (let ((message .message) - (start-line .at.from.line) - (start-column .at.from.column) - (end-line .at.to.line) - (end-column .at.to.column)) - - (let-alist err - (flycheck-error-new-at - start-line - start-column - (pcase .severity ("Error" 'error) - ("Warn" 'warning) - (_ 'warning)) - (format "%s: %s" .note message) - :id (format "%s%02d" (pcase .severity - ("Error" "E") - ("Warn" "W") - (_ "")) .code) - :checker checker - :buffer buffer - :filename (buffer-file-name buffer) - :end-line end-line - :end-column end-column))))) - (alist-get 'report (car (flycheck-parse-json output))))) - -(flycheck-define-checker statix - "Nix checker using statix. - -See URL `https://github.com/nerdypepper/statix'." - :command ("statix" "check" "-o=json" source) - :error-parser flycheck-parse-statix - :modes nix-mode) - -(defun flycheck-locate-sphinx-source-directory () - "Locate the Sphinx source directory for the current buffer. - -Return the source directory, or nil, if the current buffer is not -part of a Sphinx project." - (when-let* ((filename (buffer-file-name)) - (dir (locate-dominating-file filename "conf.py"))) - (expand-file-name dir))) - -(flycheck-define-checker rst - "A ReStructuredText (RST) syntax checker using Docutils. - -See URL `https://docutils.sourceforge.net/'." - ;; include:: directives - :command ("rst2pseudoxml.py" "--report=2" "--halt=5" - ;; Read from standard input and throw output away - "-" null-device) - :standard-input t - :error-patterns - ((warning line-start ":" line ": (WARNING/2) " (message) line-end) - (error line-start ":" line - ": (" (or "ERROR/3" "SEVERE/4") ") " - (message) line-end)) - :modes rst-mode) - -(flycheck-def-option-var flycheck-sphinx-warn-on-missing-references t rst-sphinx - "Whether to warn about missing references in Sphinx. - -When non-nil (the default), warn about all missing references in -Sphinx via `-n'." - :type 'boolean - :safe #'booleanp - :package-version '(flycheck . "0.17")) - -(flycheck-define-checker rst-sphinx - "A ReStructuredText (RST) syntax checker using Sphinx. - -Requires Sphinx 1.2 or newer. See URL `https://sphinx-doc.org'." - :command ("sphinx-build" "-b" "pseudoxml" - "-q" "-N" ; Reduced output and no colors - (option-flag "-n" flycheck-sphinx-warn-on-missing-references) - (eval (flycheck-locate-sphinx-source-directory)) - temporary-directory ; Redirect the output to a temporary - ; directory - source-original) ; Sphinx needs the original document - :error-patterns - ((warning line-start (file-name) ":" line ": WARNING: " (message) line-end) - (error line-start - (file-name) ":" line - ": " (or "ERROR" "SEVERE") ": " - (message) line-end)) - :modes rst-mode - :predicate (lambda () (and (flycheck-buffer-saved-p) - (flycheck-locate-sphinx-source-directory)))) - -(defun flycheck-ruby--find-project-root (_checker) - "Compute an appropriate working-directory for flycheck-ruby. - -This is either a parent directory containing a Gemfile, or nil." - (and - buffer-file-name - (locate-dominating-file buffer-file-name "Gemfile"))) - -(defun flycheck-ruby--filter-rubocop-errors (errors) - "Filter RuboCop ERRORS attributed to dummy stdin filename." - (flycheck-remove-error-file-names - (flycheck--file-truename (expand-file-name "stdin")) - errors)) - -(flycheck-def-config-file-var flycheck-rubocoprc ruby-rubocop ".rubocop.yml") - -(flycheck-def-option-var flycheck-rubocop-lint-only nil - (ruby-rubocop ruby-standard ruby-chef-cookstyle) - "Whether to only report code issues in Rubocop, Cookstyle and Standard. - -When non-nil, only report code issues, via `--lint'. Otherwise -report style issues as well." - :safe #'booleanp - :type 'boolean - :package-version '(flycheck . "0.16")) - -(defconst flycheck-ruby-rubocop-error-patterns - '((info line-start (file-name) ":" line ":" column ": C: " - (optional (id (one-or-more (not (any ":")))) ": ") (message) line-end) - (warning line-start (file-name) ":" line ":" column ": W: " - (optional (id (one-or-more (not (any ":")))) ": ") (message) - line-end) - (error line-start (file-name) ":" line ":" column ": " (or "E" "F") ": " - (optional (id (one-or-more (not (any ":")))) ": ") (message) - line-end))) - -(flycheck-def-executable-var ruby-rubocop "rubocop") -(flycheck-define-command-checker 'ruby-rubocop - "A Ruby syntax and style checker using the RuboCop tool. - -You need at least RuboCop 0.34 for this syntax checker. - -See URL `https://rubocop.org/'." - ;; ruby-standard is defined based on this checker - :command '("rubocop" - "--display-cop-names" - "--force-exclusion" - "--format" "emacs" - (config-file "--config" flycheck-rubocoprc) - (option-flag "--lint" flycheck-rubocop-lint-only) - ;; RuboCop takes the original file name as argument when reading - ;; from standard input, but it chokes when that name is the empty - ;; string, so fall back to "stdin" in order to handle buffers with - ;; no backing file (e.g. org-mode snippet buffers) - "--stdin" (eval (or (buffer-file-name) "stdin"))) - :standard-input t - :working-directory #'flycheck-ruby--find-project-root - :error-patterns flycheck-ruby-rubocop-error-patterns - :error-filter #'flycheck-ruby--filter-rubocop-errors - :modes '(enh-ruby-mode ruby-mode ruby-ts-mode) - :next-checkers '((warning . ruby-reek) - (warning . ruby-chef-cookstyle))) - -(flycheck-def-executable-var ruby-chef-cookstyle "cookstyle") -(flycheck-define-command-checker 'ruby-chef-cookstyle - "A Chef (Ruby) syntax and style checker using the Cookstyle tool. -Basically Cookstyle is a thin wrapper around RuboCop, so this -checker is essentially the same. - -See URL `https://github.com/chef/cookstyle'." - :command '("cookstyle" - "--display-cop-names" - "--force-exclusion" - "--format" "emacs" - (config-file "--config" flycheck-rubocoprc) - (option-flag "--lint" flycheck-rubocop-lint-only) - ;; RuboCop takes the original file name as argument when reading - ;; from standard input, but it chokes when that name is the empty - ;; string, so fall back to "stdin" in order to handle buffers with - ;; no backing file (e.g. org-mode snippet buffers) - "--stdin" (eval (or (buffer-file-name) "stdin"))) - :standard-input t - :working-directory #'flycheck-ruby--find-project-root - :error-patterns flycheck-ruby-rubocop-error-patterns - :error-filter #'flycheck-ruby--filter-rubocop-errors - :modes '(enh-ruby-mode ruby-mode ruby-ts-mode) - :predicate - (lambda () - (let ((parent-dir (file-name-directory - (directory-file-name - (expand-file-name default-directory))))) - (or - ;; Chef CookBook - ;; https://docs.opscode.com/chef/knife.html#id38 - (locate-dominating-file parent-dir "recipes") - ;; Knife Solo - ;; https://matschaffer.github.io/knife-solo/#label-Init+command - (locate-dominating-file parent-dir "cookbooks")))) - :next-checkers '((warning . ruby-reek))) - -(flycheck-def-config-file-var flycheck-ruby-standardrc ruby-standard - ".standard.yml") - -(flycheck-def-executable-var ruby-standard "standardrb") -(flycheck-define-command-checker 'ruby-standard - "A Ruby syntax and style checker using the StandardRB gem. - -See URL `https://github.com/testdouble/standard' for more information." - ;; This checker is derived from ruby-rubocop; see above - :command '("standardrb" - "--display-cop-names" - "--force-exclusion" - "--format" "emacs" - "--cache" "false" - (config-file "--config" flycheck-ruby-standardrc) - (option-flag "--lint" flycheck-rubocop-lint-only) - "--stdin" source-original) - :standard-input t - :working-directory #'flycheck-ruby--find-project-root - :error-patterns flycheck-ruby-rubocop-error-patterns - :error-filter #'flycheck-ruby--filter-rubocop-errors - :modes '(enh-ruby-mode ruby-mode ruby-ts-mode) - :next-checkers '((warning . ruby-reek) - (warning . ruby-chef-cookstyle))) - -(flycheck-def-config-file-var flycheck-reekrc ruby-reek ".reek.yml" - :safe #'string-or-null-p - :package-version '(flycheck . "30")) - -(flycheck-define-checker ruby-reek - "A Ruby smell checker using reek. - -See URL `https://github.com/troessner/reek'." - :command ("reek" "--format" "json" - (config-file "--config" flycheck-reekrc) - source) - :error-parser flycheck-parse-reek - :modes (enh-ruby-mode ruby-mode ruby-ts-mode)) - -(flycheck-define-checker ruby - "A Ruby syntax checker using the standard Ruby interpreter. - -Please note that the output of different Ruby versions and -implementations varies wildly. This syntax checker supports -current versions of MRI and JRuby, but may break when used with -other implementations or future versions of these -implementations. - -Please consider using `ruby-rubocop' or `ruby-reek' instead. - -See URL `https://www.ruby-lang.org/'." - :command ("ruby" "-w" "-c") - :standard-input t - :error-patterns - ;; These patterns support output from JRuby, too, to deal with RVM or Rbenv - ((error line-start "SyntaxError in -:" line ": " (message) line-end) - (warning line-start "-:" line ":" (optional column ":") - " warning: " (message) line-end) - ;; Ruby 3.4 includes the interpreter path when emitting syntax errors - (error line-start (optional (one-or-more (not (any ":"))) ": ") "-:" line ": " (message) line-end)) - :modes (enh-ruby-mode ruby-mode ruby-ts-mode) - :next-checkers ((warning . ruby-chef-cookstyle))) - -(flycheck-define-checker ruby-jruby - "A Ruby syntax checker using the JRuby interpreter. - -This syntax checker is very primitive, and may break on future -versions of JRuby. - -Please consider using `ruby-rubocop' instead. - -See URL `https://jruby.org/'." - :command ("jruby" "-w" "-c") - :standard-input t - :error-patterns - ((error line-start "SyntaxError in -:" line ": " (message) line-end) - (warning line-start "-:" line ": warning: " (message) line-end) - (error line-start "-:" line ": " (message) line-end)) - :modes (enh-ruby-mode ruby-mode ruby-ts-mode)) - -(flycheck-def-args-var flycheck-cargo-check-args (rust-cargo) - :package-version '(flycheck . "32")) - -(flycheck-def-args-var flycheck-rust-args (rust) - :package-version '(flycheck . "0.24")) - -(flycheck-def-option-var flycheck-rust-check-tests t (rust-cargo rust) - "Whether to check test code in Rust. - -For the `rust' checker: When non-nil, `rustc' is passed the -`--test' flag, which will check any code marked with the -`#[cfg(test)]' attribute and any functions marked with -`#[test]'. Otherwise, `rustc' is not passed `--test' and test -code will not be checked. Skipping `--test' is necessary when -using `#![no_std]', because compiling the test runner requires -`std'. - -For the `rust-cargo' checker: When non-nil, calls `cargo test ---no-run' instead of `cargo check'." - :type 'boolean - :safe #'booleanp - :package-version '("flycheck" . "0.19")) - -(flycheck-def-option-var flycheck-rust-crate-root nil rust - "A path to the crate root for the current buffer. - -The value of this variable is either a string with the path to -the crate root for the current buffer, or nil if the current buffer -is a crate. A relative path is relative to the current buffer. - -If this variable is non nil the current buffer will only be checked -if it is not modified, i.e. after it has been saved." - :type '(choice (const :tag "Unspecified" nil) - (file :tag "Root")) - :safe #'flycheck-string-or-nil-p - :package-version '(flycheck . "0.20")) -(make-variable-buffer-local 'flycheck-rust-crate-root) - -(flycheck-def-option-var flycheck-rust-crate-type "lib" (rust-cargo rust) - "The type of the Rust Crate to check. - -For `rust-cargo', the value should be a string denoting the -target type passed to Cargo. See -`flycheck-rust-valid-crate-type-p' for the list of allowed -values. - -For `rust', the value should be a string denoting the crate type -for the `--crate-type' flag of rustc." - :type '(choice (const :tag "nil (rust/rust-cargo)" nil) - (const :tag "lib (rust/rust-cargo)" "lib") - (const :tag "bin (rust/rust-cargo)" "bin") - (const :tag "example (rust-cargo)" "example") - (const :tag "test (rust-cargo)" "test") - (const :tag "bench (rust-cargo)" "bench") - (const :tag "rlib (rust)" "rlib") - (const :tag "dylib (rust)" "dylib") - (const :tag "cdylib (rust)" "cdylib") - (const :tag "staticlib (rust)" "staticlib") - (const :tag "metadata (rust)" "metadata")) - :safe #'stringp - :package-version '(flycheck . "0.20")) -(make-variable-buffer-local 'flycheck-rust-crate-type) - -(flycheck-def-option-var flycheck-rust-binary-name nil rust-cargo - "The name of the binary to pass to `cargo check --CRATE-TYPE'. - -The value of this variable is a string denoting the name of the -target to check: usually the name of the crate, or the name of -one of the files under `src/bin', `tests', `examples' or -`benches'. - -This always requires a non-nil value, unless -`flycheck-rust-crate-type' is `lib' or nil, in which case it is -ignored." - :type '(choice (const :tag "Unspecified" nil) - (string :tag "Binary name")) - :safe #'flycheck-string-or-nil-p - :package-version '(flycheck . "28")) -(make-variable-buffer-local 'flycheck-rust-binary-name) - -(flycheck-def-option-var flycheck-rust-features nil rust-cargo - "List of features to activate during build or check. - -The value of this variable is a list of strings denoting features -that will be activated to build the target to check. Features will -be passed to `cargo check --features=FEATURES'." - :type '(repeat :tag "Features to activate" - (string :tag "Feature")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "32")) -(make-variable-buffer-local 'flycheck-rust-features) - -(flycheck-def-option-var flycheck-rust-library-path nil rust - "A list of library directories for Rust. - -The value of this variable is a list of strings, where each -string is a directory to add to the library path of Rust. -Relative paths are relative to the file being checked." - :type '(repeat (directory :tag "Library directory")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "0.18")) - -(defun flycheck--fontify-as-markdown () - "Place current buffer in `markdown-view-mode' and fontify it." - (when (fboundp 'markdown-view-mode) - (let ((markdown-fontify-code-block-default-mode 'rust-mode) - (markdown-fontify-code-blocks-natively t) - (markdown-hide-markup t)) - (markdown-view-mode) - (font-lock-flush) - (font-lock-ensure)))) - -(defun flycheck-rust-error-explainer (error) - "Return an explanation for the given `flycheck-error' ERROR." - (when-let (error-code (flycheck-error-id error)) - (lambda () - (flycheck-call-checker-process - 'rust nil standard-output t "--explain" error-code) - (with-current-buffer standard-output - (flycheck--fontify-as-markdown))))) - -(defun flycheck-rust-error-filter (errors) - "Filter ERRORS from rustc output that have no explanatory value." - (seq-remove - (lambda (err) - (or - ;; Macro errors emit a diagnostic in a phony file, - ;; e.g. "". - (when-let (filename (flycheck-error-filename err)) - (string-match-p (rx "macros>" line-end) filename)) - ;; Redundant message giving the number of failed errors - (when-let (msg (flycheck-error-message err)) - (string-match-p - (rx - (or (: "aborting due to " (optional (one-or-more num) " ") - "previous error") - (: "For more information about this error, try `rustc --explain " - (one-or-more alnum) "`."))) - msg)))) - errors)) - -(defun flycheck-rust-manifest-directory () - "Return the nearest directory holding the Cargo manifest. - -Return the nearest directory containing the `Cargo.toml' manifest -file, starting from the current buffer and using -`locate-dominating-file'. Return nil if there is no such file, -or if the current buffer has no file name." - (and buffer-file-name - (locate-dominating-file buffer-file-name "Cargo.toml"))) - -(defun flycheck-rust-cargo-metadata () - "Run `cargo metadata' and return the result as parsed JSON object." - (car (flycheck-parse-json - (flycheck-call-checker-process-for-output - 'rust-cargo nil t - "metadata" "--no-deps" "--format-version" "1")))) - -(defun flycheck-rust-cargo-workspace-root () - "Return the path to the workspace root of a Rust Cargo project. - -Return nil if the workspace root does not exist (for Rust -versions inferior to 1.25)." - (let-alist (flycheck-rust-cargo-metadata) - .workspace_root)) - -(defun flycheck-rust-cargo-has-command-p (command) - "Whether Cargo has COMMAND in its list of commands. - -Execute `cargo --list' to find out whether COMMAND is present." - (let ((cargo (funcall flycheck-executable-find "cargo"))) - (member command - (mapcar (lambda (line) - (replace-regexp-in-string "\\s-*\\(\\S-+\\).*\\'" "\\1" line)) - (ignore-errors (process-lines cargo "--list")))))) - -(defun flycheck-rust-valid-crate-type-p (crate-type) - "Whether CRATE-TYPE is a valid target type for Cargo. - -A valid Cargo target type is one of `lib', `bin', `example', -`test' or `bench'." - (member crate-type '(nil "lib" "bin" "example" "test" "bench"))) - -(flycheck-define-checker rust-cargo - "A Rust syntax checker using Cargo. - -This syntax checker requires Rust 1.17 or newer. See URL -`https://www.rust-lang.org'." - :command ("cargo" - (eval (if flycheck-rust-check-tests - "test" - "check")) - (eval (when flycheck-rust-check-tests - "--no-run")) - (eval (when flycheck-rust-crate-type - (concat "--" flycheck-rust-crate-type))) - ;; All crate targets except "lib" need a binary name - (eval (when (and flycheck-rust-crate-type - (not (string= flycheck-rust-crate-type "lib"))) - flycheck-rust-binary-name)) - (option "--features=" flycheck-rust-features concat - flycheck-option-comma-separated-list) - (eval flycheck-cargo-check-args) - "--message-format=json") - :error-parser flycheck-parse-cargo-rustc - :error-filter (lambda (errors) - ;; In Rust 1.25+, filenames are relative to the workspace - ;; root. - (let ((root (flycheck-rust-cargo-workspace-root))) - (seq-do (lambda (err) - ;; Some errors are crate level and do not have a - ;; filename - (when (flycheck-error-filename err) - (setf (flycheck-error-filename err) - (expand-file-name - (flycheck-error-filename err) root)))) - (flycheck-rust-error-filter errors)))) - :error-explainer flycheck-rust-error-explainer - :modes (rust-mode rust-ts-mode) - :predicate flycheck-buffer-saved-p - :enabled flycheck-rust-manifest-directory - :working-directory (lambda (_) (flycheck-rust-manifest-directory)) - :verify - (lambda (_) - (and buffer-file-name - (let* ((has-toml (flycheck-rust-manifest-directory)) - (valid-crate-type (flycheck-rust-valid-crate-type-p - flycheck-rust-crate-type)) - (need-binary-name - (and flycheck-rust-crate-type - (not (string= flycheck-rust-crate-type "lib"))))) - (list - (flycheck-verification-result-new - :label "Cargo.toml" - :message (if has-toml "Found" "Missing") - :face (if has-toml 'success '(bold warning))) - (flycheck-verification-result-new - :label "Crate type" - :message (if valid-crate-type - (format "%s" flycheck-rust-crate-type) - (format "%s (invalid, should be one of 'lib', 'bin', \ -'test', 'example' or 'bench')" - flycheck-rust-crate-type)) - :face (if valid-crate-type 'success '(bold error))) - (flycheck-verification-result-new - :label "Binary name" - :message (cond - ((not need-binary-name) "Not required") - ((not flycheck-rust-binary-name) "Required") - (t (format "%s" flycheck-rust-binary-name))) - :face (cond - ((not need-binary-name) 'success) - ((not flycheck-rust-binary-name) '(bold error)) - (t 'success)))))))) - -(flycheck-define-checker rust - "A Rust syntax checker using Rust compiler. - -This syntax checker needs Rust 1.18 or newer. See URL -`https://www.rust-lang.org'." - :command ("rustc" - (option "--crate-type" flycheck-rust-crate-type) - "--emit=mir" "-o" "/dev/null" ; avoid creating binaries - "--error-format=json" - (option-flag "--test" flycheck-rust-check-tests) - (option-list "-L" flycheck-rust-library-path concat) - (eval flycheck-rust-args) - (eval (or flycheck-rust-crate-root - (flycheck-substitute-argument 'source-original 'rust)))) - :error-parser flycheck-parse-rustc - :error-filter flycheck-rust-error-filter - :error-explainer flycheck-rust-error-explainer - :modes (rust-mode rust-ts-mode) - :predicate flycheck-buffer-saved-p) - -(flycheck-define-checker rust-clippy - "A Rust syntax checker using clippy. - -See URL `https://github.com/rust-lang-nursery/rust-clippy'." - :command ("cargo" "clippy" "--message-format=json") - :error-parser flycheck-parse-cargo-rustc - :error-filter flycheck-rust-error-filter - :error-explainer flycheck-rust-error-explainer - :modes (rust-mode rust-ts-mode) - :predicate flycheck-buffer-saved-p - :enabled (lambda () - (and (flycheck-rust-cargo-has-command-p "clippy") - (flycheck-rust-manifest-directory))) - :working-directory (lambda (_) (flycheck-rust-manifest-directory)) - :verify - (lambda (_) - (and buffer-file-name - (let ((has-toml (flycheck-rust-manifest-directory)) - (has-clippy (flycheck-rust-cargo-has-command-p "clippy"))) - (list - (flycheck-verification-result-new - :label "Clippy" - :message (if has-clippy "Found" - "Cannot find the `cargo clippy' command") - :face (if has-clippy 'success '(bold warning))) - (flycheck-verification-result-new - :label "Cargo.toml" - :message (if has-toml "Found" "Missing") - :face (if has-toml 'success '(bold warning)))))))) - -(flycheck-define-checker salt-lint - "A salt linter which apply common best practices for SaltStack. - -See URL `https://salt-lint.readthedocs.io/en/latest/'." - :command ("python" "-m" "saltlint" "--json") - :standard-input t - :error-parser flycheck-salt-lint-parser - :error-filter (lambda (errors) (flycheck-sanitize-errors errors)) - :modes salt-mode) - -(defun flycheck-salt-lint-parser (output checker buffer) - "Parse salt lint JSON errors from OUTPUT. - -The arguments CHECKER and BUFFER are only passed through." - (condition-case nil - (let* ((json-array-type 'list) - (json-object-type 'plist) - (filename (buffer-file-name buffer)) - (errors (json-read-from-string output))) - (mapcar (lambda (e) - (flycheck-error-new - :checker checker - :buffer buffer - :filename filename - :level (pcase (plist-get e :severity) - ("HIGH" 'error) - ("MEDIUM" 'warning) - ("LOW" 'warning) - ("INFO" 'info) - (_ 'info)) - :line (plist-get e :linenumber) - :column 0 - :message (concat (plist-get e :message) (plist-get e :line)) - :id (plist-get e :id))) errors)) - (json-error nil))) - -(defvar flycheck-sass-scss-cache-directory nil - "The cache directory for `sass' and `scss'.") - -(defun flycheck-sass-scss-cache-location () - "Get the cache location for `sass' and `scss'. - -If no cache directory exists yet, create one and return it. -Otherwise return the previously used cache directory." - (setq flycheck-sass-scss-cache-directory - (or flycheck-sass-scss-cache-directory - (make-temp-file "flycheck-sass-scss-cache" 'directory)))) - -(flycheck-def-option-var flycheck-sass-compass nil sass - "Whether to enable the Compass CSS framework. - -When non-nil, enable the Compass CSS framework, via `--compass'." - :type 'boolean - :safe #'booleanp - :package-version '(flycheck . "0.16")) - -(flycheck-define-checker sass - "A Sass syntax checker using the Sass compiler. - -See URL `https://sass-lang.com'." - :command ("sass" - "--cache-location" (eval (flycheck-sass-scss-cache-location)) - (option-flag "--compass" flycheck-sass-compass) - "--check" "--stdin") - :standard-input t - :error-patterns - ((error line-start - (or "Syntax error: " "Error: ") - (message (one-or-more not-newline) - (zero-or-more "\n" - (one-or-more " ") - (one-or-more not-newline))) - (optional "\r") "\n" (one-or-more " ") "on line " line - " of standard input" - line-end) - (warning line-start - "WARNING: " - (message (one-or-more not-newline) - (zero-or-more "\n" - (one-or-more " ") - (one-or-more not-newline))) - (optional "\r") "\n" (one-or-more " ") "on line " line - " of " (one-or-more not-newline) - line-end)) - :modes sass-mode) - -(flycheck-def-config-file-var flycheck-sass-lintrc sass/scss-sass-lint - ".sass-lint.yml" - :package-version '(flycheck . "30")) - -(flycheck-define-checker sass/scss-sass-lint - "A SASS/SCSS syntax checker using sass-Lint. - -See URL `https://github.com/sasstools/sass-lint'." - :command ("sass-lint" - "--verbose" - "--no-exit" - "--format" "Checkstyle" - (config-file "--config" flycheck-sass-lintrc) - source) - :error-parser flycheck-parse-checkstyle - :modes (sass-mode scss-mode)) - -(flycheck-define-checker scala - "A Scala syntax checker using the Scala compiler. - -See URL `https://www.scala-lang.org/'." - :command ("scalac" "-Ystop-after:parser" source) - :error-patterns - ((error line-start (file-name) ":" line ": error: " (message) line-end)) - :modes scala-mode - :next-checkers ((warning . scala-scalastyle))) - -(flycheck-def-config-file-var flycheck-scalastylerc scala-scalastyle nil - :package-version '(flycheck . "0.20")) - -(flycheck-define-checker scala-scalastyle - "A Scala style checker using scalastyle. - -Note that this syntax checker is not used if -`flycheck-scalastylerc' is nil or refers to a non-existing file. - -See URL `https://www.scalastyle.org'." - :command ("scalastyle" - (config-file "-c" flycheck-scalastylerc) - source) - :error-patterns - ((error line-start "error file=" (file-name) " message=" - (message) " line=" line (optional " column=" column) line-end) - (warning line-start "warning file=" (file-name) " message=" - (message) " line=" line (optional " column=" column) line-end)) - :error-filter (lambda (errors) - (flycheck-sanitize-errors - (flycheck-increment-error-columns errors))) - :modes scala-mode - :predicate - ;; Inhibit this syntax checker if the JAR or the configuration are unset or - ;; missing - (lambda () (and flycheck-scalastylerc - (flycheck-locate-config-file flycheck-scalastylerc - 'scala-scalastyle))) - :verify (lambda (checker) - (let ((config-file (and flycheck-scalastylerc - (flycheck-locate-config-file - flycheck-scalastylerc checker)))) - (list - (flycheck-verification-result-new - :label "Configuration file" - :message (cond - ((not flycheck-scalastylerc) - "`flycheck-scalastyletrc' not set") - ((not config-file) - (format "file %s not found" flycheck-scalastylerc)) - (t (format "found at %s" config-file))) - :face (cond - ((not flycheck-scalastylerc) '(bold warning)) - ((not config-file) '(bold error)) - (t 'success))))))) - -(flycheck-def-args-var flycheck-scheme-chicken-args scheme-chicken - :package-version '(flycheck . "32")) - -(flycheck-define-checker scheme-chicken - "A CHICKEN Scheme syntax checker using the CHICKEN compiler `csc'. - -See URL `https://call-cc.org/'." - :command ("csc" "-analyze-only" "-local" - (eval flycheck-scheme-chicken-args) - source) - :error-patterns - ((info line-start - "Note: " (zero-or-more not-newline) ":\n" - (one-or-more (any space)) "(" (file-name) ":" line ") " (message) - line-end) - (warning line-start - "Warning: " (zero-or-more not-newline) ",\n" - (one-or-more (any space)) (zero-or-more not-newline) ":\n" - (one-or-more (any space)) "(" (file-name) ":" line ") " (message) - line-end) - (warning line-start - "Warning: " (zero-or-more not-newline) ":\n" - (one-or-more (any space)) "(" (file-name) ":" line ") " (message) - line-end) - (error line-start "Error: (line " line ") " (message) line-end) - (error line-start "Syntax error: (" (file-name) ":" line ")" - (zero-or-more not-newline) " - " - (message (one-or-more not-newline) - (zero-or-more "\n" - (zero-or-more space) - (zero-or-more not-newline)) - (one-or-more space) "<--") - line-end) - ;; A of version 4.12.0, the chicken compiler doesn't provide a - ;; line number for this error. - (error line-start "Syntax error: " - (message (one-or-more not-newline) - (zero-or-more "\n" - (zero-or-more space) - (zero-or-more not-newline)) - (one-or-more space) "<--") - line-end) - (error line-start - "Error: " (zero-or-more not-newline) ":\n" - (one-or-more (any space)) "(" (file-name) ":" line ") " (message) - line-end) - ;; A of version 4.12.0, the chicken compiler doesn't provide a - ;; line number for this error. - (error line-start "Error: " - (message (one-or-more not-newline) - (zero-or-more "\n" - (zero-or-more space) - (zero-or-more not-newline)) - (one-or-more space) "<--"))) - :error-filter flycheck-fill-empty-line-numbers - :predicate - (lambda () - ;; In `scheme-mode' we must check the current Scheme implementation - ;; being used - (and (boundp 'geiser-impl--implementation) - (eq geiser-impl--implementation 'chicken))) - :verify - (lambda (_checker) - (let ((geiser-impl (bound-and-true-p geiser-impl--implementation))) - (list - (flycheck-verification-result-new - :label "Geiser Implementation" - :message (cond - ((eq geiser-impl 'chicken) "Chicken Scheme") - (geiser-impl (format "Other: %s" geiser-impl)) - (t "Geiser not active")) - :face (cond - ((eq geiser-impl 'chicken) 'success) - (t '(bold error))))))) - :modes scheme-mode) - -(defconst flycheck-scss-lint-checkstyle-re - (rx "cannot load such file" (1+ not-newline) "scss_lint_reporter_checkstyle") - "Regular expression to parse missing checkstyle error.") - -(defun flycheck-parse-scss-lint (output checker buffer) - "Parse SCSS-Lint OUTPUT from CHECKER and BUFFER. - -Like `flycheck-parse-checkstyle', but catches errors about -missing checkstyle reporter from SCSS-Lint." - (if (string-match-p flycheck-scss-lint-checkstyle-re output) - (list (flycheck-error-new-at - 1 nil 'error "Checkstyle reporter for SCSS-Lint missing. -Please run gem install scss_lint_reporter_checkstyle" - :checker checker - :buffer buffer - :filename (buffer-file-name buffer))) - (flycheck-parse-checkstyle output checker buffer))) - -(flycheck-def-config-file-var flycheck-scss-lintrc scss-lint ".scss-lint.yml" - :package-version '(flycheck . "0.23")) - -(flycheck-define-checker scss-lint - "A SCSS syntax checker using SCSS-Lint. - -Needs SCSS-Lint 0.43.2 or newer. - -See URL `https://github.com/brigade/scss-lint'." - :command ("scss-lint" - "--require=scss_lint_reporter_checkstyle" - "--format=Checkstyle" - (config-file "--config" flycheck-scss-lintrc) - "--stdin-file-path" source-original "-") - :standard-input t - ;; We cannot directly parse Checkstyle XML, since for some mysterious reason - ;; SCSS-Lint doesn't have a built-in Checkstyle reporter, and instead ships it - ;; as an addon which might not be installed. We use a custom error parser to - ;; check whether the addon is missing and turn that into a special kind of - ;; Flycheck error. - :error-parser flycheck-parse-scss-lint - :modes scss-mode - :verify - (lambda (checker) - (when-let - (output (flycheck-call-checker-process-for-output - checker nil nil "--require=scss_lint_reporter_checkstyle")) - (let ((reporter-missing - (string-match-p flycheck-scss-lint-checkstyle-re output))) - (list - (flycheck-verification-result-new - :label "checkstyle reporter" - :message (if reporter-missing - "scss_lint_reporter_checkstyle plugin missing" - "present") - :face (if reporter-missing - '(bold error) - 'success))))))) - -(flycheck-define-checker scss-stylelint - "A SCSS syntax and style checker using stylelint. - -See URL `https://stylelint.io/'." - :command ("stylelint" - (eval flycheck-stylelint-args) - (option-flag "--quiet" flycheck-stylelint-quiet) - (config-file "--config" flycheck-stylelintrc)) - :standard-input t - :verify (lambda (_) (flycheck--stylelint-verify 'scss-stylelint)) - :error-parser flycheck-parse-stylelint - :predicate flycheck-buffer-nonempty-p - :modes (scss-mode)) - -(flycheck-define-checker sass-stylelint - "A Sass syntax and style checker using stylelint. - -See URL `https://stylelint.io/'." - :command ("stylelint" - (eval flycheck-stylelint-args) - (option-flag "--quiet" flycheck-stylelint-quiet) - (config-file "--config" flycheck-stylelintrc)) - :standard-input t - :verify (lambda (_) (flycheck--stylelint-verify 'sass-stylelint)) - :error-parser flycheck-parse-stylelint - :predicate flycheck-buffer-nonempty-p - :modes (sass-mode)) - -(flycheck-def-option-var flycheck-scss-compass nil scss - "Whether to enable the Compass CSS framework. - -When non-nil, enable the Compass CSS framework, via `--compass'." - :type 'boolean - :safe #'booleanp - :package-version '(flycheck . "0.16")) - -(flycheck-define-checker scss - "A SCSS syntax checker using the SCSS compiler. - -See URL `https://sass-lang.com'." - :command ("scss" - "--cache-location" (eval (flycheck-sass-scss-cache-location)) - (option-flag "--compass" flycheck-scss-compass) - "--check" "--stdin") - :standard-input t - :error-patterns - ((error line-start - (or "Syntax error: " "Error: ") - (message (one-or-more not-newline) - (zero-or-more "\n" - (one-or-more " ") - (one-or-more not-newline))) - (optional "\r") "\n" (one-or-more " ") "on line " line - " of standard input" - line-end) - (warning line-start - "WARNING: " - (message (one-or-more not-newline) - (zero-or-more "\n" - (one-or-more " ") - (one-or-more not-newline))) - (optional "\r") "\n" (one-or-more " ") "on line " line - " of an unknown file" - line-end)) - :modes scss-mode) - -(flycheck-def-args-var flycheck-sh-bash-args (sh-bash) - :package-version '(flycheck . "32")) - -(flycheck-define-checker sh-bash - "A Bash syntax checker using the Bash shell. - -See URL `https://www.gnu.org/software/bash/'." - :command ("bash" "--norc" "-n" - (eval flycheck-sh-bash-args) - "--") - :standard-input t - :error-patterns - ((error line-start - ;; The name/path of the bash executable - (one-or-more (not (any ":"))) ":" - ;; A label "line", possibly localized - (one-or-more (not (any digit))) - line (zero-or-more " ") ":" (zero-or-more " ") - (message) line-end)) - :modes (sh-mode bash-ts-mode) - :predicate (lambda () (eq sh-shell 'bash)) - :next-checkers ((warning . sh-shellcheck))) - -(flycheck-define-checker sh-posix-dash - "A POSIX Shell syntax checker using the Dash shell. - -See URL `https://gondor.apana.org.au/~herbert/dash/'." - :command ("dash" "-n") - :standard-input t - :error-patterns - ((error line-start (one-or-more (not (any ":"))) ": " line ": " (message))) - :modes sh-mode - :predicate (lambda () (eq sh-shell 'sh)) - :next-checkers ((warning . sh-shellcheck))) - -(flycheck-define-checker sh-posix-bash - "A POSIX Shell syntax checker using the Bash shell. - -See URL `https://www.gnu.org/software/bash/'." - :command ("bash" "--posix" "--norc" "-n" "--") - :standard-input t - :error-patterns - ((error line-start - ;; The name/path of the bash executable - (one-or-more (not (any ":"))) ":" - ;; A label "line", possibly localized - (one-or-more (not (any digit))) - line (zero-or-more " ") ":" (zero-or-more " ") - (message) line-end)) - :modes sh-mode - :predicate (lambda () (eq sh-shell 'sh)) - :next-checkers ((warning . sh-shellcheck))) - -(flycheck-define-checker sh-zsh - "A Zsh syntax checker using the Zsh shell. - -See URL `https://www.zsh.org/'." - :command ("zsh" "--no-exec" "--no-globalrcs" "--no-rcs" source) - :error-patterns - ((error line-start (file-name) ":" line ": " (message) line-end)) - :modes sh-mode - :predicate (lambda () (eq sh-shell 'zsh)) - :next-checkers ((warning . sh-shellcheck))) - -(defconst flycheck-shellcheck-supported-shells '(bash ksh88 sh) - "Shells supported by ShellCheck.") - -(flycheck-def-option-var flycheck-shellcheck-excluded-warnings nil sh-shellcheck - "A list of excluded warnings for ShellCheck. - -The value of this variable is a list of strings, where each -string is a warning code to be excluded from ShellCheck reports. -By default, no warnings are excluded." - :type '(repeat :tag "Excluded warnings" - (string :tag "Warning code")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "0.21")) - -(flycheck-def-option-var flycheck-shellcheck-follow-sources t sh-shellcheck - "Whether to follow external sourced files in scripts. - -Shellcheck will follow and parse sourced files so long as a -pre-runtime resolvable path to the file is present. This can -either be part of the source command itself: - source /full/path/to/file.txt -or added as a shellcheck directive before the source command: - # shellcheck source=/full/path/to/file.txt." - :type 'boolean - :safe #'booleanp - :package-version '(flycheck . "31")) - -(flycheck-define-checker sh-shellcheck - "A shell script syntax and style checker using Shellcheck. - -See URL `https://github.com/koalaman/shellcheck/'." - :command ("shellcheck" - "--format" "checkstyle" - "--shell" (eval (symbol-name sh-shell)) - (option-flag "--external-sources" - flycheck-shellcheck-follow-sources) - (option "--exclude" flycheck-shellcheck-excluded-warnings list - flycheck-option-comma-separated-list) - "-") - :standard-input t - :error-parser flycheck-parse-checkstyle - :error-filter - (lambda (errors) - (flycheck-remove-error-file-names - "-" (flycheck-dequalify-error-ids errors))) - :modes (sh-mode bash-ts-mode) - :predicate (lambda () (memq sh-shell flycheck-shellcheck-supported-shells)) - :verify (lambda (_) - (let ((supports-shell (memq sh-shell - flycheck-shellcheck-supported-shells))) - (list - (flycheck-verification-result-new - :label (format "Shell %s supported" sh-shell) - :message (if supports-shell "yes" "no") - :face (if supports-shell 'success '(bold warning)))))) - :error-explainer - (lambda (err) - (let ((error-code (flycheck-error-id err)) - (url "https://github.com/koalaman/shellcheck/wiki/%s")) - (and error-code `(url . ,(format url error-code)))))) - -(flycheck-define-checker slim - "A Slim syntax checker using the Slim compiler. - -See URL `https://slim-lang.com'." - :command ("slimrb" "--compile") - :standard-input t - :error-patterns - ((error line-start - "Slim::Parser::SyntaxError:" (message) (optional "\r") "\n " - "STDIN, Line " line (optional ", Column " column) - line-end)) - :modes slim-mode - :next-checkers ((warning . slim-lint))) - -(flycheck-define-checker slim-lint - "A Slim linter. - -See URL `https://github.com/sds/slim-lint'." - :command ("slim-lint" "--reporter=checkstyle" source) - :error-parser flycheck-parse-checkstyle - :modes slim-mode) - -(flycheck-define-checker sql-sqlint - "A SQL syntax checker using the sqlint tool. - -See URL `https://github.com/purcell/sqlint'." - :command ("sqlint") - :standard-input t - :error-patterns - ((warning line-start "stdin:" line ":" column ":WARNING " - (message (one-or-more not-newline) - (zero-or-more "\n" - (one-or-more " ") - (one-or-more not-newline))) - line-end) - (error line-start "stdin:" line ":" column ":ERROR " - (message (one-or-more not-newline) - (zero-or-more "\n" - (one-or-more " ") - (one-or-more not-newline))) - line-end)) - :modes (sql-mode)) - -(flycheck-define-checker systemd-analyze - "A systemd unit checker using systemd-analyze(1). - -See URL -`https://www.freedesktop.org/software/systemd/man/systemd-analyze.html'." - :command ("systemd-analyze" "verify" source) - :error-parser flycheck-parse-with-patterns-without-color - :error-patterns - ((error line-start (file-name) ":" (optional line ":") (message) line-end) - (error line-start "[" (file-name) ":" line "]" (message) line-end)) - :error-filter (lambda (errors) - (flycheck-sanitize-errors - (flycheck-fill-empty-line-numbers errors))) - :modes (systemd-mode)) - -(flycheck-def-config-file-var flycheck-chktexrc tex-chktex ".chktexrc") - -(flycheck-define-checker tcl-nagelfar - "An extensible tcl syntax checker - -See URL `https://nagelfar.sourceforge.net/'." - :command ("nagelfar" "-H" source) - :error-patterns - ;; foo.tcl: 29: E Wrong number of arguments (4) to "set" - ;; foo.tcl: 29: W Expr without braces - ((info line-start (file-name) ": " line ": N " (message) line-end) - (warning line-start (file-name) ": " line ": W " (message) line-end) - (error line-start (file-name) ": " line ": E " (message) line-end)) - :modes tcl-mode) - -(flycheck-define-checker terraform - "A Terraform syntax checker with `terraform fmt'. - -See URL `https://www.terraform.io/docs/commands/fmt.html'." - :command ("terraform" "fmt" "-no-color" "-") - :standard-input t - :error-patterns - ((error line-start "Error: " (one-or-more not-newline) - "\n\n on line " line ", in " (one-or-more not-newline) ":" - (one-or-more "\n" (zero-or-more space (one-or-more not-newline))) - (message (one-or-more (and (one-or-more (not (any ?\n))) ?\n))) - line-end) - (error line-start "Error: " (one-or-more not-newline) - "\n\n on line " line ":\n (source code not available)\n\n" - (message (one-or-more (and (one-or-more (not (any ?\n))) ?\n))) - line-end)) - :next-checkers ((warning . terraform-tflint)) - :modes terraform-mode) - -(flycheck-def-option-var flycheck-tflint-variable-files nil terraform-tflint - "A list of files to resolve terraform variables. - -The value of this variable is a list of strings, where each -string is a file to add to the terraform variables files. -Relative files are relative to the file being checked." - :type '(repeat (directory :tag "Variable file")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "32")) - -(defun flycheck-parse-tflint-linter (output checker buffer) - "Parse tflint warnings from JSON OUTPUT. - -CHECKER and BUFFER denote the CHECKER that returned OUTPUT and -the BUFFER that was checked respectively. - -See URL `https://github.com/terraform-linters/tflint' for more -information about tflint." - (mapcar (lambda (err) - (let-alist err - (flycheck-error-new-at - .range.start.line - .range.start.column - (pcase .rule.severity - ("error" 'error) - ("warning" 'warning) - (_ 'error)) - .message - :end-line .range.end.line - :end-column .range.end.column - :id .rule.name - :checker checker - :buffer buffer - :filename (buffer-file-name buffer)))) - (cdr (assq 'issues (car (flycheck-parse-json output)))))) - -(flycheck-define-checker terraform-tflint - "A Terraform checker using tflint. - -See URL `https://github.com/terraform-linters/tflint'." - :command ("tflint" "--format=json" "--force" - (option-list "--var-file=" flycheck-tflint-variable-files concat)) - :error-parser flycheck-parse-tflint-linter - :predicate flycheck-buffer-saved-p - :modes terraform-mode) - -(flycheck-def-option-var flycheck-chktex-extra-flags nil tex-chktex - "A list of extra arguments to give to chktex. -This variable works the same way as `tex-chktex-extra-flags': its value -is a list of strings, where each string is an argument added to chktex. - -For example, to ignore warnings 8 and 18, you would set this option to - - \\='(\"-n8\" \"-n18\")." - :type '(repeat string) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "35")) - -(flycheck-define-checker tex-chktex - "A TeX and LaTeX syntax and style checker using chktex. - -See URL `https://www.nongnu.org/chktex/'." - :command ("chktex" - (config-file "--localrc" flycheck-chktexrc) - (option-list "" flycheck-chktex-extra-flags concat) - ;; Compact error messages, and no version information, and execute - ;; \input statements - "--verbosity=0" "--quiet" "--inputfiles") - :standard-input t - :error-patterns - ((warning line-start "stdin:" line ":" column ":" - (id (one-or-more digit)) ":" (message) line-end)) - :error-filter - (lambda (errors) - (flycheck-sanitize-errors (flycheck-increment-error-columns errors))) - :modes (latex-mode LaTeX-mode plain-tex-mode plain-TeX-mode)) - -(flycheck-define-checker tex-lacheck - "A LaTeX syntax and style checker using lacheck. - -See URL `https://www.ctan.org/pkg/lacheck'." - :command ("lacheck" source-inplace) - :error-patterns - ((warning line-start - "\"" (file-name) "\", line " line ": " (message) - line-end)) - :modes (latex-mode LaTeX-mode)) - -(flycheck-define-checker texinfo - "A Texinfo syntax checker using makeinfo. - -See URL `https://www.gnu.org/software/texinfo/'." - :command ("makeinfo" "-o" null-device "-") - :standard-input t - :error-patterns - ((warning line-start - "-:" line (optional ":" column) ": " "warning: " (message) - line-end) - (error line-start - "-:" line (optional ":" column) ": " (message) - line-end)) - :modes (texinfo-mode Texinfo-mode)) - -(flycheck-def-config-file-var flycheck-textlint-config - textlint "textlintrc.json") - -;; This needs to be set because textlint plugins are installed separately, -;; and there is no way to check their installation status -- textlint simply -;; prints a backtrace. -(flycheck-def-option-var flycheck-textlint-plugin-alist - '((markdown-mode . "@textlint/markdown") - (gfm-mode . "@textlint/markdown") - (t . "@textlint/text")) - textlint - "An alist mapping major modes to textlint plugins. - -Each item is a cons cell `(MAJOR-MODE . PLUGIN)', where MAJOR-MODE is a mode -`flycheck-textlint' supports and PLUGIN is a textlint plugin. As a catch-all, -when MAJOR-MODE is t, that PLUGIN will be used for any supported mode that -isn't specified. - -See URL `https://npms.io/search?q=textlint-plugin' for all textlint plugins -published on NPM." - :type '(repeat (choice (cons symbol string) - (cons (const t) string)))) - -(defun flycheck--textlint-get-plugin () - "Return the textlint plugin for the current mode." - (cdr (seq-find - (lambda (arg) - (pcase-let ((`(,mode . _) arg)) - (or (and (booleanp mode) mode) ; mode is t - (derived-mode-p mode)))) - flycheck-textlint-plugin-alist))) - -(flycheck-define-checker textlint - "A text prose linter using textlint. - -See URL `https://textlint.github.io/'." - :command ("textlint" - (config-file "--config" flycheck-textlint-config) - "--format" "json" - ;; get the first matching plugin from plugin-alist - "--plugin" - (eval (flycheck--textlint-get-plugin)) - source) - ;; textlint seems to say that its json output is compatible with ESLint. - ;; https://textlint.github.io/docs/formatter.html - :error-parser flycheck-parse-eslint - ;; textlint can support different formats with textlint plugins, but - ;; only text and markdown formats are installed by default. Ask the - ;; user to add mode->plugin mappings manually in - ;; `flycheck-textlint-plugin-alist'. - :modes - (text-mode markdown-mode gfm-mode message-mode adoc-mode - mhtml-mode latex-mode LaTeX-mode org-mode rst-mode) - :enabled - (lambda () (flycheck--textlint-get-plugin)) - :verify - (lambda (_) - (let ((plugin (flycheck--textlint-get-plugin))) - (list - (flycheck-verification-result-new - :label "textlint plugin" - :message plugin - :face 'success))))) - -(flycheck-def-config-file-var flycheck-typescript-tslint-config - typescript-tslint "tslint.json" - :package-version '(flycheck . "27")) - -(flycheck-def-option-var flycheck-typescript-tslint-rulesdir - nil typescript-tslint - "The directory of custom rules for TSLint. - -The value of this variable is either a string containing the path -to a directory with custom rules, or nil, to not give any custom -rules to TSLint. - -Refer to the TSLint manual at URL -`https://palantir.github.io/tslint/usage/cli/' -for more information about the custom directory." - :type '(choice (const :tag "No custom rules directory" nil) - (directory :tag "Custom rules directory")) - :safe #'flycheck-string-or-nil-p - :package-version '(flycheck . "27")) - -(flycheck-def-args-var flycheck-tslint-args (typescript-tslint) - :package-version '(flycheck . "31")) - -(flycheck-define-checker typescript-tslint - "TypeScript style checker using TSLint. - -Note that this syntax checker is not used if -`flycheck-typescript-tslint-config' is nil or refers to a -non-existing file. - -See URL `https://github.com/palantir/tslint'." - :command ("tslint" "--format" "json" - (config-file "--config" flycheck-typescript-tslint-config) - (option "--rules-dir" flycheck-typescript-tslint-rulesdir) - (eval flycheck-tslint-args) - source-inplace) - :error-parser flycheck-parse-tslint - :modes (typescript-mode typescript-ts-mode tsx-ts-mode)) - -(flycheck-def-option-var flycheck-verilator-include-path nil verilog-verilator - "A list of include directories for Verilator. - -The value of this variable is a list of strings, where each -string is a directory to add to the include path of Verilator. -Relative paths are relative to the file being checked." - :type '(repeat (directory :tag "Include directory")) - :safe #'flycheck-string-list-p - :package-version '(flycheck . "0.24")) - -(flycheck-define-checker verilog-verilator - "A Verilog syntax checker using the Verilator Verilog HDL simulator. - -See URL `https://www.veripool.org/wiki/verilator'." - :command ("verilator" "--lint-only" "-Wall" "--quiet-exit" - (option-list "-I" flycheck-verilator-include-path concat) - source) - :error-patterns - ((warning line-start "%Warning" - (? "-" (id (+ (any "0-9A-Z_")))) ": " - (? (file-name) ":" line ":" (? column ":") " ") - (message) line-end) - (error line-start "%Error" - (? "-" (id (+ (any "0-9A-Z_")))) ": " - (? (file-name) ":" line ":" (? column ":") " ") - (message) line-end)) - :modes verilog-mode) - -(flycheck-def-option-var flycheck-ghdl-language-standard nil vhdl-ghdl - "The language standard to use in GHDL. - -The value of this variable is either a string denoting a language -standard, or nil, to use the default standard. When non-nil, -pass the language standard via the `--std' option." - :type '(choice (const :tag "Default standard" nil) - (string :tag "Language standard")) - :safe #'flycheck-string-or-nil-p - :package-version '(flycheck . "32")) -(make-variable-buffer-local 'flycheck-ghdl-language-standard) - -(flycheck-def-option-var flycheck-ghdl-workdir nil vhdl-ghdl - "The directory to use for the file library. - -The value of this variable is either a string with the directory -to use for the file library, or nil, to use the default value. -When non-nil, pass the directory via the `--workdir' option." - :type '(choice (const :tag "Default directory" nil) - (string :tag "Directory for the file library")) - :safe #'flycheck-string-or-nil-p - :package-version '(flycheck . "32")) -(make-variable-buffer-local 'flycheck-ghdl-workdir) - -(flycheck-def-option-var flycheck-ghdl-ieee-library nil vhdl-ghdl - "The standard to use for the IEEE library. - -The value of this variable is either a string denoting an ieee library -standard, or nil, to use the default standard. When non-nil, -pass the ieee library standard via the `--ieee' option." - :type '(choice (const :tag "Default standard" nil) - (const :tag "No IEEE Library" "none") - (const :tag "IEEE standard" "standard") - (const :tag "Synopsys standard" "synopsys") - (const :tag "Mentor standard" "mentor")) - :safe #'flycheck-string-or-nil-p - :package-version '(flycheck . "32")) -(make-variable-buffer-local 'flycheck-ghdl-ieee-library) - -(flycheck-define-checker vhdl-ghdl - "A VHDL syntax checker using GHDL. - -See URL `https://github.com/ghdl/ghdl'." - :command ("ghdl" - "-s" ; only do the syntax checking - (option "--std=" flycheck-ghdl-language-standard concat) - (option "--workdir=" flycheck-ghdl-workdir concat) - (option "--ieee=" flycheck-ghdl-ieee-library concat) - source) - :error-patterns - ((warning line-start (file-name) ":" line ":" column ":warning: " (message) line-end) - (error line-start (file-name) ":" line ":" column ":error: " (message) line-end)) - :modes vhdl-mode) - -(flycheck-def-option-var flycheck-xml-xmlstarlet-xsd-path nil xml-xmlstarlet - "An XSD schema to validate against." - :type '(choice (const :tag "None" nil) - (file :tag "XSD schema")) - :safe #'flycheck-string-or-nil-p - :package-version '(flycheck . "31")) - -(flycheck-define-checker xml-xmlstarlet - "A XML syntax checker and validator using the xmlstarlet utility. - -See URL `https://xmlstar.sourceforge.net/'." - ;; Validate standard input with verbose error messages, and do not dump - ;; contents to standard output - :command ("xmlstarlet" "val" "--err" "--quiet" - (option "--xsd" flycheck-xml-xmlstarlet-xsd-path) - "-") - :standard-input t - :error-patterns - ((error line-start "-:" line "." column ": " (message) line-end)) - :modes (xml-mode nxml-mode)) - -(flycheck-def-option-var flycheck-xml-xmllint-xsd-path nil xml-xmllint - "An XSD schema to validate against." - :type '(choice (const :tag "None" nil) - (file :tag "XSD schema")) - :safe #'flycheck-string-or-nil-p - :package-version '(flycheck . "31")) - -(flycheck-def-option-var flycheck-xml-xmllint-relaxng-path nil xml-xmllint - "An RELAX NG schema to validate against." - :type '(choice (const :tag "None" nil) - (file :tag "RELAX NG schema")) - :safe #'flycheck-string-or-nil-p - :package-version '(flycheck . "34")) - -(flycheck-define-checker xml-xmllint - "A XML syntax checker and validator using the xmllint utility. - -The xmllint is part of libxml2, see URL -`https://gitlab.gnome.org/GNOME/libxml2/-/wikis/home'." - :command ("xmllint" "--noout" - (option "--schema" flycheck-xml-xmllint-xsd-path) - (option "--relaxng" flycheck-xml-xmllint-relaxng-path) - "-") - :standard-input t - :error-patterns - ((error line-start "-:" line ": " (message) line-end)) - :modes (xml-mode nxml-mode)) - -(flycheck-define-checker yaml-jsyaml - "A YAML syntax checker using JS-YAML. - -See URL `https://github.com/nodeca/js-yaml'." - :command ("js-yaml") - :standard-input t - :error-patterns - ((error line-start - (or "JS-YAML" "YAMLException") ": " - (message) " at line " line ", column " column ":" - line-end) - (error line-start - (or "JS-YAML" "YAMLException") ": " - (message) " (" line ":" column ")" - line-end)) - :modes (yaml-mode yaml-ts-mode) - :next-checkers ((warning . yaml-yamllint) - (warning . cwl))) - -(flycheck-define-checker yaml-ruby - "A YAML syntax checker using Ruby's YAML parser. - -This syntax checker uses the YAML parser from Ruby's standard -library. - -See URL `https://www.ruby-doc.org/stdlib-2.0.0/libdoc/yaml/rdoc/YAML.html'." - :command ("ruby" "-ryaml" "-e" "begin; - YAML.load(STDIN); \ - rescue Exception => e; \ - STDERR.puts \"stdin:#{e}\"; \ - end") - :standard-input t - :error-patterns - ((error line-start "stdin:" (zero-or-more not-newline) ":" (message) - "at line " line " column " column line-end)) - :modes (yaml-mode yaml-ts-mode) - :next-checkers ((warning . yaml-yamllint) - (warning . cwl))) - -(flycheck-def-config-file-var flycheck-yamllintrc - yaml-yamllint - '(".yamllint" - ".yamllint.yaml" - ".yamllint.yml" - "~/.config/yamllint/config")) - -(flycheck-define-checker yaml-yamllint - "A YAML syntax checker using YAMLLint. -See URL `https://github.com/adrienverge/yamllint'." - :standard-input t - :command ("yamllint" "-f" "parsable" "-" - (config-file "-c" flycheck-yamllintrc)) - :error-patterns - ((error line-start - "stdin:" line ":" column ": [error] " (message) line-end) - (warning line-start - "stdin:" line ":" column ": [warning] " (message) line-end)) - :modes (yaml-mode yaml-ts-mode) - :next-checkers ((warning . cwl))) - -(provide 'flycheck) - -;; Local Variables: -;; coding: utf-8 -;; indent-tabs-mode: nil -;; End: - -;;; flycheck.el ends here diff --git a/elpa/gnupg/pubring.kbx b/elpa/gnupg/pubring.kbx deleted file mode 100644 index ad2d35b5f706e0335d5b5b60976a12bfc915ba39..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4169 zcma);2|SeD+sE%&j4k_?ee8@SYqn9zE@R)5?1StKJ(fs?p^WTAvdfZPBt!_2h`;P9 zOOg;-vdlY^$NT=D_wE0@&-r}rd#?N3=l;yOuJikS&jA1c4gvw-OBXF&07AQh4A&%H z#Q3<8c!5E`A};`deg!}PN1wVFu*VXx5pFeJrDZ^JE4*dx0bvCEcsu|GP5}U)W)bu`^S%`#GPG5O zGpRPWtw(%Nz5Pi|-UD`Fs&&wp&i6U+%R4nio;G@xd+FL%a<&a*nN53H1(ID>zB?Ti zo+$^bl^59pi|ikpOS8^Mjx=Spg69J_u>?_+|lJuVyi<_gNzx{*$A^T8-x_$KU7 z37S8->4!7G-qKgUqse8|of>_=Z0Jf&qDxv1ni0hreqPQ0Zsc6bh;mSf)Lw@4XmiOo z->Q&?9pSuDHpV!bre!|wu6<=hT7)&}tCd3s3lK2(*0Zq^HEI=4g3LZLu)9(^pMuj(nnMi#UMFC^e6#t$DyBKG%0*o7Lj z4?{e>W-fD^+V7An9c-Q{PPBIW8nswrK4yVRI<-7Ip*_qcDkzzU*}KcjepA-kHLCpD zfXOC}_)M;mDkGV$a%Z?d2bt6SlxPQW&ZGn z{Bz^ZIlAm3in%FybfIlg3#PH&46g-qyAHx{rNTc*o-j|PzHkWgh{|e3xe4pB;@2Spa>WxITt%TV0GC{j(Y%&fK88uh*PZE|Ol)e(bRg0#XZr zh2FC4rCqu6k1`nE7@Qj z=NvN+^mo7_0o$};-2OXD5@MFbBndf!|3i{@mjS%7BeDrIxkyH&3tLt9t0ycI6saBbNyS`zZM^V;8^{*FV$>E)m?VIX2 zr1r|Z$fuA#2O7!62N#l}g+HuL_;@I8-F!yDP%?dW0qJ@aQD~#OnQHy$`h|2+wq53i zdAlV$YR_EcOM&-lb3Y+`z9nq6kHu?+`zXnpqkZqy{}bV3PDJ&O($9 zx@ZnAnf;Ir+Ni~l$a`%H4(G^3^_uTGGraX}wWNDuU;6ZZ^5?R>LhAMLerAO&`&4Tb zT?yINLvBP`@+zl;!N=6vLp_CBoZZO0yt*sibwG6{d`!8QTeK!?^GeXi_oMb>038Sb z{VxOmo$wX^q42Sw5hw$Q3?M51cj6%`Kj7M*%0DIhcgjD}TQ)7_k-QUoTH?#3$GoXr zc2^ecbgiS>&(>s-+VBY|%m+jkkBUO$9MeqfPOZ}JDSg+7L=5XC)CJJ72^1wNO|`qr z7O3M<`uqxHDo8PAt?YZtr%Z&BjjEw^`V?X+mS#f3p8eUfjzd_Nlzy$ATha!UqK((K z=ep$f8tdt!BwlcLD~MY2a4LE;TaNS1f!92tlAUKH979;;(LUy?;>=^W)z}Nt%9y`P z+simR7rEOg@Cnvo>tchY%$aV}FO}w9{MVGPl@l(3)!2giqY-4i3Y(cJ))KECcF>E( zvX#$}^4PaRv+wAgJ%bW$bFE;QL$lfDc?ED0&J;$VSypEwy{hxWpRu|iHge~_`z$-{ zA^z{zp+@EQ1k;&X0{c5N)Epd#9! z+-bx&SIan_KT~t$-cJS(Wbk@@DUM!;e0+`LQ{$&gfn*VkG_{OD%MagCVJw_};v<(T zCVHH{Gd;{|zI4Kk7z~t_fN9RZ;aWhX8Ev>|OFs9d`G|5{XLil^)P6KFM z^3maBa?SEdmPSBS7!If?=hguL2K^ITc>qA74?qBpa-GJ)!&Nt_E$XGXy`&fNQ8PFC z2>gK)Ap{X>b^RAAlg;H$4wI9K#c+%gIq~p`B))@LeMH&l-8pYsEv{abNCSv#b5;?$ zEs5_4?HBHVB|>zJJLvBZl)uIjZf*g*)WkSl2I^Q=ahjQ26b6EVCbVckAkqt+M^e1? zm8w}c4XZi6E6Vxy&v&bZH9DQPELb(NHx-Qd=iZc-`G?+&A#6&_$JYE^fk?o_S%TR? zB;@q{5a7g`6y#+8XHz<0;TO`zFe%*ez=1xXSe<)k@Q8i^lpafca_O=y<$65#`4@t790+s=&M5o@y-FF`sY{^-CO&4VADHB zAItz*dqF8DwiUseP-VY`x1IR7=^-ro&98ryJthUnlyyOmP^Vc(d`B%H98}a?n}Jim6wJl;t66 zfm_qb`cm6ix$2$}=c%_OI$l3=`C@)RPZK052xbQpkn(#~qFH+LiIRL>1l$aSLs<#q ziTwGUkAF$nov4r#XGeul^`1Qvlrgt0{7g>5$6isBefRd&X@6O)B=Z$ zyR2?=Z`}N@mv&oboVEWNrABVN^{GyZFAUT2cE}n`PJ5#G?iS#Xduk&$-fwRW@pSG$ zbKts3uw%iKYhtM(>y|bV8OoY2ARztO!;KxK_80v>#@Gf*_vl?=sa$U&W1j`M6>0s% z0>Fvl2{l8rylVYx&GehhYU%BHJG47ci9wXs8a1iPGExl`DCF?GziiT^Of9Dh0@^5j#(T6B zr`STJJcU&FDOgciW;!i4r>ffaQgJi4q5*v1KEAPufu;me6I=udmT!IOvb;;RoJ`$z ienNL%+lb_(W(BS%mD&X#D)%Y(qc#m-a diff --git a/elpa/gnupg/trustdb.gpg b/elpa/gnupg/trustdb.gpg deleted file mode 100644 index a82143f075b574c38ba5963d645a0ced0ae2950f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1200 zcmZQfFGy!*W@Ke#VqnNDQQ~934j8$xi(`n6s>28pu)t`zjD`y+1V+;VW$6F_tK -;; Homepage: https://github.com/tarsius/llama -;; Keywords: extensions - -;; Package-Version: 1.0.3 -;; Package-Revision: v1.0.3-0-g2a89ba755b04 -;; Package-Requires: ( -;; (emacs "26.1") -;; (compat "30.1")) - -;; SPDX-License-Identifier: GPL-3.0-or-later - -;; 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 of the License, -;; 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: - -;; This package implements a macro named `##', which provides a compact way -;; to write short `lambda' expressions. - -;; The signature of the macro is (## FN &rest BODY) and it expands to a -;; `lambda' expression, which calls the function FN with the arguments BODY -;; and returns the value of that. The arguments of the `lambda' expression -;; are derived from symbols found in BODY. - -;; Each symbol from `%1' through `%9', which appears in an unquoted part -;; of BODY, specifies a mandatory argument. Each symbol from `&1' through -;; `&9', which appears in an unquoted part of BODY, specifies an optional -;; argument. The symbol `&*' specifies extra (`&rest') arguments. - -;; The shorter symbol `%' can be used instead of `%1', but using both in -;; the same expression is not allowed. Likewise `&' can be used instead -;; of `&1'. These shorthands are not recognized in function position. - -;; To support binding forms that use a vector as VARLIST (such as `-let' -;; from the `dash' package), argument symbols are also detected inside of -;; vectors. - -;; The space between `##' and FN can be omitted because `##' is read-syntax -;; for the symbol whose name is the empty string. If you prefer you can -;; place a space there anyway, and if you prefer to not use this somewhat -;; magical symbol at all, you can instead use the alternative name `llama'. - -;; Instead of: -;; -;; (lambda (a &optional _ c &rest d) -;; (foo a (bar c) d)) -;; -;; you can use this macro and write: -;; -;; (##foo %1 (bar &3) &*) -;; -;; which expands to: -;; -;; (lambda (%1 &optional _&2 &3 &rest &*) -;; (foo %1 (bar &3) &*)) - -;; Unused trailing arguments and mandatory unused arguments at the border -;; between mandatory and optional arguments are also supported: -;; -;; (##list %1 _%3 &5 _&6) -;; -;; becomes: -;; -;; (lambda (%1 _%2 _%3 &optional _&4 &5 _&6) -;; (list %1 &5)) -;; -;; Note how `_%3' and `_&6' are removed from the body, because their names -;; begin with an underscore. Also note that `_&4' is optional, unlike the -;; explicitly specified `_%3'. - -;; Consider enabling `llama-fontify-mode' to highlight `##' and its -;; special arguments. - -;;; Code: - -(require 'compat) - -;;;###autoload -(defmacro llama (fn &rest body) - "Expand to a `lambda' expression that wraps around FN and BODY. - -This macro provides a compact way to write short `lambda' expressions. -It expands to a `lambda' expression, which calls the function FN with -arguments BODY and returns its value. The arguments of the `lambda' -expression are derived from symbols found in BODY. - -Each symbol from `%1' through `%9', which appears in an unquoted part -of BODY, specifies a mandatory argument. Each symbol from `&1' through -`&9', which appears in an unquoted part of BODY, specifies an optional -argument. The symbol `&*' specifies extra (`&rest') arguments. - -The shorter symbol `%' can be used instead of `%1', but using both in -the same expression is not allowed. Likewise `&' can be used instead -of `&1'. These shorthands are not recognized in function position. - -To support binding forms that use a vector as VARLIST (such as `-let' -from the `dash' package), argument symbols are also detected inside of -vectors. - -The space between `##' and FN can be omitted because `##' is read-syntax -for the symbol whose name is the empty string. If you prefer you can -place a space there anyway, and if you prefer to not use this somewhat -magical symbol at all, you can instead use the alternative name `llama'. - -Instead of: - - (lambda (a &optional _ c &rest d) - (foo a (bar c) d)) - -you can use this macro and write: - - (##foo %1 (bar &3) &*) - -which expands to: - - (lambda (%1 &optional _&2 &3 &rest &*) - (foo %1 (bar &3) &*)) - -Unused trailing arguments and mandatory unused arguments at the border -between mandatory and optional arguments are also supported: - - (##list %1 _%3 &5 _&6) - -becomes: - - (lambda (%1 _%2 _%3 &optional _&4 &5 _&6) - (list %1 &5)) - -Note how `_%3' and `_&6' are removed from the body, because their names -begin with an underscore. Also note that `_&4' is optional, unlike the -explicitly specified `_%3'. - -Consider enabling `llama-fontify-mode' to highlight `##' and its -special arguments." - (cond ((symbolp fn)) - ((and (eq (car-safe fn) backquote-backquote-symbol) - (not body)) - (setq body (cdr fn)) - (setq fn backquote-backquote-symbol)) - ((signal 'wrong-type-argument - (list 'symbolp backquote-backquote-symbol fn)))) - (let* ((args (make-vector 10 nil)) - (body (cdr (llama--collect (cons fn body) args))) - (rest (aref args 0)) - (args (nreverse (cdr (append args nil)))) - (args (progn (while (and args (null (car args))) - (setq args (cdr args))) - args)) - (pos (length args)) - (opt nil) - (args (mapcar - (lambda (arg) - (if arg - (setq opt (string-match-p "\\`_?&" (symbol-name arg))) - (setq arg (intern (format "_%c%s" (if opt ?& ?%) pos)))) - (setq pos (1- pos)) - arg) - args)) - (opt nil) - (args (mapcar - (lambda (symbol) - (cond - ((string-match-p "\\`_?%" (symbol-name symbol)) - (when opt - (error "`%s' cannot follow optional arguments" symbol)) - (list symbol)) - (opt - (list symbol)) - ((setq opt t) - (list '&optional symbol)))) - (nreverse args)))) - `(lambda - (,@(apply #'nconc args) - ,@(and rest (list '&rest rest))) - (,fn ,@body)))) - -(defalias (intern "") 'llama) -(defalias '\#\# 'llama) - -(defconst llama--unused-argument (make-symbol "llama--unused-argument")) - -(defun llama--collect (expr args &optional fnpos backquoted unquote) - (cond - ((memq (car-safe expr) (list (intern "") 'llama 'quote)) expr) - ((and backquoted (symbolp expr)) expr) - ((and backquoted - (memq (car-safe expr) - (list backquote-unquote-symbol - backquote-splice-symbol))) - (list (car expr) - (llama--collect (cadr expr) args nil nil t))) - ((memq (car-safe expr) - (list backquote-backquote-symbol - backquote-splice-symbol)) - (list (car expr) - (llama--collect (cadr expr) args nil t))) - ((symbolp expr) - (let ((name (symbol-name expr))) - (save-match-data - (cond - ((string-match "\\`\\(_\\)?[%&]\\([1-9*]\\)?\\'" name) - (let* ((pos (match-string 2 name)) - (pos (cond ((equal pos "*") 0) - ((not pos) 1) - ((string-to-number pos)))) - (sym (aref args pos))) - (unless (and fnpos (not unquote) (memq expr '(% &))) - (when (and sym (not (equal expr sym))) - (error "`%s' and `%s' are mutually exclusive" sym expr)) - (aset args pos expr))) - (if (match-string 1 name) - llama--unused-argument - expr)) - (expr))))) - ((or (listp expr) - (vectorp expr)) - (let* ((vectorp (vectorp expr)) - (expr (if vectorp (append expr ()) expr)) - (fnpos (and (not vectorp) - (not backquoted) - (ignore-errors (length expr)))) ;proper-list-p - (ret ())) - (catch t - (while t - (let ((elt (llama--collect (car expr) args fnpos backquoted))) - (unless (eq elt llama--unused-argument) - (push elt ret))) - (setq fnpos nil) - (setq expr (cdr expr)) - (unless (and expr - (listp expr) - (not (eq (car expr) backquote-unquote-symbol))) - (throw t nil)))) - (setq ret (nreverse ret)) - (when expr - (setcdr (last ret) (llama--collect expr args nil backquoted))) - (if vectorp (vconcat ret) ret))) - (expr))) - -;;; Completion - -(define-advice elisp--expect-function-p (:around (fn pos) llama) - "Support function completion directly following `##'." - (or (and (eq (char-before pos) ?#) - (eq (char-before (- pos 1)) ?#)) - (and (eq (char-before pos) ?\s) - (eq (char-before (- pos 1)) ?#) - (eq (char-before (- pos 2)) ?#)) - (funcall fn pos))) - -(define-advice all-completions (:around (fn str table &rest rest) llama) - "Remove empty symbol from completion results if originating from `llama'. - -`##' is the notation for the symbol whose name is the empty string. - (intern \"\") => ## - (symbol-name \\='##) => \"\" - -The `llama' package uses `##' as the name of a macro, which allows -it to be used akin to syntax, without actually being new syntax. -\(`describe-function' won't let you select `##', but because that is an -alias for `llama', you can access the documentation under that name.) - -This advice prevents the empty string from being offered as a completion -candidate when `obarray' or a completion table that internally uses -that is used as TABLE." - (let ((result (apply fn str table rest))) - (if (and (eq obarray table) (equal str "")) - (delete "" result) - result))) - -;;; Fontification - -(defgroup llama () - "Compact syntax for short lambda." - :group 'extensions - :group 'faces - :group 'lisp) - -(defface llama-\#\#-macro '((t :inherit font-lock-function-call-face)) - "Face used for the name of the `##' macro.") - -(defface llama-llama-macro '((t :inherit font-lock-keyword-face)) - "Face used for the name of the `llama' macro.") - -(defface llama-mandatory-argument '((t :inherit font-lock-variable-use-face)) - "Face used for mandatory arguments `%1' through `%9' and `%'.") - -(defface llama-optional-argument '((t :inherit font-lock-type-face)) - "Face used for optional arguments `&1' through `&9', `&' and `&*'.") - -(defface llama-deleted-argument - `((((supports :box t)) - :box ( :line-width ,(if (>= emacs-major-version 28) (cons -1 -1) -1) - :color "red" - :style nil)) - (((supports :underline t)) - :underline "red") - (t - :inherit font-lock-warning-face)) - "Face used for deleted arguments `_%1'...`_%9', `_&1'...`_&9' and `_&*'. -This face is used in addition to one of llama's other argument faces. -Unlike implicit unused arguments (which do not appear in the function -body), these arguments are deleted from the function body during macro -expansion, and the looks of this face should hint at that.") - -(defconst llama-font-lock-keywords-28 - '(("(\\(##\\)" 1 'llama-\#\#-macro) - ("(\\(llama\\)\\_>" 1 'llama-llama-macro) - ("\\_<\\(?:_?%[1-9]?\\)\\_>" - 0 (llama--maybe-face 'llama-mandatory-argument)) - ("\\_<\\(?:_?&[1-9*]?\\)\\_>" - 0 (llama--maybe-face 'llama-optional-argument)) - ("\\_<\\(?:_\\(?:%[1-9]?\\|&[1-9*]?\\)\\)\\_>" - 0 'llama-deleted-argument prepend))) - -(defconst llama-font-lock-keywords-29 - `(("\\_<\\(&[1-9*]?\\)\\_>" 1 'default) - (,(apply-partially #'llama--match-and-fontify "(\\(##\\)") - 1 'llama-\#\#-macro) - (,(apply-partially #'llama--match-and-fontify "(\\(llama\\_>\\)") - 1 'llama-llama-macro))) - -(defvar llama-font-lock-keywords - (if (fboundp 'read-positioning-symbols) - llama-font-lock-keywords-29 - llama-font-lock-keywords-28)) - -(defun llama--maybe-face (face) - (and (not (and (member (match-string 0) '("%" "&")) - (and-let* ((beg (ignore-errors - (scan-lists (match-beginning 0) -1 1)))) - (string-match-p "\\`\\(##\\|llama\\_>\\)?[\s\t\n\r]*\\'" - (buffer-substring-no-properties - (1+ beg) (match-beginning 0)))))) - face)) - -(defun llama--match-and-fontify (re end) - (static-if (fboundp 'bare-symbol) - (and (re-search-forward re end t) - (prog1 t - (save-excursion - (goto-char (match-beginning 0)) - (when-let ((_(save-match-data (not (nth 8 (syntax-ppss))))) - (expr (ignore-errors - (read-positioning-symbols (current-buffer))))) - (put-text-property (match-beginning 0) (point) - 'font-lock-multiline t) - (llama--fontify (cdr expr) nil nil t))))) - (list re end))) ; Silence compiler. - -(defun llama--fontify (expr &optional fnpos backquoted top) - (static-if (fboundp 'bare-symbol) - (cond - ((null expr) expr) - ((eq (car-safe expr) 'quote)) - ((eq (ignore-errors (bare-symbol (car-safe expr))) 'quote)) - ((and (memq (ignore-errors (bare-symbol (car-safe expr))) - (list (intern "") 'llama)) - (not top))) - ((and backquoted (symbol-with-pos-p expr))) - ((and backquoted - (memq (car-safe expr) - (list backquote-unquote-symbol - backquote-splice-symbol))) - (llama--fontify expr)) - ((symbol-with-pos-p expr) - (save-match-data - (when-let* - ((name (symbol-name (bare-symbol expr))) - (face (cond - ((and (string-match - "\\_<\\(?:\\(_\\)?%\\([1-9]\\)?\\)\\_>" name) - (or (not fnpos) (match-end 2))) - 'llama-mandatory-argument) - ((and (string-match - "\\_<\\(?:\\(_\\)?&\\([1-9*]\\)?\\)\\_>" name) - (or (not fnpos) (match-end 2))) - 'llama-optional-argument)))) - (when (match-end 1) - (setq face (list 'llama-deleted-argument face))) - (let ((beg (symbol-with-pos-pos expr))) - (put-text-property - beg (save-excursion (goto-char beg) (forward-symbol 1)) - 'face face))))) - ((or (listp expr) - (vectorp expr)) - (let* ((vectorp (vectorp expr)) - (expr (if vectorp (append expr ()) expr)) - (fnpos (and (not vectorp) - (not backquoted) - (ignore-errors (length expr))))) - (catch t - (while t - (cond ((eq (car expr) backquote-backquote-symbol) - (setq expr (cdr expr)) - (llama--fontify (car expr) t t)) - ((llama--fontify (car expr) fnpos backquoted))) - (setq fnpos nil) - (setq expr (cdr expr)) - (unless (and expr - (listp expr) - (not (eq (car expr) backquote-unquote-symbol))) - (throw t nil)))) - (when expr - (llama--fontify expr fnpos)))))) - (list expr fnpos backquoted top)) ; Silence compiler. - -(defvar llama-fontify-mode-lighter nil) - -;;;###autoload -(define-minor-mode llama-fontify-mode - "In Emacs Lisp mode, highlight the `##' macro and its special arguments." - :lighter llama-fontify-mode-lighter - :global t - (cond - (llama-fontify-mode - (advice-add 'lisp--el-match-keyword :override - #'lisp--el-match-keyword@llama '((depth . -80))) - (advice-add 'elisp-mode-syntax-propertize :override - #'elisp-mode-syntax-propertize@llama) - (add-hook 'emacs-lisp-mode-hook #'llama--add-font-lock-keywords)) - (t - (advice-remove 'lisp--el-match-keyword - #'lisp--el-match-keyword@llama) - (advice-remove 'elisp-mode-syntax-propertize - #'elisp-mode-syntax-propertize@llama) - (remove-hook 'emacs-lisp-mode-hook #'llama--add-font-lock-keywords))) - (dolist (buffer (buffer-list)) - (with-current-buffer buffer - (when (derived-mode-p 'emacs-lisp-mode) - (if llama-fontify-mode - (font-lock-add-keywords nil llama-font-lock-keywords) - (font-lock-remove-keywords nil llama-font-lock-keywords)) - (font-lock-flush))))) - -(defun llama--add-font-lock-keywords () - (font-lock-add-keywords nil llama-font-lock-keywords)) - -(defun lisp--el-match-keyword@llama (limit) - "Highlight symbols following \"(##\" the same as if they followed \"(\"." - (catch 'found - (while (re-search-forward - (concat "(\\(?:## ?\\)?\\(" - (static-if (get 'lisp-mode-symbol 'rx-definition) ;>= 29.1 - (rx lisp-mode-symbol) - lisp-mode-symbol-regexp) - "\\)\\_>") - limit t) - (let ((sym (intern-soft (match-string 1)))) - (when (and (or (special-form-p sym) - (macrop sym) - (and (bound-and-true-p morlock-mode) - ;; Same as in advice of `morlock' package. - (get sym 'morlock-font-lock-keyword))) - (not (get sym 'no-font-lock-keyword)) - (static-if (fboundp 'lisp--el-funcall-position-p) ;>= 28.1 - (lisp--el-funcall-position-p (match-beginning 0)) - (not (lisp--el-non-funcall-position-p - (match-beginning 0))))) - (throw 'found t)))))) - -(defun elisp-mode-syntax-propertize@llama (start end) - ;; Synced with Emacs up to 6b9510d94f814cacf43793dce76250b5f7e6f64a. - "Highlight `##' as the symbol which it is." - (goto-char start) - (let ((case-fold-search nil)) - (funcall - (syntax-propertize-rules - ;; Empty symbol. - ;; {{ Comment out to prevent the `##' from becoming part of - ;; the following symbol when there is no space in between. - ;; ("##" (0 (unless (nth 8 (syntax-ppss)) - ;; (string-to-syntax "_")))) - ;; }} - ;; {{ As for other symbols, use `font-lock-constant-face' in - ;; docstrings and comments. - ("##" (0 (when (nth 8 (syntax-ppss)) - (string-to-syntax "_")))) - ;; }} - ;; {{ Preserve this part, even though it is absent from - ;; this function in 29.1; backporting it by association. - ;; Prevent the @ from becoming part of a following symbol. - (",@" (0 (unless (nth 8 (syntax-ppss)) - (string-to-syntax "'")))) - ;; }} - ;; Unicode character names. (The longest name is 88 characters - ;; long.) - ("\\?\\\\N{[-A-Za-z0-9 ]\\{,100\\}}" - (0 (unless (nth 8 (syntax-ppss)) - (string-to-syntax "_")))) - ((rx "#" (or (seq (group-n 1 "&" (+ digit)) ?\") ; Bool-vector. - (seq (group-n 1 "s") "(") ; Record. - (seq (group-n 1 (+ "^")) "["))) ; Char-table. - (1 (unless (save-excursion (nth 8 (syntax-ppss (match-beginning 0)))) - (string-to-syntax "'"))))) - start end))) - -;;; Partial applications - -(defun llama--left-apply-partially (fn &rest args) - "Return a function that is a partial application of FN to ARGS. - -ARGS is a list of the first N arguments to pass to FN. The result -is a new function which does the same as FN, except that the first N -arguments are fixed at the values with which this function was called. - -See also `llama--right-apply-partially', which instead fixes the last -N arguments. - -These functions are intended to be used using the names `partial' and -`rpartial'. To be able to use these shorthands in a file, you must set -the file-local value of `read-symbols-shorthands', which was added in -Emacs 28.1. For an example see the end of file \"llama.el\". - -This is an alternative to `apply-partially', whose name is too long." - (declare (pure t) (side-effect-free error-free)) - (lambda (&rest args2) - (apply fn (append args args2)))) - -(defun llama--right-apply-partially (fn &rest args) - "Return a function that is a right partial application of FN to ARGS. - -ARGS is a list of the last N arguments to pass to FN. The result -is a new function which does the same as FN, except that the last N -arguments are fixed at the values with which this function was called. - -See also `llama--left-apply-partially', which instead fixes the first -N arguments. - -These functions are intended to be used using the names `rpartial' and -`partial'. To be able to use these shorthands in a file, you must set -the file-local value of `read-symbols-shorthands', which was added in -Emacs 28.1. For an example see the end of file \"llama.el\"." - (declare (pure t) (side-effect-free error-free)) - (lambda (&rest args2) - (apply fn (append args2 args)))) - -;; An example of how one would use these functions: -;; -;; (list (funcall (partial (lambda (a b) (list a b)) 'fixed) 'after) -;; (funcall (rpartial (lambda (a b) (list a b)) 'fixed) 'before)) - -;; An example of the configuration that is necessary to enable this: -;; -;; Local Variables: -;; indent-tabs-mode: nil -;; read-symbol-shorthands: ( -;; ("partial" . "llama--left-apply-partially") -;; ("rpartial" . "llama--right-apply-partially")) -;; End: -;; -;; Do not set `read-symbol-shorthands' in the ".dir-locals.el" -;; file, because that does not work for uncompiled libraries. - -(provide 'llama) - -;;; llama.el ends here diff --git a/elpa/mmm-mode-0.5.11/dir b/elpa/mmm-mode-0.5.11/dir deleted file mode 100644 index c3d4b47..0000000 --- a/elpa/mmm-mode-0.5.11/dir +++ /dev/null @@ -1,18 +0,0 @@ -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, "H" 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: - -GNU Emacs Lisp -* MMM-Mode: (mmm). Multiple Major Modes for Emacs diff --git a/elpa/mmm-mode-0.5.11/mmm-auto.el b/elpa/mmm-mode-0.5.11/mmm-auto.el deleted file mode 100644 index 7a42d99..0000000 --- a/elpa/mmm-mode-0.5.11/mmm-auto.el +++ /dev/null @@ -1,178 +0,0 @@ -;;; mmm-auto.el --- loading and enabling MMM Mode automatically -*- lexical-binding: t; -*- - -;; Copyright (C) 2000-2004, 2012, 2013, 2018, 2022 Free Software Foundation, Inc. - -;; Author: Michael Abraham Shulman - -;;{{{ GPL - -;; 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 2, 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 GNU Emacs; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. - -;;}}} - -;;; Commentary: - -;; This file contains functions and hooks to load and enable MMM Mode -;; automatically. It sets up autoloads for the main MMM Mode functions -;; and interactive commands, and also sets up MMM Global Mode. - -;;{{{ Comments on MMM Global Mode - -;; This is a kludge borrowed from `global-font-lock-mode'. The idea -;; is the same: we have a function (here `mmm-mode-on-maybe') that we -;; want to be run whenever a major mode starts. Unfortunately, there -;; is no hook (like, say `major-mode-hook') that all major modes run -;; when they are finished. `post-command-hook', however, is run after -;; *every* command, so we do our work in there. (Actually, using -;; `post-command-hook' is even better than being run by major mode -;; functions, since it is run after all local variables and text are -;; loaded, which may not be true in certain cases for the other.) - -;; FIXME: There's now after-change-major-mode-hook which should DTRT. - -;; In order to do this magic, we rely on the fact that there *is* a -;; hook that all major modes run when *beginning* their work. They -;; call `kill-all-local-variables' (unless they are broken), which in -;; turn runs `change-major-mode-hook'. So we add a function to *that* -;; hook which saves the current buffer and temporarily adds a function -;; to `post-command-hook' which processes that buffer. - -;; Actually, in the interests of generality, what that function does -;; is run the hook `mmm-major-mode-hook'. Our desired function -;; `mmm-mode-on-maybe' is then added to that hook. This way, if the -;; user wants to run something else on every major mode, they can just -;; add it to `mmm-major-mode-hook' and take advantage of this hack. - -;;}}} - -;;; Code: - -(require 'mmm-vars) - -;;{{{ Autoload Submode Classes - -(defvar mmm-autoloaded-classes - '((mason "mmm-mason" nil) - (myghty "mmm-myghty" nil) - (html-css "mmm-sample" nil) - (html-js "mmm-sample" nil) - (here-doc "mmm-sample" nil) - (sh-here-doc "mmm-sample" nil) - (embperl "mmm-sample" nil) - (eperl "mmm-sample" nil) - (jsp "mmm-sample" nil) - (file-variables "mmm-sample" nil) - (rpm-sh "mmm-rpm" t) - (rpm "mmm-rpm" nil) - (cweb "mmm-cweb" nil) - (sgml-dtd "mmm-sample" nil) - (noweb "mmm-noweb" nil) - (html-php "mmm-sample" nil) - ) - "Alist of submode classes autoloaded from files. -Elements look like \(CLASS FILE PRIVATE) where CLASS is a submode -class symbol, FILE is a string suitable for passing to `load', and -PRIVATE is non-nil if the class is invisible to the user. Classes can -be added to this list with `mmm-autoload-class'.") - -(defun mmm-autoload-class (class file &optional private) - "Autoload submode class CLASS from file FILE. -PRIVATE, if non-nil, means the class is user-invisible. In general, -private classes need not be autoloaded, since they will usually be -invoked by a public class in the same file." - ;; Don't autoload already defined classes - (unless (assq class mmm-classes-alist) - (add-to-list 'mmm-autoloaded-classes - (list class file private)))) - -(defun mmm-autoload-class-private-p (autoload-class-entry) - "Return t if AUTOLOAD-CLASS-ENTRY is marked as private. -AUTOLOAD-CLASS-ENTRY shall be an entry of the variable -`mmm-autoloaded-classes'." - (nth 2 autoload-class-entry)) - -;;}}} -;;{{{ Autoload Functions - -;; To shut up the byte compiler. -(eval-and-compile - (autoload 'mmm-mode-on "mmm-mode" "Turn on MMM Mode. See `mmm-mode'.") - (autoload 'mmm-mode-off "mmm-mode" "Turn off MMM Mode. See `mmm-mode'.") - (autoload 'mmm-update-font-lock-buffer "mmm-region") - (autoload 'mmm-ensure-fboundp "mmm-utils") - (autoload 'mmm-mode "mmm-mode" - "Minor mode to allow multiple major modes in one buffer. -Without ARG, toggle MMM Mode. With ARG, turn MMM Mode on iff ARG is -positive and off otherwise." t)) - -;; These may actually be used. -(autoload 'mmm-ify-by-class "mmm-cmds" "" t) -(autoload 'mmm-ify-by-regexp "mmm-cmds" "" t) -(autoload 'mmm-ify-region "mmm-cmds" "" t) -(autoload 'mmm-parse-buffer "mmm-cmds" "" t) -(autoload 'mmm-parse-region "mmm-cmds" "" t) -(autoload 'mmm-parse-block "mmm-cmds" "" t) -(autoload 'mmm-clear-current-region "mmm-cmds" "" t) -(autoload 'mmm-reparse-current-region "mmm-cmds" "" t) -(autoload 'mmm-end-current-region "mmm-cmds" "" t) -(autoload 'mmm-insertion-help "mmm-cmds" "" t) -(autoload 'mmm-insert-region "mmm-cmds" "" t) - -;;}}} -;;{{{ MMM Global Mode - -(defvar mmm-changed-buffers-list () - "Buffers that need to be checked for running the major mode hook.") - -(defun mmm-major-mode-change () - "Add this buffer to `mmm-changed-buffers-list' for checking. -When the current command is over, MMM Mode will be turned on in this -buffer depending on the value of `mmm-global-mode'. Actually, -everything in `mmm-major-mode-hook' will be run." - (and (boundp 'mmm-mode) - mmm-mode - (mmm-mode-off)) - (add-to-list 'mmm-changed-buffers-list (current-buffer)) - (add-hook 'post-command-hook #'mmm-check-changed-buffers)) - -(add-hook 'change-major-mode-hook #'mmm-major-mode-change) - -(defun mmm-check-changed-buffers () - "Run major mode hook for the buffers in `mmm-changed-buffers-list'." - (remove-hook 'post-command-hook #'mmm-check-changed-buffers) - (dolist (buffer mmm-changed-buffers-list) - (when (buffer-live-p buffer) - (with-current-buffer buffer - (mmm-run-major-mode-hook)))) - (setq mmm-changed-buffers-list '())) - -(defun mmm-mode-on-maybe () - "Conditionally turn on MMM Mode. -Turn on MMM Mode if `mmm-global-mode' is non-nil and there are classes -to apply, or always if `mmm-global-mode' is t." - (cond ((eq mmm-global-mode t) (mmm-mode-on)) - ((not mmm-global-mode)) - ((mmm-get-all-classes nil) (mmm-mode-on))) - (when mmm-mode - (mmm-update-font-lock-buffer))) - -(add-hook 'mmm-major-mode-hook #'mmm-mode-on-maybe) - -;;}}} - -(provide 'mmm-auto) - -;;; mmm-auto.el ends here diff --git a/elpa/mmm-mode-0.5.11/mmm-class.el b/elpa/mmm-mode-0.5.11/mmm-class.el deleted file mode 100644 index f2fb14f..0000000 --- a/elpa/mmm-mode-0.5.11/mmm-class.el +++ /dev/null @@ -1,339 +0,0 @@ -;;; mmm-class.el --- MMM submode class variables and functions -*- lexical-binding: t; -*- - -;; Copyright (C) 2000-2004, 2011-2015, 2018 Free Software Foundation, Inc. - -;; Author: Michael Abraham Shulman - -;;{{{ GPL - -;; 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 2, 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 GNU Emacs; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. - -;;}}} - -;;; Commentary: - -;; This file contains variable and function definitions for -;; manipulating and applying MMM submode classes. See `mmm-vars.el' -;; for variables that list classes. - -;;; Code: - -(require 'cl-lib) -(require 'mmm-vars) -(require 'mmm-region) - -;;; CLASS SPECIFICATIONS -;;{{{ Get Class Specifications - -(defun mmm-get-class-spec (class) - "Get the class specification for CLASS. -CLASS can be either a symbol to look up in `mmm-classes-alist' or a -class specifier itself." - (cond ((symbolp class) ; A symbol must be looked up - (or (cdr (assq class mmm-classes-alist)) - (and (cadr (assq class mmm-autoloaded-classes)) - (load (cadr (assq class mmm-autoloaded-classes))) - (cdr (assq class mmm-classes-alist))) - (signal 'mmm-invalid-submode-class (list class)))) - ((listp class) ; A list must be a class spec - class) - (t (signal 'mmm-invalid-submode-class (list class))))) - -;;}}} -;;{{{ Get and Set Class Parameters - -(defun mmm-get-class-parameter (class param) - "Get the value of the parameter PARAM for CLASS, or nil if none." - (cadr (member param (mmm-get-class-spec class)))) - -(defun mmm-set-class-parameter (class param value) - "Set the value of the parameter PARAM for CLASS to VALUE. -Creates a new parameter if one is not present." - (let* ((spec (mmm-get-class-spec class)) - (current (member param spec))) - (if current - (setcar (cdr current) value) - (nconc spec (list param value))))) - -;;}}} -;;{{{ Apply Classes - -(cl-defun mmm-apply-class - (class &optional (start (point-min)) (stop (point-max)) face) - "Apply the submode class CLASS from START to STOP in FACE. -If FACE is nil, the face for CLASS is used, or the default face if -none is specified by CLASS." - ;; The "special" class t means do nothing. It is used to turn on - ;; MMM Mode without applying any classes. - (unless (eq class t) - (apply #'mmm-ify :start start :stop stop - (append (mmm-get-class-spec class) - (list :face face))) - (mmm-run-class-hook class) - ;; Hack in case class hook sets mmm-buffer-mode-display-name etc. - (mmm-set-mode-line))) - -(cl-defun mmm-apply-classes - (classes &key (start (point-min)) (stop (point-max)) face) - "Apply all submode classes in CLASSES, in order. -All classes are applied regardless of any errors that may occur in -other classes. If any errors occur, `mmm-apply-classes' exits with an -error once all classes have been applied. -START, STOP, and FACE is passed to `mmm-apply-class' for each class." - (let (invalid-classes) - (dolist (class classes) - (condition-case err - (mmm-apply-class class start stop face) - (mmm-invalid-submode-class - ;; Save the name of the invalid class, so we can report them - ;; all together at the end. - (cl-pushnew (cl-second err) invalid-classes :test #'equal)))) - (when invalid-classes - (signal 'mmm-invalid-submode-class invalid-classes)))) - -;;}}} -;;{{{ Apply All Classes - -;; FIXME: This should be called by syntax-propertize-function, -;; not vice versa. -(cl-defun mmm-apply-all (&key (start (point-min)) (stop (point-max))) - "MMM-ify from START to STOP by all submode classes. -The classes come from mode/ext, `mmm-classes', `mmm-global-classes', -and interactive history." - (mmm-clear-overlays start stop 'strict) - (mmm-apply-classes (mmm-get-all-classes t) :start start :stop stop) - (mmm-update-submode-region) - ;; Try to continue supporting XEmacs for a while. - (when (fboundp 'syntax-propertize) - (syntax-ppss-flush-cache start) - (syntax-propertize stop)) - (mmm-refontify-maybe start stop)) - -;;}}} - -;;; BUFFER SCANNING -;;{{{ Scan for Regions - -(cl-defun mmm-ify - (&rest all &key classes handler - ;; Many args are marked as "unused" below, but that's only - ;; because they're used via `all'. - submode _match-submode - (start (point-min)) (stop (point-max)) - front back _save-matches - ((case-fold-search case-fold-search-arg) t) - (beg-sticky (not (number-or-marker-p front))) - (end-sticky (not (number-or-marker-p back))) - _include-front _include-back - (front-offset 0) (back-offset 0) - (front-delim nil) (back-delim nil) - (delimiter-mode mmm-delimiter-mode) - front-face back-face - _front-verify _back-verify - _front-form _back-form - creation-hook - face _match-face - _save-name _match-name - ;; FIXME: Since those args's arent' used directly (only passed down - ;; via `all'), these default values aren't obeyed! - (_front-match 0) (_back-match 0) - _end-not-begin - ;;insert private - &allow-other-keys - ) - "Create submode regions from START to STOP according to arguments. -If CLASSES is supplied, it must be a list of valid CLASSes. Otherwise, -the rest of the arguments are for an actual class being applied. See -`mmm-classes-alist' for information on what they all mean." - (let ((case-fold-search case-fold-search-arg)) - ;; Make sure we get the default values in the `all' list. - (setq all (append - all - (list :start start :stop stop - :beg-sticky beg-sticky :end-sticky end-sticky - :front-offset front-offset :back-offset back-offset - :front-delim front-delim :back-delim back-delim - :front-match 0 :back-match 0 - ))) - (cond - ;; If we have a class list, apply them all. - (classes - (mmm-apply-classes classes :start start :stop stop :face face)) - ;; Otherwise, apply this class. - ;; If we have a handler, call it. - (handler - (apply handler all)) - ;; Otherwise, we search from START to STOP for submode regions, - ;; continuining over errors, until we don't find any more. If FRONT - ;; and BACK are number-or-markers, this should only execute once. - (t - (mmm-save-all - (goto-char start) - (cl-loop for (beg end front-pos back-pos matched-front matched-back - matched-submode matched-face matched-name - invalid-resume ok-resume) = - (apply #'mmm-match-region :start (point) all) - while beg - if end ; match-submode, if present, succeeded. - do - (condition-case nil - (progn - (mmm-make-region - (or matched-submode submode) beg end - :face (or matched-face face) - :front front-pos :back back-pos - :evaporation 'front - :match-front matched-front :match-back matched-back - :beg-sticky beg-sticky :end-sticky end-sticky - :name matched-name - :delimiter-mode delimiter-mode - :front-face front-face :back-face back-face - :creation-hook creation-hook - ) - (goto-char ok-resume)) - ;; If our region is invalid, go back to the end of the - ;; front match and continue on. - (mmm-error (goto-char invalid-resume))) - ;; If match-submode was unable to find a match, go back to - ;; the end of the front match and continue on. - else do (goto-char invalid-resume) - )))))) - -;;}}} -;;{{{ Match Regions - -(cl-defun mmm-match-region - (&key start stop front back front-verify back-verify - front-delim back-delim - include-front include-back front-offset back-offset - front-form back-form save-matches match-submode match-face - front-match back-match end-not-begin - save-name match-name - &allow-other-keys) - "Find the first valid region between point and STOP. -Return \(BEG END FRONT-POS BACK-POS FRONT-FORM BACK-FORM SUBMODE FACE -NAME INVALID-RESUME OK-RESUME) specifying the region. See -`mmm-match-and-verify' for the valid values of FRONT and BACK -\(markers, regexps, or functions). A nil value for END means that -MATCH-SUBMODE failed to find a valid submode. INVALID-RESUME is the -point at which the search should continue if the region is invalid, -and OK-RESUME if the region is valid." - (when (mmm-match-and-verify front start stop front-verify) - (let ((beg (mmm-match->point include-front front-offset front-match)) - (front-pos (if front-delim - (mmm-match->point t front-delim front-match) - nil)) - (invalid-resume (match-end front-match)) - (front-form (mmm-get-form front-form))) - (let ((submode (if match-submode - (condition-case nil - (mmm-save-all - (funcall match-submode front-form)) - (mmm-no-matching-submode - (cl-return-from - mmm-match-region - (cl-values beg nil nil nil nil nil nil nil nil - invalid-resume nil)))) - nil)) - (name (cond ((functionp match-name) - (mmm-save-all (funcall match-name front-form))) - ((stringp match-name) - (if save-name - (mmm-format-matches match-name) - match-name)))) - (face (cond ((functionp match-face) - (mmm-save-all - (funcall match-face front-form))) - (match-face - (cdr (assoc front-form match-face)))))) - (when (mmm-match-and-verify - (if save-matches - (mmm-format-matches back) - back) - beg stop back-verify) - (let* ((end (mmm-match->point (not include-back) - back-offset back-match)) - (back-pos (if back-delim - (mmm-match->point nil back-delim back-match) - nil)) - (back-form (mmm-get-form back-form)) - (ok-resume (if end-not-begin - (match-end back-match) - end))) - (cl-values beg end front-pos back-pos front-form back-form - submode face name - invalid-resume ok-resume))))))) - -(defun mmm-match->point (beginp offset match) - "Find a point of starting or stopping from the match data. -If BEGINP, start at \(match-beginning MATCH), else \(match-end MATCH), -and move OFFSET. Handles all values of OFFSET--see `mmm-classes-alist'." - (save-excursion - (goto-char (if beginp - (match-beginning match) - (match-end match))) - (dolist (spec (if (listp offset) offset (list offset))) - (if (numberp spec) - (forward-char (or spec 0)) - (funcall spec))) - (point))) - -(defun mmm-match-and-verify (pos start stop &optional verify) - "Find first match for POS between point and STOP satisfying VERIFY. -Return non-nil if a match was found, and set match data. POS can be a -number-or-marker, a regexp, or a function. - -If POS is a number-or-marker between START and STOP, it is used as-is. -If it is a string, it is searched for as a regexp until VERIFY returns -non-nil. If it is a function, it is called with argument STOP and must -return non-nil if a match is found, and set the match data. Note that -VERIFY is ignored unless POS is a regexp." - (cond - ;; A marker can be used as-is, but only if it's in bounds. - ((and (number-or-marker-p pos) (>= pos start) (<= pos stop)) - (goto-char pos) - (looking-at "")) ; Set the match data - ;; Strings are searched for as regexps. - ((stringp pos) - (cl-loop always (re-search-forward pos stop 'limit) - until (or (not verify) (mmm-save-all (funcall verify))))) - ;; Otherwise it must be a function. - ((functionp pos) - (funcall pos stop)))) - -;;}}} -;;{{{ Get Delimiter Forms - -(defun mmm-get-form (form) - "Return the delimiter form specified by FORM. -If FORM is nil, call `mmm-default-get-form'. If FORM is a string, -return it. If FORM is a function, call it. If FORM is a list, return -its `car' \(usually in this case, FORM is a one-element list -containing a function to be used as the delimiter form." - (cond ((stringp form) form) - ((not form) (mmm-default-get-form)) - ((functionp form) (mmm-save-all (funcall form))) - ((listp form) (car form)))) - -(defun mmm-default-get-form () - "Get the default delimiter form." - (regexp-quote (match-string 0))) - -;;}}} - -(provide 'mmm-class) - -;;; mmm-class.el ends here diff --git a/elpa/mmm-mode-0.5.11/mmm-cmds.el b/elpa/mmm-mode-0.5.11/mmm-cmds.el deleted file mode 100644 index 894e6cd..0000000 --- a/elpa/mmm-mode-0.5.11/mmm-cmds.el +++ /dev/null @@ -1,442 +0,0 @@ -;;; mmm-cmds.el --- MMM Mode interactive commands and keymap -*- lexical-binding: t; -*- - -;; Copyright (C) 2000-2003, 2011-2013, 2018 Free Software Foundation, Inc. - -;; Author: Michael Abraham Shulman - -;;{{{ GPL - -;; 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 2, 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 GNU Emacs; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. - -;;}}} - -;;; Commentary: - -;; This file contains the interactive commands for MMM Mode. - -;;; Code: - -(require 'cl-lib) -(require 'font-lock) -(require 'mmm-compat) -(require 'mmm-vars) -(require 'mmm-class) - -;; APPLYING CLASSES -;;{{{ Applying Predefined Classes - -(defun mmm-ify-by-class (class) - "Add submode regions according to an existing submode CLASS." - (interactive - (list (intern - (completing-read - "Submode Class: " - (cl-remove-duplicates - (mapcar (lambda (spec) (list (symbol-name (car spec)))) - (append - (cl-remove-if (lambda (spec) (plist-get (cdr spec) :private)) - mmm-classes-alist) - (cl-remove-if #'mmm-autoload-class-private-p - mmm-autoloaded-classes))) - :test #'equal) - nil t)))) - (unless (eq class (intern "")) - (mmm-apply-class class) - (mmm-add-to-history class) - (mmm-update-font-lock-buffer))) - -;;}}} -;;{{{ Applying by the Region - -(defun mmm-ify-region (submode front back) - "Add a submode region for SUBMODE coinciding with current region. -FRONT and BACK should be MMM delimiters." - (interactive "aSubmode: \nr") - (mmm-ify :submode submode :front front :back back) - (setq front (mmm-make-marker front t nil) - back (mmm-make-marker back nil nil)) - (mmm-add-to-history `(:submode ,submode :front ,front :back ,back)) - (mmm-enable-font-lock submode)) - -;;}}} -;;{{{ Applying Simple Regexps - -(defun mmm-ify-by-regexp - (submode front front-offset back back-offset save-matches) - "Add SUBMODE regions to the buffer delimited by FRONT and BACK. -With prefix argument, prompts for all additional keywords arguments. -See `mmm-classes-alist'." - (interactive "aSubmode: -sFront Regexp: -nOffset from Front Regexp: -sBack Regexp: -nOffset from Back Regexp: -nNumber of matched substrings to save: ") - (let ((args (mmm-save-keywords submode front back front-offset - back-offset save-matches))) - (apply #'mmm-ify args) - (mmm-add-to-history args)) - (mmm-enable-font-lock submode)) - -;;}}} - -;; EDITING WITH REGIONS -;;{{{ Re-parsing Areas - -(defun mmm-parse-buffer () - "Re-apply all applicable submode classes to current buffer. -Clears all current submode regions, reapplies all past interactive -mmm-ification, and applies `mmm-classes' and mode-extension classes." - (interactive) - (message "MMM-ifying buffer...") - (mmm-apply-all) - (message "MMM-ifying buffer...done")) - -(defun mmm-parse-region (start stop) - "Re-apply all applicable submode classes between START and STOP. -Clears all current submode regions, reapplies all past interactive -mmm-ification, and applies `mmm-classes' and mode-extension classes." - (interactive "r") - (message "MMM-ifying region...") - (mmm-apply-all :start start :stop stop) - (message "MMM-ifying region...done")) - -(defun mmm-parse-block (&optional lines) - "Re-parse LINES lines before and after point \(default 1). -Clears all current submode regions, reapplies all past interactive -mmm-ification, and applies `mmm-classes' and mode-extension classes. - -This command is intended for use when you have just typed what should -be the delimiters of a submode region and you want to create the -region. However, you may want to look into the various types of -delimiter auto-insertion that MMM Mode provides. See, for example, -`mmm-insert-region'." - (interactive "p") - (message "MMM-ifying block...") - (cl-destructuring-bind (start stop) (mmm-get-block lines) - (when (< start stop) - (mmm-apply-all :start start :stop stop))) - (message "MMM-ifying block...done")) - -(defun mmm-get-block (lines) - "Return a region spanning LINES before and after point." - (list (pos-bol (- 1 lines)) - (pos-eol (1+ lines)))) - -;;}}} -;;{{{ Reparse Current Region - -(defun mmm-reparse-current-region () - "Clear and reparse the area of the current submode region. -Use this command if a submode region's boundaries have become wrong." - (interactive) - (let ((ovl (mmm-overlay-at (point) 'all))) - (when ovl - (let ((beg (save-excursion - (goto-char (mmm-front-start ovl)) - (forward-line -1) - (point))) - (end (save-excursion - (goto-char (mmm-back-end ovl)) - (forward-line 1) - (point)))) - (mmm-parse-region beg end))))) - -;;}}} -;;{{{ Clear Submode Regions - -;; See also `mmm-clear-history' which is interactive. - -(defun mmm-clear-current-region () - "Deletes the submode region point is currently in, if any." - (interactive) - (delete-overlay (mmm-overlay-at (point) 'all))) - -(defun mmm-clear-regions (start stop) - "Deletes all submode regions from START to STOP." - (interactive "r") - (mmm-clear-overlays start stop)) - -(defun mmm-clear-all-regions () - "Deletes all submode regions in the current buffer." - (interactive) - (mmm-clear-overlays)) - -;;}}} -;;{{{ End Current Region - -(cl-defun mmm-end-current-region (&optional arg) - "End current submode region. -If ARG is nil, end it at the most appropriate place, usually its -current back boundary. If ARG is non-nil, end it at point. If the -current region is correctly bounded, the first does nothing, but the -second deletes that delimiter as well. - -If the region's BACK property is a string, it is inserted as above and -the overlay moved if necessary. If it is a function, it is called with -two arguments -- the overlay, and \(if ARG \\='middle t) -- and must do the -entire job of this function." - (interactive "P") - (let ((ovl (mmm-overlay-at))) - (when ovl - (combine-after-change-calls - (save-match-data - (save-excursion - (when (mmm-match-back ovl) - (if arg - (replace-match "") - (cl-return-from mmm-end-current-region))))) - (let ((back (overlay-get ovl 'back))) - (cond ((stringp back) - (save-excursion - (unless arg (goto-char (overlay-end ovl))) - (save-excursion (insert back)) - (move-overlay ovl (overlay-start ovl) (point)))) - ((functionp back) - (funcall back ovl (if arg 'middle t)))))) - (mmm-refontify-maybe (save-excursion (forward-line -1) (point)) - (save-excursion (forward-line 1) (point)))))) - -;;}}} -;;{{{ Narrow to Region - -(defun mmm-narrow-to-submode-region (&optional pos) - "Narrow to the submode region at POS. -When called interactive, use the submode at point." - (interactive) - ;; Probably don't use mmm-current-overlay here, because this is - ;; sometimes called from inside messy functions. - (let ((ovl (mmm-overlay-at pos))) - (when ovl - (narrow-to-region (overlay-start ovl) (overlay-end ovl))))) - -;; The inverse command is `widen', usually on `C-x n w' - -;;}}} - -;; INSERTING REGIONS -;;{{{ Insert regions by keystroke - -;; This is the "default" binding in the MMM Mode keymap. Keys defined -;; by classes should be control keys, to avoid conflicts with MMM -;; commands. -(defun mmm-insert-region (arg) - "Insert a submode region based on last character in invoking keys. -Keystrokes after `mmm-mode-prefix-key' which are not bound to an MMM -Mode command \(see `mmm-command-modifiers') are passed on to this -function. If they have the modifiers `mmm-insert-modifiers', then they -are looked up, sans those modifiers, in all current submode classes to -find an insert skeleton. For example, in Mason, `p' \(with appropriate -prefix and modifiers) will insert a <%perl>... region." - (interactive "P") - (let* ((seq (this-command-keys)) - (event (aref seq (1- (length seq)))) - (mods (event-modifiers event)) - (key (mmm-event-key event))) - (if (cl-subsetp mmm-insert-modifiers mods) - (mmm-insert-by-key - (append (cl-set-difference mods mmm-insert-modifiers) - key) - arg)))) - -(defvar skeleton-positions) ; Mark as special - -(defun mmm-insert-by-key (key &optional arg) - "Insert a submode region based on event KEY. -Inspects all the classes of the current buffer to find a matching -:insert key sequence. See `mmm-classes-alist'. ARG, if present, is -passed on to `skeleton-proxy-new' to control wrapping. - -KEY must be a list \(MODIFIERS... . BASIC-KEY) where MODIFIERS are -symbols such as shift, control, etc. and BASIC-KEY is a character code -or a symbol such as tab, return, etc. Note that if there are no -MODIFIERS, the dotted list becomes simply BASIC-KEY." - (cl-multiple-value-bind (class skel str) (mmm-get-insertion-spec key) - (when skel - (let ((after-change-functions nil) - (old-undo buffer-undo-list) undo) - ;; XEmacs' skeleton doesn't manage positions by itself, so we - ;; have to do it. - (if mmm-xemacs (setq skeleton-positions nil)) - (skeleton-proxy-new skel str arg) - (cl-destructuring-bind (back end beg front) skeleton-positions - ;; TODO: Find a way to trap invalid-parent signals from - ;; make-region and undo the skeleton insertion. - (let ((match-submode (plist-get class :match-submode)) - (match-face (plist-get class :match-face)) - (match-name (plist-get class :match-name)) - (front-form (regexp-quote (buffer-substring front beg))) - (back-form (regexp-quote (buffer-substring end back))) - submode face name) - (setq submode - (mmm-modename->function - (if match-submode - (mmm-save-all (funcall match-submode front-form)) - (plist-get class :submode)))) - (setq face - (cond ((functionp match-face) - (mmm-save-all - (funcall match-face front-form))) - (match-face - (cdr (assoc front-form match-face))) - (t - (plist-get class :face)))) - (setq name - (cond ((plist-get class :skel-name) - ;; Optimize the name to the user-supplied str - ;; if we are so instructed. - str) - ;; Call it if it is a function - ((functionp match-name) - (mmm-save-all (funcall match-name front-form))) - ;; Now we know it's a string, does it need to - ;; be formatted? - ((plist-get class :save-name) - ;; Yes. Haven't done a match before, so - ;; match the front regexp against the given - ;; form to format the string - (string-match (plist-get class :front) - front-form) - (mmm-format-matches match-name front-form)) - (t - ;; No, just use it as-is - match-name))) - (mmm-make-region - submode beg end - :face face - :name name - :front front :back back - :match-front front-form :match-back back-form - :evaporation 'front -;;; :beg-sticky (plist-get class :beg-sticky) -;;; :end-sticky (plist-get class :end-sticky) - :beg-sticky t :end-sticky t - :creation-hook (plist-get class :creation-hook)) - (mmm-enable-font-lock submode))) - ;; Now get rid of intermediate undo boundaries, so that the entire - ;; insertion can be undone as one action. This should really be - ;; skeleton's job, but it doesn't do it. - (setq undo buffer-undo-list) - (while (not (eq (cdr undo) old-undo)) - (when (eq (cadr undo) nil) - (setcdr undo (cddr undo))) - (setq undo (cdr undo))))))) - -(defun mmm-get-insertion-spec (key &optional classlist) - "Get the insertion info for KEY from all classes in CLASSLIST. -Return \(CLASS SKEL STR) where CLASS is the class spec a match was -found in, SKEL is the skeleton to insert, and STR is the argument. -CLASSLIST defaults to the return value of `mmm-get-all-classes', -including global classes." - (cl-loop for classname in (or classlist (mmm-get-all-classes t)) - for class = (mmm-get-class-spec classname) - for inserts = (plist-get class :insert) - for skel = (cddr (assoc key inserts)) - with str - ;; If SKEL is a dotted pair, it means call another key's - ;; insertion spec with an argument. - unless (consp (cdr skel)) - do (setq str (cdr skel) - skel (cddr (assoc (car skel) inserts))) - if skel return (list class skel str) - ;; If we have a group class, recurse. - if (plist-get class :classes) - if (mmm-get-insertion-spec key it) - return it)) - -;;}}} -;;{{{ Help on Insertion - -(defun mmm-insertion-help () - "Display help on currently available MMM insertion commands." - (interactive) - (with-output-to-temp-buffer "*Help*" - (princ "Available MMM Mode Insertion Commands:\n") - (princ "Key Inserts\n") - (princ "--- -------\n\n") - (mapcar #'mmm-display-insertion-key - (mmm-get-all-insertion-keys)))) - -(defun mmm-display-insertion-key (spec) - "Print an insertion binding to standard output. -SPEC should be \(KEY NAME ...) where KEY is an insertion key and NAME -is a symbol naming the insertion." - (let* ((str (make-string 16 ?\ )) - ;; This gets us a dotted list, because of the way insertion - ;; keys are specified. - (key (append mmm-insert-modifiers (car spec))) - (lastkey (nthcdr (max (1- (safe-length key)) 0) key))) - ;; Now we make it a true list - (if (consp key) - (setcdr lastkey (list (cdr lastkey))) - (setq key (list key))) - ;; Get the spacing right - (store-substring str 0 - (key-description - (apply #'vector (append mmm-mode-prefix-key (list key))))) - (princ str) - ;; Now print the binding symbol - (princ (cadr spec)) - (princ "\n"))) - -(defun mmm-get-all-insertion-keys (&optional classlist) - "Return an alist of all currently available insertion keys. -Elements look like \(KEY NAME ...) where KEY is an insertion key and -NAME is a symbol naming the insertion." - (cl-remove-duplicates - (cl-loop for classname in (or classlist (mmm-get-all-classes t)) - for class = (mmm-get-class-spec classname) - append (plist-get class :insert) into keys - ;; If we have a group class, recurse. - if (plist-get class :classes) - do (setq keys (append keys (mmm-get-all-insertion-keys it))) - finally return keys) - :test #'equal - :key (lambda (x) (cons (car x) (cadr x))) - :from-end t)) - -;;}}} - -;;{{{ Auto Insertion (copied from interactive session);-COM- -;-COM- -;-COM-;; Don't use `mmm-ify-region' of course. And rather than having -;-COM-;; classes define their own functions, we should have them pass a -;-COM-;; skeleton as an attribute. Then our insert function can turn off -;-COM-;; after-change hooks and add the submode region afterward. -;-COM- -;-COM-(define-skeleton mmm-see-inline -;-COM- "" nil -;-COM- -1 @ " " _ " " @ "%>" -;-COM- '(apply #'mmm-ify-region 'cperl-mode (reverse skeleton-positions))) -;-COM- -;-COM-(define-skeleton mmm-see-other -;-COM- "" nil -;-COM- @ ";\n" _ "\n" @ "<%/" str ">" -;-COM- '(apply #'mmm-ify-region 'cperl-mode (reverse skeleton-positions))) -;-COM- -;-COM-(add-hook 'after-change-functions 'mmm-detect t) -;-COM- -;-COM-(defun mmm-detect (beg end length) -;-COM- (when (mmm-looking-back-at "<% ") -;-COM- (mmm-see-inline)) -;-COM- (when (mmm-looking-back-at "<%\\(\\w+\\)>") -;-COM- (mmm-see-other (match-string 1)))) -;-COM- -;;}}} - -(provide 'mmm-cmds) - -;;; mmm-cmds.el ends here diff --git a/elpa/mmm-mode-0.5.11/mmm-compat.el b/elpa/mmm-mode-0.5.11/mmm-compat.el deleted file mode 100644 index cfc5582..0000000 --- a/elpa/mmm-mode-0.5.11/mmm-compat.el +++ /dev/null @@ -1,130 +0,0 @@ -;;; mmm-compat.el --- MMM Hacks for compatibility with other Emacsen -*- lexical-binding: t; -*- - -;; Copyright (C) 2000, 2003, 2011, 2013 Free Software Foundation, Inc. - -;; Author: Michael Abraham Shulman - -;;{{{ GPL - -;; 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 2, 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 GNU Emacs; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. - -;;}}} - -;;; Commentary: - -;; This file provides a number of hacks that are necessary for MMM -;; Mode to function in different Emacsen. MMM Mode is designed for -;; FSF Emacs, but these hacks usually enable it to work -;; almost perfectly in XEmacs 21. - -;;; Code: - -;;{{{ Emacsen Detection - -(defvar mmm-xemacs (featurep 'xemacs) - "Whether we are running XEmacs.") - -;;}}} -;;{{{ Regexp-Opt (XEmacs) - -;; As of XEmacs' xemacs-base package version 1.82, -;; the regexp-opt API is compatible with GNU Emacs. -(defalias 'mmm-regexp-opt 'regexp-opt) - -;;}}} -;;{{{ Overlays (XEmacs) - -;; The main thing we use from FSF Emacs that XEmacs doesn't support -;; are overlays. XEmacs uses extents instead, but comes with a package -;; to emulate overlays. -(when mmm-xemacs - ;; This does almost everything we need. - (require 'overlay)) - -;; We also use a couple "special" overlay properties which have -;; different names for XEmacs extents. -(defvar mmm-evaporate-property - (if (featurep 'xemacs) 'detachable 'evaporate) - "The name of the overlay property controlling evaporation.") - -;; We don't use this any more, since its behavior is different in FSF -;; and XEmacs: in the one it replaces the buffer's local map, but in -;; the other it gets stacked on top of it. Instead we just set the -;; buffer's local map temporarily. -;;;(defvar mmm-keymap-property -;;; (if (featurep 'xemacs) 'keymap 'local-map) -;;; "The name of the overlay property controlling keymaps.") - -;;}}} -;;{{{ Keymaps and Events (XEmacs) - -;; In XEmacs, keymaps are a primitive type, while in FSF Emacs, they -;; are a list whose car is the symbol `keymap'. Among other things, -;; this means that they handle default bindings differently. -(defmacro mmm-set-keymap-default (keymap binding) - (if (featurep 'xemacs) - `(set-keymap-default-binding ,keymap ,binding) - `(define-key ,keymap [t] ,binding))) - -;; In XEmacs, events are a primitive type, while in FSF Emacs, they -;; are represented by characters or vectors. We treat them as vectors. -;; We can use `event-modifiers' in both Emacsen to extract the -;; modifiers, but the function to extract the basic key is different. -(defmacro mmm-event-key (event) - (if (featurep 'xemacs) - `(event-key ,event) - `(event-basic-type ,event))) - -;;}}} -;;{{{ Skeleton (XEmacs) - -;; XEmacs' `skeleton' package doesn't provide `@' to record positions. -(defvar skeleton-positions ()) -(defun mmm-fixup-skeleton () - "Add `@' to `skeleton-further-elements' if XEmacs and not there. -This makes `@' in skeletons act approximately like it does in FSF." - (and (featurep 'xemacs) - (defvar skeleton-further-elements ()) - (not (assoc '@ skeleton-further-elements)) - (add-to-list 'skeleton-further-elements - '(@ ''(push (point) skeleton-positions))))) - -;;}}} -;;{{{ Make Temp Buffers (XEmacs) - -(defmacro mmm-make-temp-buffer (buffer name) - "Return a buffer with name based on NAME including the text of BUFFER. -This text should not be modified." - (if (fboundp 'make-indirect-buffer) - `(make-indirect-buffer ,buffer (generate-new-buffer-name ,name)) - `(save-excursion - (set-buffer (generate-new-buffer ,name)) - (insert-buffer ,buffer) - (current-buffer)))) - -;;}}} -;;{{{ Emacs < 26 requires namespaced CL functions - -(if (>= emacs-major-version 26) - (defalias 'mmm-mapcan 'mapcan) - (require 'cl-lib) - (defalias 'mmm-mapcan 'cl-mapcan)) - -;;}}} - -(provide 'mmm-compat) - -;;; mmm-compat.el ends here diff --git a/elpa/mmm-mode-0.5.11/mmm-cweb.el b/elpa/mmm-mode-0.5.11/mmm-cweb.el deleted file mode 100644 index 3f56618..0000000 --- a/elpa/mmm-mode-0.5.11/mmm-cweb.el +++ /dev/null @@ -1,100 +0,0 @@ -;;; mmm-cweb.el --- MMM submode class for CWeb programs -*- lexical-binding: t; -*- - -;; Copyright (C) 2001, 2002, 2013 Free Software Foundation, Inc. - -;; Author: Alan Shutko - -;;{{{ GPL - -;; 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 2, 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 GNU Emacs; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. - -;;}}} - -;;; Commentary: - -;; This file contains the definition of an MMM Mode submode class for -;; editing CWeb programs. - -;;; Code: - -(require 'mmm-compat) -(require 'mmm-vars) -(require 'mmm-auto) - -(defvar mmm-cweb-section-tags - '("@ " "@*")) - -(defvar mmm-cweb-section-regexp - (concat "^" (mmm-regexp-opt mmm-cweb-section-tags t))) - -(defvar mmm-cweb-c-part-tags - '("@c" "@>=" "@>+=" "@p")) - -(defvar mmm-cweb-c-part-regexp - (concat (mmm-regexp-opt mmm-cweb-c-part-tags t))) - -(defun mmm-cweb-in-limbo (pos) - "Check to see if POS is in limbo, ie before any cweb sections." - (save-match-data - (save-excursion - (goto-char pos) - (not (re-search-backward mmm-cweb-section-regexp nil t))))) - -(defun mmm-cweb-verify-brief-c () - "Verify function for cweb-brief-c class. -Checks whether the match is in limbo." - (not (mmm-cweb-in-limbo (match-beginning 0)))) - -(mmm-add-group - 'cweb - `( - (cweb-c-part - :submode c-mode - :front ,mmm-cweb-c-part-regexp - :back ,mmm-cweb-section-regexp) - (cweb-label - :submode tex-mode - :front "@<" - :back "@>" - :face mmm-comment-submode-face - :insert ((?l cweb-label nil @ "@<" @ "@>"))) - (cweb-brief-c - :submode c-mode - :front "[^\\|]\\(|\\)[^|]" - :front-match 1 - :front-verify mmm-cweb-verify-brief-c -; :front-offset -1 - :back "[^\\|]\\(|\\)" - :back-match 1 -; :back-offset 1 - :end-not-begin t - :insert ((?| cweb-c-in-tex nil "|" @ "|"))) - (cweb-comment - :submode tex-mode - :front "/[*]" - :back "[*]/" - :face mmm-comment-submode-face) -)) - -;; (add-to-list 'mmm-mode-ext-classes-alist -;; '(plain-tex-mode "\\.w\\'" cweb)) -;; (add-to-list 'mmm-mode-ext-classes-alist -;; '(latex-mode "\\.w\\'" cweb)) -;; (add-to-list 'auto-mode-alist '("\\.w\\'" . tex-mode)) - -(provide 'mmm-cweb) - -;;; mmm-cweb.el ends here diff --git a/elpa/mmm-mode-0.5.11/mmm-defaults.el b/elpa/mmm-mode-0.5.11/mmm-defaults.el deleted file mode 100644 index b2cd574..0000000 --- a/elpa/mmm-mode-0.5.11/mmm-defaults.el +++ /dev/null @@ -1,62 +0,0 @@ -;;; mmm-defaults.el --- Friendly defaults for MMM Mode -*- lexical-binding: t; -*- - -;; Copyright (C) 2013 Free Software Foundation, Inc. - -;; Author: Dmitry Gutov - -;;{{{ GPL - -;; 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 2, 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 GNU Emacs; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. - -;;; Commentary: - -;; To enable multiple mode support in ERB, EJS and PHP files, just add the -;; following line to your init file: -;; -;; (require 'mmm-defaults) -;; -;; Note that for PHP you still need to have php-mode (installed separately). -;; -;; TODO: Add more file types and classes here. Mention this file in README. - -;;; Code: - -(require 'mmm-auto) - -(setq mmm-global-mode 'auto) - -;;; ERB and EJS - -(mmm-add-mode-ext-class 'html-erb-mode "\\.erb\\'" 'erb) -(mmm-add-mode-ext-class 'html-erb-mode "\\.ejs\\'" 'ejs) -(mmm-add-mode-ext-class 'html-erb-mode nil 'html-js) -(mmm-add-mode-ext-class 'html-erb-mode nil 'html-css) - -(add-to-list 'auto-mode-alist '("\\.html\\.erb\\'" . html-erb-mode)) -(add-to-list 'auto-mode-alist '("/[^.]+\\.erb\\'" . html-erb-mode)) -(add-to-list 'auto-mode-alist '("\\.jst\\.ejs\\'" . html-erb-mode)) - -;;; PHP - -(mmm-add-mode-ext-class 'html-mode nil 'html-js) -(mmm-add-mode-ext-class 'html-mode nil 'html-css) -(mmm-add-mode-ext-class 'html-mode "\\.php\\'" 'html-php) -(add-to-list 'auto-mode-alist '("\\.html\\.php\\'" . html-mode)) -(add-to-list 'auto-mode-alist '("/[^.]+\\.php\\'" . html-mode)) - -(provide 'mmm-defaults) - -;;; mmm-defaults.el ends here diff --git a/elpa/mmm-mode-0.5.11/mmm-erb.el b/elpa/mmm-mode-0.5.11/mmm-erb.el deleted file mode 100644 index 3aebaf1..0000000 --- a/elpa/mmm-mode-0.5.11/mmm-erb.el +++ /dev/null @@ -1,243 +0,0 @@ -;;; mmm-erb.el --- ERB templates editing support -*- lexical-binding: t; -*- - -;; Copyright (C) 2012, 2013, 2018 Free Software Foundation, Inc. - -;; Author: Dmitry Gutov - -;;{{{ GPL - -;; 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 2, 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 GNU Emacs; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. - -;;}}} - -;;; Commentary: - -;; This file contains definitions of ERB and EJS submode classes, and well as -;; support functions for proper indentation. - -;; Usage: - -;; (require 'mmm-auto) - -;; (setq mmm-global-mode 'auto) - -;; (mmm-add-mode-ext-class 'html-erb-mode "\\.html\\.erb\\'" 'erb) -;; (mmm-add-mode-ext-class 'html-erb-mode "\\.jst\\.ejs\\'" 'ejs) -;; (mmm-add-mode-ext-class 'html-erb-mode nil 'html-js) -;; (mmm-add-mode-ext-class 'html-erb-mode nil 'html-css) - -;; (add-to-list 'auto-mode-alist '("\\.html\\.erb\\'" . html-erb-mode)) -;; (add-to-list 'auto-mode-alist '("\\.jst\\.ejs\\'" . html-erb-mode)) - -;; Optional settings: - -;; (setq mmm-submode-decoration-level 2 -;; mmm-parse-when-idle t) - -;; nXML as primary mode (supports only JS and CSS subregions): - -;; (mmm-add-mode-ext-class 'nxml-web-mode nil 'html-js) -;; (mmm-add-mode-ext-class 'nxml-web-mode nil 'html-css) - -;; (add-to-list 'auto-mode-alist '("\\.xhtml\\'" . nxml-web-mode)) - -;;; Code: - -(require 'sgml-mode) -(require 'cl-lib) -(require 'mmm-vars) -(require 'mmm-region) - -(mmm-add-classes - '((erb :submode ruby-mode :front "<%[#=]?" :back "-?%>" - :match-face (("<%#" . mmm-comment-submode-face) - ("<%=" . mmm-output-submode-face) - ("<%" . mmm-code-submode-face)) - :insert ((?% erb-code nil @ "<%" @ " " _ " " @ "%>" @) - (?# erb-comment nil @ "<%#" @ " " _ " " @ "%>" @) - (?= erb-expression nil @ "<%=" @ " " _ " " @ "%>" @)) - :creation-hook mmm-erb-mark-as-special) - (ejs :submode js-mode :front "<%[#=]?" :back "-?%>" - :match-face (("<%#" . mmm-comment-submode-face) - ("<%=" . mmm-output-submode-face) - ("<%" . mmm-code-submode-face)) - :insert ((?% ejs-code nil @ "<%" @ " " _ " " @ "%>" @) - (?# ejs-comment nil @ "<%#" @ " " _ " " @ "%>" @) - (?= ejs-expression nil @ "<%=" @ " " _ " " @ "%>" @)) - :creation-hook mmm-erb-mark-as-special))) - -(defun mmm-erb-mark-as-special () - "Hook function to run in ERB and EJS tag regions." - (overlay-put mmm-current-overlay 'mmm-special-tag t)) - -;;;###autoload -(define-derived-mode html-erb-mode html-mode "ERB-HTML" - (setq sgml-unclosed-tags nil) ; Simplifies indentation logic. - (set (make-local-variable 'mmm-indent-line-function) #'mmm-erb-indent-line) - (add-hook 'mmm-after-syntax-propertize-functions - #'html-erb-after-syntax-propertize nil t)) - -(defun html-erb-after-syntax-propertize (overlay _mode beg end) - (when overlay - (with-silent-modifications - (funcall - (syntax-propertize-rules ("<\\|>" (0 "."))) - beg end)))) - -(defun mmm-erb-indent-line () - "Indent the current line intelligently." - (interactive) - (let ((offset (- (current-column) (current-indentation)))) - (back-to-indentation) - (mmm-update-submode-region) - (if (and mmm-current-overlay mmm-current-submode - (< (overlay-start mmm-current-overlay) (line-beginning-position))) - ;; Region starts before the current line (and contains indentation). - ;; If it starts on the current line, then either first part of the line - ;; is in primary mode, or we're on the first line of a script or style - ;; tag contents. In the latter case, better to also indent it according - ;; to the primary mode (as text): `js-indent-line' ignores narrowing, - ;; gets confused by the angle bracket on the previous line and thus - ;; breaks our "top level" heuristic. - (mmm-erb-indent-line-submode) - (mmm-erb-indent-line-primary)) - (when (> offset 0) (forward-char offset)))) - -(defun mmm-erb-indent-line-submode () - "Indent line within a submode." - (let (added-whitespace) - (if (<= (overlay-end mmm-current-overlay) - (save-excursion (back-to-indentation) (point))) - ;; We're at a closing tag. - (mmm-erb-indent-to-region-start) - (save-restriction - (save-excursion - (goto-char (overlay-start mmm-current-overlay)) - (when (not (looking-at "^\\|\\s-*$")) - ;; Submode region has text on the same line as the opening tag, - ;; pad it with whitespace to make the following lines line up. - (setq added-whitespace (current-column)) - (insert-char ?\s added-whitespace))) - (narrow-to-region (overlay-start mmm-current-overlay) - (overlay-end mmm-current-overlay)) - (funcall (mmm-erb-orig-indent-function mmm-current-submode)) - (when added-whitespace - ;; Remove the padding. - (save-excursion - (goto-char (overlay-start mmm-current-overlay)) - (delete-char added-whitespace)))) - ;; If submode indent function moved us to bol, - ;; we're on the top level, indent according to the primary mode. - (when (zerop (current-indentation)) - (mmm-erb-indent-to-region-start - (mmm-erb-indent-offset mmm-primary-mode)))))) - -(defun mmm-erb-indent-to-region-start (&optional additional-offset) - "Indent line to match start of region, possibly adding ADDITIONAL-OFFSET." - (indent-line-to - (save-excursion - (goto-char (1- (overlay-start mmm-current-overlay))) - (+ (current-indentation) - (or additional-offset 0))))) - -(defun mmm-erb-indent-line-primary () - "Indent line in primary mode." - (let* ((here (point)) - ;; Go before previous line's tag. - (start (progn (forward-line -1) - (back-to-indentation) - (let ((lcon (sgml-lexical-context))) - (when (eq (car lcon) 'tag) - ;; Tag spreads several lines. - (goto-char (cdr lcon)) - (back-to-indentation))) - (point))) - (regions (mmm-regions-in start here)) - (n 0)) - ;; Collect indent modifier depending on type of tags. - (cl-loop for region in regions - for type = (mmm-erb-scan-region region) - when type do - (if (eq type 'close) - (when (cl-plusp n) (cl-decf n)) - (cl-incf n (if (eq type 'close) 0 1)))) - (let ((eol (progn (goto-char here) (end-of-line 1) (point)))) - ;; Look for "else" and "end" instructions to adjust modifier. - ;; If a block start instruction comes first, abort. - (cl-loop for region in (mmm-regions-in here eol) - for type = (mmm-erb-scan-region region) - until (eq type 'open) - when (memq type '(middle close)) do (cl-decf n))) - (goto-char here) - (funcall (mmm-erb-orig-indent-function mmm-primary-mode)) - (let* ((indent (current-indentation)) - (indent-step (mmm-erb-indent-offset mmm-primary-mode))) - (indent-line-to (+ indent (if n (* indent-step n) 0)))))) - -(defun mmm-erb-scan-region (region) - (when region ; Can be nil if a line is empty, for example. - (cl-destructuring-bind (submode beg end ovl) region - (let ((scan-fn (plist-get '(ruby-mode mmm-erb-scan-erb - js-mode mmm-erb-scan-ejs) - submode))) - (and scan-fn - (overlay-get ovl 'mmm-special-tag) - (save-excursion - (goto-char beg) - (skip-syntax-forward "-") - (funcall scan-fn end))))))) - -(defconst mmm-erb-ruby-close-re "\\\\|}" - "Regexp to match the end of a Ruby block.") - -(defun mmm-erb-scan-erb (limit) - (cond ((looking-at "\\(?:if\\|unless\\|for\\|while\\)\\b") 'open) - ((looking-at "\\(?:else\\|elsif\\)\\b") 'middle) - ((looking-at mmm-erb-ruby-close-re) 'close) - ((and (re-search-forward (concat "\\(?: +do +\\| *{ *\\)" - "\\(?:|[A-Za-z0-9_, ]*|\\)? *") - limit t) - (let ((pt (point))) - (not (when (< pt limit) - (goto-char limit) - (skip-syntax-backward "-") - (looking-back mmm-erb-ruby-close-re pt))))) - 'open))) - -(defun mmm-erb-scan-ejs (limit) - (cond ((looking-at "\\(?:if\\|for\\|while\\)\\b") 'open) - ((looking-at "} *else\\b") 'middle) - ((looking-at "}") 'close) - ((re-search-forward " *{ *" limit t) 'open))) - -(defun mmm-erb-orig-indent-function (mode) - (get mode 'mmm-indent-line-function)) - -(defvar mmm-erb-offset-var-alist - '((html-erb-mode . sgml-basic-offset) - (nxml-web-mode . nxml-child-indent))) - -(defun mmm-erb-indent-offset (mode) - (let ((name (cdr (assoc mode mmm-erb-offset-var-alist)))) - (when name (symbol-value name)))) - -;;;###autoload -(define-derived-mode nxml-web-mode nxml-mode "nXML-Web" - (set (make-local-variable 'mmm-indent-line-function) #'mmm-erb-indent-line)) - -(provide 'mmm-erb) - -;;; mmm-erb.el ends here diff --git a/elpa/mmm-mode-0.5.11/mmm-mason.el b/elpa/mmm-mode-0.5.11/mmm-mason.el deleted file mode 100644 index fde0665..0000000 --- a/elpa/mmm-mode-0.5.11/mmm-mason.el +++ /dev/null @@ -1,175 +0,0 @@ -;;; mmm-mason.el --- MMM submode class for Mason components -*- lexical-binding: t; -*- - -;; Copyright (C) 2000-2003, 2013, 2018 Free Software Foundation, Inc. - -;; Author: Michael Abraham Shulman - -;;{{{ GPL - -;; 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 2, 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 GNU Emacs; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. - -;;}}} - -;;; Commentary: - -;; This file contains the definition of an MMM Mode submode class for -;; editing Mason components. See the file README.Mason for more -;; details. - -;;; Code: - -(require 'mmm-compat) -(require 'mmm-vars) -(require 'mmm-auto) - -;;{{{ Perl Tags - -(defvar mmm-mason-perl-tags - '("perl" "init" "cleanup" "once" "filter" "shared" - "perl_init" "perl_cleanup" "perl_once" "perl_filter")) - -(defvar mmm-mason-pseudo-perl-tags - '("args" "perl_args" "attr" "flags")) - -(defvar mmm-mason-non-perl-tags - '("doc" "perl_doc" "text" "perl_text" "def" "perl_def" "method")) - -(defvar mmm-mason-perl-tags-regexp - (concat "<%" (mmm-regexp-opt mmm-mason-perl-tags t) ">") - "Matches tags beginning Mason sections containing Perl code. -Saves the name of the tag matched.") - -(defvar mmm-mason-pseudo-perl-tags-regexp - (concat "<%" (mmm-regexp-opt mmm-mason-pseudo-perl-tags t) ">") - "Match tags beginning Mason sections that look like Perl but aren't. -Saves the name of the tag matched.") - -(defvar mmm-mason-tag-names-regexp - (regexp-opt (append mmm-mason-perl-tags mmm-mason-non-perl-tags) t) - "Matches any Mason tag name after the \"<%\". -Used to verify that a \"<%\" sequence starts an inline section.") - -(defun mmm-mason-verify-inline () - (not (looking-at mmm-mason-tag-names-regexp))) - -;;}}} -;;{{{ Add Classes - -(mmm-add-group - 'mason - `((mason-text - :submode nil - :front "<%text>" - :back "" - :insert ((?t mason-<%text> nil @ "<%text>" @ "\n" - _ "\n" @ "" @))) - (mason-doc - :submode text-mode - :face mmm-comment-submode-face - :front "<%doc>" - :back "" - :face nil - :insert ((?d mason-<%doc> nil @ "<%doc>" @ "\n" - _ "\n" @ "" @))) - (mason-perl - :submode perl - :match-face (("<%perl>" . mmm-code-submode-face) - ("<%init>" . mmm-init-submode-face) - ("<%cleanup>" . mmm-cleanup-submode-face) - ("<%once>" . mmm-init-submode-face) - ("<%filter>" . mmm-special-submode-face) - ("<%shared>" . mmm-init-submode-face)) - :front ,mmm-mason-perl-tags-regexp - :back "" - :save-matches 1 - :match-name "~1" - :save-name 1 - :insert ((?, mason-<%TAG> "Perl section: " @ "<%" str ">" @ - ";\n" _ "\n" @ "" @) - (?< mason-<%TAG> ?, . nil) - (?p mason-<%perl> ?, . "perl") - (?i mason-<%init> ?, . "init") - (?c mason-<%cleanup> ?, . "cleanup") - (?o mason-<%once> ?, . "once") - (?l mason-<%filter> ?, . "filter") - (?s mason-<%shared> ?, . "shared"))) - (mason-pseudo-perl - :submode perl - :face mmm-declaration-submode-face - :front ,mmm-mason-pseudo-perl-tags-regexp - :back "" - :save-matches 1 - :insert ((?. mason-pseudo-<%TAG> "Pseudo-perl section: " @ "<%" str ">" @ - "\n" _ "\n" @ "" @) - (?> mason-pseudo-<%TAG> ?, . nil) - (?a mason-<%args> ?. . "args") - (?f mason-<%flags> ?. . "flags") - (?r mason-<%attr> ?. . "attr"))) - (mason-one-line-comment - :submode text-mode - :face mmm-comment-submode-face - :front "^%#" - :back "\n" - :insert ((?# mason-%-comment nil (mmm-mason-start-line) - @ "%" @ "# " _ @ '(mmm-mason-end-line) "\n" @) - (?3 mason-%-comment ?# . nil))) - (mason-inline - :submode perl - :face mmm-output-submode-face - :front "<%" - :front-verify mmm-mason-verify-inline - :back "%>" - :insert ((?% mason-<%-%> nil @ "<%" @ " " _ " " @ "%>" @) - (?5 mason-<%-%> ?% . nil))) - (mason-call - :submode perl - :face mmm-special-submode-face - :front "<&" - :back "&>" - :insert ((?& mason-<&-&> nil @ "<&" @ " " _ " " @ "&>" @) - (?7 mason-<&-&> ?% . nil))) - (mason-one-line - :submode perl - :face mmm-code-submode-face - :front "^%" - :back "\n" - :insert ((return mason-%-line nil (mmm-mason-start-line) - @ "%" @ " " _ @ '(mmm-mason-end-line) "\n" @))))) - -;;}}} -;;{{{ One-line Sections - -(defun mmm-mason-start-line () - (if (bolp) - "" - "\n")) - -(defun mmm-mason-end-line () - (if (eolp) - (delete-char 1))) - -;;}}} -;;{{{ Set Mode Line - -(defun mmm-mason-set-mode-line () - (setq mmm-buffer-mode-display-name "Mason")) -(add-hook 'mmm-mason-class-hook #'mmm-mason-set-mode-line) - -;;}}} - -(provide 'mmm-mason) - -;;; mmm-mason.el ends here diff --git a/elpa/mmm-mode-0.5.11/mmm-mode-autoloads.el b/elpa/mmm-mode-0.5.11/mmm-mode-autoloads.el deleted file mode 100644 index e4bee17..0000000 --- a/elpa/mmm-mode-0.5.11/mmm-mode-autoloads.el +++ /dev/null @@ -1,115 +0,0 @@ -;;; mmm-mode-autoloads.el --- automatically extracted autoloads (do not edit) -*- lexical-binding: t -*- -;; Generated by the `loaddefs-generate' function. - -;; This file is part of GNU Emacs. - -;;; Code: - -(add-to-list 'load-path (or (and load-file-name (directory-file-name (file-name-directory load-file-name))) (car load-path))) - - - -;;; Generated autoloads from mmm-auto.el - -(register-definition-prefixes "mmm-auto" '("mmm-")) - - -;;; Generated autoloads from mmm-class.el - -(register-definition-prefixes "mmm-class" '("mmm-")) - - -;;; Generated autoloads from mmm-cmds.el - -(register-definition-prefixes "mmm-cmds" '("mmm-")) - - -;;; Generated autoloads from mmm-compat.el - -(register-definition-prefixes "mmm-compat" '("mmm-" "skeleton-positions")) - - -;;; Generated autoloads from mmm-cweb.el - -(register-definition-prefixes "mmm-cweb" '("mmm-cweb-")) - - -;;; Generated autoloads from mmm-erb.el - -(autoload 'html-erb-mode "mmm-erb" "\ - - -(fn)" t) -(autoload 'nxml-web-mode "mmm-erb" "\ - - -(fn)" t) -(register-definition-prefixes "mmm-erb" '("html-erb-after-syntax-propertize" "mmm-erb-")) - - -;;; Generated autoloads from mmm-mason.el - -(register-definition-prefixes "mmm-mason" '("mmm-mason-")) - - -;;; Generated autoloads from mmm-mode.el - -(register-definition-prefixes "mmm-mode" '("mmm-")) - - -;;; Generated autoloads from mmm-myghty.el - -(register-definition-prefixes "mmm-myghty" '("mmm-myghty-")) - - -;;; Generated autoloads from mmm-noweb.el - -(register-definition-prefixes "mmm-noweb" '("mmm-")) - - -;;; Generated autoloads from mmm-region.el - -(register-definition-prefixes "mmm-region" '("mmm-")) - - -;;; Generated autoloads from mmm-rpm.el - -(register-definition-prefixes "mmm-rpm" '("mmm-rpm-sh-")) - - -;;; Generated autoloads from mmm-sample.el - -(register-definition-prefixes "mmm-sample" '("mmm-")) - - -;;; Generated autoloads from mmm-univ.el - -(register-definition-prefixes "mmm-univ" '("mmm-univ-get-mode")) - - -;;; Generated autoloads from mmm-utils.el - -(register-definition-prefixes "mmm-utils" '("mmm-")) - - -;;; Generated autoloads from mmm-vars.el - -(autoload 'mmm-add-classes "mmm-vars" "\ -Add the submode classes CLASSES to `mmm-classes-alist'. - -(fn CLASSES)") -(register-definition-prefixes "mmm-vars" '("mmm-")) - -;;; End of scraped data - -(provide 'mmm-mode-autoloads) - -;; Local Variables: -;; version-control: never -;; no-byte-compile: t -;; no-update-autoloads: t -;; no-native-compile: t -;; coding: utf-8-emacs-unix -;; End: - -;;; mmm-mode-autoloads.el ends here diff --git a/elpa/mmm-mode-0.5.11/mmm-mode-pkg.el b/elpa/mmm-mode-0.5.11/mmm-mode-pkg.el deleted file mode 100644 index 034ca16..0000000 --- a/elpa/mmm-mode-0.5.11/mmm-mode-pkg.el +++ /dev/null @@ -1,11 +0,0 @@ -;; -*- no-byte-compile: t; lexical-binding: nil -*- -(define-package "mmm-mode" "0.5.11" - "Allow Multiple Major Modes in a buffer." - '((emacs "25.1") - (cl-lib "0.2")) - :url "https://github.com/dgutov/mmm-mode" - :commit "b1f5c7dbdc405e6e10d9ddd99a43a6b2ad61b176" - :revdesc "b1f5c7dbdc40" - :keywords '("convenience" "faces" "languages" "tools") - :authors '(("Michael Abraham Shulman" . "viritrilbia@gmail.com")) - :maintainers '(("Dmitry Gutov" . "dmitry@gutov.dev"))) diff --git a/elpa/mmm-mode-0.5.11/mmm-mode.el b/elpa/mmm-mode-0.5.11/mmm-mode.el deleted file mode 100644 index 3cae68f..0000000 --- a/elpa/mmm-mode-0.5.11/mmm-mode.el +++ /dev/null @@ -1,310 +0,0 @@ -;;; mmm-mode.el --- Allow Multiple Major Modes in a buffer -*- lexical-binding: t; -*- - -;; Copyright (C) 1999-2004, 2012-2015, 2018, 2020 Free Software Foundation, Inc. - -;; Emacs Lisp Archive Entry -;; Package: mmm-mode -;; Author: Michael Abraham Shulman -;; Maintainer: Dmitry Gutov -;; URL: https://github.com/dgutov/mmm-mode -;; Keywords: convenience, faces, languages, tools -;; Package-Version: 0.5.11 -;; Package-Revision: b1f5c7dbdc40 -;; Package-Requires: ((emacs "25.1") (cl-lib "0.2")) - -;;{{{ GPL - -;; 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 2, 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 GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. - -;;}}} - -;;; Commentary: - -;; MMM Mode is a minor mode that allows multiple major modes to -;; coexist in a single buffer. Refer to the documentation of the -;; function `mmm-mode' for more detailed information. This file -;; contains mode on/off functions and the mode keymap, but mostly -;; just loads all the subsidiary files. - -;{{{ Parameter Naming - -;; Since version 0.3.7, I've tried to use a uniform scheme for naming -;; parameters. Here's a brief summary. - -;; BEG and END refer to the beginning and end of a region. -;; FRONT and BACK refer to the respective delimiters of a region. -;; FRONT- and BACK-OFFSET are the offsets from delimiter matches. -;; FRONT-BEG through BACK-END are the endings of the delimiters. -;; START and STOP bound actions, like searching, fontification, etc. - -;}}} -;{{{ CL and Parameters - -;; Keyword parameters can be nice because it makes it easier to see -;; what's getting passed as what. But I try not to use them in user -;; functions, because CL doesn't make good documentation strings. -;; Similarly, any hook or callback function can't take keywords, -;; since Emacs as a whole doesn't use them. And for small parameter -;; lists, they are overkill. So I use them only for a large number of -;; optional parameters, such as `mmm-make-region'. - -;; An exception is the various submode class application functions, -;; which all take all their arguments as keywords, for consistency -;; and so the classes alist looks nice. - -;; When using keyword arguments, defaults should *always* be supplied -;; in all arglists. (This pertains mostly to :start and :stop -;; arguments, usually defaulting to (point-min) and (point-max) -;; respectively.) `mmm-save-keywords' should only be used for lists -;; with more than four arguments, such as in `mmm-ify-by-regexp'. - -;; In general, while I have no qualms about using things from CL like -;; `cl-mapl', `cl-loop' and `cl-destructuring-bind', I try not to use `cl-defun' -;; more than I have to. For one, it sometimes makes bad documentation -;; strings. Furthermore, to a `defun'ned function, a nil argument is -;; the same as no argument, so it will use its (manual) default, but -;; to a `cl-defun'ned function, a nil argument *is* the argument, so -;; any default specified in the arglist will be ignored. Confusion of -;; this type should be avoided when at all possible. - -;;}}} - -;;; Code: - -(require 'cl-lib) -;; If we don't load font-lock now, but it is loaded later, the -;; necessary mmm-font-lock-* properties may not be there. -(require 'font-lock) -(require 'mmm-compat) -(require 'mmm-utils) -(require 'mmm-vars) -(require 'mmm-auto) -(require 'mmm-region) -(require 'mmm-class) -;; This file is set up to autoload by `mmm-auto.el'. -;; (require 'mmm-cmds) -(require 'mmm-univ) - -;;{{{ Toggle Function - -(defun mmm-mode (&optional arg) - "Minor mode to allow multiple major modes in one buffer. -Without ARG, toggle MMM Mode. With ARG, turn MMM Mode on if ARG is -positive and off otherwise. - -Commands Available: -\\ -\\{mmm-mode-map} - -BASIC CONCEPTS - -The idea of MMM Mode is to allow multiple major modes to coexist in -the same buffer. There is one `primary' major mode that controls -most of the buffer, and a number of `submodes' that each hold sway -over certain regions. The submode regions are usually highlighted by -a background color for ease of recognition. While the point is in a -submode region, the following changes \(are supposed to) occur: - -1. The local keymap and the syntax table are that of the submode. -2. The mode line changes to show what submode region is active. -3. The major mode menu and mouse popup menu are that of the submode. -4. Some local variables of the submode shadow the default mode's. -5. Font-lock fontifies correctly for the submode. -6. Indentation function dispatches to the appropriate submode. -7. User-specified hooks run when the point enters or exits a submode. - -The user may specify a number of hooks which may run when the point -transitions between submodes, or between the primary mode and a -submode. When a major mode is entered, the hook `mmm-x-enter-hook' is -run, where x is the name of the major mode. When a major mode is -left, the hook `mmm-y-exit-hook' is run, where y is the name of the -major mode. Users may also specify hooks with names of the form -`mmm-x-y-hook' which are run when the point leaves a mode named x, -and enters a mode named y. - -For further information, including installation and configuration -instructions, see the info node `(mmm)Top' which is included with the -distribution of MMM Mode. Many of MMM's configuration variables are -available in customization group `mmm'." - (interactive "P") - (if (if arg (> (prefix-numeric-value arg) 0) (not mmm-mode)) - (mmm-mode-on) - (mmm-mode-off))) - -(add-to-list 'minor-mode-alist (list 'mmm-mode mmm-mode-string)) - -;;}}} -;;{{{ Mode On - -(defun mmm-mode-on () - "Turn on MMM Mode. See `mmm-mode'." - (interactive) - ;; This function is called from mode hooks, so we need to make sure - ;; we're not in a temporary buffer. We don't need to worry about - ;; recursively ending up in ourself, however, since by that time the - ;; variable `mmm-mode' will already be set. - (mmm-valid-buffer - (unless mmm-mode - (setq mmm-primary-mode major-mode) - (when (fboundp 'c-make-styles-buffer-local) - (c-make-styles-buffer-local t)) - (mmm-update-mode-info major-mode) - (setq mmm-region-saved-locals-for-dominant - ;; FIXME: Neither is defined in recent Emacs. - (cl-list* (list 'font-lock-cache-state nil) - (list 'font-lock-cache-position (make-marker)) - (copy-tree (cdr (assq major-mode mmm-region-saved-locals-defaults))))) - ;; Without the next line, the (make-marker) above gets replaced - ;; with the starting value of nil, and all comes to naught. - (mmm-set-local-variables major-mode nil) - (mmm-add-hooks) - (mmm-fixup-skeleton) - (set (make-local-variable 'font-lock-fontify-region-function) - #'mmm-fontify-region) - (when (boundp 'syntax-begin-function) - (set (make-local-variable 'syntax-begin-function) nil)) - (set (make-local-variable 'syntax-propertize-function) - #'mmm-syntax-propertize-function) - (set (make-local-variable 'indent-line-function) mmm-indent-line-function) - (setq mmm-mode t) - (condition-case err - (mmm-apply-all) - (mmm-error - ;; Complain, but don't die, since we want files to go ahead - ;; and be opened anyway, and the mode to go ahead and be - ;; turned on. Should we delete all previously made submode - ;; regions when we find an invalid one? - (message "%s" (error-message-string err)))) - (run-hooks 'mmm-mode-hook) - (mmm-run-major-hook)))) - -;;}}} -;;{{{ Mode Off - -(defun mmm-mode-off () - "Turn off MMM Mode. See `mmm-mode'." - (interactive) - (when mmm-mode - (mmm-remove-hooks) - (mmm-clear-overlays) - (mmm-clear-history) - (mmm-clear-mode-ext-classes) - (mmm-clear-local-variables) - (mmm-update-submode-region) - (setq font-lock-fontify-region-function - (get mmm-primary-mode 'mmm-fontify-region-function)) - (mmm-update-font-lock-buffer) - (mmm-refontify-maybe) - (setq mmm-mode nil) - ;; Restore the mode line - (setq mmm-primary-mode-display-name nil - mmm-buffer-mode-display-name nil) - (mmm-set-mode-line))) - -;;}}} -;;{{{ Mode Keymap - -(defvar mmm-mode-map (make-sparse-keymap) - "Keymap for MMM Minor Mode.") - -(defvar mmm-mode-prefix-map (make-sparse-keymap) - "Keymap for MMM Minor Mode after `mmm-mode-prefix-key'.") - -(defvar mmm-mode-menu-map (make-sparse-keymap "MMM") - "Keymap for MMM Minor Mode menu.") - -(defun mmm-define-key (key binding &optional keymap) - (define-key (or keymap mmm-mode-prefix-map) - (vector (append mmm-command-modifiers (list key))) - binding)) - -(when mmm-use-old-command-keys - (mmm-use-old-command-keys)) - -(mmm-define-key ?c 'mmm-ify-by-class) -(mmm-define-key ?x 'mmm-ify-by-regexp) -(mmm-define-key ?r 'mmm-ify-region) - -(mmm-define-key ?b 'mmm-parse-buffer) -(mmm-define-key ?g 'mmm-parse-region) -(mmm-define-key ?% 'mmm-parse-block) -(mmm-define-key ?5 'mmm-parse-block) - -(mmm-define-key ?k 'mmm-clear-current-region) -(mmm-define-key ?\ 'mmm-reparse-current-region) -(mmm-define-key ?e 'mmm-end-current-region) - -(mmm-define-key ?z 'mmm-narrow-to-submode-region) - -;; This one is exact, since C-h is (usually) already used for help. -(define-key mmm-mode-prefix-map [?h] 'mmm-insertion-help) - -;; Default bindings to do insertion (dynamic) -(mmm-set-keymap-default mmm-mode-prefix-map 'mmm-insert-region) - -;; Set up the prefix help command, since otherwise the default binding -;; overrides it. -(define-key mmm-mode-prefix-map (vector help-char) prefix-help-command) - -;; And put it all onto the prefix key -(define-key mmm-mode-map mmm-mode-prefix-key mmm-mode-prefix-map) - -;; Order matters for the menu bar. -(define-key mmm-mode-menu-map [off] - '("MMM Mode Off" . mmm-mode-off)) -(define-key mmm-mode-menu-map [sep0] '(menu-item "----")) - -(define-key mmm-mode-menu-map [clhist] - '("Clear History" . mmm-clear-history)) -(define-key mmm-mode-menu-map [end] - '("End Current" . mmm-end-current-region)) -(define-key mmm-mode-menu-map [clear] - '("Clear Current" . mmm-clear-current-region)) -(define-key mmm-mode-menu-map [reparse] - '("Reparse Current" . mmm-reparse-current-region)) - -(define-key mmm-mode-menu-map [sep10] '(menu-item "----")) - -(define-key mmm-mode-menu-map [ins-help] - '("List Insertion Keys" . mmm-insertion-help)) - -(define-key mmm-mode-menu-map [sep20] '(menu-item "----")) - -(define-key mmm-mode-menu-map [region] - '(menu-item "MMM-ify Region" mmm-ify-region :enable mark-active)) -(define-key mmm-mode-menu-map [regexp] - '("MMM-ify by Regexp" . mmm-ify-by-regexp)) -(define-key mmm-mode-menu-map [class] - '("Apply Submode Class" . mmm-ify-by-class)) - -(define-key mmm-mode-menu-map [sep30] '(menu-item "----")) - -(define-key mmm-mode-menu-map [parse-region] - '(menu-item "Parse Region" mmm-parse-region :enable mark-active)) -(define-key mmm-mode-menu-map [parse-buffer] - '("Parse Buffer" . mmm-parse-buffer)) -(define-key mmm-mode-menu-map [parse-block] - '("Parse Block" . mmm-parse-block)) - -(define-key mmm-mode-map [menu-bar mmm] (cons "MMM" mmm-mode-menu-map)) - -(add-to-list 'minor-mode-map-alist (cons 'mmm-mode mmm-mode-map)) - -;;}}} - -(provide 'mmm-mode) - -;;; mmm-mode.el ends here diff --git a/elpa/mmm-mode-0.5.11/mmm-myghty.el b/elpa/mmm-mode-0.5.11/mmm-myghty.el deleted file mode 100644 index 4da271f..0000000 --- a/elpa/mmm-mode-0.5.11/mmm-myghty.el +++ /dev/null @@ -1,187 +0,0 @@ -;;; mmm-myghty.el --- MMM submode class for Myghty components -*- lexical-binding: t; -*- - -;; Copyright (C) 2000, 2004, 2013, 2018 Free Software Foundation, Inc. - -;; Author: Ben Bangert -;; Original Author: Michael Abraham Shulman - -;; Based on mmm-mason.el, trivial changes by Ben Bangert - -;;{{{ GPL - -;; 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 2, 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 GNU Emacs; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. - -;;}}} - -;;; Commentary: - -;; I went to the hard (sarcasm) effort of applying two global -;; search/replaces, and adding a few keywords for additional -;; blocks that Myghty introduced. Many thanks to Michael for writing -;; the mmm-mason without which I would never have found the time -;; to patch up for Myghty. - -;;; Code: - -(require 'mmm-compat) -(require 'mmm-vars) -(require 'mmm-auto) - -;;{{{ Python Tags - -(defvar mmm-myghty-python-tags - '("python" "init" "cleanup" "once" "filter" "shared" "global" - "threadlocal" "requestlocal" - "python_init" "python_cleanup" "python_once" "python_filter")) - -(defvar mmm-myghty-pseudo-python-tags - '("args" "python_args" "attr" "flags")) - -(defvar mmm-myghty-non-python-tags - '("doc" "python_doc" "text" "python_text" "def" "python_def" "method")) - -(defvar mmm-myghty-python-tags-regexp - (concat "<%" (mmm-regexp-opt mmm-myghty-python-tags t) ">") - "Matches tags beginning Myghty sections containing Python code. -Saves the name of the tag matched.") - -(defvar mmm-myghty-pseudo-python-tags-regexp - (concat "<%" (mmm-regexp-opt mmm-myghty-pseudo-python-tags t) ">") - "Match tags beginning Myghty sections that look like Python but aren't. -Saves the name of the tag matched.") - -(defvar mmm-myghty-tag-names-regexp - (regexp-opt (append mmm-myghty-python-tags mmm-myghty-non-python-tags) t) - "Matches any Myghty tag name after the \"<%\". -Used to verify that a \"<%\" sequence starts an inline section.") - -(defun mmm-myghty-verify-inline () - (not (looking-at mmm-myghty-tag-names-regexp))) - -;;}}} -;;{{{ Add Classes - -(mmm-add-group - 'myghty - `((myghty-text - :submode nil - :front "<%text>" - :back "" - :insert ((?t myghty-<%text> nil @ "<%text>" @ "\n" - _ "\n" @ "" @))) - (myghty-doc - :submode text-mode - :face mmm-comment-submode-face - :front "<%doc>" - :back "" - :face nil - :insert ((?d myghty-<%doc> nil @ "<%doc>" @ "\n" - _ "\n" @ "" @))) - (myghty-python - :submode python - :match-face (("<%python>" . mmm-code-submode-face) - ("<%init>" . mmm-init-submode-face) - ("<%cleanup>" . mmm-cleanup-submode-face) - ("<%once>" . mmm-init-submode-face) - ("<%global>" . mmm-init-submode-face) - ("<%filter>" . mmm-special-submode-face) - ("<%shared>" . mmm-init-submode-face) - ("<%threadlocal>" . mmm-init-submode-face) - ("<%requestlocal>" . mmm-init-submode-face)) - :front ,mmm-myghty-python-tags-regexp - :back "" - :save-matches 1 - :match-name "~1" - :save-name 1 - :insert ((?, myghty-<%TAG> "Python section: " @ "<%" str ">" @ - ";\n" _ "\n" @ "" @) - (?< myghty-<%TAG> ?, . nil) - (?p myghty-<%python> ?, . "python") - (?i myghty-<%init> ?, . "init") - (?c myghty-<%cleanup> ?, . "cleanup") - (?o myghty-<%once> ?, . "once") - (?g myghty-<%global> ?, . "global") - (?t myghty-<%threadlocal> ?, . "threadlocal") - (?e myghty-<%requestlocal> ?, . "requestlocal") - (?l myghty-<%filter> ?, . "filter") - (?s myghty-<%shared> ?, . "shared"))) - (myghty-pseudo-python - :submode python - :face mmm-declaration-submode-face - :front ,mmm-myghty-pseudo-python-tags-regexp - :back "" - :save-matches 1 - :insert ((?. myghty-pseudo-<%TAG> "Pseudo-python section: " @ "<%" str ">" @ - "\n" _ "\n" @ "" @) - (?> myghty-pseudo-<%TAG> ?, . nil) - (?a myghty-<%args> ?. . "args") - (?f myghty-<%flags> ?. . "flags") - (?r myghty-<%attr> ?. . "attr"))) - (myghty-inline - :submode python - :face mmm-output-submode-face - :front "<%" - :front-verify mmm-myghty-verify-inline - :back "%>" - :insert ((?% myghty-<%-%> nil @ "<%" @ " " _ " " @ "%>" @) - (?5 myghty-<%-%> ?% . nil))) - (myghty-call - :submode python - :face mmm-special-submode-face - :front "<&" - :back "&>" - :insert ((?& myghty-<&-&> nil @ "<&" @ " " _ " " @ "&>" @) - (?7 myghty-<&-&> ?% . nil))) - (myghty-one-line-comment - :submode text-mode - :face mmm-comment-submode-face - :front "^%#" - :back "\n" - :insert ((?# myghty-%-comment nil (mmm-myghty-start-line) - @ "%" @ "# " _ @ '(mmm-myghty-end-line) "\n" @) - (?3 myghty-%-comment ?# . nil))) - (myghty-one-line - :submode python - :face mmm-code-submode-face - :front "^%" - :back "\n" - :insert ((return myghty-%-line nil (mmm-myghty-start-line) - @ "%" @ " " _ @ '(mmm-myghty-end-line) "\n" @))))) - -;;}}} -;;{{{ One-line Sections - -(defun mmm-myghty-start-line () - (if (bolp) - "" - "\n")) - -(defun mmm-myghty-end-line () - (if (eolp) - (delete-char 1))) - -;;}}} -;;{{{ Set Mode Line - -(defun mmm-myghty-set-mode-line () - (setq mmm-buffer-mode-display-name "Myghty")) -(add-hook 'mmm-myghty-class-hook #'mmm-myghty-set-mode-line) - -;;}}} - -(provide 'mmm-myghty) - -;;; mmm-myghty.el ends here diff --git a/elpa/mmm-mode-0.5.11/mmm-noweb.el b/elpa/mmm-mode-0.5.11/mmm-noweb.el deleted file mode 100644 index 3bbe0fa..0000000 --- a/elpa/mmm-mode-0.5.11/mmm-noweb.el +++ /dev/null @@ -1,421 +0,0 @@ -;;; mmm-noweb.el --- MMM submode class for Noweb programs -*- lexical-binding: t; -*- -;; -;; Copyright 2003, 2004 Joe Kelsey -;; Copyright 2018 Free Software Foundation, Inc. -;; -;; The filling, completion and chunk motion commands either taken -;; directly from or inspired by code in: -;; noweb-mode.el - edit noweb files with GNU Emacs -;; Copyright 1995 by Thorsten.Ohl @ Physik.TH-Darmstadt.de -;; with a little help from Norman Ramsey -;; - -;;{{{ GPL - -;; 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 2, 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 GNU Emacs; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. - -;;}}} - -;;; Commentary: - -;; This file contains the definition of an MMM Mode submode class for -;; editing Noweb programs. -;; -;; FIXME: The more advanced features don't work: `mmm-name-at' and -;; `mmm-syntax-region' are undefined. Need to dig around in the bug reports -;; and/or discussions, wherever the code using them was submitted. - -;;; Code: - -(require 'cl-lib) -(require 'mmm-region) -(require 'mmm-vars) -(require 'mmm-mode) - -;;{{{ Variables - -(defvar mmm-noweb-code-mode 'fundamental-mode - "*Major mode for editing code chunks. -This is set to FUNDAMENTAL-MODE by default, but you might want to change -this in the Local Variables section of your file to something more -appropriate, like C-MODE, FORTRAN-MODE, or even INDENTED-TEXT-MODE." - ;; FIXME: Any of CC Mode modes aren't really appropriate: - ;; https://github.com/dgutov/mmm-mode/issues/57 - ) - -(defvar mmm-noweb-quote-mode nil - "*Major mode for quoted code chunks within documentation chunks. -If nil, defaults to `mmm-noweb-code-mode', which see.") - -(defvar mmm-noweb-quote-string "quote" - "*String used to form quoted code submode region names. -See `mmm-noweb-quote'.") - -(defvar mmm-noweb-quote-number 0 - "*Starting value appended to `mmm-noweb-quote-string'. -See `mmm-noweb-quote'.") - -(defvar mmm-noweb-narrowing nil - "*Narrow the region to the current pair of chunks.") - -;;}}} -;;{{{ Support for mmm submode stuff - -(defun mmm-noweb-chunk (_form) - "Return the noweb code mode chosen by the user. -If the next 100 characters of the buffer contain a string of the form -\"-*- MODE -*-\", then return MODE as the chosen mode, otherwise -return the value of `mmm-noweb-code-mode'." - ;; Look for -*- mode -*- in the first two lines. - ;; 120 chars = 40 chars for #! + 80 chars for following line... - (if (re-search-forward "-\\*-\\s +\\(\\S-+\\)\\s +-\\*-" (+ (point) 120) t) - (let* ((string (match-string-no-properties 1)) - (modestr (intern (if (string-match "mode\\'" string) - string - (concat string "-mode"))))) - (or (mmm-ensure-modename modestr) - mmm-noweb-code-mode)) - mmm-noweb-code-mode)) - -(defun mmm-noweb-quote (_form) - "Create a unique name for a quoted code region within a documentation chunk." - (or mmm-noweb-quote-mode - mmm-noweb-code-mode)) - -(defun mmm-noweb-quote-name (_form) - "Create a unique name for a quoted code region within a documentation chunk." - (setq mmm-noweb-quote-number (1+ mmm-noweb-quote-number)) - (concat mmm-noweb-quote-string "-" - (number-to-string mmm-noweb-quote-number))) - -(defun mmm-noweb-chunk-name (form) - "Get the chunk name from FORM." - (string-match "<<\\(.*\\)>>=" form) - (match-string-no-properties 1 form)) - -;;}}} -;;{{{ mmm noweb submode group - -;; We assume that the global document mode is latex or whatever, the -;; user wants. This class controls the code chunk submodes. We use -;; match-submode to either return the value in mmm-noweb-code-mode or to -;; look at the first line of the chunk for a submode setting. We reset -;; case-fold-search because chunk names are case sensitive. The front -;; string identifies the chunk name between the <<>>. Since this is -;; done, name-match can use the same functions as save-matches for back. -;; Our insert skeleton places a new code chunk and the skel-name lets us -;; optimize the skelton naming to use the inserted string. - -(mmm-add-group - 'noweb - '((noweb-chunk - :match-submode mmm-noweb-chunk - :case-fold-search nil - :front "^<<\\(.*\\)>>=" - :match-name "~1" - :save-name 1 - :front-offset (end-of-line 1) - :back "^@\\( \\|$\\|\\( %def .*$\\)\\)" - :insert ((?c noweb-code "Code Chunk Name: " - "\n" @ "<<" str ">>=" @ "\n" _ "\n" @ "@ " @ "\n")) - :skel-name t - ) - (noweb-quote - :match-submode mmm-noweb-quote - :face mmm-special-submode-face - :front "\\[\\[" -; :name-match mmm-noweb-quote-name - :back "\\]\\]" - :insert ((?q noweb-quote nil @ "[[" @ _ @ "]]" @)) - ) - )) - -;;}}} -;;{{{ Noweb regions - -(defun mmm-noweb-regions (start stop regexp) - "Return a list of regions of the form (NAME BEG END) that exclude -names which match REGEXP." - (let* ((remove-next nil) - (regions - (cl-maplist (lambda (pos-list) - (if (cdr pos-list) - (if remove-next - (setq remove-next nil) - (let ((name (or (mmm-name-at (car pos-list) 'beg) - (symbol-name mmm-primary-mode)))) - (if (and regexp (string-match regexp name) ) - (progn - (setq remove-next t) - nil) - (list name - (car pos-list) (cadr pos-list))))))) - (mmm-submode-changes-in start stop)))) - ;; The above loop leaves lots of nils in the list... - ;; Removing them saves us from having to do the (last x 2) - ;; trick that mmm-regions-in does. - (setq regions (delq nil regions)))) - -;;}}} -;;{{{ Filling, etc - -(defun mmm-noweb-narrow-to-doc-chunk () - "Narrow to the current doc chunk. -The current chunk includes all quoted code chunks (i.e., \[\[...\]\]). -This function is only valid when called with point in a doc chunk or -quoted code chunk." - (interactive) - (let ((name (mmm-name-at (point)))) - (if (or (null name) (string-match "^quote" name)) - (let ((prev (cond - ((= (point) (point-min)) (point)) - (t (cadar (last (mmm-noweb-regions (point-min) (point) - "^quote")))))) - (next (cond - ((= (point) (point-max)) (point)) - (t (save-excursion - (goto-char (cadr - (cadr (mmm-noweb-regions (point) - (point-max) - "^quote")))) - (forward-line -1) - (point)))))) - (narrow-to-region prev next))))) - -(defun mmm-noweb-fill-chunk (&optional justify) - "Fill the current chunk according to mode. -Run `fill-paragraph' with JUSTIFY on documentation chunks and -`indent-region' on code chunks." - (interactive "P") - (save-restriction - (let ((name (mmm-name-at (point)))) - (if (and name (not (string-match "^quote" name))) - (if (or indent-region-function indent-line-function) - (progn - (mmm-space-other-regions) - (indent-region (overlay-start mmm-current-overlay) - (overlay-end mmm-current-overlay) nil)) - (error "No indentation functions defined in %s!" major-mode)) - (progn - (mmm-word-other-regions) - (fill-paragraph justify))) - (mmm-undo-syntax-other-regions)))) - -(defun mmm-noweb-fill-paragraph-chunk (&optional justify) - "Fill a paragraph according to JUSTIFY in the current chunk." - (interactive "P") - (save-restriction - (let ((name (mmm-name-at (point)))) - (if (and name (not (string-match "^quote" name))) - (progn - (mmm-space-other-regions) - (fill-paragraph justify)) - (progn - (mmm-word-other-regions) - (fill-paragraph justify))) - (mmm-undo-syntax-other-regions)))) - -(defun mmm-noweb-fill-named-chunk (&optional _justify) - "Fill the region containing the named chunk." - (interactive "P") - (save-restriction - (let* ((name (or (mmm-name-at) (symbol-name mmm-primary-mode))) - (list (cdr (assoc name (mmm-names-alist (point-min) (point-max)))))) - (if (or (string= name (symbol-name mmm-primary-mode)) - (string-match "^quote" name)) - (progn - (mmm-word-other-regions) - (do-auto-fill)) - (progn - (mmm-space-other-regions) - (indent-region (caar list) (cadar (last list)) nil))) - (mmm-undo-syntax-other-regions)))) - -(defun mmm-noweb-auto-fill-doc-chunk () - "Replacement for `do-auto-fill'." - (save-restriction - (mmm-noweb-narrow-to-doc-chunk) - (mmm-word-other-regions) - (do-auto-fill) - (mmm-undo-syntax-other-regions))) - -(defun mmm-noweb-auto-fill-doc-mode () - "Install the improved auto fill function, iff necessary." - (if auto-fill-function - ;; FIXME: Use add-function? - (setq auto-fill-function #'mmm-noweb-auto-fill-doc-chunk))) - -(defun mmm-noweb-auto-fill-code-mode () - "Install the default auto fill function, iff necessary." - (if auto-fill-function - ;; FIXME: Use remove-function? - (setq auto-fill-function #'do-auto-fill))) - -;;}}} -;;{{{ Functions on named chunks - -(defun mmm-noweb-complete-chunk () - "Try to complete the chunk name." - (interactive) - (let ((end (point)) - (beg (save-excursion - (if (re-search-backward "<<" - (save-excursion - (beginning-of-line) - (point)) - t) - (match-end 0) - nil)))) - (if beg - (let* ((pattern (buffer-substring beg end)) - (alist (mmm-names-alist (point-min) (point-max))) - (completion (try-completion pattern alist))) - (cond ((eq completion t)) - ((null completion) - (message "Can't find completion for \"%s\"" pattern) - (ding)) - ((not (string= pattern completion)) - (delete-region beg end) - (insert completion) - (if (not (looking-at ">>")) - (insert ">>"))) - (t - (message "Making completion list...") - (with-output-to-temp-buffer "*Completions*" - (display-completion-list - (all-completions pattern alist))) - (message "Making completion list...%s" "done")))) - (message "Not at chunk name...")))) - -(defvar mmm-noweb-chunk-history nil - "History for `mmm-noweb-goto-chunk'.") - -(defun mmm-noweb-goto-chunk () - "Goto the named chunk." - (interactive) - (widen) - (let* ((completion-ignore-case t) - (alist (mmm-names-alist (point-min) (point-max))) - (chunk (completing-read - "Chunk: " alist nil t - (mmm-name-at (point)) - mmm-noweb-chunk-history))) - (goto-char (caadr (assoc chunk alist))))) - -(defun mmm-noweb-goto-next (&optional cnt) - "Goto the continuation of the current chunk." - (interactive "p") - (widen) - (let ((name (mmm-name-at (point)))) - (if name - (let ((list (cdr (assoc name (mmm-names-alist - (overlay-end mmm-current-overlay) - (point-max)))))) - (if list - (goto-char (caar (nthcdr (1- cnt) list)))))))) - -(defun mmm-noweb-goto-previous (&optional cnt) - "Goto the continuation of the current chunk." - (interactive "p") - (widen) - (let ((name (mmm-name-at (point)))) - (if name - (let ((list (reverse - (cdr (assoc name - (mmm-names-alist (point-min) - (overlay-start - mmm-current-overlay))))))) - (if list - (goto-char (cadar (nthcdr cnt list)))))))) - -;;}}} -;;{{{ Key mappings - -(defvar mmm-noweb-map (make-sparse-keymap)) -(defvar mmm-noweb-prefix-map (make-sparse-keymap)) -(define-key mmm-noweb-map mmm-mode-prefix-key mmm-noweb-prefix-map) - -(mmm-define-key ?d 'mmm-noweb-narrow-to-doc-chunk mmm-noweb-prefix-map) -(mmm-define-key ?n 'mmm-noweb-goto-next mmm-noweb-prefix-map) -(mmm-define-key ?p 'mmm-noweb-goto-previous mmm-noweb-prefix-map) -(mmm-define-key ?q 'mmm-noweb-fill-chunk mmm-noweb-prefix-map) -;; Cannot use C-g as goto command, so use C-s. -(mmm-define-key ?s 'mmm-noweb-goto-chunk mmm-noweb-prefix-map) - -(define-key mmm-noweb-prefix-map "\t" 'mmm-noweb-complete-chunk) - -;; Don't want to add to either the mmm mode map (used in other mmm -;; buffers) or the local map (used in other major mode buffers), so we -;; make a full-buffer spanning overlay and add the map there. -(defun mmm-noweb-bind-keys () - (save-restriction - (widen) - (let ((ovl (make-overlay (point-min) (point-max) nil nil t))) - ;; 'keymap', not 'local-map' - (overlay-put ovl 'keymap mmm-noweb-map)))) - -(add-hook 'mmm-noweb-class-hook #'mmm-noweb-bind-keys) - -;; TODO: make this overlay go away if mmm is turned off - -;;}}} - -;; These functions below living here temporarily until a real place is -;; found. - -(defun mmm-syntax-region-list (syntax regions) - "Apply SYNTAX to a list of REGIONS of the form (BEG END). -If SYNTAX is not nil, set the syntax-table property of each region. -If SYNTAX is nil, remove the region syntax-table property. -See `mmm-syntax-region'." - (mapcar (lambda (reg) - (mmm-syntax-region (car reg) (cadr reg) syntax)) - regions)) - -(defun mmm-syntax-other-regions (syntax &optional name) - "Apply SYNTAX cell to other regions. -Regions are separated by name, using either `mmm-name-at' or the -optional NAME to determine the current region name." - (if (null name) - (setq name (or (mmm-name-at) - (symbol-name mmm-primary-mode)))) - (mapcar (lambda (reg) - (if (not (string= (car reg) name)) - (mmm-syntax-region-list syntax (cdr reg)))) - (mmm-names-alist (point-min) (point-max)))) - -(defun mmm-word-other-regions () - "Give all other regions word syntax." - (interactive) - (mmm-syntax-other-regions '(2 . 0)) - (setq parse-sexp-lookup-properties t)) - -(defun mmm-space-other-regions () - "Give all other regions space syntax." - (interactive) - (mmm-syntax-other-regions '(0 . 0)) - (setq parse-sexp-lookup-properties t)) - -(defun mmm-undo-syntax-other-regions () - "Remove syntax-table property from other regions." - (interactive) - (mmm-syntax-other-regions nil) - (setq parse-sexp-lookup-properties nil)) - - -(provide 'mmm-noweb) - -;;; mmm-noweb.el ends here diff --git a/elpa/mmm-mode-0.5.11/mmm-region.el b/elpa/mmm-mode-0.5.11/mmm-region.el deleted file mode 100644 index 0542c90..0000000 --- a/elpa/mmm-mode-0.5.11/mmm-region.el +++ /dev/null @@ -1,932 +0,0 @@ -;;; mmm-region.el --- Manipulating and behavior of MMM submode regions -*- lexical-binding: t; -*- - -;; Copyright (C) 2000-2003, 2010-2015, 2018, 2020 Free Software Foundation, Inc. - -;; Author: Michael Abraham Shulman - -;;{{{ GPL - -;; 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 2, 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 GNU Emacs; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. - -;;}}} - -;;; Commentary: - -;; This file provides the functions and variables to create, delete, -;; and inspect submode regions, as well as functions that make them -;; behave like the submode with respect to syntax tables, local maps, -;; font lock, etc. - -;; See mmm-class.el for functions which scan the buffer and decide -;; where to create regions. - -;;; Code: - -(require 'cl-lib) -(require 'font-lock) -(require 'mmm-compat) -(require 'mmm-utils) -(require 'mmm-auto) -(require 'mmm-vars) - -;; INSPECTION -;;{{{ Current Overlays - -;; Emacs counts an overlay starting at POS as "at" POS, but not an -;; overlay ending at POS. XEmacs is more sensible and uses beg- and -;; end-stickiness to determine whether an endpoint is within an -;; extent. Here we want to act like XEmacs does. - -(defsubst mmm-overlay-at (&optional pos type) - "Return the highest-priority MMM Mode overlay at POS. -See `mmm-included-p' for the values of TYPE." - (car (mmm-overlays-at pos type))) - -(defun mmm-overlays-at (&optional pos type) - "Return a list of the MMM overlays at POS, in decreasing priority. -See `mmm-included-p' for the values of TYPE." - (or pos (setq pos (point))) - (mmm-sort-overlays - (cl-remove-if-not - (lambda (ovl) - (and (overlay-get ovl 'mmm) - (mmm-included-p ovl pos type))) - ;; XEmacs complains about positions outside the buffer - (overlays-in (max (1- pos) (point-min)) - (min (1+ pos) (point-max)))))) - -(defun mmm-included-p (ovl pos &optional type) - "Return true if the overlay OVL contain POS. - -If OVL strictly contains POS, always return true. If OVL starts or -ends at POS, return true or false based on the value of TYPE, which -should be one of nil, `beg', `end', `none', or `all'. -* If TYPE is nil, return true for an overlay starting at POS only if - it is beg-sticky, and for one ending at POS only if it is end-sticky. -* If TYPE is `beg', return true for any overlay starting at POS but - false for any ending at POS. -* If TYPE is `end', return true for any overlay ending at POS but - false for any starting at POS. -* If TYPE is `all', return true for any overlay starting or ending at POS. -* If TYPE is `none' (or any other value), return false for any - overlay starting or ending at POS." - (let ((beg (overlay-start ovl)) - (end (overlay-end ovl))) - (cond ((and (= beg pos) (= end pos)) - ;; Do the Right Thing for zero-width overlays - (cl-case type - ((nil) (and (overlay-get ovl 'beg-sticky) - (overlay-get ovl 'end-sticky))) - ((none) nil) - (t t))) - ((= beg pos) - (cl-case type - ((nil) (overlay-get ovl 'beg-sticky)) - ((beg all) t) - (t nil))) - ((= end pos) - (cl-case type - ((nil) (overlay-get ovl 'end-sticky)) - ((end all) t) - (t nil))) - ((and (> end pos) (< beg pos)) - t)))) - -;; `mmm-overlays-in' has been retired as altogether too confusing a -;; name, when what is really meant is one of the following three: - -(defun mmm-overlays-containing (start stop) - "Return all MMM overlays containing the region START to STOP. -The overlays are returned in order of decreasing priority. No -attention is paid to stickiness." - (mmm-sort-overlays - (cl-remove-if-not - (lambda (ovl) - (and (overlay-get ovl 'mmm) - (<= (overlay-start ovl) start) - (>= (overlay-end ovl) stop))) - (overlays-in (max start (point-min)) - (min stop (point-max)))))) - -(defun mmm-overlays-contained-in (start stop) - "Return all MMM overlays entirely contained in START to STOP. -The overlays are returned in order of decreasing priority. No -attention is paid to stickiness." - (mmm-sort-overlays - (cl-remove-if-not - (lambda (ovl) - (and (overlay-get ovl 'mmm) - (>= (overlay-start ovl) start) - (<= (overlay-end ovl) stop))) - (overlays-in (max start (point-min)) - (min stop (point-max)))))) - -(defun mmm-overlays-overlapping (start stop) - "Return all MMM overlays overlapping the region START to STOP. -The overlays are returned in order of decreasing priority. No -attention is paid to stickiness." - (mmm-sort-overlays - (cl-remove-if-not - (lambda (ovl) - (overlay-get ovl 'mmm)) - (overlays-in (max start (point-min)) - (min stop (point-max)))))) - -(defun mmm-sort-overlays (overlays) - "Sort OVERLAYS in order of decreasing priority or nesting." - (sort (copy-sequence overlays) - (lambda (x y) - (let ((prio-x (overlay-get x 'priority)) - (prio-y (overlay-get y 'priority))) - (if (or prio-x prio-y) - (> (or prio-x 0) - (or prio-y 0)) - (> (overlay-start x) - (overlay-start y))))))) - -;;}}} -;;{{{ Current Submode - -(defvar mmm-current-overlay nil - "What submode region overlay we think we are currently in. -May be out of date; call `mmm-update-current-submode' to correct it.") -(make-variable-buffer-local 'mmm-current-overlay) - -(defvar mmm-previous-overlay nil - "What submode region overlay we were in just before this one. -Set by `mmm-update-current-submode'.") -(make-variable-buffer-local 'mmm-previous-overlay) - -(defvar mmm-current-submode nil - "What submode we think we are currently in. -May be out of date; call `mmm-update-current-submode' to correct it.") -(make-variable-buffer-local 'mmm-current-submode) - -(defvar mmm-previous-submode nil - "What submode we were in just before this one. -Set by `mmm-update-current-submode'.") -(make-variable-buffer-local 'mmm-previous-submode) - -(defun mmm-update-current-submode (&optional pos) - "Update current and previous position variables to POS, or point. -Return non-nil if the current region changed. - -Also deletes overlays that ought to evaporate because their delimiters -have disappeared." - (mapc #'delete-overlay - (cl-remove-if (lambda (ovl) - (or (not (eq (overlay-get ovl 'mmm-evap) 'front)) - (overlay-buffer (overlay-get ovl 'front)))) - (mmm-overlays-at pos))) - (let ((ovl (mmm-overlay-at pos))) - (if (eq ovl mmm-current-overlay) - nil - (mmm-set-current-pair (if ovl (overlay-get ovl 'mmm-mode)) ovl) - t))) - -(defun mmm-set-current-pair (mode ovl) - "Set the current submode to MODE, the current overlay to OVL -and update the saved previous values." - (setq mmm-previous-overlay mmm-current-overlay - mmm-previous-submode mmm-current-submode) - (setq mmm-current-submode mode - mmm-current-overlay ovl)) - -(defun mmm-submode-at (&optional pos type) - "Return the submode at POS \(or point), or NIL if none. -See `mmm-included-p' for values of TYPE." - (let ((ovl (mmm-overlay-at pos type))) - (if ovl (overlay-get ovl 'mmm-mode)))) - -;;}}} -;;{{{ Delimiter Matching and Boundaries - -(defun mmm-match-front (ovl) - "Return non-nil if the front delimiter of OVL matches as it should. -Sets the match data to the front delimiter, if it is a regexp. -Otherwise, calls it as a function with point at the beginning of the -front delimiter overlay \(i.e. where the front delimiter ought to -start) and one argument being the region overlay. The function should -return non-nil if the front delimiter matches correctly, and set the -match data appropriately." - (let* ((front-ovl (overlay-get ovl 'front)) - (front (if front-ovl (overlay-get front-ovl 'match)))) - (when front - (save-excursion - (goto-char (overlay-start front-ovl)) - (if (stringp front) - ;; It's a regexp - (looking-at front) - ;; It's a function - (funcall front ovl)))))) - -(defun mmm-match-back (ovl) - "Return non-nil if the back delimiter of OVL matches as it should. -Sets the match data to the back delimiter, if it is a regexp. -Otherwise, calls it as a function with point at the beginning of the -back delimiter overlay \(i.e. where the back delimiter ought to start) -and one argument being the region overlay. The function should return -non-nil if the back delimiter matches correctly, and set the match -data appropriately." - (let* ((back-ovl (overlay-get ovl 'back)) - (back (if back-ovl (overlay-get back-ovl 'match)))) - (when back - (save-excursion - (goto-char (overlay-start back-ovl)) - (if (stringp back) - ;; It's a regexp - (looking-at back) - ;; It's a function - (funcall back ovl)))))) - -(defun mmm-front-start (ovl) - "Return the position at which the front delimiter of OVL start." - (let ((front (overlay-get ovl 'front))) - ;; Overlays which have evaporated become "overlays in no buffer" - (if (and front (overlay-buffer front)) - (overlay-start front) - (overlay-start ovl)))) - -(defun mmm-back-end (ovl) - "Return the position at which the back delimiter of OVL ends." - (let ((back (overlay-get ovl 'back))) - ;; Overlays which have evaporated become "overlays in no buffer" - (if (and back (overlay-buffer back)) - (overlay-end back) - (overlay-end ovl)))) - -;;}}} - -;; CREATION & DELETION -;;{{{ Make Submode Regions - -(defun mmm-valid-submode-region (submode beg end) - "Check if the region between BEG and END is valid for SUBMODE. -This region must be entirely contained within zero or more existing -submode regions, none of which start or end inside it, and it must be -a valid child of the highest-priority of those regions, if any. -Signals errors, returns t if no error." - ;; First check if the placement is valid. Every existing region - ;; that overlaps this one must contain it in its entirety. - (let ((violators (cl-set-difference - (mmm-overlays-overlapping beg end) - (mmm-overlays-containing beg end)))) - (if violators - (signal 'mmm-subregion-invalid-placement - violators))) - ;; Now check if it is inside a valid parent - (let ((parent-mode (mmm-submode-at beg 'beg))) - (and parent-mode - ;; TODO: Actually check parents here. For present purposes, - ;; we just make sure we aren't putting a submode inside one - ;; of the same type. Actually, what we should really be - ;; doing is checking classes/names of regions, not just the - ;; submodes. - (eq submode parent-mode) - (signal 'mmm-subregion-invalid-parent - (list parent-mode)))) - t) - -(cl-defun mmm-make-region - (submode beg end &key face - front back (evaporation 'front) - delimiter-mode front-face back-face - display-name - (match-front "") (match-back "") - (beg-sticky t) (end-sticky t) - name creation-hook - ) - "Make a submode region from BEG to END of SUBMODE. - -BEG and END are buffer positions or markers with BEG <= END \(although -see EVAPORATION below). SUBMODE is a major mode function or a valid -argument to `mmm-modename->function'. FACE is a valid display face. - -FRONT and BACK specify the positions of the front and back delimiters -for this region, if any. If FRONT is a buffer position or marker, the -front delimiter runs from it to BEG. FRONT can also be a two-element -list \(FRONT-BEG FRONT-END) specifying the exact position of the front -delimiter. One must have FRONT-BEG < FRONT-END <= BEG. - -Similarly, BACK may be a buffer position or marker, in which case the -back delimiter runs from END to BACK. BACK can also be a two-element -list \(BACK-BEG BACK-END) specifying the exact position, in which case -we must have END <= BACK-BEG < BACK-END. - -EVAPORATION specifies under what conditions this submode region should -disappear. -* If nil, the region never disappears. This can cause serious - problems when using cut-and-paste and is not recommended. -* If the value is t, the region disappears whenever it has zero - length. This is recommended for manually created regions used for - temporary editing convenience. -* If the value is `front', the region will disappear whenever the text - in its front delimiter disappears, that is, whenever the overlay - which marks its front delimiter has zero width. -The default value is `front'. However, if the parameter FRONT is nil, -then this makes no sense, so the default becomes t. Note that if -EVAPORATION is t, then an error is signalled if BEG = END. - -MATCH-FRONT \(resp. MATCH-BACK) is a regexp or function to match the -correct delimiters, see `mmm-match-front' \(resp. `mmm-match-back'). -It is ignored if FRONT \(resp. BACK) is nil. At present these are not -used much. - -DELIMITER-MODE specifies the major mode to use for delimiter regions. -A nil value means they remain in the primary mode. - -FACE, FRONT-FACE, and BACK-FACE, are faces to use for the region, the -front delimiter, and the back delimiter, respectively, under high -decoration \(see `mmm-submode-decoration-level'). - -BEG-STICKY and END-STICKY determine whether the front and back of the -region, respectively, are sticky with respect to new insertion. The -default is yes. - -NAME is a string giving the \"name\" of this submode region. Submode -regions with the same name are considered part of the same code -fragment and formatted accordingly. - -DISPLAY-NAME is a string to display in the mode line when point is in -this submode region. If nil or not given, the name associated with -SUBMODE is used. In delimiter regions, \"--\" is shown. - -CREATION-HOOK should be a function to run after the region is created, -with point at the start of the new region." - ;; Check placement of region and delimiters - (unless (if (eq evaporation t) - (< beg end) - (<= beg end)) - (signal 'mmm-subregion-invalid-placement (list beg end))) - (when front - (unless (listp front) - (setq front (list front beg))) - (unless (and (< (car front) (cadr front)) - (<= (cadr front) beg)) - (signal 'mmm-subregion-invalid-placement front))) - (when back - (unless (listp back) - (setq back (list end back))) - (unless (and (< (car back) (cadr back)) - (<= end (car back))) - (signal 'mmm-subregion-invalid-placement back))) - (setq submode (mmm-modename->function submode)) - ;; Check embedding in existing regions - (mmm-valid-submode-region submode beg end) - (mmm-mode-on) - (when submode - (mmm-update-mode-info submode)) - (and (not front) (eq evaporation 'front) (setq evaporation t)) - (let ((region-ovl - (mmm-make-overlay submode beg end name face beg-sticky end-sticky - (or (eq evaporation t) nil) display-name))) - ;; Save evaporation type for checking later - (overlay-put region-ovl 'mmm-evap evaporation) - ;; Calculate priority to supersede anything already there. - ;; XXX: Actually, don't, in order not to hide the region highlighting. - ;; Let's try omitting the priorities and see if any problems crop up. - ;; (overlay-put region-ovl 'priority (length (mmm-overlays-at beg))) - ;; Make overlays for the delimiters, with appropriate pointers. - (when front - (let ((front-ovl - (mmm-make-overlay delimiter-mode (car front) (cadr front) - nil front-face nil nil t "--" t))) - (overlay-put region-ovl 'front front-ovl) - (overlay-put front-ovl 'region region-ovl) - (overlay-put front-ovl 'match match-front))) - (when back - (let ((back-ovl - (mmm-make-overlay delimiter-mode (car back) (cadr back) - nil back-face nil nil t "--" t))) - (overlay-put region-ovl 'back back-ovl) - (overlay-put back-ovl 'region region-ovl) - (overlay-put back-ovl 'match match-back))) - ;; Update everything and run all the hooks - (mmm-save-all - ;; Can be nil when a zero-width region is immediately evaporated - (when (overlay-start region-ovl) - (goto-char (overlay-start region-ovl))) - (mmm-set-current-pair submode region-ovl) - (mmm-set-local-variables submode region-ovl) - (mmm-run-submode-hook submode) - (when creation-hook - (funcall creation-hook))) - (mmm-update-submode-region) - region-ovl)) - -(defun mmm-make-overlay (submode beg end name face beg-sticky end-sticky evap - &optional display-name delim) - "Internal function to make submode overlays. -Does not handle delimiters. Use `mmm-make-region'." - (let ((ovl (make-overlay beg end nil (not beg-sticky) end-sticky))) - (mapc - (lambda (pair) (overlay-put ovl (car pair) (cadr pair))) - `((mmm t) ; Mark all submode overlays - (mmm-mode ,submode) - ,@(if delim '((delim t)) nil) - (mmm-local-variables - ;; Have to be careful to make new list structure here - ,(cl-list* (list 'font-lock-cache-state nil) - (list 'font-lock-cache-position (make-marker)) - (copy-tree - (cdr (assq submode mmm-region-saved-locals-defaults))))) - (name ,name) - (display-name ,display-name) - ;; Need to save these, because there's no way of accessing an - ;; overlay's official "front-advance" parameter once it's created. - (beg-sticky ,beg-sticky) - (end-sticky ,end-sticky) - ;; These have special meaning to Emacs - (,mmm-evaporate-property ,evap) - (face ,(mmm-get-face face submode delim)) - )) - ovl)) - -(defun mmm-get-face (face submode &optional delim) - (cond ((= mmm-submode-decoration-level 0) nil) - ((and (= mmm-submode-decoration-level 2) face) face) - (delim 'mmm-delimiter-face) - (submode 'mmm-default-submode-face))) - -;;}}} -;;{{{ Clear Overlays - -;; See also `mmm-clear-current-region'. - -(defun mmm-clear-overlays (&optional start stop strict) - "Clears all MMM overlays overlapping START and STOP. -If STRICT, only clear those entirely included in that region." - (mapc #'delete-overlay - (if strict - (mmm-overlays-contained-in (or start (point-min)) - (or stop (point-max))) - (mmm-overlays-overlapping (or start (point-min)) - (or stop (point-max))))) - (mmm-update-submode-region)) - -;;}}} - -;; BASIC UPDATING -;;{{{ Submode Info - -(defun mmm-update-mode-info (mode &optional force) - "Save the global-saved and buffer-saved variables for MODE. -Global saving is done on properties of the symbol MODE and buffer -saving in `mmm-buffer-saved-locals'. This function must be called for -both the dominant mode and all submodes, in each file. Region-saved -variables are initialized from `mmm-region-saved-locals-defaults', -which is set here as well. See `mmm-save-local-variables'. If FORCE -is non-nil, don't quit if the info is already there." - (let ((buffer-entry (assq mode mmm-buffer-saved-locals)) - (region-entry (assq mode mmm-region-saved-locals-defaults)) - global-vars buffer-vars region-vars - ;; http://debbugs.gnu.org/13836 - buffer-file-truename) - (unless (and (not force) - (get mode 'mmm-local-variables) - buffer-entry - region-entry) - (let ((temp-buffer (mmm-make-temp-buffer (current-buffer) - mmm-temp-buffer-name)) - (filename (buffer-file-name)) - (mmm-in-temp-buffer t) - ;; Don't try to use jit-lock, it's automatically disabled - ;; starting with 24.4 anyway. - font-lock-support-mode) - (unwind-protect - (with-current-buffer temp-buffer - ;; Handle stupid modes that need the file name set. - (when (memq mode mmm-set-file-name-for-modes) - (setq buffer-file-name filename)) - (funcall mode) - (when (featurep 'font-lock) - (put mode 'mmm-font-lock-mode font-lock-mode) - (font-lock-set-defaults) - ;; These can't be in the local variables list, because we - ;; replace their actual values, but we want to use their - ;; original values elsewhere. - (put mode 'mmm-fontify-region-function - font-lock-fontify-region-function) - (put mode 'mmm-syntax-propertize-function - (and (boundp 'syntax-propertize-function) - syntax-propertize-function)) - (put mode 'mmm-indent-line-function indent-line-function)) - ;; Get variables - (setq global-vars (mmm-get-locals 'global) - buffer-vars (mmm-get-locals 'buffer) - region-vars (mmm-get-locals 'region)) - (put mode 'mmm-mode-name mode-name)) - (kill-buffer temp-buffer))) - (put mode 'mmm-local-variables global-vars) - (if buffer-entry - (setcdr buffer-entry buffer-vars) - (push (cons mode buffer-vars) mmm-buffer-saved-locals)) - (if region-entry - (setcdr region-entry region-vars) - (push (cons mode region-vars) - mmm-region-saved-locals-defaults))))) - -;;}}} -;;{{{ Updating Hooks - -(defun mmm-update-submode-region () - "Update all MMM properties correctly for the current position. -This function and those it calls do the actual work of setting the -different keymaps, syntax tables, local variables, etc. for submodes." - (when (mmm-update-current-submode) - (mmm-save-changed-local-variables mmm-previous-submode - mmm-previous-overlay) - (let ((new-mode (or mmm-current-submode mmm-primary-mode)) - (old-mode (or mmm-previous-submode mmm-primary-mode))) - (mmm-run-constructed-hook old-mode new-mode) - (mmm-run-constructed-hook old-mode "exit") - (mmm-run-constructed-hook new-mode "enter") - (mmm-update-mode-info new-mode) - (mmm-set-local-variables new-mode mmm-current-overlay) - (mmm-enable-font-lock new-mode)) - (mmm-set-mode-line) - (dolist (func (if mmm-current-overlay - (overlay-get mmm-current-overlay 'entry-hook) - mmm-primary-mode-entry-hook)) - (ignore-errors (funcall func))))) - -(defun mmm-add-hooks () - (if (featurep 'xemacs) - (make-local-hook 'post-command-hook)) - (add-hook 'post-command-hook #'mmm-update-submode-region nil t) - (when mmm-parse-when-idle - (add-hook 'pre-command-hook #'mmm-mode-reset-timer nil t) - (add-hook 'after-change-functions #'mmm-mode-edit nil t))) - -(defun mmm-remove-hooks () - (remove-hook 'post-command-hook #'mmm-update-submode-region t) - (remove-hook 'pre-command-hook #'mmm-mode-reset-timer t) - (remove-hook 'after-change-functions #'mmm-mode-edit t)) - -;;}}} -;;{{{ Local Variables - -(defun mmm-get-local-variables-list (type mode) - "Filter `mmm-save-local-variables' to match TYPE and MODE. -Return a list \(VAR ...). In some cases, VAR will be a cons cell -\(GETTER . SETTER) -- see `mmm-save-local-variables'." - (mmm-mapcan (lambda (element) - (and (if (and (consp element) - (cdr element) - (cadr element)) - (eq (cadr element) type) - (eq type 'global)) - (if (and (consp element) - (cddr element) - (not (eq (nth 2 element) t))) - (if (functionp (nth 2 element)) - (funcall (nth 2 element)) - (member mode (nth 2 element))) - t) - (list (if (consp element) (car element) element)))) - mmm-save-local-variables)) - -(defun mmm-get-locals (type) - "Get the local variables and values for TYPE from this buffer. -Return \((VAR VALUE) ...). In some cases, VAR will be of the form -\(GETTER . SETTER) -- see `mmm-save-local-variables'." - (mmm-mapcan (lambda (var) - (if (consp var) - `((,var ,(funcall (car var)))) - (and (boundp var) - ;; This seems logical, but screws things up. - ;;(local-variable-p var) - `((,var ,(symbol-value var)))))) - (mmm-get-local-variables-list type major-mode))) - -;; FIXME: Has no callers. Used for debugging? -(defun mmm-get-saved-local (mode ovl var) - "Get the value of the local variable VAR saved for MODE and OVL, if any." - (cadr (assq var (mmm-get-saved-local-variables ovl mode)))) - -;; FIXME: It's too easy to accidentally pass nil as MODE here. -;; We probably should call this from `mmm-set-current-pair', and not -;; rely on its callers to default to the primary mode when appropriate. -;; Also, incorporate the opmimization from `mmm-fontify-region-list'. -(defun mmm-set-local-variables (mode ovl) - "Set all the local variables saved for MODE and OVL. -Looks up global, buffer and region saves. When MODE is nil, just -the region ones." - (mapcar (lambda (var) - ;; (car VAR) may be (GETTER . SETTER) - (if (consp (car var)) - (funcall (cdar var) (cadr var)) - (make-local-variable (car var)) - (set (car var) (cadr var)))) - (mmm-get-saved-local-variables mode ovl))) - -;; Used for debugging. -(defun mmm-diff-local-variables (mode ovl) - (let (res) - (mapc (lambda (var) - (let ((current-value (if (consp (car var)) - (funcall (caar var)) - (symbol-value (car var))))) - (unless (equal current-value (cadr var)) - (push - (message "var: %s, current: %s, saved: %s" (car var) - current-value (cadr var)) - res)))) - (mmm-get-saved-local-variables mode ovl)) - res)) - -(defun mmm-get-saved-local-variables (mode ovl) - (append (get mode 'mmm-local-variables) - (cdr (assq mode mmm-buffer-saved-locals)) - (if ovl - (overlay-get ovl 'mmm-local-variables) - mmm-region-saved-locals-for-dominant))) - -(defun mmm-save-changed-local-variables (mode ovl) - "Save by-buffer and by-region variables for MODE and OVL. -Called when we move to a new submode region, with MODE and OVL the -region and mode for the previous position." - (let ((buffer-vars (cdr (assq (or mode mmm-primary-mode) - mmm-buffer-saved-locals))) - (region-vars (if ovl - (overlay-get ovl 'mmm-local-variables) - mmm-region-saved-locals-for-dominant)) - (set-local-value - (lambda (var) - (setcar (cdr var) - ;; (car VAR) may be (GETTER . SETTER) - (if (consp (car var)) - (funcall (caar var)) - (symbol-value (car var))))))) - (mapc set-local-value buffer-vars) - (mapc set-local-value region-vars))) - -(defun mmm-clear-local-variables () - "Clear all buffer- and region-saved variables for current buffer." - (setq mmm-buffer-saved-locals () - mmm-region-saved-locals-defaults () - mmm-region-saved-locals-for-dominant ())) - -;;}}} - -;; FONT LOCK -;;{{{ Enable Font Lock - -(defun mmm-enable-font-lock (mode) - "Turn on font lock if it is not already on and MODE enables it." - (mmm-update-mode-info mode) - (and (not font-lock-mode) - (get mode 'mmm-font-lock-mode) - (font-lock-mode 1))) - -(defun mmm-update-font-lock-buffer () - "Turn on font lock if any mode in the buffer enables it." - (if (cl-some (lambda (mode) - (get mode 'mmm-font-lock-mode)) - (cons mmm-primary-mode - (mapcar (lambda (ovl) - (overlay-get ovl 'mmm-mode)) - (mmm-overlays-overlapping - (point-min) (point-max))))) - (font-lock-mode 1) - (font-lock-mode 0))) - -;; FIXME: Most uses of this function happen when the buffer is parsed -;; into regions manually. That should go away after -;; syntax-propertize-function does this. -(defun mmm-refontify-maybe (&optional start stop) - "Re-fontify from START to STOP, or entire buffer, if enabled." - (when font-lock-mode - (if (fboundp 'font-lock-flush) - (font-lock-flush start stop) - (if (or start stop) - (font-lock-fontify-region (or start (point-min)) - (or stop (point-max))) - (with-no-warnings (font-lock-fontify-buffer)))))) - -;;}}} -;;{{{ Get Submode Regions - -;; In theory, these are general functions that have nothing to do -;; with font-lock, but they aren't used anywhere else, so we might as -;; well have them close. - -(defun mmm-submode-changes-in (start stop) - "Return a list of all submode-change positions from START to STOP. -The list is sorted in order of increasing buffer position." - (let ((changes (sort (cl-remove-duplicates - (mmm-mapcan (lambda (ovl) - `(,(overlay-start ovl) - ,(overlay-end ovl))) - (mmm-overlays-overlapping start stop))) - #'<))) - (when (or (not changes) (< start (car changes))) - (push start changes)) - (let ((last (last changes))) - (when (> stop (car last)) - (setcdr last (list stop)))) - changes)) - -(defun mmm-regions-in (start stop) - "Return a list of regions of the form (MODE BEG END OVL) whose disjoint -union covers the region from START to STOP, including delimiters." - (when (> stop start) - (let ((regions - (cl-maplist (lambda (pos-list) - (when (cdr pos-list) - (let ((ovl (mmm-overlay-at (car pos-list) 'beg))) - (list (if ovl - (overlay-get ovl 'mmm-mode) - mmm-primary-mode) - (car pos-list) (cadr pos-list) - ovl)))) - (mmm-submode-changes-in start stop)))) - (setcdr (last regions 2) nil) - regions))) - -(defun mmm-regions-alist (start stop) - "Return a list of lists of the form \(MODE . REGIONS) where REGIONS -is a list of elements of the form \(BEG END OVL). The disjoint union all -of the REGIONS covers START to STOP." - (let ((regions (mmm-regions-in start stop)) - alist) - (mapc (lambda (region) - (let* ((mode (car region)) - (elem (cdr region)) - (kv (assoc mode alist))) - (if kv - (push elem (cdr kv)) - (push (cons mode (list elem)) alist)))) - regions) - (mapcar (lambda (kv) - (cons (car kv) (nreverse (cdr kv)))) - alist))) - -;;}}} -;;{{{ Fontify Regions - -(defun mmm-fontify-region (start stop &optional loudly) - "Fontify from START to STOP keeping track of submodes correctly." - (let ((saved-mode mmm-current-submode) - (saved-ovl mmm-current-overlay)) - (unwind-protect - (progn - (when loudly - (message "Fontifying %s with submode regions..." (buffer-name))) - ;; Necessary to catch changes in font-lock cache state and position. - (mmm-save-changed-local-variables - mmm-current-submode mmm-current-overlay) - (mapc (lambda (elt) - (when (get (car elt) 'mmm-font-lock-mode) - (mmm-fontify-region-list (car elt) (cdr elt) - start stop))) - (mmm-regions-alist start stop))) - ;; `post-command-hook' contains `mmm-update-submode-region', - ;; but jit-lock runs later, so we need to restore local vars now. - (mmm-set-current-pair saved-mode saved-ovl) - (mmm-set-local-variables (or saved-mode mmm-primary-mode) saved-ovl))) - (when loudly (message nil))) - -(defvar syntax-ppss-cache) -(defvar syntax-ppss-last) - -(defun mmm-fontify-region-list (mode regions start stop) - "Fontify REGIONS, each like (BEG END), in mode MODE. -START and STOP are the boundaries of the area to fontify." - (save-excursion - (let ((func (get mode 'mmm-fontify-region-function)) - font-lock-extend-region-functions) - (mapc (lambda (reg) - (cl-destructuring-bind (beg end ovl) reg - (goto-char beg) - ;; Here we do the same sort of thing that - ;; `mmm-update-submode-region' does, but we force it - ;; to use a specific mode, and don't save anything, - ;; fontify, or change the mode line. - (mmm-set-current-pair mode ovl) - (mmm-set-local-variables (unless (eq mmm-previous-submode mode) - mode) - mmm-current-overlay) - (save-restriction - (let ((font-lock-dont-widen t) - ;; FIXME: Messing with syntax-ppss-* vars should not - ;; be needed any more in Emacs≥26. - syntax-ppss-last syntax-ppss-cache) - ;; TODO: Remove this conditional when cc-mode - ;; respects submode boundaries. - (when (and ovl (not (memq mode mmm-c-derived-modes))) - (narrow-to-region beg end)) - (funcall func - (max beg start) - (min end stop) - nil))) - ;; Catch changes in font-lock cache. - (mmm-save-changed-local-variables - mmm-current-submode mmm-current-overlay))) - regions)))) - -;;}}} -;;{{{ Syntax - -(defvar mmm-after-syntax-propertize-functions nil - "List of functions to call after applying `syntax-table' text -properties to a submode region. It is passed four arguments: the -region overlay, the submode and the bounds of the region.") - -(defun mmm-syntax-propertize-function (start stop) - "Composite function that applies `syntax-table' text properties. -It iterates over all submode regions between START and STOP and -calls each respective submode's `syntax-propertize-function'." - (let ((saved-mode mmm-current-submode) - (saved-ovl mmm-current-overlay)) - (mmm-save-changed-local-variables - mmm-current-submode mmm-current-overlay) - (unwind-protect - (mapc (lambda (elt) - (let* ((mode (car elt)) - (func (get mode 'mmm-syntax-propertize-function)) - (beg (cadr elt)) (end (nth 2 elt)) - (ovl (nth 3 elt)) - ;; FIXME: Messing with syntax-ppss-* vars should not - ;; be needed any more in Emacs≥26. - syntax-ppss-cache - syntax-ppss-last) - (goto-char beg) - (mmm-set-current-pair mode ovl) - (mmm-set-local-variables mode mmm-current-overlay) - (save-restriction - (when mmm-current-overlay - (narrow-to-region (overlay-start mmm-current-overlay) - (overlay-end mmm-current-overlay))) - (cond - (func - (funcall func beg end)) - ((bound-and-true-p font-lock-syntactic-keywords) - (let ((syntax-propertize-function nil)) - (font-lock-fontify-syntactic-keywords-region beg end)))) - (run-hook-with-args 'mmm-after-syntax-propertize-functions - mmm-current-overlay mode beg end)))) - (mmm-regions-in start stop)) - (mmm-set-current-pair saved-mode saved-ovl) - (mmm-set-local-variables (or saved-mode mmm-primary-mode) saved-ovl)))) - -;;}}} -;;{{{ Indentation - -(defvar mmm-indent-line-function #'mmm-indent-line - "The function to call to indent a line. -This will be the value of `indent-line-function' for the whole -buffer. It's supposed to delegate to the appropriate submode's -indentation function. See `mmm-indent-line' as the starting point.") - -(defun mmm-indent-line-narrowed () - "An indent function which works on some modes where `mmm-indent-line' doesn't. -Works like `mmm-indent-line', but narrows the buffer before indenting to -appease modes which rely on constructs like (point-min) to indent." - (interactive) - (save-excursion - (back-to-indentation) - (mmm-update-submode-region) - (let ((indent-function (get - (if (and mmm-current-overlay - (> (overlay-end mmm-current-overlay) (point))) - mmm-current-submode - mmm-primary-mode) - 'mmm-indent-line-function))) - (if mmm-current-overlay - (save-restriction - (narrow-to-region (overlay-start mmm-current-overlay) - (overlay-end mmm-current-overlay)) - (funcall indent-function)) - (funcall indent-function))))) - -(defun mmm-indent-line () - (interactive) - (funcall - (save-excursion - (back-to-indentation) - (mmm-update-submode-region) - (get - (if (and mmm-current-overlay - (> (overlay-end mmm-current-overlay) (point))) - mmm-current-submode - mmm-primary-mode) - 'mmm-indent-line-function)))) - -;;}}} -(provide 'mmm-region) - -;;; mmm-region.el ends here diff --git a/elpa/mmm-mode-0.5.11/mmm-rpm.el b/elpa/mmm-mode-0.5.11/mmm-rpm.el deleted file mode 100644 index aa0fc1e..0000000 --- a/elpa/mmm-mode-0.5.11/mmm-rpm.el +++ /dev/null @@ -1,80 +0,0 @@ -;;; mmm-rpm.el --- MMM submode class for RPM spec files -*- lexical-binding: t; -*- - -;; Copyright (C) 2000 by Marcus Harnisch - -;; Author: Marcus Harnisch - -;;{{{ GPL - -;; 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 2, 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 GNU Emacs; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. - -;;}}} - -;;; Commentary: - -;; This file contains the definition of an MMM Mode submode class for -;; editing shell script sections within RPM (Redhat Package Manager) -;; spec files. I recommend to use it in combination with -;; rpm-spec-mode.el by Stig Bjrlykke and Steve -;; Sanbeg (https://github.com/stigbjorlykke/rpm-spec-mode) - -;;; Installation: - -;; 1. Copy this file where Emacs can find it. -;; -;; 2. Add the following lines to one of your startup files (e.g. ~/.emacs): -;; -;; (add-to-list 'mmm-mode-ext-classes-alist -;; '(rpm-spec-mode "\\.spec\\'" rpm-sh)) - -;;; Code: - -(require 'mmm-auto) - -(defconst mmm-rpm-sh-start-tags - '("prep" "build" "install" "clean" "preun" "postun" "pre" - "post" "triggerin" "triggerun" "triggerpostun") - "List containing RPM tags that start a shell-script section in a spec file.") - -(defvar mmm-rpm-sh-end-tags - (append '("files" "description" "package") mmm-rpm-sh-start-tags) - "List containing RPM tags that end a shell-script section in a spec file.") - -(defvar mmm-rpm-sh-start-regexp - (concat "^%" (mmm-regexp-opt mmm-rpm-sh-start-tags t) "\\b.*$") - "Regexp matching RPM tags that start a shell-script section in a spec file.") - -(defvar mmm-rpm-sh-end-regexp - (concat "\\'\\|^%" (mmm-regexp-opt mmm-rpm-sh-end-tags t) "\\b.*$") - "Regexp matching RPM tags that end a shell-script section in a spec file.") - -(mmm-add-group - 'rpm - `((rpm-sh - :submode sh-mode - :face mmm-code-submode-face - ;; match tags that starts sh-script region - :front ,mmm-rpm-sh-start-regexp - ;; match end of buffer or next tag that ends sh-script region - :back ,mmm-rpm-sh-end-regexp - :front-offset 1 - :back-offset 0 - :save-matches 0 - ))) - -(provide 'mmm-rpm) - -;;; mmm-rpm.el ends here diff --git a/elpa/mmm-mode-0.5.11/mmm-sample.el b/elpa/mmm-mode-0.5.11/mmm-sample.el deleted file mode 100644 index d6cb2d9..0000000 --- a/elpa/mmm-mode-0.5.11/mmm-sample.el +++ /dev/null @@ -1,440 +0,0 @@ -;;; mmm-sample.el --- Sample MMM submode classes -*- lexical-binding: t; -*- - -;; Copyright (C) 2000-2004, 2012-2015, 2018, 2022 Free Software Foundation, Inc. - -;; Author: Michael Abraham Shulman - -;;{{{ GPL - -;; 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 2, 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 GNU Emacs; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. - -;;}}} - -;;; Commentary: - -;; This file contains several sample submode classes for use with MMM -;; Mode. For a more detailed, advanced example, see `mmm-mason.el'. - -;; In order to use any of classes defined here, just require `mmm-auto' and -;; add the respective (major mode -> class <- file extension) associations -;; with `mmm-add-mode-ext-class'. - -;;; Code: - -(require 'cl-lib) -(require 'mmm-auto) -(require 'mmm-vars) - -;;{{{ in httpd.conf - -;; This is the simplest example. Many applications will need no more -;; than a simple regexp. -;; -;; Usage: (mmm-add-mode-ext-class 'apache-generic-mode nil 'httpd-conf-perl) - -(mmm-add-classes - '((httpd-conf-perl - :submode perl - :delimiter-mode nil - :front "" - :back ""))) - -;;}}} -;;{{{ JavaScript in HTML - -;; We use two classes here, both for code in a ") - (js-script - :submode js-mode - :face mmm-code-submode-face - :front "]*>[ \t]*\n?" - :back "[ \t]*" - :insert ((?j js-tag nil @ "" @))))) - -;;}}} -;;{{{ CSS in HTML - -(mmm-add-group - 'html-css - '((css-cdata - :submode css - :face mmm-code-submode-face - :front "]*>[ \t\n]*\\(//\\)?[ \t\n]*") - (css - :submode css - :face mmm-code-submode-face - :front "]*>[ \t]*\n?" - :back "[ \t]*" - :insert ((?c css-tag nil @ "" @))))) - -;;}}} -;;{{{ Here-documents - -;; Here we match the here-document syntax used by Perl and shell -;; scripts. We try to be automagic about recognizing what mode the -;; here-document should be in. To make sure that it is recognized -;; correctly, the name of the mode, perhaps minus `-mode', in upper -;; case, and/or with hyphens converted to underscores, should be -;; separated from the rest of the here-document name by hyphens or -;; underscores. - -(defvar mmm-here-doc-mode-alist '() - "Alist associating here-document name regexps to submodes. -Normally, this variable is unnecessary, as the `here-doc' submode -class tries to automagically recognize the right submode. If you use -here-document names that it doesn't recognize, however, then you can -add elements to this alist. Each element is \(REGEXP . MODE) where -REGEXP is a regular expression matched against the here-document name -and MODE is a major mode function symbol.") - -(defun mmm-get-lang-mode (string regex group) - "Find a suitable submode for STRING. -If REGEX matches STRING, The matching is based on the match -GROUP. - -The following ways to find a matching submode are tried in order: - -* Search `mmm-here-doc-mode-alist' for a mode. -* Try the whole name, stopping at `mode' if present. -* Try each word by itself (preference list) -* Try each word with -mode tacked on -* Try each pair of words with -mode tacked on - (w1 w2 w3) -> (w1w2-mode w2w3-mode w3-mode)" - (string-match regex string) - (setq string (match-string group string)) - (or (mmm-ensure-modename - ;; First try the user override variable. - (cl-some (lambda (pair) - (if (string-match (car pair) string) (cdr pair) nil)) - mmm-here-doc-mode-alist)) - (let ((words (split-string (downcase string) "[_-]+"))) - (or (mmm-ensure-modename - ;; Try the whole name, stopping at "mode" if present. - (intern - (mapconcat #'identity - (nconc (cl-ldiff words (member "mode" words)) - (list "mode")) - "-"))) - ;; Try each word by itself (preference list) - (cl-some (lambda (word) - (mmm-ensure-modename (intern word))) - words) - ;; Try each word with -mode tacked on - (cl-some (lambda (word) - (mmm-ensure-modename - (intern (concat word "-mode")))) - words) - ;; Try each pair of words with -mode tacked on - (cl-loop for (one two) on words - if (mmm-ensure-modename - (intern (concat one two "-mode"))) - return it) - ;; I'm unaware of any modes whose names, minus `-mode', - ;; are more than two words long, and if the entire mode - ;; name (perhaps minus `-mode') doesn't occur in the - ;; here-document name, we can give up. - (signal 'mmm-no-matching-submode nil))))) - -(defun mmm-here-doc-get-mode (string) - "Find a submode for STRING. -First match of [a-zA-Z_-]+ is used as the submode marker." - (mmm-get-lang-mode string "\\([a-zA-Z_-]+\\)" 1)) - -(mmm-add-classes - '((here-doc - :front "<<[\"\'\`]?\\([a-zA-Z0-9_-]+\\)" - :front-offset (end-of-line 1) - :back "^~1$" - :save-matches 1 - :delimiter-mode nil - :match-submode mmm-here-doc-get-mode - :insert ((?d here-doc "Here-document Name: " @ "<<" str _ "\n" - @ "\n" @ str "\n" @)) - ))) - -(defun mmm-sh-here-doc-get-mode (front-string) - "Find the mode for a shell here-doc starting with FRONT-STRING. -The matching is based on the word used as the here-document -delimiter, the word following <<. -Use `mmm-get-lang-mode' to find the submode." - (mmm-get-lang-mode front-string "<<-?\\(['\"]?\\)\\([-a-zA-Z0-9_]+\\)\\1" 2)) - -;; HEREDOC for shell scripts following the POSIX definition. It is -;; defined in two private classes that are then grouped into the class -;; sh-here-doc -;; Define some regex-parts that are reused a lot. -;; START is the '<<' sequence -(let ((start '(sequence (or line-start (not "<")) "<<")) - ;; DELIM is supposed to be a WORD, which is a complicated definition. - ;; It may be quoted with ', ", or ` - (delim '(sequence (group-n 2 (optional (any ?' ?\" ?`))) - (group-n 1 - (char "_a-zA-Z0-9") - (one-or-more (char "-" "_a-zA-Z0-9"))) - (backref 2))) - (common-props '(:front-offset (end-of-line 1) - :save-matches t - :delimiter-mode nil - :match-submode mmm-sh-here-doc-get-mode))) - (mmm-add-group - 'sh-here-doc - `((sh-here-doc-unindented - :front ,(rx-to-string `(sequence ,start ,delim)) - :back ,(rx line-start "~1" line-end) - ,@common-props - :insert ((?d here-doc "Here-document Name: " @ "<<" str _ "\n" - @ "\n" @ str "\n" @))) - (sh-here-doc-indented - :front ,(rx-to-string `(sequence ,start "-" ,delim)) - :back ,(rx line-start (zero-or-more "\t") "~1" line-end) - ,@common-props - :insert ((?D here-doc "Here-document Name: " @ "<<-" str _ "\n" - @ "\n" @ str "\n" @)))))) - -;;}}} -;;{{{ Embperl - -(mmm-add-group - 'embperl - '((embperl-perl - :submode perl - :front "\\[\\([-\\+!\\*\\$]\\)" - :back "~1\\]" - :save-matches 1 - :match-name "embperl" - :match-face (("[+" . mmm-output-submode-face) - ("[-" . mmm-code-submode-face) - ("[!" . mmm-init-submode-face) - ("[*" . mmm-code-submode-face) - ("[$" . mmm-special-submode-face)) - :insert ((?p embperl "Region Type (Character): " @ "[" str - @ " " _ " " @ str "]" @) - (?+ embperl+ ?p . "+") - (?- embperl- ?p . "-") - (?! embperl! ?p . "!") - (?* embperl* ?p . "*") - (?$ embperl$ ?p . "$") - ) - ) - (embperl-comment - :submode text-mode - :face mmm-comment-submode-face - :front "\\[#" - :back "#\\]" - :insert ((?# embperl-comment nil @ "[#" @ " " _ " " @ "#]" @)) - ))) - -;;}}} -;;{{{ ePerl - -(mmm-add-group - 'eperl - '((eperl-expr - :submode perl - :face mmm-output-submode-face - :front "<:=" - :back ":>" - :insert ((?= eperl-expr nil @ "<:=" @ " " _ " " @ ":>" @))) - (eperl-code - :submode perl - :face mmm-code-submode-face - :front "<:" - :back "_?:>" - :match-name "eperl" - :insert ((?p eperl-code nil @ "<:" @ " " _ " " @ ":>" @) - (?: eperl-code ?p . nil) - (?_ eperl-code_ nil @ "<:" @ " " _ " " @ "_:>" @))) - (eperl-comment - :submode text - :face mmm-comment-submode-face - :front ":>//" - :back "\n") - )) - -;;}}} -;;{{{ File Variables - -;; This submode class puts file local variable values, specified with -;; a `Local Variables:' line as in (emacs)File Variables, into Emacs -;; Lisp Mode. It is a good candidate to put in `mmm-global-classes'. - -(defun mmm-file-variables-verify () - ;; It would be nice to cache this somehow, which could be done in a - ;; buffer-local variable with markers for positions, but the trick - ;; is knowing when to expire the cache. - (let ((bounds - (save-excursion - (save-match-data - (goto-char (point-max)) - (backward-page) - (and (re-search-forward "^\\(.*\\)Local Variables:" nil t) - (list (match-string 1) - (progn (end-of-line) (point)) - (and (search-forward - (format "%sEnd:" (match-string 1)) - nil t) - (progn (beginning-of-line) - (point))))))))) - (and bounds (caddr bounds) - (save-match-data - (string-match (format "^%s" (regexp-quote (car bounds))) - (match-string 0))) - (> (match-beginning 0) (cadr bounds)) - (< (match-end 0) (caddr bounds))))) - -(defun mmm-file-variables-find-back (bound) - (forward-sexp) - (if (> (point) bound) - nil - (looking-at ""))) - -(mmm-add-classes - '((file-variables - :front ".+:" - :front-verify mmm-file-variables-verify - :back mmm-file-variables-find-back - :submode emacs-lisp-mode - :delimiter-mode nil - ))) - -;;}}} -;;{{{ JSP Pages - -(mmm-add-group 'jsp - `((jsp-comment - :submode text-mode - :face mmm-comment-submode-face - :front "<%--" - :back "--%>" - :insert ((?- jsp-comment nil @ "<%--" @ " " _ " " @ "--%>" @)) - ) - (jsp-code - :submode java - :match-face (("<%!" . mmm-declaration-submode-face) - ("<%=" . mmm-output-submode-face) - ("<%" . mmm-code-submode-face)) - :front "<%[!=]?" - :back "%>" - :match-name "jsp" - :insert ((?% jsp-code nil @ "<%" @ " " _ " " @ "%>" @) - (?! jsp-declaration nil @ "<%!" @ " " _ " " @ "%>" @) - (?= jsp-expression nil @ "<%=" @ " " _ " " @ "%>" @)) - ) - (jsp-directive - :submode text-mode - :face mmm-special-submode-face - :front "<%@" - :back "%>" - :insert ((?@ jsp-directive nil @ "<%@" @ " " _ " " @ "%>" @)) - ))) - -;;}}} -;;{{{ SGML DTD - -;; Thanks to Yann Dirson for writing and -;; contributing this submode class. - -(mmm-add-classes - '((sgml-dtd - :submode dtd-mode - :face mmm-declaration-submode-face - :delimiter-mode nil - :front "[]*\\[" - :back "]>"))) - -;;}}} -;;{{{ PHP in HTML - -(mmm-add-group 'html-php - '((html-php-output - :submode php-mode - :face mmm-output-submode-face - :front "<\\?php *echo " - :back "\\(\\?>\\|\\'\\)" - :include-front t - :front-offset 5 - :insert ((?e php-echo nil @ "" @)) - ) - (html-php-code - :submode php-mode - :face mmm-code-submode-face - :front "<\\?\\(php\\)?" - :back "\\(\\?>\\|\\'\\)" - :insert ((?p php-section nil @ "" @) - (?b php-block nil @ "" @)) - ))) - -;;}}} - -;; NOT YET UPDATED -;;{{{ HTML in PL/SQL;-COM- -;-COM- -;-COM-;; This one is the most complex example. In PL/SQL, HTML is generally -;-COM-;; output as a (single quote delimited) string inside a call to htp.p or -;-COM-;; its brethren. The problem is that there may be strings outside of -;-COM-;; htp.p calls that should not be HTML, so we need to only look inside -;-COM-;; these calls. The situation is complicated by PL/SQL's rule that two -;-COM-;; sequential single quotes in a string mean to put a single quote -;-COM-;; inside the string. -;-COM- -;-COM-;; These functions have not been thoroughly tested, and always search -;-COM-;; the entire buffer, ignoring START and END. -;-COM- -;-COM-(defun mmm-html-in-plsql (start end) -;-COM- (save-match-data -;-COM- (let ((case-fold-search t)) -;-COM- (and (re-search-forward "htp.p\\(\\|rn\\|rint\\)1?(" nil t) -;-COM- (mmm-html-in-plsql-in-htp -;-COM- ;; Find the end of the procedure call -;-COM- (save-excursion (forward-char -1) (forward-sexp) (point)) -;-COM- start end))))) -;-COM- -;-COM-(defun mmm-html-in-plsql-in-htp (htp-end start end) -;-COM- (let (beg end) -;-COM- (or (and (re-search-forward "'" htp-end 'limit) -;-COM- (setf beg (match-end 0)) -;-COM- ;; Find an odd number of 's to end the string. -;-COM- (do ((lgth 0 (length (match-string 0)))) -;-COM- ((oddp lgth) t) -;-COM- (re-search-forward "'+" nil t)) -;-COM- (setf end (1- (match-end 0))) -;-COM- (cons (cons beg end) -;-COM- (mmm-html-in-plsql-in-htp htp-end start end))) -;-COM- ;; No more strings in the procedure call; look for another. -;-COM- (and (eql (point) htp-end) -;-COM- (mmm-html-in-plsql start end))))) -;-COM- -;-COM-(add-to-list 'mmm-classes-alist -;-COM- '(htp-p (:function html-mode mmm-html-in-plsql))) -;-COM- -;;}}} - -(provide 'mmm-sample) - -;;; mmm-sample.el ends here diff --git a/elpa/mmm-mode-0.5.11/mmm-univ.el b/elpa/mmm-mode-0.5.11/mmm-univ.el deleted file mode 100644 index 03c6183..0000000 --- a/elpa/mmm-mode-0.5.11/mmm-univ.el +++ /dev/null @@ -1,64 +0,0 @@ -;;; mmm-univ.el --- The "Universal" Submode Class -*- lexical-binding: t; -*- - -;; Copyright (C) 2000, 2001, 2013 Free Software Foundation, Inc. - -;; Author: Michael Abraham Shulman - -;;{{{ GPL - -;; 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 2, 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 GNU Emacs; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. - -;;}}} - -;;; Commentary: - -;; This file defines the "universal" submode class, the default value -;; of `mmm-global-classes', which specifies a standard way to indicate -;; that part of a buffer should be in a different mode--for example, -;; in an email message. - -;;; Code: - -(require 'mmm-auto) -(require 'mmm-vars) - -(defun mmm-univ-get-mode (string) - (string-match "[a-zA-Z-]+" string) - (setq string (match-string 0 string)) - (let ((modestr (intern (if (string-match "mode\\'" string) - string - (concat string "-mode"))))) - (or (mmm-ensure-modename modestr) - (signal 'mmm-no-matching-submode nil)))) - -(mmm-add-classes - `((universal - :front "{%\\([a-zA-Z-]+\\)%}" - :back "{%/~1%}" - :insert ((?/ universal "Submode: " @ "{%" str "%}" @ "\n" _ "\n" - @ "{%/" str "%}" @)) - :match-submode mmm-univ-get-mode - :save-matches 1 - ))) - -(provide 'mmm-univ) - - -;;; Local Variables: -;;; mmm-global-classes: nil -;;; End: - -;;; mmm-univ.el ends here diff --git a/elpa/mmm-mode-0.5.11/mmm-utils.el b/elpa/mmm-mode-0.5.11/mmm-utils.el deleted file mode 100644 index 8014fa0..0000000 --- a/elpa/mmm-mode-0.5.11/mmm-utils.el +++ /dev/null @@ -1,162 +0,0 @@ -;;; mmm-utils.el --- Coding Utilities for MMM Mode -*- lexical-binding: t; -*- - -;; Copyright (C) 2000-2003, 2011-2013, 2020 Free Software Foundation, Inc. - -;; Author: Michael Abraham Shulman - -;;{{{ GPL - -;; 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 2, 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 GNU Emacs; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. - -;;}}} - -;;; Commentary: - -;; This file provides a number of macros and other coding utilities -;; for MMM Mode. - -;;; Code: - -;;{{{ Valid Buffer - -;; We used to wrap almost everything in this, but I realized that -;; only `mmm-mode-on' really needs it. Kept it as a macro, though, -;; for modularity and in case we need it somewhere else. -(defmacro mmm-valid-buffer (&rest body) - "Execute BODY if in a valid buffer for MMM Mode to be enabled. This -means not hidden, not a minibuffer, not in batch mode, and not in of -`mmm-never-modes'." - `(unless (or (eq (aref (buffer-name) 0) ?\ ) - (window-minibuffer-p (selected-window)) - (memq major-mode mmm-never-modes) - noninteractive - mmm-in-temp-buffer) - ,@body)) - -;;;(def-edebug-spec mmm-valid-buffer t) - -;;}}} -;;{{{ Save Everything - -;; Never trust callback functions to preserve anything. -(defmacro mmm-save-all (&rest body) - "Execute BODY forms, then restoring point, mark, current buffer, -restrictions, and match data." - (declare (indent 1) (debug t)) - `(save-excursion - (save-restriction - (save-match-data - ,@body)))) - -;;;(def-edebug-spec mmm-save-all t) - -;;}}} -;;{{{ String Formatting - -(defun mmm-format-string (string arg-pairs) - "Format STRING by replacing arguments as specified by ARG-PAIRS. -Each element of ARG-PAIRS is \(REGEXP . STR) where each STR is to be -substituted for the corresponding REGEXP wherever it matches." - (let ((case-fold-search nil)) - (save-match-data - (dolist (pair arg-pairs) - (while (string-match (car pair) string) - (setq string (replace-match - (if (fboundp 'format-mode-line) - (format-mode-line (cdr pair)) - (cdr pair)) - t t string)))))) - string) - -(defun mmm-format-matches (string &optional on-string) - "Format STRING by matches from the current match data. -Strings like ~N are replaced by the Nth subexpression from the last -global match. Does nothing if STRING is not a string. - -ON-STRING, if supplied, means to use the match data from a -`string-match' on that string, rather than the global match data." - (when (stringp string) - (let ((old-data (match-data)) - subexp) - (save-match-data - (while (string-match "~\\([0-9]\\)" string) - (setq subexp (string-to-number (match-string-no-properties 1 string)) - string (replace-match - (save-match-data - (set-match-data old-data) - (match-string-no-properties subexp on-string)) - t t string)))))) - string) - -;;}}} -;;{{{ Save Keywords - -(defmacro mmm-save-keyword (param) - "Return the list (:PARAM (symbol-value PARAM)) if PARAM is non-nil. -Return nil if PARAM is not a variable (lexical or dynamic) or has the -value nil. Best used only when it is important that nil values -disappear." - ;; Would be nice to use `ignore-error' here, but that wasn't - ;; introduced until Emacs 27.1. This condition-case does the same thing. - `(condition-case nil - (if ,param (list ,(intern (format ":%s" param)) ,param)) - ((void-variable ,param) nil))) - - -(defmacro mmm-save-keywords (&rest params) - "Return a list saving the non-nil elements of PARAMS. -For instance - \(let \(\(a 1) \(c 2) (d 3)) \(mmm-save-keywords a b c)) => \(:a 1 :c 2). -Use of this macro can make code more readable when there are a lot of -PARAMS, but less readable when there are only a few. Also best used -only when it is important that nil values disappear." - `(append ,@(mapcar (lambda (param) `(mmm-save-keyword ,param)) params))) - - -;;}}} -;;{{{ Looking Back At - -(defun mmm-looking-back-at (regexp &optional bound) - "Return t if text before point matches REGEXP. -Modifies the match data. If supplied, BOUND means not to look farther -back that that many characters before point. Otherwise, it defaults to -\(length REGEXP), which is good enough when REGEXP is a simple -string." - (eq (point) - (save-excursion - (and (re-search-backward regexp - (- (point) (or bound (length regexp))) - t) - (match-end 0))))) - -;;}}} -;;{{{ Markers - -;; Mostly for remembering interactively made regions -(defun mmm-make-marker (pos beg-p sticky-p) - "Make, and return, a marker at POS that is or isn't sticky. -BEG-P represents whether the marker delimits the beginning of a -region \(or the end of it). STICKY-P is whether it should be sticky, -i.e. whether text inserted at the marker should be inside the region." - (let ((mkr (set-marker (make-marker) pos))) - (set-marker-insertion-type mkr (if beg-p (not sticky-p) sticky-p)) - mkr)) - -;;}}} - -(provide 'mmm-utils) - -;;; mmm-utils.el ends here diff --git a/elpa/mmm-mode-0.5.11/mmm-vars.el b/elpa/mmm-mode-0.5.11/mmm-vars.el deleted file mode 100644 index 7d955fd..0000000 --- a/elpa/mmm-mode-0.5.11/mmm-vars.el +++ /dev/null @@ -1,1148 +0,0 @@ -;;; mmm-vars.el --- Variables for MMM Mode -*- lexical-binding: t; -*- - -;; Copyright (C) 2000-2004, 2011-2015, 2018-2020 Free Software Foundation, Inc. - -;; Author: Michael Abraham Shulman - -;;{{{ GPL - -;; 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 2, 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 GNU Emacs; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. - -;;}}} - -;;; Commentary: - -;; This file provides the definitions for the variables used by MMM -;; Mode, as well as several functions to manipulate them. It also -;; defines the errors that MMM Mode can signal. - -;;; Code: - -(require 'mmm-compat) -(require 'mmm-utils) -(require 'cl-lib) - -;; MISCELLANEOUS -;;{{{ Shut up the Byte Compiler - -;; Otherwise it complains about undefined variables. -(defvar mmm-current-submode) -(defvar mmm-save-local-variables) -(defvar mmm-mode-string) -(defvar mmm-submode-mode-line-format) -(defvar mmm-mode-ext-classes-alist) -(defvar mmm-mode-prefix-key) -(defvar mmm-global-mode) -(defvar mmm-primary-mode) -(defvar mmm-classes-alist) -(defvar mmm-current-overlay) -(declare-function mmm-apply-all "mmm-class") -(declare-function mmm-set-class-parameter "mmm-class" (class param value)) -(declare-function mmm-get-class-parameter "mmm-class" (class param)) - -;;}}} -;;{{{ Error Conditions - -;; Most of these should be caught internally and never seen by the -;; user, except when the user is creating submode regions manually. - -;; Signalled when we try to put a submode region inside one where it -;; isn't meant to go. -(put 'mmm-subregion-invalid-parent - 'error-conditions - '(mmm-subregion-invalid-parent mmm-error error)) -(put 'mmm-subregion-invalid-parent - 'error-message - "Invalid submode region parent") - -;; Signalled when we try to put a submode region overlapping others in -;; an invalid way. -(put 'mmm-subregion-invalid-placement - 'error-conditions - '(mmm-subregion-invalid-placement mmm-error error)) -(put 'mmm-subregion-invalid-placement - 'error-message - "Submode region placement invalid") - -;; Signalled when we try to apply a submode class that doesn't exist. -(put 'mmm-invalid-submode-class - 'error-conditions - '(mmm-invalid-submode-class mmm-error error)) -(put 'mmm-invalid-submode-class - 'error-message - "Invalid or undefined submode class") - -;; Signalled by :match-submode functions when they are unable to -;; resolve a submode. This error should *always* be caught internally -;; and never seen by the user. -(put 'mmm-no-matching-submode - 'error-conditions - '(mmm-no-matching-submode mmm-error error)) -(put 'mmm-no-matching-submode - 'error-message - "Internal error: no matching submode.") - -;;}}} - -;; USER VARIABLES -;;{{{ Customization Group - -(defgroup mmm nil - "Multiple Major Modes in one buffer." - :group 'tools) - -;;}}} -;;{{{ Save Local Variables - -(defvar mmm-c-derived-modes - '(c-mode c++-mode objc-mode pike-mode java-mode jde-mode - js-mode typescript-mode - php-mode)) - -(defvar mmm-save-local-variables - `(;; Don't use `function' (#') here!! We're already inside `quote'! - major-mode - comment-start - comment-end - (comment-line-start-skip buffer (fortran-mode)) - comment-start-skip - (comment-column buffer) - comment-indent-function - comment-line-break-function - sentence-end - ,@(when mmm-xemacs - '(mode-popup-menu - (((lambda () current-menubar) . set-buffer-menubar)) - )) - (font-lock-keywords buffer) - font-lock-set-defaults - font-lock-major-mode - font-lock-keywords-only - font-lock-keywords-case-fold-search - font-lock-syntax-table - font-lock-mark-block-function ; Override this? - font-lock-syntactic-keywords - font-lock-syntactic-face-function - parse-sexp-ignore-comments ; Fixes indentation in PHP-mode? - ;; Can be different in different buffers - (c-basic-offset - buffer (c-mode c++-mode objc-mode pike-mode java-mode jde-mode)) - ;; These are necessary for C syntax parsing - (c-class-key nil ,mmm-c-derived-modes) - (c-extra-toplevel-key nil ,mmm-c-derived-modes) - (c-inexpr-class-key nil ,mmm-c-derived-modes) - (c-conditional-key nil ,mmm-c-derived-modes) - (nxml-prolog-end region (nxml-mode)) - semantic-bovinate-toplevel-override - semantic-toplevel-bovine-table - ;; Indentation style control variables. - ;; These have to be localized in Emacs: see `mmm-mode-on'. - ,@(mapcar - (lambda (var) (list var nil mmm-c-derived-modes)) - '(c++-template-syntax-table - c-<-op-cont-regexp - c->-op-cont-regexp - c-after-brace-list-key - c-after-suffixed-type-decl-key - c-after-suffixed-type-maybe-decl-key - c-any-class-key - c-asm-stmt-kwds - c-assignment-op-regexp - c-backslash-column - c-basic-offset - c-before-context-fontification-functions - c-bitfield-kwds - c-block-comment-prefix - c-block-decls-with-vars - c-block-prefix-charset - c-block-stmt-1-2-key - c-block-stmt-1-key - c-block-stmt-1-kwds - c-block-stmt-2-key - c-block-stmt-2-kwds - c-brace-list-key - c-case-kwds-regexp - c-cast-parens - c-class-key - c-class-kwds - c-cleanup-list - c-colon-type-list-re - c-comment-only-line-offset - c-comment-prefix-regexp - c-comment-start-regexp - c-cpp-defined-fns - c-cpp-expr-functions-key - c-current-comment-prefix - c-decl-block-key - c-decl-hangon-key - c-decl-prefix-or-start-re - c-decl-prefix-re - c-decl-spec-kwds - c-decl-start-kwds - c-decl-start-re - c-doc-comment-start-regexp - ;; c-enum-clause-introduction-re - c-expr-kwds - c-file-offsets - c-file-style - c-found-types - c-not-primitive-type-keywords-regexp - c-hanging-braces-alist - c-hanging-colons-alist - c-hanging-comment-ender-p - c-hanging-comment-starter-p - c-hanging-semi\&comma-criteria - c-identifier-key - c-identifier-last-sym-match - c-identifier-start - c-identifier-syntax-modifications - c-identifier-syntax-table - c-in-comment-lc-prefix - c-indent-comment-alist - c-indent-comments-syntactically-p - c-indentation-style - c-inexpr-block-kwds - c-inexpr-class-kwds - c-keywords - c-keywords-obarray - c-keywords-regexp - c-known-type-key - c-label-kwds - c-label-kwds-regexp - c-label-minimum-indentation - c-lambda-kwds - c-literal-start-regexp - c-macro-with-semi-re - c-make-top-level-key - ;; c-make-top-level-kwds - c-noise-macro-with-parens-name-re - c-nonlabel-token-key - c-nonlabel-token-2-key - c-nonsymbol-chars - c-nonsymbol-token-regexp - c-not-decl-init-keywords - c-offsets-alist - c-opt-<>-arglist-start - c-opt-<>-arglist-start-in-paren - c-opt-<>-sexp-key - c-opt-access-key - c-opt-asm-stmt-key - c-opt-bitfield-key - c-opt-block-decls-with-vars-key - c-opt-block-stmt-key - c-opt-cpp-prefix - c-opt-cpp-start - c-opt-decl-spec-key - c-opt-friend-key - c-opt-identifier-concat-key - c-opt-inexpr-block-key - c-opt-inexpr-brace-list-key - c-opt-inexpr-class-key - c-opt-lambda-key - c-opt-method-key - c-opt-postfix-decl-spec-key - c-opt-type-component-key - c-opt-type-concat-key - c-opt-type-modifier-key - c-opt-type-suffix-key - c-other-decl-block-key - c-other-decl-block-kwds - c-other-decl-kwds - c-overloadable-operators-regexp - c-pack-key - c-paragraph-separate - c-paragraph-start - c-paren-stmt-key - c-primary-expr-regexp - c-primitive-type-key - c-primitive-type-kwds - c-protection-kwds - c-postfix-decl-spec-key - c-recognize-<>-arglists - c-recognize-knr-p - c-recognize-paren-inits - c-recognize-typeless-decls - c-regular-keywords-regexp - c-simple-stmt-key - c-simple-stmt-kwds - c-special-brace-lists - c-specifier-key - c-specifier-kwds - c-stmt-delim-chars - c-stmt-delim-chars-with-comma - c-symbol-char-key - c-symbol-key - c-symbol-start - c-syntactic-eol - c-syntactic-ws-end - c-syntactic-ws-start - c-type-decl-prefix-key - c-type-decl-suffix-key - c-type-prefix-key - c-typeof-key - c-prefix-spec-kwds-re - c-typedef-key - c-typedef-decl-key - c-type-decl-suffix-ws-ids-key - comment-end - comment-start - comment-start-skip)) - ,@(mapcar - (lambda (var) (list var nil '(js-mode))) - '(js--quick-match-re - js--quick-match-re-func)) - ,@(mapcar - (lambda (var) (list var nil '(typescript-mode))) - '(typescript--quick-match-re - typescript--quick-match-re-func)) - ;; Skeleton insertion - skeleton-transformation - ;; Abbrev mode - abbrev-mode - local-abbrev-table - ;; And finally the syntax table and local map. - ((syntax-table . set-syntax-table) buffer) - (syntax-ppss-table buffer) - ((current-local-map . use-local-map) buffer) - paragraph-separate - paragraph-start - (whitespace-active-style buffer) - (whitespace-display-table buffer) - (whitespace-display-table-was-local buffer) - (whitespace-font-lock buffer) - (whitespace-font-lock-mode buffer) - (whitespace-font-lock-keywords buffer) - (whitespace-mode buffer) - (whitespace-point--used buffer) - (whitespace-point buffer) - (whitespace-bob-marker buffer) - forward-sexp-function - smie-rules-function - smie-grammar - smie-forward-token-function - smie-backward-token-function - ) - "Which local variables to save for major mode regions. -Each element has the form \(VARIABLE [TYPE [MODES]]), causing VARIABLE -to be saved for all major modes in the list MODES. If MODES is t or -absent, the variable is saved for all major modes. MODES can also be -a function of no arguments which returns non-nil whenever the variable -should be saved. - -TYPE should be either the symbol `global', meaning to save the -variable globally, the symbol `buffer', meaning to save it per buffer, -or the symbol `region', meaning to save it for each submode region. -If TYPE has any other value, such as nil, or is absent, the variable -is saved globally. If all optional parameters are omitted, the -element may be simply VARIABLE instead of \(VARIABLE). - -It is possible for VARIABLE to be not a symbol but a cons cell of the -form \(GETTER . SETTER), thus specifying special functions to set and -get the value of the \"variable\". This is used for objects like -local maps, syntax tables, etc. which need to be installed in a -special way. GETTER should be a function of no arguments, and SETTER -a function of one. In this case, even if TYPE and MODES are omitted, -the list cannot be flattened--it must be \((GETTER . SETTER)). -\"Variables\" of this type cannot be seen with `mmm-get-saved-local'. - -A single variable may appear more than once in this list, with -different modes and/or types. If the same mode appears more than once -for the same variable with different types, the behavior is undefined. -Changing the value of this variable after MMM Mode has been activated -in some buffer may produce unpredictable results. - -Globally saved variables are saved in the mmm-local-variables property -of the mode symbol. Buffer saved variables are saved in the alist -`mmm-buffer-saved-locals'. Region saved variables are saved in the -mmm-local-variables property of the overlay.") - -(defvar mmm-buffer-saved-locals () - "Stores saved local variables for this buffer, by mode. -Each element looks like \(MODE \(VAR VALUE) ...).") -(make-variable-buffer-local 'mmm-buffer-saved-locals) - -(defvar mmm-region-saved-locals-defaults () - "Stores saved defaults for region-saved locals, by mode. -Each element looks like \(MODE \(VAR VALUE) ...). Used to initialize -new submode regions.") -(make-variable-buffer-local 'mmm-region-saved-locals-defaults) - -(defvar mmm-region-saved-locals-for-dominant () - "Stores saved region locals for the dominant major mode. -The dominant major mode is considered to be one region for purposes of -saving region variables. Region-saved variables for submode regions -are saved as overlay properties.") -(make-variable-buffer-local 'mmm-region-saved-locals-for-dominant) - -;;}}} -;;{{{ Submode Faces - -(defgroup mmm-faces nil - "Faces and coloring for submode regions. -In general, only background colors should be set, to avoid interfering -with font-lock." - :group 'mmm) - -(defcustom mmm-submode-decoration-level 1 - "*Amount of coloring to use in submode regions. -Should be either 0, 1, or 2, representing None, Low, and High amounts -of coloring respectively. -* None (0) means to use no coloring at all. -* Low (1) means to use `mmm-default-submode-face' for all submode - regions \(except for \"non-submode\" regions, i.e. those that are of - the primary mode) and `mmm-delimiter-face' for region delimiters. -* High (2) means to use different faces for different types of submode - regions and delimiters, such as initialization code, expressions that - are output, declarations, and so on, as specified by the submode - class. The default faces are still used for regions that do not - specify a face." - :group 'mmm-faces - :type '(choice (const :tag "None" 0) - (const :tag "Low" 1) - (const :tag "High" 2))) - -(defface mmm-init-submode-face '((((background light)) (:background "Pink")) - (((background dark)) (:background "MediumOrchid")) - (t (:background "Pink"))) - "Face used for submodes containing initialization code." - :group 'mmm-faces) - -(defface mmm-cleanup-submode-face '((((background light)) (:background "Wheat")) - (((background dark)) (:background "peru")) - (t (:background "Wheat"))) - "Face used for submodes containing cleanup code." - :group 'mmm-faces) - -(defface mmm-declaration-submode-face '((((background light)) (:background "Aquamarine")) - (((background dark)) (:background "DarkTurquoise")) - (t (:background "Aquamarine"))) - "Face used for submodes containing declarations." - :group 'mmm-faces) - -(defface mmm-comment-submode-face '((((background light)) (:background "SkyBlue")) - (((background dark)) (:background "SteelBlue")) - (t (:background "SkyBlue"))) - "Face used for submodes containing comments and documentation." - :group 'mmm-faces) - -(defface mmm-output-submode-face '((((background light)) (:background "Plum")) - (((background dark)) (:background "MediumVioletRed")) - (t (:background "Plum"))) - "Face used for submodes containing expression that are output." - :group 'mmm-faces) - -(defface mmm-special-submode-face '((((background light)) (:background "MediumSpringGreen")) - (((background dark)) (:background "ForestGreen")) - (t (:background "MediumSpringGreen"))) - "Face used for special submodes not fitting any other category." - :group 'mmm-faces) - -(defface mmm-code-submode-face '((((background light)) (:background "LightGray")) - (((background dark)) (:background "DimGray")) - (t (:background "LightGray"))) - "Face used for submodes containing ordinary code." - :group 'mmm-faces) - -(defface mmm-default-submode-face '((((background light)) (:background "gray85")) - (((background dark)) (:background "gray20")) - (t (:background "gray85"))) - "Face used for all submodes at decoration level 1. -Also used at decoration level 2 for submodes not specifying a type." - :group 'mmm-faces) - -(defface mmm-delimiter-face nil - "Face used to mark submode delimiters." - :group 'mmm-faces) - -;;}}} -;;{{{ Mode Line Format - -(defcustom mmm-mode-string " MMM" - "*String to display in mode line as MMM minor mode indicator." - :group 'mmm - :type 'string) - -(defcustom mmm-submode-mode-line-format "~M[~m]" - "*Format of the mode-line display when point is in a submode region. - -~M is replaced by the name of the primary major mode \(which may be -replaced by a combined-mode function, see the info documentation). - -~m is replaced by the submode region overlay's `display-name' -property, if it has one. Otherwise it is replaced by the mode name of -the submode region. - -If `mmm-primary-mode-display-name' is non-nil, then this variable is -used even when point is not in a submode region \(i.e. it is in a -primary mode region), with ~m being replaced by the value of that -variable." - :group 'mmm - :type 'string) - -(defvar mmm-primary-mode-display-name nil - "If non-nil, displayed as the primary mode name in the mode line. -See also `mmm-buffer-mode-display-name'.") -(make-variable-buffer-local 'mmm-primary-mode-display-name) - -(defvar mmm-buffer-mode-display-name nil - "If non-nil, displayed in the mode line instead of the primary mode -name, which is then shown next to it as if it were a submode when in a -primary mode region, i.e. outside all submode regions.") -(make-variable-buffer-local 'mmm-buffer-mode-display-name) - -(defun mmm-set-mode-line () - "Set the mode line display correctly for the current submode. -Format according to `mmm-submode-mode-line-format'." - (let ((primary (or mmm-primary-mode-display-name - (get mmm-primary-mode 'mmm-mode-name))) - (submode (and mmm-current-overlay - (or (overlay-get mmm-current-overlay 'display-name) - (get mmm-current-submode 'mmm-mode-name))))) - (if mmm-buffer-mode-display-name - (setq mode-name - (mmm-format-string mmm-submode-mode-line-format - `(("~M" . ,mmm-buffer-mode-display-name) - ("~m" . ,(or submode primary))))) - (if submode - (setq mode-name - (mmm-format-string mmm-submode-mode-line-format - `(("~M" . ,primary) - ("~m" . ,submode)))) - (setq mode-name primary)))) - (force-mode-line-update)) - -;;}}} -;;{{{ Submode Classes - -(defvar mmm-classes nil - "*List of submode classes that apply to a buffer. -Generally set in a file local variables list. Can either be one -symbol, or a list of symbols. Automatically buffer-local.") -(make-variable-buffer-local 'mmm-classes) - -(defvar mmm-global-classes '(universal) - "*List of submode classes that apply to all buffers. -Can be overridden in a file local variables list.") - -;;}}} -;;{{{ Modes and Extensions - -(defcustom mmm-mode-ext-classes-alist nil - "Alist of submode classes for major modes and/or file extensions. -This variable can now be directly modified. - -Elements look like \(MODE EXT CLASS), where MODE is a major mode, EXT -is a regexp to match a filename such as in `auto-mode-alist', and -CLASS is a submode class. CLASS is activated in all buffers in mode -MODE \(if non-nil) and whose filenames match EXT \(if non-nil). If -both MODE and EXT are nil, CLASS is activated in all buffers. If CLASS -is the symbol t, MMM Mode is turned on in all buffers matching MODE -and EXT, but no classes are activated. - -See `mmm-global-mode'." - :group 'mmm - :type '(repeat (list (symbol :tag "Major Mode") - (string :tag "Filename Regexp") - (symbol :tag "Class"))) - :require 'mmm-mode) - -(defun mmm-add-mode-ext-class (mode ext class) - "Add an element to `mmm-mode-ext-classes-alist', which see. -That variable can now be directly modified, so this function is -unnecessary. It probably won't go away, though." - (add-to-list 'mmm-mode-ext-classes-alist (list mode ext class))) - -;;}}} -;;{{{ Preferred Major Modes - -(defcustom mmm-major-mode-preferences - '((perl cperl-mode perl-mode) - (python python-mode python-mode) - (javascript javascript-mode c++-mode) - (java jde-mode java-mode c++-mode) - (css css-mode c++-mode)) - "User preferences about what major modes to use. -Each element has the form \(LANGUAGE . MODES) where LANGUAGE is the -name of a programming language such as `perl' as a symbol, and MODES -is a list of possible major modes to use, such as `cperl-mode' or -`perl-mode'. The first element of MODES which is `fboundp' is used -for submodes of LANGUAGE. The last element of MODES should be a mode -which will always be available." - :group 'mmm - :type '(repeat (cons symbol - (repeat - (restricted-sexp :match-alternatives - (fboundp)))))) - -(defun mmm-add-to-major-mode-preferences (language mode &optional default) - "Add major mode MODE as acceptable for LANGUAGE. -This sets the value of `mmm-major-mode-preferences'. If DEFAULT -is non-nil, MODE is added at the front of the list of modes for -LANGUAGE. Otherwise, it is added at the end. This may be used by -packages to ensure that some mode is present, but not override -any user-specified mode." - (let ((pair (assq language mmm-major-mode-preferences))) - (if pair - ;; Existing mode preferences - (if default - (setcdr pair (cons mode (cdr pair))) - (setcdr pair (append (cdr pair) (list mode)))) - ;; No existing mode preference - (add-to-list 'mmm-major-mode-preferences (list language mode))))) - -(defun mmm-ensure-modename (symbol) - "Return SYMBOL if it is a valid submode name, else nil. -Valid submode names are either `fboundp' or present as the `car' of an -element in `mmm-major-mode-preferences'." - (if (or (fboundp symbol) - (assq symbol mmm-major-mode-preferences)) - symbol - nil)) - -(defun mmm-modename->function (mode) - "Convert MODE to a mode function, nil if impossible. -Valid submode names are either `fboundp' or present as the `car' of an -element in `mmm-major-mode-preferences'. In the latter case, the -first `fboundp' element of the `cdr' is returned, or nil if none." - (if (fboundp mode) - mode - (car (cl-remove-if-not - #'fboundp - (cdr (assq mode mmm-major-mode-preferences)))))) - -;;}}} -;;{{{ Delimiter Regions - -(defcustom mmm-delimiter-mode 'fundamental-mode - "Major mode used by default for delimiter regions. -Classes are encouraged to override this by providing a delimiter-mode -parameter-- see `mmm-classes-alist'." - :group 'mmm - :type 'function) - -;;}}} -;;{{{ Key Bindings - -(defcustom mmm-mode-prefix-key [(control ?c) ?%] - "Prefix key for the MMM Minor Mode Keymap." - :group 'mmm - :type '(vector character)) - -(defcustom mmm-command-modifiers '(control) - "List of key modifiers for MMM command keys. -The MMM commands in the MMM Mode map, after `mmm-mode-prefix-key', -are bound to default keys with these modifiers added. This variable -must be set before MMM Mode is loaded to have an effect. - -It is suggested that the value of this variable be either nil or -\(control), as the default keys are either plain keys or have only a -meta modifier. The shift modifier is not particularly portable between -Emacsen. The values of this variable and `mmm-insert-modifiers' should -be disjoint." - :group 'mmm - :type '(repeat (symbol :tag "Modifier"))) - -(defcustom mmm-insert-modifiers '() - "List of key modifiers for MMM submode insertion keys. -When a key pressed after `mmm-mode-prefix-key' has no MMM Mode command -binding, and its modifiers include these, then its basic type, plus any -modifiers in addition to these, is looked up in classes' :insert -specifications. - -It is suggested that the value of this variable be either nil or -\(control), allowing submode classes to specify the presence or -absence of the meta modifier. The shift modifier is not particularly -portable between Emacsen. The values of `mmm-command-modifiers' and -this variable should be disjoint." - :group 'mmm - :type '(repeat (symbol :tag "Modifier"))) - -(defcustom mmm-use-old-command-keys nil - "Non-nil means to Use the old command keys for MMM Mode. -MMM Mode commands then have no modifier while insertion commands have -a control modifier, i.e. `mmm-command-modifiers' is set to nil and -`mmm-insert-modifiers' is set to \(control). If nil, the values of -these variables are as the default, or whatever the user has set them -to. This variable must be set before MMM Mode is loaded." - :group 'mmm - :type 'boolean) - -(defun mmm-use-old-command-keys () - "Use the old command keys \(no control modifer) in MMM Mode." - (setq mmm-command-modifiers '() - mmm-insert-modifiers '(control))) - -;;}}} -;;{{{ MMM Hooks - -(defcustom mmm-mode-hook () - "Hook run when MMM Mode is enabled in a buffer. - -A hook named mmm--hook is also run, if it exists. For -example, `mmm-html-mode-hook' is run whenever MMM Mode is entered with -HTML mode the dominant mode. - -A hook named mmm--submode-hook is run when a submode region -of a given mode is created. For example, `mmm-cperl-mode-submode-hook' -is run whenever a CPerl mode submode region is created, in any buffer. -When this hooks are run, point is guaranteed to be at the start of -the newly created submode region. - -Finally, a hook named mmm--class-hook is run whenever a buffer -is first mmm-ified with a given submode class. For example, -`mmm-mason-class-hook' is run whenever the `mason' class is first -applied in a buffer." - :group 'mmm - :type 'hook) - -(defun mmm-run-constructed-hook (body &optional suffix) - "Run the hook named `mmm---hook', if it exists. -If SUFFIX is nil or unsupplied, run `mmm--hook' instead." - (let ((hook (intern-soft (if suffix - (format "mmm-%s-%s-hook" body suffix) - (format "mmm-%s-hook" body))))) - (if hook (run-hooks hook)))) - -(defun mmm-run-major-hook () - (mmm-run-constructed-hook mmm-primary-mode)) - -(defun mmm-run-submode-hook (submode) - (mmm-run-constructed-hook submode "submode")) - -(defvar mmm-class-hooks-run () - "List of submode classes for which hooks have already been run in -the current buffer.") -(make-variable-buffer-local 'mmm-class-hooks-run) - -(defun mmm-run-class-hook (class) - (unless (member class mmm-class-hooks-run) - (mmm-run-constructed-hook class "class") - (add-to-list 'mmm-class-hooks-run class))) - -(defvar mmm-primary-mode-entry-hook nil - "Hook run when point moves into a region of the primary mode. -Each submode region can have an `entry-hook' property which is run -when they are entered, but since primary mode regions have no overlay -to store properties, this is a buffer-local variable. - -N.B. This variable is not a standard Emacs hook. Unlike Emacs' -\"local hooks\" it has *no* global value, only a local one. Its value -should always be a list of functions \(possibly empty) and never a -single function. It may be used with `add-hook', however.") -(make-variable-buffer-local 'mmm-primary-mode-entry-hook) - -;;}}} -;;{{{ Major Mode Hook - -(defcustom mmm-major-mode-hook () - "Hook run whenever a new major mode is finished starting up. -MMM Mode implements this with a hack \(see comments in the source) so -that `mmm-global-mode' will function correctly, but makes this hook -available so that others can take advantage of the hack as well. - -Note that file local variables have *not* been processed by the time -this hook is run. If a function needs to inspect them, it should also -be added to `find-file-hook'. However, `find-file-hook' is not run -when creating a non-file-based buffer, or when changing major modes in -an existing buffer." - :group 'mmm - :type 'hook) - -(defun mmm-run-major-mode-hook () - (dolist (func mmm-major-mode-hook) - (ignore-errors (funcall func)))) - -;;}}} -;;{{{ MMM Global Mode - -;; There's a point to be made that this variable should default to -;; `maybe' (i.e. not nil and not t), because that's what practically -;; everyone wants. I subscribe, however, to the view that simply -;; *loading* a lisp extension should not change the (user-visible) -;; behavior of Emacs, until it is configured or turned on in some -;; way, which dictates that the default for this must be nil. -(defcustom mmm-global-mode nil - "Specify in which buffers to turn on MMM Mode automatically. - -- If nil, MMM Mode is never enabled automatically. -- If t, MMM Mode is enabled automatically in all buffers. -- If any other symbol, MMM mode is enabled only in those buffers that - have submode classes associated with them. See `mmm-classes' and - `mmm-mode-ext-classes-alist' for more information." - :group 'mmm - :type '(choice (const :tag "Always" t) - (const :tag "Never" nil) - (other :tag "Maybe" maybe)) - :require 'mmm-mode) - -;; These are not traditional editing modes, so mmm makes no sense, and -;; can mess things up seriously if it doesn't know not to try. -(defcustom mmm-never-modes - '( - help-mode - Info-mode - dired-mode - comint-mode - telnet-mode - shell-mode - eshell-mode - forms-mode - ) - "List of modes in which MMM Mode is never activated." - :group 'mmm - :type '(repeat (symbol :tag "Mode"))) - -;;}}} -;;{{{ Buffer File Name - -(defvar mmm-set-file-name-for-modes '(mew-draft-mode) - "List of modes for which the temporary buffers MMM creates have a -file name. In these modes, this file name is the same as that of the -parent buffer. In general, this has been found to cause more problems -than it solves, but some modes require it.") - -;;}}} -;;{{{ Idle Parsing - -(defcustom mmm-parse-when-idle nil - "Non-nil to automatically reparse the buffer when it has some - modifications and Emacs has been idle for `mmm-idle-timer-delay'." - :type 'boolean - :group 'mmm) - -(defcustom mmm-idle-timer-delay 0.2 - "Delay in secs before re-parsing after user makes changes." - :type 'number - :group 'mmm) -(make-variable-buffer-local 'mmm-idle-timer-delay) - -(defvar mmm-mode-parse-timer nil "Private variable.") -(make-variable-buffer-local 'mmm-mode-parse-timer) -(defvar mmm-mode-buffer-dirty nil "Private variable.") -(make-variable-buffer-local 'mmm-mode-buffer-dirty) - -(defun mmm-mode-edit (_beg _end _len) - (setq mmm-mode-buffer-dirty t) - (mmm-mode-reset-timer)) - -(defun mmm-mode-reset-timer () - (when mmm-mode-parse-timer - (cancel-timer mmm-mode-parse-timer)) - (setq mmm-mode-parse-timer - (run-with-idle-timer mmm-idle-timer-delay nil - #'mmm-mode-idle-reparse (current-buffer)))) - -(defun mmm-mode-idle-reparse (buffer) - (when (buffer-live-p buffer) - (with-current-buffer buffer - (when mmm-mode-buffer-dirty - (mmm-apply-all) - (setq mmm-mode-buffer-dirty nil) - (setq mmm-mode-parse-timer nil))))) - -;;}}} - -;; NON-USER VARIABLES -;;{{{ Mode Variable - -(defvar mmm-mode nil - "Non-nil means MMM Mode is turned on in this buffer. -Do not set this variable directly; use the function `mmm-mode'.") -(make-variable-buffer-local 'mmm-mode) - -;;}}} -;;{{{ Primary Mode - -(defvar mmm-primary-mode nil - "The primary major mode in the current buffer.") -(make-variable-buffer-local 'mmm-primary-mode) - -;;}}} -;;{{{ Classes Alist - -;; Notes: -;; 1. :parent could be an all-class argument. Same with :keymap. -;; 2. :match-submode really does have to be distinct from :submode, -;; because 'functionp' isn't enough to distinguish which is meant. -(defvar mmm-classes-alist nil - "Alist containing all defined mmm submode classes. -A submode class is a named recipe for parsing a document into submode -regions, and sometimes for inserting new ones while editing. - -Each element of this alist looks like \(CLASS . ARGS) where CLASS is a -symbol naming the submode class and ARGS is a list of keyword -arguments, called a \"class specifier\". There are a large number of -accepted keyword arguments in the class specifier. - -The argument CLASSES, if supplied, must be a list of other submode -class names, or class specifiers, representing other classes to call -recursively. The FACE arguments of these classes are overridden by -the FACE argument of this class. If the argument CLASSES is supplied, -all other arguments to this class are ignored. That is, \"grouping\" -classes can do nothing but group other classes. - -The argument HANDLER, if supplied, also overrides any other processing. -It must be a function, and all the arguments are passed to it as -keywords, and it must do everything. See `mmm-ify' for what sorts of -things it must do. This back-door interface should be cleaned up. - -The optional argument FACE gives the display face of the submode -regions under high decoration (see `mmm-submode-decoration-level'). -It must be a valid face. The standard faces used for submode regions -are `mmm-*-submode-face' where * is one of `init', `cleanup', -`declaration', `comment', `output', `special', or `code'. A more -flexible alternative is the argument MATCH-FACE. MATCH-FACE can be a -function, which is called with one argument, the form of the front -delimiter \(found from FRONT-FORM, below), and should return the face -to use. It can also be an alist, with each element of the form -\(DELIM . FACE). - -If neither CLASSES nor HANDLER are supplied, either SUBMODE or -MATCH-SUBMODE must be. SUBMODE specifies the submode to use for the -submode regions, a symbol such as `cperl-mode' or `emacs-lisp-mode', -while MATCH-SUBMODE must be a function to be called immediately after -a match is found for FRONT, which is passed one argument, the form of -the front delimiter \(found from FRONT-FORM, below), and return a -symbol such as SUBMODE would be set to. If MATCH-SUBMODE detects an -invalid match--for example a specified mode which is not `fboundp'--it -should \(signal \\='mmm-no-matching-submode nil). - -FRONT and BACK are the means to find the submode regions, and can be -either buffer positions \(number-or-markers), regular expressions, or -functions. If they are absolute buffer positions, only one submode -region is created, from FRONT to BACK. This is generally not used in -named classes. \(Unnamed classes are created by interactive commands -in `mmm-interactive-history'). - -If FRONT is a regexp, then that regexp is searched for, and the end of -its FRONT-MATCH'th match \(or the beginning thereof, if INCLUDE-FRONT -is non-nil), plus FRONT-OFFSET, becomes the beginning of the submode -region. If FRONT is a function, that function is called instead, and -must act somewhat like a search, in that it should start at point, -take one argument as a search bound, and set the match data. A -similar pattern is followed for BACK \(the search starts at the -beginning of the submode region), save that the beginning of its -BACK-MATCH'th match \(or the end, if INCLUDE-BACK is non-nil) becomes -the end of the submode region, plus BACK-OFFSET. - -If SAVE-MATCHES is non-nil, then BACK, if it is a regexp, is formatted -by replacing strings of the form \"~N\" by the corresponding value of -\(match-string n) after matching FRONT. - -FRONT-MATCH and BACK-MATCH default to zero. They specify which -sub-match of the FRONT and BACK regexps to treat as the delimiter. -This number will be passed to any calls to `match-beginning' and -company. - -FRONT- and BACK-OFFSET default to 0. In addition to numbers, they can -also be functions to call which should move point to the correct -position for the beginning or end of the submode region. Common -choices include `beginning-of-line' and `end-of-line', and new -functions can of course be written. They can also be lists which will -be applied in sequence, such as \(end-of-line 1) meaning move to end -of line and then forward one character. - -FRONT-VERIFY and BACK-VERIFY, if supplied, must be functions that -inspect the match data to see if a match found by FRONT or BACK -respectively is valid. - -FRONT-DELIM \(resp. BACK-DELIM), if supplied, can take values like -those of FRONT-OFFSET \(resp. BACK-OFFSET), specifying the offset from -the start \(resp. end) of the match for FRONT \(resp. BACK) to use as -the starting \(resp. ending) point for the front \(resp. back) -delimiter. If nil, it means not to make a region for the respective -delimiter at all. - -DELIMITER-MODE, if supplied, specifies what submode to use for the -delimiter regions, if any. If nil, the primary mode is used. If -not supplied, `mmm-delimiter-mode' is used. - -FRONT-FACE and BACK-FACE specify faces to use for displaying the -delimiter regions, under high decoration. - -FRONT-FORM and BACK-FORM, if given, must supply a regexp used to match -the *actual* delimiter. If they are strings, they are used as-is. If -they are functions, they are called and must inspect the match data. -If they are lists, their `car' is taken as the delimiter. The default -for both is \(regexp-quote \(match-string 0)). - -The last case--them being a list--is usually used to set the delimiter -to a function. Such a function must take 1-2 arguments, the first -being the overlay in question, and the second meaning to insert the -delimiter and adjust the overlay rather than just matching the -delimiter. See `mmm-match-front', `mmm-match-back', and -`mmm-end-current-region'. - -CASE-FOLD-SEARCH, if specified, controls whether the search is -case-insensitive. See `case-fold-search'. It defaults to t. - -CREATION-HOOK, if specified, should be a function which is run -whenever a submode region is created, with point at the beginning of -the new region. One use for it is to set region-saved local variables -\(see `mmm-save-local-variables'). - -INSERT specifies the keypress insertion spec for such submode regions. -INSERT's value should be list of elements of the form \(KEY NAME . -SPEC). Each KEY should be either a character, a function key symbol, -or a dotted list \(MOD . KEY) where MOD is a symbol for a modifier -key. The use of any other modifier than meta is discouraged, as -`mmm-insert-modifiers' is sometimes set to \(control), and other -modifiers are not very portable. Each NAME should be a symbol -representing the insertion for that key. Each SPEC can be either a -skeleton, suitable for passing to `skeleton-insert' to create a -submode region, or a dotted pair \(OTHER-KEY . ARG) meaning to use the -skeleton defined for OTHER-KEY but pass it the argument ARG as the -`str' variable, possible replacing a prompt string. Skeletons for -insertion should have the symbol `_' where point \(or wrapped text) -should go, and the symbol `@' in four different places: at the -beginning of the front delimiter, the beginning of the submode region, -the end of the submode region, and the end of the back delimiter. - -If END-NOT-BEGIN is non-nil, it specifies that a BACK delimiter cannot -begin a new submode region. - -MATCH-NAME, if supplied, specifies how to determine the \"name\" for -each submode region. It must be a string or a function. If it is a -function, it is passed the value of FRONT-FORM and must return the -name to use. If it is a string, it is used as-is unless SAVE-NAME has -a non-nil value, in which case, the string is interpreted the same as -BACK when SAVE-MATCHES is non-nil. If MATCH-NAME is not specified, -the regions are unnamed. Regions with the same name are considered -part of the same chunk of code, and formatted as such, while unnamed -regions are not grouped with any others. - -As a special optimization for insertion, if SKEL-NAME is non-nil, the -insertion code will use the user-prompted string value as the region -name, instead of going through the normal matching procedure. - -PRIVATE, if supplied and non-nil, means that this class is a private -or internal class, usually one invoked by another class via :classes, -and is not for the user to see.") - -;;;###autoload -(defun mmm-add-classes (classes) - "Add the submode classes CLASSES to `mmm-classes-alist'." - (dolist (class classes) - (add-to-list 'mmm-classes-alist class))) - -(defun mmm-add-group (group classes) - "Add CLASSES and a \"grouping class\" named GROUP which calls them all. -The CLASSES are all made private, i.e. non-user-visible." - (mmm-add-classes (mapcar (lambda (class) - (append class - '(:private t))) - classes)) - (add-to-list 'mmm-classes-alist - (list group :classes (mapcar #'cl-first classes)))) - -(defun mmm-add-to-group (group classes) - "Add CLASSES to the \"grouping class\" named GROUP. -The CLASSES are all made private, i.e. non-user-visible." - (mmm-add-classes (mapcar (lambda (class) - (append class - '(:private t))) - classes)) - (mmm-set-class-parameter group :classes - (append (mmm-get-class-parameter group :classes) - (mapcar #'cl-first classes)))) - -;;}}} -;;{{{ Version Number - -(defconst mmm-version "0.5.11" - "Current version of MMM Mode.") - -(defun mmm-version () - (interactive) - (message "MMM Mode version %s by Michael Abraham Shulman" mmm-version)) - -;;}}} -;;{{{ Temp Buffer Name - -(defvar mmm-temp-buffer-name "mmm-temp-buffer" - "Name for temporary buffers created by MMM Mode. -Using non-special name, so that `font-lock-mode' will be enabled -automatically when appropriate, and will set all related vars.") - -(defvar mmm-in-temp-buffer nil - "Bound to t when working in the temp buffer.") - -;;}}} -;;{{{ Interactive History - -(defvar mmm-interactive-history nil - "History of interactive mmm-ification in the current buffer. -Elements are either submode class symbols or class specifications. -See `mmm-classes-alist' for more information.") -(make-variable-buffer-local 'mmm-interactive-history) - -(defun mmm-add-to-history (class) - (add-to-list 'mmm-interactive-history class)) - -(defun mmm-clear-history () - "Clears history of interactive mmm-ification in current buffer." - (interactive) - (setq mmm-interactive-history nil)) - -;;}}} -;;{{{ Mode/Ext Manipulation - -(defvar mmm-mode-ext-classes () - "List of classes associated with current buffer by mode and filename. -Set automatically from `mmm-mode-ext-classes-alist'.") -(make-variable-buffer-local 'mmm-mode-ext-classes) - -(defun mmm-get-mode-ext-classes () - "Return classes for current buffer from major mode and filename. -Uses `mmm-mode-ext-classes-alist' to find submode classes." - (or mmm-mode-ext-classes - (setq mmm-mode-ext-classes - (mapcar #'cl-third - (cl-remove-if-not #'mmm-mode-ext-applies - mmm-mode-ext-classes-alist))))) - -(defun mmm-clear-mode-ext-classes () - "Clear classes added by major mode and filename." - (setq mmm-mode-ext-classes nil)) - -(defun mmm-mode-ext-applies (element) - (cl-destructuring-bind (mode ext _class) element - (and (if mode - (eq mode - ;; If MMM is on in this buffer, use the primary mode, - ;; otherwise use the normal indicator. - (or mmm-primary-mode major-mode)) - t) - (if ext - (and (buffer-file-name) - (save-match-data - (string-match ext (buffer-file-name)))) - t)))) - -(defun mmm-get-all-classes (global) - "Return a list of all classes applicable to the current buffer. -These come from mode/ext associations, `mmm-classes', and interactive -history, as well as `mmm-global-classes' if GLOBAL is non-nil." - (append mmm-interactive-history - (if (listp mmm-classes) mmm-classes (list mmm-classes)) - (if global mmm-global-classes ()) - (mmm-get-mode-ext-classes))) - -;;}}} - -(provide 'mmm-vars) - -;;; mmm-vars.el ends here diff --git a/elpa/mmm-mode-0.5.11/mmm.info b/elpa/mmm-mode-0.5.11/mmm.info deleted file mode 100644 index e99d4a4..0000000 --- a/elpa/mmm-mode-0.5.11/mmm.info +++ /dev/null @@ -1,2086 +0,0 @@ -This is mmm.info, produced by makeinfo version 6.8 from mmm.texi. - -INFO-DIR-SECTION GNU Emacs Lisp -START-INFO-DIR-ENTRY -* MMM-Mode: (mmm). Multiple Major Modes for Emacs -END-INFO-DIR-ENTRY - -Copyright 2000 Michael Abraham Shulman. - - Permission is granted to make and distribute verbatim copies of this -manual provided the copyright notice and this permission notice are -preserved on all copies. - - Permission is granted to copy and distribute modified versions of -this manual under the conditions for verbatim copying, provided also -that the sections entitled “Copying” and “GNU General Public License” -are included exactly as in the original, and provided that the entire -resulting derived work is distributed under the terms of a permission -notice identical to this one. - - Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be stated in a -translation approved by the Free Software Foundation. - - -File: mmm.info, Node: Top, Next: Overview, Up: (dir) - -MMM Mode -******** - -MMM Mode is a minor mode for Emacs which allows Multiple Major Modes to -coexist in a single buffer. - -* Menu: - -* Overview:: An overview and introduction to MMM Mode. -* Basics:: The basics of how to use it. -* Customizing:: Customizing how it works to your needs. -* Supplied Classes:: The supplied submode classes. -* Writing Classes:: Writing your own submode classes. -* Indices:: Just that. - - — The Detailed Node Listing — - -Overview of MMM Mode - -* Basic Concepts:: A simple explanation of how it works. -* Installation:: How to install MMM Mode. -* Quick Start:: Getting started using MMM Mode quickly. - -MMM Mode Basics - -* MMM Minor Mode:: The Emacs minor mode that manages it all. -* Submode Classes:: What they are and how to use them. -* Selecting Classes:: How MMM Mode knows what classes to use. -* Insertion:: Inserting new submode regions automatically. -* Re-parsing:: Re-scanning for submode regions. -* Interactive:: Adding submode regions manually. -* Global Mode:: Turning MMM Mode on automatically. - -The MMM Minor Mode - -* Enabling MMM Mode:: Turning MMM Mode on and off. -* MMM Mode Keys:: Default key bindings in MMM Mode. - -How MMM Mode selects submode classes - -* File Classes:: Classes for a single file. -* Mode-Ext Classes:: Classes for a given mode or extension. -* Global Classes:: Classes for all MMM Mode buffers. - -MMM Global Mode - -* Major Mode Hook:: Using MMM’s Major Mode Hook - -Customizing MMM Mode - -* Region Coloring:: Changing or removing background colors. -* Preferred Modes:: Choosing which major modes to use. -* Mode Line:: What is displayed in the mode line. -* Key Bindings:: Customizing the MMM Mode key bindings. -* Local Variables:: What local variables are saved for submodes. -* Changing Classes:: Changing the supplied submode classes. -* Hooks:: How to make MMM Mode run your code. - -Supplied Submode Classes - -* Mason:: Mason server-side Perl in HTML. -* File Variables:: Elisp code in File Variables. -* Here-documents:: Code in shell and Perl here-documents. -* Javascript:: Javascript embedded in HTML. -* Embedded CSS:: CSS Styles embedded in HTML. -* Embperl:: Another syntax for Perl in HTML. -* ePerl:: A general Perl-embedding syntax. -* JSP:: Java code embedded in HTML. -* RPM:: Shell scripts in RPM Spec Files. -* Noweb:: Noweb literate programs. - -Writing Submode Classes - -* Basic Classes:: Writing a simple submode class. -* Paired Delimiters:: Matching paired delimiters. -* Region Placement:: Placing the region more accurately. -* Submode Groups:: Grouping several classes together. -* Calculated Submodes:: Deciding the submode at run-time. -* Calculated Faces:: Deciding the display face at run-time. -* Insertion Commands:: Inserting regions automatically. -* Region Names:: Naming regions for syntax grouping. -* Other Hooks:: Running code at arbitrary points. -* Delimiters:: Controlling delimiter overlays. -* Misc Keywords:: Other miscellaneous options. - -Indices - -* Concept Index:: Index of MMM Mode Concepts. -* Function Index:: Index of functions and variables. -* Keystroke Index:: Index of key bindings in MMM Mode. - - - -File: mmm.info, Node: Overview, Next: Basics, Prev: Top, Up: Top - -1 Overview of MMM Mode -********************** - -MMM Mode is a minor mode for Emacs which allows Multiple Major Modes to -coexist in a single buffer. The name is an abbreviation of ‘Multiple -Major Modes’(1). A major mode is a customization of Emacs for editing a -certain type of text, such as code for a specific programming language. -*Note (emacs)Major Modes::, for details. - - MMM Mode is a general extension to Emacs which is useful whenever one -file contains text in two or more programming languages, or that should -be in two or more different modes. For example: - - • CGI scripts written in any language, from Perl to PL/SQL, may want - to output verbatim HTML, and the writer of such scripts may want to - use Emacs’ html-mode or sgml-mode to edit this HTML code, while - remaining in the appropriate programming language mode for the rest - of the file. *Note Here-documents::, for example. - - • There are now many “content delivery systems” which turn the CGI - script idea around and simply add extra commands to an HTML file, - often in some programming language, which are interpreted on the - server. *Note Mason::, *Note Embperl::, *Note ePerl::, *Note - JSP::. - - • HTML itself can also contain embedded languages such as Javascript - and CSS styles, for which Emacs has different major modes. *Note - Javascript::, and *Note Embedded CSS::, for example. - - • The idea of “literate programming” requires the same file to - contain documentation (written as text, html, latex, etc.) and - code (in an appropriate programming language). *Note Noweb::, for - example. - - • Emacs allows files of any type to contain ‘local variables’, which - can include Emacs Lisp code to be evaluated. *Note (emacs)File - Variables::. It may be easier to edit this code in Emacs Lisp mode - than in whatever mode is used for the rest of the file. *Note File - Variables::. - - • There are many more possible uses for MMM Mode. RPM spec files can - contain shell scripts (*note RPM::). Email or newsgroup messages - may contain sample code. And so on. We encourage you to - experiment. - -* Menu: - -* Basic Concepts:: A simple explanation of how it works. -* Installation:: How to install MMM Mode. -* Quick Start:: Getting started using MMM Mode quickly. - - ---------- Footnotes ---------- - - (1) The name is derived from ‘mmm.el’ for XEmacs by Gongquan Chen -, from which MMM Mode was adapted. - - -File: mmm.info, Node: Basic Concepts, Next: Installation, Up: Overview - -1.1 Basic Concepts -================== - -The way MMM Mode works is as follows. Each buffer has a “dominant” or -“default” major mode, which is chosen as major modes normally are: the -user can set it interactively, or it can be chosen automatically with -‘auto-mode-alist’ (*note (emacs)Choosing Modes::). Within the file, MMM -Mode creates “submode regions” within which other major modes are in -effect. While the point is in a submode region, the following changes -occur: - - 1. The local keymap is that of the submode. This means the key - bindings for the submode are available, while those of the dominant - mode are not. - 2. The mode line (*note (emacs)Mode Line::) changes to show which - submode region is active. This can be configured; see *note Mode - Line::. - 3. The major mode menu, both on the menu bar and the mouse popup, are - that of the submode. - 4. Some local variables of the submode shadow those of the default - mode (*note Local Variables::). For the user, this serves to help - make Emacs behave as if the submode were the major mode. - 5. The syntax table and indentation are those of the submode. - 6. Font-lock (*note (emacs)Font Lock::) fontifies correctly for the - submode. - 7. The submode regions are highlighted by a background color; see - *note Region Coloring::. - - The submode regions are represented internally by Emacs Lisp objects -known as “overlays”. Some of the above are implemented by overlay -properties, and others are updated by an MMM Mode function in -‘post-command-hook’. You don’t need to know this to use MMM Mode, but -it may make any error messages you come across more understandable. -*Note (elisp)Overlays::, for more information on overlays. - - Because overlays are not saved with a file, every time a file is -opened, they must be created. Creating submode regions is occasionally -referred to as “mmm-ification”. (I’ve never had occasion to pronounce -this, but if I did I would probably say ‘mummification’. Like what they -did in ancient Egypt.) You can mmm-ify a buffer interactively, but most -often MMM Mode will find and create submode regions automatically based -on a buffer’s file extension, dominant mode, or local variables. - - -File: mmm.info, Node: Installation, Next: Quick Start, Prev: Basic Concepts, Up: Overview - -1.2 Installing MMM Mode -======================= - -The recommended way to install MMM Mode is from GNU ELPA. - - (package-install 'mmm-mode) - -You can also add the MMM Mode directory to your ‘load-path’. - - (add-to-list 'load-path "/path/to/mmm-mode/") - -The Makefile distributed with MMM Mode can be used to byte compile the -code and build the Info documentation with a simple ‘make’ command. -Don’t forget to add the MMM mode directory to your -‘Info-directory-list’. - - (add-to-list 'Info-directory-list pkg-dir) - - Once the package is installed or ‘load-path’ configured, MMM Mode -must be loaded. You can load all of MMM Mode with the line - - (require 'mmm-mode) - -but if you use MMM Mode only rarely, it may not be desirable to load all -of it at the beginning of every editing session. You can load just -enough of MMM Mode so it will turn itself on when necessary and load the -rest of itself, by using instead the line - - (require 'mmm-auto) - -in your initialization file. - - One more thing you may want to do right now is to set the variable -‘mmm-global-mode’. If this variable is ‘nil’ (the default), MMM Mode -will never turn itself on. If it is ‘t’, MMM Mode will turn itself on -in every buffer. Probably the most useful value for it, however, is the -symbol ‘maybe’ (actually, anything that is not ‘nil’ and not ‘t’), which -causes MMM Mode to turn itself on in precisely those buffers where it -would be useful. You can do this with a line such as: - - (setq mmm-global-mode 'maybe) - -in your initialization file. *Note Global Mode::, for more detailed -information. - - -File: mmm.info, Node: Quick Start, Prev: Installation, Up: Overview - -1.3 Getting Started Quickly -=========================== - -Perhaps the simplest way to create submode regions is to do it -interactively by specifying a region. First you must turn MMM Mode -on—say, with ‘M-x mmm-mode’—then place point and mark around the area -you want to make into a submode region, type ‘C-c % C-r’, and enter the -desired major mode. *Note Interactive::, for more details. - - A better way to add submode regions is by using submode classes, -which store a lot of useful information for MMM Mode about how to add -and manipulate the regions created. *Note Submode Classes::, for more -details. There are several sample submode classes that come with MMM -Mode, which are documented later in this manual. Look through these and -determine if one of them fits your needs. If so, I suggest reading the -comments on that mode. Then come back here to find out how to use it. - - To apply a submode class to a buffer interactively, turn MMM Mode on -as above, then type ‘C-c % C-c’ and enter the name of the class. -Submode regions should be added automatically, if there are any regions -in the buffer appropriate to the submode class. - - If you want a given file to always use a given submode class, you can -express this in a file variable: add a line containing the string ‘-*- -mmm-classes: CLASS -*-’ at the top of the file. CLASS can also be a -list of submode classes. *Note (emacs)File Variables::, for more -information and other methods. Now whenever MMM Mode is turned on in -that file, it will be mmm-ified according to CLASS. If -‘mmm-global-mode’ is non-nil, then MMM Mode will turn itself on whenever -a file with a ‘mmm-classes’ local variable is opened. *Note Global -Mode::, for more information. - - If you want a submode class to apply to _all_ files in a certain -major mode or with a certain extension, add a line such as this to your -initialization file: - - (mmm-add-mode-ext-class MODE EXTENSION CLASS) - -After this call, any file opened whose name matches the regular -expression EXTENSION _and_ whose default mode is MODE will be -automatically mmm-ified according to CLASS (assuming ‘mmm-global-mode’ -is non-nil). If one of EXTENSION or MODE is ‘nil’, a file need only -satisfy the other one to be mmm-ified. - - You can now read the rest of this manual to learn more about how MMM -Mode works and how to configure it to your preferences. If none of the -supplied submode classes fit your needs, then you can try to write your -own. *Note Writing Classes::, for more information. - - -File: mmm.info, Node: Basics, Next: Customizing, Prev: Overview, Up: Top - -2 MMM Mode Basics -***************** - -This chapter explains the most important parts of how to use MMM Mode. - -* Menu: - -* MMM Minor Mode:: The Emacs minor mode that manages it all. -* Submode Classes:: What they are and how to use them. -* Selecting Classes:: How MMM Mode knows what classes to use. -* Insertion:: Inserting new submode regions automatically. -* Re-parsing:: Re-scanning for submode regions. -* Interactive:: Adding submode regions manually. -* Global Mode:: Turning MMM Mode on automatically. - - -File: mmm.info, Node: MMM Minor Mode, Next: Submode Classes, Up: Basics - -2.1 The MMM Minor Mode -====================== - -An Emacs minor mode is an optional feature which can be turned on or off -in a given buffer, independently of the major mode. *Note (emacs)Minor -Modes::. MMM Mode is implemented as a minor mode ‘mmm-mode’ which -manages the submode regions. ‘mmm-mode’ must be turned on in a buffer -for submode regions to be effective. When activated, ‘mmm-mode’ is -denoted by ‘MMM’ in the mode line (*note Mode Line::). - -* Menu: - -* Enabling MMM Mode:: Turning MMM Mode on and off. -* MMM Mode Keys:: Default key bindings in MMM Mode. - - -File: mmm.info, Node: Enabling MMM Mode, Next: MMM Mode Keys, Up: MMM Minor Mode - -2.1.1 Enabling MMM Mode ------------------------ - -If ‘mmm-global-mode’ is non-‘nil’ (*note Global Mode::), ‘mmm-mode’ will -be enabled automatically whenever a file with associated submode classes -is opened (*note Selecting Classes::). It is also turned on by -interactive mmm-ification (*note Interactive::), although the -interactive commands do not have key bindings when it is not on and must -be invoked via ‘M-x’. You can also turn it on (or off) manually with -‘M-x mmm-mode’, in which case it applies all submode classes associated -with the buffer. Turning MMM Mode off automatically removes all submode -regions from the buffer. - - -- Command: mmm-mode ARG - Toggle the state of MMM Mode in the current buffer. If ARG is - supplied, turn MMM Mode on if and only if ARG is positive. - - -- Function: mmm-mode-on - Turn MMM Mode on unconditionally in the current buffer. - - -- Function: mmm-mode-off - Turn MMM Mode off unconditionally in the current buffer. - - -- Variable: mmm-mode - This variable represents whether MMM Mode is on in the current - buffer. Do not set this variable directly; use one of the above - functions. - - -File: mmm.info, Node: MMM Mode Keys, Prev: Enabling MMM Mode, Up: MMM Minor Mode - -2.1.2 Key Bindings in MMM Mode ------------------------------- - -When MMM Mode is on, it defines a number of key bindings. By default, -these are bound after the prefix sequence ‘C-c %’. Minor mode keymaps -are supposed to use ‘C-c PUNCTUATION’ sequences, and I find this one to -be a good mnemonic because ‘%’ is used by Mason to denote special tags. -This prefix key can be customized; *note Key Bindings::. - - There are two types of key bindings in MMM Mode: “commands” and -“insertions”. Command bindings run MMM Mode interactive functions to do -things like re-parse the buffer or end the current submode region, and -are defined statically as normal Emacs key-bindings. Insertion bindings -insert submode region skeletons with delimiters into the buffer, and are -defined dynamically, according to which submode classes (*note Submode -Classes::) are in effect, via a keymap default binding. - - To distinguish between the two, MMM Mode uses distinct modifier keys -for each. By default, command bindings use the control key (e.g. ‘C-c -% C-b’ re-parses the buffer), and insertion bindings do not (e.g. ‘C-c -% p’, when the Mason class is in effect, inserts a ‘<%perl>...’ -region). This makes the command bindings different from in previous -versions, however, so the variable ‘mmm-use-old-bindings’ is provided. -If this variable is set to ‘t’ before MMM Mode is loaded, the bindings -will be reversed: insertion bindings will use the control key and -command bindings will not. - - Normally, Emacs gives help on a prefix command if you type ‘C-h’ -after that command (e.g. ‘C-x C-h’ displays all key bindings starting -with ‘C-x’). Because of how insertion bindings are implemented -dynamically with a default binding, they do not show up when you hit -‘C-c % C-h’. For this reason, MMM Mode defines the command ‘C-c % h’ -which displays a list of all currently valid insertion key sequences. -If you use the defaults for command and insertion bindings, the ‘C-h’ -and ‘h’ should be mnemonic. - - In the rest of this manual, I will assume you are using the defaults -for the mode prefix (‘C-c %’) and the command and insertion modifiers. -You can customize them, however; *note Key Bindings::. - - -File: mmm.info, Node: Submode Classes, Next: Selecting Classes, Prev: MMM Minor Mode, Up: Basics - -2.2 Understanding Submode Classes -================================= - -A submode class represents a “type” of submode region. It specifies how -to find the regions, what their delimiters look like, what submode they -should be, how to insert them, and how they behave in other ways. It is -represented by a symbol, such as ‘mason’ or ‘eval-elisp’. - - For example, in the Mason set of classes, there is one class -representing all ‘<%...%>’ inline Perl regions, and one representing -regions such as ‘<%perl>...’, ‘<%init>...’, and so on. -These are different to Mason, but to Emacs they are all just Perl -sections, so they are covered by the same submode class. - - But it would be tedious if whenever we wanted to use the Mason -classes, we had to specify both of these. (Actually, this is a -simplification: there are some half a dozen Mason submode classes.) So -submode classes can also “group” others together, and we can refer to -the ‘mason’ class and mean all of them. - - The way a submode class is used is to “apply” it to a buffer. This -scans the buffer for regions which should be submode regions according -to that class, and also remembers the class for later, so that new -submode regions can be inserted and scanned for later. - - -File: mmm.info, Node: Selecting Classes, Next: Insertion, Prev: Submode Classes, Up: Basics - -2.3 How MMM Mode selects submode classes -======================================== - -Submode classes that apply to a buffer come from three sources: -mode/extension-associated classes, file-local classes, and interactive -MMM-ification (*note Interactive::). Whenever MMM Mode is turned on in -a buffer (*note MMM Minor Mode::, and *note Global Mode::), it inspects -the value of two variables to determine which classes to automatically -apply to the buffer. This covers the first two sources; the latter is -covered in a later chapter. - -* Menu: - -* File Classes:: Classes for a single file. -* Mode-Ext Classes:: Classes for a given mode or extension. -* Global Classes:: Classes for all MMM Mode buffers. - - -File: mmm.info, Node: File Classes, Next: Mode-Ext Classes, Up: Selecting Classes - -2.3.1 File-Local Submode Classes --------------------------------- - - -- Variable: mmm-classes - This variable is always buffer-local when set. Its value should be - either a single symbol or a list of symbols. Each symbol - represents a submode class that is applied to the buffer. - - ‘mmm-classes’ is usually set in a file local variables list. *Note -(emacs)File Variables::. The easiest way to do this is for the first -line of the file to contain the string ‘-*- mmm-classes: CLASSES -*-’, -where CLASSES is the desired value of ‘mmm-classes’ for the file in -question. It can also be done with a local variables list at the end of -the file. - - -File: mmm.info, Node: Mode-Ext Classes, Next: Global Classes, Prev: File Classes, Up: Selecting Classes - -2.3.2 Submode Classes Associated with Modes and Extensions ----------------------------------------------------------- - - -- User Option: mmm-mode-ext-classes-alist - This global variable associates certain submode classes with major - modes and/or file extensions. Its value is a list of elements of - the form ‘(MODE EXT CLASS)’. Any buffer whose major mode is MODE - (a symbol) _and_ whose file name matches EXT (a regular expression) - will automatically have the submode class CLASS applied to it. - - If MODE is ‘nil’, then only EXT is considered to determine if a - buffer fits the criteria, and vice versa. Thus if both MODE and - EXT are nil, then CLASS is applied to _all_ buffers in which MMM - Mode is on. Note that EXT can be any regular expression, although - its name indicates that it most often refers to the file extension. - - If CLASS is the symbol ‘t’, then no submode class is actually - applied for this association. However, if ‘mmm-global-mode’ is - non-‘nil’ and non-‘t’, MMM Mode will be turned on in matching - buffers even if there are no actual submode classes being applied. - *Note Global Mode::. - - -- Function: mmm-add-mode-ext-class MODE EXT CLASS - This function adds an element to ‘mmm-mode-ext-classes-alist’, - associating the submode class CLASS with the major mode MODE and - extension EXT. - - Older versions of MMM Mode required this function to be used to - control the value of ‘mmm-mode-ext-classes-alist’, rather than - setting it directly. In this version it is provided purely for - convenience and backward compatibility. - - -File: mmm.info, Node: Global Classes, Prev: Mode-Ext Classes, Up: Selecting Classes - -2.3.3 Globally Applied Classes and the Universal Class ------------------------------------------------------- - -In addition to file-local and mode-ext-associated submode classes, MMM -Mode also allows you to specify that certain submode classes apply to -_all_ buffers in which MMM Mode is enabled. - - -- User Option: mmm-global-classes - This variable’s value should be a list of submode classes that - apply to all buffers with MMM Mode on. It can be overriden in a - file local variables list, such as to disable global class for a - specific file. Its default value is ‘(universal)’. - - The default global class is the “universal class”, which is defined -in the file ‘mmm-univ.el’ (loaded automatically), and allows the author -of text to specify that a certain section of it be in a specific major -mode. Thus, for example, when writing an email message that includes -sample code, the author can allow readers of the message (who use emacs -and MMM) to view the code in the appropriate major mode. The syntax -used is ‘{%MODE%} ... {%/MODE%}’, where MODE should be the name of the -major mode, with or without the customary ‘-mode’ suffix: for example, -both ‘cperl’ and ‘cperl-mode’ are acceptable. - - The universal class also defines an insertion key, ‘/’, which prompts -for the submode to use. *Note Insertion::. The universal class is most -useful when ‘mmm-global-mode’ is set to ‘t’; *note Global Mode::. - - -File: mmm.info, Node: Insertion, Next: Re-parsing, Prev: Selecting Classes, Up: Basics - -2.4 Inserting new submode regions -================================= - -So much for noticing submode regions already present when you open a -file. When editing a file with MMM Mode on, you will often want to add -a new submode region. MMM Mode provides several facilities to help you. -The simplest is to just hit a few keys and have the region and its -delimiters inserted for you. - - Each submode class can define an association of keystrokes with -“skeletons” to insert a submode region. If there are several submode -classes enabled in a buffer, it is conceivable that the keys they use -for insertion might conflict, but unlikely as most buffers will not use -more than one or two submode classes groups. - - As an example of how insertion works, consider the Mason classes. In -a buffer with MMM Mode enabled and Mason associated, the key sequence -‘C-c % p’ inserts the following perl section (the semicolon is to -prevent CPerl Mode from getting confused—*note Mason::): - - <%perl>-<-; - -!- - ->- - - In this schematic representation, the string ‘-!-’ represents the -position of point (the cursor), ‘-<-’ represents the beginning of the -submode region, and ‘->-’ its end. - - All insertion keys come after the MMM Mode prefix keys (by default -‘C-c %’; *note Key Bindings::) and are by default single characters such -as ‘p’, ‘%’, and ‘i’. To avoid confusion, all the MMM Mode commands are -bound by default to control characters (after the same prefix keys), -such as ‘C-b’, ‘C-%’ and ‘C-r’. This is a change from earlier versions -of MMM Mode, and can be customized; see *note Key Bindings::. - - To find out what insertion keys are available, consult the -documentation for the submode class you are using. If it is one of the -classes supplied with MMM Mode, you can find it in this Info file. - - Because insertion keys are implemented with a “default binding” for -flexibility, they do not show up in the output of ‘C-h m’ and cannot be -found with ‘C-h k’. For this reason, MMM Mode supplies the command ‘C-c -% h’ (‘mmm-insertion-help’ to view the available insertion keys. - - -File: mmm.info, Node: Re-parsing, Next: Interactive, Prev: Insertion, Up: Basics - -2.5 Re-Parsing Submode Regions -============================== - -Describe ‘mmm-parse-buffer’, ‘mmm-parse-region’, ‘mmm-parse-block’, and -‘mmm-clear-current-region’. - - -File: mmm.info, Node: Interactive, Next: Global Mode, Prev: Re-parsing, Up: Basics - -2.6 Interactive MMM-ification Functions -======================================= - -There are several commands you can use to create submode regions -interactively, rather than by applying a submode class to a buffer. -These commands (in particular, ‘mmm-ify-region’), can be useful when -editing a file or email message containing a snippet of code in some -other language. Also see *note Global Classes::, for an alternate -approach to the same problem. - -‘C-c % C-r’ - Creates a submode region between point and mark. Prompts for the - submode to use, which must be a valid Emacs major mode name, such - as ‘emacs-lisp-mode’ or ‘cperl-mode’. Adds markers to the - interactive history. (‘mmm-ify-region’) - -‘C-c % C-c’ - Applies an already-defined submode class to the buffer, which it - prompts for. Adds this class to the interactive history. - (‘mmm-ify-by-class’) - -‘C-c % C-x’ - Scans the buffer for submode regions (prompts for the submode) - using front and back regular expressions that it also prompts for. - Briefly, it starts at the beginning of the buffer and searches for - the front regexp. If it finds a match, it searches for the back - regexp. If it finds a match for that as well, it makes a submode - region between the two matches and continues searching until no - more matches are found. Adds the regexps to the interactive - history. (‘mmm-ify-by-regexp’) - - These commands are also useful when designing a new submode class -(*note Submode Classes::). Working with the regexps interactively can -make it easier to debug and tune the class before starting to use it on -automatic. All these commands also add to value of the following -variable. - - -- Variable: mmm-interactive-history - Stores a history of all interactive mmm-ification that has been - performed in the current buffer. This way, for example, the - re-parsing functions (*note Re-parsing::) will respect - interactively added regions, and the insertion keys for classes - that were added interactively are available. - - If for any reason you want to “wipe the slate clean”, this command -should help you. By default, it has no key binding, so you must invoke -it with ‘M-x mmm-clear-history ’. - - -- Command: mmm-clear-history - Clears all history of interactive mmm-ification in the current - buffer. This command does not affect existing submode regions; to - remove them, you may want to re-parse the buffer with ‘C-c % C-b’ - (‘mmm-parse-buffer’). - - -File: mmm.info, Node: Global Mode, Prev: Interactive, Up: Basics - -2.7 MMM Global Mode -=================== - -When a file has associated submode classes (*note Selecting Classes::), -you may want MMM Mode to turn itself on and parse that file for submode -regions automatically whenever it is opened in an Emacs buffer. The -value of the following variable controls when MMM Mode turns itself on -automatically. - - -- User Option: mmm-global-mode - Do not be misled by the fact that this variable’s name ends in - ‘-mode’: it is not a simple on/off switch. There are three - possible (meanings of) values for it: ‘t’, ‘nil’, and anything - else. - - When this variable is ‘nil’, MMM Mode is never enabled - automatically. If it is enabled manually, such as by typing ‘M-x - mmm-mode’, any submode classes associated with the buffer will - still be used, however. - - When this variable is ‘t’, MMM Mode is enabled automatically in - _all_ buffers, including those not visiting files, except those - whose major mode is an element of ‘mmm-never-modes’. The default - value of this variable contains modes such as ‘help-mode’ and - ‘dired-mode’ in which most users would never want MMM Mode, and in - which MMM might cause problems. - - When this variable is neither ‘nil’ nor ‘t’, MMM Mode is enabled - automatically in all buffers that would have associated submode - classes; i.e. only if there would be something for it to do. The - value of ‘mmm-never-modes’ is still respected, however. Note that - this can include buffers not visiting files, if that buffer’s major - mode is present in ‘mmm-mode-ext-classes-alist’ with a ‘nil’ value - for EXT (*note Mode-Ext Classes::). Submode class values of ‘t’ in - ‘mmm-mode-ext-classes-alist’ cause MMM Mode to be enabled in - matching buffers, but supply no submode classes to be applied. - -* Menu: - -* Major Mode Hook:: Using MMM’s Major Mode Hook - - -File: mmm.info, Node: Major Mode Hook, Up: Global Mode - -2.7.1 The Major Mode Hook -------------------------- - -This section is intended for users who understand Emacs Lisp and want to -know how MMM Global Mode is implemented, and perhaps use the same -technique. In fact, MMM Mode exports a hook variable that you can use -easily, without understanding any of the details—see below. - - In order to enable itself in _all_ buffers, however, MMM Mode has to -hook itself into all major modes. Global Font Lock Mode from the -standard Emacs distribution (*note (emacs)Font Lock::) has a similar -problem, and solves it by adding a function to ‘change-major-mode-hook’, -which is run by ‘kill-all-local-variables’, which is run in turn by all -major mode functions at the _beginning_. This function stores a list of -which buffers need fontification. It then adds a different function to -‘post-command-hook’, which checks if the current buffer needs -fontification, and if so performs it. MMM Global Mode uses the same -technique. - - In the interests of generality, and for your use, the function that -MMM Mode runs in ‘post-command-hook’ (‘mmm-run-major-mode-hook’) is not -specific to MMM Mode, but rather runs the hook variable -‘mmm-major-mode-hook’, which by default contains a function -(‘mmm-mode-on-maybe’) which possibly turns MMM Mode on, depending on the -value of ‘mmm-global-mode’. Thus, to run another function in all major -modes, all you need to do is add it to this hook. For example, the -following line in an initialization file will turn on Auto Fill Mode -(*note (emacs)Auto Fill::) in all buffers: - - (add-hook 'mmm-major-mode-hook 'turn-on-auto-fill) - - -File: mmm.info, Node: Customizing, Next: Supplied Classes, Prev: Basics, Up: Top - -3 Customizing MMM Mode -********************** - -This chapter explains how to customize the appearance and functioning of -MMM Mode however you want. - -* Menu: - -* Region Coloring:: Changing or removing background colors. -* Preferred Modes:: Choosing which major modes to use. -* Mode Line:: What is displayed in the mode line. -* Key Bindings:: Customizing the MMM Mode key bindings. -* Local Variables:: What local variables are saved for submodes. -* Changing Classes:: Changing the supplied submode classes. -* Hooks:: How to make MMM Mode run your code. - - -File: mmm.info, Node: Region Coloring, Next: Preferred Modes, Up: Customizing - -3.1 Customizing Region Coloring -=============================== - -By default, MMM Mode highlights all submode regions with a background -color. There are three levels of this decoration, controlled by the -following variable: - - -- User Option: mmm-submode-decoration-level - This variable controls the level of coloring of submode regions. - It should be one of the integers 0, 1, or 2, representing - (respectively) none, low, and high coloring. - - No coloring means exactly that. Submode regions have the same -background as the rest of the text. This produces the minimal -interference with font-lock coloration. In particular, if you want to -use background colors for font-lock, this may be a good idea, because -the submode highlight, if present, overrides any font-lock background -coloring. - - Low coloring uses the same background color for all submode regions. -This color is specified with the face ‘mmm-default-submode-face’ (*note -(emacs)Faces::) which can be customized, either through the Emacs -“customize” interface or using direct Lisp commands such as -‘set-face-background’. Of course, other aspects of the face can also be -set, such as the foreground color, bold, underline, etc. These are more -likely to conflict with font-lock, however, so only a background color -is recommended. - - High coloring uses multiple background colors, depending on the -function of the submode region. The recognized functions and their -meanings are as follows: - -‘init’ - Code that is executed at the beginning of (something), as - initialization of some sort. - -‘cleanup’ - Code that is executed at the end of (something), as some sort of - clean up facility. - -‘declaration’ - Code that provides declarations of some sort, perhaps global or - local arguments, variables, or methods. - -‘comment’ - Text that is not executed as code, but instead serves to document - the code around it. Submode regions of this function often use a - mode such as Text Mode rather than a programming language mode. - -‘output’ - An expression that is evaluated and its value interpolated into the - output produced. - -‘code’ - Executed code not falling under any other category. - -‘special’ - Submode regions not falling under any other category, such as - component calls. - - The different background colors are provided by the faces -‘mmm-FUNCTION-submode-face’, which can be customized in the same way as -‘mmm-default-submode-face’. - - -File: mmm.info, Node: Preferred Modes, Next: Mode Line, Prev: Region Coloring, Up: Customizing - -3.2 Preferred Major Modes -========================= - -Certain of the supplied submode classes know only the language that -certain sections are written in, but not what major mode you prefer to -use to edit such code. For example, many people prefer CPerl mode over -Perl mode; you may have a special mode for Javascript or just use C++ -mode. This variable allows you to tell submodes such as Mason (*note -Mason::) and Embedded Javascript (*note Javascript::) what major mode to -use for the submodes: - - -- User Option: mmm-major-mode-preferences - The elements of this list are cons cells of the form ‘(LANGUAGE . - MODE)’. LANGUAGE should be a symbol such as ‘perl’, ‘html-js’, or - ‘java’, while MODE should be the name of a major mode such as - ‘perl-mode’, ‘cperl-mode’, ‘javascript-mode’, or ‘c++-mode’. - - You probably won’t have to set this variable at all; MMM tries to - make intelligent guesses about what modes you prefer. For example, - if a function called ‘javascript-mode’ exists, it is chosen, - otherwise ‘c++-mode’ is used. Similarly for ‘jde-mode’ and - ‘java-mode’. - - If you do need to change the defaults, you may find the following -function convenient. - - -- Function: mmm-set-major-mode-preferences LANGUAGE MODE &optional - DEFAULT - Set the preferred major mode for LANGUAGE to MODE. If there is - already a mode specified for LANGUAGE, and DEFAULT is nil or - unsupplied, then it is changed. If DEFAULT is non-nil, then any - existing mode is unchanged. This is used by packages to ensure - that some mode is present, but not override any user-specified - mode. If you are not writing a submode class, you should ignore - the third argument. - - Thus, for example, to use ‘my-java-mode’ for Java code, you would use -the following line: - - (mmm-set-major-mode-preferences 'java 'my-java-mode) - - -File: mmm.info, Node: Mode Line, Next: Key Bindings, Prev: Preferred Modes, Up: Customizing - -3.3 Customizing the Mode Line Display -===================================== - -By default, when in a submode region, MMM Mode changes the section of -the mode line (*note (emacs)Mode Line::) that normally displays the -major mode name—for example, ‘HTML’—to instead show both the dominant -major mode and the currently active submode—for example, ‘HTML[CPerl]’. -You can change this format, however. - - -- User Option: mmm-submode-mode-line-format - The value of this variable should be a string containing one or - both of the escape sequences ‘~M’ and ‘~m’. The string displayed - in the major mode section of the mode line when in a submode is - obtained by replacing all occurrences of ‘~M’ with the dominant - major mode name and ‘~m’ with the currently active submode name. - For example, to display only the currently active submode, set this - variable to ‘~m’. The default value is ‘~M[~m]’. - - The MMM minor mode also normally displays the string ‘MMM’ in the -minor mode section of the mode line to indicate when it is active. You -can customize or disable this as well. - - -- User Option: mmm-mode-string - This string is displayed in the minor mode section of the mode line - when the MMM minor mode is active. If nonempty, it should begin - with a space to separate the MMM indicator from that of other minor - modes. To eliminate the indicator entirely, set this variable to - the empty string. - - -File: mmm.info, Node: Key Bindings, Next: Local Variables, Prev: Mode Line, Up: Customizing - -3.4 Customizing the MMM Mode Key Bindings -========================================= - -The default MMM Mode key bindings are explained in *note MMM Mode -Keys::, and in *note Insertion::. There are a couple of ways to -customize these bindings. - - -- User Option: mmm-mode-prefix-key - The value of this variable (default is ‘C-c %’) should be a key - sequence to use as the prefix for the MMM Mode keymap. Minor modes - typically use ‘C-c’ followed by a punctuation character, but you - can change it to any user-available key sequence. To have an - effect, this variable should be set before MMM Mode is loaded. - - -- User Option: mmm-use-old-command-keys - When this variable is ‘nil’, MMM Mode commands use the control - modifier and insertion keys no modifier. Any other value switches - the two, so that ‘mmm-parse-buffer’, for example, is bound to ‘C-c - % b’, while perl-section insertion in the Mason class is bound to - ‘C-c % C-p’. This variable should be set before MMM Mode is loaded - to have an effect. - - When MMM is loaded, it uses the value of ‘mmm-use-old-command-keys’ -to set the values of the variables ‘mmm-command-modifiers’ and -‘mmm-insert-modifiers’, so if you prefer you can set these variables -instead. They should each be a list of key modifiers, such as -‘(control)’ or ‘()’. The Meta modifier is used in some of the command -and insertion keys, so it should not be used, and the Shift modifier is -not particularly portable between Emacsen—if it works for you, feel free -to use it. Other modifiers, such as Hyper and Super, are not -universally available, but are valid when present. - - -File: mmm.info, Node: Local Variables, Next: Changing Classes, Prev: Key Bindings, Up: Customizing - -3.5 Changing Saved Local Variables -================================== - -A lot of the functionality of MMM Mode—that which makes the major mode -appear to change—is implemented by saving and restoring the values of -local variables, or pseudo-variables. You can customize what variables -are saved, and how, with the following variable. - - -- Variable: mmm-save-local-variables - At its simplest, this is a list each of whose elements is a - buffer-local variable whose value is saved and restored for each - major mode. Each elements can also, however, be a list whose first - element is the variable symbol and whose subsequent elements - specify how and where the variable is to be saved. The second - element of the list, if present, should be one of the symbols - ‘global’, ‘buffer’, or ‘region’. If not present, the default value - is ‘global’. The third element, if present, should be a list of - major mode symbols in which to save the variable. In the list - form, the variable symbol itself can be replaced with a cons cell - of two functions, one to get the value and one to set the value. - This is called a “pseudo-variable”. - - Globally saved variables are the same in all (MMM-controlled) buffers -and submode regions of each major mode listed in the third argument, or -all major modes if it is ‘t’ or not present. Buffer-saved variables are -the same in all submode regions of a given major mode in each buffer, -and region-saved variables can be different for each submode region. - - Pseudo-variables are used, for example, to save and restore the -syntax table (*note (emacs)Syntax::) and mode keymaps (*note -(emacs)Keymaps::). - - -File: mmm.info, Node: Changing Classes, Next: Hooks, Prev: Local Variables, Up: Customizing - -3.6 Changing the Supplied Submode Classes -========================================= - -If you need to use MMM with a syntax for which a submode class is not -supplied, and you have some facility with Emacs Lisp, you can write your -own; see *note Writing Classes::. However, sometimes you will only want -to make a slight change to one of the supplied submode classes. You can -do this, after that class is loaded, with the following functions. - - -- Function: mmm-set-class-parameter CLASS PARAM VALUE - Set the value of the keyword parameter PARAM of the submode class - CLASS to VALUE. *Note Writing Classes::, for an explanation of the - meaning of each keyword parameter. This creates a new parameter if - one is not already present in the class. - - -- Function: mmm-get-class-parameter CLASS PARAM - Get the value of the keyword parameter PARAM for the submode class - CLASS. Returns ‘nil’ if there is no such parameter. - - -File: mmm.info, Node: Hooks, Prev: Changing Classes, Up: Customizing - -3.7 Hooks Provided by MMM Mode -============================== - -MMM Mode defines several hook variables (*note (emacs)Hooks::) which are -run at different times. The most often used is ‘mmm-major-mode-hook’ -which is described in *note Major Mode Hook::, but there are a couple -others. - - -- Variable: mmm-mode-hook - This normal hook is run whenever MMM Mode is enabled in a buffer. - - -- Variable: mmm-MAJOR-MODE-hook - This is actually a whole set of hook variables, a different one for - every major mode. Whenever MMM Mode is enabled in a buffer, the - corresponding hook variable for the dominant major mode is run. - - -- Variable: mmm-SUBMODE-submode-hook - Again, this is a set of one hook variable per major mode. These - hooks are run whenever a submode region of the corresponding major - mode is created in any buffer, with point at the start of the new - submode region. - - -- Variable: mmm-CLASS-class-hook - This is a set of one hook variable per submode class. These hooks - are run when a submode class is first applied to a given buffer. - - Submode classes also have a ‘:creation-hook’ parameter which should -be a function to run whenever a submode region is created with that -class, with point at the beginning of the submode region. This can be -set for supplied submode classes with ‘mmm-set-class-parameter’; *note -Changing Classes::. - - -File: mmm.info, Node: Supplied Classes, Next: Writing Classes, Prev: Customizing, Up: Top - -4 Supplied Submode Classes -************************** - -This chapter describes the submode classes that are supplied with MMM -Mode. - -* Menu: - -* Mason:: Mason server-side Perl in HTML. -* File Variables:: Elisp code in File Variables. -* Here-documents:: Code in shell and Perl here-documents. -* Javascript:: Javascript embedded in HTML. -* Embedded CSS:: CSS Styles embedded in HTML. -* Embperl:: Another syntax for Perl in HTML. -* ePerl:: A general Perl-embedding syntax. -* JSP:: Java code embedded in HTML. -* RPM:: Shell scripts in RPM Spec Files. -* Noweb:: Noweb literate programs. - - -File: mmm.info, Node: Mason, Next: File Variables, Up: Supplied Classes - -4.1 Mason: Perl in HTML -======================= - -Mason is a syntax to embed Perl code in HTML and other documents. See - for more information. The submode class for -Mason components is called ‘mason’ and is loaded on demand from -‘mmm-mason.el’. The current Mason class is intended to correctly -recognize all syntax valid in Mason 0.896. There are insertion keys for -most of the available syntax; use ‘mmm-insertion-help’ (‘C-c % h’ by -default) with Mason on to get a list. - - If you want to have mason submodes automatically in all Mason files, -you can use automatic mode and filename associations; the details depend -on what you call your Mason components and what major mode you use. -*Note Mode-Ext Classes::. If you use an extension for your Mason files -that emacs does not automatically place in your preferred HTML Mode, you -will probably want to associate that extension with your HTML Mode as -well; *note (emacs)Choosing Modes::. This also goes for “special” Mason -files such as autohandlers and dhandlers. - - The Perl mode used is controlled by the user: *Note Preferred -Modes::. The default is to use CPerl mode, if present. Unfortunately, -there are also certain problems with CPerl mode in submode regions. -(Not to say that the original perl-mode would do any better—it hasn’t -been much tried.) First of all, the first line of a Perl section is -usually indented as if it were a continuation line. A fix for this is -to start with a semicolon on the first line. The insertion key commands -do this whenever the Mason syntax allows it. - - <%perl>; - print $var; - - - In addition, some users have reported that the CPerl indentation -sometimes does not work. This problem has not yet been tracked down, -however, and more data about when it happens would be helpful. - - Some people have reported problems using PSGML with Mason. Adding -the following line to a ‘.emacs’ file should suffice to turn PSGML off -and cause emacs to use a simpler HTML mode: - - (autoload 'html-mode "sgml-mode" "HTML Mode" t) - - Earlier versions of PSGML may require instead the following fix: - - (delete '("\\.html$" . sgml-html-mode) auto-mode-alist) - (delete '("\\.shtml$" . sgml-html-mode) auto-mode-alist) - - Other users report using PSGML with Mason and MMM Mode without -difficulty. If you don’t have problems and want to use PSGML, you may -need to replace ‘html-mode’ in the suggested code with ‘sgml-html-mode’. -(Depending on your version of PSGML, this may not be necessary.) -Similarly, if you are using XEmacs and want to use the alternate HTML -mode ‘hm--html-mode’, replace ‘html-mode’ with that symbol. - - One problem that crops up when using PSGML with Mason is that even -ignoring the special tags and Perl code (which, as I’ve said, haven’t -caused me any problems), Mason components often are not a complete SGML -document. For instance, my autohandlers often say - - - <% $m->call_next %> - - - in which case the actual components contain no doctype declaration, -‘’, ‘’, or ‘’, confusing PSGML. One solution I’ve -found is to use the variable ‘sgml-parent-document’ in such incomplete -components; try, for example, these lines at the end of a component. - - %# Local Variables: - %# sgml-parent-document: ("autohandler" "body" nil ("body")) - %# sgml-doctype: "/top/level/autohandler" - %# End: - - This tells PSGML that the current file is a sub-document of the file -‘autohandler’ and is included inside a ‘’ tag, thus alleviating -its confusion. - - -File: mmm.info, Node: File Variables, Next: Here-documents, Prev: Mason, Up: Supplied Classes - -4.2 Elisp in a Local Variables List -=================================== - -Emacs allows the author of a file to specify major and minor modes to be -used while editing that file, as well as specifying values for other -local Elisp variables, with a File Variables list. *Note (emacs)File -Variables::. Since file variables values are Elisp objects (and with -the ‘eval’ special “variable”, they are forms to be evaluated), one -might want to edit them in ‘emacs-lisp-mode’. The submode class -‘file-variables’ allows this, and is suitable for turning on in a given -file with ‘mmm-classes’, or in all files with ‘mmm-global-classes’. - - -File: mmm.info, Node: Here-documents, Next: Javascript, Prev: File Variables, Up: Supplied Classes - -4.3 Here-documents -================== - -One of the long-time standard syntaxes for outputting large amounts of -code (or text, or HTML, or whatever) from a script (notably shell -scripts and Perl scripts) is the here-document syntax: - - print < - - Test Page - - - END_HTML - - The ‘here-doc’ submode class supports the general case of -here-documents while the ‘sh-here-doc’ class has more specialized -support for shell scripts. They can both guess the correct submode to -use based on the “delimiter” (‘END_HTML’ in the example) used. For -instance, it would put the above example in ‘html-mode’, noticing the -string ‘HTML’ in the delimiter of the here-document. Generally speaking -any language mode can be found if the language name is one of the words -in delimiter, but be aware that the first word that matches will be -used. The ‘mmm-major-mode-preferences’ list is checked for any language -mode preferences, as described in *note Preferred Modes::. If you use -less than evocative here-document names, or if the submode is recognized -incorrectly for any other reason, you can tell it explicitly what -submode to use. - - -- User Option: mmm-here-doc-mode-alist - The value of this variable should be an alist, each element a cons - pair associating a regular expression to a submode symbol. - Whenever a here-document name matches one of these regexps, the - corresponding submode is applied. For example, if this variable - contains the element ‘("CODE" . cc-mode)’, then any here-document - whose name contains the string ‘CODE’ will be put in ‘cc-mode’. - The value of this variable overrides any guessing that the - ‘here-doc’ submode class would do otherwise. - - -File: mmm.info, Node: Javascript, Next: Embedded CSS, Prev: Here-documents, Up: Supplied Classes - -4.4 Javascript in HTML -====================== - -The submode class ‘html-js’ allows for embedding Javascript code in HTML -documents. It recognizes both this syntax: - - - - and this syntax: - - - - The mode used for Javascript regions is controlled by the user; *Note -Preferred Modes::. - - -File: mmm.info, Node: Embedded CSS, Next: Embperl, Prev: Javascript, Up: Supplied Classes - -4.5 CSS embedded in HTML -======================== - -CSS (Cascading Style Sheets) can also be embedded in HTML. The -‘embedded-css’ submode class recognizes this syntax: - - - - It uses ‘css-mode’ if present, ‘c++-mode’ otherwise. This can be -customized: *Note Preferred Modes::. - - -File: mmm.info, Node: Embperl, Next: ePerl, Prev: Embedded CSS, Up: Supplied Classes - -4.6 Embperl: More Perl in HTML -============================== - -Embperl is another syntax for embedding Perl in HTML. See - for more information. The ‘embperl’ -submode class recognizes most if not all of the Embperl embedding -syntax. Its Perl mode is also controllable by the user; *Note Preferred -Modes::. - - -File: mmm.info, Node: ePerl, Next: JSP, Prev: Embperl, Up: Supplied Classes - -4.7 ePerl: General Perl Embedding -================================= - -Yet another syntax for embedding Perl is called ePerl. See - for more information. The -‘eperl’ submode class handles this syntax, using the Perl mode specified -by the user; *Note Preferred Modes::. - - -File: mmm.info, Node: JSP, Next: RPM, Prev: ePerl, Up: Supplied Classes - -4.8 JSP: Java Embedded in HTML -============================== - -JSP (Java Server Pages) is a syntax for embedding Java code in HTML. The -submode class ‘jsp’ handles this syntax, using a Java mode specified by -the user; *Note Preferred Modes::. The default is ‘jde-mode’ if -present, otherwise ‘java-mode’. - - -File: mmm.info, Node: RPM, Next: Noweb, Prev: JSP, Up: Supplied Classes - -4.9 RPM Spec Files -================== - -‘mmm-rpm.el’ contains the definition of an MMM Mode submode class for -editing shell script sections within RPM (Redhat Package Manager) spec -files. It is recommended for use in combination with ‘rpm-spec-mode.el’ -by Stig Bjørlykke and Steve Sanbeg - (). - - Suggested setup code: - - (add-to-list 'mmm-mode-ext-classes-alist - '(rpm-spec-mode "\\.spec\\'" rpm-sh)) - - Thanks to Marcus Harnisch for contributing -this submode class. - - -File: mmm.info, Node: Noweb, Prev: RPM, Up: Supplied Classes - -4.10 Noweb literate programming -=============================== - -‘mmm-noweb.el’ contains the definition of an MMM Mode submode class for -editing Noweb documents. Most Noweb documents use \LaTeX for the -documentation chunks. Code chunks in Noweb are document-specific, and -the mode may be set with a local variable setting in the document. The -variable MMM-NOWEB-CODE-MODE controls the global code chunk mode. Since -Noweb files may have many languages in their code chunks, this mode also -allows setting the mode by specifying a mode in the first line or two of -a code chunk, using the normal Emacs first-line mode setting syntax. -Note that this first-line mode setting only matches a single word for -the mode name, and does not support the variable name setting of the -generalized first file line syntax. - -% -*- mode: latex; mmm-noweb-code-mode: c++; -*- -% First chunk delimiter! -@ -\noweboptions{smallcode} - -\title{Sample Noweb File} -\author{Joe Kelsey\\ -\nwanchorto{mailto:bozo@bozo.bozo}{\tt bozo@bozo.bozo}} -\maketitle - -@ -\section{Introduction} -Normal noweb documentation for the required [[*]] chunk. -<<*>>= -// C++ mode here! -// We might list the program here, or simply included chunks. -<> -@ %def myfile.cc - -@ -\section{[[myfile.cc]]} -This is [[myfile.cc]]. MMM noweb-mode understands code quotes in -documentation. -<>= -// This section is indented separately from previous. -@ - -@ -\section{A Perl Chunk} -We need a Perl chunk. -<>= -#!/usr/bin/perl -# -*- perl -*- -# Each differently named chunk is flowed separately. -@ - -\section{Finish [[myfile.cc]]} -When we resume a previously defined chunk, they are indented together. -<>= -// Pick up where we left off... -@ - - - The quoted code chunks inside documentation chunks are given the mode -found in the variable MMM-NOWEB-QUOTE-MODE, if set, or the value in -MMM-NOWEB-CODE-MODE otherwise. Also, each quoted chunk is set to have a -unique name to prevent them from being indented as a unit. - - Suggested setup code: - (mmm-add-mode-ext-class 'latex-mode "\\.nw\\'" 'noweb) - (add-to-list 'auto-mode-alist '("\\.nw\\'" . latex-mode)) - - In mmm-noweb buffers, each differently-named code chunk has a -different ‘:name’, allowing all chunks with the same name to get -indented together. - - This mode also supplies special paragraph filling operations for use -in documentation areas of the buffer. From a primary-mode (‘latex-mode, -, emacs’) region, pressing ‘C-c % C-q’ will mark all submode regions -with word syntax (‘mmm-word-other-regions’), fill the current paragraph -(‘(fill-paragraph justify)’), and remove the syntax markings -(‘mmm-undo-syntax-other-regions’). - - Thanks to Joe Kelsey for contributing this -class. - - -File: mmm.info, Node: Writing Classes, Next: Indices, Prev: Supplied Classes, Up: Top - -5 Writing Submode Classes -************************* - -Sometimes (perhaps often) you may want to use MMM with a syntax for -which it is suited, but for which no submode is supplied. In such cases -you may have to write your own submode class. This chapter briefly -describes how to write a submode class, from the basic to the advanced, -with examples. - -* Menu: - -* Basic Classes:: Writing a simple submode class. -* Paired Delimiters:: Matching paired delimiters. -* Region Placement:: Placing the region more accurately. -* Submode Groups:: Grouping several classes together. -* Calculated Submodes:: Deciding the submode at run-time. -* Calculated Faces:: Deciding the display face at run-time. -* Insertion Commands:: Inserting regions automatically. -* Region Names:: Naming regions for syntax grouping. -* Other Hooks:: Running code at arbitrary points. -* Delimiters:: Controlling delimiter overlays. -* Misc Keywords:: Other miscellaneous options. - - -File: mmm.info, Node: Basic Classes, Next: Paired Delimiters, Up: Writing Classes - -5.1 Writing Basic Submode Classes -================================= - -Writing a submode class can become rather complex, if the syntax to -match is complicated and you want to take advantage of some of MMM -Mode’s extra features. But a simple submode class is not particularly -difficult to write. This section describes the basics of writing -submode classes. - - Submode classes are stored in the variable ‘mmm-classes-alist’. Each -element of this list represents a single submode class. For -convenience, the function ‘mmm-add-classes’ takes a list of submode -classes and adds them all to this alist. Each class is represented by a -list containing the class name—a symbol such as ‘mason’ or -‘html-js’—followed by pairs of keywords and arguments called a “class -specifier”. For example, consider the specifier for the submode class -‘embedded-css’: - - (mmm-add-classes - '((embedded-css - :submode css - :face mmm-declaration-submode-face - :front "]*>" - :back ""))) - - The name of the submode is ‘embedded-css’, the first element of the -list. The rest of the list consists of pairs of keywords (symbols -beginning with a colon) such as ‘:submode’ and ‘:front’, and arguments, -such as ‘css’ and ‘"]*>"’. It is the keywords and arguments -that specify how the submode works. The order of keywords is not -important; all that matters is the arguments that follow them. - - The three most important keywords are ‘:submode’, ‘:front’, and -‘:back’. The argument following ‘:submode’ names the major mode to use -in submode regions. It can be either a symbol naming a major mode, such -as ‘text-mode’ or ‘c++-mode’, or a symbol to look up in -‘mmm-major-mode-preferences’ (*note Preferred Modes::) such as ‘css’, as -in this case. - - The arguments following ‘:front’ and ‘:back’ are regular expressions -(*note (emacs)Regexps::) that should match the delimiter strings which -begin and end the submode regions. In our example, CSS regions begin -with a ‘’ tag. - - The argument following ‘:face’ specifies the face (background color) -to use when ‘mmm-submode-decoration-level’ is 2 (high coloring). *Note -Region Coloring::, for a list of canonical available faces. - - There are many more possible keywords arguments. In the following -sections, we will examine each of them and their uses in writing submode -classes. - - -File: mmm.info, Node: Paired Delimiters, Next: Region Placement, Prev: Basic Classes, Up: Writing Classes - -5.2 Matching Paired Delimiters -============================== - -A simple pair of regular expressions does not always suffice to exactly -specify the beginning and end of submode regions correctly. For this -reason, there are several other possible keyword/argument pairs which -influence the matching process. - - Many submode regions are marked by paired delimiters. For example, -the tags used by Mason (*note Mason::) include ‘<%init>...’ and -‘<%args>...’. It would be possible to write a separate submode -class for each type of region, but there is an easier way: the keyword -argument ‘:save-matches’. If supplied and non-nil, it causes the -regular expression ‘:back’, before being searched for, to be formatted -by replacing all strings of the form ‘~N’ (where N is an integer) with -the corresponding numbered subexpression of the match for ‘:front’. As -an example, here is an excerpt from the ‘here-doc’ submode class. *Note -Here-documents::, for more information about this submode. - - :front "<<\\([a-zA-Z0-9_-]+\\)" - :back "^~1$" - :save-matches 1 - - The regular expression for ‘:front’ matches ‘<<’ followed by a string -of one or more alphanumeric characters, underscores, and dashes. The -latter string, which happens to be the name of the here-document, is -saved as the first subexpression, since it is surrounded by ‘\(...\)’. -Then, because the value of ‘:save-matches’ is present and non-nil, the -string ‘~1’ is replaced in the value of ‘:back’ by the name of the -here-document, thus creating a regular expression to match the correct -ending delimiter. - - -File: mmm.info, Node: Region Placement, Next: Submode Groups, Prev: Paired Delimiters, Up: Writing Classes - -5.3 Placing Submode Regions Precisely -===================================== - -Normally, a submode region begins immediately after the end of the -string matching the ‘:front’ regular expression and ends immediately -before the beginning of the string matching the ‘:back’ regular -expression. This can be changed with the keywords ‘:include-front’ and -‘:include-back’. If their arguments are ‘nil’, or they do not appear, -the default behavior is unchanged. But if the argument of -‘:include-front’ (respectively, ‘:include-back’) is non-nil, the submode -region will begin (respectively, end) immediately before (respectively, -after) the string matching the ‘:front’ (respectively, ‘:back’) regular -expression. In other words, these keywords specify whether or not the -delimiter strings are _included_ in the submode region. - - When ‘:front’ and ‘:back’ are regexps, the delimiter is normally -considered to be the entire matched region. This can be changed using -the ‘:front-match’ and ‘:back-match’ keywords. The values of the -keywords is a number specifying the submatch. This defaults to zero -(specifying the whole regexp). - - Two more keywords which affect the placement of the region -‘:front-offset’ and ‘:back-offset’, which both take integers as -arguments. The argument of ‘:front-offset’ (respectively, -‘:back-offset’) gives the distance in characters from the beginning -(respectively, ending) location specified so far, to the actual point -where the submode region begins (respectively, ends). For example, if -‘:include-front’ is nil or unsupplied and ‘:front-offset’ is 2, the -submode region will begin two characters after the end of the match for -‘:front’, and if ‘:include-back’ is non-nil and ‘:back-offset’ is -1, -the region will end one character before the end of the match for -‘:back’. - - In addition to integers, the arguments of ‘:front-offset’ and -‘:back-offset’ can be functions which are invoked to move the point from -the position specified by the matches and inclusions to the correct -beginning or end of the submode region, or lists whose elements are -either functions or numbers and whose effects are applied in sequence. -To help disentangle these options, here is another excerpt from the -‘here-doc’ submode class: - - :front "<<\\([a-zA-Z0-9_-]+\\)" - :front-offset (end-of-line 1) - :back "^~1$" - :save-matches 1 - - Here the value of ‘:front-offset’ is the list ‘(end-of-line 1)’, -meaning that from the end of the match for ‘:front’, go to the end of -the line, and then one more character forward (thus to the beginning of -the next line), and begin the submode region there. This coincides with -the normal behavior of here-documents: they begin on the following line -and go until the ending flag. - - If the ‘:back’ should not be able to start a new submode region, set -the ‘:end-not-begin’ keyword to non-nil. - - -File: mmm.info, Node: Submode Groups, Next: Calculated Submodes, Prev: Region Placement, Up: Writing Classes - -5.4 Defining Groups of Submodes -=============================== - -Sometimes more than one submode class is required to accurately reflect -the behavior of a single type of syntax. For example, Mason has three -very different types of Perl regions: blocks bounded by matched tags -such as ‘<%perl>...’, inline output expressions bounded by -‘<%...%>’, and single lines of code which simply begin with a ‘%’ -character. In cases like these, it is possible to specify an “umbrella” -class, to turn all these classes on or off together. - - -- Function: mmm-add-group GROUP CLASSES - The submode classes CLASSES, which should be a list of lists, - similar to what might be passed to ‘mmm-add-classes’, are added - just as by that function. Furthermore, another class named GROUP - is added, which encompasses all the classes in CLASSES. - - Technically, an group class is specified with a ‘:classes’ keyword -argument, and the subsidiary classes are given a non-nil ‘:private’ -keyword argument to make them invisible. But in general, all you should -ever need to know is how to invoke the function above. - - -- Function: mmm-add-to-group GROUP CLASSES - Adds a list of classes to an already existing group. This can be - used, for instance, to add a new quoting definition to HTML-JS - using this example to add the quote characters “%=%”: - - (mmm-add-to-group 'html-js '((js-html - :submode javascript - :face mmm-code-submode-face - :front "%=%" - :back "%=%" - :end-not-begin t))) - - -File: mmm.info, Node: Calculated Submodes, Next: Calculated Faces, Prev: Submode Groups, Up: Writing Classes - -5.5 Calculating the Correct Submode -=================================== - -In most cases, the author of a submode class will know in advance what -major mode to use, such as ‘text-mode’ or ‘c++-mode’. If there are -multiple possible modes that the user might desire, then -‘mmm-major-mode-preferences’ should be used (*note Preferred Modes::). -The function ‘mmm-set-major-mode-preferences’ can be used, with a third -argument, to ensure than the mode is present. - - In some cases, however, the author has no way of knowing in advance -even what language the submode region will be in. The ‘here-doc’ class -is one of these. In such cases, instead of the ‘:submode’ keyword, the -‘:match-submode’ keyword must be used. Its argument should be a -function, probably written by the author of the submode class, which -calculates what major mode each region should use. - - It is invoked immediately after a match is found for ‘:front’, and is -passed one argument: a string representing the front delimiter. -Normally this string is simply whatever was matched by ‘:front’, but -this can be changed with the keyword ‘:front-form’ (*note Delimiters::). -The function should then return a symbol that would be a valid argument -to ‘:submode’: either the name of a mode, or that of a language to look -up a preferred mode. If it detects an invalid match—for example, the -user has specified a mode which is not available—it should ‘(signal -'mmm-no-matching-submode nil)’. - - Since here-documents can contain code in any language, the ‘here-doc’ -submode class uses ‘:match-submode’ rather than ‘:submode’. The -function it uses is ‘mmm-here-doc-get-mode’, defined in ‘mmm-sample.el’, -which inspects the name of the here-document for flags indicating the -proper mode. For example, this code should probably be in ‘perl-mode’ -(or ‘cperl-mode’): - - print <’ and ‘") - ("l/" . "
  • |
  • ") - ("m/" . "
    |
    ") - ("n/" . "") - ("p/" . "

    |

    ") - ("q/" . "|") - ("s/" . "|") - ("t/" . "|") - ("u/" . "
    • |
    ") - ("x/" . "") - ("2/" . "

    |

    ") - ("3/" . "

    |

    ") - ("?/" . ""))) - -(defvar web-mode-engines-auto-pairs - '(("angular" . (("{{ " . " }}"))) - ("anki" . (("{{ " . " }}"))) - ("antlers" . (("{{ " . " }}") - ("{{$ " . "| $}}") - ("{{? " . "| ?}}") - ("{{# " . "| #}}"))) - ("artanis" . (("<% " . " %>") - ("<%=" . " | %>") - ("<@css" . " | %>") - ("<@icon" . " | %>") - ("<@include" . " | %>") - ("<@js" . " | %>"))) - ("asp" . (("<% " . " %>"))) - ("aspx" . (("<% " . " %>") - ("<%=" . "%>") - ("<%#" . "%>") - ("<%$" . "%>") - ("<%@" . "%>") - ("<%:" . "%>") - ("<%-" . "- | --%>"))) - ("astro" . (("{ " . " }"))) - ("blade" . (("{{{" . " | }}}") - ("{{ " . " }}") - ("{!!" . " | !!}") - ("@{{" . " | }}") - ("{{-" . "- | --}}"))) - ("cl-emb" . (("<% " . " %>") - ("<%=" . " | %>") - ("<%#" . " | %>"))) - ("ctemplate" . (("{{ " . "| }}") - ("{{~ " . "| }}") - ("{{{" . " | }}}") - ("{~{" . " | }}") - ("{{~{" . " | }}}") - ("{{!" . "-- | --}}") - ("{{^" . "}}") - ("{{/" . "}}") - ("{{#" . "}}"))) - ("django" . (("{{ " . " }}") - ("{% " . " %}") - ("{%-" . " | %}") - ("{# " . " #}"))) - ("elixir" . (("<% " . " %>") - ("<%=" . " | %>") - ("<%%" . " | %>") - ("<%#" . " | %>"))) - ("ejs" . (("<% " . " %>") - ("<%=" . "%>") - ("<%#" . "%>") - ("<%-" . "%>"))) - ("erb" . (("<% " . " %>") - ("<%=" . " %>") - ("<%#" . "%>") - ("<%-" . " %>"))) - ("freemarker" . (("<% " . " %>") - ("<#-" . "- | -->") - ("${ " . " }") - ("[% " . " %]") - ("[# " . " #]") - ("[#-" . "- | --]"))) - ("go" . (("{{ " . " }}") - ("{{-" . " | -}}"))) - ("hero" . (("<% " . " %>") - ("<%=" . " | %>") - ("<%!" . " | %>") - ("<%:" . " | %>") - ("<%#" . " | %>") - ("<%@" . " | %>") - ("<%~" . " | %>") - ("<%+" . " | %>"))) - ("jsp" . (("<% " . " %>") - ("<%-" . "- | --%>") - ("<%=" . "%>") - ("<%!" . "%>") - ("<%@" . "%>") - ("${ " . " }"))) - ("lsp" . (("<% " . " %>") - ("<%%" . " | %>") - ("<%#" . " | %>"))) - ("mako" . (("<% " . " %>") - ("<%!" . " | %>") - ("${ " . " }"))) - ("marko" . (("${ " . " }"))) - ("mason" . (("<% " . " %>") - ("<& " . " &>"))) - ("mojolicious" . (("<% " . " %>") - ("<%=" . " | %>") - ("<%%" . " | %>") - ("<%#" . " | %>"))) - ("php" . (("") - ("") - (""))) - ("template-toolkit" . (("[% " . " %]") - ("[%-" . " | %]") - ("[%#" . " | %]"))) - ("riot" . (("={ " . " }"))) - ("underscore" . (("<% " . " %>"))) - ("vue" . (("{{ " . " }}"))) - ("web2py" . (("{{ " . " }}") - ("{{=" . "}}"))) - (nil . ((""))) - )) - -(defvar web-mode-engines-snippets - '(("artanis" . (("if" . "<% (if (|) %>\n\n<% ) %>") - ("when" . "<% (when (|) %>\n\n<% ) %>") - ("unless" . "<% (unless (|) %>\n\n<% ) %>") - ("cond" . "<% (cond %>\n<% [(|) %>\n\n<% ] %>\n<% [else %>\n\n<% ] %>\n<% ) %>") - ("let" . "<% (let ([|]) %>\n\n<% ) %>") - ("let*" . "<% (let* ([|]) %>\n\n<% ) %>") - ("do" . "<% (do ([|]) %>\n<% [()] %>\n\n<% ) %>") - ("for-each" . "<% (for-each %>\n|\n\n<% ) %>") - ("case" . "<% (case | %>\n<% [() %>\n\n<% ] %>\n<% [() %>\n\n<% ] %>\n<% ) %>"))) - ("ejs" . (("for" . "<% for (|) { %>\n\n<% } %>") - ("if" . "<% if (|) { %>\n\n<% } %>"))) - ("erb" . (("each" . "<% |.each do %>\n\n<% end %>") - ("if" . "<% if | %>\n\n<% end %>") - ("when" . "<% when | %>\n\n<% end %>") - ("unless" . "<% unless | %>\n\n<% end %>"))) - ("php" . (("if" . "\n\n") - ("while" . "\n\n") - ("for" . "\n\n") - ("foreach" . "\n\n") - ("each" . "\n\n") - ("switch" . "\n\n\n\n\n\n\n"))) - ("django" . (("block" . "{% block | %}\n\n{% endblock %}") - ("comment" . "{% comment | %}\n\n{% endcomment %}") - ("css" . "{% stylesheet %}\n\n{% endstylesheet %}") - ("cycle" . "{% cycle | as %}\n\n{% endcycle %}") - ("filter" . "{% filter | %}\n\n{% endfilter %}") - ("for" . "{% for | in %}\n\n{% endfor %}") - ("if" . "{% if | %}\n\n{% endif %}") - ("ifequal" . "{% ifequal | %}\n\n{% endifequal %}") - ("ifnotequal" . "{% ifnotequal | %}\n\n{% endifnotequal %}") - ("js" . "{% javascript | %}\n\n{% endjavascript %}") - ("schema" . "{% schema | %}\n\n{% endschema %}") - ("safe" . "{% safe | %}\n\n{% endsafe %}"))) - ("mako" . (("if" . "% if |:\n% endif") - ("for" . "% for | in :\n% endfor") - ("doc" . "<%doc>\n|\n") - ("inherit" . "<%inherit file=\"|\" />") - ("namespace" . "<%namespace name=\"|\" file=\"\" import=\"\"/>") - ("block" . "<%block name=\"|\">\n"))) - ("template-toolkit" . (("if" . "[% IF | %]\n\n[% END %]"))) - (nil . (("html5" . "\n\n\n\n\n\n\n|\n\n") - ("table" . "\n\n\n\n\n
    |
    ") - ("ul" . "
      \n
    • |
    • \n
    • \n
    "))) - )) - -(defvar web-mode-engine-token-regexps - (list - '("antlers" . "\"\\|'") - '("artanis" . "\"\\|#|\\|;") - '("asp" . "//\\|/\\*\\|\"\\|'") - '("ejs" . "//\\|/\\*\\|\"\\|'") - '("erb" . "\"\\|'\\|#\\|<<[-]?['\"]?\\([[:alnum:]_]+\\)['\"]?") - '("lsp" . "\"\\|#|\\|;") - '("mako" . "\"\\|'\\|#") - '("mason" . "\"\\|'\\|#") - '("mojolicious" . "\"\\|'") - '("php" . "//\\|/\\*\\|#\\|\"\\|'\\|<<<['\"]?\\([[:alnum:]]+\\)['\"]?") - '("python" . "\"\\|'\\|#") - '("web2py" . "\"\\|'")) - "Engine regexps used to identify tokens (strings / comments) in blocks.") - -(defvar web-mode-engine-open-delimiter-regexps - (list - '("angular" . "{{") - '("anki" . "{{") - '("antlers" . "{{[@#$]?") - '("artanis" . "<%\\|<@\\(css\\|icon\\|include\\|js\\)") - '("asp" . "<%\\|" nil 4) - ("\\.svg$" "" nil 0) - ("\\.js$" "" t 0) - ("\\.css$" "" t 0) - ("\\.html?$" "" nil 4)) - "List of elements and extensions for `web-mode-file-link'. It -consists of a string that contains the regular expression that -matches the appropriate files, a format string with element that -contains the link (%s should be put where the path goes,) a bool -that tells if the element belongs in the element, and -number of characters to move back if needed (or 0 if point -shouldn't be moved back.)") - -(defvar web-mode-sql-queries - (regexp-opt - '("SELECT" "INSERT" "UPDATE" "DELETE" "select" "insert" "update" "delete"))) - -(defvar web-mode-sql-keywords - (regexp-opt - (append - (cdr (assoc "sql" web-mode-extra-keywords)) - '("SELECT" "INSERT" "UPDATE" "DELETE" - "FROM" "WHERE" "GROUP BY" "LIKE" "LIMIT" "HAVING" "JOIN" "LEFT" "INNER" - "FULL" "OUTER" "VALUES" "ORDER BY" "SEPARATOR" "ASC" "DESC" - "AND" "OR" "ON" "WHEN" "ELSE" "END" "THEN")))) - -(defvar web-mode-python-constants - (regexp-opt - (append - (cdr (assoc "python" web-mode-extra-constants)) - '("True" "False" "None" "__debug__" "NotImplemented" "Ellipsis")))) - -(defvar web-mode-elixir-keywords - (regexp-opt - (append - (cdr (assoc "elixir" web-mode-extra-keywords)) - '("after" "and" "bc" "case" "catch" "cond" "defcallback" "defdelegate" "defexception" "defgaurdp" "defguard" "defimpl" "defmodule" "defoverridable" "defprotocol" "defrecord" "defrecordp" "defstruct" "do" "else" "end" "exit" "fn" "for" "form_for" "if" "in" "lc" "not" "or" "quote" "raise" "receive" "rescue" "super" "throw" "try" "unless" "unquote" "when" "with")))) - - -(defvar web-mode-elixir-constants - (regexp-opt - (append - (cdr (assoc "elixir" web-mode-extra-constants)) - '("nil" "true" "false")))) - -(defvar web-mode-erlang-constants - (regexp-opt - (append - (cdr (assoc "erlang" web-mode-extra-constants)) - '("true" "false")))) - -(defvar web-mode-erlang-keywords - (regexp-opt - (append - (cdr (assoc "erlang" web-mode-extra-keywords)) - '("else" "if" "do" "end")))) - -(defvar web-mode-cl-emb-constants - (regexp-opt - '("nil" "t" "raw" "escape"))) - -(defvar web-mode-cl-emb-keywords - (regexp-opt - '("if" "else" "endif" "unless" "endunless" "var" "repeat" - "endrepeat" "loop" "endloop" "include" "call" "with" - "endwith" "set" "genloop" "endgenloop" "insert"))) - -(defvar web-mode-artanis-constants - (regexp-opt - '("#f" "#t"))) - -(defvar web-mode-artanis-keywords - (regexp-opt - (append - (cdr (assoc "artanis" web-mode-extra-keywords)) - '("begin" "cut" "cute" "if" "when" "unless" "cond" "case" - "do" "quote" "syntax" "lambda" "lambda*" "and" "and-let*" - "or" "else" "delay" "receive" "use-modules" "match" - "match-lambda" "match-lambda*" "match-let" "match-let*" - "match-letrec" "let" "let*" "letrec" "letrec*" "and-let*" - "let-syntax" "letrec-syntax" "syntax-rules" "syntax-case" - "define" "define-syntax" "define-macro" - "define-condition-type" "define-immutable-record-type" - "define-record-type" "define-values" "parameterize" "for-each" - "require-extension" "set!" "test-approximate" "test-assert" - "test-begin" "test-end" "test-eq" "test-equal" "test-eqv" - "test-error" "test-group" "test-group-with-cleanup" "test-with-runner")))) - -(defvar web-mode-lsp-constants - (regexp-opt - '("nil" "t"))) - -(defvar web-mode-lsp-keywords - (regexp-opt - '("dolist" "let" "while" "cond" "when" "progn" "if" - "dotimes" "unless" "lambda" - "loop" "for" "and" "or" "in" "do" "defun"))) - -(defvar web-mode-php-constants - (regexp-opt - (append - (cdr (assoc "php" web-mode-extra-constants)) - '("TRUE" "FALSE" "NULL" "true" "false" "null" - "STR_PAD_LEFT" "STR_PAD_RIGHT" - "ENT_COMPAT" "ENT_QUOTES" "ENT_NOQUOTES" "ENT_IGNORE" - "ENT_SUBSTITUTE" "ENT_DISALLOWED" "ENT_HTML401" "ENT_XML1" - "ENT_XHTML" "ENT_HTML5" "JSON_PRETTY_PRINT" "JSON_UNESCAPED_SLASHES" - "LIBXML_NOBLANKS")))) - -(defvar web-mode-php-keywords - (regexp-opt - (append - (cdr (assoc "php" web-mode-extra-keywords)) - '("abstract" "and" "array" "as" "break" "case" "catch" "class" "clone" - "const" "continue" "declare" "default" "die" "do" "echo" "else" "elseif" - "empty" "enddeclare" "endfor" "endforeach" "endif" "endswitch" "endwhile" - "eval" "exit" "extends" "final" "finally" "fn" "for" "foreach" "function" - "global" "goto" "if" "implements" "include" "include_once" "instanceof" - "insteadof" "interface" "isset" "list" "namespace" "new" "or" "parent" - "print" "private" "protected" "public" "require" "require_once" "return" - "self" "static" "switch" "trait" "try" "throw" "unset" "use" "var" - "while" "xor" "yield" "yield from")))) - -(defvar web-mode-php-types - (eval-when-compile - (regexp-opt - '("array" "bool" "boolean" "callable" "float" "int" "integer" - "iterable" "mixed" "object" "resource" "string" "void")))) - -(defvar web-mode-css-at-rules - (eval-when-compile - (regexp-opt - '("charset" "import" "media" "page" "font-face" - "namespace" "supports" "document" - "keyframes" "-moz-keyframes" "-webkit-keyframes" - "mixin" "viewport")))) - -(defvar web-mode-css-pseudo-classes - (eval-when-compile - (regexp-opt - '("active" "after" "before" "checked" "disabled" "empty" "enabled" - "first" "first-child" "first-letter" "first-line" "first-of-type" "focus" - "hover" "lang" "last-child" "last-of-type" "left" "link" - "not" "nth-child" "nth-last-child" "nth-last-of-type" "nth-of-type" - "only-child" "only-of-type" - "right" "root" "selection" "target" "visited")))) - -(defvar web-mode-python-keywords - (regexp-opt - (append - (cdr (assoc "python" web-mode-extra-keywords)) - '("and" "as" "assert" "break" "class" "continue" "def" "del" - "elif" "else" "except" "finally" "for" "from" "global" - "if" "import" "in" "is" "lambda" "nonlocal" "not" "or" "pass" - "raise" "return" "try" "while" "with" "yield")))) - -(defvar web-mode-jsp-keywords - (regexp-opt - (append - (cdr (assoc "jsp" web-mode-extra-keywords)) - '("case" "catch" "do" "else" "end" "false" "for" "function" - "if" "in" "include" - "new" "package" "page" "private" "protected" "public" - "return" "tag" "taglib" "throw" "throws" "true" "try" "void" "while")))) - -(defvar web-mode-erb-keywords - (regexp-opt - (append - (cdr (assoc "erb" web-mode-extra-keywords)) - '("alias" "and" "begin" "break" "case" "class" "def" "defined?" "do" - "elsif" "else" "end" "ensure" "fail" "for" "if" "in" - "module" "next" "not" "or" "redo" "rescue" "retry" "return" - "then" "super" "unless" "undef" "until" "when" "while" "yield" - "__ENCODING__" "__FILE__" "__LINE__")))) - -(defvar web-mode-mason-keywords - (regexp-opt - (append - (cdr (assoc "mason" web-mode-extra-keywords)) - '("and" "base" "close" "die" "each" "else" "elsif" "eval" "exists" - "foreach" "grep" "if" "length" "local" "my" "next" "open" "or" - "package" "pop" "ref" "return" "stat" "sub" "tie" - "undef" "unless" "use" "while")))) - -(defvar web-mode-erb-builtins - (regexp-opt - (append - (cdr (assoc "erb" web-mode-extra-builtins)) - - '("__callee__" "__dir__" "__method__" - "abort" "at_exit" "autoload" "autoload?" - "binding" "block_given?" "caller" "catch" - "eval" "exec" "exit" "exit!" "fail" "fork" "format" - "lambda" "load" "loop" "open" - "p" "print" "printf" "proc" "putc" "puts" - "raise" "rand" "readline" "readlines" "require" "require_relative" - "sleep" "spawn" "sprintf" "srand" "syscall" "system" - "throw" "trap" "warn" - "alias_method" "attr" "attr_accessor" "attr_reader" "attr_writer" - "define_method" "extend" "include" "module_function" - "prepend" "private" "protected" "public" - "refine" "using" - - "error_message_on" "error_messages_for" "form" "input" - "auto_discovery_link_tag" "image_tag" "javascript_include_tag" - "stylesheet_link_tag" "image_path" "path_to_image"" " - "javascript_path" "path_to_javascript" "register_javascript_expansion" - "register_javascript_include_default" "register_stylesheet_expansion" - "stylesheet_path" "path_to_stylesheet" "atom_feed" "entry" "updated" - "benchmark" "cache" "capture" "content_for" "distance_of_time_in_words" - "distance_of_time_in_words_to_now" "time_ago_in_words" "date_select" - "datetime_select" "time_select" "select_date" "select_datetime" - "select_day" "select_hour" "select_minute" "select_month" "select_second" - "select_time" "select_year" "debug" - "check_box" "fields_for" "file_field" "form_for" "hidden_field" - "label" "password_field" "radio_button" "text_area" "text_field" - "check_box_tag" "field_set_tag" "file_field_tag" "form_with" "form_tag" - "hidden_field_tag" "image_submit_tag" "label_tag" "password_field_tag" - "radio_button_tag" "select_tag" "submit_tag" "text_area_tag" - "text_field_tag" - "collection_select" "country_options_for_select" "country_select" - "option_groups_from_collection_for_select" "options_for_select" - "options_from_collection_for_select" "select" - "time_zone_options_for_select" - "time_zone_select" "button_to_function" "define_javascript_functions" - "escape_javascript" "javascript_tag" "link_to_function"" " - "number_to_currency" "number_to_human_size" "number_to_percentage" - "number_to_phone" "number_with_delimiter" "number_with_precision" - "evaluate_remote_response" "form_remote_for" "form_remote_tag" - "link_to_remote" "observe_field" "observe_field" - "periodically_call_remote" - "remote_form_for" "remote_function" "submit_to_remote" "update_page" - "update_page_tag" "dom_class" "dom_id" "partial_path" "sanitize" - "sanitize_css" "strip_links" "strip_tags" - "cdata_section" "content_tag" "escape_once" "tag" - "auto_link" "concat" "cycle" "excerpt" "highlight" "markdown" "pluralize" - "reset_cycle" "simple_format" "textilize" "textilize_without_paragraph" - "truncate" "word_wrap" "button_to" "current_page?" "link_to" "link_to_if" - "link_to_unless" "link_to_unless_current" "mail_to" "url_for" - "action_name" "atom_feed" "audio_path" "audio_tag" - "content_tag_for" "controller" "controller_name" "action_name" - "controller_path" "convert_to_model" "cookies" "csrf_meta_tag" - "csrf_meta_tags" "headers" - "current_cycle" "div_for" "email_field" "email_field_tag" - "favicon_link_tag" "flash" "l" "button_tag" - "grouped_collection_select" "grouped_options_for_select" - "image_alt" "j" "javascript_cdata_section" - "localize" "logger" "number_field" - "number_field_tag" "number_to_human" "params" "path_to_audio" - "path_to_video" "phone_field" "phone_field_tag" "provide" - "range_field" "range_field_tag" "raw" "render" "render_to_string" "request" - "request_forgery_protection_token" "response" "safe_concat" - "safe_join" "search_field" "search_field_tag" - "session" "t" "telephone_field" "telephone_field_tag" - "time_tag" "translate" "url_field" "url_field_tag" - "url_options" "video_path" "video_tag" "simple_form_for" - "javascript_pack_tag" "stylesheet_pack_tag" "csp_meta_tag" - - )))) - -(defvar web-mode-asp-constants - (regexp-opt - (append - (cdr (assoc "asp" web-mode-extra-constants)) - '("adAsyncExecute" "adAsyncFetch" "adAsyncFetchNonBlocking" "adCmdFile" - "adCmdStoredProc" "adCmdTable" "adCmdTableDirect" "adCmdText" "adCmdUnknown" - "adCmdUnspecified" "adExecuteNoRecords" "adExecuteRecord" "adExecuteStream" - "adLockBatchOptimistic" "adLockOptimistic" "adLockPessimistic" - "adLockReadOnly" "adLockUnspecified" "adOpenDynamic" "adOpenForwardOnly" - "adOpenKeyset" "adOpenStatic" "adOpenUnspecified" "adOptionUnspecified" - "Empty" "Nothing" "Null" "True" "False" - "vbBack" "vbCr" "vbCrLf" "vbFormFeed" "vbLf" "vbNewLine" "vbNullChar" - "vbNullString" "vbObjectError" "vbScript" "vbTab" "vbVerticalTab")))) - -(defvar web-mode-asp-keywords - (regexp-opt - (append - (cdr (assoc "asp" web-mode-extra-keywords)) - '("Abs" "And" "Array" "Asc" "Atn" - "CBool" "CByte" "CCur" "CDate" "CDbl" "CInt" "CLng" "CSng" "CStr" - "Call" "Case" "Chr" "Class" "Const" "Cos" "CreateObject" - "Date" "DateAdd" "DateDiff" "DatePart" "DateSerial" "DateValue" - "Day" "Dim" "Do" - "Each" "Else" "ElseIf" "End" "Erase" "Err" "Eval" "Exit" "Exp" - "Explicit" - "Filter" "Fix" "For" "FormatCurrency" "FormatDateTime" - "FormatNumber" "FormatPercent" "Function" - "GetLocale" "GetObject" "GetRef" "Hex" "Hour" - "If" "In" "InStr" "InStrRev" "InputBox" "Int" "IsArray" "IsDate" - "IsEmpty" "IsNull" "IsNumeric" "IsObject" "Join" - "LBound" "LCase" "LTrim" "Language" "Left" "Len" "Let" - "LoadPicture" "Log" "Loop" - "Mid" "Minute" "Month" "MonthName" "MsgBox" - "New" "Next" "Not" "Now" - "Oct" "On" "Option" "Or" "Preserve" "Private" "Public" - "RGB" "RTrim" "Redim" "Rem" "Replace" "Right" "Rnd" "Round" - "ScriptEngine" "ScriptEngineBuildVersion" - "ScriptEngineMajorVersion" "ScriptEngineMinorVersion" - "Second" "Select" "Set" "SetLocale" "Sgn" "Sin" "Space" "Split" - "Sqr" "StrComp" "StrReverse" "String" "Sub" - "Tan" "Then" "Time" "TimeSerial" "TimeValue" "Timer" "To" "Trim" - "TypeName" - "UBound" "UCase" "Until" "VarType" - "Weekday" "WeekdayName" "Wend" "With" "While" "Year")))) - -(defvar web-mode-asp-types - (regexp-opt - (append - (cdr (assoc "asp" web-mode-extra-types)) - '("Application" "ASPError" "Request" "Response" "Server" "Session")))) - -(defvar web-mode-aspx-keywords - (regexp-opt - (append - (cdr (assoc "aspx" web-mode-extra-keywords)) - '("case" "catch" "do" "else" "end" "for" "foreach" "function" - "if" "in" "include" "new" "package" "page" "return" - "tag" "throw" "throws" "try" "while")))) - -(defvar web-mode-smarty-keywords - (regexp-opt '("as"))) - -(defvar web-mode-velocity-keywords - (eval-when-compile - (regexp-opt '("in" "true" "false")))) - -(defvar web-mode-freemarker-keywords - (eval-when-compile - (regexp-opt '("as" "list")))) - -(defvar web-mode-go-keywords - (eval-when-compile - (regexp-opt - '("const" "define" "else" "end" - "for" "func" "if" "import" - "pipeline" "range" "return" "struct" - "template" "type" "var" "with")))) - -(defvar web-mode-go-functions - (eval-when-compile - (regexp-opt - '("and" "call" "ge" "html" "index" "js" "len" "not" "or" - "print" "printf" "println" "urlquery" "where")))) - -(defvar web-mode-go-types - (regexp-opt - (append - (cdr (assoc "go" web-mode-extra-types)) - '("int" "string")))) - -(defvar web-mode-closure-keywords - (eval-when-compile - (regexp-opt '("in" "and" "not" "or")))) - -(defvar web-mode-svelte-keywords - (regexp-opt '("as"))) - -(defvar web-mode-django-control-blocks - (append - (cdr (assoc "django" web-mode-extra-control-blocks)) - '( - - "assets" "autoescape" - "block" "blocktrans" "blocktranslate" - "cache" "call" "capture" "comment" - "draw" - "embed" - "filter" "for" "foreach" "form" - "if" "ifchanged" "ifequal" "ifnotequal" - "macro" - "random" "raw" - "safe" "sandbox" "spaceless" - "tablerow" - "unless" - "verbatim" - "with" - - "endassets" "endautoescape" - "endblock" "endblocktrans" "endblocktranslate" - "endcache" "endcall" "endcapture" "endcomment" - "draw" - "endembed" - "endfilter" "endfor" "endforeach" "endform" - "endif" "endifchanged" "endifequal" "endifnotequal" - "endmacro" - "endrandom" "endraw" - "endsafe" "endsandbox" "endspaceless" - "endtablerow" - "endunless" - "endverbatim" - "endwith" - - ;; "set" "endset" ;#504 - - "csrf_token" "cycle" "debug" - "elif" "else" "elseif" "elsif" "empty" "extends" - "firstof" "include" "load" "lorem" "now" "regroup" "ssi" - "trans" "templatetag" "url" "widthratio" - - ;; #805 - "graph" "endgraph" - "javascript" "endjavascript" - "schema" "endschema" - "stylesheet" "endstylesheet" - - ))) - -(defvar web-mode-django-control-blocks-regexp - (regexp-opt web-mode-django-control-blocks t)) - -(defvar web-mode-django-keywords - (eval-when-compile - (regexp-opt - '("and" "as" "assign" - "break" - "cache" "call" "case" "context" "continue" - "do" - "flush" "from" - "ignore" "import" "in" "is" - "layout" "load" - "missing" - "none" "not" - "or" - "pluralize" - "random" - "set" ;#504 - "unless" "use" - "var" - )))) - -(defvar web-mode-django-types - (eval-when-compile - (regexp-opt '("null" "false" "true")))) - -(defvar web-mode-blade-control-blocks - (append - (cdr (assoc "blade" web-mode-extra-control-blocks)) - '("component" "foreach" "forelse" "for" "if" "section" "slot" "switch" "unless" "while") - )) - -(defvar web-mode-blade-control-blocks-regexp - (regexp-opt web-mode-blade-control-blocks t)) - -(defvar web-mode-directives - (eval-when-compile - (regexp-opt - '("include" "page" "taglib" - "Assembly" "Control" "Implements" "Import" - "Master" "OutputCache" "Page" "Reference" "Register")))) - -(defvar web-mode-template-toolkit-keywords - (regexp-opt - '("block" "call" "case" "catch" "clear" "default" "do" - "else" "elsif" "end" "filter" "final" "for" - "foreach" "get" "if" "in" "include" "insert" "is" "last" - "macro" "meta" "or" "perl" "process" "rawperl" "return" - "set" "stop" "switch" "tags" "throw" "try" - "unless" "use" "while" "wrapper"))) - -(defvar web-mode-perl-keywords - (regexp-opt - '("__DATA__" "__END__" "__FILE__" "__LINE__" "__PACKAGE__" - "and" "cmp" "continue" "CORE" "do" "else" "elsif" "eq" "exp" - "for" "foreach" "ge" "gt" "if" "le" "lock" "lt" "m" "ne" "no" - "or" "package" "q" "qq" "qr" "qw" "qx" "s" "sub" - "tr" "unless" "until" "while" "xor" "y" - "my" "use" "print" "say"))) - -(defvar web-mode-javascript-keywords - (regexp-opt - (append - (cdr (assoc "javascript" web-mode-extra-keywords)) - '("as" "async" "await" "break" "case" "catch" "class" "const" "continue" - "debugger" "default" "delete" "do" "else" "enum" "eval" - "export" "extends" "finally" "for" "from" "function" "get" "if" - "implements" "import" "in" "instanceof" "interface" "let" - "new" "of" "package" "private" "protected" "public" - "return" "set" "static" "super" "switch" - "throw" "try" "type" "typeof" "var" "void" "while" "with" "yield")))) - -(defvar web-mode-javascript-constants - (regexp-opt - '("false" "null" "undefined" "Infinity" "NaN" "true" "arguments" "this"))) - -(defvar web-mode-razor-keywords - (regexp-opt - (append - (cdr (assoc "razor" web-mode-extra-keywords)) - '("false" "true" "foreach" "if" "else" "in" "var" "for" "display" - "match" "case" "to" - "Html")))) - -(defvar web-mode-selector-font-lock-keywords - (list - '("$[[:alnum:]-]+" 0 'web-mode-css-variable-face) - (cons (concat "@\\(" web-mode-css-at-rules "\\)\\_>") - '(0 'web-mode-css-at-rule-face)) - '("\\_<\\(all\|braille\\|embossed\\|handheld\\|print\\|projection\\|screen\\|speech\\|tty\\|tv\\|and\\|or\\)\\_>" - 1 'web-mode-keyword-face) - '("\\.[^ ,]+" 0 'web-mode-css-selector-class-face) - '("[^,]+" 0 'web-mode-css-selector-tag-face) - (cons (concat ":\\([ ]*[[:alpha:]][^,{]*\\)") '(0 'web-mode-css-pseudo-class-face t t)) - )) - -(defvar web-mode-declaration-font-lock-keywords - (list - '("--[[:alnum:]-]+" 0 'web-mode-css-variable-face) - '("$[[:alnum:]-]+" 0 'web-mode-css-variable-face) - (cons (concat "@\\(" web-mode-css-at-rules "\\)\\_>") '(1 'web-mode-css-at-rule-face)) - '("\\([[:alpha:]-]+\\)[ ]?:" 0 'web-mode-css-property-name-face) - '("\\([[:alpha:]-]+\\)[ ]?(" 1 'web-mode-css-function-face) - '("#[[:alnum:]]\\{1,6\\}" 0 'web-mode-css-color-face t t) - '("![ ]?important" 0 'web-mode-css-priority-face t t) - '("\\([^,]+\\)[ ]+{" 1 'web-mode-css-selector-face) - '("'[^']*'\\|\"[^\"]*\"" 0 'web-mode-string-face t t) - )) - -(defvar web-mode-html-font-lock-keywords - (list - '("]\\|>" 0 'web-mode-html-tag-face t) - '(" \\([[:alnum:]-]+=\\)\\(\"[^\"]+\"\\)" - (1 'web-mode-html-attr-name-face) - (2 'web-mode-html-attr-value-face)) - )) - -;; voir https://www.gnu.org/software/emacs/manual/html_node/elisp/Search_002dbased-Fontification.html -(defvar web-mode-javascript-font-lock-keywords - (list - '("@\\([[:alnum:]_]+\\)\\_>" 0 'web-mode-keyword-face) - '("\\([[:alnum:]]+\\)[`]" 0 'web-mode-preprocessor-face) - (cons (concat "\\_<\\(function\\*\\)\\_>") '(1 'web-mode-keyword-face)) - (cons (concat "\\([ \t}{(]\\|^\\)\\(" web-mode-javascript-keywords "\\)\\_>") '(2 'web-mode-keyword-face)) - (cons (concat "\\_<\\(" web-mode-javascript-constants "\\)\\_>") '(0 'web-mode-constant-face)) - '("\\_<\\([$]\\)(" 1 'web-mode-type-face) - '("\\_<\\(new\\|instanceof\\|class\\|extends\\|import\\) \\([[:alnum:]_.]+\\)\\_>" 2 'web-mode-type-face) - '("\\_<\\([[:alnum:]_]+\\):[ ]*function[ ]*(" 1 'web-mode-function-name-face) - '("\\_<\\(function\\|get\\|set\\)[ ]+\\([[:alnum:]_]+\\)" - (1 'web-mode-keyword-face) - (2 'web-mode-function-name-face)) - '("\\([[:alnum:]_]+\\)[ ]*([^)]*)[ \n]*{" 1 'web-mode-function-name-face) - '("([ ]*\\([[:alnum:]_]+\\)[ ]*=>" 1 'web-mode-function-name-face) - '("[ ]*\\([[:alnum:]_]+\\)[ ]*=[ ]*([^)]*)[ ]*=>[ ]*{" 1 'web-mode-function-name-face) - '("\\_<\\(var\\|let\\|const\\)[ ]+\\([[:alnum:]_]+\\)" 2 'web-mode-variable-name-face) - '("({" "\\([[:alnum:]_]+\\)[, }]+" nil nil (1 'web-mode-variable-name-face)) ;#738 - '("\\([[:alnum:]_]+\\)[ ]*=> [{(]" 1 'web-mode-variable-name-face) - ;; #989 - ;; '("\\(function\\|[,=]\\|^\\)[ ]*(" - ;; ("\\([[:alnum:]_]+\\)\\([ ]*=[^,)]*\\)?[,)]" nil nil (1 'web-mode-variable-name-face))) - '("\\([[:alnum:]_]+\\):" 1 'web-mode-variable-name-face) - '("\\_<\\([[:alnum:]_-]+\\)[ ]?(" 1 'web-mode-function-call-face) - '("[a-zA-Z]<\\([a-zA-Z]+\\)[,>]" 1 'web-mode-type-face) - )) - -(defvar web-mode-stylus-font-lock-keywords - (list - '("^[ \t]*\\([[:alnum:]().-]+\\)$" 1 'web-mode-css-selector-face) - '("^[ \t]*\\([[:alnum:]-]+[ ]*:\\)" 1 'web-mode-css-property-name-face) - )) - -(defvar web-mode-sass-font-lock-keywords - (list - '("^[ \t]*\\([[:alnum:]().-]+\\|&:\\(before\\|after\\)\\)$" 1 'web-mode-css-selector-face) - '("^[ \t]*\\([[:alnum:]-]+[ ]*:\\)" 1 'web-mode-css-property-name-face) - )) - -(defvar web-mode-pug-font-lock-keywords - (list - '("^[ \t]*\\(#?[[:alnum:].-]+\\)" 1 'web-mode-css-selector-face) - ;;'("^[ \t]*\\(#[[:alnum:]-]+\\)" 0 'web-mode-css-selector-face) - '(" \\([@:]?\\sw+[ ]?=\\)" 1 'web-mode-param-name-face) - )) - -(defvar web-mode-sql-font-lock-keywords - (list - (cons (concat "\\_<\\(" web-mode-sql-keywords "\\)\\_>") '(0 'web-mode-keyword-face)) - '("\\_<\\([[:alnum:]_-]+\\)[ ]?(" 1 'web-mode-function-call-face) - )) - -(defvar web-mode-markdown-font-lock-keywords - (list - '("^[ ]*[*].*$" 0 'web-mode-variable-name-face) - '("^[ ]*#.*$" 0 'web-mode-comment-face) - )) - -(defvar web-mode-html-tag-font-lock-keywords - (list - '("\\(" 0 'web-mode-html-tag-bracket-face) - )) - -(defvar web-mode-anki-font-lock-keywords - (list - '("{{[#/^]\\([[:alnum:]_.]+\\)" 1 'web-mode-block-control-face) - ;;'("\\_<\\([[:alnum:]_]+=\\)\\(\"[^\"]*\"\\|[[:alnum:]_.: ]*\\)" - ;; (1 'web-mode-block-attr-name-face) - ;; (2 'web-mode-block-attr-value-face)) - '("{{\\(.+\\)}}" 1 'web-mode-variable-name-face) - )) - -(defvar web-mode-dust-font-lock-keywords - (list - '("{[#:/?@><+^]\\([[:alpha:]_.]+\\)" 1 'web-mode-block-control-face) - '(":\\([[:alpha:]]+\\)" 1 'web-mode-keyword-face) - '("\\_<\\([[:alnum:]_]+=\\)\\(\"[^\"]*\"\\|[[:alnum:]_]*\\)" - (1 'web-mode-block-attr-name-face) - (2 'web-mode-block-attr-value-face)) - '("\\\([[:alnum:]_.]+\\)" 0 'web-mode-variable-name-face) - )) - -(defvar web-mode-expressionengine-font-lock-keywords - (list - '("{/?\\([[:alpha:]_]+:[[:alpha:]_:]+\\|if\\)" 1 'web-mode-block-control-face) - '(":\\([[:alpha:]_]+\\)" 1 'web-mode-keyword-face) - '(" {\\([[:alpha:]_]+\\)}" 1 'web-mode-keyword-face t) - '("\\_<\\([[:alnum:]_]+=\\)\\(\"[^\"]*\"\\|[[:alnum:]_]*\\)" - (1 'web-mode-block-attr-name-face) - (2 'web-mode-block-attr-value-face)) - '("\\\([[:alnum:]_.]+\\)" 0 'web-mode-variable-name-face) - )) - -(defvar web-mode-svelte-font-lock-keywords - (list - (cons (concat "[ ]\\(" web-mode-svelte-keywords "\\)[ ]") '(1 'web-mode-keyword-face)) - '("{[#:/@]\\([[:alpha:]_.]+\\)" 1 'web-mode-block-control-face) - '("\\_<\\([[:alnum:]_]+=\\)\\(\"[^\"]*\"\\|[[:alnum:]_]*\\)" - (1 'web-mode-block-attr-name-face) - (2 'web-mode-block-attr-value-face)) - '("\\\([[:alnum:]_.]+\\)" 0 'web-mode-variable-name-face) - '("\\_<\\([$]\\)\\([[:alnum:]_]+\\)" (1 'web-mode-constant-face) (2 'web-mode-variable-name-face)) - )) - -(defvar web-mode-template-toolkit-font-lock-keywords - (list - (cons (concat "\\_<\\(" web-mode-template-toolkit-keywords "\\)\\_>") '(1 'web-mode-keyword-face)) - '("\\\([[:alpha:]][[:alnum:]_]+\\)[ ]?(" 1 'web-mode-function-call-face) - '("\\\([[:alpha:]][[:alnum:]_]+\\)" 0 'web-mode-variable-name-face) - )) - -(defvar web-mode-smarty-font-lock-keywords - (list - (cons (concat "[ ]\\(" web-mode-smarty-keywords "\\)[ ]") '(1 'web-mode-keyword-face)) - '("{/?\\([[:alpha:]_]+\\)" 1 'web-mode-block-control-face) - '("\\([}{]\\)" 0 'web-mode-block-delimiter-face) - '("\\_<\\([$]\\)\\([[:alnum:]_]+\\)" (1 nil) (2 'web-mode-variable-name-face)) - '("\\_<\\(\\sw+\\)[ ]?(" 1 'web-mode-function-call-face) - '(" \\(\\sw+[ ]?=\\)" 1 'web-mode-param-name-face) - '(" \\(\\sw+\\)[ }]" 1 'web-mode-param-name-face) - '("|\\([[:alnum:]_]+\\)" 1 'web-mode-function-call-face) - '("\\(->\\)\\(\\sw+\\)" (1 nil) (2 'web-mode-variable-name-face)) - '("[.]\\([[:alnum:]_-]+\\)[ ]?(" 1 'web-mode-function-call-face) - '("[.]\\([[:alnum:]_]+\\)" 1 'web-mode-variable-name-face) - '("#\\([[:alnum:]_]+\\)#" 1 'web-mode-variable-name-face) - )) - -(defvar web-mode-velocity-font-lock-keywords - (list - '("#{?\\([[:alpha:]_]+\\)\\_>" (1 'web-mode-block-control-face)) - (cons (concat "\\_<\\(" web-mode-velocity-keywords "\\)\\_>") '(1 'web-mode-keyword-face t t)) - '("#macro([ ]*\\([[:alpha:]]+\\)[ ]+" 1 'web-mode-function-name-face) - '("\\(def\\|define\\) \\([[:alnum:]_-]+\\)(" 2 'web-mode-function-name-face) - '("[.]\\([[:alnum:]_-]+\\)" 1 'web-mode-variable-name-face) - '("\\_<\\($[!]?[{]?\\)\\([[:alnum:]_-]+\\)[}]?" (1 nil) (2 'web-mode-variable-name-face)) - )) - -(defvar web-mode-mako-tag-font-lock-keywords - (list - '("") '(1 'web-mode-constant-face)) - (cons (concat "\\_<\\(" web-mode-python-keywords "\\)\\_>") '(1 'web-mode-keyword-face)) - (cons (concat "\\_<\\(endfor\\|endif\\|endwhile\\)\\_>") '(1 'web-mode-keyword-face)) - )) - -(defvar web-mode-web2py-font-lock-keywords - (list - '("\\_<\\(\\sw+\\)[ ]?(" 1 'web-mode-function-call-face) - (cons (concat "\\_<\\(" web-mode-python-constants "\\)\\_>") '(1 'web-mode-constant-face)) - (cons (concat "\\_<\\(" web-mode-python-keywords "\\)\\_>") '(1 'web-mode-keyword-face)) - (cons (concat "\\_<\\(block\\|extend\\|super\\|end\\|include\\)\\_>") '(1 'web-mode-keyword-face)) - )) - -(defvar web-mode-django-expr-font-lock-keywords - (list - '("|[ ]?\\([[:alpha:]_]+\\)\\_>" 1 'web-mode-filter-face) - (cons (concat "\\_<\\(" web-mode-django-types "\\)\\_>") '(1 'web-mode-type-face)) - '("\\_<\\([[:alpha:]_]+\\)[ ]?(" 1 'web-mode-function-call-face) - '("[[:alnum:]_]+" 0 'web-mode-variable-name-face) - )) - -(defvar web-mode-django-code-font-lock-keywords - (list - '("{%[ ]*\\(set\\)[ ]+\\([[:alpha:]]+\\)[ ]*%}" - (1 'web-mode-block-control-face) - (2 'web-mode-variable-name-face)) - (cons (concat "\\({%\\|#\\)[ ]*\\(" web-mode-django-control-blocks-regexp "\\)[ %]") '(2 'web-mode-block-control-face)) - '("\\({%\\|#\\)[ ]*\\(end[[:alpha:]]+\\)\\_>" 2 'web-mode-block-control-face) ;#504 - (cons (concat "\\_<\\(" web-mode-django-keywords "\\)\\_>") '(1 'web-mode-keyword-face)) - (cons (concat "\\_<\\(" web-mode-django-types "\\)\\_>") '(1 'web-mode-type-face)) - '("|[ ]?\\([[:alpha:]_]+\\)\\_>" 1 'web-mode-function-call-face) - '("\\_<\\([[:alpha:]_]+\\)[ ]?(" 1 'web-mode-function-call-face) - '("[[:alnum:]_.]+" 0 'web-mode-variable-name-face) - '("[[:alnum:]_]+\\([.][[:alnum:]_]+\\)+" 0 'web-mode-variable-name-face t t) - )) - -(defvar web-mode-ctemplate-font-lock-keywords - (list - '("{[~]?{[#/>^]?[ ]*\\([[:alnum:]_.-]+\\)" 1 'web-mode-block-control-face) - '("[ \t]+\\([[:alnum:]_-]+\\)=" - (1 'web-mode-block-attr-name-face)) - '("\"[^\"]+\"" 0 'web-mode-block-string-face) - )) - -(defvar web-mode-astro-font-lock-keywords - (append - (list - '("\\({\\)\\([[:alpha:]]+\\)\\(}\\)" - (1 'web-mode-block-control-face) - (2 'web-mode-variable-name-face) - (3 'web-mode-block-control-face))) - web-mode-javascript-font-lock-keywords - )) - -(defvar web-mode-antlers-font-lock-keywords - (list - '("{{[ ]*\\(/?\\(if\\|elseif\\|else\\|unless\\|switch\\)\\)" 1 'web-mode-block-control-face) - '("[ \t]+\\(:?[[:alnum:]_-]+\\)=" (1 'web-mode-block-attr-name-face)) - '("[[:alnum:]_.]+" 0 'web-mode-variable-name-face) - '("\"[^\"]+\"" 0 'web-mode-block-string-face) - '("'[^']+'" 0 'web-mode-block-string-face) - )) - -(defvar web-mode-razor-font-lock-keywords - (list - '("@\\([[:alnum:]_.]+\\)[ ]*[({]" 1 'web-mode-block-control-face) - (cons (concat "\\_<\\(" web-mode-razor-keywords "\\)\\_>") '(1 'web-mode-keyword-face)) - '("\\_<\\(String\\)\\_>" 1 'web-mode-type-face) - '("\\([[:alnum:]]+:\\)" 1 'web-mode-symbol-face) - '("\\(@[[:alnum:]_.]+\\)" 1 'web-mode-variable-name-face) - )) - -(defvar web-mode-riot-font-lock-keywords - (list - '("\\(parent\\|opts\\|tags\\|this\\)\\.\\([[:alnum:]_.]+\\)" - (1 'web-mode-constant-face) - (2 'web-mode-variable-name-face)) - '("\\([[:alnum:]_.]+\\)" 0 'web-mode-variable-name-face) - )) - -(defvar web-mode-closure-font-lock-keywords - (list - '("{\\([@/]?[[:alpha:]]+[?]?\\)" 1 'web-mode-block-control-face) - '("{[@]?param[?]?[ ]+\\([[:alnum:]]+[:]?\\)" 1 'web-mode-symbol-face) - '("\\_<\\(true\\|false\\|null\\)\\_>" 1 'web-mode-type-face) - '("\\\_<[[:alpha:]]+:[ ]+\\([[:alpha:]]+\\)" 1 'web-mode-type-face) - (cons (concat "\\_<\\(" web-mode-closure-keywords "\\)\\_>") '(1 'web-mode-keyword-face)) - '("{\\(alias\\|call\\|delcall\\|delpackage\\|deltemplate\\|namespace\\|template\\)[ ]+\\([[:alnum:].]+\\)" 2 'web-mode-constant-face) - '("\\(allowemptydefault\\|data\\|desc\\|meaning\\|autoescape\\|private\\|variant\\)=" 0 'web-mode-block-attr-name-face) - '("|\\([[:alpha:]]+\\)" 1 'web-mode-function-call-face) - '("\\_<\\([[:alnum:]]+\\)[ ]?(" 1 'web-mode-function-call-face) - '("$\\([[:alnum:]._]+\\)" 1 'web-mode-variable-name-face) - )) - -(defvar web-mode-go-font-lock-keywords - (list - '("{{[-]?[ ]*\\([[:alpha:]]+\\)" 1 'web-mode-block-control-face) - '("\\_") '(0 'web-mode-type-face)) - (cons (concat "\\_<\\(" web-mode-go-keywords "\\)\\_>") '(1 'web-mode-keyword-face)) - (cons (concat "\\_<\\(" web-mode-go-functions "\\)\\_>") '(1 'web-mode-function-call-face)) - '("[$.]\\([[:alnum:]_]+\\)" 1 'web-mode-variable-name-face t t) - '("|[ ]?\\([[:alpha:]_]+\\)\\_>" 1 'web-mode-filter-face) - )) - -(defvar web-mode-expression-font-lock-keywords - (list - '("[[:alpha:]_]" 0 'web-mode-variable-name-face) - )) - -(defvar web-mode-angular-font-lock-keywords - (list - '("[[:alpha:]_]" 0 'web-mode-variable-name-face) - )) - -(defvar web-mode-underscore-font-lock-keywords - (list - (cons (concat "\\_<\\(" web-mode-javascript-keywords "\\)\\_>") '(0 'web-mode-keyword-face)) - '("\\_<\\(_\.[[:alpha:]]+\\)(" 1 'web-mode-function-call-face) - '("\\_" 1 'web-mode-type-face) - '("\\_<\\([[:alnum:]_]+\\):[ ]*function[ ]*(" 1 'web-mode-function-name-face) - '("\\_<\\(var\\)\\_>[ ]+\\([[:alnum:]_]+\\)" - (1 'web-mode-keyword-face) - (2 'web-mode-variable-name-face)) - )) - -(defvar web-mode-vue-font-lock-keywords - (list - '("\\_<\\([[:alnum:]_-]+\\)[ ]?(" 1 'web-mode-function-call-face) - '("[[:alpha:]_]" 0 'web-mode-variable-name-face) - )) - -(defvar web-mode-engine-tag-font-lock-keywords - (list - '("") '(0 'web-mode-keyword-face)) - '("\\(public\\|private\\)[ ]+\\([[:alpha:]]+\\)[ ]+\\([[:alnum:]._]+\\)[ ]?(" - (2 'web-mode-type-face) - (3 'web-mode-function-name-face)) - '("\\_<\\([[:alnum:]._]+\\)[ ]?(" 1 'web-mode-function-call-face) - '("@\\(\\sw*\\)" 1 'web-mode-variable-name-face) - '("\\_<\\([[:alnum:].]+\\)[ ]+[{[:alpha:]]+" 1 'web-mode-type-face) - )) - -(defvar web-mode-asp-font-lock-keywords - (list - (cons (concat "\\_<\\(" web-mode-asp-keywords "\\)\\_>") '(0 'web-mode-keyword-face)) - (cons (concat "\\_<\\(" web-mode-asp-types "\\)\\_>") '(0 'web-mode-type-face)) - (cons (concat "\\_<\\(" web-mode-asp-constants "\\)\\_>") '(0 'web-mode-constant-face)) - '("\\(Class\\|new\\) \\([[:alnum:]_]+\\)" 2 'web-mode-type-face) - '("Const \\([[:alnum:]_]+\\)" 1 'web-mode-constant-face) - '("\\_" - (0 'web-mode-keyword-face) - ("[[:alnum:]_]+" nil nil (0 'web-mode-variable-name-face))) - '("\\_<\\(public\\|private\\|sub\\|function\\)\\_> \\([[:alnum:]_]+\\)[ ]*(" 2 'web-mode-function-name-face) - '("\\_<\\(public\\|private\\|dim\\)\\_> \\([[:alnum:]_]+\\)" 2 'web-mode-variable-name-face) - )) - -(defvar web-mode-aspx-font-lock-keywords - (list - (cons (concat "\\_<\\(" web-mode-aspx-keywords "\\)\\_>") '(0 'web-mode-keyword-face)) - '("\\_<\\([[:alnum:].]+\\)[ ]+[[:alpha:]]+" 1 'web-mode-type-face) - )) - -(defvar web-mode-uel-font-lock-keywords - (list - '("[$#{]{\\|}" 0 'web-mode-preprocessor-face) - '("\\([[:alpha:]_]+\\)[ ]?(" 1 'web-mode-function-call-face) - '("|[ ]*\\(trim\\|x\\|u\\)" 1 'web-mode-function-call-face) - '("[[:alpha:]_]" 0 'web-mode-variable-name-face) - )) - -(defvar web-mode-php-var-interpolation-font-lock-keywords - (list - '("[[:alpha:]_]" 0 'web-mode-variable-name-face) - '("\".+\"\\|'.*'" 0 'web-mode-string-face) - )) - -(defvar web-mode-marko-font-lock-keywords - (list - '("[[:alnum:]_]+" 0 'web-mode-variable-name-face) - )) - -(defvar web-mode-freemarker-square-font-lock-keywords - (list - '("\\[/?[#@]\\([[:alpha:]_.]*\\)" 1 'web-mode-block-control-face) - '("#\\(macro\\|function\\) \\([[:alpha:]]+\\)" 2 'web-mode-function-name-face) - (cons (concat "\\_<\\(" web-mode-freemarker-keywords "\\)\\_>") '(1 'web-mode-keyword-face)) - '("\\_<\\([[:alnum:]._]+\\)[ ]?(" 1 'web-mode-function-call-face) - '("[[:alpha:]]\\([[:alnum:]_]+\\)?" 0 'web-mode-variable-name-face) - )) - -(defvar web-mode-freemarker-font-lock-keywords - (list - '("") '(1 'web-mode-keyword-face)) - '("\\_<\\([[:alnum:]._]+\\)[ ]?(" 1 'web-mode-function-call-face) - '("[[:alpha:]]\\([[:alnum:]_]+\\)?" 0 'web-mode-variable-name-face) - )) - -(defvar web-mode-directive-font-lock-keywords - (list - '("<%@[ ]*\\([[:alpha:]]+\\)[ ]+" 1 'web-mode-block-control-face) - '("\\_<\\([[:alpha:]]+=\\)\\(\"[^\"]*\"\\)" - (1 'web-mode-block-attr-name-face t t) - (2 'web-mode-block-attr-value-face t t)) - )) - -(defvar web-mode-erb-font-lock-keywords - (list - '("[^:]\\(:[[:alnum:]_]+\\)" 1 'web-mode-symbol-face) - '("\\([[:alnum:]_]+:\\)[ ]+" 1 'web-mode-symbol-face) - (cons (concat "\\_<\\(" web-mode-erb-builtins "\\)\\_>") '(0 'web-mode-builtin-face)) - (cons (concat "\\_<\\(" web-mode-erb-keywords "\\)\\_>") '(0 'web-mode-keyword-face)) - '("\\_<\\(self\\|true\\|false\\|nil\\)\\_>" 0 'web-mode-variable-name-face) - '("[@$]@?\\([[:alnum:]_]+\\)" 0 'web-mode-variable-name-face) - '("class[ ]+\\([[:alnum:]_]+\\)" 1 'web-mode-type-face) - '("def[ ]+\\([[:alnum:]_]+\\)" 1 'web-mode-function-name-face) - '("\\(?:\\_<\\|::\\)\\([A-Z]+[[:alnum:]_]+\\)" 1 (unless (eq (char-after) ?\() 'web-mode-type-face)) - '("/[^/]+/" 0 'web-mode-string-face) - )) - -(defvar web-mode-ejs-font-lock-keywords - web-mode-javascript-font-lock-keywords) - -(defvar web-mode-python-font-lock-keywords - (list - (cons (concat "\\_<\\(" web-mode-python-keywords "\\)\\_>") '(0 'web-mode-keyword-face)) - )) - -(defvar web-mode-elixir-font-lock-keywords - (list - '("@\\([[:alnum:]_]+\\)" 0 'web-mode-variable-name-face) - '("[ ]\\(:[[:alnum:]-_]+\\)" 1 'web-mode-symbol-face) - '("def[ ]+\\([[:alnum:]_]+\\)" 1 'web-mode-function-name-face) - (cons (concat "\\_<\\(" web-mode-elixir-keywords "\\)\\_>") '(0 'web-mode-builtin-face)) - (cons (concat "\\_<\\(" web-mode-elixir-constants "\\)\\_>") '(0 'web-mode-constant-face)) - )) - -(defvar web-mode-erlang-font-lock-keywords - (list - (cons (concat "\\_<\\(" web-mode-erlang-keywords "\\)\\_>") '(0 'web-mode-keyword-face)) - (cons (concat "\\_<\\(" web-mode-erlang-constants "\\)\\_>") '(0 'web-mode-constant-face)) - '("@\\([[:alnum:]_]+\\)" 0 'web-mode-variable-name-face) - '("[ ]\\(:[[:alnum:]-_]+\\)" 1 'web-mode-symbol-face) - )) - -(defvar web-mode-mason-code-font-lock-keywords - (list - (cons (concat "\\_<\\(" web-mode-mason-keywords "\\)\\_>") '(0 'web-mode-keyword-face)) - '("sub[ ]+\\([[:alnum:]_]+\\)" 1 'web-mode-function-name-face) - '("\\_<\\([[:alnum:]_]+\\)[ ]?::" 1 'web-mode-type-face) - '("\\([@]\\)\\([[:alnum:]#_]*\\)" (1 nil) (2 'web-mode-variable-name-face)) - '("\\_<\\([$%]\\)\\([[:alnum:]@#_]*\\)" (1 nil) (2 'web-mode-variable-name-face)) - '("{\\([[:alnum:]_]+\\)}" 1 'web-mode-variable-name-face) - '("\\_<\\(\\sw+\\)[ ]?(" 1 'web-mode-function-call-face) - '("[[:alnum:]_][ ]?::[ ]?\\([[:alnum:]_]+\\)" 1 'web-mode-variable-name-face) - '("->[ ]?\\([[:alnum:]_]+\\)" 1 'web-mode-variable-name-face) - '("\\(?:method\\|def\\) \\([[:alnum:]._]+\\)" 1 'web-mode-function-name-face) - '("|[ ]*\\([[:alnum:],]+\\)[ ]*%>" 1 'web-mode-filter-face) - )) - -(defvar web-mode-mason-block-font-lock-keywords - (list - '("<[/]?%\\([[:alpha:]]+\\)" 1 'web-mode-block-control-face) - '("[[:alpha:]]" 0 'web-mode-block-attr-value-face) - )) - -(defvar web-mode-mojolicious-font-lock-keywords - (list - (cons (concat "\\_<\\(" web-mode-perl-keywords "\\)\\_>") '(0 'web-mode-keyword-face)) - '("\\_<\\(begin\\|end\\)\\_>" 1 'web-mode-constant-face) - '("\\_<\\([$]\\)\\([[:alnum:]_]*\\)" (1 nil) (2 'web-mode-variable-name-face)) - )) - -(defvar web-mode-lsp-font-lock-keywords - (list - (cons (concat "\\_<\\(" web-mode-lsp-keywords "\\)\\_>") '(0 'web-mode-keyword-face)) - (cons (concat "\\_<\\(" web-mode-lsp-constants "\\)\\_>") '(1 'web-mode-constant-face)) - '("[ ]\\(:[[:alnum:]-_]+\\)" 1 'web-mode-symbol-face) - '("(defun \\([[:alnum:]-:]+\\)" 1 'web-mode-function-name-face) - '("(defvar \\([[:alnum:]-:]+\\)" 1 'web-mode-variable-name-face) - )) - -(defvar web-mode-cl-emb-font-lock-keywords - (list - (cons (concat "\\_<\\(" web-mode-cl-emb-keywords "\\)\\_>") '(0 'web-mode-keyword-face)) - (cons (concat "\\_<\\(" web-mode-cl-emb-constants "\\)\\_>") '(0 'web-mode-constant-face)) - '("\\(@\\)" 1 'web-mode-function-call-face) - (list (concat "\\(@" web-mode-cl-emb-keywords "\\)[ ]+\\([[:alnum:]_]+\\)") - '(1 'web-mode-keyword-face) - '(2 'web-mode-variable-name-face)) - )) - -(defvar web-mode-artanis-font-lock-keywords - (list - (cons (concat "\\_<\\(" web-mode-artanis-keywords "\\)\\_>") '(0 'web-mode-keyword-face)) - (cons (concat "\\_<\\(" web-mode-artanis-constants "\\)\\_>") '(0 'web-mode-constant-face)) - '("(define[*]? (\\([[:alnum:]-:_!#$%^&*=+/?<>.]+\\)" 1 'web-mode-function-name-face) - '("\\(#:[[:alnum:]-:_!#$%^&*=+/?<>.]+\\)" 1 'web-mode-builtin-face) - )) - -(defvar web-mode-php-font-lock-keywords - (list - (cons (concat "\\_<\\(" web-mode-php-keywords "\\)\\_>") '(0 'web-mode-keyword-face)) - (cons (concat "\\_<\\(" web-mode-php-types "\\)\\_>") '(1 'web-mode-type-face)) - (cons (concat "\\(" web-mode-php-constants "\\)") '(0 'web-mode-constant-face)) - '("function[ ]+\\([[:alnum:]_]+\\)" 1 'web-mode-function-name-face) - '("\\_<\\([[:alnum:]_]+\\)[ ]?(" 1 'web-mode-function-call-face) - '("[[:alnum:]_][ ]?::[ ]?\\([[:alnum:]_]+\\)" 1 'web-mode-constant-face) - '("->[ ]?\\([[:alnum:]_]+\\)" 1 'web-mode-variable-name-face) - '("\\_<\\([[:alnum:]_]+\\)[ ]?::" 1 'web-mode-type-face) - '("\\_<\\(instanceof\\|class\\|extends\\|new\\)[ ]+\\([[:alnum:]_]+\\)" 2 'web-mode-type-face) - '("\\(\\_<\\|[+-]\\)\\([$]\\)\\([[:alnum:]_]*\\)" (2 nil) (3 'web-mode-variable-name-face)) - )) - -(defvar web-mode-spip-font-lock-keywords - (list - '("<:.+:>" 0 'web-mode-block-string-face) - '("#[A-Z0-9_]+" 0 'web-mode-variable-name-face) - '("|[a-z0-9_=!?<>]+" 0 'web-mode-function-call-face) - '("(\\([[:alnum:]_ ]+\\))" 1 'web-mode-constant-face) - )) - -(defvar web-mode-latex-font-lock-keywords - (list - '("[[:alnum:]_]+" 0 'web-mode-function-name-face t t) - )) - -(defvar web-mode-blade-font-lock-keywords - (append - (list - '("@\\([[:alpha:]_]+\\)" (1 'web-mode-block-control-face))) - web-mode-php-font-lock-keywords)) - -(defvar web-mode-engines-font-lock-keywords - '(("angular" . web-mode-angular-font-lock-keywords) - ("anki" . web-mode-anki-font-lock-keywords) - ("antlers" . web-mode-antlers-font-lock-keywords) - ("artanis" . web-mode-artanis-font-lock-keywords) - ("astro" . web-mode-astro-font-lock-keywords) - ("blade" . web-mode-blade-font-lock-keywords) - ("cl-emb" . web-mode-cl-emb-font-lock-keywords) - ("closure" . web-mode-closure-font-lock-keywords) - ("ctemplate" . web-mode-ctemplate-font-lock-keywords) - ("dust" . web-mode-dust-font-lock-keywords) - ("elixir" . web-mode-elixir-font-lock-keywords) - ("ejs" . web-mode-ejs-font-lock-keywords) - ("erb" . web-mode-erb-font-lock-keywords) - ("expressionengine" . web-mode-expressionengine-font-lock-keywords) - ("go" . web-mode-go-font-lock-keywords) - ("hero" . web-mode-go-font-lock-keywords) - ("lsp" . web-mode-lsp-font-lock-keywords) - ("marko" . web-mode-marko-font-lock-keywords) - ("mojolicious" . web-mode-mojolicious-font-lock-keywords) - ("php" . web-mode-php-font-lock-keywords) - ("python" . web-mode-python-font-lock-keywords) - ("razor" . web-mode-razor-font-lock-keywords) - ("riot" . web-mode-riot-font-lock-keywords) - ("smarty" . web-mode-smarty-font-lock-keywords) - ("spip" . web-mode-spip-font-lock-keywords) - ("template-toolkit" . web-mode-template-toolkit-font-lock-keywords) - ("underscore" . web-mode-underscore-font-lock-keywords) - ("web2py" . web-mode-web2py-font-lock-keywords) - ("velocity" . web-mode-velocity-font-lock-keywords) - ("vue" . web-mode-vue-font-lock-keywords) - ("xoops" . web-mode-smarty-font-lock-keywords) - ("svelte" . web-mode-svelte-font-lock-keywords) - ) - "Engines font-lock keywords") - -(defvar web-mode-prettify-symbols-alist - '(("=>" . 8658) - (">=" . 8805) - ("<=" . 8804))) - -(defvar web-mode-before-auto-complete-hooks nil - "List of functions to run before triggering the auto-complete library. - -Auto-complete sources will sometimes need some tweaking to work -nicely with web-mode. This hook gives users the chance to adjust -the environment as needed for ac-sources, right before they're used.") - -(defvar web-mode-ignore-ac-start-advice nil - "If not nil `defadvice' for `ac-start' will be ignored. - -Can be set inside a hook in `web-mode-before-auto-complete-hooks' to -non nil to ignore the defadvice which sets ac-sources according to current -language. This is needed if the corresponding auto-completion triggers -another auto-completion with different ac-sources (e.g. ac-php)") - -(defvar web-mode-ac-sources-alist nil - "alist mapping language names to ac-sources for that language.") - -(defvar web-mode-trace nil - "Activate debug tracing.") - -(defvar web-mode-syntax-table - (let ((table (make-syntax-table))) - (modify-syntax-entry ?- "_" table) - (modify-syntax-entry ?_ "_" table) ;#563 - (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) - "Syntax table used to reveal whitespaces.") - -(defvar web-mode-map - (let ((map (make-sparse-keymap))) - - (define-key map [menu-bar wm] (cons "Web-Mode" (make-sparse-keymap))) - (define-key map [menu-bar wm dom] (cons "Dom" (make-sparse-keymap))) - (define-key map [menu-bar wm blk] (cons "Block" (make-sparse-keymap))) - (define-key map [menu-bar wm attr] (cons "Html Attr" (make-sparse-keymap))) - (define-key map [menu-bar wm tag] (cons "Html Tag" (make-sparse-keymap))) - (define-key map [menu-bar wm elt] (cons "Html Element" (make-sparse-keymap))) - - (define-key map [menu-bar wm sep-1] '(menu-item "--")) - - (define-key map [menu-bar wm dom dom-xpa] '(menu-item "XPath" web-mode-dom-xpath)) - (define-key map [menu-bar wm dom dom-tra] '(menu-item "Traverse" web-mode-dom-traverse)) - (define-key map [menu-bar wm dom dom-err] '(menu-item "Show error(s)" web-mode-dom-errors-show)) - (define-key map [menu-bar wm dom dom-ent] '(menu-item "Replace html entities" web-mode-dom-entities-replace)) - (define-key map [menu-bar wm dom dom-quo] '(menu-item "Replace dumb quotes" web-mode-dom-quotes-replace)) - (define-key map [menu-bar wm dom dom-apo] '(menu-item "Replace apostrophes" web-mode-dom-apostrophes-replace)) - (define-key map [menu-bar wm dom dom-nor] '(menu-item "Normalize" web-mode-dom-normalize)) - - (define-key map [menu-bar wm blk blk-sel] '(menu-item "Select" web-mode-block-select)) - (define-key map [menu-bar wm blk blk-pre] '(menu-item "Previous" web-mode-block-previous)) - (define-key map [menu-bar wm blk blk-nex] '(menu-item "Next" web-mode-block-next)) - (define-key map [menu-bar wm blk blk-kil] '(menu-item "Kill" web-mode-block-kill)) - (define-key map [menu-bar wm blk blk-end] '(menu-item "End" web-mode-block-end)) - (define-key map [menu-bar wm blk blk-clo] '(menu-item "Close" web-mode-block-close)) - (define-key map [menu-bar wm blk blk-beg] '(menu-item "Beginning" web-mode-block-beginning)) - - (define-key map [menu-bar wm attr attr-ins] '(menu-item "Insert" web-mode-attribute-insert)) - (define-key map [menu-bar wm attr attr-end] '(menu-item "End" web-mode-attribute-end)) - (define-key map [menu-bar wm attr attr-beg] '(menu-item "Beginning" web-mode-attribute-beginning)) - (define-key map [menu-bar wm attr attr-sel] '(menu-item "Select" web-mode-attribute-select)) - (define-key map [menu-bar wm attr attr-kil] '(menu-item "Kill" web-mode-attribute-kill)) - (define-key map [menu-bar wm attr attr-nex] '(menu-item "Next" web-mode-attribute-next)) - (define-key map [menu-bar wm attr attr-pre] '(menu-item "Previous" web-mode-attribute-previous)) - (define-key map [menu-bar wm attr attr-tra] '(menu-item "Transpose" web-mode-attribute-transpose)) - - (define-key map [menu-bar wm tag tag-beg] '(menu-item "Sort Attributes" web-mode-tag-attributes-sort)) - (define-key map [menu-bar wm tag tag-sel] '(menu-item "Select" web-mode-tag-select)) - (define-key map [menu-bar wm tag tag-pre] '(menu-item "Previous" web-mode-tag-previous)) - (define-key map [menu-bar wm tag tag-nex] '(menu-item "Next" web-mode-tag-next)) - (define-key map [menu-bar wm tag tag-end] '(menu-item "End" web-mode-tag-end)) - (define-key map [menu-bar wm tag tag-beg] '(menu-item "Beginning" web-mode-tag-beginning)) - - (define-key map [menu-bar wm elt elt-con] '(menu-item "Contract" web-mode-element-contract)) - (define-key map [menu-bar wm elt elt-ext] '(menu-item "Extract" web-mode-element-extract)) - (define-key map [menu-bar wm elt elt-van] '(menu-item "Vanish" web-mode-element-vanish)) - (define-key map [menu-bar wm elt elt-exc] '(menu-item "Transpose" web-mode-element-transpose)) - (define-key map [menu-bar wm elt elt-sel] '(menu-item "Select" web-mode-element-select)) - (define-key map [menu-bar wm elt elt-ren] '(menu-item "Rename" web-mode-element-rename)) - (define-key map [menu-bar wm elt elt-pre] '(menu-item "Previous" web-mode-element-previous)) - (define-key map [menu-bar wm elt elt-par] '(menu-item "Parent" web-mode-element-parent)) - (define-key map [menu-bar wm elt elt-nex] '(menu-item "Next" web-mode-element-next)) - (define-key map [menu-bar wm elt elt-mut] '(menu-item "Mute blanks" web-mode-element-mute-blanks)) - (define-key map [menu-bar wm elt elt-del] '(menu-item "Kill" web-mode-element-kill)) - (define-key map [menu-bar wm elt elt-end] '(menu-item "End" web-mode-element-end)) - (define-key map [menu-bar wm elt elt-inn] '(menu-item "Content (select)" web-mode-element-content-select)) - (define-key map [menu-bar wm elt elt-clo] '(menu-item "Close" web-mode-element-close)) - (define-key map [menu-bar wm elt elt-ins] '(menu-item "Insert" web-mode-element-insert)) - (define-key map [menu-bar wm elt elt-ins] '(menu-item "Word to tag" web-mode-element-insert-at-point)) - (define-key map [menu-bar wm elt elt-dup] '(menu-item "Clone" web-mode-element-clone)) - (define-key map [menu-bar wm elt elt-cfo] '(menu-item "Children fold" web-mode-element-children-fold-or-unfold)) - (define-key map [menu-bar wm elt elt-chi] '(menu-item "Child" web-mode-element-child)) - (define-key map [menu-bar wm elt elt-beg] '(menu-item "Beginning" web-mode-element-beginning)) - - (define-key map [menu-bar wm fol] '(menu-item "Fold/Unfold" web-mode-fold-or-unfold)) - (define-key map [menu-bar wm hig] '(menu-item "Fontify buffer" web-mode-buffer-fontify)) - (define-key map [menu-bar wm ind] '(menu-item "Indent buffer" web-mode-buffer-indent)) - (define-key map [menu-bar wm nav] '(menu-item "Tag/Block navigation" web-mode-navigate)) - (define-key map [menu-bar wm exp] '(menu-item "Mark and Expand" web-mode-mark-and-expand)) - (define-key map [menu-bar wm spa] '(menu-item "Toggle whitespaces" web-mode-whitespaces-show)) - (define-key map [menu-bar wm sni] '(menu-item "Insert snippet" web-mode-snippet-insert)) - - ;;-------------------------------------------------------------------------- - ;; "C-c " are reserved for users - - (define-key map (kbd "C-c C-a b") 'web-mode-attribute-beginning) - (define-key map (kbd "C-c C-a e") 'web-mode-attribute-end) - (define-key map (kbd "C-c C-a i") 'web-mode-attribute-insert) - (define-key map (kbd "C-c C-a n") 'web-mode-attribute-next) - (define-key map (kbd "C-c C-a s") 'web-mode-attribute-select) - (define-key map (kbd "C-c C-a k") 'web-mode-attribute-kill) - (define-key map (kbd "C-c C-a p") 'web-mode-attribute-previous) - (define-key map (kbd "C-c C-a t") 'web-mode-attribute-transpose) - - (define-key map (kbd "C-c C-b b") 'web-mode-block-beginning) - (define-key map (kbd "C-c C-b c") 'web-mode-block-close) - (define-key map (kbd "C-c C-b e") 'web-mode-block-end) - (define-key map (kbd "C-c C-b k") 'web-mode-block-kill) - (define-key map (kbd "C-c C-b n") 'web-mode-block-next) - (define-key map (kbd "C-c C-b p") 'web-mode-block-previous) - (define-key map (kbd "C-c C-b s") 'web-mode-block-select) - - (define-key map (kbd "C-c C-d a") 'web-mode-dom-apostrophes-replace) - (define-key map (kbd "C-c C-d d") 'web-mode-dom-errors-show) - (define-key map (kbd "C-c C-d e") 'web-mode-dom-entities-replace) - (define-key map (kbd "C-c C-d n") 'web-mode-dom-normalize) - (define-key map (kbd "C-c C-d q") 'web-mode-dom-quotes-replace) - (define-key map (kbd "C-c C-d t") 'web-mode-dom-traverse) - (define-key map (kbd "C-c C-d x") 'web-mode-dom-xpath) - - (define-key map (kbd "C-c C-e /") 'web-mode-element-close) - (define-key map (kbd "C-c C-e a") 'web-mode-element-content-select) - (define-key map (kbd "C-c C-e b") 'web-mode-element-beginning) - (define-key map (kbd "C-c C-e c") 'web-mode-element-clone) - (define-key map (kbd "C-c C-e d") 'web-mode-element-child) - (define-key map (kbd "C-c C-e e") 'web-mode-element-end) - (define-key map (kbd "C-c C-e f") 'web-mode-element-children-fold-or-unfold) - (define-key map (kbd "C-c C-e i") 'web-mode-element-insert) - (define-key map (kbd "C-c C-e I") 'web-mode-element-insert-at-point) - (define-key map (kbd "C-c C-e k") 'web-mode-element-kill) - (define-key map (kbd "C-c C-e m") 'web-mode-element-mute-blanks) - (define-key map (kbd "C-c C-e n") 'web-mode-element-next) - (define-key map (kbd "C-c C-e p") 'web-mode-element-previous) - (define-key map (kbd "C-c C-e r") 'web-mode-element-rename) - (define-key map (kbd "C-c C-e s") 'web-mode-element-select) - (define-key map (kbd "C-c C-e t") 'web-mode-element-transpose) - (define-key map (kbd "C-c C-e u") 'web-mode-element-parent) - (define-key map (kbd "C-c C-e v") 'web-mode-element-vanish) - (define-key map (kbd "C-c C-e w") 'web-mode-element-wrap) - (define-key map (kbd "C-c C-e +") 'web-mode-element-extract) - (define-key map (kbd "C-c C-e -") 'web-mode-element-contract) - - (define-key map (kbd "C-c C-t a") 'web-mode-tag-attributes-sort) - (define-key map (kbd "C-c C-t b") 'web-mode-tag-beginning) - (define-key map (kbd "C-c C-t e") 'web-mode-tag-end) - (define-key map (kbd "C-c C-t m") 'web-mode-tag-match) - (define-key map (kbd "C-c C-t n") 'web-mode-tag-next) - (define-key map (kbd "C-c C-t p") 'web-mode-tag-previous) - (define-key map (kbd "C-c C-t s") 'web-mode-tag-select) - - ;;-------------------------------------------------------------------------- - - ;;(define-key map (kbd "M-q") 'fill-paragraph) - (define-key map (kbd "M-;") 'web-mode-comment-or-uncomment) - - ;;C-c C-a : attribute - ;;C-c C-b : block - ;;C-c C-d : dom - ;;C-c C-e : element - (define-key map (kbd "C-c C-f") 'web-mode-fold-or-unfold) - (define-key map (kbd "C-c C-h") 'web-mode-buffer-fontify) - (define-key map (kbd "C-c C-i") 'web-mode-buffer-indent) - (define-key map (kbd "C-c C-j") 'web-mode-jshint) - (define-key map (kbd "C-c C-l") 'web-mode-file-link) - (define-key map (kbd "C-c C-m") 'web-mode-mark-and-expand) - (define-key map (kbd "C-c C-n") 'web-mode-navigate) - (define-key map (kbd "C-c C-r") 'web-mode-reload) - (define-key map (kbd "C-c C-s") 'web-mode-snippet-insert) - ;;C-c C-t : tag - (define-key map (kbd "C-c C-w") 'web-mode-whitespaces-show) - - map) - "Keymap for `web-mode'.") - -;;---- COMPATIBILITY ----------------------------------------------------------- - -(eval-and-compile - - ;; compatibility with emacs < 23 - (defun web-mode-string-match-p (regexp string &optional start) - "Same as `string-match' except it does not change the match data." - (save-match-data - (string-match regexp string start))) - - (unless (fboundp 'string-match-p) - (fset 'string-match-p (symbol-function 'web-mode-string-match-p))) - - ;; compatibility with emacs < 23.3 - (if (fboundp 'with-silent-modifications) - (defalias 'web-mode-with-silent-modifications 'with-silent-modifications) - (defmacro web-mode-with-silent-modifications (&rest body) - `(let ((old-modified-p (buffer-modified-p)) - (inhibit-modification-hooks t) - (buffer-undo-list t)) - (unwind-protect - ,@body - (restore-buffer-modified-p old-modified-p))))) - - ;; compatibility with emacs < 24.3 - (defun web-mode-buffer-narrowed-p () - (if (fboundp 'buffer-narrowed-p) - (buffer-narrowed-p) - (/= (- (point-max) (point-min)) (buffer-size)))) - - ;; compatibility with emacs < 24 - (defalias 'web-mode-prog-mode - (if (fboundp 'prog-mode) 'prog-mode 'fundamental-mode)) - - ;; compatibility with emacs < 24.3 - (unless (fboundp 'setq-local) - (defmacro setq-local (var val) - `(set (make-local-variable ',var) ,val))) - - ;; compatability with emacs < 24.4 - (defun web-mode-string-suffix-p (suffix string) - "Return t if STRING ends with SUFFIX." - (and (string-match (rx-to-string `(: ,suffix eos) t) - string) - t)) - - (unless (fboundp 'string-suffix-p) - (fset 'string-suffix-p (symbol-function 'web-mode-string-suffix-p))) - - (unless (fboundp 'seq-some) - (defun seq-some (pred seq) - (unless (null seq) - (or (funcall pred (car seq)) - (seq-some pred (cdr seq)))))) - ) ;eval-and-compile - -;;---- MAJOR MODE -------------------------------------------------------------- - -;;;###autoload -(define-derived-mode - web-mode web-mode-prog-mode "Web" - "Major mode for editing web templates." - - (make-local-variable 'web-mode-attr-indent-offset) - (make-local-variable 'web-mode-attr-value-indent-offset) - (make-local-variable 'web-mode-auto-pairs) - (make-local-variable 'web-mode-block-regexp) - (make-local-variable 'web-mode-change-beg) - (make-local-variable 'web-mode-change-end) - (make-local-variable 'web-mode-code-indent-offset) - (make-local-variable 'web-mode-column-overlays) - (make-local-variable 'web-mode-comment-formats) - (make-local-variable 'web-mode-comment-style) - (make-local-variable 'web-mode-content-type) - (make-local-variable 'web-mode-css-indent-offset) - (make-local-variable 'web-mode-display-table) - (make-local-variable 'web-mode-django-control-blocks) - (make-local-variable 'web-mode-django-control-blocks-regexp) - (make-local-variable 'web-mode-enable-block-face) - (make-local-variable 'web-mode-enable-inlays) - (make-local-variable 'web-mode-enable-part-face) - (make-local-variable 'web-mode-enable-sexp-functions) - (make-local-variable 'web-mode-engine) - (make-local-variable 'web-mode-engine-attr-regexp) - (make-local-variable 'web-mode-engine-file-regexps) - (make-local-variable 'web-mode-engine-open-delimiter-regexps) - (make-local-variable 'web-mode-engine-token-regexp) - (make-local-variable 'web-mode-expand-initial-pos) - (make-local-variable 'web-mode-expand-initial-scroll) - (make-local-variable 'web-mode-expand-previous-state) - (make-local-variable 'web-mode-indent-style) - (make-local-variable 'web-mode-indentless-attributes) - (make-local-variable 'web-mode-indentless-elements) - (make-local-variable 'web-mode-is-scratch) - (make-local-variable 'web-mode-skip-fontification) - (make-local-variable 'web-mode-jshint-errors) - (make-local-variable 'web-mode-last-enabled-feature) - (make-local-variable 'web-mode-markup-indent-offset) - (make-local-variable 'web-mode-minor-engine) - (make-local-variable 'web-mode-overlay-tag-end) - (make-local-variable 'web-mode-overlay-tag-start) - (make-local-variable 'web-mode-part-beg) - (make-local-variable 'web-mode-scan-beg) - (make-local-variable 'web-mode-scan-end) - (make-local-variable 'web-mode-sql-indent-offset) - (make-local-variable 'web-mode-time) - (make-local-variable 'web-mode-trace) - - (make-local-variable 'font-lock-beg) - (make-local-variable 'font-lock-end) - - (make-local-variable 'comment-end) - (make-local-variable 'comment-region-function) - (make-local-variable 'comment-start) - (make-local-variable 'fill-paragraph-function) - (make-local-variable 'font-lock-defaults) - (make-local-variable 'font-lock-extend-region-functions) - (make-local-variable 'font-lock-support-mode) - (make-local-variable 'font-lock-unfontify-region-function) - (make-local-variable 'imenu-case-fold-search) - (make-local-variable 'imenu-create-index-function) - (make-local-variable 'imenu-generic-expression) - (make-local-variable 'indent-line-function) - (make-local-variable 'parse-sexp-lookup-properties) - (make-local-variable 'uncomment-region-function) - (make-local-variable 'yank-excluded-properties) - - (setq web-mode-time (current-time)) - - (setq comment-end "-->" - comment-region-function 'web-mode-comment-or-uncomment-region - comment-start "")) - ((string= sub1 "<") - (setq closing-string ">" - delim-open "")) - ((string= sub1 "[") - (setq closing-string "]" - delim-open "\\[/?[#@]" - delim-close "/?\\]")) - (t - (setq closing-string "}" - delim-open "${" - delim-close "}")) - ) - ) ;freemarker - - ((string= web-mode-engine "velocity") - (cond - ((string= sub2 "##") - (setq closing-string "EOL")) - ((string= sub2 "#*") - (setq closing-string "*#")) - (t - (setq closing-string "EOV" - delim-open "#")) - ) - ) ;velocity - - ((string= web-mode-engine "razor") - (cond - ((string= sub2 "@@") - (forward-char 2) - (setq closing-string nil)) - ((string= sub2 "@*") - (setq closing-string "*@")) - ((string= sub1 "@") - (setq closing-string "EOR" - delim-open "@")) - ((and (string= sub1 "}") - (looking-at-p "[ ]*\n")) - ;;(setq closing-string "EOC") - (save-excursion - (let (paren-pos) - (setq paren-pos (web-mode-part-opening-paren-position (1- (point)))) - (if (and paren-pos (get-text-property paren-pos 'block-side)) - (setq closing-string "EOC") - (setq closing-string nil) - ) ;if - ) ;let - ) ;save-excursion - ;;(message "%s %S %S" sub2 (point) (get-text-property (point) 'part-side)) - ) - ((string= sub1 "}") - ;;(message "%s: %s" (point) sub1) - (save-excursion - (let (paren-pos) - (setq paren-pos (web-mode-part-opening-paren-position (1- (point)))) - (if (and paren-pos (get-text-property paren-pos 'block-side)) - (setq closing-string "EOR") - (setq closing-string nil) - ) ;if - ) ;let - ) ;save-excursion - ) ;case } - ) ;cond - ) ;razor - - ((and (string= web-mode-engine "riot") - (not (get-text-property open 'part-side))) - (setq closing-string (if (string= tagopen "{") "}" "/// end script") - delim-open "{" - delim-close "}") - ) ;riot - - ((string= web-mode-engine "spip") - (cond - ((and (string= sub1 "#") - (looking-at "[A-Z0-9_]+")) - (setq closing-string (match-string-no-properties 0))) - ((string= sub1 "(") - (setq closing-string '("(" . ")"))) - ((string= sub1 "{") - (setq closing-string '("{" . "}"))) - ((string= sub2 "<:") - (setq closing-string ":>")) - (t - (setq closing-string "]")) - )) - - ((string= web-mode-engine "marko") - (setq closing-string "}" - delim-open "${" - delim-close "}") - ) ;marko - - ) ;cond - - (when closing-string - (cond - - ((listp closing-string) - (cond - ((web-mode-rsf-balanced (car closing-string) (cdr closing-string) reg-end t) - (setq close (match-end 0) - pos (point)) - ) - ((and (string= web-mode-engine "php") - (string= " (point) reg-end) reg-end (point)) - pos (if (> (point) reg-end) reg-end (point))) - (goto-char pos)) - - ((string= closing-string "EOV") - (web-mode-velocity-skip open) - (setq close (point) - pos (point))) - - ((and (member web-mode-engine '("ctemplate")) - (re-search-forward closing-string reg-end t)) - (setq close (match-end 0) - pos (point))) - - ((and (member web-mode-engine '("antlers")) - (re-search-forward closing-string reg-end t)) - (setq close (match-end 0) - pos (point))) - - ((and (member web-mode-engine '("astro")) - (re-search-forward closing-string reg-end t)) - (setq close (match-end 0) - pos (point))) - - ((search-forward closing-string reg-end t) - (setq close (match-end 0) - pos (point))) - ) ;cond - - (when (and close (>= reg-end pos)) - ;;(message "pos(%S) : open(%S) close(%S)" pos open close) - (put-text-property open (1+ open) 'block-beg 0) - (put-text-property open (1+ open) 'block-controls 0) - (put-text-property open close 'block-side t) - (put-text-property (1- close) close 'block-end t) - (when delim-open - (web-mode-block-delimiters-set open close delim-open delim-close)) - (web-mode-block-scan open close) - (cond - ((and (string= web-mode-engine "erb") - (looking-at-p "<%= javascript_tag do %>")) - (setq tagopen "<%= javascript_tag do %>")) - ((and (string= web-mode-engine "mojolicious") - (looking-at-p "%= javascript begin")) - (setq tagopen "%= javascript begin")) - ((and (string= web-mode-engine "mako") - (looking-at-p "<%block filter=\"collect_js\">")) - (setq tagopen "<%block filter=\"collect_js\">")) - ((and (string= web-mode-engine "mako") - (looking-at-p "<%block filter=\"collect_css\">")) - (setq tagopen "<%block filter=\"collect_css\">")) - ((and (string= web-mode-engine "django") - (looking-at-p "{% javascript %}")) - (setq tagopen "{% javascript %}")) - ((and (string= web-mode-engine "django") - (looking-at-p "{% schema %}")) - (setq tagopen "{% schema %}")) - ((and (string= web-mode-engine "django") - (looking-at-p "{% stylesheet %}")) - (setq tagopen "{% stylesheet %}")) - ) - ;;(message "%S %s" (point) tagopen) - (when (and (member tagopen '("" - "<%block filter=\"collect_js\">" - "<%block filter=\"collect_css\">" - "{% javascript %}" - "{% schema %}" - "{% stylesheet %}" - "%= javascript begin" - "---")) - (setq part-beg close) - (setq tagclose - (cond - ((string= tagopen "") "<% end %>") - ((member tagopen '("<%block filter=\"collect_js\">" - "<%block filter=\"collect_css\">")) " part-end part-beg)) - ;;(message "tagopen=%S tagclose=%S end=%S" tagopen tagclose (point)) - (put-text-property part-beg part-end - 'part-side - (cond - ((member tagopen '("" "{% stylesheet %}")) 'css) - (t 'javascript))) - (setq pos part-beg - part-beg nil - part-end nil) - ) ;when - ) ;when close - - (if pos (goto-char pos)) - - ) ;when closing-string - - ) ;while - - (cond - ((>= i 2000) - (message "scan-blocks ** warning (%S) **" i)) - ((string= web-mode-engine "razor") - (web-mode-block-foreach reg-beg reg-end 'web-mode-block-scan)) - ((string= web-mode-engine "django") - (web-mode-scan-engine-comments reg-beg reg-end - "{% comment %}" "{% endcomment %}")) - ((string= web-mode-engine "mako") - (web-mode-scan-engine-comments reg-beg reg-end - "<%doc>" "")) - ((string= web-mode-engine "mason") - (web-mode-scan-engine-comments reg-beg reg-end - "<%doc>" "")) - ) ;cond - - ))) - -(defun web-mode-scan-engine-comments (reg-beg reg-end tag-start tag-end) - "Scan engine comments (mako, django)." - (save-excursion - (let (beg end (continue t)) - (goto-char reg-beg) - (while (and continue - (< (point) reg-end) - (re-search-forward tag-start reg-end t)) - (goto-char (match-beginning 0)) - (setq beg (point)) - (if (not (re-search-forward tag-end reg-end t)) - (setq continue nil) - (setq end (point)) - (remove-list-of-text-properties beg end web-mode-scan-properties) - (add-text-properties beg end '(block-side t block-token comment)) - (put-text-property beg (1+ beg) 'block-beg 0) - (put-text-property (1- end) end 'block-end t) - ) ;if - ) ;while - ))) - -(defun web-mode-closure-skip (reg-beg reg-end) - (let (regexp char pos inc continue found) - (setq regexp "[\"'{}]" - inc 0) - (while (and (not found) (re-search-forward regexp reg-end t)) - (setq char (char-before)) - (cond - ((get-text-property (point) 'block-side) - (setq found t)) - ((eq char ?\{) - (setq inc (1+ inc))) - ((eq char ?\}) - (cond - ((and (not (eobp)) - (< inc 1)) - (setq found t - pos (point))) - ((> inc 0) - (setq inc (1- inc))) - ) - ) - ((eq char ?\') - (setq continue t) - (while (and continue (search-forward "'" reg-end t)) - (setq continue (web-mode-string-continue-p reg-beg)) - ) - ) - ((eq char ?\") - (setq continue t) - (while (and continue (search-forward "\"" reg-end t)) - (setq continue (web-mode-string-continue-p reg-beg)) - ) - ) - ) ;cond - ) ;while - pos)) - -(defun web-mode-django-skip (reg-beg reg-end) - (let (regexp char pos inc continue found) - (setq regexp "[\"'{}]" - inc 0) - (while (and (not found) (re-search-forward regexp reg-end t)) - (setq char (char-before)) - (cond - ((get-text-property (point) 'block-side) - (setq found t)) - ((eq char ?\{) - (setq inc (1+ inc))) - ((eq char ?\}) - (cond - ((and (not (eobp)) - (eq (char-after) ?\}) - (< inc 2)) - (forward-char) - (setq found t - pos (1+ (point)))) - ((> inc 0) - (setq inc (1- inc))) - ) - ) - ((eq char ?\') - (setq continue t) - (while (and continue (search-forward "'" reg-end t)) - (setq continue (web-mode-string-continue-p reg-beg)) - ) - ) - ((eq char ?\") - (setq continue t) - (while (and continue (search-forward "\"" reg-end t)) - (setq continue (web-mode-string-continue-p reg-beg)) - ) - ) - ) ;cond - ) ;while - pos)) - -(defun web-mode-blade-skip (pos) - (let (regexp char inc continue found (reg-beg pos) (reg-end (point-max))) - ;;(message "pos=%S" pos) - (goto-char pos) - (forward-char) - (skip-chars-forward "a-zA-Z0-9_-") - (skip-chars-forward " ") - (when (eq (char-after) ?\() - (setq regexp "[\"'()]" - inc 0) - (while (and (not found) (re-search-forward regexp reg-end t)) - (setq char (char-before)) - ;;(message "point=%S char=%c inc=%S" (point) char inc) - (cond - ((eq char ?\() - (setq inc (1+ inc))) - ((eq char ?\)) - (cond - ((and (not (eobp)) - (< inc 2)) - (forward-char) - (setq inc (1- inc)) - (setq found t) - ) - ((> inc 0) - (setq inc (1- inc))) - ) - ) - ((eq char ?\') - (setq continue t) - (while (and continue (search-forward "'" reg-end t)) - (setq continue (web-mode-string-continue-p reg-beg)) - ) - ) - ((eq char ?\") - (setq continue t) - (while (and continue (search-forward "\"" reg-end t)) - (setq continue (web-mode-string-continue-p reg-beg)) - ) - ) - ) ;cond - ;;(message "inc=%S found=%S" inc found) - ) ;while - ) ; when - ;;(message "point=%S inc=%S" (point) inc) - (when found (backward-char)) - )) - -(defun web-mode-velocity-skip (pos) - (goto-char pos) - (let ((continue t) (i 0)) - (when (eq ?\# (char-after)) - (forward-char)) - (when (member (char-after) '(?\$ ?\@)) - (forward-char)) - (when (member (char-after) '(?\!)) - (forward-char)) - (cond - ((member (char-after) '(?\{)) - (search-forward "}" nil t)) - ((looking-at-p "def \\|define ") - (search-forward ")" (line-end-position) t)) - (t - (setq continue t) - (while continue - (skip-chars-forward "a-zA-Z0-9_-") - (when (> (setq i (1+ i)) 500) - (message "velocity-skip ** warning (%S) **" pos) - (setq continue nil)) - (when (member (char-after) '(?\()) - (search-forward ")" nil t)) - (if (member (char-after) '(?\.)) - (forward-char) - (setq continue nil)) - ) ;while - ) ;t - ) ;cond - )) - -(defun web-mode-razor-skip (pos) - (goto-char pos) - (let ((continue t) (i 0)) - (while continue - (skip-chars-forward " =@a-zA-Z0-9_-") - (cond - ((> (setq i (1+ i)) 500) - (message "razor-skip ** warning **") - (setq continue nil)) - ((and (eq (char-after) ?\*) - (eq (char-before) ?@)) - (when (not (search-forward "*@" nil t)) - (setq continue nil)) - ) - ((looking-at-p "@[({]") - (forward-char) - (when (setq pos (web-mode-closing-paren-position (point))) - (goto-char pos)) - (forward-char) - ) - ((and (not (eobp)) (eq ?\( (char-after))) - (cond - ((looking-at-p "[ \n]*[<@]") - (setq continue nil)) - ((setq pos (web-mode-closing-paren-position)) - (goto-char pos) - (forward-char)) - (t - (forward-char)) - ) ;cond - ) - ((and (not (eobp)) (eq ?\< (char-after)) (looking-back "[a-z]" (point-min))) - (setq pos (point)) - (cond - ;; #988 - ((search-forward ">" (line-end-position) t) - (goto-char pos) - (setq continue nil) - ) - (t - (setq continue nil)) - ) ;cond - ) - ((and (not (eobp)) (eq ?\. (char-after))) - (forward-char)) - ((and (not (eobp)) (looking-at-p "[ \n]*else")) - (re-search-forward "[ \t]*else") - ) - ((looking-at-p "[ \n]*{") - (search-forward "{") - (search-forward "=>" (line-end-position) 't) - (if (looking-at-p "[ \n]*[<@]") - (setq continue nil) - (backward-char) - (when (setq pos (web-mode-closing-paren-position)) - (goto-char pos)) - (forward-char) - ) ;if - ) - ((looking-at-p "}") - (forward-char)) - (t - (setq continue nil)) - ) ;cond - ) ;while - )) - -(defun web-mode-block-delimiters-set (reg-beg reg-end delim-open delim-close) - "Set text-property `block-token' to `delimiter-(beg|end)' on block delimiters -(e.g. )" - ;;(message "reg-beg(%S) reg-end(%S) delim-open(%S) delim-close(%S)" reg-beg reg-end delim-open delim-close) - (when (member web-mode-engine - '("artanis" "anki" "antlers" "asp" "aspx" - "cl-emb" "clip" "closure" "ctemplate" "django" "dust" - "elixir" "ejs" "erb" "expressionengine" "freemarker" "go" "hero" "jsp" "lsp" - "mako" "mason" "mojolicious" - "perl" - "smarty" "template-toolkit" "web2py" "xoops" "svelte")) - (save-excursion - (when delim-open - (goto-char reg-beg) - (looking-at delim-open) - (setq delim-open (match-string-no-properties 0))) - (when delim-close - (goto-char reg-end) - (looking-back delim-close reg-beg t) - (setq delim-close (match-string-no-properties 0))) - )) - (when delim-open - (put-text-property reg-beg (+ reg-beg (length delim-open)) - 'block-token 'delimiter-beg)) - (when delim-close - (put-text-property (- reg-end (length delim-close)) reg-end - 'block-token 'delimiter-end)) - ) - -(defun web-mode-block-foreach (reg-beg reg-end func) - (let ((i 0) (continue t) (block-beg reg-beg) (block-end nil)) - (while continue - (setq block-end nil) - (unless (get-text-property block-beg 'block-beg) - (setq block-beg (web-mode-block-next-position block-beg))) - (when (and block-beg (< block-beg reg-end)) - (setq block-end (web-mode-block-end-position block-beg))) - (cond - ((> (setq i (1+ i)) 2000) - (message "process-blocks ** warning (%S) **" (point)) - (setq continue nil)) - ((or (null block-end) (> block-end reg-end)) - (setq continue nil)) - (t - (setq block-end (1+ block-end)) - (funcall func block-beg block-end) - (setq block-beg block-end) - ) ;t - ) ;cond - ) ;while - )) - -(defun web-mode-block-scan (block-beg block-end) - (let (sub1 sub2 sub3 regexp token-type) - - ;;(message "block-beg=%S block-end=%S" block-beg block-end) - ;;(remove-text-properties block-beg block-end web-mode-scan-properties) - - (goto-char block-beg) - - (cond - ((>= (point-max) (+ block-beg 3)) - (setq sub3 (buffer-substring-no-properties block-beg (+ block-beg 3)) - sub2 (buffer-substring-no-properties block-beg (+ block-beg 2)) - sub1 (buffer-substring-no-properties block-beg (+ block-beg 1))) - ) - ((>= (point-max) (+ block-beg 2)) - (setq sub3 (buffer-substring-no-properties block-beg (+ block-beg 2)) - sub2 (buffer-substring-no-properties block-beg (+ block-beg 2)) - sub1 (buffer-substring-no-properties block-beg (+ block-beg 1))) - ) - (t - (setq sub1 (buffer-substring-no-properties block-beg (+ block-beg 1))) - (setq sub2 sub1 - sub3 sub1) - ) - ) - - (cond - - ((member web-mode-engine '("php" "lsp" "python" "web2py" "mason")) - (setq regexp web-mode-engine-token-regexp)) - - ((string= web-mode-engine "mako") - (cond - ((string= sub2 "##") - (setq token-type 'comment) - ) - (t - (setq regexp web-mode-engine-token-regexp)) - ) - ) ;mako - - ((string= web-mode-engine "django") - (cond - ((member sub2 '("{{" "{%")) - (setq regexp "\"\\|'")) - ((string= sub2 "{#") - (setq token-type 'comment)) - ) - ) ;django - - ((string= web-mode-engine "ctemplate") - (cond - ((string= sub3 "{{!") - (setq token-type 'comment)) - ((member sub2 '("{{")) - ) - ) - ) ;ctemplate - - ((string= web-mode-engine "antlers") - (cond - ((string= sub3 "{{#") - (setq token-type 'comment)) - ((member sub2 '("{{")) - ) - ) - ) ;antlers - - ((string= web-mode-engine "astro") - (setq regexp "\"\\|'") - ) ;astro - - ((string= web-mode-engine "go") - (cond - ((string= sub3 "{{/") - (setq token-type 'comment)) - ((string= sub2 "{{") - (setq regexp "\"\\|'")) - ) - ) ;go - - ((string= web-mode-engine "hero") - (cond - ((string= sub3 "<%#") - (setq token-type 'comment)) - (t - (setq regexp "\"\\|'")) - ) - ) ;hero - - ((string= web-mode-engine "razor") - (cond - ((string= sub2 "@*") - (setq token-type 'comment)) - (t - (setq regexp "//\\|@\\*\\|\"\\|'")) - ) - ) ;razor - - ((string= web-mode-engine "blade") - (cond - ((string= sub3 "{{-") - (setq token-type 'comment)) - (t - (setq regexp "\"\\|'")) - ) - ) ;blade - - ((string= web-mode-engine "cl-emb") - (cond - ((string= sub3 "<%#") - (setq token-type 'comment)) - (t - (setq regexp "\"\\|'")) - ) - ) ;cl-emb - - ((string= web-mode-engine "artanis") - (cond - ((string= sub3 "<%;") - (setq token-type 'comment)) - ((string= sub3 "<%#|") - (setq token-type 'comment)) - (t - (setq regexp "\"")) - ) - ) ;artanis - - ((string= web-mode-engine "elixir") - (cond - ((string= sub3 "<%#") - (setq token-type 'comment)) - (t - (setq regexp "\"\\|'")) - ) - ) ;elixir - - ((string= web-mode-engine "mojolicious") - (cond - ((or (string= sub2 "%#") (string= sub3 "<%#")) - (setq token-type 'comment)) - (t - (setq regexp "\"\\|'")) - ) - ) ;mojolicious - - ((string= web-mode-engine "velocity") - (cond - ((member sub2 '("##" "#*")) - (setq token-type 'comment)) - ((member sub1 '("$" "#")) - (setq regexp "\"\\|'")) - ) - ) ;velocity - - ((string= web-mode-engine "jsp") - (cond - ((string= sub3 "<%-") - (setq token-type 'comment)) - ((string= sub3 "<%@") - (setq regexp "/\\*")) - ((member sub2 '("${" "#{")) - (setq regexp "\"\\|'")) - ((string= sub2 "<%") - (setq regexp "//\\|/\\*\\|\"\\|'")) - ) - ) ;jsp - - ((string= web-mode-engine "clip") - (setq regexp nil) - ) ;clip - - ((string= web-mode-engine "perl") - (setq regexp nil) - ) ;perl - - ((and (string= web-mode-engine "asp") - (string= sub2 "<%")) - (setq regexp "//\\|/\\*\\|\"\\|'") - ) ;asp - - ((string= web-mode-engine "aspx") - (cond - ((string= sub3 "<%-") - (setq token-type 'comment)) - ((string= sub3 "<%@") - (setq regexp "/\\*")) - ((string= sub3 "<%$") - (setq regexp "\"\\|'")) - (t - (setq regexp "//\\|/\\*\\|\"\\|'")) - ) - ) ;aspx - - ((string= web-mode-engine "freemarker") - (cond - ((member sub3 '("<#-" "[#-")) - (setq token-type 'comment)) - ((member sub2 '("${" "#{")) - (setq regexp "\"\\|'")) - ((or (member sub2 '("<@" "[@" "<#" "[#")) - (member sub3 '(" (- block-end block-beg) 6)) - (web-mode-block-tokenize - (web-mode-block-code-beginning-position block-beg) - (web-mode-block-code-end-position block-beg) - regexp) - ) - ) ;cond - - )) - -(defun web-mode-block-tokenize (reg-beg reg-end &optional regexp) - (unless regexp (setq regexp web-mode-engine-token-regexp)) - ;;(message "tokenize: reg-beg(%S) reg-end(%S) regexp(%S)" reg-beg reg-end regexp) - ;;(message "tokenize: reg-beg(%S) reg-end(%S) command(%S)" reg-beg reg-end this-command) - ;;(message "%S>%S : %S" reg-beg reg-end (buffer-substring-no-properties reg-beg reg-end)) - (save-excursion - (let ((pos reg-beg) beg char match continue token-type token-end) - - (remove-list-of-text-properties reg-beg reg-end '(block-token)) - - ;; TODO : vérifier la cohérence - (put-text-property reg-beg reg-end 'block-side t) - - (goto-char reg-beg) - - (when (> (point) reg-end) - (message "block-tokenize ** reg-beg(%S) > reg-end(%S) **" reg-beg reg-end)) - - (while (and (< (point) reg-end) (re-search-forward regexp reg-end t)) - (setq beg (match-beginning 0) - match (match-string 0) - continue t - token-type 'comment - token-end (if (< reg-end (line-end-position)) reg-end (line-end-position)) - char (aref match 0)) - (cond - - ((and (string= web-mode-engine "asp") (string= match "'")) - (goto-char token-end)) - - ((and (string= web-mode-engine "razor") (eq char ?\')) - (cond - ((looking-at-p "\\(.\\|[\\][bfntr]\\|[\\]u....\\)'") - (search-forward "'" reg-end t) - (setq token-type 'string) - ) - (t - (re-search-forward "[[:alnum:]_-]+") - (setq token-type 'symbol) - ))) - - ((eq char ?\') - (setq token-type 'string) - (while (and continue (search-forward "'" reg-end t)) - (setq continue (web-mode-string-continue-p reg-beg)) - )) - - ((eq char ?\") - (setq token-type 'string) - (while (and continue (search-forward "\"" reg-end t)) - (setq continue (web-mode-string-continue-p reg-beg)) - )) - - ((string= match "//") - (goto-char token-end)) - - ((eq char ?\;) - (goto-char token-end)) - - ((string= match "#|") - (unless (search-forward "|#" reg-end t) - (goto-char token-end))) - - ((eq char ?\#) - (goto-char token-end)) - - ((string= match "/*") - (unless (search-forward "*/" reg-end t) - (goto-char token-end)) - ) - - ((string= match "@*") - (unless (search-forward "*@" reg-end t) - (goto-char token-end))) - - ((eq char ?\<) - (setq token-type 'string) - (re-search-forward (concat "^[ ]*" (match-string 1)) reg-end t)) - - (t - (message "block-tokenize ** token end (%S) **" beg) - (setq token-type nil)) - - ) ;cond - - (put-text-property beg (point) 'block-token token-type) - - (when (eq token-type 'comment) - (put-text-property beg (1+ beg) 'syntax-table (string-to-syntax "<")) - (if (or (< (point) (line-end-position)) (= (point) (point-max))) - (put-text-property (1- (point)) (point) 'syntax-table (string-to-syntax ">")) ;#445 #480 - (put-text-property (point) (1+ (point)) 'syntax-table (string-to-syntax ">")) ;#377 - ) - ) - - ) ;while - - (web-mode-block-controls-unset pos) - - ))) - -(defun web-mode-set-php-controls (reg-beg reg-end) - (goto-char reg-beg) - (let (match controls - (continue t) - (regexp "endif\\|endforeach\\|endfor\\|endwhile\\|elseif\\|else\\|if\\|foreach\\|for\\|while")) - (while continue - (if (not (web-mode-block-rsf regexp reg-end)) - (setq continue nil) - (setq match (match-string-no-properties 0)) - ;; (message "%S %S" match (point)) - (cond - ((and (member match '("else" "elseif")) - (looking-at-p "[ ]*[:(]")) - (setq controls (append controls (list (cons 'inside "if")))) - ) - ((and (>= (length match) 3) - (string= (substring match 0 3) "end")) - (setq controls (append controls (list (cons 'close (substring match 3))))) - ) - ((and (progn (skip-chars-forward "[ ]") t) - (eq (char-after) ?\() - (web-mode-closing-paren reg-end) - ;;(progn (message "ixi%S" (point))) - (looking-at-p ")[ ]*:")) - (setq controls (append controls (list (cons 'open match)))) - ) - ) ;cond - ) ;if - ) ;while - ;;(message "%S-%S %S" reg-beg reg-end controls) - (when (and controls (> (length controls) 1)) - (setq controls (web-mode-block-controls-reduce controls))) - controls)) - -(defun web-mode-block-controls-reduce (controls) - (when (and (eq (car (car controls)) 'open) - (member (cons 'close (cdr (car controls))) controls)) - (setq controls nil)) - controls) - -(defun web-mode-block-controls-unset (pos) - (cond - ((null (get-text-property pos 'block-side)) - (message "block-controls-unset ** invalid value (%S) **" pos)) - ((or (get-text-property pos 'block-beg) - (setq pos (web-mode-block-beginning-position pos))) - (put-text-property pos (1+ pos) 'block-controls 0)) - (t - (message "block-controls-unset ** failure (%S) **" (point))) - )) - -(defun web-mode-block-controls-get (pos) - (web-mode-with-silent-modifications - (let ((controls nil)) - (cond - ((null (get-text-property pos 'block-side)) - (message "block-controls-get ** invalid value (%S) **" pos)) - ((or (get-text-property pos 'block-beg) - (setq pos (web-mode-block-beginning-position pos))) - (setq controls (get-text-property pos 'block-controls)) - (when (integerp controls) - (web-mode-block-controls-set pos (web-mode-block-end-position pos)) - (setq controls (get-text-property pos 'block-controls)) - ) - ) - (t - (message "block-controls-get ** failure (%S) **" (point))) - ) ;cond - controls))) - -(defun web-mode-block-controls-set (reg-beg reg-end) - (save-excursion - (goto-char reg-beg) - (let (controls pos type control) - - (cond - - ((null web-mode-engine) - (message "block-controls-set ** unknown engine (%S) **" web-mode-engine) - ) - - ((string= web-mode-engine "php") - (setq controls (web-mode-set-php-controls reg-beg reg-end)) - (when (web-mode-block-starts-with "}" reg-beg) - (setq controls (append controls (list (cons 'close "{"))))) - (when (web-mode-block-ends-with (cons "{" "}") reg-beg) - (setq controls (append controls (list (cons 'open "{"))))) - ) ;php - - ((string= web-mode-engine "ejs") - (cond - ((web-mode-block-ends-with "}[ ]*else[ ]*{" reg-beg) - (setq controls (append controls (list (cons 'inside "{"))))) - ((web-mode-block-starts-with "}" reg-beg) - (setq controls (append controls (list (cons 'close "{"))))) - ((web-mode-block-ends-with "{" reg-beg) - (setq controls (append controls (list (cons 'open "{"))))) - ) - ) ;ejs - - ((string= web-mode-engine "erb") - (cond - ((web-mode-block-starts-with "else\\|elsif\\|when" reg-beg) - (setq controls (append controls (list (cons 'inside "ctrl"))))) - ((web-mode-block-starts-with "end" reg-beg) - (setq controls (append controls (list (cons 'close "ctrl"))))) - ((web-mode-block-ends-with " do\\( |.*|\\)?" reg-beg) - (setq controls (append controls (list (cons 'open "ctrl"))))) - ((and (web-mode-block-starts-with "\\(for\\|if\\|unless\\|case\\)\\_>" reg-beg) - (not (web-mode-block-ends-with "end" reg-end))) - (setq controls (append controls (list (cons 'open "ctrl"))))) - ) - ) ;erb - - ((string= web-mode-engine "django") - (cond - ((and (string= web-mode-minor-engine "jinja") ;#504 - (web-mode-block-starts-with "else\\_>" reg-beg)) - (let ((continue t) - (pos reg-beg) - (ctrl nil)) - (while continue - (cond - ((null (setq pos (web-mode-block-control-previous-position 'open pos))) - (setq continue nil)) - ((member (setq ctrl (cdr (car (get-text-property pos 'block-controls)))) '("if" "ifequal" "ifnotequal" "for")) - (setq continue nil) - ) - ) ;cond - ) - (setq controls (append controls (list (cons 'inside (or ctrl "if"))))) - ) - ) - ((web-mode-block-starts-with "form_start[ ]*(" reg-beg) - (setq controls (append controls (list (cons 'open "form_start"))))) - ((web-mode-block-starts-with "form_end[ ]*(" reg-beg) - (setq controls (append controls (list (cons 'close "form_start"))))) - ((not (eq (char-after (1+ reg-beg)) ?\%)) - ) - ((web-mode-block-starts-with "\\(else\\|els?if\\)" reg-beg) - (let ((continue t) - (pos reg-beg) - (ctrl nil)) - (while continue - (cond - ((null (setq pos (web-mode-block-control-previous-position 'open pos))) - (setq continue nil)) - ((member (setq ctrl (cdr (car (get-text-property pos 'block-controls)))) '("if" "ifequal" "ifnotequal")) - (setq continue nil) - ) - ) ;cond - ) ;while - (setq controls (append controls (list (cons 'inside (or ctrl "if"))))) - ) ;let - ) ;case else - ((web-mode-block-starts-with "\\(empty\\)" reg-beg) - (setq controls (append controls (list (cons 'inside "for"))))) - ((web-mode-block-starts-with "end\\([[:alpha:]]+\\)" reg-beg) - (setq controls (append controls (list (cons 'close (match-string-no-properties 1)))))) - ((web-mode-block-starts-with "set [[:alpha:]]+[ ]*%}" reg-beg) - (setq controls (append controls (list (cons 'open "set"))))) - ((web-mode-block-starts-with (concat web-mode-django-control-blocks-regexp "[ %]") reg-beg) - (let (control) - (setq control (match-string-no-properties 1)) - ;;(message "%S %S %S" control (concat "end" control) web-mode-django-control-blocks) - (when (member (concat "end" control) web-mode-django-control-blocks) - (setq controls (append controls (list (cons 'open control)))) - ) ;when - ) ;let - ) ;case - ) ;cond - ) ;django - - ((string= web-mode-engine "smarty") - (cond - ((and (eq (char-after (1+ reg-beg)) ?\/) - (web-mode-block-starts-with "\\([[:alpha:]]+\\)" reg-beg)) - (setq controls (append controls (list (cons 'close (match-string-no-properties 1)))))) - ((web-mode-block-starts-with "\\(else\\|elseif\\)" reg-beg) - (setq controls (append controls (list (cons 'inside "if"))))) - ((web-mode-block-starts-with "\\(block\\|foreach\\|for\\|if\\|section\\|while\\)") - (setq controls (append controls (list (cons 'open (match-string-no-properties 1)))))) - ) - ) ;smarty - - ((string= web-mode-engine "expressionengine") - (cond - ((and (eq (char-after (1+ reg-beg)) ?\/) - (web-mode-block-starts-with "\\(if\\)" reg-beg)) - (setq controls (append controls (list (cons 'close (match-string-no-properties 1)))))) - ((web-mode-block-starts-with "\\(if:else\\|if:ifelse\\)" reg-beg) - (setq controls (append controls (list (cons 'inside "if"))))) - ((web-mode-block-starts-with "\\(if\\)") - (setq controls (append controls (list (cons 'open (match-string-no-properties 1)))))) - ) - ) ;expressionengine - - ((string= web-mode-engine "xoops") - (cond - ((and (eq (char-after (+ reg-beg 2)) ?\/) - (web-mode-block-starts-with "\\([[:alpha:]]+\\)" reg-beg)) - (setq controls (append controls (list (cons 'close (match-string-no-properties 1)))))) - ((web-mode-block-starts-with "\\(else\\|elseif\\)" reg-beg) - (setq controls (append controls (list (cons 'inside "if"))))) - ((web-mode-block-starts-with "\\(block\\|foreach\\|for\\|if\\|section\\|while\\)") - (setq controls (append controls (list (cons 'open (match-string-no-properties 1)))))) - ) - ) ;xoops - - ((string= web-mode-engine "web2py") - (cond - ((web-mode-block-starts-with "def" reg-beg) - (setq controls (append controls (list (cons 'open "def"))))) - ((web-mode-block-starts-with "return" reg-beg) - (setq controls (append controls (list (cons 'close "def"))))) - ((web-mode-block-starts-with "block" reg-beg) - (setq controls (append controls (list (cons 'open "block"))))) - ((web-mode-block-starts-with "end" reg-beg) - (setq controls (append controls (list (cons 'close "block"))))) - ((web-mode-block-starts-with "pass" reg-beg) - (setq controls (append controls (list (cons 'close "ctrl"))))) - ((web-mode-block-starts-with "\\(except\\|finally\\|els\\)" reg-beg) - (setq controls (append controls (list (cons 'inside "ctrl"))))) - ((web-mode-block-starts-with "\\(if\\|for\\|try\\|while\\)") - (setq controls (append controls (list (cons 'open "ctrl"))))) - ) - ) ;web2py - - ((string= web-mode-engine "dust") - (cond - ((eq (char-after (1- reg-end)) ?\/) - ) - ((eq (char-after (1+ reg-beg)) ?\:) - (setq pos (web-mode-block-control-previous-position 'open reg-beg)) - (when pos - (setq controls (append controls - (list - (cons 'inside - (cdr (car (web-mode-block-controls-get pos)))))))) - ) - ((looking-at "{/\\([[:alpha:].]+\\)") - (setq controls (append controls (list (cons 'close (match-string-no-properties 1)))))) - ((looking-at "{[#?@><+^]\\([[:alpha:].]+\\)") - (setq controls (append controls (list (cons 'open (match-string-no-properties 1)))))) - ) - ) ;dust - - ((string= web-mode-engine "anki") - (cond - ((looking-at "{{[#^]\\([[:alpha:].]+\\)") - (setq controls (append controls (list (cons 'open (match-string-no-properties 1)))))) - ((looking-at "{{/\\([[:alpha:].]+\\)") - (setq controls (append controls (list (cons 'close (match-string-no-properties 1)))))) - ) - ) ;anki - - ((member web-mode-engine '("mojolicious")) - (cond - ((web-mode-block-ends-with "begin" reg-beg) - (setq controls (append controls (list (cons 'open "begin"))))) - ((web-mode-block-starts-with "end" reg-beg) - (setq controls (append controls (list (cons 'close "begin"))))) - ((web-mode-block-starts-with "}[ ]*else[ ]*{" reg-beg) - (setq controls (append controls (list (cons 'inside "{"))))) - ((web-mode-block-starts-with "}" reg-beg) - (setq controls (append controls (list (cons 'close "{"))))) - ((web-mode-block-ends-with "{" reg-beg) - (setq controls (append controls (list (cons 'open "{"))))) - ) - ) ;mojolicious - - ((member web-mode-engine '("aspx" "underscore")) - (cond - ((and (web-mode-block-starts-with "}" reg-beg) - (web-mode-block-ends-with "{" reg-beg)) - (setq controls (append controls (list (cons 'inside "{"))))) - ((web-mode-block-starts-with "}" reg-beg) - (setq controls (append controls (list (cons 'close "{"))))) - ((web-mode-block-ends-with "{" reg-beg) - (setq controls (append controls (list (cons 'open "{"))))) - ) - ) ;aspx underscore - - ((member web-mode-engine '("jsp" "asp" "clip" "perl")) - (cond - ((eq (char-after (1- reg-end)) ?\/) - ) - ((looking-at "" reg-beg) - (setq controls (append controls (list (cons 'close "ctrl"))))) - ((web-mode-block-starts-with "else\\_>" reg-beg) - (setq controls (append controls (list (cons 'inside "ctrl"))))) - ((web-mode-block-starts-with "\\(range\\|with\\|if\\|define\\|block\\)\\_>" reg-beg) - (setq controls (append controls (list (cons 'open "ctrl"))))) - ) - ) ;go - - ((string= web-mode-engine "template-toolkit") - (cond - ((web-mode-block-starts-with "end" reg-beg) - (setq controls (append controls (list (cons 'close "ctrl"))))) - ((web-mode-block-starts-with "els\\|catch\\|final" reg-beg) - (setq controls (append controls (list (cons 'inside "ctrl"))))) - ((web-mode-block-starts-with "filter\\|foreach\\|if\\|last\\|next\\|perl\\|rawperl\\|try\\|unless\\|while" reg-beg) - (setq controls (append controls (list (cons 'open "ctrl"))))) - ) - ) ;template-toolkit - - ((string= web-mode-engine "cl-emb") - (cond - ((web-mode-block-starts-with "@else" reg-beg) - (setq controls (append controls (list (cons 'inside "if"))))) - ((web-mode-block-starts-with "@\\(?:end\\)?\\(if\\|unless\\|repeat\\|loop\\|with\\|genloop\\)" reg-beg) - (setq control (match-string-no-properties 1) - type (if (eq (aref (match-string-no-properties 0) 1) ?e) 'close 'open)) - (setq controls (append controls (list (cons type control))))) - ) - ) ;cl-emb - - ((string= web-mode-engine "elixir") - (cond - ((web-mode-block-starts-with "end" reg-beg) - (setq controls (append controls (list (cons 'close "ctrl"))))) - ((web-mode-block-starts-with "else" reg-beg) - (setq controls (append controls (list (cons 'inside "ctrl"))))) - ((web-mode-block-ends-with " do" reg-beg) - (setq controls (append controls (list (cons 'open "ctrl"))))) - ((web-mode-block-ends-with " ->" reg-beg) - (setq controls (append controls (list (cons 'open "ctrl"))))) - ) - ) ;elixir - - ((string= web-mode-engine "velocity") - (cond - ((web-mode-block-starts-with "{?end" reg-beg) - (setq controls (append controls (list (cons 'close "ctrl"))))) - ((web-mode-block-starts-with "{?els" reg-beg) - (setq controls (append controls (list (cons 'inside "ctrl"))))) - ((web-mode-block-starts-with "{?\\(def\\|if\\|for\\|foreach\\|macro\\)" reg-beg) - ;;((web-mode-block-starts-with "{?\\(define\\|\\|if\\|for\\|foreach\\|macro\\)" reg-beg) - (setq controls (append controls (list (cons 'open "ctrl"))))) - ) - ) ;velocity - - ((string= web-mode-engine "freemarker") - (cond - ((looking-at "[<[]#\\(import\\|include\\|assign\\|return\\|local\\)") - ) - ((eq (char-after (1- reg-end)) ?\/) - ) - ((looking-at "[<[]#\\(break\\|case\\|default\\)") - (setq controls (append controls (list (cons 'inside "switch")))) - ) - ((looking-at "[<[]#els") - (setq controls (append controls (list (cons 'inside "if")))) - ) - ((looking-at "<+^]\\([[:alpha:].]+\\)") - (setq controls (append controls (list (cons 'open (match-string-no-properties 1)))))) - ) - ) ;svelte - - ) ;cond engine - - (put-text-property reg-beg (1+ reg-beg) 'block-controls controls) - ;;(message "(%S) controls=%S" reg-beg controls) - - ))) - -(defun web-mode-block-is-opened-sexp (reg-beg reg-end) - (let ((n 0)) - (save-excursion - (goto-char reg-beg) - (while (web-mode-block-rsf "[()]" reg-end) - (if (eq (char-before) ?\() (setq n (1+ n)) (setq n (1- n))))) - (> n 0))) - -;;---- LEXER PARTS ------------------------------------------------------------- - -(defun web-mode-scan-elements (reg-beg reg-end) - (save-excursion - (let (part-beg part-end flags limit close-expr props tname tbeg tend element-content-type (regexp web-mode-dom-regexp) part-close-tag char) - ;;(message "scan-elements: reg-beg(%S) reg-end(%S)" reg-beg reg-end) - (goto-char reg-beg) - - (while (web-mode-dom-rsf regexp reg-end) - - ;;(message "%S: %S (%S %S)" (point) (match-string-no-properties 0) reg-beg reg-end) - - (setq flags 0 - tnameraw (match-string-no-properties 1) - tname (downcase tnameraw) - char (aref tname 0) - tbeg (match-beginning 0) - tend nil - element-content-type nil - limit reg-end - part-beg nil - part-end nil - props nil - close-expr nil - part-close-tag nil) - - ;;(message "tname[%S] tbeg(%S) point(%S)" tname tbeg (point)) - - (cond - - ((member tname '("/>" ">")) ;;jsx fragment #952 - (setq tname "_fragment_" - tend (point)) - (if (eq char ?\/) - (setq props (list 'tag-name tname 'tag-type 'end) - flags (logior flags 20)) ;; 16 + 4 - (setq props (list 'tag-name tname 'tag-type 'start) - flags (logior flags 16)) - ) ;if - ) - - ((not (member char '(?\! ?\?))) - (cond - ((or (string-match-p "-" tname) - (let ((case-fold-search nil)) - (string-match-p "^/?[[:upper:]][[:lower:]]" tnameraw))) - (setq flags (logior flags 2))) - ;;((string-match-p ":" tname) - ;; (setq flags (logior flags 32))) - ((string-match-p "[._:]" tname) - (setq flags (logior flags 32))) - ) - (cond - ((eq char ?\/) - (setq props (list 'tag-name (substring tname 1) 'tag-type 'end) - flags (logior flags 4) - limit (if (> reg-end (line-end-position)) (line-end-position) reg-end)) - ) - ((web-mode-element-is-void tname) - ;;(message "void: tag=%S" tname) - (setq props (list 'tag-name tname 'tag-type 'void))) - (t - (setq props (list 'tag-name tname 'tag-type 'start))) - ) ;cond - ) ; not " - props '(tag-type comment))) - ((string= tname "?xml") - (setq ;;regexp web-mode-tag-regexp2 - close-expr "?>" - props '(tag-type declaration))) - ((string= tname "![cdata[") - (setq close-expr "]]>" - props '(tag-type cdata))) - ((string= tname "!doctype") - (setq ;;regexp web-mode-tag-regexp2 - props '(tag-type doctype))) - ) ;cond - special tags - - (cond - - (tend - ) - - ((and (null close-expr) (eq (char-after) ?\>)) - (setq flags (logior flags 16) - tend (1+ (point))) - ;;(message "end=%S" tend) - ) - - ((and (null close-expr) - (looking-at "[ ]\\(class\\|id\\|href\\|style\\)=\"[[:alnum:]_=:/?;#. -]*\">")) - (let ((beg (1+ (point))) - (end (+ (point) (length (match-string-no-properties 0))))) - (setq flags (logior flags 17) - tend end) - (put-text-property beg (1+ beg) 'tag-attr-beg 0) - (put-text-property beg (1- end) 'tag-attr t) - (put-text-property (- end 2) (1- end) 'tag-attr-end (length (match-string-no-properties 1))) - ) ;let - ) - - ((null close-expr) - (setq flags (logior flags (web-mode-attr-skip reg-end))) - (when (> (logand flags 8) 0) - (setq props (plist-put props 'tag-type 'void))) - (setq tend (point))) - - ((web-mode-dom-sf close-expr limit t) - (setq tend (point))) - - (t - (setq tend (line-end-position))) - - ) ;cond - - (cond - ((string= tname "style") - (let (style) - (setq style (buffer-substring-no-properties tbeg tend) - part-close-tag "") - (cond - ((string-match-p " lang[ ]*=[ ]*[\"']stylus" style) - (setq element-content-type "stylus")) - ((string-match-p " lang[ ]*=[ ]*[\"']sass" style) - (setq element-content-type "sass")) - (t - (setq element-content-type "css")) - ) ;cond - ) ;let - ) ;style - ((string= tname "script") - (let (script) - (setq script (buffer-substring-no-properties tbeg tend) - part-close-tag "") - (cond - ((string-match-p " type[ ]*=[ ]*[\"']text/\\(jsx\\|babel\\)" script) - (setq element-content-type "jsx")) - ((string-match-p " type[ ]*=[ ]*[\"']text/\\(markdown\\|template\\)" script) - (setq element-content-type "markdown")) - ((string-match-p " type[ ]*=[ ]*[\"']text/ruby" script) - (setq element-content-type "ruby")) - ((seq-some (lambda (x) - (string-match-p (concat "type[ ]*=[ ]*[\"']" x) script)) - web-mode-script-template-types) - (setq element-content-type "html" - part-close-tag nil)) - ((string-match-p " type[ ]*=[ ]*[\"']application/\\(ld\\+json\\|json\\)" script) - (setq element-content-type "json")) - ((string-match-p " lang[ ]*=[ ]*[\"']\\(typescript\\|ts\\)" script) - (setq element-content-type "typescript")) - (t - (setq element-content-type "javascript")) - ) ;cond - ) ;let - ) ;script - ((string= tname "i18n") - (setq element-content-type "javascript" - part-close-tag "")) - ((and (string= tname "template") (string-match-p " lang" (buffer-substring-no-properties tbeg tend))) - (let (template) - (setq template (buffer-substring-no-properties tbeg tend) - part-close-tag "") - (cond - ((string-match-p " lang[ ]*=[ ]*[\"']pug" template) - (setq element-content-type "pug")) - (t - (setq element-content-type "html")) - ) ;cond - ) ;let - ) ;style - ((and (string= web-mode-engine "archibus") - (string= tname "sql")) - (setq element-content-type "sql" - part-close-tag "")) - ) - - (add-text-properties tbeg tend props) - (put-text-property tbeg (1+ tbeg) 'tag-beg flags) - (put-text-property (1- tend) tend 'tag-end t) - - (when (and part-close-tag - (web-mode-dom-sf part-close-tag reg-end t) - (setq part-beg tend) - (setq part-end (match-beginning 0)) - (> part-end part-beg)) - (put-text-property part-beg part-end 'part-side - (intern element-content-type web-mode-obarray)) - (setq tend part-end) - ) ;when - - (goto-char tend) - - ) ;while - - ))) - -;; FLAGS: tag -;; (1)attrs (2)custom (4)slash-beg (8)slash-end (16)bracket-end (32)namespaced - -;; FLAGS: attr -;; (1)custom-attr (2)engine-attr (4)spread-attr[jsx] (8)code-value -;; https://www.w3.org/TR/2012/WD-html-markup-20120329/syntax.html#attr-value-unquoted - -;; STATES: attr -;; (0)nil (1)space (2)name (3)space-before (4)equal (5)space-after -;; (6)value-uq (7)value-sq (8)value-dq (9)value-bq : jsx attr={} -;; (10)value-block - -(defun web-mode-attr-skip (limit) - - (let ((tag-flags 0) (attr-flags 0) (continue t) (attrs 0) (brace-depth 0) - (state 0) (equal-offset 0) (go-back nil) - (is-jsx (or (string= web-mode-content-type "jsx") (eq (get-text-property (point) 'part-type) 'jsx))) - attr name-beg name-end val-beg char pos mem step escaped spaced quoted) - - (while continue - - (setq pos (point) - char (char-after) - mem state - ;;spaced (eq char ?\s) - spaced (member char '(?\s ?\n)) - step nil) - - (ignore mem step) ;; Only used in debug print - (when quoted (setq quoted (1+ quoted))) - - (cond - - ((>= pos limit) - (setq continue nil) - (setq go-back t) - (setq attrs (+ attrs (web-mode-attr-scan pos state char name-beg name-end val-beg attr-flags equal-offset tag-flags))) - ) - - ((and (or (= state 0) (= state 1)) (get-text-property pos 'block-side)) - ) - - ((or (and (= state 8) (not (member char '(?\" ?\\)))) - (and (= state 7) (not (member char '(?\' ?\\)))) - (and (= state 9) (not (member char '(?} ?\\)))) - ) - (when (and (= state 9) (eq char ?\{)) - (setq brace-depth (1+ brace-depth))) - ) - - ((and (= state 9) (eq char ?\}) (> brace-depth 1)) - (setq brace-depth (1- brace-depth))) - - ;; #1233 - ;;((get-text-property pos 'block-side) - ;; (when (= state 2) - ;; (setq name-end pos)) - ;; ) - - ((and (= state 2) is-jsx (eq char ?\}) (eq attr-flags 4)) - (setq name-end pos) - (setq attrs (+ attrs (web-mode-attr-scan pos state char name-beg name-end val-beg attr-flags equal-offset tag-flags))) - (setq state 0 - attr-flags 0 - equal-offset 0 - name-beg nil - name-end nil - val-beg nil) - ) - - ((or (and (= state 8) (eq ?\" char) (not escaped)) - (and (= state 7) (eq ?\' char) (not escaped)) - (and (= state 9) (eq ?\} char) (= brace-depth 1)) - (and (= state 10) (get-text-property pos 'block-end)) - ) - (setq attrs (+ attrs (web-mode-attr-scan pos state char name-beg name-end val-beg attr-flags equal-offset tag-flags))) - (setq state 0 - attr-flags 0 - equal-offset 0 - name-beg nil - name-end nil - val-beg nil) - ) - - ((and (member state '(4 5)) (get-text-property pos 'block-beg)) - (setq val-beg pos) - (setq state 10)) - - ((and (member state '(4 5)) (member char '(?\' ?\" ?\{))) - (setq val-beg pos) - (setq quoted 1) - (setq state (cond ((eq ?\' char) 7) - ((eq ?\" char) 8) - (t 9))) - (setq step 100) - (when (= state 9) (setq brace-depth 1)) - ) - - ((and (eq ?\= char) (member state '(2 3))) - (setq equal-offset (- pos name-beg) - name-end (1- pos)) - (setq state 4) - (setq attr (buffer-substring-no-properties name-beg (1+ name-end))) - (when (and web-mode-indentless-attributes (member (downcase attr) web-mode-indentless-attributes)) - (setq attr-flags (logior attr-flags 8))) - ) - - ((and spaced (= state 0)) - (setq state 1) - ) - - ((and (eq char ?\<) (not (member state '(7 8 9)))) - (setq continue nil) - (setq go-back t) - (setq attrs (+ attrs (web-mode-attr-scan pos state char name-beg name-end val-beg attr-flags equal-offset tag-flags))) - ) - - ((and (eq char ?\>) (not (member state '(7 8 9)))) - (setq tag-flags (logior tag-flags 16)) - (when (eq (char-before) ?\/) - (setq tag-flags (logior tag-flags 8)) - ) - (setq continue nil) - (when name-beg - (setq attrs (+ attrs (web-mode-attr-scan pos state char name-beg name-end val-beg attr-flags equal-offset tag-flags)))) - ) - - ((and spaced (member state '(1 3 5))) - ) - - ((and spaced (= state 2)) - (setq state 3) - ) - - ((and (eq char ?\/) (member state '(4 5))) - (setq attrs (+ attrs (web-mode-attr-scan pos state char name-beg name-end val-beg attr-flags equal-offset tag-flags))) - (setq state 1 - attr-flags 0 - equal-offset 0 - name-beg nil - name-end nil - val-beg nil) - ) - - ((and (eq char ?\/) (member state '(0 1))) - ) - - ((and spaced (= state 4)) - (setq state 5) - ) - - ((and (= state 3) - (or (and (>= char 97) (<= char 122)) ;a - z - (and (>= char 65) (<= char 90)) ;A - Z - (eq char ?\-))) - (setq attrs (+ attrs (web-mode-attr-scan pos state char name-beg name-end val-beg attr-flags equal-offset tag-flags))) - (setq state 2 - attr-flags 0 - equal-offset 0 - name-beg pos - name-end pos - val-beg nil) - ) - - ((and (eq char ?\n) (not (member state '(7 8 9)))) - (setq attrs (+ attrs (web-mode-attr-scan pos state char name-beg name-end val-beg attr-flags equal-offset tag-flags))) - (setq state 1 - attr-flags 0 - equal-offset 0 - name-beg nil - name-end nil - val-beg nil) - ) - - ((and (= state 6) (member char '(?\s ?\n))) ;#1150 - (setq attrs (+ attrs (web-mode-attr-scan pos state char name-beg name-end val-beg attr-flags equal-offset tag-flags))) - (setq state 1 - attr-flags 0 - equal-offset 0 - name-beg nil - name-end nil - val-beg nil) - ) - - ((and quoted (= quoted 2) (member char '(?\s ?\n ?\>))) - (when (eq char ?\>) - (setq tag-flags (logior tag-flags 16)) - (setq continue nil)) - (setq state 6) - (setq attrs (+ attrs (web-mode-attr-scan pos state char name-beg name-end val-beg attr-flags equal-offset tag-flags))) - (setq state 1 - attr-flags 0 - equal-offset 0 - name-beg nil - name-end nil - val-beg nil) - ) - - ((and (not spaced) (= state 1)) - (when (and is-jsx (eq char ?\{)) - (setq attr-flags 4)) - (setq state 2) - (setq name-beg pos - name-end pos) - ) - - ((member state '(4 5)) - (setq val-beg pos) - (setq state 6) - ) - - ((= state 1) - (setq state 2) - ) - - ((= state 2) - (setq name-end pos) - (when (and nil (= attr-flags 0) (member char '(?\- ?\:))) - (let (attr) - (setq attr (buffer-substring-no-properties name-beg (1+ name-end))) - (cond - ((member attr '("http-equiv")) - (setq attr-flags (1- attr-flags)) - ) - ((and (eq char ?\-) (not (string= attr "http-"))) - (setq attr-flags (logior attr-flags 1))) - ) ;cond - ) ;let - ) ;when attr-flags = 1 - ) ;state=2 - - ) ;cond - - ;;(message "point(%S) state(%S) c(%S) name-beg(%S) name-end(%S) val-beg(%S) attr-flags(%S) equal-offset(%S)" pos state char name-beg name-end val-beg attr-flags equal-offset tag-flags) - - (when (and quoted (>= quoted 2)) - (setq quoted nil)) - - (setq escaped (eq ?\\ char)) - (when (null go-back) - (forward-char)) - - ;;(when (not (= mem state)) (message "pos=%S before=%S after=%S step=%S" pos mem state step)) - - ) ;while - - (when (> attrs 0) (setq tag-flags (logior tag-flags 1))) - - tag-flags)) - -(defun web-mode-attr-scan (pos state char name-beg name-end val-beg attr-flags equal-offset tag-flags) - ;;(message "point(%S) state(%S) c(%c) name-beg(%S) name-end(%S) val-beg(%S) attr-flags(%S) equal-offset(%S) tag-flags(%S)" pos state char name-beg name-end val-beg attr-flags equal-offset tag-flags) - (when (null attr-flags) (setq attr-flags 0)) - (when (and name-beg name-end web-mode-engine-attr-regexp) - (let (name) - (setq name (buffer-substring-no-properties name-beg (1+ name-end))) - (cond - ((string-match-p "^data[-]" name) - (setq attr-flags (logior attr-flags 1)) - ) - ((string-match-p web-mode-engine-attr-regexp name) - (setq attr-flags (logior attr-flags 2)) - ) - ) - ) ;name - ) - ;;(message "%S" name) - (cond - ((null name-beg) - 0) - ((or (and (= state 8) (not (eq ?\" char))) - (and (= state 7) (not (eq ?\' char)))) - (put-text-property name-beg (1+ name-beg) 'tag-attr-beg attr-flags) - (put-text-property name-beg val-beg 'tag-attr t) - (put-text-property (1- val-beg) val-beg 'tag-attr-end equal-offset) - 1) - ((and (member state '(4 5)) (null val-beg)) - (put-text-property name-beg (1+ name-beg) 'tag-attr-beg attr-flags) - (put-text-property name-beg (+ name-beg equal-offset 1) 'tag-attr t) - (put-text-property (+ name-beg equal-offset) (+ name-beg equal-offset 1) 'tag-attr-end equal-offset) - 1) - (t - (let (val-end) - (if (null val-beg) - (setq val-end name-end) - (setq val-end pos) - (cond - ((null char) - (setq val-end (1- val-end))) - ((member char '(?\s ?\n ?\/)) - (setq val-end (1- val-end))) - ((eq char ?\>) - (if (= (logand tag-flags 8) 8) - (progn - ;;(message "tag-flags=%S %S" tag-flags (logand tag-flags 8)) - (setq val-end (- val-end 2))) - (setq val-end (- val-end 1))) - ;; (message "val-end=%S" val-end) - ) - ) - ) - (put-text-property name-beg (1+ name-beg) 'tag-attr-beg attr-flags) - (put-text-property name-beg (1+ val-end) 'tag-attr t) - (put-text-property val-end (1+ val-end) 'tag-attr-end equal-offset) - ) ;let - 1) ;t - ) ;cond - ) - -(defun web-mode-part-foreach (reg-beg reg-end func) - (let ((i 0) (continue t) (part-beg reg-beg) (part-end nil)) - (while continue - (setq part-end nil) - (unless (get-text-property part-beg 'part-side) - (setq part-beg (web-mode-part-next-position part-beg))) - (when (and part-beg (< part-beg reg-end)) - (setq part-end (web-mode-part-end-position part-beg))) - (cond - ((> (setq i (1+ i)) 100) - (message "process-parts ** warning (%S) **" (point)) - (setq continue nil)) - ((or (null part-end) (> part-end reg-end)) - (setq continue nil)) - (t - (setq part-end (1+ part-end)) - (funcall func part-beg part-end) - (setq part-beg part-end)) - ) ;cond - ) ;while - )) - -(defun web-mode-part-scan (reg-beg reg-end &optional content-type depth) - (save-excursion - (let (token-re ch-before ch-at ch-next token-type beg continue) - ;;(message "%S %S" reg-beg reg-end) - (cond - (content-type - ) - ((member web-mode-content-type web-mode-part-content-types) - (setq content-type web-mode-content-type)) - (t - (setq content-type (symbol-name (get-text-property reg-beg 'part-side)))) - ) ;cond - - (goto-char reg-beg) - - (cond - ((member content-type '("javascript" "json")) - (setq token-re "/\\|\"\\|'\\|`")) - ((member content-type '("typescript")) - (setq token-re "/\\|\"\\|'\\|`\\|//\\|/\\*")) - ((member content-type '("jsx")) - (setq token-re "/\\|\"\\|'\\|`\\|]")) - ((string= web-mode-content-type "css") - (setq token-re "\"\\|'\\|/\\*\\|//")) - ((string= content-type "css") - (setq token-re "\"\\|'\\|/\\*")) - (t - (setq token-re "/\\*\\|\"\\|'")) - ) - - (while (and token-re (< (point) reg-end) (web-mode-dom-rsf token-re reg-end t)) - - (setq beg (match-beginning 0) - token-type nil - continue t - ch-at (char-after beg) - ch-next (or (char-after (1+ beg)) ?\d) - ch-before (or (char-before beg) ?\d)) - - ;;(message "[%S>%S|%S] %S %c %c %c" reg-beg reg-end depth beg ch-before ch-at ch-next) - - (cond - - ((eq ?\' ch-at) - (while (and continue (search-forward "'" reg-end t)) - (cond - ((get-text-property (1- (point)) 'block-side) - (setq continue t)) - (t - (setq continue (web-mode-string-continue-p reg-beg))) - ) - ) ;while - (setq token-type 'string)) - - ((eq ?\` ch-at) - (while (and continue (search-forward "`" reg-end t)) - (cond - ((get-text-property (1- (point)) 'block-side) - (setq continue t)) - (t - (setq continue (web-mode-string-continue-p reg-beg))) - ) - ) ;while - (setq token-type 'string)) - - ((eq ?\" ch-at) - (while (and continue (search-forward "\"" reg-end t)) - (cond - ((get-text-property (1- (point)) 'block-side) - (setq continue t)) - (t - (setq continue (web-mode-string-continue-p reg-beg))) - ) ;cond - ) ;while - (cond - ((string= content-type "json") - (if (looking-at-p "[ ]*:") - (cond - ((eq ?\@ (char-after (1+ beg))) - (setq token-type 'context)) - (t - (setq token-type 'key)) - ) - (setq token-type 'string)) - ) ;json - (t - (setq token-type 'string)) - ) ;cond - ) - - ((and (eq ?\< ch-at) - (not (or (and (>= ch-before 97) (<= ch-before 122)) ;; a-z - (and (>= ch-before 65) (<= ch-before 90))))) ;; A-Z - ;;(message "before [%S>%S|%S] pt=%S" reg-beg reg-end depth (point)) - (search-backward "<") - (if (web-mode-jsx-skip reg-end) - (web-mode-jsx-scan-element beg (point) depth) - (forward-char)) - ;;(message "after [%S>%S|%S] pt=%S" reg-beg reg-end depth (point)) - ) - - ((and (eq ?\/ ch-at) (member content-type '("javascript" "jsx" "typescript"))) - (cond - ((eq ?\\ ch-before) - ) - ((eq ?\* ch-next) - ;;(message "--> %S %S" (point) reg-end) - (when (search-forward "*/" reg-end t) - (setq token-type 'comment)) - ) - ((eq ?\/ ch-next) - (setq token-type 'comment) - (goto-char (if (< reg-end (line-end-position)) reg-end (line-end-position))) - ) - ((and (looking-at-p ".*/") - (looking-back "\\(^\\|case\\|[[(,=:!&|?{};]\\)[ ]*/" (point-min))) - ;;(re-search-forward "/[gimyu]*" reg-end t)) - (let ((eol (line-end-position))) - (while (and continue (search-forward "/" eol t)) - (cond - ((get-text-property (1- (point)) 'block-side) - (setq continue t)) - ((looking-back "\\\\+/" reg-beg t) - (setq continue (= (mod (- (point) (match-beginning 0)) 2) 0))) - (t - (re-search-forward "[gimyu]*" eol t) - (setq token-type 'string) - (setq continue nil)) - ) - ) ;while - ) ;let - ) - ) ;cond - ) - - ((eq ?\/ ch-next) - ;;(message "%S" (point)) - (cond - ((and (string= content-type "css") - (eq ?/ ch-at) - (eq ?: ch-before)) - ) - (t - (unless (eq ?\\ ch-before) - (setq token-type 'comment) - (goto-char (if (< reg-end (line-end-position)) reg-end (line-end-position))) - ) - ) - ) - - ) - - ((eq ?\* ch-next) - (cond - ((search-forward "*/" reg-end t) - (setq token-type 'comment)) - ((not (eobp)) - (forward-char)) - ) ;cond - ) - - ) ;cond - - (when (and beg (>= reg-end (point)) token-type) - (put-text-property beg (point) 'part-token token-type) - (cond - ((eq token-type 'comment) - (put-text-property beg (1+ beg) 'syntax-table (string-to-syntax "<")) - (when (< (point) (point-max)) - (if (< (point) (line-end-position)) - (put-text-property (1- (point)) (point) 'syntax-table (string-to-syntax ">")) ;#445 - (put-text-property (point) (1+ (point)) 'syntax-table (string-to-syntax ">")) ;#377 - ) - ) ;when - ) ;comment - ((eq token-type 'string) - (put-text-property beg (1+ beg) 'syntax-table (string-to-syntax "|")) - (when (< (point) (point-max)) - (if (< (point) (line-end-position)) - (put-text-property (1- (point)) (point) 'syntax-table (string-to-syntax "|")) - (put-text-property (point) (1+ (point)) 'syntax-table (string-to-syntax "|")) - ) - ) ;when - ) ;string - ) ;cond - ) ;when - - (when (> (point) reg-end) - (message "reg-beg(%S) reg-end(%S) token-type(%S) point(%S)" reg-beg reg-end token-type (point))) - - ;;(message "#[%S>%S|%S] %S %c %c %c | (%S)" reg-beg reg-end depth beg ch-before ch-at ch-next (point)) - - ) ;while - - ))) - -(defun web-mode-string-continue-p (reg-beg) - "Is `point' preceeded by an odd number of backslashes?" - (let ((p (1- (point)))) - (while (and (< reg-beg p) (eq ?\\ (char-before p))) - (setq p (1- p))) - (= (mod (- (point) p) 2) 0))) - -;; css rule = selector(s) + declaration (properties) -(defun web-mode-css-rule-next (limit) - (let (at-rule var-rule sel-beg sel-end dec-beg dec-end chunk) - (skip-chars-forward "\n\t ") - (setq sel-beg (point)) - (when (and (< (point) limit) - (web-mode-part-rsf "[{;]" limit)) - (setq sel-end (1- (point))) - (cond - ((eq (char-before) ?\{) - (setq dec-beg (point)) - (setq dec-end (web-mode-closing-paren-position (1- dec-beg) limit)) - (if dec-end - (progn - (goto-char dec-end) - (forward-char)) - (setq dec-end limit) - (goto-char limit)) - ) - (t - ) - ) ;cond - (setq chunk (buffer-substring-no-properties sel-beg sel-end)) - (cond - ((string-match "@\\([[:alpha:]-]+\\)" chunk) - (setq at-rule (match-string-no-properties 1 chunk))) - ((string-match "\\$\\([[:alpha:]-]+\\)" chunk) - (setq var-rule (match-string-no-properties 1 chunk))) - ) ;cond - ) ;when - (if (not sel-end) - (progn (goto-char limit) nil) - (list :at-rule at-rule - :var-rule var-rule - :sel-beg sel-beg - :sel-end sel-end - :dec-beg dec-beg - :dec-end dec-end) - ) ;if - )) - -(defun web-mode-css-rule-current (&optional pos part-beg part-end) - "Current CSS rule boundaries." - (unless pos (setq pos (point))) - (unless part-beg (setq part-beg (web-mode-part-beginning-position pos))) - (unless part-end (setq part-end (web-mode-part-end-position pos))) - (save-excursion - (let (beg end) - (goto-char pos) - (if (not (web-mode-part-sb "{" part-beg)) - (progn - (setq beg part-beg) - (if (web-mode-part-sf ";" part-end) - (setq end (1+ (point))) - (setq end part-end)) - ) ;progn - (setq beg (point)) - (setq end (web-mode-closing-paren-position beg part-end)) - (if end - (setq end (1+ end)) - (setq end (line-end-position))) - ;; (message "%S >>beg%S >>end%S" pos beg end) - (if (> pos end) - - ;;selectors - (progn - (goto-char pos) - (if (web-mode-part-rsb "[};]" part-beg) - (setq beg (1+ (point))) - (setq beg part-beg) - ) ;if - (goto-char pos) - (if (web-mode-part-rsf "[{;]" part-end) - (cond - ((eq (char-before) ?\;) - (setq end (point)) - ) - (t - (setq end (web-mode-closing-paren-position (1- (point)) part-end)) - (if end - (setq end (1+ end)) - (setq end part-end)) - ) - ) ;cond - (setq end part-end) - ) - ) ;progn selectors - - ;; declaration - (goto-char beg) - (if (web-mode-part-rsb "[}{;]" part-beg) - (setq beg (1+ (point))) - (setq beg part-beg) - ) ;if - ) ;if > pos end - ) - ;; (message "beg(%S) end(%S)" beg end) - (when (eq (char-after beg) ?\n) - (setq beg (1+ beg))) - (cons beg end) - ))) - -(defun web-mode-jsx-skip2 (reg-end) - (let ((continue t) (pos nil) (i 0)) - (looking-at "<\\([[:alpha:]][[:alnum:]:-]*\\)") - ;; (let ((tag (match-string-no-properties 1))) - ;; (message "point=%S tag=%S" (point) tag)) - (save-excursion - (while continue - (cond - ((> (setq i (1+ i)) 1000) - (message "jsx-skip ** warning **") - (setq continue nil)) - ((looking-at "<[[:alpha:]][[:alnum:]:-]*[ ]*/>") - (goto-char (match-end 0)) - (setq pos (point)) - (setq continue nil)) - ((not (web-mode-dom-rsf ">\\([ \t\n]*[\];,)':}|&]\\)\\|{" reg-end)) - (setq continue nil) - ) - ((eq (char-before) ?\{) - (backward-char) - (web-mode-closing-paren reg-end) - (forward-char) - ) - (t - (setq continue nil) - (setq pos (match-beginning 1)) - ) ;t - ) ;cond - ) ;while - ) ;save-excursion - (when pos (goto-char pos)) - ;;(message "jsx-skip: %S" pos) - pos)) - - (defun web-mode-jsx-skip (reg-end) ;; #1299 - (let ((continue t) (pos nil) (i 0) (tag nil) (regexp nil) (regexp0 nil) - (regexp1 nil) (counter 0) (ret nil) (match nil) (inside t)) - (looking-at "<\\([[:alpha:]][[:alnum:].:-]*\\)") ;; #1327 - (setq tag (match-string-no-properties 1)) - (if (null tag) - (progn - (setq regexp "<>") - (setq regexp0 "") - (setq regexp1 "") - ) - (setq regexp (concat "<" tag "[[:space:]/>]")) - (setq regexp0 (concat "<" tag "[[:space:]/>]")) - (setq regexp1 (concat "]")) - ) - ;;(message "-----\npoint=%S tag=%S regexp=%S reg-end=%S" (point) tag regexp reg-end) - (save-excursion - (while continue - (setq ret (web-mode-dom-rsf regexp reg-end)) - (if ret - (progn - (setq match (match-string-no-properties 0)) - ;;(message "ret=%S match=%S" ret match) - (when (and tag - (eq (aref match 0) ?\<) - (eq (char-before) ?\>)) - (backward-char) - (when (eq (char-before) ?\/) (backward-char))) - ) - (setq match nil) - ) ;if - ;;(message "point=%S regexp=%S match=%S" (point) regexp match) - (cond - ((> (setq i (1+ i)) 100) - (message "jsx-skip ** warning **") - (setq continue nil)) - ((not ret) - (setq continue nil) - ) - ((eq (aref match 0) ?\{) - (backward-char) - (web-mode-closing-paren reg-end) - (forward-char) - (if inside - (setq regexp (concat "[{]\\|/?>")) - (setq regexp (concat "[{]\\|" regexp1)) - ) - ) - ((and (null tag) match (string= match "")) ;; - (setq inside nil) - (if (eq counter 1) - (progn - (setq counter 0) - (setq continue nil) - (setq pos (point))) - (setq regexp (concat "[{]\\|<>")) - ) - ) - ((and (null tag) match (string= match "<>")) ;; <> - (setq inside nil) - (setq counter (1+ counter)) - (setq regexp (concat "[{]\\|")) - ) ;t - ((and (eq (char-before) ?\>) (eq (char-before (1- (point))) ?\/)) ;; /> - (setq inside nil) - (if (eq counter 1) - (progn - (setq counter 0) - (setq continue nil) - (setq pos (point))) - (setq regexp (concat "[{]\\|" regexp0)) - ) - ) - ((eq (char-before) ?\>) ;; > - (setq inside nil) - (if (= counter 0) - (progn - (setq continue nil) - (setq pos (point))) - (setq regexp (concat "[{]\\|" regexp1)) - ) - ) - ((and (> (length match) 1) (string= (substring match 0 2) "")) - ) - (t ;; ")) - ) ;t - ) ;cond - ;;(message "point=%S counter=%S inside=%S" (point) counter inside) - ) ;while - ) ;save-excursion - (when pos (goto-char pos)) - ;;(message "jsx-skip: %S" pos) - pos)) - -;; http://facebook.github.io/jsx/ -;; https://github.com/facebook/jsx/blob/master/AST.md -(defun web-mode-jsx-scan-element (reg-beg reg-end depth) - (unless depth (setq depth 1)) - ;;(message "%S %S | %S" reg-beg reg-end depth) - (save-excursion - (goto-char reg-beg) - (put-text-property reg-beg (1+ reg-beg) 'jsx-beg depth) - (put-text-property (1- reg-end) reg-end 'jsx-end depth) - (put-text-property reg-beg reg-end 'jsx-depth depth) - (remove-list-of-text-properties reg-beg reg-end '(tag-beg tag-end tag-name tag-type tag-attr tag-attr-beg tag-attr-end)) - (goto-char reg-beg) - (web-mode-scan-elements reg-beg reg-end) - (web-mode-jsx-scan-expression reg-beg reg-end (1+ depth)) - )) - -(defun web-mode-jsx-scan-expression (reg-beg reg-end depth) - (let ((continue t) beg end) - (save-excursion - (goto-char reg-beg) - ;;(message "reg-beg=%S reg-end=%S" reg-beg reg-end) - (while (and continue (search-forward "{" reg-end t)) - (backward-char) - (setq beg (point) - end (web-mode-closing-paren reg-end)) - (cond - ((eq (get-text-property beg 'part-token) 'comment) - (forward-char)) - ((not end) - (setq continue nil)) - (t - (setq end (1+ end)) - (put-text-property beg end 'jsx-depth depth) - (put-text-property beg (1+ beg) 'jsx-beg depth) - (put-text-property (1- end) end 'jsx-end depth) - (web-mode-part-scan beg end "jsx" (1+ depth)) - ) ;t - ) ;cond - ) ;while - ) ;save-excursion - )) - -(defun web-mode-jsx-is-html (&optional pos) - (interactive) - (unless pos (setq pos (point))) - (let ((depth (get-text-property pos 'jsx-depth))) - (cond - ((or (null depth) (<= pos 2)) - (setq pos nil)) - ((and (= depth 1) (get-text-property pos 'jsx-beg)) - (setq pos nil)) - ((get-text-property pos 'tag-end) - (setq pos nil)) - ((get-text-property pos 'tag-attr-beg) - (setq pos nil)) - ((get-text-property pos 'jsx-beg) - (setq pos (null (get-text-property pos 'tag-beg)))) - ((setq pos (web-mode-jsx-depth-beginning-position pos)) - (setq pos (not (null (get-text-property pos 'tag-beg))))) - (t - (setq pos nil)) - ) ;cond - ;;(message "is-html: %S (depth=%S)" pos depth) - pos)) - -(defun web-mode-jsx-is-expr (&optional pos) - (cond - ((and (get-text-property pos 'jsx-beg) - (not (get-text-property pos 'tag-beg))) - nil) - (t - (setq pos (web-mode-jsx-depth-beginning-position pos)) - (null (get-text-property pos 'tag-beg))) - ) ;cond - ) - -(defun web-mode-jsx-depth-beginning-position (&optional pos target-depth) - (interactive) - (unless pos (setq pos (point))) - (unless target-depth (setq target-depth (get-text-property pos 'jsx-depth))) - (cond - ((or (null target-depth) (bobp)) - (setq pos nil)) - ((and (get-text-property pos 'jsx-beg) (= target-depth (get-text-property pos 'jsx-depth))) - ) - (t - (let ((continue t) depth) - (while continue - (setq pos (previous-single-property-change pos 'jsx-depth)) - (cond - ((or (null pos) - (null (setq depth (get-text-property pos 'jsx-depth)))) - (setq continue nil - pos nil)) - ((and (get-text-property pos 'jsx-beg) (= target-depth depth)) - (setq continue nil)) - ) ;cond - ) ;while - ) ;let - ) ;t - ) ;cond - ;;(message "beg: %S" pos) - pos) - -(defun web-mode-jsx-element-next (reg-end) - (let (continue beg end) - (setq beg (point)) - (unless (get-text-property beg 'jsx-depth) - (setq beg (next-single-property-change beg 'jsx-beg))) - (setq continue (and beg (< beg reg-end)) - end beg) - (while continue - (setq end (next-single-property-change end 'jsx-end)) - (cond - ((or (null end) (> end reg-end)) - (setq continue nil - end nil)) - ((eq (get-text-property end 'jsx-depth) 1) - (setq continue nil)) - (t - (setq end (1+ end))) - ) ;cond - ) ;while - ;;(message "beg=%S end=%S" beg end) - (if (and beg end (< beg end)) (cons beg end) nil))) - -(defun web-mode-jsx-expression-next (reg-end) - (let (beg end depth continue pos) - (setq beg (point)) - ;;(message "pt=%S" beg) - (unless (and (get-text-property beg 'jsx-beg) (null (get-text-property beg 'tag-beg))) - ;;(setq beg (next-single-property-change beg 'jsx-beg)) - (setq continue t - pos (1+ beg)) - (while continue - (setq pos (next-single-property-change pos 'jsx-beg)) - (cond - ((null pos) - (setq continue nil - beg nil)) - ((> pos reg-end) - (setq continue nil - beg nil)) - ((null (get-text-property pos 'jsx-beg)) - ) - ((null (get-text-property pos 'tag-beg)) - (setq continue nil - beg pos)) - ;;(t - ;; (setq pos (1+ pos))) - ) ;cond - ) ;while - ) ;unless - ;;(message "beg=%S" beg) - (when (and beg (< beg reg-end)) - (setq depth (get-text-property beg 'jsx-beg) - continue (not (null depth)) - pos beg) - ;;(message "beg=%S" beg) - (while continue - (setq pos (next-single-property-change pos 'jsx-end)) - ;;(message "pos=%S" pos) - (cond - ((null pos) - (setq continue nil)) - ((> pos reg-end) - (setq continue nil)) - ((eq depth (get-text-property pos 'jsx-end)) - (setq continue nil - end pos)) - (t - ;;(setq pos (1+ pos)) - ) - ) ;cond - ) ;while - ) ;when - ;;(message "%S > %S" beg end) - (if (and beg end) (cons beg end) nil))) - -(defun web-mode-jsx-depth-next (reg-end) - (let (beg end depth continue pos) - (setq beg (point)) - ;;(message "pt=%S" beg) - (unless (get-text-property beg 'jsx-beg) - ;;(setq beg (next-single-property-change beg 'jsx-beg)) - ;;(setq pos (1+ beg)) - (setq pos (next-single-property-change (1+ beg) 'jsx-beg)) - (cond - ((null pos) - (setq beg nil)) - ((>= pos reg-end) - (setq beg nil)) - (t - (setq beg pos)) - ) ;cond - ) ;unless - ;;(message "beg=%S" beg) - (when beg - (setq depth (get-text-property beg 'jsx-beg) - continue (not (null depth)) - pos beg) - ;;(message "beg=%S" beg) - (while continue - (setq pos (next-single-property-change pos 'jsx-end)) - ;;(message "pos=%S" pos) - (cond - ((null pos) - (setq continue nil)) - ((> pos reg-end) - (setq continue nil)) - ((eq depth (get-text-property pos 'jsx-end)) - (setq continue nil - end pos)) - (t - ;;(setq pos (1+ pos)) - ) - ) ;cond - ) ;while - ) ;when - ;;(message "%S > %S" beg end) - (if (and beg end) (cons beg end) nil))) - -(defun web-mode-jsx-beginning () - (interactive) - (let (depth (continue t) (reg-beg (point-min)) (pos (point))) - (setq depth (get-text-property pos 'jsx-depth)) - (cond - ((not depth) - ) - ((get-text-property (1- pos) 'jsx-beg) - (goto-char (1- pos))) - (t - (while continue - (setq pos (previous-single-property-change pos 'jsx-beg)) - ;;(message "pos=%S" pos) - (cond - ((null pos) - (setq continue nil)) - ((<= pos reg-beg) - (setq continue nil)) - ((eq depth (get-text-property pos 'jsx-beg)) - (setq continue nil)) - ) ;cond - ) ;while - (web-mode-go pos) - ) ;t - ) ;cond - )) - -(defun web-mode-jsx-end () - (interactive) - (let (depth (continue t) (reg-end (point-max)) (pos (point))) - (setq depth (get-text-property pos 'jsx-depth)) - (cond - ((not depth) - ) - ((get-text-property pos 'jsx-end) - (goto-char (+ pos 1))) - (t - (while continue - (setq pos (next-single-property-change pos 'jsx-end)) - ;;(message "pos=%S" pos) - (cond - ((null pos) - (setq continue nil)) - ((> pos reg-end) - (setq continue nil)) - ((eq depth (get-text-property pos 'jsx-end)) - (setq continue nil)) - ) ;cond - ) ;while - (web-mode-go pos 1) - ) ;t - ) ;cond - )) - -;;---- FONTIFICATION ----------------------------------------------------------- - -(defun web-mode-fontify (limit) - (when web-mode-trace - (message "fontify: point(%S) limit(%S)" (point) limit)) - (cond - ;;(web-mode-skip-fontification - ;; nil) - (t - (web-mode-with-silent-modifications - (save-excursion - (save-restriction - (save-match-data - (let ((beg (point)) - (buffer-undo-list t) - (end limit) - (inhibit-point-motion-hooks t) - (inhibit-quit t)) - (remove-list-of-text-properties beg end '(font-lock-face face)) - (cond - ((and (get-text-property beg 'block-side) - (not (get-text-property beg 'block-beg))) - (web-mode-fontify-block beg end)) - ((or (member web-mode-content-type web-mode-part-content-types) - (get-text-property beg 'part-side)) - (web-mode-fontify-part beg end) - (web-mode-block-foreach beg end 'web-mode-fontify-block)) - ((string= web-mode-engine "none") - (web-mode-fontify-tags beg end) - (web-mode-part-foreach beg end 'web-mode-fontify-part)) - (t - (web-mode-fontify-tags beg end) - (web-mode-part-foreach beg end 'web-mode-fontify-part) - (web-mode-block-foreach beg end 'web-mode-fontify-block)) - ) ;cond - (when web-mode-enable-element-content-fontification - (web-mode-fontify-elements beg end)) - (when web-mode-enable-whitespace-fontification - (web-mode-fontify-whitespaces beg end)) - ) ;let - )))) - nil) ;t - )) - -(defun web-mode-buffer-fontify () - (interactive) - (cond - ((and (fboundp 'font-lock-flush) global-font-lock-mode) - (font-lock-flush) - (font-lock-ensure)) - (t ;emacs 24 - ;;(font-lock-fontify-buffer) - (and global-font-lock-mode - (font-lock-fontify-region (point-min) (point-max)))) - )) - -(defun web-mode-unfontify-region (beg end) - (ignore beg end) - ;;(message "unfontify: %S %S" beg end) - ) - -(defun web-mode-fontify-region (beg end keywords) - ;; (message "beg=%S end=%S keywords=%S" beg end (symbol-name keywords)) - (save-excursion - (let ((font-lock-keywords keywords) - (font-lock-multiline nil) - (font-lock-keywords-case-fold-search - (member web-mode-engine '("archibus" "asp" "template-toolkit"))) - (font-lock-keywords-only t) - (font-lock-extend-region-functions nil)) - (when (and (listp font-lock-keywords) global-font-lock-mode) - (font-lock-fontify-region beg end) - ) - ))) - -(defun web-mode-fontify-tags (reg-beg reg-end &optional depth) - (let ((continue t)) - ;;(message "%S %S %S" reg-beg reg-end depth) - (goto-char reg-beg) - (when (and (not (get-text-property (point) 'tag-beg)) - (not (web-mode-tag-next))) - (setq continue nil)) - (when (and continue (>= (point) reg-end)) - (setq continue nil)) - (while continue - (cond - (depth - (when (eq depth (get-text-property (point) 'jsx-depth)) - (web-mode-fontify-tag)) - ) - (t - (web-mode-fontify-tag)) - ) ;cond - (when (or (not (web-mode-tag-next)) - (>= (point) reg-end)) - (setq continue nil)) - ) ;while continue - (when web-mode-enable-inlays - (when (null web-mode-inlay-regexp) - (setq web-mode-inlay-regexp (regexp-opt '("\\[" "\\(" "\\begin{align}")))) - (let (beg end expr) - (goto-char reg-beg) - (while (web-mode-dom-rsf web-mode-inlay-regexp reg-end) - (setq beg (match-beginning 0) - end nil - expr (substring (match-string-no-properties 0) 0 2)) - (setq expr (cond - ((string= expr "\\[") "\\]") - ((string= expr "\\(") "\\)") - (t "\\end{align}"))) - (when (and (web-mode-dom-sf expr reg-end) - (setq end (match-end 0)) - (not (text-property-any beg end 'tag-end t))) - (font-lock-append-text-property beg end 'font-lock-face 'web-mode-inlay-face) - ) ;when - ) ;while - ) ;let - ) ;when - (when web-mode-enable-html-entities-fontification - (let (beg end) - (goto-char reg-beg) - (while (web-mode-dom-rsf "&\\([#]?[[:alnum:]]\\{2,8\\}\\);" reg-end) - (setq beg (match-beginning 0) - end (match-end 0)) - (when (not (text-property-any beg end 'tag-end t)) - (font-lock-append-text-property beg end 'font-lock-face 'web-mode-html-entity-face) - ) ;when - ) ;while - ) ;let - ) ;when - )) - -(defun web-mode-fontify-tag (&optional beg end) - (unless beg (setq beg (point))) - (unless end (setq end (1+ (web-mode-tag-end-position beg)))) - (let (name type face flags slash-beg slash-end bracket-end) - (setq flags (get-text-property beg 'tag-beg) - type (get-text-property beg 'tag-type) - name (get-text-property beg 'tag-name)) - (setq bracket-end (> (logand flags 16) 0)) - (cond - ((eq type 'comment) - (put-text-property beg end 'font-lock-face 'web-mode-comment-face) - (when (and web-mode-enable-comment-interpolation (> (- end beg) 5)) - (web-mode-interpolate-comment beg end nil))) - ((eq type 'cdata) - (put-text-property beg end 'font-lock-face 'web-mode-doctype-face)) - ((eq type 'doctype) - (put-text-property beg end 'font-lock-face 'web-mode-doctype-face)) - ((eq type 'declaration) - (put-text-property beg end 'font-lock-face 'web-mode-doctype-face)) - (name - (setq slash-beg (> (logand flags 4) 0) - slash-end (> (logand flags 8) 0) - bracket-end (> (logand flags 16) 0)) - (setq face (cond - ((not bracket-end) 'web-mode-html-tag-unclosed-face) - ((and web-mode-enable-element-tag-fontification - (setq face (cdr (assoc name web-mode-element-tag-faces)))) - face) - ((> (logand flags 32) 0) 'web-mode-html-tag-namespaced-face) - ((> (logand flags 2) 0) 'web-mode-html-tag-custom-face) - (t 'web-mode-html-tag-face))) - (put-text-property beg (+ beg (if slash-beg 2 1)) - 'font-lock-face 'web-mode-html-tag-bracket-face) - (if (string= name "_fragment_") - (progn - ;;(message "beg=%S" beg) - ) - (put-text-property (+ beg (if slash-beg 2 1)) - (+ beg (if slash-beg 2 1) (length name)) - 'font-lock-face face)) - (when (or slash-end bracket-end) - (put-text-property (- end (if slash-end 2 1)) end 'font-lock-face 'web-mode-html-tag-bracket-face) - ) ;when - (when (> (logand flags 1) 0) - ;;(message "%S>%S" beg end) - (web-mode-fontify-attrs beg end)) - ) ;case name - ) ;cond - )) - -(defun web-mode-fontify-attrs (reg-beg reg-end) - (let ((continue t) (pos reg-beg) beg end flags offset face) - ;;(message "fontify-attrs %S>%S" reg-beg reg-end) - (while continue - (setq beg (web-mode-attribute-next-position pos reg-end)) - (cond - ((or (null beg) (>= beg reg-end)) - (setq continue nil)) - (t - (setq flags (or (get-text-property beg 'tag-attr-beg) 0)) - (setq face (cond - ((= (logand flags 1) 1) 'web-mode-html-attr-custom-face) - ((= (logand flags 2) 2) 'web-mode-html-attr-engine-face) - ((= (logand flags 4) 4) nil) - (t 'web-mode-html-attr-name-face))) - ;;(setq end (if (get-text-property beg 'tag-attr-end) beg (web-mode-attribute-end-position beg))) - (setq end (web-mode-attribute-end-position beg)) - ;;(message "beg=%S end=%S" beg end) - (cond - ((or (null end) (>= end reg-end)) - (setq continue nil)) - (t - (setq offset (get-text-property end 'tag-attr-end)) - (if (= offset 0) - (put-text-property beg (1+ end) 'font-lock-face face) - (put-text-property beg (+ beg offset) 'font-lock-face face) - (put-text-property (+ beg offset) (+ beg offset 1) - 'font-lock-face - 'web-mode-html-attr-equal-face) - (when (not (get-text-property (+ beg offset 1) 'jsx-beg)) - (put-text-property (+ beg offset 1) (1+ end) - 'font-lock-face - 'web-mode-html-attr-value-face) - ) - ) ;if offset - (setq pos (1+ end)) - ) ;t - ) ;cond - ) ;t - );cond - ) ;while - )) - -(defun web-mode-fontify-block (reg-beg reg-end) - (when web-mode-trace - (message "fontify-block: reg-beg(%S) reg-end(%S) engine(%S) keywords(%S)" - reg-beg reg-end web-mode-engine (not (null web-mode-engine-font-lock-keywords)))) - - (let (sub1 sub2 sub3 continue char keywords token-type face beg end (buffer (current-buffer))) - - ;; NOTE: required for blocks inside tag attrs - ;; NOTE: ajout de face dans la liste pour sucharger la couleur définie par - ;; un prealable web-mode-fontity-part (2022-12-25 #1230) - (remove-list-of-text-properties reg-beg reg-end '(font-lock-face face)) - ;;(message "reg-beg=%S reg-end=%S" reg-beg reg-end) - - (goto-char reg-beg) - - (when (null web-mode-engine-font-lock-keywords) - (setq sub1 (buffer-substring-no-properties - reg-beg (+ reg-beg 1)) - sub2 (buffer-substring-no-properties - reg-beg (+ reg-beg 2)) - sub3 (buffer-substring-no-properties - reg-beg (+ reg-beg (if (>= (point-max) (+ reg-beg 3)) 3 2)))) - ) - - (cond - - ((and (get-text-property reg-beg 'block-beg) - (eq (get-text-property reg-beg 'block-token) 'comment)) - (put-text-property reg-beg reg-end 'font-lock-face 'web-mode-comment-face) - ) ;comment block - - (web-mode-engine-font-lock-keywords - (setq keywords web-mode-engine-font-lock-keywords)) - - ((string= web-mode-engine "django") - (cond - ((string= sub2 "{{") - (setq keywords web-mode-django-expr-font-lock-keywords)) - ((string= sub2 "{%") - (setq keywords web-mode-django-code-font-lock-keywords)) - ((string= sub1 "#") - (setq keywords web-mode-django-code-font-lock-keywords)) - )) ;django - - ((string= web-mode-engine "mako") - (cond - ((member sub3 '("<% " "<%\n" "<%!")) - (setq keywords web-mode-mako-block-font-lock-keywords)) - ((eq (aref sub2 0) ?\%) - (setq keywords web-mode-mako-block-font-lock-keywords)) - ((member sub2 '("<%" " %S face(%S)" beg end face) - (remove-list-of-text-properties beg end '(face)) - (put-text-property beg end 'font-lock-face face) - ) - (setq continue nil - end nil) - ) ;if end - ) ;progn beg - (setq continue nil - end nil) - ) ;if beg - (when (and beg end) - (save-match-data - (when (and web-mode-enable-heredoc-fontification - (eq char ?\<) - (> (- end beg) 8) - (string-match-p "JS\\|JAVASCRIPT\\|HTM\\|CSS" (buffer-substring-no-properties beg end))) - (setq keywords - (cond - ((string-match-p "H" (buffer-substring-no-properties beg (+ beg 8))) - web-mode-html-font-lock-keywords) - (t - web-mode-javascript-font-lock-keywords) - )) - (web-mode-fontify-region beg end keywords) - ) - ) ;save-match-data - (when (and web-mode-enable-string-interpolation - (member char '(?\" ?\<)) - (member web-mode-engine '("php" "erb")) - (> (- end beg) 4)) - (web-mode-interpolate-block-string beg end) - ) ;when - (when (and web-mode-enable-comment-interpolation - (eq token-type 'comment) - (> (- end beg) 3)) - (web-mode-interpolate-comment beg end t) - ) ;when - (when (and web-mode-enable-comment-annotation - (eq token-type 'comment) - (> (- end beg) 3)) - (web-mode-annotate-comment beg end) - ) ;when - (when (and web-mode-enable-sql-detection - (eq token-type 'string) - (> (- end beg) 6) - (web-mode-looking-at-p (concat "\\(.\\|<<<[[:alnum:]]+\\)[ \n]*" web-mode-sql-queries) beg) - ) - (web-mode-interpolate-sql-string beg end) - ) ;when - ) ;when beg end - ) ;while continue - ) ;when keywords - - (when (and (member web-mode-engine '("mako")) - (> (- reg-end reg-beg) 12) - (eq ?\< (char-after reg-beg))) - (web-mode-interpolate-block-tag reg-beg reg-end)) - - (when web-mode-enable-block-face - (font-lock-append-text-property reg-beg reg-end 'face 'web-mode-block-face)) - - )) - -(defun web-mode-fontify-part (reg-beg reg-end &optional depth) - (save-excursion - (let (continue token-type face pos beg end string-face comment-face content-type) - ;;(message "fontify-part: reg-beg(%S) reg-end(%S)" reg-beg reg-end) - (if (member web-mode-content-type web-mode-part-content-types) - (setq content-type web-mode-content-type) - (setq content-type (symbol-name (get-text-property reg-beg 'part-side)))) - ;;(message "content-type=%S" content-type) - (unless depth - (when (string= content-type "jsx") (setq depth 0)) - ) - (setq string-face 'web-mode-part-string-face - comment-face 'web-mode-part-comment-face) - (cond - ((member content-type '("javascript" "jsx")) - (setq string-face 'web-mode-javascript-string-face - comment-face 'web-mode-javascript-comment-face) - (web-mode-fontify-region reg-beg reg-end web-mode-javascript-font-lock-keywords)) - ((string= content-type "json") - (setq string-face 'web-mode-json-string-face - comment-face 'web-mode-json-comment-face) - (web-mode-fontify-region reg-beg reg-end web-mode-javascript-font-lock-keywords)) - ((string= content-type "css") - (setq string-face 'web-mode-css-string-face - comment-face 'web-mode-css-comment-face) - (web-mode-fontify-css-rules reg-beg reg-end)) - ((string= content-type "sql") - (web-mode-fontify-region reg-beg reg-end web-mode-sql-font-lock-keywords)) - ((string= content-type "stylus") - (web-mode-fontify-region reg-beg reg-end web-mode-stylus-font-lock-keywords)) - ((string= content-type "sass") - (web-mode-fontify-region reg-beg reg-end web-mode-sass-font-lock-keywords)) - ((string= content-type "pug") - (web-mode-fontify-region reg-beg reg-end web-mode-pug-font-lock-keywords)) - ((string= content-type "markdown") - (web-mode-fontify-region reg-beg reg-end web-mode-markdown-font-lock-keywords)) - ((string= content-type "ruby") - (web-mode-fontify-region reg-beg reg-end web-mode-erb-font-lock-keywords)) - ((string= content-type "typescript") - (web-mode-fontify-region reg-beg reg-end web-mode-javascript-font-lock-keywords)) - ) ;cond - - (goto-char reg-beg) - - ;;(when (string= content-type "jsx") (web-mode-fontify-tags reg-beg reg-end)) - ;;(setq continue (and pos (< pos reg-end))) - (setq continue t - pos reg-beg) - (while continue - (if (get-text-property pos 'part-token) - (setq beg pos) - (setq beg (next-single-property-change pos 'part-token))) - (cond - ((or (null beg) (>= beg reg-end)) - (setq continue nil - end nil)) - ((and (eq depth 0) (get-text-property beg 'jsx-depth)) - (setq pos (or (next-single-property-change beg 'jsx-depth) (point-max)))) - (t - ;;(message "%c" (char-after beg)) - (setq token-type (get-text-property beg 'part-token)) - (setq face (cond - ((eq token-type 'string) string-face) - ((eq token-type 'comment) comment-face) - ((eq token-type 'context) 'web-mode-json-context-face) - ((eq token-type 'key) 'web-mode-json-key-face) - (t nil))) - (setq end (or (next-single-property-change beg 'part-token) (point-max)) - pos end) - (cond - ((or (null end) (> end reg-end)) - (setq continue nil - end nil)) - (t - (when face - (remove-list-of-text-properties beg end '(face)) - (put-text-property beg end 'font-lock-face face)) - (cond - ((< (- end beg) 6) - ) - ((eq token-type 'string) - (cond - ((and (eq (char-after beg) ?\`) - web-mode-enable-literal-interpolation - (member content-type '("javascript" "jsx" "typescript"))) - (web-mode-interpolate-javascript-literal beg end) - ) - ((and (eq (char-after beg) ?\") - web-mode-enable-string-interpolation - (member content-type '("javascript" "jsx" "typescript"))) - (web-mode-interpolate-javascript-string beg end)) - ) ;cond - ) ;case string - ((eq token-type 'comment) - (when web-mode-enable-comment-interpolation - (web-mode-interpolate-comment beg end t)) - (when web-mode-enable-comment-annotation - (web-mode-annotate-comment beg end)) - ) - ) ;cond - ) ;t - ) ;cond - ) ;t - ) ;cond - ) ;while - - (when (and (string= web-mode-content-type "html") web-mode-enable-part-face) - (font-lock-append-text-property reg-beg reg-end 'face - (cond - ((string= content-type "javascript") - 'web-mode-script-face) - ((string= content-type "css") - 'web-mode-style-face) - (t - 'web-mode-part-face))) - ) - - (when (and web-mode-enable-css-colorization (string= content-type "stylus")) - (goto-char reg-beg) - (while (and (re-search-forward "#[0-9a-fA-F]\\{6\\}\\|#[0-9a-fA-F]\\{3\\}\\|rgba?([ ]*\\([[:digit:]]\\{1,3\\}\\)[ ]*,[ ]*\\([[:digit:]]\\{1,3\\}\\)[ ]*,[ ]*\\([[:digit:]]\\{1,3\\}\\)\\(.*?\\))" end t) - (<= (point) reg-end)) - (web-mode-colorize (match-beginning 0) (match-end 0)) - ) - ) - - (when (and (eq depth 0) (string= content-type "jsx")) - (let (pair elt-beg elt-end exp-beg exp-end exp-depth) - (goto-char reg-beg) - (while (setq pair (web-mode-jsx-element-next reg-end)) - ;;(message "elt-pair=%S" pair) - (setq elt-beg (car pair) - elt-end (cdr pair)) - (remove-list-of-text-properties elt-beg (1+ elt-end) '(face)) - (web-mode-fontify-tags elt-beg elt-end 1) - (goto-char elt-beg) - (while (setq pair (web-mode-jsx-expression-next elt-end)) - ;;(message "exp-pair=%S elt-end=%S" pair elt-end) - (setq exp-beg (car pair) - exp-end (cdr pair)) - (when (eq (char-after exp-beg) ?\{) - ;;(message "%S : %c %c" exp-beg (char-after (+ exp-beg 1)) (char-after (+ exp-beg 2))) - (cond - ;;((and (eq (char-after (+ exp-beg 1)) ?\/) (eq (char-after (+ exp-beg 2)) ?\*)) - ;; (put-text-property exp-beg (1+ exp-end) 'font-lock-face 'web-mode-part-comment-face) - ;; ) - (t - (setq exp-depth (get-text-property exp-beg 'jsx-depth)) - (remove-list-of-text-properties exp-beg exp-end '(font-lock-face)) - (put-text-property exp-beg (1+ exp-beg) 'font-lock-face 'web-mode-block-delimiter-face) - (when (and (eq (get-text-property exp-beg 'tag-attr-beg) 4) (web-mode-looking-at-p "\.\.\." (1+ exp-beg))) - (put-text-property exp-beg (+ exp-beg 4) 'font-lock-face 'web-mode-block-delimiter-face)) - (put-text-property exp-end (1+ exp-end) 'font-lock-face 'web-mode-block-delimiter-face) - (web-mode-fontify-tags (1+ exp-beg) exp-end (1+ exp-depth)) - (web-mode-fontify-part (1+ exp-beg) exp-end exp-depth) - (web-mode-fontify-region (1+ exp-beg) exp-end web-mode-javascript-font-lock-keywords) - ) ;t - ) ;cond - ) ;when - (goto-char (1+ exp-beg)) - ) ;while exp - - (when (and elt-beg web-mode-jsx-depth-faces) - (let (depth-beg depth-end jsx-face) - (goto-char elt-beg) - (while (setq pair (web-mode-jsx-depth-next reg-end)) - ;;(message "depth-pair=%S" pair) - (setq depth-beg (car pair) - depth-end (cdr pair) - depth (get-text-property depth-beg 'jsx-depth) - jsx-face (elt web-mode-jsx-depth-faces (1- depth))) - ;;(message "%S" jsx-face) - (font-lock-prepend-text-property depth-beg (1+ depth-end) 'face jsx-face) - (goto-char (+ depth-beg 2)) - ) - ) ;let - ) - - (goto-char (1+ elt-end)) - ) ;while elt - ) ;let - ) ;when - - ) ;let - ) ;save-excursion - ) - -(defun web-mode-fontify-css-rules (part-beg part-end) - (save-excursion - (goto-char part-beg) - (let (rule (continue t) (i 0) (at-rule nil)) - (while continue - (setq rule (web-mode-css-rule-next part-end)) - ;;(message "rule=%S" rule) - (cond - ((> (setq i (1+ i)) 1000) - (message "fontify-css-rules ** too much rules **") - (setq continue nil)) - ((null rule) - (setq continue nil)) - ((and (setq at-rule (plist-get rule :at-rule)) - (not (member at-rule '("charset" "font-face" "import" "viewport"))) - (plist-get rule :dec-end)) - (web-mode-fontify-css-rule (plist-get rule :sel-beg) - (plist-get rule :sel-end) - nil nil) - (web-mode-fontify-css-rules (plist-get rule :dec-beg) - (plist-get rule :dec-end))) - (t - (web-mode-fontify-css-rule (plist-get rule :sel-beg) - (plist-get rule :sel-end) - (plist-get rule :dec-beg) - (plist-get rule :dec-end))) - ) ;cond - ) ;while - ) ;let - )) - -(defun web-mode-fontify-css-rule (sel-beg sel-end dec-beg dec-end) - (save-excursion - ;;(let ((end sel-end)) - ;;(message "sel-beg=%S sel-end=%S dec-beg=%S dec-end=%S" sel-beg sel-end dec-beg dec-end) - (web-mode-fontify-region sel-beg sel-end web-mode-selector-font-lock-keywords) - (when (and dec-beg dec-end) - ;;(setq end dec-end) - (web-mode-fontify-region dec-beg dec-end web-mode-declaration-font-lock-keywords) - ) ;when - (when (and dec-beg dec-end) - (goto-char dec-beg) - (while (and web-mode-enable-css-colorization - (re-search-forward "\\(?1:#[0-9a-fA-F]\\{6\\}\\)\\|\\(?1:#[0-9a-fA-F]\\{3\\}\\)\\|\\(?1:rgba?([ ]*\\(?2:[[:digit:]]\\{1,3\\}\\)[ ]*,[ ]*\\(?3:[[:digit:]]\\{1,3\\}\\)[ ]*,[ ]*\\(?4:[[:digit:]]\\{1,3\\}\\)\\(.*?\\))\\)\\|[: ]\\(?1:black\\|silver\\|gray\\|white\\|maroon\\|red\\|purple\\|fuchsia\\|green\\|lime\\|olive\\|yellow\\|navy\\|blue\\|teal\\|aqua\\|orange\\|aliceblue\\|antiquewhite\\|aquamarine\\|azure\\|beige\\|bisque\\|blanchedalmond\\|blueviolet\\|brown\\|burlywood\\|cadetblue\\|chartreuse\\|chocolate\\|coral\\|cornflowerblue\\|cornsilk\\|crimson\\|cyan\\|darkblue\\|darkcyan\\|darkgoldenrod\\|darkgray\\|darkgreen\\|darkgrey\\|darkkhaki\\|darkmagenta\\|darkolivegreen\\|darkorange\\|darkorchid\\|darkred\\|darksalmon\\|darkseagreen\\|darkslateblue\\|darkslategray\\|darkslategrey\\|darkturquoise\\|darkviolet\\|deeppink\\|deepskyblue\\|dimgray\\|dimgrey\\|dodgerblue\\|firebrick\\|floralwhite\\|forestgreen\\|gainsboro\\|ghostwhite\\|gold\\|goldenrod\\|greenyellow\\|grey\\|honeydew\\|hotpink\\|indianred\\|indigo\\|ivory\\|khaki\\|lavender\\|lavenderblush\\|lawngreen\\|lemonchiffon\\|lightblue\\|lightcoral\\|lightcyan\\|lightgoldenrodyellow\\|lightgray\\|lightgreen\\|lightgrey\\|lightpink\\|lightsalmon\\|lightseagreen\\|lightskyblue\\|lightslategray\\|lightslategrey\\|lightsteelblue\\|lightyellow\\|limegreen\\|linen\\|magenta\\|mediumaquamarine\\|mediumblue\\|mediumorchid\\|mediumpurple\\|mediumseagreen\\|mediumslateblue\\|mediumspringgreen\\|mediumturquoise\\|mediumvioletred\\|midnightblue\\|mintcream\\|mistyrose\\|moccasin\\|navajowhite\\|oldlace\\|olivedrab\\|orangered\\|orchid\\|palegoldenrod\\|palegreen\\|paleturquoise\\|palevioletred\\|papayawhip\\|peachpuff\\|peru\\|pink\\|plum\\|powderblue\\|rosybrown\\|royalblue\\|saddlebrown\\|salmon\\|sandybrown\\|seagreen\\|seashell\\|sienna\\|skyblue\\|slateblue\\|slategray\\|slategrey\\|snow\\|springgreen\\|steelblue\\|tan\\|thistle\\|tomato\\|turquoise\\|violet\\|wheat\\|whitesmoke\\|yellowgreen\\)[ ;]" dec-end t) - ;;(progn (message "%S %S" end (point)) t) - (<= (point) dec-end)) - ;;(message "web-mode-colorize beg=%S end=%S match=%S" (match-beginning 0) (match-end 0) (buffer-substring-no-properties (match-beginning 0) (match-end 0))) - (web-mode-colorize (match-beginning 1) (match-end 1)) - ) ;while - ) ;when - ;;) ;let - )) - -(defun web-mode-colorize-foreground (color) - (let* ((values (x-color-values color)) - (r (car values)) - (g (cadr values)) - (b (car (cdr (cdr values))))) - (if (> 128.0 (floor (+ (* .3 r) (* .59 g) (* .11 b)) 256)) - "white" "black"))) - -(defun web-mode-colorize (beg end) - (let (str plist) - (setq str (buffer-substring-no-properties beg end)) - ;;(setq str1 (match-string-no-properties 1)) - ;;(message "str=%S" str str1) - (cond - ;;(t - ;; (message "%S %S %S %S %S" (match-string-no-properties 0) (match-string-no-properties 1) (match-string-no-properties 2) (match-string-no-properties 3) (match-string-no-properties 4)) - ;; ) - ((string= (substring str 0 1) "#") - (setq plist (list :background str - :foreground (web-mode-colorize-foreground str)))) - ((and (>= (length str) 3) (string= (substring str 0 3) "rgb")) - (setq str (format "#%02X%02X%02X" - (string-to-number (match-string-no-properties 2)) - (string-to-number (match-string-no-properties 3)) - (string-to-number (match-string-no-properties 4)))) - (setq plist (list :background str - :foreground (web-mode-colorize-foreground str)))) - ((string= str "black") (setq plist (list :background "#000000" :foreground (web-mode-colorize-foreground "#000000")))) - ((string= str "silver") (setq plist (list :background "#c0c0c0" :foreground (web-mode-colorize-foreground "#c0c0c0")))) - ((string= str "gray") (setq plist (list :background "#808080" :foreground (web-mode-colorize-foreground "#808080")))) - ((string= str "white") (setq plist (list :background "#ffffff" :foreground (web-mode-colorize-foreground "#ffffff")))) - ((string= str "maroon") (setq plist (list :background "#800000" :foreground (web-mode-colorize-foreground "#800000")))) - ((string= str "red") (setq plist (list :background "#ff0000" :foreground (web-mode-colorize-foreground "#ff0000")))) - ((string= str "purple") (setq plist (list :background "#800080" :foreground (web-mode-colorize-foreground "#800080")))) - ((string= str "fuchsia") (setq plist (list :background "#ff00ff" :foreground (web-mode-colorize-foreground "#ff00ff")))) - ((string= str "green") (setq plist (list :background "#008000" :foreground (web-mode-colorize-foreground "#008000")))) - ((string= str "lime") (setq plist (list :background "#00ff00" :foreground (web-mode-colorize-foreground "#00ff00")))) - ((string= str "olive") (setq plist (list :background "#808000" :foreground (web-mode-colorize-foreground "#808000")))) - ((string= str "yellow") (setq plist (list :background "#ffff00" :foreground (web-mode-colorize-foreground "#ffff00")))) - ((string= str "navy") (setq plist (list :background "#000080" :foreground (web-mode-colorize-foreground "#000080")))) - ((string= str "blue") (setq plist (list :background "#0000ff" :foreground (web-mode-colorize-foreground "#0000ff")))) - ((string= str "teal") (setq plist (list :background "#008080" :foreground (web-mode-colorize-foreground "#008080")))) - ((string= str "aqua") (setq plist (list :background "#00ffff" :foreground (web-mode-colorize-foreground "#00ffff")))) - ((string= str "orange") (setq plist (list :background "#ffa500" :foreground (web-mode-colorize-foreground "#ffa500")))) - ((string= str "aliceblue") (setq plist (list :background "#f0f8ff" :foreground (web-mode-colorize-foreground "#f0f8ff")))) - ((string= str "antiquewhite") (setq plist (list :background "#faebd7" :foreground (web-mode-colorize-foreground "#faebd7")))) - ((string= str "aquamarine") (setq plist (list :background "#7fffd4" :foreground (web-mode-colorize-foreground "#7fffd4")))) - ((string= str "azure") (setq plist (list :background "#f0ffff" :foreground (web-mode-colorize-foreground "#f0ffff")))) - ((string= str "beige") (setq plist (list :background "#f5f5dc" :foreground (web-mode-colorize-foreground "#f5f5dc")))) - ((string= str "bisque") (setq plist (list :background "#ffe4c4" :foreground (web-mode-colorize-foreground "#ffe4c4")))) - ((string= str "blanchedalmond") (setq plist (list :background "#ffebcd" :foreground (web-mode-colorize-foreground "#ffebcd")))) - ((string= str "blueviolet") (setq plist (list :background "#8a2be2" :foreground (web-mode-colorize-foreground "#8a2be2")))) - ((string= str "brown") (setq plist (list :background "#a52a2a" :foreground (web-mode-colorize-foreground "#a52a2a")))) - ((string= str "burlywood") (setq plist (list :background "#deb887" :foreground (web-mode-colorize-foreground "#deb887")))) - ((string= str "cadetblue") (setq plist (list :background "#5f9ea0" :foreground (web-mode-colorize-foreground "#5f9ea0")))) - ((string= str "chartreuse") (setq plist (list :background "#7fff00" :foreground (web-mode-colorize-foreground "#7fff00")))) - ((string= str "chocolate") (setq plist (list :background "#d2691e" :foreground (web-mode-colorize-foreground "#d2691e")))) - ((string= str "coral") (setq plist (list :background "#ff7f50" :foreground (web-mode-colorize-foreground "#ff7f50")))) - ((string= str "cornflowerblue") (setq plist (list :background "#6495ed" :foreground (web-mode-colorize-foreground "#6495ed")))) - ((string= str "cornsilk") (setq plist (list :background "#fff8dc" :foreground (web-mode-colorize-foreground "#fff8dc")))) - ((string= str "crimson") (setq plist (list :background "#dc143c" :foreground (web-mode-colorize-foreground "#dc143c")))) - ((string= str "cyan") (setq plist (list :background "#00ffff" :foreground (web-mode-colorize-foreground "#00ffff")))) - ((string= str "darkblue") (setq plist (list :background "#00008b" :foreground (web-mode-colorize-foreground "#00008b")))) - ((string= str "darkcyan") (setq plist (list :background "#008b8b" :foreground (web-mode-colorize-foreground "#008b8b")))) - ((string= str "darkgoldenrod") (setq plist (list :background "#b8860b" :foreground (web-mode-colorize-foreground "#b8860b")))) - ((string= str "darkgray") (setq plist (list :background "#a9a9a9" :foreground (web-mode-colorize-foreground "#a9a9a9")))) - ((string= str "darkgreen") (setq plist (list :background "#006400" :foreground (web-mode-colorize-foreground "#006400")))) - ((string= str "darkgrey") (setq plist (list :background "#a9a9a9" :foreground (web-mode-colorize-foreground "#a9a9a9")))) - ((string= str "darkkhaki") (setq plist (list :background "#bdb76b" :foreground (web-mode-colorize-foreground "#bdb76b")))) - ((string= str "darkmagenta") (setq plist (list :background "#8b008b" :foreground (web-mode-colorize-foreground "#8b008b")))) - ((string= str "darkolivegreen") (setq plist (list :background "#556b2f" :foreground (web-mode-colorize-foreground "#556b2f")))) - ((string= str "darkorange") (setq plist (list :background "#ff8c00" :foreground (web-mode-colorize-foreground "#ff8c00")))) - ((string= str "darkorchid") (setq plist (list :background "#9932cc" :foreground (web-mode-colorize-foreground "#9932cc")))) - ((string= str "darkred") (setq plist (list :background "#8b0000" :foreground (web-mode-colorize-foreground "#8b0000")))) - ((string= str "darksalmon") (setq plist (list :background "#e9967a" :foreground (web-mode-colorize-foreground "#e9967a")))) - ((string= str "darkseagreen") (setq plist (list :background "#8fbc8f" :foreground (web-mode-colorize-foreground "#8fbc8f")))) - ((string= str "darkslateblue") (setq plist (list :background "#483d8b" :foreground (web-mode-colorize-foreground "#483d8b")))) - ((string= str "darkslategray") (setq plist (list :background "#2f4f4f" :foreground (web-mode-colorize-foreground "#2f4f4f")))) - ((string= str "darkslategrey") (setq plist (list :background "#2f4f4f" :foreground (web-mode-colorize-foreground "#2f4f4f")))) - ((string= str "darkturquoise") (setq plist (list :background "#00ced1" :foreground (web-mode-colorize-foreground "#00ced1")))) - ((string= str "darkviolet") (setq plist (list :background "#9400d3" :foreground (web-mode-colorize-foreground "#9400d3")))) - ((string= str "deeppink") (setq plist (list :background "#ff1493" :foreground (web-mode-colorize-foreground "#ff1493")))) - ((string= str "deepskyblue") (setq plist (list :background "#00bfff" :foreground (web-mode-colorize-foreground "#00bfff")))) - ((string= str "dimgray") (setq plist (list :background "#696969" :foreground (web-mode-colorize-foreground "#696969")))) - ((string= str "dimgrey") (setq plist (list :background "#696969" :foreground (web-mode-colorize-foreground "#696969")))) - ((string= str "dodgerblue") (setq plist (list :background "#1e90ff" :foreground (web-mode-colorize-foreground "#1e90ff")))) - ((string= str "firebrick") (setq plist (list :background "#b22222" :foreground (web-mode-colorize-foreground "#b22222")))) - ((string= str "floralwhite") (setq plist (list :background "#fffaf0" :foreground (web-mode-colorize-foreground "#fffaf0")))) - ((string= str "forestgreen") (setq plist (list :background "#228b22" :foreground (web-mode-colorize-foreground "#228b22")))) - ((string= str "gainsboro") (setq plist (list :background "#dcdcdc" :foreground (web-mode-colorize-foreground "#dcdcdc")))) - ((string= str "ghostwhite") (setq plist (list :background "#f8f8ff" :foreground (web-mode-colorize-foreground "#f8f8ff")))) - ((string= str "gold") (setq plist (list :background "#ffd700" :foreground (web-mode-colorize-foreground "#ffd700")))) - ((string= str "goldenrod") (setq plist (list :background "#daa520" :foreground (web-mode-colorize-foreground "#daa520")))) - ((string= str "greenyellow") (setq plist (list :background "#adff2f" :foreground (web-mode-colorize-foreground "#adff2f")))) - ((string= str "grey") (setq plist (list :background "#808080" :foreground (web-mode-colorize-foreground "#808080")))) - ((string= str "honeydew") (setq plist (list :background "#f0fff0" :foreground (web-mode-colorize-foreground "#f0fff0")))) - ((string= str "hotpink") (setq plist (list :background "#ff69b4" :foreground (web-mode-colorize-foreground "#ff69b4")))) - ((string= str "indianred") (setq plist (list :background "#cd5c5c" :foreground (web-mode-colorize-foreground "#cd5c5c")))) - ((string= str "indigo") (setq plist (list :background "#4b0082" :foreground (web-mode-colorize-foreground "#4b0082")))) - ((string= str "ivory") (setq plist (list :background "#fffff0" :foreground (web-mode-colorize-foreground "#fffff0")))) - ((string= str "khaki") (setq plist (list :background "#f0e68c" :foreground (web-mode-colorize-foreground "#f0e68c")))) - ((string= str "lavender") (setq plist (list :background "#e6e6fa" :foreground (web-mode-colorize-foreground "#e6e6fa")))) - ((string= str "lavenderblush") (setq plist (list :background "#fff0f5" :foreground (web-mode-colorize-foreground "#fff0f5")))) - ((string= str "lawngreen") (setq plist (list :background "#7cfc00" :foreground (web-mode-colorize-foreground "#7cfc00")))) - ((string= str "lemonchiffon") (setq plist (list :background "#fffacd" :foreground (web-mode-colorize-foreground "#fffacd")))) - ((string= str "lightblue") (setq plist (list :background "#add8e6" :foreground (web-mode-colorize-foreground "#add8e6")))) - ((string= str "lightcoral") (setq plist (list :background "#f08080" :foreground (web-mode-colorize-foreground "#f08080")))) - ((string= str "lightcyan") (setq plist (list :background "#e0ffff" :foreground (web-mode-colorize-foreground "#e0ffff")))) - ((string= str "lightgoldenrodyellow") (setq plist (list :background "#fafad2" :foreground (web-mode-colorize-foreground "#fafad2")))) - ((string= str "lightgray") (setq plist (list :background "#d3d3d3" :foreground (web-mode-colorize-foreground "#d3d3d3")))) - ((string= str "lightgreen") (setq plist (list :background "#90ee90" :foreground (web-mode-colorize-foreground "#90ee90")))) - ((string= str "lightgrey") (setq plist (list :background "#d3d3d3" :foreground (web-mode-colorize-foreground "#d3d3d3")))) - ((string= str "lightpink") (setq plist (list :background "#ffb6c1" :foreground (web-mode-colorize-foreground "#ffb6c1")))) - ((string= str "lightsalmon") (setq plist (list :background "#ffa07a" :foreground (web-mode-colorize-foreground "#ffa07a")))) - ((string= str "lightseagreen") (setq plist (list :background "#20b2aa" :foreground (web-mode-colorize-foreground "#20b2aa")))) - ((string= str "lightskyblue") (setq plist (list :background "#87cefa" :foreground (web-mode-colorize-foreground "#87cefa")))) - ((string= str "lightslategray") (setq plist (list :background "#778899" :foreground (web-mode-colorize-foreground "#778899")))) - ((string= str "lightslategrey") (setq plist (list :background "#778899" :foreground (web-mode-colorize-foreground "#778899")))) - ((string= str "lightsteelblue") (setq plist (list :background "#b0c4de" :foreground (web-mode-colorize-foreground "#b0c4de")))) - ((string= str "lightyellow") (setq plist (list :background "#ffffe0" :foreground (web-mode-colorize-foreground "#ffffe0")))) - ((string= str "limegreen") (setq plist (list :background "#32cd32" :foreground (web-mode-colorize-foreground "#32cd32")))) - ((string= str "linen") (setq plist (list :background "#faf0e6" :foreground (web-mode-colorize-foreground "#faf0e6")))) - ((string= str "magenta") (setq plist (list :background "#ff00ff" :foreground (web-mode-colorize-foreground "#ff00ff")))) - ((string= str "mediumaquamarine") (setq plist (list :background "#66cdaa" :foreground (web-mode-colorize-foreground "#66cdaa")))) - ((string= str "mediumblue") (setq plist (list :background "#0000cd" :foreground (web-mode-colorize-foreground "#0000cd")))) - ((string= str "mediumorchid") (setq plist (list :background "#ba55d3" :foreground (web-mode-colorize-foreground "#ba55d3")))) - ((string= str "mediumpurple") (setq plist (list :background "#9370db" :foreground (web-mode-colorize-foreground "#9370db")))) - ((string= str "mediumseagreen") (setq plist (list :background "#3cb371" :foreground (web-mode-colorize-foreground "#3cb371")))) - ((string= str "mediumslateblue") (setq plist (list :background "#7b68ee" :foreground (web-mode-colorize-foreground "#7b68ee")))) - ((string= str "mediumspringgreen") (setq plist (list :background "#00fa9a" :foreground (web-mode-colorize-foreground "#00fa9a")))) - ((string= str "mediumturquoise") (setq plist (list :background "#48d1cc" :foreground (web-mode-colorize-foreground "#48d1cc")))) - ((string= str "mediumvioletred") (setq plist (list :background "#c71585" :foreground (web-mode-colorize-foreground "#c71585")))) - ((string= str "midnightblue") (setq plist (list :background "#191970" :foreground (web-mode-colorize-foreground "#191970")))) - ((string= str "mintcream") (setq plist (list :background "#f5fffa" :foreground (web-mode-colorize-foreground "#f5fffa")))) - ((string= str "mistyrose") (setq plist (list :background "#ffe4e1" :foreground (web-mode-colorize-foreground "#ffe4e1")))) - ((string= str "moccasin") (setq plist (list :background "#ffe4b5" :foreground (web-mode-colorize-foreground "#ffe4b5")))) - ((string= str "navajowhite") (setq plist (list :background "#ffdead" :foreground (web-mode-colorize-foreground "#ffdead")))) - ((string= str "oldlace") (setq plist (list :background "#fdf5e6" :foreground (web-mode-colorize-foreground "#fdf5e6")))) - ((string= str "olivedrab") (setq plist (list :background "#6b8e23" :foreground (web-mode-colorize-foreground "#6b8e23")))) - ((string= str "orangered") (setq plist (list :background "#ff4500" :foreground (web-mode-colorize-foreground "#ff4500")))) - ((string= str "orchid") (setq plist (list :background "#da70d6" :foreground (web-mode-colorize-foreground "#da70d6")))) - ((string= str "palegoldenrod") (setq plist (list :background "#eee8aa" :foreground (web-mode-colorize-foreground "#eee8aa")))) - ((string= str "palegreen") (setq plist (list :background "#98fb98" :foreground (web-mode-colorize-foreground "#98fb98")))) - ((string= str "paleturquoise") (setq plist (list :background "#afeeee" :foreground (web-mode-colorize-foreground "#afeeee")))) - ((string= str "palevioletred") (setq plist (list :background "#db7093" :foreground (web-mode-colorize-foreground "#db7093")))) - ((string= str "papayawhip") (setq plist (list :background "#ffefd5" :foreground (web-mode-colorize-foreground "#ffefd5")))) - ((string= str "peachpuff") (setq plist (list :background "#ffdab9" :foreground (web-mode-colorize-foreground "#ffdab9")))) - ((string= str "peru") (setq plist (list :background "#cd853f" :foreground (web-mode-colorize-foreground "#cd853f")))) - ((string= str "pink") (setq plist (list :background "#ffc0cb" :foreground (web-mode-colorize-foreground "#ffc0cb")))) - ((string= str "plum") (setq plist (list :background "#dda0dd" :foreground (web-mode-colorize-foreground "#dda0dd")))) - ((string= str "powderblue") (setq plist (list :background "#b0e0e6" :foreground (web-mode-colorize-foreground "#b0e0e6")))) - ((string= str "rosybrown") (setq plist (list :background "#bc8f8f" :foreground (web-mode-colorize-foreground "#bc8f8f")))) - ((string= str "royalblue") (setq plist (list :background "#4169e1" :foreground (web-mode-colorize-foreground "#4169e1")))) - ((string= str "saddlebrown") (setq plist (list :background "#8b4513" :foreground (web-mode-colorize-foreground "#8b4513")))) - ((string= str "salmon") (setq plist (list :background "#fa8072" :foreground (web-mode-colorize-foreground "#fa8072")))) - ((string= str "sandybrown") (setq plist (list :background "#f4a460" :foreground (web-mode-colorize-foreground "#f4a460")))) - ((string= str "seagreen") (setq plist (list :background "#2e8b57" :foreground (web-mode-colorize-foreground "#2e8b57")))) - ((string= str "seashell") (setq plist (list :background "#fff5ee" :foreground (web-mode-colorize-foreground "#fff5ee")))) - ((string= str "sienna") (setq plist (list :background "#a0522d" :foreground (web-mode-colorize-foreground "#a0522d")))) - ((string= str "skyblue") (setq plist (list :background "#87ceeb" :foreground (web-mode-colorize-foreground "#87ceeb")))) - ((string= str "slateblue") (setq plist (list :background "#6a5acd" :foreground (web-mode-colorize-foreground "#6a5acd")))) - ((string= str "slategray") (setq plist (list :background "#708090" :foreground (web-mode-colorize-foreground "#708090")))) - ((string= str "slategrey") (setq plist (list :background "#708090" :foreground (web-mode-colorize-foreground "#708090")))) - ((string= str "snow") (setq plist (list :background "#fffafa" :foreground (web-mode-colorize-foreground "#fffafa")))) - ((string= str "springgreen") (setq plist (list :background "#00ff7f" :foreground (web-mode-colorize-foreground "#00ff7f")))) - ((string= str "steelblue") (setq plist (list :background "#4682b4" :foreground (web-mode-colorize-foreground "#4682b4")))) - ((string= str "tan") (setq plist (list :background "#d2b48c" :foreground (web-mode-colorize-foreground "#d2b48c")))) - ((string= str "thistle") (setq plist (list :background "#d8bfd8" :foreground (web-mode-colorize-foreground "#d8bfd8")))) - ((string= str "tomato") (setq plist (list :background "#ff6347" :foreground (web-mode-colorize-foreground "#ff6347")))) - ((string= str "turquoise") (setq plist (list :background "#40e0d0" :foreground (web-mode-colorize-foreground "#40e0d0")))) - ((string= str "violet") (setq plist (list :background "#ee82ee" :foreground (web-mode-colorize-foreground "#ee82ee")))) - ((string= str "wheat") (setq plist (list :background "#f5deb3" :foreground (web-mode-colorize-foreground "#f5deb3")))) - ((string= str "whitesmoke") (setq plist (list :background "#f5f5f5" :foreground (web-mode-colorize-foreground "#f5f5f5")))) - ((string= str "yellowgreen") (setq plist (list :background "#9acd32" :foreground (web-mode-colorize-foreground "#9acd32")))) - ) ;cond - (put-text-property beg end 'face plist) - )) - -(defun web-mode-interpolate-block-tag (beg end) - (save-excursion - (goto-char (+ 4 beg)) - (setq end (1- end)) - (while (re-search-forward "${.*?}" end t) - (remove-list-of-text-properties (match-beginning 0) (match-end 0) '(face)) - (web-mode-fontify-region (match-beginning 0) (match-end 0) - web-mode-uel-font-lock-keywords)) - )) - -(defun web-mode-interpolate-javascript-string (beg end) - (save-excursion - (goto-char (1+ beg)) - (setq end (1- end)) - (while (re-search-forward "${.*?}" end t) - (put-text-property (match-beginning 0) (match-end 0) - 'font-lock-face - 'web-mode-variable-name-face) - ) - )) - -(defun web-mode-interpolate-javascript-literal (beg end) - (save-excursion - (setq end (1- end)) - (goto-char (1+ beg)) - (cond - ((web-mode-looking-back "\\(css\\|styled[[:alnum:].]+\\|css = \\)" beg) - (goto-char (1+ beg)) - (while (re-search-forward ".*?:" end t) - (put-text-property (match-beginning 0) (match-end 0) - 'font-lock-face - 'web-mode-interpolate-color1-face) - ) - ) ;case css - ((web-mode-looking-back "\\(template\\|html\\|html = \\)" beg) - (goto-char (1+ beg)) - (while (re-search-forward web-mode-tag-regexp end t) - (put-text-property (match-beginning 1) (match-end 1) - 'font-lock-face - 'web-mode-interpolate-color1-face) - ) - (goto-char (1+ beg)) - (while (re-search-forward "\\| [.@?]?[[:alnum:]]+=" end t) - (cond - ((member (char-after (match-beginning 0)) '(?\< ?\/ ?\>)) - (put-text-property (match-beginning 0) (match-end 0) - 'font-lock-face - 'web-mode-interpolate-color2-face) - ) - (t - (put-text-property (1+ (match-beginning 0)) (1- (match-end 0)) - 'font-lock-face - 'web-mode-interpolate-color3-face) - ) ;t - ) ;cond - ) ;while - (goto-char (1+ beg)) - (while (re-search-forward "<\\(script\\|style\\)>\\(.*\\)" end t) - (put-text-property (match-beginning 2) (match-end 2) - 'font-lock-face - 'web-mode-interpolate-color4-face) - ) - ) ;case html - ) ;cond type of literal - (goto-char (1+ beg)) - (while (re-search-forward "${.*?}" end t) - (put-text-property (match-beginning 0) (match-end 0) - 'font-lock-face - 'web-mode-variable-name-face) - ) ;while - )) - -;; todo : parsing plus compliqué: {$obj->values[3]->name} -(defun web-mode-interpolate-block-string (beg end) - (save-excursion - (goto-char (1+ beg)) - (setq end (1- end)) - (cond - ((string= web-mode-engine "php") - (while (re-search-forward "$[[:alnum:]_]+\\(->[[:alnum:]_]+\\)*\\|{[ ]*$.+?}" end t) - ;; (message "%S > %S" (match-beginning 0) (match-end 0)) - (remove-list-of-text-properties (match-beginning 0) (match-end 0) '(font-lock-face)) - (web-mode-fontify-region (match-beginning 0) (match-end 0) - web-mode-php-var-interpolation-font-lock-keywords) - )) - ((string= web-mode-engine "erb") - (while (re-search-forward "#{.*?}" end t) - (remove-list-of-text-properties (match-beginning 0) (match-end 0) '(font-lock-face)) - (put-text-property (match-beginning 0) (match-end 0) - 'font-lock-face 'web-mode-variable-name-face) - )) - ) ;cond - )) - -(defun web-mode-interpolate-comment (beg end _block-side) - (save-excursion - (let ((regexp (concat "\\_<\\(" web-mode-comment-keywords "\\)\\_>"))) - (goto-char beg) - (while (re-search-forward regexp end t) - (font-lock-prepend-text-property (match-beginning 1) (match-end 1) - 'font-lock-face - 'web-mode-comment-keyword-face) - ) ;while - ))) - -(defun web-mode-annotate-comment (beg end) - (save-excursion - ;;(message "beg=%S end=%S" beg end) - (goto-char beg) - (when (looking-at-p "/\\*\\*") - (while (re-search-forward "\\(.+\\)" end t) - (font-lock-prepend-text-property (match-beginning 1) (match-end 1) - 'font-lock-face - 'web-mode-annotation-face)) - (goto-char beg) - (while (re-search-forward "[ ]+\\({[^}]+}\\)" end t) - (font-lock-prepend-text-property (match-beginning 1) (match-end 1) - 'font-lock-face - 'web-mode-annotation-type-face)) - (goto-char beg) - (while (re-search-forward "\\(@[[:alnum:]]+\\)" end t) - (font-lock-prepend-text-property (match-beginning 1) (match-end 1) - 'font-lock-face - 'web-mode-annotation-tag-face)) - (goto-char beg) - (while (re-search-forward "}[[:blank:]]+\\([[:graph:]]+\\)" end t) - (font-lock-prepend-text-property (match-beginning 1) (match-end 1) - 'font-lock-face - 'web-mode-annotation-value-face)) - (goto-char beg) - (while (re-search-forward "@see[[:blank:]]+\\([[:graph:]]+\\)" end t) - (font-lock-prepend-text-property (match-beginning 1) (match-end 1) - 'font-lock-face - 'web-mode-annotation-value-face)) - (goto-char beg) - (while (re-search-forward "{\\(@\\(?:link\\|code\\)\\)\\s-+\\([^}\n]+\\)\\(#.+\\)?}" end t) - (font-lock-prepend-text-property (match-beginning 2) (match-end 2) - 'font-lock-face - 'web-mode-annotation-value-face)) - (goto-char beg) - (while (re-search-forward "\\(\\)" end t) - (font-lock-prepend-text-property (match-beginning 1) (match-end 1) - 'font-lock-face - 'web-mode-annotation-html-face) - (font-lock-prepend-text-property (match-beginning 2) (match-end 2) - 'font-lock-face - 'web-mode-annotation-html-face) - (font-lock-prepend-text-property (match-beginning 3) (match-end 3) - 'font-lock-face - 'web-mode-annotation-html-face)) - ) ;when - )) - -(defun web-mode-interpolate-sql-string (beg end) - (save-excursion - (let ((case-fold-search t) - (regexp (concat "\\_<\\(" web-mode-sql-keywords "\\)\\_>"))) - (goto-char beg) - (while (re-search-forward regexp end t) - (font-lock-prepend-text-property (match-beginning 1) (match-end 1) - 'font-lock-face - 'web-mode-sql-keyword-face) - ) ;while - ))) - -;;---- EFFECTS ----------------------------------------------------------------- - -(defun web-mode-fill-paragraph (&optional _justify) - (save-excursion - (let ((pos (point)) - prop pair beg end delim-beg delim-end chunk fill-coll) - (ignore delim-beg delim-end fill-coll) - (cond - ((or (eq (get-text-property pos 'part-token) 'comment) - (eq (get-text-property pos 'block-token) 'comment)) - (setq prop - (if (get-text-property pos 'part-token) 'part-token 'block-token)) - (setq pair (web-mode-property-boundaries prop pos)) - (when (and pair (> (- (cdr pair) (car pair)) 6)) - (setq fill-coll (if (< fill-column 10) 70 fill-column)) - (setq beg (car pair) - end (cdr pair)) - (goto-char beg) - (setq chunk (buffer-substring-no-properties beg (+ beg 2))) - (cond - ((string= chunk "//") - (setq delim-beg "//" - delim-end "EOL")) - ((string= chunk "/*") - (setq delim-beg "/*" - delim-end "*/")) - ((string= chunk "{#") - (setq delim-beg "{#" - delim-end "#}")) - ((string= chunk "")) - ) - ) - ) ;comment - case - ((web-mode-is-content) - (setq pair (web-mode-content-boundaries pos)) - (setq beg (car pair) - end (cdr pair)) - ) - ) ;cond - ;;(message "beg(%S) end(%S)" beg end) - (when (and beg end) - (fill-region beg end)) - t))) - -(defun web-mode-engine-syntax-check () - (interactive) - (let ((proc nil) (errors nil) - (file (concat temporary-file-directory "emacs-web-mode-tmp"))) - (write-region (point-min) (point-max) file) - (cond - ;; ((null (buffer-file-name)) - ;; ) - ((string= web-mode-engine "php") - (setq proc (start-process "php-proc" nil "php" "-l" file)) - (set-process-filter - proc - (lambda (_proc output) - (cond - ((string-match-p "No syntax errors" output) - (message "No syntax errors") - ) - (t - ;; (setq output (replace-regexp-in-string temporary-file-directory "" output)) - ;; (message output) - (message "Syntax error") - (setq errors t)) - ) ;cond - ;; (delete-file file) - ) ;lambda - ) - ) ;php - (t - (message "no syntax checker found") - ) ;t - ) ;cond - errors)) - -(defun web-mode-jshint () - "Run JSHint on all the JavaScript parts." - (interactive) - (let (proc) - (when (buffer-file-name) - (setq proc (start-process - "jshint-proc" - nil - (or (executable-find "jshint") "/usr/local/bin/jshint") - "--extract=auto" - (buffer-file-name))) - (setq web-mode-jshint-errors 0) - (set-process-filter proc - (lambda (_proc output) - (let ((offset 0) overlay pos (old 0) msg) - (remove-overlays (point-min) (point-max) 'font-lock-face 'web-mode-error-face) - (while (string-match - "line \\([[:digit:]]+\\), col \\([[:digit:]]+\\), \\(.+\\)\\.$" - output offset) - (setq web-mode-jshint-errors (1+ web-mode-jshint-errors)) - (setq offset (match-end 0)) - (setq pos (web-mode-coord-position - (match-string-no-properties 1 output) - (match-string-no-properties 2 output))) - (when (get-text-property pos 'tag-beg) - (setq pos (1- pos))) - (when (not (= pos old)) - (setq old pos) - (setq overlay (make-overlay pos (1+ pos))) - (overlay-put overlay 'font-lock-face 'web-mode-error-face) - ) - (setq msg (or (overlay-get overlay 'help-echo) - (concat "line=" - (match-string-no-properties 1 output) - " column=" - (match-string-no-properties 2 output) - ))) - (overlay-put overlay 'help-echo - (concat msg " ## " (match-string-no-properties 3 output))) - ) ;while - )) - ) - ) ;when - )) - -(defun web-mode-dom-errors-show () - "Show unclosed tags." - (interactive) - (let (beg end tag pos l tags i cont cell overlay overlays first - (ori (point)) - (errors 0) - (continue t) - ) - (setq overlays (overlays-in (point-min) (point-max))) - (when overlays - (dolist (overlay overlays) - (when (eq (overlay-get overlay 'face) 'web-mode-warning-face) - (delete-overlay overlay) - ) - ) - ) - (goto-char (point-min)) - (when (not (or (get-text-property (point) 'tag-beg) - (web-mode-tag-next))) - (setq continue nil)) - (while continue - (setq pos (point)) - (setq tag (get-text-property pos 'tag-name)) - (cond - ((eq (get-text-property (point) 'tag-type) 'start) - (setq tags (push (list tag pos) tags)) - ;; (message "(%S) opening %S" pos tag) - ) - ((eq (get-text-property (point) 'tag-type) 'end) - (setq i 0 - l (length tags) - cont t) - (while (and (< i l) cont) - (setq cell (nth i tags)) - ;; (message "cell=%S" cell) - (setq i (1+ i)) - (cond - ((string= tag (nth 0 cell)) - (setq cont nil) - ) - (t - (setq errors (1+ errors)) - (setq beg (nth 1 cell)) - (setq end (web-mode-tag-end-position beg)) - (unless first - (setq first beg)) - (setq overlay (make-overlay beg (1+ end))) - (overlay-put overlay 'font-lock-face 'web-mode-warning-face) - ;; (message "invalid <%S> at %S" (nth 0 cell) (nth 1 cell)) - ) - ) ;cond - ) ;while - - (dotimes (_i i) - (setq tags (cdr tags))) - - ) - ) ;cond - (when (not (web-mode-tag-next)) - (setq continue nil)) - ) ;while - (message "%S error(s) detected" errors) - (if (< errors 1) - (goto-char ori) - (goto-char first) - (recenter)) - ;; (message "%S" tags) - )) - -(defun web-mode-fontify-elements (beg end) - (save-excursion - (goto-char beg) - (let ((continue (or (get-text-property (point) 'tag-beg) (web-mode-tag-next))) - (i 0) (ctx nil) (face nil)) - (while continue - (cond - ((> (setq i (1+ i)) 1000) - (message "fontify-elements ** too much tags **") - (setq continue nil)) - ((> (point) end) - (setq continue nil)) - ((not (get-text-property (point) 'tag-beg)) - (setq continue nil)) - ((eq (get-text-property (point) 'tag-type) 'start) - (when (and (setq ctx (web-mode-element-boundaries (point))) - (<= (car (cdr ctx)) end) - (setq face (cdr (assoc (get-text-property (point) 'tag-name) web-mode-element-content-faces)))) - (font-lock-prepend-text-property (1+ (cdr (car ctx))) (car (cdr ctx)) - 'font-lock-face face)) - ) - ) ;cond - (when (not (web-mode-tag-next)) - (setq continue nil)) - ) ;while - ))) - -(defun web-mode-enable (feature) - "Enable one feature." - (interactive - (list (completing-read - "Feature: " - (let (features) - (dolist (elt web-mode-features) - (setq features (append features (list (car elt))))) - features)))) - (when (and (or (not feature) (< (length feature) 1)) web-mode-last-enabled-feature) - (setq feature web-mode-last-enabled-feature)) - (when feature - (setq web-mode-last-enabled-feature feature) - (setq feature (cdr (assoc feature web-mode-features))) - (cond - ((eq feature 'web-mode-enable-current-column-highlight) - (web-mode-column-show)) - ((eq feature 'web-mode-enable-current-element-highlight) - (when (not web-mode-enable-current-element-highlight) - (web-mode-toggle-current-element-highlight)) - ) - ((eq feature 'web-mode-enable-whitespace-fontification) - (web-mode-whitespaces-on)) - (t - (set feature t) - (web-mode-buffer-fontify)) - ) - ) ;when - ) - -(defun web-mode-disable (feature) - "Disable one feature." - (interactive - (list (completing-read - "Feature: " - (let (features) - (dolist (elt web-mode-features) - (setq features (append features (list (car elt))))) - features)))) - (when (and (or (not feature) (< (length feature) 1)) web-mode-last-enabled-feature) - (setq feature web-mode-last-enabled-feature)) - (when feature - (setq feature (cdr (assoc feature web-mode-features))) - (cond - ((eq feature 'web-mode-enable-current-column-highlight) - (web-mode-column-hide)) - ((eq feature 'web-mode-enable-current-element-highlight) - (when web-mode-enable-current-element-highlight - (web-mode-toggle-current-element-highlight)) - ) - ((eq feature 'web-mode-enable-whitespace-fontification) - (web-mode-whitespaces-off)) - (t - (set feature nil) - (web-mode-buffer-fontify)) - ) - ) ;when - ) - -(defun web-mode-toggle-current-element-highlight () - "Toggle highlighting of the current html element." - (interactive) - (if web-mode-enable-current-element-highlight - (progn - (web-mode-delete-tag-overlays) - (setq web-mode-enable-current-element-highlight nil)) - (setq web-mode-enable-current-element-highlight t) - )) - -(defun web-mode-make-tag-overlays () - (unless web-mode-overlay-tag-start - (setq web-mode-overlay-tag-start (make-overlay 1 1) - web-mode-overlay-tag-end (make-overlay 1 1)) - (overlay-put web-mode-overlay-tag-start - 'font-lock-face - 'web-mode-current-element-highlight-face) - (overlay-put web-mode-overlay-tag-end - 'font-lock-face - 'web-mode-current-element-highlight-face))) - -(defun web-mode-delete-tag-overlays () - (when web-mode-overlay-tag-start - (delete-overlay web-mode-overlay-tag-start) - (delete-overlay web-mode-overlay-tag-end))) - -(defun web-mode-column-overlay-factory (index) - (let (overlay) - (when (null web-mode-column-overlays) - (dotimes (_i 100) - (setq overlay (make-overlay 1 1)) - (overlay-put overlay 'font-lock-face 'web-mode-current-column-highlight-face) - (setq web-mode-column-overlays (append web-mode-column-overlays (list overlay))) - ) - ) ;when - (setq overlay (nth index web-mode-column-overlays)) - (when (null overlay) - (setq overlay (make-overlay 1 1)) - (overlay-put overlay 'font-lock-face 'web-mode-current-column-highlight-face) - (setq web-mode-column-overlays (append web-mode-column-overlays (list overlay))) - ) ;when - overlay)) - -(defun web-mode-column-hide () - (setq web-mode-enable-current-column-highlight nil) - (remove-overlays (point-min) (point-max) - 'font-lock-face - 'web-mode-current-column-highlight-face)) - -(defun web-mode-count-invisible-character-ranges (min max) - (interactive "r") - (let ((count 0) (current-pos min)) - (save-excursion - (while (<= current-pos max) - (goto-char current-pos) - (if (get-text-property current-pos 'invisible) - (progn - (setq count (1+ count)) - (setq current-pos (1+ current-pos)) - (while (and (<= current-pos max) - (get-text-property current-pos 'invisible)) - (setq current-pos (1+ current-pos)))) - (setq current-pos (1+ current-pos))))) - count)) - -(defun web-mode-column-show () - (let ((index 0) overlay diff column line-to line-from line-delta last-line-no) - (web-mode-column-hide) - (setq web-mode-enable-current-column-highlight t) - (save-excursion ;;save-mark-and-excursion - (back-to-indentation) - (setq column (current-column) - line-to (web-mode-line-number)) - (when (and (get-text-property (point) 'tag-beg) - (member (get-text-property (point) 'tag-type) '(start end)) - (web-mode-tag-match) - (setq line-from (web-mode-line-number)) - (not (= line-from line-to))) - (when (> line-from line-to) - (let (tmp) - (setq tmp line-from) - (setq line-from line-to) - (setq line-to tmp)) - ) ;when - ;;(message "column(%S) line-from(%S) line-to(%S)" column line-from line-to) - (goto-char (point-min)) - (when (> line-from 1) - (forward-line (1- line-from))) - ;; Added by JMA - (save-excursion ;;save-mark-and-excursion - (let (start-point end-point) - (goto-line line-from) - (move-to-column column) - (setq start-point (point)) - (goto-line line-to) - (move-to-column column) - (setq end-point (point)) - (setq line-delta (count-lines start-point end-point t)) - (setq line-delta (+ line-delta (web-mode-count-invisible-character-ranges start-point end-point)))) - (setq line-to (+ line-from (1- line-delta)))) - ;(message (format "Currently at line: %d" (line-number-at-pos))) - (setq last-line-no (line-number-at-pos)) - ;; end JMA add - (while (<= line-from line-to) - (setq overlay (web-mode-column-overlay-factory index)) - (setq diff (- (line-end-position) (point))) - (cond - ((or (and (= column 0) (= diff 0)) - (> column diff)) - (end-of-line) - (move-overlay overlay (point) (point)) - (overlay-put overlay - 'after-string - (concat - (if (> column diff) (make-string (- column diff) ?\s) "") - (propertize " " - 'font-lock-face - 'web-mode-current-column-highlight-face) - ) ;concat - ) - ) - (t - (move-to-column column) - (overlay-put overlay 'after-string nil) - (move-overlay overlay (point) (1+ (point))) - ) - ) ;cond - (setq line-from (1+ line-from)) - (forward-line) - ;; JMA ADD - ;(message (format "Currently at line: %d" (line-number-at-pos))) - (if (not (= (1+ last-line-no) (line-number-at-pos))) - (delete-overlay overlay)) - (setq last-line-no (line-number-at-pos)) - ;; END JMA ADD - (setq index (1+ index)) - ) ;while - ) ;when - ) ;save-excursion - ) ;let - ) - -(defun web-mode-column-show2 () - (let ((index 0) overlay diff column line-to line-from) - (web-mode-column-hide) - (setq web-mode-enable-current-column-highlight t) - (save-excursion - (back-to-indentation) - (setq column (current-column) - line-to (web-mode-line-number)) - (when (and (get-text-property (point) 'tag-beg) - (member (get-text-property (point) 'tag-type) '(start end)) - (web-mode-tag-match) - (setq line-from (web-mode-line-number)) - (not (= line-from line-to))) - (when (> line-from line-to) - (let (tmp) - (setq tmp line-from) - (setq line-from line-to) - (setq line-to tmp)) - ) ;when - ;;(message "column(%S) line-from(%S) line-to(%S)" column line-from line-to) - (goto-char (point-min)) - (when (> line-from 1) - (forward-line (1- line-from))) - (while (<= line-from line-to) - (setq overlay (web-mode-column-overlay-factory index)) - (setq diff (- (line-end-position) (point))) - (cond - ((or (and (= column 0) (= diff 0)) - (> column diff)) - (end-of-line) - (move-overlay overlay (point) (point)) - (overlay-put overlay - 'after-string - (concat - (if (> column diff) (make-string (- column diff) ?\s) "") - (propertize " " - 'font-lock-face - 'web-mode-current-column-highlight-face) - ) ;concat - ) - ) - (t - (move-to-column column) - (overlay-put overlay 'after-string nil) - (move-overlay overlay (point) (1+ (point))) - ) - ) ;cond - (setq line-from (1+ line-from)) - (forward-line) - (setq index (1+ index)) - ) ;while - ) ;when - ) ;save-excursion - ) ;let - ) - -(defun web-mode-highlight-current-element () - (let ((ctx (web-mode-element-boundaries)) len) - (cond - ((null ctx) - (web-mode-delete-tag-overlays)) - ((eq (get-text-property (caar ctx) 'tag-type) 'void) ;; #1046 - (web-mode-make-tag-overlays) - (setq len (length (get-text-property (caar ctx) 'tag-name))) - (move-overlay web-mode-overlay-tag-start (+ (caar ctx) 1) (+ (caar ctx) 1 len)) - (move-overlay web-mode-overlay-tag-end (+ (cadr ctx) 1) (+ (cadr ctx) 1 len)) ;; #1257 - ) - (t - (web-mode-make-tag-overlays) - (setq len (length (get-text-property (caar ctx) 'tag-name))) - (move-overlay web-mode-overlay-tag-start (+ (caar ctx) 1) (+ (caar ctx) 1 len)) - (move-overlay web-mode-overlay-tag-end (+ (cadr ctx) 2) (+ (cadr ctx) 2 len)) - ) ;t - ) ;cond - )) - -(defun web-mode-fontify-whitespaces (beg end) - (save-excursion - (goto-char beg) - (while (re-search-forward web-mode-whitespaces-regexp end t) - (add-text-properties (match-beginning 0) (match-end 0) - '(face web-mode-whitespace-face)) - ) ;while - )) - -(defun web-mode-whitespaces-show () - "Toggle whitespaces." - (interactive) - (if web-mode-enable-whitespace-fontification - (web-mode-whitespaces-off) - (web-mode-whitespaces-on))) - -(defun web-mode-whitespaces-on () - "Show whitespaces." - (interactive) - (when web-mode-display-table - (setq buffer-display-table web-mode-display-table)) - (setq web-mode-enable-whitespace-fontification t)) - -(defun web-mode-whitespaces-off () - (setq buffer-display-table nil) - (setq web-mode-enable-whitespace-fontification nil)) - -(defun web-mode-use-tabs () - "Tweaks vars to be compatible with TAB indentation." - (let (offset) - (setq web-mode-block-padding 0) - (setq web-mode-script-padding 0) - (setq web-mode-style-padding 0) - (setq offset - (cond - ((and (boundp 'tab-width) tab-width) tab-width) - ((and (boundp 'standard-indent) standard-indent) standard-indent) - (t 4))) - ;; (message "offset(%S)" offset) - (setq web-mode-attr-indent-offset offset) - (setq web-mode-code-indent-offset offset) - (setq web-mode-css-indent-offset offset) - (setq web-mode-markup-indent-offset offset) - (setq web-mode-sql-indent-offset offset) - (add-to-list 'web-mode-indentation-params '("lineup-args" . nil)) - (add-to-list 'web-mode-indentation-params '("lineup-calls" . nil)) - (add-to-list 'web-mode-indentation-params '("lineup-concats" . nil)) - (add-to-list 'web-mode-indentation-params '("lineup-ternary" . nil)) - )) - -(defun web-mode-element-children-fold-or-unfold (&optional pos) - "Fold/Unfold all the children of the current html element." - (interactive) - (unless pos (setq pos (point))) - (save-excursion - (dolist (child (reverse (web-mode-element-children pos))) - (goto-char child) - (web-mode-fold-or-unfold)) - )) - -(defun web-mode-fold-or-unfold (&optional pos) - "Toggle folding on an html element or a control block." - (interactive) - (web-mode-scan) - (web-mode-with-silent-modifications - (save-excursion - (if pos (goto-char pos)) - (let (beg-inside beg-outside end-inside end-outside overlay overlays) - (when (looking-back "^[\t ]*" (point-min)) - (back-to-indentation)) - (setq overlays (overlays-at (point))) - (dolist (elt overlays) - (when (and (not overlay) - (eq (overlay-get elt 'font-lock-face) 'web-mode-folded-face)) - (setq overlay elt))) - (cond - ;; *** unfolding - (overlay - (setq beg-inside (overlay-start overlay) - end-inside (overlay-end overlay)) - (remove-overlays beg-inside end-inside) - (put-text-property beg-inside end-inside 'invisible nil) - ) - ;; *** block folding - ((and (get-text-property (point) 'block-side) - (cdr (web-mode-block-is-control (point)))) - (setq beg-outside (web-mode-block-beginning-position (point))) - (setq beg-inside (1+ (web-mode-block-end-position (point)))) - (when (web-mode-block-match) - (setq end-inside (point)) - (setq end-outside (1+ (web-mode-block-end-position (point))))) - ) - ;; *** html comment folding - ((eq (get-text-property (point) 'tag-type) 'comment) - (setq beg-outside (web-mode-tag-beginning-position)) - (setq beg-inside (+ beg-outside 4)) - (setq end-outside (web-mode-tag-end-position)) - (setq end-inside (- end-outside 3)) - ) - ;; *** tag folding - ((or (member (get-text-property (point) 'tag-type) '(start end)) - (web-mode-element-parent)) - (when (not (web-mode-element-is-collapsed (point))) - (web-mode-tag-beginning) - (when (eq (get-text-property (point) 'tag-type) 'end) - (web-mode-tag-match)) - (setq beg-outside (point)) - (web-mode-tag-end) - (setq beg-inside (point)) - (goto-char beg-outside) - (when (web-mode-tag-match) - (setq end-inside (point)) - (web-mode-tag-end) - (setq end-outside (point))) - ) - ) - ) ;cond - (when (and beg-inside beg-outside end-inside end-outside) - (setq overlay (make-overlay beg-outside end-outside)) - (overlay-put overlay 'font-lock-face 'web-mode-folded-face) - (put-text-property beg-inside end-inside 'invisible t)) - )))) - -;;---- TRANSFORMATION ---------------------------------------------------------- - -(defun web-mode-buffer-change-tag-case (&optional type) - "Change html tag case." - (interactive) - (save-excursion - (goto-char (point-min)) - (let ((continue t) f) - (setq f (if (member type '("upper" "uppercase" "upper-case")) 'uppercase 'downcase)) - (when (and (not (get-text-property (point) 'tag-beg)) - (not (web-mode-tag-next))) - (setq continue nil)) - (while continue - (skip-chars-forward " and < in html content." - (interactive) - (save-excursion - (let ((min (point-min)) (max (point-max))) - (when mark-active - (setq min (region-beginning) - max (region-end)) - (deactivate-mark)) - (goto-char min) - (while (web-mode-content-rsf "[&<>]" max) - (replace-match (cdr (assq (char-before) web-mode-xml-chars)) t t)) - ))) - -(defun web-mode-dom-quotes-replace () - "Replace dumb quotes." - (interactive) - (save-excursion - (let (expr (min (point-min)) (max (point-max))) - (when mark-active - (setq min (region-beginning) - max (region-end)) - (deactivate-mark)) - (goto-char min) - (setq expr (concat (car web-mode-smart-quotes) "\\2" (cdr web-mode-smart-quotes))) - (while (web-mode-content-rsf "\\(\"\\)\\(.\\{1,200\\}\\)\\(\"\\)" max) - (replace-match expr) - ) ;while - ))) - -;;---- INDENTATION ------------------------------------------------------------- - -;; todo : passer de règle en règle et mettre un \n à la fin -(defun web-mode-css-indent () - (save-excursion - (goto-char (point-min)) - (let ((continue t) part-end) - (while continue - (cond - ((not (web-mode-part-next)) - (setq continue nil)) - ((eq (get-text-property (point) 'part-side) 'css) - (setq part-end (web-mode-part-end-position)) - (while (web-mode-css-rule-next part-end) - (when (not (looking-at-p "[[:space:]]*\\($\\|<\\)")) - (newline) - (indent-according-to-mode) - (setq part-end (web-mode-part-end-position))) - ) - ) - ) ;cond - ) - ))) - -(defun web-mode-buffer-indent () - "Indent all buffer." - (interactive) - (let ((debug t) (ts (current-time)) (sub nil)) - (indent-region (point-min) (point-max)) - (when debug - (setq sub (time-subtract (current-time) ts)) - (message "buffer-indent: time elapsed = %Ss %9Sµs" (nth 1 sub) (nth 2 sub))) - (delete-trailing-whitespace))) - -(defun web-mode-point-context (pos) - "POS should be at the beginning of the indentation." - (save-excursion - (let (curr-char curr-indentation curr-line - language - options - reg-beg reg-col - prev-char prev-indentation prev-line prev-pos - token - part-language - depth) - - (setq reg-beg (point-min) - reg-col 0 - token "live" - options "" - language "" - prev-line "" - prev-char 0 - prev-pos nil - prev-line-end nil) - - (when (get-text-property pos 'part-side) - (setq part-language (symbol-name (get-text-property pos 'part-side)))) - - ;;(message "part-language=%S" part-language) - - (cond - - ((and (bobp) (member web-mode-content-type '("html" "xml"))) - (setq language web-mode-content-type) - ) - - ((string= web-mode-content-type "css") - (setq language "css" - curr-indentation web-mode-css-indent-offset)) - - ((member web-mode-content-type '("javascript" "json" "typescript")) - (setq language web-mode-content-type - curr-indentation web-mode-code-indent-offset)) - - ((or (string= web-mode-content-type "jsx") - (and part-language (string= part-language "jsx"))) - (setq language "jsx" - curr-indentation web-mode-code-indent-offset) - (cond - ((web-mode-jsx-is-html pos) - (setq curr-indentation web-mode-markup-indent-offset - options "is-html")) - ((and (setq depth (get-text-property pos 'jsx-depth)) (> depth 1)) - (when (get-text-property pos 'jsx-beg) - (setq depth (1- depth))) - (setq reg-beg (web-mode-jsx-depth-beginning-position pos depth)) - (setq reg-beg (1+ reg-beg)) - ;;(message "%S" (point)) - (save-excursion - (goto-char reg-beg) - ;;(message "pt=%S" reg-beg) - (cond - ((and (not (looking-at-p "[ ]*$")) - (looking-back "^[[:space:]]*{" (point-min))) - (setq reg-col (+ (current-indentation) ;; #1027 - (cond - ((looking-at "[ ]+") (1+ (length (match-string-no-properties 0)))) - (t 0)) - )) - ) - ((looking-at-p "[ ]*\\[[ ]*$") ;; #0659 - (setq reg-col (current-indentation)) - ) - ((and (looking-back "=[ ]*{" (point-min)) ;; #0739 #1022 - (not (looking-at-p "[[:space:]]*<"))) - (setq reg-col (current-indentation)) - ) - ;;((and (looking-back "=[ ]*{" (point-min)) ;; #0739 - ;; (looking-at-p "{[ ]*")) - ;; (setq reg-col (current-indentation)) - ;; ) - ((get-text-property (1- (point)) 'tag-beg) - ;;(message "point=%S" (point)) - (setq reg-col (current-indentation)) - ) - (t - (message "%S : %S %S" (point) (current-indentation) web-mode-code-indent-offset) - ;;(setq reg-col (+ (current-indentation) web-mode-code-indent-offset web-mode-jsx-expression-padding))) - (setq reg-col (+ (current-indentation) web-mode-code-indent-offset))) - ) - - ;;(message "%S %S %S" (point) (current-indentation) reg-col) - ) ;save-excursion - ) - ((string= web-mode-content-type "jsx") - (setq reg-beg (point-min))) - (t - (setq reg-beg (or (web-mode-part-beginning-position pos) (point-min))) - (save-excursion - (goto-char reg-beg) - (search-backward "<" nil t) - (setq reg-col (current-column)) - ) ;save-excursion - ) - ) ;cond - ;;(message "jsx reg-beg=%S" reg-beg) - ) ;jsx - - ((string= web-mode-content-type "php") - (setq language "php" - curr-indentation web-mode-code-indent-offset)) - - ((or (string= web-mode-content-type "xml")) - (setq language "xml" - curr-indentation web-mode-markup-indent-offset)) - - ;; TODO: est ce util ? - ((and (get-text-property pos 'tag-beg) - (get-text-property pos 'tag-name) - ;;(not (get-text-property pos 'part-side)) - ) - (setq language "html" - curr-indentation web-mode-markup-indent-offset)) - - ((and (get-text-property pos 'block-side) - (not (get-text-property pos 'block-beg))) - - (setq reg-beg (or (web-mode-block-beginning-position pos) (point-min))) - (goto-char reg-beg) - (setq reg-col (current-column)) - ;;(message "%S %S" reg-beg reg-col) - (setq language web-mode-engine) - (setq curr-indentation web-mode-code-indent-offset) - - (cond - ((string= web-mode-engine "blade") - (save-excursion - (when (web-mode-rsf "{[{!]+[ ]*\\|@props[ ]*[(]") ;; #1318 - (setq reg-col (current-column)))) - (setq reg-beg (+ reg-beg 2)) - ) - ((string= web-mode-engine "razor") - ;;(setq reg-beg (+ reg-beg 2)) - ;;(setq reg-col (current-column)) - ) - ;; tests/demo.chtml - ((string= web-mode-engine "ctemplate") - (save-excursion - (when (web-mode-rsf "{{#?") - (setq reg-col (current-column)))) - ) - ((string= web-mode-engine "dust") - (save-excursion - (when (web-mode-rsf "{@") - (setq reg-col (current-column)))) - ) - ((string= web-mode-engine "svelte") - (save-excursion - (when (web-mode-rsf "{@") - (setq reg-col (current-column)))) - ) - ((string= web-mode-engine "template-toolkit") - (setq reg-beg (+ reg-beg 3) - reg-col (+ reg-col 3)) - ) - ((and (string= web-mode-engine "jsp") - (web-mode-looking-at "<%@" reg-beg)) - (save-excursion - (goto-char reg-beg) - (looking-at "<%@[ ]*[[:alpha:]]+[ ]+\\| pos (point-min)) - (eq (get-text-property pos 'part-token) 'comment) - (eq (get-text-property (1- pos) 'part-token) 'comment) - (progn - (setq reg-beg (previous-single-property-change pos 'part-token)) - t)) - (and (> pos (point-min)) - (eq (get-text-property pos 'block-token) 'comment) - (eq (get-text-property (1- pos) 'block-token) 'comment) - (progn - (setq reg-beg (previous-single-property-change pos 'block-token)) - t)) - (and (> pos (point-min)) - (eq (get-text-property pos 'tag-type) 'comment) - (not (get-text-property pos 'tag-beg)) - (progn - (setq reg-beg (web-mode-tag-beginning-position pos)) - t)) - ) - (setq token "comment")) - ((or (and (> pos (point-min)) - (member (get-text-property pos 'part-token) - '(string context key)) - (member (get-text-property (1- pos) 'part-token) - '(string context key))) - (and (eq (get-text-property pos 'block-token) 'string) - (eq (get-text-property (1- pos) 'block-token) 'string))) - (setq token "string")) - ) - - (goto-char pos) - (setq curr-line (web-mode-trim - (buffer-substring-no-properties - (line-beginning-position) - (line-end-position)))) - (setq curr-char (if (string= curr-line "") 0 (aref curr-line 0))) - - (when (or (member language '("php" "blade" "javascript" "typescript" "jsx" "razor" "css")) - (and (member language '("html" "xml")) - (not (eq ?\< curr-char)))) - (let (prev) - (cond - ((member language '("html" "xml" "javascript" "typescript" "jsx" "css")) - (when (setq prev (web-mode-part-previous-live-line reg-beg)) - (setq prev-line (nth 0 prev) - prev-indentation (nth 1 prev) - prev-pos (nth 2 prev) - prev-line-end (nth 3 prev)) - ) - ) - ((setq prev (web-mode-block-previous-live-line)) - (setq prev-line (nth 0 prev) - prev-indentation (nth 1 prev) - prev-pos (nth 2 prev) - prev-line-end (nth 3 prev)) - (setq prev-line (web-mode-clean-block-line prev-line))) - ) ;cond - ) ;let - (when (>= (length prev-line) 1) - (setq prev-char (aref prev-line (1- (length prev-line)))) - (setq prev-line (substring-no-properties prev-line)) - ) - ) - - (cond - ((not (member web-mode-content-type '("html" "xml"))) - ) - ((member language '("javascript" "typescript" "jsx" "ruby")) - (setq reg-col (if web-mode-script-padding (+ reg-col web-mode-script-padding) 0))) - ((member language '("css" "sql" "markdown" "pug" "sass" "stylus")) - (setq reg-col (if web-mode-style-padding (+ reg-col web-mode-style-padding) 0))) - ((not (member language '("html" "xml"))) - (setq reg-col - (cond - ((not web-mode-block-padding) reg-col) - ((eq web-mode-block-padding -1) 0) - (t (+ reg-col web-mode-block-padding)) - ) ;cond - ) ;setq - ) - ) - - (list :curr-char curr-char - :curr-indentation curr-indentation - :curr-line curr-line - :language language - :options options - :prev-char prev-char - :prev-indentation prev-indentation - :prev-line prev-line - :prev-line-end prev-line-end - :prev-pos prev-pos - :reg-beg reg-beg - :reg-col reg-col - :token token) - ))) - -(defun web-mode-indent-line () - - (web-mode-scan) - - (let ((offset nil) - (char nil) - (debug nil) - (inhibit-modification-hooks nil) - (adjust t)) - - (save-excursion - (back-to-indentation) - (setq char (char-after)) - (let* ((pos (point)) - (ctx (web-mode-point-context pos)) - (curr-char (plist-get ctx :curr-char)) - (curr-indentation (plist-get ctx :curr-indentation)) - (curr-line (plist-get ctx :curr-line)) - (language (plist-get ctx :language)) - (prev-char (plist-get ctx :prev-char)) - (prev-indentation (plist-get ctx :prev-indentation)) - (prev-line (plist-get ctx :prev-line)) - (prev-line-end (plist-get ctx :prev-line-end)) - (prev-pos (plist-get ctx :prev-pos)) - (reg-beg (plist-get ctx :reg-beg)) - (reg-col (plist-get ctx :reg-col)) - (token (plist-get ctx :token)) - (options (plist-get ctx :options)) - (chars (list curr-char prev-char)) - (tmp nil) - (is-js (member language '("javascript" "jsx" "ejs" "typescript")))) - - (when (member language '("json" "typescript")) - (setq language "javascript")) - - ;;(message "%S %S" (plist-get ctx :language) language) - ;;(message "curr-char=[%c] prev-char=[%c]\n%S" curr-char prev-char ctx) - ;;(message "options=%S" ctx) - - (cond - - ((or (bobp) (= (line-number-at-pos pos) 1)) - (when debug (message "I100(%S) first line" pos)) - (setq offset 0)) - - ;; #123 #1145 - ((and web-mode-enable-front-matter-block - (eq (char-after (point-min)) ?\-) - (or (looking-at-p "---") - (search-forward "---" (point-max) t))) - (when debug (message "I108(%S) front-matter-block" pos)) - (setq offset nil)) - - ;; #1073 - ((get-text-property pos 'invisible) - (when debug (message "I110(%S) invible" pos)) - (setq offset nil)) - - ((string= token "string") - (when debug (message "I120(%S) string" pos)) - (cond - ((web-mode-is-token-end pos) - (if (get-text-property pos 'block-side) - (web-mode-block-token-beginning) - (web-mode-part-token-beginning)) - (setq offset (current-indentation)) - ) - ((and web-mode-enable-sql-detection - (web-mode-block-token-starts-with (concat "[ \n]*" web-mode-sql-queries))) - (save-excursion - (let (col) - (web-mode-block-string-beginning) - (skip-chars-forward "[ \"'\n]") - (setq col (current-column)) - (goto-char pos) - (if (looking-at-p "\\(SELECT\\|INSERT\\|DELETE\\|UPDATE\\|FROM\\|LEFT\\|JOIN\\|WHERE\\|GROUP BY\\|LIMIT\\|HAVING\\|\)\\)") - (setq offset col) - (setq offset (+ col web-mode-sql-indent-offset))) - ) - ) ;save-excursion - ) - ((and is-js - (web-mode-is-ql-string pos "Relay\.QL")) - (setq offset (web-mode-relayql-indentation pos)) - ) - ((and is-js - (web-mode-is-ql-string pos "gql")) - (setq offset (web-mode-relayql-indentation pos "gql")) - ) - ((and is-js - (web-mode-is-ql-string pos "graphql")) - (setq offset (web-mode-relayql-indentation pos "graphql")) - ) - ((and is-js - (web-mode-is-css-string pos)) - (when debug (message "I127(%S) css string" pos)) - (setq offset (web-mode-token-css-indentation pos)) - ) - ((and is-js - (web-mode-is-html-string pos)) - (when debug (message "I128(%S) html string" pos)) - (setq offset (web-mode-token-html-indentation pos)) - ) - (t - (setq offset nil)) - ) ;cond - ) ;case string - - ((string= token "comment") - (when debug (message "I130(%S) comment" pos)) - (if (eq (get-text-property pos 'tag-type) 'comment) - (web-mode-tag-beginning) - (goto-char (car - (web-mode-property-boundaries - (if (eq (get-text-property pos 'part-token) 'comment) - 'part-token - 'block-token) - pos)))) - (setq offset (current-column)) - (cond - ((string= web-mode-engine "freemarker") - (setq offset (+ (current-indentation) 2))) - ((member (buffer-substring-no-properties (point) (+ (point) 2)) '("/*" "{*" "@*")) - (cond - ((eq ?\* curr-char) - (setq offset (+ offset 1))) - (t - (setq offset (+ offset 3))) - ) ;cond - ) - ((string= (buffer-substring-no-properties (point) (+ (point) 4)) "" curr-line) - (setq offset offset)) - ((string-match-p "^-" curr-line) - (setq offset (+ offset 3))) - (t - (setq offset (+ offset web-mode-markup-comment-indent-offset))) - ) ;cond - ) - ((and (string= web-mode-engine "django") (looking-back "{% comment %}" (point-min))) - (setq offset (- offset 12))) - ((and (string= web-mode-engine "mako") (looking-back "<%doc%>" (point-min))) - (setq offset (- offset 6))) - ((and (string= web-mode-engine "mason") (looking-back "<%doc%>" (point-min))) - (setq offset (- offset 6))) - ) ;cond - ) ;case comment - - ((and (string= web-mode-engine "mason") - (string-match-p "^%" curr-line)) - (when debug (message "I140(%S) mason" pos)) - (setq offset 0)) - - ((and (string= web-mode-engine "razor") - (string-match-p "^\\([{}]\\|else\\)" curr-line)) - (when debug (message "I142(%S) razor" pos)) - (save-excursion - (web-mode-block-previous) - (setq offset (current-indentation)) - )) - - ((and (string= web-mode-engine "django") - (string-match-p "^#" curr-line)) - (when debug (message "I144(%S) django line statements" pos)) - (setq offset 0)) - - ((and (get-text-property pos 'block-beg) - (or (web-mode-block-is-close pos) - (web-mode-block-is-inside pos))) - (when debug (message "I150(%S) block-match" pos)) - (cond - ((not (web-mode-block-match)) - ) - ((and (string= web-mode-engine "closure") - (string-match-p "{\\(case\\|default\\)" curr-line)) - (setq offset (+ (current-indentation) web-mode-markup-indent-offset))) - (t - (setq offset (current-indentation)) - (if (and (string= web-mode-engine "blade") - (string-match-p "@break" curr-line)) - (setq offset (+ (current-indentation) offset))) - ) - ) ;cond - ) - - ((eq (get-text-property pos 'block-token) 'delimiter-end) - (when debug (message "I160(%S) block-beginning" pos)) - (when (web-mode-block-beginning) - (setq reg-col (current-indentation)) - (setq offset (current-column)))) - - ((or (and (get-text-property pos 'tag-beg) - (eq (get-text-property pos 'tag-type) 'end)) - (and (eq (get-text-property pos 'tag-type) 'comment) - (string-match-p "" (point)) - (web-mode-insert-text-at-pos "" (point)) - (web-mode-insert-text-at-pos "") - (search-backward " -->") - ) ;case html - ) ;cond - )) - -(defun web-mode-comment (pos) - (let (ctx language col sel beg end block-side single-line-block pos-after content) - - (setq pos-after pos) - - (setq block-side (get-text-property pos 'block-side)) - (setq single-line-block (web-mode-is-single-line-block pos)) - - (cond - - ((and block-side (string= web-mode-engine "erb")) - (web-mode-comment-erb-block pos) - ) - - ((and block-side (string= web-mode-engine "artanis")) - (web-mode-comment-artanis-block pos) - ) - - ((and single-line-block block-side - (intern-soft (concat "web-mode-comment-" web-mode-engine "-block"))) - (funcall (intern (concat "web-mode-comment-" web-mode-engine "-block")) pos) - ) - - (t - (setq ctx (web-mode-point-context - (if mark-active (region-beginning) (line-beginning-position)))) - ;;(message "%S" ctx) - (setq language (plist-get ctx :language)) - (setq col (current-column)) - (cond - (mark-active - ;;(message "%S %S" (point) col) - ) - ((and (member language '("html" "xml")) - (get-text-property (progn (back-to-indentation) (point)) 'tag-beg)) - (web-mode-element-select)) - (t - (end-of-line) - (set-mark (line-beginning-position))) - ) ;cond - - (setq beg (region-beginning) - end (region-end)) - - (when (> (point) (mark)) - (exchange-point-and-mark)) - - (if (and (eq (char-before end) ?\n) - (not (eq (char-after end) ?\n))) - (setq end (1- end))) - - (setq sel (buffer-substring-no-properties beg end)) - - (cond - - ((member language '("html" "xml")) - (cond - ((and (= web-mode-comment-style 2) (string= web-mode-engine "django")) - (setq content (concat "{# " sel " #}"))) - ((and (= web-mode-comment-style 2) (member web-mode-engine '("ejs" "erb"))) - (setq content (concat "<%# " sel " %>"))) - ((and (= web-mode-comment-style 2) (string= web-mode-engine "artanis")) - (setq content (concat "<%; " sel " %>"))) - ((and (= web-mode-comment-style 2) (string= web-mode-engine "aspx")) - (setq content (concat "<%-- " sel " --%>"))) - ((and (= web-mode-comment-style 2) (string= web-mode-engine "smarty")) - (setq content (concat "{* " sel " *}"))) - ((and (= web-mode-comment-style 2) (string= web-mode-engine "expressionengine")) - (setq content (concat "{!-- " sel " --}"))) - ((and (= web-mode-comment-style 2) (string= web-mode-engine "xoops")) - (setq content (concat "<{* " sel " *}>"))) - ((and (= web-mode-comment-style 2) (string= web-mode-engine "hero")) - (setq content (concat "<%# " sel " %>"))) - ((and (= web-mode-comment-style 2) (string= web-mode-engine "blade")) - (setq content (concat "{{-- " sel " --}}"))) - ((and (= web-mode-comment-style 2) (string= web-mode-engine "ctemplate")) - (setq content (concat "{{!-- " sel " --}}"))) - ((and (= web-mode-comment-style 2) (string= web-mode-engine "antlers")) - (setq content (concat "{{# " sel " #}}"))) - ((and (= web-mode-comment-style 2) (string= web-mode-engine "razor")) - (setq content (concat "@* " sel " *@"))) - (t - (setq content (concat "")) - (when (< (length sel) 1) - (search-backward " -->") - (setq pos-after nil)) - )) - ) ;case html - - ((member language '("php" "javascript" "typescript" "java" "jsx")) - (let (alt) - (setq alt (cdr (assoc language web-mode-comment-formats))) - ;;(message "language=%S alt=%S sel=%S col=%S" language alt sel col) - (cond - ((and alt (string= alt "//")) - (setq content (replace-regexp-in-string (concat "\n[ ]\\{" (number-to-string col) "\\}") "\n" sel)) - (setq content (replace-regexp-in-string (concat "\n") "\n// " content)) - (setq content (concat "// " content))) - ((get-text-property pos 'jsx-depth) - (setq content (concat "{/* " sel " */}"))) - (web-mode-comment-prefixing - (setq content (replace-regexp-in-string (concat "\n[ ]\\{" (number-to-string col) "\\}") "\n* " sel)) - (setq content (concat "/* " content " */"))) - (t - (setq content (concat "/* " sel " */"))) - ) ;cond - ) ;let - ) - - ((member language '("erb")) - (setq content (replace-regexp-in-string "^[ ]*" "#" sel))) - - ((member language '("asp")) - (setq content (replace-regexp-in-string "^[ ]*" "'" sel))) - - (t - (setq content (concat "/* " sel " */"))) - - ) ;cond - - (when content - (delete-region beg end) - (deactivate-mark) - (let (beg end) - (setq beg (line-beginning-position)) - (insert content) - (setq end (line-end-position)) - (indent-region beg end) - ) - ) ;when - - ) ;t - ) ;cond - - (when pos-after (goto-char pos-after)) - - )) - -(defun web-mode-comment-ejs-block (pos) - (let (beg) - (setq beg (web-mode-block-beginning-position pos)) - (web-mode-insert-text-at-pos "//" (+ beg 2)))) - -(defun web-mode-comment-erb-block (pos) - (let (beg) - (setq beg (web-mode-block-beginning-position pos)) - (web-mode-insert-text-at-pos "#" (+ beg 2)))) - -(defun web-mode-comment-artanis-block (pos) - (let (beg) - (setq beg (web-mode-block-beginning-position pos)) - (web-mode-insert-text-at-pos ";" (+ beg 2)))) - -(defun web-mode-comment-django-block (pos) - (let (beg end) - (setq beg (web-mode-block-beginning-position pos) - end (web-mode-block-end-position pos)) - (web-mode-insert-text-at-pos "#" end) - (web-mode-insert-text-at-pos "#" (1+ beg)))) - -(defun web-mode-comment-dust-block (pos) - (let (beg end) - (setq beg (web-mode-block-beginning-position pos) - end (web-mode-block-end-position pos)) - (web-mode-insert-text-at-pos "!" end) - (web-mode-insert-text-at-pos "!" (1+ beg)))) - -(defun web-mode-comment-aspx-block (pos) - (let (beg end) - (setq beg (web-mode-block-beginning-position pos) - end (web-mode-block-end-position pos)) - (web-mode-insert-text-at-pos "#" end) - (web-mode-insert-text-at-pos "#" (1+ beg)))) - -(defun web-mode-comment-jsp-block (pos) - (let (beg) - (setq beg (web-mode-block-beginning-position pos)) - (web-mode-insert-text-at-pos "--" (+ beg 2)))) - -(defun web-mode-comment-go-block (pos) - (let (beg end) - (setq beg (web-mode-block-beginning-position pos) - end (web-mode-block-end-position pos)) - (web-mode-insert-text-at-pos "*/" (1- end)) - (web-mode-insert-text-at-pos "/*" (+ beg (if (web-mode-looking-at "{{" beg) 2 0))))) - -(defun web-mode-comment-php-block (pos) - (let (beg end) - (setq beg (web-mode-block-beginning-position pos) - end (web-mode-block-end-position pos)) - (web-mode-insert-text-at-pos "*/" (- end 2)) - (web-mode-insert-text-at-pos "/*" (+ beg 1 (if (web-mode-looking-at "<\\?php" beg) 5 3))))) - -(defun web-mode-comment-svelte-block (pos) - (let (beg end) - (setq beg (web-mode-block-beginning-position pos) - end (web-mode-block-end-position pos)) - (web-mode-insert-text-at-pos "!" end) - (web-mode-insert-text-at-pos "!" (1+ beg)))) - -(defun web-mode-comment-boundaries (&optional pos) - (interactive) - (unless pos (setq pos (point))) - (let ((beg pos) (end pos) prop) - (save-excursion - (goto-char pos) - (setq prop - (cond - ((eq (get-text-property pos 'block-token) 'comment) 'block-token) - ((eq (get-text-property pos 'tag-type) 'comment) 'tag-type) - ((eq (get-text-property pos 'part-token) 'comment) 'part-token) - (t nil) - )) - (if (null prop) - (setq beg nil - end nil) - (when (and (not (bobp)) - (eq (get-text-property pos prop) (get-text-property (1- pos) prop))) - (setq beg (or (previous-single-property-change pos prop) (point-min)))) - (when (and (not (eobp)) - (eq (get-text-property pos prop) (get-text-property (1+ pos) prop))) - (setq end (or (next-single-property-change pos prop) (point-max))))) - (message "beg(%S) end(%S) point-max(%S)" beg end (point-max)) - (when (and beg (string= (buffer-substring-no-properties beg (+ beg 2)) "//")) - (goto-char end) - (while (and (looking-at-p "\n[ ]*//") - (not (eobp))) - (search-forward "//") - (backward-char 2) - ;;(message "%S" (point)) - (setq end (next-single-property-change (point) prop)) - (goto-char end) - ;;(message "%S" (point)) - ) ;while - ) ;when - ;;(when end (setq end (1- end))) ;; #1021 - ) ;save-excursion - ;;(message "beg=%S end=%S" beg end) - (if (and beg end) (cons beg end) nil) - )) - -(defun web-mode-uncomment (pos) - (let ((beg pos) (end pos) (sub2 "") comment boundaries) - (save-excursion - (cond - ((and (get-text-property pos 'block-side) - (intern-soft (concat "web-mode-uncomment-" web-mode-engine "-block"))) - (funcall (intern (concat "web-mode-uncomment-" web-mode-engine "-block")) pos)) - ((and (setq boundaries (web-mode-comment-boundaries pos)) - (setq beg (car boundaries)) - (setq end (1+ (cdr boundaries))) - (> (- end beg) 4)) - (when (and (eq (get-text-property beg 'part-token) 'comment) - (> beg 1) ;#1158 - (get-text-property (1- beg) 'jsx-beg)) - (setq beg (1- beg) - end (1+ end))) - (setq comment (buffer-substring-no-properties beg end)) - (setq sub2 (substring comment 0 2)) - (cond - ((member sub2 '("$\\)" "" comment))) - ((string= sub2 "{#") - (setq comment (replace-regexp-in-string "\\(^{#[ ]?\\|[ ]?#}$\\)" "" comment))) - ((string= sub2 "{/") ;jsx comments - (setq comment (replace-regexp-in-string "\\(^{/\\*[ ]?\\|[ ]?\\*/}$\\)" "" comment))) - ((string= sub2 "/*") - ;;(message "%S" comment) - ;;(setq comment (replace-regexp-in-string "\\(\\*/\\|^/\\*[ ]?\\|^[ \t]*\\*\\)" "" comment)) - (setq comment (replace-regexp-in-string "\\([ ]?\\*/$\\|^/\\*[ ]?\\)" "" comment)) - (setq comment (replace-regexp-in-string "\\(^[ \t]*\\*\\)" "" comment)) - ;;(message "%S" comment) - ) - ((string= sub2 "''") - (setq comment (replace-regexp-in-string "''" "" comment))) - ((string= sub2 "//") - (setq comment (replace-regexp-in-string "^ *//" "" comment))) - ) ;cond - (delete-region beg end) - (web-mode-insert-and-indent comment) - (goto-char beg) - ) - ) ;cond - (indent-according-to-mode) - ))) - -(defun web-mode-uncomment-erb-block (pos) - (let (beg end) - (setq beg (web-mode-block-beginning-position pos) - end (web-mode-block-end-position pos)) - (cond - ((string= (buffer-substring-no-properties beg (+ beg 4)) "<%#=") - (web-mode-remove-text-at-pos 1 (+ beg 2))) - ((string-match-p "<[%[:alpha:]]" (buffer-substring-no-properties (+ beg 2) (- end 2))) - (web-mode-remove-text-at-pos 2 (1- end)) - (web-mode-remove-text-at-pos 3 beg)) - (t - (web-mode-remove-text-at-pos 1 (+ beg 2))) - ) ;cond - ) - ) - -(defun web-mode-uncomment-artanis-block (pos) - (let (beg end) - (setq beg (web-mode-block-beginning-position pos) - end (web-mode-block-end-position pos)) - (cond - ((string= (buffer-substring-no-properties beg (+ beg 4)) "<%;=") - (web-mode-remove-text-at-pos 1 (+ beg 2))) - ((string-match-p "<[%[:alpha:]]" (buffer-substring-no-properties (+ beg 2) (- end 2))) - (web-mode-remove-text-at-pos 2 (1- end)) - (web-mode-remove-text-at-pos 3 beg)) - (t - (web-mode-remove-text-at-pos 1 (+ beg 2))) - ) ;cond - ) - ) - -(defun web-mode-uncomment-ejs-block (pos) - (let (beg) - (setq beg (web-mode-block-beginning-position pos)) - (web-mode-remove-text-at-pos 1 (+ beg 2)))) - -(defun web-mode-uncomment-django-block (pos) - (let (beg end) - (setq beg (web-mode-block-beginning-position pos) - end (web-mode-block-end-position pos)) - (cond - ((web-mode-looking-at-p "{#[{%]" beg) - (web-mode-remove-text-at-pos 1 (1- end)) - (web-mode-remove-text-at-pos 1 (1+ beg)) - ) - (t - (web-mode-remove-text-at-pos 2 (1- end)) - (web-mode-remove-text-at-pos 2 beg)) - ) ;cond - )) - -(defun web-mode-uncomment-ctemplate-block (pos) - (let (beg end) - (setq beg (web-mode-block-beginning-position pos) - end (web-mode-block-end-position pos)) - (web-mode-remove-text-at-pos 5 (- end 4)) - (web-mode-remove-text-at-pos 5 beg))) - -(defun web-mode-uncomment-antlers-block (pos) - (let (beg end) - (setq beg (web-mode-block-beginning-position pos) - end (web-mode-block-end-position pos)) - (web-mode-remove-text-at-pos 3 (- end 2)) - (web-mode-remove-text-at-pos 3 beg))) - -(defun web-mode-uncomment-dust-block (pos) - (let (beg end) - (setq beg (web-mode-block-beginning-position pos) - end (web-mode-block-end-position pos)) - (web-mode-remove-text-at-pos 1 (1- end)) - (web-mode-remove-text-at-pos 1 (1+ beg)))) - -(defun web-mode-uncomment-aspx-block (pos) - (let (beg end) - (setq beg (web-mode-block-beginning-position pos) - end (web-mode-block-end-position pos)) - (web-mode-remove-text-at-pos 1 (1- end)) - (web-mode-remove-text-at-pos 1 (1+ beg)))) - -(defun web-mode-uncomment-jsp-block (pos) - (let (beg) - (setq beg (web-mode-block-beginning-position pos)) - (web-mode-remove-text-at-pos 2 (+ beg 2)))) - -(defun web-mode-uncomment-go-block (pos) - (let (beg end) - (setq beg (web-mode-block-beginning-position pos) - end (web-mode-block-end-position pos)) - (web-mode-remove-text-at-pos 2 (+ beg 2)) - (web-mode-remove-text-at-pos 2 (- end 5)))) - -(defun web-mode-uncomment-svelte-block (pos) - (let (beg end) - (setq beg (web-mode-block-beginning-position pos) - end (web-mode-block-end-position pos)) - (web-mode-remove-text-at-pos 1 (1- end)) - (web-mode-remove-text-at-pos 1 (1+ beg)))) - -(defun web-mode-snippet-names () - (mapcar #'car web-mode-snippets)) - -(defun web-mode-snippet-insert (code) - "Insert a snippet." - (interactive - (list (completing-read "Snippet: " (web-mode-snippet-names)))) - (let (beg - (continue t) - (counter 0) - end - sel - snippet - (l (length web-mode-snippets)) - pos) - (when mark-active - (setq sel (web-mode-trim (buffer-substring-no-properties - (region-beginning) (region-end)))) - (delete-region (region-beginning) (region-end))) - (while (and continue (< counter l)) - (setq snippet (nth counter web-mode-snippets)) - (when (string= (car snippet) code) - (setq continue nil)) - (setq counter (1+ counter))) - (when snippet - (setq snippet (cdr snippet)) - (setq beg (line-beginning-position)) - (insert snippet) - (setq pos (point) - end (point)) - (cond - ((string-match-p "¦" snippet) - (search-backward "¦") - (delete-char 1) - (setq pos (point) - end (1- end))) - ((string-match-p "|" snippet) - (search-backward "|") - (delete-char 1) - (setq pos (point) - end (1- end))) - ) ;cond - (when sel - (insert sel) - (setq pos (point) - end (+ end (length sel)))) - (goto-char end) - (setq end (line-end-position)) - (unless sel (goto-char pos)) - (indent-region beg end)) - )) - -(defun web-mode-looking-at (regexp pos) - (save-excursion - (goto-char pos) - (looking-at regexp))) - -(defun web-mode-looking-at-p (regexp pos) - (save-excursion - (goto-char pos) - (looking-at-p regexp))) - -(defun web-mode-looking-back (regexp pos &optional limit greedy) - (save-excursion - (goto-char pos) - (if limit - (looking-back regexp limit greedy) - (looking-back regexp (point-min))))) - -(defun web-mode-insert-text-at-pos (text pos) - (let ((mem web-mode-enable-auto-pairing)) - (setq web-mode-enable-auto-pairing nil) - (save-excursion - (goto-char pos) - (insert text) - (setq web-mode-enable-auto-pairing mem) - ))) - -(defun web-mode-remove-text-at-pos (n &optional pos) - (unless pos (setq pos (point))) - (delete-region pos (+ pos n))) - -(defun web-mode-insert-and-indent (text) - (let (beg end) - (setq beg (line-beginning-position)) - (insert text) - (setq end (line-end-position)) - (indent-region beg end) - )) - -(defun web-mode-column-at-pos (pos) - (save-excursion - (goto-char pos) - (current-column))) - -(defun web-mode-indentation-at-pos (pos) - (save-excursion - (goto-char pos) - (current-indentation))) - -(defun web-mode-navigate (&optional pos) - "Move point to the matching opening/closing tag/block." - (interactive) - (unless pos (setq pos (point))) - (let (init) - (goto-char pos) - (setq init (point)) - (when (> (current-indentation) (current-column)) - (back-to-indentation)) - (setq pos (point)) - (cond - ((and (get-text-property pos 'block-side) - (web-mode-block-beginning) - (web-mode-block-controls-get (point))) - (web-mode-block-match)) - ((member (get-text-property pos 'tag-type) '(start end)) - (web-mode-tag-beginning) - (web-mode-tag-match)) - (t - (goto-char init)) - ) - )) - -(defun web-mode-block-match (&optional pos) - (unless pos (setq pos (point))) - (let (pos-ori controls control (counter 1) type (continue t) pair) - (setq pos-ori pos) - (goto-char pos) - (setq controls (web-mode-block-controls-get pos)) - ;;(message "controls=%S" controls) - (cond - (controls - (setq pair (car controls)) - (setq control (cdr pair)) - (setq type (car pair)) - (when (eq type 'inside) (setq type 'close)) - (while continue - (cond - ((and (> pos-ori 1) (bobp)) - (setq continue nil)) - ((or (and (eq type 'open) (not (web-mode-block-next))) - (and (eq type 'close) (not (web-mode-block-previous)))) - (setq continue nil) - ) - ((null (setq controls (web-mode-block-controls-get (point)))) - ) - (t - ;;TODO : est il nécessaire de faire un reverse sur controls si on doit matcher backward - (dolist (pair controls) - (cond - ((not (string= (cdr pair) control)) - ) - ((eq (car pair) 'inside) - ) - ((eq (car pair) type) - (setq counter (1+ counter))) - (t - (setq counter (1- counter))) - ) - ) ;dolist - (when (= counter 0) - (setq continue nil)) - ) ;t - ) ;cond - ) ;while - (if (= counter 0) (point) nil) - ) ;controls - (t - (goto-char pos-ori) - nil - ) ;controls = nul - ) ;conf - )) - -(defun web-mode-tag-match (&optional pos) - "Move point to the matching opening/closing tag." - (interactive) - (unless pos (setq pos (point))) - (let (regexp name) - (cond - ((eq (get-text-property pos 'tag-type) 'void) - (web-mode-tag-beginning)) - ((and (eq (get-text-property pos 'tag-type) 'comment) - (web-mode-looking-at-p " %S %S" pos (get-text-property pos 'jsx-depth)) - ) - ((and blockside - (member (get-text-property pos 'block-token) '(string comment)) - (eq (get-text-property pos 'block-token) (get-text-property (1- pos) 'block-token))) - (setq pos (web-mode-block-token-beginning-position pos))) - ((and (not blockside) - (member (get-text-property pos 'part-token) '(string comment)) - (eq (get-text-property pos 'part-token) (get-text-property (1- pos) 'part-token))) - (setq pos (web-mode-part-token-beginning-position pos))) - ((and (not blockside) - (get-text-property pos 'block-side)) - (when (setq pos (web-mode-block-beginning-position pos)) - (setq pos (1- pos)))) - ((member char '(?\) ?\] ?\})) - (setq pos (web-mode-part-opening-paren-position pos reg-beg)) - (setq pos (1- pos))) - ((and (eq char ?\=) - (web-mode-looking-back "[<>!=]+" pos reg-beg t)) - (setq pos (- pos 1 (length (match-string-no-properties 0))))) - ((member char '(?\( ?\{ ?\[ ?\= ?\< ?\>)) - (web-mode-looking-at ".[ \t\n]*" pos) - (setq continue nil - pos (+ pos (length (match-string-no-properties 0))))) - - ((web-mode-looking-at "\\(return\\)[ \n]" pos) - (setq continue nil - pos (+ pos (length (match-string-no-properties 0))))) - ((and (eq char ?\:) - (web-mode-looking-back "[{,][ \t\n]*[[:alnum:]_]+[ ]*" pos)) - (web-mode-looking-at ".[ \t\n]*" pos) - (setq continue nil - pos (+ pos (length (match-string-no-properties 0))))) - (t - (setq pos (web-mode-rsb-position pos regexp reg-beg)) - (when (not pos) - (cond - (is-jsx - (when (web-mode-looking-at "[ \n]*" reg-beg) - (setq pos (+ reg-beg (length (match-string-no-properties 0))))) - (setq continue nil)) - (t - (message "javascript-statement-beginning-position ** search failure **") - (setq continue nil - pos reg-beg)) - ) ;cond - ) - ) ;t - ) ;cond - ) ;while - ;;(message "%S -------" pos) - pos)) - -(defun web-mode-javascript-args-beginning-position (pos &optional reg-beg) - (unless pos (setq pos (point))) - (setq pos (1- pos)) - (let ((char nil) - (blockside (get-text-property pos 'block-side)) - (i 0) - (continue (not (null pos)))) - (unless reg-beg - (if blockside - (setq reg-beg (web-mode-block-beginning-position pos)) - (setq reg-beg (web-mode-part-beginning-position pos))) - ) - (while continue - (setq char (char-after pos)) - ;;(message "pos(%S) char(%c)" pos char) - (cond - ((> (setq i (1+ i)) 20000) - (message "javascript-args-beginning-position ** warning (%S) **" pos) - (setq continue nil - pos nil)) - ((null pos) - (message "javascript-args-beginning-position ** invalid pos **") - (setq continue nil)) - ((< pos reg-beg) - (message "javascript-args-beginning-position ** failure(position) **") - (setq continue nil - pos reg-beg)) - ((and blockside - (member (get-text-property pos 'block-token) '(string comment)) - (eq (get-text-property pos 'block-token) (get-text-property (1- pos) 'block-token))) - (setq pos (web-mode-block-token-beginning-position pos))) - ((and (not blockside) - (member (get-text-property pos 'part-token) '(string comment)) - (eq (get-text-property pos 'part-token) (get-text-property (1- pos) 'part-token))) - (setq pos (web-mode-part-token-beginning-position pos))) - ((and (not blockside) - (get-text-property pos 'block-side)) - (when (setq pos (web-mode-block-beginning-position pos)) - (setq pos (1- pos))) - ) - ((member char '(?\) ?\] ?\})) - (when (setq pos (web-mode-part-opening-paren-position pos reg-beg)) - (setq pos (1- pos)))) - ((member char '(?\( ?\[ ?\{)) - (web-mode-looking-at ".[ ]*" pos) - (setq pos (+ pos (length (match-string-no-properties 0))) - continue nil) - ) - ((web-mode-looking-at "\\(var\\|let\\|return\\|const\\)[ \n]" pos) - (setq pos (+ pos (length (match-string-no-properties 0))) - continue nil)) - (t - (setq pos (web-mode-rsb-position pos "[\]\[}{)(]\\|\\(var\\|let\\|return\\|const\\)" reg-beg)) - (when (not pos) - (message "javascript-args-beginning-position ** search failure **") - (setq continue nil - pos reg-beg))) - ) ;cond - ) ;while - ;;(message "=%S" pos) - pos)) - -(defun web-mode-javascript-calls-beginning-position (pos &optional reg-beg) - (unless pos (setq pos (point))) - ;;(message "pos=%S" pos) - (let ((char nil) - (dot-pos nil) - (blockside (get-text-property pos 'block-side)) - (i 0) - (continue (not (null pos)))) - (unless reg-beg - (setq reg-beg (if blockside - (web-mode-block-beginning-position pos) - (web-mode-part-beginning-position pos)))) - (while continue - (setq char (char-after pos)) - ;;(message "%S| %S=%c" reg-beg pos char) - (cond - ((> (setq i (1+ i)) 20000) - (message "javascript-calls-beginning-position ** warning (%S) **" pos) - (setq continue nil - pos nil)) - ((null pos) - (message "javascript-calls-beginning-position ** invalid pos **") - (setq continue nil)) - ((< pos reg-beg) - (setq continue nil - pos reg-beg)) - ((and blockside - (member (get-text-property pos 'block-token) '(string comment)) - (eq (get-text-property pos 'block-token) (get-text-property (1- pos) 'block-token))) - (setq pos (web-mode-block-token-beginning-position pos))) - ((and (not blockside) - (member (get-text-property pos 'part-token) '(string comment)) - (eq (get-text-property pos 'part-token) (get-text-property (1- pos) 'part-token))) - (setq pos (web-mode-part-token-beginning-position pos))) - ((and (not blockside) - (get-text-property pos 'block-side)) - (when (setq pos (web-mode-block-beginning-position pos)) - (setq pos (1- pos)))) - ((and (member char '(?\.)) (> i 1)) - (setq dot-pos pos - pos (1- pos))) - ((member char '(?\) ?\])) - (when (setq pos (web-mode-part-opening-paren-position pos reg-beg)) - (setq pos (1- pos))) - ) - ((member char '(?\( ?\{ ?\} ?\[ ?\= ?\? ?\: ?\; ?\, ?\& ?\| ?\>)) - (web-mode-looking-at ".[ \t\n]*" pos) - (setq pos (+ pos (length (match-string-no-properties 0))) - continue nil)) - ((web-mode-looking-at "\\(return\\|else\\|const\\)[ \n]" pos) - (setq pos (+ pos (length (match-string-no-properties 0))) - continue nil)) - (t - (setq pos (web-mode-rsb-position pos "[\]\[}{)(=?:;,&|>.]\\|\\(return\\|else\\|const\\)" reg-beg)) - (when (not pos) - (message "javascript-calls-beginning-position ** search failure **") - (setq pos reg-beg - continue nil)) - ) ;t - ) ;cond - ) ;while - ;;(message "pos=%S dot-pos=%S" pos dot-pos) - (if (null pos) pos (cons pos dot-pos)) - )) - -(defun web-mode-part-token-beginning-position (&optional pos) - (unless pos (setq pos (point))) - (cond - ((not (get-text-property pos 'part-token)) - nil) - ((or (= pos (point-min)) - (and (> pos (point-min)) - (not (get-text-property (1- pos) 'part-token)))) - pos) - (t - (setq pos (previous-single-property-change pos 'part-token)) - (if (and pos (> pos (point-min))) pos (point-min))) - )) - -(defun web-mode-part-token-end-position (&optional pos) - (unless pos (setq pos (point))) - (cond - ((not (get-text-property pos 'part-token)) - nil) - ((or (= pos (point-max)) - (not (get-text-property (1+ pos) 'part-token))) - pos) - (t - (1- (next-single-property-change pos 'part-token))) - )) - -(defun web-mode-block-token-beginning-position (&optional pos) - (unless pos (setq pos (point))) - (cond - ((not (get-text-property pos 'block-token)) - nil) - ((or (= pos (point-min)) - (and (> pos (point-min)) - (not (get-text-property (1- pos) 'block-token)))) - pos) - (t - (setq pos (previous-single-property-change pos 'block-token)) - (if (and pos (> pos (point-min))) pos (point-min))) - )) - -(defun web-mode-block-token-end-position (&optional pos) - (unless pos (setq pos (point))) - (cond - ((not (get-text-property pos 'block-token)) - nil) - ((or (= pos (point-max)) - (not (get-text-property (1+ pos) 'block-token))) - pos) - (t - (1- (next-single-property-change pos 'block-token))) - )) - -(defun web-mode-block-code-end-position (&optional pos) - (unless pos (setq pos (point))) - (setq pos (web-mode-block-end-position pos)) - (cond - ((not pos) - nil) - ((and (eq (get-text-property pos 'block-token) 'delimiter-end) - (eq (get-text-property (1- pos) 'block-token) 'delimiter-end)) - (previous-single-property-change pos 'block-token)) - ((= pos (1- (point-max))) ;; TODO: comparer plutot avec line-end-position - (point-max)) - (t - pos) - )) - -(defun web-mode-block-end-position (&optional pos) - (unless pos (setq pos (point))) - (cond - ((get-text-property pos 'block-end) - pos) - ((get-text-property pos 'block-side) - (or (next-single-property-change pos 'block-end) - (point-max))) - (t - nil) - )) - -(defun web-mode-block-previous-position (&optional pos) - (unless pos (setq pos (point))) - (cond - ((= pos (point-min)) - (setq pos nil)) - ((get-text-property pos 'block-side) - (setq pos (web-mode-block-beginning-position pos)) - (cond - ((or (null pos) (= pos (point-min))) - (setq pos nil) - ) - ((and (setq pos (previous-single-property-change pos 'block-beg)) - (> pos (point-min))) - (setq pos (1- pos)) - ) - ) - ) ;block-side - ((get-text-property (1- pos) 'block-side) - (setq pos (web-mode-block-beginning-position (1- pos))) - ) - (t - (setq pos (previous-single-property-change pos 'block-side)) - (cond - ((and (null pos) (get-text-property (point-min) 'block-beg)) - (setq pos (point-min))) - ((and pos (> pos (point-min))) - (setq pos (web-mode-block-beginning-position (1- pos)))) - ) - ) - ) ;conf - pos) - -(defun web-mode-block-next-position (&optional pos limit) - (unless pos (setq pos (point))) - (unless limit (setq limit (point-max))) - (cond - ((and (get-text-property pos 'block-side) - (setq pos (web-mode-block-end-position pos)) - (< pos (point-max)) - (setq pos (1+ pos))) - (unless (get-text-property pos 'block-beg) - (setq pos (next-single-property-change pos 'block-side))) - ) - (t - (setq pos (next-single-property-change pos 'block-side))) - ) ;cond - (if (and pos (<= pos limit)) pos nil)) - -(defun web-mode-is-css-string (pos) - (let (beg) - (cond - ((and (setq beg (web-mode-part-token-beginning-position pos)) - (web-mode-looking-at-p "`" beg) - (web-mode-looking-back "\\(styled[[:alnum:].]+\\|css\\)" beg)) - beg) - (t - nil) - ) ;cond - )) - -;; Relay.QL , gql, graphql -(defun web-mode-is-ql-string (pos prefix-regexp) - (let (beg) - (cond - ((and (setq beg (web-mode-part-token-beginning-position pos)) - (web-mode-looking-back prefix-regexp beg)) - beg) - (t - nil) - ) ;cond - )) - -(defun web-mode-is-html-string (pos) - (let (beg) - (cond - ((and (setq beg (web-mode-part-token-beginning-position pos)) - (web-mode-looking-at-p "`[ \t\n]*<[a-zA-Z]" beg) - (web-mode-looking-back "\\(template\\|html\\)\\([ ]*[=:][ ]*\\)?" beg)) - beg) - (t - nil) - ) ;cond - )) - -;;---- EXCURSION --------------------------------------------------------------- - -(defun web-mode-backward-sexp (n) - (interactive "p") - (if (< n 0) (web-mode-forward-sexp (- n)) - (let (pos) - (dotimes (_ n) - (skip-chars-backward "[:space:]") - (setq pos (point)) - (cond - ((bobp) nil) - ((get-text-property (1- pos) 'block-end) - (backward-char 1) - (web-mode-block-beginning)) - ((get-text-property (1- pos) 'block-token) - (backward-char 1) - (web-mode-block-token-beginning)) - ((get-text-property (1- pos) 'part-token) - (backward-char 1) - (web-mode-part-token-beginning)) - ((get-text-property (1- pos) 'tag-end) - (backward-char 1) - (web-mode-element-beginning)) - ((get-text-property (1- pos) 'tag-attr) - (backward-char 1) - (web-mode-attribute-beginning)) - ((get-text-property (1- pos) 'tag-type) - (backward-char 1) - (web-mode-tag-beginning)) - ((get-text-property (1- pos) 'jsx-end) - (backward-char 1) - (web-mode-jsx-beginning)) - (t - (let ((forward-sexp-function nil)) - (backward-sexp)) - ) ;case t - ) ;cond - ) ;dotimes - ))) ;let if defun - -(defun web-mode-forward-sexp (n) - (interactive "p") - (if (< n 0) (web-mode-backward-sexp (- n)) - (let (pos) - (dotimes (_ n) - (skip-chars-forward "[:space:]") - (setq pos (point)) - (cond - ((eobp) nil) - ((get-text-property pos 'block-beg) - (web-mode-block-end)) - ((get-text-property pos 'block-token) - (web-mode-block-token-end)) - ((get-text-property pos 'part-token) - (web-mode-part-token-end)) - ((get-text-property pos 'tag-beg) - (web-mode-element-end)) - ((get-text-property pos 'tag-attr) - (web-mode-attribute-end)) - ((get-text-property pos 'tag-type) - (web-mode-tag-end)) - ((get-text-property pos 'jsx-beg) - (web-mode-jsx-end)) - (t - (let ((forward-sexp-function nil)) - (forward-sexp)) - ) ;case t - ) ;cond - ) ;dotimes - ))) ;let if defun - -(defun web-mode-comment-beginning () - "Fetch current comment beg." - (interactive) - (web-mode-go (web-mode-comment-beginning-position (point)))) - -(defun web-mode-comment-end () - "Fetch current comment end." - (interactive) - (web-mode-go (web-mode-comment-end-position (point)) 1)) - -(defun web-mode-tag-beginning () - "Fetch current html tag beg." - (interactive) - (web-mode-go (web-mode-tag-beginning-position (point)))) - -(defun web-mode-tag-end () - "Fetch current html tag end." - (interactive) - (web-mode-go (web-mode-tag-end-position (point)) 1)) - -(defun web-mode-tag-previous () - "Fetch previous tag." - (interactive) - (web-mode-go (web-mode-tag-previous-position (point)))) - -(defun web-mode-tag-next () - "Fetch next tag. Might be html comment or server tag (e.g. jsp)." - (interactive) - (web-mode-go (web-mode-tag-next-position (point)))) - -(defun web-mode-attribute-beginning () - "Fetch html attribute beginning." - (interactive) - (web-mode-go (web-mode-attribute-beginning-position (point)))) - -(defun web-mode-attribute-end () - "Fetch html attribute end." - (interactive) - (web-mode-go (web-mode-attribute-end-position (point)) 1)) - -(defun web-mode-attribute-next (&optional arg) - "Fetch next attribute." - (interactive "p") - (unless arg (setq arg 1)) - (cond - ((= arg 1) (web-mode-go (web-mode-attribute-next-position (point)))) - ((< arg 1) (web-mode-element-previous (* arg -1))) - (t - (while (>= arg 1) - (setq arg (1- arg)) - (web-mode-go (web-mode-attribute-next-position (point))) - ) - ) - ) - ) - -(defun web-mode-attribute-previous (&optional arg) - "Fetch previous attribute." - (interactive "p") - (unless arg (setq arg 1)) - (unless arg (setq arg 1)) - (cond - ((= arg 1) (web-mode-go (web-mode-attribute-previous-position (point)))) - ((< arg 1) (web-mode-element-next (* arg -1))) - (t - (while (>= arg 1) - (setq arg (1- arg)) - (web-mode-go (web-mode-attribute-previous-position (point))) - ) - ) - ) - ) - -(defun web-mode-element-previous (&optional arg) - "Fetch previous element." - (interactive "p") - (unless arg (setq arg 1)) - (cond - ((= arg 1) (web-mode-go (web-mode-element-previous-position (point)))) - ((< arg 1) (web-mode-element-next (* arg -1))) - (t - (while (>= arg 1) - (setq arg (1- arg)) - (web-mode-go (web-mode-element-previous-position (point))) - ) ;while - ) ;t - ) ;cond - ) - -(defun web-mode-element-next (&optional arg) - "Fetch next element." - (interactive "p") - (unless arg (setq arg 1)) - (cond - ((= arg 1) (web-mode-go (web-mode-element-next-position (point)))) - ((< arg 1) (web-mode-element-previous (* arg -1))) - (t - (while (>= arg 1) - (setq arg (1- arg)) - (web-mode-go (web-mode-element-next-position (point))) - ) ;while - ) ;t - ) ;cond - ) - -(defun web-mode-element-sibling-next () - "Fetch next sibling element." - (interactive) - (let ((pos (point))) - (save-excursion - (cond - ((not (get-text-property pos 'tag-type)) - (if (and (web-mode-element-parent) - (web-mode-tag-match) - (web-mode-tag-next) - (member (get-text-property (point) 'tag-type) '(start void comment))) - (setq pos (point)) - (setq pos nil)) - ) - ((member (get-text-property pos 'tag-type) '(start void)) - (if (and (web-mode-tag-match) - (web-mode-tag-next) - (member (get-text-property (point) 'tag-type) '(start void comment))) - (setq pos (point)) - (setq pos nil)) - ) - ((and (web-mode-tag-next) - (member (get-text-property (point) 'tag-type) '(start void comment))) - (setq pos (point))) - (t - (setq pos nil)) - ) ;cond - ) ;save-excursion - (web-mode-go pos))) - -(defun web-mode-element-sibling-previous () - "Fetch previous sibling element." - (interactive) - (let ((pos (point))) - (save-excursion - (cond - ((not (get-text-property pos 'tag-type)) - (if (and (web-mode-element-parent) - (web-mode-tag-previous) - (web-mode-element-beginning)) - (setq pos (point)) - (setq pos nil)) - ) - ((eq (get-text-property pos 'tag-type) 'start) - (if (and (web-mode-tag-beginning) - (web-mode-tag-previous) - (web-mode-element-beginning)) - (setq pos (point)) - (setq pos nil)) - ) - ((and (web-mode-element-beginning) - (web-mode-tag-previous) - (web-mode-element-beginning)) - (setq pos (point))) - (t - (setq pos nil)) - ) ;cond - ) ;save-excursion - (web-mode-go pos))) - -(defun web-mode-element-beginning () - "Move to beginning of element." - (interactive) - (web-mode-go (web-mode-element-beginning-position (point)))) - -(defun web-mode-element-end () - "Move to end of element." - (interactive) - (web-mode-go (web-mode-element-end-position (point)) 1)) - -(defun web-mode-element-parent () - "Fetch parent element." - (interactive) - (web-mode-go (web-mode-element-parent-position (point)))) - -(defun web-mode-element-child () - "Fetch child element." - (interactive) - (web-mode-go (web-mode-element-child-position (point)))) - -(defun web-mode-dom-traverse () - "Traverse html dom tree." - (interactive) - (cond - ((web-mode-element-child) - ) - ((web-mode-element-sibling-next) - ) - ((and (web-mode-element-parent) - (not (web-mode-element-sibling-next))) - (goto-char (point-min))) - (t - (goto-char (point-min))) - ) ;cond - ) - -(defun web-mode-closing-paren (limit) - (let ((pos (web-mode-closing-paren-position (point) limit))) - (if (or (null pos) (> pos limit)) - nil - (goto-char pos) - pos) - )) - -(defun web-mode-part-next () - "Move point to the beginning of the next part." - (interactive) - (web-mode-go (web-mode-part-next-position (point)))) - -(defun web-mode-part-beginning () - "Move point to the beginning of the current part." - (interactive) - (web-mode-go (web-mode-part-beginning-position (point)))) - -(defun web-mode-part-end () - "Move point to the end of the current part." - (interactive) - (web-mode-go (web-mode-part-end-position (point)) 1)) - -(defun web-mode-block-previous () - "Move point to the beginning of the previous block." - (interactive) - (web-mode-go (web-mode-block-previous-position (point)))) - -(defun web-mode-block-next () - "Move point to the beginning of the next block." - (interactive) - (web-mode-go (web-mode-block-next-position (point)))) - -(defun web-mode-block-beginning () - "Move point to the beginning of the current block." - (interactive) - (web-mode-go (web-mode-block-beginning-position (point)))) - -(defun web-mode-block-end () - "Move point to the end of the current block." - (interactive) - (web-mode-go (web-mode-block-end-position (point)) 1)) - -(defun web-mode-block-token-beginning () - (web-mode-go (web-mode-block-token-beginning-position (point)))) - -(defun web-mode-block-token-end () - (web-mode-go (web-mode-block-token-end-position (point)) 1)) - -(defun web-mode-part-token-beginning () - (web-mode-go (web-mode-part-token-beginning-position (point)))) - -(defun web-mode-part-token-end () - (web-mode-go (web-mode-part-token-end-position (point)) 1)) - -(defun web-mode-block-opening-paren (limit) - (web-mode-go (web-mode-block-opening-paren-position (point) limit))) - -(defun web-mode-block-string-beginning (&optional pos block-beg) - (unless pos (setq pos (point))) - (unless block-beg (setq block-beg (web-mode-block-beginning-position pos))) - (web-mode-go (web-mode-block-string-beginning-position pos block-beg))) - -(defun web-mode-block-statement-beginning (pos block-beg is-ternary) - (unless pos (setq pos (point))) - (unless block-beg (setq block-beg (web-mode-block-beginning-position pos))) - (web-mode-go (web-mode-block-statement-beginning-position pos block-beg is-ternary))) - -(defun web-mode-block-args-beginning (&optional pos block-beg) - (unless pos (setq pos (point))) - (unless block-beg (setq block-beg (web-mode-block-beginning-position pos))) - (web-mode-go (web-mode-block-args-beginning-position pos block-beg))) - -(defun web-mode-block-calls-beginning (&optional pos block-beg) - (unless pos (setq pos (point))) - (unless block-beg (setq block-beg (web-mode-block-beginning-position pos))) - (web-mode-go (web-mode-block-calls-beginning-position pos block-beg))) - -(defun web-mode-javascript-string-beginning (&optional pos reg-beg) - (unless pos (setq pos (point))) - (unless reg-beg - (if (get-text-property pos 'block-side) - (setq reg-beg (web-mode-block-beginning-position pos)) - (setq reg-beg (web-mode-part-beginning-position pos)))) - (web-mode-go (web-mode-javascript-string-beginning-position pos reg-beg))) - -(defun web-mode-javascript-statement-beginning (pos reg-beg is-ternary) - (unless pos (setq pos (point))) - (unless reg-beg - (if (get-text-property pos 'block-side) - (setq reg-beg (web-mode-block-beginning-position pos)) - (setq reg-beg (web-mode-part-beginning-position pos)))) - (web-mode-go (web-mode-javascript-statement-beginning-position pos reg-beg is-ternary))) - -(defun web-mode-javascript-args-beginning (&optional pos reg-beg) - (unless pos (setq pos (point))) - (unless reg-beg - (setq reg-beg (if (get-text-property pos 'block-side) - (web-mode-block-beginning-position pos) - (web-mode-part-beginning-position pos)))) - ;;(message "reg-beg%S" reg-beg) - (web-mode-go (web-mode-javascript-args-beginning-position pos reg-beg))) - -(defun web-mode-javascript-calls-beginning (&optional pos reg-beg) - (unless pos (setq pos (point))) - (unless reg-beg - (if (get-text-property pos 'block-side) - (setq reg-beg (web-mode-block-beginning-position pos)) - (setq reg-beg (web-mode-part-beginning-position pos)))) - (let (pair) - (setq pair (web-mode-javascript-calls-beginning-position pos reg-beg)) - (when pair (web-mode-go (car pair))) - )) - -(defun web-mode-go (pos &optional offset) - (unless offset (setq offset 0)) - (when pos - (cond - ((and (> offset 0) (<= (+ pos offset) (point-max))) - (setq pos (+ pos offset))) - ((and (< offset 0) (>= (+ pos offset) (point-min))) - (setq pos (+ pos offset))) - ) ;cond - (goto-char pos)) - pos) - -;;---- SEARCH ------------------------------------------------------------------ - -(defun web-mode-rsf-balanced (regexp-open regexp-close &optional limit noerror) - (unless noerror (setq noerror t)) - (let ((continue t) - (level 1) - (pos (point)) - ret - (regexp (concat regexp-open "\\|" regexp-close))) - (while continue - (setq ret (re-search-forward regexp limit noerror)) - (cond - ((null ret) - (setq continue nil) - ) - (t - (if (string-match-p regexp-open (match-string-no-properties 0)) - (setq level (1+ level)) - (setq level (1- level))) - (when (< level 1) - (setq continue nil) - ) - ) ;t - ) ;cond - ) ;while - (when (not (= level 0)) (goto-char pos)) - ret)) - -(defun web-mode-block-sb (expr &optional limit noerror) - (unless limit (setq limit (web-mode-block-beginning-position (point)))) - (unless noerror (setq noerror t)) - (let ((continue t) ret) - (while continue - (setq ret (search-backward expr limit noerror)) - (when (or (null ret) - (not (get-text-property (point) 'block-token))) - (setq continue nil) - ) ;when - ) ;while - ret)) - -(defun web-mode-block-sf (expr &optional limit noerror) - (unless limit (setq limit (web-mode-block-end-position (point)))) - (unless noerror (setq noerror t)) - (let ((continue t) ret) - (while continue - (setq ret (search-forward expr limit noerror)) - (when (or (null ret) - (not (get-text-property (point) 'block-token))) - (setq continue nil) - ) ;when - ) ;while - ret)) - -(defun web-mode-block-rsb (regexp &optional limit noerror) - (unless limit (setq limit (web-mode-block-beginning-position (point)))) - (unless noerror (setq noerror t)) - (let ((continue t) ret) - (while continue - (setq ret (re-search-backward regexp limit noerror)) - (when (or (null ret) - (not (get-text-property (point) 'block-token))) - (setq continue nil) - ) ;when - ) ;while - ret)) - -(defun web-mode-block-rsf (regexp &optional limit noerror) - (unless limit (setq limit (web-mode-block-end-position (point)))) - (unless noerror (setq noerror t)) - (let ((continue t) ret) - (while continue - (setq ret (re-search-forward regexp limit noerror)) - (when (or (null ret) - (not (get-text-property (point) 'block-token))) - (setq continue nil) - ) ;when - ) ;while - ret)) - -(defun web-mode-part-sb (expr &optional limit noerror) - (unless limit (setq limit (web-mode-part-beginning-position (point)))) - (unless noerror (setq noerror t)) - (let ((continue t) ret) - (while continue - (setq ret (search-backward expr limit noerror)) - (when (or (null ret) - (and (not (get-text-property (point) 'part-token)) - (not (get-text-property (point) 'block-side))) - ) - (setq continue nil) - ) ;when - ) ;while - ret)) - -(defun web-mode-part-sf (expr &optional limit noerror) - (unless limit (setq limit (web-mode-part-end-position (point)))) - (unless noerror (setq noerror t)) - (let ((continue t) ret) - (while continue - (setq ret (search-forward expr limit noerror)) - (when (or (null ret) - (and (not (get-text-property (point) 'part-token)) - (not (get-text-property (point) 'block-side))) - ) - (setq continue nil) - ) ;when - ) ;while - ret)) - -(defun web-mode-part-rsb (regexp &optional limit noerror) - (unless limit (setq limit (web-mode-part-beginning-position (point)))) - (unless noerror (setq noerror t)) - (let ((continue t) ret) - (while continue - (setq ret (re-search-backward regexp limit noerror)) - (when (or (null ret) - (and (not (get-text-property (point) 'part-token)) - (not (get-text-property (point) 'block-side))) - ) - (setq continue nil) - ) ;when - ) ;while - ret)) - -(defun web-mode-part-rsf (regexp &optional limit noerror) - (unless limit (setq limit (web-mode-part-end-position (point)))) - (unless noerror (setq noerror t)) - (let ((continue t) ret) - (while continue - (setq ret (re-search-forward regexp limit t)) - (when (or (null ret) - (and (not (get-text-property (point) 'part-token)) - (not (get-text-property (point) 'block-side))) - ) - (setq continue nil) - ) ;when - ) ;while - ret)) - -(defun web-mode-javascript-rsb (regexp &optional limit noerror) - (unless limit (setq limit (web-mode-part-beginning-position (point)))) - (unless noerror (setq noerror t)) - (let ((continue t) ret) - (while continue - (setq ret (re-search-backward regexp limit noerror)) - (when (or (null ret) - (and (not (get-text-property (point) 'part-token)) - (not (get-text-property (point) 'block-side)) - (not (get-text-property (point) 'jsx-depth))) - ) - (setq continue nil) - ) ;when - ) ;while - ret)) - -(defun web-mode-javascript-rsf (regexp &optional limit noerror) - (unless limit (setq limit (web-mode-part-end-position (point)))) - (unless noerror (setq noerror t)) - (let ((continue t) ret) - (while continue - (setq ret (re-search-forward regexp limit t)) - (when (or (null ret) - (and (not (get-text-property (point) 'part-token)) - (not (get-text-property (point) 'block-side)) - (not (get-text-property (point) 'jsx-depth))) - ) - (setq continue nil) - ) ;when - ) ;while - ret)) - -(defun web-mode-dom-sf (expr &optional limit noerror) - (unless noerror (setq noerror t)) - (let ((continue t) ret) - (while continue - (setq ret (search-forward expr limit noerror)) - (if (or (null ret) - (not (get-text-property (- (point) (length expr)) 'block-side))) - (setq continue nil)) - ) - ret)) - -(defun web-mode-dom-rsf (regexp &optional limit noerror) - (unless noerror (setq noerror t)) - (let ((continue t) (ret nil)) - (while continue - (setq ret (re-search-forward regexp limit noerror)) - ;; (message "ret=%S point=%S limit=%S i=%S" ret (point) limit 0) - (cond - ((null ret) - (setq continue nil)) - ((or (get-text-property (match-beginning 0) 'block-side) - (get-text-property (match-beginning 0) 'part-token)) - ) - (t - (setq continue nil)) - ) ;cond - ) ;while - ret)) - -(defun web-mode-rsb-position (pos regexp &optional limit noerror) - (unless noerror (setq noerror t)) - (save-excursion - (goto-char pos) - (if (re-search-backward regexp limit noerror) (point) nil) - )) - -(defun web-mode-rsb (regexp &optional limit noerror) - (unless noerror (setq noerror t)) - (let ((continue t) ret) - (while continue - (setq ret (re-search-backward regexp limit noerror)) - (if (or (null ret) - (not (web-mode-is-comment-or-string))) - (setq continue nil))) - ret)) - -(defun web-mode-rsf (regexp &optional limit noerror) - (unless noerror (setq noerror t)) - (let ((continue t) ret) - (while continue - (setq ret (re-search-forward regexp limit noerror)) - (if (or (null ret) - (not (web-mode-is-comment-or-string))) - (setq continue nil)) - ) - ret)) - -(defun web-mode-sb (expr &optional limit noerror) - (unless noerror (setq noerror t)) - (let ((continue t) ret) - (while continue - (setq ret (search-backward expr limit noerror)) - (if (or (null ret) - (not (web-mode-is-comment-or-string))) - (setq continue nil))) - ret)) - -(defun web-mode-sf (expr &optional limit noerror) - (unless noerror (setq noerror t)) - (let ((continue t) ret) - (while continue - (setq ret (search-forward expr limit noerror)) - (if (or (null ret) - (not (web-mode-is-comment-or-string))) - (setq continue nil))) - ret)) - -(defun web-mode-content-rsf (regexp &optional limit noerror) - (unless noerror (setq noerror t)) - (let ((continue t) ret beg end) - (while continue - (setq ret (re-search-forward regexp limit noerror) - beg (if (null ret) (point) (match-beginning 0)) - end (if (null ret) (point) (1- (match-end 0)))) - (if (or (null ret) - (and (web-mode-is-content beg) - (web-mode-is-content end))) - (setq continue nil))) - ret)) - -;;---- ADVICES ----------------------------------------------------------------- - -(defadvice ac-start (before web-mode-set-up-ac-sources activate) - "Set `ac-sources' based on current language before running auto-complete." - (when (equal major-mode 'web-mode) - ;; set ignore each time to nil. User has to implement a hook to change it - ;; for each completion - (setq web-mode-ignore-ac-start-advice nil) - (run-hooks 'web-mode-before-auto-complete-hooks) - (unless web-mode-ignore-ac-start-advice - (when web-mode-ac-sources-alist - (let ((new-web-mode-ac-sources - (assoc (web-mode-language-at-pos) - web-mode-ac-sources-alist))) - (setq ac-sources (cdr new-web-mode-ac-sources))))))) - -;;---- MINOR MODE ADDONS ------------------------------------------------------- - -(defun web-mode-yasnippet-exit-hook () - "Yasnippet exit hook" - (when (and (boundp 'yas-snippet-beg) (boundp 'yas-snippet-end)) - (indent-region yas-snippet-beg yas-snippet-end))) - -(defun web-mode-imenu-index () - "Returns imenu items." - (interactive) - (let (toc-index - line) - (save-excursion - (goto-char (point-min)) - (while (not (eobp)) - (setq line (buffer-substring-no-properties - (line-beginning-position) - (line-end-position))) - (let (found - (i 0) - item - regexp - type - type-idx - content - content-idx - content-regexp - close-tag-regexp - concat-str - jumpto - str) - (while (and (not found ) (< i (length web-mode-imenu-regexp-list))) - (setq item (nth i web-mode-imenu-regexp-list)) - (setq regexp (nth 0 item)) - (setq type-idx (nth 1 item)) - (setq content-idx (nth 2 item)) - (setq concat-str (nth 3 item)) - (when (not (numberp content-idx)) - (setq content-regexp (nth 2 item) - close-tag-regexp (nth 4 item) - content-idx nil)) - - (when (string-match regexp line) - - (cond - (content-idx - (setq type (match-string type-idx line)) - (setq content (match-string content-idx line)) - (setq str (concat type concat-str content)) - (setq jumpto (line-beginning-position))) - (t - (let (limit) - (setq type (match-string type-idx line)) - (goto-char (line-beginning-position)) - (save-excursion - (setq limit (re-search-forward close-tag-regexp (point-max) t))) - - (when limit - (when (re-search-forward content-regexp limit t) - (setq content (match-string 1)) - (setq str (concat type concat-str content)) - (setq jumpto (line-beginning-position)) - ) - ))) - ) - (when str (setq toc-index - (cons (cons str jumpto) - toc-index) - ) - (setq found t)) - ) - (setq i (1+ i)))) - (forward-line) - (goto-char (line-end-position)) ;; make sure we are at eobp - )) - (nreverse toc-index))) - -;;---- UNIT TESTING ------------------------------------------------------------ - -(defun web-mode-test () - "Executes web-mode unit tests. See `web-mode-tests-directory'." - (interactive) - (let (files regexp) - (setq regexp "^[[:alnum:]][[:alnum:]._]+\\'") - (setq files (directory-files web-mode-tests-directory t regexp)) - (dolist (file files) - (cond - ((eq (string-to-char (file-name-nondirectory file)) ?\_) - (delete-file file)) - (t - (web-mode-test-process file)) - ) ;cond - ) ;dolist - )) - -(defun web-mode-test-process (file) - (with-temp-buffer - (let (out sig1 sig2 success err) - (setq-default indent-tabs-mode nil) - (if (string-match-p "sql" file) - (setq web-mode-enable-sql-detection t) - (setq web-mode-enable-sql-detection nil)) - (insert-file-contents file) - (set-visited-file-name file) - (web-mode) - (setq sig1 (md5 (current-buffer))) - (delete-horizontal-space) - (while (not (eobp)) - (forward-line) - (delete-horizontal-space) - (end-of-line)) - (web-mode-buffer-indent) - (setq sig2 (md5 (current-buffer))) - (setq success (string= sig1 sig2)) - (setq out (concat (if success "ok" "ko") " : " (file-name-nondirectory file) "\n")) - (princ out) - (setq err (concat (file-name-directory file) "_err." (file-name-nondirectory file))) - (if success - (when (file-readable-p err) - (delete-file err)) - (write-file err) - (message "[%s]" (buffer-string)) - ) ;if - out))) - -;;---- MISC -------------------------------------------------------------------- - -(defun web-mode-set-engine (engine) - "Set the engine for the current buffer." - (interactive - (list (completing-read - "Engine: " - (let (engines) - (dolist (elt web-mode-engines) - (setq engines (append engines (list (car elt))))) - engines)))) - (setq web-mode-content-type "html" - web-mode-engine (web-mode-engine-canonical-name engine) - web-mode-minor-engine engine) - (web-mode-on-engine-setted) - (web-mode-buffer-fontify)) - -(defun web-mode-set-content-type (content-type) - "Set the content-type for the current buffer" - (interactive (list (completing-read "Content-type: " web-mode-part-content-types))) - (setq web-mode-content-type content-type) - (when (called-interactively-p 'any) - ) - (web-mode-buffer-fontify)) - -(defun web-mode-on-engine-setted () - (let (elt elts) - - (when (string= web-mode-engine "razor") (setq web-mode-enable-block-face t)) - ;;(setq web-mode-engine-attr-regexp (cdr (assoc web-mode-engine web-mode-engine-attr-regexps))) - (setq web-mode-engine-token-regexp (cdr (assoc web-mode-engine web-mode-engine-token-regexps))) - - ;;(message "%S %S %S" web-mode-engine web-mode-engine-attr-regexp web-mode-engine-token-regexp) - - (when (null web-mode-minor-engine) - (setq web-mode-minor-engine "none")) - - (setq elt (assoc web-mode-engine web-mode-engine-open-delimiter-regexps)) - (cond - (elt - (setq web-mode-block-regexp (cdr elt))) - ((string= web-mode-engine "archibus") - (setq web-mode-block-regexp nil)) - (t - (setq web-mode-engine "none")) - ) - - (unless (boundp 'web-mode-extra-auto-pairs) - (setq web-mode-extra-auto-pairs nil)) - - (setq web-mode-auto-pairs - (append - (cdr (assoc web-mode-engine web-mode-engines-auto-pairs)) - (cdr (assoc nil web-mode-engines-auto-pairs)) - (cdr (assoc web-mode-engine web-mode-extra-auto-pairs)) - (cdr (assoc nil web-mode-extra-auto-pairs)))) - - (unless (boundp 'web-mode-extra-snippets) - (setq web-mode-extra-snippets nil)) - - (setq elts - (append - (cdr (assoc web-mode-engine web-mode-extra-snippets)) - (cdr (assoc nil web-mode-extra-snippets)) - (cdr (assoc web-mode-engine web-mode-engines-snippets)) - (cdr (assoc nil web-mode-engines-snippets)))) - - ;;(message "%S" elts) - - (dolist (elt elts) - (unless (assoc (car elt) web-mode-snippets) - (setq web-mode-snippets (cons elt web-mode-snippets))) - ) - - (setq web-mode-engine-font-lock-keywords - (symbol-value (cdr (assoc web-mode-engine web-mode-engines-font-lock-keywords)))) - - (when (and (string= web-mode-minor-engine "jinja") - (not (member "endtrans" web-mode-django-control-blocks))) - (add-to-list 'web-mode-django-control-blocks "endtrans") - (setq web-mode-django-control-blocks-regexp - (regexp-opt web-mode-django-control-blocks t)) - ) - - (when (string= web-mode-engine "spip") - (modify-syntax-entry ?# "w" (syntax-table))) - - ;;(message "%S" (symbol-value (cdr (assoc web-mode-engine web-mode-engines-font-lock-keywords)))) - - )) - -(defun web-mode-detect-engine () - (save-excursion - (goto-char (point-min)) - (when (re-search-forward "-\\*- engine:[ ]*\\([[:alnum:]-]+\\)[ ]*-\\*-" web-mode-chunk-length t) - (setq web-mode-minor-engine (match-string-no-properties 1)) - (setq web-mode-engine (web-mode-engine-canonical-name web-mode-minor-engine))) - web-mode-minor-engine)) - -(defun web-mode-guess-engine-and-content-type () - (let (buff-name found) - - (setq buff-name (buffer-file-name)) - (unless buff-name (setq buff-name (buffer-name))) - (setq web-mode-is-scratch (string= buff-name "*scratch*")) - (setq web-mode-content-type nil) - - (when (boundp 'web-mode-content-types-alist) - (setq found nil) - (dolist (elt web-mode-content-types-alist) - (when (and (not found) (string-match-p (cdr elt) buff-name)) - (setq web-mode-content-type (car elt) - found t)) - ) ;dolist - ) ;when - - (unless web-mode-content-type - (setq found nil) - (dolist (elt web-mode-content-types) - (when (and (not found) (string-match-p (cdr elt) buff-name)) - (setq web-mode-content-type (car elt) - found t) - ;;(message "%S" web-mode-content-type) - ) ;when - ) ;dolist - ) ;unless - - (when (boundp 'web-mode-engines-alist) - (setq found nil) - (dolist (elt web-mode-engines-alist) - (cond - ((stringp (cdr elt)) - (when (string-match-p (cdr elt) buff-name) - (setq web-mode-engine (car elt)))) - ((functionp (cdr elt)) - (when (funcall (cdr elt)) - (setq web-mode-engine (car elt)))) - ) ;cond - ) ;dolist - ) ;when - - (unless web-mode-engine - (setq found nil) - (dolist (elt web-mode-engine-file-regexps) - ;;(message "%S %S %S" (cdr elt) (car elt) buff-name) - (when (and (not found) (string-match-p (cdr elt) buff-name)) - ;;(message "%S %S %S" (cdr elt) (car elt) buff-name) - (setq web-mode-engine (car elt) - found t) - ;;(when (and web-mode-engine (string= web-mode-engine "astro")) - ;; (setq web-mode-enable-front-matter-block t) - ;;) ;when - ) ;when - ) - ) - - (when (and (or (null web-mode-engine) (string= web-mode-engine "none")) - (string-match-p "php" (buffer-substring-no-properties - (line-beginning-position) - (line-end-position)))) - (setq web-mode-engine "php")) - - (when (and (string= web-mode-content-type "javascript") - (string-match-p "@jsx" - (buffer-substring-no-properties - (point-min) - (if (< (point-max) web-mode-chunk-length) - (point-max) - web-mode-chunk-length) - ))) - (setq web-mode-content-type "jsx")) - - (when web-mode-engine - (setq web-mode-minor-engine web-mode-engine - web-mode-engine (web-mode-engine-canonical-name web-mode-engine)) - ) - - ;;(message "%S %S" web-mode-engine web-mode-enable-engine-detection) - - (when (and (or (null web-mode-engine) - (string= web-mode-engine "none")) - web-mode-enable-engine-detection) - (web-mode-detect-engine)) - - (web-mode-on-engine-setted) - - )) - -(defun web-mode-engine-canonical-name (name) - (let (engine) - (cond - ((null name) - nil) - ((assoc name web-mode-engines) - name) - (t - (dolist (elt web-mode-engines) - (when (and (null engine) (member name (cdr elt))) - (setq engine (car elt))) - ) ;dolist - engine) - ))) - -(defun web-mode-on-after-save () - (when web-mode-is-scratch - (web-mode-guess-engine-and-content-type) - (web-mode-buffer-fontify)) - nil) - -(defun web-mode-on-exit () - (web-mode-with-silent-modifications - (put-text-property (point-min) (point-max) 'invisible nil) - (remove-overlays) - (remove-hook 'change-major-mode-hook 'web-mode-on-exit t) - )) - -(defun web-mode-file-link (file) - "Insert a link to a file in html document. This function can be -extended to support more filetypes by customizing -`web-mode-links'." - (interactive - (list (file-relative-name (read-file-name "Link file: ")))) - (let ((matched nil) - (point-line (line-number-at-pos)) - (point-column (current-column))) - (dolist (type web-mode-links) - (when (string-match (car type) file) - (setq matched t) - (when (nth 2 type) - (goto-char (point-min)) - (search-forward "") - (backward-char 7) - (open-line 1)) - (insert (format (cadr type) file)) - (indent-for-tab-command) - (when (nth 2 type) - ;; return point where it was and fix indentation - (forward-line) - (indent-for-tab-command) - (if (> point-line (- (line-number-at-pos) 2)) - (forward-line (+ (- point-line (line-number-at-pos)) 1)) - (forward-line (- point-line (line-number-at-pos)))) - (move-to-column point-column)) - ;; move point back if needed - (backward-char (nth 3 type)))) - (when (not matched) - (user-error "Unknown file type")))) - -(defun web-mode-reload () - "Reload web-mode." - (interactive) - (web-mode-with-silent-modifications - (put-text-property (point-min) (point-max) 'invisible nil) - (remove-overlays) - (setq font-lock-unfontify-region-function 'font-lock-default-unfontify-region) - (load "web-mode.el") - (setq web-mode-change-beg nil - web-mode-change-end nil) - (web-mode) - )) - -(defun web-mode-measure (msg) - (let (sub) - (when (null web-mode-time) (setq web-mode-time (current-time))) - (setq sub (time-subtract (current-time) web-mode-time)) - (when nil - (save-excursion - (let ((n 0)) - (goto-char (point-min)) - (while (web-mode-tag-next) - (setq n (1+ n)) - ) - (message "%S tags found" n) - ))) - (message "%18s: time elapsed = %Ss %9Sµs" msg (nth 1 sub) (nth 2 sub)) - )) - -(defun web-mode-reveal () - "Display text properties at point." - (interactive) - (let (symbols out) - (setq out (format - "[point=%S engine=%S minor=%S content-type=%S language-at-pos=%S]\n" - (point) - web-mode-engine - web-mode-minor-engine - web-mode-content-type - (web-mode-language-at-pos (point)))) - (setq symbols (append web-mode-scan-properties '(font-lock-face face))) - (dolist (symbol symbols) - (when symbol - (setq out (concat out (format "%s(%S) " (symbol-name symbol) (get-text-property (point) symbol))))) - ) - (message "%s\n" out) - ;;(message "syntax-class=%S" (syntax-class (syntax-after (point)))) - (message nil))) - -(defun web-mode-toggle-tracing () - "Toggle tracing." - (interactive) - (if web-mode-trace - (setq web-mode-trace nil) - (message "** tracing on ** point(%S) web-mode-change-beg(%S) web-mode-change-end(%S) web-mode-skip-fontification(%S)" - (point) web-mode-change-beg web-mode-change-end web-mode-skip-fontification) - (setq web-mode-trace t))) - -(defun web-mode-debug () - "Display informations useful for debugging." - (interactive) - (let ((modes nil) - (customs '(web-mode-enable-current-column-highlight web-mode-enable-current-element-highlight indent-tabs-mode)) - (ignore '(abbrev-mode auto-composition-mode auto-compression-mode auto-encryption-mode auto-insert-mode blink-cursor-mode column-number-mode delete-selection-mode display-time-mode electric-indent-mode file-name-shadow-mode font-lock-mode global-font-lock-mode global-hl-line-mode line-number-mode menu-bar-mode mouse-wheel-mode recentf-mode show-point-mode tool-bar-mode tooltip-mode transient-mark-mode))) - (message "\n") - (message "--- WEB-MODE DEBUG BEG ---") - (message "versions: emacs(%S.%S) web-mode(%S)" - emacs-major-version emacs-minor-version web-mode-version) - (message "vars: engine(%S) minor(%S) content-type(%S) file(%S)" - web-mode-engine - web-mode-minor-engine - web-mode-content-type - (or (buffer-file-name) (buffer-name))) - (message "system: window(%S) config(%S)" window-system system-configuration) - (message "colors: fg(%S) bg(%S) " - (cdr (assoc 'foreground-color default-frame-alist)) - (cdr (assoc 'background-color default-frame-alist))) - (mapc (lambda (mode) - (condition-case nil - (if (and (symbolp mode) (symbol-value mode) (not (member mode ignore))) - (push mode modes)) - (error nil)) - ) ;lambda - minor-mode-list) - (message "minor modes: %S" modes) - (message "vars:") - (dolist (custom customs) - (message (format "%s=%S " (symbol-name custom) (symbol-value custom)))) - (message "--- WEB-MODE DEBUG END ---") - (switch-to-buffer "*Messages*") - (goto-char (point-max)) - (recenter) - )) - -(provide 'web-mode) - -;;; web-mode.el ends here - -;; Local Variables: -;; coding: utf-8 -;; indent-tabs-mode: nil -;; sentence-end-double-space: nil -;; End: diff --git a/init.el b/init.el index affc0c2..8d2f090 100644 --- a/init.el +++ b/init.el @@ -3,16 +3,43 @@ ;; ;; Made by Némunaire +(require 'site-gentoo) + (require 'package) (add-to-list 'package-archives - '("MELPA Stable" . "http://stable.melpa.org/packages/") t) + '("MELPA Stable" . "https://stable.melpa.org/packages/") t) ;; Added by Package.el. This must come before configurations of ;; installed packages. Don't delete this line. If you don't want it, ;; just comment it out by adding a semicolon to the start of the line. ;; You may delete these explanatory comments. + +;; Initialize package system but don't activate packages yet +(setq package-enable-at-startup nil) (package-initialize) +;; Register system-installed vterm in package-alist +;; (site-gentoo only adds to load-path, not package-alist) +(unless (assq 'vterm package-alist) + (let ((desc (package-desc-create + :name 'vterm + :version '(0 0 2) + :summary "Emulation of a terminal" + :reqs '((emacs (25 1))) + :kind 'dir + :dir "/usr/share/emacs/site-lisp/vterm"))) + (push (cons 'vterm (list desc)) package-alist))) + +;; Now activate all packages (including claude-code which will find vterm) +(package-activate-all) + +;; Bootstrap use-package +(unless (package-installed-p 'use-package) + (package-refresh-contents) + (package-install 'use-package)) +(require 'use-package) +(setq use-package-always-ensure t) + (setq flymake-allowed-file-name-masks nil) (defun may-load (path) @@ -56,8 +83,8 @@ (require 'my-python-mode) ;; load my configuration files -(toc:load-config-file '("key-binding" -;; "project" +(toc:load-config-file '("packages" ; Modern package management (load first) + "key-binding" "editing" "coding-style" "tags" @@ -67,3 +94,8 @@ "custom" "perso" )) +(custom-set-variables + '(package-selected-packages nil) + '(python-indent 4) + '(query-user-mail-address nil) + '(user-mail-address "nemunaire@nemunai.re")) diff --git a/stuff/edit-indirect.el b/stuff/edit-indirect.el deleted file mode 100644 index 50281e8..0000000 --- a/stuff/edit-indirect.el +++ /dev/null @@ -1,388 +0,0 @@ -;;; edit-indirect.el --- Edit regions in separate buffers -*- lexical-binding: t -*- - -;; Author: Fanael Linithien -;; URL: https://github.com/Fanael/edit-indirect -;; Version: 0.1.5 -;; Package-Requires: ((emacs "24.3")) - -;; This file is NOT part of GNU Emacs. - -;; SPDX-License-Identifier: BSD-2-clause -;; -;; Copyright (c) 2014-2017, Fanael Linithien -;; All rights reserved. -;; -;; Redistribution and use in source and binary forms, with or without -;; modification, are permitted provided that the following conditions are -;; met: -;; -;; * Redistributions of source code must retain the above copyright -;; notice, this list of conditions and the following disclaimer. -;; * Redistributions in binary form must reproduce the above copyright -;; notice, this list of conditions and the following disclaimer in the -;; documentation and/or other materials provided with the distribution. -;; -;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -;; IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -;; TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -;; PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER -;; OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -;; EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -;; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -;; PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -;; LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -;;; Commentary: - -;; Edit regions in separate buffers, like `org-edit-src-code' but for arbitrary -;; regions. -;; -;; See the docstring of `edit-indirect-region' for details. - -;;; Code: -(defgroup edit-indirect nil - "Editing regions in separate buffers." - :group 'editing) - -(defcustom edit-indirect-guess-mode-function #'edit-indirect-default-guess-mode - "The function used to guess the major mode of an edit-indirect buffer. -It's called with the edit-indirect buffer as the current buffer. -It's called with three arguments, the parent buffer, the beginning -and the end of the parent buffer region being editing. - -Note that the buffer-local value from the parent buffer is used." - :type 'function - :group 'edit-indirect) - -(defcustom edit-indirect-after-creation-hook nil - "Functions called after the edit-indirect buffer is created. -The functions are called with the edit-indirect buffer as the -current buffer. - -Note that the buffer-local value from the parent buffer is used." - :type 'hook - :group 'edit-indirect) - -(defcustom edit-indirect-before-commit-hook nil - "Functions called before the edit-indirect buffer is committed. -The functions are called with the edit-indirect buffer as the -current buffer. - -Note that the buffer-local value from the edit-indirect buffer is -used." - :type 'hook - :group 'edit-indirect) - -(defcustom edit-indirect-before-commit-functions nil - "Functions called before an edit-indirect buffer is committed. -The functions are called with the parent buffer as the current -buffer. -Each function is called with two arguments, the beginning and the -end of the region to be changed." - :type 'hook - :group 'edit-indirect) - -(defcustom edit-indirect-after-commit-functions nil - "Functions called after an edit-indirect buffer has been committed. -The functions are called with the parent buffer as the current -buffer. -Each function is called with two arguments, the beginning and the -end of the changed region." - :type 'hook - :group 'edit-indirect) - -(defgroup edit-indirect-faces nil - "Faces used in `edit-indirect'." - :group 'edit-indirect - :group 'faces - :prefix "edit-indirect") - -(defface edit-indirect-edited-region - '((t :inherit secondary-selection)) - "Face used to highlight an indirectly edited region." - :group 'edit-indirect-faces) - -;; Emacs <= 24.3 has no `define-error'. -(let* ((user-error-conditions (get 'user-error 'error-conditions)) - (define-user-error (lambda (name message) - (put name 'error-conditions - (cons name user-error-conditions)) - (put name 'error-message message)))) - (funcall define-user-error 'edit-indirect-overlapping - "Indirectly edited regions cannot overlap") - (funcall define-user-error 'edit-indirect-read-only - "Text is read-only, modify the edit-indirect buffer instead") - (funcall define-user-error 'edit-indirect-not-indirect - "This is not an edit-indirect buffer")) - -(defvar edit-indirect--overlay) -(defvar edit-indirect--should-quit-window nil) - -;;;###autoload -(defun edit-indirect-region (beg end &optional display-buffer) - "Edit the region BEG..END in a separate buffer. -The region is copied, without text properties, to a separate -buffer, called edit-indirect buffer, and -`edit-indirect-guess-mode-function' is called to set the major -mode. -When done, exit with `edit-indirect-commit', which will remove the -original region and replace it with the edited version; or with -`edit-indirect-abort', which will drop the modifications. - -This differs from `clone-indirect-buffer' with narrowing in that -the text properties are not shared, so the parent buffer major mode -and the edit-indirect buffer major mode will not be able to tread -on each other's toes by setting up potentially conflicting text -properties, which happens surprisingly often when the font-lock -mode is used. - -Edit-indirect buffers use the `edit-indirect-mode-map' keymap. - -If there's already an edit-indirect buffer for BEG..END, use that. -If there's already an edit-indirect buffer active overlapping any -portion of BEG..END, an `edit-indirect-overlapping' error is -signaled. - -When DISPLAY-BUFFER is non-nil or when called interactively, -display the edit-indirect buffer in some window and select it. - -In any case, return the edit-indirect buffer." - (interactive - (if (or (use-region-p) (not transient-mark-mode)) - (prog1 (list (region-beginning) (region-end) t) - (deactivate-mark)) - (user-error "No region"))) - (let ((buffer (edit-indirect--get-edit-indirect-buffer beg end))) - (when display-buffer - (with-current-buffer buffer - (setq-local edit-indirect--should-quit-window t)) - (select-window (display-buffer buffer))) - buffer)) - -(defvar edit-indirect-mode-map - (let ((map (make-sparse-keymap))) - (define-key map (kbd "C-x C-s") #'edit-indirect-save) - (define-key map (kbd "C-c '") #'edit-indirect-commit) - (define-key map (kbd "C-c C-c") #'edit-indirect-commit) - (define-key map (kbd "C-c C-k") #'edit-indirect-abort) - map) - "Keymap for edit-indirect buffers. - -\\{edit-indirect-mode-map}") - -(defun edit-indirect-commit () - "Commit the modifications done in an edit-indirect buffer. -That is, replace the original region in the parent buffer with the -contents of the edit-indirect buffer. -The edit-indirect buffer is then killed. - -Can be called only when the current buffer is an edit-indirect -buffer." - (interactive) - (edit-indirect--barf-if-not-indirect) - (edit-indirect--commit) - (edit-indirect--clean-up)) - -(defun edit-indirect-save () - "Save the modifications done in an edit-indirect buffer. -That is, replace the original region in the parent buffer with the -contents of the edit-indirect buffer. - -Can be called only when the current buffer is an edit-indirect -buffer." - (interactive) - (edit-indirect--barf-if-not-indirect) - (edit-indirect--commit)) - -(defun edit-indirect-abort () - "Abort indirect editing in the current buffer and kill the buffer. - -Can be called only when the current buffer is an edit-indirect -buffer." - (interactive) - (edit-indirect--barf-if-not-indirect) - (edit-indirect--abort)) - -(defun edit-indirect-buffer-indirect-p (&optional buffer) - "Non-nil iff the BUFFER is an edit-indirect buffer. -BUFFER defaults to the current buffer." - (save-current-buffer - (when buffer - (set-buffer buffer)) - ;; (not (null)) so we don't leak the overlay to the outside world. - (not (null edit-indirect--overlay)))) - -(defun edit-indirect-default-guess-mode (_parent-buffer _beg _end) - "Guess the major mode for an edit-indirect buffer. -It's done by calling `normal-mode'." - (normal-mode)) - -(defvar edit-indirect--overlay nil - "The overlay spanning the region of the parent buffer being edited. - -It's also used as the variable determining if we're in an -edit-indirect buffer at all.") -(make-variable-buffer-local 'edit-indirect--overlay) -(put 'edit-indirect--overlay 'permanent-local t) - -;; Normally this would use `define-minor-mode', but that makes the mode function -;; interactive, which we don't want, because it's just an implementation detail. -(defun edit-indirect--mode (overlay) - "Turn the `edit-indirect--mode' \"minor mode\" on. -OVERLAY is the value to set `edit-indirect--overlay' to." - (setq edit-indirect--overlay overlay) - (add-hook 'kill-buffer-hook #'edit-indirect--abort-on-kill-buffer nil t)) -(with-no-warnings - (add-minor-mode - 'edit-indirect--overlay " indirect" edit-indirect-mode-map nil #'ignore)) - -(defun edit-indirect--get-edit-indirect-buffer (beg end) - "Return an edit-indirect buffer for the region BEG..END. -If there's already an edit-indirect buffer active overlapping any -portion of BEG..END, an `edit-indirect-overlapping' error is -signaled." - (let ((old-overlay (edit-indirect--search-for-edit-indirect beg end))) - (cond - ((null old-overlay) - (let ((overlay (edit-indirect--create-overlay beg end))) - (edit-indirect--create-indirect-buffer beg end overlay))) - ((and (= beg (overlay-start old-overlay)) - (= end (overlay-end old-overlay))) - (overlay-get old-overlay 'edit-indirect-buffer)) - (t - (signal 'edit-indirect-overlapping '()))))) - -(defun edit-indirect--search-for-edit-indirect (beg end) - "Return an existing edit-indirect overlay for some region inside BEG..END. -If there's no indirectly edited region inside BEG..END, return -nil." - (catch 'done - (dolist (overlay (overlays-in beg end)) - (when (overlay-get overlay 'edit-indirect-buffer) - (throw 'done overlay))) - nil)) - -(defmacro edit-indirect--buffer-local-value (buffer variable) - "Get the BUFFER local value of VARIABLE. -VARIABLE shall be a symbol." - (unless (symbolp variable) - (signal 'wrong-type-argument (list #'symbolp variable))) - ;; `with-current-buffer' is used instead of `buffer-local-value' because - ;; the latter doesn't give warnings about free variables when - ;; byte-compiled. - `(with-current-buffer ,buffer ,variable)) - -(defun edit-indirect--create-indirect-buffer (beg end overlay) - "Create an edit-indirect buffer and return it. - -BEG..END is the parent buffer region to insert. -OVERLAY is the overlay, see `edit-indirect--overlay'." - (let ((buffer (generate-new-buffer (format "*edit-indirect %s*" (buffer-name)))) - (parent-buffer (current-buffer))) - (overlay-put overlay 'edit-indirect-buffer buffer) - (with-current-buffer buffer - (insert-buffer-substring-no-properties parent-buffer beg end) - (set-buffer-modified-p nil) - (edit-indirect--mode overlay) - ;; Use the buffer-local values from the parent buffer. Don't retrieve the - ;; values before actual uses in case these variables are changed by some - ;; of the many possible hooks. - (funcall (edit-indirect--buffer-local-value - parent-buffer edit-indirect-guess-mode-function) - parent-buffer beg end) - (let ((edit-indirect-after-creation-hook - (edit-indirect--buffer-local-value - parent-buffer edit-indirect-after-creation-hook))) - (run-hooks 'edit-indirect-after-creation-hook))) - buffer)) - -(defun edit-indirect--create-overlay (beg end) - "Create the edit-indirect overlay and return it. - -BEG and END specify the region the overlay should encompass." - (let ((overlay (make-overlay beg end))) - (overlay-put overlay 'face 'edit-indirect-edited-region) - (overlay-put overlay 'modification-hooks '(edit-indirect--barf-read-only)) - (overlay-put overlay 'insert-in-front-hooks '(edit-indirect--barf-read-only)) - overlay)) - -(defvar edit-indirect--inhibit-read-only nil - "Non-nil means disregard read-only status of indirectly-edited region.") - -(defun edit-indirect--barf-read-only (_ov _after _beg _end &optional _len) - "Signal an error because the text is read-only. -No error is signaled if `inhibit-read-only' or -`edit-indirect--inhibit-read-only' is non-nil." - (unless (or inhibit-read-only edit-indirect--inhibit-read-only) - (signal 'edit-indirect-read-only '()))) - -(defun edit-indirect--commit () - "Commit the modifications done in an edit-indirect buffer." - (run-hooks 'edit-indirect-before-commit-hook) - (let ((beg (overlay-start edit-indirect--overlay)) - (end (overlay-end edit-indirect--overlay)) - (buffer (current-buffer)) - (edit-indirect--inhibit-read-only t)) - (with-current-buffer (overlay-buffer edit-indirect--overlay) - (save-excursion - (let ((beg-marker (copy-marker beg)) - (end-marker (copy-marker end))) - (edit-indirect--run-hook-with-positions - 'edit-indirect-before-commit-functions beg-marker end-marker) - (save-match-data - (set-match-data (list beg-marker end-marker)) - (replace-match (with-current-buffer buffer - (buffer-substring-no-properties 1 (1+ (buffer-size)))) - t t)) - (edit-indirect--run-hook-with-positions - 'edit-indirect-after-commit-functions beg-marker (point)) - (set-marker beg-marker nil) - (set-marker end-marker nil)))))) - -(defun edit-indirect--run-hook-with-positions (hook beg end) - "Run HOOK with the specified positions BEG and END. -HOOK should be a symbol, a hook variable. -The functions are passed integer positions. -If a function changes the buffer contents, the next function will be -called with updated positions." - (let ((beg-marker (unless (markerp beg) (copy-marker beg))) - (end-marker (unless (markerp end) (copy-marker end)))) - (run-hook-wrapped hook - (lambda (f beg end) - (funcall f (marker-position beg) (marker-position end)) - nil) - (or beg-marker beg) (or end-marker end)) - (when beg-marker (set-marker beg-marker nil)) - (when end-marker (set-marker end-marker nil)))) - -(defun edit-indirect--abort () - "Abort indirect edit." - (edit-indirect--clean-up)) - -(defun edit-indirect--clean-up () - "Clean up an edit-indirect buffer." - (delete-overlay edit-indirect--overlay) - ;; Kill the overlay reference so that `edit-indirect--abort-on-kill-buffer' - ;; won't try to call us again. - (setq edit-indirect--overlay nil) - ;; If we created a window, get rid of it. Kill the buffer we created. - (if edit-indirect--should-quit-window - (quit-window t) - (kill-buffer))) - -(defun edit-indirect--abort-on-kill-buffer () - "Abort indirect edit. -Should be called only from `kill-buffer-hook'." - (when edit-indirect--overlay - (edit-indirect--abort))) - -(defun edit-indirect--barf-if-not-indirect () - "Signal an error if the current buffer is not an edit-indirect buffer. -The error signaled is `edit-indirect-not-indirect'." - (unless edit-indirect--overlay - (signal 'edit-indirect-not-indirect '()))) - -(provide 'edit-indirect) -;;; edit-indirect.el ends here diff --git a/stuff/edje-mode.el b/stuff/edje-mode.el deleted file mode 100644 index 33c6fe6..0000000 --- a/stuff/edje-mode.el +++ /dev/null @@ -1,512 +0,0 @@ -;;; edje-mode-el -- Major mode for editing Edje files - -;; Author: Gustavo Sverzut Barbieri -;; Created: 2007-07-23 -;; Keywords: Edje major-mode -;; Url: http://barbieri-playground.googlecode.com/svn/dot-files/edje-mode.el -;; (if you find this file have problems, check that Url and request update) - -;; Copyright (C) 2007 Gustavo Sverzut Barbieri - -;; 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. - -;; You should have received a copy of the GNU General Public -;; License along with this program; if not, write to the Free -;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, -;; MA 02111-1307 USA - -;;; Commentary: -;; -;; This mode is based on tutorial from Scott Andrew Borton: -;; http://two-wugs.net/emacs/mode-tutorial.html - - -(defvar edje-mode-hook nil) - -(defun number-or-nil-to-string (v &optional default) - (cond ((numberp v) (number-to-string v)) - ((stringp v) (if (string= v "") (number-to-string default) v)) - (t (number-to-string default)))) - -(defun non-empty-string (s) - (and (not (eq 'nil s)) - (not (string= "" s)))) - -(defun edje-new-program-action-signal-emit (source emission) - "Insert new program SIGNAL_EMIT" - (interactive "ssource: \nsemission: ") - (insert - (concat - " action: SIGNAL_EMIT \"" source "\" \"" emission "\";\n" - ))) - -(defun edje-new-program-action-state-set (state value target) - "Insert new program STATE_SET" - (interactive "sstate: \nsvalue (0.0): \nstarget: ") - (insert - (concat - " action: STATE_SET \"" state "\" " - (number-or-nil-to-string value 0.0) ";\n" - " target: \"" target "\";\n" - ))) - -(defun edje-new-program-action (action) - "Insert new program action" - (interactive "saction: ") - (setq action (upcase action)) - (cond ((string= action "STATE_SET") - (edje-new-program-action-state-set "" 0.0 "")) - ((string= action "SIGNAL_EMIT") - (edje-new-program-action-signal-emit "" "")) - )) - -(defun edje-new-program (name signal source action) - "Insert new program block" - (interactive "sname: \nssignal: \nssource: \nsaction: ") - (insert - (concat - "\n" - " program {\n" - " name: \"" name "\";\n" - - (if (non-empty-string signal) - (concat " signal: \"" signal "\";\n")) - - (if (non-empty-string source) - (concat " source: \"" source "\";\n")) - )) - - (edje-new-program-action action) - - (insert - (concat - " }\n" - "\n" - ))) - -(defun edje-new-desc-relative (x y &optional defx defy) - "Insert new part description 'relative' line" - (interactive "sx: \nsy: ") - (insert - (concat - " relative: " - (number-or-nil-to-string x defx) " " - (number-or-nil-to-string y defy) ";\n" - ))) - -(defun edje-new-desc-offset (x y &optional defx defy) - "Insert new part description 'offset' line" - (interactive "sx: \nsy: ") - (insert - (concat - " offset: " - (number-or-nil-to-string x defx) " " - (number-or-nil-to-string y defy) ";\n" - ))) - -(defun edje-new-desc-inherit (name val) - "Insert new part description 'inherit' line" - (interactive "sname: \nsvalue: ") - (insert - (concat - " inherit: \"" name "\" " - (number-or-nil-to-string val 0.0) ";\n" - ))) - -(defun edje-new-desc-text (font size text) - "Insert new part description 'text' block" - (interactive "sfont: \nssize: \nstext: ") - (insert - (concat - " text {\n" - " font: \"" font "\";\n" - " size: " (number-or-nil-to-string size) ";\n" - " text: \"" text "\";\n" - " }\n" - ))) - -(defun edje-new-desc-image (name) - "Insert new part description 'image' block" - (interactive "sname: ") - (insert - (concat - " image {\n" - " normal: \"" name "\";\n" - " }\n" - ))) - -(defun edje-new-desc-color (r g b a &optional defr defg defb defa) - "Insert new part description 'color' line" - (interactive "sred: \nsgreen: \nsblue: \nsalpha: ") - (insert - (concat - " color: " - (number-or-nil-to-string r defr) " " - (number-or-nil-to-string g defg) " " - (number-or-nil-to-string b defb) " " - (number-or-nil-to-string a defa) ";\n" - ))) - -(defun edje-new-desc (name val &optional - r1_rx r1_ry - r2_rx r2_ry - r1_ox r1_oy - r2_ox r2_oy - part_type) - "Insert new part description block" - (interactive "sName: \nsValue: ") - (insert - (concat - " description {\n" - " state: \"" name "\" " (number-or-nil-to-string val 0.0) ";\n")) - (if (string= part_type "RECT") (edje-new-desc-color 255 255 255 255)) - (insert " rel1 {\n") - (edje-new-desc-relative r1_rx r1_ry 0.0 0.0) - (edje-new-desc-offset r1_ox r1_oy 0 0) - (insert - (concat - " }\n" - " rel2 {\n" - )) - (edje-new-desc-relative r2_rx r2_ry 1.0 1.0) - (edje-new-desc-offset r2_ox r2_oy -1 -1) - (insert " }\n") - (cond ((string= part_type "IMAGE") (edje-new-desc-image "")) - ((string= part_type "TEXT") (edje-new-desc-text "" 10 "contents")) - ) - (insert " }\n") - ) - -(defun edje-new-part (name type &optional - r1_rx r1_ry - r2_rx r2_ry - r1_ox r1_oy - r2_ox r2_oy) - "Insert new part" - (interactive "sName: \nsType: ") - (setq type (upcase type)) - (insert - (concat - "\n" - " part {\n" - " name: \"" name "\";\n" - " type: " type ";\n" - " mouse_events: 0;\n" - )) - (edje-new-desc "default" 0.0 r1_rx r1_ry r2_rx r2_ry r1_ox r1_oy r2_ox r2_oy type) - (insert - (concat - " }\n" - ))) - -(defun edje-setup-compile () - (set (make-local-variable 'compile-command) - (concat "edje_cc " (buffer-file-name)) - )) - -(defun edje-cc () - "Runs edje_cc with current buffer." - (interactive) - (compile (edje-setup-compile))) - -(defvar edje-mode-map - (let ((edje-mode-map (make-sparse-keymap))) - (define-key edje-mode-map "\C-j" 'newline-and-indent) - (define-key edje-mode-map "\C-cp" 'edje-new-part) - (define-key edje-mode-map "\C-cd" 'edje-new-desc) - (define-key edje-mode-map "\C-cr" 'edje-new-desc-relative) - (define-key edje-mode-map "\C-co" 'edje-new-desc-offset) - (define-key edje-mode-map "\C-ch" 'edje-new-desc-inherit) - (define-key edje-mode-map "\C-cc" 'edje-new-desc-color) - (define-key edje-mode-map "\C-ci" 'edje-new-desc-image) - (define-key edje-mode-map "\C-ct" 'edje-new-desc-text) - (define-key edje-mode-map "\C-cg" 'edje-new-program) - (define-key edje-mode-map "\C-ca" 'edje-new-program-action) - (define-key edje-mode-map "\C-cs" 'edje-new-program-action-state-set) - (define-key edje-mode-map "\C-ce" 'edje-new-program-action-signal-emit) - edje-mode-map) - "Keymap for Edje major mode") - -(add-hook 'c-mode-hook 'edje-setup-compile) -(add-to-list 'auto-mode-alist '("\\.edc$" . edje-mode)) - -(defconst edje-font-lock-keywords-1 - (eval-when-compile - (list - (list (concat "[ \t]*\\<" - (regexp-opt - '( - "collections" - "data" - "description" - "dragable" - "fill" - "fonts" - "group" - "image" - "images" - "origin" - "part" - "parts" - "program" - "programs" - "rel1" - "rel2" - "script" - "spectra" - "style" - "styles" - "text" - ) t) "\\>\\([ \t]*{\\|\\.\\)") - '(1 font-lock-function-name-face)) - - )) - "Major keywords") - -(defconst edje-font-lock-keywords-2 - (eval-when-compile - (append edje-font-lock-keywords-1 - (list - (list - (concat "^\\([ \t]*\\|[ \t]*[a-z]+\\.\\|\\)\\<" - (regexp-opt - '("action" - "after" - "alias" - "align" - "angle" - "aspect" - "aspect_preference" - "base" - "border" - "clip_to" - "collections" - "color" - "color2" - "color3" - "color_class" - "color_classes" - "confine" - "data" - "description" - "dragable" - "effect" - "elipsis" - "events" - "fill" - "fit" - "fixed" - "font" - "fonts" - "gradient" - "group" - "ignore_flags" - "image" - "images" - "in" - "inherit" - "item" - "max" - "middle" - "min" - "mouse_events" - "name" - "normal" - "offset" - "origin" - "part" - "parts" - "pointer_mode" - "precise_is_inside" - "program" - "programs" - "rel1" - "rel2" - "relative" - "repeat_events" - "signal" - "size" - "smooth" - "source" - "spectra" - "spectrum" - "spread" - "state" - "step" - "style" - "styles" - "tag" - "target" - "text" - "text_class" - "text_source" - "to" - "to_x" - "to_y" - "transition" - "tween" - "type" - "use_alternate_font_metrics" - "visible" - "x" - "y" - ) t) "\\>[ \t]*[:,]") - '(2 font-lock-keyword-face)) - ))) - "Minor keywords") - -(defconst edje-font-lock-keywords-3 - (eval-when-compile - (append edje-font-lock-keywords-2 - (list - (list - (concat "\\<" - (regexp-opt - '(; image options (st_images_image) - "RAW" - "COMP" - "LOSSY" - "USER" - ; part types (st_collections_group_parts_part_type) - "NONE" - "RECT" - "TEXT" - "IMAGE" - "SWALLOW" - "TEXTBLOCK" - "GRADIENT" - "GROUP" - ; ignore flags (st_collections_group_parts_part_ignore_flags) - ;"NONE" - "ON_HOLD" - ; pointer mode (st_collections_group_parts_part_pointer_mode) - "AUTOGRAB" - "NOGRAB" - ; aspect (st_collections_group_parts_part_description_aspect_preference) - "NONE" - "VERTICAL" - "HORIZONTAL" - "BOTH" - ; text effect (st_collections_group_parts_part_effect) - "NONE" - "PLAIN" - "OUTLINE" - "SOFT_OUTLINE" - "SHADOW" - "SOFT_SHADOW" - "OUTLINE_SHADOW" - "OUTLINE_SOFT_SHADOW" - "FAR_SHADOW" - "FAR_SOFT_SHADOW" - "GLOW" - ; image fill (st_collections_group_parts_part_description_fill_type) - "SCALE" - "TILE" - ; program action (st_collections_group_programs_program_action) - "STATE_SET" - "ACTION_STOP" - "SIGNAL_EMIT" - "DRAG_VAL_SET" - "DRAG_VAL_STEP" - "DRAG_VAL_PAGE" - "SCRIPT" - ; program transition (st_collections_group_programs_program_transition) - "LINEAR" - "SINUSOIDAL" - "ACCELERATE" - "DECELERATE" - ) t) "\\>") - '(1 font-lock-builtin-face)) - ))) - "Enumerate values") - -(defconst edje-font-lock-keywords-4 - (eval-when-compile - (append edje-font-lock-keywords-3 - (list - (list - (concat "[ \t]*#" - (regexp-opt - '("if" - "ifdef" - "ifndef" - "define" - "else" - "endif" - "include" - "undef") t) "[ \t]*") - '(1 font-lock-builtin-face)) - ))) - "CPP directives") - -(defconst edje-font-lock-keywords-5 - (eval-when-compile - (append edje-font-lock-keywords-4 - (list - (list "[ \t]*#undef[ \t]+\\([a-zA-Z_][a-zA-Z0-9_]*\\)" - '(1 font-lock-variable-name-face)) - (list "[ \t]*#define[ \t]+\\([a-zA-Z_][a-zA-Z0-9_]*\\)(" - '(1 font-lock-function-name-face)) - (list "[ \t]*#define[ \t]+\\([a-zA-Z_][a-zA-Z0-9_]*\\)" - '(1 font-lock-variable-name-face)) - ))) - "CPP directives that define constants") - - -(defvar edje-font-lock-keywords edje-font-lock-keywords-5) - -(defvar edje-mode-syntax-table - (let ((edje-mode-syntax-table (make-syntax-table))) - ; This is added so entity names with underscores can be more easily parsed - (modify-syntax-entry ?_ "w" edje-mode-syntax-table) - (modify-syntax-entry ?/ ". 124b" edje-mode-syntax-table) - (modify-syntax-entry ?* ". 23" edje-mode-syntax-table) - (modify-syntax-entry ?\n "> b" edje-mode-syntax-table) - - edje-mode-syntax-table) - "Syntax table for edje-mode") - -(c-add-style - "edje" - '("gnu" - (indent-tabs-mode . nil) - (tab-width . 8) - (c-basic-offset . 3) - (c-backslash-column . 72) - (c-hanging-braces-alist . - ((block-open after) - (brace-list-open after) - (substatement-open after)) - ) - (c-offsets-alist . - ((statement-block-intro . +) - (defun-open . 0) - (substatement-open . 0) - (defun-block-intro . +) - (block-open . 0) - (label . +) - )))) - - -(define-derived-mode edje-mode c-mode "Edje" - "Major mode for editing Edje files" - (interactive) - (use-local-map edje-mode-map) - (set-syntax-table edje-mode-syntax-table) - (set (make-local-variable 'font-lock-defaults) '(edje-font-lock-keywords)) - (set (make-local-variable 'require-final-newline) t) - (c-set-style "edje") - (run-hooks 'edje-mode-hook) - ) - -(provide 'edje-mode) - -;;; edje-mode.el ends here diff --git a/stuff/find-cmd.el b/stuff/find-cmd.el deleted file mode 100644 index 877b96c..0000000 --- a/stuff/find-cmd.el +++ /dev/null @@ -1,242 +0,0 @@ -;;; find-cmd.el --- Build a valid find(1) command with sexps - -;; Copyright (C) 2008, 2009 Free Software Foundation, Inc. - -;; Author: Philip Jackson -;; Version: 0.6 - -;; This file is part of GNU Emacs. - -;; GNU Emacs is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . - -;;; Commentary: - -;; With this module you can build up a (hopefully) valid find(1) -;; string ready for the command line. For example: - -;; (find-cmd '(prune (name ".svn" ".git" ".CVS")) -;; '(and (or (name "*.pl" "*.pm" "*.t") -;; (mtime "+1")) -;; (fstype "nfs" "ufs")))) - -;; will become (un-wrapped): - -;; "find '/home/phil/' \\( \\( -name '.svn' -or -name '.git' -or -;; -name '.CVS' \\) -prune -or -true \\) \\( \\( \\( -name '*.pl' -;; -or -name '*.pm' -or -name '*.t' \\) -or -mtime '+1' \\) -and \\( -;; -fstype 'nfs' -or -fstype 'ufs' \\) \\)" - -;;; Code: - -(defconst find-constituents - '((and . find-and) - (not . find-not) - (or . find-or) - - (a . find-and) - (n . find-not) - (o . find-or) - - (prune . find-prune) - - ;; switches - (L . (0)) - (P . (0)) - (H . (0)) - - ;; generic tests - (amin . (1)) - (anewer . (1)) - (atime . (1)) - (cmin . (1)) - (cnewer . (1)) - (ctime . (1)) - (empty . (0)) - (false . (0)) - (fstype . (1)) - (gid . (1)) - (group . (1)) - (ilname . (1)) - (iname . (1)) - (inum . (1)) - (iwholename . (1)) - (iregex . (1)) - (links . (1)) - (lname . (1)) - (mmin . (1)) - (mtime . (1)) - (name . (1)) - (newer . (1)) - (nouser . (0)) - (nogroup . (0)) - (path . (1)) - (perm . (0)) - (regex . (1)) - (wholename . (1)) - (size . (1)) - (true . (0)) - (type . (1)) - (uid . (1)) - (used . (1)) - (user . (1)) - (xtype . (nil)) - - ;; normal options (always true) - (depth . (0)) - (maxdepth . (1)) - (mindepth . (1)) - (mount . (0)) - (noleaf . (0)) - (xdev . (0)) - (ignore_readdir_race . (0)) - (noignore_readdir_race . (0)) - - ;; actions - (delete . (0)) - (print0 . (0)) - (printf . (1)) - (fprintf . (2)) - (print . (0)) - (fprint0 . (1)) - (fprint . (1)) - (ls . (0)) - (fls . (1)) - (prune . (0)) - (quit . (0)) - - ;; these need to be terminated with a ; - (exec . (1 find-command t)) - (ok . (1 find-command t)) - (execdir . (1 find-command t)) - (okdir . (1 find-command t))) - "Holds details of each of the find options. The car of each -alist is the name. The cdr is minimum args, the function used -to join many occurences of the argument together, and whether or -not to leave quotes off the string (non-nil means the string will -be quoted).") - -;;;###autoload -(defun find-cmd (&rest subfinds) - "Initiate the building of a find command. For exmple: - -\(find-cmd '\(prune \(name \".svn\" \".git\" \".CVS\"\)\) - '\(and \(or \(name \"*.pl\" \"*.pm\" \"*.t\"\) - \(mtime \"+1\"\)\) - \(fstype \"nfs\" \"ufs\"\)\)\)\) - -`default-directory' is used as the initial search path. The -result is a string that should be ready for the command line." - (concat - "find " (shell-quote-argument (expand-file-name default-directory)) " " - (cond - ((cdr subfinds) - (mapconcat 'find-to-string subfinds "")) - (t - (find-to-string (car subfinds)))))) - -(defun find-and (form) - "And FORMs together, so: - \(and \(mtime \"+1\"\) \(name \"something\"\)\) -will produce: - find . \\\( -mtime '+1' -and -name 'something' \\\)" - (if (< (length form) 2) - (find-to-string (car form)) - (concat "\\( " - (mapconcat 'find-to-string form "-and ") - "\\) "))) - -(defun find-or (form) - "Or FORMs together, so: - \(or \(mtime \"+1\"\) \(name \"something\"\)\) -will produce: - find . \\\( -mtime '+1' -or -name 'something' \\\)" - (if (< (length form) 2) - (find-to-string (car form)) - (concat "\\( " - (mapconcat 'find-to-string form "-or ") - "\\) "))) - -(defun find-not (form) - "Or FORMs together and prefix with a -not, so: - \(not \(mtime \"+1\"\) \(name \"something\"\)\) -will produce: - -not \\\( -mtime '+1' -or -name 'something' \\\) -If you wanted the FORMs -and(ed) together instead then this would -suffice: - \(not \(and \(mtime \"+1\"\) \(name \"something\"\)\)\)" - (concat "-not " (find-or (mapcar 'find-to-string form)))) - -(defun find-prune (form) - "-or together FORM(s) postfix '-prune' and then -or that with a --true, so: - \(prune \(name \".svn\" \".git\"\)\) \(name \"*.pm\"\) -will produce (unwrapped): - \\\( \\\( \\\( -name '.svn' -or -name '.git' \\\) / - -prune -or -true \\\) -and -name '*.pm' \\\)" - (find-or - (list - (concat (find-or (mapcar 'find-to-string form)) (find-generic "prune")) - (find-generic "true")))) - -(defun find-generic (option &optional oper argcount args dont-quote) - "This function allows an arbitrary string to be used as a -form. OPTION is the name of the form, OPER is the function used -to either OR or AND multiple results together. ARGCOUNT is the -minimum of args that OPTION can receive and ARGS are the -arguments for OPTION." - (when (and (numberp argcount) (< (length args) argcount)) - (error "'%s' needs at least %d arguments" option argcount)) - (let ((oper (or oper 'find-or))) - (if (and args (length args)) - (funcall oper (mapcar (lambda (x) - (concat "-" option - (if dont-quote - (concat " " x " ") - (concat " " - (shell-quote-argument x) - " ")))) - args)) - (concat "-" option " ")))) - -(defun find-command (form) - "For each item in FORM add a terminating semi-colon and turn -them into valid switches. The result is -and(ed) together." - (find-and (mapcar (lambda (x) - (concat (find-to-string x) "\\; ")) - form))) - -(defun find-to-string (form) - "Parse FORM to produce a set of valid find arguments." - (cond - ((stringp form) - form) - ((consp form) - (let ((option (cdr (assoc (car form) find-constituents)))) - (cond - ((and (symbolp option) (fboundp option)) - (funcall option (cdr form))) - ((consp option) - (let ((option (symbol-name (car form))) - (argcnt (car option)) - (oper (cadr option)) - (dont-quote (car (cddr option)))) - (find-to-string - (find-generic option oper argcnt (cdr form) dont-quote)))) - (t - (error "Sorry I don't know how to handle '%s'" (car form)))))))) - -(provide 'find-cmd) - -;; arch-tag: 9687fd9e-4e90-4022-864a-f904526e2046 -;;; find-cmd.el ends here diff --git a/stuff/flymake-cursor.el b/stuff/flymake-cursor.el deleted file mode 100644 index 0f0b8c5..0000000 --- a/stuff/flymake-cursor.el +++ /dev/null @@ -1,167 +0,0 @@ -;;; flymake-cursor.el --- displays flymake error msg in minibuffer after delay -;; -;; Author : ?? -;; origin : http://paste.lisp.org/display/60617,1/raw -;; Maintainer : Dino Chiesa -;; : Donald Curtis -;; Created : May 2011 -;; Modified : December 2012 -;; Version : 0.1.5 -;; Keywords : languages mode flymake -;; X-URL : http://www.emacswiki.org/emacs/flymake-cursor.el -;; Last-saved : <2012-Dec-20 09:49:28> -;; -;; ------------------------------------------------------- -;; -;; License: None. This code is in the Public Domain. -;; -;; -;; Additional functionality that makes flymake error messages appear -;; in the minibuffer when point is on a line containing a flymake -;; error. This saves having to mouse over the error, which is a -;; keyboard user's annoyance. -;; ------------------------------------------------------- -;; -;; This flymake-cursor module displays the flymake error in the -;; minibuffer, after a short delay. It is based on code I found roaming -;; around on the net, unsigned and unattributed. I suppose it's public -;; domain, because, while there is a "License" listed in it, there -;; is no license holder, no one to own the license. -;; -;; This version is modified slightly from that code. The post-command fn -;; defined in this code does not display the message directly. Instead -;; it sets a timer, and when the timer fires, the timer event function -;; displays the message. -;; -;; The reason to do this: the error message is displayed only if the -;; user doesn't do anything, for about one second. This way, if the user -;; scrolls through a buffer and there are myriad errors, the minibuffer -;; is not constantly being updated. -;; -;; If the user moves away from the line with the flymake error message -;; before the timer expires, then no error is displayed in the minibuffer. -;; -;; I've also updated the names of the defuns. They all start with flyc now. -;; -;; To use this, include this line in your .emacs: -;; -;; ;; enhancements for displaying flymake errors -;; (require 'flymake-cursor) -;; -;; You can, of course, put that in an eval-after-load clause. -;; -;; ------------------------------------------------------- -;; -;; Update 2012-03-06 by Donald Curtis -;; -- -;; Added some autoload statements and the closing comment to make -;; compatible with package.el parser. -;; -;; Update 2012-12-20 by Jeremy Moore -;; -- -;; Alter post-command-hook's local value via add-hook so that it plays -;; nicely with other packages. -;; - - -(require 'cl) - -(defvar flyc--e-at-point nil - "Error at point, after last command") - -(defvar flyc--e-display-timer nil - "A timer; when it fires, it displays the stored error message.") - -(defun flyc/maybe-fixup-message (errore) - "pyflake is flakey if it has compile problems, this adjusts the -message to display, so there is one ;)" - (cond ((not (or (eq major-mode 'Python) (eq major-mode 'python-mode) t))) - ((null (flymake-ler-file errore)) - ;; normal message do your thing - (flymake-ler-text errore)) - (t ;; could not compile error - (format "compile error, problem on line %s" (flymake-ler-line errore))))) - -(defun flyc/show-stored-error-now () - "Displays the stored error in the minibuffer." - (interactive) - (let ((editing-p (= (minibuffer-depth) 0))) - (if (and flyc--e-at-point editing-p) - (progn - (message "%s" (flyc/maybe-fixup-message flyc--e-at-point)) - (setq flyc--e-display-timer nil))))) - - -(defun flyc/-get-error-at-point () - "Gets the first flymake error on the line at point." - (let ((line-no (line-number-at-pos)) - flyc-e) - (dolist (elem flymake-err-info) - (if (eq (car elem) line-no) - (setq flyc-e (car (second elem))))) - flyc-e)) - - -;;;###autoload -(defun flyc/show-fly-error-at-point-now () - "If the cursor is sitting on a flymake error, display -the error message in the minibuffer." - (interactive) - (if flyc--e-display-timer - (progn - (cancel-timer flyc--e-display-timer) - (setq flyc--e-display-timer nil))) - (let ((error-at-point (flyc/-get-error-at-point))) - (if error-at-point - (progn - (setq flyc--e-at-point error-at-point) - (flyc/show-stored-error-now))))) - - -;;;###autoload -(defun flyc/show-fly-error-at-point-pretty-soon () - "If the cursor is sitting on a flymake error, grab the error, -and set a timer for \"pretty soon\". When the timer fires, the error -message will be displayed in the minibuffer. - -This allows a post-command-hook to NOT cause the minibuffer to be -updated 10,000 times as a user scrolls through a buffer -quickly. Only when the user pauses on a line for more than a -second, does the flymake error message (if any) get displayed. - -" - (if flyc--e-display-timer - (cancel-timer flyc--e-display-timer)) - - (let ((error-at-point (flyc/-get-error-at-point))) - (if error-at-point - (setq flyc--e-at-point error-at-point - flyc--e-display-timer - (run-at-time "0.9 sec" nil 'flyc/show-stored-error-now)) - (setq flyc--e-at-point nil - flyc--e-display-timer nil)))) - - -;;;###autoload -(eval-after-load "flymake" - '(progn - - (defadvice flymake-goto-next-error (after flyc/display-message-1 activate compile) - "Display the error in the mini-buffer rather than having to mouse over it" - (flyc/show-fly-error-at-point-now)) - - (defadvice flymake-goto-prev-error (after flyc/display-message-2 activate compile) - "Display the error in the mini-buffer rather than having to mouse over it" - (flyc/show-fly-error-at-point-now)) - - (defadvice flymake-mode (before flyc/post-command-fn activate compile) - "Add functionality to the post command hook so that if the -cursor is sitting on a flymake error the error information is -displayed in the minibuffer (rather than having to mouse over -it)" - (add-hook 'post-command-hook 'flyc/show-fly-error-at-point-pretty-soon t t)))) - - -(provide 'flymake-cursor) - -;;; flymake-cursor.el ends here diff --git a/stuff/go-mode-autoloads.el b/stuff/go-mode-autoloads.el deleted file mode 100644 index 96b27d8..0000000 --- a/stuff/go-mode-autoloads.el +++ /dev/null @@ -1,98 +0,0 @@ -;;; go-mode-autoloads.el --- automatically extracted autoloads -;; -;;; Code: - - -;;;### (autoloads (go-download-play godoc gofmt-before-save go-mode) -;;;;;; "go-mode" "go-mode.el" (21514 38760 682820 85000)) -;;; Generated autoloads from go-mode.el - -(autoload 'go-mode "go-mode" "\ -Major mode for editing Go source text. - -This mode provides (not just) basic editing capabilities for -working with Go code. It offers almost complete syntax -highlighting, indentation that is almost identical to gofmt and -proper parsing of the buffer content to allow features such as -navigation by function, manipulation of comments or detection of -strings. - -In addition to these core features, it offers various features to -help with writing Go code. You can directly run buffer content -through gofmt, read godoc documentation from within Emacs, modify -and clean up the list of package imports or interact with the -Playground (uploading and downloading pastes). - -The following extra functions are defined: - -- `gofmt' -- `godoc' -- `go-import-add' -- `go-remove-unused-imports' -- `go-goto-imports' -- `go-play-buffer' and `go-play-region' -- `go-download-play' -- `godef-describe' and `godef-jump' -- `go-coverage' - -If you want to automatically run `gofmt' before saving a file, -add the following hook to your emacs configuration: - -\(add-hook 'before-save-hook #'gofmt-before-save) - -If you want to use `godef-jump' instead of etags (or similar), -consider binding godef-jump to `M-.', which is the default key -for `find-tag': - -\(add-hook 'go-mode-hook (lambda () - (local-set-key (kbd \"M-.\") #'godef-jump))) - -Please note that godef is an external dependency. You can install -it with - -go get github.com/rogpeppe/godef - - -If you're looking for even more integration with Go, namely -on-the-fly syntax checking, auto-completion and snippets, it is -recommended that you look at flycheck -\(see URL `https://github.com/flycheck/flycheck') or flymake in combination -with goflymake (see URL `https://github.com/dougm/goflymake'), gocode -\(see URL `https://github.com/nsf/gocode'), go-eldoc -\(see URL `github.com/syohex/emacs-go-eldoc') and yasnippet-go -\(see URL `https://github.com/dominikh/yasnippet-go') - -\(fn)" t nil) - -(add-to-list 'auto-mode-alist (cons "\\.go\\'" 'go-mode)) - -(autoload 'gofmt-before-save "go-mode" "\ -Add this to .emacs to run gofmt on the current buffer when saving: - (add-hook 'before-save-hook 'gofmt-before-save). - -Note that this will cause go-mode to get loaded the first time -you save any file, kind of defeating the point of autoloading. - -\(fn)" t nil) - -(autoload 'godoc "go-mode" "\ -Show Go documentation for a query, much like M-x man. - -\(fn QUERY)" t nil) - -(autoload 'go-download-play "go-mode" "\ -Downloads a paste from the playground and inserts it in a Go -buffer. Tries to look for a URL at point. - -\(fn URL)" t nil) - -;;;*** - -(provide 'go-mode-autoloads) -;; Local Variables: -;; version-control: never -;; no-byte-compile: t -;; no-update-autoloads: t -;; coding: utf-8 -;; End: -;;; go-mode-autoloads.el ends here diff --git a/stuff/go-mode.el b/stuff/go-mode.el deleted file mode 100644 index e569aa0..0000000 --- a/stuff/go-mode.el +++ /dev/null @@ -1,2009 +0,0 @@ -;;; go-mode.el --- Major mode for the Go programming language - -;;; Commentary: - -;; Copyright 2013 The go-mode Authors. All rights reserved. -;; Use of this source code is governed by a BSD-style -;; license that can be found in the LICENSE file. - -;; Author: The go-mode Authors -;; Version: 1.5.0 -;; Keywords: languages go -;; URL: https://github.com/dominikh/go-mode.el -;; -;; This file is not part of GNU Emacs. - -;;; Code: - -(require 'cl-lib) -(require 'compile) -(require 'etags) -(require 'ffap) -(require 'find-file) -(require 'ring) -(require 'url) -(require 'xref nil :noerror) ; xref is new in Emacs 25.1 - - -(eval-when-compile - (defmacro go--forward-word (&optional arg) - (if (fboundp 'forward-word-strictly) - `(forward-word-strictly ,arg) - `(forward-word ,arg)))) - -(defun go--delete-whole-line (&optional arg) - "Delete the current line without putting it in the `kill-ring'. -Derived from function `kill-whole-line'. ARG is defined as for that -function." - (setq arg (or arg 1)) - (if (and (> arg 0) - (eobp) - (save-excursion (forward-visible-line 0) (eobp))) - (signal 'end-of-buffer nil)) - (if (and (< arg 0) - (bobp) - (save-excursion (end-of-visible-line) (bobp))) - (signal 'beginning-of-buffer nil)) - (cond ((zerop arg) - (delete-region (progn (forward-visible-line 0) (point)) - (progn (end-of-visible-line) (point)))) - ((< arg 0) - (delete-region (progn (end-of-visible-line) (point)) - (progn (forward-visible-line (1+ arg)) - (unless (bobp) - (backward-char)) - (point)))) - (t - (delete-region (progn (forward-visible-line 0) (point)) - (progn (forward-visible-line arg) (point)))))) - -(defun go-goto-opening-parenthesis (&optional _legacy-unused) - "Move up one level of parentheses." - ;; The old implementation of go-goto-opening-parenthesis had an - ;; optional argument to speed up the function. It didn't change the - ;; function's outcome. - - ;; Silently fail if there's no matching opening parenthesis. - (condition-case nil - (backward-up-list) - (scan-error nil))) - - -(defconst go-dangling-operators-regexp "[^-]-\\|[^+]\\+\\|[/*&><.=|^]") -(defconst go--max-dangling-operator-length 2 - "The maximum length of dangling operators. -This must be at least the length of the longest string matched by -‘go-dangling-operators-regexp.’, and must be updated whenever -that constant is changed.") - -(defconst go-identifier-regexp "[[:word:][:multibyte:]]+") -(defconst go-type-name-no-prefix-regexp "\\(?:[[:word:][:multibyte:]]+\\.\\)?[[:word:][:multibyte:]]+") -(defconst go-qualified-identifier-regexp (concat go-identifier-regexp "\\." go-identifier-regexp)) -(defconst go-label-regexp go-identifier-regexp) -(defconst go-type-regexp "[[:word:][:multibyte:]*]+") -(defconst go-func-regexp (concat "\\_\\s *\\(" go-identifier-regexp "\\)")) -(defconst go-func-meth-regexp (concat - "\\_\\s *\\(?:(\\s *" - "\\(" go-identifier-regexp "\\s +\\)?" go-type-regexp - "\\s *)\\s *\\)?\\(" - go-identifier-regexp - "\\)(")) - -(defconst go-builtins - '("append" "cap" "close" "complex" "copy" - "delete" "imag" "len" "make" "new" - "panic" "print" "println" "real" "recover") - "All built-in functions in the Go language. Used for font locking.") - -(defconst go-mode-keywords - '("break" "default" "func" "interface" "select" - "case" "defer" "go" "map" "struct" - "chan" "else" "goto" "package" "switch" - "const" "fallthrough" "if" "range" "type" - "continue" "for" "import" "return" "var") - "All keywords in the Go language. Used for font locking.") - -(defconst go-constants '("nil" "true" "false" "iota")) -(defconst go-type-name-regexp (concat "\\(?:[*(]\\)*\\(\\(?:" go-identifier-regexp "\\.\\)?" go-identifier-regexp "\\)")) - -;; Maximum number of identifiers that can be highlighted as type names -;; in one function type/declaration. -(defconst go--font-lock-func-param-num-groups 16) - -(defvar go-dangling-cache) -(defvar go-godoc-history nil) -(defvar go--coverage-current-file-name) - -(defgroup go nil - "Major mode for editing Go code." - :link '(url-link "https://github.com/dominikh/go-mode.el") - :group 'languages) - -(defgroup go-cover nil - "Options specific to `cover`." - :group 'go) - -(defgroup godoc nil - "Options specific to `godoc'." - :group 'go) - -(defcustom go-fontify-function-calls t - "Fontify function and method calls if this is non-nil." - :type 'boolean - :group 'go) - -(defcustom go-mode-hook nil - "Hook called by `go-mode'." - :type 'hook - :group 'go) - -(defcustom go-command "go" - "The 'go' command. -Some users have multiple Go development trees and invoke the 'go' -tool via a wrapper that sets GOROOT and GOPATH based on the -current directory. Such users should customize this variable to -point to the wrapper script." - :type 'string - :group 'go) - -(defcustom gofmt-command "gofmt" - "The 'gofmt' command. -Some users may replace this with 'goimports' -from https://golang.org/x/tools/cmd/goimports." - :type 'string - :group 'go) - -(defcustom gofmt-args nil - "Additional arguments to pass to gofmt." - :type '(repeat string) - :group 'go) - -(defcustom gofmt-show-errors 'buffer - "Where to display gofmt error output. -It can either be displayed in its own buffer, in the echo area, or not at all. - -Please note that Emacs outputs to the echo area when writing -files and will overwrite gofmt's echo output if used from inside -a `before-save-hook'." - :type '(choice - (const :tag "Own buffer" buffer) - (const :tag "Echo area" echo) - (const :tag "None" nil)) - :group 'go) - -(defcustom godef-command "godef" - "The 'godef' command." - :type 'string - :group 'go) - -(defcustom go-other-file-alist - '(("_test\\.go\\'" (".go")) - ("\\.go\\'" ("_test.go"))) - "See the documentation of `ff-other-file-alist' for details." - :type '(repeat (list regexp (choice (repeat string) function))) - :group 'go) - -(defcustom go-packages-function 'go-packages-native - "Function called by `go-packages' to determine the list of available packages. -This is used in e.g. tab completion in `go-import-add'. - -This package provides two functions: `go-packages-native' uses -elisp to find all .a files in all /pkg/ directories. -`go-packages-go-list' uses 'go list all' to determine all Go -packages. `go-packages-go-list' generally produces more accurate -results, but can be slower than `go-packages-native'." - :type 'function - :package-version '(go-mode . 1.4.0) - :group 'go) - -(defcustom go-guess-gopath-functions (list #'go-godep-gopath - #'go-wgo-gopath - #'go-gb-gopath - #'go-plain-gopath) - "Functions to call in sequence to detect a project's GOPATH. - -The functions in this list will be called one after another, -until a function returns non-nil. The order of the functions in -this list is important, as some project layouts may superficially -look like others. For example, a subset of wgo projects look like -gb projects. That's why we need to detect wgo first, to avoid -mis-identifying them as gb projects." - :type '(repeat function) - :group 'go) - -(defcustom godoc-command "go doc" - "Which executable to use for `godoc'. -This can either be 'godoc' or 'go doc', both as an absolute path -or an executable in PATH." - :type 'string - :group 'go) - -(defcustom godoc-and-godef-command "godoc" - "Which executable to use for `godoc' in `godoc-and-godef-command'. -Must be 'godoc' and not 'go doc' and can be an absolute path or -an executable in PATH." - :type 'string - :group 'go) - -(defcustom godoc-use-completing-read nil - "Provide auto-completion for godoc. -Only really desirable when using `godoc' instead of `go doc'." - :type 'boolean - :group 'godoc) - -(defcustom godoc-at-point-function #'godoc-and-godef - "Function to call to display the documentation for an -identifier at a given position. - -This package provides two functions: `godoc-and-godef' uses a -combination of godef and godoc to find the documentation. This -approach has several caveats. See its documentation for more -information. The second function, `godoc-gogetdoc' uses an -additional tool that correctly determines the documentation for -any identifier. It provides better results than -`godoc-and-godef'." - :type 'function - :group 'godoc) - -(defun godoc-and-godef (point) - "Use a combination of godef and godoc to guess the documentation at POINT. - -Due to a limitation in godoc, it is not possible to differentiate -between functions and methods, which may cause `godoc-at-point' -to display more documentation than desired. Furthermore, it -doesn't work on package names or variables. - -Consider using ‘godoc-gogetdoc’ instead for more accurate results." - (condition-case nil - (let* ((output (godef--call point)) - (file (car output)) - (name-parts (split-string (cadr output) " ")) - (first (car name-parts))) - (if (not (godef--successful-p file)) - (message "%s" (godef--error file)) - (go--godoc (format "%s %s" - (file-name-directory file) - (if (or (string= first "type") (string= first "const")) - (cadr name-parts) - (car name-parts))) - godoc-and-godef-command))) - (file-error (message "Could not run godef binary")))) - -(defun godoc-gogetdoc (point) - "Use the gogetdoc tool to find the documentation for an identifier at POINT. - -You can install gogetdoc with 'go get -u github.com/zmb3/gogetdoc'." - (if (not (buffer-file-name (go--coverage-origin-buffer))) - ;; TODO: gogetdoc supports unsaved files, but not introducing - ;; new artifical files, so this limitation will stay for now. - (error "Cannot use gogetdoc on a buffer without a file name")) - (let ((posn (format "%s:#%d" (shell-quote-argument (file-truename buffer-file-name)) (1- (position-bytes point)))) - (out (godoc--get-buffer ""))) - (with-current-buffer (get-buffer-create "*go-gogetdoc-input*") - (setq buffer-read-only nil) - (erase-buffer) - (go--insert-modified-files) - (call-process-region (point-min) (point-max) "gogetdoc" nil out nil - "-modified" - (format "-pos=%s" posn))) - (with-current-buffer out - (goto-char (point-min)) - (godoc-mode) - (display-buffer (current-buffer) t)))) - -(defun go--kill-new-message (url) - "Make URL the latest kill and print a message." - (kill-new url) - (message "%s" url)) - -(defcustom go-play-browse-function 'go--kill-new-message - "Function to call with the Playground URL. -See `go-play-region' for more details." - :type '(choice - (const :tag "Nothing" nil) - (const :tag "Kill + Message" go--kill-new-message) - (const :tag "Browse URL" browse-url) - (function :tag "Call function")) - :group 'go) - -(defcustom go-coverage-display-buffer-func 'display-buffer-reuse-window - "How `go-coverage' should display the coverage buffer. -See `display-buffer' for a list of possible functions." - :type 'function - :group 'go-cover) - -(defface go-coverage-untracked - '((t (:foreground "#505050"))) - "Coverage color of untracked code." - :group 'go-cover) - -(defface go-coverage-0 - '((t (:foreground "#c00000"))) - "Coverage color for uncovered code." - :group 'go-cover) -(defface go-coverage-1 - '((t (:foreground "#808080"))) - "Coverage color for covered code with weight 1." - :group 'go-cover) -(defface go-coverage-2 - '((t (:foreground "#748c83"))) - "Coverage color for covered code with weight 2." - :group 'go-cover) -(defface go-coverage-3 - '((t (:foreground "#689886"))) - "Coverage color for covered code with weight 3." - :group 'go-cover) -(defface go-coverage-4 - '((t (:foreground "#5ca489"))) - "Coverage color for covered code with weight 4." - :group 'go-cover) -(defface go-coverage-5 - '((t (:foreground "#50b08c"))) - "Coverage color for covered code with weight 5." - :group 'go-cover) -(defface go-coverage-6 - '((t (:foreground "#44bc8f"))) - "Coverage color for covered code with weight 6." - :group 'go-cover) -(defface go-coverage-7 - '((t (:foreground "#38c892"))) - "Coverage color for covered code with weight 7." - :group 'go-cover) -(defface go-coverage-8 - '((t (:foreground "#2cd495"))) - "Coverage color for covered code with weight 8. -For mode=set, all covered lines will have this weight." - :group 'go-cover) -(defface go-coverage-9 - '((t (:foreground "#20e098"))) - "Coverage color for covered code with weight 9." - :group 'go-cover) -(defface go-coverage-10 - '((t (:foreground "#14ec9b"))) - "Coverage color for covered code with weight 10." - :group 'go-cover) -(defface go-coverage-covered - '((t (:foreground "#2cd495"))) - "Coverage color of covered code." - :group 'go-cover) - -(defvar go-mode-syntax-table - (let ((st (make-syntax-table))) - (modify-syntax-entry ?+ "." st) - (modify-syntax-entry ?- "." st) - (modify-syntax-entry ?% "." st) - (modify-syntax-entry ?& "." st) - (modify-syntax-entry ?| "." st) - (modify-syntax-entry ?^ "." st) - (modify-syntax-entry ?! "." st) - (modify-syntax-entry ?= "." st) - (modify-syntax-entry ?< "." st) - (modify-syntax-entry ?> "." st) - (modify-syntax-entry ?/ ". 124b" st) - (modify-syntax-entry ?* ". 23" st) - (modify-syntax-entry ?\n "> b" st) - (modify-syntax-entry ?\" "\"" st) - (modify-syntax-entry ?\' "\"" st) - (modify-syntax-entry ?` "\"" st) - (modify-syntax-entry ?\\ "\\" st) - ;; TODO make _ a symbol constituent now that xemacs is gone - (modify-syntax-entry ?_ "w" st) - - st) - "Syntax table for Go mode.") - -(defun go--build-font-lock-keywords () - ;; we cannot use 'symbols in regexp-opt because GNU Emacs <24 - ;; doesn't understand that - (append - `((go--match-func - ,@(mapcar (lambda (x) `(,x font-lock-type-face)) - (number-sequence 1 go--font-lock-func-param-num-groups))) - (,(concat "\\_<" (regexp-opt go-mode-keywords t) "\\_>") . font-lock-keyword-face) - (,(concat "\\(\\_<" (regexp-opt go-builtins t) "\\_>\\)[[:space:]]*(") 1 font-lock-builtin-face) - (,(concat "\\_<" (regexp-opt go-constants t) "\\_>") . font-lock-constant-face) - (,go-func-regexp 1 font-lock-function-name-face)) ;; function (not method) name - - (if go-fontify-function-calls - `((,(concat "\\(" go-identifier-regexp "\\)[[:space:]]*(") 1 font-lock-function-name-face) ;; function call/method name - (,(concat "[^[:word:][:multibyte:]](\\(" go-identifier-regexp "\\))[[:space:]]*(") 1 font-lock-function-name-face)) ;; bracketed function call - `((,go-func-meth-regexp 2 font-lock-function-name-face))) ;; method name - - `( - ("\\(`[^`]*`\\)" 1 font-lock-multiline) ;; raw string literal, needed for font-lock-syntactic-keywords - (,(concat "\\_[[:space:]]+\\([^[:space:](]+\\)") 1 font-lock-type-face) ;; types - (,(concat "\\_[[:space:]]+" go-identifier-regexp "[[:space:]]*" go-type-name-regexp) 1 font-lock-type-face) ;; types - (,(concat "[^[:word:][:multibyte:]]\\[\\([[:digit:]]+\\|\\.\\.\\.\\)?\\]" go-type-name-regexp) 2 font-lock-type-face) ;; Arrays/slices - (,(concat "\\(" go-identifier-regexp "\\)" "{") 1 font-lock-type-face) - (,(concat "\\_\\[[^]]+\\]" go-type-name-regexp) 1 font-lock-type-face) ;; map value type - (,(concat "\\_\\[" go-type-name-regexp) 1 font-lock-type-face) ;; map key type - (,(concat "\\_[[:space:]]*\\(?:<-[[:space:]]*\\)?" go-type-name-regexp) 1 font-lock-type-face) ;; channel type - (,(concat "\\_<\\(?:new\\|make\\)\\_>\\(?:[[:space:]]\\|)\\)*(" go-type-name-regexp) 1 font-lock-type-face) ;; new/make type - ;; TODO do we actually need this one or isn't it just a function call? - (,(concat "\\.\\s *(" go-type-name-regexp) 1 font-lock-type-face) ;; Type conversion - ;; Like the original go-mode this also marks compound literal - ;; fields. There, it was marked as to fix, but I grew quite - ;; accustomed to it, so it'll stay for now. - (,(concat "^[[:space:]]*\\(" go-label-regexp "\\)[[:space:]]*:\\(\\S.\\|$\\)") 1 font-lock-constant-face) ;; Labels and compound literal fields - (,(concat "\\_<\\(goto\\|break\\|continue\\)\\_>[[:space:]]*\\(" go-label-regexp "\\)") 2 font-lock-constant-face)))) ;; labels in goto/break/continue - -(let ((m (define-prefix-command 'go-goto-map))) - (define-key m "a" #'go-goto-arguments) - (define-key m "d" #'go-goto-docstring) - (define-key m "f" #'go-goto-function) - (define-key m "i" #'go-goto-imports) - (define-key m "m" #'go-goto-method-receiver) - (define-key m "n" #'go-goto-function-name) - (define-key m "r" #'go-goto-return-values)) - -(defvar go-mode-map - (let ((m (make-sparse-keymap))) - (unless (boundp 'electric-indent-chars) - (define-key m "}" #'go-mode-insert-and-indent) - (define-key m ")" #'go-mode-insert-and-indent)) - (define-key m (kbd "C-c C-a") #'go-import-add) - (define-key m (kbd "C-c C-j") #'godef-jump) - (define-key m (kbd "C-x 4 C-c C-j") #'godef-jump-other-window) - (define-key m (kbd "C-c C-d") #'godef-describe) - (define-key m (kbd "C-c C-f") 'go-goto-map) - m) - "Keymap used by ‘go-mode’.") - -(easy-menu-define go-mode-menu go-mode-map - "Menu for Go mode." - '("Go" - ["Describe Expression" godef-describe t] - ["Jump to Definition" godef-jump t] - "---" - ["Add Import" go-import-add t] - ["Remove Unused Imports" go-remove-unused-imports t] - ["Go to Imports" go-goto-imports t] - "---" - ("Playground" - ["Send Buffer" go-play-buffer t] - ["Send Region" go-play-region t] - ["Download" go-download-play t]) - "---" - ["Coverage" go-coverage t] - ["Gofmt" gofmt t] - ["Godoc" godoc t] - "---" - ["Customize Mode" (customize-group 'go) t])) - -(defun go-mode-insert-and-indent (key) - "Invoke the global binding of KEY, then reindent the line." - - (interactive (list (this-command-keys))) - (call-interactively (lookup-key (current-global-map) key)) - (indent-according-to-mode)) - -(defmacro go-paren-level () - `(car (syntax-ppss))) - -(defmacro go-in-string-or-comment-p () - `(nth 8 (syntax-ppss))) - -(defmacro go-in-string-p () - `(nth 3 (syntax-ppss))) - -(defmacro go-in-comment-p () - `(nth 4 (syntax-ppss))) - -(defmacro go-goto-beginning-of-string-or-comment () - `(goto-char (nth 8 (syntax-ppss)))) - -(defun go--backward-irrelevant (&optional stop-at-string) - "Skip backwards over any characters that are irrelevant for -indentation and related tasks. - -It skips over whitespace, comments, cases and labels and, if -STOP-AT-STRING is not true, over strings." - - (let (pos (start-pos (point))) - (skip-chars-backward "\n\s\t") - (if (and (save-excursion (beginning-of-line) (go-in-string-p)) - (= (char-before) ?`) - (not stop-at-string)) - (backward-char)) - (if (and (go-in-string-p) - (not stop-at-string)) - (go-goto-beginning-of-string-or-comment)) - (if (looking-back "\\*/" (line-beginning-position)) - (backward-char)) - (if (go-in-comment-p) - (go-goto-beginning-of-string-or-comment)) - (setq pos (point)) - (beginning-of-line) - (if (or (looking-at (concat "^" go-label-regexp ":")) - (looking-at "^[[:space:]]*\\(case .+\\|default\\):")) - (end-of-line 0) - (goto-char pos)) - (if (/= start-pos (point)) - (go--backward-irrelevant stop-at-string)) - (/= start-pos (point)))) - -(defun go--buffer-narrowed-p () - "Return non-nil if the current buffer is narrowed." - (/= (buffer-size) - (- (point-max) - (point-min)))) - -(defun go-previous-line-has-dangling-op-p () - "Return non-nil if the current line is a continuation line." - (let* ((cur-line (line-number-at-pos)) - (val (gethash cur-line go-dangling-cache 'nope))) - (if (or (go--buffer-narrowed-p) (equal val 'nope)) - (save-excursion - (beginning-of-line) - (go--backward-irrelevant t) - (setq val (looking-back go-dangling-operators-regexp - (- (point) go--max-dangling-operator-length))) - (if (not (go--buffer-narrowed-p)) - (puthash cur-line val go-dangling-cache)))) - val)) - -(defun go--at-function-definition () - "Return non-nil if point is on the opening curly brace of a -function definition. - -We do this by first calling (beginning-of-defun), which will take -us to the start of *some* function. We then look for the opening -curly brace of that function and compare its position against the -curly brace we are checking. If they match, we return non-nil." - (if (= (char-after) ?\{) - (save-excursion - (let ((old-point (point)) - start-nesting) - (beginning-of-defun) - (when (looking-at "func ") - (setq start-nesting (go-paren-level)) - (skip-chars-forward "^{") - (while (> (go-paren-level) start-nesting) - (forward-char) - (skip-chars-forward "^{") 0) - (if (and (= (go-paren-level) start-nesting) (= old-point (point))) - t)))))) - -(defun go--indentation-for-opening-parenthesis () - "Return the semantic indentation for the current opening parenthesis. - -If point is on an opening curly brace and said curly brace -belongs to a function declaration, the indentation of the func -keyword will be returned. Otherwise the indentation of the -current line will be returned." - (save-excursion - (if (go--at-function-definition) - (progn - (beginning-of-defun) - (current-indentation)) - (current-indentation)))) - -(defun go-indentation-at-point () - (save-excursion - (let (start-nesting) - (back-to-indentation) - (setq start-nesting (go-paren-level)) - - (cond - ((go-in-string-p) - (current-indentation)) - ((looking-at "[])}]") - (go-goto-opening-parenthesis) - (if (go-previous-line-has-dangling-op-p) - (- (current-indentation) tab-width) - (go--indentation-for-opening-parenthesis))) - ((progn (go--backward-irrelevant t) - (looking-back go-dangling-operators-regexp - (- (point) go--max-dangling-operator-length))) - ;; only one nesting for all dangling operators in one operation - (if (go-previous-line-has-dangling-op-p) - (current-indentation) - (+ (current-indentation) tab-width))) - ((zerop (go-paren-level)) - 0) - ((progn (go-goto-opening-parenthesis) (< (go-paren-level) start-nesting)) - (if (go-previous-line-has-dangling-op-p) - (current-indentation) - (+ (go--indentation-for-opening-parenthesis) tab-width))) - (t - (current-indentation)))))) - -(defun go-mode-indent-line () - (interactive) - (let (indent - shift-amt - (pos (- (point-max) (point))) - (point (point)) - (beg (line-beginning-position))) - (back-to-indentation) - (if (go-in-string-or-comment-p) - (goto-char point) - (setq indent (go-indentation-at-point)) - (if (looking-at (concat go-label-regexp ":\\([[:space:]]*/.+\\)?$\\|case .+:\\|default:")) - (cl-decf indent tab-width)) - (setq shift-amt (- indent (current-column))) - (if (zerop shift-amt) - nil - (delete-region beg (point)) - (indent-to indent)) - ;; If initial point was within line's indentation, - ;; position after the indentation. Else stay at same point in text. - (if (> (- (point-max) pos) (point)) - (goto-char (- (point-max) pos)))))) - -(defun go-beginning-of-defun (&optional count) - (unless (bolp) - (end-of-line)) - (setq count (or count 1)) - (let (first failure) - (dotimes (i (abs count)) - (setq first t) - (while (and (not failure) - (or first (go-in-string-or-comment-p))) - (if (>= count 0) - (progn - (go--backward-irrelevant) - (if (not (re-search-backward go-func-meth-regexp nil t)) - (setq failure t))) - (if (looking-at go-func-meth-regexp) - (forward-char)) - (if (not (re-search-forward go-func-meth-regexp nil t)) - (setq failure t))) - (setq first nil))) - (if (< count 0) - (beginning-of-line)) - (not failure))) - -(defun go-end-of-defun () - (let (orig-level) - ;; It can happen that we're not placed before a function by emacs - (if (not (looking-at "func")) - (go-beginning-of-defun -1)) - ;; Find the { that starts the function, i.e., the next { that isn't - ;; preceded by struct or interface, or a comment or struct tag. BUG: - ;; breaks if there's a comment between the struct/interface keyword and - ;; bracket, like this: - ;; - ;; struct /* why? */ { - (while (progn - (skip-chars-forward "^{") - (forward-char) - (or (go-in-string-or-comment-p) - (looking-back "\\(struct\\|interface\\)\\s-*{" - (line-beginning-position))))) - (setq orig-level (go-paren-level)) - (while (>= (go-paren-level) orig-level) - (skip-chars-forward "^}") - (forward-char)))) - -(defun go--find-enclosing-parentheses (position) - "Return points of outermost '(' and ')' surrounding POSITION if -such parentheses exist. - -If outermost '(' exists but ')' does not, it returns the next blank -line or end-of-buffer position instead of the position of the closing -parenthesis. - -If the starting parenthesis is not found, it returns (POSITION -POSITION)." - (save-excursion - (let (beg end) - (goto-char position) - (while (> (go-paren-level) 0) - (re-search-backward "[(\\[{]" nil t) - (when (looking-at "(") - (setq beg (point)))) - (if (null beg) - (list position position) - (goto-char position) - (while (and (> (go-paren-level) 0) - (search-forward ")" nil t))) - (when (> (go-paren-level) 0) - (unless (re-search-forward "^[[:space:]]*$" nil t) - (goto-char (point-max)))) - (list beg (point)))))) - -(defun go--search-next-comma (end) - "Search forward from point for a comma whose nesting level is -the same as point. If it reaches the end of line or a closing -parenthesis before a comma, it stops at it." - (let ((orig-level (go-paren-level))) - (while (and (< (point) end) - (or (looking-at "[^,)\n]") - (> (go-paren-level) orig-level))) - (forward-char)) - (when (and (looking-at ",") - (< (point) (1- end))) - (forward-char)))) - -(defun go--looking-at-keyword () - (and (looking-at (concat "\\(" go-identifier-regexp "\\)")) - (member (match-string 1) go-mode-keywords))) - -(defun go--match-func (end) - "Search for identifiers used as type names from a function -parameter list, and set the identifier positions as the results -of last search. Return t if search succeeded." - (when (re-search-forward "\\_" end t) - (let ((regions (go--match-func-type-names end))) - (if (null regions) - ;; Nothing to highlight. This can happen if the current func - ;; is "func()". Try next one. - (go--match-func end) - ;; There are something to highlight. Set those positions as - ;; last search results. - (setq regions (go--filter-match-data regions end)) - (when regions - (set-match-data (go--make-match-data regions)) - t))))) - -(defun go--match-func-type-names (end) - (cond - ;; Function declaration (e.g. "func foo(") - ((looking-at (concat "[[:space:]\n]*" go-identifier-regexp "[[:space:]\n]*(")) - (goto-char (match-end 0)) - (nconc (go--match-parameter-list end) - (go--match-function-result end))) - ;; Method declaration, function literal, or function type - ((looking-at "[[:space:]]*(") - (goto-char (match-end 0)) - (let ((regions (go--match-parameter-list end))) - ;; Method declaration (e.g. "func (x y) foo(") - (when (looking-at (concat "[[:space:]]*" go-identifier-regexp "[[:space:]\n]*(")) - (goto-char (match-end 0)) - (setq regions (nconc regions (go--match-parameter-list end)))) - (nconc regions (go--match-function-result end)))))) - -(defun go--parameter-list-type (end) - "Return `present' if the parameter list has names, or `absent' if not. -Assumes point is at the beginning of a parameter list, just -after '('." - (save-excursion - (skip-chars-forward "[:space:]\n" end) - (cond ((> (point) end) - nil) - ((looking-at (concat go-identifier-regexp "[[:space:]\n]*,")) - (goto-char (match-end 0)) - (go--parameter-list-type end)) - ((or (looking-at go-qualified-identifier-regexp) - (looking-at (concat go-type-name-no-prefix-regexp "[[:space:]\n]*\\(?:)\\|\\'\\)")) - (go--looking-at-keyword) - (looking-at "[*\\[]\\|\\.\\.\\.\\|\\'")) - 'absent) - (t 'present)))) - -(defconst go--opt-dotdotdot-regexp "\\(?:\\.\\.\\.\\)?") -(defconst go--parameter-type-regexp - (concat go--opt-dotdotdot-regexp "[[:space:]*\n]*\\(" go-type-name-no-prefix-regexp "\\)[[:space:]\n]*\\([,)]\\|\\'\\)")) -(defconst go--func-type-in-parameter-list-regexp - (concat go--opt-dotdotdot-regexp "[[:space:]*\n]*\\(\\_" "\\)")) - -(defun go--match-parameters-common (identifier-regexp end) - (let ((acc ()) - (start -1)) - (while (progn (skip-chars-forward "[:space:]\n" end) - (and (not (looking-at "\\(?:)\\|\\'\\)")) - (< start (point)) - (<= (point) end))) - (setq start (point)) - (cond - ((looking-at (concat identifier-regexp go--parameter-type-regexp)) - (setq acc (nconc acc (list (match-beginning 1) (match-end 1)))) - (goto-char (match-beginning 2))) - ((looking-at (concat identifier-regexp go--func-type-in-parameter-list-regexp)) - (goto-char (match-beginning 1)) - (setq acc (nconc acc (go--match-func-type-names end))) - (go--search-next-comma end)) - (t - (go--search-next-comma end)))) - (when (and (looking-at ")") - (< (point) end)) - (forward-char)) - acc)) - -(defun go--match-parameters-with-identifier-list (end) - (go--match-parameters-common - (concat go-identifier-regexp "[[:space:]\n]+") - end)) - -(defun go--match-parameters-without-identifier-list (end) - (go--match-parameters-common "" end)) - -(defun go--filter-match-data (regions end) - "Remove points from REGIONS if they are beyond END. -REGIONS are a list whose size is multiple of 2. Element 2n is beginning of a -region and 2n+1 is end of it. - -This function is used to make sure we don't override end point -that `font-lock-mode' gave to us." - (when regions - (let* ((vec (vconcat regions)) - (i 0) - (len (length vec))) - (while (and (< i len) - (<= (nth i regions) end) - (<= (nth (1+ i) regions) end)) - (setq i (+ i 2))) - (cond ((= i len) - regions) - ((zerop i) - nil) - (t - (butlast regions (- (length regions) i))))))) - -(defun go--make-match-data (regions) - (let ((deficit (- (* 2 go--font-lock-func-param-num-groups) - (length regions)))) - (when (> deficit 0) - (let ((last (car (last regions)))) - (setq regions (nconc regions (make-list deficit last)))))) - `(,(car regions) ,@(last regions) ,@regions)) - -(defun go--match-parameter-list (end) - "Return a list of identifier positions that are used as type -names in a function parameter list, assuming point is at the -beginning of a parameter list. Return nil if the text after -point does not look like a parameter list. - -Set point to end of closing parenthesis on success. - -In Go, the names must either all be present or all be absent -within a list of parameters. - -Parsing a parameter list is a little bit complicated because we -have to scan through the parameter list to determine whether or -not the list has names. Until a type name is found or reaching -end of a parameter list, we are not sure which form the parameter -list is. - -For example, X and Y are type names in a parameter list \"(X, -Y)\" but are parameter names in \"(X, Y int)\". We cannot say if -X is a type name until we see int after Y. - -Note that even \"(int, float T)\" is a valid parameter -list. Builtin type names are not reserved words. In this example, -int and float are parameter names and only T is a type name. - -In this function, we first scan the parameter list to see if the -list has names, and then handle it accordingly." - (let ((name (go--parameter-list-type end))) - (cond ((eq name 'present) - (go--match-parameters-with-identifier-list end)) - ((eq name 'absent) - (go--match-parameters-without-identifier-list end)) - (t nil)))) - -(defun go--match-function-result (end) - "Return a list of identifier positions that are used as type -names in a function result, assuming point is at the beginning of -a result. - -Function result is a unparenthesized type or a parameter list." - (cond ((and (looking-at (concat "[[:space:]*]*\\(" go-type-name-no-prefix-regexp "\\)")) - (not (member (match-string 1) go-mode-keywords))) - (list (match-beginning 1) (match-end 1))) - ((looking-at "[[:space:]]*(") - (goto-char (match-end 0)) - (go--match-parameter-list end)) - (t nil))) - -(defun go--reset-dangling-cache-before-change (&optional _beg _end) - "Reset `go-dangling-cache'. - -This is intended to be called from `before-change-functions'." - (setq go-dangling-cache (make-hash-table :test 'eql))) - -;;;###autoload -(define-derived-mode go-mode prog-mode "Go" - "Major mode for editing Go source text. - -This mode provides (not just) basic editing capabilities for -working with Go code. It offers almost complete syntax -highlighting, indentation that is almost identical to gofmt and -proper parsing of the buffer content to allow features such as -navigation by function, manipulation of comments or detection of -strings. - -In addition to these core features, it offers various features to -help with writing Go code. You can directly run buffer content -through gofmt, read godoc documentation from within Emacs, modify -and clean up the list of package imports or interact with the -Playground (uploading and downloading pastes). - -The following extra functions are defined: - -- `gofmt' -- `godoc' and `godoc-at-point' -- `go-import-add' -- `go-remove-unused-imports' -- `go-goto-arguments' -- `go-goto-docstring' -- `go-goto-function' -- `go-goto-function-name' -- `go-goto-imports' -- `go-goto-return-values' -- `go-goto-method-receiver' -- `go-play-buffer' and `go-play-region' -- `go-download-play' -- `godef-describe' and `godef-jump' -- `go-coverage' -- `go-set-project' -- `go-reset-gopath' - -If you want to automatically run `gofmt' before saving a file, -add the following hook to your emacs configuration: - -\(add-hook 'before-save-hook #'gofmt-before-save) - -If you want to use `godef-jump' instead of etags (or similar), -consider binding godef-jump to `M-.', which is the default key -for `find-tag': - -\(add-hook 'go-mode-hook (lambda () - (local-set-key (kbd \"M-.\") #'godef-jump))) - -Please note that godef is an external dependency. You can install -it with - -go get github.com/rogpeppe/godef - - -If you're looking for even more integration with Go, namely -on-the-fly syntax checking, auto-completion and snippets, it is -recommended that you look at flycheck -\(see URL `https://github.com/flycheck/flycheck') or flymake in combination -with goflymake \(see URL `https://github.com/dougm/goflymake'), gocode -\(see URL `https://github.com/nsf/gocode'), go-eldoc -\(see URL `github.com/syohex/emacs-go-eldoc') and yasnippet-go -\(see URL `https://github.com/dominikh/yasnippet-go')" - - ;; Font lock - (set (make-local-variable 'font-lock-defaults) - '(go--build-font-lock-keywords)) - - ;; Indentation - (set (make-local-variable 'indent-line-function) #'go-mode-indent-line) - - ;; Comments - (set (make-local-variable 'comment-start) "// ") - (set (make-local-variable 'comment-end) "") - (set (make-local-variable 'comment-use-syntax) t) - (set (make-local-variable 'comment-start-skip) "\\(//+\\|/\\*+\\)\\s *") - - (set (make-local-variable 'beginning-of-defun-function) #'go-beginning-of-defun) - (set (make-local-variable 'end-of-defun-function) #'go-end-of-defun) - - (set (make-local-variable 'parse-sexp-lookup-properties) t) - (set (make-local-variable 'syntax-propertize-function) #'go-propertize-syntax) - - (if (boundp 'electric-indent-chars) - (set (make-local-variable 'electric-indent-chars) '(?\n ?} ?\)))) - - (set (make-local-variable 'compilation-error-screen-columns) nil) - - (set (make-local-variable 'go-dangling-cache) (make-hash-table :test 'eql)) - (add-hook 'before-change-functions #'go--reset-dangling-cache-before-change t t) - - ;; ff-find-other-file - (setq ff-other-file-alist 'go-other-file-alist) - - (setq imenu-generic-expression - '(("type" "^type *\\([^ \t\n\r\f]*\\)" 1) - ("func" "^func *\\(.*\\) {" 1))) - (imenu-add-to-menubar "Index") - - ;; Go style - (setq indent-tabs-mode t) - - ;; Handle unit test failure output in compilation-mode - ;; - ;; Note that we add our entry to the beginning of - ;; compilation-error-regexp-alist. In older versions of Emacs, the - ;; list was processed from the end, and we would've wanted to add - ;; ours last. But at some point this changed, and now the list is - ;; processed from the beginning. It's important that our entry comes - ;; before gnu, because gnu matches go test output, but includes the - ;; leading whitespace in the file name. - ;; - ;; http://lists.gnu.org/archive/html/bug-gnu-emacs/2001-12/msg00674.html - ;; documents the old, reverseed order. - (when (and (boundp 'compilation-error-regexp-alist) - (boundp 'compilation-error-regexp-alist-alist)) - (add-to-list 'compilation-error-regexp-alist 'go-test) - (add-to-list 'compilation-error-regexp-alist-alist - '(go-test . ("^\t+\\([^()\t\n]+\\):\\([0-9]+\\):? .*$" 1 2)) t))) - -;;;###autoload -(add-to-list 'auto-mode-alist (cons "\\.go\\'" 'go-mode)) - -(defun go--apply-rcs-patch (patch-buffer) - "Apply an RCS-formatted diff from PATCH-BUFFER to the current buffer." - (let ((target-buffer (current-buffer)) - ;; Relative offset between buffer line numbers and line numbers - ;; in patch. - ;; - ;; Line numbers in the patch are based on the source file, so - ;; we have to keep an offset when making changes to the - ;; buffer. - ;; - ;; Appending lines decrements the offset (possibly making it - ;; negative), deleting lines increments it. This order - ;; simplifies the forward-line invocations. - (line-offset 0)) - (save-excursion - (with-current-buffer patch-buffer - (goto-char (point-min)) - (while (not (eobp)) - (unless (looking-at "^\\([ad]\\)\\([0-9]+\\) \\([0-9]+\\)") - (error "Invalid rcs patch or internal error in go--apply-rcs-patch")) - (forward-line) - (let ((action (match-string 1)) - (from (string-to-number (match-string 2))) - (len (string-to-number (match-string 3)))) - (cond - ((equal action "a") - (let ((start (point))) - (forward-line len) - (let ((text (buffer-substring start (point)))) - (with-current-buffer target-buffer - (cl-decf line-offset len) - (goto-char (point-min)) - (forward-line (- from len line-offset)) - (insert text))))) - ((equal action "d") - (with-current-buffer target-buffer - (go--goto-line (- from line-offset)) - (cl-incf line-offset len) - (go--delete-whole-line len))) - (t - (error "Invalid rcs patch or internal error in go--apply-rcs-patch"))))))))) - -(defun gofmt--is-goimports-p () - (string-equal (file-name-base gofmt-command) "goimports")) - -(defun gofmt () - "Format the current buffer according to the gofmt tool." - (interactive) - (let ((tmpfile (make-temp-file "gofmt" nil ".go")) - (patchbuf (get-buffer-create "*Gofmt patch*")) - (errbuf (if gofmt-show-errors (get-buffer-create "*Gofmt Errors*"))) - (coding-system-for-read 'utf-8) - (coding-system-for-write 'utf-8) - our-gofmt-args) - - (unwind-protect - (save-restriction - (widen) - (if errbuf - (with-current-buffer errbuf - (setq buffer-read-only nil) - (erase-buffer))) - (with-current-buffer patchbuf - (erase-buffer)) - - (write-region nil nil tmpfile) - - (when (and (gofmt--is-goimports-p) buffer-file-name) - (setq our-gofmt-args - (append our-gofmt-args - ;; srcdir, despite its name, supports - ;; accepting a full path, and some features - ;; of goimports rely on knowing the full - ;; name. - (list "-srcdir" (file-truename buffer-file-name))))) - (setq our-gofmt-args (append our-gofmt-args - gofmt-args - (list "-w" tmpfile))) - (message "Calling gofmt: %s %s" gofmt-command our-gofmt-args) - ;; We're using errbuf for the mixed stdout and stderr output. This - ;; is not an issue because gofmt -w does not produce any stdout - ;; output in case of success. - (if (zerop (apply #'call-process gofmt-command nil errbuf nil our-gofmt-args)) - (progn - (if (zerop (call-process-region (point-min) (point-max) "diff" nil patchbuf nil "-n" "-" tmpfile)) - (message "Buffer is already gofmted") - (go--apply-rcs-patch patchbuf) - (message "Applied gofmt")) - (if errbuf (gofmt--kill-error-buffer errbuf))) - (message "Could not apply gofmt") - (if errbuf (gofmt--process-errors (buffer-file-name) tmpfile errbuf)))) - - (kill-buffer patchbuf) - (delete-file tmpfile)))) - - -(defun gofmt--process-errors (filename tmpfile errbuf) - (with-current-buffer errbuf - (if (eq gofmt-show-errors 'echo) - (progn - (message "%s" (buffer-string)) - (gofmt--kill-error-buffer errbuf)) - ;; Convert the gofmt stderr to something understood by the compilation mode. - (goto-char (point-min)) - (if (save-excursion - (save-match-data - (search-forward "flag provided but not defined: -srcdir" nil t))) - (insert "Your version of goimports is too old and doesn't support vendoring. Please update goimports!\n\n")) - (insert "gofmt errors:\n") - (let ((truefile - (if (gofmt--is-goimports-p) - (concat (file-name-directory filename) (file-name-nondirectory tmpfile)) - tmpfile))) - (while (search-forward-regexp (concat "^\\(" (regexp-quote truefile) "\\):") nil t) - (replace-match (file-name-nondirectory filename) t t nil 1))) - (compilation-mode) - (display-buffer errbuf)))) - -(defun gofmt--kill-error-buffer (errbuf) - (let ((win (get-buffer-window errbuf))) - (if win - (quit-window t win) - (kill-buffer errbuf)))) - -;;;###autoload -(defun gofmt-before-save () - "Add this to .emacs to run gofmt on the current buffer when saving: -\(add-hook 'before-save-hook 'gofmt-before-save). - -Note that this will cause ‘go-mode’ to get loaded the first time -you save any file, kind of defeating the point of autoloading." - - (interactive) - (when (eq major-mode 'go-mode) (gofmt))) - -(defun godoc--read-query () - "Read a godoc query from the minibuffer." - (if godoc-use-completing-read - (completing-read "godoc; " - (go-packages) nil nil nil 'go-godoc-history) - (read-from-minibuffer "godoc: " nil nil nil 'go-godoc-history))) - -(defun godoc--get-buffer (query) - "Get an empty buffer for a godoc QUERY." - (let* ((buffer-name (concat "*godoc " query "*")) - (buffer (get-buffer buffer-name))) - ;; Kill the existing buffer if it already exists. - (when buffer (kill-buffer buffer)) - (get-buffer-create buffer-name))) - -(defun godoc--buffer-sentinel (proc event) - "Sentinel function run when godoc command completes." - (with-current-buffer (process-buffer proc) - (cond ((string= event "finished\n") ;; Successful exit. - (goto-char (point-min)) - (godoc-mode) - (display-buffer (current-buffer) t)) - ((/= (process-exit-status proc) 0) ;; Error exit. - (let ((output (buffer-string))) - (kill-buffer (current-buffer)) - (message (concat "godoc: " output))))))) - -(define-derived-mode godoc-mode special-mode "Godoc" - "Major mode for showing Go documentation." - (view-mode-enter)) - -;;;###autoload -(defun godoc (query) - "Show Go documentation for QUERY, much like \\\\[man]." - (interactive (list (godoc--read-query))) - (go--godoc query godoc-command)) - -(defun go--godoc (query command) - (unless (string= query "") - (set-process-sentinel - (start-process-shell-command "godoc" (godoc--get-buffer query) - (concat command " " query)) - 'godoc--buffer-sentinel) - nil)) - -(defun godoc-at-point (point) - "Show Go documentation for the identifier at POINT. - -It uses `godoc-at-point-function' to look up the documentation." - (interactive "d") - (funcall godoc-at-point-function point)) - -(defun go-goto-imports () - "Move point to the block of imports. - -If using - - import ( - \"foo\" - \"bar\" - ) - -it will move point directly behind the last import. - -If using - - import \"foo\" - import \"bar\" - -it will move point to the next line after the last import. - -If no imports can be found, point will be moved after the package -declaration." - (interactive) - ;; FIXME if there's a block-commented import before the real - ;; imports, we'll jump to that one. - - ;; Generally, this function isn't very forgiving. it'll bark on - ;; extra whitespace. It works well for clean code. - (let ((old-point (point))) - (goto-char (point-min)) - (cond - ((re-search-forward "^import ()" nil t) - (backward-char 1) - 'block-empty) - ((re-search-forward "^import ([^)]+)" nil t) - (backward-char 2) - 'block) - ((re-search-forward "\\(^import \\([^\"]+ \\)?\"[^\"]+\"\n?\\)+" nil t) - 'single) - ((re-search-forward "^[[:space:]\n]*package .+?\n" nil t) - (message "No imports found, moving point after package declaration") - 'none) - (t - (goto-char old-point) - (message "No imports or package declaration found. Is this really a Go file?") - 'fail)))) - -(defun go-play-buffer () - "Like `go-play-region', but acts on the entire buffer." - (interactive) - (go-play-region (point-min) (point-max))) - -(defun go-play-region (start end) - "Send the region between START and END to the Playground. -If non-nil `go-play-browse-function' is called with the -Playground URL." - (interactive "r") - (let* ((url-request-method "POST") - (url-request-extra-headers - '(("Content-Type" . "application/x-www-form-urlencoded"))) - (url-request-data - (encode-coding-string - (buffer-substring-no-properties start end) - 'utf-8)) - (content-buf (url-retrieve - "https://play.golang.org/share" - (lambda (arg) - (cond - ((equal :error (car arg)) - (signal 'go-play-error (cdr arg))) - (t - (re-search-forward "\n\n") - (let ((url (format "https://play.golang.org/p/%s" - (buffer-substring (point) (point-max))))) - (when go-play-browse-function - (funcall go-play-browse-function url))))))))))) - -;;;###autoload -(defun go-download-play (url) - "Download a paste from the playground and insert it in a Go buffer. -Tries to look for a URL at point." - (interactive (list (read-from-minibuffer "Playground URL: " (ffap-url-p (ffap-string-at-point 'url))))) - (with-current-buffer - (let ((url-request-method "GET") url-request-data url-request-extra-headers) - (url-retrieve-synchronously (concat url ".go"))) - (let ((buffer (generate-new-buffer (concat (car (last (split-string url "/"))) ".go")))) - (goto-char (point-min)) - (re-search-forward "\n\n") - (copy-to-buffer buffer (point) (point-max)) - (kill-buffer) - (with-current-buffer buffer - (go-mode) - (switch-to-buffer buffer))))) - -(defun go-propertize-syntax (start end) - (save-excursion - (goto-char start) - (while (search-forward "\\" end t) - (put-text-property (1- (point)) (point) 'syntax-table (if (= (char-after) ?`) '(1) '(9)))))) - -(defun go-import-add (arg import) - "Add a new IMPORT to the list of imports. - -When called with a prefix ARG asks for an alternative name to -import the package as. - -If no list exists yet, one will be created if possible. - -If an identical import has been commented, it will be -uncommented, otherwise a new import will be added." - - ;; - If there's a matching `// import "foo"`, uncomment it - ;; - If we're in an import() block and there's a matching `"foo"`, uncomment it - ;; - Otherwise add a new import, with the appropriate syntax - (interactive - (list - current-prefix-arg - (replace-regexp-in-string "^[\"']\\|[\"']$" "" (completing-read "Package: " (go-packages))))) - (save-excursion - (let (as line import-start) - (if arg - (setq as (read-from-minibuffer "Import as: "))) - (if as - (setq line (format "%s \"%s\"" as import)) - (setq line (format "\"%s\"" import))) - - (goto-char (point-min)) - (if (re-search-forward (concat "^[[:space:]]*//[[:space:]]*import " line "$") nil t) - (uncomment-region (line-beginning-position) (line-end-position)) - (cl-case (go-goto-imports) - ('fail (message "Could not find a place to add import.")) - ('block-empty - (insert "\n\t" line "\n")) - ('block - (save-excursion - (re-search-backward "^import (") - (setq import-start (point))) - (if (re-search-backward (concat "^[[:space:]]*//[[:space:]]*" line "$") import-start t) - (uncomment-region (line-beginning-position) (line-end-position)) - (insert "\n\t" line))) - ('single (insert "import " line "\n")) - ('none (insert "\nimport (\n\t" line "\n)\n"))))))) - -(defun go-root-and-paths () - (let* ((output (process-lines go-command "env" "GOROOT" "GOPATH")) - (root (car output)) - (paths (split-string (cadr output) path-separator))) - (cons root paths))) - -(defun go--string-prefix-p (s1 s2 &optional ignore-case) - "Return non-nil if S1 is a prefix of S2. -If IGNORE-CASE is non-nil, the comparison is case-insensitive." - (eq t (compare-strings s1 nil nil - s2 0 (length s1) ignore-case))) - -(defun go--directory-dirs (dir) - "Recursively return all subdirectories in DIR." - (if (file-directory-p dir) - (let ((dir (directory-file-name dir)) - (dirs '()) - (files (directory-files dir nil nil t))) - (dolist (file files) - (unless (member file '("." "..")) - (let ((file (concat dir "/" file))) - (if (file-directory-p file) - (setq dirs (append (cons file - (go--directory-dirs file)) - dirs)))))) - dirs) - '())) - - -(defun go-packages () - (funcall go-packages-function)) - -(defun go-packages-native () - "Return a list of all installed Go packages. -It looks for archive files in /pkg/." - (sort - (delete-dups - (cl-mapcan - (lambda (topdir) - (let ((pkgdir (concat topdir "/pkg/"))) - (cl-mapcan (lambda (dir) - (mapcar (lambda (file) - (let ((sub (substring file (length pkgdir) -2))) - (unless (or (go--string-prefix-p "obj/" sub) (go--string-prefix-p "tool/" sub)) - (mapconcat #'identity (cdr (split-string sub "/")) "/")))) - (if (file-directory-p dir) - (directory-files dir t "\\.a$")))) - (if (file-directory-p pkgdir) - (go--directory-dirs pkgdir))))) - (go-root-and-paths))) - #'string<)) - -(defun go-packages-go-list () - "Return a list of all Go packages, using `go list'." - (process-lines go-command "list" "-e" "all")) - -(defun go-unused-imports-lines () - (reverse (remove nil - (mapcar - (lambda (line) - (when (string-match "^\\(.+\\):\\([[:digit:]]+\\): imported and not used: \".+\".*$" line) - (let ((error-file-name (match-string 1 line)) - (error-line-num (match-string 2 line))) - (if (string= (file-truename error-file-name) (file-truename buffer-file-name)) - (string-to-number error-line-num))))) - (split-string (shell-command-to-string - (concat go-command - (if (string-match "_test\\.go$" buffer-file-truename) - " test -c" - (concat " build -o " null-device)) - " -gcflags=-e" - " " - (shell-quote-argument (file-truename buffer-file-name)))) "\n"))))) - -(defun go-remove-unused-imports (arg) - "Remove all unused imports. -If ARG is non-nil, unused imports will be commented, otherwise -they will be removed completely." - (interactive "P") - (save-excursion - (let ((cur-buffer (current-buffer)) flymake-state lines) - (when (boundp 'flymake-mode) - (setq flymake-state flymake-mode) - (flymake-mode-off)) - (save-some-buffers nil (lambda () (equal cur-buffer (current-buffer)))) - (if (buffer-modified-p) - (message "Cannot operate on unsaved buffer") - (setq lines (go-unused-imports-lines)) - (dolist (import lines) - (go--goto-line import) - (beginning-of-line) - (if arg - (comment-region (line-beginning-position) (line-end-position)) - (go--delete-whole-line))) - (message "Removed %d imports" (length lines))) - (if flymake-state (flymake-mode-on))))) - -(defun godef--find-file-line-column (specifier other-window) - "Given a file name in the format of `filename:line:column', -visit FILENAME and go to line LINE and column COLUMN." - (if (not (string-match "\\(.+\\):\\([0-9]+\\):\\([0-9]+\\)" specifier)) - ;; We've only been given a directory name - (funcall (if other-window #'find-file-other-window #'find-file) specifier) - (let ((filename (match-string 1 specifier)) - (line (string-to-number (match-string 2 specifier))) - (column (string-to-number (match-string 3 specifier)))) - (funcall (if other-window #'find-file-other-window #'find-file) filename) - (go--goto-line line) - (beginning-of-line) - (forward-char (1- column)) - (if (buffer-modified-p) - (message "Buffer is modified, file position might not have been correct"))))) - -(defun godef--call (point) - "Call godef, acquiring definition position and expression -description at POINT." - (if (not (buffer-file-name (go--coverage-origin-buffer))) - (error "Cannot use godef on a buffer without a file name") - (let ((outbuf (generate-new-buffer "*godef*")) - (coding-system-for-read 'utf-8) - (coding-system-for-write 'utf-8)) - (prog2 - (call-process-region (point-min) - (point-max) - godef-command - nil - outbuf - nil - "-i" - "-t" - "-f" - (file-truename (buffer-file-name (go--coverage-origin-buffer))) - "-o" - (number-to-string (position-bytes point))) - (with-current-buffer outbuf - (split-string (buffer-substring-no-properties (point-min) (point-max)) "\n")) - (kill-buffer outbuf))))) - -(defun godef--successful-p (output) - (not (or (string= "-" output) - (string= "godef: no identifier found" output) - (go--string-prefix-p "godef: no declaration found for " output) - (go--string-prefix-p "error finding import path for " output)))) - -(defun godef--error (output) - (cond - ((godef--successful-p output) - nil) - ((string= "-" output) - "godef: expression is not defined anywhere") - (t - output))) - -(defun godef-describe (point) - "Describe the expression at POINT." - (interactive "d") - (condition-case nil - (let ((description (cdr (butlast (godef--call point) 1)))) - (if (not description) - (message "No description found for expression at point") - (message "%s" (mapconcat #'identity description "\n")))) - (file-error (message "Could not run godef binary")))) - -(defun godef-jump (point &optional other-window) - "Jump to the definition of the expression at POINT." - (interactive "d") - (condition-case nil - (let ((file (car (godef--call point)))) - (if (not (godef--successful-p file)) - (message "%s" (godef--error file)) - (push-mark) - (if (eval-when-compile (fboundp 'xref-push-marker-stack)) - ;; TODO: Integrate this facility with XRef. - (xref-push-marker-stack) - (ring-insert find-tag-marker-ring (point-marker))) - (godef--find-file-line-column file other-window))) - (file-error (message "Could not run godef binary")))) - -(defun godef-jump-other-window (point) - (interactive "d") - (godef-jump point t)) - -(defun go--goto-line (line) - (goto-char (point-min)) - (forward-line (1- line))) - -(defun go--line-column-to-point (line column) - (save-excursion - (go--goto-line line) - (forward-char (1- column)) - (point))) - -(cl-defstruct go--covered - start-line start-column end-line end-column covered count) - -(defun go--coverage-file () - "Return the coverage file to use, either by reading it from the -current coverage buffer or by prompting for it." - (if (boundp 'go--coverage-current-file-name) - go--coverage-current-file-name - (read-file-name "Coverage file: " nil nil t))) - -(defun go--coverage-origin-buffer () - "Return the buffer to base the coverage on." - (or (buffer-base-buffer) (current-buffer))) - -(defun go--coverage-face (count divisor) - "Return the intensity face for COUNT when using DIVISOR -to scale it to a range [0,10]. - -DIVISOR scales the absolute cover count to values from 0 to 10. -For DIVISOR = 0 the count will always translate to 8." - (let* ((norm (cond - ((= count 0) - -0.1) ;; Uncovered code, set to -0.1 so n becomes 0. - ((= divisor 0) - 0.8) ;; covermode=set, set to 0.8 so n becomes 8. - (t - (/ (log count) divisor)))) - (n (1+ (floor (* norm 9))))) ;; Convert normalized count [0,1] to intensity [0,10] - (concat "go-coverage-" (number-to-string n)))) - -(defun go--coverage-make-overlay (range divisor) - "Create a coverage overlay for a RANGE of covered/uncovered code. -Use DIVISOR to scale absolute counts to a [0,10] scale." - (let* ((count (go--covered-count range)) - (face (go--coverage-face count divisor)) - (ov (make-overlay (go--line-column-to-point (go--covered-start-line range) - (go--covered-start-column range)) - (go--line-column-to-point (go--covered-end-line range) - (go--covered-end-column range))))) - - (overlay-put ov 'face face) - (overlay-put ov 'help-echo (format "Count: %d" count)))) - -(defun go--coverage-clear-overlays () - "Remove existing overlays and put a single untracked overlay -over the entire buffer." - (remove-overlays) - (overlay-put (make-overlay (point-min) (point-max)) - 'face - 'go-coverage-untracked)) - -(defun go--coverage-parse-file (coverage-file file-name) - "Parse COVERAGE-FILE and extract coverage information and -divisor for FILE-NAME." - (let (ranges - (max-count 0)) - (with-temp-buffer - (insert-file-contents coverage-file) - (go--goto-line 2) ;; Skip over mode - (while (not (eobp)) - (let* ((parts (split-string (buffer-substring (point-at-bol) (point-at-eol)) ":")) - (file (car parts)) - (rest (split-string (nth 1 parts) "[., ]"))) - - (cl-destructuring-bind - (start-line start-column end-line end-column num count) - (mapcar #'string-to-number rest) - - (when (string= (file-name-nondirectory file) file-name) - (if (> count max-count) - (setq max-count count)) - (push (make-go--covered :start-line start-line - :start-column start-column - :end-line end-line - :end-column end-column - :covered (/= count 0) - :count count) - ranges))) - - (forward-line))) - - (list ranges (if (> max-count 0) (log max-count) 0))))) - -(defun go-coverage (&optional coverage-file) - "Open a clone of the current buffer and overlay it with -coverage information gathered via go test -coverprofile=COVERAGE-FILE. - -If COVERAGE-FILE is nil, it will either be inferred from the -current buffer if it's already a coverage buffer, or be prompted -for." - (interactive) - (let* ((cur-buffer (current-buffer)) - (origin-buffer (go--coverage-origin-buffer)) - (gocov-buffer-name (concat (buffer-name origin-buffer) "")) - (coverage-file (or coverage-file (go--coverage-file))) - (ranges-and-divisor (go--coverage-parse-file - coverage-file - (file-name-nondirectory (buffer-file-name origin-buffer)))) - (cov-mtime (nth 5 (file-attributes coverage-file))) - (cur-mtime (nth 5 (file-attributes (buffer-file-name origin-buffer))))) - - (if (< (float-time cov-mtime) (float-time cur-mtime)) - (message "Coverage file is older than the source file.")) - - (with-current-buffer (or (get-buffer gocov-buffer-name) - (make-indirect-buffer origin-buffer gocov-buffer-name t)) - (set (make-local-variable 'go--coverage-current-file-name) coverage-file) - - (save-excursion - (go--coverage-clear-overlays) - (dolist (range (car ranges-and-divisor)) - (go--coverage-make-overlay range (cadr ranges-and-divisor)))) - - (if (not (eq cur-buffer (current-buffer))) - (display-buffer (current-buffer) `(,go-coverage-display-buffer-func)))))) - -(defun go-goto-function (&optional arg) - "Go to the function defintion (named or anonymous) surrounding point. - -If we are on a docstring, follow the docstring down. -If no function is found, assume that we are at the top of a file -and search forward instead. - -If point is looking at the func keyword of an anonymous function, -go to the surrounding function. - -If ARG is non-nil, anonymous functions are ignored." - (interactive "P") - (let ((p (point))) - (cond - ((save-excursion - (beginning-of-line) - (looking-at "^//")) - ;; In case we are looking at the docstring, move on forward until we are - ;; not anymore - (beginning-of-line) - (while (looking-at "^//") - (forward-line 1)) - ;; If we are still not looking at a function, retry by calling self again. - (when (not (looking-at "\\")) - (go-goto-function arg))) - - ;; If we're already looking at an anonymous func, look for the - ;; surrounding function. - ((and (looking-at "\\") - (not (looking-at "^func\\>"))) - (re-search-backward "\\" nil t)) - - ((not (looking-at "\\")) - ;; If point is on the "func" keyword, step back a word and retry - (if (string= (symbol-name (symbol-at-point)) "func") - (backward-word) - ;; If we are not looking at the beginning of a function line, do a regexp - ;; search backwards - (re-search-backward "\\" nil t)) - - ;; If nothing is found, assume that we are at the top of the file and - ;; should search forward instead. - (when (not (looking-at "\\")) - (re-search-forward "\\" nil t) - (go--forward-word -1)) - - ;; If we have landed at an anonymous function, it is possible that we - ;; were not inside it but below it. If we were not inside it, we should - ;; go to the containing function. - (while (and (not (go--in-function-p p)) - (not (looking-at "^func\\>"))) - (go-goto-function arg))))) - - (cond - ((go-in-comment-p) - ;; If we are still in a comment, redo the call so that we get out of it. - (go-goto-function arg)) - - ((and (looking-at "\\")) - (go-goto-function)) - (let ((start (point))) - (go--goto-opening-curly-brace) - - (unless (looking-at "{") - (error "Expected to be looking at opening curly brace")) - (forward-list 1) - (and (>= compare-point start) - (<= compare-point (point)))))) - -(defun go-goto-function-name (&optional arg) - "Go to the name of the current function. - -If the function is a test, place point after 'Test'. -If the function is anonymous, place point on the 'func' keyword. - -If ARG is non-nil, anonymous functions are skipped." - (interactive "P") - (when (not (looking-at "\\")) - (go-goto-function arg)) - ;; If we are looking at func( we are on an anonymous function and - ;; nothing else should be done. - (when (not (looking-at "\\ -;; URL: http://github.com/AdamNiederer/ssass-mode -;; Version: 0.2.0 -;; Keywords: languages sass -;; Package-Requires: ((emacs "24.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: -;; This mode is a clone of sass-mode which works in mmm-mode and doesn't -;; indent things as eagerly. Syntax highlighting is provided with -;; `font-lock-mode'. -;; -;; Exported names start with "ssass-"; private names start with -;; "ssass--". - -;;; Code: - -(defgroup ssass nil - "Major mode for Sass files" - :prefix "ssass-" - :group 'languages - :link '(url-link :tag "Github" "https://github.com/AdamNiederer/ssass-mode") - :link '(emacs-commentary-link :tag "Commentary" "ssass-mode")) - -(defconst ssass-id-regex - "#[a-z][A-Za-z0-9\-]+") - -(defconst ssass-class-regex - "\\.[a-z][A-Za-z0-9\-]+") - -(defconst ssass-pseudoselector-regex - "::?[A-Za-z0-9\-]+") - -(defconst ssass-key-regex - "^\s+[a-z\-]+:") - -(defconst ssass-directive-noindent-regex - "@\\(include\\|extend\\|import\\|warn\\|debug\\|error\\)" - "Matches all directives which do not require indentation.") - -(defconst ssass-variable-regex - "\$[A-Za-z0-9\-]+") - -(defconst ssass-variable-assignment-regex - (concat ssass-variable-regex ":")) - -(defconst ssass-builtin-regex - "@[A-Za-z]+") - -(defconst ssass-comment-regex - "^\s+/[/*].*") ; TODO: Make better or use syntax table - -(defconst ssass-function-regex - "\\([A-Za-z\-]+?\\)\\((.*)\\)") - -(defconst ssass-keywords - '("and" "or" "not" "in" "from" "to" "through")) - -(defconst ssass-control-directives - '("@if" "@else" "@each" "@for")) - -(defconst ssass-function-directives - '("@function" "@return")) - -(defconst ssass-mixin-directives - '("@mixin" "@include")) - -(defconst ssass-constants - '("true" "false" "null")) - -(defconst ssass-bang-regex - "![a-z][A-Za-z0-9]+") - -(defcustom ssass-tab-width 2 - "Tab width for ‘ssass-mode’." - :group 'ssass - :type 'integer) - -(defcustom ssass-indent-blanks t - "Whether to indent blank lines." - :group 'ssass - :type 'boolean) - -(defcustom ssass-compiler "sassc" - "Sass compiler for `ssass-eval-region' and `ssass-eval-buffer'." - :group 'ssass - :type 'string) - -(defcustom ssass-opt "--sass" - "Options for `ssass-compiler'. - -Use --sass for sassc, and --indented-syntax for node-sass." - :group 'ssass - :type 'string) - -(defcustom ssass-color-keys nil - "(TODO) Whether to color proprty names." - :group 'ssass - :type 'boolean) - -(defconst ssass-font-lock-keywords - `((,ssass-id-regex . (0 font-lock-keyword-face)) - (,ssass-class-regex . (0 font-lock-type-face)) - (,ssass-key-regex . (0 font-lock-variable-name-face)) - (,ssass-function-regex . (1 font-lock-function-name-face)) - (,ssass-builtin-regex . (0 font-lock-builtin-face)) - (,ssass-pseudoselector-regex . (0 font-lock-function-name-face)) - (,ssass-variable-regex . (0 font-lock-variable-name-face)) - (,ssass-bang-regex . (0 font-lock-warning-face)) - (,(regexp-opt ssass-keywords 'words) . font-lock-keyword-face) - (,(regexp-opt ssass-control-directives 'words) . font-lock-keyword-face) - (,(regexp-opt ssass-function-directives 'words) . font-lock-keyword-face) - (,(regexp-opt ssass-constants 'words) . font-lock-constant-face)) - "List of Font Lock keywords.") - -(defvar ssass-mode-map - (let ((map (make-keymap))) - (define-key map (kbd "") 'ssass-dedent) - (define-key map (kbd "C-c C-c") 'ssass-eval-buffer) - (define-key map (kbd "C-c C-r") 'ssass-eval-region) - map) - "Keymap for ‘ssass-mode’.") - -(defun ssass--selector-p (line) - "Return whether LINE is a selector." - (not (or (string-empty-p line) - (string-match-p ssass-key-regex line) - (string-match-p ssass-variable-assignment-regex line) - (string-match-p ssass-directive-noindent-regex line) - (string-match-p ssass-comment-regex line)))) - -(defun ssass--goto-last-anchor-line () - "Move point to the line of the last selector, or the beginning of the buffer." - (forward-line -1) - (while (not (or (equal (point-min) (point-at-bol)) - (ssass--selector-p (buffer-substring (point-at-bol) (point-at-eol))))) - (forward-line -1))) - -(defun ssass--last-anchor-line-indent-level () - "Return the number of spaces indenting the line of the last selector." - (save-excursion - (ssass--goto-last-anchor-line) - (ssass--indent-level))) - -(defun ssass--indent-level () - "Return the number of spaces indenting the current line." - (- (save-excursion - (back-to-indentation) - (current-column)) - (save-excursion - (beginning-of-line) - (current-column)))) - -(defun ssass--whitespace-p (line) - "Return whether the line at offset from point LINE consists solely of whitespace." - (save-excursion - (forward-line line) - (string-match-p "^[[:space:]]*$" (buffer-substring (point-at-bol) (point-at-eol))))) - -(defun ssass--comma-before-p () - "Return whether the previous line has a comma at its end." - (save-excursion - (forward-line -1) - (string-match-p ",\\s-*$" (buffer-substring (point-at-bol) (point-at-eol))))) - -(defun ssass--no-anchor-line-p () - "Return whether there is no proper selector or keyword above this line." - (save-excursion - (ssass--goto-last-anchor-line) - (not (ssass--selector-p (buffer-substring (point-at-bol) (point-at-eol)))))) - -(defun ssass-indent () - "Indent the current line." - (interactive) - (indent-line-to - (cond - ((and (not ssass-indent-blanks) (ssass--whitespace-p 0)) 0) - ((ssass--whitespace-p -1) 0) - ((ssass--no-anchor-line-p) 0) - ((ssass--comma-before-p) (ssass--last-anchor-line-indent-level)) - (t (+ ssass-tab-width (ssass--last-anchor-line-indent-level)))))) - -(defun ssass-dedent () - "Remove one level of indentation from the current line." - (interactive) - (indent-line-to (max 0 (- (ssass--indent-level) ssass-tab-width)))) - -(defun ssass-eval-file (&optional filename) - "Run the given file through sass, and display the output in another window. - -If FILENAME is nil, it will open the current buffer's file" - (interactive) - (when (buffer-live-p (get-buffer "*sass*")) - (kill-buffer "*sass*")) - (start-process "sass" "*sass*" ssass-compiler ssass-opt (or filename (buffer-file-name))) - (switch-to-buffer-other-window "*sass*") - (special-mode)) - -(defun ssass-eval-region (beg end) - "Run the region from BEG to END through sass, and display the output in another window." - (interactive "r") - (let ((tmp-file (make-temp-file "sass-eval" nil ".sass"))) - (write-region beg end tmp-file nil nil nil nil) - (ssass-eval-file tmp-file) - (delete-file tmp-file)) ) - -(defun ssass-eval-buffer () - "Run the current buffer through sass, and display the output in another window." - (interactive) - (ssass-eval-region (point-min) (point-max))) - -;;;###autoload -(define-derived-mode ssass-mode prog-mode "Ssass" - "Major mode for Sass" - (setq-local electric-indent-mode nil) - (setq-local comment-start "//") - (setq-local comment-start-skip "\\(//+\\|/\\*+\\)\\s *") - (set (make-local-variable 'tab-width) ssass-tab-width) - (set (make-local-variable 'indent-line-function) 'ssass-indent) - (font-lock-add-keywords nil ssass-font-lock-keywords) - (modify-syntax-entry ?/ ". 124" ssass-mode-syntax-table) - (modify-syntax-entry ?* ". 23b" ssass-mode-syntax-table) - (modify-syntax-entry ?\n ">" ssass-mode-syntax-table)) - -(provide 'ssass-mode) -;;; ssass-mode.el ends here diff --git a/stuff/vue-html-mode.el b/stuff/vue-html-mode.el deleted file mode 100644 index d699d4c..0000000 --- a/stuff/vue-html-mode.el +++ /dev/null @@ -1,131 +0,0 @@ -;;; vue-html-mode.el --- Major mode for editing Vue.js templates - -;; Copyright 2016, 2017 Adam Niederer - -;; Author: Adam Niederer -;; URL: http://github.com/AdamNiederer/vue-html-mode -;; Version: 0.2.0 -;; Keywords: languages vue template -;; Package-Requires: () - -;; 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 main features of this mode are syntax highlighting (enabled with -;; `font-lock-mode' or `global-font-lock-mode'), and html-mode -;; integration -;; -;; Exported names start with "vue-html-"; private names start with -;; "vue-html--". -;; -;; TODO: Chained filters, possible code folding with overlays and colors - -;;; Code: - -(defgroup vue-html nil - "Major mode for vue template files" - :prefix "vue-html-" - :group 'languages - :link '(url-link :tag "Github" "https://github.com/AdamNiederer/vue-html-mode") - :link '(emacs-commentary-link :tag "Commentary" "vue-html-mode")) - -(defconst vue-html-complex-interp-regex - "\\({{\\)\\([^{].*?\\)?\\(|\\) *\\(.*?\\)(.*) *\\(}}\\)") - -(defconst vue-html-filter-interp-regex - "\\({{\\)\\([^{].*?\\)?\\(|\\) *\\([^\(\)]*?\\) *\\(}}\\)") - -(defconst vue-html-simple-interp-regex - "\\({{\\)\\(?:[^{].*?\\)?\\(}}\\)") - -(defconst vue-html-shorthand-regex - "\\s +\\([@:]\\)\\([A-z0-9-.]+\\)=.*?") - -(defconst vue-html-directive-regex - "\\b\\(v-[A-Za-z0-9-.]+\\)\\(:[A-z.]\\)?") - -(defconst vue-html-keyword-regex - "\\(v-\\(?:for\\|if\\|else-if\\|else\\|once\\)\\)[^-.A-Za-z0-9]") - -(defcustom vue-html-tab-width 2 - "Tab width for vue-html-mode." - :group 'vue-html - :type 'integer) - -(defcustom vue-html-extra-indent 0 - "The number of columns added to every line's indentation." - :group 'vue-html - :type 'integer) - -(defcustom vue-html-color-interpolations nil - "Whether to color the body of variable interpolations the same as delimiters. -Does not affect the colors of filters and their arguments." - :group 'vue-html - :type 'boolean) - -(defconst vue-html-color-interpolations-font-lock-keywords - `((,vue-html-simple-interp-regex . (0 font-lock-variable-name-face t)) - (,vue-html-filter-interp-regex . (2 font-lock-variable-name-face t)) - (,vue-html-complex-interp-regex . (2 font-lock-variable-name-face t))) - "List of Font Lock rules applied if `vue-html-color-interpolations' is non-nil.") - -(defconst vue-html-font-lock-keywords - `((,vue-html-simple-interp-regex . (1 font-lock-variable-name-face t)) - (,vue-html-simple-interp-regex . (2 font-lock-variable-name-face t)) - (,vue-html-filter-interp-regex . (1 font-lock-variable-name-face t)) - (,vue-html-filter-interp-regex . (3 font-lock-function-name-face t)) - (,vue-html-filter-interp-regex . (4 font-lock-function-name-face t)) - (,vue-html-filter-interp-regex . (5 font-lock-variable-name-face t)) - (,vue-html-complex-interp-regex . (1 font-lock-variable-name-face t)) - (,vue-html-complex-interp-regex . (3 font-lock-function-name-face t)) - (,vue-html-complex-interp-regex . (4 font-lock-function-name-face t)) - (,vue-html-complex-interp-regex . (5 font-lock-variable-name-face t)) - (,vue-html-directive-regex . (1 font-lock-builtin-face t)) - (,vue-html-shorthand-regex . (1 font-lock-builtin-face t)) - (,vue-html-shorthand-regex . (2 font-lock-variable-name-face t)) - (,vue-html-keyword-regex . (1 font-lock-keyword-face t))) - "List of Font Lock keywords which are applied regardless of settings.") - -(defvar vue-html-mode-map - (let ((map (make-keymap))) - map) - "Keymap for vue-html-mode.") - -(defun vue-html-last-line-p () - "Return whether point is on the last line in the buffer." - (save-excursion (= (line-number-at-pos) (line-number-at-pos (point-max))))) - -(defun vue-html-line-empty-p () - "Return whether point is on an empty line." - (string-match-p "^\s*$" (buffer-substring (point-at-bol) (point-at-eol)))) - -(defun vue-html-indent () - "Indent the line according to `vue-html-tab-width' and `vue-html-extra-indent'." - (cond - ((= 1 (line-number-at-pos)) (indent-line-to vue-html-extra-indent)) - ((and (vue-html-last-line-p) (vue-html-line-empty-p)) (indent-line-to 0)) - (t (sgml-indent-line)))) - -;;;###autoload -(define-derived-mode vue-html-mode html-mode "vue-html" - "Major mode for Vue.js templates." - (setq tab-width vue-html-tab-width) - (setq indent-line-function #'vue-html-indent) - (font-lock-add-keywords nil vue-html-font-lock-keywords) - (when vue-html-color-interpolations - (font-lock-add-keywords nil vue-html-color-interpolations-font-lock-keywords))) - -(provide 'vue-html-mode) -;;; vue-html-mode.el ends here