summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2014-04-02 17:14:50 +0200
committerJuanma Barranquero <lekktu@gmail.com>2014-04-02 17:14:50 +0200
commit09aba8153a8297e415477dbfa9a8c7e999fb3457 (patch)
tree1b15e57f5cb0d6fb4cec8e2ca03747d9e7abf163
parentaf1a69f4d17a482c359d98c00ef86fac835b5fac (diff)
parentffcd5669d6a71dd9450a9c45b2ea67d3ddc7c988 (diff)
downloademacs-09aba8153a8297e415477dbfa9a8c7e999fb3457.tar.gz
Merge from emacs-24; up to 2014-03-28T01:39:30Z!rgm@gnu.org
-rw-r--r--ChangeLog5
-rw-r--r--configure.ac7
-rw-r--r--etc/CONTRIBUTE6
-rw-r--r--etc/NEWS17
-rw-r--r--lisp/ChangeLog27
-rw-r--r--lisp/cedet/ede/dired.el2
-rw-r--r--lisp/cedet/ede/project-am.el6
-rw-r--r--lisp/dired-aux.el2
-rw-r--r--lisp/dired.el2
-rw-r--r--lisp/emacs-lisp/package.el2
-rw-r--r--lisp/erc/erc-lang.el2
-rw-r--r--lisp/erc/erc-list.el2
-rw-r--r--lisp/gnus/nnmairix.el2
-rw-r--r--lisp/menu-bar.el7
-rw-r--r--lisp/progmodes/cc-guess.el5
-rw-r--r--lisp/simple.el61
-rw-r--r--lisp/vc/ediff.el6
-rw-r--r--nt/INSTALL55
-rw-r--r--src/ChangeLog19
-rw-r--r--src/conf_post.h4
-rw-r--r--src/frame.c41
-rw-r--r--src/xterm.c32
22 files changed, 172 insertions, 140 deletions
diff --git a/ChangeLog b/ChangeLog
index 3572267857c..6612f178304 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-04-02 Glenn Morris <rgm@gnu.org>
+
+ * configure.ac: Make the final "Does Emacs use Gsettings" message
+ consistent with src/config.h.
+
2014-03-31 Jan Djärv <jan.h.d@swipnet.se>
* configure.ac: Fix errors from previous checkin (GSettings check).
diff --git a/configure.ac b/configure.ac
index db5f12149c1..9ad24630784 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2438,7 +2438,6 @@ if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then
old_LIBS=$LIBS
LIBS="$LIBS $GSETTINGS_LIBS"
AC_MSG_CHECKING([whether GSettings is in gio])
- GSETTINGS_COMPILES=no
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[/* Check that gsettings really is present. */
@@ -2449,10 +2448,10 @@ if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then
GSettings *settings;
GVariant *val = g_settings_get_value (settings, "");
]])],
- [GSETTINGS_COMPILES=yes])
- AC_MSG_RESULT([$GSETTINGS_COMPILES])
+ [], HAVE_GSETTINGS=no)
+ AC_MSG_RESULT([$HAVE_GSETTINGS])
- if test "$GSETTINGS_COMPILES" = "yes"; then
+ if test "$HAVE_GSETTINGS" = "yes"; then
AC_DEFINE(HAVE_GSETTINGS, 1, [Define to 1 if using GSettings.])
SETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
SETTINGS_LIBS="$GSETTINGS_LIBS"
diff --git a/etc/CONTRIBUTE b/etc/CONTRIBUTE
index cba833cf584..d78692c40ff 100644
--- a/etc/CONTRIBUTE
+++ b/etc/CONTRIBUTE
@@ -54,11 +54,15 @@ Generally speaking, for non-trivial contributions to GNU Emacs we
require that the copyright be assigned to the FSF. For the reasons
behind this, see: http://www.gnu.org/licenses/why-assign.html .
-Copyright assignment is a simple process. If you live in the US, you
+Copyright assignment is a simple process. Residents of some countries
can do it entirely electronically. We can help you get started, and
answer any questions you may have (or point you to the people with the
answers), at the emacs-devel@gnu.org mailing list.
+(Please note: general discussion about why some GNU projects ask
+for a copyright assignment is off-topic for emacs-devel.
+See gnu-misc-discuss instead.)
+
A copyright disclaimer is also a possibility, but we prefer an assignment.
Note that the disclaimer, like an assignment, involves you sending
signed paperwork to the FSF (simply saying "this is in the public domain"
diff --git a/etc/NEWS b/etc/NEWS
index 4593428d971..4c5c73aed02 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1455,19 +1455,22 @@ used in place of the 9th element of `file-attributes'.
argument, with the same interpretation as the returned value of
`visited-file-modtime'.
-** Autorevert changes
+** Revert and Autorevert changes
+
+*** The default value of `revert-buffer-function' is no longer nil.
+Instead it defaults to a function that does what the nil value used to.
+The same applies for `revert-buffer-insert-file-contents-function'.
---
-*** If Emacs is compiled with file notification support, notifications
-are used instead of checking the time stamp of the files. You can
-disable this by setting the user option `auto-revert-use-notify' to
-nil. Alternatively, a regular expression of directories to be
-excluded from file notifications can be specified by
+*** If Emacs is compiled with file notification support, it uses notifications
+instead of checking file time stamps. To disable this, set the user option
+`auto-revert-use-notify' to nil. Alternatively, you can specify a regular
+expression matching directories to be excluded from file notifications via
`auto-revert-notify-exclude-dir-regexp'.
---
*** The new user option `auto-revert-remote-files' enables reversion
-of remote files when set to non-nil.
+of remote files, if set to non-nil.
** Face changes
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 66ec9ab3dc4..294eb110691 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,26 @@
+2014-04-02 Glenn Morris <rgm@gnu.org>
+
+ * menu-bar.el (menu-bar-file-menu):
+ * vc/ediff.el (ediff-current-file):
+ Update for revert-buffer-function no longer being nil by default.
+
+ * simple.el (command-execute): Respect nil disabled-command-function.
+
+2014-04-02 Nicolas Richard <theonewiththeevillook@yahoo.fr>
+
+ * simple.el (command-execute): Do not execute the command when it
+ is disabled; fixes thinko in 2013-02-20 conversion from C. (Bug#17151)
+
+2014-04-02 Juri Linkov <juri@jurta.org>
+
+ * dired-aux.el (dired-compress-file): Don't use string-match-p
+ because its match data is used afterwards.
+
+2014-04-02 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * emacs-lisp/package.el (package-built-in-p): Treat a min-version of
+ 0 like nil.
+
2014-04-02 João Távora <joaotavora@gmail.com>
* elec-pair.el (electric-pair-inhibit-if-helps-balance): Inhibit
@@ -111,8 +134,8 @@
2014-03-27 Dmitry Gutov <dgutov@yandex.ru>
- * progmodes/ruby-mode.el (ruby-font-lock-keywords): Highlight
- special globals with font-lock-builtin-face. (Bug#17057)
+ * progmodes/ruby-mode.el (ruby-font-lock-keywords):
+ Highlight special globals with font-lock-builtin-face. (Bug#17057)
* progmodes/ruby-mode.el (ruby-syntax-propertize-function):
Don't propertize `?' or `!' as symbol constituent when after
diff --git a/lisp/cedet/ede/dired.el b/lisp/cedet/ede/dired.el
index f3b2774a520..4c17a91a984 100644
--- a/lisp/cedet/ede/dired.el
+++ b/lisp/cedet/ede/dired.el
@@ -3,7 +3,7 @@
;; Copyright (C) 1998-2000, 2003, 2009-2014 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
-;; Version: 0.4
+;; Old-Version: 0.4
;; Keywords: project, make
;; This file is part of GNU Emacs.
diff --git a/lisp/cedet/ede/project-am.el b/lisp/cedet/ede/project-am.el
index 09c8ec0daf7..43482ce0582 100644
--- a/lisp/cedet/ede/project-am.el
+++ b/lisp/cedet/ede/project-am.el
@@ -1,10 +1,10 @@
;;; project-am.el --- A project management scheme based on automake files.
-;; Copyright (C) 1998-2000, 2003, 2005, 2007-2014 Free Software
-;; Foundation, Inc.
+;; Copyright (C) 1998-2000, 2003, 2005, 2007-2014
+;; Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
-;; Version: 0.0.3
+;; Old-Version: 0.0.3
;; Keywords: project, make
;; This file is part of GNU Emacs.
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index b59b7cecc34..432d2307725 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -887,7 +887,7 @@ Otherwise, the rule is a compression rule, and compression is done with gzip.")
;; See if any suffix rule matches this file name.
(while suffixes
(let (case-fold-search)
- (if (string-match-p (car (car suffixes)) file)
+ (if (string-match (car (car suffixes)) file)
(setq suffix (car suffixes) suffixes nil))
(setq suffixes (cdr suffixes))))
;; If so, compute desired new name.
diff --git a/lisp/dired.el b/lisp/dired.el
index d234d724c67..5cff7891567 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -3867,7 +3867,7 @@ Ask means pop up a menu for the user to select one of copy, move or link."
;;; Start of automatically extracted autoloads.
-;;;### (autoloads nil "dired-aux" "dired-aux.el" "edcfeacd242f6163e847594870855b9e")
+;;;### (autoloads nil "dired-aux" "dired-aux.el" "6969bb4414a8a31b91342ab922a94efb")
;;; Generated autoloads from dired-aux.el
(autoload 'dired-diff "dired-aux" "\
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 17136437cf9..7be0354992f 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -536,7 +536,7 @@ specifying the minimum acceptable version."
(let ((bi (assq package package--builtin-versions)))
(cond
(bi (version-list-<= min-version (cdr bi)))
- (min-version nil)
+ ((remove 0 min-version) nil)
(t
(require 'finder-inf nil t) ; For `package--builtins'.
(assq package package--builtins))))))
diff --git a/lisp/erc/erc-lang.el b/lisp/erc/erc-lang.el
index 5012aa4c2a5..df5318df2e6 100644
--- a/lisp/erc/erc-lang.el
+++ b/lisp/erc/erc-lang.el
@@ -4,7 +4,7 @@
;; Author: Alex Schroeder <alex@gnu.org>
;; Maintainer: emacs-devel@gnu.org
-;; Version: 1.0.0
+;; Old-Version: 1.0.0
;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcLang
;; Keywords: comm languages processes
diff --git a/lisp/erc/erc-list.el b/lisp/erc/erc-list.el
index 4dbe4342f70..67877878611 100644
--- a/lisp/erc/erc-list.el
+++ b/lisp/erc/erc-list.el
@@ -4,7 +4,7 @@
;; Author: Tom Tromey <tromey@redhat.com>
;; Maintainer: emacs-devel@gnu.org
-;; Version: 0.1
+;; Old-Version: 0.1
;; Keywords: comm
;; This file is part of GNU Emacs.
diff --git a/lisp/gnus/nnmairix.el b/lisp/gnus/nnmairix.el
index 4eb4bde7d29..0cef6992ac0 100644
--- a/lisp/gnus/nnmairix.el
+++ b/lisp/gnus/nnmairix.el
@@ -4,7 +4,7 @@
;; Author: David Engster <dengste@eml.cc>
;; Keywords: mail searching
-;; Version: 0.6
+;; Old-Version: 0.6
;; This file is part of GNU Emacs.
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 0e12c976af0..84df6922749 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -149,8 +149,11 @@
:help "Recover edits from a crashed session"))
(bindings--define-key menu [revert-buffer]
'(menu-item "Revert Buffer" revert-buffer
- :enable (or revert-buffer-function
- revert-buffer-insert-file-contents-function
+ :enable (or (not (eq revert-buffer-function
+ 'revert-buffer--default))
+ (not (eq
+ revert-buffer-insert-file-contents-function
+ 'revert-buffer-insert-file-contents--default-function))
(and buffer-file-number
(or (buffer-modified-p)
(not (verify-visited-file-modtime
diff --git a/lisp/progmodes/cc-guess.el b/lisp/progmodes/cc-guess.el
index 8a379d429bd..abde007cd04 100644
--- a/lisp/progmodes/cc-guess.el
+++ b/lisp/progmodes/cc-guess.el
@@ -1,13 +1,12 @@
;;; cc-guess.el --- guess indentation values by scanning existing code
-;; Copyright (C) 1985, 1987, 1992-2006, 2011-2014 Free Software
-;; Foundation, Inc.
+;; Copyright (C) 1985, 1987, 1992-2006, 2011-2014
+;; Free Software Foundation, Inc.
;; Author: 1994-1995 Barry A. Warsaw
;; 2011- Masatake YAMATO
;; Maintainer: bug-cc-mode@gnu.org
;; Created: August 1994, split from cc-mode.el
-;; Version: See cc-mode.el
;; Keywords: c languages oop
;; This file is part of GNU Emacs.
diff --git a/lisp/simple.el b/lisp/simple.el
index bc92a9ab24b..0af15269bb9 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1628,36 +1628,37 @@ a special event, so ignore the prefix argument and don't clear it."
(prog1 prefix-arg
(setq current-prefix-arg prefix-arg)
(setq prefix-arg nil)))))
- (and (symbolp cmd)
- (get cmd 'disabled)
- ;; FIXME: Weird calling convention!
- (run-hooks 'disabled-command-function))
- (let ((final cmd))
- (while
- (progn
- (setq final (indirect-function final))
- (if (autoloadp final)
- (setq final (autoload-do-load final cmd)))))
- (cond
- ((arrayp final)
- ;; If requested, place the macro in the command history. For
- ;; other sorts of commands, call-interactively takes care of this.
- (when record-flag
- (push `(execute-kbd-macro ,final ,prefixarg) command-history)
- ;; Don't keep command history around forever.
- (when (and (numberp history-length) (> history-length 0))
- (let ((cell (nthcdr history-length command-history)))
- (if (consp cell) (setcdr cell nil)))))
- (execute-kbd-macro final prefixarg))
- (t
- ;; Pass `cmd' rather than `final', for the backtrace's sake.
- (prog1 (call-interactively cmd record-flag keys)
- (when (and (symbolp cmd)
- (get cmd 'byte-obsolete-info)
- (not (get cmd 'command-execute-obsolete-warned)))
- (put cmd 'command-execute-obsolete-warned t)
- (message "%s" (macroexp--obsolete-warning
- cmd (get cmd 'byte-obsolete-info) "command")))))))))
+ (if (and (symbolp cmd)
+ (get cmd 'disabled)
+ disabled-command-function)
+ ;; FIXME: Weird calling convention!
+ (run-hooks 'disabled-command-function)
+ (let ((final cmd))
+ (while
+ (progn
+ (setq final (indirect-function final))
+ (if (autoloadp final)
+ (setq final (autoload-do-load final cmd)))))
+ (cond
+ ((arrayp final)
+ ;; If requested, place the macro in the command history. For
+ ;; other sorts of commands, call-interactively takes care of this.
+ (when record-flag
+ (push `(execute-kbd-macro ,final ,prefixarg) command-history)
+ ;; Don't keep command history around forever.
+ (when (and (numberp history-length) (> history-length 0))
+ (let ((cell (nthcdr history-length command-history)))
+ (if (consp cell) (setcdr cell nil)))))
+ (execute-kbd-macro final prefixarg))
+ (t
+ ;; Pass `cmd' rather than `final', for the backtrace's sake.
+ (prog1 (call-interactively cmd record-flag keys)
+ (when (and (symbolp cmd)
+ (get cmd 'byte-obsolete-info)
+ (not (get cmd 'command-execute-obsolete-warned)))
+ (put cmd 'command-execute-obsolete-warned t)
+ (message "%s" (macroexp--obsolete-warning
+ cmd (get cmd 'byte-obsolete-info) "command"))))))))))
(defvar minibuffer-history nil
"Default minibuffer history list.
diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el
index d8abe89d17b..927a3ba7fb6 100644
--- a/lisp/vc/ediff.el
+++ b/lisp/vc/ediff.el
@@ -367,8 +367,10 @@ deleted."
This command can be used instead of `revert-buffer'. If there is
nothing to revert then this command fails."
(interactive)
- (unless (or revert-buffer-function
- revert-buffer-insert-file-contents-function
+ ;; This duplicates code from menu-bar.el.
+ (unless (or (not (eq revert-buffer-function 'revert-buffer--default))
+ (not (eq revert-buffer-insert-file-contents-function
+ 'revert-buffer-insert-file-contents--default-function))
(and buffer-file-number
(or (buffer-modified-p)
(not (verify-visited-file-modtime
diff --git a/nt/INSTALL b/nt/INSTALL
index e3d7dd072a0..1fe00a37d97 100644
--- a/nt/INSTALL
+++ b/nt/INSTALL
@@ -9,15 +9,15 @@ Windows starting with Windows 2000 and newer. Windows 9X are not
supported (but the Emacs binary produced by this build will run on
Windows 9X as well).
+ Do not use this recipe with Cygwin. For building on Cygwin, use the
+ normal installation instructions, ../INSTALL.
+
* For the brave (a.k.a. "impatient"):
For those who have a working MSYS/MinGW development environment and
are comfortable with running Posix configure scripts, here are the
concise instructions for configuring and building the native Windows
- binary of Emacs with these tools.
-
- Do not use this recipe with Cygwin. For building on Cygwin, use the
- normal installation instructions, ../INSTALL.
+ binary of Emacs with these tools:
0. Start the MSYS Bash window. Everything else below is done from
that window's Bash prompt.
@@ -49,7 +49,7 @@ Windows 9X as well).
You can pass other options to the configure script. Here's a
typical example (for an in-place debug build):
- CPPFLAGS='-DGLYPH_DEBUG=1' CFLAGS='-O0 -g3' ./configure --prefix=/d/usr/emacs --enable-checking
+ CFLAGS='-O0 -g3' ./configure --prefix=/d/usr/emacs --enable-checking='yes,glyphs'
3. After the configure script finishes, it should display the
resulting configuration. After that, type
@@ -82,7 +82,7 @@ Windows 9X as well).
A correct installation makes all the rest almost trivial; a botched
installation will likely make you miserable for quite some time.
- There are two alternative to installing MinGW + MSYS: using the GUI
+ There are two alternatives to installing MinGW + MSYS: using the GUI
installer, called mingw-get, provided by the MinGW project, or
manual installation. The next two sections describe each one of
these.
@@ -169,7 +169,7 @@ Windows 9X as well).
you are building from the repository:
. Texinfo (needed to produce the Info manuals when building from
- bzr, and for "make install")
+ bzr/git, and for "make install")
Available from http://sourceforge.net/projects/ezwinports/files/.
@@ -373,11 +373,11 @@ Windows 9X as well).
A few frequently used options are needed when you want to produce an
unoptimized binary with runtime checks enabled:
- CPPFLAGS='-DGLYPH_DEBUG=1' CFLAGS='-O0 -g3' ./configure --prefix=PREFIX --enable-checking
+ CFLAGS='-O0 -g3' ./configure --prefix=PREFIX --enable-checking='yes,glyphs'
Once invoked, the configure script will run for some time, and, if
successful, will eventually produce a summary of the configuration
- like this:
+ similar to this:
Configured for `i686-pc-mingw32'.
@@ -724,43 +724,6 @@ Windows 9X as well).
You need the libiconv-X.Y.Z-N-mingw32-dev.tar.lzma tarball from that
site.
-* Experimental SVG support
-
- To compile with SVG, you will need pkg-config to be installed, as
- the configure script invokes pkg-config to find out which compiler
- switches to use for SVG. See above for the URL where you can find
- pkg-config for Windows.
-
- SVG support is currently experimental, and not built by default.
- Specify --with-rsvg and ensure you have all the dependencies in your
- include path. Unless you have built a minimalist librsvg yourself
- (untested), librsvg depends on a significant chunk of GTK+ to build,
- plus a few Gnome libraries, libxml2, libbz2 and zlib at runtime. The
- easiest way to obtain the dependencies required for building is to
- download a pre-bundled GTK+ development environment for Windows.
-
- To use librsvg at runtime, ensure that librsvg and its dependencies
- are on your PATH. If you didn't build librsvg yourself, you will
- need to check with where you downloaded it from for the
- dependencies, as there are different build options. If it is a
- short list, then it most likely only lists the immediate
- dependencies of librsvg, but the dependencies themselves have
- dependencies - so don't download individual libraries from GTK+,
- download and install the whole thing. If you think you've got all
- the dependencies and SVG support is still not working, check your
- PATH for other libraries that shadow the ones you downloaded.
- Libraries of the same name from different sources may not be
- compatible, this problem was encountered with libbzip2 from GnuWin32
- with libcroco from gnome.org.
-
- If you can see etc/images/splash.svg, then you have managed to get
- SVG support working. Congratulations for making it through DLL hell
- to this point. You'll probably find that some SVG images crash
- Emacs. Problems have been observed in some images that contain
- text, they seem to be a problem in the Windows port of Pango, or
- maybe a problem with the way Cairo or librsvg is using it that
- doesn't show up on other platforms.
-
This file is part of GNU Emacs.
diff --git a/src/ChangeLog b/src/ChangeLog
index 2f028c48247..6638325a434 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,22 @@
+2014-04-02 Martin Rudalics <rudalics@gmx.at>
+
+ * xterm.c (x_new_font): Don't calculate non-toolkit scrollbar
+ width from font width (Bug#17163).
+
+ * frame.c (x_set_frame_parameters): Calculate default values of
+ new frame sizes only after all other frame parameters have been
+ processed (Bug#17142).
+
+2014-04-02 Ken Brown <kbrown@cornell.edu>
+
+ * conf_post.h (SYSTEM_PURESIZE_EXTRA) [CYGWIN]: Set to 10000.
+ (Bug#17112)
+
+2014-04-02 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * xterm.c (x_draw_image_glyph_string): Adjust image background
+ width accordingly when its x position is adjusted. (Bug#17115)
+
2014-04-02 Dmitry Antipov <dmantipov@yandex.ru>
* font.c (font_list_entities): Do not add empty vector to font cache.
diff --git a/src/conf_post.h b/src/conf_post.h
index 7419b53c5df..80d561090ed 100644
--- a/src/conf_post.h
+++ b/src/conf_post.h
@@ -161,6 +161,10 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */
#endif
#endif
+#ifdef CYGWIN
+#define SYSTEM_PURESIZE_EXTRA 10000
+#endif
+
#if defined HAVE_NTGUI && !defined DebPrint
# ifdef EMACSDEBUG
extern void _DebPrint (const char *fmt, ...);
diff --git a/src/frame.c b/src/frame.c
index 055ce36ff4f..c5a2f6ab245 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -2795,6 +2795,7 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
set them both at once. So we wait until we've looked at the
entire list before we set them. */
int width, height;
+ bool width_change = 0, height_change = 0;
/* Same here. */
Lisp_Object left, top;
@@ -2810,7 +2811,6 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
#ifdef HAVE_X_WINDOWS
bool icon_left_no_change = 0, icon_top_no_change = 0;
#endif
- bool size_changed = 0;
struct gcpro gcpro1, gcpro2;
i = 0;
@@ -2844,18 +2844,6 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
top = left = Qunbound;
icon_left = icon_top = Qunbound;
- /* Provide default values for HEIGHT and WIDTH. */
- width = (f->new_width
- ? (f->new_pixelwise
- ? f->new_width
- : (f->new_width * FRAME_COLUMN_WIDTH (f)))
- : FRAME_TEXT_WIDTH (f));
- height = (f->new_height
- ? (f->new_pixelwise
- ? f->new_height
- : (f->new_height * FRAME_LINE_HEIGHT (f)))
- : FRAME_TEXT_HEIGHT (f));
-
/* Process foreground_color and background_color before anything else.
They are independent of other properties, but other properties (e.g.,
cursor_color) are dependent upon them. */
@@ -2897,12 +2885,12 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
if (EQ (prop, Qwidth) && RANGED_INTEGERP (0, val, INT_MAX))
{
- size_changed = 1;
+ width_change = 1;
width = XFASTINT (val) * FRAME_COLUMN_WIDTH (f) ;
}
else if (EQ (prop, Qheight) && RANGED_INTEGERP (0, val, INT_MAX))
{
- size_changed = 1;
+ height_change = 1;
height = XFASTINT (val) * FRAME_LINE_HEIGHT (f);
}
else if (EQ (prop, Qtop))
@@ -2989,11 +2977,30 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
XSETFRAME (frame, f);
- if (size_changed
+ if ((width_change || height_change)
&& (width != FRAME_TEXT_WIDTH (f)
|| height != FRAME_TEXT_HEIGHT (f)
|| f->new_height || f->new_width))
- Fset_frame_size (frame, make_number (width), make_number (height), Qt);
+ {
+ /* If necessary provide default values for HEIGHT and WIDTH. Do
+ that here since otherwise a size change implied by an
+ intermittent font change may get lost as in Bug#17142. */
+ if (!width_change)
+ width = (f->new_width
+ ? (f->new_pixelwise
+ ? f->new_width
+ : (f->new_width * FRAME_COLUMN_WIDTH (f)))
+ : FRAME_TEXT_WIDTH (f));
+
+ if (!height_change)
+ height = (f->new_height
+ ? (f->new_pixelwise
+ ? f->new_height
+ : (f->new_height * FRAME_LINE_HEIGHT (f)))
+ : FRAME_TEXT_HEIGHT (f));
+
+ Fset_frame_size (frame, make_number (width), make_number (height), Qt);
+ }
if ((!NILP (left) || !NILP (top))
&& ! (left_no_change && top_no_change)
diff --git a/src/xterm.c b/src/xterm.c
index 1c0aea01f6e..b0d64dfeb7f 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -2399,15 +2399,19 @@ x_draw_image_glyph_string (struct glyph_string *s)
{
int x = s->x;
int y = s->y;
+ int width = s->background_width;
if (s->first_glyph->left_box_line_p
&& s->slice.x == 0)
- x += box_line_hwidth;
+ {
+ x += box_line_hwidth;
+ width -= box_line_hwidth;
+ }
if (s->slice.y == 0)
y += box_line_vwidth;
- x_draw_glyph_string_bg_rect (s, x, y, s->background_width, height);
+ x_draw_glyph_string_bg_rect (s, x, y, width, height);
}
s->background_filled_p = 1;
@@ -7775,20 +7779,16 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
compute_fringe_widths (f, 1);
+ /* Compute character columns occupied by scrollbar.
+
+ Don't do things differently for non-toolkit scrollbars
+ (Bug#17163). */
unit = FRAME_COLUMN_WIDTH (f);
-#ifdef USE_TOOLKIT_SCROLL_BARS
- /* The width of a toolkit scrollbar does not change with the new
- font but we have to calculate the number of columns it occupies
- anew. */
- FRAME_CONFIG_SCROLL_BAR_COLS (f)
- = (FRAME_CONFIG_SCROLL_BAR_WIDTH (f) + unit - 1) / unit;
-#else
- /* The width of a non-toolkit scrollbar is at least 14 pixels and a
- multiple of the frame's character width. */
- FRAME_CONFIG_SCROLL_BAR_COLS (f) = (14 + unit - 1) / unit;
- FRAME_CONFIG_SCROLL_BAR_WIDTH (f)
- = FRAME_CONFIG_SCROLL_BAR_COLS (f) * unit;
-#endif
+ if (FRAME_CONFIG_SCROLL_BAR_WIDTH (f) > 0)
+ FRAME_CONFIG_SCROLL_BAR_COLS (f)
+ = (FRAME_CONFIG_SCROLL_BAR_WIDTH (f) + unit - 1) / unit;
+ else
+ FRAME_CONFIG_SCROLL_BAR_COLS (f) = (14 + unit - 1) / unit;
if (FRAME_X_WINDOW (f) != 0)
{
@@ -7994,7 +7994,7 @@ xim_close_dpy (struct x_display_info *dpyinfo)
{
#ifdef HAVE_X11R6_XIM
struct xim_inst_t *xim_inst = dpyinfo->xim_callback_data;
-
+
if (dpyinfo->display)
{
Bool ret = XUnregisterIMInstantiateCallback