Mercurial > emacs
changeset 108401:46c08e6b42d6
Merge from mainline.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Wed, 20 Jan 2010 14:24:11 +0000 |
parents | f1cb61394e72 (current diff) 89b4f7566280 (diff) |
children | d3036620c45e |
files | admin/revdiff |
diffstat | 13 files changed, 209 insertions(+), 209 deletions(-) [+] |
line wrap: on
line diff
--- a/admin/ChangeLog Mon Jan 18 14:40:12 2010 +0000 +++ b/admin/ChangeLog Wed Jan 20 14:24:11 2010 +0000 @@ -1,3 +1,8 @@ +2010-01-20 Glenn Morris <rgm@gnu.org> + + * revdiff: Remove file that only works with CVS, and isn't really + needed with Bazaar (given the in-built revision options of bzr diff). + 2010-01-12 Glenn Morris <rgm@gnu.org> * emacs-pretesters, make-announcement: Use bug-gnu-emacs rather
--- a/admin/revdiff Mon Jan 18 14:40:12 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,137 +0,0 @@ -#! /usr/bin/perl - -# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, -# 2010 Free Software Foundation, Inc. -# -# This file is part of GNU Emacs. - -# GNU Emacs is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# GNU Emacs is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. - - -use File::Basename; - -if (@ARGV < 3) -{ - print <<USAGE; -revdiff FILE OLD NEW - -Get a diff of FILE between revisions OLD and NEW. Store the -diff in a file named FILE-OLD-NEW.diff. - -If OLD is `-' use FILE's current revision for OLD. If OLD is -`-<number>', use the Nth revision before the current one for OLD. - -If NEW is +<number> or -<number>, build diffs between revisions OLD -and OLD +/- <number>. - -Examples: - -revdiff FILE - -1 get the latest change of FILE -revdiff FILE -1 +1 also gets the latest change of FILE -revdiff FILE 1.500 +2 get diffs 1.500-1.501 and 1.501-1.502. - -USAGE - exit 1; -} - -$file = shift @ARGV; -$old = shift @ARGV; - -sub diffit -{ - my ($old, $new) = @_; - print "cvs diff -r$old -r$new $file >$file-$old-$new.diff\n"; - system "cvs diff -r$old -r$new $file >$file-$old-$new.diff"; -} - -sub current_revision ($) -{ - my ($file) = @_; - my $dir = dirname ($file); - my $base = basename ($file); - my $entries = "$dir/CVS/Entries"; - die "Can't find $entries" unless -f $entries; - open (IN, "<$entries") or die "Cannot open $entries"; - my $rev; - while ($line = <IN>) - { - if ($line =~ m,/$base/([^/]+),) - { - $rev = $1; - break; - } - } - die "Cannot determine current revision of $file" unless $rev; - close (IN); - return $rev; -} - -if ($old eq "-") - { - $old = current_revision ($file); - } -elsif ($old =~ /^-(\d+)$/) - { - my $offset = $1; - $old = current_revision ($file); - die "Internal error" unless $old =~ /(.*)\.(\d+)$/; - my $minor = $2 - $offset; - $old = sprintf ("%d.%d", $1, $minor); - } - -while (@ARGV) - { - my $new = shift @ARGV; - if ($new =~ /^[+]\d+$/) - { - my $n = $new; - for ($i = 0; $i < $n; ++$i) - { - unless ($old =~ /(.*)\.(\d+)$/) - { - die "Internal error"; - } - my $j = $2 + 1; - $new = "$1.$j"; - diffit ($old, $new); - $old = $new; - } - } - elsif ($new =~ /^[-]\d+$/) - { - my $n = - $new; - for ($i = 0; $i < $n; ++$i) - { - unless ($old =~ /(.*)\.(\d+)$/) - { - die "Internal error"; - } - my $j = $2 - 1; - $new = "$1.$j"; - diffit ($new, $old); - $old = $new; - } - } - else - { - diffit ($old, $new); - $old = $new; - } - } - -# Local Variables: -# mode: cperl -# End: - -# arch-tag: 2798b20d-c7f2-4c78-8378-7bb529c36a09
--- a/lisp/ChangeLog Mon Jan 18 14:40:12 2010 +0000 +++ b/lisp/ChangeLog Wed Jan 20 14:24:11 2010 +0000 @@ -1,3 +1,39 @@ +2010-01-20 Glenn Morris <rgm@gnu.org> + + * indent.el (tab-always-indent): Fix custom-type. + +2010-01-19 Alan Mackenzie <acm@muc.de> + + * progmodes/cc-defs.el: Fix bug#5395: typing '#' in an empty + buffer throws "args out of range". + (c-set-cpp-delimiters, c-clear-cpp-delimiters): Check for EOB + playing the role of delimiter. + +2010-01-18 Stephen Leake <stephen_leake@member.fsf.org> + + * lisp/progmodes/ada-mode.el: Fix bug#5400. + (ada-matching-decl-start-re): Move into ada-goto-decl-start. + (ada-goto-decl-start): Rename from ada-goto-matching-decl-start; callers + changed. Delete RECURSIVE parameter; never used. Improve doc string. + Improve comments in "is" portion. Handle null procedure declaration. + (ada-move-to-end): Improve doc string. + +2010-01-18 Óscar Fuentes <ofv@wanadoo.es> + + * ido.el (ido-cur-list): Initialize to nil. + Remove obsolete information from commentary. + (ido-choice-list): Initialize to nil. + (ido-get-bufname): Reject minibuffers. + (ido-make-buffer-list): If "default" is a nonexistent + buffer, ignore it, as per the function's comment. + (ido-kill-buffer-internal): New function. + (ido-kill-buffer-at-head): Use it. + (ido-visit-buffer): Likewise. + +2010-01-18 Chong Yidong <cyd@stupidchicken.com> + + * calendar/time-date.el (date-to-time): Doc fix (Bug#5408). + 2010-01-18 Juanma Barranquero <lekktu@gmail.com> * cedet/ede/locate.el (ede-locate-file-in-project) @@ -92,7 +128,7 @@ 2010-01-17 Stephen Leake <stephen_leake@member.fsf.org> - * progmodes/ada-mode.el: Fix bug#1920, bug#5400. + * progmodes/ada-mode.el: Fix bug#1920. (ada-ident-re): Delete ., allow multibyte characters. (ada-goto-label-re): New; matches goto labels. (ada-block-label-re): New; matches block labels.
--- a/lisp/calendar/time-date.el Mon Jan 18 14:40:12 2010 +0000 +++ b/lisp/calendar/time-date.el Wed Jan 20 14:24:11 2010 +0000 @@ -98,7 +98,8 @@ ;;;###autoload (defun date-to-time (date) - "Parse a string DATE that represents a date-time and return a time value." + "Parse a string DATE that represents a date-time and return a time value. +If DATE lacks timezone information, GMT is assumed." (condition-case () (apply 'encode-time (parse-time-string
--- a/lisp/ido.el Mon Jan 18 14:40:12 2010 +0000 +++ b/lisp/ido.el Wed Jan 20 14:24:11 2010 +0000 @@ -1042,11 +1042,11 @@ ;; Stores the current list of items that will be searched through. ;; The list is ordered, so that the most interesting item comes first, ;; although by default, the files visible in the current frame are put -;; at the end of the list. Created by `ido-make-item-list'. -(defvar ido-cur-list) +;; at the end of the list. +(defvar ido-cur-list nil) ;; Stores the choice list for ido-completing-read -(defvar ido-choice-list) +(defvar ido-choice-list nil) ;; Stores the list of items which are ignored when building ;; `ido-cur-list'. It is in no specific order. @@ -3344,7 +3344,7 @@ (if ido-temp-list (nconc ido-temp-list ido-current-buffers) (setq ido-temp-list ido-current-buffers)) - (if default + (if (and default (buffer-live-p (get-buffer default))) (progn (setq ido-temp-list (delete default ido-temp-list)) @@ -3590,6 +3590,7 @@ ;; Used by `ido-get-buffers-in-frames' to walk through all windows (let ((buf (buffer-name (window-buffer win)))) (unless (or (member buf ido-bufs-in-frame) + (minibufferp buf) (member buf ido-ignore-item-temp-list)) ;; Only add buf if it is not already in list. ;; This prevents same buf in two different windows being @@ -3830,6 +3831,27 @@ ;;(add-hook 'completion-setup-hook 'completion-setup-function) (display-completion-list completion-list))))))) +(defun ido-kill-buffer-internal (buf) + "Kill buffer BUF and rebuild ido's buffer list if needed." + (if (not (kill-buffer buf)) + ;; buffer couldn't be killed. + (setq ido-rescan t) + ;; else buffer was killed so remove name from list. + (setq ido-cur-list (delq buf ido-cur-list)) + ;; Some packages, like uniquify.el, may rename buffers when one + ;; is killed, so we need to test this condition to avoid using + ;; an outdated list of buffer names. We don't want to always + ;; rebuild the list of buffers, as this alters the previous + ;; buffer order that the user was seeing on the prompt. However, + ;; when we rebuild the list, we try to keep the previous second + ;; buffer as the first one. + (catch 'update + (dolist (b ido-cur-list) + (unless (get-buffer b) + (setq ido-cur-list (ido-make-buffer-list (cadr ido-matches))) + (setq ido-rescan t) + (throw 'update nil)))))) + ;;; KILL CURRENT BUFFER (defun ido-kill-buffer-at-head () "Kill the buffer at the head of `ido-matches'. @@ -3840,7 +3862,7 @@ (let ((enable-recursive-minibuffers t) (buf (ido-name (car ido-matches)))) (when buf - (kill-buffer buf) + (ido-kill-buffer-internal buf) ;; Check if buffer still exists. (if (get-buffer buf) ;; buffer couldn't be killed. @@ -3884,7 +3906,7 @@ ((eq method 'kill) (if record (ido-record-command 'kill-buffer buffer)) - (kill-buffer buffer)) + (ido-kill-buffer-internal buffer)) ((eq method 'other-window) (if record
--- a/lisp/indent.el Mon Jan 18 14:40:12 2010 +0000 +++ b/lisp/indent.el Wed Jan 20 14:24:11 2010 +0000 @@ -1,7 +1,7 @@ ;;; indent.el --- indentation commands for Emacs -;; Copyright (C) 1985, 1995, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007, +;; 2008, 2009, 2010 Free Software Foundation, Inc. ;; Maintainer: FSF @@ -55,7 +55,11 @@ Some programming language modes have their own variable to control this, e.g., `c-tab-always-indent', and do not respect this variable." :group 'indent - :type '(choice (const nil) (const t) (const always))) + :type '(choice + (const :tag "Always indent" t) + (const :tag "Indent if inside indentation, else TAB" nil) + (const :tag "Indent, or if already indented complete" complete))) + (defun indent-according-to-mode () "Indent line in proper way for current major mode.
--- a/lisp/progmodes/ada-mode.el Mon Jan 18 14:40:12 2010 +0000 +++ b/lisp/progmodes/ada-mode.el Wed Jan 20 14:24:11 2010 +0000 @@ -677,14 +677,6 @@ "\\>")) "Regexp used in `ada-goto-matching-start'.") -(defvar ada-matching-decl-start-re - (eval-when-compile - (concat "\\<" - (regexp-opt - '("is" "separate" "end" "declare" "if" "new" "begin" "generic" "when") t) - "\\>")) - "Regexp used in `ada-goto-matching-decl-start'.") - (defvar ada-loop-start-re "\\<\\(for\\|while\\|loop\\)\\>" "Regexp for the start of a loop.") @@ -2476,7 +2468,7 @@ ((and (= (downcase (char-after)) ?b) (looking-at "begin\\>")) (save-excursion - (if (ada-goto-matching-decl-start t) + (if (ada-goto-decl-start t) (list (progn (back-to-indentation) (point)) 0) (ada-indent-on-previous-lines nil orgpoint orgpoint)))) @@ -2855,7 +2847,7 @@ (if (looking-at "\\<begin\\>") (progn (setq indent (list (point) 0)) - (if (ada-goto-matching-decl-start t) + (if (ada-goto-decl-start t) (list (progn (back-to-indentation) (point)) 0) indent)) (list (progn (back-to-indentation) (point)) 0) @@ -3421,7 +3413,6 @@ match-dat nil))) - (defun ada-goto-next-non-ws (&optional limit skip-goto-label) "Skip to next non-whitespace character. Skips spaces, newlines and comments, and possibly goto labels. @@ -3502,13 +3493,13 @@ (if (save-excursion (ada-goto-previous-word) (looking-at (concat "\\<" defun-name "\\> *:"))) - t ; do nothing + t ; name matches ;; else ;; ;; 'accept' or 'package' ? ;; (unless (looking-at ada-subprog-start-re) - (ada-goto-matching-decl-start)) + (ada-goto-decl-start)) ;; ;; 'begin' of 'procedure'/'function'/'task' or 'declare' ;; @@ -3541,14 +3532,20 @@ (buffer-substring (point) (progn (forward-sexp 1) (point)))))))) -(defun ada-goto-matching-decl-start (&optional noerror recursive) - "Move point to the matching declaration start of the current 'begin'. -If NOERROR is non-nil, it only returns nil if no match was found." +(defun ada-goto-decl-start (&optional noerror) + "Move point to the declaration start of the current construct. +If NOERROR is non-nil, return nil if no match was found; +otherwise throw error." (let ((nest-count 1) + (regexp (eval-when-compile + (concat "\\<" + (regexp-opt + '("is" "separate" "end" "declare" "if" "new" "begin" "generic" "when") t) + "\\>"))) ;; first should be set to t if we should stop at the first ;; "begin" we encounter. - (first (not recursive)) + (first t) (count-generic nil) (stop-at-when nil) ) @@ -3572,7 +3569,7 @@ ;; search backward for interesting keywords (while (and (not (zerop nest-count)) - (ada-search-ignore-string-comment ada-matching-decl-start-re t)) + (ada-search-ignore-string-comment regexp t)) ;; ;; calculate nest-depth ;; @@ -3605,7 +3602,6 @@ (if (looking-at "end") (ada-goto-matching-start 1 noerror t) - ;; (ada-goto-matching-decl-start noerror t) (setq loop-again nil) (unless (looking-at "begin") @@ -3633,34 +3629,50 @@ (setq first t)) ;; ((looking-at "is") - ;; check if it is only a type definition, but not a protected - ;; type definition, which should be handled like a procedure. - (if (or (looking-at "is[ \t]+<>") - (save-excursion - (forward-comment -10000) - (forward-char -1) - - ;; Detect if we have a closing parenthesis (Could be - ;; either the end of subprogram parameters or (<>) - ;; in a type definition - (if (= (char-after) ?\)) - (progn - (forward-char 1) - (backward-sexp 1) - (forward-comment -10000) - )) - (skip-chars-backward "a-zA-Z0-9_.'") - (ada-goto-previous-word) - (and - (looking-at "\\<\\(sub\\)?type\\|case\\>") + ;; look for things to ignore + (if + (or + ;; generic formal parameter + (looking-at "is[ t]+<>") + + ;; A type definition, or a case statement. Note that the + ;; goto-matching-start above on 'end record' leaves us at + ;; 'record', not at 'type'. + ;; + ;; We get to a case statement here by calling + ;; 'ada-move-to-end' from inside a case statement; then + ;; we are not ignoring 'when'. + (save-excursion + ;; Skip type discriminants or case argument function call param list + (forward-comment -10000) + (forward-char -1) + (if (= (char-after) ?\)) + (progn + (forward-char 1) + (backward-sexp 1) + (forward-comment -10000) + )) + ;; skip type or case argument name + (skip-chars-backward "a-zA-Z0-9_.'") + (ada-goto-previous-word) + (and + ;; if it's a protected type, it's the decl start we + ;; are looking for; since we didn't see the 'end' + ;; above, we are inside it. + (looking-at "\\<\\(sub\\)?type\\|case\\>") (save-match-data (ada-goto-previous-word) (not (looking-at "\\<protected\\>")))) - )) ; end of `or' - (goto-char (match-beginning 0)) - (progn - (setq nest-count (1- nest-count)) - (setq first nil)))) + ) ; end of type definition p + + ;; null procedure declaration + (save-excursion (ada-goto-next-word) (looking-at "\\<null\\>")) + );; end or + ;; skip this construct + nil + ;; this is the right "is" + (setq nest-count (1- nest-count)) + (setq first nil))) ;; ((looking-at "new") @@ -4115,7 +4127,7 @@ Assumes point to be at the end of a statement." (or (ada-in-paramlist-p) (save-excursion - (ada-goto-matching-decl-start t)))) + (ada-goto-decl-start t)))) (defun ada-looking-at-semi-or () @@ -4409,7 +4421,7 @@ ;; ada-move-to-declaration (looking-at "\\<begin\\>") - (ada-goto-matching-decl-start) + (ada-goto-decl-start) (setq pos (point)))) ) ; end of save-excursion @@ -4421,7 +4433,7 @@ (set-syntax-table previous-syntax-table)))) (defun ada-move-to-end () - "Move point to the matching end of the block around point. + "Move point to the end of the block around point. Moves to 'begin' if in a declarative part." (interactive) (let ((pos (point)) @@ -4471,7 +4483,7 @@ (ada-goto-matching-end 0)) ;; package start ((save-excursion - (setq decl-start (and (ada-goto-matching-decl-start t) (point))) + (setq decl-start (and (ada-goto-decl-start t) (point))) (and decl-start (looking-at "\\<package\\>"))) (ada-goto-matching-end 1))
--- a/lisp/progmodes/cc-defs.el Mon Jan 18 14:40:12 2010 +0000 +++ b/lisp/progmodes/cc-defs.el Wed Jan 20 14:24:11 2010 +0000 @@ -1217,12 +1217,14 @@ ;; This macro does a hidden buffer change. `(progn (c-put-char-property ,beg 'category 'c-cpp-delimiter) - (c-put-char-property ,end 'category 'c-cpp-delimiter))) + (if (< ,end (point-max)) + (c-put-char-property ,end 'category 'c-cpp-delimiter)))) (defmacro c-clear-cpp-delimiters (beg end) ;; This macro does a hidden buffer change. `(progn (c-clear-char-property ,beg 'category) - (c-clear-char-property ,end 'category))) + (if (< ,end (point-max)) + (c-clear-char-property ,end 'category)))) (defsubst c-comment-out-cpps () ;; Render all preprocessor constructs syntactically commented out.
--- a/src/ChangeLog Mon Jan 18 14:40:12 2010 +0000 +++ b/src/ChangeLog Wed Jan 20 14:24:11 2010 +0000 @@ -1,3 +1,25 @@ +2010-01-20 Kenichi Handa <handa@m17n.org> + + * coding.c (consume_chars): If ! multibyte and the encoder is ccl, + treat the source as actual byte sequence. + +2010-01-19 Alan Mackenzie <acm@muc.de> + + Fix spurious before-change-functions invocation from (insert ?\n). + * textprop.c (set_text_properties): rename parameter + `signal_after_change_p' to `coherent_change_p', and make the + invocation of `modify_region' conditional on it. + +2010-01-19 Jan Djärv <jan.h.d@swipnet.se> + + * xsettings.c (apply_xft_settings): Save settings in Vxft_settings + for debug purpose. + (syms_of_xsettings): Declare xft-settings. + +2010-01-18 Chong Yidong <cyd@stupidchicken.com> + + * editfns.c (Fcurrent_time_string): Doc fix (Bug#5408). + 2010-01-16 Stefan Monnier <monnier@iro.umontreal.ca> * xterm.c (event_handler_gdk): Block input (Bug#5037).
--- a/src/coding.c Mon Jan 18 14:40:12 2010 +0000 +++ b/src/coding.c Wed Jan 20 14:24:11 2010 +0000 @@ -7417,7 +7417,8 @@ { EMACS_INT bytes; - if (coding->encoder == encode_coding_raw_text) + if (coding->encoder == encode_coding_raw_text + || coding->encoder == encode_coding_ccl) c = *src++, pos++; else if ((bytes = MULTIBYTE_LENGTH (src, src_end)) > 0) c = STRING_CHAR_ADVANCE_NO_UNIFY (src), pos += bytes;
--- a/src/editfns.c Mon Jan 18 14:40:12 2010 +0000 +++ b/src/editfns.c Wed Jan 20 14:24:11 2010 +0000 @@ -1897,7 +1897,7 @@ } DEFUN ("current-time-string", Fcurrent_time_string, Scurrent_time_string, 0, 1, 0, - doc: /* Return the current time, as a human-readable string. + doc: /* Return the current local time, as a human-readable string. Programs can use this function to decode a time, since the number of columns in each field is fixed if the year is in the range 1000-9999.
--- a/src/textprop.c Mon Jan 18 14:40:12 2010 +0000 +++ b/src/textprop.c Wed Jan 20 14:24:11 2010 +0000 @@ -1346,13 +1346,15 @@ /* Replace properties of text from START to END with new list of properties PROPERTIES. OBJECT is the buffer or string containing the text. OBJECT nil means use the current buffer. - SIGNAL_AFTER_CHANGE_P nil means don't signal after changes. Value - is nil if the function _detected_ that it did not replace any - properties, non-nil otherwise. */ + COHERENT_CHANGE_P nil means this is being called as an internal + subroutine, rather than as a change primitive with checking of + read-only, invoking change hooks, etc.. Value is nil if the + function _detected_ that it did not replace any properties, non-nil + otherwise. */ Lisp_Object -set_text_properties (start, end, properties, object, signal_after_change_p) - Lisp_Object start, end, properties, object, signal_after_change_p; +set_text_properties (start, end, properties, object, coherent_change_p) + Lisp_Object start, end, properties, object, coherent_change_p; { register INTERVAL i; Lisp_Object ostart, oend; @@ -1397,12 +1399,12 @@ return Qnil; } - if (BUFFERP (object)) + if (BUFFERP (object) && !NILP (coherent_change_p)) modify_region (XBUFFER (object), XINT (start), XINT (end), 1); set_text_properties_1 (start, end, properties, object, i); - if (BUFFERP (object) && !NILP (signal_after_change_p)) + if (BUFFERP (object) && !NILP (coherent_change_p)) signal_after_change (XINT (start), XINT (end) - XINT (start), XINT (end) - XINT (start)); return Qt;
--- a/src/xsettings.c Mon Jan 18 14:40:12 2010 +0000 +++ b/src/xsettings.c Wed Jan 20 14:24:11 2010 +0000 @@ -42,6 +42,8 @@ static struct x_display_info *first_dpyinfo; static Lisp_Object Qfont_name, Qfont_render; static int use_system_font; +static Lisp_Object Vxft_settings; + #ifdef HAVE_GCONF static GConfClient *gconf_client; @@ -406,12 +408,13 @@ FcPattern *pat; struct xsettings settings, oldsettings; int changed = 0; + char buf[256]; if (!read_xft_settings (dpyinfo, &settings)) return; memset (&oldsettings, 0, sizeof (oldsettings)); - + buf[0] = '\0'; pat = FcPatternCreate (); XftDefaultSubstitute (dpyinfo->display, XScreenNumberOfScreen (dpyinfo->screen), @@ -428,20 +431,30 @@ FcPatternDel (pat, FC_ANTIALIAS); FcPatternAddBool (pat, FC_ANTIALIAS, settings.aa); ++changed; + oldsettings.aa = settings.aa; } + sprintf (buf, "Antialias: %d", oldsettings.aa); + if ((settings.seen & SEEN_HINTING) != 0 && oldsettings.hinting != settings.hinting) { FcPatternDel (pat, FC_HINTING); FcPatternAddBool (pat, FC_HINTING, settings.hinting); ++changed; + oldsettings.hinting = settings.hinting; } + if (strlen (buf) > 0) strcat (buf, ", "); + sprintf (buf+strlen (buf), "Hinting: %d", oldsettings.hinting); if ((settings.seen & SEEN_RGBA) != 0 && oldsettings.rgba != settings.rgba) { FcPatternDel (pat, FC_RGBA); FcPatternAddInteger (pat, FC_RGBA, settings.rgba); + oldsettings.rgba = settings.rgba; ++changed; } + if (strlen (buf) > 0) strcat (buf, ", "); + sprintf (buf+strlen (buf), "RGBA: %d", oldsettings.rgba); + /* Older fontconfig versions don't have FC_LCD_FILTER. */ if ((settings.seen & SEEN_LCDFILTER) != 0 && oldsettings.lcdfilter != settings.lcdfilter) @@ -449,14 +462,22 @@ FcPatternDel (pat, FC_LCD_FILTER); FcPatternAddInteger (pat, FC_LCD_FILTER, settings.lcdfilter); ++changed; + oldsettings.lcdfilter = settings.lcdfilter; } + if (strlen (buf) > 0) strcat (buf, ", "); + sprintf (buf+strlen (buf), "LCDFilter: %d", oldsettings.lcdfilter); + if ((settings.seen & SEEN_HINTSTYLE) != 0 && oldsettings.hintstyle != settings.hintstyle) { FcPatternDel (pat, FC_HINT_STYLE); FcPatternAddInteger (pat, FC_HINT_STYLE, settings.hintstyle); ++changed; + oldsettings.hintstyle = settings.hintstyle; } + if (strlen (buf) > 0) strcat (buf, ", "); + sprintf (buf+strlen (buf), "Hintstyle: %d", oldsettings.hintstyle); + if ((settings.seen & SEEN_DPI) != 0 && oldsettings.dpi != settings.dpi && settings.dpi > 0) { @@ -465,7 +486,8 @@ FcPatternDel (pat, FC_DPI); FcPatternAddDouble (pat, FC_DPI, settings.dpi); ++changed; - + oldsettings.dpi = settings.dpi; + /* Change the DPI on this display and all frames on the display. */ dpyinfo->resy = dpyinfo->resx = settings.dpi; FOR_EACH_FRAME (tail, frame) @@ -474,12 +496,16 @@ XFRAME (frame)->resy = XFRAME (frame)->resx = settings.dpi; } + if (strlen (buf) > 0) strcat (buf, ", "); + sprintf (buf+strlen (buf), "DPI: %lf", oldsettings.dpi); + if (changed) { XftDefaultSet (dpyinfo->display, pat); if (send_event_p) store_font_changed_event (Qfont_render, XCAR (dpyinfo->name_list_element)); + Vxft_settings = make_string (buf, strlen (buf)); } else FcPatternDestroy (pat); @@ -638,6 +664,10 @@ doc: /* *Non-nil means to use the system defined font. */); use_system_font = 0; + DEFVAR_LISP ("xft-settings", &Vxft_settings, + doc: /* Font settings applied to Xft. */); + Vxft_settings = make_string ("", 0); + #ifdef HAVE_XFT Fprovide (intern_c_string ("font-render-setting"), Qnil); #ifdef HAVE_GCONF