--- a/.emacs-my Sun Oct 16 01:14:02 2011 +0300
+++ b/.emacs-my Sun Nov 20 20:14:17 2011 +0200
@@ -12,6 +12,10 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(message "recentf")
+(setq recentf-save-file "~/.recentf")
+(when (eq system-type 'cygwin)
+ (setq recentf-save-file "~/.recentf-cygwin")
+ )
(require 'recentf)
;; Prevent TRAMP to login on remote host when loading.
;; Its take time and ask passwords!
@@ -33,23 +37,33 @@
;; Shut off message buffer by setting nil.
(setq message-log-max 512)
-;; Set the debug option to enable a backtrace when a problem occurs.
-(setq debug-on-error nil) ; t/nil
-(setq debug-on-signal nil)
-
-;; Get trace when press C-g.
-(setq debug-on-quit nil) ; t/nil
-
;; Prevent Emacs from loading 'default.el', which loaded after '.emacs'.
;; Also '-q' prevent loading your init file.
(setq inhibit-default-init nil) ; t/nil
+(defun my-debug (mode)
+ "With prefix enable debug backtrace when problems occur else disable."
+ (interactive "P")
+ (when mode
+ ;; (setq debug-on-signal t)
+ (setq mode t))
+ (setq debug-on-error mode)
+ ;; Get trace when press C-g.
+ (setq debug-on-quit mode)
+ )
+
+(my-debug nil)
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(message "user info")
-(setq user-full-name "Oleksandr Gavenko")
-(setq user-mail-address "gavenkoa@gmail.com")
-(setq user-nick "gavenkoa")
+;; Set following in ~/.emacs-auth:
+;; (setq user-full-name "Oleksandr Gavenko")
+;; (setq user-mail-address "gavenkoa@gmail.com")
+;; (setq user-nick "gavenkoa")
+
+(unless (and (boundp 'user-nick) (stringp user-nick))
+ (setq user-nick (user-login-name)) )
(setenv "ORGANIZATION" (concat user-full-name " <" user-mail-address ">"))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -129,6 +143,7 @@
nsis-mode
bat-generic-mode
html-mode
+ LilyPond-mode
)
"List of development modes.")
@@ -266,7 +281,7 @@
;; (setq inhibit-splash-screen t) ; nonexist on 21.4.1
(setq inhibit-startup-message t)
-;; ----------------------------------------------------------------
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(message "shell, bash, Cygwin, MSYS")
(defvar my-use-windows-shell nil
@@ -307,7 +322,7 @@
(require 'cygwin-mount)
(cygwin-mount-activate)
)
- (add-hook 'find-file-hooks 'follow-cygwin-symlink)
+ (add-hook 'find-file-hook 'follow-cygwin-symlink)
;; Workaround for Cygwin shell, when set 'CYGWIN=noglob'. By default 'shell-quote-argument'
;; quoted by double '\' chars this cause failure.
(defun shell-quote-argument (argument)
@@ -321,6 +336,24 @@
(modify-coding-system-alist 'process "bash" '(cp1251-unix . cp1251-unix))
)
+(when (eq window-system 'w32)
+ ;; Fix 'starttls.el' on native Windows Emacs with gnutls-cli from Cygwin.
+ ;; 'gnutls-cli' run with '-s' opt and process wait for SIGALRM.
+ ;; But build-in native Emacs 'kill' command can not send such Cygwin
+ ;; specific sygnal. So 'starttls-negotiate-gnutls' function infinitely
+ ;; wait for 'gnutls-cli' output.
+ (defadvice signal-process (around cygwin (process sigcode))
+ "Use 'kill.exe' instead build-in Emacs 'kill'."
+ (if (eq sigcode 'SIGALRM)
+ (shell-command
+ (format "kill.exe -s SIGALRM %d"
+ (if (processp process) (process-id process) process)))
+ ad-do-it
+ ))
+ (ad-activate 'signal-process)
+ (modify-coding-system-alist 'process "gnutls-cli" '(binary . binary))
+ )
+
(ansi-color-for-comint-mode-on)
(setq explicit-bash-args '("-i"))
@@ -345,13 +378,9 @@
(add-hook 'text-mode-hook (lambda () (setq require-final-newline nil)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(message "gnu serv, server")
+(message "server")
-;; (load "~/emacs/bin/gnuserv/gnuserv.el")
-;; (require 'gnuserv)
-;; (setq gnuserv-frame (selected-frame))
-
-(when (>= emacs-major-version 22)
+(when (and (>= emacs-major-version 22) (not (eq system-type 'cygwin)))
(require 'server)
(when (and (= emacs-major-version 23) (>= emacs-minor-version 1) (<= emacs-minor-version 2) (equal window-system 'w32))
(defun server-ensure-safe-dir (dir) "Noop" t)) ; Suppress error directory ~/.emacs.d/server is unsafe on windows.
@@ -452,8 +481,11 @@
(defvar my-scroll-margin 4)
(setq-default
- scroll-step 1
- scroll-conservatively my-scroll-margin
+ ;; Set to zero as this recomment documentation.
+ scroll-step 0
+ ;; If the value is greater than 100, redisplay will never recenter point, but
+ ;; will always scroll just enough text to bring point into view
+ scroll-conservatively 1000
scroll-preserve-screen-position t
)
@@ -464,6 +496,20 @@
(append my-text-mode-hook-list my-devel-mode-hook-list my-scroll-margin-mode-hook-list) )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(message "chars, unicode")
+
+(defun my-print-unicode (&optional start end)
+ "Print UNICODE table."
+ (interactive "nstart: \nnend: ")
+ (switch-to-buffer (get-buffer-create "*UNICODE*"))
+ (erase-buffer)
+ (let ( (i start) )
+ (while (<= i end)
+ (insert (format "%s: U+%04x, %s\n" (char-to-string i) i (get-char-code-property i 'name)))
+ (setq i (1+ i))
+ )))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(message "search, isearch, occur")
(setq case-fold-search t)
@@ -475,7 +521,6 @@
(when (< emacs-major-version 23)
(global-set-key (kbd "M-s o") 'occur)
)
-(global-set-key [f7] 'occur)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(message "grep, find")
@@ -495,13 +540,16 @@
(add-to-list 'grep-find-ignored-directories "build" t)
(add-to-list 'grep-find-ignored-directories "dist" t)
(add-to-list 'grep-find-ignored-directories "lib" t)
+ (add-to-list 'grep-find-ignored-directories "_build" t)
+ (add-to-list 'grep-find-ignored-directories "_dist" t)
+ (add-to-list 'grep-find-ignored-directories "_lib" t)
(when (boundp 'grep-find-ignored-files)
(add-to-list 'grep-find-ignored-files "*TAGS")
(add-to-list 'grep-find-ignored-files "GPATH")
)
))
-
+(global-set-key [f7] 'rgrep)
(global-set-key [M-f7] 'rgrep)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -513,18 +561,21 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(message "highlight selected text")
-;; 1/-1, when the mark is active, the region is highlighted.
-(transient-mark-mode 1)
-(delete-selection-mode 1) ; 1/-1
+(delete-selection-mode 1)
+
+(when (<= emacs-major-version 23)
+ ;; 1/-1, when the mark is active, the region is highlighted.
+ (transient-mark-mode 1)
-;; Order of next items is important, (assignment must done before pc-selection-mode enabled).
-(require 'pc-select)
-(setq pc-select-selection-keys-only t) ; To avoid some key bindings as F6, etc.
-(setq pc-select-meta-moves-sexps t)
-(cond
- ((= emacs-major-version 21) (pc-selection-mode))
- ((>= emacs-major-version 22) (pc-selection-mode 1))
- )
+ ;; Order of next items is important, (assignment must done before pc-selection-mode enabled).
+ (require 'pc-select)
+ (setq pc-select-selection-keys-only t) ; To avoid some key bindings as F6, etc.
+ (setq pc-select-meta-moves-sexps t)
+ (cond
+ ((= emacs-major-version 21) (pc-selection-mode))
+ ((>= emacs-major-version 22) (pc-selection-mode 1))
+ )
+ )
(when (eq window-system 'x)
(setq x-select-enable-clipboard t) ; for Emacs 21.2.1 and newer
@@ -640,6 +691,13 @@
(setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING))
(modify-coding-system-alist 'process ".*" 'utf-8-unix)
)
+ ((eq system-type 'cygwin)
+ (when (string-match "1251\\'" (getenv "LANG"))
+ (prefer-coding-system 'cp1251-unix)
+ (prefer-coding-system 'utf-8-unix)
+ (modify-coding-system-alist 'process ".*" 'cp1251-unix)
+ )
+ )
((eq system-type 'darwin)
nil
)
@@ -796,12 +854,6 @@
(setq read-file-name-completion-ignore-case t)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(message "music")
-(setq gnus-audio-au-player "winamp.exe"
- gnus-audio-directory "D:\\music"
- gnus-audio-wav-player "winamp.exe")
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(message "url")
;; http://tools.ietf.org/html/rfc3986
@@ -861,6 +913,16 @@
(add-hook 'write-file-hooks 'time-stamp)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(message "logging, logs")
+
+(defun my-auto-revert-tail-mode-hook ()
+ (when (string-match "/var/log/\\|\\.log\\'"
+ (buffer-file-name (current-buffer)))
+ (auto-revert-tail-mode 1)
+ ))
+(add-hook 'find-file-hook 'my-auto-revert-tail-mode-hook)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(message "auto-fill")
(setq-default fill-column 78)
@@ -877,14 +939,6 @@
(add-hook 'text-mode-hook 'turn-on-auto-fill)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(message "unknown")
-
-;; mailcrypt gnus message sendmail bbdb pilot bibtex eiffel-mode emacs-w3m
-;; eudc filladapt hugs-mode mpg123 php-mode ps-print
-;; chord-mode - edit guitar music
-;; discography - variant of BibTeX mode for discographies
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(message "cacl, calculator")
(setq-default calc-group-digits t)
@@ -986,17 +1040,32 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(message "Info")
-;; Because of Debian policy documentation covered by FDL license with invariant sections not allowed in packet
-;; repository tree. So it must be installed manually. My usual configuration is install user local software
-;; into ~/usr DISTDIR.
(unless (getenv "INFOPATH")
(setenv "INFOPATH" "~/usr/share/info:"))
+;; Assume that cygwin-mount already activated.
+(when (featurep 'cygwin-mount)
+ (setenv "INFOPATH" "/usr/share/info/:~/usr/share/info/:")
+ ;; Redefine path-separator to UNIX to update Info-directory-list.
+ (let ( (path-separator ":") )
+ (require 'info)
+ (info-initialize)
+ ))
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(message "man, woman")
+;; Assume that cygwin-mount already activated.
+(when (featurep 'cygwin-mount)
+ (let ( (path (expand-file-name "~")) )
+ (when (string-match "\\([c-z]\\):/" path)
+ (setenv "MANPATH" (concat "/cygdrive/" (substring path 0 1) "/" (substring path 3) "/usr/share/man/:"))
+ ) ))
+
(setq woman-use-own-frame nil)
(setq woman-fill-frame t)
+;; I prefer EN man pages.
+(setq manual-program "LANG=C man")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(message "comint")
@@ -1007,12 +1076,13 @@
(setq comint-eol-on-send t)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(message "spell, ispell, aspell")
+(message "spell, ispell, aspell, flyspell")
;; Settings for spelling done in '.emacs-autogen'.
-;(add-hook 'text-mode-hook 'flyspell-mode)
-;(setq flyspell-default-dictionary "russianw")
-;(setq flyspell-delay '1)
+
+(add-hook 'log-edit-mode-hook 'flyspell-mode)
+
+;; (setq-default ispell-extra-args '("--sug-mode=ultra"))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(message "dict, dictd, dictionary")
@@ -1022,6 +1092,23 @@
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(message "figlet")
+
+(defun my-figlet-region (&optional b e)
+ (interactive "r")
+ (shell-command-on-region b e "figlet" (current-buffer) t)
+ (comment-region (mark) (point)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(message "jdone")
+
+(ignore-errors
+ (require 'jdone)
+ (jdone-setup-key-binding)
+ (jdone-integrate-hook)
+ )
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(message "remember-mode")
(when (>= emacs-major-version 23)
@@ -1056,11 +1143,6 @@
(setq org-agenda-files `(,my-org-agenda-todo-file ,my-org-agenda-note-file))
(define-key global-map "\C-ca" 'org-agenda)
(define-key global-map "\C-ce" (lambda nil (interactive) (find-file my-org-agenda-note-file)))
- ;; I expect that these bindings work in all mode, Org mode use own, so redefine:
- (define-key org-mode-map [C-S-right] 'forward-word-mark)
- (define-key org-mode-map [C-S-left] 'backward-word-mark)
- (define-key org-mode-map [S-up] 'previous-line-mark)
- (define-key org-mode-map [S-down] 'next-line-mark)
;; My tags for remember buffer.
(setq org-tag-persistent-alist
@@ -1097,6 +1179,8 @@
;; ("DONE" . (:foreground "green" :weight bold))) )
)
+(setq org-agenda-include-diary t)
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(message "TODO, XXX, FIXME highlight")
;; Show blanks and FIXME
@@ -1129,14 +1213,235 @@
(setq fortune-file "~/XXX")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(message "mail, mh-e")
+(message "mail, message")
+
+(setq mail-user-agent 'message-user-agent)
+
+(setq message-citation-line-format "On %Y-%m-%d, %N wrote:
+")
+(setq message-citation-line-function 'message-insert-formatted-citation-line)
(setq mail-signature t)
(setq mail-signature-file "~/.signature")
;; (add-hook 'mail-setup-hook 'fortune-to-signature)
+;; (setq mail-from-style 'angles)
+
+(setq mail-personal-alias-file "~/.mailrc")
+;; Initialize from your mail aliases file...
+(setq mail-aliases t)
+(require 'ecomplete)
+(setq message-mail-alias-type '(abbrev ecomplete))
+
+(eval-after-load 'message
+ '(progn
+ (require 'mailabbrev)
+ (define-key message-mode-map "\e\t" 'mail-abbrev-complete-alias)
+ ))
+
+(defun my-message-setup-routine ()
+ (flyspell-mode 1)
+ )
+(add-hook 'message-setup-hook 'my-message-setup-routine)
+
+;; Kill message buffer after mail send. You always can use C-c C-s to preserve it.
+(setq message-kill-buffer-on-exit t)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(message "smtp, smtpmail")
+
+(when (boundp 'smtpmail-smtp-server)
+ (require 'smtpmail)
+ (setq
+ ;; If you use the default mail user agent.
+ send-mail-function 'smtpmail-send-it
+ ;; If you use Message or Gnus.
+ message-send-mail-function 'smtpmail-send-it
+ )
+ )
+;; (setq smtpmail-debug-verb t)
+;; (setq smtpmail-debug-info t)
+
+(defun my-message-mode-hook ()
+ (setq fill-column 78)
+ (turn-on-auto-fill)
+ )
+(add-hook 'message-mode-hook 'my-message-mode-hook)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(message "gnus, mh-e")
+
+(setq gnus-site-init-file "~/.gnus.el")
+
+;; Store gnus specific files to '~/.gnus'.
+(setq
+ gnus-directory "~/.gnus"
+ gnus-agent-directory "~/.gnus/agent/"
+ gnus-article-save-directory "~/.gnus/saved"
+ gnus-kill-files-directory "~/.gnus/scores"
+ gnus-cache-directory "~/.gnus/cache"
+ mail-source-directory "~/.gnus/mail"
+ message-directory "~/.gnus/mail"
+ message-auto-save-directory "~/.gnus/autosave"
+ ;; message-signature-directory
+ mailcap-download-directory "~/.gnus/mailcap"
+ nnml-directory "~/.gnus/nnml-mail"
+ spam-directory "~/.gnus/spam/"
+ smime-certificate-directory "~/.gnus/certs/"
+ nnfolder-directory "~/.gnus/archive"
+ nnfolder-active-file "~/.gnus/archive/active"
+)
+
+;; Remove gnus-ignored-newsgroups to show all GMail folders.
+(setq gnus-ignored-newsgroups nil)
+
+;; (require 'spam)
+;; (setq gnus-spam-process-newsgroups
+;; '(("^gmane\\."
+;; ((spam spam-use-gmane)))))
+
+(setq
+ gnus-novice-user nil
+ gnus-expert-user nil
+ gnus-interactive-catchup t
+ gnus-interactive-exit t
+ )
+
+(setq
+ gnus-read-active-file nil
+ gnus-check-new-newsgroups nil
+ gnus-check-bogus-newsgroups nil
+ )
+
+;; (setq 'gnus-use-cache t)
+(setq gnus-use-long-file-name t)
+(setq gnus-use-long-file-name t)
+(setq gnus-cache-remove-articles '(read))
+
+;; If you're spooling in overlapping mbox folders, you probably want to delete
+;; all messages with duplicate message IDs.
+(setq nnmail-treat-duplicates 'delete)
+
+;; Do not use the html part of a message, use the text part if possible!
+(setq mm-discouraged-alternatives '("text/html" "text/richtext"))
+
+(add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
+
+(setq
+ gnus-posting-styles
+ '(
+ (".*"
+ (organization "At home.")
+ (signature-file "~/.signature")
+ )
+ ))
+
+;; `gnus-group-line-format', `gnus-summary-line-format',
+;; `gnus-server-line-format', `gnus-topic-line-format',
+;; `gnus-group-mode-line-format', `gnus-summary-mode-line-format',
+;; `gnus-article-mode-line-format', `gnus-server-mode-line-format',
+;; `gnus-summary-pick-line-format'.
+
+(when window-system
+ (setq
+ gnus-sum-thread-tree-false-root ""
+ gnus-sum-thread-tree-indent " "
+ gnus-sum-thread-tree-leaf-with-other "├► "
+ gnus-sum-thread-tree-root ""
+ gnus-sum-thread-tree-single-leaf "└► "
+ gnus-sum-thread-tree-vertical "│"
+ ))
+
+(setq gnus-user-date-format-alist '((t . "%Y-%m-%d %H:%M")))
+(setq gnus-summary-line-format "%U%R%z %&user-date; %B %[%-22,22f%] %s\n")
+(setq gnus-summary-mode-line-format "Gnus: %p %Z")
+
+(setq gnus-article-time-format "%Y-%m-%d %T%z %a")
+(setq gnus-article-date-headers '(combined-lapsed user-defined))
+
+;; gnus-visible-headers
+(setq
+ gnus-sorted-header-list
+ '(
+ "^From:"
+ "^Subject:"
+ "^Summary:"
+ "^Keywords:"
+ "^Newsgroups:"
+ "^Followup-To:"
+ "^To:"
+ "^Cc:"
+ "^Organization:"
+ "^Date:"
+ "^User-Agent:"
+ "^X-Mailer:"
+ "^X-Newsreader:"
+ ))
+
+(setq
+ gnus-show-threads t
+ gnus-thread-sort-functions '(gnus-thread-sort-by-date gnus-thread-sort-by-total-score)
+ )
+
+;; Scoring, adaptive score.
+(setq
+ gnus-use-scoring t
+ gnus-save-score t
+ gnus-use-adaptive-scoring t
+ gnus-score-expiry-days 60
+ gnus-decay-scores t
+ gnus-default-adaptive-score-alist
+ '(
+ (gnus-unread-mark)
+ (gnus-ticked-mark (subject 5))
+ (gnus-dormant-mark (subject 5))
+ (gnus-del-mark (from -2) (subject -5))
+ (gnus-read-mark (from 2) (subject 1))
+ (gnus-killed-mark (subject -5))
+ (gnus-catchup-mark (subject -1))
+ (gnus-kill-file-mark (from -9999))
+ )
+ )
+;; Increase the score for followups to a sent article.
+(eval-after-load 'gnus-score
+ '(progn
+ (add-hook 'message-sent-hook 'gnus-score-followup-article)
+ (add-hook 'message-sent-hook 'gnus-score-followup-thread)
+ ))
+
+;; (setq gnus-home-score-file
+;; ;; All groups that match the regexp `"\\.emacs"'
+;; '(("\\.emacs" "emacs.SCORE")
+;; ;; All the comp groups in one score file
+;; ("^comp" "comp.SCORE")))
+
+;; (setq imap-log t)
+
;; (setq mail-user-agent 'mh-e-user-agent)
+(custom-set-faces '(gnus-summary-cancelled ((t (:foreground "plum" :background nil)))) )
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(message "bbdb")
+
+(setq
+ bbdb-offer-save 1
+ bbdb-use-pop-up t
+ bbdb-electric-p t
+ bbdb-popup-target-lines 1
+ )
+
+(setq bbdb-complete-name-full-completion t)
+(setq bbdb-completion-type 'primary-or-name)
+(setq bbdb-complete-name-allow-cycling t)
+
+(setq bbdb-file "~/.gnus/bbdb")
+
+;; (bbdb-initialize 'gnus 'message)
+;; (bbdb-insinuate-message)
+;; (add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus)
+
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(message "jabber")
@@ -1294,6 +1599,11 @@
(360 . "#0D80E0")))
)
+(defun my-log-edit-mode-hook ()
+ (setq fill-column 78)
+ )
+(add-hook 'log-edit-mode-hook 'my-log-edit-mode-hook t)
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(message "psvn")
@@ -1498,7 +1808,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(message "makefile, make")
-(add-to-list 'auto-mode-alist '("\\(Makefile\\|Makefile\\..+\\)\\'" . makefile-gmake-mode))
+(add-to-list 'auto-mode-alist '("\\(Makefile\\|Makefile\\..+\\)\\'" . makefile-gmake-mode) t)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(message "asm, assembler")
@@ -1557,7 +1867,7 @@
(defun my-c-mode-common-hook ()
;; Automatically inserte newlines after special characters such as brace, comma, semi-colon, and colon.
- (c-toggle-auto-newline 1)
+ (c-toggle-auto-newline -1)
;; Delete all preceding whitespace by DEL.
(c-toggle-hungry-state -1)
;; Auto indent after typing colon according to `c-hanging-colons-alist'.
@@ -1788,6 +2098,8 @@
(my-filter
(lambda (item) (not (equal (car item) "html")))
html-tag-alist)))
+ (add-to-list 'html-tag-alist '("script" (\n) ("type" "text/javascript") ))
+ (add-to-list 'html-tag-alist '("style" (\n) ("type" "text/css") ))
)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -1842,7 +2154,14 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Save and restore my buffers every time.
-(setq desktop-dirname "~/.emacs.d")
+
+(setq desktop-base-file-name ".emacs.desktop")
+(setq desktop-base-lock-name ".emacs.desktop.lock")
+(when (eq system-type 'cygwin)
+ (setq desktop-base-file-name ".emacs.desktop-cygwin")
+ (setq desktop-base-lock-name ".emacs.desktop-cygwin.lock")
+ )
+
(when (>= emacs-major-version 22)
(desktop-save-mode 1)
)