commit f2dbc7f9f6bfeb8652b4dceacfefc4549af9bf39 (HEAD, refs/remotes/origin/master) Author: Juanma Barranquero Date: Tue Oct 20 13:42:18 2015 +0200 ; etc/NEWS: Remove duplicate text. diff --git a/etc/NEWS b/etc/NEWS index ac6ccb8..ef90268 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1001,10 +1001,6 @@ behavior, set `diff-switches' to `-c'. ** `grep-template' and `grep-find-template' values don't include the --color argument anymore. It's added at the place holder position -dynamically. - -** `grep-template' and `grep-find-template' values don't include the ---color argument anymore. It's added at the place holder position dynamically. Any third-party code that changes these templates should be updated accordingly. commit 8b40f8d9539856700664d395d7331dd9a2f232ed Author: Katsumi Yamaoka Date: Wed Oct 21 05:36:51 2015 +0000 lisp/gnus/mailcap.el (mailcap-mailcap-entry-passes-test): Doc fix diff --git a/lisp/gnus/mailcap.el b/lisp/gnus/mailcap.el index a3348c6..d888110 100644 --- a/lisp/gnus/mailcap.el +++ b/lisp/gnus/mailcap.el @@ -556,8 +556,11 @@ MAILCAPS if set; otherwise (on Unix) use the path from RFC 1524, plus results))) (defun mailcap-mailcap-entry-passes-test (info) - "Return non-nil if mailcap entry INFO passes its test clause. -Also return non-nil if no test clause is present." + "Replace the test clause of INFO itself with a boolean for some cases. +This function supports only `test -n $DISPLAY' and `test -z $DISPLAY', +replaces them with t or nil. As for others or if INFO has a interactive +spec (needsterm, needsterminal, or needsx11) but DISPLAY is not set, +the test clause will be unchanged." (let ((test (assq 'test info)) ; The test clause status) (setq status (and test (split-string (cdr test) " "))) commit 63cfb75f3a9d0f658e099ae18779e305a7e49fee Author: Paul Eggert Date: Tue Oct 20 18:27:05 2015 -0700 Include-file cleanup for src directory Omit ‘#include "foo.h"’ unless the file needs foo.h (Bug#21707). In a few cases, add ‘#include "foo.h"’ if the file needs foo.h but does not include it directly. As a general rule, a source file should include foo.h if it needs the interfaces that foo.h defines. * src/alloc.c: Don’t include process.h. Include dispextern.h, systime.h. * src/atimer.c: Don’t include blockinput.h. * src/buffer.c: Include coding.h, systime.h. Don’t include keyboard.h, coding.h. * src/callint.c: Don’t include commands.h, keymap.h. * src/callproc.c: Don’t include character.h, ccl.h, composite.h, systty.h, termhooks.h. * src/casetab.c: Don’t include character.h. * src/category.c: Don’t include charset.h, keymap.h. * src/ccl.h: Don’t include character.h. * src/character.c: Don’t include charset.h. * src/charset.c: Don’t include disptab.h. * src/chartab.c: Don’t include ccl.h. * src/cm.c: Don’t include frame.h, termhooks.h. * src/cmds.c: Don’t include window.h, dispextern.h. * src/coding.c: Don’t include window.h, frame.h. * src/composite.c: Include composite.h. Don’t include window.h, font.h. * src/data.c: Don’t include syssignal.h, termhooks.h, font.h. * src/dbusbind.c: Don’t include frame.h. * src/decompress.c: Don’t include character.h. * src/dired.c: Don’t include character.h, commands.h, charset.h. * src/dispnew.c: Don’t include character.h, indent.h, intervals.h, process.h, timespec.h. Include systime.h. * src/doc.c: Include coding.h. Don’t include keyboard.h. * src/editfns.c: Include composite.h. Don’t include frame.h. * src/emacs.c: Include fcntl.h, coding.h. Don’t include commands.h, systty.h.. * src/fileio.c: Don’t include intervals.h, dispextern.h. Include composite.h. * src/filelock.c: Don’t include character.h, systime.h. * src/fns.c: Don’t include time.h, commands.h, keyboard.h, keymap.h, frame.h, blockinput.h, xterm.h. Include composite.h. * src/font.c: Include termhooks.h. * src/font.h: Don’t include ccl.h, frame.h. Add forward decls of struct composition_it, struct face, struct glyph_string. * src/fontset.c: Don’t include buffer.h, ccl.h, keyboard.h, intervals.h, window.h, termhooks.h. * src/frame.c: Don’t include character.h, commands.h, font.h. * src/frame.h: Don’t include dispextern.h. * src/fringe.c: Don’t include character.h. * src/ftcrfont.c: Don’t include dispextern.h, frame.h, character.h, charset.h, fontset.h. * src/ftfont.c: Don’t include frame.h, blockinput.h, coding.h, fontset.h. * src/ftxfont.c: Don’t include dispextern.h, character.h, charset.h, fontset.h. * src/gfilenotify.c: Don’t include frame.h, process.h. * src/gtkutil.c: Include dispextern.h, frame.h, systime.h. Don’t include syssignal.h, buffer.h, charset.h, font.h. * src/gtkutil.h: Don’t include frame.h. * src/image.c: Include fcntl.h and stdio.h instead of sysstdio.h. Don’t include character.h. * src/indent.c: Don’t include keyboard.h, termchar.h. * src/inotify.c: Don’t include character.h, frame.h. * src/insdel.c: Include composite.h. Don’t include blockinput.h. * src/intervals.c: Don’t include character.h, keyboard.h. * src/intervals.h: Don’t include dispextern.h, composite.h. * src/keyboard.c: Don’t include sysstdio.h, disptab.h, puresize.h. Include coding.h. * src/keyboard.h: Don’t incldue systime.h. * src/keymap.c: Don’t include charset.h, frame.h. * src/lread.c: Include dispextern.h and systime.h. Don’t include frame.h. Include systime.h. * src/macros.c: Don’t include commands.h, character.h, buffer.h. * src/menu.c: Include character.h, coding.h. Don’t include dispextern.h. * src/menu.h: Don’t include systime.h. * src/minibuf.c: Don’t include commands.h, dispextern.h, syntax.h, intervals.h, termhooks.h. * src/print.c: Include coding.h. Don’t include keyboard.h, window.h, dispextern.h, termchar.h, termhooks.h, font.h. Add forward decl of struct terminal. * src/process.c: Don’t include termhooks.h, commands.h, dispextern.h, composite.h. * src/region-cache.c: Don’t include character.h. * src/scroll.c: Don’t include keyboard.h, window.h. * src/search.c: Don’t include category.h, commands.h. * src/sound.c: Don’t include dispextern.h. * src/syntax.c: Don’t include command.h, keymap.h. * src/sysdep.c: Don’t include window.h, dispextern.h. * src/systime.h: Use ‘#ifdef emacs’, not ‘#ifdef EMACS_LISP_H’, * src/term.c: Don’t include systty.h, intervals.h, xterm.h. * src/terminal.c: Include character.h. Don’t include charset.h, coding.h. * src/textprop.c: Don’t include character.h. * src/undo.c: Don’t include character.h, commands.h, window.h. * src/unexsol.c: Don’t include character.h, charset.h. * src/widget.c: Include widget.h. Don’t include keyboard.h, window.h, dispextern.h, blockinput.h, character.h, font.h. * src/widgetprv.h: Don’t include widget.h. * src/window.c: Don’t include character.h, menu.h, intervals.h. * src/xdisp.c: Include composite.h, systime.h. Don’t include macros.h, process.h. * src/xfaces.c: Don’t include charset.h, keyboard.h, termhooks.h, intervals.h. * src/xfns.c: Don’t include menu.h, character.h, intervals.h, epaths.h, fontset.h, systime.h, atimer.h, termchar.h. * src/xfont.c: Don’t include dispextern.h, fontset.h, ccl.h. * src/xftfont.c: Don’t include dispextern.h, character.h, fontset.h. * src/xgselect.c: Don’t include timespec.h, frame.h. Include systime.h. * src/xgselect.h: Don’t include time.h. Use a forward decl to struct timespec instead. * src/xmenu.c: Don’t include keymap.h, character.h, charset.h, dispextern.h. Include systime.h. * src/xml.c: Don’t include character.h. * src/xrdb.c [USE_MOTIF]: Don’t include keyboard.h. * src/xselect.c: Don’t include dispextern.h, character.h, buffer.h, process.h. * src/xsmfns.c: Don’t include systime.h, sysselect.h. * src/xterm.c: Don’t include syssignal.h, charset.h, disptab.h, intervals.h process.h, keymap.h, xgselect.h. Include composite.h. diff --git a/src/alloc.c b/src/alloc.c index f08a350..7c33687 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -32,9 +32,10 @@ along with GNU Emacs. If not, see . */ #endif #include "lisp.h" -#include "process.h" +#include "dispextern.h" #include "intervals.h" #include "puresize.h" +#include "systime.h" #include "character.h" #include "buffer.h" #include "window.h" diff --git a/src/atimer.c b/src/atimer.c index 8a1a48b..976b990 100644 --- a/src/atimer.c +++ b/src/atimer.c @@ -22,7 +22,6 @@ along with GNU Emacs. If not, see . */ #include "lisp.h" #include "syssignal.h" #include "systime.h" -#include "blockinput.h" #include "atimer.h" #include diff --git a/src/buffer.c b/src/buffer.c index 38ee74d..380a7af 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -30,7 +30,9 @@ along with GNU Emacs. If not, see . */ #include #include "lisp.h" +#include "coding.h" #include "intervals.h" +#include "systime.h" #include "window.h" #include "commands.h" #include "character.h" @@ -38,7 +40,6 @@ along with GNU Emacs. If not, see . */ #include "region-cache.h" #include "indent.h" #include "blockinput.h" -#include "keyboard.h" #include "keymap.h" #include "frame.h" @@ -4573,8 +4574,6 @@ evaporate_overlays (ptrdiff_t pos) #include #endif -#include "coding.h" - /* Memory is allocated in regions which are mapped using mmap(2). The current implementation lets the system select mapped diff --git a/src/callint.c b/src/callint.c index 12d116d..76ee13e 100644 --- a/src/callint.c +++ b/src/callint.c @@ -23,10 +23,8 @@ along with GNU Emacs. If not, see . */ #include "lisp.h" #include "character.h" #include "buffer.h" -#include "commands.h" #include "keyboard.h" #include "window.h" -#include "keymap.h" static Lisp_Object preserved_fns; diff --git a/src/callproc.c b/src/callproc.c index e38844e..eafd621 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -44,19 +44,14 @@ along with GNU Emacs. If not, see . */ #endif /* MSDOS */ #include "commands.h" -#include "character.h" #include "buffer.h" -#include "ccl.h" #include "coding.h" -#include "composite.h" #include #include "process.h" #include "syssignal.h" -#include "systty.h" #include "syswait.h" #include "blockinput.h" #include "frame.h" -#include "termhooks.h" #ifdef MSDOS #include "msdos.h" diff --git a/src/casetab.c b/src/casetab.c index b086abc..28da885 100644 --- a/src/casetab.c +++ b/src/casetab.c @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see . */ #include #include "lisp.h" -#include "character.h" #include "buffer.h" Lisp_Object Vascii_downcase_table; diff --git a/src/category.c b/src/category.c index 400116f..5c7cf07 100644 --- a/src/category.c +++ b/src/category.c @@ -33,9 +33,7 @@ along with GNU Emacs. If not, see . */ #include "lisp.h" #include "character.h" #include "buffer.h" -#include "charset.h" #include "category.h" -#include "keymap.h" /* This setter is used only in this file, so it can be private. */ static void diff --git a/src/ccl.h b/src/ccl.h index 7b72dc7..fdce437 100644 --- a/src/ccl.h +++ b/src/ccl.h @@ -26,8 +26,6 @@ along with GNU Emacs. If not, see . */ #ifndef EMACS_CCL_H #define EMACS_CCL_H -#include "character.h" /* For MAX_MULTIBYTE_LENGTH */ - /* Macros for exit status of CCL program. */ #define CCL_STAT_SUCCESS 0 /* Terminated successfully. */ #define CCL_STAT_SUSPEND_BY_SRC 1 /* Terminated by empty input. */ diff --git a/src/character.c b/src/character.c index f51d971..3e2bf1e 100644 --- a/src/character.c +++ b/src/character.c @@ -38,7 +38,6 @@ along with GNU Emacs. If not, see . */ #include "lisp.h" #include "character.h" #include "buffer.h" -#include "charset.h" #include "composite.h" #include "disptab.h" diff --git a/src/charset.c b/src/charset.c index eeebf17..04e81bb 100644 --- a/src/charset.c +++ b/src/charset.c @@ -38,7 +38,6 @@ along with GNU Emacs. If not, see . */ #include "character.h" #include "charset.h" #include "coding.h" -#include "disptab.h" #include "buffer.h" /*** GENERAL NOTES on CODED CHARACTER SETS (CHARSETS) *** diff --git a/src/chartab.c b/src/chartab.c index 274bb60..ec618f3 100644 --- a/src/chartab.c +++ b/src/chartab.c @@ -23,7 +23,6 @@ along with GNU Emacs. If not, see . */ #include "lisp.h" #include "character.h" #include "charset.h" -#include "ccl.h" /* 64/16/32/128 */ diff --git a/src/cm.c b/src/cm.c index 474f280..f0aa56d 100644 --- a/src/cm.c +++ b/src/cm.c @@ -22,9 +22,7 @@ along with GNU Emacs. If not, see . */ #include #include "lisp.h" -#include "frame.h" #include "cm.h" -#include "termhooks.h" #include "termchar.h" #include "tparam.h" diff --git a/src/cmds.c b/src/cmds.c index 39c5af9..0afc023 100644 --- a/src/cmds.c +++ b/src/cmds.c @@ -25,10 +25,8 @@ along with GNU Emacs. If not, see . */ #include "character.h" #include "buffer.h" #include "syntax.h" -#include "window.h" #include "keyboard.h" #include "keymap.h" -#include "dispextern.h" #include "frame.h" static int internal_self_insert (int, EMACS_INT); diff --git a/src/coding.c b/src/coding.c index c5099a7..0b42a36 100644 --- a/src/coding.c +++ b/src/coding.c @@ -297,8 +297,6 @@ encode_coding_XXX (struct coding_system *coding) #include "ccl.h" #include "composite.h" #include "coding.h" -#include "window.h" -#include "frame.h" #include "termhooks.h" Lisp_Object Vcoding_system_hash_table; diff --git a/src/composite.c b/src/composite.c index 88cef22..0f729bc 100644 --- a/src/composite.c +++ b/src/composite.c @@ -26,13 +26,12 @@ along with GNU Emacs. If not, see . */ #include "lisp.h" #include "character.h" +#include "composite.h" #include "buffer.h" #include "coding.h" #include "intervals.h" -#include "window.h" #include "frame.h" #include "dispextern.h" -#include "font.h" #include "termhooks.h" diff --git a/src/data.c b/src/data.c index 33fe285..5382b01 100644 --- a/src/data.c +++ b/src/data.c @@ -32,9 +32,6 @@ along with GNU Emacs. If not, see . */ #include "buffer.h" #include "keyboard.h" #include "frame.h" -#include "syssignal.h" -#include "termhooks.h" /* For FRAME_KBOARD reference in y-or-n-p. */ -#include "font.h" #include "keymap.h" static void swap_in_symval_forwarding (struct Lisp_Symbol *, diff --git a/src/dbusbind.c b/src/dbusbind.c index 181c7d0..ce0465d 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c @@ -23,7 +23,6 @@ along with GNU Emacs. If not, see . */ #include #include "lisp.h" -#include "frame.h" #include "termhooks.h" #include "keyboard.h" #include "process.h" diff --git a/src/decompress.c b/src/decompress.c index 460d4fe..d0c0018 100644 --- a/src/decompress.c +++ b/src/decompress.c @@ -23,7 +23,6 @@ along with GNU Emacs. If not, see . */ #include #include "lisp.h" -#include "character.h" #include "buffer.h" #include diff --git a/src/dired.c b/src/dired.c index 3486e49..84bf247 100644 --- a/src/dired.c +++ b/src/dired.c @@ -39,10 +39,7 @@ along with GNU Emacs. If not, see . */ #include "lisp.h" #include "systime.h" -#include "character.h" #include "buffer.h" -#include "commands.h" -#include "charset.h" #include "coding.h" #include "regex.h" #include "blockinput.h" diff --git a/src/dispnew.c b/src/dispnew.c index 00d086e..18eed3c 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -28,7 +28,6 @@ along with GNU Emacs. If not, see . */ /* cm.h must come after dispextern.h on Windows. */ #include "dispextern.h" #include "cm.h" -#include "character.h" #include "buffer.h" #include "keyboard.h" #include "frame.h" @@ -36,12 +35,9 @@ along with GNU Emacs. If not, see . */ #include "window.h" #include "commands.h" #include "disptab.h" -#include "indent.h" -#include "intervals.h" #include "blockinput.h" -#include "process.h" - #include "syssignal.h" +#include "systime.h" #include "tparam.h" #ifdef HAVE_WINDOW_SYSTEM @@ -51,7 +47,6 @@ along with GNU Emacs. If not, see . */ #include #include -#include #ifdef WINDOWSNT #include "w32.h" diff --git a/src/doc.c b/src/doc.c index 68d4367..694c159 100644 --- a/src/doc.c +++ b/src/doc.c @@ -31,9 +31,9 @@ along with GNU Emacs. If not, see . */ #include "lisp.h" #include "character.h" +#include "coding.h" #include "buffer.h" #include "disptab.h" -#include "keyboard.h" #include "keymap.h" /* Buffer used for reading from documentation file. */ diff --git a/src/editfns.c b/src/editfns.c index 12e5ca8..050eb2a 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -52,11 +52,11 @@ along with GNU Emacs. If not, see . */ #include #include +#include "composite.h" #include "intervals.h" #include "character.h" #include "buffer.h" #include "coding.h" -#include "frame.h" #include "window.h" #include "blockinput.h" diff --git a/src/emacs.c b/src/emacs.c index 3eff5a7..b4052b8 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -22,6 +22,7 @@ along with GNU Emacs. If not, see . */ #include #include +#include #include #include @@ -59,13 +60,12 @@ along with GNU Emacs. If not, see . */ #include TERM_HEADER #endif /* HAVE_WINDOW_SYSTEM */ -#include "commands.h" +#include "coding.h" #include "intervals.h" #include "character.h" #include "buffer.h" #include "window.h" -#include "systty.h" #include "atimer.h" #include "blockinput.h" #include "syssignal.h" diff --git a/src/fileio.c b/src/fileio.c index 3155ef0..428093b 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -43,7 +43,7 @@ along with GNU Emacs. If not, see . */ #include #include "lisp.h" -#include "intervals.h" +#include "composite.h" #include "character.h" #include "buffer.h" #include "coding.h" @@ -51,7 +51,6 @@ along with GNU Emacs. If not, see . */ #include "blockinput.h" #include "region-cache.h" #include "frame.h" -#include "dispextern.h" #ifdef WINDOWSNT #define NOMINMAX 1 diff --git a/src/filelock.c b/src/filelock.c index cad6f83..7f9b6e7 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -45,10 +45,8 @@ along with GNU Emacs. If not, see . */ #include #include "lisp.h" -#include "character.h" #include "buffer.h" #include "coding.h" -#include "systime.h" #ifdef WINDOWSNT #include #include /* for fcntl */ diff --git a/src/fns.c b/src/fns.c index dfd48a2..f545066 100644 --- a/src/fns.c +++ b/src/fns.c @@ -21,25 +21,16 @@ along with GNU Emacs. If not, see . */ #include #include -#include - #include #include #include "lisp.h" -#include "commands.h" #include "character.h" #include "coding.h" +#include "composite.h" #include "buffer.h" -#include "keyboard.h" -#include "keymap.h" #include "intervals.h" -#include "frame.h" #include "window.h" -#include "blockinput.h" -#if defined (HAVE_X_WINDOWS) -#include "xterm.h" -#endif static void sort_vector_copy (Lisp_Object, ptrdiff_t, Lisp_Object [restrict], Lisp_Object [restrict]); diff --git a/src/font.c b/src/font.c index be55ce9..016b7e0 100644 --- a/src/font.c +++ b/src/font.c @@ -36,6 +36,7 @@ along with GNU Emacs. If not, see . */ #include "composite.h" #include "fontset.h" #include "font.h" +#include "termhooks.h" #ifdef HAVE_WINDOW_SYSTEM #include TERM_HEADER diff --git a/src/font.h b/src/font.h index 43e67e9..1d13e1c 100644 --- a/src/font.h +++ b/src/font.h @@ -22,8 +22,9 @@ along with GNU Emacs. If not, see . */ #ifndef EMACS_FONT_H #define EMACS_FONT_H -#include "ccl.h" -#include "frame.h" +struct composition_it; +struct face; +struct glyph_string; INLINE_HEADER_BEGIN diff --git a/src/fontset.c b/src/fontset.c index e735989..9429d79 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -30,19 +30,13 @@ along with GNU Emacs. If not, see . */ #include "lisp.h" #include "blockinput.h" #include "character.h" -#include "buffer.h" #include "charset.h" -#include "ccl.h" -#include "keyboard.h" #include "frame.h" #include "dispextern.h" -#include "intervals.h" #include "fontset.h" -#include "window.h" #ifdef HAVE_WINDOW_SYSTEM #include TERM_HEADER #endif /* HAVE_WINDOW_SYSTEM */ -#include "termhooks.h" #include "font.h" /* FONTSET diff --git a/src/frame.c b/src/frame.c index 6d596a4..78f8ff7 100644 --- a/src/frame.c +++ b/src/frame.c @@ -26,7 +26,6 @@ along with GNU Emacs. If not, see . */ #include #include "lisp.h" -#include "character.h" #ifdef HAVE_WINDOW_SYSTEM #include TERM_HEADER @@ -34,7 +33,6 @@ along with GNU Emacs. If not, see . */ #include "buffer.h" /* These help us bind and responding to switch-frame events. */ -#include "commands.h" #include "keyboard.h" #include "frame.h" #include "blockinput.h" @@ -42,7 +40,6 @@ along with GNU Emacs. If not, see . */ #include "termhooks.h" #include "dispextern.h" #include "window.h" -#include "font.h" #ifdef HAVE_WINDOW_SYSTEM #include "fontset.h" #endif diff --git a/src/frame.h b/src/frame.h index acac514..e7d3aab 100644 --- a/src/frame.h +++ b/src/frame.h @@ -16,14 +16,9 @@ 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 . */ -/* Don't multiply include: dispextern.h includes macterm.h which - includes frame.h some emacs source includes both dispextern.h and - frame.h. */ - #ifndef EMACS_FRAME_H #define EMACS_FRAME_H -#include "dispextern.h" #include "termhooks.h" #include "window.h" diff --git a/src/fringe.c b/src/fringe.c index fcc5207..632fa0b 100644 --- a/src/fringe.c +++ b/src/fringe.c @@ -26,7 +26,6 @@ along with GNU Emacs. If not, see . */ #include "frame.h" #include "window.h" #include "dispextern.h" -#include "character.h" #include "buffer.h" #include "blockinput.h" #include "termhooks.h" diff --git a/src/ftcrfont.c b/src/ftcrfont.c index df3aa59..4326b77 100644 --- a/src/ftcrfont.c +++ b/src/ftcrfont.c @@ -22,13 +22,8 @@ along with GNU Emacs. If not, see . */ #include #include "lisp.h" -#include "dispextern.h" #include "xterm.h" -#include "frame.h" #include "blockinput.h" -#include "character.h" -#include "charset.h" -#include "fontset.h" #include "font.h" #include "ftfont.h" diff --git a/src/ftfont.c b/src/ftfont.c index 15a8159..fb1addb 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -28,13 +28,9 @@ along with GNU Emacs. If not, see . */ #include "lisp.h" #include "dispextern.h" -#include "frame.h" -#include "blockinput.h" #include "character.h" #include "charset.h" -#include "coding.h" #include "composite.h" -#include "fontset.h" #include "font.h" #include "ftfont.h" diff --git a/src/ftxfont.c b/src/ftxfont.c index cd2bf3e..99b06f2 100644 --- a/src/ftxfont.c +++ b/src/ftxfont.c @@ -24,13 +24,9 @@ along with GNU Emacs. If not, see . */ #include #include "lisp.h" -#include "dispextern.h" #include "xterm.h" #include "frame.h" #include "blockinput.h" -#include "character.h" -#include "charset.h" -#include "fontset.h" #include "font.h" /* FTX font driver. */ diff --git a/src/gfilenotify.c b/src/gfilenotify.c index 69f635d..2057f88 100644 --- a/src/gfilenotify.c +++ b/src/gfilenotify.c @@ -23,10 +23,8 @@ along with GNU Emacs. If not, see . */ #include #include "lisp.h" #include "coding.h" -#include "frame.h" #include "termhooks.h" #include "keyboard.h" -#include "process.h" /* This is a list, elements are triples (DESCRIPTOR FILE FLAGS CALLBACK) */ diff --git a/src/gtkutil.c b/src/gtkutil.c index ad71b9c..701bcab 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -26,20 +26,18 @@ along with GNU Emacs. If not, see . */ #include #include "lisp.h" +#include "dispextern.h" +#include "frame.h" +#include "systime.h" #include "xterm.h" #include "blockinput.h" -#include "syssignal.h" #include "window.h" -#include "buffer.h" #include "gtkutil.h" #include "termhooks.h" #include "keyboard.h" -#include "charset.h" #include "coding.h" -#include "font.h" #include -#include "xsettings.h" #ifdef HAVE_XFT #include diff --git a/src/gtkutil.h b/src/gtkutil.h index 34338db..0dbb4a1 100644 --- a/src/gtkutil.h +++ b/src/gtkutil.h @@ -25,7 +25,6 @@ along with GNU Emacs. If not, see . */ #include #include "../lwlib/lwlib-widget.h" -#include "frame.h" #include "xterm.h" /* Minimum and maximum values used for GTK scroll bars */ diff --git a/src/image.c b/src/image.c index 9970e58..928eb5c 100644 --- a/src/image.c +++ b/src/image.c @@ -18,7 +18,9 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ #include -#include "sysstdio.h" + +#include +#include #include /* Include this before including to work around bugs with @@ -38,7 +40,6 @@ along with GNU Emacs. If not, see . */ #include "blockinput.h" #include "systime.h" #include -#include "character.h" #include "coding.h" #include "termhooks.h" #include "font.h" diff --git a/src/indent.c b/src/indent.c index 330065b..04837f8 100644 --- a/src/indent.c +++ b/src/indent.c @@ -26,10 +26,8 @@ along with GNU Emacs. If not, see . */ #include "category.h" #include "composite.h" #include "indent.h" -#include "keyboard.h" #include "frame.h" #include "window.h" -#include "termchar.h" #include "disptab.h" #include "intervals.h" #include "dispextern.h" diff --git a/src/inotify.c b/src/inotify.c index be8c1dd..d1a80bb 100644 --- a/src/inotify.c +++ b/src/inotify.c @@ -25,8 +25,6 @@ along with GNU Emacs. If not, see . */ #include "coding.h" #include "process.h" #include "keyboard.h" -#include "character.h" -#include "frame.h" /* Required for termhooks.h. */ #include "termhooks.h" #include diff --git a/src/insdel.c b/src/insdel.c index a977b79..24807b1 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -23,11 +23,11 @@ along with GNU Emacs. If not, see . */ #include #include "lisp.h" +#include "composite.h" #include "intervals.h" #include "character.h" #include "buffer.h" #include "window.h" -#include "blockinput.h" #include "region-cache.h" static void insert_from_string_1 (Lisp_Object, ptrdiff_t, ptrdiff_t, ptrdiff_t, diff --git a/src/intervals.c b/src/intervals.c index 1c8dd41..c272bae 100644 --- a/src/intervals.c +++ b/src/intervals.c @@ -43,10 +43,8 @@ along with GNU Emacs. If not, see . */ #include #include "lisp.h" #include "intervals.h" -#include "character.h" #include "buffer.h" #include "puresize.h" -#include "keyboard.h" #include "keymap.h" /* Test for membership, allowing for t (actually any non-cons) to mean the diff --git a/src/intervals.h b/src/intervals.h index 5a7829d..96e8205 100644 --- a/src/intervals.h +++ b/src/intervals.h @@ -19,8 +19,6 @@ along with GNU Emacs. If not, see . */ #ifndef EMACS_INTERVALS_H #define EMACS_INTERVALS_H -#include "dispextern.h" - INLINE_HEADER_BEGIN /* Basic data type for use of intervals. */ @@ -295,8 +293,6 @@ extern int text_property_stickiness (Lisp_Object prop, Lisp_Object pos, extern void syms_of_textprop (void); -#include "composite.h" - INLINE_HEADER_END #endif /* EMACS_INTERVALS_H */ diff --git a/src/keyboard.c b/src/keyboard.c index 966af69..1a78f6a 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -20,10 +20,10 @@ along with GNU Emacs. If not, see . */ #include -#include "sysstdio.h" #include #include "lisp.h" +#include "coding.h" #include "termchar.h" #include "termopts.h" #include "frame.h" @@ -34,13 +34,11 @@ along with GNU Emacs. If not, see . */ #include "commands.h" #include "character.h" #include "buffer.h" -#include "disptab.h" #include "dispextern.h" #include "syntax.h" #include "intervals.h" #include "keymap.h" #include "blockinput.h" -#include "puresize.h" #include "systime.h" #include "atimer.h" #include "process.h" diff --git a/src/keyboard.h b/src/keyboard.h index 67afc3b..98bc86b 100644 --- a/src/keyboard.h +++ b/src/keyboard.h @@ -20,7 +20,6 @@ along with GNU Emacs. If not, see . */ #ifndef EMACS_KEYBOARD_H #define EMACS_KEYBOARD_H -#include "systime.h" /* for struct timespec, Time */ #include "coding.h" /* for ENCODE_UTF_8 and ENCODE_SYSTEM */ #include "termhooks.h" diff --git a/src/keymap.c b/src/keymap.c index 81091f0..c988d12 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -46,9 +46,7 @@ along with GNU Emacs. If not, see . */ #include "commands.h" #include "character.h" #include "buffer.h" -#include "charset.h" #include "keyboard.h" -#include "frame.h" #include "termhooks.h" #include "blockinput.h" #include "puresize.h" diff --git a/src/lread.c b/src/lread.c index bceec4b..a98fa61 100644 --- a/src/lread.c +++ b/src/lread.c @@ -31,6 +31,7 @@ along with GNU Emacs. If not, see . */ #include #include #include "lisp.h" +#include "dispextern.h" #include "intervals.h" #include "character.h" #include "buffer.h" @@ -39,7 +40,7 @@ along with GNU Emacs. If not, see . */ #include #include "commands.h" #include "keyboard.h" -#include "frame.h" +#include "systime.h" #include "termhooks.h" #include "blockinput.h" diff --git a/src/macros.c b/src/macros.c index 1bf2cd7..d963838 100644 --- a/src/macros.c +++ b/src/macros.c @@ -22,9 +22,6 @@ along with GNU Emacs. If not, see . */ #include "lisp.h" #include "macros.h" -#include "commands.h" -#include "character.h" -#include "buffer.h" #include "window.h" #include "keyboard.h" diff --git a/src/menu.c b/src/menu.c index dc82809..74df43f 100644 --- a/src/menu.c +++ b/src/menu.c @@ -23,13 +23,14 @@ along with GNU Emacs. If not, see . */ #include /* for INT_MAX */ #include "lisp.h" +#include "character.h" +#include "coding.h" #include "keyboard.h" #include "keymap.h" #include "frame.h" #include "window.h" #include "termhooks.h" #include "blockinput.h" -#include "dispextern.h" #include "buffer.h" #ifdef USE_X_TOOLKIT diff --git a/src/menu.h b/src/menu.h index de586a5..e89e93e 100644 --- a/src/menu.h +++ b/src/menu.h @@ -19,7 +19,6 @@ along with GNU Emacs. If not, see . */ #ifndef MENU_H #define MENU_H -#include "systime.h" /* for Time */ #include "../lwlib/lwlib-widget.h" /* Bit fields used by terminal-specific menu_show_hook. */ diff --git a/src/minibuf.c b/src/minibuf.c index e149e81..31b6946 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -25,17 +25,12 @@ along with GNU Emacs. If not, see . */ #include #include "lisp.h" -#include "commands.h" #include "character.h" #include "buffer.h" -#include "dispextern.h" #include "keyboard.h" #include "frame.h" #include "window.h" -#include "syntax.h" -#include "intervals.h" #include "keymap.h" -#include "termhooks.h" #include "systty.h" /* List of buffers for use as minibuffers. diff --git a/src/print.c b/src/print.c index 3c3dca7..6f868ce 100644 --- a/src/print.c +++ b/src/print.c @@ -24,24 +24,21 @@ along with GNU Emacs. If not, see . */ #include "lisp.h" #include "character.h" +#include "coding.h" #include "buffer.h" #include "charset.h" -#include "keyboard.h" #include "frame.h" -#include "window.h" #include "process.h" -#include "dispextern.h" #include "disptab.h" -#include "termchar.h" #include "intervals.h" #include "blockinput.h" -#include "termhooks.h" /* For struct terminal. */ -#include "font.h" #include #include #include +struct terminal; + /* Avoid actual stack overflow in print. */ static ptrdiff_t print_depth; diff --git a/src/process.c b/src/process.c index 55f31a0..dc93b86 100644 --- a/src/process.c +++ b/src/process.c @@ -103,13 +103,9 @@ along with GNU Emacs. If not, see . */ #include "coding.h" #include "process.h" #include "frame.h" -#include "termhooks.h" #include "termopts.h" -#include "commands.h" #include "keyboard.h" #include "blockinput.h" -#include "dispextern.h" -#include "composite.h" #include "atimer.h" #include "sysselect.h" #include "syssignal.h" diff --git a/src/region-cache.c b/src/region-cache.c index 937f3d0..1383acd 100644 --- a/src/region-cache.c +++ b/src/region-cache.c @@ -23,7 +23,6 @@ along with GNU Emacs. If not, see . */ #include #include "lisp.h" -#include "character.h" #include "buffer.h" #include "region-cache.h" diff --git a/src/scroll.c b/src/scroll.c index 7f5b73b..2534ab0 100644 --- a/src/scroll.c +++ b/src/scroll.c @@ -25,9 +25,7 @@ along with GNU Emacs. If not, see . */ #include "lisp.h" #include "termchar.h" #include "dispextern.h" -#include "keyboard.h" #include "frame.h" -#include "window.h" #include "termhooks.h" /* All costs measured in characters. diff --git a/src/search.c b/src/search.c index 8c9714e..e39ba3d 100644 --- a/src/search.c +++ b/src/search.c @@ -22,13 +22,11 @@ along with GNU Emacs. If not, see . */ #include #include "lisp.h" -#include "category.h" #include "character.h" #include "buffer.h" #include "syntax.h" #include "charset.h" #include "region-cache.h" -#include "commands.h" #include "blockinput.h" #include "intervals.h" diff --git a/src/sound.c b/src/sound.c index 9a365c7..09ab48c 100644 --- a/src/sound.c +++ b/src/sound.c @@ -46,7 +46,6 @@ along with GNU Emacs. If not, see . */ #include #include "lisp.h" -#include "dispextern.h" #include "atimer.h" #include "syssignal.h" /* END: Common Includes */ diff --git a/src/syntax.c b/src/syntax.c index 6bfb3b7..1dcb3a5 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -23,12 +23,9 @@ along with GNU Emacs. If not, see . */ #include #include "lisp.h" -#include "commands.h" #include "character.h" #include "buffer.h" -#include "keymap.h" #include "regex.h" - #include "syntax.h" #include "intervals.h" #include "category.h" diff --git a/src/sysdep.c b/src/sysdep.c index 836cc27..1af323e 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -93,13 +93,11 @@ along with GNU Emacs. If not, see . */ #include "keyboard.h" #include "frame.h" -#include "window.h" #include "termhooks.h" #include "termchar.h" #include "termopts.h" -#include "dispextern.h" #include "process.h" -#include "cm.h" /* for reset_sys_modes */ +#include "cm.h" #ifdef WINDOWSNT #include diff --git a/src/systime.h b/src/systime.h index 315f9d1..a7c182a 100644 --- a/src/systime.h +++ b/src/systime.h @@ -83,8 +83,8 @@ extern struct timeval make_timeval (struct timespec) ATTRIBUTE_CONST; extern void set_waiting_for_input (struct timespec *); /* When lisp.h is not included Lisp_Object is not defined (this can - happen when this files is used outside the src directory). */ -#ifdef EMACS_LISP_H + happen when this file is used outside the src directory). */ +#ifdef emacs /* Emacs uses the integer list (HI LO US PS) to represent the time (HI << LO_TIME_BITS) + LO + US / 1e6 + PS / 1e12. */ diff --git a/src/term.c b/src/term.c index 5acc473..9b1e7ca 100644 --- a/src/term.c +++ b/src/term.c @@ -44,8 +44,6 @@ along with GNU Emacs. If not, see . */ #include "keymap.h" #include "blockinput.h" #include "syssignal.h" -#include "systty.h" -#include "intervals.h" #ifdef MSDOS #include "msdos.h" static int been_here = -1; @@ -56,10 +54,6 @@ static int been_here = -1; #endif #include "cm.h" -#ifdef HAVE_X_WINDOWS -#include "xterm.h" -#endif - #include "menu.h" /* The name of the default console device. */ diff --git a/src/terminal.c b/src/terminal.c index 80c6aa2..27594e5 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -21,11 +21,10 @@ along with GNU Emacs. If not, see . */ #include #include "lisp.h" +#include "character.h" #include "frame.h" #include "termchar.h" #include "termhooks.h" -#include "charset.h" -#include "coding.h" #include "keyboard.h" #if HAVE_STRUCT_UNIPAIR_UNICODE diff --git a/src/textprop.c b/src/textprop.c index 6758d4d..1995ff6 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -21,7 +21,6 @@ along with GNU Emacs. If not, see . */ #include "lisp.h" #include "intervals.h" -#include "character.h" #include "buffer.h" #include "window.h" diff --git a/src/undo.c b/src/undo.c index 750bc8a..e0924b2 100644 --- a/src/undo.c +++ b/src/undo.c @@ -21,10 +21,7 @@ along with GNU Emacs. If not, see . */ #include #include "lisp.h" -#include "character.h" #include "buffer.h" -#include "commands.h" -#include "window.h" /* Last buffer for which undo information was recorded. */ /* BEWARE: This is not traced by the GC, so never dereference it! */ diff --git a/src/unexsol.c b/src/unexsol.c index cfd515f..0f84099 100644 --- a/src/unexsol.c +++ b/src/unexsol.c @@ -6,9 +6,7 @@ #include #include "lisp.h" -#include "character.h" #include "buffer.h" -#include "charset.h" #include "coding.h" void diff --git a/src/widget.c b/src/widget.c index 48872f5..d0c3e60 100644 --- a/src/widget.c +++ b/src/widget.c @@ -29,17 +29,13 @@ along with GNU Emacs. If not, see . */ */ #include +#include "widget.h" + #include #include "lisp.h" #include "xterm.h" - -#include "keyboard.h" #include "frame.h" -#include "window.h" - -#include "dispextern.h" -#include "blockinput.h" #include #include @@ -50,10 +46,6 @@ along with GNU Emacs. If not, see . */ #include #include "../lwlib/lwlib.h" -#include "character.h" -#include "font.h" - - static void EmacsFrameInitialize (Widget request, Widget new, ArgList dum1, Cardinal *dum2); static void EmacsFrameDestroy (Widget widget); static void EmacsFrameRealize (Widget widget, XtValueMask *mask, XSetWindowAttributes *attrs); diff --git a/src/widgetprv.h b/src/widgetprv.h index 6cbbbd6..dc01248 100644 --- a/src/widgetprv.h +++ b/src/widgetprv.h @@ -23,7 +23,6 @@ along with GNU Emacs. If not, see . */ #include #include -#include "widget.h" typedef struct { struct frame* frame; /* the *emacs* frame object */ diff --git a/src/window.c b/src/window.c index 3566f6e..8ed0f32 100644 --- a/src/window.c +++ b/src/window.c @@ -23,11 +23,9 @@ along with GNU Emacs. If not, see . */ #include #include "lisp.h" -#include "character.h" #include "buffer.h" #include "keyboard.h" #include "keymap.h" -#include "menu.h" #include "frame.h" #include "window.h" #include "commands.h" @@ -36,7 +34,6 @@ along with GNU Emacs. If not, see . */ #include "disptab.h" #include "dispextern.h" #include "blockinput.h" -#include "intervals.h" #include "termhooks.h" /* For FRAME_TERMINAL. */ #ifdef HAVE_WINDOW_SYSTEM #include TERM_HEADER diff --git a/src/xdisp.c b/src/xdisp.c index 986e13f..bfd3a82 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -292,7 +292,9 @@ along with GNU Emacs. If not, see . */ #include "lisp.h" #include "atimer.h" +#include "composite.h" #include "keyboard.h" +#include "systime.h" #include "frame.h" #include "window.h" #include "termchar.h" @@ -303,13 +305,11 @@ along with GNU Emacs. If not, see . */ #include "indent.h" #include "commands.h" #include "keymap.h" -#include "macros.h" #include "disptab.h" #include "termhooks.h" #include "termopts.h" #include "intervals.h" #include "coding.h" -#include "process.h" #include "region-cache.h" #include "font.h" #include "fontset.h" diff --git a/src/xfaces.c b/src/xfaces.c index a3d122f..6bbd541 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -206,10 +206,7 @@ along with GNU Emacs. If not, see . */ #include "lisp.h" #include "character.h" -#include "charset.h" -#include "keyboard.h" #include "frame.h" -#include "termhooks.h" #ifdef USE_MOTIF #include @@ -237,7 +234,6 @@ along with GNU Emacs. If not, see . */ #include "dispextern.h" #include "blockinput.h" #include "window.h" -#include "intervals.h" #include "termchar.h" #include "font.h" diff --git a/src/xfns.c b/src/xfns.c index 8251f93..db87fcc 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -24,23 +24,15 @@ along with GNU Emacs. If not, see . */ #include "lisp.h" #include "xterm.h" -#include "menu.h" #include "frame.h" #include "window.h" -#include "character.h" #include "buffer.h" -#include "intervals.h" #include "dispextern.h" #include "keyboard.h" #include "blockinput.h" -#include #include "charset.h" #include "coding.h" -#include "fontset.h" -#include "systime.h" #include "termhooks.h" -#include "atimer.h" -#include "termchar.h" #include "font.h" #include diff --git a/src/xfont.c b/src/xfont.c index d5a7d64..671b105 100644 --- a/src/xfont.c +++ b/src/xfont.c @@ -24,15 +24,12 @@ along with GNU Emacs. If not, see . */ #include #include "lisp.h" -#include "dispextern.h" #include "xterm.h" #include "frame.h" #include "blockinput.h" #include "character.h" #include "charset.h" -#include "fontset.h" #include "font.h" -#include "ccl.h" /* X core font driver. */ diff --git a/src/xftfont.c b/src/xftfont.c index 851edb6..956231e 100644 --- a/src/xftfont.c +++ b/src/xftfont.c @@ -25,14 +25,11 @@ along with GNU Emacs. If not, see . */ #include #include "lisp.h" -#include "dispextern.h" #include "xterm.h" #include "frame.h" #include "blockinput.h" -#include "character.h" #include "charset.h" #include "composite.h" -#include "fontset.h" #include "font.h" #include "ftfont.h" diff --git a/src/xgselect.c b/src/xgselect.c index 0b62d3e..55e1ffc 100644 --- a/src/xgselect.c +++ b/src/xgselect.c @@ -26,9 +26,8 @@ along with GNU Emacs. If not, see . */ #include #include #include -#include -#include "frame.h" #include "blockinput.h" +#include "systime.h" /* `xg_select' is a `pselect' replacement. Why do we need a separate function? 1. Timeouts. Glib and Gtk rely on timer events. If we did pselect diff --git a/src/xgselect.h b/src/xgselect.h index ada2376..524fff7 100644 --- a/src/xgselect.h +++ b/src/xgselect.h @@ -21,9 +21,10 @@ along with GNU Emacs. If not, see . */ #define XGSELECT_H #include "lisp.h" -#include #include "sysselect.h" +struct timespec; + extern int xg_select (int max_fds, fd_set *rfds, fd_set *wfds, fd_set *efds, struct timespec const *timeout, diff --git a/src/xmenu.c b/src/xmenu.c index 4379cdd..be6e41d 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -36,14 +36,12 @@ along with GNU Emacs. If not, see . */ #include "lisp.h" #include "keyboard.h" -#include "keymap.h" #include "frame.h" +#include "systime.h" #include "termhooks.h" #include "window.h" #include "blockinput.h" -#include "character.h" #include "buffer.h" -#include "charset.h" #include "coding.h" #include "sysselect.h" @@ -63,8 +61,6 @@ along with GNU Emacs. If not, see . */ #include #endif -#include "dispextern.h" - #ifdef HAVE_X_WINDOWS /* Defining HAVE_MULTILINGUAL_MENU would mean that the toolkit menu code accepts the Emacs internal encoding. */ diff --git a/src/xml.c b/src/xml.c index 9e68fff..fc77f22 100644 --- a/src/xml.c +++ b/src/xml.c @@ -25,7 +25,6 @@ along with GNU Emacs. If not, see . */ #include #include "lisp.h" -#include "character.h" #include "buffer.h" diff --git a/src/xrdb.c b/src/xrdb.c index 2235b45..ce6e7d2 100644 --- a/src/xrdb.c +++ b/src/xrdb.c @@ -43,11 +43,6 @@ along with GNU Emacs. If not, see . */ #include #endif -#ifdef USE_MOTIF -/* For Vdouble_click_time. */ -#include "keyboard.h" -#endif - /* X file search path processing. */ diff --git a/src/xselect.c b/src/xselect.c index 9a7e697..9d178a5 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -31,12 +31,8 @@ along with GNU Emacs. If not, see . */ #include "lisp.h" #include "xterm.h" /* for all of the X includes */ -#include "dispextern.h" /* frame.h seems to want this */ #include "frame.h" /* Need this to get the X window of selected_frame */ #include "blockinput.h" -#include "character.h" -#include "buffer.h" -#include "process.h" #include "termhooks.h" #include "keyboard.h" diff --git a/src/xsmfns.c b/src/xsmfns.c index 3b06f71..b84f2ac 100644 --- a/src/xsmfns.c +++ b/src/xsmfns.c @@ -32,8 +32,6 @@ along with GNU Emacs. If not, see . */ #include #include "lisp.h" -#include "systime.h" -#include "sysselect.h" #include "frame.h" #include "termhooks.h" #include "xterm.h" diff --git a/src/xterm.c b/src/xterm.c index fcd81a1..691ad05 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -28,7 +28,6 @@ along with GNU Emacs. If not, see . */ #include "lisp.h" #include "blockinput.h" -#include "syssignal.h" /* This may include sys/types.h, and that somehow loses if this is not done before the other system files. */ @@ -58,12 +57,9 @@ along with GNU Emacs. If not, see . */ #include #include #include -/* Caused redefinition of DBL_DIG on Netbsd; seems not to be needed. */ -/* #include */ - -#include "charset.h" #include "character.h" #include "coding.h" +#include "composite.h" #include "frame.h" #include "dispextern.h" #include "fontset.h" @@ -71,17 +67,12 @@ along with GNU Emacs. If not, see . */ #include "termopts.h" #include "termchar.h" #include "emacs-icon.h" -#include "disptab.h" #include "buffer.h" #include "window.h" #include "keyboard.h" -#include "intervals.h" -#include "process.h" #include "atimer.h" -#include "keymap.h" #include "font.h" #include "xsettings.h" -#include "xgselect.h" #include "sysselect.h" #include "menu.h" commit e9af822ac3ddf9644aa4a68e56b0580e133449b2 Author: Paul Eggert Date: Tue Oct 20 18:16:47 2015 -0700 (/ N) now returns the reciprocal of N This is more compatible with Common Lisp and XEmacs (Bug#21690). See: http://lists.gnu.org/archive/html/emacs-devel/2015-10/msg01053.html * lisp/color.el (color-hue-to-rgb, color-hsl-to-rgb) (color-xyz-to-srgb, color-xyz-to-lab): * lisp/emacs-lisp/cl-extra.el (cl-float-limits): * lisp/net/shr-color.el (shr-color-hue-to-rgb) (shr-color-hsl-to-rgb-fractions): Exploit the change to simplify the code a bit. * lisp/emacs-lisp/bytecomp.el (byte-compile-quo): Don’t complain about single-argument calls to ‘/’. * src/data.c (arith_driver, float_arith_driver): Implement the change. diff --git a/doc/lispref/numbers.texi b/doc/lispref/numbers.texi index 3c70d2f..54c8d3e 100644 --- a/doc/lispref/numbers.texi +++ b/doc/lispref/numbers.texi @@ -642,10 +642,11 @@ product. When given no arguments, @code{*} returns 1. @end example @end defun -@defun / dividend divisor &rest divisors -This function divides @var{dividend} by @var{divisor} and returns the -quotient. If there are additional arguments @var{divisors}, then it -divides @var{dividend} by each divisor in turn. Each argument may be a +@defun / number &rest divisors +With one or more @var{divisors}, this function divides @var{number} +by each divisor in @var{divisors} in turn, and returns the quotient. +With no @var{divisors}, this function returns 1/@var{number}, i.e., +the multiplicative inverse of @var{number}. Each argument may be a number or a marker. If all the arguments are integers, the result is an integer, obtained @@ -673,6 +674,14 @@ by rounding the quotient towards zero after each division. @result{} 2.5 @end group @group +(/ 4.0) + @result{} 0.25 +@end group +@group +(/ 4) + @result{} 0 +@end group +@group (/ 25 3 2) @result{} 4 @end group diff --git a/etc/NEWS b/etc/NEWS index 7b31357..ac6ccb8 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1008,6 +1008,12 @@ dynamically. dynamically. Any third-party code that changes these templates should be updated accordingly. ++++ +** ‘(/ N)’ is now equivalent to ‘(/ 1 N)’ rather than to ‘(/ N 1)’. +The new behavior is compatible with Common Lisp and with XEmacs. +This change does not affect Lisp code intended to be portable to +Emacs 24.2 and earlier, which did not support unary ‘/’. + * Lisp Changes in Emacs 25.1 diff --git a/lisp/color.el b/lisp/color.el index d572222..97656ca 100644 --- a/lisp/color.el +++ b/lisp/color.el @@ -93,7 +93,7 @@ resulting list." "Compute hue from V1 and V2 H. Used internally by `color-hsl-to-rgb'." (cond - ((< h (/ 1.0 6)) (+ v1 (* (- v2 v1) h 6.0))) + ((< h (/ 6.0)) (+ v1 (* (- v2 v1) h 6.0))) ((< h 0.5) v2) ((< h (/ 2.0 3)) (+ v1 (* (- v2 v1) (- (/ 2.0 3) h) 6.0))) (t v1))) @@ -110,9 +110,9 @@ inclusive." (- (+ L S) (* L S)))) (m1 (- (* 2.0 L) m2))) (list - (color-hue-to-rgb m1 m2 (mod (+ H (/ 1.0 3)) 1)) + (color-hue-to-rgb m1 m2 (mod (+ H (/ 3.0)) 1)) (color-hue-to-rgb m1 m2 H) - (color-hue-to-rgb m1 m2 (mod (- H (/ 1.0 3)) 1)))))) + (color-hue-to-rgb m1 m2 (mod (- H (/ 3.0)) 1)))))) (defun color-complement-hex (color) "Return the color that is the complement of COLOR, in hexadecimal format." @@ -199,13 +199,13 @@ RED, GREEN and BLUE should be between 0.0 and 1.0, inclusive." (b (+ (* 0.0556434 X) (* -0.2040259 Y) (* 1.0572252 Z)))) (list (if (<= r 0.0031308) (* 12.92 r) - (- (* 1.055 (expt r (/ 1 2.4))) 0.055)) + (- (* 1.055 (expt r (/ 2.4))) 0.055)) (if (<= g 0.0031308) (* 12.92 g) - (- (* 1.055 (expt g (/ 1 2.4))) 0.055)) + (- (* 1.055 (expt g (/ 2.4))) 0.055)) (if (<= b 0.0031308) (* 12.92 b) - (- (* 1.055 (expt b (/ 1 2.4))) 0.055))))) + (- (* 1.055 (expt b (/ 2.4))) 0.055))))) (defconst color-d65-xyz '(0.950455 1.0 1.088753) "D65 white point in CIE XYZ.") @@ -222,13 +222,13 @@ conversion. If omitted or nil, use `color-d65-xyz'." (yr (/ Y Yr)) (zr (/ Z Zr)) (fx (if (> xr color-cie-ε) - (expt xr (/ 1 3.0)) + (expt xr (/ 3.0)) (/ (+ (* color-cie-κ xr) 16) 116.0))) (fy (if (> yr color-cie-ε) - (expt yr (/ 1 3.0)) + (expt yr (/ 3.0)) (/ (+ (* color-cie-κ yr) 16) 116.0))) (fz (if (> zr color-cie-ε) - (expt zr (/ 1 3.0)) + (expt zr (/ 3.0)) (/ (+ (* color-cie-κ zr) 16) 116.0)))) (list (- (* 116 fy) 16) ; L diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 6f7ba33..d138eff 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -3617,8 +3617,8 @@ discarding." (defun byte-compile-quo (form) (let ((len (length form))) - (cond ((<= len 2) - (byte-compile-subr-wrong-args form "2 or more")) + (cond ((< len 2) + (byte-compile-subr-wrong-args form "1 or more")) ((= len 3) (byte-compile-two-args form)) (t diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el index dddfca7..afa021d 100644 --- a/lisp/emacs-lisp/cl-extra.el +++ b/lisp/emacs-lisp/cl-extra.el @@ -497,7 +497,7 @@ This sets the values of: `cl-most-positive-float', `cl-most-negative-float', (setq cl-least-positive-normalized-float y cl-least-negative-normalized-float (- y)) ;; Divide down until value underflows to zero. - (setq x (/ 1 z) y x) + (setq x (/ z) y x) (while (condition-case _ (> (/ x 2) 0) (arith-error nil)) (setq x (/ x 2))) (setq cl-least-positive-float x diff --git a/lisp/net/shr-color.el b/lisp/net/shr-color.el index 482f829..f8d358c 100644 --- a/lisp/net/shr-color.el +++ b/lisp/net/shr-color.el @@ -211,7 +211,7 @@ This will convert \"80 %\" to 204, \"100 %\" to 255 but \"123\" to \"123\"." "Convert X Y H to RGB value." (when (< h 0) (incf h)) (when (> h 1) (decf h)) - (cond ((< h (/ 1 6.0)) (+ x (* (- y x) h 6))) + (cond ((< h (/ 6.0)) (+ x (* (- y x) h 6))) ((< h 0.5) y) ((< h (/ 2.0 3.0)) (+ x (* (- y x) (- (/ 2.0 3.0) h) 6))) (t x))) @@ -223,9 +223,9 @@ This will convert \"80 %\" to 204, \"100 %\" to 255 but \"123\" to \"123\"." (setq m2 (* l (+ s 1))) (setq m2 (- (+ l s) (* l s)))) (setq m1 (- (* l 2) m2)) - (list (shr-color-hue-to-rgb m1 m2 (+ h (/ 1 3.0))) + (list (shr-color-hue-to-rgb m1 m2 (+ h (/ 3.0))) (shr-color-hue-to-rgb m1 m2 h) - (shr-color-hue-to-rgb m1 m2 (- h (/ 1 3.0)))))) + (shr-color-hue-to-rgb m1 m2 (- h (/ 3.0)))))) (defun shr-color->hexadecimal (color) "Convert any color format to hexadecimal representation. diff --git a/src/data.c b/src/data.c index b85d8a7..33fe285 100644 --- a/src/data.c +++ b/src/data.c @@ -2603,6 +2603,7 @@ arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args) accum = 0; break; case Amult: + case Adiv: accum = 1; break; case Alogand: @@ -2658,7 +2659,7 @@ arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args) accum *= next; break; case Adiv: - if (!argnum) + if (! (argnum || nargs == 1)) accum = next; else { @@ -2727,7 +2728,7 @@ float_arith_driver (double accum, ptrdiff_t argnum, enum arithop code, accum *= next; break; case Adiv: - if (!argnum) + if (! (argnum || nargs == 1)) accum = next; else { @@ -2782,9 +2783,11 @@ usage: (* &rest NUMBERS-OR-MARKERS) */) } DEFUN ("/", Fquo, Squo, 1, MANY, 0, - doc: /* Return first argument divided by all the remaining arguments. + doc: /* Divide number by divisors and return the result. +With two or more arguments, return first argument divided by the rest. +With one argument, return 1 divided by the argument. The arguments must be numbers or markers. -usage: (/ DIVIDEND &rest DIVISORS) */) +usage: (/ NUMBER &rest DIVISORS) */) (ptrdiff_t nargs, Lisp_Object *args) { ptrdiff_t argnum; commit 513fe25a501b41f9f2aac67f73c8e8730aed81b0 Author: Dmitry Gutov Date: Tue Oct 20 20:04:47 2015 +0300 Call vc-dir-defresh after stash operations * lisp/vc/vc-git.el (vc-git-stash-apply-at-point) (vc-git-stash-pop-at-point): Call vc-dir-defresh (bug#13960). * lisp/vc/vc-dir.el (vc-dir-resynch-file): Expand FNAME as well, since it can be abbreviated (as returned by vc-find-root). diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index eb03a8b..9b15e64 100644 --- a/lisp/vc/vc-dir.el +++ b/lisp/vc/vc-dir.el @@ -932,7 +932,7 @@ If it is a file, return the corresponding cons for the file itself." (defun vc-dir-resynch-file (&optional fname) "Update the entries for FNAME in any directory buffers that list it." - (let ((file (or fname (expand-file-name buffer-file-name))) + (let ((file (expand-file-name (or fname buffer-file-name))) (drop '())) (save-current-buffer ;; look for a vc-dir buffer that might show this file. diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 2a8cd56..0e33896 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -1362,11 +1362,15 @@ This command shares argument histories with \\[rgrep] and \\[grep]." (defun vc-git-stash-apply-at-point () (interactive) - (vc-git-stash-apply (format "stash@%s" (vc-git-stash-get-at-point (point))))) + (let (vc-dir-buffers) ; Small optimization. + (vc-git-stash-apply (format "stash@%s" (vc-git-stash-get-at-point (point))))) + (vc-dir-refresh)) (defun vc-git-stash-pop-at-point () (interactive) - (vc-git-stash-pop (format "stash@%s" (vc-git-stash-get-at-point (point))))) + (let (vc-dir-buffers) ; Likewise. + (vc-git-stash-pop (format "stash@%s" (vc-git-stash-get-at-point (point))))) + (vc-dir-refresh)) (defun vc-git-stash-menu (e) (interactive "e") commit 5e4395544c184d9a8702cf05c7aee9329b0b9482 Author: Dmitry Gutov Date: Tue Oct 20 19:37:30 2015 +0300 Don't declare vc-exec-after anymore * lisp/vc/vc-svn.el: * lisp/vc/vc-mtn.el: * lisp/vc/vc-hg.el: * lisp/vc/vc-cvs.el: * lisp/vc/vc-git.el: * lisp/vc/vc-bzr.el: Don't declare vc-exec-after anymore. Its usages have been replaced with vc-run-delayed. diff --git a/lisp/obsolete/vc-arch.el b/lisp/obsolete/vc-arch.el index e6540ce..bdb6975 100644 --- a/lisp/obsolete/vc-arch.el +++ b/lisp/obsolete/vc-arch.el @@ -310,10 +310,6 @@ Only the value `maybe' can be trusted :-(." 'up-to-date 'edited))))))))) -;; dir-status-files called from vc-dir, which loads vc, -;; which loads vc-dispatcher. -(declare-function vc-exec-after "vc-dispatcher" (code)) - (defun vc-arch-dir-status-files (dir _files callback) "Run `tla inventory' for DIR and pass results to CALLBACK. CALLBACK expects (ENTRIES &optional MORE-TO-COME); see diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index 9b2711d..40f2516 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el @@ -331,7 +331,6 @@ in the repository root directory of FILE." "Value of `compilation-error-regexp-alist' in *vc-bzr* buffers.") ;; To be called via vc-pull from vc.el, which requires vc-dispatcher. -(declare-function vc-exec-after "vc-dispatcher" (code)) (declare-function vc-set-async-update "vc-dispatcher" (process-buffer)) (declare-function vc-compilation-mode "vc-dispatcher" (backend)) diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el index 5f5807f..c0a199d 100644 --- a/lisp/vc/vc-cvs.el +++ b/lisp/vc/vc-cvs.el @@ -543,8 +543,6 @@ Will fail unless you have administrative privileges on the repo." ;;; (declare-function vc-rcs-print-log-cleanup "vc-rcs" ()) -;; Follows vc-cvs-command, which uses vc-do-command from vc-dispatcher. -(declare-function vc-exec-after "vc-dispatcher" (code)) (defun vc-cvs-print-log (files buffer &optional _shortlog _start-revision limit) "Print commit log associated with FILES into specified BUFFER. diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index b557032..2a8cd56 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -461,8 +461,6 @@ or an empty string if none." ;; Follows vc-git-command (or vc-do-async-command), which uses vc-do-command ;; from vc-dispatcher. -(declare-function vc-exec-after "vc-dispatcher" (code)) -;; Follows vc-exec-after. (declare-function vc-set-async-update "vc-dispatcher" (process-buffer)) (defun vc-git-dir-status-goto-stage (stage files update-function) diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 4957398..c4d6092 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -620,8 +620,6 @@ REV is the revision to check out into WORKFILE." ;; Follows vc-hg-command (or vc-do-async-command), which uses vc-do-command ;; from vc-dispatcher. -(declare-function vc-exec-after "vc-dispatcher" (code)) -;; Follows vc-exec-after. (declare-function vc-set-async-update "vc-dispatcher" (process-buffer)) (defun vc-hg-dir-status-files (dir files update-function) diff --git a/lisp/vc/vc-mtn.el b/lisp/vc/vc-mtn.el index b56a08f..3197d60 100644 --- a/lisp/vc/vc-mtn.el +++ b/lisp/vc/vc-mtn.el @@ -138,10 +138,6 @@ switches." ((match-end 2) (push (list (match-string 3) 'added) result)))) (funcall update-function result))) -;; dir-status-files called from vc-dir, which loads vc, -;; which loads vc-dispatcher. -(declare-function vc-exec-after "vc-dispatcher" (code)) - (defun vc-mtn-dir-status-files (dir _files update-function) (vc-mtn-command (current-buffer) 'async dir "status") (vc-run-delayed diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el index 4ef63a2..2ec65a1 100644 --- a/lisp/vc/vc-svn.el +++ b/lisp/vc/vc-svn.el @@ -208,10 +208,6 @@ switches." (setq result (cons (list filename state) result))))) (funcall callback result))) -;; dir-status-files called from vc-dir, which loads vc, -;; which loads vc-dispatcher. -(declare-function vc-exec-after "vc-dispatcher" (code)) - (autoload 'vc-expand-dirs "vc") (defun vc-svn-dir-status-files (_dir files callback) commit 28c58bf739fb5cc528051cfc48770fbfa4e1a319 Author: Dima Kogan Date: Tue Oct 20 18:12:55 2015 +0300 Fix memory leak in fontset handling * src/font.c (copy_font_spec): Make a deep copy of the input argument FONT. (Bug#21651) diff --git a/src/font.c b/src/font.c index a52a653..be55ce9 100644 --- a/src/font.c +++ b/src/font.c @@ -3981,7 +3981,10 @@ copy_font_spec (Lisp_Object font) pcdr = spec->props + FONT_EXTRA_INDEX; for (tail = AREF (font, FONT_EXTRA_INDEX); CONSP (tail); tail = XCDR (tail)) if (!EQ (XCAR (XCAR (tail)), QCfont_entity)) - *pcdr = Fcons (XCAR (tail), Qnil), pcdr = xcdr_addr (*pcdr); + { + *pcdr = Fcons (Fcons (XCAR (XCAR (tail)), CDR (XCAR (tail))), Qnil); + pcdr = xcdr_addr (*pcdr); + } XSETFONT (new_spec, spec); return new_spec; commit 90e9cf85be9b36cc11ae52af765b8f4236be8833 Author: Michael Sperber Date: Tue Oct 20 11:18:30 2015 +0000 * lisp/gnus/mailcap.el (mailcap-mime-data): Conditonalize `doc-view-mode', which does not exist on XEmacs. diff --git a/lisp/gnus/mailcap.el b/lisp/gnus/mailcap.el index 9f84413..a3348c6 100644 --- a/lisp/gnus/mailcap.el +++ b/lisp/gnus/mailcap.el @@ -160,7 +160,8 @@ This is a compatibility function for different Emacsen." ("pdf" (viewer . doc-view-mode) (type . "application/pdf") - (test . (eq window-system 'x))) + (test . (and (fboundp 'doc-view-mode) + (eq window-system 'x)))) ("pdf" (viewer . "gv -safer %s") (type . "application/pdf") commit 2add4a63e7cf1de75cc47eae4ef1bd38da08fb8c Author: Glenn Morris Date: Tue Oct 20 06:17:55 2015 -0400 ; Auto-commit of loaddefs files. diff --git a/lisp/dired.el b/lisp/dired.el index 14c7f4b..e8791f8 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -3896,7 +3896,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" "3921477843dc9d08d6896f07f90e8c6e") +;;;### (autoloads nil "dired-aux" "dired-aux.el" "c4ed2cda4c70d4b38ab52ad03fa9dfda") ;;; Generated autoloads from dired-aux.el (autoload 'dired-diff "dired-aux" "\ commit cfc34c1b3e99fac8c356f7b72df5ae4a36356313 Author: Oleh Krehel Date: Fri Oct 16 16:44:20 2015 +0200 Update the way directories are compressed * lisp/dired-aux.el (dired-compress-file-suffixes): Update the recipe for *.tar.gz decompression to use a pipe. Add an entry for the default directory compression (to *.tar.g). (dired-compress-file): Update. See https://lists.gnu.org/archive/html/emacs-devel/2015-10/msg00949.html. diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 8c575c6..98a974a 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -880,7 +880,7 @@ command with a prefix argument (the value does not matter)." from-file))) (defvar dired-compress-file-suffixes - '(("\\.tar\\.gz\\'" "" "tar -zxvf %i") + '(("\\.tar\\.gz\\'" "" "gzip -dc %i | tar -xv") ("\\.gz\\'" "" "gunzip") ("\\.tgz\\'" ".tar" "gunzip") ("\\.Z\\'" "" "uncompress") @@ -893,7 +893,9 @@ command with a prefix argument (the value does not matter)." ("\\.xz\\'" "" "unxz") ("\\.zip\\'" "" "unzip -o -d %o %i") ;; This item controls naming for compression. - ("\\.tar\\'" ".tgz" nil)) + ("\\.tar\\'" ".tgz" nil) + ;; This item controls the compression of directories + (":" ".tar.gz" "tar -c %i | gzip -c9 > %o")) "Control changes in file name suffixes for compression and uncompression. Each element specifies one transformation rule, and has the form: (REGEXP NEW-SUFFIX PROGRAM) @@ -952,31 +954,36 @@ Return nil if no change in files." ;; We don't recognize the file as compressed, so compress it. ;; Try gzip; if we don't have that, use compress. (condition-case nil - (let ((out-name (concat file (if (file-directory-p file) - ".tar.gz" - ".gz")))) - (and (or (not (file-exists-p out-name)) - (y-or-n-p - (format "File %s already exists. Really compress? " - out-name))) - (not - (if (file-directory-p file) - (let ((default-directory (file-name-directory file))) - (dired-check-process - (concat "Compressing " file) - "tar" "-czf" - out-name (file-name-nondirectory file))) + (if (file-directory-p file) + (progn + (setq suffix (cdr (assoc ":" dired-compress-file-suffixes))) + (when suffix + (let ((out-name (concat file (car suffix))) + (default-directory (file-name-directory file))) + (dired-shell-command + (replace-regexp-in-string + "%o" out-name + (replace-regexp-in-string + "%i" (file-name-nondirectory file) + (cadr suffix)))) + out-name))) + (let ((out-name (concat file ".gz"))) + (and (or (not (file-exists-p out-name)) + (y-or-n-p + (format "File %s already exists. Really compress? " + out-name))) + (not (dired-check-process (concat "Compressing " file) - "gzip" "-f" file))) - (or (file-exists-p out-name) - (setq out-name (concat file ".z"))) - ;; Rename the compressed file to NEWNAME - ;; if it hasn't got that name already. - (if (and newname (not (equal newname out-name))) - (progn - (rename-file out-name newname t) - newname) - out-name))) + "gzip" "-f" file)) + (or (file-exists-p out-name) + (setq out-name (concat file ".z"))) + ;; Rename the compressed file to NEWNAME + ;; if it hasn't got that name already. + (if (and newname (not (equal newname out-name))) + (progn + (rename-file out-name newname t) + newname) + out-name)))) (file-error (if (not (dired-check-process (concat "Compressing " file) "compress" "-f" file))