diff options
| author | Simeon Simeonov | 2018-08-28 07:39:03 +0200 |
|---|---|---|
| committer | Simeon Simeonov | 2018-08-28 07:39:03 +0200 |
| commit | 29bc99dc3db54cf0ee90f52b99c43da74740113e (patch) | |
| tree | 82e20630aafcce6e424f7c190eb9829fa3bf5d2b | |
| parent | b39d777fd5e620eeb81733ae12292813233b529a (diff) | |
Upgrade yasnippet
| -rw-r--r-- | .emacs.d/lisp/yasnippet.el | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/.emacs.d/lisp/yasnippet.el b/.emacs.d/lisp/yasnippet.el index d06165f..46624ed 100644 --- a/.emacs.d/lisp/yasnippet.el +++ b/.emacs.d/lisp/yasnippet.el | |||
| @@ -618,9 +618,6 @@ override bindings from other packages (e.g., `company-mode')." | |||
| 618 | 618 | ||
| 619 | ;;; Minor mode stuff | 619 | ;;; Minor mode stuff |
| 620 | 620 | ||
| 621 | ;; XXX: `last-buffer-undo-list' is somehow needed in Carbon Emacs for MacOSX | ||
| 622 | (defvar last-buffer-undo-list nil) | ||
| 623 | |||
| 624 | (defvar yas--minor-mode-menu nil | 621 | (defvar yas--minor-mode-menu nil |
| 625 | "Holds the YASnippet menu.") | 622 | "Holds the YASnippet menu.") |
| 626 | 623 | ||
| @@ -4928,62 +4925,6 @@ object satisfying `yas--field-p' to restrict the expansion to."))) | |||
| 4928 | (apply #'format (concat "[yas] " format-control) format-args)) | 4925 | (apply #'format (concat "[yas] " format-control) format-args)) |
| 4929 | 4926 | ||
| 4930 | 4927 | ||
| 4931 | ;;; Some hacks: | ||
| 4932 | ;; | ||
| 4933 | ;; The functions | ||
| 4934 | ;; | ||
| 4935 | ;; `locate-dominating-file' | ||
| 4936 | ;; `region-active-p' | ||
| 4937 | ;; | ||
| 4938 | ;; added for compatibility in emacsen < 23 | ||
| 4939 | (unless (>= emacs-major-version 23) | ||
| 4940 | (unless (fboundp 'region-active-p) | ||
| 4941 | (defun region-active-p () (and transient-mark-mode mark-active))) | ||
| 4942 | |||
| 4943 | (unless (fboundp 'locate-dominating-file) | ||
| 4944 | (defvar locate-dominating-stop-dir-regexp | ||
| 4945 | "\\`\\(?:[\\/][\\/][^\\/]+[\\/]\\|/\\(?:net\\|afs\\|\\.\\.\\.\\)/\\)\\'" | ||
| 4946 | "Regexp of directory names which stop the search in `locate-dominating-file'. | ||
| 4947 | Any directory whose name matches this regexp will be treated like | ||
| 4948 | a kind of root directory by `locate-dominating-file' which will stop its search | ||
| 4949 | when it bumps into it. | ||
| 4950 | The default regexp prevents fruitless and time-consuming attempts to find | ||
| 4951 | special files in directories in which filenames are interpreted as hostnames, | ||
| 4952 | or mount points potentially requiring authentication as a different user.") | ||
| 4953 | |||
| 4954 | (defun locate-dominating-file (file name) | ||
| 4955 | "Look up the directory hierarchy from FILE for a file named NAME. | ||
| 4956 | Stop at the first parent directory containing a file NAME, | ||
| 4957 | and return the directory. Return nil if not found." | ||
| 4958 | ;; We used to use the above locate-dominating-files code, but the | ||
| 4959 | ;; directory-files call is very costly, so we're much better off doing | ||
| 4960 | ;; multiple calls using the code in here. | ||
| 4961 | ;; | ||
| 4962 | ;; Represent /home/luser/foo as ~/foo so that we don't try to look for | ||
| 4963 | ;; `name' in /home or in /. | ||
| 4964 | (setq file (abbreviate-file-name file)) | ||
| 4965 | (let ((root nil) | ||
| 4966 | try) | ||
| 4967 | (while (not (or root | ||
| 4968 | (null file) | ||
| 4969 | ;; FIXME: Disabled this heuristic because it is sometimes | ||
| 4970 | ;; inappropriate. | ||
| 4971 | ;; As a heuristic, we stop looking up the hierarchy of | ||
| 4972 | ;; directories as soon as we find a directory belonging | ||
| 4973 | ;; to another user. This should save us from looking in | ||
| 4974 | ;; things like /net and /afs. This assumes that all the | ||
| 4975 | ;; files inside a project belong to the same user. | ||
| 4976 | ;; (let ((prev-user user)) | ||
| 4977 | ;; (setq user (nth 2 (file-attributes file))) | ||
| 4978 | ;; (and prev-user (not (equal user prev-user)))) | ||
| 4979 | (string-match locate-dominating-stop-dir-regexp file))) | ||
| 4980 | (setq try (file-exists-p (expand-file-name name file))) | ||
| 4981 | (cond (try (setq root file)) | ||
| 4982 | ((equal file (setq file (file-name-directory | ||
| 4983 | (directory-file-name file)))) | ||
| 4984 | (setq file nil)))) | ||
| 4985 | root)))) | ||
| 4986 | |||
| 4987 | ;;; Unloading | 4928 | ;;; Unloading |
| 4988 | 4929 | ||
| 4989 | (defvar unload-function-defs-list) ; loadhist.el | 4930 | (defvar unload-function-defs-list) ; loadhist.el |
