]> git.eshelyaron.com Git - emacs.git/commitdiff
(window-safely-shrinkable-p): Don't change the buffer-list.
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 9 Feb 2004 00:56:25 +0000 (00:56 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 9 Feb 2004 00:56:25 +0000 (00:56 +0000)
Don't allow shrink if there's a window on our right.

lisp/ChangeLog
lisp/window.el

index ad9cba1e4e0f404e452ce74160fa9ba1ffbf899d..df600d17960599841eb8d254e8bd05f9155b8d2b 100644 (file)
        (hollow-box-cursor-fringe-bitmap, hollow-square-fringe-bitmap)
        (bar-cursor-fringe-bitmap, hbar-cursor-fringe-bitmap)
        (empty-line-fringe-bitmap): Define standard fringe bitmaps id's.
-       
+
+2004-02-08  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * window.el (window-safely-shrinkable-p): Don't change the buffer-list.
+       Don't allow shrink if there's a window on our right.
+
+       * progmodes/prolog.el (prolog-program-name): Use gprolog if available.
+       (prolog-mode-syntax-table, prolog-mode-abbrev-table, prolog-mode-map):
+       Bring together declaration and initialization.
+       (prolog-mode-variables): Don't set the syntax table.
+       Don't set paragraph-start and comment-indent-function.
+       Add /*..*/ to the comment regexps.
+       (prolog-mode-commands): Remove.  Do it during init of prolog-mode-map.
+       (prolog-mode-map): Don't bind TAB.
+       (prolog-mode): Set the syntax table.
+       (prolog-comment-indent): Remove.
+       (inferior-prolog-mode-map): Initialize in the declaration.
+       (inferior-prolog-mode-syntax-table)
+       (inferior-prolog-mode-abbrev-table): New vars.
+       (inferior-prolog-mode): Derive from comint-mode.
+       (run-prolog): Avoid switch-to-buffer which can fail in dedicated and
+       minibuffer windows.
+
+       * progmodes/grep.el (grep-regexp-alist): Allow :, \t and (
+       in file names, as long as it is unabmiguous.
+
 2004-02-08  Andreas Schwab  <schwab@suse.de>
 
        * textmodes/reftex-toc.el
        * tar-mode.el (tar-parse-octal-integer-safe): Add missing format
        string argument.
 
-       * progmodes/xscheme.el (verify-xscheme-buffer): Fix format
-       strings.
+       * progmodes/xscheme.el (verify-xscheme-buffer): Fix format strings.
 
        * play/zone.el (zone-call): Fix format string.
 
-       * net/webjump.el (webjump-builtin): Add missing format string
-       argument.
+       * net/webjump.el (webjump-builtin): Add missing format string argument.
 
-       * midnight.el (midnight-delay-set): Remove extra format string
-       argument.
+       * midnight.el (midnight-delay-set): Remove extra format string argument.
 
-       * mail/rmail.el (rmail-get-new-mail): Remove useless use of
-       format.
+       * mail/rmail.el (rmail-get-new-mail): Remove useless use of format.
 
        * hexl.el (hexl-insert-char): Add missing format string argument.
 
@@ -55,8 +76,7 @@
        (vi-repeat-last-find-char): Likewise.
        (vi-locate-def): Likewise.
 
-       * emacs-lisp/lisp-mnt.el (lm-verify): Remove useless use of
-       format.
+       * emacs-lisp/lisp-mnt.el (lm-verify): Remove useless use of format.
 
        * ediff-util.el (ediff-toggle-read-only): Remove extra format
        string argument.
 
        * eshell/esh-mode.el (eshell-send-invisible): Fix format string.
 
-       * eshell/em-hist.el (eshell-hist-word-reference): Fix format
-       string.
+       * eshell/em-hist.el (eshell-hist-word-reference): Fix format string.
 
-       * emulation/viper-ex.el (ex-mark): Remove extra format string
-       argument.
+       * emulation/viper-ex.el (ex-mark): Remove extra format string argument.
 
-       * emacs-lisp/cl-macs.el (defstruct): Remove extra format string
-       argument.
+       * emacs-lisp/cl-macs.el (defstruct): Remove extra format string arg.
        (cl-struct-setf-expander): Likewise.
 
        * vc.el (with-vc-file): Fix unsafe uses of error.
index c4ae59e148f5f0764f5b41d27f2a4926d85e293d..91b91cfb158766a10f3a1d3353eb33e170a76c7d 100644 (file)
@@ -1,6 +1,6 @@
 ;;; window.el --- GNU Emacs window commands aside from those written in C
 
-;; Copyright (C) 1985, 1989, 1992, 1993, 1994, 2000, 2001, 2002
+;; Copyright (C) 1985, 1989, 1992, 1993, 1994, 2000, 2001, 2002, 2004
 ;;  Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
@@ -188,13 +188,11 @@ even if it is inactive."
 (defun window-safely-shrinkable-p (&optional window)
   "Non-nil if the WINDOW can be shrunk without shrinking other windows.
 If WINDOW is nil or omitted, it defaults to the currently selected window."
-  (save-selected-window
-    (when window (select-window window))
-    (or (and (not (eq window (frame-first-window)))
-            (= (car (window-edges))
-               (car (window-edges (previous-window)))))
-       (= (car (window-edges))
-          (car (window-edges (next-window)))))))
+  (with-selected-window (or window (selected-window))
+    (let ((edges (window-edges)))
+      (or (= (nth 2 edges) (nth 2 (window-edges (previous-window))))
+         (= (nth 0 edges) (nth 0 (window-edges (next-window))))))))
+
 
 (defun balance-windows ()
   "Make all visible windows the same height (approximately)."