Issue:
The first java file I look at after starting emacs has font-lock turned on
and syntax is colored.  Good.  Subsequent files (in the same directory or
elsewhere) visited do not have highlighting.  *Messages* shows 'Buffer
blah.java was not set up for parsing.'

I'm sorry my .emacs file is so crusted over with accumulated detritus.  I'll
take a shot at cleaning it up and trying again if that seems the only
reasonable approach.

Jeff

------------------ Grimy
details ---------------------------------------------

Environment:
Windows 2000 SP2, emacs 21.3, jdk 1.4.2_05
jde 2.3.4beta5, CEDET 1.0beta3b

---------------  *Messages* --------------------
(C:\apps\emacs-21.3\bin\emacs.exe)
Initializing from c:/apps/cygwin/home/jgreif/.emacs
Loading cc-mode...
Loading image...done
Loading cc-mode...done
Loading regexp-opt...done
Loading mule-util...done
Loading smtpmail...done
Loading cl-indent...done
Loading cookie1...done
Loading c:/apps/emacs-21.3/site-lisp/cedet-1.0beta3b/common/cedet.el
(source)...
"c:/apps/emacs-21.3/site-lisp/cedet-1.0beta3b/common/" added to `load-path'
Loading cl-macs...done
Setting up cedet...done
Setting up cogre...done
Setting up ede...done
Setting up eieio...done
Setting up semantic...
Loading advice...done
Loading c:/apps/emacs-21.3/bin/fns-21.3.1.el (source)...done
Loading semantic-idle...done
Loading semanticdb...done
Setting up semantic...done
Setting up speedbar...done
Setting up cedet-contrib...done
Loading c:/apps/emacs-21.3/site-lisp/cedet-1.0beta3b/common/cedet.el
(source)...done
Defining colors...
jde-java-font-lock: building names cache...empty
Loading cl-seq...done
Loading semantic-el...done
Loading wisent-java-tags...done
Setting JDE variables to startup values...
Loading semantic-edit...done
Loading semanticdb-file...done
Mark set [2 times]
Setting JDE variables to startup values...
Loading abbrev table.
Buffer InvocationImpl.java was not set up for parsing
Mark set [2 times]

------------------------------- 
 .emacs --------------------------------------
(defmacro comment (&rest args) nil)

(message (format "Initializing from %s" load-file-name))

;(setq gc-cons-threshold 800000)  ; stolen from rwk

; Mandate the use of inverse video for the mode line
;(setq mode-line-inverse-video t)
;(display-time)  ; 1 activity per minute to avoid logout timeouts.

; Autosaving disabled by default because of annoying delays
;(setq auto-save-default nil)

;;; Get the commonlisp integration loaded early
(require 'cl)

(setq load-path
      (list*   ;; requires cl
       "c:/apps/emacs-addons"
       ;; "c:/apps/emacs-addons/custom-1.9962"
       ;; "c:/apps/emacs-addons/cc-mode-5.21"
       "c:/apps/emacs-addons/gnuserv"
       ;; "c:/emacs-addons/psgml-1.2.3"
       load-path))

;;; for some reason the path setting doesn't work on Win2k
;;; need to set in control panel?????
(comment
(setenv "PATH" (concat (getenv "PATH") ";"
"C:\\emacs-addons\\gnuserv\\Release"))
 )
(setenv "PATH" (concat (getenv "PATH") ":"
"//c/apps/emacs-addons/gnuserv/Release"))
;;;(require 'gnuserv)
;;;(gnuserv-start)

(autoload 'sgml-mode "psgml" "Major mode to edit SGML files." t)
(autoload 'xml-mode "psgml" "Major mode to edit XML files." t)

;;; C++ mode
(comment
(fmakunbound 'c-mode)
(makunbound 'c-mode-map)
(fmakunbound 'c++-mode)
(makunbound 'c++-mode-map)
(makunbound 'c-style-alist)
)
;;;(setq features (delete 'cc-mode features))  ; try to make sure it gets
loaded.

;;; Not good enough to autoload or require, must load on top of version
dumped into exe
;;;(require 'cc-mode)
(load-library "cc-mode")

(comment
 (autoload 'c++-mode "cc-mode" "C++ Editing Mode" t)
 (autoload 'c-mode   "cc-mode" "C Editing Mode" t)
 )

;;; List* requires cl!
(setq auto-mode-alist (list*
         ;; (cons "\\.adf" 'c-mode)
         (cons "\\.cc" 'c++-mode)
         (cons "\\.cxx" 'c++-mode)
         (cons "\\.cpp" 'c++-mode)
         (cons "\\.hxx" 'c++-mode)
         (cons "\\.hpp" 'c++-mode)
         (cons "\\.h" 'c++-mode)
         (cons "\\.C$" 'c++-mode)
         (cons "\\.cpp$" 'c++-mode)
  (cons "\\.clp" 'lisp-mode)
  (cons "\\.lisp" 'lisp-mode)
         auto-mode-alist))


; Custom position macros
(define-key esc-map "{" "[0 ")
(define-key esc-map "}" "]0 ")

; Customize c mode indentation
(comment
(setq c-argdecl-indent 0)
(setq c-indent-level 2)
(setq c-basic-offset 2)   ; for new cc-mode
)

; Customize multiple window motion
;(define-key esc-map "\C-l" "\C-xb\C-m")
;(define-key ctl-x-map "\C-n" "\C-xo")
;(define-key ctl-x-map "\C-p" "\C-u-1\C-xo")

; Customize command-history redo
(define-key ctl-x-4-map "\e" 'repeat-matching-complex-command)

;;; News reading and posting
;(setq gnus-nntp-server
;      "news.digex.net" ;;"infer1"
;      )
;(setq gnus-your-domain "TriVida.com")
;(setq gnus-your-organization "TriVida Corp.")
;(setq gnus-nntp-service nil)
;(autoload 'gnus "gnus" "Read Network News." t)
;(autoload 'gnus-post-news "gnus" "Post a News." t)

; Disable novice-oriented traps
(put 'narrow-to-page 'disabled nil)
(put 'narrow-to-region 'disabled nil)
(put 'eval-expression 'disabled nil)

(menu-bar-enable-clipboard)

; Add my extra emacs lisp file path
(comment
(let ((net-file nil)    ;was (expand-file-name "/net/q/usr1/jmg/src")
      (home-file (expand-file-name "~/src")))
  (let ((srcdir (or home-file net-file)))
    (if (file-exists-p srcdir)
 (setq load-path (cons srcdir load-path)))))
)

; Support for shell history -- NOT IN LUCID Emacs 19
; Use reverse video in X11 not in Lucid Emacs 19
; Support for X11,not in emacs 19
;;; (require 'shelldb)
;;; (eval-after-load "shell" '(load "shellc"))
(require 'shell)
(progn
  (define-key comint-mode-map "\M-\C-l" nil)
  (define-key shell-mode-map "\M-\C-l" nil)
  (define-key comint-mode-map "\M-\C-p"
'comint-previous-matching-input-from-input)
  (define-key shell-mode-map "\M-\C-p"
'comint-previous-matching-input-from-input)
  (define-key comint-mode-map "\M-\C-n"
'comint-next-matching-input-from-input)
  (define-key shell-mode-map "\M-\C-n"
'comint-next-matching-input-from-input)
  )


;;; Shell configuration
(setq shell-file-name
      "bash"
      ;;; "sh"
      ) ;; or sh if you rename your bash executable to sh.
(setenv "SHELL" shell-file-name)
(if (not (getenv "USER"))
    (setenv "USER" "jgreif"))
(setenv "HOME" "c:/apps/cygwin/home/jgreif")
(setq explicit-shell-file-name shell-file-name)
(setq explicit-sh-args '("-login" "-i"))
(setq shell-command-switch "-c")
(setq win32-quote-process-args t)
(setq comint-completion-addsuffix (cons "/" " "))

;;; Path setting for various programs invoked by emacs
;;; (setenv "PATH" (concat (getenv "PATH") ";"
"c:\\progra~1\\netscape\\communicator\\program"))


(comment  ;; do not use cmd.exe if possible.
(setq shell-file-name "cmdproxy.exe")
(setenv SHELL "cmdproxy.exe")
(setq shell-command-switch "-c")
(setq win32-quote-process-args t)
(setq comint-completion-addsuffix (cons "\\" " "))
)

(comment
; Add more information about ignored file suffixes
(setq completion-ignored-extensions
      (cons ".hbin" (cons ".sbin" completion-ignored-extensions)))
)

; Enable INFO editing
(setq Info-enable-edit t)

(comment
; Custom filling macros for various modes
(fset 'c78 "xc-mode
78xset-fill-column
xauto-fill-mode
")
(fset 'c132 "xc-mode
132xset-fill-column
xauto-fill-mode
")
(fset 'f78 "78xset-fill-column
xauto-fill-mode
")
(fset 'f132 "132xset-fill-column
xauto-fill-mode
")
(fset 'it78 "xindented-text-mode
78xset-fill-column
xauto-fill-mode
")
(fset 'it130 "xindented-text-mode
130xset-fill-column
xauto-fill-mode
")
(fset 'it132 "xindented-text-mode
132xset-fill-column
xauto-fill-mode
")
(fset 'itm "xindented-text-mode
")
(fset 'l78 "xlisp-mode
78xset-fill-column
xauto-fill-mode
")
(fset 'l132 "xlisp-mode
132xset-fill-column
xauto-fill-mode
")
(fset 't78 "xtext-mode
78xset-fill-column
xauto-fill-mode
")
(fset 't132 "xtext-mode
132xset-fill-column
xauto-fill-mode
")
(fset 'w80 "(set-screen-width 80)
")
(fset 'w132 "(set-screen-width 132)
")
)

(let ((site-lisp "c:/apps/emacs-21.3/site-lisp"))
  (add-to-list 'load-path (expand-file-name (concat site-lisp
"/nxml-mode-20040910"))))

(add-to-list 'auto-mode-alist
              (cons (concat "\\." (regexp-opt '("xml" "xsd" "sch" "rng"
"xslt" "svg" "rss") t) "\\'")
                    'nxml-mode))

(autoload 'nxml-mode "nxml-mode" "Nxml-mode" t)
(setq nxml-slash-auto-complete-flag t)

(defun insert-date ()
  (interactive)
  (insert (current-time-string)))

;; Never set tab stops or printer will be messed up!
; Tab stops
; (setq tab-stop-list '(4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72
76 80 84 88))

(setq send-mail-function 'smtpmail-send-it)
(setq smtpmail-default-smtp-server "smtp.alumni.princeton.edu")
(setq smtpmail-smtp-service "smtp")
(setq smtpmail-local-domain "webalo.com")
(setq smtpmail-debug-info t)
(load-library "smtpmail")
(setq smtpmail-code-conv-from nil)
(setq user-full-name "[EMAIL PROTECTED]")

(require 'sendmail)
(setq mail-default-headers
      "Return-Path: <[EMAIL PROTECTED]>\nReply-to:
<[EMAIL PROTECTED]>\nSender: <[EMAIL PROTECTED]>\n")
;;; (setq mail-self-blind t)

(comment
;;; Supercite for mailing.
(setq mail-yank-hooks 'sc-cite-original)
(autoload 'sc-cite-original "supercite" "Supercite 3.0" t)
(defun my-sc-overload-hook ()
  (setq sc-auto-fill-region-p nil)
  ;; (require 'sc-oloads)   ; be sure this file is on your load-path
  ;; (sc-perform-overloads)
  )
)

(defun my-mail-setup-hook ()
  (save-excursion
    (goto-char (point-min))
    (insert "From: jgreif\n")
    (insert "Organization: Webalo Inc.\n")
    (insert "Address:      9301 Wilshire Blvd.  Suite 612, Beverly Hills, CA
90210\n")
    (insert "Phone:        (310) 205-5472, 205-5477(fax)\n")
    )
  ;; Not yet
  ;; (my-sc-overload-hook)
  )

(add-hook 'mail-setup-hook 'my-mail-setup-hook)


(comment
;; Set up RMAIL support later -- do not use mail on R until converted -- TBD
;;(load "~jaf/src/rmailsort")

;(setq rmail-file-name "/usr1/jmg/RMAIL")
;(setq rmail-last-file "~/Mail/XMAIL")
;(setq rmail-last-rmail-file "~/Mail/XMAIL")
;;; Try to get something better!
(load "rmailout") ; patch for bug in compressing/uncompressing RMAIL files!

(defun my-mail-mode-hook ()
  (set-fill-column 78))
(setq my-mail-mode-hook 'my-mail-mode-hook)
(add-hook 'mail-mode-hook 'my-mail-mode-hook)


;;; For use in mail detachment and uudecoding, etc.
(autoload 'mime "mime" "" t)
(eval-after-load "rmail"    '(define-key rmail-mode-map         "\r" 'mime))
(eval-after-load "rmailsum" '(define-key rmail-summary-mode-map "\r" 'mime))
(eval-after-load "mh-e.el"  '(define-key mh-folder-mode-map     "\r" 'mime))
)  ; end comment around all mail stuff

; Silent reversion
(defun revert-silently ()
  (interactive)
  (revert-buffer t t))

(define-key esc-map "R" 'revert-silently)

; Goto-line hook
(define-key esc-map "g" 'goto-line)

; Compile hook
(define-key esc-map "" 'compile)

; Dired listing switches  -- fix TBD
(setq dired-listing-switches "-al")
; Add g(un)zipping as option to dired -- fix TBD
; (load (expand-file-name "~/src/dired-gzip") t)

;(global-set-key "" (quote overwrite-mode))

;;; Source Merging
(autoload 'emerge-files "emerge.elc")
(autoload 'emerge-buffers "emerge.elc")

;;; Common lisp integration

;;; Decent CommonLisp indentation (customizable)

(autoload 'common-lisp-indent-function "cl-indent.elc" "" t)
(autoload 'common-lisp-indent-hook "cl-indent.elc" "" t)
(add-hook 'lisp-indent-hook 'common-lisp-indent-hook)

(load-library "cl-indent")
(setq lisp-indent-function 'common-lisp-indent-function)
(setq lisp-indent-defun-method '(&lambda &body))

(put 'with-slots 'common-lisp-indent-function 2)
(put 'with-accessors 'common-lisp-indent-function 2)
(put 'with-input-from-string 'common-lisp-indent-function 1)
;(put 'with-open-file 'common-lisp-indent-function '(4 &body))
(put 'with-open-file 'common-lisp-indent-function 'defun)

(comment   ; later -- TBD
;;;+
;;; Lucid Integration
;;;-
(let ((my-ilisp (cond ((file-exists-p "~/src/ilisp-5.3") "~/src/ilisp-5.3")
        ;; ((file-exists-p "/net/q/usr1/jmg/src/ilisp-5.3")
"/net/q/usr1/jmg/src/ilisp-5.3")
        (t nil))))
  (if my-ilisp
      (progn (setq load-path (cons (expand-file-name my-ilisp) load-path))
      (load-library "ilisp"))))

;;; If you always want partial minibuffer completion
;(require 'completer)

;;; If want always want TMC completion
;(load "completion")
;(initialize-completions)

;;; If you want to redefine popper keys
(add-hook 'popper-load-hook
      '(lambda ()
 (define-key global-map "\C-c1" 'popper-bury-output)
 (define-key global-map "\C-cv" 'popper-scroll-output)
 (define-key global-map "\C-cg" 'popper-grow-output)
 (define-key global-map "\C-cb" 'popper-switch)))

;;; Autoload based on your LISP.  You only really need the one you use.
;;; If called with a prefix, you will be prompted for a buffer and program.
(autoload 'run-ilisp "ilisp" "Select a new inferior LISP." t)
(autoload 'lucid     "ilisp" "Inferior Lucid Common LISP." t)

;;; Define where LISP programs are found.  (This may already be done
;;; at your site.)
(setq lucid-program "/inference/lisp/dbcs/lisp")

;;; This makes reading a lisp file load in ilisp.
(set-default 'auto-mode-alist
      (append '(("\\.lisp$" . lisp-mode)) auto-mode-alist))
;(add-hook 'lisp-mode-hook '(lambda () (require 'ilisp)))

;;; Sample load hook
(add-hook 'ilisp-load-hook
      '(lambda ()
 ;; Change default key prefix to C-c
 (setq ilisp-prefix "\C-c")
 ;; Sample initialization hook.  Set the inferior LISP directory to
 ;; the directory of the buffer that spawned it on the first prompt.
 ;;(add-hook 'ilisp-mode-hook
    ;;(function (lambda ()
    ;;(default-directory-lisp ilisp-last-buffer))))
 ))


;;; Setup to always show output in the Inferior LISP buffer.
;(setq lisp-no-popper t
;      comint-always-scroll t)


;;; end of commonlisp integration
)   ; end lisp-integration commented out


;;; Other mode settings
(setq default-major-mode 'text-mode)  ; rather than fundamental

(add-hook 'text-mode-hook
   '(lambda () (auto-fill-mode 1) (setq fill-column 79)))

;;; From jmg's cape .emacs file
(add-hook 'lisp-mode-hook
   '(lambda ()
      (setq fill-column 128)
      (setq comment-column 70)
      (setq fill-prefix ";;; ")
      (auto-fill-mode 1)))

;;; (define-key esc-map "\C-l" "\C-xb\r")

;;; Other packages
;;; (require 'kill-fix)
;;; (require 'crypt++)  ; auto compress/compact/crypt
;;  (require 'ange-ftp) ; Remote ftp access mode  -- version in src breaks
dired.  Must fix TBD!!
;(require 'lispdir)
;(require 'describe-apropos)


;;; boilerplate and comments

(defun jmg ()
  (insert ";;; Created by Jeff Greif, TriVida Corp. -- "
   (current-time-string) ;; has California timezone currently
   )
  )

(defun cjmg ()
  (insert "/* Created by Jeff Greif, TriVida Corp. -- "
   (current-time-string)
   " */"
   )
  )

(defun whodunit ()
  (insert " -- jmg " (current-time-string)))



(defun egrep (command)
  "Run egrep, with user-specified args, and collect output in a buffer.
While grep runs asynchronously, you can use the \\[next-error] command
to find the text that grep hits refer to."
  (interactive "sRun egrep (with args): ")
  (compile1 (concat "egrep -n " command " /dev/null")
     "No more egrep hits" "egrep"))

(defun zgrep (command)
  "Run zgrep, with user-specified args, and collect output in a buffer.
While grep runs asynchronously, you can use the \\[next-error] command
to find the text that grep hits refer to."
  (interactive "sRun zgrep (with args): ")
  (compile1 (concat "zgrep -n " command " /dev/null")
     "No more zgrep hits" "zgrep"))

(comment
(defun enscript (command)
  "Run enscript with user-specified switches and files."
  (interactive "sRun enscript (with switches and files): ")
  (shell-command (concat "enscript " command) nil))


(defun enscr-buffer ()
  "Run enscript with Times-Roman12 font on some buffer."
  (interactive "sRun enscr (on buffer): ")
  (enscr-region (point-min) (point-max)))

(defun enscr-region (start end)
  "Run enscript with Times-Roman12 font on region."
  (shell-command-on-region start end "enscr " nil))

(defun enscr (command)
  "Run enscript with Times-Roman12 font and files."
  (interactive "sRun enscr (with files): ")
  (shell-command (concat "enscr " command) nil))

(defun fenscr (command)
  "Run enscript with fixed-width-font and files."
  (interactive "sRun fenscr (with files): ")
  (shell-command (concat "fenscr " command) nil))

(defun wenscr (command)
  "Run enscript in landscape mode and files."
  (interactive "sRun wenscr (with files): ")
  (shell-command (concat "wenscr " command) nil))

(defun wenscr2 (command)
  "Run enscript in 2-column landscape mode and files."
  (interactive "sRun wenscr2 (with files): ")
  (shell-command (concat "wenscr2 " command) nil))

(defun prt (command)
  "Run enscript with small fixed-width font and files."
  (interactive "sRun prt (with files): ")
  (shell-command (concat "prt " command) nil))

) ;end comment

;;; Allow wrapping for horizontally split windows
(setq truncate-partial-width-windows nil)

;;; (setq lpr-switches '("-d" "beaver"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; FTP printing
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(comment
(defun ftp-print (ftp-host ftp-file &optional user password)
  (interactive
 (append (ftp-read-file-name "FTP get host:file: ")
  (list nil (not (null current-prefix-arg)))))
  (let ((process (ftp-find-file ftp-host ftp-file)))
    (set-process-sentinel process 'ftp-print-sentinel)))

(defun ftp-print-sentinel (process message)
  (ftp-asynchronous-input-sentinel process message)
  (let ((curr (current-buffer)))
    (set-buffer (process-buffer process))
    (shell-command-on-region (point-min) (point-max) "imp" nil)
    (set-buffer curr)))
)

;;;;;;;; Alternate Info trees ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; Very bad -- should not define any modifiers for \C-g
;;(define-key esc-map
    ;;"\C-g" "\C-[Info-goto-node\C-m(/usr/local/info/gdb.info)\C-m")

;(define-key esc-map
;    "\C-c" "\C-[Info-goto-node\C-m(/usr/local/info/gcc.info)\C-m")

;(define-key esc-map
;    "\C-s" "\C-[Info-goto-node\C-m(~/src/sc.info)\C-m")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; (require 'dmacro)
;;;(setq load-path (cons (expand-file-name "./") load-path))
(setq load-path (cons "./" load-path))

;;;+
;;; X11 support
;;;-
(comment  ; integrate later -- TBD
(if (and (boundp 'window-system-version)
  (integerp window-system-version)
  (= window-system-version 11))
    (progn
      (load "x-mouse")
      (load "x-hacks")
      (x-set-border-color "white")
      (x-set-cursor-color "white")
      (x-set-mouse-color "white")
      (x-set-background-color "black")
      (x-set-foreground-color "white")
      (x-set-font "-adobe-courier-medium-r-*-*-12-*")))
)   ; end X11 support comment

(put 'downcase-region 'disabled nil)

(put 'set-goal-column 'disabled nil)

(menu-bar-enable-clipboard)    ;; allow use of cut/copy/paste keys to system
clipboard

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;     Support for uudecoding and PC file transfer

(defun uudecode (&optional from to)
  "Run uudecode on the specified region."
  (interactive)
  (if (not from) (setq from (region-beginning)))
  (if (not to) (setq to (region-end)))
  (shell-command-on-region from to "uudecode" nil 1))


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; go to URL via netscape ;;;;;;;;;;;
(global-set-key [S-mouse-3] 'netscape-follow-url)
(defun netscape-follow-url (event)
  (interactive "e")
  (let ((curwin (current-window-configuration)) url)
    (save-excursion
      (mouse-set-point event)
      ;; find url-at-point
      (require 'url)                        ;from w3
      (setq url (url-get-url-at-point)))
    (set-window-configuration curwin)
    (if url
        (progn
          (prin1 (concat "Open URL " url))
          (call-process "netscape" nil 0 nil "-remote"
                        (concat "openURL(" url ")")))
      (prin1 "No URL found at point"))))


;;; Support for counting lines on PC's

(defun count-lines-file (file)
  (let ((buffer (current-buffer)))
    (find-file (expand-file-name file))
    (end-of-buffer)
    (let* ((count-string (what-line))
    (count (read (substring count-string 5))))
      (- count 1))))

(defun tags-count-lines ()
  (interactive)
  (let ((buffer (current-buffer)))
    (find-file tags-file-name)
    (let ((files (tags-table-files))
   (count 0))
      (mapc #'(lambda (file) (setq count (+ count (count-lines-file file))))
files)
      (switch-to-buffer buffer)
      count)))

;;;;;;;;;;;;;;  file scrambling ;;;;;;;;;;;;;;;;;;;;;;;;;;;

(load-library "cookie1")

(defconst my-cookie-delimiter "\n")

(defun shuffle-file-lines (infile outfile)
  (let ((buf (generate-new-buffer "*shufflee*"))
 (result nil))
    (set-buffer buf)
    (insert-file-contents (expand-file-name infile))
    ;; (re-search-forward my-cookie-delimiter)  This would lose the first
line.
    (while (progn (skip-chars-forward " \t\r\f") (not (eobp)))
      (let ((beg (point)))
 (re-search-forward my-cookie-delimiter)
 (setq result (cons (buffer-substring beg (1- (point)))
      result))))
    (kill-buffer buf)
    (let ((vec (apply 'vector result))
   (buf (generate-new-buffer "*shuffled*")))
      (shuffle-vector vec)
      (let ((i 0)
     (len (length vec)))
 (set-buffer buf)
 (while (< i len)
   (insert (aref vec i))
   (insert "\n")
   (setq i (+ i 1)))
 (write-file (expand-file-name outfile))))))

;;;;;;;;;;;;;;;;;; font-locking and highlighting ;;;;;;;;;;;;;;;
(set-default-font "-*-Lucida Console-normal-r-*-*-11-*-*-*-c-*-iso8859-1")
;; (set-default-font "-*-Lucida
Console-normal-r-*-*-11-90-*-*-c-*-*-ansi-" )  ; "Fixedsys"
(require 'font-lock)
(cond ((fboundp 'global-font-lock-mode)
       ;; Turn on font-lock in all modes that support it
       (global-font-lock-mode t)
       ;; Maximum colors
       (setq font-lock-maximum-decoration t)))
(comment (require 'andersl-java-font-lock))
(comment
(global-font-lock-mode t)
(setq font-lock-maximum-decoration
      '((c-mode . 3) (c++-mode . 3) (java-mode . 3)))
)

(setq completion-ignored-extensions (cons ".class"
completion-ignored-extensions))


;; gnuserv integration
;(setq debug-on-error t)
(require 'gnuserv)
(gnuserv-start)
(setq gnuserv-frame (selected-frame))

;; just so I don't forget this while I get things better set up
(setq my-compile-command
      ;;"PATH='/Program Files/Devstudio/vc/bin'://e/jdk1.3.1/bin:${PATH}
make -k -f makefile all"
      "javac -g -d $WCLASSES -sourcepath \"$SOURCEPATH\" *.java"
      )
(setq compile-command my-compile-command)

;; Info directory settings
(setq Info-default-directory-list (cons "c:/cygwin/usr/info"
Info-default-directory-list))

(set-background-color "ghost white")
(set-face-foreground 'modeline "white")
(set-face-background 'modeline "black")

;;; Stuff for JDE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



(let* ((site-lisp "c:/apps/emacs-21.3/site-lisp")
       (cedet (concat site-lisp "/cedet-1.0beta3b")))
  ;; load the whole cedet package
  (load-file (concat cedet "/common/cedet.el"))
  ;; enable semantic minor modes.  see semantic/INSTALL
  ;; later (semantic-load-enable-codehelpers)
  ;; some of the items below may be unnecessary
  (add-to-list 'load-path (expand-file-name (concat site-lisp
"/jde-2.3.4beta5/lisp")))
  (add-to-list 'load-path (expand-file-name (concat site-lisp "/elib-1.0")))
  (add-to-list 'load-path (expand-file-name (concat site-lisp "/pcl-cvs")))

  )

;; Set the debug option to enable a backtrace when a
;; problem occurs.
(setq debug-on-error t)

;; If you want Emacs to defer loading the JDE until you open a
;; Java file, edit the following line
(setq defer-loading-jde nil)
;; to read:
;;
;;  (setq defer-loading-jde t)
;;

(if defer-loading-jde
    (progn
      (autoload 'jde-mode "jde" "JDE mode." t)
      (setq auto-mode-alist
     (append
      '(("\\.java\\'" . jde-mode))
      auto-mode-alist)))
  (require 'jde))


;; Sets the basic indentation for Java source files
;; to two spaces.  Handled below.
; (defun my-jde-mode-hook ()
;   (setq c-basic-offset 2))

; (add-hook 'jde-mode-hook 'my-jde-mode-hook)


(comment
(cond ((fboundp 'global-font-lock-mode)
       ;; Turn on font-lock in all modes that support it
       (global-font-lock-mode t)
       ;; Maximum colors
       (setq font-lock-maximum-decoration t)
       ;; Customize face attributes
       (setq font-lock-face-attributes
             ;; Symbol-for-Face Foreground Background Bold Italic Underline
             '((font-lock-comment-face       "DarkGreen")
               (font-lock-string-face        "Sienna")
               (font-lock-keyword-face       "RoyalBlue")
               (font-lock-function-name-face "Blue")
               (font-lock-variable-name-face "Black")
               (font-lock-type-face          "Black")
               (font-lock-reference-face     "Purple")))
       ;; Create the faces from the attributes
       (font-lock-make-faces)))
)

(c-add-style "my-java" (list "java"
        '(c-basic-offset . 4)   ; for webalo
        '(c-offsets-alist . ((substatement-open . 0)))
        ))
(c-add-style "my-c++" (list "stroustrup"
        '(c-basic-offset . 4)
        '(c-offsets-alist . ((substatement-open . 0)))
        ))

(add-hook 'c++-mode-hook (lambda () (c-set-style "my-c++")))
(add-hook 'java-mode-hook (lambda () (c-set-style "my-java")))
(add-hook 'jde-mode-hook (lambda () (c-set-style "my-java")))

(custom-set-variables
 '(jde-compile-option-depend t)
 '(jde-gen-inner-class-template (quote ("(end-of-line) '& \"class \" (P
\"Class name: \" class)" "\" \" (jde-gen-get-extend-class)" "(if jde-gen-k&r
" "()" "'>'n)" "\" {\" '>'n" "\"public \" (s class) \"() \"" "(if
jde-gen-k&r " "()" "'>'n)" "\" {\"'>'n" "\"}\"'>'n" "'>'n"
"(jde-gen-get-interface-implementation)" "'>'n" "\"}\" '>'n'>")))
 ;; '(jde-run-application-class
"com.webalo.repo.repositoryAPI.TestRepositoryAPI")
 '(jde-gen-cflow-switch (quote ("(if (jde-parse-comment-or-quoted-p)" "'(l
\"switch\")" "'(l '> \"switch (\" (p \"switch-condition: \" clause) \") \""
"(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n'" "\"case \" (p \"first value:
\") \":\"'>'n'>'p'n" "\"break;\"'>'n'>'p'n" "\"default:\"'>'n'>'p'n"
"\"break;\"'>'n" "\"}\"'>'n'>)" ")")))
 '(jde-gen-cflow-try-catch (quote ("(if (jde-parse-comment-or-quoted-p)"
"'(l \"try\")" "'(l \"try \"" "(if jde-gen-k&r " "()" "'>'n)"
"\"{\"'>'n'>'r'n" "\"} \"" "'> \"catch (\" (p \"catch what: \" clause) \" e)
\"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n'>'r'n" "\"}\"'>'n'>)" ")")))
 '(jde-gen-cflow-while (quote ("(if (jde-parse-comment-or-quoted-p)" "'(l
\"while\")" "'(l '> \"while (\" (p \"while-clause: \" clause) \") \"" "(if
jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n'>'r'n" "\"}\"'>'n'>)" ")")))
 '(jde-gen-cflow-if-else (quote ("(if (jde-parse-comment-or-quoted-p)" "'(l
\"ife\")" "'(l '> \"if (\" (p \"if-clause: \" clause) \") \"" "(if
jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n'>'r'n" "\"}\"'> n" "'> \"else \"" "(if
jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n'>'r'n" "\"}\"'>'n'>)" ")")))
 '(jde-gen-cflow-finally (quote ("(if (jde-parse-comment-or-quoted-p)" "'(l
\"finally\")" "'(l '> \"finally \"" "(if jde-gen-k&r " "()" "'>'n)"
"\"{\"'>'n'>'r'n" "\"}\"'>'n'>)" ")")))
 '(jde-compile-option-depend-switch (quote ("")))
 '(jde-gen-cflow-try-finally (quote ("(if (jde-parse-comment-or-quoted-p)"
"'(l \"try\")" "'(l \"try \"" "(if jde-gen-k&r " "()" "'>'n)"
"\"{\"'>'n'>'r'n" "\"}\"" "'> \"catch (\" (p \"catch what: \" clause) \" e)
\"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n'>'r'n" "\"} \"" "'> \"finally
\"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n'>'r'n" "\"}\"'>'n'>)" ")")))
 '(jde-compile-option-sourcepath (quote
("c:/apps/cygwin/home/jgreif/webalo/cvs/products/src/java"
"/cygdrive/c/apps/cygwin/home/jgreif/webalo/cvs/products/src/java")))
 '(c-basic-offset 4)
 '(jde-gen-cflow-catch (quote ("(if (jde-parse-comment-or-quoted-p)" "'(l
\"catch\")" "'(l '> \"catch (\" (p \"catch what: \" clause) \" e) \"" "(if
jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n'>'r'n" "\"}\"'>'n'>)" ")")))
 '(jde-gen-cflow-for (quote ("(if (jde-parse-comment-or-quoted-p)" "'(l
\"for\")" "'(l '> \"for (\" (p \"for-clause: \" clause) \") \"" "(if
jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n'>'r'n" "\"}\"'>'n'>)" ")")))
 '(jde-compile-option-classpath nil)
 '(jde-db-source-directories (quote ("~/webalo/cvs/products/src/java")))
 '(jde-compile-option-bootclasspath (quote
("c:/jdk1.4.2_05/jre/lib/rt.jar")))
 '(jde-gen-cflow-for-iter (quote ("(if (jde-parse-comment-or-quoted-p)" "'(l
\"foriter\")" "'(l '> \"for (Iterator \" (p \"variable: \" var) \" = \"" "(p
\"collection: \" coll) \".iterator(); \"" "(s var) \".hasNext();\"" "\")\""
"(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n'>'r'n" "(s var) \".next();\"
'>'n'>" "\"}\"" "'>'n'>)" ")")))
 '(jde-gen-class-buffer-template (quote ("(funcall
jde-gen-boilerplate-function)" "(jde-gen-get-package-statement)" "\"/**\"
'>'n" "\" * \"" "(file-name-nondirectory buffer-file-name) '>'n" "\" *\"
'>'n" "\" *\" '>'n" "\" * Created: \" (current-time-string) '>'n" "\" *\"
'>'n" "\" * @author <a href=\\\"mailto:\"; (eval user-mail-address) \"\\\">\"
(user-full-name) \"</a>\"'>'n" "\" * @version\" '>'n" "\" */\" '>'n'" "'>'n"
"\"public class \"" "(file-name-sans-extension (file-name-nondirectory
buffer-file-name))" "\" \" (jde-gen-get-extend-class)" "(if jde-gen-k&r "
"()" "'>'n)" "\" {\"'>'n" "\"public \"" "(file-name-sans-extension
(file-name-nondirectory buffer-file-name))" "\" ()\"" "(if jde-gen-k&r "
"()" "'>'n)" "\" {\"'>'n" "'>'p'n" "\"}\">" "'>'n"
"(jde-gen-get-interface-implementation)" "'>'n" "\"}\">")))
 '(jde-compiler "javac")
 '(jde-gen-comments nil)
 '(jde-gen-cflow-for-i (quote ("(if (jde-parse-comment-or-quoted-p)" "'(l
\"fori\")" "'(l '> \"for (int \" (p \"variable: \" var) \" = 0; \"" "(s
var)" "\" < \"(p \"upper bound: \" ub)\"; \" (s var) \"++) \"" "(if
jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n'>'r'n" "\"}\"" "'>'n'>)" ")")))
 '(jde-global-classpath (quote
("c:/apps/cygwin/home/jgreif/webalo/cvs/products/src/java"
"/cygdrive/c/apps/cygwin/home/jgreif/webalo/cvs/products/src/java"
"~/webalo/cvs/products/src/java")))
 '(jde-gen-cflow-main (quote ("(if (jde-parse-comment-or-quoted-p)" "'(l
\"main\")" "'(l '> \"public static void main (String[] args) \"" "(if
jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n'>'r'n" "\"}\"'>'n'>)" ")")))
 '(jde-enable-abbrev-mode t)
 '(jde-gen-cflow-else-if (quote ("(if (jde-parse-comment-or-quoted-p)" "'(l
\"eif\")" "'(l '> \"else if (\" (p \"else-if-clause: \" clause) \") \"" "(if
jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n'>'r'n" "\"}\"'> n)" ")")))
 '(jde-gen-buffer-boilerplate (quote ("/*" " * ClassnameHere" " * " " *
$Revision$" " *" " * $Date$" " *" " * $Author$" " *" " * Copyright (C) 2002
by Webalo, Inc." " * All rights reserved." " */")))
 '(jde-gen-cflow-else (quote ("(if (jde-parse-comment-or-quoted-p)" "'(l
\"else\")" "'(l '> \"else \"" "(if jde-gen-k&r " "()" "'>'n)"
"\"{\"'>'n'>'r'n" "\"}\"'>'n'>)" ")"))))
(custom-set-faces)

(setq c-default-style "user");


(comment
;;; For cvs integration
 (setq load-path (append (list "c:/apps/emacs-20.7/site-lisp/")
    load-path))

 ;; load pcl-cvs setup code
 (load "pcl-cvs-startup")
 )
;;;;;;;;;;;;;;;;;;;;  end of JDE and style stuff ;;;;;;;;;;;;;;;;;;;;;;;;;



(comment   ;; for printing support -- not working yet
;;; Printer support.
(load-library "print-NT")


;;(setq lpr-destination '("/D:\"\\\\HP Deskjet 870 Series\""))
(setq lpr-destination '("/D:\\HP Deskjet 870 Series"))
(setq ps-lpr-destination '("/D:\\HP Deskjet 870 Series"))
(setq lpr-command "print")
;; (setq ps-lpr-command "print")

(setq ps-print-use-gs t) ; t - use ghostscript, nil - do not
(setq gs-print-command "e:/gs/gs7.00/bin/gswin32.exe")
(setq gs-print-switches
'("-q -sDEVICE=djet500 -r300 -dNOPAUSE -Ie:/gs/gs7.00;e:/gs/fonts"))
(setq gs-view-command  "e:/gs/gsview/gsview32.exe")
(setq ps-paper-type 'ps-letter) ; the type of paper (if needed)

(setq  ps-psnup-command "psnup")
(setq ps-psnup-switches '(" -l -2 -m.25in "))
(setq ps-psnup-buffer "d:/temp/psnup.ps")
)  ;; for printing support -- not working yet

(defun cormac-style ()
  (save-excursion
    (beginning-of-buffer)
    (insert "/* -*- tab-width: 4; c-basic-offset: 4 -*- */\n")
    (save-buffer)
    ;; let new settings take effect
    (revert-buffer t t)))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Seth's stuff to integrate
;;;;;;;;;;;;;;;;;;;
(comment
;; ispell4:
;;
(autoload 'ispell-word "d:/app/ispell4/ispell4"
  "Check spelling of word at or before point" t)
(autoload 'ispell-complete-word "d:/app/ispell4/ispell4"
  "Complete word at or before point" t)
(autoload 'ispell-region "d:/app/ispell4/ispell4"
  "Check spelling of every word in the region" t)
(autoload 'ispell-buffer "d:/app/ispell4/ispell4"
  "Check spelling of every word in the buffer" t)
(setq ispell-command "d:/app/ispell4/exe/ispell.exe"
      ispell-look-dictionary "d:/app/ispell4/ispell.words"
      ispell-look-command "d:/app/ispell4/exe/look.exe"
      ispell-command-options (list "-d" "d:/app/ispell4/ispell.dict")
      )

;; end ispell4


(setq load-path (append (list "c:/apps/emacs-21.3/site-lisp/")
                        load-path))

;; load pcl-cvs setup code
(add-to-list 'load-path "c:/apps/emacs-21.3/site-lisp/pcl-cvs")
(load "pcl-cvs-startup")

;;
(autoload 'diff-mode "c:/apps/emacs-21.3/site-lisp/diff-mode" "Diff major
mode" t)
(add-to-list 'auto-mode-alist '("\\.\\(diffs?\\|patch\\|rej\\)\\'" .
diff-mode))


;; Setup Emacs to run bash as its primary shell.
;; (setq shell-file-name "c:/Program
Files/cygnus/cygwin-b20/H-i586-cygwin32/bin/bash")
(setq shell-file-name "bash")
(setq shell-command-switch "-c")
(setq explicit-shell-file-name shell-file-name)
(setenv "SHELL" shell-file-name)
(setq explicit-sh-args '("-login" "-i"))
(if (boundp 'w32-quote-process-args)
  (setq w32-quote-process-args ?\"))


(custom-set-variables
 '(jde-compile-option-command-line-args "-g")
;  '(tab-width 4)
 '(c-basic-offset 4)
 '(auto-save-default nil)
 '(jde-bug-jdk-directory "c:/jdk1.3/")
 '(jde-run-read-app-args nil)
 '(jde-db-source-directories (quote
("d:/scratch/jdk1.3-src/src/share/classes/" "d:/misc/proto/vtst/")))
 '(jde-run-option-application-args (quote
("d:\\proto\\vtst\\index.html")))
 '(jde-db-debugger (quote ("JDEbug" "jdb" . "Executable")))
 '(truncate-partial-width-windows nil)
 '(jde-global-classpath (quote ("d:/misc/proto/vtst/")))
 '(jde-db-read-app-args nil)
 '(jde-run-java-vm-w "d:\\jdk1.3\\bin\\javaw")
 '(jde-bug-vm-includes-jpda-p t)
 '(global-font-lock-mode t nil (font-lock))
 '(jde-db-option-application-args (quote
("d:\\misc\\proto\\vtst\\index.html")))

 '(make-backup-files nil)
 '(jde-run-classic-mode-vm t))

(custom-set-faces)

) ; end comment


(put 'upcase-region 'disabled nil)

(setq-default indent-tabs-mode nil)

;;; sgml parsing and validation support
(custom-set-variables
 '(sgml-validate-command "nsgmls -s"))


;;;  webalo related paths

(define-key esc-map "Q" 'fill-region-as-paragraph)


(defvar wproto (getenv "PROTO_HOME"))
(defvar wtree (concat wproto "/src/java"))
(defvar wrepo (concat wtree "/com/webalo/repo"))
(defvar wclasses (concat wproto "/obj/release/classes"))

(defvar wups (concat wtree "/com/webalo/ups"))
(defvar wsdl (concat wtree "/com/webalo/wsdlclient"))

(defvar javac-flags (concat "-g -d " wclasses))

(defun clean-sml-classes ()
  (interactive)
  (shell-command (concat "rm " wups "/sml/*.class " wrepo
"/sml/*/*.class")))

;;; This probably has the wrong classpath -- just use the env. variable
(defun wsdlclient-compile ()
  (interactive)
  (let ((curr (pwd)))
    (declare (special wsdl))
    (unwind-protect
  (progn
    (cd wsdl)
    (let ((axis (getenv "AXIS_HOME"))
   (soap (getenv "SOAP_HOME"))
   (xerces (getenv "XERCES_HOME"))
   (j2ee (getenv "J2EE_HOME"))
   (wsif (getenv "WSIF_HOME"))
   (wsdl4j (getenv "WSDL4J_HOME"))
   )
      (compile (concat "javac " javac-flags
         " -classpath \"" ".;../..;" axis "/lib/axis.jar;"
         axis "/lib/jaxrpc.jar;" axis "/lib/saaj.jar;"
         axis "/lib/commons-logging.jar;"
         axis "/lib/commons-discovery.jar;"
         j2ee "/lib/j2ee.jar;" wsdl4j "/lib/wsdl4j.jar;"
         wsdl4j "/lib/qname.jar;" wtree ";"
         xerces "/xmlParserApis.jar;" wsif "/lib/wsif.jar;"
         xerces "/xercesImpl.jar;" soap "/lib/soap.jar\"" "  *.java"))))
      (if (and curr (> (length curr) 11))
   (cd (substring curr 10))))))


;;; This probably has the wrong classpath -- just use the env. variable
(defun sml-compile ()
  (interactive)
  (let ((curr (pwd)))
    (declare (special wsdl))
    (unwind-protect
  (progn
    (cd wups)
    (let ((axis (getenv "AXIS_HOME"))
   (soap (getenv "SOAP_HOME"))
   (xerces (getenv "XERCES_HOME"))
   (j2ee (getenv "J2EE_HOME"))
   (wsif (getenv "WSIF_HOME"))
   (wsdl4j (getenv "WSDL4J_HOME"))

   )
      (compile (concat "javac " javac-flags
         " -classpath \"" ".;../..;"
         ;; axis "/lib/axis.jar;"
         axis "/lib/jaxrpc.jar;" axis "/lib/saaj.jar;"
         ;; axis "/lib/commons-logging.jar;"
         ;; axis "/lib/commons-discovery.jar;"
         ;; j2ee "/lib/j2ee.jar;" wsdl4j "/lib/wsdl4j.jar;"
         ;; wsdl4j "/lib/qname.jar;"
         wtree ";"
         xerces "/xmlParserApis.jar;"
         ;; wsif "/lib/wsif.jar;"
         xerces "/xercesImpl.jar;"
         ;; soap "/lib/soap.jar"
         "\"  sml/*.java sml/*/*.java ial/*.java"))))
      (if (and curr (> (length curr) 11))
   (cd (substring curr 10))))))



(defun repo-compile ()
  (interactive)
  (flet ((pathify (l)
    (apply #'concat (mapcar #'(lambda (x) (concat x ";")) l))))

    (compile (concat "javac " javac-flags
       " -classpath '" (pathify jde-global-classpath) "' "
       wrepo "/repository/*.java " wrepo "/repositoryapi/*.java "
       wrepo "/repository/*/*.java"))))

(defun repo-namespace-compile ()
  (interactive)
  (flet ((pathify (l)
    (apply #'concat (mapcar #'(lambda (x) (concat x ";")) l))))

    (compile (concat "javac " javac-flags
       " -classpath '" (pathify jde-global-classpath) "' "
        wrepo "/repository/namespace/*.java"))))



(defun clean-repo-classes ()
  (interactive)
  (shell-command (concat "rm " wrepo "/*/*.class " wrepo "/*/*/*.class")))

(defun insert-xsd-doc (text)
  (interactive "sdoc:")
  (insert (concat "<annotation><documentation>\n" text
   "\n</documentation></annotation>\n"))
  )

(defun wjava-comment ()
  (interactive)
  (save-excursion
    (beginning-of-buffer)
    (insert "/*\n * CONFIDENTIAL\n * Copyright 2004 by Webalo, Inc. All
rights reserved\n */\n")))

(defun wlisp-comment ()
  (interactive)
  (save-excursion
    (beginning-of-buffer)
    (insert ";;; CONFIDENTIAL\n;;; Copyright 2004 by Webalo, Inc. All rights
reserved\n")))

(defun wxml-comment ()
  (interactive)
  (save-excursion
    (beginning-of-buffer)
    (insert "<!-- CONFIDENTIAL\nCopyright 2004 by Webalo, Inc. All rights
reserved --!>\n")))

(defun wsh-comment ()
  (interactive)
  (save-excursion
    (beginning-of-buffer)
    (insert "# CONFIDENTIAL\n# Copyright 2004 by Webalo, Inc. All rights
reserved\n")))


(defun tags-funcall (fun)
  (interactive "aOperator: ")
  (let ((buffer (current-buffer)))
    (find-file tags-file-name)
    (let ((files (tags-table-files)))
      (mapc fun files)
      (switch-to-buffer buffer))))

;;; Suitable for calling using tags-funcall
(defun my-jde-insert-prolog (file)
  (let ((bufr (current-buffer)))
    ;; (find-file (expand-file-name file))
    (find-file file)
    (insert (funcall jde-gen-boilerplate-function))
    (beginning-of-buffer)
    (replace-string "ClassnameHere"
      (file-name-sans-extension (file-name-nondirectory file)))
    (beginning-of-buffer)
    (replace-string "DateHere" (current-time-string))
    (basic-save-buffer)
    (switch-to-buffer bufr)))

(defun fixbuf ()
  (set-fill-column 79)
  (save-excursion
    (end-of-buffer)
    (indent-region (point-min) (point) nil)))

(fset 'add-cvs-comments
   [?\C-s ?V ?e ?r ?s ?i ?o ?n ?  ?1 ?. ?0 ?\C-a ?\C-  ?\C-n ?\C-n ?\C-n
?\C-w ?\C-o ?* ?  ?$ ?R ?e ?v ?i ?s ?i ?o ?n ?$ return ?* return ?* ?  ?$ ?A
?u ?t ?h ?o ?r ?$ backspace backspace backspace backspace backspace
backspace backspace ?D ?a ?t ?e ?$ return return backspace ?* return ?* ?
?$ ?A ?u ?t ?h ?o ?r ?$])

(defun my-add-cvs-comments (file)
  (let ((bufr (current-buffer)))
    ;; (find-file (expand-file-name file))
    (find-file file)
    (beginning-of-buffer)
    ;;(add-cvs-comments)
    (call-last-kbd-macro)
    (basic-save-buffer)
    (switch-to-buffer bufr)))

Reply via email to