Peter Szilagyi avatar Peter Szilagyi committed 5aa0dd9

Finished merging some leftover copies of renamed files.

Comments (0)

Files changed (3)

elisp/jane-common.el

-;; CR cfalls: Why isn't this in elisp/?
-
-;; jane-common.el
-;;
-;; Path setup and unobjectionable customizations.
-;; Every emacs user should load this file.
-
-;; so we can enable or disable bits of this file for individual users
-(defun i-am (users)
-  "returns true if user-login-name is passed"
-  (if (listp users)
-      (member (user-login-name) users)
-    (string= users (user-login-name))))
-
-;;----------------------------------------------------------------------------;;
-;; Set site lisp dir for everyone and add load paths                          ;;
-;;----------------------------------------------------------------------------;;
-
-(defvar jane-site-lisp "/mnt/global/base/lib/elisp"
-  "The location of Emacs libraries.  This is the same for all Emacs users,
-regardless of whether they load prod, test, or local jane libraries such as
-omake-mode")
-
-(add-to-list 'load-path jane-site-lisp)
-
-(defconst jane-libraries
-  '("ahg"
-    "ar"
-    "auctex"
-    "bbdb"
-    "cql-mode"
-    "deprecated"
-    "dictionary"
-    "ecb"
-    "eieio"
-    "elib"
-    "ess"
-    "haskell-mode"
-    "jde"
-    "nxhtml"
-    "nxml-mode"
-    "ocaml"
-    "org/lisp"
-    "sml-mode"
-    )
-  "Libraries to have available on startup")
-
-(dolist (dir jane-libraries)
-  (add-to-list 'load-path (expand-file-name dir jane-site-lisp)))
-
-;;----------------------------------------------------------------------------;;
-;; Determine jane elisp library dir and set paths                             ;;
-;;----------------------------------------------------------------------------;;
-
-(defconst jane-home 
-  (expand-file-name 
-   (concat 
-    (file-name-directory load-file-name) "..")))
-
-(add-to-list 'load-path jane-home)
-
-(defconst jane-prod (expand-file-name "jane" jane-site-lisp)
-  "The location of jane production libraries.")
-
-(defconst jane-test (expand-file-name "jane-test" jane-site-lisp)
-  "The default location of jane test libraries.")
-
-;; type mode = 'prod | 'test | 'local
-(defconst jane-mode
-  (cond
-   ((equal jane-home jane-prod) 'prod)
-   ((equal jane-home jane-test) 'test)
-   (t 'local)))
-
-(defconst jane-dirs
-  '("ocp-indent"
-    "elisp/jane"
-    "elisp/omake"
-    "elisp/contrib"
-    "elisp/contrib/tuareg"))
-
-(dolist (dir jane-dirs)
-  (add-to-list 'load-path (expand-file-name dir jane-home)))
-
-(require 'ocp-indent)
-
-(require 'jane-deprecated)
-(require 'jane-micro-features)
-(require 'jane-ocaml)
-(require 'jane-cr)
-;; CR sweeks for cfalls: omake mode no longer binds C-cC-g.
-;; cfalls: I don't like that this binds C-cC-g, usually C-g means quit
-(unless (i-am "cfalls") (require 'omake))
-
-;; omake server executable
-(custom-set-variables
- '(Omake.Server.program
-   (case jane-mode
-     ('prod "/mnt/global/base/bin/omake_server.exe")
-     ('test "/mnt/global/base/bin/omake_server_test.exe")
-     ('local (expand-file-name "ocaml/omake/omake_server.exe" jane-home)))))
-
-;;----------------------------------------------------------------------------;;
-;; Customizations for all Jane Street users                                   ;;
-;;----------------------------------------------------------------------------;;
-
-(add-hook 'c-mode-common-hook
-          (lambda () (local-set-key "\C-c\C-a" 'ff-find-other-file)))
-
-;; CR cfalls for sweeks: Things that aren't optional probably
-;; shouldn't be in microfeatures.  I find that confusing.
-
-;; 2012-04-24 sweeks: I want everyone to get the auto-modes.  I don't consider
-;; them optional.
-(Jane.auto-modes)
-
-;; cfalls has C-cf bound to something else
-(unless (i-am "cfalls") (Jane.find))
-
-;; font-lock = colors
-(global-font-lock-mode 1)
-
-;; Highlight the matching paren
-(show-paren-mode t)
-
-;; Use y or n instead of yes or no
-(fset 'yes-or-no-p 'y-or-n-p)
-
-;; Make a script executable
-(add-hook 'after-save-hook 'executable-make-buffer-file-executable-if-script-p)
-
-;; Disabling fsync keeps emacs from blocking out for several seconds
-;; at a time when omake is also running.  The downside is that if your
-;; machine crashes after you save but before the file gets flushed,
-;; you might lose some work.  Totally worth it!
-(setq write-region-inhibit-fsync t)
-
-(custom-set-variables
-
- ;; Quiet startup
- '(inhibit-startup-message t)
- '(inhibit-startup-screen t)
- '(inhibit-default-init t)
- `(inhibit-startup-echo-area-message ,(user-login-name))
- '(initial-scratch-message nil)
-
- ;; text-only questions, please
- '(use-dialog-box nil)
-
- ;; Editing remote files (e.g., C-x C-f /nyc-qws-r07:/etc/X11/xorg.conf RET)
- '(tramp-default-method "scp")
- '(remote-shell-program "/usr/bin/ssh")
-
- ;; Ignore parens inside comments for C-M-f and C-M-b
- '(parse-sexp-ignore-comments t)
-
- ;; length of *Messages* buffer -- default of 100 probably made sense in
- ;; 1990, but now just makes problems harder to debug
- '(message-log-max 10000)
-
- ;; echo keystrokes to the minibuffer
- '(echo-keystrokes 0.01)
-
- ;; Don't fontify large buffers in real time.  Fontification
- ;; can be very slow on large files.  Wait until you haven't
- ;; typed for awhile to fontify
- '(jit-lock-stealth-time 5)
-
- ;; Don't bother your colleagues with a beep
- '(visible-bell nil)
-
- ;;; clipboard
- ;; delete selections and use X clipboard
- '(x-select-enable-clipboard t)
- ;; use X clipboard and paste at point
- '(mouse-yank-at-point t)
- ;; M-y updates X clipboard
- '(yank-pop-change-selection t)
- ;; bigger kill ring
- '(kill-ring-max 200)
- ;; put X clipboard on kill-ring before overwriting it
- '(save-interprogram-paste-before-kill t)
- ;; when killing the same thing twice, ignore second one
- '(kill-do-not-save-duplicates t)
-
- ;; 100M = 10x larger than default
- '(large-file-warning-threshold (* 100 1000 1000))
- )
-
-
-;; Misc small commands
-
-(defvar align-dwim-command "/mnt/global/dev/bin/line_up_words.exe")
-
-(defun align-dwim ()
-  "tries to align words in the region in an intelligent way"
-  (interactive)
-  (shell-command-on-region
-   (region-beginning) (region-end) align-dwim-command t t
-   shell-command-default-error-buffer t)
-  (indent-region (region-beginning) (region-end)))
-
-(defun bounce-sexp ()
-  "Will bounce between matching parens -- alternates between forward-sexp/backward-sexp"
-  (interactive)
-  (let ((prev-char (char-to-string (preceding-char)))
-        (next-char (char-to-string (following-char))))
-    (cond ((string-match "[\]})>]" prev-char) (backward-sexp 1))
-          ((string-match "[[{(<]" next-char) (forward-sexp 1))
-          (t (backward-up-list)))))
-
-;; Buffer modifying functions
-;; execute a perl script on this buffer, or region if mark is active
-(defun perl-filter (filter)
-  (interactive "sFilter: ")
-  (let* ((regionp (and mark-active transient-mark-mode))
-         (start (if regionp (region-beginning) (point-min)))
-         (stop (if regionp (region-end) (point-max))))
-    (shell-command-on-region
-     start stop
-     (concat "perl -pale '" filter "'")
-     nil
-     t)))
-
-(defun dos-unix ()
-  "Convert DOS cr-lf to UNIX newline"
-  (interactive)
-  (goto-char (point-min))
-  (while (search-forward "\r" nil t) (replace-match "")))
-
-(defun unix-dos ()
-  "Convert UNIX newline to DOS cr-lf"
-  (interactive)
-  (goto-char (point-min))
-  (while (search-forward "\n" nil t) (replace-match "\r\n")))
-
-(defun get-omake-root-or-current-dir ()
-  (or
-   (locate-dominating-file default-directory "OMakeroot")
-   default-directory))
-
-(defun dired-ml ()
-  "Lookup up ml and mli files in current directory"
-  (interactive)
-  (dired "*.ml{,i}"))
-
-(defun ml-grep (directory-to-grep regexp-to-grep)
-  "Grep through .ml files in chosen directory"
-  (interactive "DDir: \nsRegexp: ")
-  (grep (concat "find " directory-to-grep " -regex '.*\\.mli?$' | xargs grep --line-number --with-filename --no-messages --perl-regexp -- \"" regexp-to-grep "\"")))
-
-(defcustom jane-face-family "DejaVu LGC Sans Mono"
-  "Default face family"
-  :group 'js)
-
-(defcustom jane-background "black"
-  "Default blackground."
-  :group 'js)
-
-(defcustom jane-foreground "white"
-  "Default blackground."
-    :group 'js)
-
-(defun set-default-face (size face)
-  (custom-set-faces
-   `(default ((t (:background ,jane-background
-                  :foreground ,jane-foreground
-                  :height ,size
-                  :font ,face
-                  :family ,face))))))
-
-(defun small-face ()
-  "Set the face size small"
-  (interactive)
-  (set-default-face 79 "lucidatypewriter"))
-
-(defun medium-face ()
-  "Set the face size medium"
-  (interactive)
-  (set-default-face 120 jane-face-family))
-
-(defun large-face ()
-  "Set the face size large"
-  (interactive)
-  (set-default-face 140 jane-face-family))
-
-(defun sweeks-face ()
-  "Set the face size sweeks-large"
-  (interactive)
-  (set-default-face 160 jane-face-family))
-
-(defun find-alternate-file-with-sudo ()
-  "Open a file as root without restarting emacs"
-  (interactive)
-  (if buffer-file-name
-      (find-alternate-file (concat "/sudo::" buffer-file-name))
-      (error "Buffer %s does not visit a file" (current-buffer))))
-
-(defun toggle-full-screen ()
-  "Toggle between full screen and partial screen display on X11;
-    courtesy of http://www.emacswiki.org/cgi-bin/wiki/FullScreen"
-  (interactive)
-  (x-send-client-message nil 0 nil "_NET_WM_STATE" 32
-                         '(2 "_NET_WM_STATE_FULLSCREEN" 0)))
-
-(require 'info)
-(add-to-list 'Info-directory-list (format "%s/doc/" jane-home) t)
-(add-to-list 'Info-directory-list "/usr/share/info/" t)
-
-
-;; CR smclaughlin for sweeks: I propose changing the names jane-XXX to Jane.XXX
-
-(progn
-  ;; The code below deals with [whitespace-style], which affects both highlighting of
-  ;; whitespace via [whitespace-mode] and with cleanup of whitespace via
-  ;; [whitespace-cleanup] when a file is saved.  We attempt to achieve the following:
-  ;;
-  ;;   * characters beyond column 90 are highlighted
-  ;;   * trailing whitespace is not highlighted by default, but can be configured
-  ;;   * trailing whitespace is cleaned up on file save
-  ;;
-  ;; To achieve this, we need different settings of [whitespace-style] for highlighting
-  ;; and cleanup.  So, we set the buffer-local [whitespace-style] to the way we want
-  ;; highlighting to happen, and then use a temporary dynamic binding to set
-  ;; [whitespace-style] to what we want for cleanup during file save.
-  (require 'whitespace)
-  ;; the following line fixes a bug in whitespace.el
-  (set (make-local-variable 'whitespace-indent-tabs-mode) indent-tabs-mode)
-  (defvar jane-highlight-whitespace-style '(lines-tail)
-    "\
-Determines how whitespace is highlighted in OCaml code and C
-code.  See the documentation for whitespace-style for allowed
-values.
-"
-    )
-  (defun jane-highlight-whitespace ()
-    (setq whitespace-line-column 90)
-    (setq whitespace-style jane-highlight-whitespace-style)
-    ;; Must set [whitespace-line-column] and [whitespace-style] before calling
-    ;; [whitespace-mode].
-    (whitespace-mode 1))
-  (add-hook 'c-mode-hook 'jane-highlight-whitespace)
-  (add-hook 'tuareg-mode-hook 'jane-highlight-whitespace)
-  (defvar jane-cleanup-whitespace-in-these-major-modes '(c-mode tuareg-mode)
-    "\
-The modes that use the Jane rules for cleaning up whitespace on
-file save.")
-  (defvar jane-cleanup-whitespace-style '(trailing)
-    "\
-A list of atoms that determines how whitespace is cleaned up on
-file save.  See the documentation for whitespace-cleanup for
-allowed values.
-"
-    )
-  (add-hook 'before-save-hook 'jane-whitespace-cleanup)
-  (defun jane-whitespace-cleanup ()
-    "\
-Clean up whitespace in certain modes when saving a file, using
-whitespace-cleanup."
-    (when (member major-mode jane-cleanup-whitespace-in-these-major-modes)
-      (let ((whitespace-style jane-cleanup-whitespace-style))
-        (whitespace-cleanup)))))
-
-
-
-(provide 'jane-common)
-

elisp/jane-defaults.el

-;; jane-defaults.el
-;;
-;; Reasonable defaults for new emacs users
-
-;; This is repeated in both jane-common and jane-defaults.  I don't see a
-;; better way since either can be loaded from a user's .emacs and we need
-;; it in the load-path
-(defconst jane-home
-  (expand-file-name
-   (concat
-    (file-name-directory load-file-name) "..")))
-
-(add-to-list 'load-path (expand-file-name "elisp" jane-home))
-
-(require 'jane-common)
-
-
-;; Micro-features
-
-;; To quickly customize your emacs file, you can add or remove microfeatures.
-;; see jane-microfeatures
-
-;;(Jane.advanced)
-;; XCR cfalls: I think there's no reason to have auto-modes here -- it's loaded in js-common.
-;; smclaughlin: deleted Jane.auto-modes
-;;(Jane.auto-revert)
-;;(Jane.backups)
-(Jane.bell)
-;;(Jane.buffer-menu)
-(Jane.comint)
-(Jane.compilation)
-(Jane.completion)
-;;(Jane.debug)
-;;(Jane.desktop)
-;;(Jane.dictionary)
-(Jane.dired)
-;;(Jane.ediff)
-;;(Jane.edit-with-emacs)
-;;(Jane.evil) ;; Vim compatibility
-;;(Jane.faces-basic)
-(Jane.faces-dark)
-;;(Jane.faces-default)
-;;(Jane.faces-light)
-;;(Jane.faces-subtle) ;; depends on Jane.faces-dark
-;;(Jane.filladapt)
-;; XCR cfalls: This is pointless -- it's already in jane-common.el
-;; sweeks: Deleted Jane.find.
-(Jane.flyspell)
-(Jane.frame)
-(Jane.global-keybindings)
-(Jane.grep)
-;;(Jane.haskell)
-;;(Jane.hg-blame-summary)
-;;(Jane.ido)
-(Jane.iswitchb)
-;;(Jane.linum)
-;;(Jane.midnight)
-;;(Jane.multiframe)
-;;(Jane.new-cr-todo)
-(Jane.no-clutter)
-;;(Jane.pages)
-;;(Jane.perl)
-;;(Jane.rainbow-delimiters)
-;;(Jane.recentf)
-;;(Jane.rectangle)
-(Jane.saveplace)
-(Jane.scrolling)
-(Jane.selective-display)
-(Jane.server)
-;;(Jane.sml)
-(Jane.text)
-;;(Jane.time)
-(Jane.uniquify)
-(Jane.vc)
-
-(medium-face)
-
-(provide 'jane-defaults)

elisp/jane/jane-defaults.el

 ;;
 ;; Reasonable defaults for new emacs users
 
+;; This is repeated in jane-common and jane-defaults.  Either can be
+;; loaded from a user's ~/.emacs.
 (if load-file-name
     (add-to-list 'load-path (directory-file-name (file-name-directory load-file-name))))
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.