Eli Zaretskii [Thu, 29 Jan 2015 17:16:56 +0000 (19:16 +0200)]
Use bool for boolean in w32menu.c, w32font.c, w32uniscribe.c.
src/w32uniscribe.c (uniscribe_list, uniscribe_match): Use bool where
appropriate.
src/w32font.c (struct font_callback_data, w32font_list_internal)
(w32font_driver, w32font_match_internal): Use bool where appropriate.
src/w32menu.c (x_activate_menubar, set_frame_menubar)
(w32_dialog_show, initialize_frame_menubar, w32_menu_show)
(is_simple_dialog): Use bool where appropriate.
Paul Eggert [Wed, 28 Jan 2015 19:11:14 +0000 (11:11 -0800)]
Use bool, not int, to track face changes
* xfaces.c (face_change): Rename from face_change_count, and
change from int to bool. The var is now true (instead of nonzero)
if attributes have changed; this is simpler. All uses changed. Fixes: bug#19698
Tassilo Horn [Wed, 28 Jan 2015 09:32:50 +0000 (10:32 +0100)]
Fix issues with BibTeX entries containing ")".
* textmodes/reftex.el (reftex-syntax-table-for-bib): Give ( and )
punctuation syntax since to allow bibtex fields with values such
as {Test 1) and 2)} (bug#19205, bug#19707).
(reftex--prepare-syntax-tables): New function.
(reftex-mode): Use it.
Tassilo Horn [Wed, 28 Jan 2015 09:32:50 +0000 (10:32 +0100)]
Fix issues with BibTeX entries containing ")".
* textmodes/reftex.el (reftex-syntax-table-for-bib): Give ( and )
punctuation syntax since to allow bibtex fields with values such
as {Test 1) and 2)} (bug#19205, bug#19707).
(reftex--prepare-syntax-tables): New function.
(reftex-mode): Use it.
Paul Eggert [Wed, 28 Jan 2015 06:24:19 +0000 (22:24 -0800)]
Merge from gnulib and try to repair bad merge
This attempts to repair problems introduced by the bad merge 5491fd1098d27b3ba3db054076b9ab60fb3558dc. The easiest way for me
to fix the badly-merged gnulib files was to run
'admin/merge-gnulib', so I did that, which also imported the
following changes:
* build-aux/update-copyright, m4/gnulib.m4:
Update from gnulib, incorporating:
2015-01-15 time: port to MinGW32 3.21
2015-01-15 update-copyright: apply to self
2015-01-11 update-copyright: recognize groff's \(co marker
9664def Signal a file-error from directory-files on MS-Windows (Bug#19701) fd4e65e Added missing test for previous commit 5485e3e5 python.el: New non-global state dependent indentation engine. 3b23e6a Fix the description of --insert command-line option (Bug#19694) 7a7e594 Add a cross-reference in ELisp manual. (Bug#19668) b4f4075 Fixes: debbugs:19660 83b3c31 * test/automated/regexp-tests.el: Require regexp-opt
a3505cb doc/lispref/variables.texi (Creating Buffer-Local): Improve indexing (Bug#19608) d132c7b erc-backend.el: Give hook-name a default value of nil and add-to-list unconditionally. Fixes debbugs:19363 61cc7bf Fix support of non-ASCII frame titles on MS-Windows (Bug#19590) 1e5902a * filenotify.el (file-notify--descriptor): Do not cons for remote files. b1ea160 Handle watching of several files in the same directory for inotify.
b544ab5 Fix return value of vertical-motion at ZV (Bug#19553) 1f179ea Fix encoding of I/O in net-utils.el for MS-Windows. (Bug#19458) 70f298f Fix the description of -nl in --help text. (Bug#19542)
Stefan Monnier [Wed, 28 Jan 2015 03:41:31 +0000 (22:41 -0500)]
Tighten up the tagcode used for eieio and cl-struct objects
* lisp/emacs-lisp/eieio-core.el (eieio-defclass-internal): Set the function
slot of the tag symbol to :quick-object-witness-check.
(eieio-object-p): Use :quick-object-witness-check.
(eieio--generic-tagcode): Use cl--generic-struct-tag.
* lisp/emacs-lisp/cl-preloaded.el: New file.
* lisp/emacs-lisp/cl-macs.el (cl--bind-inits): Remove, unused.
(cl--transform-lambda, cl-destructuring-bind): Remove cl--bind-inits.
(cl--make-usage-args): Strip away &aux args.
(cl-case, cl-typecase, cl--parse-loop-clause): Use macroexp-let2.
(cl-the, cl-check-type): Use macroexp-let2 and cl-typep.
(cl-defstruct): Use `declare' and cl-struct-define.
* lisp/emacs-lisp/cl-generic.el (cl--generic-struct-tag): New function.
(cl--generic-struct-tagcode): Use it to tighten the tagcode.
* lisp/loadup.el: Load cl-preloaded.
* src/lisp.mk (lisp): Add cl-preloaded.
Ivan Shmakov [Tue, 27 Jan 2015 21:25:56 +0000 (21:25 +0000)]
Allow for adding new members to Tar archives.
* lisp/tar-mode.el: Allow for adding new archive members.
(tar-new-regular-file-header, tar--pad-to, tar--put-at)
(tar-header-serialize): New functions.
(tar-current-position): Split from tar-current-descriptor.
(tar-current-descriptor): Use it.
(tar-new-entry): New command.
(tar-mode-map): Bind it.
* doc/emacs/files.texi (File Archives): Document "I" for tar-new-entry.
* etc/NEWS: Mention the new tar-new-entry command.
Eli Zaretskii [Tue, 27 Jan 2015 19:02:13 +0000 (21:02 +0200)]
Signal a file-error from directory-files on MS-Windows (Bug#19701)
src/dired.c (directory_files_internal) [WINDOWSNT]: If readdir
returns NULL and errno is ENOTDIR, behave as if opendir failed to
open the directory.
src/w32.c (sys_readdir): If FindFirstFile fails because the
directory doesn't exist, set errno to ENOTDIR.
Sam Steingold [Tue, 27 Jan 2015 18:20:57 +0000 (13:20 -0500)]
minor tweaks for `python-check'
* lisp/progmodes/python.el (python-check-custom-command): Buffer local
because it usually includes the buffer name.
(python-check-command): Set to epylint when pyflakes is not available.
Paul Eggert [Tue, 27 Jan 2015 06:34:25 +0000 (22:34 -0800)]
Port autogen.sh hook creation to Apple Git
* autogen.sh: Do not assume that the hook samples exist.
This ports to git version 1.9.3 (Apple Git-50).
For some reason Apple decided to populate the git hooks directory
in a different way from the way that standard Git does it.
The downside is that patch applications won't be checked on Apple,
but that's better than autogen.sh failing.
Problem reported by Sam Steingold in:
http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00898.html
python.el: New non-global state dependent indentation engine.
Fixes: debbugs:18319 Fixes: debbugs:19595
* lisp/progmodes/python.el (python-syntax-comment-or-string-p): Accept
PPSS as argument.
(python-syntax-closing-paren-p): New function.
(python-indent-current-level)
(python-indent-levels): Mark obsolete.
(python-indent-context): Return more context cases.
(python-indent--calculate-indentation)
(python-indent--calculate-levels): New functions.
(python-indent-calculate-levels): Use them.
(python-indent-calculate-indentation, python-indent-line):
(python-indent-line-function): Rewritten to use new API.
(python-indent-dedent-line): Simplify logic.
(python-indent-dedent-line-backspace): Use `unless`.
(python-indent-toggle-levels): Delete function.
Stefan Monnier [Mon, 26 Jan 2015 16:43:06 +0000 (11:43 -0500)]
* lisp/emacs-lisp/cl-generic.el (cl--generic-method): New struct.
(cl--generic): The method-table is now a (list-of cl--generic-method).
(cl--generic-member-method): New function.
(cl-generic-define-method): Use it.
(cl--generic-build-combined-method, cl--generic-cache-miss):
Adapt to new method-table.
(cl--generic-no-next-method-function): Add `method' argument.
(cl-generic-call-method): Adapt to new method representation.
(cl--generic-cnm-sample, cl--generic-nnm-sample): Adjust.
(cl-find-method, cl-method-qualifiers): New functions.
(cl--generic-method-info): Adapt to new method representation.
Return a string for the qualifiers.
(cl--generic-describe):
* lisp/emacs-lisp/eieio-opt.el (eieio-help-class): Adjust accordingly.
(eieio-all-generic-functions, eieio-method-documentation):
Adjust to new method representation.
* lisp/emacs-lisp/eieio-compat.el (eieio--defmethod): Use cl-find-method.
* test/automated/cl-generic-tests.el: Try and make sure cl-lib is not
required at run-time.
Stefan Monnier [Mon, 26 Jan 2015 14:04:55 +0000 (09:04 -0500)]
* lisp/emacs-lisp/cl-generic.el: Add a method-combination hook.
(cl-generic-method-combination-function): New var.
(cl--generic-lambda): Remove `with-cnm' arg.
(cl-defmethod): Change accordingly.
(cl-generic-define-method): Don't check qualifiers validity.
Preserve all qualifiers in `method-table'.
(cl-generic-call-method): New function.
(cl--generic-nest): Remove (morph into cl-generic-call-method).
(cl--generic-build-combined-method): Adjust to new format of method-table
and use cl-generic-method-combination-function.
(cl--generic-standard-method-combination): New function, extracted from
cl--generic-build-combined-method.
(cl--generic-cnm-sample): Adjust to new format of method-table.
* lisp/emacs-lisp/eieio-compat.el (eieio--defmethod): Use () qualifiers
instead of :primary.
Avoid a crash when the daved ptr is at the end of the list (= when it's
before the first one). Also use `eq' to compare the value so the saved
list indicator appears when a value was retrieved from the list rather
than an equal result is shown.
Stefan Monnier [Sun, 25 Jan 2015 16:09:53 +0000 (11:09 -0500)]
* lisp/emacs-lisp/cl-generic.el: Fix next-method-p test
Fixes: debbugs:19672
* lisp/emacs-lisp/cl-generic.el (cl--generic-no-next-method-function): New.
(cl--generic-build-combined-method, cl--generic-nnm-sample): Use it.
(cl--generic-typeof-types): Add support for `sequence'.
(cl-defmethod): Add non-keywords in the qualifiers.
Paul Eggert [Sun, 25 Jan 2015 02:05:33 +0000 (18:05 -0800)]
Use gnustep-config if available
* configure.ac (--with-gnustep): Document this.
(NS_GNUSTEP_CONFIG): New variable, set if gnustep-config works.
If gnustep-config works, use 'gnustep-config --objc-flags' and
'gnustep-config --gui-libs' to compute GNUstep configuration
variables, instead of attempting to infer them individually.
* etc/NEWS: Document this.
* src/emacs.c [NS_IMPL_GNUSTEP]: Don't include <GNUstepBase/GSConfig.h>.
It doesn't appear to be needed, and the inclusion breaks on
Ubuntu 14.10 when 'configure' uses 'gnustep-config'. Fixes: bug#19507
Paul Eggert [Sat, 24 Jan 2015 00:08:12 +0000 (16:08 -0800)]
Fix a couple of AM_V_GEN bugs
* admin/unidata/Makefile.in (unifiles):
Use AM_V_at instead of AM_V_GEN, since this doesn't generate a file.
* lib-src/Makefile.in (AM_V_GEN, am__v_GEN_, am__v_GEN_0, am__v_GEN_1)
(AM_V_at, am__v_at_, am__v_at_0, am__v_at_1):
New macros, copied from ../src/Makefile.in.
Ulrich Müller [Thu, 22 Jan 2015 07:24:42 +0000 (08:24 +0100)]
Don't fail if chown or chgrp for 'update-game-score' is unsuccessful.
* lib-src/Makefile.in ($(DESTDIR)${archlibdir}): Don't fail if the
chown or chgrp command is unsuccessful; the 'update-game-score'
program has a fallback for this at runtime.
Stefan Monnier [Thu, 22 Jan 2015 04:16:45 +0000 (23:16 -0500)]
Avoid generating invalid usage info for pathological function
Fixes: debbugs:19645
* lisp/help.el (help-make-usage): Don't turn a "_" arg into an empty-string.
* lisp/emacs-lisp/cl-generic.el (cl--generic-lambda): Don't confuse a string
body with a docstring.
Paul Eggert [Thu, 22 Jan 2015 04:01:10 +0000 (20:01 -0800)]
Better isolate code that assumes NIL_IS_ZERO
Suggested by Stefan Monnier in:
http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00588.html
* alloc.c (allocate_pseudovector):
Use memclear, not memsetnil, to remove a 'verify'.
* callint.c (Fcall_interactively):
* dispnew.c (realloc_glyph_pool):
* xdisp.c (init_iterator):
Use memclear, not memset, to remove a 'verify'.
* lisp.h (memclear): Rename from memsetnil, and take a byte
count rather than a word count. All callers changed.
Dmitry Gutov [Thu, 22 Jan 2015 02:09:23 +0000 (04:09 +0200)]
xref: Input history and minor tweaks
* lisp/progmodes/xref.el (xref--current): Rename from `xref--selected'.
(xref--inhibit-mark-current): Rename from
`xref--inhibit-mark-selected'. Update the usages.
(xref-quit): Reword the docstring. Kill buffers after quitting
windows instead of before.
(xref--insert-xrefs): Tweak help-echo.
(xref--read-identifier-history, xref--read-pattern-history):
New variables.
(xref--read-identifier, xref-find-apropos): Use them.