bug-gnu-emacs
[Top][All Lists]
Advanced

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

Stack Overflow


From: Jeff Rancier
Subject: Stack Overflow
Date: Fri, 12 Jan 2001 11:08:58 -0500

To: bug-gnu-emacs@gnu.org
Subject: Windows Stack Overflow
--text follows this line--
This bug report will be sent to the Free Software Foundation,
 not to your local site managers!!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

In GNU Emacs 20.7.1 (i386-*-nt5.0.2195)
 of Tue Jun 13 2000 on buffy
configured using `configure NT'

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

I recently added to my .emacs file:

(require 'power-macros)

That worked fine.  I then went in and customized the group:

M-x customize-group power-macros RET

I changed:
 '(power-macros-file "h:/HOME/JRANCIER/.emacs-macros")
(via customize)

then added the following after the require statement.
(load power-macros-file)

My guess is that the name of the macros file wasn't known prior to trying to
load it.  Regardless, the behaviour was that of being in a loop while
loading initial packages.  It NTEmacs looped, e.g. I was speedbar loading
about 6 times, then we get a stack overflow in a windows dialog. I didn't
test the change.

Recent input:
f10 f10 menu-bar help-menu report-emacs-bug

Recent messages:
(H:\usr\pkg\emacs-20.7\bin\emacs.exe -q)
For information about the GNU Project and its goals, type C-h C-p.
Loading emacsbug...
Loading emacsbug...done

My .emacs:

;;--------------------------------------------------------------------------
---;
;; Jeff Rancier's .emacs
;
;;--------------------------------------------------------------------------
---;
;; Uncomment the following line to perform back trace.
;(setq debug-on-error t)

;; This will make sure `debug-on-error' is set after initialization.
;(add-hook 'after-init-hook
;         (function
;          (lambda ()
;             (setq debug-on-error t))))

;;--------------------------------------------------------------------------
---;
;; SECTION: Set Default Behaviour
;
;;--------------------------------------------------------------------------
---;
(setq user-full-name "Jeffery B. Rancier")
(setq user-mail-address "jeff.rancier@softechnics.com")
(display-time)
(setq default-major-mode 'text-mode)
(add-hook 'text-mode-hook 'turn-on-auto-fill)

(setq-default indent-tabs-mode nil)
(global-font-lock-mode t)
(setq query-replace-hightlight t)
(setq-default ediff-toggle-use-toolbar t)
(setq which-func-mode t)
(add-hook 'diary-display-hook 'fancy-diary-display)
(add-hook 'diary-hook 'appt-make-list)
(diary 0)
(global-auto-revert-mode 1)
(set-message-beep 'exclamation)
(setq insert-default-directory nil)

;; Remove undo history on writing files/buffers to disk.
;(add-hook 'write-file-hooks '(lambda ()
;                               (setq buffer-undo-list nil)
;                               nil))

;;--------------------------------------------------------------------------
---;
;; SECTION: Visual Basic Editing
;
;;--------------------------------------------------------------------------
---;
(autoload 'visual-basic-mode "visual-basic-mode" "Visual Basic mode." t)
(setq auto-mode-alist (append '(("\\.\\(frm\\|bas\\|cls\\|asp\\)$" .
                                 visual-basic-mode)) auto-mode-alist))
(autoload 'vbp-mode "visual-basic-mode" "VBP mode." t)
(setq auto-mode-alist (append '(("\\.\\(vbg\\|vbg\\)$" . vbp-mode))
auto-mode-alist))
(setq visual-basic-ide-pathname "c:/Program Files/Microsoft Visual
Studio/VB98/vb6.exe")

(autoload 'vbp-mode "vbp-mode" "VBP mode." t)
(setq auto-mode-alist (append '(("\\.vbp$" . vbp-mode)) auto-mode-alist))

(autoload 'sgml-mode "psgml" "Major mode to edit SMGL files." t)
(autoload 'xml-mode  "psgml" "Major mode to edit XML files." t)
(autoload 'html-helper-mode "html-helper-mode" "Yay HTML" t)

(setq auto-mode-alist (cons '("\\.html$" . html-helper-mode)
auto-mode-alist))
(setq auto-mode-alist (cons '("\\.htm$" . html-helper-mode)
auto-mode-alist))
;(setq auto-mode-alist (cons '("\\.asp$" . html-helper-mode)
auto-mode-alist))
(setq auto-mode-alist (cons '("\\.asa$" . html-helper-mode)
auto-mode-alist))
(setq auto-mode-alist (cons '("\\.jsp$" . html-helper-mode)
auto-mode-alist))
(setq auto-mode-alist (cons '("\\.phtml$" . html-helper-mode)
auto-mode-alist))
(setq sgml-set-face t)

(setq tempo-insert-string-functions (list 'upcase))

;;--------------------------------------------------------------------------
---;
;; in sgml documents, parse dtd immediately to allow immediate syntax
coloring
;;--------------------------------------------------------------------------
---;
;(setq sgml-auto-activate-dtd t)

;;--------------------------------------------------------------------------
---;
;; here we set the syntax color information for psgml
;;--------------------------------------------------------------------------
---;
(setq-default sgml-set-face t)

;;--------------------------------------------------------------------------
---;
;; Faces.
;;--------------------------------------------------------------------------
---;
(make-face 'sgml-comment-face)
(make-face 'sgml-doctype-face)
(make-face 'sgml-end-tag-face)
(make-face 'sgml-entity-face)
(make-face 'sgml-ignored-face)
(make-face 'sgml-ms-end-face)
(make-face 'sgml-ms-start-face)
(make-face 'sgml-pi-face)
(make-face 'sgml-sgml-face)
(make-face 'sgml-short-ref-face)
(make-face 'sgml-start-tag-face)

(set-face-foreground 'sgml-comment-face "dark magenta")
(set-face-foreground 'sgml-doctype-face "red")
(set-face-foreground 'sgml-end-tag-face "blue")
(set-face-foreground 'sgml-entity-face "magenta")
(set-face-foreground 'sgml-ignored-face "gray40")
(set-face-background 'sgml-ignored-face "gray60")
(set-face-foreground 'sgml-ms-end-face "green")
(set-face-foreground 'sgml-ms-start-face "yellow")
(set-face-foreground 'sgml-pi-face "lime green")
(set-face-foreground 'sgml-sgml-face "brown")
(set-face-foreground 'sgml-short-ref-face "deep sky blue")
(set-face-foreground 'sgml-start-tag-face "dark green")

(setq-default sgml-markup-faces
'((comment . sgml-comment-face)
 (doctype . sgml-doctype-face)
 (end-tag . sgml-end-tag-face)
 (entity . sgml-entity-face)
 (ignored . sgml-ignored-face)
 (ms-end . sgml-ms-end-face)
 (ms-start . sgml-ms-start-face)
 (pi . sgml-pi-face)
 (sgml . sgml-sgml-face)
 (short-ref . sgml-short-ref-face)
 (start-tag . sgml-start-tag-face)))

;;--------------------------------------------------------------------------
---;
;; SECTION: Load Other Packages
;
;;--------------------------------------------------------------------------
---;

(setq load-path (cons "u:/home/jrancier/usr/pkg/emacs-20.7/site-lisp"
load-path))
(setq load-path (cons "u:/home/jrancier/usr/pkg/emacs-20.7/site-lisp/other"
load-path))
(setq load-path (cons
"u:/home/jrancier/usr/pkg/emacs-20.7/site-lisp/softech" load-path))
(setq load-path (cons
"u:/home/jrancier/usr/pkg/emacs-20.7/site-lisp/elib-1.0" load-path))
(setq load-path (cons
"u:/home/jrancier/usr/pkg/emacs-20.7/site-lisp/eieio-0.15" load-path))
(setq load-path (cons
"u:/home/jrancier/usr/pkg/emacs-20.7/site-lisp/speedbar-0.13a" load-path))
(setq load-path (cons
"u:/home/jrancier/usr/pkg/emacs-20.7/site-lisp/semantic-1.3.2" load-path))
(setq load-path (cons
"u:/home/jrancier/usr/pkg/emacs-20.7/site-lisp/jde-2.2.6/lisp" load-path))
(setq load-path (cons
"u:/home/jrancier/usr/pkg/emacs-20.7/site-lisp/ps-print" load-path))
(setq load-path (cons
"u:/home/jrancier/usr/pkg/emacs-20.7/site-lisp/psgml-1.2.1" load-path))
(setq load-path (cons
"u:/home/jrancier/usr/pkg/emacs-20.7/site-lisp/pcl-cvs-2.9.9" load-path))
(setq load-path (cons
"u:/home/jrancier/usr/pkg/emacs-20.7/site-lisp/jtelnet-1.0" load-path))


(load-library "gnuserv")

(load "speedbar")
(load "bs")
(load "crypt")
(load "expand")
(load "softech")
(load "softech-cstyle")
(load "softech-c++style")
(load "calendar")
(load "w32-faq")
(load "ls-lisp")
(load "htmlize")
(load "pcl-cvs-startup" )

(require 'tinysword)
(require 'font-lock)
(require 'semantic)
(require 'jde)
(require 'jsee)
(require 'jmaker)
(require 'jjar)
(require 'imenu)
(require 'generic-x)
(require 'misc)
(require 'font-menus)
(require 'tmmofl)
(require 'auto-show)
(require 'pager)
(require 'backups)
(require 'eol-conversion)
(require 'gnuserv)
(require 'ishl)
(require 'recentf)
(require 'setnu)
(require 'power-macros)

(load power-macros-file)
(recentf-mode 1)

(setq gnuserv-frame (selected-frame))
(ishl-mode 1)
(setq-default ishl-cleanup nil)

(cond ((fboundp 'global-font-lock-mode)
 (require 'extra-java-font-lock)
 (setq font-lock-maximum-decoration t)
 (global-font-lock-mode t)
))

(setq bs-dont-show-regexp "^INBOX\\|^.bbdb$")
(setq bs-buffer-sort-function 'bs--sort-by-mode)
(setq-default auto-show-mode t)
(auto-show-mode 1)
(setq imenu-sort-function (quote imenu--sort-by-name))
(setq backup-directory "~/backups")
(move-backups t)

(global-set-key "\C-v"         'pager-page-down)
(global-set-key [next]         'pager-page-down)
(global-set-key "\ev"          'pager-page-up)
(global-set-key [prior]        'pager-page-up)
(global-set-key '[M-up]        'pager-row-up)
(global-set-key '[M-kp-8]      'pager-row-up)
(global-set-key '[M-down]      'pager-row-down)
(global-set-key '[M-kp-2]      'pager-row-down)
(global-set-key [C-up]         'pager-row-up)
(global-set-key [C-down]       'pager-row-down)

;;--------------------------------------------------------------------------
---;
;; Setup special printing.
;
;;--------------------------------------------------------------------------
---;
(setq ps-postscript-code-directory "~/lisp/ps-print/")

(setq lpr-command "lpr"
      lpr-destination '("-S document -P document")
      ps-lpr-destination '("-S document -P document"))

(setq ps-psnup-command "u:/home/jrancier/bin/psnup.exe")
(setq ps-paper-type 'a4small)

;; Uncomment the following line to enable line numbers to be printed.
(setq ps-line-number t)

(load "print-NT"() t)

;;--------------------------------------------------------------------------
---;
;; Define Brief like home and end keys functionality.
;
;;--------------------------------------------------------------------------
---;

;; This remaps Ctrl-t from transpose characters to move the line with the
point
;; to the top of the view, with the point on the beginning of the line.

(global-set-key [?\C-t] (lambda()
                         (interactive)
                         (recenter 0)
                         (beginning-of-line)
))

(global-set-key [C-end] (lambda()
                         (interactive)
                         (goto-char(point-max))
                         (end-of-line)
))

(global-set-key [C-home] (lambda()
                         (interactive)
                         (goto-char(point-min))
                         (beginning-of-line)
))

(defvar jbr-home-count 0
  "Number of times home key has been pressed")

(make-variable-buffer-local 'jbr-home-count)

(defun jbr-home-fun ()
  "Go to beginning of current line, top of this window, or top of the
buffer."
  (interactive)
  (setq jbr-home-count
        (if (eq last-command 'jbr-home-fun)
            (1+ jbr-home-count)
          0))
  (cond ((eq jbr-home-count 0) (beginning-of-line))
        ((eq jbr-home-count 1) (goto-char (window-start)))
        (t (goto-char (point-min)))))

(global-set-key [home] 'jbr-home-fun)

(defvar jbr-end-count 0
  "Number of times end key has been pressed")

(make-variable-buffer-local 'jbr-end-count)

(defun jbr-end-fun ()
  "Go to end of current line, bottom of this window, or bottom of the
buffer."
  (interactive)
  (setq jbr-end-count
        (if (eq last-command 'jbr-end-fun)
            (1+ jbr-end-count)
          0))
  (cond ((eq jbr-end-count 0) (end-of-line))
        ((eq jbr-end-count 1) (goto-char (-(window-end)1)))
        (t (goto-char (point-max)))))

(global-set-key [end] 'jbr-end-fun)

(defun next-function-name-face ()
  "Point to next `font-lock-function-name-face' text."
  (interactive)
  (let ((pos (point)))
    (if (eq (get-text-property pos 'face) 'font-lock-function-name-face)
      (setq pos (or (next-property-change pos) (point-max))))
    (setq pos (text-property-any pos (point-max) 'face
'font-lock-function-name-face))
    (if pos
        (goto-char pos)
      (progn
        (goto-char (point-max))
        (message "End of buffer")))))

(defun prev-function-name-face ()
  "Point to previous `font-lock-function-name-face' text."
  (interactive)
  (let ((pos (point)))
    (if (eq (get-text-property pos 'face) 'font-lock-function-name-face)
      (setq pos (or (previous-property-change pos) (point-min))))
    (setq pos (previous-property-change pos))
    (while (and pos (not (eq (get-text-property pos 'face)
'font-lock-function-name-face)))
      (setq pos (previous-property-change pos)))
    (if pos
        (progn
          (setq pos (previous-property-change pos))
          (goto-char (or (and pos (1+ pos)) (point-min))))
      (progn
        (goto-char (point-min))
        (message "Beginning of buffer")))))

(global-set-key [(meta f2)] 'prev-function-name-face)
(global-set-key [(meta f1)] 'next-function-name-face)

(defun joc-bounce-sexp ()
  "Will bounce between matching parens "[{(<" && ">)}]" just like % in vi"
  (interactive)
  (let ((prev-char (char-to-string (preceding-char)))
         (next-char (char-to-string (following-char)))
         )
    (cond ((string-match "[[{(<]" next-char) (forward-sexp 1))
           ((string-match "[]})>]" prev-char) (backward-sexp 1))
           (t (error "%s" "Not on a paren, brace, or bracket"))
           )
    )
  )
; ----- bounce back & forth between matching parens, braces or
brackets -----
(global-set-key [(control %)] 'joc-bounce-sexp)

;; duplicate current line
(defun ewd-dup-line()
  "Copy the current line and insert copy as the following line."
  (interactive)
  (save-excursion
    (forward-line 1)
    (copy-from-above-command)
    (insert "\n")))

;; move to the beginning of buffer without clobbering the mark
(defun ewd-beginning-of-buffer-nomark ()
  "Move point to the beginning of the current buffer
without clobbering the mark."
  (interactive)
  (goto-char (point-min)))

;; move to the end of buffer without clobbering the mark
(defun ewd-end-of-buffer-nomark ()
 "Move point to the end of the current buffer without
clobbering the mark."
  (interactive)
  (goto-char (point-max)))

;; insert recently yanked text.
(defun jbr-insert()
  "Nothing."
  (interactive)
  (save-excursion
  (yank)
  (insert "\n")))

;; delete current line
(defun jbr-del-current-line()
  "Delete current line."
  (interactive)
  (save-excursion
  (beginning-of-line)
  (let ((beg (point))) (end-of-line) (forward-char 1) (kill-region beg
(point)))))

(defun jbr-copy-current-line()
  "Copy current line."
  (interactive)
  (save-excursion
  (beginning-of-line)
  (let ((beg (point))) (end-of-line) (copy-region-as-kill beg (point)))))

(defun jbr-jde-bug-kill-debugger()
"Exit the debugger and kill all dead process buffers."
  (interactive)
  (progn
    (jde-bug-exit)
    (jde-bug-remove-dead-processes)
    (delete-other-windows)))

(defun my-java-hook ()
  "My local settings for Java"
  (c-set-style "java")
  (c-set-offset 'substatement-open 0)
  )
(setq java-mode-hook 'my-java-hook)

;; Posted to comp.emacs by
;; Kevin Rodgers <kevinr@ihs.com>          Lead Software Engineer
;;
(defvar line-number-total nil
  "The total number of lines in this buffer.")
(make-variable-buffer-local 'line-number-total)

(defun set-line-number-total (&optional buffer)
  "Set line-number-total to the total number of lines in this buffer."
  (save-excursion
    (set-buffer (or buffer (current-buffer)))
    (setq line-number-total
          (let ((lines (count-lines (point-min) (point-max)))
                (last-char (char-after (1- (point-max)))))
            (format "%d" (if (or (null last-char)
                                 (equal last-char ?\n))
                             (1+ lines)
                           lines))))))

(defadvice display-buffer (after set-line-number-total activate)
  (set-line-number-total (ad-get-arg 0))) ; BUFFER

(defun initialize-line-number-total (buffer)
  (or line-number-total
      (set-line-number-total buffer)))

(defadvice get-buffer-create (after set-line-number-total activate)
  (initialize-line-number-total (get-buffer (ad-get-arg 0)))) ; BUFFER

(let* ((line-number-mode-format
        (assq 'line-number-mode
              (setq-default mode-line-format
                            (copy-alist (default-value
'mode-line-format)))))
       (format (car (cdr line-number-mode-format)))
       (percent-l (string-match "%l" format)))
  (setcdr line-number-mode-format
          (list (list (substring format 0 (+ percent-l 2))
                      (list 'line-number-total
                            (list "/" 'line-number-total))
                      (substring format (+ percent-l 2))))))

(add-hook 'post-command-hook 'set-line-number-total)

(provide 'line-number)

;; hide-show for all programming modes
;; when it is loaded look at the Hide/Show Menu.
(load-library "hideshow")
(add-hook 'c++-mode-hook 'hs-minor-mode)
(add-hook 'c-mode-hook 'hs-minor-mode)
(add-hook 'cperl-mode-hook 'hs-minor-mode)
(add-hook 'jde-mode-hook 'hs-minor-mode)

;(add-hook 'jde-mode-hook 'speedbar-frame-mode)
;;--------------------------------------------------------------------------
---;
;; SECTION: Key Bindings
;
;;--------------------------------------------------------------------------
---;

(setq w32-lwindow-modifier nil)
(setq w32-pass-lwindow-to-system nil)
(setq w32-rwindow-modifier nil)
(setq w32-pass-rwindow-to-system nil)
(setq w32-apps-modifier nil)
(setq w32-pass-apps-to-system nil)

(global-set-key   [(lwindow)]      'bs-show)
(global-set-key   [(rwindow)]      'delete-other-windows)
(global-set-key   [(apps)]         'other-window)

(global-set-key [M-f4] 'save-buffers-kill-emacs)
(global-set-key [M-f5] 'query-replace-regexp)
(global-set-key [M-C-f1] 'browse-url-at-point)

(global-set-key [(kp-multiply)]      'undo)
(global-set-key [(shift insert)]     'overwrite-mode)
(global-set-key [(insert)]           'jbr-insert)
(global-set-key [(kp-add)]           'jbr-copy-current-line)
(global-set-key [(kp-subtract)]      'jbr-del-current-line)
(global-set-key   [(control z)]           'shell)
(global-set-key   [(control backspace)]   'backward-kill-word)
(global-set-key   [(control return)]      (lambda ()
                                            (interactive)
                                            (end-of-line)
                                            (newline)))

(define-key esc-map "["                 'bs-cycle-previous)
(define-key esc-map "]"                 'bs-cycle-next)

(define-key ctl-x-map  "b"              'buffer-menu)
(define-key ctl-x-map  "d"              'dired)
(define-key ctl-x-map  "f"              'find-file)
(define-key ctl-x-map  "t"              'transpose-chars)
(define-key ctl-x-map  "\C-d"           'dired)
(define-key ctl-x-map  "\C-b"           'bs-show)

(global-set-key [f4]                   'speedbar)
(global-set-key [f5]                   'imenu)
(global-set-key [C-f5]                 'upcase-region)
(global-set-key [C-f6]                 'downcase-region)
(global-set-key [f6]                   'jde-bug-step-over)
(global-set-key [f7]                   'jde-bug-step-into)
(global-set-key [f8]                   'jde-bug-step-out)
(global-set-key [f11]                  'jbr-jde-bug-kill-debugger)
(global-set-key [f12]                  'calendar)

(global-set-key [(meta f11)]           'jde-browse-class)
(global-set-key [(meta f10)]           'compile)

;;--------------------------------------------------------------------------
---;
;; Custom map <Meta-o>
;
;;--------------------------------------------------------------------------
---;
(message "keybindings-custom map")

(setq softech-map  (make-keymap))

(define-key global-map "\C-o"           softech-map)
(define-key softech-map "."             'expand-jump-to-next-mark)
(define-key softech-map "["             (lambda ()
                                          (interactive)
                                          (c-beginning-of-defun 1)
                                          (previous-line 1)
                                        ))

(define-key softech-map "]"             'c-end-of-defun)
(define-key softech-map "a"             'ffap)
(define-key softech-map "d"
'softech-insert-comment-user-datestamp)
(define-key softech-map "e"             'dabbrev-expand)
(define-key softech-map "f"             'softech-document-function)
(define-key softech-map "j"             'jdok-generate-javadoc-template)
(define-key softech-map "g"             'goto-line)
(define-key softech-map "h"             'softech-new-header)
(define-key softech-map "i"             'indent-region)
(define-key softech-map "l"             'softech-comment-line)
(define-key softech-map "m"             'softech-modification-line)
(define-key softech-map "n"             'next-error)
(define-key softech-map "c"             'find-tag)
(define-key softech-map "r"             'pop-tag-mark)

(define-key softech-map "p"             (lambda ()
                                         (interactive)
                                         (next-error -1)
                                        ))

(define-key softech-map "t"             (lambda (list)
                                          "Creates TAGS list."
                                          (interactive "sTags from files: ")
                                          (shell-command (concat "ectags -e
" list))
                                        ))

(define-key softech-map "w"             'softech-which-function)
(define-key softech-map "D"             'softech-insert-user-datestamp)
(define-key softech-map "F"             'c-indent-defun)
(define-key softech-map "L"             'softech-uncomment-line)
(define-key softech-map "N"             'setnu-mode)

;;--------------------------------------------------------------------------
---;
;; Override special-mode-keymaps
;
;;--------------------------------------------------------------------------
---;
(message "override special mode keymaps")

;;--------------------------------------------------------------------------
---;
;; Apropos
;
;;--------------------------------------------------------------------------
---;
(defun my-apropos-mode-hook ()
  (define-key apropos-mode-map '[return]       'apropos-follow)
)
(add-hook 'apropos-mode-hook 'my-apropos-mode-hook)


(fset 'yes-or-no-p 'y-or-n-p)
(define-key query-replace-map [return] 'act)
(define-key query-replace-map [?\C-m] 'act)

;;--------------------------------------------------------------------------
--;
;; Minibuffer
;
;;--------------------------------------------------------------------------
--;
(define-key minibuffer-local-map [(control p)]  'previous-history-element)
(define-key minibuffer-local-map [(control n)]  'next-history-element)

;;--------------------------------------------------------------------------
--;
;; Override the syntax coloring defaults
;
;;--------------------------------------------------------------------------
--;
(message "setting up syntax coloring")

(custom-set-faces
 '(font-lock-comment-face ((t (:bold nil :italic t :foreground
"darkmagenta"))))
 '(font-lock-reference-face ((t (:bold t :foreground "darkviolet"))))
 '(font-lock-string-face ((t (:foreground "red"))))
 '(calendar-today-face ((t (:inverse-video t))))
 '(font-lock-keyword-face ((t (:bold t :foreground "black"))))
 '(font-lock-warning-face ((t (:bold t :foreground "white" :background
"red"))))
 '(speedbar-highlight-face ((((class color) (background light)) (:background
"cornflowerblue"))))
 '(font-lock-preprocessor-face ((t (:foreground "black" :background
"white"))))
 '(font-lock-type-face ((t (:foreground "blue"))))
 '(font-lock-variable-name-face ((t nil)))
 '(font-lock-doc-string-face ((t (:foreground "black"))))
 '(font-lock-function-name-face ((t (:underline : t foreground "black"))))
 '(font-lock-builtin-face ((t (:foreground "darkorchid")))))

;;--------------------------------------------------------------------------
--;
;; compare windows
;
;;--------------------------------------------------------------------------
--;
(global-set-key "\C-cw" 'compare-windows)

;;--------------------------------------------------------------------------
--;
;; occur
;
;;--------------------------------------------------------------------------
--;
(global-set-key "\C-co" 'occur)

;;--------------------------------------------------------------------------
--;
;; set highlighting colors for isearch and drag
;
;;--------------------------------------------------------------------------
--;
(set-face-foreground 'highlight "black")
(set-face-background 'highlight "yellow")
(set-face-background 'region   "yellow")
(set-face-background 'secondary-selection "lightskyblue1")

(define-key minibuffer-local-isearch-map [up]
'isearch-ring-retreat-edit)
(define-key isearch-mode-map [up]                     'isearch-ring-retreat)
(define-key minibuffer-local-isearch-map [down]
'isearch-ring-advance-edit)
(define-key isearch-mode-map [down]                   'isearch-ring-advance)

(global-set-key [?\M-s] 'search-word)
(global-set-key [?\M-r] '(lambda () (interactive) (search-word 1)))

;;--------------------------------------------------------------------------
--;
;; automatically resize the minibuffer as needed
;
;;--------------------------------------------------------------------------
--;
(resize-minibuffer-mode 1)
(setq resize-minibuffer-mode t)

;;--------------------------------------------------------------------------
--;
;; turn on highlighting for searches
;
;;--------------------------------------------------------------------------
--;
(setq search-highlight t)

;;--------------------------------------------------------------------------
--;
;; setup default/initial frames attributes, from Paul Kinnucan.
;
;; Type:
;
;; (w32-select-font) C-j RET
;
;; To view the fonts
;
;;--------------------------------------------------------------------------
--;
(setq default-frame-alist
      '((top . 0) (left . 375)(width . 94) (height . 52)
        (cursor-color . "Red")
        (foreground-color . "black")(background-color . "ivory")
        (font . "-*-Andale Mono-normal-r-*-*-13-97-96-96-c-*-iso8859-1" )))

(setq initial-frame-alist
      '((top . 0)(left . 375)(width . 94)(height . 52)
        (cursor-color . "Red")
        (foreground-color . "black")(background-color . "ivory")
        (font . "-*-Andale Mono-normal-r-*-*-13-97-96-96-c-*-iso8859-1" )))

(set-face-background 'modeline "navy")
(set-face-foreground 'modeline "gold")

(set-face-font 'italic "-*-Andale
Mono-normal-r-*-*-13-97-96-96-c-*-iso8859-1")
(set-face-font 'bold   "-*-Andale
Mono-normal-r-*-*-13-97-96-96-c-*-iso8859-1")
(set-face-font 'bold-italic "-*-Andale
Mono-normal-r-*-*-13-97-96-96-c-*-iso8859-1")

(setq frame-title-format
            '(multiple-frames "%b"
                  (""  invocation-name "@" system-name
                   ": %f")))

(setq-default icon-title-format
              (list '((buffer-file-name " %f"
                       (dired-directory
                        dired-directory
                        (revert-buffer-function " %b"
                        ("%b - Dir:  " default-directory)))))))

(setq w32-enable-italics t)

(defun joc-set-cursor-type( cursor &optional FRAME)
   "Set the cursor-type for the named frame."
   (interactive)
   (if (not FRAME)
           (setq FRAME (selected-frame)))

   ;; Do the modification.
   (modify-frame-parameters FRAME
                            (list (cons 'cursor-type cursor))))

(defun joc-cursor-type-set-hook ()
   "Set the cursor-type according to the insertion mode"
   (if overwrite-mode
           (joc-set-cursor-type 'block)
         (joc-set-cursor-type 'bar)))

;; Setup the cursor type hook.
(add-hook 'post-command-hook 'joc-cursor-type-set-hook)

;;;; -----------------------------------------------------------------------
-
;;;; --- make cursor blink when idle
;;;; -----------------------------------------------------------------------
-

(require 'blinking-cursor)
(setq blinking-cursor-colors ["red" "blue"])
(setq blinking-cursor-blink-frequency 3)
(blinking-cursor-mode 1)

;(require 'w32-cursor)
;(w32-cursor-mode 1)

(defun insert-date-time()
  (interactive)
  (insert (format-time-string "%Y-%m-%dT%T%z" (current-time))))

(global-set-key "\M-t" 'insert-date-time)

;;;======================================================================
;;; shellex
;;;======================================================================
;;; load the shellex package, which allows emacs to launch associated
;;; apps. Use the "j" key to launch the associated app. This also
;;; associates html files within VM and Gnus to launch the associated
;;; browser!
;;;======================================================================

;;; disable the default dired behavior of w32-shellex
(setq w32-shellex-no-dired-hook t)

(require 'w32-shellex)

;;; point to the shellex.exe app to avoid having to put it in the path
(setq w32-shellex-execute-helper "u:/home/jrancier/bin/shellex.exe")

;;; map the "j" key within dired to launch the associated app
(eval-after-load "dired"
  '(define-key dired-mode-map "j" 'w32-shellex-dired-on-objects)
  )


(add-hook 'dired-load-hook
          (lambda () (require 'dired-sort-menu)))

(defun dired-open-in-current-buffer ()
  "Open the currently selected file / directory in
the same buffer as this one."
  (interactive)
  (find-alternate-file (dired-get-filename)))

(defun dired-open-directory-in-current-buffer ()
  (interactive)
  (let ((name (dired-get-filename)))
    (save-excursion
      ;; See if the selection is a directory or not.
      (end-of-line)
      (let ((eol (point)))
     (beginning-of-line)
     (if (re-search-forward "^  d" eol t)
         (find-alternate-file name) ;; Open directory in this buffer
       (find-file name))))))  ;; Open file in new buffer.

(eval-after-load "dired"
  '(define-key dired-mode-map "\C-m"
'dired-open-directory-in-current-buffer)
)

(require 'jtelnet)

(setq jtelnet-java-path "t:/pkg/jdk1.3.0/bin/java.exe")
(setq jtelnet-class-arg "-classpath")
(setq jtelnet-class-path "h:/classlib;")

(global-set-key "\C-\M-t" 'telnet)

(standard-display-ascii ?\r "")

(autoload 'calculator "calculator" "Run the Emacs calculator." t)

;---------------------------------------------------------------------------
--;
;; SECTION: Custom Variables
;
;;--------------------------------------------------------------------------
---;
(message "Setting Custom Variable")

(custom-set-variables
 '(html-helper-mode-global-JSP-not-ASP nil nil (html-helper-mode))
 '(case-fold-search t)
 '(view-calendar-holidays-initially nil)
 '(display-time-day-and-date t)
 '(recentf-max-menu-items 20)
 '(explicit-csh-args nil)
 '(ange-ftp-auto-save 0)
 '(jde-compile-option-debug (quote ("all" (t t t))))
 '(transient-mark-mode t)
 '(explicit-shell-file-name "u:/home/jrancier/usr/pkg/4nt300/4nt.exe")
 '(speedbar-visiting-tag-hook (quote (speedbar-highlight-one-tag-line
speedbar-recenter-to-top)))
 '(compilation-scroll-output t)
 '(mark-holidays-in-calendar t)
 '(browse-url-new-window-p t)
 '(desktop-files-not-to-save "^---save-all-files---$")
 '(archive-zip-update (quote ("pkzip25" "-extr=up")))
 '(calendar-today-marker (quote calendar-today-face))
 '(all-islamic-calendar-holidays t)
 '(imenu-always-use-completion-buffer-p (quote never))
 '(max-specpdl-size 10000)
 '(browse-url-netscape-program
"c:/progra~1/netscape/communicator/program/netscape.exe -browser")
 '(speedbar-use-imenu-flag t)
 '(ange-ftp-nslookup-program "nslookup")
 '(imenu-sort-function nil)
 '(browse-url-netscape-version 4.72)
 '(jde-gen-k&r nil)
 '(version-control t)
 '(jde-compile-option-deprecation t)
 '(search-upper-case (quote not-yanks))
 '(jde-bug-jdk-directory "t:/pkg/jdk1.3.0/bin")
 '(speedbar-sort-tags t)
 '(jde-db-source-directories (quote ("./"
"u:/home/jrancier/usr/pkg/jdk1.3-src/src/share/classes")))
 '(ange-ftp-default-user "jrancier")
 '(ange-ftp-dumb-unix-host-regexp "4690-1")
 '(special-display-frame-alist (quote ((height . 35) (width . 85)
(unsplittable . t))))
 '(html-helper-mode-uses-bold-italic t nil (html-helper-mode))
 '(archive-zip-extract (quote ("pkzip25" "-extract")))
 '(all-christian-calendar-holidays t)
 '(speedbar-frame-parameters (quote ((minibuffer) (width . 44) (border-width
. 0) (menu-bar-lines . 0) (unsplittable . t))))
 '(jde-db-debugger (quote ("JDEbug" "jdb" . "Executable")))
 '(jde-compile-option-verbose-path t)
 '(recentf-max-saved-items 20)
 '(save-place t)
 '(ps-n-up-border-p t)
 '(jde-global-classpath (quote ("./" "t:/pkg/jdk1.3.0/lib/")))
 '(column-number-mode t)
 '(archive-zip-update-case (quote ("pkzip25" "-extr=up")))
 '(speedbar-verbosity-level 2)
 '(jde-enable-abbrev-mode t)
 '(ange-ftp-default-password "1adventure")
 '(html-helper-mode-uses-KG-style nil nil (html-helper-mode))
 '(special-display-buffer-names (quote ("*buffer-selection*"
"*compilation*")))
 '(view-diary-entries-initially t)
 '(display-time-24hr-format t)
 '(jde-bug-vm-includes-jpda-p t)
 '(power-macros-file "h:/HOME/JRANCIER/.emacs")
 '(jde-compile-option-verbose t)
 '(all-hebrew-calendar-holidays t)
 '(jde-mode-abbreviations (quote (("ab" . "abstract") ("bo" . "boolean")
("br" . "break") ("by" . "byte") ("byv" . "byvalue") ("cas" . "cast") ("ca"
. "catch") ("ch" . "char") ("cl" . "class") ("co" . "const") ("con" .
"continue") ("de" . "default") ("dou" . "double") ("el" . "else") ("ex" .
"extends") ("fa" . "false") ("fi" . "final") ("fin" . "finally") ("fl" .
"float") ("fo" . "for") ("fu" . "future") ("ge" . "generic") ("go" . "goto")
("impl" . "implements") ("impo" . "import") ("ins" . "instanceof") ("in" .
"int") ("inte" . "interface") ("lo" . "long") ("na" . "native") ("ne" .
"new") ("nu" . "null") ("pa" . "package") ("pri" . "private") ("pro" .
"protected") ("pu" . "public") ("re" . "return") ("sh" . "short") ("st" .
"static") ("su" . "super") ("sw" . "switch") ("sy" . "synchronized") ("th" .
"this") ("thr" . "throw") ("throw" . "throws") ("tra" . "transient") ("tr" .
"true") ("vo" . "void") ("vol" . "volatile") ("wh" . "while") ("so" .
"SofTechnics, Inc."))))
 '(jde-run-classic-mode-vm t)
 '(enable-local-variables nil)
 '(desktop-enable t nil (desktop)))
(message "Setting Custom Variables - Done")


(load "desktop")
(setq desktop-basefilename "emacs.dsk")
(desktop-load-default)
(desktop-read)
(setq desktop-missing-file-warning nil)

(gnuserv-start)
(put 'upcase-region 'disabled nil)
(put 'downcase-region 'disabled nil)

(require 'color-theme)
;(color-theme-billw)
;(color-theme-simple-1)
;(color-theme-blue-sea)
;(color-theme-goldenrod)
;(color-theme-jsc-light)
;(color-theme-jsc-dark)
;(color-theme-fischmeister)
;(color-theme-gnome)
;(color-theme-gnome2)
;(color-theme-greiner)
;(color-theme-high-contrast)
;(color-theme-jb-simple)
;(color-theme-jonadabian)
;(color-theme-marquardt)
;(color-theme-parus)
;(color-theme-pierson)
;(color-theme-ramangalahy)
;(color-theme-raspopovic)
;(color-theme-retro-green)
;(color-theme-retro-orange)
;(color-theme-rotor)
;(color-theme-ryerson)
;(color-theme-sitaramv-nt)
;(color-theme-sitaramv-solaris)
;(color-theme-standard)
;(color-theme-subtle-hacker)
;(color-theme-taylor)
;(color-theme-wheat)
;(color-theme-pok-wob)
;(color-theme-pok-wog)
;(color-theme-xemacs)


;;--------------------------------------------------------------------------
--;
;; END OF FILE:~/.emacs
;
;;--------------------------------------------------------------------------
--;




Attachment: power-macros.el
Description: Binary data


reply via email to

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