mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-23 10:34:07 +00:00
Merge from mainline.
This commit is contained in:
commit
7cd330deb6
@ -138,7 +138,7 @@
|
||||
This program 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
|
||||
Lesser General Public License for more details.
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
@ -1,3 +1,35 @@
|
||||
2011-02-12 Phil Hagelberg <phil@hagelb.org>
|
||||
|
||||
* emacs-lisp/package.el: Allow packages to be reinstalled.
|
||||
(package--write-file-no-coding): Remove EXCL arg.
|
||||
(package-unpack-single): Don't use it.
|
||||
|
||||
2011-02-12 Karl Pflästerer <k@rl.pflaesterer.de> (tiny change)
|
||||
|
||||
* vc/vc-svn.el: Adapt to Subversion change, with no .svn directory
|
||||
in each sub directory.
|
||||
(vc-svn-registered): Use vc-svn-root.
|
||||
(vc-svn-root): New function. Make vc-svn-responsible-p an alias.
|
||||
(vc-svn-repository-hostname): Use "svn info".
|
||||
|
||||
2011-02-11 Deniz Dogan <deniz.a.m.dogan@gmail.com>
|
||||
|
||||
* simple.el (delete-trailing-whitespace): New optional buffer
|
||||
bound parameters.
|
||||
|
||||
2011-02-11 Bastien Guerry <bzg@altern.org>
|
||||
|
||||
* files.el (basic-save-buffer): save unmodified buffers when
|
||||
the file pointed by buffer-file-name doesn't exist.
|
||||
|
||||
2011-02-11 Deniz Dogan <deniz.a.m.dogan@gmail.com>
|
||||
|
||||
* net/rcirc.el (defun-rcirc-join): Accept multiple channels.
|
||||
|
||||
2011-02-11 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* emacs-lisp/cl-specs.el (multiple-value-bind): Fix debug spec.
|
||||
|
||||
2011-02-11 Juanma Barranquero <lekktu@gmail.com>
|
||||
|
||||
* net/rcirc.el (rcirc-send-ctcp): Remove spurious arg to `format'.
|
||||
|
@ -67,7 +67,7 @@
|
||||
(def-edebug-spec multiple-value-list (form))
|
||||
(def-edebug-spec multiple-value-call (function-form body))
|
||||
(def-edebug-spec multiple-value-bind
|
||||
((&rest symbolp) form cl-declarations body))
|
||||
((&rest symbolp) form body))
|
||||
(def-edebug-spec multiple-value-setq ((&rest symbolp) form))
|
||||
(def-edebug-spec multiple-value-prog1 (form body))
|
||||
|
||||
|
@ -577,23 +577,22 @@ Otherwise it uses an external `tar' program.
|
||||
(let ((load-path (cons pkg-dir load-path)))
|
||||
(byte-recompile-directory pkg-dir 0 t)))))
|
||||
|
||||
(defun package--write-file-no-coding (file-name excl)
|
||||
(defun package--write-file-no-coding (file-name)
|
||||
(let ((buffer-file-coding-system 'no-conversion))
|
||||
(write-region (point-min) (point-max) file-name nil nil nil excl)))
|
||||
(write-region (point-min) (point-max) file-name)))
|
||||
|
||||
(defun package-unpack-single (file-name version desc requires)
|
||||
"Install the contents of the current buffer as a package."
|
||||
;; Special case "package".
|
||||
(if (string= file-name "package")
|
||||
(package--write-file-no-coding
|
||||
(expand-file-name (concat file-name ".el") package-user-dir)
|
||||
nil)
|
||||
(expand-file-name (concat file-name ".el") package-user-dir))
|
||||
(let* ((pkg-dir (expand-file-name (concat file-name "-" version)
|
||||
package-user-dir))
|
||||
(el-file (expand-file-name (concat file-name ".el") pkg-dir))
|
||||
(pkg-file (expand-file-name (concat file-name "-pkg.el") pkg-dir)))
|
||||
(make-directory pkg-dir t)
|
||||
(package--write-file-no-coding el-file 'excl)
|
||||
(package--write-file-no-coding el-file)
|
||||
(let ((print-level nil)
|
||||
(print-length nil))
|
||||
(write-region
|
||||
|
@ -4309,7 +4309,11 @@ Before and after saving the buffer, this function runs
|
||||
;; In an indirect buffer, save its base buffer instead.
|
||||
(if (buffer-base-buffer)
|
||||
(set-buffer (buffer-base-buffer)))
|
||||
(if (buffer-modified-p)
|
||||
(if (or (buffer-modified-p)
|
||||
;; handle the case when no modification has been made but
|
||||
;; the file disappeared since visited
|
||||
(and buffer-file-name
|
||||
(not (file-exists-p buffer-file-name))))
|
||||
(let ((recent-save (recent-auto-save-p))
|
||||
setmodes)
|
||||
;; If buffer has no file name, ask user for one.
|
||||
|
@ -116,7 +116,7 @@ Whether the passphrase is cached at all is controlled by
|
||||
:type 'integer)
|
||||
|
||||
(defcustom mml2015-signers nil
|
||||
"A list of your own key ID which will be used to sign a message.
|
||||
"A list of your own key ID(s) which will be used to sign a message.
|
||||
If set, it overrides the setting of `mml2015-sign-with-sender'."
|
||||
:group 'mime-security
|
||||
:type '(repeat (string :tag "Key ID")))
|
||||
|
@ -2098,14 +2098,18 @@ activity. Only run if the buffer is not visible and
|
||||
(when (not existing-buffer)
|
||||
(rcirc-cmd-whois nick))))
|
||||
|
||||
(defun-rcirc-command join (channel)
|
||||
"Join CHANNEL."
|
||||
(interactive "sJoin channel: ")
|
||||
(let ((buffer (rcirc-get-buffer-create process
|
||||
(car (split-string channel)))))
|
||||
(rcirc-send-string process (concat "JOIN " channel))
|
||||
(defun-rcirc-command join (channels)
|
||||
"Join CHANNELS.
|
||||
CHANNELS is a comma- or space-separated string of channel names."
|
||||
(interactive "sJoin channels: ")
|
||||
(let* ((split-channels (split-string channels "[ ,]" t))
|
||||
(buffers (mapcar (lambda (ch)
|
||||
(rcirc-get-buffer-create process ch))
|
||||
split-channels)))
|
||||
(rcirc-send-string process (concat "JOIN " channels))
|
||||
(when (not (eq (selected-window) (minibuffer-window)))
|
||||
(switch-to-buffer buffer))))
|
||||
(dolist (b buffers) ;; order the new channel buffers in the buffer list
|
||||
(switch-to-buffer b)))))
|
||||
|
||||
;; TODO: /part #channel reason, or consider removing #channel altogether
|
||||
(defun-rcirc-command part (channel)
|
||||
|
@ -614,22 +614,30 @@ On nonblank line, delete any immediately following blank lines."
|
||||
(if (looking-at "^[ \t]*\n\\'")
|
||||
(delete-region (point) (point-max)))))
|
||||
|
||||
(defun delete-trailing-whitespace ()
|
||||
(defun delete-trailing-whitespace (&optional start end)
|
||||
"Delete all the trailing whitespace across the current buffer.
|
||||
All whitespace after the last non-whitespace character in a line is deleted.
|
||||
This respects narrowing, created by \\[narrow-to-region] and friends.
|
||||
A formfeed is not considered whitespace by this function."
|
||||
(interactive "*")
|
||||
A formfeed is not considered whitespace by this function.
|
||||
If the region is active, only delete whitespace within the region."
|
||||
(interactive (progn
|
||||
(barf-if-buffer-read-only)
|
||||
(if (use-region-p)
|
||||
(list (region-beginning) (region-end))
|
||||
(list nil nil))))
|
||||
(save-match-data
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward "\\s-$" nil t)
|
||||
(skip-syntax-backward "-" (save-excursion (forward-line 0) (point)))
|
||||
;; Don't delete formfeeds, even if they are considered whitespace.
|
||||
(save-match-data
|
||||
(if (looking-at ".*\f")
|
||||
(goto-char (match-end 0))))
|
||||
(delete-region (point) (match-end 0))))))
|
||||
(let ((end-marker (copy-marker (or end (point-max))))
|
||||
(start (or start (point-min))))
|
||||
(goto-char start)
|
||||
(while (re-search-forward "\\s-$" end-marker t)
|
||||
(skip-syntax-backward "-" (save-excursion (forward-line 0) (point)))
|
||||
;; Don't delete formfeeds, even if they are considered whitespace.
|
||||
(save-match-data
|
||||
(if (looking-at ".*\f")
|
||||
(goto-char (match-end 0))))
|
||||
(delete-region (point) (match-end 0)))
|
||||
(set-marker end-marker nil)))))
|
||||
|
||||
(defun newline-and-indent ()
|
||||
"Insert a newline, then indent according to major mode.
|
||||
|
@ -117,17 +117,13 @@ If you want to force an empty list of arguments, use t."
|
||||
;;;###autoload (getenv "SVN_ASP_DOT_NET_HACK"))
|
||||
;;;###autoload "_svn")
|
||||
;;;###autoload (t ".svn"))))
|
||||
;;;###autoload (when (file-readable-p (expand-file-name
|
||||
;;;###autoload (concat admin-dir "/entries")
|
||||
;;;###autoload (file-name-directory f)))
|
||||
;;;###autoload (when (vc-find-root f admin-dir)
|
||||
;;;###autoload (load "vc-svn")
|
||||
;;;###autoload (vc-svn-registered f))))
|
||||
|
||||
(defun vc-svn-registered (file)
|
||||
"Check if FILE is SVN registered."
|
||||
(when (file-readable-p (expand-file-name (concat vc-svn-admin-directory
|
||||
"/entries")
|
||||
(file-name-directory file)))
|
||||
(when (vc-svn-root file)
|
||||
(with-temp-buffer
|
||||
(cd (file-name-directory file))
|
||||
(let* (process-file-side-effects
|
||||
@ -275,14 +271,12 @@ Passes either `vc-svn-register-switches' or `vc-register-switches'
|
||||
to the SVN command."
|
||||
(apply 'vc-svn-command nil 0 files "add" (vc-switches 'SVN 'register)))
|
||||
|
||||
(defun vc-svn-responsible-p (file)
|
||||
"Return non-nil if SVN thinks it is responsible for FILE."
|
||||
(file-directory-p (expand-file-name vc-svn-admin-directory
|
||||
(if (file-directory-p file)
|
||||
file
|
||||
(file-name-directory file)))))
|
||||
(defun vc-svn-root (file)
|
||||
(vc-find-root file vc-svn-admin-directory))
|
||||
|
||||
(defalias 'vc-svn-could-register 'vc-svn-responsible-p
|
||||
(defalias 'vc-svn-responsible-p 'vc-svn-root)
|
||||
|
||||
(defalias 'vc-svn-could-register 'vc-svn-root
|
||||
"Return non-nil if FILE could be registered in SVN.
|
||||
This is only possible if SVN is responsible for FILE's directory.")
|
||||
|
||||
@ -594,20 +588,10 @@ and that it passes `vc-svn-global-switches' to it before FLAGS."
|
||||
|
||||
(defun vc-svn-repository-hostname (dirname)
|
||||
(with-temp-buffer
|
||||
(let ((coding-system-for-read
|
||||
(or file-name-coding-system
|
||||
default-file-name-coding-system)))
|
||||
(vc-insert-file (expand-file-name (concat vc-svn-admin-directory
|
||||
"/entries")
|
||||
dirname)))
|
||||
(let (process-file-side-effects)
|
||||
(vc-svn-command t t dirname "info" "--xml"))
|
||||
(goto-char (point-min))
|
||||
(when (re-search-forward
|
||||
;; Old `svn' used name="svn:this_dir", newer use just name="".
|
||||
(concat "name=\"\\(?:svn:this_dir\\)?\"[\n\t ]*"
|
||||
"\\(?:[-a-z]+=\"[^\"]*\"[\n\t ]*\\)*?"
|
||||
"url=\"\\(?1:[^\"]+\\)\""
|
||||
;; Yet newer ones don't use XML any more.
|
||||
"\\|^\ndir\n[0-9]+\n\\(?1:.*\\)") nil t)
|
||||
(when (re-search-forward "<url>\\(.*\\)</url>" nil t)
|
||||
;; This is not a hostname but a URL. This may actually be considered
|
||||
;; as a feature since it allows vc-svn-stay-local to specify different
|
||||
;; behavior for different modules on the same server.
|
||||
|
@ -1,3 +1,19 @@
|
||||
2011-02-11 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* Makefile.in (USE_X_TOOLKIT, RM, TOOLKIT_DEFINES): Remove.
|
||||
(ALL_CFLAGS): Remove -I.
|
||||
(config_h, lisp_h, src_h): New variables.
|
||||
(globals_h): Rename from $globals.
|
||||
($(globals_h)): Check cd exit status.
|
||||
(lwlib.o): Remove special rule.
|
||||
(lwlib-utils.o, lwlib.o, lwlib-Xlw.o, lwlib-Xaw.o, lwlib-Xm.o)
|
||||
(xlwmenu.o): Add lisp.h and config.h to prereqs.
|
||||
(lwlib-utils.o): Add lwlib.h to prereqs.
|
||||
(lwlib.o): Add lwlib-utils.h and lwlib-Xm.h to prereqs.
|
||||
(lwlib-Xlw.o): Add xlwmenu.h to prereqs.
|
||||
(xlwmenu.o): Add ../src/xterm.h to prereqs.
|
||||
(mostlyclean): Forget about "core" files.
|
||||
|
||||
2011-02-10 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* lwlib-Xaw.c, lwlib-Xlw.c, lwlib-Xm.c, lwlib-utils.c, lwlib.c:
|
||||
|
@ -36,61 +36,64 @@ CC=@CC@
|
||||
CFLAGS=@CFLAGS@
|
||||
CPPFLAGS=@CPPFLAGS@
|
||||
RANLIB=@RANLIB@
|
||||
# See below--@X_TOOLKIT_TYPE@ is used below.
|
||||
USE_X_TOOLKIT=@X_TOOLKIT_TYPE@
|
||||
|
||||
AR = ar cq
|
||||
RM = rm -f
|
||||
|
||||
LUCID_OBJS = lwlib-Xlw.o xlwmenu.o lwlib-Xaw.o
|
||||
MOTIF_OBJS = lwlib-Xm.o
|
||||
|
||||
TOOLKIT_DEFINES =
|
||||
## LUCID_OBJS or MOTIF_OBJS.
|
||||
TOOLKIT_OBJS = $(@X_TOOLKIT_TYPE@_OBJS)
|
||||
|
||||
OBJS = lwlib.o $(TOOLKIT_OBJS) lwlib-utils.o
|
||||
|
||||
# ../src is needed to find config.h.
|
||||
## ../src is where the generated file (config.h, globals.h) are.
|
||||
## $(srcdir)/../src is where the non-generated files (lisp.h) are.
|
||||
## (In an out-of-tree build, these two are not the same.)
|
||||
## $(srcdir) is where the lwlib sources are.
|
||||
## There are no generated lwlib files, hence no need for -I.
|
||||
ALL_CFLAGS= $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \
|
||||
$(C_SWITCH_X_SYSTEM) $(C_SWITCH_MACHINE) \
|
||||
${C_WARNINGS_SWITCH} ${PROFILING_CFLAGS} $(CFLAGS) \
|
||||
-DHAVE_CONFIG_H -Demacs -I. -I../src -I${srcdir} -I${srcdir}/../src
|
||||
$(C_WARNINGS_SWITCH) $(PROFILING_CFLAGS) $(CFLAGS) \
|
||||
-DHAVE_CONFIG_H -Demacs -I../src -I$(srcdir) -I$(srcdir)/../src
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CPPFLAGS) ${ALL_CFLAGS} $<
|
||||
$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
|
||||
|
||||
all:: liblw.a
|
||||
|
||||
liblw.a: $(OBJS)
|
||||
$(RM) $@
|
||||
rm -f $@
|
||||
$(AR) $@ $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
## Generated files in ../src, non-generated in $(srcdir)/../src.
|
||||
config_h = ../src/config.h
|
||||
lisp_h = $(srcdir)/../src/lisp.h
|
||||
## lisp.h includes this.
|
||||
globals = ../src/globals.h
|
||||
globals_h = ../src/globals.h
|
||||
src_h = $(config_h) $(lisp_h) $(globals_h)
|
||||
|
||||
$(globals):
|
||||
cd ../src; $(MAKE) $(MFLAGS) globals.h
|
||||
$(globals_h):
|
||||
cd ../src && $(MAKE) $(MFLAGS) globals.h
|
||||
|
||||
# Depend on Makefile so that we recompile if TOOLKIT_DEFINES changes.
|
||||
lwlib.o: $(srcdir)/lwlib.c Makefile
|
||||
$(CC) -c $(CPPFLAGS) $(TOOLKIT_DEFINES) $(ALL_CFLAGS) $(srcdir)/lwlib.c
|
||||
|
||||
lwlib-utils.o: $(globals) lwlib-utils.c lwlib-utils.h
|
||||
lwlib.o: $(globals) lwlib.c lwlib.h lwlib-int.h lwlib-Xaw.h lwlib-Xlw.h
|
||||
lwlib-Xlw.o: $(globals) lwlib-Xlw.c lwlib.h lwlib-int.h lwlib-Xlw.h
|
||||
lwlib-Xaw.o: $(globals) lwlib-Xaw.c lwlib-Xaw.h lwlib.h lwlib-int.h
|
||||
lwlib-Xm.o: $(globals) lwlib-Xm.c lwlib-Xm.h lwlib.h lwlib-int.h lwlib-utils.h
|
||||
xlwmenu.o: $(globals) xlwmenu.c xlwmenu.h lwlib.h xlwmenuP.h
|
||||
lwlib-utils.o: $(src_h) lwlib-utils.c lwlib-utils.h lwlib.h
|
||||
lwlib.o: $(src_h) lwlib.c lwlib.h lwlib-int.h lwlib-utils.h \
|
||||
lwlib-Xlw.h lwlib-Xm.h lwlib-Xaw.h
|
||||
lwlib-Xlw.o: $(src_h) lwlib-Xlw.c lwlib.h lwlib-int.h lwlib-Xlw.h xlwmenu.h
|
||||
lwlib-Xaw.o: $(src_h) lwlib-Xaw.c lwlib-Xaw.h lwlib.h lwlib-int.h
|
||||
lwlib-Xm.o: $(src_h) lwlib-Xm.c lwlib-Xm.h lwlib.h lwlib-int.h lwlib-utils.h
|
||||
xlwmenu.o: $(src_h) xlwmenu.c xlwmenu.h lwlib.h xlwmenuP.h \
|
||||
$(srcdir)/../src/xterm.h
|
||||
|
||||
mostlyclean:
|
||||
$(RM) *.o core liblw.a \#*
|
||||
rm -f *.o liblw.a \#*
|
||||
|
||||
clean: mostlyclean
|
||||
distclean: clean
|
||||
$(RM) Makefile
|
||||
rm -f Makefile
|
||||
maintainer-clean: distclean
|
||||
$(RM) TAGS
|
||||
rm -f TAGS
|
||||
|
||||
TAGS:
|
||||
../lib-src/etags $(srcdir)/*.[ch]
|
||||
|
@ -1,4 +1,4 @@
|
||||
2011-02-10 Paul Eggert <eggert@cs.ucla.edu>
|
||||
2011-02-12 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
Remove no-longer needed getloadavg symbols.
|
||||
* m/alpha.h (LOAD_AVE_TYPE, LOAD_AVE_CVT): Remove.
|
||||
@ -24,6 +24,19 @@
|
||||
* src/s/netbsd.h (HAVE_GETLOADAVG): Likewise.
|
||||
* config.in: Regenerate.
|
||||
|
||||
2011-02-12 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
Port to Solaris 10, which doesn't support FC_HINT_STYLE.
|
||||
* xftfont.c (FC_HINT_STYLE): #define to "hintstyle" if not
|
||||
defined.
|
||||
* xsettings.c (parse_settings, apply_xft_settings): Don't assume
|
||||
FC_HINT_STYLE is supported.
|
||||
|
||||
2011-02-11 Jan Djärv <jan.h.d@swipnet.se>
|
||||
|
||||
* xterm.c (x_set_frame_alpha): Access data before it is free:d.
|
||||
Make sure we don't do x_catch_errors twice.
|
||||
|
||||
2011-02-10 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* Makefile.in (really-lwlib): Depend on globals.h, for parallel builds.
|
||||
|
@ -187,17 +187,20 @@ xftfont_fix_match (FcPattern *pat, FcPattern *match)
|
||||
double dpi;
|
||||
|
||||
FcPatternGetBool (pat, FC_ANTIALIAS, 0, &b);
|
||||
if (! b)
|
||||
if (! b)
|
||||
{
|
||||
FcPatternDel (match, FC_ANTIALIAS);
|
||||
FcPatternAddBool (match, FC_ANTIALIAS, FcFalse);
|
||||
}
|
||||
FcPatternGetBool (pat, FC_HINTING, 0, &b);
|
||||
if (! b)
|
||||
if (! b)
|
||||
{
|
||||
FcPatternDel (match, FC_HINTING);
|
||||
FcPatternAddBool (match, FC_HINTING, FcFalse);
|
||||
}
|
||||
#ifndef FC_HINT_STYLE
|
||||
# define FC_HINT_STYLE "hintstyle"
|
||||
#endif
|
||||
if (FcResultMatch == FcPatternGetInteger (pat, FC_HINT_STYLE, 0, &i))
|
||||
{
|
||||
FcPatternDel (match, FC_HINT_STYLE);
|
||||
@ -781,4 +784,3 @@ syms_of_xftfont (void)
|
||||
|
||||
register_font_driver (&xftfont_driver, NULL);
|
||||
}
|
||||
|
||||
|
@ -75,7 +75,7 @@ enum {
|
||||
SEEN_FONT = 0x40,
|
||||
SEEN_TB_STYLE = 0x80,
|
||||
};
|
||||
struct xsettings
|
||||
struct xsettings
|
||||
{
|
||||
#ifdef HAVE_XFT
|
||||
FcBool aa, hinting;
|
||||
@ -104,7 +104,7 @@ something_changedCB (GConfClient *client,
|
||||
gpointer user_data)
|
||||
{
|
||||
GConfValue *v = gconf_entry_get_value (entry);
|
||||
|
||||
|
||||
if (!v) return;
|
||||
if (v->type == GCONF_VALUE_STRING)
|
||||
{
|
||||
@ -196,7 +196,7 @@ get_prop_window (struct x_display_info *dpyinfo)
|
||||
4 CARD32 last-change-serial
|
||||
|
||||
and then the value, For string:
|
||||
|
||||
|
||||
bytes type what
|
||||
------------------------------------
|
||||
4 CARD32 n = value-length
|
||||
@ -280,7 +280,7 @@ parse_settings (unsigned char *prop,
|
||||
(strcmp (XSETTINGS_FONT_NAME, name) == 0)
|
||||
|| (strcmp (XSETTINGS_TOOL_BAR_STYLE, name) == 0);
|
||||
|
||||
switch (type)
|
||||
switch (type)
|
||||
{
|
||||
case 0: /* Integer */
|
||||
if (bytes_parsed+4 > bytes) return BadLength;
|
||||
@ -310,14 +310,14 @@ parse_settings (unsigned char *prop,
|
||||
case 2: /* RGB value */
|
||||
/* No need to parse this */
|
||||
if (bytes_parsed+8 > bytes) return BadLength;
|
||||
bytes_parsed += 8; /* 4 values (r, b, g, alpha), 2 bytes each. */
|
||||
bytes_parsed += 8; /* 4 values (r, b, g, alpha), 2 bytes each. */
|
||||
break;
|
||||
|
||||
default: /* Parse Error */
|
||||
return BadValue;
|
||||
}
|
||||
|
||||
if (want_this)
|
||||
if (want_this)
|
||||
{
|
||||
++settings_seen;
|
||||
if (strcmp (name, XSETTINGS_FONT_NAME) == 0)
|
||||
@ -341,6 +341,7 @@ parse_settings (unsigned char *prop,
|
||||
settings->seen |= SEEN_HINTING;
|
||||
settings->hinting = ival != 0;
|
||||
}
|
||||
# ifdef FC_HINT_STYLE
|
||||
else if (strcmp (name, "Xft/HintStyle") == 0)
|
||||
{
|
||||
settings->seen |= SEEN_HINTSTYLE;
|
||||
@ -355,6 +356,7 @@ parse_settings (unsigned char *prop,
|
||||
else
|
||||
settings->seen &= ~SEEN_HINTSTYLE;
|
||||
}
|
||||
# endif
|
||||
else if (strcmp (name, "Xft/RGBA") == 0)
|
||||
{
|
||||
settings->seen |= SEEN_RGBA;
|
||||
@ -442,7 +444,9 @@ apply_xft_settings (struct x_display_info *dpyinfo,
|
||||
pat);
|
||||
FcPatternGetBool (pat, FC_ANTIALIAS, 0, &oldsettings.aa);
|
||||
FcPatternGetBool (pat, FC_HINTING, 0, &oldsettings.hinting);
|
||||
# ifdef FC_HINT_STYLE
|
||||
FcPatternGetInteger (pat, FC_HINT_STYLE, 0, &oldsettings.hintstyle);
|
||||
# endif
|
||||
FcPatternGetInteger (pat, FC_LCD_FILTER, 0, &oldsettings.lcdfilter);
|
||||
FcPatternGetInteger (pat, FC_RGBA, 0, &oldsettings.rgba);
|
||||
FcPatternGetDouble (pat, FC_DPI, 0, &oldsettings.dpi);
|
||||
@ -488,6 +492,7 @@ apply_xft_settings (struct x_display_info *dpyinfo,
|
||||
if (strlen (buf) > 0) strcat (buf, ", ");
|
||||
sprintf (buf+strlen (buf), "LCDFilter: %d", oldsettings.lcdfilter);
|
||||
|
||||
# ifdef FC_HINT_STYLE
|
||||
if ((settings->seen & SEEN_HINTSTYLE) != 0
|
||||
&& oldsettings.hintstyle != settings->hintstyle)
|
||||
{
|
||||
@ -496,6 +501,7 @@ apply_xft_settings (struct x_display_info *dpyinfo,
|
||||
++changed;
|
||||
oldsettings.hintstyle = settings->hintstyle;
|
||||
}
|
||||
# endif
|
||||
if (strlen (buf) > 0) strcat (buf, ", ");
|
||||
sprintf (buf+strlen (buf), "Hintstyle: %d", oldsettings.hintstyle);
|
||||
|
||||
@ -508,7 +514,7 @@ apply_xft_settings (struct x_display_info *dpyinfo,
|
||||
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)
|
||||
@ -565,7 +571,7 @@ read_and_apply_settings (struct x_display_info *dpyinfo, int send_event_p)
|
||||
|
||||
if (settings.seen & SEEN_FONT)
|
||||
{
|
||||
if (!current_font || strcmp (current_font, settings.font) != 0)
|
||||
if (!current_font || strcmp (current_font, settings.font) != 0)
|
||||
{
|
||||
free (current_font);
|
||||
current_font = settings.font;
|
||||
@ -774,4 +780,3 @@ If this variable is nil, Emacs ignores system font changes. */);
|
||||
|
||||
Fprovide (intern_c_string ("dynamic-setting"), Qnil);
|
||||
}
|
||||
|
||||
|
@ -488,17 +488,16 @@ x_set_frame_alpha (struct frame *f)
|
||||
|
||||
if (rc == Success && actual != None)
|
||||
{
|
||||
unsigned long value = *(unsigned long *)data;
|
||||
XFree ((void *) data);
|
||||
if (*(unsigned long *)data == opac)
|
||||
if (value == opac)
|
||||
{
|
||||
x_uncatch_errors ();
|
||||
return;
|
||||
}
|
||||
}
|
||||
x_uncatch_errors ();
|
||||
}
|
||||
|
||||
x_catch_errors (dpy);
|
||||
XChangeProperty (dpy, win, dpyinfo->Xatom_net_wm_window_opacity,
|
||||
XA_CARDINAL, 32, PropModeReplace,
|
||||
(unsigned char *) &opac, 1L);
|
||||
|
Loading…
Reference in New Issue
Block a user