Compare commits
164 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
e5547c622c | ||
|
bcfcf417af | ||
|
80f7309567 | ||
|
7ff61f3baf | ||
|
2c859feb50 | ||
|
079c3e4c4b | ||
|
a48f5e94c6 | ||
|
94063cf9fb | ||
|
d34a4e6dd2 | ||
|
ee03921afd | ||
|
57a6af4dbd | ||
|
02e7102e12 | ||
|
9b6bf433f4 | ||
|
6640ce1e84 | ||
|
a7089d46f2 | ||
|
3e1fcd930d | ||
|
72baf3ba40 | ||
|
0833ad8a9d | ||
|
4096738ed0 | ||
|
2404959531 | ||
|
6a78362603 | ||
|
ee6e89cb00 | ||
|
39dd907f4c | ||
|
3f782452f7 | ||
|
054aa9b8b3 | ||
|
a99c1f23e5 | ||
|
f0b02fca90 | ||
|
e9a1922c09 | ||
|
26d38fcaad | ||
|
c540676711 | ||
|
268f61d09a | ||
|
a5241e575f | ||
|
826628f94d | ||
|
b42c1425a5 | ||
|
d2eb5c3d50 | ||
|
cdd89c5317 | ||
|
d8e620feb9 | ||
|
e91b49a8b2 | ||
|
dd4e26a4fd | ||
|
7a4a6381e5 | ||
|
5bd52a2b13 | ||
|
6edcb89b3a | ||
|
89c9e86869 | ||
|
f7868d3adc | ||
|
a5ba09c6fa | ||
|
1c70e02e91 | ||
|
da270fa8ba | ||
|
b5705b2cc5 | ||
|
87babc59db | ||
|
9b843cdc9c | ||
|
e10f938013 | ||
|
085fd72936 | ||
|
2c8a9d879a | ||
|
c7d7c32db6 | ||
|
6c150556f7 | ||
|
935f20d669 | ||
|
ae265f8daf | ||
|
b3a62b9aa2 | ||
|
517853fdc6 | ||
|
7978c19130 | ||
|
40fc2d8f87 | ||
|
51b8262a30 | ||
|
d48d09a51a | ||
|
7b71024a36 | ||
|
86061689ae | ||
|
844bdeddb0 | ||
|
20e336b51d | ||
|
cf4d179af5 | ||
|
53d9dd116f | ||
|
b9d8656246 | ||
|
6568c06a5e | ||
|
52b4d18561 | ||
|
94a5305f80 | ||
|
00a2bac09d | ||
|
59ddf58c41 | ||
|
eb0e381e9c | ||
|
e4dbc3784c | ||
|
c2d156d336 | ||
|
e460cd5407 | ||
|
7c0320af53 | ||
|
c8aae53adb | ||
|
76fe04e735 | ||
|
1c4cbd27db | ||
|
793c99ea88 | ||
|
9915abb255 | ||
|
e79bd97150 | ||
|
7371b8295d | ||
|
756a65e2ac | ||
|
abf4f953de | ||
|
9b41cae5d6 | ||
|
4d00c8b56d | ||
|
1d841ca894 | ||
|
0ad3b93ecf | ||
|
6162d5653d | ||
|
fbc0328bd7 | ||
|
1d5d7a4575 | ||
|
e251807ddf | ||
|
3bc64682b3 | ||
|
4d89c3431c | ||
|
6249b6e3d4 | ||
|
e3c96a376e | ||
|
30f054973a | ||
|
e380fcdbd1 | ||
|
aca8d86ff4 | ||
|
645b93c707 | ||
|
3dd3f9b564 | ||
|
1f60836382 | ||
|
f8bea702fd | ||
|
ec853266c7 | ||
|
b4d3efe729 | ||
|
936644ba42 | ||
|
44bc50f825 | ||
|
28a1eb11df | ||
|
1eb48ca728 | ||
|
d43272e130 | ||
|
e37d7a15a5 | ||
|
123f5d1c93 | ||
|
9fa5a7c682 | ||
|
48385e7890 | ||
|
e1d391b427 | ||
|
c78f7c1113 | ||
|
c0b6cc97a5 | ||
|
475652cd32 | ||
|
f731541162 | ||
|
61f4bac6d7 | ||
|
f2895e0d47 | ||
|
ce72b2acdc | ||
|
5af9bb32d1 | ||
|
536a584023 | ||
|
0903318305 | ||
|
42b37dec2c | ||
|
8786448b59 | ||
|
1f1fbdda08 | ||
|
de02d0df08 | ||
|
3608cbbc38 | ||
|
7020381da5 | ||
|
9c876c0319 | ||
|
e4b45a26af | ||
|
34a88e927f | ||
|
711c894ac5 | ||
|
4d1a72a532 | ||
|
d1b4b17d10 | ||
|
a4050581f6 | ||
|
06ea613a9a | ||
|
f1e443eac0 | ||
|
5c9984c1e8 | ||
|
0fa6331639 | ||
|
b489fb6822 | ||
|
af57368ed1 | ||
|
445eba96ac | ||
|
0f5a618fbe | ||
|
3339b7006c | ||
|
c845a1d7b9 | ||
|
1c59dc3673 | ||
|
6839eabe82 | ||
|
8184b4690d | ||
|
621bbc595a | ||
|
ef46af6703 | ||
|
4b8931ea93 | ||
|
bd2ea9113b | ||
|
259a2e2222 | ||
|
b134d8ca63 | ||
|
2d973287f9 | ||
|
119a7eceb6 |
@ -1,5 +0,0 @@
|
||||
elisp-manual-21-2.6.tar.bz2
|
||||
emacs-20.7.tar.bz2
|
||||
emacs-asian.tar.bz2
|
||||
gnus-5.8.8-compiled.tar.bz2
|
||||
leim-20.7.tar.bz2
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
emacs-23.2.tar.bz2
|
6
Makefile
6
Makefile
@ -1,6 +0,0 @@
|
||||
# Makefile for source rpm: emacs
|
||||
# $Id$
|
||||
NAME := emacs
|
||||
SPECFILE = $(firstword $(wildcard *.spec))
|
||||
|
||||
include ../common/Makefile.common
|
6
default.el
Normal file
6
default.el
Normal file
@ -0,0 +1,6 @@
|
||||
;;; default.el - loaded after ".emacs" on startup
|
||||
;;;
|
||||
;;; Setting `inhibit-default-init' non-nil in "~/.emacs"
|
||||
;;; prevents loading of this file. Also the "-q" option to emacs
|
||||
;;; prevents both "~/.emacs" and this file from being loaded at startup.
|
||||
|
20
dotemacs.el
Normal file
20
dotemacs.el
Normal file
@ -0,0 +1,20 @@
|
||||
;; .emacs
|
||||
|
||||
;;; uncomment this line to disable loading of "default.el" at startup
|
||||
;; (setq inhibit-default-init t)
|
||||
|
||||
;; enable visual feedback on selections
|
||||
;(setq transient-mark-mode t)
|
||||
|
||||
;; default to better frame titles
|
||||
(setq frame-title-format
|
||||
(concat "%b - emacs@" (system-name)))
|
||||
|
||||
;; default to unified diffs
|
||||
(setq diff-switches "-u")
|
||||
|
||||
;; always end a file with a newline
|
||||
;(setq require-final-newline 'query)
|
||||
|
||||
;;; uncomment for CJK utf-8 support for non-Asian users
|
||||
;; (require 'un-define)
|
44
emacs-23.1-xdg.patch
Normal file
44
emacs-23.1-xdg.patch
Normal file
@ -0,0 +1,44 @@
|
||||
diff -up emacs-23.1/lisp/net/browse-url.el.xdg emacs-23.1/lisp/net/browse-url.el
|
||||
--- emacs-23.1/lisp/net/browse-url.el.xdg 2009-09-18 15:10:03.000000000 -0400
|
||||
+++ emacs-23.1/lisp/net/browse-url.el 2009-09-18 15:18:51.000000000 -0400
|
||||
@@ -234,6 +234,7 @@ associated with the first REGEXP which m
|
||||
function is passed the URL and any other args of `browse-url'. The last
|
||||
regexp should probably be \".\" to specify a default browser."
|
||||
:type '(choice
|
||||
+ (function-item :tag "Default freedesktop.org browser" :value browse-url-default-xdg-browser)
|
||||
(function-item :tag "Emacs W3" :value browse-url-w3)
|
||||
(function-item :tag "W3 in another Emacs via `gnudoit'"
|
||||
:value browse-url-w3-gnudoit)
|
||||
@@ -266,6 +267,23 @@ regexp should probably be \".\" to speci
|
||||
:version "21.1"
|
||||
:group 'browse-url)
|
||||
|
||||
+;;;###autoload
|
||||
+(defcustom browse-url-xdg-open-program "xdg-open"
|
||||
+ "*The name by which to invoke xdg-open."
|
||||
+ :type 'string
|
||||
+ :group 'browse-url)
|
||||
+
|
||||
+
|
||||
+;;;###autoload
|
||||
+(defun browse-url-default-xdg-browser (url &optional new-window)
|
||||
+ (interactive (browse-url-interactive-arg "URL: "))
|
||||
+ (let ((process-environment (browse-url-process-environment))
|
||||
+ (process-connection-type nil))
|
||||
+ (start-process (concat browse-url-xdg-open-program " " url) nil
|
||||
+ browse-url-xdg-open-program url)))
|
||||
+
|
||||
+
|
||||
+
|
||||
(defcustom browse-url-netscape-program "netscape"
|
||||
;; Info about netscape-remote from Karl Berry.
|
||||
"The name by which to invoke Netscape.
|
||||
@@ -876,6 +894,8 @@ The order attempted is gnome-moz-remote,
|
||||
Galeon, Konqueror, Netscape, Mosaic, Lynx in an xterm, and then W3."
|
||||
(apply
|
||||
(cond
|
||||
+ ((executable-find browse-url-xdg-open-program)
|
||||
+ 'browse-url-default-xdg-browser)
|
||||
((executable-find browse-url-gnome-moz-program) 'browse-url-gnome-moz)
|
||||
((executable-find browse-url-mozilla-program) 'browse-url-mozilla)
|
||||
((executable-find browse-url-firefox-program) 'browse-url-firefox)
|
17
emacs-23.2-hideshow-comment.patch
Normal file
17
emacs-23.2-hideshow-comment.patch
Normal file
@ -0,0 +1,17 @@
|
||||
--- lisp/progmodes/hideshow.el.orig 2010-05-12 18:28:06.543936429 +0200
|
||||
+++ lisp/progmodes/hideshow.el 2010-05-12 18:27:40.212936751 +0200
|
||||
@@ -691,9 +691,11 @@ Return point, or nil if original point w
|
||||
;; look backward for the start of a block that contains the cursor
|
||||
(while (and (re-search-backward hs-block-start-regexp nil t)
|
||||
(not (setq done
|
||||
- (< here (save-excursion
|
||||
- (hs-forward-sexp (match-data t) 1)
|
||||
- (point)))))))
|
||||
+ (and (< here
|
||||
+ (save-excursion
|
||||
+ (hs-forward-sexp (match-data t) 1)
|
||||
+ (point)))
|
||||
+ (eq (hs-inside-comment-p) nil))))))
|
||||
(if done
|
||||
(point)
|
||||
(goto-char here)
|
14
emacs-23.2-m17ncheck.patch
Normal file
14
emacs-23.2-m17ncheck.patch
Normal file
@ -0,0 +1,14 @@
|
||||
diff -up emacs-23.2/src/ftfont.c.m17ncheck emacs-23.2/src/ftfont.c
|
||||
--- emacs-23.2/src/ftfont.c.m17ncheck 2010-05-11 11:22:19.977753842 +0200
|
||||
+++ emacs-23.2/src/ftfont.c 2010-05-11 11:22:44.545753979 +0200
|
||||
@@ -1578,8 +1578,8 @@ ftfont_otf_capability (font)
|
||||
|
||||
#ifdef HAVE_M17N_FLT
|
||||
|
||||
-#if ((LIBOTF_MAJOR_VERSION > 1) || (LIBOTF_RELEASE_NUMBER >= 10) \
|
||||
- && (M17NLIB_MAJOR_VERSION > 1) || (M17NLIB_MINOR_VERSION >= 6))
|
||||
+#if (((LIBOTF_MAJOR_VERSION > 1) || (LIBOTF_RELEASE_NUMBER >= 10)) \
|
||||
+ && ((M17NLIB_MAJOR_VERSION > 1) || (M17NLIB_MINOR_VERSION >= 6)))
|
||||
/* We can use the new feature of libotf and m17n-flt to handle the
|
||||
character encoding scheme introduced in Unicode 5.1 and 5.2 for
|
||||
some Agian scripts. */
|
26
emacs-23.2-spacing.patch
Normal file
26
emacs-23.2-spacing.patch
Normal file
@ -0,0 +1,26 @@
|
||||
diff --git a/src/ftfont.c b/src/ftfont.c
|
||||
index 4ebc4be..bac9a4f 100644
|
||||
--- a/src/ftfont.c
|
||||
+++ b/src/ftfont.c
|
||||
@@ -1262,7 +1262,7 @@ ftfont_open (f, entity, pixel_size)
|
||||
spacing = XINT (AREF (entity, FONT_SPACING_INDEX));
|
||||
else
|
||||
spacing = FC_PROPORTIONAL;
|
||||
- if (spacing != FC_PROPORTIONAL)
|
||||
+ if (spacing != FC_PROPORTIONAL && spacing != FC_DUAL)
|
||||
font->min_width = font->average_width = font->space_width
|
||||
= (scalable ? ft_face->max_advance_width * size / upEM
|
||||
: ft_face->size->metrics.max_advance >> 6);
|
||||
diff --git a/src/xftfont.c b/src/xftfont.c
|
||||
index 82701ce..e74ce31 100644
|
||||
--- a/src/xftfont.c
|
||||
+++ b/src/xftfont.c
|
||||
@@ -418,7 +418,7 @@ xftfont_open (f, entity, pixel_size)
|
||||
ascii_printable[i] = ' ' + i;
|
||||
}
|
||||
BLOCK_INPUT;
|
||||
- if (spacing != FC_PROPORTIONAL)
|
||||
+ if (spacing != FC_PROPORTIONAL && spacing != FC_DUAL)
|
||||
{
|
||||
font->min_width = font->average_width = font->space_width
|
||||
= xftfont->max_advance_width;
|
11
emacs-terminal.desktop
Normal file
11
emacs-terminal.desktop
Normal file
@ -0,0 +1,11 @@
|
||||
[Desktop Entry]
|
||||
Name=Emacs Terminal
|
||||
GenericName=Emacs Terminal
|
||||
Comment=Emacs Terminal Mode
|
||||
Exec=emacs-terminal
|
||||
Icon=utilities-terminal
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Categories=Application;Utility;X-Red-Hat-Base;GTK;TerminalEmulator;
|
||||
Encoding=UTF-8
|
||||
StartupWMClass=Emacs
|
3
emacs-terminal.sh
Normal file
3
emacs-terminal.sh
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
exec emacs -Q --eval '(ansi-term "/bin/bash")'
|
@ -1,31 +1,13 @@
|
||||
[Desktop Entry]
|
||||
Name=Emacs
|
||||
Name[eo]=Emakso
|
||||
Name[et]=Emacs tekstiredaktor
|
||||
Comment=Emacs
|
||||
Comment[ca]=Editor Emacs
|
||||
Comment[cs]=Editor Emacs
|
||||
Comment[eo]=La redaktilo Emakso
|
||||
Comment[et]=Võimas tekstiredaktor Emacs
|
||||
Comment[fi]=Emacs editori
|
||||
Comment[fr]=Éditeur Emacs
|
||||
Comment[hu]=Emacs szövegszerkesztő
|
||||
Comment[is]=Emacs-ritill
|
||||
Comment[mk]=Софистицираниот Emacs уредувач
|
||||
Comment[no]=Emacs-tekstredigerer
|
||||
Comment[pt]=Editor Emacs
|
||||
Comment[ro]=Editorul Emacs
|
||||
Comment[ru]=Редактор Emacs
|
||||
Comment[sk]=Editor Emacs
|
||||
Comment[sl]=Urejevalnik Emacs
|
||||
Comment[uk]=Редактор Emacs
|
||||
BinaryPattern=
|
||||
Protocols=
|
||||
GenericName=Text Editor
|
||||
Comment=Edit text
|
||||
Comment[zh_TW]=編輯文字
|
||||
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
|
||||
Exec=emacs %f
|
||||
Icon=emacs.png
|
||||
TerminalOptions=
|
||||
Path=
|
||||
Type=Application
|
||||
Terminal=0
|
||||
MapNotify=false
|
||||
Terminal=false
|
||||
Categories=Application;Utility;TextEditor;X-Red-Hat-Base;
|
||||
Encoding=UTF-8
|
||||
StartupWMClass=Emacs
|
||||
|
1608
emacs.spec
1608
emacs.spec
File diff suppressed because it is too large
Load Diff
3
focus-init.el
Normal file
3
focus-init.el
Normal file
@ -0,0 +1,3 @@
|
||||
(when window-system
|
||||
;; make switching frames works properly under the default click-to-focus
|
||||
(setq focus-follows-mouse nil))
|
11
glibc-open-macro.patch
Normal file
11
glibc-open-macro.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- emacs-22.1/src/sound.c~ 2007-03-06 07:14:14.000000000 -0500
|
||||
+++ emacs-22.1/src/sound.c 2007-08-09 15:54:52.117018000 -0400
|
||||
@@ -1469,7 +1469,7 @@ Internal use only, use `play-sound' inst
|
||||
error ("No usable sound device driver found");
|
||||
|
||||
/* Open the device. */
|
||||
- current_sound_device->open (current_sound_device);
|
||||
+ (current_sound_device->open) (current_sound_device);
|
||||
|
||||
/* Play the sound. */
|
||||
current_sound->play (current_sound, current_sound_device);
|
7
php-mode-init.el
Normal file
7
php-mode-init.el
Normal file
@ -0,0 +1,7 @@
|
||||
;; Use php-mode for .php,.php3,.php4 and .phtml files
|
||||
|
||||
(autoload 'php-mode "php-mode" "Major mode for editing PHP code." t)
|
||||
|
||||
(add-to-list 'auto-mode-alist
|
||||
'("\\.php[34]\\'\\|\\.php\\'\\|\\.phtml\\'" . php-mode))
|
||||
|
1121
php-mode.el
Normal file
1121
php-mode.el
Normal file
File diff suppressed because it is too large
Load Diff
13
po-mode-auto-replace-date-71264.patch
Normal file
13
po-mode-auto-replace-date-71264.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff -u po-mode.el~ po-mode.el
|
||||
--- po-mode.el~ 2003-01-16 01:44:50.000000000 +0900
|
||||
+++ po-mode.el 2003-01-16 01:44:50.000000000 +0900
|
||||
@@ -1267,8 +1267,7 @@
|
||||
(concat "\"PO-Revision-Date: "
|
||||
(format-time-string "%Y-%m-%d %H:%M" time)
|
||||
zone "\\n\"")
|
||||
- t t))))
|
||||
- (message ""))
|
||||
+ t t)))))
|
||||
(message (_"PO-Revision-Date should be adjusted..."))))
|
||||
|
||||
;;; Handling span of entry, entry type and entry attributes.
|
5
po-mode-init.el
Normal file
5
po-mode-init.el
Normal file
@ -0,0 +1,5 @@
|
||||
;; Use po-mode for translation files
|
||||
|
||||
(autoload 'po-mode "po-mode"
|
||||
"Major mode for translators to edit PO files" t)
|
||||
(add-to-list 'auto-mode-alist '("\\.po\\'\\|\\.po\\." . po-mode))
|
3314
po-mode.el
Normal file
3314
po-mode.el
Normal file
File diff suppressed because it is too large
Load Diff
3104
python-mode.el
3104
python-mode.el
File diff suppressed because it is too large
Load Diff
4
rpm-spec-mode-init.el
Normal file
4
rpm-spec-mode-init.el
Normal file
@ -0,0 +1,4 @@
|
||||
;; rpm-spec-mode for spec files
|
||||
|
||||
(autoload 'rpm-spec-mode "rpm-spec-mode" "RPM spec mode." t)
|
||||
(add-to-list 'auto-mode-alist '("\\.spec\\(\\.in\\)?$" . rpm-spec-mode))
|
31
rpm-spec-mode-utc.patch
Normal file
31
rpm-spec-mode-utc.patch
Normal file
@ -0,0 +1,31 @@
|
||||
--- rpm-spec-mode.el~ 2009-06-11 11:01:53.000000000 +0200
|
||||
+++ rpm-spec-mode.el 2009-06-11 11:05:24.000000000 +0200
|
||||
@@ -708,6 +708,17 @@
|
||||
|
||||
;;------------------------------------------------------------
|
||||
|
||||
+(defvar rpm-change-log-uses-utc nil
|
||||
+ "*If non-nil, \\[rpm-add-change-log-entry] will use Universal time (UTC).
|
||||
+If this is nil, it uses local time as returned by `current-time'.
|
||||
+
|
||||
+This variable is global by default, but you can make it buffer-local.")
|
||||
+
|
||||
+(defsubst rpm-change-log-date-string ()
|
||||
+ "Return the date string for today, inserted by \\[rpm-add-change-log-entry].
|
||||
+If `rpm-change-log-uses-utc' is nil, \"today\" means the local time zone."
|
||||
+ (format-time-string "%a %b %e %Y" nil rpm-change-log-uses-utc))
|
||||
+
|
||||
(defun rpm-add-change-log-entry (&optional change-log-entry)
|
||||
"Find change log and add an entry for today."
|
||||
(interactive "sChange log entry: ")
|
||||
@@ -715,8 +726,8 @@
|
||||
(rpm-goto-section "changelog")
|
||||
(let* ((address (rpm-spec-user-mail-address))
|
||||
(fullname (or rpm-spec-user-full-name (user-full-name)))
|
||||
- (string (concat "* " (substring (current-time-string) 0 11)
|
||||
- (substring (current-time-string) -4) " "
|
||||
+ (system-time-locale "C")
|
||||
+ (string (concat "* " (rpm-change-log-date-string) " "
|
||||
fullname " <" address ">"
|
||||
(and rpm-spec-insert-changelog-version
|
||||
(concat " - " (rpm-find-spec-version t))))))
|
923
rpm-spec-mode.el
923
rpm-spec-mode.el
File diff suppressed because it is too large
Load Diff
91
rpm-spec-mode.patch
Normal file
91
rpm-spec-mode.patch
Normal file
@ -0,0 +1,91 @@
|
||||
--- rpm-spec-mode.el~ 2008-04-22 15:14:40.000000000 -0400
|
||||
+++ rpm-spec-mode.el 2008-04-22 16:19:09.000000000 -0400
|
||||
@@ -63,7 +63,9 @@
|
||||
|
||||
;;; Code:
|
||||
|
||||
-(defconst rpm-spec-mode-version "0.12.3x" "Version of `rpm-spec-mode'.")
|
||||
+(require 'compile)
|
||||
+
|
||||
+(defconst rpm-spec-mode-version "0.12.3x.rh1" "Version of `rpm-spec-mode'.")
|
||||
|
||||
(defgroup rpm-spec nil
|
||||
"RPM spec mode with Emacs/XEmacs enhancements."
|
||||
@@ -189,11 +191,6 @@
|
||||
:type 'boolean
|
||||
:group 'rpm-spec)
|
||||
|
||||
-(defcustom rpm-spec-use-compilation-mode t
|
||||
- "*If non-nil, build in `compilation-mode' if it's available."
|
||||
- :type 'boolean
|
||||
- :group 'rpm-spec)
|
||||
-
|
||||
(defcustom rpm-spec-default-release "1"
|
||||
"*Default value for the Release tag in new spec files."
|
||||
:type 'string
|
||||
@@ -225,6 +222,11 @@
|
||||
:type 'string
|
||||
:group 'rpm-spec)
|
||||
|
||||
+(defcustom rpm-spec-auto-topdir nil
|
||||
+ "*Automatically detect an rpm build directory tree and define _topdir."
|
||||
+ :type 'boolean
|
||||
+ :group 'rpm-spec)
|
||||
+
|
||||
(defgroup rpm-spec-faces nil
|
||||
"Font lock faces for `rpm-spec-mode'."
|
||||
:prefix "rpm-spec-"
|
||||
@@ -1025,20 +1027,30 @@
|
||||
(setq buildoptions (cons "--nodeps" buildoptions)))
|
||||
(if (and rpm-spec-sign-gpg (not rpm-no-gpg))
|
||||
(setq buildoptions (cons "--sign" buildoptions)))
|
||||
- (save-excursion
|
||||
- (set-buffer (get-buffer rpm-buffer-name))
|
||||
- (and rpm-spec-use-compilation-mode
|
||||
- (fboundp 'compilation-mode)
|
||||
- (compilation-mode))
|
||||
- (goto-char (point-max)))
|
||||
- (let* ((process-environment (cons "EMACS=t" process-environment))
|
||||
- (process
|
||||
- (apply 'start-process rpm-spec-build-command rpm-buffer-name
|
||||
- rpm-spec-build-command buildoptions)))
|
||||
- (if (and rpm-spec-sign-gpg (not rpm-no-gpg))
|
||||
- (let ((rpm-passwd-cache (read-passwd "GPG passphrase: ")))
|
||||
- (process-send-string process (concat rpm-passwd-cache "\n"))))
|
||||
- (set-process-filter process 'rpm-command-filter)))
|
||||
+
|
||||
+ (if rpm-spec-auto-topdir
|
||||
+ (if (string-match ".*/SPECS/$" default-directory)
|
||||
+ (let ((topdir (expand-file-name default-directory)))
|
||||
+ (setq buildoptions
|
||||
+ (cons
|
||||
+ (concat "--define \"_topdir "
|
||||
+ (replace-regexp-in-string "/SPECS/$" "" topdir)
|
||||
+ "\"")
|
||||
+ buildoptions)))))
|
||||
+
|
||||
+ (progn
|
||||
+ (defun list->string (lst)
|
||||
+ (if (cdr lst)
|
||||
+ (concat (car lst) " " (list->string (cdr lst)))
|
||||
+ (car lst)))
|
||||
+ (compilation-start (list->string (cons rpm-spec-build-command buildoptions)) 'rpmbuild-mode))
|
||||
+
|
||||
+ (if (and rpm-spec-sign-gpg (not rpm-no-gpg))
|
||||
+ (let ((build-proc (get-buffer-process
|
||||
+ (get-buffer
|
||||
+ (compilation-buffer-name "rpmbuild" nil nil))))
|
||||
+ (rpm-passwd-cache (read-passwd "GPG passphrase: ")))
|
||||
+ (process-send-string build-proc (concat rpm-passwd-cache "\n")))))
|
||||
|
||||
(defun rpm-build-prepare (&optional arg)
|
||||
"Run a `rpmbuild -bp'."
|
||||
@@ -1409,5 +1421,8 @@
|
||||
;;;###autoload(add-to-list 'auto-mode-alist '("\\.spec\\(\\.in\\)?$" . rpm-spec-mode))
|
||||
|
||||
(provide 'rpm-spec-mode)
|
||||
+;;;###autoload
|
||||
+(define-compilation-mode rpmbuild-mode "RPM build" ""
|
||||
+ (set (make-local-variable 'compilation-disable-input) t))
|
||||
|
||||
;;; rpm-spec-mode.el ends here
|
@ -1,20 +1,5 @@
|
||||
;; Aspell is a replacement for ispell
|
||||
(setq-default ispell-program-name "aspell")
|
||||
;;; loaded before user's ".emacs" file and default.el
|
||||
|
||||
;; 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
|
||||
|
||||
(require 'cl) ; mapc isn't built into emacs 20
|
||||
(mapc 'load (directory-files "/usr/share/emacs/site-lisp/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 ".el" files in "/usr/share/emacs/site-lisp/site-start.d/" on startup
|
||||
(mapc 'load
|
||||
(directory-files "/usr/share/emacs/site-lisp/site-start.d" t "\\.el\\'"))
|
||||
|
6
sources
6
sources
@ -1,5 +1 @@
|
||||
367bc83b70bd10b8908549087b73530d elisp-manual-21-2.6.tar.bz2
|
||||
7c55c72e7cc8f1cb49b57b670b82dba2 emacs-20.7.tar.bz2
|
||||
606b7415499a88b839a7cf414e3caaa8 emacs-asian.tar.bz2
|
||||
9395bc6d85f12471ee8f1f9bd6988d9e gnus-5.8.8-compiled.tar.bz2
|
||||
112c8f7493ef295fc9022feb4653eab0 leim-20.7.tar.bz2
|
||||
057a0379f2f6b85fb114d8c723c79ce2 emacs-23.2.tar.bz2
|
||||
|
201
ssl.el
Normal file
201
ssl.el
Normal file
@ -0,0 +1,201 @@
|
||||
;;; ssl.el,v --- ssl functions for emacsen without them builtin
|
||||
;; Author: wmperry
|
||||
;; Created: 1999/10/14 12:44:18
|
||||
;; Version: 1.2
|
||||
;; Keywords: comm
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;; Copyright (c) 1995, 1996 by William M. Perry <wmperry@cs.indiana.edu>
|
||||
;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc.
|
||||
;;;
|
||||
;;; This file is part of GNU Emacs.
|
||||
;;;
|
||||
;;; GNU Emacs is free software; you can redistribute it and/or modify
|
||||
;;; it under the terms of the GNU General Public License as published by
|
||||
;;; the Free Software Foundation; either version 2, or (at your option)
|
||||
;;; any later version.
|
||||
;;;
|
||||
;;; GNU Emacs is distributed in the hope that it will be useful,
|
||||
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;;; GNU General Public License for more details.
|
||||
;;;
|
||||
;;; You should have received a copy of the GNU General Public License
|
||||
;;; along with GNU Emacs; see the file COPYING. If not, write to the
|
||||
;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
;;; Boston, MA 02111-1307, USA.
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(require 'cl)
|
||||
(require 'base64)
|
||||
|
||||
(eval-and-compile
|
||||
(condition-case ()
|
||||
(require 'custom)
|
||||
(error nil))
|
||||
(if (and (featurep 'custom) (fboundp 'custom-declare-variable))
|
||||
nil ;; We've got what we needed
|
||||
;; We have the old custom-library, hack around it!
|
||||
(defmacro defgroup (&rest args)
|
||||
nil)
|
||||
(defmacro defcustom (var value doc &rest args)
|
||||
(` (defvar (, var) (, value) (, doc))))))
|
||||
|
||||
(defgroup ssl nil
|
||||
"Support for `Secure Sockets Layer' encryption."
|
||||
:group 'comm)
|
||||
|
||||
(defcustom ssl-certificate-directory "~/.w3/certs/"
|
||||
"*Directory to store CA certificates in"
|
||||
:group 'ssl
|
||||
:type 'directory)
|
||||
|
||||
(defcustom ssl-rehash-program-name "c_rehash"
|
||||
"*Program to run after adding a cert to a directory .
|
||||
Run with one argument, the directory name."
|
||||
:group 'ssl
|
||||
:type 'string)
|
||||
|
||||
(defcustom ssl-view-certificate-program-name "x509"
|
||||
"*The program to run to provide a human-readable view of a certificate."
|
||||
:group 'ssl
|
||||
:type 'string)
|
||||
|
||||
(defcustom ssl-view-certificate-program-arguments '("-text" "-inform" "DER")
|
||||
"*Arguments that should be passed to the certificate viewing program.
|
||||
The certificate is piped to it.
|
||||
Maybe a way of passing a file should be implemented"
|
||||
:group 'ssl
|
||||
:type 'list)
|
||||
|
||||
(defcustom ssl-certificate-directory-style 'ssleay
|
||||
"*Style of cert database to use, the only valid value right now is `ssleay'.
|
||||
This means a directory of pem encoded certificates with hash symlinks."
|
||||
:group 'ssl
|
||||
:type '(choice (const :tag "SSLeay" :value ssleay)
|
||||
(const :tag "OpenSSL" :value openssl)))
|
||||
|
||||
(defcustom ssl-certificate-verification-policy 0
|
||||
"*How far up the certificate chain we should verify."
|
||||
:group 'ssl
|
||||
:type '(choice (const :tag "No verification" :value 0)
|
||||
(const :tag "Verification required" :value 1)
|
||||
(const :tag "Reject connection if verification fails" :value 3)
|
||||
(const :tag "SSL_VERIFY_CLIENT_ONCE" :value 5)))
|
||||
|
||||
(defcustom ssl-program-name "openssl"
|
||||
"*The program to run in a subprocess to open an SSL connection."
|
||||
:group 'ssl
|
||||
:type 'string)
|
||||
|
||||
(defcustom ssl-program-arguments
|
||||
'("s_client"
|
||||
"-quiet"
|
||||
"-host" host
|
||||
"-port" service
|
||||
"-verify" (int-to-string ssl-certificate-verification-policy)
|
||||
"-CApath" ssl-certificate-directory
|
||||
)
|
||||
"*Arguments that should be passed to the program `ssl-program-name'.
|
||||
This should be used if your SSL program needs command line switches to
|
||||
specify any behaviour (certificate file locations, etc).
|
||||
The special symbols 'host and 'port may be used in the list of arguments
|
||||
and will be replaced with the hostname and service/port that will be connected
|
||||
to."
|
||||
:group 'ssl
|
||||
:type 'list)
|
||||
|
||||
(defun ssl-certificate-information (der)
|
||||
"Return an assoc list of information about a certificate in DER format."
|
||||
(let ((certificate (concat "-----BEGIN CERTIFICATE-----\n"
|
||||
(base64-encode-string der)
|
||||
"\n-----END CERTIFICATE-----\n"))
|
||||
(exit-code 0))
|
||||
(save-excursion
|
||||
(set-buffer (get-buffer-create " *openssl*"))
|
||||
(erase-buffer)
|
||||
(insert certificate)
|
||||
(setq exit-code (condition-case ()
|
||||
(call-process-region (point-min) (point-max)
|
||||
ssl-program-name
|
||||
t (list (current-buffer) nil) t
|
||||
"x509"
|
||||
"-subject" ; Print the subject DN
|
||||
"-issuer" ; Print the issuer DN
|
||||
"-dates" ; Both before and after dates
|
||||
"-serial" ; print out serial number
|
||||
"-noout" ; Don't spit out the certificate
|
||||
)
|
||||
(error -1)))
|
||||
(if (/= exit-code 0)
|
||||
nil
|
||||
(let ((vals nil))
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward "^\\([^=\n\r]+\\)\\s *=\\s *\\(.*\\)" nil t)
|
||||
(push (cons (match-string 1) (match-string 2)) vals))
|
||||
vals)))))
|
||||
|
||||
(defun ssl-accept-ca-certificate ()
|
||||
"Ask if the user is willing to accept a new CA certificate. The buffer-name
|
||||
should be the intended name of the certificate, and the buffer should probably
|
||||
be in DER encoding"
|
||||
;; TODO, check if it is really new or if we already know it
|
||||
(let* ((process-connection-type nil)
|
||||
(tmpbuf (generate-new-buffer "X509 CA Certificate Information"))
|
||||
(response (save-excursion
|
||||
(and (eq 0
|
||||
(apply 'call-process-region
|
||||
(point-min) (point-max)
|
||||
ssl-view-certificate-program-name
|
||||
nil tmpbuf t
|
||||
ssl-view-certificate-program-arguments))
|
||||
(switch-to-buffer tmpbuf)
|
||||
(goto-char (point-min))
|
||||
(or (recenter) t)
|
||||
(yes-or-no-p
|
||||
"Accept this CA to vouch for secure server identities? ")
|
||||
(kill-buffer tmpbuf)))))
|
||||
(if (not response)
|
||||
nil
|
||||
(if (not (file-directory-p ssl-certificate-directory))
|
||||
(make-directory ssl-certificate-directory))
|
||||
(case ssl-certificate-directory-style
|
||||
(ssleay
|
||||
(base64-encode-region (point-min) (point-max))
|
||||
(goto-char (point-min))
|
||||
(insert "-----BEGIN CERTIFICATE-----\n")
|
||||
(goto-char (point-max))
|
||||
(insert "-----END CERTIFICATE-----\n")
|
||||
(let ((f (expand-file-name
|
||||
(concat (file-name-sans-extension (buffer-name)) ".pem")
|
||||
ssl-certificate-directory)))
|
||||
(write-file f)
|
||||
(call-process ssl-rehash-program-name
|
||||
nil nil nil
|
||||
(expand-file-name ssl-certificate-directory))))))))
|
||||
|
||||
(defun open-ssl-stream (name buffer host service)
|
||||
"Open a SSL connection for a service to a host.
|
||||
Returns a subprocess-object to represent the connection.
|
||||
Input and output work as for subprocesses; `delete-process' closes it.
|
||||
Args are NAME BUFFER HOST SERVICE.
|
||||
NAME is name for process. It is modified if necessary to make it unique.
|
||||
BUFFER is the buffer (or buffer-name) to associate with the process.
|
||||
Process output goes at end of that buffer, unless you specify
|
||||
an output stream or filter function to handle the output.
|
||||
BUFFER may be also nil, meaning that this process is not associated
|
||||
with any buffer
|
||||
Third arg is name of the host to connect to, or its IP address.
|
||||
Fourth arg SERVICE is name of the service desired, or an integer
|
||||
specifying a port number to connect to."
|
||||
(if (integerp service) (setq service (int-to-string service)))
|
||||
(let* ((process-connection-type nil)
|
||||
(port service)
|
||||
(proc (eval
|
||||
(`
|
||||
(start-process name buffer ssl-program-name
|
||||
(,@ ssl-program-arguments))))))
|
||||
(process-kill-without-query proc)
|
||||
proc))
|
||||
|
||||
(provide 'ssl)
|
Loading…
Reference in New Issue
Block a user