auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-devel] xspace.el


From: Mads Jensen
Subject: [AUCTeX-devel] xspace.el
Date: Tue, 01 Feb 2011 21:57:02 +0100
User-agent: Thunderbird 2.0.0.24 (X11/20101027)

Style file for the xspace-package.  Copyright assignment is on my TODO-list.
-- 
Med Venlig Hilsen / Kind Regards,
Mads Jensen
Rubinsteinsvej 31,st.th
DK-2450 Kbh. SV
Denmark
+45 6168 8518
;;; xspace.el --- AUCTeX style for `xspace.sty'

;; Author: Mads Jensen <address@hidden>
;; Created: 2011-02-01
;; Keywords: tex

;;; Commentary:

;; This file adds support for `xspace.sty'.

;;; Code:

(TeX-add-style-hook
 "xspace"
 (lambda ()
   (TeX-add-symbols 
    '("xspace" TeX-insert-xspace)
    "xspaceaddexception"
    "xspaceremoveexception")

   ;; Fontification
   (when (and (featurep 'font-latex)
              (eq TeX-install-font-lock 'font-latex-setup))
     (font-latex-add-keywords '("xspace") 'function)
     (font-latex-add-keywords '("xspaceaddexception") 'function)
     (font-latex-add-keywords '("xspaceremoveexception") 'function)

     ;; For syntactic fontification, e.g. verbatim constructs.
     (font-latex-set-syntactic-keywords)
     ;; Tell font-lock about the update.
     (setq font-lock-set-defaults nil)
     (font-lock-set-defaults))))

(defvar LaTeX-xspace-package-options nil
  "Package options for the alltt package.")

(defun TeX-xspace-insert ()
  "Insert \\xspace without brackets."
  (insert "\\xspace"))

;;; xspace.el ends here

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]