Опитвам се да завърша раздела във всички отворени буфери и yasnippet, за да работят и с клавиша tab. В момента мога да имам едното или другото. Следният код е как се справям с разширяването на yasnippet, но тъй като не съм програмист на lisp, не виждам грешката тук.
Ако не може да разшири фрагмента, бих искал да опита да разшири от буфера.
;; Auto complete settings / tab settings
;; http://emacsblog.org/2007/03/12/tab-completion-everywhere/ <-- in the comments
(global-set-key [(tab)] 'smart-tab)
(defun smart-tab ()
"This smart tab is minibuffer compliant: it acts as usual in
the minibuffer. Else, if mark is active, indents region. Else if
point is at the end of a symbol, expands it. Else indents the
current line."
(interactive)
(if (minibufferp)
(unless (minibuffer-complete)
(dabbrev-expand nil))
(if mark-active
(indent-region (region-beginning)
(region-end))
(if (looking-at "\\_>")
(unless (yas/expand)
(dabbrev-expand nil))
(indent-for-tab-command)))))