GNU   davin.50webs.com/research
Bringing to you notes for the ages

       Main Menu          Research Projects         Photo Album            Curriculum Vitae      The Greatest Artists
    Email Address       Computer Games          Web Design          Java Training Wheels      The Fly (A Story)   
  Political Activism   Scruff the Cat       My Life Story          Smoking Cessation          Other Links      
Debugging Macros     String Class I     Linked List System I Java for C Programmers Naming Convention
    String Class II         How I use m4              Strings III                 Symmetrical I/O             Linked Lists II     
Run-Time Type Info   Virtual Methods      An Array System        Science & Religion            Submodes       
  Nested Packages      Memory Leaks    Garbage Collection      Internet & Poverty      What is Knowledge?
Limits of Evolution   Emacs Additions      Function Plotter           Romantic Love        The Next Big Thing
    Science Fiction     Faster Compilation Theory of Morality         Elisp Scoping               Elisp Advice      
  S.O.G.M. Pattern       Safe Properties         School Bullying          Charisma Control          Life and Death    
     Splitting Java          Multiple Ctors       Religious Beliefs         Conversation 1           Conversation 2    
   J.T.W. language    Emacs Additions II      Build Counter             Relation Plotter          Lisp++ Language  
  Memory Leaks II   Super Constructors CRUD Implementation Order a Website Form There Is An Afterlife
More Occam's Razor C to Java Translator Theory of Morality II


d-latexize9.el

    

;;; d-latexize.el

;; Copyright (C) 2014-2015 Davin Pearson

;; Emacs Lisp Archive Entry
;; Filename: d-latexize.el
;; Author/Maintainer: Davin Max Pearson <http://davin.50webs.com>
;; Keywords: LaTeX-ize functionality
;; Version: 1.0

;;; Commentary:

;; This file is not part of GNU Emacs.
;;
;; The file fontifies different code buffers into LaTeX's
;; \color{COLOUR}{...} and \colorbox{COLOUR}{...} format for
;; syntax highlighting.

;;; Limitation of Warranty

;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or (at
;; your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
;; General Public License for more detail.
;;
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs, see the file COPYING.  If not, see:
;;
;; <http://www.gnu.org/licenses/gpl-3.0.txt>.


;;; Install Instructions:
;; See the following URL for the latest info and a tarball:
;;
;; <http://davin.50webs.com/research/2010/mopa2e2.html#d-latexize9>
;;
;; Then untar the tarball to a folder pointed to by the Emacs variable
;; load-path and add the following line to your ~/.emacs file.
;;
;; (require 'd-latexize9)

;;; Known Bugs:

;; None so far!

;;; Code:

(when (not (fboundp 'd-emergency-set-load-path))
  (defun d-emergency-set-load-path ()
    (if (not (boundp '*prefix*))
        (error "Ella Fitzgerald / The Cole Porter Songbook Volume 1 / In The Still Of The Night, *prefix* is not bound!"))
    (if (string= (user-login-name) "root")
        (setq load-path (cons *prefix* load-path))
      (setq load-path (cons *prefix* load-path)))
    (message "d-latexize9.el (car load-path)=%s" (car load-path))
    ))

(setq *prefix* "~www/dlisp/")

(d-emergency-set-load-path)

(require 'early-bindings)
(require 'd-make-face) ;; creates defun: d-make-face
(require 'jtw-mode) ;; uses bg-colour and uses defun: d-make-face
(require 'lisp++-mode) ;; uses defun: d-make-face
(require 'tes-mode)
(require 'jtw-build-java)

;;;(CXXCOMM);; (d-latexize--inside-comment)(CXXMMOC)
(defun d-latexize--inside-comment ()
  (save-excursion
    (save-match-data
      (let ((p (point)))
        (when (re-search-backward "(7cxxcomm)" nil t)
          (when (re-search-forward "(7cxxmmoc)" nil t)
            (> (point) p)))))))

(defun d-latexize--inside-string ()
  (save-excursion
    (save-match-data
      (let ((p (point)))
        (when (re-search-backward (concat "(7cxx""stri)") nil t)
          (when (re-search-forward (concat "(7cxx""irts)") nil t)
            (> (point) p)))))))

(defun d-latexize--inside-func ()
  (save-excursion
    (save-match-data
      (let ((p (point)))
        (when (re-search-backward "(7cxxfunc)" nil t)
          (when (re-search-forward "(7cxxcnuf)" nil t)
            (> (point) p)))))))

(defun d-latexize--inside-hash ()
  (save-excursion
    (save-match-data
      (let ((p (point)))
        (when (re-search-backward "(7cxxhash)" nil t)
          (when (re-search-forward "(7cxxhsah)" nil t)
            (> (point) p)))))))

(defun d-latexize--inside-prvt ()
  (save-excursion
    (save-match-data
      (let ((p (point)))
        (when (re-search-backward "(7cxxprvt)" nil t)
          (when (re-search-forward "(7cxxtvrp)" nil t)
            (> (point) p)))))))

(defun d-latexize--inside-glbl ()
  (save-excursion
    (save-match-data
      (let ((p (point)))
        (when (re-search-backward "(7cxxglbl)" nil t)
          (when (re-search-forward "(7cxxlblg)" nil t)
            (> (point) p)))))))

(defun d-latexize--inside-jtw ()
  (save-excursion
    (save-match-data
      (let ((p (point)))
        (when (re-search-backward "(7cxxjtw)" nil t)
          (when (re-search-forward "(7cxxwtj)" nil t)
            (> (point) p)))))))

(defun d-latexize--inside-clss ()
  (save-excursion
    (save-match-data
      (let ((p (point)))
        (when (re-search-backward "(7cxxclss)" nil t)
          (when (re-search-forward "(7cxxsslc)" nil t)
            (> (point) p)))))))

(defun d-latexize--inside-vari ()
  (save-excursion
    (save-match-data
      (let ((p (point)))
        (when (re-search-backward "(7cxxvari)" nil t)
          (when (re-search-forward "(7cxxirav)" nil t)
            (> (point) p)))))))

(defun d-latexize--inside-grnc ()
  (save-excursion
    (save-match-data
      (let ((p (point)))
        (when (re-search-backward "(7cxxgrnc)" nil t)
          (when (re-search-forward "(7cxxcnrg)" nil t)
            (> (point) p)))))))

(defun d-latexize--inside-redc ()
  (save-excursion
    (save-match-data
      (let ((p (point)))
        (when (re-search-backward "(7cxxredc)" nil t)
          (when (re-search-forward "(7cxxcder)" nil t)
            (> (point) p)))))))

(defun d-latexize--inside-numb ()
  (save-excursion
    (save-match-data
      (let ((p (point)))
        (when (re-search-backward "(7cxxnumb)" nil t)
          (when (re-search-forward "(7cxxbmun)" nil t)
            (> (point) p)))))))

(defun d-latexize--inside-keyw ()
  (save-excursion
    (save-match-data
      (let ((p (point)))
        (when (re-search-backward "(7cxxkeyw)" nil t)
          (when (re-search-forward "(7cxxwyek)" nil t)
            (> (point) p)))))))

(defun d-latexize--inside-decn ()
  (save-excursion
    (save-match-data
      (let ((p (point)))
        (when (re-search-backward "(7cxxdecn)" nil t)
          (when (re-search-forward "(7cxxnced)" nil t)
            (> (point) p)))))))

(defun d-latexize--inside-comment-or-string ()
  (save-match-data
    (or (d-latexize--inside-comment)
        (d-latexize--inside-string)
        (d-latexize--inside-func)
        (d-latexize--inside-hash)
        (d-latexize--inside-prvt)
        (d-latexize--inside-glbl)
        (d-latexize--inside-jtw)
        (d-latexize--inside-clss)
        (d-latexize--inside-vari)
        (d-latexize--inside-grnc)
        (d-latexize--inside-redc)
        (d-latexize--inside-numb)
        (d-latexize--inside-keyw)
        (d-latexize--inside-decn)
        )))

;; (d-latexize--inside-function "main")
;; (setq function "main")
(defun d-latexize--inside-function (function)
  (save-excursion
    (save-match-data
      (let ((p (point)))
        (cond
         ((eq major-mode 'lisp++-mode)
          (when (re-search-backward (concat "(cname " function ")") nil t)
            (beginning-of-line)
            (forward-sexp 1)
            (> (point) p)))
         ((eq major-mode 'c++-mode)
          ;;(eq major-mode 'emacs-lisp-mode))
          (when (re-search-backward (concat "\\<" function "(") nil t)
            (beginning-of-line)
            (forward-line 1)
            (skip-chars-forward " \t")
            (if (not (looking-at "{"))
                (error "not looking at {")
              (forward-sexp 1)
              (> (point) p))))
         ) ;; END COND!
        )  ;; END LET!
      )    ;; END SAVE-MATCH-DATA!
    )      ;; END SAVE-EXCURSION!
  )        ;; END defun!

;;(when (not (fboundp 'checkpoint))
(defun checkpoint (str &rest rest)
  (message "*** checkpoint ...%s  %s" *munged-target* (apply 'format str rest)))

;; (d-goto-char-safe -5)
;; (d-goto-char-safe (+ (point-max) 5))
(defun d-goto-char-safe (p)
  "Safely goto char, clamps to within the range (point-min) ... (point-max)"
  (goto-char (d-point-at-safe p)))

(defun d-point-at-safe (p)
  "Returns the point clamped to within the range (point-min) ... (point-max)"
  (min (max (point-min) p) (point-max)))

(defun d-looking-at-7cxx (p)
  (save-excursion
    (save-match-data
      (goto-char p)
      (skip-chars-forward " \t")
      (looking-at "(7cxx")
      )
    )
  )

(defun d-peek-at (p)
  "Returns the string peeking at location (goto-char p)"
  (concat
   (buffer-substring-no-properties (d-point-at-safe (- p 40)) p)
   "<X>"
   (buffer-substring-no-properties p (d-point-at-safe (+ p 40)))))

;; (setq wait-period 6)
(defun sit-and-message (secs str)
  (while (> secs 0)
    (message (if (= secs 1)
                 "* Pausing for %s second...%s"
               "* Pausing for %s seconds...%s") secs str)
    (sit-for 1)
    (decf secs)
    ))

(defun doit ()
  (interactive)
  (let ((case-fold-search nil)
        (debug-on-error t)
        str str1 str2)

(when (or (not (boundp '*target*)) (not *target*))
      ;;(setq *target* "d:/home/c++-projects/lisp++2c++-lisp++2c++.el")
      ;;(setq *target* "/media/C1TB/home/c++-projects/lisp++2c++-cclass.el")
      ;;(setq *target* "d:/home/c++-projects/2012/Arithmetickles/arithmetickles.lisp++")
      ;;(setq *target* "~/c++-projects/2012/Arithmetickles/glyph_a.lisp++")
      ;;(setq *target* "~/lisp++-projects/2012/cpause/my_time_sharing_system.h++")
      ;;(setq *target* "~/lisp++-projects/2006/libd/ptr.hh")
      ;;(setq *target* "~/book/foo.hh")
      ;;(setq *target* "~/book/foo.lisp++")
      ;;(setq *target* "~/book/foo.el")
      (setq *target* "~/book/jtw-tutorials/Test.java")
      )

(progn
      (setq *target* (expand-file-name *target*))
      ;;(setq *target* "m4-emacs-pretty-print-latex.m4")
      (d-assert (string-match "/[^/]+/[^/]+$" *target*))
      (d-assert (match-beginning 0))
      (d-assert (match-end 0))
      (setq *munged-target* (substring *target*
                                       (match-beginning 0)
                                       (match-end 0))))

;;(d-debug "foomatic")
    (checkpoint "checkpoint:1")
    (checkpoint "checkpoint:2")

(assert (boundp '*target*))
    (assert *target*)
    (checkpoint "*** d-latexize found file=\"%s\"" *target*)
    (assert (not (string= "" *target*)))

(checkpoint "checkpoint:3")

;;(message "**** *target*=%s" *target*)

    (let ((auto-mode-alist (append '(("\\.m4$"         . tes-mode)
                                     ("\\.tes$"        . tes-mode)
                                     ("\\.el$"         . emacs-lisp-mode)
                                     ("\\.lisp\\+\\+$" . lisp++-mode)
                                     ("\\.c$"          . c++-mode)
                                     ("\\.h$"          . c++-mode)
                                     ("\\.hh$"         . c++-mode)
                                     ("\\.ch$"         . c++-mode)
                                     ("\\.cc$"         . c++-mode)
                                     ("\\.lzz$"        . c++-mode)
                                     ("\\.h\\+\\+$"    . c++-mode)
                                     ("\\.ch\\+\\+$"   . c++-mode)
                                     ("\\.c\\+\\+$"    . c++-mode)
                                     ("\\.java$"       . java-mode)
                                     ("\\.jtw$"        . jtw-mode))
                                   auto-mode-alist)))
      (setq *buf* (find-file *target*))
      (assert (> (point-max) 0))
      (read-only-mode -1)
      (setq c-basic-offset 3)
      (cond
       ((eq major-mode 'emacs-lisp-mode)
        ;;(c-set-offset 'substatement 0)
        ;;(c-set-offset 'substatement-open 0)
        ;;(c-set-offset 'else-clause 0)
        ;;(c-set-offset 'statement-case-intro 0)
        (indent-region (point-min) (point-max)))
       ((eq major-mode 'lisp++-mode)
        ;;(c-set-offset 'substatement 0)
        ;;(c-set-offset 'substatement-open 0)
        ;;(c-set-offset 'else-clause 0)
        ;;(c-set-offset 'statement-case-intro 0)
        (indent-region (point-min) (point-max)))
       ((eq major-mode 'c++-mode)
        ;;(message "checkpoint:a1")
        ;;(c-set-offset 'substatement 0)
        ;;(c-set-offset 'substatement-open 0)
        ;;(c-set-offset 'else-clause 0)
        ;;(c-set-offset 'statement-case-intro 0)
        ;;(c-set-offset 'comment-intro 0)
        (indent-region (point-min) (point-max))
        )
       ((eq major-mode 'java-mode)
        ;;(c-set-offset 'substatement 0)
        ;;(c-set-offset 'substatement-open 0)
        ;;(c-set-offset 'else-clause 0)
        ;;(c-set-offset 'statement-case-intro 0)
        (indent-region (point-min) (point-max)))
       ((eq major-mode 'jtw-mode)
        ;;(jtw--meta-control-backslash)
        )
       ((eq major-mode 'tes-mode)
        ;;(c-set-offset 'substatement 0)
        ;;(c-set-offset 'substatement-open 0)
        ;;(c-set-offset 'else-clause 0)
        ;;(c-set-offset 'statement-case-intro 0)
        (indent-region (point-min) (point-max)))
       )
      (modify-syntax-entry ?_ "w")
      )

(setq-default font-lock-keywords-case-fold-search nil)

(checkpoint "checkpoint:4")

(setq str-variable1234-no-space (concat
                                     "\\<\\(\\(signed[ \t]+\\|unsigned[ \t]+"
                                     "\\|const[ \t]+\\)*"
                                     "\\(dmp::\\|std::\\)?"
                                     "\\(void\\|bool\\|char\\|short\\|int\\|long"
                                     "\\|float\\|double"
                                     "\\|safe_bool\\|safe_int\\|"
                                     "\\|string\\|string_buffer"
                                     "\\|m?ptr< ?[A-Z][a-zA-Z0-9_<,]*[ >]*"
                                     "\\|[A-Z]+[a-z][a-zA-Z0-9_<,]*[ >]*"
                                     "\\|[A-Z][0-9]?"
                                     "\\|BITMAP\\|RLE_SPRITE\\|SAMPLE"
                                     "\\)[ \t]*[&*]*[ \t]*\\)"
                                     ))

(setq str-variable1234-yes-space (concat
                                      "\\<\\(\\(signed[ \t]+\\|unsigned[ \t]+"
                                      "\\|const[ \t]+\\)*"
                                      "\\(dmp\\|std\\)?"
                                      "\\(void\\|bool\\|char\\|short\\|int\\|long"
                                      "\\|float\\|double"
                                      "\\|safe_bool\\|safe_int\\|"
                                      "\\|string\\|string_buffer"
                                      "\\|m?ptr<[A-Z][a-zA-Z0-9_<,]*[ >]*"
                                      "\\|[A-Z]+[a-z][a-zA-Z0-9_<,]*[ >]*"
                                      "\\|[A-Z][0-9]?"
                                      "\\|BITMAP\\|RLE_SPRITE\\|SAMPLE"
                                      "\\)[ \t]*[&*]*[ \t]+\\)"
                                      ))

(checkpoint "checkpoint:5")

(when (or (eq major-mode 'lisp++-mode)
              (eq major-mode 'emacs-lisp-mode))
      (set-syntax-table (copy-syntax-table))
      (modify-syntax-entry ?- "w")
      (modify-syntax-entry ?_ "w")
      )

(checkpoint "checkpoint:6")

(condition-case err
        (progn
          (goto-char (point-min))
          (while (re-search-forward "{" nil t)
            (replace-match "(2zz){" 'fixedcase)
            ))
      (error (message "Error 7! err=%s" err)))

(checkpoint "checkpoint:7")

(condition-case err
        (progn
          (goto-char (point-min))
          (while (re-search-forward "}" nil t)
            (replace-match "(2zz)}" 'fixedcase)
            ))
      (error (message "Error 7! err=%s" err)))

(checkpoint "checkpoint:8")

(condition-case err
        (progn
          (goto-char (point-min))
          (while (re-search-forward "\\$" nil t)
            (replace-match "(2zz)$" 'fixedcase)
            ))
      (error (message "Error 8! err=%s" err)))

(checkpoint "checkpoint:9")

(condition-case err
        (progn
          (goto-char (point-min))
          ;;(message "Joni Mitchell / Blue / All I Want")
          ;;(while (re-search-forward "\\(^[ \t]*\\)\C-l\\([ \t]+\\)\\(.*$\\)" nil t)
          ;;  ;;(message "David Bowie / 1993 - Black Tie White Noise")
          ;; (replace-match "\\1\\2\\3" 'fixedcase))
          (goto-char (point-min))
          (while (re-search-forward "\\(^[ \t]*\\)\C-l\\([ \t]+\\)\\(.*$\\)" nil t)

 ;; foo
            ;;(debug "Metallica / Kill 'Em All / Hit the Lights")
            (setq pad1    (d-buffer-substring (match-beginning 1) (match-end 1)))
            (setq pad2    (d-buffer-substring (match-beginning 2) (match-end 2)))
            (setq str-new (d-buffer-substring (match-beginning 3) (match-end 3)))
            ;;(d-error "Terraplane Blues / Robert Johnson")
            (save-match-data
              (d-assert (string-match (concat "[-a-zA-Z0-9_~!@#$%^&*+<=,.>/?]"
                                              ".*"
                                              "[-a-zA-Z0-9_~!@#$%^&*+<=,.>/?]") str-new)))
            (setq long-string "01234567890123456789012345678901234567890123456789012345678901234567890123456789")
            (setq long-string-dots (make-string (length long-string) ?.))
            (setq long-string-substr (substring long-string-dots
                                                0
                                                (max 0 (- 70 (length str-new)))))
            ;;(d-error "John Coltrane / My Favorite Things")
            (message "pad1=%s"               (prin1-to-string pad1))
            (message "pad2=%s"               (prin1-to-string pad2))
            (message "str-new=%s"            (prin1-to-string str-new))
            (message "long-string-substr=%s" (prin1-to-string long-string-substr))
            ;;(replace-match "\\1^L\\2\\3" 'fixedcase)
            (message "Metallica / Hardwired...To Self-Destruct / For Whom The Bell Tolls (Live at Rasputin Music)")
            (setq str (concat "{(2zz)bf(2zz)colorbox{red}{"
                              "{(2zz)color{red}{"
                              pad1
                              "}}{(2zz)color{white}{"
                              "^L"
                              "}}{(2zz)color{red}{"
                              pad2
                              "}}{(2zz)color{white}{"
                              str-new
                              "}}{(2zz)color{red}{"
                              long-string-substr
                              "}}}"
                              "}\n"))
            (message "Blondie / 80s Groove - The Ultimate Collection (CD 3,5) / Rapture")
            (replace-match str 'fixedcase)
            (message "Paul Simon/Graceland/All Around The World Or The Myth Of Fingerprints")
            (message "str=(%s)" str)
            (defun d-splat-spaces (func min max)
              (goto-char min)
              (save-match-data
                (while (search-forward " " max t)
                  (replace-match func 'fixedcase))))
            (forward-line -1)
            (message "(d-current-line-as-string)=(%s)" (d-current-line-as-string))
            (d-splat-spaces "(2zz)rd{}" (point-at-bol) (point-at-eol))
            (message "(d-current-line-as-string)=(%s)" (d-current-line-as-string))
            ;;(message "(d-buffer-substring)=(%s)"(d-buffer-substring(point-min)(point-max)))
            ;;(debug "The Pretenders / Self Titled / Precious")
            ))
      (error (message "Error 9! err=%s" err)))

;;(debug "Queen / A Kind Of Magic / A Kind Of Magic")

    (checkpoint "checkpoint:10")

(condition-case err
        (when (eq major-mode 'emacs-lisp-mode)
          (goto-char (point-min))
          (while (and (re-search-forward "\\(^\\|[^;]\\);;[^;]" nil t)
                      (not (save-excursion
                             (beginning-of-line)
                             (looking-at "^[ \t]*^L"))))
            (save-excursion
              (d-goto-char-safe (- (point) 3))
              (skip-chars-backward " \t")
              (insert "(7cxxcomm){(2zz)color{comm}{")
              (end-of-line)
              (insert "}}(7cxxmmoc)"))))
      (error (message "Error 10! err=%s" err)))

(checkpoint "checkpoint:11")

(condition-case err
        (when (eq major-mode 'emacs-lisp-mode)
          (goto-char (point-min))
          (while (and (re-search-forward ";;;" nil t)
                      (not (save-excursion
                             (beginning-of-line)
                             (looking-at "^[ \t]*^L")))
                      (not (d-latexize--inside-comment)))
              (save-excursion
                (d-goto-char-safe (- (point) 3))
                (skip-chars-backward " \t")
                (insert "(7cxxcomm){(2zz)bf(2zz)color{red}{")
                ;;(end-of-line)
                (forward-line 1)
                (beginning-of-line)
                ;; (d-latexize--inside-comment) => t
                (insert "}}(7cxxmmoc)"))))
          (error (message "Error 11! err=%s" err)))

(checkpoint "checkpoint:12")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'jtw-mode)
                  (eq major-mode 'java-mode)
                  (eq major-mode 'lisp++-mode))
          (goto-char (point-min))
          (while (and (re-search-forward "\\(^\\|[^/]\\)//[^/]" nil t)
                      (not (save-excursion
                             (beginning-of-line)
                             (looking-at "^[ \t]*^L"))))
            (save-excursion
              (d-goto-char-safe (- (point) 3))
              (skip-chars-backward " \t")
              (insert "(7cxxcomm){(2zz)color{comm}(2zz)em{")
              (end-of-line)
              (insert "}}(7cxxmmoc)")
              )))
          (error (message "Error 12! err=%s" err)))

(checkpoint "checkpoint:13")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'jtw-mode)
                  (eq major-mode 'java-mode)
                  (eq major-mode 'lisp++-mode))
          (goto-char (point-min))
          (while (and (re-search-forward "///" nil t)
                      (not (save-excursion
                             (beginning-of-line)
                             (looking-at "^[ \t]*^L")))
                      (not (d-latexize--inside-comment)))
            (d-goto-char-safe (- (point) 3))
            (skip-chars-backward " \t")
            (insert "(7cxxcomm){(2zz)bf(2zz)em(2zz)color{red}{")
            (end-of-line)
            (insert "}}(7cxxmmoc)")))
      (error (message "Error 13! err=%s" err)))

(checkpoint "checkpoint:14")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'jtw-mode)
                  (eq major-mode 'java-mode)
                  (eq major-mode 'lisp++-mode))
          (goto-char (point-min))
          (while (and (re-search-forward "/\\*\\*" nil t)
                      (not (save-excursion
                             (beginning-of-line)
                             (looking-at "^[ \t]*^L"))))
            (save-excursion
              (d-goto-char-safe (- (point) 3))
              (when t ;;(not (d-latexize--inside-comment))
                ;;(skip-chars-backward " \t")
                (insert "(7cxxcomm){(2zz)bf(2zz)em(2zz)color{red}{")
                (re-search-forward "*/")
                (insert "}}(7cxxmmoc)")))))
      (error (message "Error 14! err=%s" err)))

(checkpoint "checkpoint:15")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'jtw-mode)
                  (eq major-mode 'java-mode)
                  (eq major-mode 'lisp++-mode))
          (goto-char (point-min))
          (while (and (re-search-forward "/\\*" nil t)
                      (not (save-excursion
                             (beginning-of-line)
                             (looking-at "^[ \t]*^L")))
                      (not (d-latexize--inside-comment)))
            (save-excursion
              (d-goto-char-safe (- (point) 2))
              (skip-chars-backward " \t")
              (insert "(7cxxcomm){(2zz)color{comm}(2zz)em{")
              (re-search-forward "*/")
              (insert "}}(7cxxmmoc)"))))
      (error (message "Error 15! err=%s" err)))

(checkpoint "checkpoint:16")

(condition-case err
        (when (eq major-mode 'c++-mode)
          (goto-char (point-min))
          (while (re-search-forward "^\\([ \t]*\\)\\(#include[ \t]+\\)\\(<.+>\\|\".+\"\\)" nil t)
            (if (and (not (d-latexize--inside-comment))
                     (not (d-latexize--inside-hash)))
                (replace-match "\\1(7cxxhash){(2zz)colorbox{incl}{#include}} {(2zz)color{black}{(2zz)colorbox{string-bg}{(2zz)bf{\\3(2zz)padd}}}}(7cxxhsah)" 'fixedcase)
              )))
      (error (message "Error 16! err=%s" err)))

(checkpoint "checkpoint:17")

(condition-case err
        (when (eq major-mode 'c++-mode)
          (goto-char (point-min))
          (while (re-search-forward "^[ \t]*\\(#[a-z]+\\)[ \t]+\\([a-zA-Z_][A-Za-z0-9_]*\\)(" nil t)
            (if (and (not (d-latexize--inside-comment))
                     (not (d-latexize--inside-hash)))
                (replace-match "(7cxxhash){(2zz)colorbox{incl}{\\1(2zz)padd}} {(2zz)colorbox{func}{(2zz)color{func-fg}{\\2(2zz)padd}}}(7cxxhsah)(" 'fixedcase)
              )))
      (error (message "Error 17! err=%s" err)))

(checkpoint "checkpoint:18")

(condition-case err
        (when (eq major-mode 'c++-mode)
          (goto-char (point-min))
          (while (re-search-forward "^[ \t]*\\(#[a-z]+\\)[ \t]+\\([a-zA-Z_][A-Za-z0-9_]*\\)" nil t)
            (if (and (not (d-latexize--inside-comment))
                     (not (d-latexize--inside-hash)))
                (replace-match "(7cxxhash){(2zz)colorbox{incl}{\\1(2zz)padd}} {(2zz)color{vari}{\\2}}(7cxxhsah)" 'fixedcase)
              )))
      (error (message "Error 18! err=%s" err)))

(checkpoint "checkpoint:19")

(condition-case err
        (when (eq major-mode 'c++-mode)
          (goto-char (point-min))
          (while (re-search-forward "^\\([ \t]*\\)\\(#[a-z]+\\)" nil t)
            (if (and (not (d-latexize--inside-comment))
                     (not (d-latexize--inside-hash)))
                (replace-match "\\1(7cxxhash){(2zz)colorbox{incl}{\\2(2zz)padd}}(7cxxhsah)" 'fixedcase)
              )))
      (error (message "Error 19! err=%s" err)))

(checkpoint "checkpoint:20")

(condition-case err
        (progn
          (goto-char (point-min))
          (while (re-search-forward (concat "\\([^\\]\\)\\('\\(\\\\\\\\\\|"
                                            "\\\\n\\|\\\\r\\|\\\\t\\|"
                                            "[^'\"\\\r\n\t]\\)'\\)") nil t)
            (if (and (not (d-latexize--inside-comment))
                     (not (d-latexize--inside-string))
                     (not (d-latexize--inside-hash)))
                (replace-match (concat "\\1(7cxx""stri){(2zz)bf(2zz)colorbox{string-bg}{(2zz)color{black}{\\2(2zz)padd}}}(7cxx""irts)") 'fixedcase))
            ))
      (error (message "Error 20! err=%s" err)))

(checkpoint "checkpoint:21")

(condition-case err
        (progn
          (goto-char (point-min)) ;;                            12345678
          (while (re-search-forward (concat "\\([^\\]\\)\\(\"\\(\\\\\\\\\\|"
                                            "\\\\^\\|\\\\\'\\|\\\\\"\\|\\\\[0-3][0-7][0-7]\\|"
                                            "\\\\0\\|\\\\t\\|\\\\r\\|\\\\n\\|\\\\C-.\\|" ;;"\\\\" "\\\\\\|"
                                            "\\\\$\\|[^\"\\\r\n\t]\\)*\"\\)") nil t)
            (if (and (not (d-latexize--inside-comment))
                     (not (d-latexize--inside-string))
                     (not (d-latexize--inside-hash))) ;;"\\abc\\def"
                (replace-match (concat "(7cxx""stri)\\1{(2zz)colorbox{string-bg}{(2zz)color{black}{\\2(2zz)padd}}}(7cxx""irts)") 'fixedcase)
              ;;(replace-match "\\1(7cxx""stri){(2zz)EMPH({\\2(2zz)padd})}(7cxx""irts)" 'fixedcase)))
              )))
      (error (message "Error 21! err=%s" err)))

(checkpoint "checkpoint:22a")

(d-quote
     condition-case err
     (progn
       (goto-char (point-min))
       (setq count 0)
       (while (re-search-forward "EOL().*EOL()" nil t)
         (incf count)
         (message "Metallica / Sad but True count=%s" count)))
     (error (debug "Error 22a! err=%s" err)))

(d-quote
     condition-case err
     (progn
       (goto-char (point-min))
       (setq count 0)
       (while (re-search-forward "EOL.*EOL" nil t)
         (incf count)
         (message "James Brown / I Feel Good (I Got You) count=%s" count)))
     (error (debug "Error 22b! err=%s" err)))

(condition-case err
        (save-match-data
          (goto-char (point-min))
          (setq count 0)
          (while (re-search-forward "EOL[()]*" nil t)
            (replace-match "\\\\\\\\" 'fixedcase)
            (incf count)
            (message "Madonna / Like a Prayer cur-line=%s" (d-current-line-as-string))))
      (error (message "Error 22c! err=%s" err)))

(d-quote
     condition-case err
     (progn
       (setq count 0)
       (while (re-search-forward "\\(\\\\\\\\\\)" nil t)
         (incf count)
         (message "Simon and Garfunkel / Bridge Over Troubled Water count=%s" count)
         ))
     (error (message "Error 22d! err=%s" err)))

;;(message "count=%s" count)

    (checkpoint "checkpoint 22e")

;; HAIRY-LEMON!
    (let (number n0 n1 n2 line) ;; (setq number 123)
      (condition-case err
          (block nil
            (goto-char (point-min))
            (setq number 1)
            (while (re-search-forward "\\(^.*$\\)" nil t)
              (if (eobp)
                  (return))
              (setq line (d-buffer-substring (match-beginning 1) (match-end 1)))
              (setq n0 (mod    number 10))       ;; (setq n0 1)
              (setq n1 (mod (/ number 10)   10)) ;; (setq n1 2)
              (setq n2 (mod (/ number 100)  10)) ;; (setq n2 3)
              ;;(setq n3 (mod (/ number 1000) 10)) ;; (setq n3 3)
              (if (= number 1)
                  (replace-match "EOL()(2zz)noindent{(2zz)bf(2zz)rm(2zz)tt{001}}(2zz)phantom{M} \\& EOL"
                                 'fixedcase)
                (replace-match
                 (format "(2zz)noindent{(2zz)bf(2zz)rm(2zz)tt{%d%d%d}}(2zz)phantom{M} \\& EOL"
                         n2 n1 n0
                         ) 'fixedcase))
              (forward-line 1)
              (incf number)
              ;;(message "line=%s" line)
              ;;(message "eobp=%s" (eobp))
              ;;(message "checkpoint:22e number=%s" number)
              ))
        ;;(error (message "Error 22e! err=%s" err))
        )
      (message "PJ Harvey / Let England Shake")
      )

(condition-case err
        (when (eq major-mode 'c++-mode)
          (goto-char (point-min))
          (while (re-search-forward "\\(dmp\\|std\\)::" nil t)
            (when (or (d-latexize--inside-comment)
                      (d-latexize--inside-string)
                      (d-latexize--inside-func)
                      (d-latexize--inside-hash)
                      (d-latexize--inside-prvt)
                      (d-latexize--inside-glbl)
                      (d-latexize--inside-jtw)
                      ;;(d-latexize--inside-clss)
                      (d-latexize--inside-vari)
                      (d-latexize--inside-grnc)
                      (d-latexize--inside-redc)
                      (d-latexize--inside-numb)
                      (d-latexize--inside-keyw)
                      (d-latexize--inside-decn)
                      )
              (replace-match "{(2zz)tt{(2zz)color{red}{\\1}::}}" 'fixedcase))))
      (error (message "Error 22e! err=%s" err)))

(checkpoint "checkpoint 22f")

(condition-case err
        (when (eq major-mode 'jtw-mode)
          (goto-char (point-min))
          (while (re-search-forward (concat "\\<\\(constructor\\) \\([A-Z][a-zA-Z0-9]*\\)\\>") nil t)
            (when (save-excursion
                    (d-goto-char-safe (+ (point) 1))
                    (not (d-latexize--inside-comment-or-string)))
              (replace-match "(7cxxclss){(2zz)bf{constructor}} {(2zz)bf(2zz)color{clss}{\\2}}(7cxxsslc)" 'fixedcase))))
      (error (message "Error 22f! err=%s" err)))

(checkpoint "checkpoint:22g")

(condition-case err
        (when (eq major-mode 'jtw-mode)
          (goto-char (point-min))
          (while (re-search-forward (concat "\\<\\(property\\|classVar\\|" ;;   ...
                                            "function\\|method\\|this\\|"
                                            "superfor\\|var\\|constructor\\|"
                                            "to\\|downto\\|step\\|"
                                            "then\\|elseif\\|begin\\|end\\|"
                                            "beginMain\\|endMain\\)\\>") nil t)
            (when (save-excursion
                    (d-goto-char-safe (+ (point) 1))
                    (not (d-latexize--inside-comment-or-string)))
              (replace-match "(7cxxkeyw){(2zz)bf{\\1}}(7cxxwyek)" 'fixedcase))))
      (error (message "Error 22g! err=%s" err)))

(checkpoint "checkpoint:22h")

(condition-case err
        (when (eq major-mode 'jtw-mode)
          (goto-char (point-min))
          (while (re-search-forward (concat "\\<\\(constructor\\) \\([A-Z][a-zA-Z0-9_]*\\)\\>") nil t)
            (when (save-excursion
                    (d-goto-char-safe (+ (point) 1))
                    (not (d-latexize--inside-comment-or-string)))
              (replace-match "(7cxxfunc){(2zz)bf{\\2}}(7cxxwcnuf)" 'fixedcase))))
      (error (message "Error 22h! err=%s" err)))

(checkpoint "checkpoint:22i")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'jtw-mode))
          (goto-char (point-min))
          (while (re-search-forward "\\<\\(public\\|protected\\|private\\)\\>" nil t)
            (when (not (d-latexize--inside-comment-or-string))
              (replace-match "(7cxxkeyw){(2zz)bf{\\1}}(7cxxwyek)" 'fixedcase))))
      (error (message "Error 27! err=%s" err)))

(condition-case err
        (when (eq major-mode 'c++-mode)
          (goto-char (point-min))
          (while (re-search-forward "\\(ABSTRACT\\|final\\)" nil t)
            (when (not (d-latexize--inside-comment-or-string))
              (replace-match "{(2zz)bf{\\1}}" 'fixedcase))))
      (error (message "Error 22i! err=%s" err)))

(checkpoint "checkpoint:22j")

(condition-case err
        (when (eq major-mode 'c++-mode)
          (goto-char (point-min)) ;;
          (while (re-search-forward (concat "\\(OK\\)(") nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "(7cxxfunc){(2zz)bf(2zz)colorbox{func}{(2zz)color{func-fg}{\\1}}}(7cxxcnuf)(" 'fixedcase))))
      (error (message "Error 22j! err=%s" err)))

(checkpoint "checkpoint:22k")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'jtw-mode)
                  (eq major-mode 'java-mode)
                  (eq major-mode 'lisp++-mode))
          (goto-char (point-min))
          (while (re-search-forward "\\([<>. ()=:\t\r\n]\\)\\(private_[a-zA-Z0-9_]*\\|_[a-zA-Z0-9_]*\\)" nil t)
            (when (not (d-latexize--inside-comment-or-string))
              (replace-match (concat "\\1(7cxxprvt)"
                                     "{(2zz)bf(2zz)colorbox{prvt}{(2zz)color{func-fg}{\\2(2zz)padd}}}"
                                     "(7cxxtvrp)") 'fixedcase)
              )))
      (error (message "Error 22k! err=%s" err)))

(checkpoint "checkpoint:23")

(condition-case err
        (when (or (eq major-mode 'jtw-mode)
                  (eq major-mode 'java-mode))
          ;;(sit-and-message 1 "top function|method")
          (goto-char (point-min)) ;;      1           2                                                                                                                                3           4                          ...
          (while (re-search-forward "\\<\\([a-z.]*\\)\\(void\\|boolean[][]*\\|char[][]*\\|short[][]*\\|int[][]*\\|long[][]*\\|float[][]*\\|double[][]*\\|[A-Z][a-zA-Z0-9_<,>]*[][]*\\)\\([ \t]+\\)\\([a-z][a-zA-Z0-9_]*\\)[ \t]*(" nil t)
            (when (and (not (d-latexize--inside-comment-or-string))
                       (match-beginning 1) (match-end 1)
                       (match-beginning 2) (match-end 2)
                       (match-beginning 3) (match-end 3)
                       (match-beginning 4) (match-end 4)
                       )
              ;;(sit-and-message 1 (format "found function|method=%s" (buffer-substring-no-properties (match-beginning 2) (match-end 2))))
              (replace-match (concat "(7cxxredc){(2zz)color{red}{\\1}}(7cxxcder)"
                                     "(7cxxclss){(2zz)bf(2zz)color{clss}{\\2}}(7cxxsslc)\\3"
                                     "(7cxxfunc){(2zz)bf(2zz)colorbox{func}{(2zz)color{func-fg}{\\4}(2zz)padd}}(7cxxcnuf)(") 'fixedcase)
              )))
      (error (message "Error 23! err=%s" err)))

(checkpoint "checkpoint:24")

(condition-case err
        (when (or (eq major-mode 'jtw-mode)
                  (eq major-mode 'java-mode))
          ;;(sit-and-message 1 "top classVar|property")
          (goto-char (point-min))
          (while (re-search-forward (concat "\\<\\([a-z.]*\\)" ;; 1
                                            "\\(void\\|boolean[][]*\\|char[][]*\\|short[][]*\\|int[][]*\\|long[][]*\\|float[][]*\\|double[][]*\\|[A-Z][a-zA-Z0-9_<,>]*[][]*\\)\\([ \t]+\\)" ;; 2/3
                                            "\\([a-z][a-zA-Z0-9_]*\\)" ;; 4
                                            "\\([ \t]*[=;]\\)") nil t) ;; 5
            ;;(sit-and-message 1 (format "re-search-forward classVar|property s1=(%s)s2=(%s)s3=(%s)"
            ;;                           (buffer-substring-no-properties (match-beginning 1) (match-end 1))
            ;;                           (buffer-substring-no-properties (match-beginning 2) (match-end 2))
            ;;                           (buffer-substring-no-properties (match-beginning 3) (match-end 3))
            ;;                           ))
            (when (and (not (d-latexize--inside-comment-or-string))
                       (match-beginning 1) (match-end 1)
                       (match-beginning 2) (match-end 2)
                       (match-beginning 3) (match-end 3)
                       (match-beginning 4) (match-end 4)
                       (match-beginning 5) (match-end 5)
                       )
              ;;(sit-and-message 1 (format "found classVar|property=(%s)" (buffer-substring-no-properties (match-beginning 2) (match-end 2))))
              (replace-match (concat "(7cxxredc){(2zz)color{red}{\\1}}(7cxxcder)"
                                     "(7cxxclss){(2zz)bf(2zz)color{clss}{\\2}}(7cxxsslc)\\3"
                                     "(7cxxvari){(2zz)color{vari}{\\4}}(7cxxsslc)\\5") 'fixedcase)
              )))
      (error (message "Error 24! err=%s" err)))

(checkpoint "checkpoint:25")

(condition-case err
        (when (or (eq major-mode 'jtw-mode)
                  (eq major-mode 'java-mode))
          ;;(sit-and-message 1 "top void|int|char|float|double")
          (goto-char (point-min))
          (while (progn ;;                      1           2                                                                                                   3                                           4                       5...
                   (d-goto-char-safe (- (point) 3))
                   (re-search-forward (concat "\\([(,] *\\)" ;; 1
                                              "\\(void\\|boolean[][]*\\|char[][]*\\|short[][]*\\|int[][]*\\|long[][]*\\|float[][]*\\|double[][]*\\|\\([a-z.]*\\)[A-Z_][a-zA-Z0-9_<,>]*[][]*\\) " ;; 2 & 3
                                              "\\([a-z][a-zA-Z0-9_]*\\)" ;; 4
                                              "\\( *[,)]\\)") nil t)) ;; 5
            (when (and (not (d-latexize--inside-comment-or-string))
                       (match-beginning 1) (match-end 1)
                       (match-beginning 2) (match-end 2)
                       (match-beginning 4) (match-end 4)
                       (match-beginning 5) (match-end 5))
              ;;(sit-and-message 1 (format "found void|int|char|float|double str=(%s)"
              ;;                           (buffer-substring-no-properties (match-beginning 2) (match-end 2))))
              (if (and (match-beginning 3) (match-end 3))
                  (replace-match (concat "\\1(7cxxclss){(2zz)bf(2zz)color{clss}{\\2}}(7cxxsslc) "
                                         "(7cxxredc){(2zz)color{red}{\\3}}(7cxxcder)"
                                         "(7cxxvari){(2zz)color{vari}{\\4}}(7cxxirav)\\5") 'fixedcase)
                (replace-match (concat "\\1(7cxxclss){(2zz)bf(2zz)color{clss}{\\2}}(7cxxsslc) "
                                       "(7cxxvari){(2zz)color{vari}{\\4}}(7cxxirav)\\5") 'fixedcase))
              )))
      (error (message "Error 25! err=%s" err)))

;;(write-file (concat *target* ".tex"))
    ;;(setq debug-on-error nil)
    ;;(error "Pink Floyd / Outside the wall")
    (checkpoint "checkpoint:26")

(condition-case err
        (when (eq major-mode 'java-mode)
          (goto-char (point-min))
          (while (re-search-forward "\\<\\(true\\|false\\|null\\)\\>" nil t)
            (when (not (d-latexize--inside-comment-or-string))
              (replace-match "(7cxxredc){(2zz)color{red}{\\1}}(7cxxcder)" 'fixedcase)
              )))
      (error (message "Error 26! err=%s" err)))

(checkpoint "checkpoint:27")

(condition-case err
        (when (eq major-mode 'jtw-mode)
          (goto-char (point-min)) ;;   1                                     2  3                           4                                                                      ...
          (while (re-search-forward "\\(public\\|protected\\|private\\|\\) \\(\\(final \\|abstract \\)*\\)\\(classVar\\|property\\|method\\|function\\)\\>" nil t)
            (when (not (d-latexize--inside-comment-or-string))
              (replace-match "(7cxxkeyw){(2zz)bf{\\1 \\2\\4}}(7cxxwyek)" 'fixedcase))))
      (error (message "Error 27! err=%s" err)))

(checkpoint "checkpoint:28")

(condition-case err
        (when (or (eq major-mode 'jtw-mode)
                  (eq major-mode 'c++-mode)
                  (eq major-mode 'java-mode))
          (goto-char (point-min))
          (while (re-search-forward (concat "\\<\\(mutable\\|static\\|final\\|abstract\\|return\\|"
                                            "for\\|while\\|do\\|break\\|continue\\|switch\\|"
                                            "this\\|public\\|private\\|protected\\)\\>") nil t)
            (when (save-excursion
                    (d-goto-char-safe (+ (point) 1))
                    (not (d-latexize--inside-comment-or-string)))
              (replace-match "(7cxxkeyw){(2zz)bf{\\1}}(7cxxwyek)" 'fixedcase))))
      (error (message "Error 28! err=%s" err)))

(checkpoint "checkpoint:29")
    (checkpoint "checkpoint:30")

(condition-case err
        (progn
          (when (eq major-mode 'jtw-mode) ;;                                                        fff                                          fooo
            (goto-char (point-min))
            (while (re-search-forward (concat "\\<\\(foreach\\|[a-z_]*_design_pattern\\|"
                                              "getter\\|setter\\)\\([ \t]*(\\)") nil t)
              (when (save-excursion
                      (d-goto-char-safe (- (point) 2))
                      (not (d-latexize--inside-comment-or-string)))
                (replace-match "(7cxxkeyw){(2zz)colorbox{orange}{(2zz)color{d-foreground}{\\1(2zz)padd}}}(7cxxwyek)\\2" 'fixedcase)
                ) ;; END WHEN!
              )   ;; END while!
            )     ;; END WHEN!
          (when (eq major-mode 'lisp++-mode)
            (goto-char (point-min))
            (while (re-search-forward (concat "(\\(singleton_design_pattern\\|"
                                              "getter\\|setter\\|foreach\\)\\>") nil t)
              (when (save-excursion
                      (d-goto-char-safe (- (point) 2))
                      (not (d-latexize--inside-comment-or-string)))
                (replace-match "((7cxxkeyw){(2zz)colorbox{orange}{(2zz)color{d-foreground}{\\1(2zz)padd}}}(7cxxwyek)" 'fixedcase)
                ) ;; END WHEN!
              )   ;; END while!
            )     ;; END WHEN!
          )       ;; END PROGN!
      (error (message "Error 30! err=%s" err)))

(checkpoint "checkpoint:31")

(condition-case err
        (when (eq major-mode 'lisp++-mode)
          (goto-char (point-min))
          (while (re-search-forward "(\\(c-public-extends\\|c-private-extends\\|c-protected-extends\\) \\([A-Za-z_][a-zA-Z0-9_ ]*\\))" nil t)
            (when (not (d-latexize--inside-comment-or-string))
              (replace-match "((7cxxgrnc){(2zz)color{green-keyw}{\\1}}(7cxxcnrg) (7cxxclss){(2zz)bf(2zz)color{clss}{\\2}}(7cxxsslc))" 'fixedcase))))
      (error (message "Error 31! err=%s" err)))

(checkpoint "checkpoint:32")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'lisp++-mode))
          (goto-char (point-min))
          (while (re-search-forward "\\(\\(std\\|dmp\\)::\\)?\\([a-z][a-zA-Z0-9_]*\\)" nil t)
            (setq prfx (if (and (match-beginning 1) (match-end 1))
                           (progn
                             ;;(message "bar!")
                             (buffer-substring-no-properties (match-beginning 1) (match-end 1)))))
            (setq cout (buffer-substring-no-properties (match-beginning 3) (match-end 3)))
            (d-goto-char-safe (+ (point) 1))
            (when (and (not (d-latexize--inside-comment))
                       (not (d-latexize--inside-string))
                       (or (string= "cout" cout)
                           (string= "cerr" cout)
                           ))
              (message "cout=(%s)" cout)
              (if prfx
                  (replace-match "(7cxxredc){(2zz)color{red}{\\2}::}(7cxxcder)(7cxxvari){(2zz)color{brown}{\\3}}(7cxxirav)" 'fixedcase)
                (replace-match "(7cxxvari){(2zz)color{brown}{\\3}}(7cxxirav)" 'fixedcase)))))
      (error (message "Error 32! err=%s" err)))

(checkpoint "checkpoint:33")

(condition-case err
        (when (string-match "\\.m4\\(<[^<>]*>\\)?$" *target*)
          (goto-char (point-min))
          (while (re-search-forward "(2zz)$[0-9]+" nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "(7cxxnumb){(2zz)color{numb}{\\&}}(7cxxbmun)" 'fixedcase)
              )))
      (error (message "Error 33! err=%s" err)))

(checkpoint "checkpoint:34")

(condition-case err
        (when (eq major-mode 'c++-mode)
          (goto-char (point-min))
          (while (re-search-forward "\\<\\(ptr2mptr\\|mptr2ptr\\)(" nil t)
            (replace-match "(7cxxclss){(2zz)bf(2zz)color{clss}{\\1}}(7cxxsslc)(" 'fixedcase)))
      (error (message "Error 34! err=%s" err)))

(checkpoint "checkpoint:35")

(condition-case err
        (progn
          (goto-char (point-min))
          (while (re-search-forward "\\<\\(FILE\\*\\) \\([a-z][a-zA-Z0-9_]*\\)" nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "(7cxxclss){(2zz)bf(2zz)color{clss}{\\1}}(7cxxsslc) (7cxxvari){(2zz)color{vari}{\\2}}(7cxxirav)" 'fixedcase))))
      (error (message "Error 35! err=%s" err)))

(checkpoint "checkpoint:36")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'lisp++-mode))
          (goto-char (point-min))
          (while (re-search-forward "\\<\\([a-z][a-zA-Z0-9_]*\\)[ \t]*(" nil t)
            (setq str (buffer-substring-no-properties (match-beginning 1) (match-end 1)))
            (if (and (not (d-latexize--inside-comment-or-string))
                     (save-match-data
                       (or (string-match "printf" str)
                           (string-match "fopen"  str)
                           (string-match "fclose" str)
                           (string-match "fputc"  str)
                           (string-match "fgetc"  str)
                           )))
                (replace-match "(7cxxvari){(2zz)color{brown}{\\1}}(7cxxirav)(" 'fixedcase)
              )))
      (error (message "Error 36! err=%s" err)))

(checkpoint "checkpoint:37")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'lisp++-mode))
          (goto-char (point-min))
          (while (re-search-forward (concat "\\<friend class \\([a-z]+::\\)?" str-variable1234-no-space ";") nil t)
            ;;friend class dmp::int;
            (setq str (if (and (match-beginning 1) (match-end 1))
                          (buffer-substring-no-properties (match-beginning 1) (match-end 1))
                        ""))
            (if (string= str "")
                (progn
                  (setq str1 "")
                  (setq str2 ""))
              (assert (> (length str) 2))
              (assert (and (>= (aref str 0) ?a) (<= (aref str 0) ?z)))
              (assert (= (aref str (- (length str) 2)) ?:))
              (assert (= (aref str (- (length str) 1)) ?:))
              (setq str1 (substring str 0 -2))
              (setq str2 (substring str -2)))
            (message "str=%s, str1=%s, str2=%s" str str1 str2)
            (if (string= str "")
                (replace-match       "(7cxxclss){(2zz)bf{friend class}} {(2zz)bf(2zz)color{clss}{\\2}}(7cxxsslc);" 'fixedcase)
              (replace-match (format "(7cxxclss){(2zz)bf{friend class}} {(2zz)color{red}{%s}}::{(2zz)bf(2zz)color{clss}{\\2}}(7cxxsslc);"
                                     str1) 'fixedcase)
              )))
      (error (message "Error 37! err=%s" err)))

(checkpoint "checkpoint:38")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'lisp++-mode))
          (goto-char (point-min))
          (while (re-search-forward "\\(\\<DCODE_GENERIC\\>\\)" nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "(7cxxgrnc){(2zz)color{red}(2zz)colorbox{cyan}{\\1(2zz)padd}}(7cxxcnrg)" 'fixedcase)
              )
            )
          )
      (error (message "Error 38! err=%s" err)))

(checkpoint "checkpoint:39")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'lisp++-mode))
          (goto-char (point-min))
          (while (re-search-forward "\\(\\<DCODE_[A-Z0-9_]*\\)" nil t)
            (if (save-excursion
                  (d-goto-char-safe (- (point) 3))
                  (not (d-latexize--inside-comment-or-string)))
                (replace-match "(7cxxredc){(2zz)color{func-fg}(2zz)colorbox{red}{\\1(2zz)padd}}(7cxxcder)" 'fixedcase)
              )
            )
          )
      (error (message "Error 39! err=%s" err)))

(checkpoint "checkpoint:40")

(condition-case err
        (when (eq major-mode 'c++-mode)
          (goto-char (point-min))
          (while (re-search-forward "\\<\\(enum_debug_code\\)[ \t]+\\([a-zA-Z0-9_]+\\)" nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "(7cxxclss){(2zz)bf(2zz)color{clss}{\\1}}(7cxxsslc) (7cxxvari){(2zz)color{vari}{\\2}}(7cxxirav)" 'fixedcase)
              )))
      (error (message "Error 40! err=%s" err)))

(checkpoint "checkpoint:41")

(condition-case err
        (when (eq major-mode 'c++-mode)
          (goto-char (point-min))
          (while (re-search-forward "\\<\\(enum\\)[ \t]+\\([a-zA-Z0-9_]+\\)" nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "(7cxxclss){(2zz)bf{enum}}(7cxxsslc) (7cxxclss){(2zz)bf(2zz)color{clss}{\\2}}(7cxxsslc)" 'fixedcase)
              )))
      (error (message "Error 41! err=%s" err)))

(checkpoint "checkpoint:42")

(condition-case err
        (when (eq major-mode 'emacs-lisp-mode)
          (goto-char (point-min))
          (while (re-search-forward (concat "\\([][ \t\r\n()]\\)"
                                            "\\(red[-a-zA-Z0-9_]*\\)") nil t)
            ;; prod-red-foo
            ;; red-foo
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "\\1(7cxxvari){(2zz)color{red}{\\2}}(7cxxirav)" 'fixedcase)
              )))
      (error (message "Error 42! err=%s" err)))

(checkpoint "checkpoint:43")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'lisp++-mode))
          (goto-char (point-min))
          (while (re-search-forward "\\(\\<[A-Z][a-zA-Z0-9_]*\\)::\\([a-z][a-zA-Z0-9_]*\\)\\([ \t]*=\\)" nil t)
            (if (and (not (d-latexize--inside-comment-or-string))
                     (not (d-latexize--inside-function "main")))
                (replace-match "(7cxxclss){(2zz)bf(2zz)color{clss}{\\1}}(7cxxsslc)::(7cxxvari){(2zz)color{vari}{\\2}}(7cxxirav)\\3" 'fixedcase))))
      (error (message "Error 43! err=%s" err)))

(checkpoint "checkpoint:44")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'lisp++-mode))
          (goto-char (point-min))
          (while (re-search-forward "\\(\\<[A-Z][a-zA-Z0-9_]*\\)::\\([a-z][a-zA-Z0-9_]*\\)\\([ \t]*(\\)" nil t)
            (condition-case err2
                (when (and (not (d-latexize--inside-comment-or-string))
                           (not (d-latexize--inside-function "main")))
                  (replace-match "(7cxxclss){(2zz)bf(2zz)color{clss}{\\1}}(7cxxsslc)::(7cxxfunc){(2zz)bf(2zz)colorbox{func}{(2zz)color{func-fg}{\\2(2zz)padd}}}(7cxxcnuf)\\3" 'fixedcase)
                  )
              (error
               (setq str (buffer-substring-no-properties (match-beginning 1) (match-end 2)))
               (message "TRUCK2! err2=%s str=%s (current-buffer)=%s" err2 str (current-buffer))
               ;;(if (and (eq (nth 0 err2) 'error) (eq (nth 1 err2) 'not))
               ;;    (d-debug "Hole in one err2=%s" err2)
               ;;  ;;(replace-match "(7cxxfunc)\\1::{(2zz)bf(2zz)colorbox{func}{TRUCK2!\\2}}(7cxxcnuf)\\3" 'fixedcase)
               ;;  ) ;; END if!
               ) ;; END ERROR!
              )  ;; END CONDITION-case ERR2!
            )    ;; END while!
          )      ;; END WHEN!
      (error
       (message "Error 44! err=%s" err) ;; ERROR!
       )                                ;; END ERROR!
      )                                 ;; END CONDITION-case ERR!

    (checkpoint "checkpoint:45")

(condition-case err
        (when (eq major-mode 'c++-mode)
          (goto-char (point-min))
          (while (re-search-forward "\\<operator[ \t]*\\([^ a-zA-Z0-9_\t()]+\\)[ \t]*(" nil t)
            ;;(message "line=\"%s\"" (d-current-line-as-string))
            (when (not (d-latexize--inside-comment-or-string))
              (setq str (buffer-substring-no-properties (match-beginning 1) (match-end 1)))
              ;;(message "str=\"%s\"" str)
              ;;(message "buffer-substring=\"%s\"" (buffer-substring-no-properties (match-beginning 0) (match-end 0)))
              (if (string= str "")
                  (error "Empty string in operator"))
              (replace-match "(7cxxfunc){(2zz)bf(2zz)color{black}{operator}} {(2zz)colorbox{cool-func-bg}{(2zz)color{func-fg}{\\1(2zz)padd}}}(7cxxcnuf)(" 'fixedcase)
              )
            )
          )
      (error (message "Error 45! err=%s" err)))

(checkpoint "checkpoint:46")

(condition-case err
        (when (eq major-mode 'c++-mode)
          (goto-char (point-min)) ;;            123456789
          (while (re-search-forward (concat "\\(         " ;; 1
                                            str-variable1234-no-space ;; 2345
                                            "\\)"
                                            "(\\*\\([a-z][a-zA-Z0-9_]*\\))(") nil t) ;; 6
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "\\1(7cxxclss)(*{(2zz)color{vari}{\\6}})(7cxxsslc)(" 'fixedcase))))
      (error (message "Error 46! err=%s" err)))

(checkpoint "checkpoint:47")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'lisp++-mode))
          (goto-char (point-min))
          (while (re-search-forward (concat str-variable1234-yes-space "\\(\\(\\<[A-Z][a-zA-Z0-9_]*\\)::\\)?\\(private_[a-zA-Z0-9_]*\\|_[a-zA-Z0-9_]*\\)") nil t)
            (when (not (d-latexize--inside-comment-or-string))
              (if (and (match-beginning 5) (match-end 5))
                  (replace-match (concat "(7cxxclss){(2zz)bf(2zz)color{clss}{\\1\\6}}(7cxxsslc)"
                                         "::"
                                         "(7cxxprvt)"
                                         "{(2zz)bf(2zz)colorbox{prvt}{(2zz)color{func-fg}{\\7(2zz)padd}}}"
                                         "(7cxxtvrp)") 'fixedcase)
                (replace-match "(7cxxprvt){(2zz)bf(2zz)colorbox{prvt}{(2zz)color{func-fg}{\\7(2zz)padd}}}(7cxxtvrp)" 'fixedcase)
                ))))
      (error (message "Error 47! err=%s" err)))

(checkpoint "checkpoint:48")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'lisp++-mode))
          (goto-char (point-min))
          (while (re-search-forward (concat str-variable1234-no-space " \\(\\(\\<[A-Z][a-zA-Z0-9_]*\\)::\\)?\\<\\(private_[a-zA-Z0-9_]*\\|_[a-zA-Z0-9_]*\\)[ \t]*\\(;\\|=\\)") nil t)
            ;;int***&** Array_Array_String;
            (when (not (d-latexize--inside-comment-or-string))
              (if (and (match-beginning 5) (match-end 5))
                  (replace-match (concat "(7cxxclss)"
                                         "{(2zz)bf(2zz)color{clss}{\\1 \\5}}"
                                         "(7cxxsslc)"
                                         "(7cxxprvt)"
                                         "{(2zz)colorbox{prvt}{(2zz)color{func-fg}}{\\6(2zz)padd}}"
                                         "(7cxxprvt) \\7") 'fixedcase)
                (replace-match (concat "(7cxxprvt)"
                                       "{(2zz)colorbox{prvt}{(2zz)color{func-fg}}{\\6(2zz)padd}}"
                                       "(7cxxprvt) \\7") 'fixedcase)))
            ))
      (error (message "Error 48! err=%s" err)))

(checkpoint "checkpoint:49")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'lisp++-mode))
          (goto-char (point-min))
          (while (re-search-forward (concat str-variable1234-no-space
                                            "\\([ \t]*[,)]\\)") nil t) ;; GOT1!
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "(7cxxclss){(2zz)bf(2zz)color{clss}{\\1}}(7cxxsslc)\\5" 'fixedcase))))
      (error (message "Error 49! err=%s" err)))

(checkpoint "checkpoint:50")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'lisp++-mode))
          (goto-char (point-min))
          (while (re-search-forward (concat str-variable1234-yes-space
                                            "\\([a-zA-Z_][a-zA-Z0-9_]*\\)\\([ \t]*\\)\\(;\\|=\\)") nil t) ;;GOT2!
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "(7cxxclss){(2zz)bf(2zz)color{clss}{\\1}}(7cxxsslc)(7cxxvari){(2zz)color{vari}{\\5}}(7cxxirav)\\6\\7" 'fixedcase))))
      (error (message "Error 50! err=%s" err)))

(checkpoint "checkpoint:51")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'lisp++-mode))
          (goto-char (point-min))
          (while (re-search-forward (concat str-variable1234-yes-space ;; GOT3!
                                            "\\([a-zA-Z_][a-zA-Z0-9_]*\\)\\([ \t]*[,)]\\)") nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "(7cxxclss){(2zz)bf(2zz)color{clss}{\\1}}(7cxxsslc)(7cxxvari){(2zz)color{vari}{\\5}}(7cxxirav)\\6" 'fixedcase)
              )))
      (error (message "Error 51! err=%s" err)))

(checkpoint "checkpoint:52")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'lisp++-mode))
          (goto-char (point-min))
          (while (re-search-forward (concat str-variable1234-no-space
                                            "\\([ \t]*[),]\\)") nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "(7cxxclss){(2zz)bf(2zz)color{clss}{\\1}}(7cxxsslc)\\5" 'fixedcase))))
      (error (message "Error 52! err=%s" err)))

(checkpoint "checkpoint:53")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'lisp++-mode))
          (goto-char (point-min))
          (while (re-search-forward (concat str-variable1234-yes-space "\\(ctor[a-zA-Z0-9_]*\\)(") nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "(7cxxclss){(2zz)bf(2zz)color{clss}{\\1}}(7cxxsslc)(7cxxnumb){(2zz)bf(2zz)color{numb}{\\5}}(7cxxbmun)(" 'fixedcase)
              )))
      (error (message "Error 53! err=%s" err)))

(checkpoint "checkpoint:54")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'lisp++-mode))
          (goto-char (point-min))
          (while (re-search-forward "::\\(ctor[a-zA-Z0-9_]*\\)(" nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "(7cxxnumb)::{(2zz)bf(2zz)color{numb}{\\1}}(7cxxbmun)(" 'fixedcase)
              )))
      (error (message "Error 54! err=%s" err)))

(checkpoint "checkpoint:55")

(condition-case err
        (when (eq major-mode 'c++-mode)
          (goto-char (point-min))
          (while (re-search-forward "\\<\\(\\(using \\)?namespace\\) \\([a-zA-Z0-9_]+\\)" nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "{(2zz)bf{\\1}} {(2zz)color{red}{\\3}}" 'fixedcase))))
      (error (message "Error 55! err=%s" err)))

(checkpoint "checkpoint:56")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'java-mode)
                  (eq major-mode 'jtw-mode))
          (goto-char (point-min))
          (while (re-search-forward "\\<\\(class\\|interface\\|struct\\) \\([A-Za-z_][A-Za-z0-9_]*\\)" nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "(7cxxclss){(2zz)bf{\\1}} {(2zz)bf(2zz)color{clss}{\\2}}(7cxxsslc)" 'fixedcase)
              )))
      (error (message "Error 56! err=%s" err)))

(checkpoint "checkpoint:57")

(when (eq major-mode 'lisp++-mode)
      (message "checkpoint:58")
      (condition-case err
          (let (result str)
            (goto-char (point-min))
            (while (re-search-forward "(\\(cmethod\\|c-static-method\\|cfunction\\|cfriend\\)" nil t)
              (when (and (not (d-latexize--inside-comment))
                         (not (d-latexize--inside-string)))
                (replace-match "((7cxxgrnc){(2zz)color{green-keyw}{\\1}}(7cxxcnrg)" 'fixedcase)
                (d-goto-char-safe (match-beginning 0))
                (message "cmethod\\|c-static-method\\|cfunction\\|cfriend"))
              (when (and (re-search-forward "(ctype \\([^()]*\\))" (point-at-eol) t)
                         (not (d-latexize--inside-comment))
                         (not (d-latexize--inside-string)))
                (d-goto-char-safe (match-beginning 0))
                (replace-match "(ctype (7cxxclss){(2zz)bf(2zz)color{clss}{\\1}}(7cxxsslc))" 'fixedcase)
                (message "ctype"))
              (when (and (re-search-forward "(cname \\([^()]*\\))" (point-at-eol) t)
                         (not (d-latexize--inside-comment))
                         (not (d-latexize--inside-string)))
                (d-goto-char-safe (match-beginning 0))
                (setq str (buffer-substring-no-properties (match-beginning 1) (match-end 1)))
                (message "str=%s" str)
                (cond
                 ((save-match-data
                    (string-match "\\<operator[ \t]*<<" str))
                  (replace-match "(cname (7cxxfunc){(2zz)bf{operator}}{(2zz)bf(2zz)colorbox{cool-func-bg}{(2zz)color{func-fg}{<<(2zz)padd}}}(7cxxcnuf))" 'fixedcase)
                  ;;(debug "Calisthenics")
                  )
                 ((save-match-data
                    (string-match "\\<operator[ \t]*>>" str))
                  (replace-match "(cname (7cxxfunc){(2zz)bf{operator}{(2zz)colorbox{func}{(2zz)color{func-fg}{>>(2zz)padd}}}}(7cxxcnuf))" 'fixedcase)
                  ;;(d-debug "Metallica / Metal Militia (Live at Rasputin Music)")
                  )
                 (t
                  (save-match-data
                    (if (string-match "\\<operator[ \t]*\\([^ ()]*\\)" str)
                        (progn
                          (setq str (substring str (match-beginning 1) (match-end 1)))
                          (setq result t))
                      (setq result nil)
                      (d-assert (save-match-data
                                  (not (string-match "\\<operator\\>" str))))
                      ))
                  (if result
                      (replace-match (format
                                      (format "%s%s%s"
                                              "(cname (7cxxfunc){{(2zz)bf{operator}}"
                                              "{(2zz)bf(2zz)colorbox{func}{(2zz)color{func-fg}{%s(2zz)padd}}}"
                                              "}(7cxxcnuf))") str) 'fixedcase)
                    (replace-match   (format
                                      (format "%s%s%s"
                                              "(cname (7cxxfunc)"
                                              "{(2zz)bf(2zz)colorbox{func}{(2zz)color{func-fg}{%s(2zz)padd}}}"
                                              "(7cxxcnuf))") str) 'fixedcase)
                    ;;(message "replace match with %s" (format "(cname (7cxxfunc){(2zz)bf(2zz)colorbox{func}{%s}}(7cxxcnuf))" str))
                    ) ;; END if!
                  ;;(d-debug "Metallica / Hardwired (Live in Minneapolis")
                  )                                ;; END T!
                 )                                 ;; END COND!
                )                                  ;; END WHEN!
              )                                    ;; END while!
            )                                      ;; END LET!
        (error (message "Error 58! err=%s" err))) ;; END CONDITION-case! err
      (message "checkpoint:59")
      (condition-case err
          (progn
            (message "checkpoint:60")
            (goto-char (point-min))
            (while (re-search-forward "(\\(c-constructor-method\\|c-destructor-method\\)" nil t)
              (when (not (d-latexize--inside-comment-or-string))
                (replace-match "((7cxxglbl){(2zz)color{green-keyw}{\\1}}(7cxxlblg)" 'fixedcase)
                (d-goto-char-safe (match-beginning 0))
                (when (and (re-search-forward "(cname \\([^()]*\\))" (point-at-eol) t)
                           (not (d-latexize--inside-comment-or-string)))
                  (replace-match "(cname (7cxxclss){(2zz)bf(2zz)color{clss}{\\1}}(7cxxsslc))" 'fixedcase)
                  (d-goto-char-safe (match-beginning 0))
                  ))))
        (error "Error 60! err=%s" err))

(checkpoint "checkpoint:61")
      (condition-case err
          (progn
            (goto-char (point-min))
            (while (re-search-forward "(\\(cglobal\\|cproperty\\|c-static-property\\)" nil t)
              (when (not (d-latexize--inside-comment-or-string))
                (replace-match "((7cxxgrnc){(2zz)color{green-keyw}{\\1}}(7cxxcnrg)" 'fixedcase)
                (beginning-of-line))
              (when (and (re-search-forward "(ctype \\([^()]*\\))" (point-at-eol) t)
                         (not (d-latexize--inside-comment-or-string)))
                (replace-match "(ctype (7cxxclss){(2zz)bf(2zz)color{clss}{\\1}}(7cxxsslc))" 'fixedcase)
                (beginning-of-line))
              (when (and (re-search-forward "(cname \\([^()]*\\))" (point-at-eol) t)
                         (not (d-latexize--inside-comment-or-string)))
                (setq str (buffer-substring-no-properties (match-beginning 1) (match-end 1))) ;; (cname _abc_def)
                (if (save-match-data
                      (string-match "^_[a-zA-Z0-9_]*$" str))
                    ;;(setq str "_abc")
                    (progn
                      (replace-match  "(cname (7cxxprvt){(2zz)bf(2zz)colorbox{prvt}{(2zz)color{func-fg}{\\1(2zz)padd}}}(7cxxtvrp))" 'fixedcase)
                      ;;(error "That man is full of cheer")
                      )
                  (replace-match "(cname (7cxxvari){(2zz)color{vari}{\\1}}(7cxxirav))" 'fixedcase)
                  ))
              (beginning-of-line)
              ;;"(cinit =[ \t]*\\([-+]?0[xX][a-fA-F0-9]+\\|[-+]?[0-9]+\\(\\.[0-9]+\\)+\\([eE][-+]?[0-9]+\\)+\\))"
              ;;"(cinit =[ \t]*\\([-+]?0[xX][a-fA-F0-9]+\\|[-+]?[0-9]+\\([eE][-+]?[0-9]+\\)+\\))"
              (setq str (concat
                         "\\([-+]?0[xX][a-fA-F0-9]+"
                         "\\|[-+]?[0-9]+"
                         "\\|[-+]?[0-9]+\\.[0-9]+"
                         "\\|[-+]?[0-9]+[Ee][-+]?[0-9]+"
                         "\\|[-+]?[0-9]+\\.[0-9]+[Ee][-+]?[0-9]+"
                         "\\)"
                         ))
              (setq str (concat
                         "\\(0[xX][a-fA-F0-9]+"
                         "\\|[0-9]+"
                         "\\|[0-9]+\\.[0-9]+"
                         "\\|[0-9]+e[0-9]+"
                         "\\|[0-9]+\\.[0-9]+e[0-9]+"
                         "\\)"
                         ))
              (setq str (concat
                         "\\(0[xX][a-fA-F0-9]+"
                         "\\|[0-9]+\\(\\.[0-9]+\\)?\\([eE][-+]?[0-9]+\\)?"
                         "\\)"
                         ))
              ;;(when (and (re-search-forward (concat "(cinit =[ \t]*" str ")") (point-at-eol) t)
              ;;           (not (d-latexize--inside-comment-or-string)))
              ;;  ;;(buffer-substring-no-properties (match-beginning 1) (match-end 1))
              ;;  (replace-match "(cinit = (7cxxnumb){(2zz)color{numb}{\\1}}(7cxxbmun))" 'fixedcase)
              )) ;; (cinit = 123e789)
        (error (message "Error 59! err=%s" err)))
      (checkpoint "checkpoint:60")
      (condition-case err
          (progn
            (goto-char (point-min))
            (while (re-search-forward "(cinit =[ \t]*\\([-+]?[0-9]+\\.[0-9]+[eE][0-9]+\\))" nil t)
              (if (not (d-latexize--inside-comment-or-string))
                  (replace-match "(cinit = (7cxxnumb){(2zz)color{numb}{\\1}}(7cxxbmun))" 'fixedcase)
                ))
            (goto-char (point-min))
            (while (re-search-forward "(cinit =[ \t]*\\([-+]?[0-9]+\\.[0-9]+\\))" nil t)
              (if (not (d-latexize--inside-comment-or-string))
                  (replace-match "(cinit = (7cxxnumb){(2zz)color{numb}{\\1}}(7cxxbmun))" 'fixedcase)
                ))
            (goto-char (point-min))
            (while (re-search-forward "(cinit =[ \t]*\\([-+]?[0-9]+[eE][0-9]+\\))" nil t)
              (if (not (d-latexize--inside-comment-or-string))
                  (replace-match "(cinit = (7cxxnumb){(2zz)color{numb}{\\1}}(7cxxbmun))" 'fixedcase)
                ))
            (goto-char (point-min))
            (while (re-search-forward "(cinit =[ \t]*\\([-+]?[0-9]+\\))" nil t)
              (if (not (d-latexize--inside-comment-or-string))
                  (replace-match "(cinit = (7cxxnumb){(2zz)color{numb}{\\1}}(7cxxbmun))" 'fixedcase)
                ))
            )
        (error (message "Error 60! err=%s" err)))
      )

(checkpoint "checkpoint:61")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'lisp++-mode))
          (message "checkpoint:62")
          (goto-char (point-min))
          (while (re-search-forward (concat str-variable1234-yes-space
                                            "\\([a-z][a-zA-Z0-9_]*\\)[ \t]*(") nil t)
            (setq str (buffer-substring-no-properties (match-beginning 5) (match-end 5)))
            (message "str=%s" str)
            (when (not (d-latexize--inside-comment-or-string))
              (if (save-match-data
                    (and (not (string-match "^a[0-9]*$"    str))
                         (not (string-match "^d[0-9]*$"    str))
                         (not (string-match "^r[0-9]*$"    str))
                         (not (string-match "^w[0-9]*$"    str))
                         (not (string-match "^p[0-9]*$"    str))
                         (not (string-match "^f[0-9]*$"    str))
                         (not (string-match "^data[0-9]*$" str))
                         (not (string-match "^self[0-9]*$" str))
                         (not (string-match "^fr$" str))
                         (not (string-match "^fw$" str))
                         ))
                  (progn
                    (replace-match "(7cxxclss){(2zz)bf(2zz)color{clss}{\\1}(7cxxsslc)} {(7cxxfunc)(2zz)bf(2zz)colorbox{func}{(2zz)color{func-fg}{\\5(2zz)padd}}(7cxxcnuf)}(" 'fixedcase)
                    (message "checkpoint:62"))
                ;;(debug "not branch")
                (replace-match "(7cxxclss){(2zz)bf(2zz)color{clss}{\\1}(7cxxsslc)} (7cxxvari){(2zz)color{vari}{\\5}}(7cxxirav)(" 'fixedcase)
                ))
            (message "checkpoint:62")
            ))
      (error (message "Error 62! err=%s" err)))

(checkpoint "checkpoint:63")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'lisp++-mode))
          (goto-char (point-min))
          (while (re-search-forward (concat str-variable1234-yes-space
                                            "\\(~?[A-Z][a-zA-Z0-9_]*\\)[ \t]*(") nil t)
            ;;(when (not (d-looking-at-7cxx (match-end 1)))
            (setq str (buffer-substring-no-properties (match-beginning 5) (match-end 5))) ;; ...
            (if (not (d-latexize--inside-comment-or-string))
                (if (save-match-data
                      (and (not (string-match "^a[0-9]*$"    str))
                           (not (string-match "^d[0-9]*$"    str))
                           (not (string-match "^r[0-9]*$"    str))
                           (not (string-match "^w[0-9]*$"    str))
                           (not (string-match "^p[0-9]*$"    str))
                           (not (string-match "^f[0-9]*$"    str))
                           (not (string-match "^data[0-9]*$" str))
                           (not (string-match "^self[0-9]*$" str))))
                    (replace-match "(7cxxclss){(2zz)bf(2zz)color{clss}{\\1 \\5}}(7cxxsslc)(" 'fixedcase)
                  (replace-match "(7cxxclss){(2zz)bf(2zz)color{clss}{\\1 \\5}}(7cxxsslc)(" 'fixedcase)
                  ))))
      (error (message "Error 63! err=%s" err)))

(checkpoint "checkpoint:64")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'lisp++-mode))
          (goto-char (point-min))
          (while (re-search-forward (concat str-variable1234-yes-space
                                            "\\([A-Z]+[a-z][a-zA-Z0-9_]*\\)::") nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "(7cxxclss){(2zz)bf(2zz)color{clss}{\\1\\5}(7cxxsslc)}::" 'fixedcase)
              )))
      (error (message "Error 64! err=%s" err)))

(checkpoint "checkpoint:65")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'lisp++-mode))
          (goto-char (point-min))
          (while (re-search-forward (concat str-variable1234-yes-space
                                            "\\([A-Z]+[a-z][a-zA-Z0-9_]*\\)(") nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "(7cxxclss){(2zz)bf(2zz)color{clss}{\\1\\5}(7cxxsslc)}(" 'fixedcase)
              )))
      (error (message "Error 65! err=%s" err)))

(checkpoint "checkpoint:66")

(condition-case err
        (when (eq major-mode 'c++-mode)
          (goto-char (point-min))
          (while (re-search-forward (concat str-variable1234-yes-space
                                            "\\([a-zA-Z_][a-zA-Z0-9_]*\\)[ \t]*=[ \t]*") nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "(7cxxclss){(2zz)bf(2zz)color{clss}{\\1}}(7cxxsslc)(7cxxvari){(2zz)color{vari}{\\5}}(7cxxirav) = " 'fixedcase)
              )))
      (error (message "Error 66! err=%s" err)))

(checkpoint "checkpoint:67")

(condition-case err
        (when (eq major-mode 'c++-mode)
          (goto-char (point-min))
          (while (re-search-forward (concat str-variable1234-yes-space
                                            "\\([a-zA-Z_][a-zA-Z0-9_]*\\)::\\([a-zA-Z_][a-zA-Z0-9_]*\\)[ \t]*=[ \t]*") nil t)
            (if (and (not (d-latexize--inside-comment))
                     (not (d-latexize--inside-string)))
                (replace-match "(7cxxclss){(2zz)bf(2zz)color{clss}{\\1\\5::}}(7cxxsslc)(7cxxvari){(2zz)color{vari}{\\6}}(7cxxirav) = " 'fixedcase)
              )))
      (error (message "Error 67! err=%s" err)))

(checkpoint "checkpoint:68")

(condition-case err
        (when (eq major-mode 'c++-mode)
          (goto-char (point-min))
          (while (re-search-forward (concat str-variable1234-yes-space
                                            "\\([a-zA-Z_][a-zA-Z0-9_]*\\)::\\(~?[a-zA-Z_][a-zA-Z0-9_]*\\)(") nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "(7cxxclss){(2zz)bf(2zz)color{clss}{\\1\\5::}}(7cxxsslc)(7cxxfunc){(2zz)colorbox{func}{(2zz)color{func-fg}{\\6(2zz)padd}}}(7cxxcnuf)(" 'fixedcase)
              ))
          )
      (error (message "Error 68! err=%s" err)))

(checkpoint "checkpoint:69")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'lisp++-mode))
          (goto-char (point-min))
          (while (re-search-forward (concat str-variable1234-yes-space
                                            "\\([a-zA-Z_][a-zA-Z0-9_]*\\)[ \t]*=[ \t]*") nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "(7cxxclss){(2zz)bf(2zz)color{clss}{\\1}}(7cxxsslc)(7cxxvari){(2zz)color{vari}{\\5}}(7cxxirav) = " 'fixedcase)))
          )
      (error (message "Error 69! err=%s" err)))

(checkpoint "checkpoint:70")

(condition-case err
        (when (eq major-mode 'c++-mode)
          (goto-char (point-min))
          (while (re-search-forward (concat str-variable1234-no-space "(") nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "(7cxxclss){(2zz)bf(2zz)color{clss}{\\1}}(7cxxsslc)(" 'fixedcase)))
          )
      (error (message "Error 70! err=%s" err)))

(checkpoint "checkpoint:71")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'lisp++-mode))
          (goto-char (point-min))
          (while (re-search-forward "\\(using namespace\\) \\([a-z]+\\)" nil t)
            (replace-match "{(2zz)bf{\\1}} (7cxxredc){(2zz)color{red}{\\2}}(7cxxcder)" 'fixedcase)))
      (error (message "Error 71! err=%s" err)))

(checkpoint "checkpoint:72")

(condition-case err
        (when (eq major-mode 'c++-mode)
          (goto-char (point-min))
          (while (re-search-forward "\\<\\(\\(const[ \t]+\\)?m?ptr[&*]*\\) \\([a-z][a-zA-Z0-9_]*\\)\\([),]\\)" nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "(7cxxclss){(2zz)bf(2zz)color{clss}{\\1}}(7cxxsslc) (7cxxvari){(2zz)color{vari}{\\3}}(7cxxirav)\\4" 'fixedcase)
              )))
      (error (message "Error 72! err=%s" err)))

(checkpoint "checkpoint:73")

(condition-case err
        (when (eq major-mode 'c++-mode)
          (goto-char (point-min))
          (while (re-search-forward "\\<\\(\\(const[ \t]+\\)?m?ptr[&*]*\\)" nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "(7cxxclss){(2zz)bf(2zz)color{clss}{\\1}}(7cxxsslc)" 'fixedcase)
              )))
      (error (message "Error 73! err=%s" err)))

(checkpoint "checkpoint:74")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'lisp++-mode))
          (goto-char (point-min))
          (while (re-search-forward "\\<\\(const_cast\\|reinterpret_cast\\|static_cast\\)<\\(.*\\)>" nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "\\1<{(2zz)bf(2zz)color{clss}{\\2}}>" 'fixedcase)
              )))
      (error (message "Error 74! err=%s" err)))

(checkpoint "checkpoint:75")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'lisp++-mode)
                  (eq major-mode 'emacs-lisp-mode))
          (goto-char (point-min))
          (while (re-search-forward (concat "\\<\\(SHOULD_NEVER_HAPPEN\\|ASSERT_INFO\\|"
                                            "debug-on-error\\|EXIT_SUCCESS\\|EXIT_FAILURE\\|"
                                            "ERROR\\|error\\|should_never_happen\\|d-error\\|"
                                            "d-assert\\|d-debug\\|assert\\|ASSERT\\|true\\|false\\|null\\)\\>") nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "(7cxxredc){(2zz)color{red}{\\&}}(7cxxcder)" 'fixedcase))))
      (error (message "Error 75! err=%s" err)))

(checkpoint "checkpoint:76")

(condition-case err
        (when (eq major-mode 'emacs-lisp-mode)
          (goto-char (point-min))
          (while (re-search-forward "\\<\\(jtw\\|ptr\\|warn\\|d\\)\\>" nil t)
            (save-excursion
              (d-goto-char-safe (- (point) 1))
              (when (not (d-latexize--inside-comment-or-string))
                (replace-match "{(2zz)bf(2zz)color{dark-blue}{\\&}}" 'fixedcase)
                ))))
      (error (message "Error 76! err=%s" err))) ;; FARTICUS!

    (checkpoint "checkpoint:77")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'lisp++-mode))
          (goto-char (point-min))
          (while (re-search-forward "\\(File_Reader\\|File_Writer\\|Writer\\|Reader\\)\\([&*]*\\)[ \t]+\\([a-z][a-zA-Z0-9_]*\\)" nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "(7cxxclss){(2zz)bf(2zz)color{clss}{\\1\\2}}(7cxxsslc) (7cxxvari){(2zz)color{vari}{\\3}}(7cxxirav)" 'fixedcase)
              )))
      (error (message "Error 77! err=%s" err)))

(checkpoint "checkpoint:78")

(condition-case err
        (when (eq major-mode 'c++-mode)
          (goto-char (point-min))
          (while (re-search-forward (concat str-variable1234-yes-space
                                            "\\([a-zA-Z_][a-zA-Z0-9_]*\\)")
                                    nil t)
            (when (save-excursion
                    (d-goto-char-safe (- (point) 2))
                    (not (d-latexize--inside-comment-or-string)))
              (setq operator (buffer-substring-no-properties (match-beginning 5) (match-end 5)))
              (if (not (string= operator "operator"))
                  (replace-match "(7cxxclss){(2zz)bf(2zz)color{clss}{\\1}}(7cxxsslc)(7cxxvari){(2zz)color{vari}{\\5}}(7cxxirav)" 'fixedcase)
                ))))
      (error (message "Error 78! err=%s" err)))

(checkpoint "checkpoint:79")

(setq class-re1 "\\([A-Z][0-9]?\\|[A-Z]+[a-z][a-zA-Z0-9_<,]*[ >]*\\)")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'lisp++-mode))
          (goto-char (point-min))
          (while (re-search-forward (concat "\\<" class-re1 "\\(::~?\\)" class-re1 "(") nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "(7cxxclss){(2zz)bf(2zz)color{clss}{\\1\\2\\3}}(7cxxsslc)(" 'fixedcase)
              )))
      (error (message "Error 79! err=%s" err)))

(checkpoint "checkpoint:80")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'lisp++-mode))
          (goto-char (point-min))
          (while (re-search-forward (concat "\\([^a-zA-Z0-9_]\\)\\(~?\\)" class-re1 "(") nil t)
            ;; A(f 1 2 3)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "\\1(7cxxclss){(2zz)bf{(2zz)color{clss}{\\2\\3}}}(7cxxsslc)(" 'fixedcase)
              )))
      (error (message "Error 80! err=%s" err)))

(checkpoint "checkpoint:81")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'lisp++-mode))
          (goto-char (point-min))
          (while (re-search-forward (concat "\\([^a-zA-Z0-9_]\\)\\(~?\\)" class-re1 "\\([&*]*\\)[ \t]+\\([a-z][a-zA-Z0-9_]*\\)(") nil t)
            ;; A&** a1(f 1 2 3);
            (setq str (buffer-substring-no-properties (match-beginning 4) (match-end 4)))
            (when (not (d-latexize--inside-comment-or-string))
              (if (string-match "a[0-9]+" str)
                  (replace-match "\\1(7cxxclss){(2zz)bf(2zz)color{clss}{\\2\\3\\4}}(7cxxsslc) (7cxxfunc){(2zz)colorbox{func}{(2zz)color{func-fg}{\\5(2zz)padd}}}(7cxxcnuf)(" 'fixedcase)
                (replace-match "\\1(7cxxclss){(2zz)bf(2zz)color{clss}{\\2\\3\\4}}(7cxxsslc) (7cxxvari){(2zz)color{vari}{\\5}}(7cxxirav)(" 'fixedcase)
                ))))
      (error (message "Error 81! err=%s" err)))

(checkpoint "checkpoint:82")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'lisp++-mode))
          (goto-char (point-min))
          (while (re-search-forward "\\([>., ():=\t\r\n]\\)\\([a-z][a-zA-Z0-9_]*\\)(" nil t)
            (setq str (buffer-substring-no-properties (match-beginning 2) (match-end 2)))
            ;;(save-excursion
            ;;  (d-goto-char-safe (- (point) 2))
            ;;  (message "feng shui : d-peek-at=\"%s\"" (d-peek-at (point))))
            (when (and (not (save-excursion
                              (d-goto-char-safe (- (point) 2))
                              (d-latexize--inside-comment-or-string)))
                       (or (string= "draw_rle_sprite" str)
                           (string= "draw_sprite"     str)
                           (string= "putpixel"        str)
                           (string= "getpixel"        str)
                           (string= "clear_to_color"  str)
                           (string= "clear_bitmap"    str)
                           (string= "blit"            str)
                           (string= "rect"            str)
                           (string= "rectfill"        str)
                           (string= "makecol"         str)
                           ))
              (replace-match "\\1(7cxxvari){(2zz)color{brown}{\\2}}(7cxxirav)(" 'fixedcase)
              (message "allegro function: %s" str)
              )))
      (error (message "Error 82! err=%s" err)))

(checkpoint "checkpoint:83")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'lisp++-mode))
          (goto-char (point-min))
          (while (progn
                   (d-goto-char-safe (- (point) 1))
                   (re-search-forward (concat "\\<" class-re1 "::") nil t))
            (d-goto-char-safe (- (point) 1))
            ;;(message "*** (point)=%s" (point))
            (if (and (not (d-latexize--inside-comment))
                     (not (d-latexize--inside-string)))
                (replace-match "(7cxxclss){(2zz)bf(2zz)color{clss}{\\1}}::(7cxxsslc)" 'fixedcase)
              )))
      (error (message "Error 83! err=%s" err)))

(checkpoint "checkpoint:84")

(condition-case err
        (when (eq major-mode 'c++-mode)
          (goto-char (point-min))
          (while (re-search-forward "\\([^a-zA-Z0-9_{}]\\)\\(_[a-z][a-zA-Z0-9_]*\\)" nil t)
            (if (and (not (d-latexize--inside-comment))
                     (not (d-latexize--inside-string)))
                (replace-match "\\1(7cxxprvt){(2zz)bf(2zz)colorbox{prvt}{(2zz)color{func-fg}{\\2(2zz)padd}}}(7cxxtvrp)" 'fixedcase)
              )
            )
          )
      (error (message "Error 84! err=%s" err)))

(checkpoint "checkpoint:85")

(condition-case err
        (when (eq major-mode 'lisp++-mode)
          (while (re-search-forward "(carg\\([^(){}]+\\)[ \t]+\\([^(){}]+\\))" nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "(carg(7cxxclss){(2zz)bf(2zz)color{clss}{\\1}}(7cxxsslc) (7cxxvari){(2zz)color{vari}{\\2}}(7cxxirav))" 'fixedcase)
              )))
      (error (message "Error 85! err=%s" err)))

(checkpoint "checkpoint:86")

(condition-case err
        (when (eq major-mode 'lisp++-mode)
          (while (re-search-forward "(carg\\([^(){}]+\\))" nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "(carg(7cxxclss){(2zz)bf(2zz)color{clss}{\\1}}(7cxxsslc))" 'fixedcase)
              )))
      (error (message "Error 86! err=%s" err)))

(checkpoint "checkpoint:87")

(condition-case err
        (when (eq major-mode 'c++-mode)
          (goto-char (point-min))
          (while (re-search-forward "\\<destroy_\\([a-z][a-zA-Z0-9_]*\\)" nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "(7cxxvari){(2zz)color{numb}{\\&}}(7cxxirav)" 'fixedcase)
              )))
      (error (message "Error 87! err=%s" err)))

(checkpoint "checkpoint:88")

(condition-case err
        (when (eq major-mode 'c++-mode)
          (goto-char (point-min))
          (while (re-search-forward "\\<allegro_[a-z][a-zA-Z0-9_]*" nil t)
            (when (not (d-latexize--inside-comment-or-string))
              (replace-match "(7cxxvari)::{(2zz)color{brown}{\\&}}(7cxxirav)" 'fixedcase))
            ))
      (error (message "Error 88! err=%s" err)))

(checkpoint "checkpoint:89")

(condition-case err
        (when (eq major-mode 'c++-mode)
          (goto-char (point-min))
          (while (re-search-forward "\\<\\(create_rle_sprite\\|create_bitmap\\|create_bitmap_ex\\|delete_current\\|free\\|malloc\\)(" nil t)
            (when (not (d-latexize--inside-comment-or-string))
              (replace-match "(7cxxnumb){(2zz)color{numb}{\\1}}(7cxxbmun)(" 'fixedcase)
              )))
      (error (message "Error 89! err=%s" err)))

(checkpoint "checkpoint:90")

(condition-case err
        (when (eq major-mode 'lisp++-mode)
          (goto-char (point-min))
          (while (re-search-forward "(cclass \\([a-zA-Z0-9_]+\\)" nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "(cclass (7cxxclss){(2zz)bf(2zz)color{clss}{\\1}}(7cxxsslc)" 'fixedcase)
              )))
      (error (message "Error 90! err=%s" err)))

(checkpoint "checkpoint:91")

(condition-case err
        (when (eq major-mode 'emacs-lisp-mode)
          (goto-char (point-min))
          (while (re-search-forward "(defun \\([-a-zA-Z0-9_+*<>:!]+\\)" nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "({(2zz)bf{defun }}(7cxxfunc){(2zz)bf(2zz)colorbox{func}{(2zz)color{func-fg}{\\1(2zz)padd}}}(7cxxcnuf)" 'fixedcase)
              ))
          (message "checkpoint:92")
          (goto-char (point-min))
          (while (re-search-forward "(defmacro \\([-a-zA-Z0-9_+*<>:!]+\\)" nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "({(2zz)bf{}defmacro }(7cxxfunc){(2zz)bf(2zz)colorbox{func}{(2zz)color{func-fg}{\\1(2zz)padd}}}(7cxxcnuf)" 'fixedcase)
              ))
          (message "checkpoint:93")
          (goto-char (point-min))
          (while (re-search-forward "\\((d-defmacro[ \t\r\n]*\\)\\([a-z][a-zA-Z0-9_]*\\)" nil t)
            (when (not (d-latexize--inside-comment-or-string)) ;; TRUCKCULATOR!
              (replace-match "\\1{(2zz)bf(2zz)colorbox{func}{(2zz)color{func-fg}{\\2}}}" 'fixedcase))))
      (error (message "Error 91! err=%s" err)))

(checkpoint "checkpoint:94")

(condition-case err ;; HOLE!
        (when (eq major-mode 'emacs-lisp-mode)
          (goto-char (point-min))
          (while (re-search-forward "\\<\\(jtw\\|ptr\\|warn\\|flm\\|d\\)-[-a-zA-Z0-9_+<,>:]*" nil t)
            (save-excursion
              (d-goto-char-safe (- (point) 3))
              (when (not (d-latexize--inside-comment-or-string))
                (replace-match "{(2zz)bf(2zz)color{dark-blue}{\\&}}" 'fixedcase)
                ))))
      (error (message "Error 94! err=%s!" err)))

(checkpoint "checkpoint:95")

(condition-case err ;; IN ONE!
        (when (eq major-mode 'emacs-lisp-mode)
          (goto-char (point-min))
          (while (re-search-forward "(\\(safe-require\\|provide\\|require\\)[ \t]+\\('[-a-zA-Z0-9_+*<>:!]*\\))" nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "((7cxxredc){(2zz)bf{\\1}} {(2zz)color{red}{\\2}}(7cxxcder))" 'fixedcase)
              )))
      (error (message "Error 95! err=%s" err)))

(checkpoint "checkpoint:96")

(condition-case err
        (when (eq major-mode 'emacs-lisp-mode)
          (goto-char (point-min))
          (while (re-search-forward "\\<\\(d-read-str\\)\\>" nil t)
            (save-excursion
              (d-goto-char-safe (- (point) 3))
              (when (not (d-latexize--inside-comment-or-string))
                (replace-match "(7cxxclss){(2zz)bf(2zz)color{dark-blue}{\\&}}(7cxxsslc)" 'fixedcase)
                ))))
      (error (message "Error 96! err=%s" err)))

(checkpoint "checkpoint:97")

(condition-case err
        (when (eq major-mode 'c++-mode)
          (goto-char (point-min))
          (while (re-search-forward "\\(public\\|private\\|protected\\) \\([a-zA-Z_][a-zA-Z0-9_]*\\)" nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "(7cxxkeyw){(2zz)bf{\\1}}(7cxxwyek) (7cxxclss){(2zz)bf(2zz)color{clss}{\\2}}(7cxxsslc)" 'fixedcase)
              )))
      (error (message "Error 97! err=%s" err)))

(checkpoint "checkpoint:98")

(condition-case err
        (when (eq major-mode 'jtw-mode)
          (goto-char (point-min))
          (while (re-search-forward "\\<\\(constructor\\|new\\) \\([a-z.]*\\)\\([A-Z][a-zA-Z0-9_]*\\)" nil t)
            (forward-char -3)
            (when (not (d-latexize--inside-comment-or-string))
              (replace-match "(7cxxkeyw){(2zz)bf{\\1}}(7cxxwyek) (7cxxredc){(2zz)color{red}{\\2}}(7cxxcder)(7cxxclss){(2zz)bf{(2zz)color{clss}{\\3}}}(7cxxsslc)" 'fixedcase))))
      (error (message "Error 98! err=%s" err)))

(checkpoint "checkpoint:99")

(condition-case err
        (when (eq major-mode 'jtw-mode)
          (goto-char (point-min))
          (while (re-search-forward "\\<\\(System.out.print\\(ln\\)?\\)(" nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "(7cxxgrnc){(2zz)bf(2zz)color{green-keyw}{\\1}}(7cxxcnrg)(" 'fixedcase))))
      (error (message "Error 99! err=%s" err)))

(checkpoint "checkpoint:100")

(condition-case err
        (when (or (eq major-mode 'jtw-mode)
                  (eq major-mode 'java-mode))
          (goto-char (point-min))
          (while (re-search-forward "\\<\\(package\\|import\\) \\([a-z.*]+\\);" nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "(7cxxgrnc){(2zz)bf{\\1}} {(2zz)color{red}{\\2}};(7cxxcnrg)" 'fixedcase))))
      (error (message "Error 100! err=%s" err)))

(checkpoint "checkpoint:101")

(condition-case err
        (when (or (eq major-mode 'jtw-mode)
                  (eq major-mode 'java-mode))
          (goto-char (point-min))
          (while (re-search-forward "\\<\\([a-z.]*\\)\\([A-Z][a-zA-Z0-9_<,>]*\\)\\(\\.[a-zA-Z0-9_]+\\)" nil t)
            (when (not (d-latexize--inside-comment-or-string))
              (replace-match "(7cxxredc){(2zz)color{red}{\\1}}(7cxxcder)(7cxxclss){(2zz)bf(2zz)color{clss}{\\2}}(7cxxsslc)\\3" 'fixedcase))))
      (error (message "Error 101! err=%s" err)))

(checkpoint "checkpoint:102")

(condition-case err
        (when (or (eq major-mode 'jtw-mode)
                  (eq major-mode 'java-mode))
          (goto-char (point-min))
          (while (re-search-forward "\\<\\(implements\\|extends\\) \\([A-Z][a-zA-Z0-9_]*\\)" nil t)
            (when (not (d-latexize--inside-comment-or-string))
              (replace-match "(7cxxkeyw){(2zz)bf(2zz)color{black}{\\1}}(7cxxwyek) (7cxxclss){(2zz)bf(2zz)color{clss}{\\2}}(7cxxsslc)" 'fixedcase))))
      (error (message "Error 102! err=%s" err)))

(checkpoint "checkpoint:103")
    ;; ---------------------------------------------------------
    (condition-case err
        (when (eq major-mode 'jtw-mode)
          (goto-char (point-min)) ;;   1            2                   3            4                                                5                       6                  7        8                 9                 9        10                  ...
          (while (re-search-forward "\\(^[ \t]*\\)\\(superfor\\) (var \\([a-z.]*\\)\\(char\\|short\\|int\\|long\\|float\\|double\\) \\([a-z][a-zA-Z0-9_]*\\)\\([ \t]*=[ \t]*\\)\\(.*\\) \\(to\\|downto\\) \\(.*\\))" nil t) ;;\\( step \\(.*\\)\\)?)[ \t]*$" nil t)
            (if (not (d-latexize--inside-comment-or-string)) ;;                                                                                                                                                                                                    ...
                (replace-match "\\1(7cxxkeyw){(2zz)bf{superfor}} ({(2zz)bf{var}}(7cxxwyek) (7cxxredc){(2zz)color{red}{\\3}}(7cxxcder)(7cxxclss){(2zz)bf(2zz)color{clss}{\\4}}(7cxxsslc) (7cxxvari){(2zz)color{vari}{\\5}}(7cxxirav)\\6\\7 (7cxxkeyw){(2zz)bf{\\8}}(7cxxwyek) \\9)"))
            (beginning-of-line)
            (if (re-search-forward "step \\(.*\\))" nil t)
                (replace-match "(7cxxkeyw){(2zz)bf{step}}(7cxxwyek) \\1)" 'fixedcase))))
      (error (message "Error 103! err=%s" err)))
    ;; ---------------------------------------------------------
    (checkpoint "checkpoint:104")
    (condition-case err
        (when (eq major-mode 'jtw-mode)
          (goto-char (point-min)) ;;   1            2                                                                                                                          3
          (while (re-search-forward "\\([a-z.]*\\)\\(boolean[][]*\\|short[][]*\\|char[][]*\\|int[][]*\\|long[][]*\\|float[][]*\\|double[][]*\\|[A-Z][a-zA-Z0-9_<,>]*[][]*\\) \\([a-z][a-zA-Z0-9_]*\\)" nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "(7cxxredc){(2zz)color{red}{\\1}}(7cxxcder)(7cxxclss){(2zz)bf(2zz)color{clss}{\\2}}(7cxxsslc) (7cxxvari){(2zz)color{vari}{\\3}}(7cxxirav)" 'fixedcase))))
      (error (message "Error 104! err=%s" err)))
    ;; ---------------------------------------------------------
    (checkpoint "checkpoint:105")
    (condition-case err
        (when (eq major-mode 'jtw-mode)
          (goto-char (point-min))
          (while (re-search-forward "[0-9]+\\.[0-9]+[eE][+-]?[0-9]+" nil t)
            (replace-match "{(2zz)color{numb}{\\&}}" 'fixedcase))
          (goto-char (point-min))
          (while (re-search-forward "[0-9]+\\.[0-9]+" nil t)
            (replace-match "{(2zz)color{numb}{\\&}}" 'fixedcase))
          (goto-char (point-min))
          (while (re-search-forward "[0-9]+[eE][+-]?[0-9]+" nil t)
            (replace-match "{(2zz)color{numb}{\\&}}" 'fixedcase))
          (goto-char (point-min))
          (while (re-search-forward "\\([^][a-zA-Z]\\)\\([0-9]+\\)\\([^][a-z]\\)" nil t)
            (setq one   (d-buffer-substring (match-beginning 1) (match-end 1)))
            (setq three (d-buffer-substring (match-beginning 3) (match-end 3)))
            (if (not (and (string-match "[][]" one)    ;; (setq one "[")
                          (string-match "[][]" three)))
                (replace-match "\\1{(2zz)color{numb}{\\2}}\\3" 'fixedcase))))
      (error (message "Error 105! err=%s" err)))
    ;; ---------------------------------------------------------
    (checkpoint "checkpoint:106")
    (condition-case err
        (when (eq major-mode 'c++-mode)
          (goto-char (point-min))
          (while (re-search-forward "[ \t\r\n]*\\(public\\|private\\|protected\\)\\>" nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "{(2zz)color{black}(2zz)bf{\\&}}")
              )))
      (error (message "Error 106! err=%s" err)))

(checkpoint "checkpoint:107")

(condition-case err
        (when (eq major-mode 'c++-mode)
          (goto-char (point-min))
          (while (re-search-forward "\\([^a-zA-Z0-9_{}]\\)\\(PRINT\\)\\((.*)\\)" nil t)
            (if (not (save-excursion
                       (forward-char -1)
                       (d-latexize--inside-comment-or-string)))
                (replace-match "\\1{(2zz)color{glbl}{\\2}}\\3" 'fixedcase)
              )))
      (error (message "Error 107! err=%s" err)))

(checkpoint "checkpoint:108")

(condition-case err
        (when (eq major-mode 'emacs-lisp-mode)
          (goto-char (point-min))
          (while (re-search-forward "\\*[a-zA-Z_][-a-zA-Z0-9_+]*\\*" nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "(7cxxglbl){(2zz)bf(2zz)color{glbl}{\\&}}(7cxxlblg)" 'fixedcase)
              )))
      (error (message "Error 108! err=%s" err)))

(checkpoint "checkpoint:109")

(condition-case err
        (when (eq major-mode 'emacs-lisp-mode)
          (goto-char (point-min))
          (while (re-search-forward "\\<debug\\>" nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "{(2zz)color{red}{debug}}" 'fixedcase)
              )))
      (error (message "Error 109! err=%s" err)))

(checkpoint "checkpoint:110")

(condition-case err
        (when (eq major-mode 'emacs-lisp-mode)
          (goto-char (point-min))
          (while (progn
                   (d-goto-char-safe (- (point) 2))
                   (re-search-forward "\\(^\\|[^-a-zA-Z0-9_.]\\)\\(\\(global\\|GLOBAL\\)[-a-zA-Z0-9_+.]*\\)\\([^_a-zA-Z0-9_.]\\)"
                                      nil t))
            (if (not (save-excursion
                       (d-goto-char-safe (- (point) 4))
                       (d-latexize--inside-comment-or-string)))
                (replace-match "\\1{(2zz)color{glbl}{\\2}}\\4" 'fixedcase)
              )))
      (error (message "Error 110! err=%s" err)))

(checkpoint "checkpoint:111")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'lisp++-mode))
          (goto-char (point-min))
          (while (re-search-forward "\\(^\\|[^a-zA-Z0-9_]\\)\\(\\(global\\|GLOBAL\\)[a-zA-Z0-9_+-]*\\)\\([^a-zA-Z0-9_]\\)" nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "\\1(7cxxglbl){(2zz)color{glbl}{\\2}}(7cxxlblg)\\4" 'fixedcase)
              )))
      (error (message "Error 111! err=%s" err)))

(checkpoint "checkpoint:112")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'emacs-lisp-mode))
          (goto-char (point-min))
          (while (re-search-forward "\\(^\\|[^-a-zA-Z0-9_]\\)\\(\\(prop\\|PROP\\)[-a-zA-Z0-9_]*\\)\\([^-a-zA-Z0-9_]\\)" nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "\\1{(2zz)color{przp}{\\2}}\\4" 'fixedcase)
              )))
      (error (message "Error 112! err=%s" err)))

(checkpoint "checkpoint:113")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'lisp++-mode))
          (goto-char (point-min))
          (while (re-search-forward "\\(^\\|[^a-zA-Z0-9_]\\)\\(dmp\\|std\\)::" nil t)
            (if (and (not (d-latexize--inside-comment))
                     (not (d-latexize--inside-string)))
                (replace-match "\\1(7cxxredc){(2zz)color{red}{\\2}}::(7cxxcder)" 'fixedcase)
              )))
      (error (message "Error 113! err=%s" err)))

(checkpoint "checkpoint:114")

(condition-case err
        (when (eq major-mode 'lisp++-mode)
          (goto-char (point-min))
          (while (re-search-forward "(cnamespace \\([a-z]+\\)" nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "(cnamespace {(2zz)color{red}{\\1}}" 'fixedcase)
              )))
      (error (message "Error 114! err=%s" err)))

(checkpoint "checkpoint:115")

(let (str)
      (setq str (concat
                 "\\([^-a-zA-Z0-9_.]\\)\\(c-[-a-zA-Z0-9_+*<>]*\\|"
                 "cret\\|ctype\\|cname\\|cargs?\\|cinit\\|cprogn\\|"
                 "cmethod\\|cproperty\\|cpause\\|"
                 "cfor\\|cforever\\|cwhile\\|cdo\\|cfunction\\|"
                 "cautogc\\|c-autogc-multi\\|c-autogc-both\\|"
                 "cif[?]?\\|celseif\\|celse\\|"
                 "c-for-list\\|c-for-list-backwards\\|"
                 "cswitch\\|cbrackets\\|quote\\|d-quote\\|"
                 "cenum\\|citems\\|citem\\|cinline\\|"
                 "cdefine\\|cglobal\\|cclass\\|"
                 "s\\|f\\|sc\\|clet[*]?\\|cassert\\|"
                 "c-raw-c\\+\\+\\|c-raw-h\\+\\+\\|c-raw-global-h\\+\\+\\|"
                 "cnamespace\\|cfriend\\|ctypedef\\|cpublic\\|"
                 "cprivate\\|cprotected\\)\\([^.a-zA-Z0-9_-]\\)"))

(condition-case err
          (progn
            (goto-char (point-min))
            (while (re-search-forward str nil t)
              (if (not (d-latexize--inside-comment-or-string))
                  (replace-match "\\1(7cxxgrnc){(2zz)color{green-keyw}{\\2}}(7cxxcnrg)\\3" 'fixedcase)
                )))
        (error (message "Error 115! err=%s" err)))

(checkpoint "checkpoint:116")

(condition-case err
          (when (or (eq major-mode 'c++-mode)
                    (eq major-mode 'lisp++-mode))
            (goto-char (point-min))
            (while (re-search-forward str nil t)
              (if (progn
                    (not (d-latexize--inside-comment-or-string)))
                  (replace-match "\\1(7cxxgrnc){(2zz)color{green-keyw}{\\2}}(7cxxcnrg)\\3" 'fixedcase)
                )))
        (error (message "Error 116! err=%s" err)))

(checkpoint "checkpoint:117")

(condition-case err
          (when (or (eq major-mode 'c++-mode)
                    (eq major-mode 'lisp++-mode))
            (goto-char (point-min))
            (while (re-search-forward str nil t)
              (if (progn
                    (d-goto-char-safe (- (point) 2))
                    (not (d-latexize--inside-comment-or-string)))
                  (replace-match "\\1(7cxxgrnc){(2zz)color{green-keyw}{\\2}}(7cxxcnrg)\\3" 'fixedcase)
                )))
        (error (message "Error 117! err=%s" err)))
      )

(checkpoint "checkpoint:118")

(condition-case err
        (when (eq major-mode 'emacs-lisp-mode)
          (goto-char (point-min))
          (while (re-search-forward "\\*[a-zA-Z_][a-zA-Z0-9]*\\*" nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "{(2zz)color{green}{\\&}}" 'fixedcase)
              )))
      (error (message "Error 118! err=%s" err)))

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'lisp++-mode)
                  (eq major-mode 'emacs-lisp-mode))
          (goto-char (point-min)) ;; *regina1*
          (while (re-search-forward "\\(\\<[A-Z][-A-Z *+]*!\\)\\(.*$\\)" nil t)
            ;;
 bar
            (when (save-excursion
                    (d-goto-char-safe (1- (point)))
                    (and (d-latexize--inside-comment)
                         (not (d-latexize--inside-string))
                         (not (d-latexize--inside-grnc))
                         ;;(not (d-latexize--inside-decn))
                         ))
              ;;(7cxxcomm) FOO: abc (7cxxmmoc)
              (if (and (match-beginning 2) (match-end 2))
                  (progn
                    ;;(message "checkpoint:18b (and (match-beginning 2)(match-end 2))")
                    (replace-match "(7cxxdecn){(2zz)colorbox{light-green}{(2zz)color{d-foreground}{\\1}}}{(2zz)color{func-fg}{(2zz)colorbox{func-bg}{\\2}}}(7cxxnced)" 'fixedcase))
                ;;(sit-and-message 1 "checkpoint:18c (not (and (match-beginning 2) (match-end 2)))")
                (if (and (match-beginning 1) (match-end 1))
                    (replace-match "(7cxxdecn){(2zz)colorbox{light-green}{(2zz)color{d-foreground}{\\1}}}(7cxxnced)" 'fixedcase)))
              )))
      (error (message "Error 143! err=%s" err)))

(checkpoint "checkpoint:119")

(condition-case err
        (when (or (eq major-mode 'c++-mode)
                  (eq major-mode 'lisp++-mode))
          (goto-char (point-min))
          (setq-default font-lock-keywords-case-fold-search nil)
          (message "font-lock-keywords-case-fold-search=%s" font-lock-keywords-case-fold-search)
          (while (prog2 ;; (string-match "\\(new\\)\\([^_a-z]\\)" "NEW_TRANS_COL")
                     (d-goto-char-safe (- (point) 1))
                     (re-search-forward (concat ;; *regina2*
                                         "\\([^_a-zA-Z0-9]\\)\\(new\\|delete\\|virtual\\|"
                                         "struct\\|const_cast\\|return\\|namespace\\|"
                                         "switch\\|case\\|break\\|const\\|sizeof\\|"
                                         "reinterpret_cast\\|extern\\|static\\|inline\\|"
                                         "if\\|else\\|for\\|while\\|do\\|typedef\\|goto\\|" ;;    ...
                                         "class\\|this\\|template\\|friend\\)\\([^_a-zA-Z0-9]\\)") nil t)
                   ;;(message "*** mojo d-peek-at=\"%s\"" (d-peek-at (point)))
                   )
            (when (save-excursion
                    (d-goto-char-safe (- (point) 1))
                    (not (d-latexize--inside-comment-or-string)))
              ;;(and (not (d-latexize--inside-comment))
              ;;(not (d-latexize--inside-string))
              ;;(not (d-latexize--inside-grnc))
              ;;(not (d-latexize--inside-vari))
              ;;(not (d-latexize--inside-hash))
              ;;(not (d-latexize--inside-func))
              ;;))
              (replace-match "\\1(7cxxkeyw){(2zz)bf{\\2}}(7cxxwyek)\\3" 'fixedcase)
              ;;(message "*** fontified %s" (buffer-substring-no-properties (match-beginning 2) (match-end 2)))
              )))
      (error (message "Error 119! err=%s" err)))

(checkpoint "checkpoint:120")

(condition-case err
        (when (or (eq major-mode 'lisp++-mode)
                  (eq major-mode 'emacs-lisp-mode))
          (goto-char (point-min))
          (while (re-search-forward "\\(^\\|[^-a-zA-Z0-9_]\\)\\(\\(prop\\|PROP\\|LOCAL\\|local\\)[-a-zA-Z0-9_]*\\>\\)" nil t)
            (if (and (not (d-latexize--inside-string))
                     (not (d-latexize--inside-comment)))
                (replace-match "\\1{(2zz)color{orange}{\\2}}" 'fixedcase)
              )))
      (error (message "Error 120! err=%s" err)))

(checkpoint "checkpoint:121")

(condition-case err
        (when (eq major-mode 'emacs-lisp-mode)
          (goto-char (point-min))
          (while (re-search-forward "&[a-zA-Z_][-a-zA-Z0-9_]*" nil t)
            (when (not (d-latexize--inside-comment-or-string))
              (replace-match "{(2zz)bf(2zz)color{red}{\\&}}" 'fixedcase)
              )))
      (error (message "Error 121! err=%s" err)))

(checkpoint "checkpoint:122")

(condition-case err
        (when (eq major-mode 'emacs-lisp-mode)
          (goto-char (point-min))
          (while (re-search-forward (concat "\\<\\(defvar\\|defmacro\\|defun\\|let\\*?"
                                            "\\|if\\|when\\|while\\|save-excursion\\|progn"
                                            "\\|unwind-protect\\|condition-case"
                                            "\\|with-temp-buffer\\|block"
                                            "\\|save-match-data\\)\\>") nil t)
            (when (not (d-latexize--inside-comment-or-string))
              (replace-match "{(2zz)bf{\\&}}" 'fixedcase)
              )))
      (error (message "Error 122! err=%s" err)))

(checkpoint "checkpoint:123")

(condition-case err
        (progn
          (goto-char (point-min))
          (while (re-search-forward "\\([^-a-zA-Z0-9_]\\)\\(-?[0-9]+\\(\\.[0-9]+\\)?\\)\\([^a-zA-Z0-9_]\\)" nil t)
            (when (save-excursion
                    (d-goto-char-safe (- (point) 2))
                    (not (d-latexize--inside-comment-or-string)))
              (replace-match "\\1(7cxxnumb){(2zz)color{numb}{\\2}}(7cxxbmun)\\4" 'fixedcase)
              (d-goto-char-safe (- (point) 1)))))
      (error (message "Error 123! err=%s" err)))

(checkpoint "checkpoint:124")

(condition-case err
        (progn
          (goto-char (point-min))
          (while (re-search-forward "\\([^-a-zA-Z0-9_]\\)\\(0[Xx][0-9A-Fa-f]+\\)\\([^-a-zA-Z0-9_]\\)" nil t)
            (when (save-excursion ;;0xDEADBEEF
                    (d-goto-char-safe (- (point) 2))
                    (not (d-latexize--inside-comment-or-string)))
              (replace-match "\\1{(2zz)color{numb}{\\2}}\\3" 'fixedcase)
              )))
      (error (message "Error 124! err=%s" err)))

(checkpoint "checkpoint:125")

(condition-case err
        (when (or (eq major-mode 'lisp++-mode)
                  (eq major-mode 'emacs-lisp-mode))
          (goto-char (point-min))
          (while (re-search-forward "\\<\\(c-basic-offset\\|c-mode\\|c-set-offset\\)\\>" nil t)
            (if (and (not (d-latexize--inside-string))
                     (not (d-latexize--inside-comment)))
                (replace-match "{(2zz)color{black}{\\&}}" 'fixedcase)
              )))
      (error (message "Error 125! err=%s" err)))

(checkpoint "checkpoint:126")

(condition-case err
        (when (or (eq major-mode 'lisp++-mode)
                  (eq major-mode 'emacs-lisp-mode))
          (goto-char (point-min))
          (while (re-search-forward "\\(^\\|[^-a-zA-Z0-9_]\\)\\(\\<\\(prop\\|PROP\\|LOCAL\\|local\\)[-a-zA-Z0-9_]*\\>\\)" nil t)
            (if (and (not (d-latexize--inside-string))
                     (not (d-latexize--inside-comment)))
                (replace-match "\\1{(2zz)color{orange}{\\2}}" 'fixedcase)
              )))
      (error (message "Error 126! err=%s" err)))

(checkpoint "checkpoint:127")

(condition-case err
        (progn
          (goto-char (point-min))
          (while (re-search-forward "<" nil t)
            (replace-match "(3‘‘’’)<(3‘‘’’)" 'fixedcase)
            ))
      (error (message "Error 127! err=%s" err)))

(checkpoint "checkpoint:128")

(condition-case err
        (progn
          (goto-char (point-min))
          (while (re-search-forward ">" nil t)
            (replace-match "(3‘‘’’)>(3‘‘’’)" 'fixedcase)
            ))
      (error (message "Error 128! err=%s" err)))

(checkpoint "checkpoint:129")

(condition-case err
        (progn
          (goto-char (point-min))
          (while (re-search-forward "|" nil t)
            (replace-match "(3‘‘’’)|(3‘‘’’)" 'fixedcase)
            ))
      (error (message "Error 129! err=%s" err)))

(checkpoint "checkpoint:130")

(condition-case err
        (progn
          (goto-char (point-min))
          (while (re-search-forward "\\^" nil t)
            (replace-match "(2zz)^{}" 'fixedcase)
            ))
      (error (message "Error 130! err=%s" err)))

(checkpoint "checkpoint:131")

(condition-case err
        (progn
          (goto-char (point-min))
          (while (re-search-forward "\\(\\<m4_[a-zA-Z0-9_]*\\)\\(([^()]*)\\)" nil t)
            (setq str (buffer-substring-no-properties (match-beginning 1) (match-end 1)))
            (if (not (string= str (concat "m4" "_dnl")))
                (replace-match "(7cxxprvt){(2zz)tt(2zz)color{black}{(2zz)colorbox{prvt}{\\1(2zz)padd}}}{(2zz)tt(2zz)color{black}{\\2}}(7cxxtvrp)" 'fixedcase)
              )))
      (error (message "Error 131! err=%s" err)))

(checkpoint "checkpoint:132")

(condition-case err
        (progn
          (goto-char (point-min))
          (while (re-search-forward "\\(\\<m4_[a-zA-Z0-9_]*\\)" nil t)
            (setq str (buffer-substring-no-properties (match-beginning 1) (match-end 1)))
            (if (and (not (string= str (concat "m4" "_dnl")))
                     (not (d-latexize--inside-prvt)))
                (replace-match "(7cxxprvt){(2zz)tt(2zz)color{black}{(2zz)colorbox{prvt}{\\1(2zz)padd}}}(7cxxtvrp)" 'fixedcase)
              )))
      (error (message "Error 133! err=%s" err)))

(checkpoint "checkpoint:134")

(condition-case err
        (progn
          (goto-char (point-min))
          (while (re-search-forward "\\\\" nil t)
            (replace-match "(3‘‘’’)(2zz)backslash(3‘‘’’)" 'fixedcase)
            ))
      (error (message "Error 134! err=%s" err)))

(checkpoint "checkpoint:135")

(condition-case err
        (progn
          (when (string-match "\\.m4\\(<[^<>]*>\\)?$" *target*)
            (goto-char (point-min))
            (while (re-search-forward "(3‘‘’’)(2zz)backslash(3‘‘’’)\\([a-zA-Z][a-zA-Z0-9]+\\)" nil t)
              (if (not (d-latexize--inside-comment-or-string))
                  (replace-match "(3‘‘’’)(2zz)backslash(3‘‘’’){(2zz)bf{\\1}}" 'fixedcase)
                ))))
      (error (message "Error 135! err=%s" err)))

(checkpoint "checkpoint:136")

(d-quote condition-case err
             (when (eq major-mode 'c++-mode)
               (goto-char (point-min))
               (while (re-search-forward "\\([^<]\\)<\\([^<>]*\\)>\\([^>]\\)" nil t)
                 (when (not (d-latexize--inside-comment-or-string))
                   (replace-match "\\1(3‘‘’’)<(3‘‘’’){(2zz)bf(2zz)color{clss}{\\2}}(3‘‘’’)>(3‘‘’’)\\3" 'fixedcase))))
             (error (message "Error 136! err=%s" err)))

(condition-case err ;; FOCK! me here zip zap
        (progn
          (goto-char (point-min))
          (while (search-forward "(3‘‘’’)" nil t)
            (replace-match "$" 'fixedcase)
            ))
      (error (message "Error 136b! err=%s" err)))

(checkpoint "checkpoint:137")

(condition-case err
        (progn
          (goto-char (point-min))
          (while (re-search-forward "\\<\\(NOTE[A-Z0-9 ]*:\\)\\(.*$\\)" nil t)
            (if (not (d-latexize--inside-string))
                (replace-match "(7cxxdecn){(2zz)bf(2zz)color{d-foreground}(2zz)colorbox{orange}{\\1(2zz)padd}}{(2zz)bf(2zz)color{orange}{\\2}}(7cxxnced)" 'fixedcase)
              )))
      (error (message "Error 137! err=%s" err)))

(checkpoint "checkpoint:138")

(condition-case err
        (progn
          (goto-char (point-min))
          (while (re-search-forward "\\<\\(PRINTS[A-Z0-9 ]*:\\)\\(.*$\\)" nil t)
            (if (not (d-latexize--inside-string))
                (replace-match "(7cxxdecn){(2zz)bf(2zz)color{d-foreground}(2zz)colorbox{orange}{\\1(2zz)padd}}{(2zz)bf(2zz)color{orange}{\\2}}(7cxxnced)" 'fixedcase)
              )))
      (error (message "Error 138! err=%s" err)))

(checkpoint "checkpoint:139")

(condition-case err
        (progn
          (goto-char (point-min))
          (while (re-search-forward "\\<\\(USED[A-Z0-9 ]*:\\)\\(.*$\\)" nil t)
            (if (not (d-latexize--inside-string))
                (replace-match "(7cxxdecn){(2zz)bf(2zz)color{d-foreground}(2zz)colorbox{orange}{\\1(2zz)padd}}{(2zz)bf(2zz)color{orange}{\\2}}(7cxxnced)" 'fixedcase)
              )))
      (error (message "Error 139! err=%s" err)))

(checkpoint "checkpoint:140")

(condition-case err
        (progn
          (goto-char (point-min))
          (while (re-search-forward "\\<\\(DISALLOW[A-Z0-9 ]*:\\)\\(.*$\\)" nil t)
            (if (not (d-latexize--inside-string))
                (replace-match "(7cxxdecn){(2zz)bf(2zz)color{d-foreground}(2zz)colorbox{orange}{\\1(2zz)padd}}{(2zz)bf(2zz)color{orange}{\\2}}(7cxxnced)" 'fixedcase)
              )))
      (error (message "Error 140! err=%s" err)))

(checkpoint "checkpoint:141")

(condition-case err
        (progn
          (goto-char (point-min))
          (while (re-search-forward "\\<\\(this[A-Z0-9 ]*:\\)\\(.*$\\)" nil t)
            (if (not (d-latexize--inside-string))
                (replace-match "(7cxxdecn){(2zz)bf(2zz)color{d-foreground}(2zz)colorbox{orange}{\\1(2zz)padd}}{(2zz)bf(2zz)color{orange}{\\2}}(7cxxnced)" 'fixedcase)
              )))
      (error (message "Error 141! err=%s" err)))

(checkpoint "checkpoint:142")

(condition-case err
        (progn
          (goto-char (point-min))
          (while (re-search-forward "\\<COOL:\\(.*$\\)" nil t)
            (if (not (d-latexize--inside-string))
                (replace-match "(7cxxdecn){(2zz)bf(2zz)color{black}(2zz)colorbox{light-green}{COOL:(2zz)padd}}{(2zz)bf(2zz)color{green-keyw}{\\1}}(7cxxnced)" 'fixedcase)
              )))
      (error (message "Error 142! err=%s" err)))

(checkpoint "checkpoint:143")
    (checkpoint "checkpoint:144")

(condition-case err
        (when (eq major-mode 'java-mode)
          (goto-char (point-min))
          (while (re-search-forward "\\<int\\>" nil t)
            (when (not (d-latexize--inside-comment-or-string))
              (replace-match "(7cxxclss){(2zz)bf(2zz)color{clss}{\\&}}(7cxxsslc)" 'fixedcase)
              )))
      (error (message "Error 144! err=%s" err)))

(checkpoint "checkpoint:145")

(condition-case err
        (when (eq major-mode 'emacs-lisp-mode)
          (goto-char (point-min))
          (while (re-search-forward "checkpoint" nil t)
            (if (not (d-latexize--inside-comment-or-string))
                (replace-match "(7cxxvari){(2zz)color{vari}{checkpoint}}(7cxxirav)" 'fixedcase)
              )))
      (error (message "Error 145! err=%s" err)))

(checkpoint "checkpoint:146")

(condition-case err
        (let ((case-fold-search nil)
              str str-line)
          (when (eq major-mode 'tes-mode)
            (goto-char (point-min))
            (while (re-search-forward (concat "\\<\\(m4" "_dnl\\)\\>\\(.*$\\)") nil t)
              (when (not (d-latexize--inside-comment-or-string))
                (setq str-line (buffer-substring-no-properties (match-beginning 0) (point-at-eol)))
                (message "m4 preprocessor: str-line=%s" str-line)
                (replace-match "(7cxxclss){(2zz)color{d-foreground}{(2zz)colorbox{d-face-m4-dnl}{\\1(2zz)padd}}}{(2zz)color{comm}{\\2}}" 'fixedcase)
                (end-of-line)
                ))
            (goto-char (point-min))
            (while (re-search-forward "\\<\\(M4_[A-Z0-9_]*\\)\\>" nil t)
              (setq str (buffer-substring-no-properties (match-beginning 1) (match-end 1)))
              (message "m4 preprocessor: str=%s" str)
              (when (not (d-latexize--inside-comment-or-string))
                (replace-match (format "(7cxxclss){(2zz)color{d-foreground}{(2zz)colorbox{m4-col}{%s(2zz)padd}}}(7cxxsslc)" str) 'fixedcase)
                ))
            )) ;; END LET!
      (error (message "Error 146! err=%s" err)))

(checkpoint "checkpoint:147")

 ;; _ -> (2zz)_ correction

    (condition-case err
        (progn
          (goto-char (point-min))
          (while (re-search-forward "_" nil t)
            (replace-match "(2zz)_" 'fixedcase)
            ))
      (error (message "Error 147! err=%s" err)))

(checkpoint "checkpoint:148")

(condition-case err
        (progn
          (goto-char (point-min))
          (while (re-search-forward "~" nil t)
            (replace-match "(2zz)~{}" 'fixedcase)
            ))
      (error (message "Error 148! err=%s" err)))

(checkpoint "checkpoint:149")

(condition-case err
        (progn
          (goto-char (point-min))
          (while (re-search-forward "&" nil t)
            (replace-match "(2zz)&" 'fixedcase)
            ))
      (error (message "Error 149! err=%s" err)))

(checkpoint "checkpoint:150")

(condition-case err
        (progn
          (goto-char (point-min))
          (while (re-search-forward "#" nil t)
            (replace-match "(2zz)#" 'fixedcase)
            ))
      (error (message "Error 150! err=%s" err)))

(checkpoint "checkpoint:151")

(condition-case err
        (progn
          (goto-char (point-min))
          (while (re-search-forward "%" nil t)
            (replace-match "(2zz)%" 'fixedcase)
            ))
      (error (message "Error 151! err=%s" err)))

(checkpoint "checkpoint:152")
    (setq cull-spaces t)
    (when cull-spaces
      (checkpoint "checkpoint:153")
      (setq supercalif "SUPERCALIFRAGALISTICEXPEALODOCHIS")
      (condition-case err
          (let ((count            0)
                (count-plus-500 500))
            (progn
              (goto-char (point-min))
              (setq count1 0)
              (while (search-forward "(2zz)(2zz) (2zz)(2zz)" nil t)
                ;;(debug "Metallica / The 5.98 E.P. Garage Days Re-Revisited")
                (replace-match supercalif 'fixedcase)
                (incf count1)
                (message "Rod Stewart / Maggie May"))
              (message "count1=%s" count1)
              (goto-char (point-min))
              (message "Black Sabbath / Rat Salad")
              ;; -------------------------------------------------------
              (goto-char (point-min))
              (setq count2 0)
              (while (re-search-forward " " nil t)
                (when (save-match-data
                        (save-excursion
                          (skip-chars-forward " \t")
                          (not (eolp))))
                  (replace-match "(2zz)p{}" 'fixedcase)
                  (when (> count2 count-plus-500)
                    (checkpoint "checkpoint:154 %s%%" (/ (* 100 (point)) (point-max)))
                    (setq count-plus-500 (+ count2 500)))
                  (incf count2)
                  ))
              (message "count2=%s" count2)
              (goto-char (point-min))
              (while (search-forward supercalif nil t)
                (d-error "found supercalif")
                (replace-match "\\\\\\\\" 'fixedcase))
              ))
        (error (message "Error 154! err=%s" err)))
      )

(checkpoint "checkpoint:154a")

(d-quote
     condition-case err
     (progn
       (goto-char (point-min))
       (while (and (re-search-forward "^.*$" nil t) (not (eobp)))
         (setq str (d-buffer-substring (match-beginning 0) (match-end 0)))
         ;;                   12345678 12345678
         (save-match-data
           (when (string-match "EOL[ \t]*$" str)
             (message "Matched EOL[ ]*$ str=%s" str))
           (when (string-match "\\\\\\\\ \\\\\\\\$" str)
             (message "matched \\\\\\\\ \\\\\\\\ str=%s" str)))
         (replace-match "(2zz)noindent \\&" 'fixedcase)
         (d-goto-char-safe (1- (point)))
         ))
     (error (message "Error 154!a err=%s" err))
     )

(checkpoint "checkpoint:155")

(condition-case err
        (let ((count              0)
              (count-plus-1000 1000))
          (goto-char (point-min))
          (while (re-search-forward "(2zz)" nil t)
            (replace-match "\\\\" 'fixedcase)
            (when (> count count-plus-1000)
              (checkpoint "checkpoint:155 %s%%" (/ (* 100 (point)) (point-max)))
              (setq count-plus-1000 (+ count 1000)))
            (incf count)
            ))
      (error (message "Error 155! err=%s" err)))

(checkpoint "checkpoint:156")

(setq cull-cxx t)
    (when cull-cxx

(condition-case err
          (progn
            (goto-char (point-min))
            (while (search-forward "(7cxxcomm)" nil t)
              (replace-match "" 'fixedcase)
              )
            (goto-char (point-min))
            (while (search-forward "(7cxxmmoc)" nil t)
              (replace-match "" 'fixedcase)
              ))
        (error (message "Error 156! err=%s" err)))

(checkpoint "checkpoint:157")

(condition-case err
          (progn
            (goto-char (point-min))
            (while (search-forward (concat "(7cxx""stri)") nil t)
              (replace-match "" 'fixedcase)
              )
            (goto-char (point-min))
            (while (search-forward (concat "(7cxx""irts)") nil t)
              (replace-match "" 'fixedcase)
              ))
        (error (message "Error 157! err=%s" err)))

(checkpoint "checkpoint:158")

(condition-case err
          (progn
            (goto-char (point-min))
            (while (search-forward "(7cxxfunc)" nil t)
              (replace-match "" 'fixedcase)
              )
            (goto-char (point-min))
            (while (search-forward "(7cxxcnuf)" nil t)
              (replace-match "" 'fixedcase)
              ))
        (error (message "Error 158! err=%s" err)))

(checkpoint "checkpoint:159")

(condition-case err
          (progn
            (goto-char (point-min))
            (while (search-forward "(7cxxhash)" nil t)
              (replace-match "" 'fixedcase)
              )
            (goto-char (point-min))
            (while (search-forward "(7cxxhsah)" nil t)
              (replace-match "" 'fixedcase)
              ))
        (error (message "Error 159! err=%s" err)))

(checkpoint "checkpoint:160")

(condition-case err
          (progn
            (goto-char (point-min))
            (while (search-forward "(7cxxprvt)" nil t)
              (replace-match "" 'fixedcase)
              )
            (goto-char (point-min))
            (while (search-forward "(7cxxtvrp)" nil t)
              (replace-match "" 'fixedcase)
              ))
        (error (message "Error 162! err=%s" err)))

(checkpoint "checkpoint:163")

(condition-case err
          (progn
            (goto-char (point-min))
            (while (search-forward "(7cxxglbl)" nil t)
              (replace-match "" 'fixedcase)
              )
            (goto-char (point-min))
            (while (search-forward "(7cxxlblg)" nil t)
              (replace-match "" 'fixedcase)
              ))
        (error (message "Error 163! err=%s" err)))

(checkpoint "checkpoint:164")

(condition-case err
          (progn
            (goto-char (point-min))
            (while (search-forward "(7cxxjtw)" nil t)
              (replace-match "" 'fixedcase)
              )
            (goto-char (point-min))
            (while (search-forward "(7cxxwtj)" nil t)
              (replace-match "" 'fixedcase)
              ))
        (error (message "Error 164! err=%s" err)))

(checkpoint "checkpoint:165")

(condition-case err
          (progn
            (goto-char (point-min))
            (while (search-forward "(7cxxvari)" nil t)
              (replace-match "" 'fixedcase)
              )
            (goto-char (point-min))
            (while (search-forward "(7cxxirav)" nil t)
              (replace-match "" 'fixedcase)
              ))
        (error (message "Error 165! err=%s" err)))

(checkpoint "checkpoint:166")

(condition-case err
          (progn
            (goto-char (point-min))
            (while (search-forward "(7cxxclss)" nil t)
              (replace-match "" 'fixedcase)
              )
            (goto-char (point-min))
            (while (search-forward "(7cxxsslc)" nil t)
              (replace-match "" 'fixedcase)
              ))
        (error (message "Error 166! err=%s" err)))

(checkpoint "checkpoint:167")

(condition-case err
          (progn
            (goto-char (point-min))
            (while (search-forward "(7cxxgrnc)" nil t)
              (replace-match "" 'fixedcase)
              )
            (goto-char (point-min))
            (while (search-forward "(7cxxcnrg)" nil t)
              (replace-match "" 'fixedcase)
              ))
        (error (message "Error 167! err=%s" err)))

(checkpoint "checkpoint:168")

(condition-case err
          (progn
            (goto-char (point-min))
            (while (search-forward "(7cxxkeyw)" nil t)
              (replace-match "" 'fixedcase)
              )
            (goto-char (point-min))
            (while (search-forward "(7cxxwyek)" nil t)
              (replace-match "" 'fixedcase)
              ))
        (error (message "Error 168! err=%s" err)))

(checkpoint "checkpoint:169")

(condition-case err
          (progn
            (goto-char (point-min))
            (while (search-forward "(7cxxredc)" nil t)
              (replace-match "" 'fixedcase)
              )
            (goto-char (point-min))
            (while (search-forward "(7cxxcder)" nil t)
              (replace-match "" 'fixedcase)
              ))
        (error (message "Error 169! err=%s" err)))

(checkpoint "checkpoint:170")

(condition-case err
          (progn
            (goto-char (point-min))
            (while (re-search-forward "(7cxxnumb)" nil t)
              (replace-match "" 'fixedcase)
              )
            (goto-char (point-min))
            (while (re-search-forward "(7cxxbmun)" nil t)
              (replace-match "" 'fixedcase)
              ))
        (error (message "Error 170! err=%s" err)))

(checkpoint "checkpoint:171")

(condition-case err
          (progn
            (goto-char (point-min))
            (while (re-search-forward "(7cxxdecn)" nil t)
              (replace-match "" 'fixedcase)
              )
            (goto-char (point-min))
            (while (re-search-forward "(7cxxnced)" nil t)
              (replace-match "" 'fixedcase)
              ))
        (error (message "Error 171! err=%s" err)))

(checkpoint "checkpoint:172")

(condition-case err
          (progn
            (goto-char (point-min))
            (while (re-search-forward "{przp}" nil t)
              (replace-match "{prop}" 'fixedcase)
              ))
        (error (message "Error 172! err=%s" err)))

(condition-case err
          (progn
            (goto-char (point-min))
            (while (re-search-forward "\\<SQU\\>" nil t)
              (replace-match "{" 'fixedcase))
            (goto-char (point-min))
            (while (re-search-forward "\\<GLY\\>" nil t)
              (replace-match "}" 'fixedcase)))
        (error (message "Error 173! err=%s" err)))

(checkpoint "checkpoint:173")
      )

(checkpoint "checkpoint:174")

(write-file (concat *target* ".tex"))

(message "*** end of d-latexize9.el")
    ))

(provide 'd-latexize9)

Back
| Main Menu | Research Projects | Photo Album | Curriculum Vitae | The Greatest Artists |
| Email Address | Computer Games | Web Design | Java Training Wheels | The Fly (A Story) |
| Political Activism | Scruff the Cat | My Life Story | Smoking Cessation | Other Links |
| Debugging Macros | String Class I | Linked List System I | Java for C Programmers | Naming Convention |
| String Class II | How I use m4 | Strings III | Symmetrical I/O | Linked Lists II |
| Run-Time Type Info | Virtual Methods | An Array System | Science & Religion | Submodes |
| Nested Packages | Memory Leaks | Garbage Collection | Internet & Poverty | What is Knowledge? |
| Limits of Evolution | Emacs Additions | Function Plotter | Romantic Love | The Next Big Thing |
| Science Fiction | Faster Compilation | Theory of Morality | Elisp Scoping | Elisp Advice |
| S.O.G.M. Pattern | Safe Properties | School Bullying | Charisma Control | Life and Death |
| Splitting Java | Multiple Ctors | Religious Beliefs | Conversation 1 | Conversation 2 |
| J.T.W. language | Emacs Additions II | Build Counter | Relation Plotter | Lisp++ Language |
| Memory Leaks II | Super Constructors | CRUD Implementation | Order a Website Form | There Is An Afterlife |
| More Occam's Razor | C to Java Translator | Theory of Morality II
Last modified: Mon May 6 01:57:10 NZST 2019
Best viewed at 800x600 or above resolution.
© Copyright 1999-2019 Davin Pearson.
Please report any broken links to