1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-27 10:54:40 +00:00
Commit Graph

117549 Commits

Author SHA1 Message Date
Paul Eggert
56c6a28d01 * progmodes/grep.el (grep-regexp-alist): Use more-accurate regexp.
Do not match file names that end in '/', as they cannot be 'grep'
hits nowadays.  This prevents confusion when 'grep -r' reports a
match in a file whose basename is ':12345:'.  Conversely, do not
require exactly the same sequence of spaces and tabs after both
colons, and allow spaces or tabs before the second colon, as per
the POSIX spec for 'grep' output.
2014-09-26 11:32:48 -07:00
Paul Eggert
1f9f052c6d * xfns.c (x_default_scroll_bar_color_parameter):
Use USE_LOCAL_ALLOCA only if USE_TOOLKIT_SCROLL_BARS,
to pacify --enable-gcc-warnings in non-scrollbar builds.
2014-09-26 09:49:10 -07:00
Kelvin White
c575c0509a Regression fix - #bug18551 2014-09-26 09:22:47 -04:00
Kelvin White
53c0a1e9d7 erc.el: Fix regression - Bug #18551 2014-09-26 09:05:28 -04:00
Ken Brown
2416926025 src/w32term.h (ALIGN_STACK): Fix the cpp condition. 2014-09-26 10:06:35 +03:00
Leo Liu
d73f2d856c * emacs-lisp/cl-extra.el (cl-parse-integer): Fix last change. 2014-09-26 10:01:17 +08:00
Leo Liu
89b354a55e Add cl-parse-integer based on parse-integer
* doc/misc/cl.texi (Predicates on Numbers): Document cl-digit-char-p.
(Numerical Functions): Document cl-parse-integer. 

* lisp/calendar/parse-time.el (parse-time-digits): Remove.
(digit-char-p, parse-integer) Moved to cl-lib.el.
(parse-time-tokenize, parse-time-rules, parse-time-string): Use
cl-parse-integer.

* lisp/emacs-lisp/cl-extra.el (cl-parse-integer): New function.

* lisp/emacs-lisp/cl-lib.el (cl-digit-char-table): New var.
(cl-digit-char-p): New function.

* test/automated/cl-lib.el (cl-digit-char-p, cl-parse-integer): New
tests.

Fixes: debbugs:18557
2014-09-26 08:15:21 +08:00
Juri Linkov
b8e352d077 * lisp/vc/add-log.el (change-log-next-buffer): Don't create an empty
buffer "ChangeLog" when the current buffer doesn't match ChangeLog.[0-9].
Return the current buffer if no files match the default pattern
ChangeLog.[0-9].  Signal "end of multi" when file is nil.

Fixes: debbugs:18547
2014-09-25 23:55:58 +03:00
Eli Zaretskii
686b21966f Don't use USE_STACK_LISP_OBJECTS on Windows with GCC older than 4.2.
src/lisp.h (USE_STACK_LISP_OBJECTS): Default to false for 32-bit
 MinGW builds that use GCC before 4.2.

Fixes: debbugs:18559
2014-09-25 20:49:02 +03:00
Eli Zaretskii
39234ddb3e src/w32term.h (ALIGN_STACK): Fix a typo in last commit.
Fixes: debbugs:18559
2014-09-25 20:28:48 +03:00
Kelvin White
685460246c Follow Emacs versioning 2014-09-25 10:07:30 -04:00
Stefan Monnier
80067ccf79 * lisp/net/tramp-sh.el (tramp-sh-handle-vc-registered): Don't modify
the global vc-handled-backends.

Fixes: debbugs:18535
2014-09-25 09:07:28 -04:00
Dmitry Antipov
90b6baabea * xterm.c (x_new_font): Fix typo introduced by the recent dead code removal. 2014-09-25 15:16:25 +04:00
Dmitry Antipov
730c89f90f * lisp.h (toplevel): Adjust comment around USE_STACK_LISP_OBJECTS. 2014-09-25 14:24:57 +04:00
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
Stefan Monnier
38353b99f3 * lisp/erc/erc-track.el (erc-modified-channels-display): Update all mode lines
if needed.  Remove call to erc-modified-channels-object
where we ignored the return value.
(erc-modified-channels-update): Don't force-mode-line-update here any more.

Fixes: debbugs:18510
2014-09-24 13:31:59 -04:00
Stefan Monnier
5217cd83c0 * etc/package-keyring.gpg: New file. 2014-09-24 10:28:27 -04: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
Eli Zaretskii
a45a7f5d1a Fix bug #18528 with crashes at startup during frameset restoration.
src/w32term.c (w32_read_socket): Don't use frame dimensions for
 resizing if GetClientRect returned an empty (0, 0, 0, 0)
 rectangle.  Check the return value of GetClientRect, and don't use
 the results if it didn't succeed.
 src/dispnew.c (change_frame_size_1): Recompute the frame dimensions
 in columns and lines after correcting the pixel dimensions in
 check_frame_size.
 (adjust_decode_mode_spec_buffer): Add assertion to avoid passing
 negative values to xrealloc.
2014-09-24 10:31:11 +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