mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 05:03:04 +00:00
Implements #566: Remove dead major modes code
* yasnippet.el (yas--known-modes, yas--real-mode?): Removed
This commit is contained in:
parent
21ffe4b797
commit
3e7b56ebd7
14
yasnippet.el
14
yasnippet.el
@ -526,10 +526,6 @@ snippet itself contains a condition that returns the symbol
|
||||
(defvar yas--menu-table (make-hash-table)
|
||||
"A hash table of MAJOR-MODE symbols to menu keymaps.")
|
||||
|
||||
(defvar yas--known-modes
|
||||
'(ruby-mode rst-mode markdown-mode)
|
||||
"A list of mode which is well known but not part of Emacs.")
|
||||
|
||||
(defvar yas--escaped-characters
|
||||
'(?\\ ?` ?\" ?' ?$ ?} ?{ ?\( ?\))
|
||||
"List of characters which *might* need to be escaped.")
|
||||
@ -1283,16 +1279,6 @@ Returns (TEMPLATES START END). This function respects
|
||||
|
||||
;;; Internal functions and macros:
|
||||
|
||||
(defun yas--real-mode? (mode)
|
||||
"Try to find out if MODE is a real mode.
|
||||
|
||||
The MODE bound to a function (like `c-mode') is considered real
|
||||
mode. Other well known mode like `ruby-mode' which is not part of
|
||||
Emacs might not bound to a function until it is loaded. So
|
||||
yasnippet keeps a list of modes like this to help the judgment."
|
||||
(or (fboundp mode)
|
||||
(find mode yas--known-modes)))
|
||||
|
||||
(defun yas--handle-error (err)
|
||||
"Handle error depending on value of `yas-good-grace'."
|
||||
(let ((msg (yas--format "elisp error: %s" (error-message-string err))))
|
||||
|
Loading…
x
Reference in New Issue
Block a user