Paul Eggert [Sun, 31 Jan 2016 02:38:51 +0000 (18:38 -0800)]
Pacify GCC on C library without glibc API
Without this change, with --enable-gcc-warnings GCC would complain
“error: redundant redeclaration of ‘aligned_alloc’”.
* configure.ac: Simplify aligned_alloc testing.
* src/alloc.c (aligned_alloc): Don’t use if DARWIN_OS,
since the simplified configure.ac no longer checks for that.
Don’t declare if HAVE_ALIGNED_ALLOC.
Correct misspelling of HAVE_ALIGNED_ALLOC in ifdef.
Eli Zaretskii [Sat, 30 Jan 2016 15:27:45 +0000 (17:27 +0200)]
Fix typos in Introduction to Emacs Lisp manual
* doc/lispintro/emacs-lisp-intro.texi (Emacs Initialization)
(kill-new function, Digression into C)
(Complete forward-sentence, Divide and Conquer, Find a File)
(lengths-list-many-files, Columns of a graph, defcustom)
(recursive-count-words): Fix typos. Reported by Daniel Bastos
<dbastos@toledo.com>.
lu4nx [Sat, 30 Jan 2016 12:56:43 +0000 (14:56 +0200)]
Support Go language in 'etags'
* lib-src/etags.c <Ruby_help>: Fix documentation of Ruby tags.
<Go_help>: New help.
<Go_suffixes>: New variable.
(Go_functions): New function.
<lang_names>: Add entry for Go. (Bug#22370)
* doc/emacs/maintaining.texi (Tag Syntax): Document Go support.
* doc/man/etags.1: Mention Go support.
* etc/NEWS: Mention Go support.
* test/etags/go-src/test.go:
* test/etags/go-src/test1.go: New test files.
* test/etags/Makefile (GOSRC): New variable.
(SRCS): Add $(GOSRC).
* test/etags/ETAGS.good_1:
* test/etags/ETAGS.good_2:
* test/etags/ETAGS.good_3:
* test/etags/ETAGS.good_4:
* test/etags/ETAGS.good_5:
* test/etags/ETAGS.good_6:
* test/etags/CTAGS.good: Adapt to addition of Go tests.
Eli Zaretskii [Sat, 30 Jan 2016 12:16:36 +0000 (14:16 +0200)]
Improve Ruby support in 'etags'
* lib-src/etags.c (Ruby_functions): Tag constants. Don't tag
singleton classes. Remove class qualifiers from tags generated
for method and constant names. (Bug#22241)
* doc/emacs/maintaining.texi (Tag Syntax): Mention that constants
are tagged by etags in Ruby.
* etc/NEWS: Mention that constants are tagged by etags in Ruby.
* test/etags/ruby-src/test1.ruby: Add more tests.
* test/etags/ETAGS.good_1:
* test/etags/ETAGS.good_2:
* test/etags/ETAGS.good_3:
* test/etags/ETAGS.good_4:
* test/etags/ETAGS.good_5:
* test/etags/ETAGS.good_6:
* test/etags/CTAGS.good: Adapt to the changes in etags and in Ruby
tests.
Eli Zaretskii [Sat, 30 Jan 2016 10:18:43 +0000 (12:18 +0200)]
Adjust etags test results to changes in copyright years
* test/etags/CTAGS.good:
* test/etags/ETAGS.good_1:
* test/etags/ETAGS.good_2:
* test/etags/ETAGS.good_3:
* test/etags/ETAGS.good_4:
* test/etags/ETAGS.good_5:
* test/etags/ETAGS.good_6: Adjust to shift in characters and
in line numbers.
Eli Zaretskii [Sat, 30 Jan 2016 08:04:13 +0000 (10:04 +0200)]
Document xwidget commands and functions
* doc/lispref/display.texi (Xwidgets): New section, describes some
of the xwidget primitives.
* doc/lispref/display.texi (Display): Update the chapter menu.
* doc/emacs/misc.texi (Embedded WebKit Widgets): New section.
* doc/emacs/emacs.texi (Top): Update the master menu to include
the xwidget node.
Dmitry Gutov [Sat, 30 Jan 2016 04:21:31 +0000 (07:21 +0300)]
Improve project-find-file yet again!
* lisp/progmodes/project.el (project--completing-read-strict):
New function.
(project-find-file-in): Use it.
(project-file-completion-table): Move the default
implementation inside the cl-defgeneric form.
(http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg01720.html)
Stephen Leake [Fri, 29 Jan 2016 23:43:26 +0000 (17:43 -0600)]
Improve project-find-file
* lisp/progmodes/project.el (project-file-completion-table): New.
(project-find-file, project-or-external-find-file): Default to filename
at point.
(project-file-completion-table): New, split out from
project--find-file-in.
(project-find-file-in): Renamed from project--find-file-in, use
project-file-completion-table.
* lisp/progmodes/xref.el (ede-minor-mode): New declaration.
(xref--find-ignores-arguments): Add doc string.
* lisp/ses.el (ses-localvars): rename variable
`ses--renamed-cell-symb-list' into `ses--in-killing-named-cell-list'
and adjust the comment about it.
(ses-plist-delq): new defun.
(ses--ses-buffer-list): new defvar.
(ses--unbind-cell-name): new defun.
(ses-relocate-symbol): Do not relocate symbol when it is a named cell.
(ses-relocate-formula): Undo change of
2011-12-27T19:30:39Z!vincentb1@users.sourceforge.net that was
preventing relocation for named cell --- now doing this is delegated
to function `ses-relocate-symbol'.
(ses-relocate-range): In docstring, undo change of
2016-01-03T07:31:52Z!johnw@newartisans.com, `ses-range' must remain
lower case as it is not a variable.
(ses-relocate-all): Cell name relocation : 1) check that cell is a
renamed cell by testing `ses-cell' property to :ses-named, rather than
comparing name to corresponding standard name. Set rowcol of renamed
cell into the hashmap --- `ses-cell' property must not be used for
that as the same name can be used for different locations in different
SES sheets ; 2) use `local-variable-if-set-p' rather than `boundp' and
`local-variable-p' to check if cell name is already in use in this
sheet or needs initialisation.
(ses-relocate-all): Cell value relocation : 1) like for name
relocation use the `ses-cell' property rather than comparing actual
name to corresponding standard name. 2) Correct bug introduced in
2011-12-27T19:30:39Z!vincentb1@users.sourceforge.net, as the test was
made the other way round than the intention --- ie value relocation
was disabled for standard cell, not for renamed cell as was the
intention.
(ses-relocate-all): Add loop for unbinding deleted renamed cells
names.
(ses-killbuffer-hook): new defun.
(ses-mode): Add the ses--ses-buffer-list maintenance mechanism ---
kill buffer hook, plus pushing current buffer if new in list.
(ses-delete-row, ses-delete-column): Collect deleted renamed cells
into `ses--in-killing-named-cell-list'.
(ses-rename-cell): Remove update of variable
`ses--renamed-cell-symb-list', this variable is renamed to
`ses--in-killing-named-cell-list', and its setting is done in
functions `ses-delete-row' and , `ses-delete-column' now.
(ses-rename-cell): Make cell new name a buffer local variable.
(ses-rename-cell): Change correction of
2015-12-30T23:10:37Z!vincentb1@users.sourceforge.net concerning
computation of the range over which `cursor-intangible' property was
to be updated. This correction was ok for non spilling cells, but not
for cells spilling over following blank cells. Simply use
`next-single-property-change' rather than computing the end column
from column widths.
Eli Zaretskii [Fri, 29 Jan 2016 09:40:31 +0000 (11:40 +0200)]
Minor improvements to 'pcase' documentation
* doc/lispref/control.texi (Pattern matching case statement):
Improve the documentation of 'pcase' per comments. See two
discussion threads on emacs-devel@gnu.org for the details:
http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg01335.html
http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg01336.html.
Paul Eggert [Wed, 27 Jan 2016 07:00:10 +0000 (23:00 -0800)]
malloc.h hygiene
This attempts to future-proof Emacs a bit against possible glibc
changes, by having Emacs use <malloc.h> declarations rather than
coding them up by hand. Problem noted by Florian Weimer in:
https://sourceware.org/ml/libc-alpha/2016-01/msg00777.html
Implement this mainly by moving malloc.h-related functions from
emacs.c (which does not include <malloc.h>) to alloc.c (which does).
* src/alloc.c (my_heap_start) [DOUG_LEA_MALLOC || GNU_LINUX]:
New function.
The remaining changes to this file apply only if DOUG_LEA_MALLOC.
(alloc_unexec_pre, alloc_unexec_post): New functions.
(malloc_initialize_hook): Use my_heap_start and alloc_unexec_post.
(__MALLOC_HOOK_VOLATILE): New macro, if not already defined.
(__malloc_initialize_hook): Use it.
(malloc_state_ptr, malloc_initialize_hook, __malloc_initialize_hook):
Move here from ...
* src/emacs.c: ... here.
(malloc_get_state, malloc_set_state): Remove extern decls.
(my_heap_start) [DOUG_LEA_MALLOC || GNU_LINUX]: Remove static var.
All uses changed to similarly-named new function.
(Fdump_emacs): Use new functions alloc_unexec_pre, alloc_unexec_post.
* src/lisp.h (my_heap_start, alloc_unexec_pre, alloc_unexec_post):
New decls.
K. Handa [Sat, 2 Jan 2016 07:36:21 +0000 (16:36 +0900)]
support rendering of wider range of combinging characters by ftfont backend
* lisp/language/hebrew.el (hebrew-shape-gstring): If the font backend
supports rendering of combining characters, call
font-shape-gstring.
* src/font.c (Ffont_get): Handle `combining-capability' property.
(syms_of_font): New symbol ":combining-capability'.
* src/font.h (struct font_driver): New member combining_capability.
* src/ftfont.c: Include "category.h".
(ftfont_driver): Initialize combining_capability to
ftfont_combining_capability.
(ftfont_shape_by_flt): If OTF is null, try to find a suitable
FLT in advance.
(ftfont_combining_capability): New function.
Anders Lindgren [Tue, 26 Jan 2016 12:51:59 +0000 (13:51 +0100)]
Fixed NextStep fullscreen issue (bug#22468)
When in fullscreen mode, `[screen visibleFrame]' sometimes
includes, sometimes excludes the menu bar. This could cause
a frame to be placed too low when in fullscreen mode.
* src/nsterm.m (ns_menu_bar_should_be_hidden): Trace.
(constrain_frame_rect): New parameter, isFullscreen, when true don't
query the height of the menu bar.
(ns_constrain_all_frames): Pass `false' (isFullscreen) to
`constrain_frame_rect'.
([EmacsView initFrameFromEmacs:]): Trace.
([EmacsView isFullscreen]): Trace.
([EmacsWindow constrainFrameRect:toScreen:]): Pass fullscreen
state to `constrain_frame_rect'.
Artur Malabarba [Mon, 25 Jan 2016 22:42:50 +0000 (22:42 +0000)]
* lisp/files.el: Use a fixed file name for the second dir-locals file
(dir-locals-file): Revert to its original fixed value.
(dir-locals-file-2): New const.
(dir-locals--all-files): Don't use `file-name-all-completions'.
Instead, just check for the 2 dir-locals files and return a list
of the ones that exit (if any).
* etc/NEWS: Document the change.
* doc/emacs/custom.texi (Directory Variables): Document the change.
* doc/lispref/variables.texi (Directory Local Variables): Update
accordingly.
Returning a cache remains unchanged, but the case of returning a
file (or pattern) is now changed to return the contaning
directory.
(dir-locals-read-from-file): Rename to `dir-locals-read-from-dir'
and make obsolete.
(dir-locals-read-from-dir): Simplify accordingly.
(hack-dir-local-variables): Simplify accordingly and rename a
variable.
Paul Eggert [Mon, 25 Jan 2016 01:27:52 +0000 (17:27 -0800)]
Port "$@" to OpenIndiana ksh93
In http://lists.gnu.org/archive/html/bug-autoconf/2015-12/msg00000.html
Pavel Raiskup reports that ${1+"$@"} runs afoul of a bug in /bin/sh
(derived from ksh 93t+ 2010-03-05). ${1+"$@"} works around an ancient
bug in long-dead shells, so remove the workaround.
* admin/check-doc-strings, configure.ac, lib-src/rcs2log:
Use plain "$@" rather than ${1+"$@"}.
Paul Eggert [Mon, 25 Jan 2016 00:09:15 +0000 (16:09 -0800)]
Improve wording for SMB support
* doc/misc/tramp.texi (External methods): Improve and modernize
wording for discussion of smbclient. There is no longer any
need to mention the laundry list of old MS Windows implementations
of SMB and CIFS, nor to mention CIFS. Also, give a URL for Samba.
Paul Eggert [Sun, 24 Jan 2016 22:50:47 +0000 (14:50 -0800)]
Merge from gnulib
This incorporates:
2016-01-24 openat_proc_name: fix last '/' overwritten on OS/2 kLIBC
2016-01-24 closedir, dirfd, opendir: port to OpenSolaris 5.10
2016-01-15 detect utimes() correctly on OS/2 kLIBC
2016-01-15 openat_proc_name: port to OS/2 kLIBC
2016-01-14 stdint: check _INTPTR_T_DECLARED for intptr_t etc.
2016-01-14 opendir, closedir, dirfd, fdopendir: port to OS/2 kLIBC
2016-01-14 dup, dup2, fcntl: support a directory fd on OS/2 kLIBC
2016-01-14 binary-io: don't put fd in binary mode if a console on EMX
2016-01-14 sig2str: list all signals on FreeBSD >= 7
2016-01-13 acl-permissions: port to USE_ACL==0 platforms
2016-01-12 mktime: rename macro to avoid glibc clash
2016-01-12 Port "$@" to OpenIndiana ksh93
2016-01-12 Port Universal Time settings to strict POSIX
* build-aux/gitlog-to-changelog, build-aux/update-copyright:
* doc/misc/texinfo.tex, lib/acl-internal.c, lib/acl-internal.h:
* lib/binary-io.h, lib/dirent.in.h, lib/dirfd.c, lib/dup2.c:
* lib/fcntl.c, lib/fdopendir.c, lib/mktime.c, lib/openat-proc.c:
* lib/sig2str.h, lib/stdint.in.h, m4/dirfd.m4, m4/dup2.m4:
* m4/fcntl.m4, m4/utimes.m4:
Copy from gnulib.
* m4/gnulib-comp.m4: Regenerate.
Replace solecisms like "This allow to do something" with a correct
alternative, such as "This allow you to do something", "This allows
something to be done" or "This allows the doing of something".
Paul Eggert [Sun, 24 Jan 2016 19:40:26 +0000 (11:40 -0800)]
Port Tramp manual to latest Texinfo
Otherwise, 'make pdf' did not work (Bug#22416).
* doc/misc/tramp.texi (xxx, yyy): Remove macros.
(trampfn): Specialize to the case where METHOD is nonempty.
The 2nd argument is now user@host, not 2nd user and 3rd host args.
All uses changed.
(trampf): New macro.
Dmitry Gutov [Sun, 24 Jan 2016 00:35:39 +0000 (03:35 +0300)]
Update cl-defgeneric and cl-defmethod docstrings
* lisp/emacs-lisp/cl-generic.el: Remove outdated TODO item.
(cl-defgeneric): Rename BODY to DEFAULT-BODY.
(cl-defmethod): Mention that multiple dispatch arguments are
allowed. Document supported types. (Bug#22336)
Alan Mackenzie [Sat, 23 Jan 2016 19:38:49 +0000 (19:38 +0000)]
Distinguish the two meanings of Java's keyword "default". Fixes bug #22358.
* lisp/progmodes/cc-engine.el (c-guess-basic-syntax CASE 14): Check the
context of case labels (including "default") more rigorously.
(c-guess-basic-syntax CASE 15): Consequential amendment.
* lisp/progmodes/cc-langs.el (c-modifier-kwds): Add "default" to Java's value.
Paul Eggert [Sat, 23 Jan 2016 09:02:00 +0000 (01:02 -0800)]
Pacify --enable-gcc-warnings --with-cairo
Problem reported by Alexander Kuleshov in:
http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg01289.html
* src/gtkutil.c (xg_get_page_setup):
Use switch rather than if-then-else.
* src/image.c (COLOR_TABLE_SUPPORT):
Define directly rather than via #define and optional later #undef.
(lookup_rgb_color) [USE_CAIRO && ENABLE_CHECKING]:
Crash when the pixel is undefined, as there is a genuine bug
here (Bug#22442).
* src/image.c (tiff_load, gif_load, svg_load_image)
(x_kill_gs_process) [USE_CAIRO]:
* src/xterm.c (x_draw_fringe_bitmap) [USE_CAIRO]:
Omit unused locals, or move them to where they’re needed.
(x_clear_area1): Now ATTRIBUTE_UNUSED.
Eli Zaretskii [Sat, 23 Jan 2016 06:53:35 +0000 (08:53 +0200)]
Update documentation for Dired search and replace
* doc/emacs/dired.texi (Operating on Files): Update descriptions
of 'A' and 'Q' now bound to 'dired-do-find-regexp' and
'dired-do-find-regexp-and-replace'.
* etc/NEWS: Mention xref-related changes in Dired.
Paul Eggert [Fri, 22 Jan 2016 23:27:55 +0000 (15:27 -0800)]
Port recent xdisp.c fix to picky C compilers
* src/xdisp.c (dump_glyph): Redo the call to fprintf to avoid
putting #if inside the arguments to a standard function, which
the C standard says has undefined behavior.