[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 3ec62ab 006/177: fix: please older emacsen, don't use LETR
From: |
João Távora |
Subject: |
[elpa] master 3ec62ab 006/177: fix: please older emacsen, don't use LETREC after all |
Date: |
Sat, 28 Mar 2015 15:40:26 +0000 |
branch: master
commit 3ec62aba0dae49d05305658a61e8b3ba29c08b72
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
fix: please older emacsen, don't use LETREC after all
also fix some compiler warnings
---
yasnippet.el | 38 +++++++++++++++++++-------------------
1 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/yasnippet.el b/yasnippet.el
index 6ee8a19..db529e8 100644
--- a/yasnippet.el
+++ b/yasnippet.el
@@ -657,6 +657,14 @@ snippet itself contains a condition that returns the symbol
(defvar yas-minor-mode-map (yas--init-minor-keymap)
"The keymap used when `yas-minor-mode' is active.")
+(defvar yas-extra-modes nil
+ "If non-nil, also lookup snippets for this/these modes.
+
+Can be a symbol or a list of symbols.
+
+This variable probably makes more sense as buffer-local, so
+ensure your use `make-local-variable' when you set it.")
+
(defvar yas--tables (make-hash-table)
"A hash table of mode symbols to `yas--table' objects.")
@@ -696,16 +704,17 @@ defined direct keybindings to the command
(defun yas--modes-to-activate ()
"Compute list of mode symbols that are active for `yas-expand'
and friends."
- (letrec ((dfs (lambda (mode &optional explored)
- (push mode explored)
- (cons mode
- (loop for neighbour
- in (remove nil (cons (get mode
- 'derived-mode-parent)
- (gethash mode
yas--parents)))
-
- unless (memq neighbour explored)
- append (funcall dfs neighbour explored))))))
+ (let (dfs)
+ (setq dfs (lambda (mode &optional explored)
+ (push mode explored)
+ (cons mode
+ (loop for neighbour
+ in (remove nil (cons (get mode
+ 'derived-mode-parent)
+ (gethash mode yas--parents)))
+
+ unless (memq neighbour explored)
+ append (funcall dfs neighbour explored)))))
(remove-duplicates (append yas-extra-modes
(funcall dfs major-mode)))))
@@ -1269,14 +1278,6 @@ return an expression that when evaluated will issue an
error."
keybinding (error-message-string err))
nil))))
-(defvar yas-extra-modes nil
- "If non-nil, also lookup snippets for this/these modes.
-
-Can be a symbol or a list of symbols.
-
-This variable probably makes more sense as buffer-local, so
-ensure your use `make-local-variable' when you set it.")
-
(defun yas--table-get-create (mode)
"Get or create the snippet table corresponding to MODE."
(let ((table (gethash mode
@@ -1879,7 +1880,6 @@ loading."
;;
(setq yas--tables (make-hash-table))
(setq yas--parents (make-hash-table))
- (setq yas--ancestors (make-hash-table))
;; Before killing `yas--menu-table' use its keys to cleanup the
;; mode menu parts of `yas--minor-mode-menu' (thus also cleaning
- [elpa] master updated (da45e68 -> 39a27b6), João Távora, 2015/03/28
- [elpa] master 6ce6b24 001/177: fix: replace 'text' in 'yas-text' in bundled snippets, João Távora, 2015/03/28
- [elpa] master ddaf9a9 002/177: Fix: cleanup yasnippet-tests.el, João Távora, 2015/03/28
- [elpa] master ce50b3d 004/177: Closes #318: Don't use CL-LABELS for backward compatibility with older emacsen, João Távora, 2015/03/28
- [elpa] master a7d40ed 003/177: Closes #318: correctly implement YAS--MODES-TO-ACTIVATE, João Távora, 2015/03/28
- [elpa] master 78c52fd 005/177: fix: shoosh warning with LETREC instead of LET, João Távora, 2015/03/28
- [elpa] master 3ec62ab 006/177: fix: please older emacsen, don't use LETREC after all,
João Távora <=
- [elpa] master 1aac5fc 008/177: Merge pull request #407 from dongxiong/patch-1, João Távora, 2015/03/28
- [elpa] master 79f3656 011/177: fix font-lock-keywords syntax, João Távora, 2015/03/28
- [elpa] master 13cfdbc 009/177: fix: remove references to dropdown-list.el in Rakefile, João Távora, 2015/03/28
- [elpa] master 8853127 007/177: Update manual.mdown, João Távora, 2015/03/28
- [elpa] master d963c41 010/177: Closes #406: correct docstring for yas-extra-modes, João Távora, 2015/03/28
- [elpa] master f21ddd1 012/177: remove redundant font-lock-keywords, João Távora, 2015/03/28
- [elpa] master 90d4cae 013/177: inhibit change hooks during (insert content), João Távora, 2015/03/28
- [elpa] master 7849ffc 015/177: fix: don't use universal-argument-num-events, João Távora, 2015/03/28
- [elpa] master 6997922 016/177: Revert "inhibit change hooks during (insert content)", João Távora, 2015/03/28
- [elpa] master 6268cc2 014/177: add: test for issue #404, João Távora, 2015/03/28