Martin Rudalics [Thu, 2 Jul 2015 12:58:31 +0000 (14:58 +0200)]
Some further fixes in Change Window node. (Bug#20183)
* doc/emacs/windows.texi (Change Window): Replace "rearranging"
by "resizing" in section title. Add some concept indices.
Suggested by N. Jackson (Bug#20183).
Paul Eggert [Thu, 2 Jul 2015 05:24:51 +0000 (22:24 -0700)]
Don't display ‘’ as `' under X in en_GB
The curved quote setup code invokes (char-displayable-p ?‘),
but this isn’t reliable until after the X frame replaces the
terminal frame (Bug#20926).
* lisp/international/mule-cmds.el (set-locale-environment):
Move curved quote setup code from here ...
* lisp/startup.el (command-line): ... to here, after creating
the X frame.
Eli Zaretskii [Wed, 1 Jul 2015 16:33:56 +0000 (19:33 +0300)]
Be more tolerant to fonts named "Foobar-12"
* src/frame.c (x_set_font): If font_spec_from_name returns nil,
don't barf; instead, request a new fontset to be generated. This
avoids unnecessarily rejecting fonts named against XLFD rules. See
http://lists.gnu.org/archive/html/help-emacs-windows/2015-06/msg00001.html,
for the description of the original problem.
* lisp/faces.el (set-face-attribute): Don't be fooled too easily
by a hyphen in a font's name.
Eli Zaretskii [Wed, 1 Jul 2015 16:27:13 +0000 (19:27 +0300)]
Fix value of posn-at-pont in R2L lines
* src/keyboard.c (Fposn_at_x_y, Fposn_at_point): Allow X pixel
coordinate of -1, for a newline in a right-to-left line that
overflowed into the left fringe.
Stefan Monnier [Wed, 1 Jul 2015 13:31:25 +0000 (09:31 -0400)]
(cl--copy-slot-descriptor): Copy the `props' alist as well
* lisp/emacs-lisp/cl-preloaded.el (cl--copy-slot-descriptor-1):
Rename from cl--copy-slot-descriptor.
(cl--copy-slot-descriptor): New function. Copy the alist (bug#20914).
Glenn Morris [Tue, 30 Jun 2015 18:59:04 +0000 (14:59 -0400)]
Improve reproducibility of generated loaddefs file.
* lisp/emacs-lisp/autoload.el (autoload-generate-file-autoloads):
Make the return value the modtime of the input file (if no autoloads).
(update-directory-autoloads): In the "no autoloads" section,
use "most recent modtime" rather than "current time".
Eli Zaretskii [Tue, 30 Jun 2015 15:59:21 +0000 (18:59 +0300)]
Don't block changes in mouse pointer inside 'track-mouse'
* etc/NEWS:
* doc/lispref/frames.texi (Mouse Tracking): Document the special
effect of setting 'track-mouse' to 'dragging'.
* lisp/textmodes/artist.el (artist-mouse-draw-continously):
* lisp/ruler-mode.el (ruler-mode-mouse-drag-any-column-iteration):
* lisp/mouse-drag.el (mouse-drag-throw):
* lisp/mouse.el (mouse-drag-line): Set 'track-mouse' to 'dragging'
to avoid changes in the shape of the mouse pointer.
* src/xdisp.c (define_frame_cursor1): Don't change the mouse
pointer shape when do_mouse_tracking has the value of 'dragging',
not just any non-nil value. (Bug#20934)
(syms_of_xdisp): DEFSYM 'dragging'.
Ted Zlatanov [Tue, 30 Jun 2015 03:07:30 +0000 (23:07 -0400)]
cfengine.el: update for the upcoming CFEngine 3.7 release
Update for the upcoming CFEngine 3.7 release: support macros and
quoted context strings; reformat JSON; indent promise attributes 2
units by default; give function parameter descriptions in the eldoc
glue.
* cfengine.el: Update version and docs and fix name. Autoload
`json-pretty-print'. Support new features in 3.7.
(cfengine-parameters-indent): Set default promise attribute indent to
2 more than the promise itself.
(cfengine3-macro-regex): New variable to match the new macro syntax.
(cfengine3-font-lock-keywords): Use it to highlight macros.
(cfengine3-indent-line): Use it to indent macros to column 0.
(cfengine3-class-selector-regex): Update for the new quoted strings
format.
(cfengine3-reformat-json-string): New function to reformat a JSON
string using `json-pretty-print'.
(cfengine3-format-function-docstring): Use function parameter
description if it's provided by the cf-promises syntax dump.
Eli Zaretskii [Mon, 29 Jun 2015 16:10:20 +0000 (19:10 +0300)]
Allow font names that end in "-NN", where NN is a number
* src/font.c (font_load_for_lface): If the font-spec didn't match
any available fonts, try again without interpreting trailing "-NN"
as the font size. For the description of the original problem, see
http://lists.gnu.org/archive/html/help-emacs-windows/2015-06/msg00001.html
Dmitry Gutov [Fri, 26 Jun 2015 17:21:50 +0000 (20:21 +0300)]
Add --color Grep option to the command dynamically
* lisp/progmodes/grep.el (grep-template, grep-find-template):
Update the description for <C>. (Bug#20728)
(grep-compute-defaults): Don't add the --color option to
grep-options. Only add it to grep-command.
(grep-expand-keywords): Expand the env value opts into <C>.
(grep-expand-template): Replace cf in the env with the opts list,
that can include -i and --color.
* lisp/progmodes/xref.el (xref-collect-matches): Do not remove
"--color=always" from the template, because we don't have to.
Paul Eggert [Sat, 27 Jun 2015 19:16:51 +0000 (12:16 -0700)]
cl-extra fixes for most-negative-fixnum
* lisp/emacs-lisp/cl-extra.el (cl-gcd, cl-lcm, cl-random):
Don't mishandle an argument equal to most-negative-fixnum,
whose absolute value equals itself.
(cl-gcd, cl-lcm): Use dolist rather than doing it by hand.
Paul Eggert [Sat, 27 Jun 2015 17:57:02 +0000 (10:57 -0700)]
Initialize cl--gensym-counter to 0
Previously it was initialized to a random value, which made it
harder to reproduce earlier Emacs runs. The need for a random
value went away when Emacs introduced and used the #: syntax for
uninterned symbols (Bug#20862).
* doc/misc/cl.texi (Creating Symbols, Common Lisp Compatibility):
Document that cl--gensym-counter now starts with 0.
* lisp/emacs-lisp/cl-lib.el (cl--gensym-counter): Remove.
(cl--random-time): Move to near only remaining use.
* lisp/emacs-lisp/cl-macs.el (cl--gensym-counter): Initialize to 0.
Paul Eggert [Sat, 27 Jun 2015 15:34:44 +0000 (08:34 -0700)]
Improve docstring for macroexp-let2
* lisp/emacs-lisp/macroexp.el (macroexp-let2):
Improve as per suggestion by RMS in:
http://lists.gnu.org/archive/html/emacs-devel/2015-06/msg00621.html
Also, rename args to match new doc string.
Eli Zaretskii [Sat, 27 Jun 2015 11:27:23 +0000 (14:27 +0300)]
Fix VC test suite on MS-Windows
* lisp/vc/vc-svn.el (vc-svn-create-repo): Make sure the file: URL
always starts with 3 slashes after the colon.
* test/automated/vc-tests.el (vc-test--create-repo-function): Use
'w32-application-type' to invoke CVS on MS-Windows with properly
formatted CVSROOT directory name.
Eli Zaretskii [Sat, 27 Jun 2015 08:00:38 +0000 (11:00 +0300)]
Avoid error in TLS connections due to incorrect format
* src/gnutls.c (Fgnutls_boot): Use the %x conversion specifier in
the call to 'error', instead of the unsupported %u. Reported by
lo2net <fangtao0901@gmail.com>. (Bug#20908)
Eli Zaretskii [Fri, 26 Jun 2015 06:45:29 +0000 (08:45 +0200)]
Fix invisible mouse pointers on Windows.
* src/w32fns.c: Include windowsx.h.
(w32_wnd_proc): If the mouse moved and the mouse pointer is
invisible, make it visible again even when the main (Lisp)
thread is busy.
* src/w32term.c (w32_toggle_invisible_pointer): Rather then
garbaging the frame have the input thread call SetCursor.
Martin Rudalics [Fri, 26 Jun 2015 06:28:08 +0000 (08:28 +0200)]
Provide invisible mouse pointers on Windows. (Bug#6105) (Bug#12922)
* src/w32fns.c (w32_wnd_proc): Handle f->pointer_invisible
for WM_SETCURSOR and WM_EMACS_SETCURSOR cases.
* src/w32term.c (w32_hide_hourglass): Handle
f->pointer_invisible.
(w32_toggle_invisible_pointer): New function.
(w32_create_terminal): Add w32_toggle_invisible_pointer as
toggle_invisible_pointer_hook for this terminal.
Xue Fuqiao [Fri, 26 Jun 2015 01:05:40 +0000 (09:05 +0800)]
Doc fix for deletion commands
'delete-char' does not respect the value of 'delete-active-region'.
* doc/emacs/killing.texi (Deletion):
Fix documentation for some single-char deletion commands.
Paul Eggert [Thu, 25 Jun 2015 20:31:18 +0000 (13:31 -0700)]
Fix submake dependency bug with .h files
* src/Makefile.in ($(libsrc)/make-docfile$(EXEEXT)):
Depend on $(lib)/libgnu.a, so that we build $(lib)/*/*.h
before the submake in $(libsrc) would spin off a subsubmake
for $(lib) in parallel with our submake for $(lib) (Bug#20894).
Paul Eggert [Thu, 25 Jun 2015 14:21:20 +0000 (07:21 -0700)]
Translate undisplayable ‘ to `
* doc/lispref/help.texi (Keys in Documentation):
* lisp/international/mule-cmds.el (set-locale-environment):
* lisp/term/w32console.el (terminal-init-w32console):
* src/doc.c (Fsubstitute_command_keys, Vhelp_quote_translation):
If ‘ is not displayable, transliterate it to `, not to '. See:
http://lists.gnu.org/archive/html/emacs-devel/2015-06/msg00542.html
Oleh Krehel [Thu, 25 Jun 2015 11:14:29 +0000 (13:14 +0200)]
lisp/emacs-lisp/cl-indent.el: Fix indent of with-output-to-string
* lisp/emacs-lisp/cl-indent.el (common-lisp-indent-function):
`with-output-to-string' should have the same indent as `progn'.
This is in line with the declaration of `with-output-to-string'.
Paul Eggert [Thu, 25 Jun 2015 06:34:26 +0000 (23:34 -0700)]
Get ‘./configure; make -C src emacs’ to work
Without this fix, lib/fcntl.h isn't built in time (Bug#20894).
* lib-src/Makefile.in (../lib/libgnu.a):
* src/Makefile.in ($(lib)/libgnu.a): Build all, not libgnu.a.
Paul Eggert [Thu, 25 Jun 2015 03:10:03 +0000 (20:10 -0700)]
Fix GC bugs --with-wide-int and Qnil == 0
Use the same alignment for the !USE_LSB_TAG case as for the
more-typical USE_LSB_TAG case. The attempt to support arbitrary
alignments with !USE_LSB_TAG had subtle bugs in garbage collection
once we changed the representation of symbols so that Qnil == 0.
Problem reported by Eli Zaretskii (Bug#20862).
* src/alloc.c (XMALLOC_HEADER_ALIGNMENT) [XMALLOC_OVERRUN_CHECK]:
* src/alloc.c (vector_alignment, union aligned_Lisp_Symbol)
(union aligned_Lisp_Misc, maybe_lisp_pointer, pure_alloc):
Use same alignment for !USE_LSB_TAG as for USE_LSB_TAG.
* src/alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS): Remove.
This optimization in the !USE_LSB_TAG case is no longer valid when
symbols are represented via offsets. Change the only use to
assume that pointers might hide in objects.
* src/lisp.h (alignas) [!USE_LSB_TAG]:
Require support in this case, too.
(TAG_SYMOFFSET, XSYMBOL) [!USE_LSB_TAG]: Do not shift the offset.
This is OK, because the !USE_LSB_TAG case now applies only when
Lisp_Object is wider than void *, so there's no longer any need
to shift the offset. Not shifting the offset means that
symbol representations have the same alignment as pointers,
which the GC assumes.
Artur Malabarba [Wed, 24 Jun 2015 19:01:10 +0000 (20:01 +0100)]
* lisp/character-fold.el: New file (Bug#20887)
(character-fold-to-regexp): New function.
* lisp/replace.el (replace-search): Check value of
`character-fold-search'.
* lisp/isearch.el: Move character-folding code to
character-fold.el
(isearch-toggle-character-fold): New command.
(isearch-mode-map): Bind it to "\M-sf".
(isearch-mode): Check value of `character-fold-search'.
* lisp/gnus/nnmaildir.el (nnmaildir--prepare): Use a more
functional style.
(nnmaildir--update-nov): Remove unused var `numdir'.
(nnmaildir-request-type, nnmaildir--scan, nnmaildir-request-newgroups)
(nnmaildir-request-group, nnmaildir-request-create-group)
(nnmaildir-request-post, nnmaildir-request-move-article)
(nnmaildir-request-accept-article, nnmaildir-active-number): Mark unused args.
(nnmaildir-get-new-mail, nnmaildir-group-alist)
(nnmaildir-active-file): Declare.
(nnmaildir-request-scan): Remove unused vars `group' and `grp-dir'.
(nnmaildir-request-update-info): Remove unused vars `dotfile', `num',
`mark', `end', `new-mark', and `mark-sym'.
(nnmaildir-retrieve-headers): Remove unused args `srv-dir', `dir',
`nlist2'.
(nnmaildir-request-expire-articles):
Remove unused vars `article', `stop' and `nlist2'.
(nnmaildir-request-set-mark): Remove unused vars `begin', `article' and
`end'. Use nnmaildir--article when dyn-binding is needed.
Give the value directly in the `let' for `del-mark', `del-action',
`add-action', and `set-action'. Don't use `add-to-list' on a local var.
(nnmaildir-close-server): Declare those local vars that need to be
dyn-bound.
Paul Eggert [Tue, 23 Jun 2015 23:29:27 +0000 (16:29 -0700)]
Fix bug that munged selection info
On some optimizing C compilers, copying a structure did not
copy the padding bytes between elements, and the type punning
between struct input_data and struct selection_input_data did
not work. Change the C code to use a proper union type instead.
Problem reported by YAMAMOTO Mitsuharu (Bug#20756).
* src/keyboard.c (kbd_buffer, kbd_fetch_ptr, kbd_store_ptr)
(readable_events, discard_mouse_events, kbd_buffer_events_waiting)
(kbd_buffer_get_event, process_special_events, stuff_buffered_input)
(mark_kboards):
Use union buffered_input_event, not struct input_event.
(clear_event, deliver_input_available_signal, process_special_events):
Remove unnecessary forward decls.
(kbd_buffer_store_buffered_event): New function, mostly just the
old kbd_buffer_store_event_hold, except its argument is of type
union buffered_input_event, not struct input_event.
(kbd_buffer_unget_event): Define only if HAVE_X11, since it's
not needed otherwise. Argument is now of type
struct selection_input_event *, not struct input_event *.
All callers changed.
(clear_event): Arg is now of type union buffered_input_event *,
not struct input_event *. All callers changed.
* src/keyboard.h [HAVE_X11]: Include "xterm.h".
(union buffered_input_event): New type.
(kbd_buffer_store_event_hold): Now an inline function,
defined here.
* src/termhooks.h (EVENT_KIND_WIDTH): New constant.
(struct input_event): Use it.
* src/xselect.c (struct selection_event_queue):
Make elements be of type struct selection_input_event,
not struct input_event.
(selection_input_event_equal): New static function.
(x_queue_event): Use it.
(x_queue_event, x_decline_selection_request)
(x_selection_current_request, x_reply_selection_request)
(x_handle_selection_request, x_handle_selection_clear)
(x_handle_selection_event): Use struct selection_input_event,
not struct input_event. All callers changed.
(x_convert_selection): Omit unused first arg. All callers changed.
(Fx_disown_selection_internal): Omit unnecessary union.
* src/xterm.c (handle_one_xevent): Use new union buffered_input_event
rather than rolling our own equivalent. Prefer sie.kind when
setting up that kind of structure.
Call kbd_buffer_store_buffered_event, not kbd_buffer_store_event_hold.
* src/xterm.h (struct selection_input_event: Use EVENT_KIND_WIDTH.
(SELECTION_EVENT_DISPLAY, SELECTION_EVENT_DPYINFO)
(SELECTION_EVENT_REQUESTOR, SELECTION_EVENT_SELECTION)
(SELECTION_EVENT_TARGET, SELECTION_EVENT_PROPERTY)
(SELECTION_EVENT_TIME, x_handle_selection_event):
Arg is now of type struct selection_input_event *)
not struct input_event *. All callers changed.
Artur Malabarba [Tue, 27 Jan 2015 16:08:01 +0000 (14:08 -0200)]
* lisp/isearch.el: Fold many unicode characters to ASCII
(isearch-character-fold-search, isearch--character-fold-extras)
(isearch--character-fold-table): New variable.
(isearch--character-folded-regexp): New function.
(isearch-search-fun-default): Use them.
* lisp/replace.el (replace-character-fold): New variable.
(replace-search): Use it.
Jürgen Hartmann [Tue, 23 Jun 2015 15:43:58 +0000 (17:43 +0200)]
Respect ‘switch-to-visible-buffer’ more rigidly. (Bug#20861)
* lisp/window.el (switch-to-visible-buffer): Doc adjustment.
(switch-to-prev-buffer, switch-to-next-buffer): Respect
switch-to-visible-buffer independent of the windows history.
Glenn Morris [Tue, 23 Jun 2015 06:53:22 +0000 (23:53 -0700)]
Revert 2014-06-25 nextstep/Makefile change.
* nextstep/Makefile.in (${ns_appbindir}): Remove rule.
(${ns_appbindir}/Emacs, links): Create ns_appbindir in the rule,
not as an order-only prerequisite.