summaryrefslogtreecommitdiff
path: root/app-editors/emacs/files
diff options
context:
space:
mode:
Diffstat (limited to 'app-editors/emacs/files')
-rw-r--r--app-editors/emacs/files/emacs-23.0.94-handle-xz-suffix.patch16
-rw-r--r--app-editors/emacs/files/emacs-23.1-backspace.patch54
-rw-r--r--app-editors/emacs/files/emacs-23.1-gtk-menu.patch199
3 files changed, 269 insertions, 0 deletions
diff --git a/app-editors/emacs/files/emacs-23.0.94-handle-xz-suffix.patch b/app-editors/emacs/files/emacs-23.0.94-handle-xz-suffix.patch
new file mode 100644
index 0000000..9345cea
--- /dev/null
+++ b/app-editors/emacs/files/emacs-23.0.94-handle-xz-suffix.patch
@@ -0,0 +1,16 @@
+Automatically handle .xz suffix (XZ-compressed files)
+From Jim Meyering <meyering@redhat.com> on emacs-devel
+
+--- a/lisp/jka-cmpr-hook.el
++++ b/lisp/jka-cmpr-hook.el
+@@ -219,6 +219,10 @@ options through Custom does this automatically."
+ "compressing" "gzip" ("-c" "-q")
+ "uncompressing" "gzip" ("-c" "-q" "-d")
+ t t "\037\213"]
++ ["\\.xz\\(~\\|\\.~[0-9]+~\\)?\\'"
++ "XZ compressing" "xz" ("-c" "-q")
++ "XZ uncompressing" "xz" ("-c" "-q" "-d")
++ t t "\3757zXZ\0"]
+ ;; dzip is gzip with random access. Its compression program can't
+ ;; read/write stdin/out, so .dz files can only be viewed without
+ ;; saving, having their contents decompressed with gzip.
diff --git a/app-editors/emacs/files/emacs-23.1-backspace.patch b/app-editors/emacs/files/emacs-23.1-backspace.patch
new file mode 100644
index 0000000..bc547af
--- /dev/null
+++ b/app-editors/emacs/files/emacs-23.1-backspace.patch
@@ -0,0 +1,54 @@
+2009-10-22 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * simple.el (normal-erase-is-backspace-mode): Use input-decode-map
+ rather than fiddling with global-map bindings, since it should only
+ affect per-terminal settings.
+ See http://bugs.gentoo.org/show_bug.cgi?id=289709.
+
+--- emacs-23.1-orig/lisp/simple.el
++++ emacs-23.1/lisp/simple.el
+@@ -6269,31 +6269,27 @@
+ (let* ((bindings
+ `(([M-delete] [M-backspace])
+ ([C-M-delete] [C-M-backspace])
+- (,esc-map
+- [C-delete] [C-backspace])))
++ ([?\e C-delete] [?\e C-backspace])))
+ (old-state (lookup-key local-function-key-map [delete])))
+
+ (if enabled
+ (progn
+ (define-key local-function-key-map [delete] [?\C-d])
+ (define-key local-function-key-map [kp-delete] [?\C-d])
+- (define-key local-function-key-map [backspace] [?\C-?]))
++ (define-key local-function-key-map [backspace] [?\C-?])
++ (dolist (b bindings)
++ ;; Not sure if input-decode-map is really right, but
++ ;; keyboard-translate-table (used below) only works
++ ;; for integer events, and key-translation-table is
++ ;; global (like the global-map, used earlier).
++ (define-key input-decode-map (car b) nil)
++ (define-key input-decode-map (cadr b) nil)))
+ (define-key local-function-key-map [delete] [?\C-?])
+ (define-key local-function-key-map [kp-delete] [?\C-?])
+- (define-key local-function-key-map [backspace] [?\C-?]))
+-
+- ;; Maybe swap bindings of C-delete and C-backspace, etc.
+- (unless (equal old-state (lookup-key local-function-key-map [delete]))
+- (dolist (binding bindings)
+- (let ((map global-map))
+- (when (keymapp (car binding))
+- (setq map (car binding) binding (cdr binding)))
+- (let* ((key1 (nth 0 binding))
+- (key2 (nth 1 binding))
+- (binding1 (lookup-key map key1))
+- (binding2 (lookup-key map key2)))
+- (define-key map key1 binding2)
+- (define-key map key2 binding1)))))))
++ (define-key local-function-key-map [backspace] [?\C-?])
++ (dolist (b bindings)
++ (define-key input-decode-map (car b) (cadr b))
++ (define-key input-decode-map (cadr b) (car b))))))
+ (t
+ (if enabled
+ (progn
diff --git a/app-editors/emacs/files/emacs-23.1-gtk-menu.patch b/app-editors/emacs/files/emacs-23.1-gtk-menu.patch
new file mode 100644
index 0000000..e7f51dc
--- /dev/null
+++ b/app-editors/emacs/files/emacs-23.1-gtk-menu.patch
@@ -0,0 +1,199 @@
+* Emacs should properly render dynamically generated menus.
+ Patch: fix-dynamic-menus.diff
+ Originally-reported-by: Baylis Shanks <bshanks3@hotmail.com>
+ Date: Sat, 10 Oct 2009 22:15:05 UTC
+ Added-by: Rob Browning <rlb@defaultvalue.org>
+ Status: incorporated upstream
+ Bug: 550541
+
+ This Debian patch is taken from this upstream commit:
+
+ commit 3715ffe3e3b2c64d113bf26d94aab559f8559e83
+ Author: Jan Djärv <jan.h.d@swipnet.se>
+ Date: Wed Sep 2 17:03:20 2009 +0000
+
+Index: b/src/ChangeLog
+===================================================================
+--- a/src/ChangeLog
++++ b/src/ChangeLog
+@@ -1,3 +1,19 @@
++2009-09-02 Jan Djärv <jan.h.d@swipnet.se>
++
++ * xterm.h: Rename x_non_menubar_window_to_frame to
++ x_menubar_window_to_frame
++
++ * xterm.c: Remove declarations also in xterm.h
++ (XTmouse_position): Do not return valid positions
++ for clicks in the menubar and the toolbar for Gtk+.
++
++ * xfns.c (x_any_window_to_frame): Assume less about Gtk+ internals,
++ if the widget for the event has the same top level as a frame,
++ return the frame.
++ (x_menubar_window_to_frame): Detect menu bar even with Gtk+
++ internal windows, bug #4122.
++ (x_non_menubar_window_to_frame): Remove.
++
+ 2009-07-29 Chong Yidong <cyd@stupidchicken.com>
+
+ * Version 23.1 released.
+Index: b/src/xfns.c
+===================================================================
+--- a/src/xfns.c
++++ b/src/xfns.c
+@@ -374,10 +374,7 @@
+ #ifdef USE_GTK
+ GtkWidget *gwdesc = xg_win_to_widget (dpyinfo->display, wdesc);
+ if (gwdesc != 0
+- && (gwdesc == x->widget
+- || gwdesc == x->edit_widget
+- || gwdesc == x->vbox_widget
+- || gwdesc == x->menubar_widget))
++ && gtk_widget_get_toplevel (gwdesc) == x->widget)
+ found = f;
+ #else
+ if (wdesc == XtWindow (x->widget)
+@@ -398,54 +395,6 @@
+ return found;
+ }
+
+-/* Likewise, but exclude the menu bar widget. */
+-
+-struct frame *
+-x_non_menubar_window_to_frame (dpyinfo, wdesc)
+- struct x_display_info *dpyinfo;
+- int wdesc;
+-{
+- Lisp_Object tail, frame;
+- struct frame *f;
+- struct x_output *x;
+-
+- if (wdesc == None) return 0;
+-
+- for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail))
+- {
+- frame = XCAR (tail);
+- if (!FRAMEP (frame))
+- continue;
+- f = XFRAME (frame);
+- if (!FRAME_X_P (f) || FRAME_X_DISPLAY_INFO (f) != dpyinfo)
+- continue;
+- x = f->output_data.x;
+- /* This frame matches if the window is any of its widgets. */
+- if (x->hourglass_window == wdesc)
+- return f;
+- else if (x->widget)
+- {
+-#ifdef USE_GTK
+- GtkWidget *gwdesc = xg_win_to_widget (dpyinfo->display, wdesc);
+- if (gwdesc != 0
+- && (gwdesc == x->widget
+- || gwdesc == x->edit_widget
+- || gwdesc == x->vbox_widget))
+- return f;
+-#else
+- if (wdesc == XtWindow (x->widget)
+- || wdesc == XtWindow (x->column_widget)
+- || wdesc == XtWindow (x->edit_widget))
+- return f;
+-#endif
+- }
+- else if (FRAME_X_WINDOW (f) == wdesc)
+- /* A tooltip frame. */
+- return f;
+- }
+- return 0;
+-}
+-
+ /* Likewise, but consider only the menu bar widget. */
+
+ struct frame *
+@@ -473,15 +422,14 @@
+ if (x->menubar_widget)
+ {
+ GtkWidget *gwdesc = xg_win_to_widget (dpyinfo->display, wdesc);
+- int found = 0;
+
+- BLOCK_INPUT;
++ /* This gives false positives, but the rectangle check in xterm.c
++ where this is called takes care of that. */
+ if (gwdesc != 0
+ && (gwdesc == x->menubar_widget
+- || gtk_widget_get_parent (gwdesc) == x->menubar_widget))
+- found = 1;
+- UNBLOCK_INPUT;
+- if (found) return f;
++ || gtk_widget_is_ancestor (x->menubar_widget, gwdesc)
++ || gtk_widget_is_ancestor (gwdesc, x->menubar_widget)))
++ return f;
+ }
+ #else
+ if (x->menubar_widget
+Index: b/src/xterm.c
+===================================================================
+--- a/src/xterm.c
++++ b/src/xterm.c
+@@ -109,8 +109,6 @@
+ #if defined (USE_X_TOOLKIT) || defined (USE_GTK)
+
+ extern void free_frame_menubar P_ ((struct frame *));
+-extern struct frame *x_menubar_window_to_frame P_ ((struct x_display_info *,
+- int));
+ #endif
+
+ #ifdef USE_X_TOOLKIT
+@@ -143,11 +141,6 @@
+
+ #endif /* USE_X_TOOLKIT */
+
+-#if ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK)
+-#define x_any_window_to_frame x_window_to_frame
+-#define x_top_window_to_frame x_window_to_frame
+-#endif
+-
+ #ifdef USE_X_TOOLKIT
+ #include "widget.h"
+ #ifndef XtNinitialState
+@@ -3915,7 +3908,14 @@
+
+ if (child == None || child == win)
+ break;
+-
++#ifdef USE_GTK
++ /* We don't wan't to know the innermost window. We
++ want the edit window. For non-Gtk+ the innermost
++ window is the edit window. For Gtk+ it might not
++ be. It might be the tool bar for example. */
++ if (x_window_to_frame (FRAME_X_DISPLAY_INFO (*fp), win))
++ break;
++#endif
+ win = child;
+ parent_x = win_x;
+ parent_y = win_y;
+@@ -3932,8 +3932,14 @@
+ parent_{x,y} are invalid, but that's okay, because we'll
+ never use them in that case.) */
+
++#ifdef USE_GTK
++ /* We don't wan't to know the innermost window. We
++ want the edit window. */
++ f1 = x_window_to_frame (FRAME_X_DISPLAY_INFO (*fp), win);
++#else
+ /* Is win one of our frames? */
+ f1 = x_any_window_to_frame (FRAME_X_DISPLAY_INFO (*fp), win);
++#endif
+
+ #ifdef USE_X_TOOLKIT
+ /* If we end up with the menu bar window, say it's not
+Index: b/src/xterm.h
+===================================================================
+--- a/src/xterm.h
++++ b/src/xterm.h
+@@ -374,7 +374,7 @@
+
+ #if defined (USE_X_TOOLKIT) || defined (USE_GTK)
+ extern struct frame *x_any_window_to_frame P_ ((struct x_display_info *, int));
+-extern struct frame *x_non_menubar_window_to_frame P_ ((struct x_display_info *, int));
++extern struct frame *x_menubar_window_to_frame P_ ((struct x_display_info *, int));
+ extern struct frame *x_top_window_to_frame P_ ((struct x_display_info *, int));
+ #endif
+