changeset 528:523f54775325 dev

Add completion for bibliographystyle
author HIROSE Yuuji <yuuji@gentei.org>
date Wed, 16 May 2018 22:42:48 +0900
parents af4601ee3c6a
children b742adfa30e2
files yatex.el yatexadd.el
diffstat 2 files changed, 21 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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")
--- 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"))

yatex.org