# HG changeset patch # User HIROSE Yuuji # Date 1526478168 -32400 # Node ID 523f54775325cbc3f318227719e09bcf41114ed2 # Parent af4601ee3c6a394f184f0ff001edd786f8fd57a5 Add completion for bibliographystyle diff -r af4601ee3c6a -r 523f54775325 yatex.el --- a/yatex.el Sat Feb 24 16:45:09 2018 +0900 +++ b/yatex.el Wed May 16 22:42:48 2018 +0900 @@ -1,6 +1,6 @@ ;;; yatex.el --- Yet Another tex-mode for emacs //–ì’¹// -*- coding: sjis -*- ;;; (c)1991-2018 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Tue Jan 23 12:55:49 2018 on firestorm +;;; Last modified Wed May 16 13:41:39 2018 on firestorm ;;; $Id$ ;;; The latest version of this software is always available at; ;;; https://www.yatex.org/ @@ -303,7 +303,8 @@ ("author") ("thanks") ("documentstyle") ("pagestyle") ("thispagestyle") ("title") ("underline") ("label") ("makebox") ("footnote") ("footnotetext") ("index") - ("hspace*") ("vspace*") ("bibliography") ("bibitem") ("cite") + ("hspace*") ("vspace*") + ("bibliography") ("bibliographystyle") ("bibitem") ("cite") ("input") ("include") ("includeonly") ("mbox") ("hbox") ("caption") ("arabic") ("centering") ("uline") ("newcounter") diff -r af4601ee3c6a -r 523f54775325 yatexadd.el --- a/yatexadd.el Sat Feb 24 16:45:09 2018 +0900 +++ b/yatexadd.el Wed May 16 22:42:48 2018 +0900 @@ -1,6 +1,6 @@ ;;; yatexadd.el --- YaTeX add-in functions -*- coding: sjis -*- ;;; (c)1991-2018 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Wed Jan 3 23:57:48 2018 on firestorm +;;; Last modified Wed May 16 22:41:56 2018 on firestorm ;;; $Id$ ;;; Code: @@ -1519,6 +1519,23 @@ (t nil))) +(defvar YaTeX::bibliographystyle-alist-default + '(("unsrt")("junsrt")("plain")("jplain")("alpha")("jalpha") + ("abbrv")("jabbrv")("jipsj")("jname")("tieice")("tipsj") + ("apalike")("ieeetr")("siam"))) +(defvar YaTeX::bibliographystyle-alist-private + nil + "*Completion table for bibliographystyle") + +(defun YaTeX::bibliographystyle(argp) + (cond + ((= argp 1) + (YaTeX-completing-read-or-skip + "BibStyle: " + (append YaTeX::bibliographystyle-alist-private + YaTeX::bibliographystyle-alist-default) + nil)))) + (defun YaTeX::bibitem (argp) "Add-in function to insert argument of \\bibitem." (YaTeX::label argp "label" "cite"))