]> git.eshelyaron.com Git - emacs.git/log
emacs.git
9 years agoIn update_frame_menubar remove garbaged code.
Martin Rudalics [Wed, 14 Jan 2015 14:47:19 +0000 (15:47 +0100)]
In update_frame_menubar remove garbaged code.

* xmenu.c (update_frame_menubar): Remove garbaged code.

9 years ago* lisp/net/eww.el: Use lexical-binding.
Stefan Monnier [Mon, 12 Jan 2015 18:07:52 +0000 (13:07 -0500)]
* lisp/net/eww.el: Use lexical-binding.

(eww-links-at-point): Remove unused arg.
(eww-mode-map): Inherit from special-mode-map.
(eww-mode): Derive from special-mode.  Don't use `setq' on a hook.

9 years agoNever move gap in make_buffer_string_both.
Dmitry Antipov [Wed, 14 Jan 2015 12:56:46 +0000 (15:56 +0300)]
Never move gap in make_buffer_string_both.

* editfns.c (make_buffer_string_both): If requested range intersects
the gap, don't move the latter but copy in two regions, thus avoiding
unnecessary relocation of buffer data.

9 years agoFix last time zone handling change.
Dmitry Antipov [Wed, 14 Jan 2015 10:05:17 +0000 (13:05 +0300)]
Fix last time zone handling change.

* editfns.c (decode_time_zone): Return Lisp string instead.
All related users changed.

9 years agoConsistently handle time zone specification.
Dmitry Antipov [Wed, 14 Jan 2015 09:43:43 +0000 (12:43 +0300)]
Consistently handle time zone specification.

* editfns.c (decode_time_zone): New function, refactored out from ...
(Fencode_time): ... adjusted user.
(Fset_time_zone_rule): Use decode_time_zone.

9 years agoremove_slash_colon need not be inline
Paul Eggert [Wed, 14 Jan 2015 08:42:15 +0000 (00:42 -0800)]
remove_slash_colon need not be inline

* process.c, process.h (remove_slash_colon): No longer inline.
This saves text bytes without hurting runtime performance.

9 years agoConsolidate common path transformation code.
Dmitry Antipov [Wed, 14 Jan 2015 07:08:44 +0000 (10:08 +0300)]
Consolidate common path transformation code.

* process.h (remove_slash_colon): New function.
* callproc.c (encode_current_directory, call_process):
* process.c (Fstart_process): Use it.

9 years agoAvoid extra multibyteness check in ENCODE_FILE users.
Dmitry Antipov [Wed, 14 Jan 2015 06:50:39 +0000 (09:50 +0300)]
Avoid extra multibyteness check in ENCODE_FILE users.

* callproc.c (encode_current_directory, Fcall_process, call_process):
* dired.c (directory_files_internal, file_name_completion):
Do not check for STRING_MULTIBYTE because encode_file_name
is a no-op for unibyte strings.

9 years agoUse bool for boolean in xmenu.c, xml.c
Paul Eggert [Wed, 14 Jan 2015 05:19:40 +0000 (21:19 -0800)]
Use bool for boolean in xmenu.c, xml.c

* xmenu.c (x_menu_set_in_use, popup_get_selection)
(Fx_menu_bar_open_internal, popup_widget_loop)
(x_activate_menubar, xg_crazy_callback_abort)
(update_frame_menubar, set_frame_menubar)
(initialize_frame_menubar, free_frame_menubar)
(create_and_show_popup_menu, x_menu_show)
(create_and_show_dialog, x_dialog_show):
* xml.c (libxml2_loaded_p, init_libxml2_functions, parse_region)
(Flibxml_parse_html_region, Flibxml_parse_xml_region):
* xrdb.c (main) [TESTRM]:
* xsettings.c (init_gsettings):
* xterm.c (XFillRectangle, xg_scroll_callback)
(xg_end_scroll_callback):
* xterm.h (x_menu_set_in_use) [USE_GTK || USE_MOTIF]:
Use bool for boolean.
* xmenu.c (TRUE): Remove; no longer used.
(show_help_event): Remove long-unused code.
(set_frame_menubar): Remove "#if 1" and corresponding "#endif" lines.

9 years agoDon't say Fnext_read_file_uses_dialog_p is const
Paul Eggert [Tue, 13 Jan 2015 23:22:19 +0000 (15:22 -0800)]
Don't say Fnext_read_file_uses_dialog_p is const

It's const only if a windowing system is not used; don't say it's
const otherwise.  See:
http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00310.html
* lib-src/make-docfile.c (write_globals):
Add a special hack for Fnext_read_file_uses_dialog_p.
* src/fileio.c (next_read_file_uses_dialog_p): Remove.
Move guts back to ...
(Fnext_read_file_uses_dialog_p): ... here.
Don't declare as const, as make-docfile.c now has a special case
for this function.  This is an ugly hack, but it's better than
lying to the compiler.

9 years agoRemove now-unnecessary forward XTYPE decl
Paul Eggert [Tue, 13 Jan 2015 22:04:23 +0000 (14:04 -0800)]
Remove now-unnecessary forward XTYPE decl

* lisp.h (XTYPE): Remove forward declaration.  The recent merge
from emacs-24 fixed the problem in a better way, by moving XPNTR's
definition to after XTYPE's.

9 years agoFix problems with 32-bit wide-int build exposed by MinGW
Eli Zaretskii [Tue, 13 Jan 2015 17:16:51 +0000 (19:16 +0200)]
Fix problems with 32-bit wide-int build exposed by MinGW

 lisp.h (XPNTR): Move definition to after XTYPE, to avoid
 compilation error in an unoptimized build when !USE_LSB_TAG.
 src/w32heap.c (DUMPED_HEAP_SIZE): For 32-bit wide-int build, use the
 same larger value as for the 64-bit build.
 src/w32term.h (SCROLL_BAR_PACK): Cast the result to UINT_PTR to
 avoid compiler warnings.
 src/w32proc.c (Fw32_get_codepage_charset, Fw32_set_keyboard_layout):
 Avoid compiler warnings about cast from integer to pointer of
 different size.
 src/w32menu.c (menubar_selection_callback, w32_menu_show): Cast to
 UINT_PTR instead of EMACS_INT, to avoid compiler warnings about
 casting from integer to pointer of different size.
 (add_menu_item): Pass the help-echo string as a pointer to
 Lisp_String, not as a Lisp_Object.
 (w32_menu_display_help): Use make_lisp_ptr to reconstruct a Lisp
 string object from its C pointer.
 src/w32fns.c (w32_msg_pump) <WM_EMACS_UNREGISTER_HOT_KEY>: Use
 make_lisp_ptr instead of XIL, to reconstruct a Lisp_Cons from its
 C pointer.
 <WM_EMACS_TOGGLE_LOCK_KEY>: msg.lparam is now a C integer.
 (Fx_create_frame): Type-cast the result of XFASTINT to avoild
 compiler warnings about size differences.
 (Fw32_unregister_hot_key): Pass the tail of w32_grabbed_keys as a
 pointer to a Lisp_Cons struct, not as a disguised EMACS_INT.
 (Fw32_toggle_lock_key): Pass the new state of the key as a C
 integer; use -1 for nil.  Doc fix.
 src/.gdbinit (xgetsym): New subroutine.
 (xsymname, xsymbol): Use it.
 (xprintsym): No need to call xgetptr.

9 years agoAllow compilation during loading of Modes derived from a CC Mode mode.
Alan Mackenzie [Tue, 13 Jan 2015 15:39:36 +0000 (15:39 +0000)]
Allow compilation during loading of Modes derived from a CC Mode mode.
Fixes debbugs#19206.

cc-bytecomp.el (cc-bytecomp-compiling-or-loading): new function which
walks the stack to discover whether we're compiling or loading.
(cc-bytecomp-is-compiling): Reformulate, and move towards beginning.
(cc-bytecomp-is-loading): New defsubst.
(cc-bytecomp-setup-environment, cc-bytecomp-restore-environment): Use
the
above defsubsts.
(cc-require-when-compile, cc-bytecomp-defvar)
(cc-bytecomp-defun): Simplify conditionals.

cc-defs.el (cc-bytecomp-compiling-or-loading): "Borrow" this function
from cc-bytecomp.el.
(c-get-current-file): Reformulate using the above.
(c-lang-defconst): Prevent duplicate entries of file names in a symbol's
'source property.
(c-lang-const): Use cc-bytecomp-is-compiling.

cc-langs.el (c-make-init-lang-vars-fun): Use cc-bytecomp-is-compiling.

9 years agoFixes: debbugs:19552
Stefan Monnier [Tue, 13 Jan 2015 15:17:44 +0000 (10:17 -0500)]
Fixes: debbugs:19552
* lisp/emacs-lisp/eieio-core.el (eieio-defclass): Fix call to `defclass'.

9 years agoMake Fnext_read_file_uses_dialog_p compatible with recent DEFUN change.
Dmitry Antipov [Tue, 13 Jan 2015 10:08:32 +0000 (13:08 +0300)]
Make Fnext_read_file_uses_dialog_p compatible with recent DEFUN change.

* fileio.c (next_read_file_uses_dialog_p): New workaround ...
(Fnext_read_file_uses_dialog_p): ... called from here to avoid
ATTRIBUTE_CONST dependency from #ifdefs.  For details, see
http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00289.html.

9 years agoIn adjust_frame_size don't return too early after font size change.
Martin Rudalics [Tue, 13 Jan 2015 08:10:05 +0000 (09:10 +0100)]
In adjust_frame_size don't return too early after font size change.

* frame.c (adjust_frame_size): Make sure new numbers of
lines/columns get installed after font size change (Bug#19575).

9 years agoConsolidate duplicated string matching code.
Dmitry Antipov [Tue, 13 Jan 2015 04:08:54 +0000 (07:08 +0300)]
Consolidate duplicated string matching code.

* search.c (fast_string_match_internal): New function,
consolidated from...
(fast_string_match, fast_string_match_ignore_case): ...functions
which are...
* lisp.h (fast_string_match, fast_string_match_ignore_case):
inlined from here now.
(fast_string_match_internal): Add prototype.
* dired.c (file_name_completion): Use fast_string_match_internal.

9 years agoSupport const and noreturn DEFUN attributes.
Dmitry Antipov [Tue, 13 Jan 2015 03:39:45 +0000 (06:39 +0300)]
Support const and noreturn DEFUN attributes.

* lib-src/make-docfile.c (struct global): New field 'flags'.
(DEFUN_noreturn, DEFUN_const): New enum bitfields.
(add_global): Now return pointer to global.
(write_globals): Add _Noreturn and ATTRIBUTE_CONST attributes
if requested by global's flags.
(stream_match): New function.
(scan_c_stream): Recognize 'attributes:' of DEFUN.

* src/callint.c (Finteractive):
* src/character.c (Fcharacterp, Fmax_char):
* src.data.c (Feq, Fnull, Fconsp, Fatom, Flistp, Fnlistp, Fsymbolp)
(Fstringp, Fchar_or_string_p, Fintegerp, Fnatnump, Fnumberp)
(Ffloatp, Fbyteorder):
* src/decompress.c (Fzlib_available_p):
* src/fns.c (Fidentity):
* src/frame.c (Fframe_windows_min_size):
* src/gnutls.c (Fgnutls_error_p, Fgnutls_available_p):
* src/window.c (Fwindow__sanitize_window_sizes):
* src/xdisp.c (Ftool_bar_height):
* src/xfaces.c (Fface_attribute_relative_p): Add const attribute.
* src/emacs.c (Fkill_emacs):
* src/eval.c (Fthrow):
* src/keyboard.c (Ftop_level, Fexit_recursive_edit)
(Fabor_recursive_edit): Add noreturn attribute.

9 years agoDon't eagerly load xref
Dmitry Gutov [Tue, 13 Jan 2015 03:06:15 +0000 (06:06 +0300)]
Don't eagerly load xref

Fixes: debbugs:19554
* lisp/menu-bar.el (menu-bar-goto-menu): Before calling
`xref-marker-stack-empty-p', first check that `xref' is loaded.

9 years agoPort to 32-bit MingGW --with-wide-int
Paul Eggert [Mon, 12 Jan 2015 19:26:06 +0000 (11:26 -0800)]
Port to 32-bit MingGW --with-wide-int

Problem reported by Eli Zaretskii in:
http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00265.html
* lisp.h (struct Lisp_Sub_Char_Table): Check that offset matches
what we think it is, rather than checking only its alignment (and
doing so incorrectly on MinGW).

9 years agoAdd autoload cookie for xref-marker-stack-empty-p (Bug#19554).
Martin Rudalics [Mon, 12 Jan 2015 17:26:39 +0000 (18:26 +0100)]
Add autoload cookie for xref-marker-stack-empty-p (Bug#19554).

* progmodes/xref.el (xref-marker-stack-empty-p): Add autoload
cookie (Bug#19554).

9 years agoMiscellaneous tiny fixes here and there.
Dmitry Antipov [Mon, 12 Jan 2015 17:14:43 +0000 (20:14 +0300)]
Miscellaneous tiny fixes here and there.

* fileio.c (Ffile_name_as_directory, Fdirectory_file_name):
Remove dead NILP check.
* image.c (Flookup_image): Use regular format for docstring.
* keyboard.c (apply_modifiers_uncached): Use stpcpy.

9 years agoAdjust frame heights to real height of tool bar.
Martin Rudalics [Mon, 12 Jan 2015 07:18:00 +0000 (08:18 +0100)]
Adjust frame heights to real height of tool bar.

* frame.el (frame-notice-user-settings): Remove code dealing with
frame-initial-frame-tool-bar-height.  Turn off `tool-bar-mode'
only if `window-system-frame-alist' or `default-frame-alist' ask
for it.
(make-frame): Update frame-adjust-size-history if needed.
* dispnew.c (change_frame_size_1): Pass Qchange_frame_size to
adjust_frame_size.
* frame.c (frame_default_tool_bar_height): New variable.
(adjust_frame_size): Possibly add requested adjustment to
Vframe_adjust_size_history.
(make_frame): Initialize tool_bar_redisplayed_once slot.
(Fset_frame_height, Fset_frame_width, Fset_frame_size): Clarify
doc-string.  Call adjust_frame_size unconditionally (the frame's
text size may remain unaltered but the pixel size may change).
(x_figure_window_size): If frame_default_tool_bar_height was
set, use it instead of calculating the tool bar height from
DEFAULT_TOOL_BAR_IMAGE_HEIGHT.  Don't set
Vframe_initial_frame_tool_bar_height.
(Qchange_frame_size, Qxg_frame_set_char_size)
(Qset_window_configuration, Qx_create_frame_1)
(Qx_create_frame_2): New symbols.
(Vframe_initial_frame_tool_bar_height): Remove.
(Vframe_adjust_size_history): New history variable for debugging
frame size adjustments.
* frame.h (struct frame): New boolean slot
tool_bar_redisplayed_once.
(frame_default_tool_bar_height): Extern.
* gtkutil.c (xg_frame_set_char_size): Pass Qxg_frame_set_char_size
to adjust_frame_size.
* nsfns.m (Fx_create_frame): Pass Pass Qx_create_frame_1 and
Qx_create_frame_2 to adjust_frame_size.
* w32fns.c (x_change_tool_bar_height): Call adjust_frame_size with
inhibit 1 when we have not redisplayed the tool bar yet.
(Fx_create_frame): Pass Pass Qx_create_frame_1 and
Qx_create_frame_2 to adjust_frame_size.
* w32menu.c (set_frame_menubar): Simplify adjust_frame_size
call.
* window.c (Fset_window_configuration): Pass
Qset_window_configuration to adjust_frame_size.
* xdisp.c (redisplay_tool_bar): Assign new height to
frame_default_tool_bar_height.
(redisplay_internal): If we haven't redisplayed this frame's
tool bar, call redisplay_tool_bar early so we can adjust the
frame size accordingly.
* xfns.c (x_change_tool_bar_height): Call adjust_frame_size with
inhibit 1 when we have not redisplayed the tool bar yet.
(Fx_create_frame): Pass Pass Qx_create_frame_1 and
Qx_create_frame_2 to adjust_frame_size.

9 years agoHave 'make' output better GEN names
Paul Eggert [Mon, 12 Jan 2015 02:19:31 +0000 (18:19 -0800)]
Have 'make' output better GEN names

* lisp/Makefile.in (PHONY_EXTRAS): New macro.
(.PHONY): Depend on it, and on $(lisp)/loaddefs.el, so that the
relevant files' time stamps are ignored.
(custom-deps, $(lisp)/cus-load.el, finder-data)
($(lisp)/finder-inf.el): Use PHONY_EXTRAS.
(custom-deps, $(lisp)/cus-load.el, finder-data)
($(lisp)/finder-inf.el, autoloads, $(lisp)/loaddefs.el)
($(lisp)/subdirs.el, update-subdirs):
Output more-accurate destination names with GEN.
* src/Makefile.in (gl-stamp, globals.h): Simplify by putting the new
contents of globals.h into gl-stamp.  This lets us use AM_V_GEN
more naturally so that 'make' can output more-accurate names.

9 years agoSay "ELC foo.elc" instead of "GEN foo.elc"
Paul Eggert [Mon, 12 Jan 2015 01:41:57 +0000 (17:41 -0800)]
Say "ELC foo.elc" instead of "GEN foo.elc"

* admin/unidata/Makefile.in, lisp/Makefile.in (AM_V_ELC)
(am__v_ELC_, am__v_ELC_0, am__v_ELC_1): New macros.
* admin/unidata/Makefile.in (%.elc):
* lisp/Makefile.in ($(THEFILE)c, .el.elc): Use them.

9 years ago* src/buffer.c (init_buffer_once): Initialize buffer_local_flags early.
Stefan Monnier [Sun, 11 Jan 2015 22:38:04 +0000 (17:38 -0500)]
* src/buffer.c (init_buffer_once): Initialize buffer_local_flags early.

* src/buffer.c (init_buffer_once): Initialize buffer_local_flags before
calling reset_buffer_local_variables, and make sure we initialize
it completely.

9 years ago* coding.c (Fcoding_system_plist): Use common style for docstring.
Dmitry Antipov [Sun, 11 Jan 2015 17:42:53 +0000 (20:42 +0300)]
* coding.c (Fcoding_system_plist): Use common style for docstring.

9 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Sun, 11 Jan 2015 15:00:33 +0000 (16:00 +0100)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

Conflicts:
lisp/ChangeLog

9 years agoFurther eww URL DWIM tweaks
Lars Magne Ingebrigtsen [Sun, 11 Jan 2015 14:58:10 +0000 (15:58 +0100)]
Further eww URL DWIM tweaks

* net/eww.el (eww): Interpret anything that looks like a protocol
designator as a full URL.

9 years ago* files.el (directory-files-recursively): Do not include remote file names.
Michael Albinus [Sun, 11 Jan 2015 14:58:06 +0000 (15:58 +0100)]
* files.el (directory-files-recursively): Do not include remote file names.

9 years agoPort to MSB hosts without optimization
Paul Eggert [Sun, 11 Jan 2015 09:42:50 +0000 (01:42 -0800)]
Port to MSB hosts without optimization

E.g., when configuring --with-wide-int CFLAGS='-O0' on x86,
the inline function XTYPE needs to be declared before being used.
* lisp.h (XTYPE): New forward declaration.

9 years agoDefault to 'configure --enable-silent-rules'
Paul Eggert [Sun, 11 Jan 2015 09:18:15 +0000 (01:18 -0800)]
Default to 'configure --enable-silent-rules'

This greatly shortens the 'make' output, making it more readable
and useful.  For example, on my platform it shortens a
4125-character line "gcc -std=gnu99 -c -Demacs -I. -I. -I../lib
... emacs.c" -- a line so long that it's hard to see what's going
on or where the diagnostics are -- to just "CC emacs.o".
* INSTALL: Document this.
* configure.ac: Add AM_SILENT_RULES([yes]).
(AM_DEFAULT_VERBOSITY): Remove now-unnecessary initialization.
* etc/NEWS: Document this.
Fixes: bug#19501
9 years agoSpelling fixes
Paul Eggert [Sun, 11 Jan 2015 05:50:52 +0000 (21:50 -0800)]
Spelling fixes

9 years agoPort to 32-bit --with-wide-int
Paul Eggert [Sat, 10 Jan 2015 21:33:38 +0000 (13:33 -0800)]
Port to 32-bit --with-wide-int

Prefer symbol indexes to struct Lisp_Symbol * casted and then
widened, as the latter had trouble with GCC on Fedora 21 when
configured --with-wide-int and when used in static initializers.
* lib-src/make-docfile.c (write_globals): Define and use symbols like
iQnil (a small integer, like 0) rather than aQnil (an address
constant).
* src/alloc.c (garbage_collect_1, which_symbols):
* src/lread.c (init_obarray):
Prefer builtin_lisp_symbol when it can be used.
* src/dispextern.h (struct image_type.type):
* src/font.c (font_property_table.key):
* src/frame.c (struct frame_parm_table.sym):
* src/keyboard.c (scroll_bar_parts, struct event_head):
* src/xdisp.c (struct props.name):
Use the index of a builtin symbol rather than its address.
All uses changed.
* src/lisp.h (TAG_SYMPTR, XSYMBOL_INIT): Remove, replacing with ...
(TAG_SYMOFFSET, SYMBOL_INDEX): ... new macros that deal with
symbol indexes rather than pointers, and which work better on MSB
hosts because they shift right before tagging.  All uses changed.
(DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END):
No longer noops on wide-int hosts, since they work now.
(builtin_lisp_symbol): New function.

9 years agoPort to HAVE_FREETYPE && !HAVE_XFT
Paul Eggert [Sat, 10 Jan 2015 21:13:57 +0000 (13:13 -0800)]
Port to HAVE_FREETYPE && !HAVE_XFT

* dispextern.h (struct face.extra) [HAVE_FREETYPE && !HAVE_XFT]:
* font.h (syms_of_xftfont) [HAVE_FREETYPE && !HAVE_XFT]:
Declare in this case too.

9 years agoPort to 32-bit Sun C 5.12 sparc
Paul Eggert [Sat, 10 Jan 2015 21:35:33 +0000 (13:35 -0800)]
Port to 32-bit Sun C 5.12 sparc

* make-docfile.c (close_emacs_globals): Align lispsym to GCALIGNMENT.
The alignment is required on all platforms; it just happens to have
been properly aligned on the previous platforms we tested.

9 years agoPort Qnil==0 changes to 32-bit --with-wide-int
Paul Eggert [Sat, 10 Jan 2015 21:35:33 +0000 (13:35 -0800)]
Port Qnil==0 changes to 32-bit --with-wide-int

* lisp.h (lisp_h_XSYMBOL, XSYMBOL): Assume USE_LSB_TAG in the
macro-implemented version.  For the non-USE_LSB_TAG case, supply
a new inline function that is the inverse of the new TAG_SYMPTR.
(lisp_h_XUNTAGBASE, XUNTAGBASE): Remove.  All uses removed.
(TAG_SYMPTR) [!USE_LSB_TAG]: If the pointer subtraction yields a
negative number, don't allow sign bits to bleed into the encoded
value.  Shift in zero bits instead.

9 years ago(shr-urlify): Don't bother the user about invalidly-encoded display strings
Lars Magne Ingebrigtsen [Sat, 10 Jan 2015 16:54:24 +0000 (17:54 +0100)]
(shr-urlify): Don't bother the user about invalidly-encoded display strings

9 years ago(shr-urlify): Decode URLs before using them as titles
Ivan Shmakov [Sat, 10 Jan 2015 16:48:38 +0000 (17:48 +0100)]
(shr-urlify): Decode URLs before using them as titles

Fixes: debbugs:19555
* lisp/net/shr.el (shr-urlify): Decode URLs before using them as titles.

9 years agoeww title cleanup when loading
Lars Magne Ingebrigtsen [Sat, 10 Jan 2015 16:26:37 +0000 (17:26 +0100)]
eww title cleanup when loading

(eww): Clear the title when loading so that we don't display
misleading information.

9 years ago(eww): Don't interpret "org/foo" as an URL.
Lars Magne Ingebrigtsen [Sat, 10 Jan 2015 15:41:49 +0000 (16:41 +0100)]
(eww): Don't interpret "org/foo" as an URL.

9 years agoFurther eww DWIM URL interpretation fixups
Lars Magne Ingebrigtsen [Sat, 10 Jan 2015 15:20:44 +0000 (16:20 +0100)]
Further eww DWIM URL interpretation fixups

(eww): Also interpret things like "en.wikipedia.org/wiki/Free
software" as an URL.

9 years agoTweak eww DWIM URL recognition
Lars Magne Ingebrigtsen [Sat, 10 Jan 2015 15:01:43 +0000 (16:01 +0100)]
Tweak eww DWIM URL recognition

Fixes: debbugs:19556
* net/eww.el (eww): Always interpret URLs that start with https?:
as plain URLs, even if they have spaces in them.

9 years agoMS-Windows followup for change in semantics of XIL and XLI. (Bug#15880)
Eli Zaretskii [Sat, 10 Jan 2015 11:27:35 +0000 (13:27 +0200)]
MS-Windows followup for change in semantics of XIL and XLI.  (Bug#15880)

 src/w32fns.c (Fw32_register_hot_key): Use XINT instead of XLI.
 src/w32notify.c (Fw32notify_add_watch, w32_get_watch_object): Use
 make_pointer_integer instead of XIL.
 (Fw32notify_rm_watch): Use XINTPTR instead of XLI.
 src/w32inevt.c (handle_file_notifications): Use make_pointer_integer
 instead of XIL.  Put a list of the descriptor, action, and file
 name in event->arg, instead of spreading them between event->code
 and event->arg.
 src/w32term.c (queue_notifications): Use make_pointer_integer
 instead of XIL.  Put a list of the descriptor, action, and file
 name in event->arg, instead of spreading them between event->code
 and event->arg.
 src/keyboard.c (kbd_buffer_get_event) [HAVE_W32NOTIFY]: Adjust Lisp
 event creation to changes in w32term.c and w32inevt.c above.

9 years agoBetter binding for vc-delete-file
Daniel Colascione [Sat, 10 Jan 2015 06:44:31 +0000 (22:44 -0800)]
Better binding for vc-delete-file

* lisp/vc/vc-hooks.el (vc-prefix-map): Bind vc-delete-file to C-x v x,
by analogy with dired.

9 years agoTweak NEWS
Daniel Colascione [Sat, 10 Jan 2015 06:18:04 +0000 (22:18 -0800)]
Tweak NEWS

* etc/NEWS: Fix typo

9 years agoTeach js-mode about ES6 generators
Daniel Colascione [Fri, 9 Jan 2015 18:25:50 +0000 (10:25 -0800)]
Teach js-mode about ES6 generators

* lisp/progmodes/js.el (js--function-heading-1-re)
(js--function-prologue-beginning): Parse ES6 generator function
declarations.  (That is, "function* name()").

9 years agoRefactor pointer-to-integer conversion
Paul Eggert [Fri, 9 Jan 2015 16:04:36 +0000 (08:04 -0800)]
Refactor pointer-to-integer conversion

* gfilenotify.c (monitor_to_lisp, lisp_to_monitor):
Rename and move to lisp.h.  All uses changed.
* lisp.h (XINTPTR, make_pointer_integer): New inline functions,
which are renamed from gfilenotify.c's lisp_to_monitor and
monitor_to_lisp, and with more-generic void * signatures.

9 years agoShrink EIEIO object header. Move generics to eieio-generic.el.
Stefan Monnier [Thu, 8 Jan 2015 21:03:04 +0000 (16:03 -0500)]
Shrink EIEIO object header.  Move generics to eieio-generic.el.

9 years ago* lisp/emacs-lisp/eieio*.el: Move the function defs to defclass.
Stefan Monnier [Thu, 8 Jan 2015 20:47:32 +0000 (15:47 -0500)]
* lisp/emacs-lisp/eieio*.el: Move the function defs to defclass.

* lisp/emacs-lisp/eieio.el (defclass): Move from eieio-defclass all the code
that creates functions, and most of the sanity checks.
Mark as obsolete the <class>-child-p function.
* lisp/emacs-lisp/eieio-core.el (eieio--define-field-accessors): Remove.
(eieio--class, eieio--object): Use cl-defstruct.
(eieio--object-num-slots): Define manually.
(eieio-defclass-autoload): Use eieio--class-make.
(eieio-defclass-internal): Rename from eieio-defclass.  Move all the
`(lambda...) definitions and most of the sanity checks to `defclass'.
Mark as obsolete the <class>-list-p function, the <class> variable and
the <initarg> variables.  Use pcase-dolist.
(eieio-defclass): New compatibility function.
* lisp/emacs-lisp/eieio-opt.el (eieio-build-class-alist)
(eieio-class-speedbar): Don't use eieio-default-superclass var.

9 years agoFix line-move-visual's following of column in R2L lines.
Eli Zaretskii [Thu, 8 Jan 2015 14:04:46 +0000 (16:04 +0200)]
Fix line-move-visual's following of column in R2L lines.

 src/simple.el (line-move-visual): When converting X pixel coordinate
 to temporary-goal-column, adjust the value for right-to-left
 screen lines.  This fixes vertical-motion, next/prev-line, etc.

 src/dispnew.c (buffer_posn_from_coords): Fix the value of the column
 returned for right-to-left screen lines.  (Before the change on
 2014-12-30, the incorrectly-computed X pixel coordinate concealed
 this bug.)

9 years agoFix GDB accesses to the 'nil's name.
Eli Zaretskii [Thu, 8 Jan 2015 13:53:09 +0000 (15:53 +0200)]
Fix GDB accesses to the 'nil's name.

 src/.gdbinit (xsymname): New subroutine.
 (xprintsym, initial-tbreak): Use it to access the name of a symbol
 in a way that doesn't cause GDB to barf when it tries to
 dereference a NULL pointer.

9 years agoFix fallout from "Qnil is zero" change in the display engine. (Bug#19535)
Eli Zaretskii [Thu, 8 Jan 2015 13:46:23 +0000 (15:46 +0200)]
Fix fallout from "Qnil is zero" change in the display engine.  (Bug#19535)

 src/xdisp.c (next_element_from_c_string): Use Lisp integer zero as
 the object.
 (set_cursor_from_row, try_cursor_movement, dump_glyph)
 (insert_left_trunc_glyphs, append_space_for_newline)
 (extend_face_to_end_of_line, highlight_trailing_whitespace)
 (find_row_edges, ROW_GLYPH_NEWLINE_P, Fmove_point_visually)
 (Fbidi_resolved_levels, produce_special_glyphs)
 (rows_from_pos_range, mouse_face_from_buffer_pos)
 (note_mouse_highlight): Use nil as the object for glyphs inserted
 by the display engine, and test with NILP instead of INTEGERP.
 src/w32fns.c (Fx_show_tip): Use NILP to test for glyphs inserted by
 the display engine.
 src/xfns.c (Fx_show_tip): Use NILP to test for glyphs inserted by
 the display engine.
 src/dispextern.h (struct glyph, struct it): Update comments for the
 OBJECT members.

9 years agoPort new Lisp symbol init to x86 --with-wide-int
Paul Eggert [Thu, 8 Jan 2015 08:41:17 +0000 (00:41 -0800)]
Port new Lisp symbol init to x86 --with-wide-int

* lisp.h (DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END):
Define to empty on platforms where EMACS_INT_MAX != INTPTR_MAX, as
GCC (at least) does not allow a constant initializer to widen an
address constant.

9 years ago* lisp.h (TAG_SYMPTR): Don't do arithmetic on NULL.
Paul Eggert [Thu, 8 Jan 2015 07:39:56 +0000 (23:39 -0800)]
* lisp.h (TAG_SYMPTR): Don't do arithmetic on NULL.

This is a followup to the "Port Qnil==0 XUNTAG to clang" patch.
Although clang doesn't need it, some other compiler might, and
it's easy enough to be safe.

9 years ago* conf_post.h (ATTRIBUTE_ALLOC_SIZE): Port to clang 3.5.0.
Paul Eggert [Thu, 8 Jan 2015 07:11:36 +0000 (23:11 -0800)]
* conf_post.h (ATTRIBUTE_ALLOC_SIZE): Port to clang 3.5.0.

Apparently clang removed support for the alloc_size attribute.

9 years agoPort Qnil==0 XUNTAG to clang
Paul Eggert [Thu, 8 Jan 2015 07:02:01 +0000 (23:02 -0800)]
Port Qnil==0 XUNTAG to clang

clang has undefined behavior if the program subtracts an integer
from (char *) 0.  Problem reported by YAMAMOTO Mitsuharu in:
http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00132.html
* lisp.h (lisp_h_XUNTAG) [USE_LSB_TAG]:
(XUNTAG) [!USE_LSB_TAG]: Port to clang 3.5.0.

9 years ago* emacs-lisp/eieio-generic.el: New file.
Stefan Monnier [Thu, 8 Jan 2015 05:24:24 +0000 (00:24 -0500)]
* emacs-lisp/eieio-generic.el: New file.

* lisp/emacs-lisp/eieio-core.el: Move all generic function code to
eieio-generic.el.
(eieio--defmethod): Declare.
* lisp/emacs-lisp/eieio.el: Require eieio-generic.  Move all generic
function code to eieio-generic.el.
* lisp/emacs-lisp/eieio-opt.el (eieio-help-generic): Move to
eieio-generic.el.
* lisp/emacs-lisp/eieio-datadebug.el (eieio-debug-methodinvoke): Update call
to eieio--generic-call.
* lisp/emacs-lisp/eieio-base.el (eieio-instance-inheritor): Don't use
<class>-child type.
* test/automated/eieio-test-methodinvoke.el (eieio-test-method-store):
Update reference to eieio--generic-call-key.
* test/automated/eieio-tests.el (eieio-test-23-inheritance-check): Don't use
<foo>-child-p.

9 years ago# ChangeLog fixes
Glenn Morris [Thu, 8 Jan 2015 05:00:04 +0000 (21:00 -0800)]
# ChangeLog fixes

9 years ago* admin/authors.el (authors-aliases): Add an entry to ignore.
Glenn Morris [Thu, 8 Jan 2015 04:58:09 +0000 (20:58 -0800)]
* admin/authors.el (authors-aliases): Add an entry to ignore.

9 years ago* lisp/files.el (file-tree-walk): Remove; of unknown authorship.
Glenn Morris [Thu, 8 Jan 2015 04:52:24 +0000 (20:52 -0800)]
* lisp/files.el (file-tree-walk): Remove; of unknown authorship.

* etc/NEWS: Remove entry.

Fixes: debbugs:19325
9 years agolisp/emacs-lisp/eieio-core.el (eieio-backward-compatibility): New var.
Stefan Monnier [Thu, 8 Jan 2015 04:11:58 +0000 (23:11 -0500)]
lisp/emacs-lisp/eieio-core.el (eieio-backward-compatibility): New var.

* lisp/cedet/ede/speedbar.el (ede-speedbar-compile-line)
(ede-speedbar-get-top-project-for-line):
* lisp/cedet/ede.el (ede-buffer-belongs-to-target-p)
(ede-buffer-belongs-to-project-p, ede-build-forms-menu)
(ede-add-project-to-global-list):
* lisp/cedet/semantic/db-typecache.el (semanticdb-get-typecache):
* lisp/cedet/semantic/db-file.el (semanticdb-load-database):
* lisp/cedet/semantic/db-el.el (semanticdb-elisp-sym->tag):
* lisp/cedet/semantic/db-ebrowse.el (semanticdb-ebrowse-load-helper):
* lisp/cedet/ede/project-am.el (project-am-preferred-target-type):
* lisp/cedet/ede/proj.el (ede-proj-load):
* lisp/cedet/ede/custom.el (ede-customize-current-target, ede-customize-target):
* lisp/cedet/semantic/ede-grammar.el ("semantic grammar"):
* lisp/cedet/semantic/scope.el (semantic-scope-reset-cache)
(semantic-calculate-scope):
* lisp/cedet/srecode/map.el (srecode-map-update-map):
* lisp/cedet/srecode/insert.el (srecode-insert-show-error-report)
(srecode-insert-method, srecode-insert-include-lookup)
(srecode-insert-method):
* lisp/cedet/srecode/fields.el (srecode-active-template-region):
* lisp/cedet/srecode/compile.el (srecode-flush-active-templates)
(srecode-compile-inserter): Don't use <class> as a variable.
Use `oref-default' for class slots.

* lisp/cedet/semantic/grammar.el (semantic-grammar-eldoc-last-data): New var.
(semantic-grammar-eldoc-get-macro-docstring): Use it instead of
eldoc-last-data.
* lisp/cedet/semantic/fw.el (semantic-exit-on-input): Use `declare'.
(semantic-throw-on-input): Use `with-current-buffer'.
* lisp/cedet/semantic/db.el (semanticdb-abstract-table-list): Define if not
pre-defined.
* lisp/cedet/semantic/db-find.el (semanticdb-find-tags-collector):
Use save-current-buffer.
(semanticdb-find-tags-collector): Don't use <class> as a variable.
* lisp/cedet/semantic/complete.el (semantic-complete-active-default)
(semantic-complete-current-matched-tag): Declare.
(semantic-complete-inline-custom-type): Don't use <class> as a variable.
* lisp/cedet/semantic/bovine/make.el (semantic-analyze-possible-completions):
Use with-current-buffer.
* lisp/cedet/semantic.el (semantic-parser-warnings): Declare.
* lisp/cedet/ede/base.el (ede-target-list): Define if not pre-defined.
(ede-with-projectfile): Prefer find-file-noselect over
save-window-excursion.

* lisp/emacs-lisp/chart.el (chart-add-sequence, chart-bar-quickie):
Don't use <class> as a variable.

* lisp/emacs-lisp/eieio-base.el (eieio-persistent-validate/fix-slot-value):
Improve error messages.
(eieio-persistent-slot-type-is-class-p): Handle `list-of' types, as
well as user-defined types.  Emit errors for legacy types like
<class>-child and <class>-list, if not eieio-backward-compatibility.

* lisp/emacs-lisp/eieio-core.el (eieio-backward-compatibility): New var.
(eieio-defclass-autoload): Obey it.
(eieio--class-object): Improve error behavior.
(eieio-class-children-fast, same-class-fast-p): Remove.  Inline at
every use site.
(eieio--defgeneric-form-primary-only): Rename from
eieio-defgeneric-form-primary-only; update all callers.
(eieio--defgeneric-form-primary-only-one): Rename from
eieio-defgeneric-form-primary-only-one; update all callers.
(eieio-defgeneric-reset-generic-form)
(eieio-defgeneric-reset-generic-form-primary-only)
(eieio-defgeneric-reset-generic-form-primary-only-one): Remove.
(eieio--method-optimize-primary): New function to replace them.
(eieio--defmethod, eieio-defmethod): Use it.
(eieio--perform-slot-validation): Rename from
eieio-perform-slot-validation; update all callers.
(eieio--validate-slot-value): Rename from eieio-validate-slot-value.
Change `class' to be a class object.  Update all callers.
(eieio--validate-class-slot-value): Rename from
eieio-validate-class-slot-value.  Change `class' to be a class object.
Update all callers.
(eieio-oset-default): Accept class object as well.
(eieio--generic-call-primary-only): Rename from
eieio-generic-call-primary-only.  Update all callers.

* lisp/emacs-lisp/eieio-opt.el (eieio-read-generic-p): Remove.
(eieio-read-generic): Use `generic-p' instead.

* lisp/emacs-lisp/eieio.el (same-class-p): Accept class object as well.
(call-next-method): Simplify.
(clone): Obey eieio-backward-compatibility.

* lisp/gnus/registry.el: Don't use <class> as a variable.

* test/automated/eieio-test-methodinvoke.el
(eieio-test-method-order-list-4):
Don't use <class> as a variable.

* test/automated/eieio-test-persist.el (persistent-with-objs-list-slot):
Don't use <class>-list type.

* test/automated/eieio-tests.el: Use cl-lib.  Don't use <class> as a variable.
Don't use <class>-list types and <class>-list-p predicates.

9 years agolisp/gnus/gnus-group.el (gnus-read-ephemeral-bug-group): Use mm-disable-multibyte...
Katsumi Yamaoka [Thu, 8 Jan 2015 03:38:59 +0000 (03:38 +0000)]
lisp/gnus/gnus-group.el (gnus-read-ephemeral-bug-group): Use mm-disable-multibyte instead of mm-enable-multibyte

9 years agolisp/gnus/gnus-group.el (gnus-read-ephemeral-bug-group): Use mm-enable-multibyte...
Katsumi Yamaoka [Thu, 8 Jan 2015 03:37:10 +0000 (03:37 +0000)]
lisp/gnus/gnus-group.el (gnus-read-ephemeral-bug-group): Use mm-enable-multibyte instead of set-buffer-multibyte

9 years ago* src/gfilenotify.c (monitor_to_lisp, lisp_to_monitor):
Paul Eggert [Thu, 8 Jan 2015 01:52:30 +0000 (17:52 -0800)]
* src/gfilenotify.c (monitor_to_lisp, lisp_to_monitor):

Port recent fix to !USE_LSB_TAG platforms.

9 years agoPort GFileMonitor * hack to Qnil==0 platforms
Paul Eggert [Thu, 8 Jan 2015 01:12:16 +0000 (17:12 -0800)]
Port GFileMonitor * hack to Qnil==0 platforms

Reported by Glenn Morris in: http://bugs.gnu.org/15880#112
* gfilenotify.c (monitor_to_lisp, lisp_to_monitor): New functions.
(dir_monitor_callback, Fgfile_add_watch, Fgfile_rm_watch): Use them.

9 years agoFix content decoding in gnus-read-ephemeral-bug-group
Andreas Schwab [Fri, 19 Dec 2014 10:47:51 +0000 (11:47 +0100)]
Fix content decoding in gnus-read-ephemeral-bug-group

* gnus-group.el (gnus-read-ephemeral-bug-group): Bind
coding-system-for-read and coding-system-for-write only around
with-temp-file, and make buffer unibyte.  Don't write temp file twice.

9 years agosrc/window.c (Fwindow_body_width): Doc fix. (Bug#19395)
Eli Zaretskii [Thu, 18 Dec 2014 17:15:01 +0000 (19:15 +0200)]
src/window.c (Fwindow_body_width): Doc fix. (Bug#19395)

9 years ago* lisp/subr.el (redisplay-dont-pause): Mark as obsolete.
Stefan Monnier [Thu, 18 Dec 2014 15:25:54 +0000 (10:25 -0500)]
* lisp/subr.el (redisplay-dont-pause): Mark as obsolete.

* doc/lispref/display.texi (Forcing Redisplay): Remove references to
redisplay-dont-pause and redisplay-preemption-period (which doesn't
even exist).

9 years agoMerge branch master of git.sv.gnu.org:/srv/git/emacs.
K. Handa [Wed, 7 Jan 2015 13:51:41 +0000 (22:51 +0900)]
Merge branch master of git.sv.gnu.org:/srv/git/emacs.

9 years agointernational/ccl.el (define-ccl-program): Improve the docstring.
K. Handa [Wed, 7 Jan 2015 13:47:43 +0000 (22:47 +0900)]
international/ccl.el (define-ccl-program): Improve the docstring.

9 years agoUse generic `display-buffer-alist' instead of mode-specific customizations.
Sam Steingold [Tue, 6 Jan 2015 21:32:09 +0000 (16:32 -0500)]
Use generic `display-buffer-alist' instead of mode-specific customizations.

* lisp/shell.el (shell-display-buffer-actions): Remove,
use `display-buffer-alist' instead.

9 years agoNS: Fix frame size when height and font set at startup.
Jan D [Tue, 6 Jan 2015 19:30:39 +0000 (20:30 +0100)]
NS: Fix frame size when height and font set at startup.

* nsterm.m (x_set_window_size): Call updateFrameSize to get real
size instead of using widht/height.  The frame may be constrained.

9 years agoMerge from gnulib
Paul Eggert [Tue, 6 Jan 2015 17:15:11 +0000 (09:15 -0800)]
Merge from gnulib

* lib/stdio.in.h, m4/stdio_h.m4: Update from gnulib, incorporating:
2015-01-05 stdio: fix use of PRIdMAX on modern mingw

9 years agoAdd help-echo to xrefs
Dmitry Gutov [Mon, 5 Jan 2015 23:47:58 +0000 (02:47 +0300)]
Add help-echo to xrefs

* lisp/progmodes/xref.el (xref--insert-xrefs): Add `help-echo' property
to the references.

9 years ago* lisp.h (XSYMBOL): Parenthesize id in forward decl.
Paul Eggert [Mon, 5 Jan 2015 22:15:59 +0000 (14:15 -0800)]
* lisp.h (XSYMBOL): Parenthesize id in forward decl.

Needed when neither optimizing nor inlining.
Also, sort decls alphabetically.

9 years agoMS-Windows followup to previous commit
Eli Zaretskii [Mon, 5 Jan 2015 20:13:58 +0000 (22:13 +0200)]
MS-Windows followup to previous commit

 src/w32proc.c, src/w32.h, src/w32fns.c, src/w32font.c, src/w32menu.c:
 src/w32notify.c, src/w32proc.c, src/w32select.c, src/w32term.c:
 src/w32uniscribe.c: Remove declarations of Q* variables that
 represent symbols.

9 years agoUse 0 for Qnil
Paul Eggert [Mon, 5 Jan 2015 17:07:45 +0000 (09:07 -0800)]
Use 0 for Qnil

Fixes Bug#15880.
If USE_LSB_TAG, arrange for the representation of Qnil to be zero so
that NILP (x) is equivalent to testing whether x is 0 at the
machine level.  The overall effects of this and the previous patch
shrink the size of the text segment by 2.3% and speeds up
compilation of all the .elc files by about 0.5% on my platform,
which is Fedora 20 x86-64.
* lib-src/make-docfile.c (compare_globals):
* src/lisp.h (lisp_h_XPNTR, lisp_h_XSYMBOL, lisp_h_XUNTAG)
(make_lisp_symbol) [USE_LSB_TAG]:
Symbols now tag the difference from lispsym, not the pointer.
(lisp_h_XUNTAGBASE, TAG_SYMPTR): New macros.
(Lisp_Int0, Lisp_Int1, Lisp_Symbol, Lisp_Misc, Lisp_String, Lisp_Cons):
Renumber so that Lisp_Symbol is 0, so that Qnil is zero.
(XSYMBOL): New forward decl.
(XUNTAGBASE): New function.
(XUNTAG): Use it.

9 years agoCompute C decls for DEFSYMs automatically
Paul Eggert [Mon, 5 Jan 2015 17:07:45 +0000 (09:07 -0800)]
Compute C decls for DEFSYMs automatically

Fixes Bug#15880.
This patch also makes Q constants (e.g., Qnil) constant addresses
from the C point of view.
* make-docfile.c: Revamp to generate table of symbols, too.
Include <stdbool.h>.
(xstrdup): New function.
(main): Don't process the same file twice.
(SYMBOL): New constant in enum global_type.
(struct symbol): Turn 'value' member into a union, either v.value
for int or v.svalue for string.  All uses changed.
(add_global): New arg svalue, which overrides value, so that globals
can have a string value.
(close_emacs_global): New arg num_symbols; all uses changed.
Output lispsym decl.
(write_globals): Output symbol globals too.  Output more
ATTRIBUTE_CONST, now that Qnil etc. are C constants.
Output defsym_name table.
(scan_c_file): Move most of guts into ...
(scan_c_stream): ... new function.  Scan for DEFSYMs and
record symbols found.  Don't read past EOF if file doesn't
end in newline.
* alloc.c, bidi.c, buffer.c, bytecode.c, callint.c, casefiddle:
* casetab.c, category.c, ccl.c, charset.c, chartab.c, cmds.c, coding.c:
* composite.c, data.c, dbusbind.c, decompress.c, dired.c, dispnew.c:
* doc.c, editfns.c, emacs.c, eval.c, fileio.c, fns.c, font.c, fontset.c:
* frame.c, fringe.c, ftfont.c, ftxfont.c, gfilenotify.c, gnutls.c:
* image.c, inotify.c, insdel.c, keyboard.c, keymap.c, lread.c:
* macfont.m, macros.c, minibuf.c, nsfns.m, nsfont.m, nsimage.m:
* nsmenu.m, nsselect.m, nsterm.m, print.c, process.c, profiler.c:
* search.c, sound.c, syntax.c, term.c, terminal.c, textprop.c, undo.c:
* window.c, xdisp.c, xfaces.c, xfns.c, xftfont.c, xmenu.c, xml.c:
* xselect.c, xsettings.c, xterm.c:
Remove Q vars that represent symbols (e.g., Qnil, Qt, Qemacs).
These names are now defined automatically by make-docfile.
* alloc.c (init_symbol): New function.
(Fmake_symbol): Use it.
(c_symbol_p): New function.
(valid_lisp_object_p, purecopy): Use it.
* alloc.c (marked_pinned_symbols):
Use make_lisp_symbol instead of make_lisp_ptr.
(garbage_collect_1): Mark lispsym symbols.
(CHECK_ALLOCATED_AND_LIVE_SYMBOL): New macro.
(mark_object): Use it.
(sweep_symbols): Sweep lispsym symbols.
(symbol_uses_obj): New function.
(which_symbols): Use it.  Work for lispsym symbols, too.
(init_alloc_once): Initialize Vpurify_flag here; no need to wait,
since Qt's address is already known now.
(syms_of_alloc): Add lispsym count to symbols_consed.
* buffer.c (init_buffer_once): Compare to Qnil, not to make_number (0),
when testing whether storage is all bits zero.
* dispextern (struct image_type):
* font.c (font_property_table):
* frame.c (struct frame_parm_table, frame_parms):
* keyboard.c (scroll_bar_parts, struct event_head):
* xdisp.c (struct props):
Use XSYMBOL_INIT (Qfoo) and struct Lisp_Symbol * rather than &Qfoo and
Lisp_Object *, since Qfoo is no longer an object whose address can be
taken.  All uses changed.
* eval.c (run_hook): New function.  Most uses of Frun_hooks changed to
use it, so that they no longer need to take the address of a Lisp sym.
(syms_of_eval): Don't use DEFSYM on Vrun_hooks, as it's a variable.
* frame.c (syms_of_frame): Add defsyms for the frame_parms table.
* keyboard.c (syms_of_keyboard): Don't DEFSYM Qmenu_bar here.
DEFSYM Qdeactivate_mark before the corresponding var.
* keymap.c (syms_of_keymap): Use DEFSYM for Qmenu_bar and Qmode_line
instead of interning their symbols; this avoids duplicates.
(LISP_INITIALLY, TAG_PTR)
(DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END, XSYMBOL_INIT):
New macros.
(LISP_INITIALLY_ZERO): Use it.
(enum symbol_interned, enum symbol_redirect, struct Lisp_Symbol)
(EXFUN, DEFUN_ARGS_MANY, DEFUN_ARGS_UNEVALLED, DEFUN_ARGS_*):
Move decls up, to avoid forward uses.  Include globals.h earlier, too.
(make_lisp_symbol): New function.
(XSETSYMBOL): Use it.
(DEFSYM): Now just a placeholder for make-docfile.
* lread.c (DEFINE_SYMBOLS): Define, for globals.h.
(intern_sym): New function, with body taken from old intern_driver.
(intern_driver): Use it.  Last arg is now Lisp integer, not ptrdiff_t.
All uses changed.
(define_symbol): New function.
(init_obarray): Define the C symbols taken from lispsym.
Use plain DEFSYM for Qt and Qnil.
* syntax.c (init_syntax_once): No need to worry about
Qchar_table_extra_slots.

9 years ago* lisp/minibuffer.el (completion-category-defaults): Default to nil.
Stefan Monnier [Mon, 5 Jan 2015 16:34:06 +0000 (11:34 -0500)]
* lisp/minibuffer.el (completion-category-defaults): Default to nil.

(completion-category-defaults): New var.
Set unicode-name to use substring completion.

9 years ago* lisp/emacs-lisp/eieio*.el: Use class objects in `parent' field.
Stefan Monnier [Mon, 5 Jan 2015 04:11:37 +0000 (23:11 -0500)]
* lisp/emacs-lisp/eieio*.el: Use class objects in `parent' field.

* lisp/emacs-lisp/eieio-core.el (eieio-class-object): New function.
(eieio-class-parents-fast): Remove macro.
(eieio--class-option-assoc): Rename from class-option-assoc.
Update all callers.
(eieio--class-option): Rename from class-option.  Change `class' arg to
be a class object.  Update all callers.
(eieio--class-method-invocation-order): Rename from
class-method-invocation-order.  Change `class' arg to be a class
object.  Update all callers.
(eieio-defclass-autoload, eieio-defclass): Set the `parent' field to
a list of class objects rather than names.
(eieio-defclass): Remove redundant quotes.  Use `eieio-oref-default'
for accessors to class allocated slots.
(eieio--perform-slot-validation-for-default): Rename from
eieio-perform-slot-validation-for-default.  Update all callers.
(eieio--add-new-slot): Rename from eieio-add-new-slot.
Update all callers.  Use push.
(eieio-copy-parents-into-subclass): Adjust to new content of
`parent' field.  Use dolist.
(eieio-oref): Remove support for providing a class rather than
an object.
(eieio-oref-default): Prefer class objects over class names.
(eieio--slot-originating-class-p): Rename from
eieio-slot-originating-class-p.  Update all callers.  Use `or'.
(eieio--slot-name-index): Turn check into assertion.
(eieio--class-slot-name-index): Rename from
eieio-class-slot-name-index.  Change `class' arg to be a class object.
Update all callers.
(eieio-attribute-to-initarg): Move to eieio-test-persist.el.
(eieio--c3-candidate): Rename from eieio-c3-candidate.
Update all callers.
(eieio--c3-merge-lists): Rename from eieio-c3-merge-lists.
Update all callers.
(eieio--class-precedence-c3): Rename from eieio-class-precedence-c3.
Update all callers.
(eieio--class-precedence-dfs): Rename from eieio-class-precedence-dfs.
Update all callers.
(eieio--class-precedence-bfs): Rename from eieio-class-precedence-bfs.
Update all callers.  Adjust to new `parent' content.
(eieio--class-precedence-list): Rename from -class-precedence-list.
Update all callers.
(eieio-generic-call): Use autoloadp and autoload-do-load.
Slight simplification.
(eieio-generic-call, eieio-generic-call-primary-only): Adjust to new
return value of `eieio-generic-form'.
(eieiomt-add): Index the hashtable with class objects rather than
class names.
(eieio-generic-form): Accept class objects as well.

* lisp/emacs-lisp/eieio.el (eieio-class-parents): Accept class objects.
(eieio--class-slot-initarg): Rename from class-slot-initarg.
Change `class' arg to be a class object.  Update all callers.
(call-next-method): Adjust to new return value of `eieio-generic-form'.
(eieio-default-superclass): Set var to the class object.
(eieio-edebug-prin1-to-string): Fix recursive call for lists.
Change print behavior to affect class objects rather than
class symbols.

* lisp/emacs-lisp/eieio-base.el (eieio-persistent-convert-list-to-object):
Adjust to new convention for eieio-persistent-validate/fix-slot-value.
(eieio-persistent-validate/fix-slot-value):
Change `class' arg to be a class object.  Update all callers.

* test/automated/eieio-test-persist.el (eieio--attribute-to-initarg):
Move from eieio-core.el.  Rename from eieio-attribute-to-initarg.
Change arg to be a class object.  Update all callers.

* test/automated/eieio-tests.el (eieio-test-04-static-method)
(eieio-test-05-static-method-2): Use oref-default to access
class slots.
(eieio-test-23-inheritance-check): Don't assume that
eieio-class-parents returns class names, or that a class can only have
a single name.

9 years agoAdd mouse interaction to xref
Dmitry Gutov [Sun, 4 Jan 2015 23:45:30 +0000 (02:45 +0300)]
Add mouse interaction to xref

* lisp/progmodes/xref.el (xref--button-map): New variable.
(xref--mouse-2): New command.
(xref--insert-xrefs): Add `mouse-face' and `keymap' properties to
the inserted references.

9 years ago'temacs -nw' should not call missing functions
Paul Eggert [Sun, 4 Jan 2015 21:20:36 +0000 (13:20 -0800)]
'temacs -nw' should not call missing functions

Without this patch, "temacs -nw" fails with the diagnostic
"emacs: Symbol's function definition is void: frame-windows-min-size"
and messes up the tty's state.
* lib-src/make-docfile.c (write_globals):
Declare Fframe_windows_min_size with ATTRIBUTE_CONST, too.  Sort.
* src/frame.c (Fframe_windows_min_size): New placeholder function.
(syms_of_frame): Define it.
* src/window.c (Fwindow__sanitize_window_sizes): New placeholder.
(syms_of_window): Define it.

9 years ago* INSTALL: Mention 'make WERROR_CFLAGS='.
Paul Eggert [Sun, 4 Jan 2015 09:10:26 +0000 (01:10 -0800)]
* INSTALL: Mention 'make WERROR_CFLAGS='.

9 years ago* doc/lispref/files.texi: Fix xref typo.
Paul Eggert [Sun, 4 Jan 2015 08:50:35 +0000 (00:50 -0800)]
* doc/lispref/files.texi: Fix xref typo.

9 years ago# ChangeLog fixes
Glenn Morris [Sun, 4 Jan 2015 08:22:29 +0000 (00:22 -0800)]
# ChangeLog fixes

9 years agoClarify 'make info'
Paul Eggert [Sun, 4 Jan 2015 03:11:50 +0000 (19:11 -0800)]
Clarify 'make info'

* Makefile.in (info): Use GNU make conditional rather than
an '@' rule with a shell conditional, so that the builder can
see the submake.

9 years agoLess 'make' chatter for oldXMenu
Paul Eggert [Sun, 4 Jan 2015 02:52:41 +0000 (18:52 -0800)]
Less 'make' chatter for oldXMenu

* Makefile.in (AM_V_GEN, am__v_GEN_, am__v_GEN_0, am__v_GEN_1)
(AM_V_at, am__v_at_, am__v_at_0, am__v_at_1): New macros.
(libXMenu11.a): Use them.

9 years agoLess 'make' chatter for lwlib
Paul Eggert [Sun, 4 Jan 2015 02:51:37 +0000 (18:51 -0800)]
Less 'make' chatter for lwlib

* Makefile.in (AM_V_GEN, am__v_GEN_, am__v_GEN_0, am__v_GEN_1)
(AM_V_at, am__v_at_, am__v_at_0, am__v_at_1): New macros.
(liblw.a): Use them.

9 years agoLess 'make' chatter for lisp dir
Paul Eggert [Sun, 4 Jan 2015 02:50:41 +0000 (18:50 -0800)]
Less 'make' chatter for lisp dir

* lisp/Makefile.in (THEFILE): Define to be 'no-such-file' by default,
to make it clearer that the caller must specify it.
(compile-onefile): Remove, replacing by ...
($(THEFILE)c): ... new rule.  This lets us use AM_V_GEN here.
($(THEFILE)c, .el.elc, $(MH_E_DIR)/mh-loaddefs.el)
($(TRAMP_DIR)/tramp-loaddefs.el, $(CAL_DIR)/cal-loaddefs.el)
($(CAL_DIR)/diary-loaddefs.el, $(CAL_DIR)/hol-loaddefs.el):
Use AM_V_GEN to lessen 'make' chatter.
(.el.elc): Omit duplicate comment.
* src/Makefile.in (%.elc): Adjust to compile-onefile change in
../lisp/Makefile.in.

9 years agoLess 'make' chatter for lib-src
Paul Eggert [Sun, 4 Jan 2015 02:44:23 +0000 (18:44 -0800)]
Less 'make' chatter for lib-src

* Makefile.in (blessmail): Less 'make' chatter here.

9 years agoLess 'make' chatter for leim
Paul Eggert [Sun, 4 Jan 2015 02:43:27 +0000 (18:43 -0800)]
Less 'make' chatter for leim

* Makefile.in (AM_DEFAULT_VERBOSITY, AM_V_GEN, am__v_GEN_)
(am__v_GEN_0, am__v_GEN_1, AM_V_at, am__v_at_, am__v_at_0)
(am__v_at_1): New macros, from src/Makefile.in.
(${leimdir}/quail/%.el, misc_convert, ${leimdir}/leim-list.el)
(${leimdir}/ja-dic/ja-dic.el): Use them.

9 years agoLess 'make' chatter for admin/grammars
Paul Eggert [Sun, 4 Jan 2015 02:42:06 +0000 (18:42 -0800)]
Less 'make' chatter for admin/grammars

* grammars/Makefile.in (AM_DEFAULT_VERBOSITY, AM_V_GEN)
(am__v_GEN_, am__v_GEN_0, am__v_GEN_1, AM_V_at, am__v_at_)
(am__v_at_0, am__v_at_1): New macros, from src/Makefile.in.
(${bovinedir}/%-by.el, ${bovinedir}/scm-by.el)
(${cedetdir}/semantic/%-wy.el, ${wisentdir}/%-wy.el)
(${wisentdir}/javat-wy.el, ${cedetdir}/srecode/srt-wy.el): Use them.

9 years agoLess 'make' chatter for VCSWITNESS
Paul Eggert [Sun, 4 Jan 2015 02:40:51 +0000 (18:40 -0800)]
Less 'make' chatter for VCSWITNESS

* Makefile.in (dirstate, VCSWITNESS): New macros.
(src): Use them to lessen 'make' chatter.

9 years agoLess 'make' chatter in batch mode
Paul Eggert [Sun, 4 Jan 2015 02:28:35 +0000 (18:28 -0800)]
Less 'make' chatter in batch mode

* admin/unidata/unidata-gen.el (unidata-gen-files):
* lisp/emacs-lisp/autoload.el (autoload-generate-file-autoloads):
* lisp/emacs-lisp/bytecomp.el (byte-compile-file):
* lisp/files.el (save-buffer, basic-save-buffer):
* lisp/international/quail.el (quail-update-leim-list-file):
Don't output messages like "Generating ..." in batch mode.

9 years agobatch write-region no longer says "Wrote FOO"
Paul Eggert [Sun, 4 Jan 2015 01:48:23 +0000 (17:48 -0800)]
batch write-region no longer says "Wrote FOO"

This cuts down on 'make' chatter a bit.
* doc/lispref/files.texi (Writing to Files):
* etc/NEWS: Document this.
* src/fileio.c (Fwrite_region):
Don't output "Wrote /whatever/foo.elc" if noninteractive.

9 years agoUnbreak `mouse-action' property in text buttons
Dmitry Gutov [Sun, 4 Jan 2015 00:24:53 +0000 (03:24 +0300)]
Unbreak `mouse-action' property in text buttons

* lisp/button.el (push-button): Fix regression from 2012-12-06.

9 years agoRevert previous change to produce_composite_glyph
Paul Eggert [Sat, 3 Jan 2015 22:37:05 +0000 (14:37 -0800)]
Revert previous change to produce_composite_glyph

* term.c (produce_composite_glyph): Revert previous change (Bug#19496).

9 years agoOnly show "Back" when the marker stack is non-empty
Dmitry Gutov [Sat, 3 Jan 2015 14:02:04 +0000 (16:02 +0200)]
Only show "Back" when the marker stack is non-empty

* lisp/menu-bar.el (menu-bar-goto-menu): Use it.

* lisp/progmodes/xref.el (xref-marker-stack-empty-p): New function.

9 years agoDon't remap `next-line' and `previous-line' in xref keymap
Dmitry Gutov [Sat, 3 Jan 2015 13:53:18 +0000 (15:53 +0200)]
Don't remap `next-line' and `previous-line' in xref keymap

* lisp/progmodes/xref.el (xref--window-configuration): New variable.
(xref-show-location-at-point): New command.
(xref--restore-window-configuration): New function.
(xref-next-line, xref-prev-line): Delegate to
`xref-show-location-at-point'.
(xref--location-at-point): Don't signal the error.
(xref-goto-xref): Do that here instead.
(xref--xref-buffer-mode): Add `xref--restore-window-configuration'
to `pre-command-hook'.
(xref--xref-buffer-mode-map): Don't remap `next-line' and
`previous-line'.  Additionally bind `xref-next-line' and
`xref-prev-line' to `n' and `p' respectively.  Bind
`xref-show-location-at-point' to `C-o'.