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

129133 Commits

Author SHA1 Message Date
Martin Rudalics
3fdd3bb56c Add new frame parameters and associated functions
Add new frame parameters `undecorated', `override-redirect',
`parent-frame', `skip-taskbar', `no-focus-on-map',
`no-accept-focus', `z-group', `delete-before', `no-other-frame',
`mouse-wheel-frame', `min-width', `min-height'.  Add new
functions `frame-restack' and `frame-list-z-order'.

* lisp/cus-start.el (focus-follows-mouse): Adapt customization
type.
* lisp/frame.el (handle-delete-frame): Handle child and
`delete-before' frames.
(other-frame): Stop looking for other frame after one round.
(frame-list-z-order, frame-restack): New functions.
(delete-other-frames): Handle child frames.
* lisp/frameset.el (frameset-persistent-filter-alist)
(frameset--record-relationships): Handle `delete-before',
`parent-frame' and `mouse-wheel-frame' parameters.  Rename
latter from `frameset--record-minibuffer-relationships'.
(frameset--restore-frame): Handle ‘parent-frame’ parameter
specially.
(frameset-restore): Handle `delete-before', `parent-frame' and
`mouse-wheel-frame' parameters.
* lisp/mwheel.el (mwheel-scroll): Handle `mouse-wheel-frame'
parameter.
* lisp/window.el (window--min-size-ignore-p): Fix doc-string.
(mouse-autoselect-window-select, handle-select-window): Major
rewrite.  Try to not ignore errors.  Handle auto-selection of
child frames and different values of `focus-follows-mouse'.
* src/frame.c (frame_windows_min_size): Handle new `min-width'
and `min-height' frame parameters.
(make_frame): Initialize new frame structure members.
(do_switch_frame): Don't reset internal_last_event_frame for
descendant frames.
(Fframe_parent, frame_ancestor_p, Fframe_ancestor_p): New
functions.
(candidate_frame): Don't return `no-other-frame' frame.
(other_frames): New function replacing other_visible_frames.
(delete_frame): Rewrite.  Handle child and `delete-before' frames.
(Fmake_frame_invisible): Call other_frames.
(store_frame_param): Check `delete-before' and `parent-frame'
parameters for circular dependencies.
(frame_parms, syms_of_frame): Add entries for and define new
frame parameters.
(focus_follows_mouse): New meaningful value `auto-raise'.
* src/frame.h (z_group): New enumeration type.
(frame): New slots parent_frame, undecorated, override_redirect,
skip_taskbar, no_focus_on_map, no_accept_focus, z_group.
(fset_parent_frame): New inlined function.
(FRAME_UNDECORATED, FRAME_OVERRIDE_REDIRECT)
(FRAME_PARENT_FRAME, FRAME_SKIP_TASKBAR, FRAME_NO_FOCUS_ON_MAP)
(FRAME_NO_ACCEPT_FOCUS, FRAME_Z_GROUP, FRAME_Z_GROUP_NONE)
(FRAME_Z_GROUP_ABOVE, FRAME_Z_GROUP_ABOVE_SUSPENDED)
(FRAME_Z_GROUP_BELOW): New macros.
(frame_ancestor_p): Add declaration.
* src/gtkutil.c (xg_create_frame_widgets): Handle
`undecorated' and `override-redirect' frame parameters.
(x_wm_set_size_hint): None for child frames.
(xg_set_undecorated, xg_frame_restack, xg_set_skip_taskbar)
(xg_set_no_focus_on_map, xg_set_no_accept_focus)
(xg_set_override_redirect): New functions.
(xg_update_scrollbar_pos, xg_update_horizontal_scrollbar_pos):
Don't let scrollbars obscure child frames.
* src/gtkutil.h: (xg_set_undecorated, xg_frame_restack)
(xg_set_skip_taskbar, xg_set_no_focus_on_map)
(xg_set_no_accept_focus, xg_set_override_redirect): Add extern
declarations.
* src/nsfns.m (ns_frame_parm_handlers): Add entries for new
frame parameters.
(Fx_create_frame): Install `min-width' and `min-height' frame
parameters.
* src/nsterm.m (mouseMoved:): Handle focus_follows_mouse change.
* src/w32fns.c (WS_EX_NOACTIVATE): Define if necessary.
(x_real_positions): Handle child frames.
(x_set_menu_bar_lines): Don't for child frames.
(x_set_undecorated, x_set_parent_frame, x_set_skip_taskbar)
(x_set_no_focus_on_map, x_set_no_accept_focus)
(x_set_z_group): New functions.
(w32_createvscrollbar, w32_createhscrollbar): Don't draw
scroll bars over child frames.
(w32_createwindow): Handle new frame parameters and child frames.
(w32_wnd_proc): Let mouse clicks into a child frame activate
the frame.  Try to handle the `no-accept-focus' parameter.  Do
SetFocus when our window is brought to top or becomes the
foreground window.
(w32_window): Don't initialize menu bar for child frames.
(Fx_create_frame): Handle new frame parameters.
(x_create_tip_frame): Set explicit_parent slot.
(w32_dialog_in_progress): New function.
(Fx_file_dialog): Handle `z-group-above' frames.
(w32_frame_list_z_order, Fw32_frame_list_z_order)
(w32_frame_restack, Fw32_frame_restack): New functions.
(w32_frame_parm_handlers): Add entries for new frame
parameters.
* src/w32font.c (Fx_select_font): Handle `z-group-above'
frames during font selection dialogue.
* src/w32term.c (construct_mouse_wheel): Construct mouse wheel
event from F's w32 window.
(w32_mouse_position): Handle child frames.
(w32_set_vertical_scroll_bar, w32_set_horizontal_scroll_bar):
Don't draw scroll bars over child frames.
(w32_read_socket): Always erase background of child frames.
When generating SELECT_WINDOW_EVENTs handle new value of
`focus-follows-mouse' and handle `no-accept-focus' parameter.
Handle `mouse-wheel-frame' parameter.
(x_calc_absolute_position, x_set_offset, x_set_window_size):
Handle child frames.
(x_make_frame_visible): Handle child frames specially.  Handle
`no-focus-on-map' parameter.
* src/w32term.h (w32_dialog_in_progress): Add external
declaration.
* src/xdisp.c (x_consider_frame_title, prepare_menu_bars): Not
for child frames.
* src/xfns.c (Xm/MwmUtil.h): Include for WM hints.
(PropMotifWmHints, PROP_MOTIF_WM_HINTS_ELEMENTS): Define for
non-Motif, non-GTK case.
(x_real_pos_and_offsets): Handle child frames.
(x_set_undecorated, x_set_parent_frame)
(x_set_no_focus_on_map, x_set_no_accept_focus)
(x_set_override_redirect): New functions.
(x_set_menu_bar_lines): Not for child frames.
(x_window): Handle `undecorated' and `override_redirect' cases.
(Fx_create_frame): Handle new frame parameters.
(frame_geometry): Handle child frames and outer border.
(x_frame_list_z_order, Fx_frame_list_z_order)
(x_frame_restack, Fx_frame_restack): New functions.
(Fx_file_dialog, Fx_select_font): Set x_menu_set_in_use.
(x_frame_parm_handlers): Add entries for new frame parameters.
* src/xmenu.c (x_menu_set_in_use): Handle `z-group-above'
frames.
* src/xterm.c (x_set_frame_alpha): Don't set alpha of parent
for child frames.
(XTmouse_position): Handle child frames.
(x_scroll_bar_create, x_scroll_bar_expose): Don't let scroll
bars obscure child frames.
(handle_one_xevent): Handle child frame positions.  If necessary
set `skip-taskbar' and reassign proper `z-group' when we are
mapped.  When generating SELECT_WINDOW_EVENTs handle new value
of `focus-follows-mouse'.  Handle `mouse-wheel-frame' parameter.
Let mouse clicks into a child frame activate the frame.
(x_calc_absolute_position, x_set_offset): Handle child frames
specially.
(x_set_skip_taskbar, x_set_z_group): New functions.
(x_make_frame_visible): Handle child frames.
(ATOM_REFS_INIT): Add entries for
Xatom_net_wm_state_skip_taskbar, Xatom_net_wm_state_above,
Xatom_net_wm_state_below.
* src/xterm.h (top-level): Declare Xatom_net_wm_state_above,
Xatom_net_wm_state_below and Xatom_net_wm_state_skip_taskbar.
(x_set_skip_taskbar, x_set_z_group): Add extern declarations.
2017-04-12 10:38:25 +02:00
Glenn Morris
449bc49c76 Update a package test for hydra
* test/lisp/emacs-lisp/package-tests.el (with-package-test):
Also bind package-gnupghome-dir, see eg
http://hydra.nixos.org/build/51462182 .
2017-04-11 08:42:54 -07:00
Martin Rudalics
ea6c880aa6 Frame movement, focus and hook related changes
New hook `move-frame-functions'.  Run `focus-in-hook'
after switching to frame that gets focus.  Don't run
XMoveWindow for GTK.

* lisp/frame.el (handle-move-frame, frame-size-changed-p): New
functions.

* src/frame.c (do_switch_frame): Simplify code.
(Fhandle_switch_frame): Switch frame before running
`handle-focus-in'.
(Vfocus_in_hook, Vfocus_out_hook): Clarify doc-strings.
(Vmove_frame_functions): New hook variable.
* src/keyboard.c (kbd_buffer_get_event): Handle
MOVE_FRAME_EVENT.  Handle SELECT_WINDOW_EVENT separately.
(head_table): Add Qmove_frame entry.
(syms_of_keyboard): Add Qmove_frame.
(keys_of_keyboard): Define key for `move-frame'.
* src/termhooks.h (event_kind): Add MOVE_FRAME_EVENT.
* src/w32term.c (w32_read_socket): Create MOVE_FRAME_EVENT.
* src/window.c (run_window_size_change_functions): Record size of
FRAME's minibuffer window too.
* src/xterm.c (handle_one_xevent): Create MOVE_FRAME_EVENT.
(x_set_offset): For GTK call gtk_widget_move instead of
XMoveWindow.
2017-04-11 12:37:26 +02:00
Werner LEMBERG
0eef8e9af7 Avoid abort in ftfont.c due to faulty fonts
* src/ftfont.c (ftfont_get_metrics): Try loading the font without
hinting, before aborting.  (Bug#25945)
2017-04-11 13:06:30 +03:00
Eli Zaretskii
a6d50401b4 Document 'line-pixel-height'
* doc/lispref/display.texi (Size of Displayed Text): Document
line-pixel-height.  Suggested by Tak Kunihiro
<tkk@misasa.okayama-u.ac.jp>.  (Bug#26379)
2017-04-11 12:40:37 +03:00
Jens Lechtenboerger
695eacc21e Introduce customizable variable 'package-gnupghome-dir'
* lisp/emacs-lisp/package.el (package-import-keyring)
(package--check-signature-content, package-check-signature):
Use new variable package-gnupghome-dir to control which GnuPG
homedir to use.
* doc/emacs/package.texi: Mention package-gnupghome-dir.
* etc/NEWS: Mention package-gnupghome-dir.
2017-04-11 12:27:37 +03:00
Martin Rudalics
291b76f91e Set x_gtk_use_window_move by default for fixing bug#25851 and bug#25943
This activates a change that was installed a few weeks ago but whose
ChangeLog was inadvertently dropped during its commit.  The proper
ChangeLog is included below as part of the present commit.

* src/gtkutil.c (xg_set_geometry): When x_gtk_use_window_move
is set avoid calling x_gtk_parse_geometry (Bug#25851).
(x_wm_set_size_hint): When x_gtk_use_window_move is set, set
PPosition, USPosition and USSize flags if requested.
* src/xterm.c (x_set_offset): With GTK when
x_gtk_use_window_move is set, leave it entirely to
gtk_window_move to position the window and skip any
post-adjustments (Bug#25851 and Bug#25943).
(x_gtk_use_window_move): New variable.
2017-04-11 08:29:41 +02:00
Alan Mackenzie
230e25fd67 Fix a loop in C Mode caused by inadequate analysis of comments.
After M-;, and the insertion of the opening "/*", the CC Mode after-change
function got confused, since the new comment opener matched the end of a
subsequent comment, but moving back over that comment did not come back to the
starting point.  Fix this.

* lisp/progmodes/cc-engine.el (c-end-of-macro): Add a limit parameter, wherer
point is left if no end-of-macro is found before it.
(c-forward-sws): Change the `safe-start' mechanism.  Now `safe-start' is
non-nil except where we have an unclosed block comment at the end of a macro.
This enables us to populate the cache more fully, at the cost of some run
time.
2017-04-10 21:01:38 +00:00
Lars Brinkhoff
3ccd0ff106 Add PVSIZE function to return the size of a pseudovector.
* src/lisp.h (PVSIZE): New function.

* src/chartab.c (copy_char_table):
* src/data.c (Ftype_of, Finteractive_form, Faref, Faset):
* src/doc.c (Fdocumentation, store_function_docstring):
* src/eval.c (Fcommandp, funcall_lambda, lambda_arity, Ffetch_bytecode):
* src/fns.c (Flength, Fcopy_sequence):
* src/font.h (FONT_SPEC_P, FONT_ENTITY_P, FONT_OBJECT_P):
* src/lread.c (substitute_object_recurse):
* src/src/print.c (print_object):
  Use it.
2017-04-10 20:35:13 +02:00
Michael Albinus
dd42ca427c Add Tramp tests
* lisp/net/tramp.el (tramp-syntax): Adapt docstring.

* test/lisp/net/tramp-tests.el
(tramp-test01-file-name-syntax-simplified)
(tramp-test01-file-name-syntax-separate)
(tramp-test02-file-name-dissect-simplified)
(tramp-test02-file-name-dissect-separate): New tests.
2017-04-10 17:22:13 +02:00
Martin Rudalics
375bfbde06 Make sure that `shell' makes BUFFER current
* lisp/shell.el (shell): Restrict scope of recently added
`with-current-buffer' to make sure that BUFFER is current when
`shell' returns.
2017-04-10 10:21:44 +02:00
Dmitry Gutov
0fb52dcc45 ; Add a FIXME about handing a missing find or grep program 2017-04-10 06:22:55 +03:00
Jim Blandy
f3662966c3 Default to PCRE syntax when reading .hgignore
* lisp/vc/vc-hg.el (vc-hg--slurp-hgignore-1):
Default to the PCRE syntax (bug#26249).
2017-04-10 05:52:40 +03:00
Michael Albinus
9e1f45d98f Document Tramp changes
* doc/misc/tramp.texi (Change file name syntax): New node.

* etc/NEWS: Mention `tramp-change-syntax'.

* lisp/net/tramp.el (tramp-file-name-regexp): Reinsert it.
External packages uses it.
(tramp-syntax): Set also `tramp-file-name-regexp'.
2017-04-09 13:28:24 +02:00
Paul Eggert
43bc45ba16 Merge from gnulib (Bug#26398)
This incorporates:
2017-04-08 getopt: prefer - to _ in new file names
2017-04-08 getopt: port recent getopt changes to macOS
* .gitignore: Add lib/getopt-cdefs.h.
* lib/getopt-cdefs.in.h: Rename from lib/getopt_cdefs.in.h.
* lib/getopt-core.h: Rename from lib/getopt_core.h.
* lib/getopt-ext.h: Rename from lib/getopt_ext.h.
* lib/getopt-pfx-core.h: Rename from lib/getopt_pfx_core.h.
* lib/getopt-pfx-ext.h: Rename from lib/getopt_pfx_ext.h.
* lib/getopt.in.h, lib/unistd.in.h, m4/getopt.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
2017-04-09 00:55:23 -07:00
Ken Raeburn
440bafef7c Write updated loaddefs to a temporary file and rename into place.
In a parallel build, byte compilation can be running at the same times
as loaddefs.el is being regenerated.  However, in a CANNOT_DUMP build,
loaddefs.el is read at startup and must always be in a usable state.

* lisp/Makefile.in ($(lisp)/loaddefs.el): Write generated output to
loaddefs.el.new and then rename it to loaddefs.el.
2017-04-09 02:45:45 -04:00
Glenn Morris
e3c15342a5 In the manual, mention pops and imaps
* doc/emacs/rmail.texi (Movemail, Remote Mailboxes):
Mention pops and imaps protocols.
2017-04-08 19:35:38 -07:00
Glenn Morris
e9fc0ce7be * doc/emacs/rmail.texi: Prefer @command to @code for movemail. 2017-04-08 19:24:13 -07:00
Sergey Poznyakoff
48536f67e0 Fix rmail handling of movemail protocols (bug#18278)
* lisp/mail/rmail.el (rmail-remote-proto-p): New function.
(rmail-parse-url): Return protocol in second list element.
Only use passwords with remote mailboxes.
(rmail-insert-inbox-text): Handle non-simple local
mailboxes (maildir, MH, etc.).
2017-04-08 18:40:53 -07:00
Glenn Morris
79b1669c24 Fix typos in manual re movemail local mailboxes
* doc/emacs/rmail.texi (Movemail, Other Mailbox Formats):
Fix examples of local mailbox urls.
2017-04-08 18:10:10 -07:00
Glenn Morris
f4bb93fabc * lisp/gnus/nnmail.el (nnmail-crosspost-link-function): Simplify. 2017-04-08 13:45:55 -07:00
Glenn Morris
bca1fde85f Remove references to OS/2 in code, doc, and comments
* lisp/gnus/nnheader.el (nnheader-read-timeout)
(nnheader-file-name-translation-alist): Remove OS/2 case, and simplify.
* lisp/emulation/viper-util.el (viper-color-defined-p):
* lisp/net/pop3.el (pop3-read-timeout):
* lisp/net/imap.el (imap-read-timeout):
* lisp/url/url-privacy.el (url-setup-privacy-info): Remove OS/2 case.
* lisp/emulation/viper-ex.el (viper-glob-function):
* lisp/vc/ediff-util.el (ediff-submit-report): Doc fix.
* lisp/cus-edit.el (custom-display): Remove "pm" (OS/2).
* doc/emacs/msdos-xtra.texi (MS-DOS):
* doc/misc/gnus.texi (Various Various):
* doc/misc/viper.texi (Rudimentary Changes): Remove mentions of OS/2.
; * lisp/url/url.el, lisp/url/url-vars.el:
; * lisp/progmodes/cperl-mode.el: Remove old comments.
2017-04-08 13:16:08 -07:00
Michael Albinus
b7d61609bd Tune Tramp syntax
* lisp/net/tramp-cmds.el (tramp-change-syntax):
Use `tramp-syntax-values'.

* lisp/net/tramp-compat.el (tramp-compat-tramp-syntax): New defsubst.

* lisp/net/tramp.el (tramp-syntax): Rename possible values.
(tramp-syntax-values): New defun.
(tramp-prefix-format, tramp-method-regexp)
(tramp-postfix-method-format, tramp-prefix-ipv6-format)
(tramp-postfix-ipv6-format, tramp-postfix-host-format)
(tramp-completion-file-name-regexp): Use `tramp-compat-tramp-syntax'
and changed values.
(tramp-completion-file-name-regexp-default): Rename from
`tramp-completion-file-name-regexp-unified'.  Adapt docstring.
(tramp-completion-file-name-regexp-simplified): Rename from
`tramp-completion-file-name-regexp-old-style'.  Adapt docstring.
(tramp-initial-completion-file-name-regexp):
Use `tramp-completion-file-name-regexp-default'.
(tramp-run-real-handler): Do not autoload any longer.
2017-04-08 18:35:06 +02:00
Mark Oteiza
c5f319eb3a Replace more nested ifs with cond
This is a continuation of d526047 "Replace more nested ifs with cond".
* lisp/play/dunnet.el (dun-firstword, dun-firstwordl, dun-cat): Use
when and cond where appropriate.
2017-04-08 11:36:56 -04:00
Mark Oteiza
fd4b83ca7c Adjust the edebug spec of if-let*
This was fixed in Bug#24748, but now looking more closely, using gate in
the spec seems correct.  See (info "(elisp) Backtracking").
* lisp/emacs-lisp/subr-x.el (if-let*): Use gate in edebug spec.
2017-04-08 11:36:56 -04:00
Mark Oteiza
1c69215c51 Replace some uses of cl-member-if with apply
From the mhtml-mode series.  Some of the uses of cl-lib are not
necessary.
* lisp/align.el: Don't require cl-lib.
(align-region): Use apply instead of cl-member-if.
* lisp/emulation/viper.el: Don't require cl-lib.
(viper-mode, this-major-mode-requires-vi-state): Use apply instead of
cl-member-if.
2017-04-08 11:36:56 -04:00
Philipp Stephani
98bfac68b9 Validate SPEC of `dolist', cf. Bug#25477.
* lisp/subr.el (dolist): Test type and length of SPEC.
* test/lisp/subr-tests.el (subr-tests--dolist--wrong-number-of-args):
Add unit test.
2017-04-08 17:15:31 +02:00
Philipp Stephani
5ea696fd24 Add unit test for Bug#26378
* test/lisp/vc/ediff-diff-tests.el
(ediff-diff-tests--ediff-exec-process--nil): New unit test.
2017-04-08 16:55:56 +02:00
Lars Brinkhoff
4fbfd7ad53 Fix circular read syntax for records.
* lread.c (substitute_object_recurse): Work with records.

* lread-tests.el (lread-record-1): New test.
2017-04-08 08:47:46 +02:00
Paul Eggert
a2b3fea957 Deprecate copy-record in favor of copy-sequence
Since copy-sequence seems to be needed anyway for records, have it
work on records, and remove copy-record as being superfluous.
* doc/lispref/records.texi (Records, Record Functions):
* lisp/emacs-lisp/cl-macs.el (cl-defstruct):
* lisp/emacs-lisp/eieio.el (make-instance, clone):
* test/src/alloc-tests.el (record-3):
Use copy-sequence, not copy-record, to copy records.
* doc/lispref/sequences.texi (Sequence Functions)
(Array Functions): Document that aref and copy-sequence
work on records.
* etc/NEWS: Omit copy-record.
* src/alloc.c (Fcopy_record): Remove.
* src/data.c (Faref): Document that arg can be a record.
* src/fns.c (Fcopy_sequence): Copy records, too.
2017-04-07 18:54:40 -07:00
Paul Eggert
a614cd416c Fix dependency checking in src/Makefile.in
* src/Makefile.in (AUTO_DEPEND, DEPDIR, DEPFLAGS): Move includes of
dependency files until after ALLOBJS is defined, since it uses ALLOBJS.
Otherwise, some dependencies will be missed.
2017-04-07 18:54:40 -07:00
Paul Eggert
6fbbfc77d4 Minor tuneup of write-region change
* src/fileio.c (write_region): Use SCHARS, not Flength,
on a value known to be a string.
2017-04-07 18:54:39 -07:00
Noam Postavsky
c323659344 Adjust write-region so file name is at the beginning again
* lisp/epa-file.el (epa-file-write-region):
* lisp/gnus/mm-util.el (mm-append-to-file):
* lisp/jka-compr.el (jka-compr-write-region):
* lisp/net/ange-ftp.el (ange-ftp-write-region):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-write-region):
* lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
* src/fileio.c (write_region): Put file name at the beginning and move
number of characters to the end of the message.
2017-04-07 19:54:11 -04:00
Kaushal Modi
7582497785 Check that file argument is a string
* lisp/vc/ediff-diff.el (ediff-exec-process): Check that the argument
  passed to `file-local-copy' is a string (Bug#26378).  Also fix
  the existing comment for this function, and convert it to its
  doc-string.
2017-04-07 18:29:28 -04:00
Noam Postavsky
9e27e0d1a6 Fix handling of non-integer START param to write-region
The previous patch for Bug#354 incorrectly assumed that START would
always be an integer.

* lisp/epa-file.el (epa-file-write-region):
* lisp/jka-compr.el (jka-compr-write-region):
* lisp/net/ange-ftp.el (ange-ftp-write-region):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-write-region):
* lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
* src/fileio.c (write_region): Handle nil and string values of START.
2017-04-07 18:24:35 -04:00
Glenn Morris
88532ae818 * lisp/textmodes/rst.el (rst-package-emacs-version-alist): Fixes. 2017-04-07 13:42:58 -04:00
Michael Albinus
5c6b013604 Add Tramp versions to `customize-package-emacs-version-alist'
* lisp/net/trampver.el (customize-package-emacs-version-alist):
Add Tramp versions to `customize-package-emacs-version-alist'.
2017-04-07 18:43:25 +02:00
Tom Tromey
dc48ac63f5 * lisp/textmodes/rst.el (rst-toc-link-keymap): Move before first use. 2017-04-07 09:44:46 -06:00
Lars Brinkhoff
67aeaa74af * records.texi (Record Functions): fix typo. 2017-04-07 06:56:52 +02:00
Paul Eggert
2012839a53 More casefiddle minor fixes
* src/casefiddle.c (case_character_impl): Omit unnecessary casts.
(case_character_impl): Avoid reevaluation of CHAR_TABLE_REF.
(GREEK_CAPITAL_LETTER_SIGMA): Fix typo in my previous change.
2017-04-06 20:03:21 -07:00
Paul Eggert
cea942e5a6 ; Spelling and punctuation fixes 2017-04-06 19:27:00 -07:00
Jeff Clough
cd0a7951fb Output number of characters added to file (Bug#354)
* fileio.c (write_region):
* epa-file.el (epa-file-write-region):
* jka-compr.el (jka-compr-write-region):
* ange-ftp.el (ange-ftp-write-region):
* tramp-gvfs.el (tramp-gvfs-handle-write-region):
* tramp-sh.el (tramp-sh-handle-write-region):
* mm-util.el (mm-append-to-file): Functions now output
characters written in addition to file name.
* files.texi: Added documentation to write-region and
append-to-file describing their output.
2017-04-06 22:23:27 -04:00
Noam Postavsky
4b3db0daa6 Fix ‘!NILP (Vpurify_flag)’ assertion failure during temacs bootstrap
The recent changes to src/casefiddle.c cause build failure as seen
below:

    Starting program: /home/npostavs/src/emacs/emacs-bootstrapping/src/temacs
	--batch --load loadup bootstrap
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/usr/lib/libthread_db.so.1".
    Loading loadup.el (source)...
    Using load-path (/home/npostavs/src/emacs/emacs-bootstrapping/lisp
	/home/npostavs/src/emacs/emacs-bootstrapping/lisp/emacs-lisp
	/home/npostavs/src/emacs/emacs-bootstrapping/lisp/language
	/home/npostavs/src/emacs/emacs-bootstrapping/lisp/international
	/home/npostavs/src/emacs/emacs-bootstrapping/lisp/textmodes
	/home/npostavs/src/emacs/emacs-bootstrapping/lisp/vc)
    Loading emacs-lisp/byte-run (source)...
    Loading emacs-lisp/backquote (source)...
    Loading subr (source)...
    Loading version (source)...
    Loading widget (source)...
    Loading custom (source)...
    Loading emacs-lisp/map-ynp (source)...
    Loading international/mule (source)...
    Loading international/mule-conf (source)...

    lread.c:3914: Emacs fatal error: assertion failed: !NILP (Vpurify_flag)

    Breakpoint 1, terminate_due_to_signal at emacs.c:363
    363	  signal (sig, SIG_DFL);
    (gdb) bt
    #0  0x0000000000579826 in terminate_due_to_signal at emacs.c:363
    #1  0x000000000060ec33 in die at alloc.c:7352
    #2  0x000000000066db40 in intern_c_string_1 at lread.c:3914
    #3  0x0000000000576884 in intern_c_string at lisp.h:3790
    #4  0x00000000005dc84f in prepare_casing_context at casefiddle.c:69
    #5  0x00000000005dd37f in casify_object at casefiddle.c:311
    #6  0x00000000005dd47f in Fcapitalize at casefiddle.c:356
    #7  0x00000000006325ac in eval_sub at eval.c:2219
    #8  0x0000000000632368 in eval_sub at eval.c:2184
    #9  0x000000000063446c in apply_lambda at eval.c:2875
    #10 0x00000000006329af in eval_sub at eval.c:2294
    #11 0x000000000062d462 in Fprogn at eval.c:449
    #12 0x000000000062d4cf in prog_ignore at eval.c:461
    #13 0x000000000062f19c in Fwhile at eval.c:982
    #14 0x00000000006321f4 in eval_sub at eval.c:2172
    #15 0x000000000062d462 in Fprogn at eval.c:449
    #16 0x000000000062f0c4 in Flet at eval.c:963
    #17 0x00000000006321f4 in eval_sub at eval.c:2172
    #18 0x0000000000632963 in eval_sub at eval.c:2290
    #19 0x000000000062d462 in Fprogn at eval.c:449
    #20 0x000000000062f0c4 in Flet at eval.c:963
    #21 0x00000000006321f4 in eval_sub at eval.c:2172
    #22 0x0000000000668caa in readevalloop at lread.c:1927
    #23 0x0000000000667253 in Fload at lread.c:1332
    #24 0x0000000000632683 in eval_sub at eval.c:2233
    #25 0x0000000000668caa in readevalloop at lread.c:1927
    #26 0x0000000000667253 in Fload at lread.c:1332
    #27 0x0000000000632683 in eval_sub at eval.c:2233
    #28 0x0000000000631be5 in Feval at eval.c:2041
    #29 0x000000000057e1af in top_level_2 at keyboard.c:1121
    #30 0x000000000062ffc7 in internal_condition_case at eval.c:1324
    #31 0x000000000057e1f0 in top_level_1 at keyboard.c:1129
    #32 0x000000000062f51e in internal_catch at eval.c:1091
    #33 0x000000000057e0ea in command_loop at keyboard.c:1090
    #34 0x000000000057d6d5 in recursive_edit_1 at keyboard.c:697
    #35 0x000000000057d8b4 in Frecursive_edit at keyboard.c:768
    #36 0x000000000057b55b in main at emacs.c:1687

    Lisp Backtrace:
    "capitalize" (0xffffcf70)
    "format" (0xffffd130)
    "define-charset" (0xffffd370)
    "while" (0xffffd560)
    "let" (0xffffd7c0)
    "dolist" (0xffffd910)
    "let" (0xffffdb70)
    "load" (0xffffdfe0)
    "load" (0xffffe4a0)

* src/casefiddle.c (syms_of_casefiddle): Declare four new symbols:
Qtitlecase, Qspecial_uppercase, Qspecial_lowercase and
Qspecial_titlecase.
(prepare_casing_context): Use aforementioned symbols.
2017-04-07 03:45:51 +02:00
Paul Eggert
022755953f Merge from gnulib
This merges some getopt fixes from Zack Weinberg, and affects only
non-GNUish platforms.  It incorporates:
2017-04-06 getopt-gnu: omit some duplicate code
2017-04-06 getopt-posix: use angle-bracket include
2017-04-06 getopt: annotate files with relationship to glibc
2017-04-06 getopt: split up getopt.in.h and eliminate __need_getopt
2017-04-06 getopt: better handling of ambiguous options
2017-04-06 getopt: refactor long-option handling
2017-04-06 getopt: tidy up _getopt_initialize a bit
2017-04-06 getopt: merge from glibc: repetition reduction
2017-04-06 getopt: clean up error reporting
2017-04-06 getopt: fix fencepost error in ambiguous-W-option handling
2017-04-06 getopt: clean up getopt.c and getopt1.c file headers
2017-04-06 getopt: harmonize comments with glibc
2017-04-06 getopt: remove USE_NONOPTION_FLAGS
2017-04-06 getopt: tabify, in preparation for merge with glibc
2017-04-06 md5, sha1, sha256, sha512: Add comments re correctness
* build-aux/config.sub, doc/misc/texinfo.tex, lib/getopt.c:
* lib/getopt.in.h, lib/getopt1.c, lib/getopt_int.h, lib/md5.c:
* lib/md5.h, lib/sha1.c, lib/sha1.h, lib/sha256.c, lib/sha256.h:
* lib/sha512.c, lib/sha512.h, lib/unistd.in.h, m4/getopt.m4:
Copy from gnulib.
* lib/getopt_cdefs.in.h, lib/getopt_core.h, lib/getopt_ext.h:
* lib/getopt_pfx_core.h, lib/getopt_pfx_ext.h:
New files, taken from gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4:
Regenerate.
2017-04-06 16:30:09 -07:00
Hong Xu
0c55cf43e6 * search.c (Fre_search_forward, Fre_search_backward): Improve doc (Bug#25193). 2017-04-06 19:12:33 -04:00
Noam Postavsky
c7ed57eaef Mention that processes start in default-directory (Bug#18515)
* doc/lispref/processes.texi (Synchronous Processes):
(Asynchronous Processes):
* lisp/subr.el (start-process):
* src/callproc.c (call-process): Mention that the subprocess starts in
`default-directory' when local, suggest `start-file-process' and
`process-file' otherwise.
2017-04-06 18:50:54 -04:00
Noam Postavsky
856ec9ffa1 * src/xdisp.c (vmessage, message): Clarify commentary. 2017-04-06 18:50:54 -04:00
Paul Eggert
451a0c8b69 Minor casefiddle.c cleanups
* src/casefiddle.c: Redo recent changes to match GNU style,
and prefer C99-style decls within blocks.
(GREEK_CAPITAL_LETTER_SIGMA): Rename from CAPITAL_SIGMA, so that
we are merely using the Unicode name, and make it a constant
rather than a macro.  All uses changed.
(SMALL_SIGMA): Remove; unused.
(GREEK_SMALL_LETTER_FINAL_SIGMA): Rename from SMALL_FINAL_SIGMA,
and make it a constant rather than a macro.  All uses changed.
(do_casify_multibyte_string): Use ‘verify’ rather than an
unportable static_assertion local.
2017-04-06 15:05:38 -07:00
Paul Eggert
f3a0f3a116 * lisp/international/README: Update to match current list. 2017-04-06 15:00:04 -07:00
Paul Eggert
360b2bf2f6 Fix 'make clean' in lib subdirectory
* lib/Makefile.in (clean): Remove *-t files.
(mostlyclean): Remove MOSTLYCLEANFILES that are not *-t files.
This removes files like lib/getopt.h that should be removed
even if this configuration did not need to build them.
(maintainer-clean): Remove TAGS here, not in distclean,
to be consistent with ../src/Makefile.in.
2017-04-06 13:43:06 -07:00