On Thu, Feb 10, 2011 at 12:49 PM, Martin Schröder <mar...@oneiros.de> wrote:
> 2011/2/10 Hans Hagen <pra...@wxs.nl>:
>> best is to make two pdf files that are as small as possible and send them
>> off-list to Luigi and me so that we can look into them.
>
> And me, please. The qpdf author is very helpfull, though. :-)
>
for emacs users:
save this in qdf-mode.el
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; the command to comment/uncomment text
(defun qdf-comment-dwim (arg)
"Comment or uncomment current line or region in a smart way.
For detail, see `comment-dwim'."
   (interactive "*P")
   (require 'newcomment)
   (let ((deactivate-mark nil) (comment-start "%") (comment-end ""))
     (comment-dwim arg)))

;; keywords for syntax coloring
(setq myKeywords
 `(
;;   ( ,(regexp-opt '("Sin" "Cos" "Sum") 'word) . font-lock-function-name-face)
;;   ( ,(regexp-opt '("Pi" "Infinity") 'word) . font-lock-constant-face)
  )
)

;; define the major mode.
(define-derived-mode qdf-mode fundamental-mode
"qdf-mode is a major mode for editing language qdf."
  (setq font-lock-defaults '(myKeywords))

  ;; modify the keymap
  (define-key qdf-mode-map [remap comment-dwim] 'qdf-comment-dwim)

  (modify-syntax-entry ?% "< b" qdf-mode-syntax-table)
  (modify-syntax-entry ?\n "> b" qdf-mode-syntax-table)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



-- 
luigi
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to