Eli Zaretskii [Sat, 7 Jun 2014 07:25:49 +0000 (10:25 +0300)]
Fix last commit.
src/term.c (tty_menu_show) [WINDOWSNT]: Make tty_menu_show extern
only for WINDOWSNT.
src/menu.h (tty_menu_show) [WINDOWSNT]: Declare extern only for WINDOWSNT.
* lisp/vc/vc-hg.el (vc-hg-log-graph): New var.
(vc-hg-print-log): Use it.
(vc-hg-root-log-format): Include branch name and bookmarks; ignore
graph output.
Stefan Monnier [Fri, 6 Jun 2014 02:35:17 +0000 (22:35 -0400)]
* lisp/mouse.el (mouse-posn-property): Ignore buffer position info when the
even happened elsewhere.
* src/keyboard.c (make_lispy_position): Don't include a buffer position in
mode/header-line mouse events.
tildify.el: Rewrite `tildify-region' and co., add foreach function.
* lisp/textmodes/tildify.el (tildify-foreach-region-outside-env): New
function which calls a callback on portions of the buffer that are
outside of ignored environments.
(tildify-build-regexp): Remove function since it is now
incorporated in `tildify-foreach-region-outside-env' where it is
optimised and simplified by the use of `mapconcat'.
(tildify-tildify): Return number of substitutions made so that…
(tildify-count): …can be removed.
(tildify-find-env): Accept a new PAIRS argument which was
previously looked up in `tildify-ignored-environments-alist' each
time the function was called. With this change, the lookup is
performed only once in `tildify-foreach-region-outside-env'.
(tildify-region): Greatly simplify the function since now most of
the work is done by `tildify-foreach-region-outside-env'.
(tildify-mode-alist): Simplify slightly by avoiding if and setq
and instead using or.
* tests/automated/tildify-tests.el (tildify-test-find-env-end-re-bug)
(tildify-test-find-env-group-index-bug): Update to support new
signature of the `tildify-foreach-region-outside-env' function.
Namely, it now takes pairs as an argument instead of looking it up in
`tildify-ignored-environments-alist'.
* lisp/textmodes/tildify.el (tildify-ignored-environments-alist):
Each time beginning of an environment to ignore is found,
`tildify-find-env' needs to identify regexp for the ending
of the environment. This is done by trying all the opening
regexes on matched text in a loop, so to speed that up, this
loop should have fewer things to match, which can be done by
using alternatives in the opening regexes.
Coincidentally, this should make matching of the opening
regexp faster as well thanks to the use of `regexp-opt' and
having common prefix pulled from many regexes.
* lisp/textmodes/tildify.el (tildify-string-alist)
(tildify-ignored-environments-alist): Add `nxml-mode' to the list of
supported modes since `xml-mode' is no longer a thing but just an
alias to the former. Also include comments and insides of tags in
`tildify-ignored-environments-alist' for XML modes. Finally, since
XML does not define “ ”[1], use a numeric reference for
a no-break space (namely “ ”)
[1] XML specification defines only a handful of predefined entities.
The list is at <http://www.w3.org/TR/REC-xml/#sec-predefined-ent>
and includes only <, >, &, ' and " (meaning <,
>, &, ' and " respectively). This is in contrast to HTML and even
XHTML which defined a whole bunch of entities including “ ”.
* automated/tildify-tests.el (tildify-test--example-html): Add support
for generating XML code, so that…
(tildify-test-xml) …test can be added to check handling of XML
documents.
* lisp/textmodes/tildify.el (tildify-pattern-alist)
(tildify-string-alist, tildify-ignored-environments-alist):
Add more tags explaining what each value means and replace
“sexp” used in `tildify-ignored-environments-alist' with
a full type declaration.
tildify.el: Fix matched group indexes in end-regex building
* lisp/textmodes/tildifi.el (tildify-find-env): When looking for
a start of an ignore-environment, the regex is built by
concatenating regexes of all the environments configured in
`tildify-ignored-environments-alist'. So for example, the following
list could be used to match TeX's \verb and \verb* commands:
This would result in the following regex being used to find the start
of any of the variants of the \verb command:
\\\\verb\\(.\\)\\|\\\\verb\\*\\(.\\)
But now, if “\\\\verb\\*\\(.\\)” matches, the first capture group
won't match anything, and thus (match-string 1) will be nil, which
will cause building of the end-matching regex to fail.
Fix this by using capture groups from the time when the opening
regexes are matched individually.
* tests/automated/tildify-tests.el (tildify-test-find-env-group-index-bug):
New test validating fix to the above bug.
tildify.el: Fix end-regex building in `tildify-find-env'
* lisp/textmodes/tildify.el (tildify-find-env): The
`tildify-ignored-environments-alist' allows the end-regex
to be provided not as a static string but mix of strings and
indexes of groups matched the begin-regex. For example, the
“\verb!…!” TeX-command (where “!” is an arbitrary character)
is handled using:
("\\\\verb\\*?\\(.\\)" . (1))
In the same way, the following should be supported as well:
("open-\\(.\\)" . ("end-" 1))
However the tildify-find-env function fails at
(concat result
(if (stringp (setq aux (car expression)))
expression ; BUG: expression is a list
(regexp-quote (match-string aux))))
where the string part is handled incorrectly.
The most trivial fix would be to replace `expression'
in the true-part of the if-statement with `aux', but
instead, this commit optimises `tildify-find-env' by
changing it to use `mapconcat' rather than open-coded
while-loop.
* tests/automated/tildify-tests.el (tildify-test-find-env-end-re-bug):
New test validating fix to the above bug.
Paul Eggert [Thu, 5 Jun 2014 08:03:22 +0000 (01:03 -0700)]
Try harder to find GNU Make when configuring.
* configure.ac (AC_PROG_MAKE_SET): Define a dummy.
(MAKE): Set it to GNU Make, if one can be found.
Search PATH for 'make', 'gmake', 'gnumake'.
This works better on platforms like AIX, where GNU Make
might be in /opt/freeware/bin/make, and reside
behind /usr/bin/make in the PATH.
Dmitry Antipov [Thu, 5 Jun 2014 06:24:54 +0000 (10:24 +0400)]
* configure.ac (POLL_FOR_INPUT): Define with HAVE_WINDOW_SYSTEM.
* nt/inc/ms-w32.h (POLL_FOR_INPUT): Likewise.
* src/keyboard.c, src/process.c: Do not define POLL_FOR_INPUT here
because it will be defined in generated config.h if needed.
Katsumi Yamaoka [Thu, 5 Jun 2014 04:31:36 +0000 (04:31 +0000)]
Gnus: fix last change
* gnus-art.el (gnus-article-edit-part): Don't modifiy markers.
(gnus-article-read-summary-keys):
Don't bug out when there is no article in the summary buffer.
Katsumi Yamaoka [Thu, 5 Jun 2014 01:38:42 +0000 (01:38 +0000)]
Gnus: bugfixes to make `gnus-mime-save-part-and-strip' work again
* gnus-art.el (gnus-mm-display-part):
* mm-decode.el (mm-shr):
* mm-view.el (mm-inline-text-html-render-with-w3m, mm-inline-text)
(mm-insert-inline): Set insertion type of end-marker, not only
start-marker, of undisplayer so as to stay after inserted text.
Dmitry Antipov [Wed, 4 Jun 2014 04:58:31 +0000 (08:58 +0400)]
Use terminal-specific hooks to display menus.
* termhooks.h (struct terminal): New field menu_show_hook.
* menu.h (<anonymous enum>): Bit flags for menu hooks.
(x_menu_show, w32_menu_show, ns_menu_show, tty_menu_show):
Adjust prototypes.
* menu.c (Fx_popup_menu): Use bit flags and menu_show_hook.
* nsmenu.m (ns_menu_show):
* w32menu.c (w32_menu_show):
* xmenu.c (x_menu_show):
* term.c (tty_menu_show): Adjust to use bit flags.
(set_tty_hooks): Set menu_show_hook.
* xterm.c (x_create_terminal):
* nsterm.m (ns_create_terminal):
* msdos.c (initialize_msdos_display):
* w32term.c (w32_create_terminal): Likewise.
Paul Eggert [Tue, 3 Jun 2014 19:59:55 +0000 (12:59 -0700)]
Do not require libXt-devel when building with gtk.
* lwlib/lwlib-widget.h: New file, with contents taken from lwlib.h.
(widget_value) [HAVE_NTGUI]: New member 'title'.
* lwlib/lwlib.h: Include lwlib-widget.h.
(change_type, enum button_type, widget_value):
Move to lwlib-widget.h.
* src/gtkutil.h, src/menu.h: Include lwlib-widget.h, not lwlib-h, to avoid
dependency on libXt-devel.
* src/menu.h [HAVE_NTGUI]: Include lwlib-widget.h in this case too.
(enum button_type, widget_value) [HAVE_NTGUI]: Remove, as
lwlib-widget.h now does this.
* src/nsmenu.m (ns_menu_show): "enabled" -> "enable" to fix typo.
Eli Zaretskii [Tue, 3 Jun 2014 07:28:07 +0000 (10:28 +0300)]
Define the size of dumped data for MS-Windows locally on w32heap.c.
configure.ac (C_HEAP_SWITCH): Remove.
src/w32heap.c (DUMPED_HEAP_SIZE): Move from w32heap.h. Don't use
HEAPSIZE; instead, define separate values for the 32- and 64-bit
builds.
src/Makefile.in (C_HEAP_SWITCH): Remove.
(ALL_CFLAGS): Don't use $(C_HEAP_SWITCH).
Eli Zaretskii [Tue, 3 Jun 2014 06:51:18 +0000 (09:51 +0300)]
Fix MS-Windows build broken by menu changes on 2014-06-02.
src/w32menu.c (w32_menu_show): Fix a typo that broke compilation.
src/menu.h (enum button_type, struct _widget_value) [HAVE_NTGUI]:
Define instead of including ../lwlib/lwlib.h, which causes
compilation errors due to missing X11 headers.
Dmitry Antipov [Tue, 3 Jun 2014 04:17:53 +0000 (08:17 +0400)]
* xlwmenu.c (openXftFont): Do not load regular X font here.
(XlwMenuInitialize): Remove ancient #if 0 code.
(XlwMenuDestroy): Likewise. Free regular X font here.
Sam Steingold [Mon, 2 Jun 2014 19:02:31 +0000 (15:02 -0400)]
Avoid the type error on f10 when lookup-key returns an number.
* lisp/menu-bar.el (lookup-key-ignore-too-long): Extract from...
(popup-menu): ...here.
(menu-bar-open): Use it to avoid an error when `lookup-key'
returns a number.
Eli Zaretskii [Mon, 2 Jun 2014 17:08:50 +0000 (20:08 +0300)]
Minor improvement of sbrk emulation on MS-Windows.
src/w32heap.c (malloc_after_dump, realloc_after_dump): Update the
emulated break value only if it goes up.
(sbrk): Add assertion that the INCREMENT argument is strictly
zero. Improve and correct the commentary.
* lisp/progmodes/verilog-mode.el (verilog-mode-version): Bump.
(verilog-auto-arg-format): New option, to support newlines in AUTOARG.
(verilog-type-font-keywords): Add nor.
(verilog-batch-execute-func): Force reading of Local Variables.
Fix printing "no changes to be saved" with verilog-batch.
(verilog-auto-arg-ports): Doc fix.
Add verilog-auto-arg-format to support newlines in AUTOARG.
(verilog-auto-arg): Doc fix.
Paul Eggert [Mon, 2 Jun 2014 06:08:49 +0000 (23:08 -0700)]
Improve AIX-related merge from emacs-24.
* conf_post.h (FLEXIBLE_ARRAY_MEMBER): Fix comment.
* lisp.h (ENUMABLE) [!_AIX]: Don't define to 0 merely because we're
not on AIX; since we're on the trunk we can use enums more broadly.
Paul Eggert [Sun, 1 Jun 2014 23:58:38 +0000 (16:58 -0700)]
Merge from gnulib.
This incorporates:
2014-06-02 acl: apply pure attribute to two functions
2014-06-01 gnulib-common.m4: add _GL_UNUSED_LABEL
2014-05-31 dup2, fcntl, fcntl-h: port to AIX 7.1
2014-05-30 ftoastr: work around compiler bug in IBM xlc 12.1
* lib/acl-internal.h, lib/fcntl.in.h, lib/ftoastr.h:
* m4/dup2.m4, m4/fcntl.m4, m4/gnulib-common.m4:
Update from gnulib.
Paul Eggert [Sun, 1 Jun 2014 07:06:28 +0000 (00:06 -0700)]
Bring back the changes to GDB-visible symbols, but only on AIX.
And only if it's not pre-4.2 GCC.
* lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): New macros.
(ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them.
(ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
New macros.
Glenn Morris [Sun, 1 Jun 2014 02:36:40 +0000 (19:36 -0700)]
* loadup.el (load-prefer-newer): Set non-nil when dumping.
--eval doesn't work (or not early enough) during dumping.
Making load-prefer-newer non-nil by default would be simpler...
Paul Eggert [Fri, 30 May 2014 20:19:29 +0000 (13:19 -0700)]
Fix port to 32-bit AIX with xlc.
This doesn't fix Bug#17598, but it does fix a regression since Emacs
built with xlc until recently, and perhaps it'll help us fix Bug#17598.
* configure.ac (GC_SETJMP_WORKS): Define for AIX, too.
Merge from gnulib, incorporating:
2014-05-30 ftoastr: work around compiler bug in IBM xlc 12.1
* lib/ftoastr.c: Update from gnulib.
* src/alloc.c (gdb_make_enums_visible): Remove FLOAT_TO_STRING_BUFSIZE.
* src/conf_post.h (FLEXIBLE_ARRAY_MEMBER) [__IBMC__]: Don't define to empty.
* src/lisp.h (FLOAT_TO_STRING_BUFSIZE): Make it a macro, instead of an enum,
to work around a compiler bug in IBM xlc 12.1.