/[auctex]/auctex/style/dk-bib.el
ViewVC logotype

Diff of /auctex/style/dk-bib.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by arne, Wed Oct 12 13:03:59 2005 UTC revision 1.2 by angeli, Thu Oct 13 14:05:21 2005 UTC
# Line 28  Line 28 
28    
29  ;;; Code:  ;;; Code:
30    
31  (TeX-add-style-hook  (defun LaTeX-dk-bib-package-options nil
32   "dk-bib"    "Prompt for package option for dk-bib.sty."
33   (lambda ()    (let ((options
34     (defun LaTeX-dk-bib-package-options nil           (mapconcat 'identity
35       "Prompt for package option for dk-bib.sty."                      (TeX-completing-read-multiple "Options: "
36       (let ((options                                                    '(("isbn") ("issn") ("url")
37              (mapconcat 'identity                                                      ("annote") ("printing")
38                         (TeX-completing-read-multiple "Options: "                                                      ("apalike") ("fixcitedash=false")
39                                                       '(("isbn") ("issn") ("url")                                                      ("ordinals2word")
40                                                         ("annote") ("printing")                                                      ("ordinaldepth=")))
41                                                         ("apalike") ("fixcitedash=false")                      ","))
42                                                         ("ordinals2word")          (depth -1))
43                                                         ("ordinaldepth=")))      (when (string-match "\\(ordinaldepth=\\)\\([^0-9]\\|$\\)" options)
44                         ","))        (while (or (< depth 0)
45             (depth -1))                   (> depth 20))
46         (when (string-match "\\(ordinaldepth=\\)\\([^0-9]\\|$\\)" options)          (setq depth (if (fboundp 'read-number)
47           (while (or (< depth 0)                          (read-number "Ordinal depth: ")
48                      (> depth 20))                        (string-to-number (read-input "Ordinal depth: "))))
49             (setq depth (if (fboundp 'read-number)          (when (or (< depth 0)
50                             (read-number "Ordinal depth: ")                    (> depth 20))
51                           (string-to-number (read-input "Ordinal depth: "))))            (message "Ordinal depth must be between 0 and 20")
52             (when (or (< depth 0)            (sit-for 1)))  
53                       (> depth 20))        (setq options (concat
54               (message "Ordinal depth must be between 0 and 20")                       (substring options 0 (match-end 1))
55               (sit-for 1)))                             (number-to-string depth)
56           (setq options (concat                       (substring options (match-end 1)))))
57                          (substring options 0 (match-end 1))      options))
                         (number-to-string depth)  
                         (substring options (match-end 1)))))  
        options))))  
58    
59  ;;; dk-bib.el ends here  ;;; dk-bib.el ends here

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26