From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "funkyj" Newsgroups: gmane.emacs.help Subject: how NOT to remove trailing whitespace? Date: 6 Oct 2006 15:46:19 -0700 Organization: http://groups.google.com Message-ID: <1160174779.720222.326420@h48g2000cwc.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1160178045 10694 80.91.229.2 (6 Oct 2006 23:40:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 6 Oct 2006 23:40:45 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Oct 07 01:40:41 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GVzJ0-00088R-Vp for geh-help-gnu-emacs@m.gmane.org; Sat, 07 Oct 2006 01:40:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GVzIz-0005e1-QJ for geh-help-gnu-emacs@m.gmane.org; Fri, 06 Oct 2006 19:40:37 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!h48g2000cwc.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 759 Original-NNTP-Posting-Host: 207.17.136.151 Original-X-Trace: posting.google.com 1160174785 14167 127.0.0.1 (6 Oct 2006 22:46:25 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Fri, 6 Oct 2006 22:46:25 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: h48g2000cwc.googlegroups.com; posting-host=207.17.136.151; posting-account=0ULC0A0AAABuMf87WwM81W22EF7QdMSL Original-Xref: shelby.stanford.edu gnu.emacs.help:142242 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:37861 Archived-At: I'm maintaining old code C that has lots of trailing whitespace. When I edit these files with emacs it is automagically deleting this trailing whitespace which pisses my co-workers off because of the noise in CVS diff. Here is the emacs I'm using: GNU Emacs 21.3.1 (i386--freebsd, X toolkit, Xaw3d scroll bars) and below is my .emacs: I don't see that I've ASKED emacs to do this for me and I'm sure I have not been accidentally typing "M-x delete-trailing-whitespace". Can someone tell me how to tell emacs to stop being so "helpful"? Regards, --jfc //////////////////////////// ;; ;;;;;;;;;;;;;;;; common lisp related config ;; (setq inferior-lisp-program "clisp") ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Are we running XEmacs or Emacs? ;; (defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version)) ;; ;; Set up the keyboard so the delete key on both the regular keyboard ;; ;; and the keypad delete the character under the cursor and to the right ;; ;; under X, instead of the default, backspace behavior. ;; (global-set-key [delete] 'delete-char) ;; (global-set-key [kp-delete] 'delete-char) ;; Turn on font-lock mode for Emacs (global-font-lock-mode t) (setq font-lock-support-mode 'lazy-lock-mode) ;; ;; Always end a file with a newline (setq require-final-newline t) ;; ;; Stop at the end of the file, not just add lines (setq next-line-add-newlines nil) (custom-set-variables ;; custom-set-variables was added by Custom -- don't edit or cut/paste it! ;; Your init file should contain only one such instance. '(bookmark-save-flag 1) '(c-tab-always-indent nil) '(column-number-mode t) '(indent-tabs-mode nil) '(mail-source-delete-incoming nil) '(rmail-preserve-inbox t) '(sc-auto-fill-region-p nil) '(tab-stop-list (quote (4 8 12 16 20 24 28 32 36 40 48 56 64 72 80 88 96 104 112 120))) '(tab-width 8) '(uniquify-buffer-name-style (quote post-forward-angle-brackets) nil (uniquify))) (add-to-list 'load-path "/homes/jcano/elisp/site-lisp" t) ;; (custom-set-faces) (show-paren-mode t) ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;= ;;; ;; ;; ;; ;; `iswitchb' is the latest rev of sje-switch-buffer. ;; ;; ;; ;; enable iswitchb bindings. (iswitchb-default-keybindings) ;; (resize-minibuffer-mode 1) (setq calendar-latitude 37.4) (setq calendar-longitude -122.02) (setq calendar-location-name "Sunnyvale, CA") ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;= ;;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;= ;;; ;; ;(require 'jde) ;; ;; we should ebug jde errors ;; ;(setq debug-on-error t) ;; ;; Sets the basic indentation for Java source files ;; ;; to two spaces. ;; ;(defun my-jde-mode-hook () ;; ; (setq c-basic-offset 2)) ;; ;(add-hook 'jde-mode-hook 'my-jde-mode-hook) ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;= ;;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;= ;;; ;;;; emacs cscope integration. See xcscope.el comments for documentation. (require 'xcscope) (setq cscope-marker-ring-length 128) ;; ;; ;; ;; Ken's abbrev macro package. ;; ;; ;; (require 'c-mode-abbrevs) ;; (read-abbrev-file) ;; (global-set-key "\C-x;" 'petes-expand-abbrev) ;; (global-set-key "\C-x'" 'petes-expand-abbrev) ;; ;(autoload 'petes-expand-abbrev "c-mode-abbrevs") ;; ;(eval-after-load "c-mode-abbrevs" (read-abbrev-file)) ;; ;; ;; ;; My personal abbreviations. ;; ;; (cond ((or (eq window-system 'w32) (eq window-system 'x)) ;; (setq search-highlight t) (setq visible-bell t) ; (global-set-key [f9] 'cscope-find-global-definition) (global-set-key [f9] 'cscope-find-global-definition-no-prompting) (global-set-key [f10] 'cscope-pop-mark) ; see tags-stack.el (global-unset-key [f1]) (global-set-key [f2] 'auto-fill-mode) ; toggle auto-fill (global-set-key [M-f2] 'filladapt-mode) ; toggle filladapt-mode (global-set-key [f3] 'transient-mark-mode) ; toggle transient mark (global-set-key [f4] 'toggle-truncate-lines) (global-set-key [f5] 'bury-buffer) ; cycle through buffers (global-set-key [f19] 'push-to-tag) ; see tags-stack.el ;; (global-set-key (quote [3 f9]) 'push-to-tag-prompt) (global-set-key [f20] 'my-win-pop) ; see tags-stack.el ; mouse `scroll wheel' scrolling. (global-set-key [mouse-4] 'jc-scroll-win-down) (global-set-key [mouse-5] 'jc-scroll-win-up) )) (global-set-key "\C-x~" 'compile) (global-set-key "\C-x&" 'query-replace-regexp) ;; keep both of these bindings? (global-set-key "\M-&" 'query-replace-regexp) ;; ??? ;; override the CVS/RCS binding for C-xC-q. I like the old school ;; binding. C-x v v is still available for checkin/checkout. (global-set-key "\C-x\C-q" (quote toggle-read-only)) (load-library "tags-stack") (autoload 'push-to-tag "tags-stack" "Push a tag on the stack") (autoload 'push-to-tag-prompt "tags-stack" "Push a tag on the stack") (autoload 'my-win-pop "tags-stack" "Pop a tag on the stack") ; ; a function to clear the tags table ; (defun my-clear-tags (args) "clear some tag related variables" (interactive "p") (setq tags-file-name nil) (setq tags-table-list nil) ) ;; ;;; ;; ;;; tab stops for non-programming modes ;; ;;; ;; (setq-default 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 92 96 ;; 100 104 108 112 116 120)) ; ;; ; ;; `jfc-insert-date' is for use in my journal. One of these days ; ;; I'll hack add-log.el into something I like or I'll get a newer ; ;; version of emacs in which `steno.el' works. until then I can use ; ;; `jfc-insert-date' to put dates in my journal. ; ;; (defun jfc-insert-date () "insert date string into the current buffer. formatted a la jonathan" (interactive) (let ((tm (current-time-string))) (insert (concat "* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D " (substring tm 20 24) (substring tm 3 11) (substring tm 0 3) (substring tm 10 16) " =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ")))) (defun jfc-insert-date-brief () "insert date (yyyy/mm/dd hh:mm)string into the current buffer." (interactive) (insert (concat "--jfc " (format-time-string "%Y/%m/%d, %H:%M")))) (global-set-key "\344" (quote jfc-insert-date-brief)) ;; (defun mmc-compile (arg) ;; "fire off a compile in one of the subdirectories. If called with an argument ;; this function will prompt for the (relative path) name of the subdirectory" ;; (interactive "P") ;; (let ((cur-buf (current-buffer))) ;; (defvar mmc-compile-dir "power_pc" ;; "this variable controls which subdirectory 'mmc-compile' runs a compile in.") ;; (if (or arg (not mmc-compile-dir)) ;; (progn ;; (if (not mmc-compile-dir) ;; (setq mmc-compile-dir "power_pc")) ;; (setq mmc-compile-dir ;; (read-from-minibuffer ;; "subdirectory for compile: " ;; mmc-compile-dir)))) ;; (let ((rawdir (pwd)) curdir subdir subdir-buffer) ;; ;; next line is a kluge to remove "Directory " from results of pwd ;; (setq curdir (substring rawdir 10 (length rawdir))) ;; (setq subdir (concat curdir mmc-compile-dir)) ;; (setq subdir-buffer (dired-other-window subdir)) ;; (compile compile-command) ;; (bury-buffer subdir-buffer)) ;; (switch-to-buffer cur-buf))) ;; (defun mmc-mkmk (arg) ;; "fire off a Mmkmk in one of the subdirectories. If called with an argument ;; this function will prompt for the (relative path) name of the subdirectory" ;; (interactive "P") ;; (let ((cur-buf (current-buffer))) ;; (defvar mmc-compile-dir "power_pc" ;; "this variable controls which subdirectory 'mmc-compile' runs a compile in.") ;; (if (or arg (not mmc-compile-dir)) ;; (progn ;; (if (not mmc-compile-dir) ;; (setq mmc-compile-dir "solaris")) ;; (setq mmc-compile-dir ;; (read-from-minibuffer ;; "subdirectory for Mmkmk: " ;; mmc-compile-dir)))) ;; (let ((rawdir (pwd)) curdir subdir subdir-buffer) ;; ;; next line is a kluge to remove "Directory " from results of pwd ;; (setq curdir (substring rawdir 10 (length rawdir))) ;; (setq subdir (concat curdir mmc-compile-dir)) ;; (setq subdir-buffer (dired-other-window subdir)) ;; (let (compile-command) ;; (compile "./Mmkmk")) ;; (bury-buffer subdir-buffer)) ;; (switch-to-buffer cur-buf))) ;; (global-set-key [f11] 'mmc-mkmk) (defun jfc-recompile () "switch to '*compilation*' buffer and rerun make" (interactive) (let ((compilation-read-command nil)) (switch-to-buffer "*compilation*") (compile compile-command))) (global-set-key [f12] 'jfc-recompile) ;; ;; ;; ;; use my patched version of filladapt.el-2.12 ;; ;; ;; ;; see ;; ;; ;; ;; for details (require 'filladapt ) (setq-default filladapt-mode t) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; cc-mode indentation customizations ; block indentation to 4 spaces. "bsd" style also indents blocks 4 ; spaces. (setq c-default-style '((other . "stroustrup"))) (defun my-c-mode-common-hook () (global-set-key [M-C-a] 'c-beginning-of-defun) (global-set-key [M-C-e] 'c-end-of-defun) (local-set-key "\344" (quote jfc-insert-date-brief)) ;(c-setup-filladapt) ;(filladapt-mode 1) (setq fill-column 78) ;; my customizations for all of c-mode, c++-mode, objc-mode, java-mode ; no indentation for opening brace. (c-set-offset 'substatement-open 0) ; no indentation for C++ namespaces or extern "C" bodies. (c-set-offset 'innamespace 0) (c-set-offset 'inextern-lang 0) ;;;;;;;;;;;;;;;; trying out Ken I's indentation style (c-set-offset (quote arglist-intro) (quote ++) nil) (c-set-offset (quote arglist-close) 0 nil) ;;;;;;;;;;;;;;;; ; don't add indentation between the closing paren ')' of a function ; declaration and the opening brace '{' of the function body. ; - this fixes the problem of 'indent-region' and friends ; indenting the 'docgen' "Synopsis:" comment. (c-set-offset 'knr-argdecl-intro 0)) (add-hook 'c-mode-common-hook 'my-c-mode-common-hook) ;; ;; configure behavior of 'c-electric-brace' (setq c-hanging-braces-alist '((brace-list-open) (brace-entry-open) (block-close . c-snug-do-while) (extern-lang-open after) (inexpr-class-open after) (inexpr-class-close before))) ;; (setq c-electric-pound-behavior '(alignleft)) ;; ;; when indenting struct {...}, cc-mode ignores the indentation of the ;; previous line and idents according to `c-basic-offset'. For files ;; in which Venkata has indented a struct decl 4 spaces, when I add ;; lines indented 2 spaces it looks awful. The following function ;; allows me to toggle between my c-basic-offset (2) and venkata's (4) ;; on a per buffer basis. ;; (defun my-toggle-c-basic-offset () "make `c-basic-offset' buffer local and toggle it between 2 and 4." (interactive) (make-local-variable 'c-basic-offset) (if (equal 2 c-basic-offset) (setq c-basic-offset 4) (setq c-basic-offset 2) ) (message "c-basic-offset is now %d" c-basic-offset) ) ;(global-set-key [f1] 'my-toggle-c-basic-offset) (defun my-toggle-tab-width () "make `tab-width' buffer local and toggle it between 8 and 4." (interactive) (make-local-variable 'tab-width) (if (equal 8 tab-width) (setq tab-width 4) (setq tab-width 8) ) (message "tab-width is now %d" tab-width) ) (global-set-key [f35] 'my-toggle-tab-width) (defun my-insert-buffer-name (arg) "da da da" (interactive "P") ; ignore `arg' for now (message "inserted buffer name") (insert (buffer-name))) (global-set-key [f20] 'my-insert-buffer-name) ;; "cut" key ;; (defun my-write-abbrev-file (arg) ;; "write abbrevs to /home/jcano/.emacs.abbrevs" ;; (interactive "P") ;; (message "writing abbrevs to %s" abbrev-file-name) ;; (write-abbrev-file abbrev-file-name)) ;; (global-set-key [f33] 'my-write-abbrev-file) ;; (defun my-add-mode-abbrev (arg) ;; "create an abbrev for text between mark and point." ;; (interactive "P") ;; (add-mode-abbrev 0)) ;; (global-set-key [f31] 'my-add-mode-abbrev) ;; ;; scratchpad: abbrev stuff ;; (fset 'my-abbrev-next-point [?\C-s ?@ ?\C-m backspace]) ;; (global-set-key "\C-cn" (quote my-abbrev-next-point)) ;; ;;;;;;;;;;;;;;;; ;; ;;;;;;;;;;;;;;;; ;; (defun my-toggle-vm-mutable () ;; "toggle `vm-mutable-frames'. This controls whether or not vm opens new frames for folders, mail messages etc. ;; Sneaky, also disable framepop" ;; (interactive) ;; (if (equal nil vm-mutable-frames) ;; (progn ;; (setq vm-mutable-frames t) ;; (framepop-enable)) ;; (progn ;; (setq vm-mutable-frames nil) ;; (framepop-disable)) ;; ) ;; (message "vm-mutable-frames is now %s" vm-mutable-frames) ;; ) ;; (defun from-home-setup () ;; "initialize emacs for working at home." ;; (interactive) ;; (setq vm-mutable-frames nil) ;; (framepop-disable) ;; (make-frame-command) ;; (make-frame-command) ;; (display-time) ;; this keeps the VPN, X-window open. ;; ()) (add-hook 'c-mode-common-hook 'my-c-mode-common-hook) ;; I'm getting tired of hitting C-xC-c by accident and blowing me out of emacs (defun kwi-kill-emacs nil "Issue a message to indicate the command to use to kill emacs" (interactive) (beep) (message "Use 'save-buffers-kill-emacs' or 'kill-emacs' to exit emacs")) (global-set-key "\C-x\C-c" 'kwi-kill-emacs) (global-unset-key "\C-x\C-z") ;(setq debug-on-error t) ;(setq debug-on-error nil) ;; ; ;; ;; ; ;; tar and untar files in DIRED mode. ;; ; ;; ;; (add-hook 'dired-mode-hook ;; (function ;; (lambda () ;; (define-key dired-mode-map "T" 'dired-tar-pack-unpack)))) ;; (autoload 'dired-tar-pack-unpack "dired-tar.el") (autoload 'python-mode "python-mode") ;; ;(require 'jka-compr) (set-cursor-color "Yellow") (set-mouse-color "Green") (setq ange-ftp-default-user "anonymous") ;; ;(require 'bbdb) ;; ;(bbdb-initialize 'vm 'sc) ;; ;setq bbdb-print-format-files '("/home/jcano/elisp/bbdb_tmp/bbdb-tex-3.0/bbdb-print" "/home/jcano/elisp/bbdb_tmp/bbdb-tex-3.0/multicol")) ;; ; (setq bbdb-print-file-name "~/.mail/bbdb.tex") ;; ; (setq bbdb-print-elide '(tex-name aka mail-alias nic nic-updated dossier project creation-date timestamp texme)) ;; ; (setq bbdb-print-require 'texme) ;; ;---------------------------------------------- ;; ;---------- autoload -------------------------- ;; ;---------------------------------------------- ;; ; (autoload 'vm "vm" ;; ; " Function: Read mail in Emacs." t) ;; ; (autoload 'vm-other-frame "vm" ;; ; " Function: Read mail in Emacs." t) ;; ; (global-set-key "\C-xm" 'vm-mail) ;; ; (autoload 'vm-mail "vm" ;; ; " Function: send mail in Emacs." t) ;; ;------- swap ENTER and LFD key bindings ---------- (global-set-key "\C-m" 'newline-and-indent) ;; ENTER/RETURN key binding (global-set-key "\C-j" 'newline) ;;********************************************* ;; begin cursor motion customization ;;********************************************* ;; ;; scroll window up, move cursor down ;; (defun jc-scroll-win-up (arg) "scrolls the window up while cursoring down while keeping the cursor on the same line." (interactive "p") (scroll-up arg) ; (next-line arg) ) (global-set-key (quote [C-down]) (quote jc-scroll-win-up)) ;; ;; scroll window down, move cursor up ... ;; (defun jc-scroll-win-down (arg) "scrolls the window down while cursoring up while keeping the cursor on the same line." (interactive "p") (scroll-down arg) ; (previous-line arg) ) (global-set-key (quote [C-up]) (quote jc-scroll-win-down)) ;;;; horizontal scrolling with the cursor keys. (defun jfc-scroll-left-1 (arg) "scroll left default to 1 column" (interactive "p") (scroll-left arg)) (defun jfc-scroll-right-1 (arg) "scroll right default to 1 column" (interactive "p") (scroll-right arg)) (global-set-key (quote [C-right]) (quote jfc-scroll-right-1)) (global-set-key (quote [C-left]) (quote jfc-scroll-left-1)) (defun jfc-scroll-left-16 (arg) "scroll left default to 1 column" (interactive "p") (scroll-left (* arg 16))) (defun jfc-scroll-right-16 (arg) "scroll right default to 1 column" (interactive "p") (scroll-right (* arg 16))) (global-set-key (quote [M-right]) (quote jfc-scroll-right-16)) (global-set-key (quote [M-left]) (quote jfc-scroll-left-16)) ;; ; ;;;;; gnuserv, gnuclientw -- load files into existing emacs instance. ;; ; (load-library "gnuserv") ;; ; (gnuserv-start) ;; ;;;; having problems with `gnuclientw' in cygwin's bash. I also ;; ;;;; noticed that if I accidentally start a second emacs (when gnuserv ;; ;;;; is in this .emacs) then one emacs session pegs the CPU at 100% so ;; ;;;; I'm disabling this feature for now. 2005/01/14 ;; (defun byte-compile-dot-emacs () ;; "byte-compile this .emacs.el file" ;; (byte-compile-file "./.emacs.el") ;; nil) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; command to remove ^M characters from a buffer (defun carriage-return-remove () "remove all carriage-return characters from the current buffer" (interactive) (save-excursion (goto-char (point-min)) (replace-string " " "" nil) ) ) (global-set-key [f6] 'carriage-return-remove) ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; from ;; ;; http://cygwin.com/faq/faq_4.html#SEC62 ;; ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; This assumes that Cygwin is installed in C:\cygwin (the ;; ;; default) and that C:\cygwin\bin is not already in your ;; ;; Windows Path (it generally should not be). ;; ;; ;; (setq exec-path (cons "C:/cygwin/bin" exec-path)) ;; (setenv "PATH" (concat "C:\\cygwin\\bin;" (getenv "PATH"))) ;; ;; ;; ;; NT-emacs assumes a Windows command shell, which you change ;; ;; here. ;; ;; ;; (setq process-coding-system-alist '(("bash" . undecided-unix))) ;; (setq shell-file-name "bash") ;; (setenv "SHELL" shell-file-name) ;; (setq explicit-shell-file-name shell-file-name) ;; ;; ;; ;; This removes unsightly ^M characters that would otherwise ;; ;; appear in the output of java applications. ;; ;; ;; (add-hook 'comint-output-filter-functions ;; 'comint-strip-ctrl-m) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; The latest version of cygwin-mount.el can always be found at ;; ;; http://www.blarg.net/~offby1/cygwin-mount/ ;; ; ;; ; 'cygwin-mount' makes emacs/gdb mode work properly under cygwin. In ;; ; particular, it helps emacs find source files. We need this because ;; ; gdb is a cygwin program and uses unix/cygwin style file name paths ;; ; (e.g. "/home/jcano/.emacs") while GNU emacs for NT is an MSWindows ;; ; Program that understands DOS style file names ;; ; (e.g. "C:/cygwin/home/jcano/.emacs"). the cygwin-mount.el package ;; ; bridges this gap. ;; ; ;; (require 'cygwin-mount) ;; (cygwin-mount-activate) ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'calc-macs) ;(require 'calc) (require 'info) (setq Info-directory-list-original Info-directory-list) ;;;; why does `Info-directory-list' get set to nil when the following ;;;; setq is not present? (setq Info-directory-list Info-default-directory-list) (add-to-list 'Info-directory-list "/homes/jcano/elisp/site-info" t ) (add-to-list 'Info-directory-list "/usr/info" t) (add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode)) ;; (add-to-list 'auto-mode-alist '("\\.xsd\\'" . sgml-mode)) (defun jfc-asm-mode-customization () "asm-mode customization" (require 'cc-mode) (local-set-key "\C-c\C-n" 'c-forward-conditional) (local-set-key "\C-c\C-p" 'c-backward-conditional) (local-set-key "\C-j" 'self-insert-command) (local-set-key ":" 'self-insert-command) ) (add-to-list 'auto-mode-alist '("\\.inc\\'" . asm-mode)) (add-hook 'asm-mode-hook (function cscope:hook)) (add-hook 'asm-mode-hook (function jfc-asm-mode-customization)) ;; TSP3 disassembly, provided by ME. (require 'tsp3-disassem) (global-set-key [f8] 'tsp3-disassem-point) ;; ;;; ;; ; ;; ; (remove-hook 'local-write-file-hooks 'byte-compile-dot-emacs) ;; ; eval: (add-hook 'local-write-file-hooks 'byte-compile-dot-emacs) ;; ; eval: (add-hook 'after-save-hook 'byte-compile-dot-emacs) ;; ;(remove-hook 'after-save-hook 'byte-compile-dot-emacs) (custom-set-faces ;; custom-set-faces was added by Custom -- don't edit or cut/paste it! ;; Your init file should contain only one such instance. ) ;; ; Local variables: ;; ; End: ;; (put 'set-goal-column 'disabled nil) ;;; Commands added by calc-private-autoloads on Tue Jan 9 21:42:32 2001. (autoload 'calc-dispatch "calc" "Calculator Options" t) (autoload 'full-calc "calc" "Full-screen Calculator" t) (autoload 'full-calc-keypad "calc" "Full-screen X Calculator" t) (autoload 'calc-eval "calc" "Use Calculator from Lisp") (autoload 'defmath "calc" nil t t) (autoload 'calc "calc" "Calculator Mode" t) (autoload 'quick-calc "calc" "Quick Calculator" t) (autoload 'calc-keypad "calc" "X windows Calculator" t) (autoload 'calc-embedded "calc" "Use Calc inside any buffer" t) (autoload 'calc-embedded-activate "calc" "Activate =3D>'s in buffer" t) (autoload 'calc-grab-region "calc" "Grab region of Calc data" t) (autoload 'calc-grab-rectangle "calc" "Grab rectangle of data" t) ;(setq load-path (nconc load-path (list "~/elisp/site-lisp"))) (global-set-key "\e#" 'calc-dispatch) ;;; End of Calc autoloads. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; trying to configure VM. see also: '~/.vm' file. ;; (autoload 'vm "vm" "Start VM on your primary inbox." t) (autoload 'vm-other-frame "vm" "Like `vm' but starts in another frame." t) (autoload 'vm-visit-folder "vm" "Start VM on an arbitrary folder." t) (autoload 'vm-visit-virtual-folder "vm" "Visit a VM virtual folder." t) (autoload 'vm-mode "vm" "Run VM major mode on a buffer" t) (autoload 'vm-mail "vm" "Send a mail message using VM." t) (autoload 'vm-submit-bug-report "vm" "Send a bug report about VM." t) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun my-query-cuddle-else () "fix those uncuddled 'else' statements!" (interactive ) ;; regexp below is whitespace sensitive! (query-replace-regexp "} +\\s-*else" "} else" nil nil nil)) ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; VC customization: (require 'vc) (defadvice vc-next-action-on-file (before vc-next-action-dont-register-cvs (file verbose &optional comment)) "Abort if vc-next-action-on-file if the next action is ... to register the file for CVS" (if (and (not (vc-backend file)) (file-exists-p "CVS")) (error "Yo! use vc-register to add files to CVS!"))) (ad-activate 'vc-next-action-on-file) (put 'narrow-to-region 'disabled nil) (put 'upcase-region 'disabled nil) (put 'downcase-region 'disabled nil)