more changes to the .yas-setup files and fix issue 129

This commit is contained in:
capitaomorte 2011-05-07 19:13:40 +00:00
parent 35eaad9d40
commit 7fe4e84f91
4 changed files with 20 additions and 12 deletions

View File

@ -288,8 +288,8 @@ which means:
* It usually looks beautiful. E.g. when you compile Emacs with gtk
support, this menu will be rendered with your gtk theme.
* Emacs have little control over it. E.g. you can't use ``C-n``,
``C-p`` to navigate.
* Your window system may or may not allow to you use ``C-n``, ``C-p``
to navigate this menu.
* This function can't be used when in a terminal.
.. image:: images/ido-menu.png

View File

@ -8,7 +8,7 @@
"Html-mode snippets behave as close to TextMate as possible.")
(defun yas/html-activate ()
(add-to-list 'yas/mode-symbol 'html-mode))
(add-to-list (make-local-variable 'yas/mode-symbol) 'html-mode))
(add-hook 'nxml-mode-hook 'yas/html-activate)
(add-hook 'rhtml-mode-hook 'yas/html-activate)
@ -80,7 +80,7 @@
(string-match (format "<%s>\\(.*\\)</%s>" wrap wrap)
string)
(match-string 1 string))
(concat "<em>" string "</em>")))
(concat wrap string wrap)))
(defun yas/html-between-tag-pair-p ()
(save-excursion
@ -649,6 +649,9 @@
;; Substitutions for: binding
;;
;; # as in Commands/Persistent Include.yasnippet
;; =yyas> (yas/unknown)
;;
;; # as in Snippets/XHTML &nbsp NonBreakingSpace.yasnippet
;; ~ =yyas> (yas/unknown)
;;

View File

@ -165,6 +165,12 @@
(and (yas/rails-root)
(string-match "app/views/" default-directory)))
(yas/define-condition-cache
yas/rails-helper-p
"Non-nil if the current buffer is a rails helper."
(and (yas/rails-root)
(string-match "app/helpers/" default-directory)))
(yas/define-condition-cache
yas/rails-controller-p
"Non-nil if the current buffer is a rails controller."
@ -399,7 +405,7 @@ are recognized. Stolen from `rinari-mode' more or`' less."
;; text.html.ruby =yyas> (yas/unknown)
;;
;;
;; AC385ABF-96CD-4FCB-80AD-BF37D6EE79D2 =yyas> (yas/rails-view-p)
;; AC385ABF-96CD-4FCB-80AD-BF37D6EE79D2 =yyas> (and (member major-mode '(nxml-mode html-mode rhtml-mode)) (yas/rails-view-p))
;; Substitutions for: binding
@ -887,9 +893,9 @@ are recognized. Stolen from `rinari-mode' more or`' less."
(yas/ignore-item "FD8CC811-2AD3-480F-B975-DF959DC96C67")
;; Drop / Create Table
(yas/item "20375601-B13F-4314-B8E4-362706566636")
;; Ignoring Change / Change Table
(yas/ignore-item "20FC02C5-32A3-4F20-B163-FF75C9FDFABF")
;; Change / Change Table
(yas/item "20FC02C5-32A3-4F20-B163-FF75C9FDFABF")
(yas/separator)
(yas/submenu "Create columns t. drop-down list"
(;; t.string (tcs)
(yas/item "B757F7E5-E4BD-11DC-A11A-00112475D960")
@ -1082,7 +1088,6 @@ are recognized. Stolen from `rinari-mode' more or`' less."
"7BC860E6-7561-4E6E-983B-507D7A6F6228"
"221969A1-A5EA-4A8E-8817-C74EBED63901"
"33057A79-677B-4DFB-99D4-1492778BDDC6"
"20FC02C5-32A3-4F20-B163-FF75C9FDFABF"
"A219EBB8-004A-4012-B5B2-232C9A5C94F8"
"42DE1441-D1B7-4998-BAF9-16B1EC7E210C"
"25F8F5D8-2BD1-45D8-8B2A-9F2EA4F73AA2"
@ -1113,9 +1118,6 @@ are recognized. Stolen from `rinari-mode' more or`' less."
;; # as in Commands/Autocomplete Foreign Key Fixture Reference (habtm).yasnippet
;; 275C0B86-F735-49B6-8A22-218A8F4CC2E0 =yyas> (yas/unknown)
;;
;; # as in Macros/Change Change Table.yasnippet
;; 20FC02C5-32A3-4F20-B163-FF75C9FDFABF =yyas> (yas/unknown)
;;
;; # as in Commands/Rake Migrate.yasnippet
;; 985F56D4-82ED-4C45-8250-2ECCFC71957E =yyas> (yas/unknown)
;;

View File

@ -247,6 +247,9 @@
nil
'ri-history)))
(with-current-buffer (get-buffer-create "*Ri*")
(setq buffer-read-only nil)
(erase-buffer)
(setq default-directory "~")
(setq buffer-read-only nil)
(shell-command (concat "ri -f ansi " query) "*Ri*")
(ansi-color-apply-on-region (point-min) (point-max))