From 4117d08c08a88336c4c6d7cf2b576b4260105809 Mon Sep 17 00:00:00 2001 From: Naohiro Aota Date: Fri, 21 Oct 2011 07:43:19 +0000 Subject: [PATCH] Add a patch to work on emacs24. Bug #385167 Package-Manager: portage-2.2.0_alpha67/cvs/Linux x86_64 --- app-emacs/popwin/ChangeLog | 8 +- app-emacs/popwin/Manifest | 11 +- .../popwin/files/popwin-0.3-emacs24.patch | 135 ++++++++++++++++++ ...popwin-0.3.ebuild => popwin-0.3-r1.ebuild} | 5 +- 4 files changed, 151 insertions(+), 8 deletions(-) create mode 100644 app-emacs/popwin/files/popwin-0.3-emacs24.patch rename app-emacs/popwin/{popwin-0.3.ebuild => popwin-0.3-r1.ebuild} (71%) diff --git a/app-emacs/popwin/ChangeLog b/app-emacs/popwin/ChangeLog index fa00fd855053..87e12f5dc33b 100644 --- a/app-emacs/popwin/ChangeLog +++ b/app-emacs/popwin/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-emacs/popwin # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-emacs/popwin/ChangeLog,v 1.2 2011/10/08 09:28:15 ulm Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emacs/popwin/ChangeLog,v 1.3 2011/10/21 07:43:19 naota Exp $ + +*popwin-0.3-r1 (21 Oct 2011) + + 21 Oct 2011; Naohiro Aota -popwin-0.3.ebuild, + +popwin-0.3-r1.ebuild, +files/popwin-0.3-emacs24.patch: + Add a patch to work on emacs24 08 Oct 2011; Ulrich Mueller files/50popwin-gentoo.el, popwin-0.3.ebuild: diff --git a/app-emacs/popwin/Manifest b/app-emacs/popwin/Manifest index 48210a32b905..c2948bd84ed8 100644 --- a/app-emacs/popwin/Manifest +++ b/app-emacs/popwin/Manifest @@ -2,14 +2,15 @@ Hash: SHA1 AUX 50popwin-gentoo.el 336 RMD160 b74c230ee9f2aba500e24a572b85df5ed7b678d7 SHA1 e118efeca00d73ac7bf2dc4c7dbf1ab5e83b4922 SHA256 83b93e883091c14a5dacda9fad6352e2bf23377c52f498cb2e8acce21ac65bd8 +AUX popwin-0.3-emacs24.patch 5227 RMD160 62161470f2597921f3dd747ae255cdf6063bb8b5 SHA1 1511e8d88feadff4fc5aaddb75f4858fad077ed5 SHA256 abc32a358a5ddd382635384a339677c8ae87b089b37246e1bf90aed540aebe57 DIST popwin-0.3.tar.gz 10394 RMD160 53c7faa406c04f8b39bf2ad1a7318e8b69ba40e8 SHA1 c6c64aad328373883915eed7b7f26cc881efeafa SHA256 bdeea5f66cd8b0b842347ee1127fc18ec88eb7b6e1c2cc1eac7c8588bdcc50de -EBUILD popwin-0.3.ebuild 590 RMD160 85b7336f19fde9a56f5de34724b43e40abc8128e SHA1 3d2ac49e83a79ed0077e85c4b59b013a44b1dcb8 SHA256 5a0651a609d10bd70cd1b2de00c28cbede750ca0ad6affdbd9c40b27e5f5f6c6 -MISC ChangeLog 582 RMD160 2e5af954679360965290cd0c9cc4c50561868125 SHA1 2df5b05b2a02c54662bcd1a3847a89704dcfd30a SHA256 a618ef3fc7918be0dde3b9ccee2a90b32944c48790b466317a734a99e662ca26 +EBUILD popwin-0.3-r1.ebuild 653 RMD160 66e27ad7e7c22a8895d6cac66ea44fde865ea603 SHA1 9cfbf0e3e3342f0bfb400323e83775cda925a16e SHA256 eb04944cfd3e3221a2b58083d81aa81d6c67f0795f2528030ff427206e9aafe1 +MISC ChangeLog 773 RMD160 dfdd02f433514a39797f2370f999d654c0a9219a SHA1 4e0e3387572dfcb569e6df256543d782d96fdf8e SHA256 61c92b65c2c55b9781aceb6fbc485b3d76ef16bb0bef83178388e02fc8bb3f6d MISC metadata.xml 219 RMD160 41cade9174d0ed71f0dde58144f74c2012b6b210 SHA1 e65a33d1c83bed3c61fb637a64aee0b331f2635a SHA256 9761d87f8c96c0a11b7e70f79b5e9013081f5bda009290e02879c8501c3dc817 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) -iEYEARECAAYFAk6QGXUACgkQOeoy/oIi7uy/8gCfTghLVGjs5xNwiBvo0dGF6ayQ -uWoAoMjHpm9ydAzMJf20gFnj/2gASahP -=QC1f +iEYEARECAAYFAk6hIp0ACgkQGpDnPLSHuMAn0ACfX61//RiDZhdQcva/+RElEVds +M/kAnid3USyhJYpJlC69zVrDPjQ0hpM5 +=nEdC -----END PGP SIGNATURE----- diff --git a/app-emacs/popwin/files/popwin-0.3-emacs24.patch b/app-emacs/popwin/files/popwin-0.3-emacs24.patch new file mode 100644 index 000000000000..0aa7cb2d8ca6 --- /dev/null +++ b/app-emacs/popwin/files/popwin-0.3-emacs24.patch @@ -0,0 +1,135 @@ +diff --git a/popwin.el b/popwin.el +index 22f64f0..a5bafeb 100644 +--- a/popwin.el ++++ b/popwin.el +@@ -4,7 +4,7 @@ + + ;; Author: Tomohiro Matsuyama + ;; Keywords: convenience +-;; Version: 0.3 ++;; Version: 0.4 + + ;; This program is free software; you can redistribute it and/or modify + ;; it under the terms of the GNU General Public License as published by +@@ -69,7 +69,19 @@ + + + +-;;; Common API ++;;; Common ++ ++(defmacro popwin:save-selected-window (&rest body) ++ "Evaluate BODY saving the selected window." ++ `(with-selected-window (selected-window) ,@body)) ++ ++(defun popwin:switch-to-buffer (buffer-or-name &optional norecord) ++ "Call `switch-to-buffer' forcing BUFFER-OF-NAME be displayed in ++the selected window." ++ (with-no-warnings ++ (if (>= emacs-major-version 24) ++ (switch-to-buffer buffer-or-name norecord t) ++ (switch-to-buffer buffer-or-name norecord)))) + + (defun popwin:last-selected-window () + "Return currently selected window or lastly selected window if +@@ -82,6 +94,12 @@ minibuffer window is selected." + "Return t if BUFFER might be thought of as a buried buffer." + (eq (car (last (buffer-list))) buffer)) + ++(defun popwin:called-interactively-p () ++ (with-no-warnings ++ (if (>= emacs-major-version 23) ++ (called-interactively-p 'any) ++ (called-interactively-p)))) ++ + (defvar popwin:empty-buffer nil + "Marker buffer of indicating a window of the buffer is being a + popup window.") +@@ -142,7 +160,7 @@ horizontal factor HFACTOR, and vertical factor VFACTOR." + (cdr node) + (popwin:adjust-window-edges window edges hfactor vfactor) + (with-selected-window window +- (switch-to-buffer buffer t)) ++ (popwin:switch-to-buffer buffer t)) + (when selected + (select-window window))) + (destructuring-bind (dir edges . windows) node +@@ -221,7 +239,8 @@ window-configuration." + (root-win (popwin:last-selected-window)) + (hfactor 1) + (vfactor 1)) +- (delete-other-windows root-win) ++ (popwin:save-selected-window ++ (delete-other-windows root-win)) + (let ((root-width (window-width root-win)) + (root-height (window-height root-win))) + (when adjust +@@ -238,7 +257,7 @@ window-configuration." + (popwin:create-popup-window-1 root-win size position) + ;; Mark popup-win being a popup window. + (with-selected-window popup-win +- (switch-to-buffer (popwin:empty-buffer) t)) ++ (popwin:switch-to-buffer (popwin:empty-buffer) t)) + (popwin:replicate-window-config master-win root hfactor vfactor) + (list master-win popup-win))))) + +@@ -410,7 +429,7 @@ BUFFER." + popwin:selected-window (selected-window)) + (popwin:start-close-popup-window-timer)))) + (with-selected-window popwin:popup-window +- (switch-to-buffer buffer)) ++ (popwin:switch-to-buffer buffer)) + (setq popwin:popup-buffer buffer + popwin:popup-window-stuck-p stick) + (if noselect +@@ -438,6 +457,10 @@ be closed by `popwin:close-popup-window'." + + ;;; Special Display + ++(defmacro popwin:without-special-display (&rest body) ++ "Evaluate BODY without special displaying." ++ `(let (display-buffer-function special-display-function) ,@body)) ++ + (defcustom popwin:special-display-config + '(("*Help*") + ("*Completions*" :noselect t) +@@ -481,13 +504,19 @@ buffers will be shown at the left of the frame with width 80." + + (defun popwin:original-display-buffer (buffer &optional not-this-window) + "Call `display-buffer' for BUFFER without special displaying." +- (let (display-buffer-function special-display-function) +- ;; Close the popup window here so that the popup window won't to +- ;; be splitted. +- (when (and (eq (selected-window) popwin:popup-window) +- (not (same-window-p (buffer-name buffer)))) +- (popwin:close-popup-window)) +- (display-buffer buffer not-this-window))) ++ (popwin:without-special-display ++ ;; Close the popup window here so that the popup window won't to ++ ;; be splitted. ++ (when (and (eq (selected-window) popwin:popup-window) ++ (not (same-window-p (buffer-name buffer)))) ++ (popwin:close-popup-window)) ++ (if (and (>= emacs-major-version 24) ++ (boundp 'action) ++ (boundp 'frame)) ++ ;; Use variables ACTION and FRAME which are formal parameters ++ ;; of DISPLAY-BUFFER. ++ (display-buffer buffer action frame) ++ (display-buffer buffer not-this-window)))) + + (defun* popwin:display-buffer-1 (buffer-or-name &key default-config-keywords if-buffer-not-found if-config-not-found) + "Display BUFFER-OR-NAME, if possible, in a popup +@@ -548,9 +577,9 @@ usual. This function can be used as a value of + (popwin:display-buffer-1 + buffer-or-name + :if-config-not-found +- (unless (interactive-p) +- (lambda (buffer-or-name) +- (popwin:original-display-buffer buffer-or-name not-this-window))))) ++ (unless (popwin:called-interactively-p) ++ (lambda (buffer) ++ (popwin:original-display-buffer buffer not-this-window))))) + + (defun popwin:special-display-popup-window (buffer &rest ignore) + "The `special-display-function' with a popup window." diff --git a/app-emacs/popwin/popwin-0.3.ebuild b/app-emacs/popwin/popwin-0.3-r1.ebuild similarity index 71% rename from app-emacs/popwin/popwin-0.3.ebuild rename to app-emacs/popwin/popwin-0.3-r1.ebuild index 3ee9fced2911..bfe704019097 100644 --- a/app-emacs/popwin/popwin-0.3.ebuild +++ b/app-emacs/popwin/popwin-0.3-r1.ebuild @@ -1,11 +1,11 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-emacs/popwin/popwin-0.3.ebuild,v 1.2 2011/10/08 09:28:15 ulm Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emacs/popwin/popwin-0.3-r1.ebuild,v 1.1 2011/10/21 07:43:19 naota Exp $ EAPI=3 NEED_EMACS=22 -inherit elisp +inherit elisp eutils DESCRIPTION="Popup window manager for Emacs" HOMEPAGE="https://github.com/m2ym/popwin-el/" @@ -18,6 +18,7 @@ IUSE="" SITEFILE="50${PN}-gentoo.el" DOCS="README.markdown" +ELISP_PATCHES=( "${FILESDIR}/${P}-emacs24.patch" ) src_unpack() { unpack ${A} -- 2.26.2