Skip to content
This repository has been archived by the owner on Apr 13, 2020. It is now read-only.

Commit

Permalink
white space and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
genehack committed Jan 6, 2013
1 parent 2f2b1dd commit c3837d5
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 60 deletions.
2 changes: 1 addition & 1 deletion bin/build-most-recent-emacs
Expand Up @@ -49,7 +49,7 @@ $^O eq 'darwin'
say "\n* CLEANING UP..." if $VERBOSE;
unlink( $tarball_file );

chdir('/'); # so File::Temp can clean up on exit
chdir('/'); # so File::Temp can clean up on exit

say "done.";

Expand Down
1 change: 0 additions & 1 deletion bin/check-emacs
@@ -1,4 +1,3 @@
#! /bin/sh

emacs -q --eval '(condition-case err (progn (load "~/.emacs.d/init.el") (kill-emacs 0)) (error (kill-emacs 1)))'

56 changes: 28 additions & 28 deletions etc/builtins.el
Expand Up @@ -48,7 +48,7 @@
(require 'font-lock)
(global-font-lock-mode 1)
(setq-default font-lock-maximum-decoration t
font-lock-maximum-size nil)
font-lock-maximum-size nil)
(setq jit-lock-stealth-time 5
jit-lock-defer-contextually t
jit-lock-stealth-nice 0.5)
Expand Down Expand Up @@ -95,8 +95,8 @@ remove-leading-whitespace-on-kil-line tricks")
(setq auto-revert-verbose nil)

;;; HIGHLIGHTING
;(set-face-foreground 'highlight "gray10")
;(set-face-background 'highlight "yellow")
;;(set-face-foreground 'highlight "gray10")
;;(set-face-background 'highlight "yellow")

;;; HTML
(add-to-list 'auto-mode-alist '("\\.tt2?$" . html-mode))
Expand All @@ -123,32 +123,32 @@ remove-leading-whitespace-on-kil-line tricks")
(interactive)
(imenu--make-index-alist)
(let ((name-and-pos '())
(symbol-names '()))
(symbol-names '()))
(flet ((addsymbols (symbol-list)
(when (listp symbol-list)
(dolist (symbol symbol-list)
(let ((name nil) (position nil))
(cond
((and (listp symbol) (imenu--subalist-p symbol))
(addsymbols symbol))
((listp symbol)
(setq name (car symbol))
(setq position (cdr symbol)))
((stringp symbol)
(setq name symbol)
(setq position (get-text-property 1 'org-imenu-marker symbol))))
(unless (or (null position) (null name))
(add-to-list 'symbol-names name)
(add-to-list 'name-and-pos (cons name position))))))))
(when (listp symbol-list)
(dolist (symbol symbol-list)
(let ((name nil) (position nil))
(cond
((and (listp symbol) (imenu--subalist-p symbol))
(addsymbols symbol))
((listp symbol)
(setq name (car symbol))
(setq position (cdr symbol)))
((stringp symbol)
(setq name symbol)
(setq position (get-text-property 1 'org-imenu-marker symbol))))
(unless (or (null position) (null name))
(add-to-list 'symbol-names name)
(add-to-list 'name-and-pos (cons name position))))))))
(addsymbols imenu--index-alist))
(let* ((selected-symbol (ido-completing-read "Symbol? " symbol-names))
(position (cdr (assoc selected-symbol name-and-pos))))
(position (cdr (assoc selected-symbol name-and-pos))))
(if (markerp position)
(goto-char position) (goto-char (overlay-start position))))))
(goto-char position) (goto-char (overlay-start position))))))

;;; ISEARCH
;(set-face-foreground 'isearch "white")
;(set-face-background 'isearch "red")
;;(set-face-foreground 'isearch "white")
;;(set-face-background 'isearch "red")

;;; ISWITCH
(require 'iswitchb)
Expand Down Expand Up @@ -179,7 +179,7 @@ This is a buffer-local variable.")
(setq mac-function-modifier 'super)
(setq mac-option-modifier nil)
(add-to-list 'ido-ignore-files "\\.DS_Store")
;; (ns-toggle-fullscreen)
;; (ns-toggle-fullscreen)
(setq browse-url-browser-function 'browse-url-default-macosx-browser)
(setq delete-by-moving-to-trash t))

Expand All @@ -192,8 +192,8 @@ This is a buffer-local variable.")
(if (fboundp 'menu-bar-mode) (menu-bar-mode -1))

;;; MODE LINE FACES
;(set-face-background 'mode-line "black")
;(set-face-foreground 'mode-line "yellow2")
;;(set-face-background 'mode-line "black")
;;(set-face-foreground 'mode-line "yellow2")

;;; NXML-MODE
(fset 'xml-mode 'nxml-mode)
Expand All @@ -217,7 +217,7 @@ This is a buffer-local variable.")
"/opt/git/bin"
"/opt/perl/bin"
"/usr/local/bin"
)
)
"extra elements to add to exec-path")
(dolist (path genehack/extra-paths)
(message path)
Expand Down Expand Up @@ -247,7 +247,7 @@ This is a buffer-local variable.")

;;; SCRATCH BUFFER
(setq initial-scratch-message
"welcome to john's emacs.\n\nput additional stuff in initial-scratch-message to have it show up here.\n\n")
"welcome to john's emacs.\n\nput additional stuff in initial-scratch-message to have it show up here.\n\n")

;;; SERVER
(server-start)
Expand Down
2 changes: 1 addition & 1 deletion etc/misc.el
Expand Up @@ -246,7 +246,7 @@
(defun genehack/paren-bounce ()
(interactive)
(let ((prev-char (char-to-string (preceding-char)))
(next-char (char-to-string (following-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 an expression boundary.")))))
Expand Down
46 changes: 22 additions & 24 deletions etc/perl.el
Expand Up @@ -24,41 +24,39 @@

;;; CONFIG
(setq
cperl-auto-newline t
cperl-auto-indent-on-semi t
cperl-auto-newline t
cperl-clobber-lisp-bindings t
cperl-close-paren-offset -2
cperl-continued-statement-offset 2
;cperl-hairy t
cperl-electric-keywords t
cperl-electric-lbrace-space nil
cperl-electric-linefeed t
cperl-electric-parens nil
cperl-font-lock t
cperl-highlight-variables-indiscriminately t
cperl-indent-level 2
cperl-indent-parens-as-block t
cperl-invalid-face nil
cperl-tab-always-indent t
cperl-electric-lbrace-space nil ; must needs be after cperl-hairy
cperl-clobber-lisp-bindings nil ; must needs be after cperl-hairy

cperl-electric-parens nil
cperl-font-lock t
cperl-electric-linefeed t
cperl-electric-keywords t
cperl-indent-region-fix-constructs nil
cperl-info-on-command-no-prompt t
cperl-clobber-lisp-bindings t
cperl-invalid-face nil
cperl-lazy-help-time 5
cperl-tab-always-indent t
)

(defvar genehack/cperl-keybindings-to-remove
'(
"\C-c\C-a"
"\C-c\C-b"
"\C-c\C-d"
"\C-c\C-hP"
"\C-c\C-ha"
"\C-c\C-hp"
"\C-c\C-j"
"\C-c\C-t"
"\C-c\C-v"
"\C-c\C-x"
) "list of keybindings to unset in cperl-mode buffers
"\C-c\C-a"
"\C-c\C-b"
"\C-c\C-d"
"\C-c\C-hP"
"\C-c\C-ha"
"\C-c\C-hp"
"\C-c\C-j"
"\C-c\C-t"
"\C-c\C-v"
"\C-c\C-x"
) "list of keybindings to unset in cperl-mode buffers
since cperl-mode steps on a lot of the C-c C-* bindings I use globallly..." )

;;; perl COMPLETION
Expand Down Expand Up @@ -97,7 +95,7 @@ or vice versa."

(defun genehack/cperl-mode-setup ()
;; allows 'M-x compile' for syntax checking of Perl scripts within Emacs
;; from e.goerlach@computer.org (Ekkehard Görlach) in comp.emacs
;; from e.goerlach@computer.org (Ekkehard Görlach) in comp.emacs
(set (make-local-variable 'compile-command)
(concat "perl -cw " buffer-file-name))
(font-lock-add-keywords nil '(("^[^\n]\\{90\\}\\(.*\\)$" 1 font-lock-warning-face t)))
Expand Down
10 changes: 5 additions & 5 deletions init.el
Expand Up @@ -129,11 +129,11 @@
(dolist (pkg genehack/package-list)
(if (not (package-installed-p pkg))
(progn
(if (not (eq genehack/packages-refreshed t))
(progn
(package-refresh-contents)
(setq genehack/packages-refreshed t)))
(package-install pkg))))
(if (not (eq genehack/packages-refreshed t))
(progn
(package-refresh-contents)
(setq genehack/packages-refreshed t)))
(package-install pkg))))

;; PATH FIX FOR MACOS X
(when (memq window-system '(mac ns))
Expand Down

0 comments on commit c3837d5

Please sign in to comment.