/[auctex]/auctex/preview/preview.el
ViewVC logotype

Diff of /auctex/preview/preview.el

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

revision 1.259 by dak, Fri Jun 24 08:14:05 2005 UTC revision 1.260 by dak, Tue Jul 5 01:08:30 2005 UTC
# Line 465  set to `postscript'." Line 465  set to `postscript'."
465    "Expand ARG as a string.    "Expand ARG as a string.
466  It can already be a string.  Or it can be a list, then it is  It can already be a string.  Or it can be a list, then it is
467  recursively evaluated using SEPARATOR as separator.  If a list  recursively evaluated using SEPARATOR as separator.  If a list
468  element is in itself a CONS cell, the CAR of the list is used  element is in itself a CONS cell, the CAR of the list (after symbol
469  as a separator.  ARG can be a symbol, and so can be the CDR  dereferencing) can evaluate to either a string, in which case it is
470  of a cell used for string concatenation.  SEPARATOR is passed  used as a separator for the rest of the list,
471  through top symbol dereferences, but not otherwise."  or a boolean (t or nil) in which case the rest of the list is
472    either evaluated and concatenated or ignored, respectively.
473    ARG can be a symbol, and so can be the CDR
474    of a cell used for string concatenation."
475    (cond    (cond
    ((null arg) (error "Bad string expansion"))  
476     ((stringp arg) arg)     ((stringp arg) arg)
477     ((consp arg) (mapconcat (lambda(x)     ((consp arg)
478                               (if (consp x)      (mapconcat
479                                   (preview-string-expand (cdr x) (car x))       #'identity
480                                 (preview-string-expand x)))       (delq nil
481                             arg             (mapcar
482                             separator))              (lambda(x)
483     ((and (symbolp arg) (boundp arg))                (if (consp x)
484      (preview-string-expand (symbol-value arg) separator))))                    (let ((sep (car x)))
485                        (while (and (symbolp sep)
486                                    (not (memq sep '(t nil))))
487                          (setq sep (symbol-value sep)))
488                        (if (stringp sep)
489                            (preview-string-expand (cdr x) sep)
490                          (and sep
491                               (preview-string-expand (cdr x)))))
492                    (preview-string-expand x)))
493                arg))
494         (or separator "")))
495       ((and (symbolp arg) (not (memq arg '(t nil))))
496        (preview-string-expand (symbol-value arg) separator))
497       (t (error "Bad string expansion"))))
498    
499  (defconst preview-expandable-string  (defconst preview-expandable-string
500    ((lambda (f) (funcall f (funcall f 'sexp)))    ((lambda (f) (funcall f (funcall f 'sexp)))
# Line 489  through top symbol dereferences, but not Line 504  through top symbol dereferences, but not
504         (repeat :tag "Concatenate"         (repeat :tag "Concatenate"
505          (choice          (choice
506           string           string
507           (cons :tag "Separated list" (string :tag "Separator") ,x)           (cons :tag "Separated list"
508                   (choice (string :tag "Separator")
509                           (symbol :tag "Indirect separator or flag"))
510                   ,x)
511           (symbol :tag "Indirect variable (no separator)")))           (symbol :tag "Indirect variable (no separator)")))
512         (symbol :tag "Indirect variable (with separator)"))))         (symbol :tag "Indirect variable (with separator)"))))
513    "Type to be used for `preview-string-expand'.    "Type to be used for `preview-string-expand'.
# Line 2121  will be skipped over backwards." Line 2139  will be skipped over backwards."
2139                (backward-char)))                (backward-char)))
2140        (error (goto-char oldpos)))))        (error (goto-char oldpos)))))
2141    
2142  (defcustom preview-required-option-list '("active" "tightpage" "auctex")  (defcustom preview-required-option-list '("active" "tightpage" "auctex"
2143                                              (preview-preserve-counters
2144                                               "counters"))
2145    "Specifies required options passed to the preview package.    "Specifies required options passed to the preview package.
2146  These are passed regardless of whether there is an explicit  These are passed regardless of whether there is an explicit
2147  \\usepackage of that package present."  \\usepackage of that package present."
2148    :group 'preview-latex    :group 'preview-latex
2149    :type '(list (set :inline t :tag "Required options"    :type preview-expandable-string)
2150                      (const "active")  
2151                      (const "tightpage")  (defcustom preview-preserve-counters nil
2152                      (const "auctex")    "Try preserving counters for partial runs if set."
2153                      (const "counters"))    :group 'preview-latex
2154                 (repeat :inline t :tag "Others" string)))    :type 'boolean)
2155    
2156  (defcustom preview-default-option-list '("displaymath" "floats"  (defcustom preview-default-option-list '("displaymath" "floats"
2157                                           "graphics" "textmath" "sections"                                           "graphics" "textmath" "sections"
# Line 3486  In the form of yyyy.mmdd") Line 3506  In the form of yyyy.mmdd")
3506         preview-scale-function         preview-scale-function
3507         preview-LaTeX-command         preview-LaTeX-command
3508         preview-required-option-list         preview-required-option-list
3509           preview-preserve-counters
3510         preview-default-option-list         preview-default-option-list
3511         preview-default-preamble         preview-default-preamble
3512         preview-LaTeX-command-replacements         preview-LaTeX-command-replacements

Legend:
Removed from v.1.259  
changed lines
  Added in v.1.260

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