LoginSignup
16
15

More than 3 years have passed since last update.

How to install Emacs 25.1.1 with Inline-patch on OS X

Last updated at Posted at 2016-09-20

この項、古くなりました。

Emacs-25.3/26.3(Mojave, Catalina)/27.x にインラインパッチをあてて使う(macOS) - Qiita のシェルスクリプトに頼ったほうがヨサゲです。homebrew による管理は諦めましたorz

デフォルトの makeinfo (つまり /usr/bin/makeinfo) は古いので注意!


こちらを参考に、僕なりにやってみました。

% brew update
% EDITOR=emacs brew edit emacs
class Emacs < Formula
  desc "GNU Emacs text editor"
  homepage "https://www.gnu.org/software/emacs/"
  url "https://ftpmirror.gnu.org/emacs/emacs-25.1.tar.xz"
  mirror "https://ftp.gnu.org/gnu/emacs/emacs-25.1.tar.xz"
  sha256 "19f2798ee3bc26c95dca3303e7ab141e7ad65d6ea2b6945eeba4dbea7df48f33"

  # ここから追加
  patch :p1 do
    url "https://raw.githubusercontent.com/suzuki/emacs-inline-patch/master/emacs-inline.patch"
  end

  depends_on "autoconf" => :build
  depends_on "automake" => :build
  # ここまで追加

  bottle do
    sha256 "6022295cbbad123db684cef19029d6100e711e29c160ac9ba1bb7a38304655da" => :sierra
    sha256 "013398eb1c8030b31423484bc0c316245cbab523c70452f200814950c98b1f44" =>
 :el_capitan
    sha256 "fa3f4f8f6050072e2032c7dc04d3289ec82847bb2ea507c1444bbc385f375eda" =>
 :yosemite
  end
% brew install --with-cocoa --with-gnutls --with-modules emacs
% brew linkapps emacs
init.el
;; Mac の設定
(when (string-equal system-type "darwin")
  ;; Emacs とシェルの変数共有
  ;; http://d.hatena.ne.jp/kiririmode/20130804/p1
  ;; https://github.com/syl20bnr/spacemacs/issues/3920
  (when (functionp 'exec-path-from-shell-initialize)
    (setq exec-path-from-shell-arguments '("-l"))
    (exec-path-from-shell-initialize))

  (mac-input-method-mode) ; 日本語入力

  ;; カーソルの色の設定
  ;; http://blog.n-z.jp/blog/2013-11-12-cocoa-emacs-ime.html
  (mapc
   (lambda (param)
     (let ((name (car param)))
       (when (string-match "Japanese\\(\\.base\\)?\\'" name)
         (mac-set-input-method-parameter name 'cursor-color "red"))))
   mac-input-method-parameters)
  (mac-set-input-method-parameter "com.apple.keylayout.US"
                                  'cursor-color "white"))

Naney様suzuki様に感謝いたします。

c.f. 遅まきながらEmacs25.1をインストールしてみました

16
15
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
16
15