summaryrefslogtreecommitdiff
path: root/.emacs.d
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d')
-rw-r--r--.emacs.d/lisp/php-mode.el65
-rw-r--r--.emacs.d/lisp/php-project.el19
-rw-r--r--.emacs.d/lisp/yasnippet.el6
3 files changed, 42 insertions, 48 deletions
diff --git a/.emacs.d/lisp/php-mode.el b/.emacs.d/lisp/php-mode.el
index 38f1a1b..6b9e2ee 100644
--- a/.emacs.d/lisp/php-mode.el
+++ b/.emacs.d/lisp/php-mode.el
@@ -8,14 +8,14 @@
8;; Maintainer: USAMI Kenta <tadsan@zonu.me> 8;; Maintainer: USAMI Kenta <tadsan@zonu.me>
9;; URL: https://github.com/ejmr/php-mode 9;; URL: https://github.com/ejmr/php-mode
10;; Keywords: languages php 10;; Keywords: languages php
11;; Version: 1.19.0 11;; Version: 1.19.1
12;; Package-Requires: ((emacs "24") (cl-lib "0.5")) 12;; Package-Requires: ((emacs "24.3") (cl-lib "0.5"))
13;; License: GPL-3.0-or-later 13;; License: GPL-3.0-or-later
14 14
15(defconst php-mode-version-number "1.19.0" 15(defconst php-mode-version-number "1.19.1"
16 "PHP Mode version number.") 16 "PHP Mode version number.")
17 17
18(defconst php-mode-modified "2018-04-08" 18(defconst php-mode-modified "2018-05-12"
19 "PHP Mode build date.") 19 "PHP Mode build date.")
20 20
21;; This file is free software; you can redistribute it and/or 21;; This file is free software; you can redistribute it and/or
@@ -182,7 +182,7 @@ Turning this on will open it whenever `php-mode' is loaded."
182 "Apply the list of extra constant keywords `VALUE'. 182 "Apply the list of extra constant keywords `VALUE'.
183 183
184This function is called when the custom variable php-extra-constants 184This function is called when the custom variable php-extra-constants
185is updated. The web-mode-extra-constants list is appended to the list 185is updated. The web-mode-extra-constants list is appended to the list
186of constants when set." 186of constants when set."
187 ;; remove old keywords 187 ;; remove old keywords
188 (when (boundp 'php-extra-constants) 188 (when (boundp 'php-extra-constants)
@@ -350,7 +350,7 @@ Turning this on will force PEAR rules on all PHP files."
350 350
351(defcustom php-mode-warn-if-mumamo-off t 351(defcustom php-mode-warn-if-mumamo-off t
352 "Warn once per buffer if you try to indent a buffer without 352 "Warn once per buffer if you try to indent a buffer without
353mumamo-mode turned on. Detects if there are any HTML tags in the 353mumamo-mode turned on. Detects if there are any HTML tags in the
354buffer before warning, but this is is not very smart; e.g. if you 354buffer before warning, but this is is not very smart; e.g. if you
355have any tags inside a PHP string, it will be fooled." 355have any tags inside a PHP string, it will be fooled."
356 :type '(choice (const :tag "Warn" t) (const "Don't warn" nil))) 356 :type '(choice (const :tag "Warn" t) (const "Don't warn" nil)))
@@ -1107,8 +1107,7 @@ this ^ lineup"
1107 1107
1108(define-obsolete-face-alias 'php-annotations-annotation-face 'php-doc-annotation-tag "1.19.0") 1108(define-obsolete-face-alias 'php-annotations-annotation-face 'php-doc-annotation-tag "1.19.0")
1109 1109
1110(defvar php-mode--delayed-set-style nil) 1110(defvar-local php-mode--delayed-set-style nil)
1111(make-variable-buffer-local 'php-mode--delayed-set-style)
1112 1111
1113(defun php-set-style (stylename &optional dont-override) 1112(defun php-set-style (stylename &optional dont-override)
1114 "Set the current `php-mode' buffer to use the style STYLENAME. 1113 "Set the current `php-mode' buffer to use the style STYLENAME.
@@ -1188,6 +1187,7 @@ After setting the stylevars run hooks according to STYLENAME
1188 "Display informations useful for debugging PHP Mode." 1187 "Display informations useful for debugging PHP Mode."
1189 (interactive) 1188 (interactive)
1190 (require 'cus-edit) 1189 (require 'cus-edit)
1190 (require 'pkg-info nil t)
1191 (php-mode-debug--buffer 'init) 1191 (php-mode-debug--buffer 'init)
1192 (php-mode-debug--message "Feel free to report on GitHub what you noticed!") 1192 (php-mode-debug--message "Feel free to report on GitHub what you noticed!")
1193 (php-mode-debug--message "https://github.com/ejmr/php-mode/issues/new") 1193 (php-mode-debug--message "https://github.com/ejmr/php-mode/issues/new")
@@ -1197,10 +1197,13 @@ After setting the stylevars run hooks according to STYLENAME
1197 (php-mode-debug--message "--- PHP-MODE DEBUG BEGIN ---") 1197 (php-mode-debug--message "--- PHP-MODE DEBUG BEGIN ---")
1198 (php-mode-debug--message "versions: %s; %s" (emacs-version) (php-mode-version)) 1198 (php-mode-debug--message "versions: %s; %s" (emacs-version) (php-mode-version))
1199 (php-mode-debug--message "package-version: %s" 1199 (php-mode-debug--message "package-version: %s"
1200 (let ((pkg (and (boundp 'package-alist) 1200 (if (fboundp 'pkg-info)
1201 (cadr (assq 'php-mode package-alist))))) 1201 (pkg-info-version-info 'php-mode)
1202 (when (and pkg (member (package-desc-status pkg) '("unsigned" "dependency"))) 1202 (let ((pkg (and (boundp 'package-alist)
1203 (package-version-join (package-desc-version pkg))))) 1203 (cadr (assq 'php-mode package-alist)))))
1204 (when (and pkg (member (package-desc-status pkg) '("unsigned" "dependency")))
1205 (package-version-join (package-desc-version pkg))))))
1206
1204 (php-mode-debug--message "major-mode: %s" major-mode) 1207 (php-mode-debug--message "major-mode: %s" major-mode)
1205 (php-mode-debug--message "minor-modes: %s" 1208 (php-mode-debug--message "minor-modes: %s"
1206 (cl-loop for s in minor-mode-list 1209 (cl-loop for s in minor-mode-list
@@ -1236,13 +1239,13 @@ After setting the stylevars run hooks according to STYLENAME
1236 (c-init-language-vars php-mode) 1239 (c-init-language-vars php-mode)
1237 (c-common-init 'php-mode) 1240 (c-common-init 'php-mode)
1238 1241
1239 (set (make-local-variable 'font-lock-string-face) 'php-string) 1242 (setq-local font-lock-string-face 'php-string)
1240 (set (make-local-variable 'font-lock-keyword-face) 'php-keyword) 1243 (setq-local font-lock-keyword-face 'php-keyword)
1241 (set (make-local-variable 'font-lock-builtin-face) 'php-builtin) 1244 (setq-local font-lock-builtin-face 'php-builtin)
1242 (set (make-local-variable 'c-preprocessor-face-name) 'php-php-tag) 1245 (setq-local c-preprocessor-face-name 'php-php-tag)
1243 (set (make-local-variable 'font-lock-function-name-face) 'php-function-name) 1246 (setq-local font-lock-function-name-face 'php-function-name)
1244 (set (make-local-variable 'font-lock-variable-name-face) 'php-variable-name) 1247 (setq-local font-lock-variable-name-face 'php-variable-name)
1245 (set (make-local-variable 'font-lock-constant-face) 'php-constant) 1248 (setq-local font-lock-constant-face 'php-constant)
1246 1249
1247 (modify-syntax-entry ?_ "_" php-mode-syntax-table) 1250 (modify-syntax-entry ?_ "_" php-mode-syntax-table)
1248 (modify-syntax-entry ?` "\"" php-mode-syntax-table) 1251 (modify-syntax-entry ?` "\"" php-mode-syntax-table)
@@ -1251,7 +1254,7 @@ After setting the stylevars run hooks according to STYLENAME
1251 (modify-syntax-entry ?\n "> b" php-mode-syntax-table) 1254 (modify-syntax-entry ?\n "> b" php-mode-syntax-table)
1252 (modify-syntax-entry ?$ "'" php-mode-syntax-table) 1255 (modify-syntax-entry ?$ "'" php-mode-syntax-table)
1253 1256
1254 (set (make-local-variable 'syntax-propertize-function) #'php-syntax-propertize-function) 1257 (setq-local syntax-propertize-function #'php-syntax-propertize-function)
1255 (add-to-list (make-local-variable 'syntax-propertize-extend-region-functions) 1258 (add-to-list (make-local-variable 'syntax-propertize-extend-region-functions)
1256 #'php-syntax-propertize-extend-region) 1259 #'php-syntax-propertize-extend-region)
1257 1260
@@ -1285,8 +1288,7 @@ After setting the stylevars run hooks according to STYLENAME
1285 1288
1286 ;; syntax-begin-function is obsolete in Emacs 25.1 1289 ;; syntax-begin-function is obsolete in Emacs 25.1
1287 (with-no-warnings 1290 (with-no-warnings
1288 (set (make-local-variable 'syntax-begin-function) 1291 (setq-local syntax-begin-function 'c-beginning-of-syntax))
1289 'c-beginning-of-syntax))
1290 1292
1291 ;; We map the php-{beginning,end}-of-defun functions so that they 1293 ;; We map the php-{beginning,end}-of-defun functions so that they
1292 ;; replace the similar commands that we inherit from CC Mode. 1294 ;; replace the similar commands that we inherit from CC Mode.
@@ -1294,17 +1296,14 @@ After setting the stylevars run hooks according to STYLENAME
1294 ;; following two local variables, but we keep them for now until we 1296 ;; following two local variables, but we keep them for now until we
1295 ;; are completely sure their removal will not break any current 1297 ;; are completely sure their removal will not break any current
1296 ;; behavior or backwards compatibility. 1298 ;; behavior or backwards compatibility.
1297 (set (make-local-variable 'beginning-of-defun-function) 1299 (setq-local beginning-of-defun-function 'php-beginning-of-defun)
1298 'php-beginning-of-defun) 1300 (setq-local end-of-defun-function 'php-end-of-defun)
1299 (set (make-local-variable 'end-of-defun-function)
1300 'php-end-of-defun)
1301 1301
1302 (set (make-local-variable 'open-paren-in-column-0-is-defun-start) 1302 (setq-local open-paren-in-column-0-is-defun-start nil)
1303 nil) 1303 (setq-local defun-prompt-regexp
1304 (set (make-local-variable 'defun-prompt-regexp) 1304 "^\\s-*function\\s-+&?\\s-*\\(\\(\\sw\\|\\s_\\)+\\)\\s-*")
1305 "^\\s-*function\\s-+&?\\s-*\\(\\(\\sw\\|\\s_\\)+\\)\\s-*") 1305 (setq-local add-log-current-defun-header-regexp
1306 (set (make-local-variable 'add-log-current-defun-header-regexp) 1306 php-beginning-of-defun-regexp)
1307 php-beginning-of-defun-regexp)
1308 1307
1309 (when (>= emacs-major-version 25) 1308 (when (>= emacs-major-version 25)
1310 (with-silent-modifications 1309 (with-silent-modifications
@@ -1700,7 +1699,7 @@ a completion list."
1700 1699
1701 ;; Highlight return types in functions and methods. 1700 ;; Highlight return types in functions and methods.
1702 ("function.+:\\s-*\\??\\(\\(?:\\sw\\|\\s_\\)+\\)" 1 font-lock-type-face) 1701 ("function.+:\\s-*\\??\\(\\(?:\\sw\\|\\s_\\)+\\)" 1 font-lock-type-face)
1703 (")\\s-*:\\s-*\\??\\(\\(?:\\sw\\|\\s_\\)+\\)\\s-*\{" 1 font-lock-type-face) 1702 (")\\s-*:\\s-*\\??\\(\\(?:\\sw\\|\\s_\\)+\\)\\s-*\\(?:\{\\|;\\)" 1 font-lock-type-face)
1704 1703
1705 ;; Highlight class names used as nullable type hints 1704 ;; Highlight class names used as nullable type hints
1706 ("\\?\\(\\(:?\\sw\\|\\s_\\)+\\)\\s-+\\$" 1 font-lock-type-face) 1705 ("\\?\\(\\(:?\\sw\\|\\s_\\)+\\)\\s-+\\$" 1 font-lock-type-face)
diff --git a/.emacs.d/lisp/php-project.el b/.emacs.d/lisp/php-project.el
index d478d9e..53275b9 100644
--- a/.emacs.d/lisp/php-project.el
+++ b/.emacs.d/lisp/php-project.el
@@ -5,8 +5,8 @@
5;; Author: USAMI Kenta <tadsan@zonu.me> 5;; Author: USAMI Kenta <tadsan@zonu.me>
6;; Keywords: tools, files 6;; Keywords: tools, files
7;; URL: https://github.com/ejmr/php-mode 7;; URL: https://github.com/ejmr/php-mode
8;; Version: 1.19.0 8;; Version: 1.19.1
9;; Package-Requires: ((emacs "24") (cl-lib "0.5")) 9;; Package-Requires: ((emacs "24.3") (cl-lib "0.5"))
10;; License: GPL-3.0-or-later 10;; License: GPL-3.0-or-later
11 11
12;; This program is free software; you can redistribute it and/or modify 12;; This program is free software; you can redistribute it and/or modify
@@ -88,7 +88,7 @@
88 88
89;;;###autoload 89;;;###autoload
90(progn 90(progn
91 (defvar php-project-root 'auto 91 (defvar-local php-project-root 'auto
92 "Method of searching for the top level directory. 92 "Method of searching for the top level directory.
93 93
94`auto' (default) 94`auto' (default)
@@ -101,42 +101,37 @@ STRING
101 A file/directory name of top level marker. 101 A file/directory name of top level marker.
102 If the string is an actual directory path, it is set as the absolute path 102 If the string is an actual directory path, it is set as the absolute path
103 of the root directory, not the marker.") 103 of the root directory, not the marker.")
104 (make-variable-buffer-local 'php-project-root)
105 (put 'php-project-root 'safe-local-variable 104 (put 'php-project-root 'safe-local-variable
106 #'(lambda (v) (or (stringp v) (assq v php-project-available-root-files))))) 105 #'(lambda (v) (or (stringp v) (assq v php-project-available-root-files)))))
107 106
108;;;###autoload 107;;;###autoload
109(progn 108(progn
110 (defvar php-project-bootstrap-scripts nil 109 (defvar-local php-project-bootstrap-scripts nil
111 "List of path to bootstrap php script file. 110 "List of path to bootstrap php script file.
112 111
113The ideal bootstrap file is silent, it only includes dependent files, 112The ideal bootstrap file is silent, it only includes dependent files,
114defines constants, and sets the class loaders.") 113defines constants, and sets the class loaders.")
115 (make-variable-buffer-local 'php-project-bootstrap-scripts)
116 (put 'php-project-bootstrap-scripts 'safe-local-variable #'php-project--eval-bootstrap-scripts)) 114 (put 'php-project-bootstrap-scripts 'safe-local-variable #'php-project--eval-bootstrap-scripts))
117 115
118;;;###autoload 116;;;###autoload
119(progn 117(progn
120 (defvar php-project-php-executable nil 118 (defvar-local php-project-php-executable nil
121 "Path to php executable file.") 119 "Path to php executable file.")
122 (make-variable-buffer-local 'php-project-php-executable)
123 (put 'php-project-php-executable 'safe-local-variable 120 (put 'php-project-php-executable 'safe-local-variable
124 #'(lambda (v) (and (stringp v) (file-executable-p v))))) 121 #'(lambda (v) (and (stringp v) (file-executable-p v)))))
125 122
126;;;###autoload 123;;;###autoload
127(progn 124(progn
128 (defvar php-project-phan-executable nil 125 (defvar-local php-project-phan-executable nil
129 "Path to phan executable file.") 126 "Path to phan executable file.")
130 (make-variable-buffer-local 'php-project-phan-executable)
131 (put 'php-project-phan-executable 'safe-local-variable #'php-project--eval-bootstrap-scripts)) 127 (put 'php-project-phan-executable 'safe-local-variable #'php-project--eval-bootstrap-scripts))
132 128
133;;;###autoload 129;;;###autoload
134(progn 130(progn
135 (defvar php-project-coding-style nil 131 (defvar-local php-project-coding-style nil
136 "Symbol value of the coding style of the project that PHP major mode refers to. 132 "Symbol value of the coding style of the project that PHP major mode refers to.
137 133
138Typically it is `pear', `drupal', `wordpress', `symfony2' and `psr2'.") 134Typically it is `pear', `drupal', `wordpress', `symfony2' and `psr2'.")
139 (make-variable-buffer-local 'php-project-coding-style)
140 (put 'php-project-coding-style 'safe-local-variable #'symbolp)) 135 (put 'php-project-coding-style 'safe-local-variable #'symbolp))
141 136
142 137
diff --git a/.emacs.d/lisp/yasnippet.el b/.emacs.d/lisp/yasnippet.el
index 87536a2..d478073 100644
--- a/.emacs.d/lisp/yasnippet.el
+++ b/.emacs.d/lisp/yasnippet.el
@@ -1,11 +1,11 @@
1;;; yasnippet.el --- Yet another snippet extension for Emacs. 1;;; yasnippet.el --- Yet another snippet extension for Emacs.
2 2
3;; Copyright (C) 2008-2017 Free Software Foundation, Inc. 3;; Copyright (C) 2008-2018 Free Software Foundation, Inc.
4;; Authors: pluskid <pluskid@gmail.com>, 4;; Authors: pluskid <pluskid@gmail.com>,
5;; João Távora <joaotavora@gmail.com>, 5;; João Távora <joaotavora@gmail.com>,
6;; Noam Postavsky <npostavs@gmail.com> 6;; Noam Postavsky <npostavs@gmail.com>
7;; Maintainer: Noam Postavsky <npostavs@gmail.com> 7;; Maintainer: Noam Postavsky <npostavs@gmail.com>
8;; Version: 0.12.2 8;; Version: 0.13.0
9;; X-URL: http://github.com/joaotavora/yasnippet 9;; X-URL: http://github.com/joaotavora/yasnippet
10;; Keywords: convenience, emulation 10;; Keywords: convenience, emulation
11;; URL: http://github.com/joaotavora/yasnippet 11;; URL: http://github.com/joaotavora/yasnippet
@@ -546,7 +546,7 @@ override bindings from other packages (e.g., `company-mode')."
546 546
547;;; Internal variables 547;;; Internal variables
548 548
549(defconst yas--version "0.12.2") 549(defconst yas--version "0.13.0")
550 550
551(defvar yas--menu-table (make-hash-table) 551(defvar yas--menu-table (make-hash-table)
552 "A hash table of MAJOR-MODE symbols to menu keymaps.") 552 "A hash table of MAJOR-MODE symbols to menu keymaps.")