1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-01 09:51:22 -08:00
Commit graph

122968 commits

Author SHA1 Message Date
Ken Raeburn
08e27d2944 Rewrite x_set_mouse_color to sync less.
We can track serial numbers of X requests and correlate error events
with the associated requests.  This way we can identify errors for
specific calls without having to use XSync after every one.

* src/xfns.c (enum mouse_cursor): New type.
(struct mouse_cursor_types, struct mouse_cursor_data): New types.
(mouse_cursor_types): New array listing the Lisp variables and default
cursor appearances for each cursor type.
(x_set_mouse_color_handler): New function; checks error event serial
number against submitted requests.
(x_set_mouse_color): Updated to use the new error handler callback,
and to be more table-driven, to simplify repetitious code.
2015-10-11 01:15:19 -04:00
Ken Raeburn
fcb5d3e8b1 Add x_catch_errors_with_handler.
* src/xterm.c (struct x_error_message_stack): Add new fields for a
callback function and associated data pointer.
(x_error_catcher): If the callback function is set, call it after
saving the error message string.
(x_catch_errors_with_handler): Renamed from x_catch_errors but now
accepts a callback function and data pointer.
(x_catch_errors): Now a wrapper function.
* src/xterm.h (x_special_error_handler): New typedef.
(x_catch_errors_with_handler): Declare.
2015-10-11 01:15:12 -04:00
Ken Raeburn
5504ede951 Introduce x_uncatch_errors_after_check to reduce XSync calls.
Both x_had_errors_p and x_check_errors call XSync, so if they're
immediately followed by x_uncatch_errors, its XSync call will be
redundant, resulting in a wasted round trip to the X server.

* src/xterm.c (x_uncatch_errors_after_check): New routine; a copy of
x_uncatch_errors without the XSync call.
(XTmouse_position, x_wm_supports):
* src/xfns.c (x_set_mouse_color):
* src/xmenu.c (Fx_menu_bar_open_internal):
* src/xselect.c (x_own_selection, x_get_foreign_selection):
(Fx_get_atom_name): Call it instead of x_uncatch_errors.
* src/xterm.h (x_uncatch_errors_after_check): Declare.
2015-10-11 01:15:08 -04:00
Jay Belanger
54e3734a32 Document the optional prefix to `calc-yank'.
* doc/misc/calc.texi (Yanking into the Stack): Document the optional
prefix to `calc-yank'.
* lisp/calc/calc-yank.el (calc-yank): Ensure that things killed from
the Calc buffer are yanked back unchanged.
2015-10-10 22:08:33 -05:00
Mark Oteiza
4cbd071300 * lisp/calendar/calendar.el: Display buffer before executing body.
In each use of this macro, the modeline is derived from a window width
calculation, which will be wrong if (display-buffer) splits the window
horizontally.
2015-10-10 22:23:59 -04:00
Paul Eggert
29dfca2355 Use ‘echo’ safely with ‘\’ or leading ‘-’
POSIX says that ‘echo FOO’ produces implementation-defined output
if FOO contains leading ‘-’, or ‘\’ anywhere, so don’t assume GNU
behavior in that case.
* Makefile.in (removenullpaths): Remove.
(epaths-force): Rewrite to avoid the need for ‘echo’.
(install-etc): Be clearer about escaping the shell metacharacters
‘\’ and ‘$’.
* Makefile.in (install-arch-indep, install-etcdoc):
* admin/charsets/mapconv, admin/merge-gnulib, admin/merge-pkg-config:
* admin/quick-install-emacs, build-aux/gitlog-to-emacslog:
* configure.ac, lib-src/rcs2log, make-dist:
* src/Makefile.in (lisp.mk):
Don’t assume ‘echo’ outputs ‘\’ and leading ‘-’ unscathed.
For example, use ‘printf '%s\n' "$foo"’ rather than ‘echo "$foo"’
if $foo can contain arbitrary characters.
* lisp/Makefile.in (TAGS): Use ‘ls’, not ‘echo’, to avoid ‘\’ issues.
* doc/lispref/two-volume.make (vol1.pdf):
* test/etags/make-src/Makefile (web ftp publish):
Use ‘printf’ rather than ‘echo -e’.
2015-10-10 18:11:27 -07:00
Kaushal Modi
ec0d4d24fd Allow numbers with different radixes to be yanked.
* lisp/calc/calc-yank.el (calc-yank): Allow radixes besides the
default base 10.
2015-10-10 18:36:51 -05:00
Paul Eggert
89f2c79868 Improve CHECK_IMPURE and PURE_P speedup
* src/data.c (Faset): Use XVECTOR and XSTRING rather than XPNTR.
2015-10-10 15:46:55 -07:00
Jay Belanger
5186c99857 Use events instead of chars to keep track of steps.
* lisp/calc/calc-prog.el (calc-kbd-loop): Use events instead of chars
to keep track of steps.
2015-10-10 17:24:55 -05:00
Eli Zaretskii
bb61fa8448 ; admin/notes/unicode: Update for latest changes. 2015-10-10 22:50:06 +03:00
Paul Eggert
c0ae12581c Fix --enable-gcc-warnings problem with older GCC
* src/puresize.h: Add INLINE_HEADER_BEGIN, INLINE_HEADER_END.
This is for building with --enable-gcc-warnings with
GCC 4.6 through 5.0.
2015-10-10 11:57:36 -07:00
Eli Zaretskii
5b2c9f4339 Fix vertical-motion in truncated lines that end in a stretch
* src/indent.c (Fvertical_motion): Expect overshoot when point is
beyond window margin and lines are truncated, even if we have a
stretch at point.  (Bug#21468)
2015-10-10 20:01:00 +03:00
Eli Zaretskii
f655d09fd5 Avoid link-time errors due to inline functions
* src/emacs.c: Include puresize.h, to avoid link-time errors in
unoptimized builds due to PURE_P and CHECK_IMPURE, which are now
inline functions.
2015-10-10 13:45:15 +03:00
Andreas Schwab
8f41c3098e * src/data.c (Faset): Fix last change. 2015-10-10 11:06:28 +02:00
Paul Eggert
bb7c182fda CHECK_IMPURE and PURE_P speedup
* src/intervals.c (create_root_interval):
Do CHECK_IMPURE only for strings; not needed for buffers.
Prefer ! STRINGP to BUFFERP, for a tad more speed.
* src/puresize.h (CHECK_IMPURE, PURE_P):
Now inline functions instead of macros.
(PURE_P): Don’t use XPNTR; that is now the caller’s responsibility.
All callers changed.
(CHECK_IMPURE): New argument PTR, to save us the work of running XPNTR.
All callers changed.
2015-10-10 00:18:39 -07:00
Noah Friedman
1196e3fca6 (tramp-open-connection-setup-interactive-shell): Send -onlcr as well. 2015-10-09 16:15:21 -07:00
Stefan Monnier
1b5953e0fd * lisp/progmodes/cc-mode.el (c-after-font-lock-init): Only *move*
our after-change-function, rather than re-adding it if it was removed.
2015-10-09 16:34:20 -04:00
Stefan Monnier
b40d703e87 * lisp/cedet/ede: Silence some compiler warnings
* lisp/cedet/ede.el: Require cl-lib.  Silence some compiler warnings.
(ede-menu-obj-of-class-p): Use cl-some rather than `eval'.
(ede-apply-object-keymap, ede-reset-all-buffers)
(ede-auto-add-to-target): Use dolist.
(ede-new, ede-flush-deleted-projects, ede-global-list-sanity-check):
Use field names rather than initarg names in `oref'.
(ede-load-project-file): Remove unused var `file'.
(ede-map-any-target-p): Use cl-some rather than ede-map-targets.
(ede-set): Remove unused var `a'.

* lisp/cedet/ede/emacs.el: Silence some compiler warnings.
(ede-project-autoload): Avoid the old-style "name" argument.
(ede-emacs-find-matching-target): Use field names rather than initarg
names in `oref'.

* lisp/cedet/ede/linux.el: Silence some compiler warnings.
(ede-linux-load, ede-project-autoload): Avoid the old-style "name" argument.
(ede-linux-find-matching-target): Use field names rather than initarg
names in `oref'.
2015-10-09 15:55:31 -04:00
Stefan Monnier
69b3238af2 * lisp/textmodes/reftex.el: Silence byte-compiler warnings. 2015-10-09 15:35:30 -04:00
Stefan Monnier
d72d97fcbe * lisp/progmodes/prolog.el: Avoid indenting too much, after ":-"
(prolog-smie-rules): Try and avoid indenting too far after ":-".
2015-10-09 15:30:27 -04:00
Eli Zaretskii
af45926d66 Update case-table and categories of recently added characters
* lisp/international/characters.el: Update information about Latin
Extended-C, Latin Extended-D, Latin Extended-E, Cyrillic Extended,
Georgian, Glagolitic, Deseret, Old Hungarian, and Warang Citi
blocks.  (Byug#21654)
2015-10-09 21:33:20 +03:00
Glenn Morris
4a1a98af55 ; Auto-commit of loaddefs files. 2015-10-09 06:18:27 -04:00
Martin Rudalics
e6013e8c8f In adjust_frame_size don't count minibuffer height twice (Bug#21643)
* src/frame.c (adjust_frame_size): In minibuffer-only windows
don't count minibuffer height twice.  (Bug#21643)
2015-10-09 11:55:06 +02:00
Eli Zaretskii
c4d8c6aaad Avoid inflooping in font-lock
* lisp/font-lock.el (font-lock-extend-region-wholelines): Bind
inhibit-field-text-motion around the call to
line-beginning-position, to avoid inflooping.  (Bug#21615)
2015-10-09 11:12:58 +03:00
Tassilo Horn
9a30d6b223 Refactor duplicated code; ensure default is in completions
* lisp/textmodes/reftex-cite.el (reftex--query-search-regexps): New function.
(reftex-extract-bib-entries): Use it.
(reftex-extract-bib-entries-from-thebibliography): Use it.
2015-10-09 09:58:22 +02:00
Vincent Belaïche
424072f752 Typo in example
* autotype.texi (Skeletons as Abbrevs): "if" -> "ifst" in the example.
2015-10-09 07:52:15 +02:00
Stefan Monnier
111cebc0c7 * lisp/calc/calc.el: Silence byte-compiler warnings
(calc-scan-for-dels): Use ignore-errors.
(calc-dispatch, calc-do-dispatch): Make unused arg optional.
(calc-read-key-sequence): Remove unused var `prompt2'.
(calc-kill-stack-buffer): Remove unused var `buflist'.
(calc): Remove unused var `oldbuf'.
(calc-refresh): Use inhibit-read-only.
(calc-can-abbrev-vectors): Declare.
(calc-record): Remove unused var `mainbuf'.
(math-sub-bignum): Remove unused var `sum'.
(math-svo-c, math-svo-wid, math-svo-off): Declare.
2015-10-08 22:25:38 -04:00
Daiki Ueno
b3154551bc Use g_clear_error instead of g_error_free
* src/image.c: Define g_clear_error instead of g_error_free.
(init_svg_functions): Resolve symbol g_clear_error instead of
g_error_free.
(svg_load_image): Use g_clear_error instead of g_error_free, to
suppress GLib warnings when ERR is not set.  See bug#21641.
2015-10-09 10:02:03 +09:00
Paul Eggert
a00634c209 * src/image.c (image_size_error): Simplify. 2015-10-08 13:54:33 -07:00
Paul Eggert
5a3a6aa71f Fix problems caught with --enable-gcc-warnings
* src/image.c (lookup_rgb_color):
* src/xfns.c (x_defined_color):
* src/xterm.c (x_parse_color):
Remove unused locals.
2015-10-08 13:43:02 -07:00
Jay Belanger
52fecf53e2 * lisp/calc/calc.el (calc-digit-start-entry): Fix typo. 2015-10-08 08:38:45 -05:00
Jay Belanger
2124b332a2 Format initial input uniformly.
* lisp/calc/calc.el (calc-digit-start-entry): New function.
* lisp/calc/calc.el (calcDigit-start):
* lisp/calc/calc-aent.el (calc-alg-digit-entry):
Use `calc-digit-start-entry' to format input.
2015-10-08 08:32:00 -05:00
Ken Raeburn
1f37714a11 Disable non-working pointerColor setting for X tooltip frame.
It generates a bunch of server traffic, but there's some bug wherein
the new mouse cursor settings don't seem to get used.  In most
situations the cursor isn't likely to be seen anyway, so it's not
urgent to fix.

* src/xfns.c (x_create_tip_frame): Don't set pointerColor.
2015-10-08 01:44:43 -04:00
Ken Raeburn
ee52942977 Reduce some unnecessary X calls.
* src/xfns.c (x_real_pos_and_offsets): Remove a redundant XGetGeometry
call.  If border width is wanted, get it from the XGetGeometry call
instead of calling XGetWindowAttributes on the same window.  Skip some
X calls if we've already detected an error from the X server.
* src/xterm.c (x_wm_supports): Delete x_sync before x_had_errors_p.
(handle_one_xevent): Delete XSync call before x_uncatch_errors.
2015-10-08 01:44:43 -04:00
Ken Raeburn
e23ed19ff9 Reduce color allocation/query traffic in the TrueColor case.
When working with an X visual with TrueColor class, pixel values can
be generated from the RGB values according to mask value provided by
the server on connection.  Some of the image-handling code was already
doing this.

* src/xterm.h (x_make_truecolor_pixel): New function; code taken from
lookup_rgb_color.
(x_mutable_colormap): New function.
* src/image.c (lookup_rgb_color): Move pixel composition code to
x_make_truecolor_pixel.
(x_kill_gs_process): Call x_mutable_colormap.
* src/xfaces.c (x_free_colors, x_free_dpy_colors): Call
x_mutable_colormap.
* src/xftfont.c (xftfont_get_colors): Call x_query_colors.
* src/xterm.c (x_query_colors): For a TrueColor display, decompose the
pixel value into RGB values directly, and don't send a request to the
server.
(x_alloc_nearest_color): For a TrueColor display, construct the pixel
value with x_make_truecolor_pixel.
(x_copy_color): For an immutable color map, just return the provided
pixel value.
2015-10-08 01:44:42 -04:00
Ken Raeburn
b8eea1d7b1 Cache XParseColor results in the X display info structure.
With repeated lookups of foreground and background colors for multiple
faces per frame, we issue a lot of redundant color name lookups to the
X server, waiting every time for the response.  On a remote network
with, say, 30ms round-trip time, this can add nearly a full second to
creation of a new frame.

* src/gtkutil.c (xg_check_special_colors): Call x_parse_color.
* src/image.c (get_spec_bg_or_alpha_as_argb):
(xpm_init_color_cache, xpm_lookup_color):
* src/xfns.c (x_defined_color):
* src/xterm.c (x_parse_color): New function; caches color names not
starting with "#" in the display-info structure.
(x_delete_display): Delete the cache content.
* src/xterm.h (struct color_name_cache_entry): New type.
(x_parse_color): Declare.
(struct x_display_info): Add a new field for the cache.
2015-10-08 01:19:49 -04:00
Stefan Monnier
0360b7f2c4 * src/syntax.c (syms_of_syntax): Make syntax-propertize--done local 2015-10-07 21:11:38 -04:00
Eli Zaretskii
c026c0016e Fix segfault in image_size_error
* src/image.c (image_size_error): Pass a Lisp string to
image_error, not a C string.  (Bug#21641)
2015-10-07 20:49:05 +03:00
Simen Heggestøyl
3cd29a5d15 Highlight CSS variable definitions
* lisp/textmodes/css-mode.el (css-nmstart-re): Tweak regexp to accept
CSS variables.  (Bug#21638)
2015-10-07 19:19:42 +02:00
Artur Malabarba
8a40c5a67e * test/automated/tabulated-list-test.el: New file
Test bug#21639 and some basic functionality.
2015-10-07 15:13:07 +01:00
Artur Malabarba
e60a1e2717 * lisp/emacs-lisp/tabulated-list.el (tabulated-list-sort):
Check if column can be sorted before trying.  (Bug#21639)
2015-10-07 15:13:07 +01:00
Nicolas Richard
9ed9b7dc95 Add test for `self-insert-command' (bug#21633)
* test/automated/cmds-tests.el: New file.
2015-10-07 15:09:19 +02:00
Martin Rudalics
391291f4b1 In resize_frame_windows don't set a top position when resizing horizontally.
* src/window.c (resize_frame_windows): Don't set root window's
top position when resizing horizontally.
2015-10-07 11:11:53 +02:00
Artur Malabarba
4d04cee060 * lisp/progmodes/prog-mode.el (prettify-symbols-alist):
Document more possible values.
2015-10-07 09:40:25 +01:00
Glenn Morris
96973dea40 ; * admin/MAINTAINERS: Remove no-longer-active people 2015-10-06 23:31:43 -07:00
Glenn Morris
78769755b9 ; * admin/MAINTAINERS: Copyedits. 2015-10-06 23:30:45 -07:00
Glenn Morris
2ad5109a75 ; * admin/MAINTAINERS: Remove "unmaintained" section; neither correct nor useful 2015-10-06 23:29:13 -07:00
Stefan Monnier
8528f7c9f1 * lisp/textmodes/tex-mode.el: Use lexical-binding 2015-10-06 22:57:53 -04:00
Stefan Monnier
f54e5ccfdb * lisp/indent.el (indent--default-inside-comment): New function
(indent-for-tab-command): Use it for `noindent' indentation.
2015-10-06 22:56:24 -04:00
Paul Eggert
3b4d119c40 Fix bug in GC_CHECK_MARKED_OBJECTS check
* src/alloc.c (mark_object): Fix bug in checking code.
When GC_CHECK_MARKED_OBJECTS is defined, the bug caused
CHECK_ALLOCATED_AND_LIVE_SYMBOL to repeatedly do the
CHECK_ALLOCATED and CHECK_LIVE tests for the first symbol in each
bucket.  The bug did not affect behavior either in the normal case
where GC_CHECK_MARKED_OBJECTS is not defined, or where Emacs does
not have an internal error that a properly-written
CHECK_ALLOCATED_AND_LIVE_SYMBOL would detect.
2015-10-06 13:34:18 -07:00