PATCH packages
This fixes two problems with eshell, one merely cosmetic. The
cosmetic problem is that the file esh-groups.el is generated, but is
not treated as such by the current Makefile. The other problem is
that eshell invokes resize-temp-buffer-window, which we do not supply.
I put it in here and made it defun-when-void so that the fix will
work for all released versions of XEmacs. However, I am interested in
opinions about a long-term home for that function. Note that ECB also
calls it, but is broken right now for other reasons.
Index: xemacs-packages/eshell/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/eshell/ChangeLog,v
retrieving revision 1.31
diff -u -r1.31 ChangeLog
--- xemacs-packages/eshell/ChangeLog 4 Sep 2007 11:19:06 -0000 1.31
+++ xemacs-packages/eshell/ChangeLog 9 Apr 2008 19:38:20 -0000
@@ -1,3 +1,9 @@
+2008-04-09 Jerry James <james(a)xemacs.org>
+
+ * Makefile (GENERATED_LISP): esh-groups.el is generated.
+ * esh-maint.el (resize-temp-buffer-window): New function for
+ compatibility with Emacs.
+
2007-09-04 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 1.12 released.
Index: xemacs-packages/eshell/Makefile
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/eshell/Makefile,v
retrieving revision 1.20
diff -u -r1.20 Makefile
--- xemacs-packages/eshell/Makefile 4 Sep 2007 11:19:06 -0000 1.20
+++ xemacs-packages/eshell/Makefile 9 Apr 2008 19:38:20 -0000
@@ -35,8 +35,10 @@
DATA_FILES =
DATA_DEST =
-EXTRA_SOURCES = esh-groups.el
+GENERATED_LISP = esh-groups.el
STANDARD_DOCS = t
include ../../XEmacs.rules
+
+esh-groups.el: esh-module.elc
Index: xemacs-packages/eshell/esh-maint.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/eshell/esh-maint.el,v
retrieving revision 1.1
diff -u -r1.1 esh-maint.el
--- xemacs-packages/eshell/esh-maint.el 10 Jan 2001 02:52:55 -0000 1.1
+++ xemacs-packages/eshell/esh-maint.el 9 Apr 2008 19:38:20 -0000
@@ -46,6 +46,27 @@
(require 'cl)
(setq cl-optimize-speed 9))
+(defun-when-void resize-temp-buffer-window ()
+ "Resize the selected window to fit its contents.
+Will not make it higher than `temp-buffer-max-height' nor smaller than
+`window-min-height'. Do nothing if it is the only window on its frame, if it
+is not as wide as the frame or if some of the window's contents are scrolled
+out of view."
+ (let ((w (selected-window)))
+ ;; First try to make it smaller
+ (shrink-window-if-larger-than-buffer w)
+
+ ;; Next try to make it bigger
+ (when (and (not (one-window-p 'nomini))
+ (pos-visible-in-window-p (point-min) w)
+ (window-leftmost-p w)
+ (window-rightmost-p w))
+ (let ((max-height (min (round (* (frame-height) temp-buffer-max-height))
+ (resize-minibuffer-count-window-lines)))
+ (cur-height (window-height w)))
+ (if (< cur-height max-height)
+ (enlarge-window (- max-height cur-height) nil w))))))
+
(defun eshell-generate-autoloads ()
(interactive)
(require 'autoload)
--
Jerry James
http://loganjerry.googlepages.com/
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches