Skip to content

Instantly share code, notes, and snippets.

@guehara
guehara / emacs-24.4_build.sh
Last active Aug 29, 2015
Build Emacs 24.4 on Yosemite
View emacs-24.4_build.sh
#!bin/sh
#
# reference from http://masutaka.net/chalow/2014-10-25-1.html
#
cd ~/src/emacs
curl -LO http://ftp.gnu.org/pub/gnu/emacs/emacs-24.4.tar.xz
curl -LO ftp://ftp.math.s.chiba-u.ac.jp/emacs/emacs-24.4-mac-5.0.tar.gz
tar Jxvf emacs-24.4.tar.xz
tar zxvf emacs-24.4-mac-5.0.tar.gz
View build_mozc.py.diff
Index: build_mozc.py
===================================================================
--- build_mozc.py (revision 383)
+++ build_mozc.py (working copy)
@@ -213,6 +213,8 @@
# Include subdirectory of win32 and breakpad for Windows
if options.target_platform == 'Windows':
gyp_file_names.extend(glob.glob('%s/win32/*/*.gyp' % SRC_DIR))
+ elif options.target_platform == 'Mac':
+ gyp_file_names.extend(glob.glob('%s/unix/emacs/*.gyp' % SRC_DIR))
@guehara
guehara / .tmux.conf
Created Dec 8, 2014
tmux.conf for OSX
View .tmux.conf
# prefix キー変更
set -g prefix C-t
unbind C-b
# キーストロークのディレイを減らす
set -sg escape-time 1
# | でペインを縦に分割する
bind | split-window -h
@guehara
guehara / Cask
Created Jan 15, 2015
Cask for Emacs
View Cask
(source gnu)
(source melpa)
(depends-on "auto-complete")
(depends-on "popup")
(depends-on "fuzzy")
(depends-on "auto-java-complete" :git "https://github.com/emacs-java/auto-java-complete.git")
(depends-on "ac-mozc" :git "https://github.com/igjit/ac-mozc.git")
(depends-on "helm")
@guehara
guehara / gist:1301656
Created Oct 20, 2011
zsh auto-fu settings
View gist:1301656
# auto-fu
function () { # precompile
local A
A=~/zsh/auto-fu.zsh/auto-fu.zsh
[[ -e "${A:r}.zwc" ]] && [[ "$A" -ot "${A:r}.zwc" ]] ||
zsh -c "source $A; auto-fu-zcompile $A ${A:h}" >/dev/null 2>&1
}
source ~/zsh/auto-fu.zsh/auto-fu; auto-fu-install
# initialization and options
@guehara
guehara / gist:1301654
Created Oct 20, 2011
zsh prompt with vcs_info
View gist:1301654
autoload -Uz vcs_info
zstyle ':vcs_info:*' formats '(%s)[%b] '
zstyle ':vcs_info:*' actionformats '(%s)[%b|%a] '
precmd () {
psvar=()
LANG=en_US.UTF-8 vcs_info
[[ -n "$vcs_info_msg_0_" ]] && psvar[1]="$vcs_info_msg_0_"
}
# prompt
@guehara
guehara / gist:1313359
Created Oct 25, 2011
auto-complete-clang settings
View gist:1313359
(require 'auto-complete-clang)
(setq ac-clang-flags '("-Wall" "-Wextra" "-std=c99" "-fblocks" "-isysroot" "/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk" "-I." "-include ../*.pch" "-F/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/System/Library/Frameworks/" "-D__IPHONE_OS_VERSION_MIN_REQUIRED=40300"))
;; flymake
(add-hook 'objc-mode-hook
(lambda ()
(push 'ac-source-clang ac-sources)
(auto-complete-mode t)
))
@guehara
guehara / gist:1313365
Created Oct 25, 2011
flymake for objc-mode
View gist:1313365
;;; flymake
(require 'flymake)
(set-face-attribute 'flymake-errline nil
:background "slateblue4"
:foreground "aliceblue"
:weight 'normal)
(set-face-attribute 'flymake-warnline nil
:background "yellow"
:foreground "black"
@guehara
guehara / gist:1313373
Created Oct 25, 2011
Makefile for flymake
View gist:1313373
CLANG = /usr/bin/clang
ARCH = -arch armv7
SDK = -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk
OS_VER_MIN = -miphoneos-version-min=4.3
OPTIONS = -fsyntax-only -x objective-c -std=c99 -fblocks
WARNINGS = -Wreturn-type -Wparentheses -Wswitch -Wno-unused-parameter -Wunused-variable -Wunused-value
INCLUDES = -I. --include ../*.pch
FRAMEWORKS = -F/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/System/Library/Frameworks/
check-syntax:
@guehara
guehara / yasnippet-config.diff
Created Mar 30, 2012
yasnippet-config.el diff
View yasnippet-config.diff
--- yasnippet-config.el.orig 2010-04-09 13:56:14.000000000 +0900
+++ yasnippet-config.el 2012-03-30 17:36:31.000000000 +0900
@@ -109,14 +109,14 @@
;;; With `skk-mode'
(defadvice skk-j-mode-on (after yasnippet activate)
- (yas/minor-mode-off))
+ (yas/minor-mode 0))
(defadvice skk-mode-exit (after yasnippet activate)
(yas/minor-mode-on))