Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;; http://stackoverflow.com/a/18354274/702977
- (setq ns-pop-up-frames nil)
- (defun goto-last-edit-point ()
- "Go to the last point where editing occurred."
- (interactive)
- (let ((undos buffer-undo-list))
- (when (listp undos)
- (while (and undos
- (let ((pos (or (cdr-safe (car undos))
- (car undos))))
- (not (and (integerp pos)
- (goto-char (abs pos))))))
- (setq undos (cdr undos))))))
- (global-set-key (kbd "C-q") 'goto-last-edit-point)
- (global-set-key "\C-x\C-m" 'compile)
- ;; http://emacswiki.org/emacs/ModeCompile
- ;; Helper for compilation. Close the compilation window if
- ;; there was no error at all.
- (defun compilation-exit-autoclose (status code msg)
- ;; If M-x compile exists with a 0
- (when (and (eq status 'exit) (zerop code))
- ;; then bury the *compilation* buffer, so that C-x b doesn't go there
- (bury-buffer)
- ;; and delete the *compilation* window
- ;; (run-at-time 0.5 nil 'delete-window (get-buffer-window (get-buffer "*compilation*"))))
- (delete-window (get-buffer-window (get-buffer "*compilation*"))))
- ;; Always return the anticipated result of compilation-exit-message-function
- (cons msg code))
- ;; Specify my function (maybe I should have done a lambda function)
- (setq compilation-exit-message-function 'compilation-exit-autoclose)
- (custom-set-variables
- ;; custom-set-variables was added by Custom.
- ;; If you edit it by hand, you could mess it up, so be careful.
- ;; Your init file should contain only one such instance.
- ;; If there is more than one, they won't work right.
- '(compilation-always-kill t)
- '(compilation-ask-about-save nil)
- '(compilation-context-lines 0)
- '(compilation-scroll-output t)
- '(compilation-window-height 21)
- '(ns-alternate-modifier (quote meta))
- '(ns-right-alternate-modifier (quote none))
- '(tool-bar-mode nil))
- (custom-set-faces
- ;; custom-set-faces was added by Custom.
- ;; If you edit it by hand, you could mess it up, so be careful.
- ;; Your init file should contain only one such instance.
- ;; If there is more than one, they won't work right.
- '(default ((t (:inherit nil :stipple nil :background "White" :foreground "Black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 160 :width normal :foundry "nil" :family "Menlo")))))
- ;; use tuareg-mode https://github.com/ocaml/tuareg
- (load "/Users/softtimur/.opam/system/share/emacs/site-lisp/tuareg-site-file")
- ;; use ocp-indent https://www.typerex.org/ocp-indent.html
- (add-to-list 'load-path "/Users/softtimur/.opam/system/share/emacs/site-lisp")
- (require 'ocp-indent)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement