Browse Source

updated emacs and merged some patches and files

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@1273 ec354946-7b23-47d6-9f5a-488ba84defc7
munepi 14 years ago
parent
commit
283805c933

BIN
e/emacs/emacs-21.1-bzip2.patch.bz2


+ 11 - 0
e/emacs/emacs-21.1-ppc-nocombreloc.patch

@@ -0,0 +1,11 @@
+--- emacs-21.1/src/s/gnu-linux.h.ppc	Fri Nov 23 18:15:03 2001
++++ emacs-21.1/src/s/gnu-linux.h	Fri Nov 23 18:16:04 2001
+@@ -190,7 +190,7 @@
+    not -z combreloc is the default.  GNU ld ignores unknown -z KEYWORD
+    switches, so this also works with older versions that don't implement
+    -z combreloc.  */
+-#define LD_SWITCH_SYSTEM_TEMACS -z nocombreloc
++#define LD_SWITCH_SYSTEM_TEMACS
+ #endif /* __ELF__ */
+ 
+ /* As of version 1.1.51, Linux did not actually implement SIGIO.

+ 42 - 0
e/emacs/emacs-23.0.60-locallisppath.patch

@@ -0,0 +1,42 @@
+diff -up emacs-23.0.60/Makefile.in.orig emacs-23.0.60/Makefile.in
+--- emacs-23.0.60/Makefile.in.orig	2008-08-02 23:11:24.000000000 +0900
++++ emacs-23.0.60/Makefile.in	2008-09-08 17:01:38.000000000 +0900
+@@ -483,14 +483,14 @@ install-arch-indep: mkdir info install-e
+ 	done
+ 	-rm -f $(DESTDIR)${lispdir}/subdirs.el
+ 	$(srcdir)/update-subdirs $(DESTDIR)${lispdir}
+-	if [ -f $(DESTDIR)${datadir}/emacs/${version}/site-lisp/subdirs.el ]; \
++	if [ -f $(DESTDIR)${datadir}/emacs-${version}/site-lisp/subdirs.el ]; \
+ 	then true; \
+ 	else \
+ 	  (echo "(if (fboundp 'normal-top-level-add-subdirs-to-load-path)"; \
+ 	   echo "    (normal-top-level-add-subdirs-to-load-path))") \
+-	    > $(DESTDIR)${datadir}/emacs/${version}/site-lisp/subdirs.el; \
++	    > $(DESTDIR)${datadir}/emacs-${version}/site-lisp/subdirs.el; \
+ 	fi
+-	chmod a+r $(DESTDIR)${datadir}/emacs/${version}/site-lisp/subdirs.el
++	chmod a+r $(DESTDIR)${datadir}/emacs-${version}/site-lisp/subdirs.el
+ 	-if [ -f $(DESTDIR)${datadir}/emacs/site-lisp/subdirs.el ]; \
+ 	then true; \
+ 	else \
+@@ -619,7 +619,7 @@ mkdir: FRC
+ 	$(srcdir)/mkinstalldirs ${COPYDESTS} $(DESTDIR)${infodir} $(DESTDIR)${man1dir} \
+ 	  $(DESTDIR)${bindir} $(DESTDIR)${docdir} $(DESTDIR)${libexecdir} \
+ 	  $(DESTDIR)${datadir}/emacs/site-lisp \
+-	  $(DESTDIR)${datadir}/emacs/${version}/site-lisp \
++	  $(DESTDIR)${datadir}/emacs-${version}/site-lisp \
+ 	  $(DESTDIR)`echo ${locallisppath} | sed 's,:, $(DESTDIR),g'` \
+ 	  $(DESTDIR)${desktopdir} $${icondirs}
+ 
+diff -up emacs-23.0.60/configure.in.orig emacs-23.0.60/configure.in
+--- emacs-23.0.60/configure.in.orig	2008-08-29 05:31:27.000000000 +0900
++++ emacs-23.0.60/configure.in	2008-09-08 06:36:48.000000000 +0900
+@@ -31,7 +31,7 @@ dnl --program-transform-name options
+ AC_ARG_PROGRAM
+ 
+ lispdir='${datadir}/emacs/${version}/lisp'
+-locallisppath='${datadir}/emacs/${version}/site-lisp:'\
++locallisppath='${datadir}/emacs-${version}/site-lisp:'\
+ '${datadir}/emacs/site-lisp'
+ lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
+ etcdir='${datadir}/emacs/${version}/etc'

+ 12 - 0
e/emacs/emacs-23.1.90-fixed-resolution.patch

@@ -0,0 +1,12 @@
+diff -up emacs-23.1.90/src/xterm.c\~ emacs-23.1.90/src/xterm.c
+--- emacs-23.1.90/src/xterm.c~	2009-12-10 08:52:48.000000000 +0900
++++ emacs-23.1.90/src/xterm.c	2009-12-10 08:57:22.000000000 +0900
+@@ -10340,6 +10340,8 @@ x_term_init (display_name, xrm_option, r
+       mm = DisplayWidthMM (dpyinfo->display, screen_number);
+       /* Mac OS X 10.3's Xserver sometimes reports 0.0mm.  */
+       dpyinfo->resx = (mm < 1) ? 100 : pixels * 25.4 / mm;
++      dpyinfo->resy = 96;
++      dpyinfo->resx = 96;
+     }
+ 
+   dpyinfo->Xatom_wm_protocols

+ 22 - 0
e/emacs/emacs-local.el

@@ -0,0 +1,22 @@
+;; 
+;; Emacs local configuration file
+;; 
+;; This configuration is read at the end of site-start.el. 
+;; Emacs configuration files are read
+;;   - distribution wide from site-start.el 
+;;   - system wide from this configuration file
+;;   - per user from ~/.emacs.el, 
+;; where per user settings override system wide settings, 
+;; and system wide settings override site-start.el. 
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+
+
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; Local Variables:
+;; mode: emacs-lisp
+;; End:

+ 12 - 0
e/emacs/emacs23.desktop.in

@@ -0,0 +1,12 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=Emacs23 Editor
+Name[ja]=Emacs23 エディタ
+Comment=popular, very full featured text editor
+Comment[ja]=有名で高機能なテキストエディタ
+Icon=emacs
+Exec=emacs-@@EMACS_VERSION@@
+Type=Application
+MimeType=text/plain;
+Categories=Application;Utility;TextEditor;
+Terminal=false

+ 34 - 0
e/emacs/menu-tree-init.el.emacs23

@@ -0,0 +1,34 @@
+;;
+;; menu-tree-init.el
+;;  set default coding system and load menu-tree
+;;
+
+(set-language-environment 'Japanese)
+
+(if (equal (getenv "LANG") "ja_JP.eucJP")
+  (progn
+    (prefer-coding-system  'euc-jp-unix)
+    ;; (set-default-coding-systems 'euc-jp)
+    ;; (set-buffer-file-coding-system 'euc-jp-unix)
+    ;; (set-terminal-coding-system 'euc-jp)
+    ;; (set-keyboard-coding-system 'euc-jp)
+    ;; (setq menu-tree-coding-system 'euc-jp)
+    )
+  (progn
+    (cond ((<= emacs-major-version 21)
+      (require 'un-define)))
+    (prefer-coding-system  'utf-8-unix)
+    ;; (set-default-coding-systems 'utf-8)
+    ;; (set-buffer-file-coding-system 'utf-8-unix)
+    ;; (set-terminal-coding-system 'utf-8)
+    ;; (set-keyboard-coding-system 'utf-8)
+    ;; (setq menu-tree-coding-system 'utf-8)
+    )
+)
+
+(if (and (>= emacs-major-version 21)
+         (equal (substring (concat (getenv "LANG") "__") 0 2) "ja"))
+    (progn
+      (require 'menu-tree)
+      )
+  )

+ 40 - 0
e/emacs/showvdefaultemacs

@@ -0,0 +1,40 @@
+#!/bin/bash
+# 	$Id: showemacsvl,v 1.2 2009/05/20 15:31:29 munepi Exp munepi $	
+
+# showemacsvl --version [version] [optional: package list]
+if [ $# -ne 1 ]; then
+    cat<<EOF
+Usage:	$(basename $0) <version>
+EOF
+    exit 1
+fi
+
+VERSION=$1
+
+if [ $(egrep -m 1 $VERSION /var/lib/emacsen-common/installed-flavors) ]; then
+    FLAVOR=$(egrep -m 1 $VERSION /var/lib/emacsen-common/installed-flavors)
+else
+    exit 1
+fi
+
+[ -d /etc/${FLAVOR} ] || exit 1
+
+ORDER="base faces"
+ORDER="${ORDER} $(ls /etc/${FLAVOR}/site-start.d/*-init.el | \
+    sed -e "s!.*/[0-9]*\(.*\)-init\.el!\1!g")"
+
+LIST="$(find /usr/share/${FLAVOR}/site-lisp/ \
+    -regex '.*/vine-default.*\.el')"
+
+for PKG in $ORDER; do
+    if [ $(echo "$LIST" | egrep $PKG) ]; then
+	EL=$(echo "$LIST" | egrep $PKG | head -1)
+	echo ";;; Begin $EL"
+	cat $EL
+	echo ";;; End of $EL"
+	echo ""
+    fi
+done
+
+exit
+

+ 98 - 0
e/emacs/site-start.el.emacs23

@@ -0,0 +1,98 @@
+;;; Emacs default settings for Vine Linux
+(defcustom emacs-ime (getenv "EMACS_IME")
+  "A variable of default Input Method Editor"
+  :type 'string)
+(if (null emacs-ime)
+    (setq emacs-ime "scim"))
+
+(defcustom vine-default t
+  "A boolean for all Vine Linux default settings"
+  :type 'boolean)
+(if (equal (getenv "LOGNAME") "root") 
+    (setq vine-default nil))
+
+(defcustom vine-default-base t
+  "A boolean for vine-default-base"
+  :type 'boolean)
+
+(defcustom vine-default-faces t
+  "A boolean for vine-default-faces"
+  :type 'boolean)
+
+;; (defcustom vine-default-mouse t
+;;   "A boolean for vine-default-mouse"
+;;   :type 'boolean)
+
+;; (defcustom vine-default-misc t
+;;   "A boolean for vine-default-misc"
+;;   :type 'boolean)
+
+(defvar vine-default-setup-hook nil
+  "*List of functions to be called at vine-default-setup")
+
+(defvar after-vine-default-setup-hook nil
+  "*List of functions to be called at the end of vine-default-setup")
+
+(defun vine-default-setup ()
+  "a function for setup to default configurations of Vine Linux."
+  (if vine-default
+      (progn
+	(if vine-default-base (require 'vine-default-base))
+	(if vine-default-faces (require 'vine-default-faces))
+	;; (if vine-default-mouse (require 'vine-default-mouse))
+	;; (if vine-default-misc (require 'vine-default-misc))
+	(run-hooks 'vine-default-setup-hook)
+	(run-hooks 'after-vine-default-setup-hook)
+	)
+    )
+  )
+
+(add-hook 'after-init-hook 'vine-default-setup)
+
+
+(defun show-vine-default ()
+  (interactive)
+  (let ((command nil) (version nil)
+	(major (number-to-string emacs-major-version)) 
+	(minor (number-to-string emacs-minor-version)))
+    (setq version (concat major "." minor))
+    (setq command (concat "showvdefaultemacs " version))
+    (shell-command command)
+    )
+  )
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+
+;; Aspell is a replacement for ispell
+;;(setq-default ispell-program-name "aspell")
+
+;; Add python support
+;(require 'python-mode)
+;(setq auto-mode-alist
+;      (cons '("\\.py$" . python-mode) auto-mode-alist))
+;(setq interpreter-mode-alist
+;      (cons '("python" . python-mode) interpreter-mode-alist))
+
+;; run functions from the /usr/share/emacs/site-lisp/site-start.d directory
+;; Files in this directory ending with ".el" are run on startup
+
+;(mapc 'load (directory-files "/usr/share/emacs/site-lisp/site-start.d" t "\\.el\\'"))
+(mapc 'load (directory-files "/etc/emacs-EMACS_VERSION/site-start.d" t "\\.el\\'"))
+
+;; Use the rpm-spec-mode for spec files
+;(require 'rpm-spec-mode)
+;(setq auto-mode-alist
+;      (cons '("\\.spec$" . rpm-spec-mode) auto-mode-alist))
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; load local settings at the end of site-start.el for local system
+(if (file-exists-p (expand-file-name "/etc/emacs/emacs-23-local.el"))
+    (load (expand-file-name "/etc/emacs/emacs-23-local.el") nil t nil))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; Local Variables:
+;; mode: emacs-lisp
+;; End:

+ 158 - 0
e/emacs/vine-default-base.el

@@ -0,0 +1,158 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;  -*- coding: utf-8-unix -*-
+;;  FSF Emacs 23 用 Vine Linux 基本設定
+;;    Munehiro Yamamoto <munepi@cg8.so-net.ne.jp>
+;;	$Id: vine-default-base.el,v 1.4 2010/01/04 11:21:29 munepi Exp $
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; ;;; 言語環境の指定
+;; (set-language-environment "Japanese")
+
+;;; emacsclient サーバを起動
+;(server-start)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;;; メニューバーを消す
+;(menu-bar-mode 0)
+
+;;; emacs -nw で起動した時にメニューバーを消す
+(unless window-system (menu-bar-mode 0))
+
+;;; 画面最下行で[↓]を押したときのスクロール数
+;(setq scroll-step 1)
+
+;;; ツールバーを消す
+(tool-bar-mode 0)
+
+;;; cursor の blink を止める
+(blink-cursor-mode 0)
+
+;;; active でない window の空 cursor を出さない
+(setq cursor-in-non-selected-windows 0)
+
+;;; フォントのスケールをしない
+(setq scalable-fonts-allowed 0)
+
+;;; image.el における JPEG の判定基準を緩める
+;(eval-after-load "image"
+; '(setq image-type-regexps
+;   (cons (cons "^\377\330" 'jpeg) image-type-regexps)))
+
+;;; 表示の行間を拡げる
+(setq line-spacing 2)
+
+;;; タブ幅
+;(setq tab-width 4)
+
+;;; [Home] Key と [End] Key を従来の動作に戻す
+(define-key global-map [home] 'beginning-of-buffer)
+(define-key global-map [end] 'end-of-buffer)
+
+;;; C-h と Del の入れ替え
+;;; Help が Shift + Ctrl + h および Del に割当てられ、
+;;; 前一文字削除が Ctrl + h に割当てられます
+;(load-library "term/keyswap")
+;(if (eq window-system 'x)
+;    (progn
+;      (define-key function-key-map [delete] [8])
+;      (put 'delete 'ascii-character 8)))
+
+;;; Ctrl-H を前1文字削除に変更
+(define-key global-map "" 'backward-delete-char)
+
+;; ;;; Ctrl-z で undo
+;; (global-set-key "\C-z" 'undo)
+
+;; ;;; \M-p, \M-n でパラグラフ単位で移動
+;; (global-set-key "\M-p" 'backward-paragraph)
+;; (global-set-key "\M-n" 'forward-paragraph)
+
+;;; Emacs23 からは C-n や C-p での移動が物理行単位になっていたので、
+;;; 以前と同じ論理行単位の移動へ変更
+(setq line-move-visual 0)
+
+;;; スクロールバーを右側に表示する
+(set-scroll-bar-mode 'right)
+
+;;; gzファイルも編集できるように
+(auto-compression-mode 1)
+
+;;; visible-bell
+(setq visible-bell 1)
+
+;;; 行番号を表示する
+(line-number-mode 1)
+
+;; ;;; diff -up 
+;; (setq diff-switches "-up")
+
+;;; Dired の設定
+;; Dired のリストフォーマット設定 (ls へのオプション)
+;; (setq dired-listing-switches "-aoFLt")
+;; ls の出力を英語にする(ls を LANG=C で実行)
+(add-hook 'dired-mode-hook  '(lambda ()(setenv "LANG" "C")))
+
+;;; diredでディレクトリを先に表示
+(setq ls-lisp-dirs-first 1)
+
+;; ;;; 一行が 80 字以上になった時には自動改行する
+;; (setq fill-column 80)
+;; (setq text-mode-hook 'turn-on-auto-fill)
+;; (setq default-major-mode 'text-mode)
+
+;; ;;; ステータスラインに時間を表示する
+;; (if (or (and (>= emacs-major-version 20)
+;;              (not (equal (getenv "LANG") "ja_JP.UTF-8")))
+;;         (>= emacs-major-version 22))
+;;     (progn
+;;       (setq dayname-j-alist
+;;            '(("Sun" . "日") ("Mon" . "月") ("Tue" . "火") ("Wed" . "水")
+;;              ("Thu" . "木") ("Fri" . "金") ("Sat" . "土")))
+;;       (setq display-time-string-forms
+;;            '((format "%s年%s月%s日(%s) %s:%s %s"
+;;                      year month day
+;;                      (cdr (assoc dayname dayname-j-alist))
+;;                      24-hours minutes
+;; 		     load)))
+;;       ))
+;; (display-time)
+
+;;; 印刷設定
+;(setq-default lpr-switches '("-Pepson"))
+(setq-default lpr-switches '("-2P"))
+(setq-default lpr-command "mpage")
+
+;;; ps-print
+(setq ps-multibyte-buffer 'non-latin-printer)
+(if (>= emacs-major-version 21)
+    (progn
+      (require 'ps-mule)
+      (defalias 'ps-mule-header-string-charsets 'ignore)))
+
+;;; バッファの最後でnewlineで新規行を追加するのを禁止する
+(setq next-line-add-newlines 0)
+
+;;; mark 領域に色付け
+;(setq transient-mark-mode 1)
+
+;; ;;; 最終更新日の自動挿入
+;; ;;;   ファイルの先頭から 8 行以内に Time-stamp: <> または
+;; ;;;   Time-stamp: " " と書いてあれば、セーブ時に自動的に日付が挿入されます
+;; (if (not (memq 'time-stamp write-file-hooks))
+;;     (setq write-file-hooks
+;;           (cons 'time-stamp write-file-hooks)))
+
+;;; shell-mode
+;; shell の出力するエスケープシーケンスによる色付き文字を
+;; 正しく表示する
+(autoload 'ansi-color-for-comint-mode-on "ansi-color" nil t)
+(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(provide 'vine-default-base)
+
+;; Local Variables:
+;; mode: emacs-lisp
+;; End:

+ 87 - 0
e/emacs/vine-default-faces.el

@@ -0,0 +1,87 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;  -*- coding: utf-8-unix -*-
+;;  FSF Emacs 23 用 Vine Linux フォント/カラー設定
+;;    Munehiro Yamamoto <munepi@cg8.so-net.ne.jp>
+;;	$Id: vine-default-faces.el,v 1.11 2009/07/25 14:04:04 munepi Exp $	
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(if (and window-system
+	 (string-match "^23\." emacs-version))
+    (progn
+      (setq desktop-gnome-interface-monospace-font-name 
+	    (replace-regexp-in-string "\n" "" 
+		(shell-command-to-string 
+		   "bash -c \'gconftool-2 --get /desktop/gnome/interface/monospace_font_name 2> /dev/null\'")))
+      (if (null desktop-gnome-interface-monospace-font-name)
+	  (setq desktop-gnome-interface-monospace-font-name "Monospace 10"));; default
+
+      (set-frame-font desktop-gnome-interface-monospace-font-name)
+
+      (unless (assoc 'font default-frame-alist)
+	(add-to-list 'default-frame-alist 
+		     '(font . desktop-gnome-interface-monospace-font-name))
+	(setcdr (assoc 'font default-frame-alist) 
+		desktop-gnome-interface-monospace-font-name))
+
+      ;; (set-fontset-font (frame-parameter nil 'font)
+      ;; 			'japanese-jisx0208
+      ;; 			'("VLゴシック regular" . "iso10646-1"))
+      ;; (set-fontset-font (frame-parameter nil 'font)
+      ;; 			'katakana-jisx0201
+      ;; 			'("VLゴシック regular" . "iso10646-1"))
+      ;; (set-fontset-font (frame-parameter nil 'font)
+      ;; 			'japanese-jisx0213-1
+      ;; 			'("VLゴシック regular" . "iso10646-1"))
+      ;; (set-fontset-font (frame-parameter nil 'font)
+      ;; 			'japanese-jisx0213-2
+      ;; 			'("VLゴシック regular" . "iso10646-1"))
+      )
+  )
+
+(if (string-match "^22\." emacs-version)
+  (progn
+    (utf-translate-cjk-mode t)
+    (utf-translate-cjk-set-unicode-range
+     '((#x00a2 . #x00a3)                    ; ¢, £
+       (#x00a7 . #x00a8)                    ; §, ¨
+       (#x00ac . #x00ac)                    ; ¬
+       (#x00b0 . #x00b1)                    ; °, ±
+       (#x00b4 . #x00b4)                    ; ´
+       (#x00b6 . #x00b6)                    ; ¶
+       (#x00d7 . #x00d7)                    ; ×
+       (#X00f7 . #x00f7)                    ; ÷
+       (#x0370 . #x03ff)                    ; Greek and Coptic
+       (#x0400 . #x04FF)                    ; Cyrillic
+       (#x2000 . #x206F)                    ; General Punctuation
+       (#x2100 . #x214F)                    ; Letterlike Symbols
+       (#x2190 . #x21FF)                    ; Arrows
+       (#x2200 . #x22FF)                    ; Mathematical Operators
+       (#x2300 . #x23FF)                    ; Miscellaneous Technical
+       (#x2500 . #x257F)                    ; Box Drawing
+       (#x25A0 . #x25FF)                    ; Geometric Shapes
+       (#x2600 . #x26FF)                    ; Miscellaneous Symbols
+       (#x2e80 . #xd7a3) (#xff00 . #xffef)))
+    )
+  )
+
+;; ;; フォントカラーと背景色
+;; (if window-system
+;;     (progn 
+;;       (set-face-background 'default "#333366")
+;;       (set-face-foreground 'default "white")
+;;       (set-face-background 'mode-line "grey94") 
+;;       (set-cursor-color "white")
+;;       )
+;;   (progn
+;;     (set-face-background 'default "000000")
+;;     (set-face-foreground 'default "ffffff")
+;;     )
+;;   )
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(provide 'vine-default-faces)
+
+;; Local Variables:
+;; mode: emacs-lisp
+;; End: