[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 79b90c9 04/42: Remove compatibility code for Emacs 22 and
From: |
Noam Postavsky |
Subject: |
[elpa] master 79b90c9 04/42: Remove compatibility code for Emacs 22 and earlier |
Date: |
Sun, 22 Dec 2019 17:37:56 -0500 (EST) |
branch: master
commit 79b90c94899bfc4d3221e46d86507716a9397e63
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>
Remove compatibility code for Emacs 22 and earlier
* yasnippet.el (region-active-p, locate-dominating-stop-dir-regexp)
(locate-dominating-file): Remove.
---
yasnippet.el | 56 --------------------------------------------------------
1 file changed, 56 deletions(-)
diff --git a/yasnippet.el b/yasnippet.el
index d06165f..6f749a5 100644
--- a/yasnippet.el
+++ b/yasnippet.el
@@ -4928,62 +4928,6 @@ object satisfying `yas--field-p' to restrict the
expansion to.")))
(apply #'format (concat "[yas] " format-control) format-args))
-;;; Some hacks:
-;;
-;; The functions
-;;
-;; `locate-dominating-file'
-;; `region-active-p'
-;;
-;; added for compatibility in emacsen < 23
-(unless (>= emacs-major-version 23)
- (unless (fboundp 'region-active-p)
- (defun region-active-p () (and transient-mark-mode mark-active)))
-
- (unless (fboundp 'locate-dominating-file)
- (defvar locate-dominating-stop-dir-regexp
- "\\`\\(?:[\\/][\\/][^\\/]+[\\/]\\|/\\(?:net\\|afs\\|\\.\\.\\.\\)/\\)\\'"
- "Regexp of directory names which stop the search in
`locate-dominating-file'.
-Any directory whose name matches this regexp will be treated like
-a kind of root directory by `locate-dominating-file' which will stop its search
-when it bumps into it.
-The default regexp prevents fruitless and time-consuming attempts to find
-special files in directories in which filenames are interpreted as hostnames,
-or mount points potentially requiring authentication as a different user.")
-
- (defun locate-dominating-file (file name)
- "Look up the directory hierarchy from FILE for a file named NAME.
-Stop at the first parent directory containing a file NAME,
-and return the directory. Return nil if not found."
- ;; We used to use the above locate-dominating-files code, but the
- ;; directory-files call is very costly, so we're much better off doing
- ;; multiple calls using the code in here.
- ;;
- ;; Represent /home/luser/foo as ~/foo so that we don't try to look for
- ;; `name' in /home or in /.
- (setq file (abbreviate-file-name file))
- (let ((root nil)
- try)
- (while (not (or root
- (null file)
- ;; FIXME: Disabled this heuristic because it is
sometimes
- ;; inappropriate.
- ;; As a heuristic, we stop looking up the hierarchy of
- ;; directories as soon as we find a directory belonging
- ;; to another user. This should save us from looking
in
- ;; things like /net and /afs. This assumes that all
the
- ;; files inside a project belong to the same user.
- ;; (let ((prev-user user))
- ;; (setq user (nth 2 (file-attributes file)))
- ;; (and prev-user (not (equal user prev-user))))
- (string-match locate-dominating-stop-dir-regexp file)))
- (setq try (file-exists-p (expand-file-name name file)))
- (cond (try (setq root file))
- ((equal file (setq file (file-name-directory
- (directory-file-name file))))
- (setq file nil))))
- root))))
-
;;; Unloading
(defvar unload-function-defs-list) ; loadhist.el
- [elpa] master updated (2604824 -> 32f3512), Noam Postavsky, 2019/12/22
- [elpa] master 4af3354 02/42: Make less garbage in overlay heavy buffers, Noam Postavsky, 2019/12/22
- [elpa] master e67592c 03/42: Don't use overlays to find active snippets, Noam Postavsky, 2019/12/22
- [elpa] master 79b90c9 04/42: Remove compatibility code for Emacs 22 and earlier,
Noam Postavsky <=
- [elpa] master d3bb879 05/42: Remove last-buffer-undo-list compat definition, Noam Postavsky, 2019/12/22
- [elpa] master 4f78d03 01/42: Close #937: Officially support automatically moving to next field, Noam Postavsky, 2019/12/22
- [elpa] master 1e71360 06/42: Per #947: fix typo in README.md, Noam Postavsky, 2019/12/22
- [elpa] master 7a178a2 07/42: Remove spurious change of before-change-functions, Noam Postavsky, 2019/12/22
- [elpa] master 8328c38 08/42: Fix another failure of cc-mode indentation, Noam Postavsky, 2019/12/22
- [elpa] master eeb05f0 10/42: Handle field adjust of pending active fields, Noam Postavsky, 2019/12/22
- [elpa] master 8452227 13/42: Consider fundamental-mode as ultimate ancestor, Noam Postavsky, 2019/12/22
- [elpa] master fb253ac 15/42: New public function yas-maybe-expand-abbrev-key-filter, Noam Postavsky, 2019/12/22
- [elpa] master bceb65b 16/42: Make backspace/DEL clear field (#957), Noam Postavsky, 2019/12/22
- [elpa] master 3c0be40 11/42: Update FAQ, Noam Postavsky, 2019/12/22