Skip to content

Instantly share code, notes, and snippets.

@papaeye
papaeye / gist:2942146
Created June 16, 2012 18:18
A patch to build emacs 23.4 with clang
diff --git a/src/nsfont.m b/src/nsfont.m
index aaec130..cecaa10 100644
--- a/src/nsfont.m
+++ b/src/nsfont.m
@@ -1209,7 +1209,6 @@ nsfont_draw (struct glyph_string *s, int from, int to, int x, int y,
DPSstroke (context);
DPSgrestore (context);
- return to-from;
}
@papaeye
papaeye / gist:2945078
Created June 17, 2012 17:07
A patch to define solarized faces for elscreen
diff --git a/solarized-definitions.el b/solarized-definitions.el
index 5e5219f..4fb94b6 100644
--- a/solarized-definitions.el
+++ b/solarized-definitions.el
@@ -488,7 +488,16 @@ the \"Gen RGB\" column in solarized-definitions.el to improve them further."
(rcirc-prompt ((t (:foreground ,yellow))))
(rcirc-bright-nick ((t (:foreground ,magenta))))
(rcirc-server ((t (:foreground ,base1))))
- (rcirc-timestamp ((t (:foreground ,base01)))))
+ (rcirc-timestamp ((t (:foreground ,base01))))
@papaeye
papaeye / cmigemo.rb
Created June 18, 2012 03:34
A formula for C/Migemo
require 'formula'
class Cmigemo < Formula
homepage 'http://www.kaoriya.net/software/cmigemo'
url 'http://cmigemo.googlecode.com/files/cmigemo-default-src-20110227.zip'
sha1 '25e279c56d3a8f1e82cbfb3526d1b38742d1d66c'
depends_on 'nkf' => :build
# Patch per discussion at: https://github.com/mxcl/homebrew/pull/7005
@papaeye
papaeye / migemo.el
Created June 19, 2012 14:30
migemo.el from cvs. And followed the packaging guidelines for ELPA support.
;; -*- mode: Emacs-Lisp; coding: utf-8-unix -*-
;;; migemo.el --- Japanese incremental search trough dynamic pattern expansion
;; $Id: migemo.el.in,v 1.8 2006/09/22 08:43:33 shirai Exp $
;; Copyright (C) Satoru Takabayashi
;; Author: Satoru Takabayashi <satoru-t@is.aist-nara.ac.jp>
;; Package-Version: 20120619
;; Keywords:
@papaeye
papaeye / fix-infopath.patch
Created June 21, 2012 15:42
A patch to fix infopath for self-contained emacs23.4/24.1
diff --git a/lisp/info.el b/lisp/info.el
index e5c258a..30d944f 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -597,7 +597,19 @@ in `Info-file-supports-index-cookies-list'."
(append (split-string (substring path 0 -1) sep)
(Info-default-dirs))
(split-string path sep))
- (Info-default-dirs)))))))
+ (Info-default-dirs))))
@papaeye
papaeye / emacs-mac-port.rb
Created June 21, 2012 16:44
A formula for self-contained emacs-24.1-mac-3.0
require 'formula'
class EmacsMacPort < Formula
homepage 'http://www.gnu.org/software/emacs/'
url 'http://ftpmirror.gnu.org/emacs/emacs-24.1.tar.bz2'
mirror 'http://ftp.gnu.org/pub/gnu/emacs/emacs-24.1.tar.bz2'
sha1 'ab22d5bf2072d04faa4aebf819fef3dfe44aacca'
def port_url
"ftp://ftp.math.s.chiba-u.ac.jp/emacs/emacs-#{version}-mac-3.0.tar.gz"
@papaeye
papaeye / auto-save-buffers-minor-mode.patch
Created July 4, 2012 13:08
A patch for auto-save-buffers minor mode and more
diff --git a/auto-save-buffers.el b/auto-save-buffers.el
index 01d0b04..53ed372 100644
--- a/auto-save-buffers.el
+++ b/auto-save-buffers.el
@@ -6,32 +6,74 @@
;; 使い方:
;;
;; (require 'auto-save-buffers)
-;; (run-with-idle-timer 0.5 t 'auto-save-buffers) ; アイドル0.5秒で保存
+;; (auto-save-buffers-mode)
@papaeye
papaeye / tweak-font-height.patch
Last active December 15, 2015 02:29
Tweak font height of Emacs 24.4 Mac port
diff --git a/src/macfont.m b/src/macfont.m
index 69bde9f..f18738c 100644
--- a/src/macfont.m
+++ b/src/macfont.m
@@ -2581,8 +2581,11 @@ macfont_open (struct frame * f, Lisp_Object entity, int pixel_size)
ascent += (ascent + descent) * .15f;
else if (CFStringHasPrefix (family_name, CFSTR ("Hiragino")))
{
- leading *= .25f;
- ascent += leading;
diff --git a/configure b/configure
index 0e2d827..daf7388 100755
--- a/configure
+++ b/configure
@@ -24892,6 +24892,20 @@ ac_config_commands="$ac_config_commands epaths"
ac_config_commands="$ac_config_commands gdbinit"
+if test "${with_mac}" != no; then
+ prefix="\${mac_appdir}/Emacs.app/Contents/Resources"
@papaeye
papaeye / test_context.py
Created May 27, 2013 09:22
Test push/pop of Flask application/request context
import unittest
from flask import Flask
from flask.globals import _app_ctx_stack, _request_ctx_stack
class TestContext(unittest.TestCase):
def setUp(self):
self.app = Flask(__name__)