This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro fmt (str) | |
"Elisp string interpolation. | |
Example: | |
(fmt \"My name is #{user-full-name}, I am running Emacs #{(if (display-graphic-p) \\\"with a GUI\\\" \\\"in a terminal\\\".)}\"" | |
(let ((exprs nil)) | |
(with-temp-buffer | |
(insert str) | |
(goto-char 1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro create-scratch-buffer (name &optional comment body) | |
"Create a new custom scratch buffer. The name should be a valid major mode name without -mode suffix. | |
The body should be lambda block or a symbol of function that be invoked after a scratch buffer created. nil is accepted to turn it off." | |
`(defun ,(intern (concat "scratch-" name)) | |
() | |
(interactive) | |
(let ((bufname (concat "*scratch-" ,name "*"))) | |
(if (buffer-live-p (get-buffer bufname)) | |
(switch-to-buffer bufname) | |
(with-current-buffer (get-buffer-create bufname) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; This macro creates new compilation commands | |
(defmacro ff/add-compilation-command (name &optional key) | |
(let ((buffer-name (concat "*" name "*")) | |
(compile-symbol (intern name)) | |
(recompile-symbol (intern (concat "re" name)))) | |
(when (fboundp compile-symbol) | |
(warn "redefining command `%s'" name)) | |
(when (fboundp recompile-symbol) | |
(warn "redefining command `re%s'" name)) | |
`(progn |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; how to use | |
;; (add-hook 'html-mode-hook 'django-kyr-tag-mode) | |
;;(util-macro-install "dkt:") | |
;;; how to use | |
;; (add-hook 'html-mode-hook 'django-kyr-tag-mode) | |
;;(util-macro-install "dkt:") | |
(eval-when-compile (require 'cl)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'cl) | |
(require 'peg) | |
(defcustom dbg-mi-process-name "dbg-mi" "") | |
(defcustom dbg-mi-buffer-name "*dbg-mi*" "") | |
(defvar dbg-mi-process nil) | |
(defvar dbg-mi-buffer nil) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Elisp session in REPL IELM | |
;; | |
;; | |
;; | |
ELISP> (defmacro inc (var) | |
(list 'setq var (list '1+ var))) | |
inc | |
ELISP> (setq x 0) | |
0 (#o0, #x0, ?\C-@) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* IDE Support | |
* Community Size | |
* Documentation, Documentation Generators | |
* FFI (Foreign Function Interface) for C/C++ | |
* Libraries | |
* GUI Toolkits | |
* Multicore and Multitask | |
* Available Manpower |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### | |
### Shell script to download Oracle JDK / JRE / Java binaries from Oracle website using terminal / command / shell prompt using wget. | |
### You can download all the binaries one-shot by just giving the BASE_URL. | |
### Script might be useful if you need Oracle JDK on Amazon EC2 env. | |
### Script is updated for every JDK release. | |
### Features:- | |
# 1. Resumes a broken / interrupted [previous] download, if any. | |
# 2. Renames the file to a proper name with including platform info. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Show loaded modules in window title and use a green "λ>" as prompt. | |
-- Subsequent lines of multi-line commands shall begin with " |". | |
:set prompt "\SOH\ESC]0;GHCi: %s\BEL\ESC[32;1m\STXλ>\SOH\ESC[0m\STX " | |
:set prompt2 "\SOH\ESC[32;1m\STX |\SOH\ESC[0m\STX " | |
-- Paste and evaluate text from the OS X clipboard. (The pasted text also | |
-- prints in yellow unless pasting quietly using :paste-quiet.) | |
:set -package process | |
:def paste \_ -> do { paste <- System.Process.readProcess "pbpaste" [] ""; let cmd = if '\n' `elem` paste then ":{\ntype Ö = ()\n" ++ paste ++ "\n:}" else paste in putStrLn ("\SOH\ESC[33m\STX" ++ paste ++ "\SOH\ESC[0m\STX") >> return (":cmd return " ++ show cmd) } | |
:def paste-quiet \_ -> do { paste <- System.Process.readProcess "pbpaste" [] ""; let cmd = if '\n' `elem` paste then ":{\ntype Ö = ()\n" ++ paste ++ "\n:}" else paste in return (":cmd return " ++ show cmd) } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; Completion hints for files and buffers buffers | |
(require 'helm-config) | |
(helm-mode 1) | |
;;rebind tab to do persistent action | |
(define-key helm-map (kbd "<tab>") 'helm-execute-persistent-action) | |
;; make TAB works in terminal | |
(define-key helm-map (kbd "C-i") 'helm-execute-persistent-action) | |
;list actions using C-z | |
(define-key helm-map (kbd "C-z") 'helm-select-action) |