1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-15 17:00:26 +00:00
Commit Graph

117432 Commits

Author SHA1 Message Date
Eli Zaretskii
db61bdb139 Default to stack objects on DOS_NT platforms as well.
src/w32term.h (ALIGN_STACK) [__GNUC__]: Define to
 __attribute__((force_align_arg_pointer)) for GCC 4.2 and later.
 src/lisp.h (USE_STACK_LISP_OBJECTS): Remove the !DOS_NT condition.
 src/w32proc.c (enum_locale_fn, enum_codepage_fn): Add the
 ALIGN_STACK attribute.
 src/w32fns.c (w32_monitor_enum): Add the ALIGN_STACK attribute.
 src/w32uniscribe.c (add_opentype_font_name_to_list): Add the
 ALIGN_STACK attribute.
 src/w32font.c (add_font_name_to_list, add_font_entity_to_list)
 (add_one_font_entity_to_list): Add the ALIGN_STACK attribute.
2014-09-25 12:34:53 +03:00
Martin Rudalics
340e4cce7a Remove code left dead after 2014-07-27 changes.
* frame.c (frame_inhibit_resize):
* widget.c (EmacsFrameResize):
* window.c (resize_frame_windows, Fset_window_configuration):
* xdisp.c (expose_frame):
* xfns.c (x_change_tool_bar_height):
* xmenu.c (update_frame_menubar):
* xterm.c (handle_one_xevent, x_new_font, x_set_window_size_1):
Remove code left dead after 2014-07-27 changes.
2014-09-25 09:01:35 +02:00
Paul Eggert
2494447b71 * configure.ac (MAKEINFO): Allow 'makeinfo' to be called 'texi2any'. 2014-09-24 19:59:45 -07:00
Paul Eggert
10381f5894 Fix local_cons etc. to not exhaust the stack when in a loop.
Problem reported in:
http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00696.html
* buffer.c (Fother_buffer, other_buffer_safely, init_buffer):
* charset.c (load_charset_map_from_file, Ffind_charset_region)
(Ffind_charset_string):
* chartab.c (uniprop_encode_value_numeric, uniprop_table):
* data.c (wrong_range):
* editfns.c (Fpropertize, format2):
* emacs.c (init_cmdargs, decode_env_path):
* fileio.c (auto_save_error):
* fns.c (Fyes_or_no_p):
* font.c (font_style_to_value, font_parse_xlfd)
(font_parse_family_registry, font_delete_unmatched)
(font_add_log):
* fontset.c (Fset_fontset_font):
* frame.c (x_get_arg):
* keyboard.c (echo_dash, safe_run_hooks_error, parse_menu_item)
(read_char_minibuf_menu_prompt):
* keymap.c (silly_event_symbol_error, describe_vector):
* lread.c (load_warn_old_style_backquotes):
* menu.c (single_menu_item):
* minibuf.c (Fread_buffer):
* process.c (status_message, Fformat_network_address)
(server_accept_connection):
* textprop.c (copy_text_properties):
* xdisp.c (Fcurrent_bidi_paragraph_direction):
* xfns.c (x_default_scroll_bar_color_parameter):
* xfont.c (xfont_open):
* xselect.c (x_clipboard_manager_error_1):
* xterm.c (x_term_init):
Put USE_LOCAL_ALLOCA at the start of the function.
* fns.c (maybe_resize_hash_table): Use build_string instead of
build_local_string, since we'd otherwise need a conditional
USE_LOCAL_ALLOCA here, but this is just debugging output and is
not worth the bother of optimization.
* font.c (font_delete_unmatched): Remove by-hand code that
observed MAX_ALLOCA limit, since it's now done automatically.
* keymap.c (Fsingle_key_description): Put USE_SAFE_ALLOCA at top,
since build_local_string needs its sa_alloc.
* lisp.h (lisp_word_count): New function.
(SAFE_ALLOCA_LISP): Use it.
(USE_LOCAL_ALLOCA): New macro.
(local_cons, make_local_vector, make_local_string):
Observe the MAX_ALLOCA limit.
(LISP_STRING_OVERHEAD): New constant.
(make_local_string): Use it.
2014-09-24 19:01:14 -07:00
Paul Eggert
59355ea9ce Default to stack objects on non-GNU/Linux, non-DOS_NT platforms.
* lisp.h (USE_STACK_LISP_OBJECTS): Also default to true
if !defined DOS_NT && !defined GNU_LINUX.  I've tested this on AIX
and Solaris and it's likely to work on similar platforms.
2014-09-24 13:54:25 -07:00
Paul Eggert
203a9eb0ec Avoid signed integer overflow when converting Time to ptrdiff_t.
* keyboard.c (INPUT_EVENT_POS_MAX, INPUT_EVENT_POS_MIN):
New macros.
(position_to_Time, Time_to_position): New functions.
(gen_help_event, kbd_buffer_get_event): Use them.
* systime.h (Time) [emacs && !HAVE_X_WINDOWS]:
Go back to plain 'unsigned long', so that 'Time' is the same
for both X and non-X builds; this is less likely to cause surprise.
* termhooks.h: Remove compile-time check that Time and ptrdiff_t
are the same size; this is no longer required.
2014-09-24 13:30:28 -07:00
Stefan Monnier
0e176389a7 * lisp/find-cmd.el (find-cmd): Use grep's `find-program'.
Suggested by <lompik@voila.fr>.

Fixes: debbugs:18518
2014-09-24 15:23:13 -04:00
Paul Eggert
cd812613c8 * keyboard.c (make_lispy_event): Avoid unnecessary tests
of bit 28 and of whether an unsigned value is negative.
This simplifies the code a bit, and pacifies clang 3.4.
2014-09-24 11:25:04 -07:00
Ulf Jasper
558eb84ff9 Newsticker: Add commands to rearrange treeview groups and document them. (Bug#12560)
2014-09-24  Ulf Jasper  <ulf.jasper@web.de>

	* newsticker.texi: Reworked.  Document new treeview group
	commands.  Remove VERSION, UPDATED, use EMACSVER instead.  Use
	term 'feed reader'.

2014-09-24  Ulf Jasper  <ulf.jasper@web.de>

	* automated/newsticker-tests.el
	(newsticker--group-find-parent-group),
	(newsticker--group-do-rename-group): New tests.

2014-09-24  Ulf Jasper  <ulf.jasper@web.de>

	* net/newst-treeview.el (newsticker--treeview-do-get-node-by-id):
	Renamed `newsticker--treeview-do-get-node' to
	`newsticker--treeview-do-get-node-by-id'.
	(newsticker--treeview-get-node-by-id): Renamed
	`newsticker--treeview-get-node' to
	`newsticker--treeview-get-node-by-id'.
	(newsticker--treeview-get-current-node): Renamed `
	`newsticker--treeview-get-node' to
	`newsticker--treeview-get-node-by-id'.
	(newsticker--treeview-buffer-init)
	(newsticker--treeview-buffer-init): Disable buffer undo.
	(newsticker--treeview-unfold-node): Adapted to modified
	`newsticker--group-find-parent-group'.
	(newsticker--group-do-find-group): Renamed
	`newsticker--group-do-find-group-for-feed' to
	`newsticker--group-do-find-group'.  Now works for both, groups and
	feeds.
	(newsticker--group-find-parent-group): Renamed
	`newsticker--group-find-group-for-feed' to
	`newsticker--group-find-parent-group'.  Now works for both, groups
	and feeds.
	(newsticker--group-do-get-parent-group)
	(newsticker--group-get-parent-group): Removed.
	(newsticker-group-add-group): Changed interactive prompts.
	(newsticker-group-add-group): Finally jump to added group.
	(newsticker-group-delete-group): Finally jump to current feed.
	(newsticker--group-do-rename-group, newsticker-group-rename-group)
	(newsticker--get-group-names, newsticker--group-names): New.
	(newsticker-group-move-feed): Finally jump to moved feed.
	(newsticker-group-shift-feed-down, newsticker-group-shift-feed-up)
	(newsticker-group-shift-group-down)
	(newsticker-group-shift-group-up, newsticker--group-shift): New
	(newsticker--group-manage-orphan-feeds): Renamed
	`newsticker--group-find-group-for-feed' to
	`newsticker--group-find-parent-group'.
	(newsticker-treeview-mode-map): New keybindings for new shift commands.
	(newsticker-treeview-tree-do-click): Renamed
	`newsticker--treeview-get-node' to
	`newsticker--treeview-get-node-by-id'.

	* net/newst-backend.el (newsticker--item-list)
	(newsticker--item-position, newsticker--prev-message)
	(newsticker--scrollable-text): Moved to newst-ticker.el.

	* net/newst-ticker.el (newsticker--item-list)
	(newsticker--item-position, newsticker--prev-message)
	(newsticker--scrollable-text): Moved from newst-backend.el.
2014-09-24 19:33:54 +02:00
Ken Brown
cb61706445 * lisp.h (toplevel) [!USE_STACK_LISP_OBJECTS]: Fix poorly nested
conditions (Bug#18544).
2014-09-24 17:42:42 +04:00
Dmitry Antipov
e9a86416c6 * lisp.h (USE_STACK_LISP_OBJECTS): Enable by default if GNU_LINUX
&& __GNUC__ && !__clang__.  Mention known problems.  Adjust comment.
2014-09-24 15:59:13 +04:00
Dmitry Antipov
c0b1b03715 * chartab.c (uniprop_encode_value_numeric):
* font.c (font_style_to_value): Use make_local_vector.
(font_delete_unmatched): Use local_cons but respect MAX_ALLOCA.
* keymap.c (append_key): Use scoped_list1.
2014-09-24 15:11:14 +04:00
Eli Zaretskii
d4dfe4ea85 Fix fallout on MinGW64 from the previous commit.
src/systime.h (Time): Define as size_t, to be consistent with 64-bit
 Windows builds, where 'long' is a 32-bit type.
 src/w32inevt.h (w32_console_mouse_position): Update the argument
 types to use 'Time'.
 src/w32term.c (w32_mouse_position)
 (x_horizontal_scroll_bar_report_motion)
 (x_scroll_bar_report_motion): Update the argument types to use
 'Time'.
2014-09-24 13:06:53 +03:00
Dmitry Antipov
4b930ccbb4 * termhooks.h (enum scroll_bar_part): Begin from 0 to allow...
(struct input_event): ...unsigned bitfields.  Likewise for
`event_kind' member.  Prefer unsigned for `code' and 'modifiers'.
Use `timestamp' for HELP_EVENT position.  Add compile-time assert.
* keyboard.c (gen_help_event, kbd_buffer_store_help_event)
(kbd_buffer_get_event): Adjust users.
(scroll_bar_parts): Add Qnil to match scroll_bar_nowhere.
(make_scroll_bar_position): New function, refactored out of...
(make_lispy_event): ...adjusted user.
* nsterm.h (EmacsScroller): Use enum for `last_hit_part' member.
* nsterm.m (ns_mouse_position, mouseUp):
* term.c (term_mouse_position):
* w32inevt.c (w32_console_mouse_position):
* w32term.c (w32_mouse_position):
* xterm.c (XTmouse_position): Use scroll_bar_above_handle.
(x_send_scroll_bar_event, xm_scroll_callback, xg_scroll_callback):
Prefer enum and explicit enum members to integers and numeric values.
2014-09-24 11:17:51 +04:00
Paul Eggert
4620e6bccd Fix some slow uses and misuses of strcat.
* doc.c (get_doc_string):
* gtkutil.c (get_utf8_string):
* xsmfns.c (x_session_initialize):
Avoid recomputation of string length.
* ftfont.c (ftfont_spec_pattern):
* xfns.c (xic_create_fontsetname):
Don't assume output buffer is initially zero.
2014-09-23 21:12:37 -07:00
Paul Eggert
7d760fd8f4 movemail: don't dump core if the current time is outlandish
* movemail.c (popmail): Check for mbx_delimit_begin failure.
(mbx_delimit_begin): Fail if the current time is so outlandish
that localtime would fail or asctime would have undefined
behavior.  Use strftime to avoid asctime undefined behavior.
2014-09-23 12:21:54 -07:00
Paul Eggert
dac5be10f3 Merge from gnulib.
This incorporates:
2014-09-11 fcntl-h: fix compilation with Intel C++ compiler
2014-09-04 pthread, pthread_sigmask, threadlib: port to Ubuntu 14.04
2014-09-23 11:20:38 -07:00
Paul Eggert
97914756e8 * lisp.h (lispstpcpy): Rename from lispstrcpy, and act like stpcpy.
All callers changed.
* xterm.c (x_term_init): Use new functionality to avoid two needs
to compute a string length.
2014-09-23 10:03:48 -07:00
Paul Eggert
ccc7be94d7 * dispextern.h, xdisp.c (window_box_right_offset): Now static. 2014-09-23 09:07:23 -07:00
Dmitry Antipov
59e10fbd93 Use known length of a Lisp string to copy it faster.
* lisp.h (lispstrcpy): New function.  Add comment.
* callproc.c (child_setup):
* dbusbind.c (xd_append_arg):
* doc.c (get_doc_string):
* font.c (Ffont_xlfd_name):
* frame.c (xrdb_get_resource):
* process.c (Fmake_network_process, network_interface_info):
* w32fns.c (Fx_open_connection):
* w32proc.c (sys_spawnve):
* xfns.c (select_visual):
* xfont.c (xfont_list):
* xsmfns.c (x_session_initialize):
* xterm.c (x_term_init): Use it.
2014-09-23 19:49:00 +04:00
Glenn Morris
c03d2c89fb Auto-commit of loaddefs files. 2014-09-23 06:21:30 -04:00
Paul Eggert
cb8e2bfba7 Fix SAFE_ALLOCA to not exhaust the stack when in a loop.
Problem reported by Dmietry Antipov in thread leading to:
http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00713.html
This patch fixes only SAFE_ALLOCA, SAFE_NALLOCA, and SAFE_ALLOCA_LISP;
the experimental local_* macros enabled by USE_LOCAL_ALLOCATORS
remain unfixed.
* callproc.c (call_process): Save and restore sa_avail.
* lisp.h (USE_SAFE_ALLOCA): Define sa_avail.
(AVAIL_ALLOCA): New macro.
(SAFE_ALLOCA, SAFE_NALLOCA, SAFE_ALLOCA_LISP):
Use it, and check against sa_avail rather than MAX_ALLOCA.
2014-09-22 22:42:47 -07:00
Stefan Monnier
9949231fb0 Merge from emacs-24 2014-09-22 15:20:45 -04:00
Sam Steingold
298dfce8ac oops 2014-09-22 15:19:29 -04:00
Sam Steingold
7fc340b270 (sql-execute): Use `special-mode'.
* sql.el (sql-execute): Use `special-mode'.
2014-09-22 15:18:29 -04:00
Sam Steingold
edf16c3783 (sql-product-alist): Improve the Vertica entry.
* lisp/progmodes/sql.el (sql-product-alist): Improve the Vertica entry.
2014-09-22 15:17:40 -04:00
Stefan Monnier
6b33c17c85 Add pcase-defmacro, as well as quote' and app' patterns.
* loadup.el: Increase max-lisp-eval-depth when macroexpanding macroexp.
* emacs-lisp/pcase.el: Allow (F . ARGS) in `app' patterns.
(pcase--funcall, pcase--eval): New functions.
(pcase--u1): Use them for guard, pred, let, and app.
(\`): Use the new feature to generate better code for vector patterns.
* emacs-lisp/pcase.el: Use pcase-defmacro to handle backquote.
(pcase--upat): Remove.
(pcase--macroexpand): Don't hardcode handling of `.
(pcase--split-consp, pcase--split-vector): Remove.
(pcase--split-equal): Disregard ` since it's expanded away.
(pcase--split-member): Optimize for quote rather than for `.
(pcase--split-pred): Optimize for quote rather than for `.
(pcase--u1): Remove handling of ` (and of `or' and `and').
Quote non-selfquoting values when passing them to `eq'.
Drop `app's let-binding if the variable is not used.
(pcase--q1): Remove.
(`): Define as a pattern macro.
* emacs-lisp/pcase.el (pcase--match): New smart-constructor function.
(pcase--expand pcase--q1, pcase--app-subst-match): Use it.
(pcase--macroexpand): Handle self-quoting patterns here, expand them to
quote patterns.
(pcase--split-match): Don't hoist or/and here any more.
(pcase--split-equal): Optimize quote patterns as well as ` patterns.
(pcase--flip): New helper macro.
(pcase--u1): Optimize the memq case directly.
Don't handle neither self-quoting nor and/or patterns any more.
* emacs-lisp/pcase.el (pcase-defmacro): New macro.
(pcase--macroexpand): New function.
(pcase--expand): Use it.
* emacs-lisp/pcase.el (pcase--app-subst-match, pcase--app-subst-rest):
New optimization functions.
(pcase--u1): Add support for `quote' and `app'.
(pcase): Document them in the docstring.
2014-09-22 14:22:02 -04:00
Stefan Monnier
f8b25a5169 * lisp/loadup.el: Increase max-lisp-eval-depth while macroexpanding macroexp. 2014-09-22 14:17:27 -04:00
Stefan Monnier
2b968ea662 * lisp/emacs-lisp/pcase.el: Allow (F . ARGS) in `app' patterns.
(pcase--funcall, pcase--eval): New functions.
(pcase--u1): Use them for guard, pred, let, and app.
(\`): Use the new feature to generate better code for vector patterns.
2014-09-22 14:05:22 -04:00
Stefan Monnier
7fbd780a00 * lisp/emacs-lisp/pcase.el: Use pcase-defmacro to handle backquote.
(pcase--upat): Remove.
(pcase--macroexpand): Don't hardcode handling of `.
(pcase--split-consp, pcase--split-vector): Remove.
(pcase--split-equal): Disregard ` since it's expanded away.
(pcase--split-member): Optimize for quote rather than for `.
(pcase--split-pred): Optimize for quote rather than for `.
(pcase--u1): Remove handling of ` (and of `or' and `and').
Quote non-selfquoting values when passing them to `eq'.
Drop `app's let-binding if the variable is not used.
(pcase--q1): Remove.
(`): Define as a pattern macro.
2014-09-22 13:24:46 -04:00
Stefan Monnier
1a6255532e * lisp/emacs-lisp/pcase.el (pcase--match): New smart-constructor function.
(pcase--expand pcase--q1, pcase--app-subst-match): Use it.
(pcase--macroexpand): Handle self-quoting patterns here, expand them to
quote patterns.
(pcase--split-match): Don't hoist or/and here any more.
(pcase--split-equal): Optimize quote patterns as well as ` patterns.
(pcase--flip): New helper macro.
(pcase--u1): Optimize the memq case directly.
Don't handle neither self-quoting nor and/or patterns any more.
2014-09-22 12:22:50 -04:00
Stefan Monnier
536cda1f84 * lisp/emacs-lisp/pcase.el (pcase-defmacro): New macro.
(pcase--macroexpand): New function.
(pcase--expand): Use it.
2014-09-22 11:04:12 -04:00
Eli Zaretskii
f11af8a48c Fix bug #18516 with SIGSEGV in expand-file-name.
src/fileio.c (Fexpand_file_name) [DOS_NT]: Make sure newdirlim is
 always set to a valid value.  Make sure the size passed to alloca
 is always positive.
2014-09-22 17:37:22 +03:00
Stefan Monnier
13b1840d23 Add support for quote' and app'.
* lisp/emacs-lisp/pcase.el (pcase--app-subst-match, pcase--app-subst-rest):
New optimization functions.
(pcase--u1): Add support for `quote' and `app'.
(pcase): Document them in the docstring.
2014-09-22 10:30:47 -04:00
Stefan Monnier
601a0cfe86 Use lexical-bindin in Ibuffer.
* lisp/ibuffer.el (ibuffer-do-toggle-read-only): `arg' is unused.
(ibuffer-compile-format): Simplify.
(ibuffer-clear-summary-columns): Simplify.
* lisp/ibuf-ext.el (ibuffer-generate-filter-groups): Don't use the third
elem of dotimes when we don't refer to the iteration var from it.
(ibuffer-toggle-sorting-mode): Avoid add-to-list.
* lisp/ibuf-macs.el (define-ibuffer-column, define-ibuffer-op):
Silence byte-compiler.
2014-09-22 10:10:53 -04:00
Stefan Monnier
efd314de55 * lisp/font-lock.el (font-lock-compile-keyword): Don't confuse a lambda
expression for a list.
2014-09-22 09:52:06 -04:00
Stefan Monnier
55fa245f37 * lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Don't add fundoc usage
for functions with no arguments.
2014-09-22 09:47:47 -04:00
Stefan Monnier
84a87ab505 * lisp/mpc.el (mpc-data-directory): Use locate-user-emacs-file.
(mpc-volume-refresh): Make sure the corresponding header-line is updated.
(mpc-songs-jump-to, mpc-play): Use user-error.
2014-09-22 09:42:57 -04:00
Dmitry Antipov
99c3fad7d4 Avoid extra call to oblookup when interning symbols.
* lisp.h (intern_driver): Add prototype.
* lread.c (intern_driver): New function.
(intern1, intern_c_string_1, Fintern):
* font.c (font_intern_prop):
* w32font.c (intern_font_name): Use it.
2014-09-22 10:06:19 +04:00
Dmitry Antipov
fc5ebc3f49 On OSX, do not free font-specific data more than once (Bug#18501).
* macfont.m (macfont_close): Release and free font-specific data
only if it wasn't previously freed.
2014-09-22 09:34:05 +04:00
Paul Eggert
f135e94e4e Minor improvements to new stack-allocated Lisp objects.
* frame.h (FRAME_PARAMETER):
Prefer scoped_list1 to local_list1 where either would do.
* lisp.h (scoped_list4): New macro.
(local_cons, local_list1, local_list2, local_list3, local_list4)
(make_local_vector, make_local_string, build_local_string):
Prefer functions to macros where either would do.
* xdisp.c (build_desired_tool_bar_string):
Prefer scoped_list4 to local_list4 where either would do.
2014-09-21 15:49:24 -07:00
Tom Willemse
91953c1187 * lisp/simple.el (clone-indirect-buffer): Mention the return value.
Fixes: debbugs:18478
2014-09-21 18:09:40 -04:00
Tom Willemse
f5fafeef5d * lisp/progmodes/prog-mode.el (prog-mode-hook): Replace reference to
Text mode in docstring.

Fixes: debbugs:18464
2014-09-21 18:07:26 -04:00
Stefan Monnier
40aef37804 * lisp/progmodes/perl-mode.el (perl-syntax-propertize-function):
Accept underscores in identifiers after "sub".

Fixes: debbugs:18502
2014-09-21 18:00:28 -04:00
David Caldwell
63126683db * configure.ac: Increase headerpad_extra to 1000, update the comment
about load commands.

* src/unexmacosx.c (dump_it): Improve error message.

Fixes: debbugs:18505
2014-09-21 22:35:22 +02:00
Glenn Morris
057ba71703 Auto-commit of loaddefs files. 2014-09-21 06:22:38 -04:00
Tassilo Horn
09973863ea Use font-lock-face property; derive from special-mode
* lisp/textmodes/reftex-sel.el (reftex-select-label-mode)
(reftex-select-bib-mode, reftex-insert-docstruct): Derive modes
from special-mode (instead of fundamental-mode) and propertize
with font-lock-face instead of just face.

* lisp/textmodes/reftex-toc.el (reftex-toc-mode, reftex-toc): Ditto.

Fixes: debbugs:18496
2014-09-21 11:34:02 +02:00
Dmitry Gutov
a58c2690db * lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Don't use
`lisp--local-variables-completion-table' in the `lisp--form-quoted-p'
case.
2014-09-19 21:33:11 +04:00
Dmitry Gutov
3907574bb8 Fix bug#18265
* lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Only calculate
`table-etc' when `end' is non-nil.
(lisp-completion-at-point): Move `end' back if it's after quote.
If in comment or string, only complete when after backquote.
2014-09-19 07:41:42 +04:00
Dmitry Gutov
30c17da5df * lisp/emacs-lisp/lisp.el (lisp-completion-at-point): Only calculate
`table-etc' when `end' is non-nil.
2014-09-19 07:28:31 +04:00