bpt/emacs.git
11 years agoAvoid calls to CHAR_TO_BYTE if byte position is known.
Dmitry Antipov [Thu, 20 Dec 2012 16:09:05 +0000 (20:09 +0400)]
Avoid calls to CHAR_TO_BYTE if byte position is known.
* editfns.c (make_buffer_string_both): Use move_gap_both.
(Fbuffer_string): Use make_buffer_string_both.
* marker.c (buf_charpos_to_bytepos): Convert to eassert.
Adjust comment.
(buf_bytepos_to_charpos): Likewise.
(charpos_to_bytepos): Remove.
* fileio.c (Finsert_file_contents): Use move_gap_both.
* search.c (Freplace_match): Likewise.
* process.c (process_send_region): Likewise. Use convenient
names for byte positions.
* lisp.h (charpos_to_bytepos): Remove prototype.
* indent.c (scan_for_column): Use CHAR_TO_BYTE.
* insdel.c (move_gap): Likewise.

11 years ago* xdisp.c (redisplay_internal): Remove now-unused local.
Paul Eggert [Thu, 20 Dec 2012 14:57:40 +0000 (06:57 -0800)]
* xdisp.c (redisplay_internal): Remove now-unused local.

11 years ago* src/xdisp.c (select_frame_for_redisplay, ensure_selected_frame): Remove.
Stefan Monnier [Thu, 20 Dec 2012 14:03:34 +0000 (09:03 -0500)]
* src/xdisp.c (select_frame_for_redisplay, ensure_selected_frame): Remove.
(redisplay_internal): Don't bother selecting the frame to get the
proper value of frame-local variables.

11 years ago* ob.el (org-babel-temp-file): Fix setting of
Michael Albinus [Thu, 20 Dec 2012 13:15:43 +0000 (14:15 +0100)]
* ob.el (org-babel-temp-file): Fix setting of
`temporary-file-directory' on remote hosts.

* ob-eval.el (org-babel-shell-command-on-region): Use
`process-file' instead of `call-process-region'.  The latter one
does not work on remote hosts.

11 years ago* progmodes/grep.el (rgrep): Escape command line. Sometimes, it
Michael Albinus [Thu, 20 Dec 2012 11:15:38 +0000 (12:15 +0100)]
* progmodes/grep.el (rgrep): Escape command line.  Sometimes, it
is too long for Tramp.  See discussion in
<http://thread.gmane.org/gmane.emacs.tramp/8233/focus=8244>.

* progmodes/compile.el (compilation-start): Remove line escape template.

11 years ago* textprop.c (set_text_properties_1): Do not allow NULL interval.
Dmitry Antipov [Thu, 20 Dec 2012 08:49:21 +0000 (12:49 +0400)]
* textprop.c (set_text_properties_1): Do not allow NULL interval.
Rename 4th argument since it may be buffer or string.  Adjust comment.
* intervals.c (graft_intervals_info_buffer): Find an interval here.

11 years ago* vc/ediff-ptch.el (ediff-map-patch-buffer): Use `point-min-marker'.
Dmitry Antipov [Thu, 20 Dec 2012 05:05:41 +0000 (09:05 +0400)]
* vc/ediff-ptch.el (ediff-map-patch-buffer): Use `point-min-marker'.
Adjust comment.

11 years ago* NEWS: Tramp implements `file-acl' and `set-file-acl'.
Michael Albinus [Wed, 19 Dec 2012 21:32:56 +0000 (22:32 +0100)]
* NEWS: Tramp implements `file-acl' and `set-file-acl'.

11 years ago* files.texi (Magic File Names): Add `file-acl',
Michael Albinus [Wed, 19 Dec 2012 21:25:58 +0000 (22:25 +0100)]
* files.texi (Magic File Names): Add `file-acl',
`file-selinux-context', `set-file-acl' and
`set-file-selinux-context'.  Make the list consistent.

11 years ago* themes/tsdh-dark-theme.el (tsdh-dark): Add customizations of
Tassilo Horn [Wed, 19 Dec 2012 20:40:50 +0000 (21:40 +0100)]
* themes/tsdh-dark-theme.el (tsdh-dark): Add customizations of
many new faces.

11 years ago* lisp/emacs-lisp/lisp-mnt.el (lm-section-end): Always end before the
Jonas Bernoulli [Wed, 19 Dec 2012 19:51:40 +0000 (14:51 -0500)]
* lisp/emacs-lisp/lisp-mnt.el (lm-section-end): Always end before the
following non-comment text.
(lm-header-multiline): Continuation lines need to be indented more than
the first line.
(lm-homepage): New function.
(lm-with-file): Don't be confused if narrowing is in effect.
* doc/lispref/tips.texi (Library Headers): New header keyword `Homepage'.
Make continuation lines syntax more precise.

Fixes: debbugs:13207

11 years ago* lisp/vc/diff-mode.el (diff-post-command-hook): Don't ignore changes at the
Stefan Monnier [Wed, 19 Dec 2012 19:41:43 +0000 (14:41 -0500)]
* lisp/vc/diff-mode.el (diff-post-command-hook): Don't ignore changes at the
very beginning of a hunk (e.g. killing the first line).

11 years ago* coding.c (Fdetect_coding_region): Do not check start and end with
Dmitry Antipov [Wed, 19 Dec 2012 15:52:48 +0000 (19:52 +0400)]
* coding.c (Fdetect_coding_region): Do not check start and end with
CHECK_NUMBER_COERCE_MARKER since validate_region does that itself.
(code_convert_region): Likewise.

11 years agoSpelling fix.
Paul Eggert [Wed, 19 Dec 2012 13:56:49 +0000 (05:56 -0800)]
Spelling fix.

11 years ago* net/tramp-sh.el (tramp-sh-handle-file-acl): Delete empty lines
Michael Albinus [Wed, 19 Dec 2012 13:01:16 +0000 (14:01 +0100)]
* net/tramp-sh.el (tramp-sh-handle-file-acl): Delete empty lines
and text properties from returned ACL string.
(tramp-sh-handle-set-file-acl): Do not use additional parentheses
for "setfacl" command.

11 years agoFollow symlinks in MS-Windows emulations of ACL functions.
Eli Zaretskii [Tue, 18 Dec 2012 19:05:56 +0000 (21:05 +0200)]
Follow symlinks in MS-Windows emulations of ACL functions.

 src/w32.c (acl_get_file, acl_set_file): Run the file name through
 map_w32_filename, and resolve any symlinks in the file name, like
 Posix platforms do.
 (acl_set_file): Call revert_to_self, if any privileges were
 enabled.

11 years ago* net/tramp.el (tramp-error-with-buffer): Give a hint to use
Michael Albinus [Tue, 18 Dec 2012 13:37:06 +0000 (14:37 +0100)]
* net/tramp.el (tramp-error-with-buffer): Give a hint to use
`tramp-cleanup-this-connection', when the process has died.
(Bug#13151)

11 years agosrc/makefile.w32-in: Update depencencies.
Juanma Barranquero [Mon, 17 Dec 2012 20:59:04 +0000 (21:59 +0100)]
src/makefile.w32-in: Update depencencies.

11 years agont/config.nt: Sync with autogen/config.in.
Juanma Barranquero [Mon, 17 Dec 2012 20:58:12 +0000 (21:58 +0100)]
nt/config.nt: Sync with autogen/config.in.
(BSD4_2): Remove.

11 years ago* lisp/icomplete.el (icomplete-completions): Also use … to truncate prefix.
Stefan Monnier [Mon, 17 Dec 2012 19:43:55 +0000 (14:43 -0500)]
* lisp/icomplete.el (icomplete-completions): Also use … to truncate prefix.

11 years ago* src/xdisp.c (select_frame_for_redisplay): Use select_window_1 to
Stefan Monnier [Mon, 17 Dec 2012 19:17:06 +0000 (14:17 -0500)]
* src/xdisp.c (select_frame_for_redisplay): Use select_window_1 to
propagate redisplay's scrolling (if any) to the right window.
(redisplay_internal): Use ensure_selected_frame.
(display_mode_lines): Complete last fix.
* src/window.c (select_window_1): New func, extracted from select_window.
(select_window): Use it.
* src/window.h (select_window_1): Declare.

11 years agoSupport Posix ACL APIs on MS-Windows.
Eli Zaretskii [Mon, 17 Dec 2012 19:14:34 +0000 (21:14 +0200)]
Support Posix ACL APIs on MS-Windows.

 src/w32.c: Include sddl.h and sys/acl.h.
 (SDDL_REVISION_1): Define if not already defined.
 (g_b_init_get_security_descriptor_dacl)
 (g_b_init_convert_sd_to_sddl, g_b_init_convert_sddl_to_sd)
 (g_b_init_is_valid_security_descriptor)
 (g_b_init_set_file_security): New static flags.
 (globals_of_w32): Initialize them to zero.
 (SetFileSecurity_Name): New string constant.
 (SetFileSecurity_Proc, GetSecurityDescriptorDacl_Proc)
 (ConvertStringSecurityDescriptorToSecurityDescriptor_Proc)
 (ConvertSecurityDescriptorToStringSecurityDescriptor_Proc)
 (IsValidSecurityDescriptor_Proc): New typedefs.
 (get_file_security, get_security_descriptor_owner)
 (get_security_descriptor_group): Set errno to ENOTSUP.
 (set_file_security, get_security_descriptor_dacl)
 (is_valid_security_descriptor, convert_sd_to_sddl)
 (convert_sddl_to_sd, acl_valid, acl_to_text, acl_from_text)
 (acl_free, acl_get_file, acl_set_file): New functions.
 src/fileio.c (Fcopy_file) [WINDOWSNT]: Support copying ACLs.

 nt/inc/sys/acl.h: New file.
 nt/inc/ms-w32.h (ENOTSUP): Define if undefined.
 nt/config.nt (HAVE_POSIX_ACL): Define.

 doc/lispref/files.texi (File Attributes, Changing Files): Update to include
 MS-Windows support for ACLs.

11 years agoDon't reraise SIGCHLD, as that can now lose.
Paul Eggert [Mon, 17 Dec 2012 17:51:25 +0000 (09:51 -0800)]
Don't reraise SIGCHLD, as that can now lose.

With the 2012-12-03 fix for Bug#12980 in place, an old workaround
for some of that bug's symptoms can now cause Emacs to abort.
Remove the workaround.
* process.c (wait_reading_process_output): Don't reraise SIGCHLD.
The bug that caused SIGCHLD to get lost has been fixed, and the
workaround for it can now cause Emacs to abort.

Fixes: debbugs:13192

11 years ago* lisp/files.el (auto-save-file-name-p): Use \` and \'.
Kevin Ryde [Mon, 17 Dec 2012 15:51:49 +0000 (10:51 -0500)]
* lisp/files.el (auto-save-file-name-p): Use \` and \'.

Fixes: debbugs:13186

11 years agoAdd support for preserving ACL entries of files.
Michael Albinus [Mon, 17 Dec 2012 14:38:07 +0000 (15:38 +0100)]
Add support for preserving ACL entries of files.

* net/tramp.el (tramp-file-name-for-operation): Add `file-acl' and
`set-file-acl' handlers.

* net/tramp-adb.el (tramp-adb-handle-copy-file): Handle
PRESERVE-EXTENDED-ATTRIBUTES.

* net/tramp-compat.el (tramp-compat-copy-file): Handle
PRESERVE-EXTENDED-ATTRIBUTES.

* net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Add
`file-acl' and `set-file-acl' handlers.
(tramp-gvfs-handle-copy-file): Handle
PRESERVE-EXTENDED-ATTRIBUTES.
(tramp-gvfs-handle-file-acl, tramp-gvfs-handle-set-file-acl): New
defuns.

* net/tramp-sh.el (tramp-sh-file-name-handler-alist): Add
`file-acl' and `set-file-acl' handlers.
(tramp-remote-acl-p, tramp-sh-handle-file-acl)
(tramp-sh-handle-set-file-acl): New defuns.
(tramp-sh-handle-copy-file, tramp-do-copy-or-rename-file): Handle
PRESERVE-EXTENDED-ATTRIBUTES.

* net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add
`file-acl' and `set-file-acl' handlers.
(tramp-smb-handle-copy-file): Handle PRESERVE-EXTENDED-ATTRIBUTES.

11 years agoAuto-commit of generated files.
Glenn Morris [Mon, 17 Dec 2012 11:17:34 +0000 (06:17 -0500)]
Auto-commit of generated files.

11 years agoFix some interactions of make-help-screen and other Help forms (Bug#13190).
Kelly Dean [Mon, 17 Dec 2012 07:54:57 +0000 (08:54 +0100)]
Fix some interactions of make-help-screen and other Help forms (Bug#13190).

* help-macro.el (make-help-screen): Instead of switch-to-buffer
use pop-to-buffer with NORECORD argument t.  As buffer name use
*Metahelp* with a leading space (Bug#13190).

11 years ago* sysdep.c (emacs_abort): Bump backtrace size to 40.
Paul Eggert [Sun, 16 Dec 2012 22:53:28 +0000 (14:53 -0800)]
* sysdep.c (emacs_abort): Bump backtrace size to 40.

Companion to the 2012-09-30 patch.  Suggested by Eli Zaretskii in
<http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00796.html>.

11 years ago* calc.texi (ISO 8601): Rename from ISO-8601,
Paul Eggert [Sun, 16 Dec 2012 22:51:03 +0000 (14:51 -0800)]
* calc.texi (ISO 8601): Rename from ISO-8601,

as it's typically spelled without a hyphen.

11 years agoAdd support for preserving ACL entries of files.
Romain Francoise [Sun, 16 Dec 2012 18:22:27 +0000 (19:22 +0100)]
Add support for preserving ACL entries of files.

* configure.ac (acl): New option.
(HAVE_POSIX_ACL): Test for POSIX ACL support.  This is typically
provided by libacl on GNU/Linux.

* fileio.c (Ffile_acl, Fset_file_acl): New functions.
(Fcopy_file): Change last arg to `preserve_extended_attributes'
and copy ACL entries of file in addition to SELinux context if
set.
(syms_of_fileio): Add `file-acl' and `set-file-acl'.

* Makefile.in (LIBACL_LIBS): New macro.
(LIBES): Use it.

* files.el (file-extended-attributes)
(set-file-extended-attributes): New functions.
(backup-buffer): Use them to handle both SELinux context and ACL
entries.
(backup-buffer-copy): Work with an alist of extended attributes,
rather than an SELinux context.
(basic-save-buffer-2): Ditto.

* files.texi (File Attributes): Document ACL support and new
`file-acl' function.
(Changing Files): Mention argument name change of `copy-file' and
document new function `set-file-acl'.

11 years agoAuto-commit of loaddefs files.
Glenn Morris [Sun, 16 Dec 2012 11:22:07 +0000 (06:22 -0500)]
Auto-commit of loaddefs files.

11 years ago* battery.el (battery-bsd-apm): New function.
Timo Myyrä [Sun, 16 Dec 2012 03:17:50 +0000 (11:17 +0800)]
* battery.el (battery-bsd-apm): New function.

11 years ago* calc/calc.el (calc-standard-date-formats): Adjust one of the
Jay Belanger [Sun, 16 Dec 2012 02:52:11 +0000 (20:52 -0600)]
* calc/calc.el (calc-standard-date-formats): Adjust one of the
standard date formats.

11 years ago* doc/misc/calc.texi (ISO-8601): New section.
Jay Belanger [Sun, 16 Dec 2012 02:07:30 +0000 (20:07 -0600)]
* doc/misc/calc.texi (ISO-8601): New section.
  (Date Formatting Codes): Mention new codes.
  (Standard Date Formats): Mention new formats.

11 years ago* fileio.c (internal_delete_file): Use bool for boolean.
Paul Eggert [Sat, 15 Dec 2012 15:33:43 +0000 (07:33 -0800)]
* fileio.c (internal_delete_file): Use bool for boolean.

11 years agoCommit nt/ChangeLog from the changeset of last commit.
Eli Zaretskii [Sat, 15 Dec 2012 13:42:33 +0000 (15:42 +0200)]
Commit nt/ChangeLog from the changeset of last commit.

11 years agoFix bug #13079 on MS-Windows with temp files not being deleted.
Eli Zaretskii [Sat, 15 Dec 2012 13:38:21 +0000 (15:38 +0200)]
Fix bug #13079 on MS-Windows with temp files not being deleted.

 src/w32.h (_child_process): New members input_file and
 pending_deletion.
 (register_child): First argument is now pid_t.
 (record_infile, record_pending_deletion): New prototypes.
 src/w32proc.c (new_child): Initialize input_file and
 pending_deletion members of the child.
 (delete_child): Delete the child's temporary input file, if any,
 that is pending deletion.
 (register_child): First argument is now pid_t.
 (record_infile, record_pending_deletion): New functions.
 (reap_subprocess): Fix a typo in DebPrint string.
 (sys_spawnve, sys_kill): Use pid_t for PID arguments.
 src/fileio.c (internal_delete_file): Return an int again: non-zero
 if delete-file succeeds, zero otherwise.
 src/lisp.h (internal_delete_file): Adjust prototype.
 src/callproc.c (Fcall_process): Don't overwrite infile with result
 of DECODE_FILE.
 [WINDOWSNT] If BUFFER is an integer, i.e. we are launching an
 asynchronous subprocess, record the name of the input file name,
 if any.
 (delete_temp_file) [WINDOWSNT]: If internal_delete_file fails to
 delete the file, record it as pending deletion when the subprocess
 exits.

 nt/inc/ms-w32.h (sys_unlink): Provide prototype.

11 years ago* lisp/isearch.el (isearch-mode-map): Bind `C-x 8 RET' to
Juri Linkov [Sat, 15 Dec 2012 13:03:17 +0000 (15:03 +0200)]
* lisp/isearch.el (isearch-mode-map): Bind `C-x 8 RET' to
`isearch-insert-char-by-name'.
(with-isearch-suspended): New defmacro with body mostly from
`isearch-edit-string' except the part that sets
`isearch-new-string' and `isearch-new-message'.
(isearch-edit-string): Use new macro `with-isearch-suspended' with
body that sets `isearch-new-string' and `isearch-new-message'.
(isearch-insert-char-by-name): New command.
* lisp/international/mule-cmds.el (read-char-by-name): Let-bind
`enable-recursive-minibuffers' to t.
http://lists.gnu.org/archive/html/emacs-devel/2012-12/msg00234.html

11 years ago* lisp/isearch.el (isearch-delete-char, isearch-del-char): Doc fix.
Juri Linkov [Sat, 15 Dec 2012 12:19:04 +0000 (14:19 +0200)]
* lisp/isearch.el (isearch-delete-char, isearch-del-char): Doc fix.

Fixes: debbugs:13175

11 years ago* doc/emacs/misc.texi (Recursive Edit): Add a link to "Query Replace".
Juri Linkov [Sat, 15 Dec 2012 12:10:12 +0000 (14:10 +0200)]
* doc/emacs/misc.texi (Recursive Edit): Add a link to "Query Replace".

Fixes: debbugs:13181

11 years ago* lisp/dired-x.el (dired-guess-shell-command): Put colon at the end of the prompt.
Christopher Schmidt [Sat, 15 Dec 2012 12:05:04 +0000 (14:05 +0200)]
* lisp/dired-x.el (dired-guess-shell-command): Put colon at the end of the prompt.

Fixes: debbugs:13045

11 years agow32proc.c (reap_subprocess): Fix commentary.
Eli Zaretskii [Sat, 15 Dec 2012 11:41:18 +0000 (13:41 +0200)]
w32proc.c (reap_subprocess): Fix commentary.

11 years agoAuto-commit of generated files.
Glenn Morris [Sat, 15 Dec 2012 11:17:30 +0000 (06:17 -0500)]
Auto-commit of generated files.

11 years agoImprove and correct commentary to w32proc-related data and functions.
Eli Zaretskii [Sat, 15 Dec 2012 11:04:14 +0000 (13:04 +0200)]
Improve and correct commentary to w32proc-related data and functions.

11 years agomacroexp--warn-and-return message tweak (bug#13132)
Glenn Morris [Fri, 14 Dec 2012 21:27:39 +0000 (16:27 -0500)]
macroexp--warn-and-return message tweak (bug#13132)

* lisp/emacs-lisp/macroexp.el (macroexp--warn-and-return):
Try to include filename in non-bytecomp warning.

11 years agoSpelling fixes.
Paul Eggert [Fri, 14 Dec 2012 20:05:03 +0000 (12:05 -0800)]
Spelling fixes.

My favorite was that the word "dictionary" was misspelled.
Also, correct the title in the DeRemer & Pennello 1982 citation,
and add a URL.

11 years agoFix compilation warnings in the Windows build.
Eli Zaretskii [Fri, 14 Dec 2012 19:43:12 +0000 (21:43 +0200)]
Fix compilation warnings in the Windows build.

 src/editfns.c [HAVE_PWD_H]: Include grp.h.
 src/makefile.w32-in ($(BLD)/editfns.$(O)): Add $(NT_INC)/grp.h.

11 years agoFix permissions bugs with setgid directories etc.
Paul Eggert [Fri, 14 Dec 2012 18:59:00 +0000 (10:59 -0800)]
Fix permissions bugs with setgid directories etc.

* configure.ac (BSD4_2): Remove; no longer needed.
* admin/CPP-DEFINES (BSD4_2): Remove.
* doc/lispintro/emacs-lisp-intro.texi (Files List):
directory-files-and-attributes now outputs t for attribute that's
now a placeholder.
* doc/lispref/files.texi (Testing Accessibility): Document GROUP arg
of file-ownership-preserved-p.
(File Attributes): Document that 9th element is now
just a placeholder.
* doc/lispref/os.texi (User Identification): Document new functions group-gid,
group-real-gid.
* etc/NEWS: Document changes to file-attributes,
file-ownership-preserved-p.
Mention new functions group-gid, group-real-gid.
* lisp/files.el (backup-buffer): Don't rely on 9th output of
file-attributes, as it's now a placeholder.  Instead, use the new
optional arg of file-ownership-preserved-p.
(file-ownership-preserved-p): New optional arg GROUP.
Fix mishandling of setuid directories that would cause this
function to return t when it should have returned nil.
Document what happens if the file does not exist, and when
it's not known whether the ownership will be preserved.
* lisp/net/tramp-sh.el (tramp-sh-handle-file-ownership-preserved-p):
Likewise.
(tramp-get-local-gid): Use group-gid for integer, as that's
faster and more reliable.
* src/dired.c (Ffile_attributes): Return t as the 9th attribute,
to mark it as a placeholder.  The old value was often wrong.
The only user of this attribute has been changed to use
file-ownership-preserved-p instead, with its new group arg.
* src/editfns.c (Fgroup_gid, Fgroup_real_gid): New functions.

Fixes: debbugs:13125

11 years ago* src/xdisp.c (display_mode_lines): Keep selected_window and selected_frame
Stefan Monnier [Fri, 14 Dec 2012 15:52:43 +0000 (10:52 -0500)]
* src/xdisp.c (display_mode_lines): Keep selected_window and selected_frame
in sync.

11 years ago* src/xdisp.c (select_frame_for_redisplay): Keep selected_window and
Stefan Monnier [Fri, 14 Dec 2012 15:38:50 +0000 (10:38 -0500)]
* src/xdisp.c (select_frame_for_redisplay): Keep selected_window and
selected_frame in sync.

11 years ago* tramp.texi (External methods): Move `adb' method here.
Michael Albinus [Fri, 14 Dec 2012 15:37:27 +0000 (16:37 +0100)]
* tramp.texi (External methods): Move `adb' method here.

11 years ago* progmodes/sql.el (sql-mode-postgres-font-lock-keywords): Update
Julien Danjou [Fri, 14 Dec 2012 15:31:19 +0000 (16:31 +0100)]
* progmodes/sql.el (sql-mode-postgres-font-lock-keywords): Update
  keywords list, data type and PL/pgSQL.

11 years ago* lisp/vc/ediff-util.el (ediff-buffer-type): New function.
Dave Abrahams [Fri, 14 Dec 2012 15:22:24 +0000 (10:22 -0500)]
* lisp/vc/ediff-util.el (ediff-buffer-type): New function.
(ediff-clone-buffer-for-current-diff-comparison): Compute the buf-type
rather than taking it as as argument.
(ediff-inferior-compare-regions): Adjust calls accordingly.

Fixes: debbugs:11319

11 years ago* lisp/json.el: Add pretty-print option.
Ryan Crum [Fri, 14 Dec 2012 14:57:37 +0000 (09:57 -0500)]
* lisp/json.el: Add pretty-print option.
(json-encoding-separator, json-encoding-default-indentation)
(json--encoding-current-indentation, json-encoding-pretty-print)
(json-encoding-lisp-style-closings): New vars.
(json--with-indentation): New macro.
(json-encode-hash-table, json-encode-alist, json-encode-plist)
(json-encode-array): Use it to obey json-encoding-pretty-print.
(json-pretty-print-buffer, json-pretty-print): New commands.

Fixes: debbugs:12634

11 years agoSpeed up most calls to 'stat' and 'lstat' on MS-Windows.
Eli Zaretskii [Fri, 14 Dec 2012 14:05:01 +0000 (16:05 +0200)]
Speed up most calls to 'stat' and 'lstat' on MS-Windows.

 src/w32.c (stat_worker): If w32_stat_get_owner_group is zero, do not
 try to get accurate owner and group information from NT file
 security APIs.  This is to make most callers of 'stat' and
 'lstat', which don't need that information, much faster.
 src/dired.c (Ffile_attributes) [WINDOWSNT]: Set
 w32_stat_get_owner_group to a non-zero value, to request accurate
 owner and group information from 'lstat'.

 nt/inc/sys/stat.h: Declare w32_stat_get_owner_group.

11 years agoExplain, why `tramp-*-file-name-p' is a defsubst.
Michael Albinus [Fri, 14 Dec 2012 09:02:34 +0000 (10:02 +0100)]
Explain, why `tramp-*-file-name-p' is a defsubst.

11 years ago* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize-function):
Dmitry Gutov [Fri, 14 Dec 2012 06:58:15 +0000 (10:58 +0400)]
* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize-function):
Extract `ruby-syntax-propertize-expansions'.
(ruby-syntax-propertize-expansions): Only change syntax on
certain string delimiters, to punctuation.  This way the common
functions like forward-word and thing-at-point still work.
(ruby-match-expression-expansion): Improve readability.
(ruby-block-contains-point): New function.
(ruby-add-log-current-method): Handle several edge cases.

* test/automated/ruby-mode-tests.el
Rename one interpolation test; add three more.
(ruby-with-temp-buffer): New macro, use it where appropriate.
(ruby-add-log-current-method-examples): Use "_" for target point.
Add four tests for ruby-add-log-current-method.

11 years ago* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize-function):
Dmitry Gutov [Fri, 14 Dec 2012 04:55:23 +0000 (08:55 +0400)]
* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize-function):
Extract `ruby-syntax-propertize-expansions'.
(ruby-syntax-propertize-expansions): Only change syntax on
certain string delimiters, to punctuation.  This way the common
functions like forward-word and thing-at-point still work.

* test/automated/ruby-mode-tests.el
Rename one interpolation test; add three more.

11 years agosieve-mode font-lock fix (tiny change)
Akinori MUSHA [Fri, 14 Dec 2012 04:26:47 +0000 (20:26 -0800)]
sieve-mode font-lock fix (tiny change)

* sieve-mode.el (sieve-font-lock-keywords): Keywords should be word delimited.

Fixes: debbugs:13173

11 years ago* fileio.c (Finsert_file_contents): Don't put tail into head area,
Paul Eggert [Thu, 13 Dec 2012 19:35:10 +0000 (11:35 -0800)]
* fileio.c (Finsert_file_contents): Don't put tail into head area,

as that confuses set-auto-coding, so insist on the head-read
returning the full 1024 bytes.  Let lseek compute the tail offset;
less work for us.  Do not ignore I/O errors when reading the tail.

11 years agolisp/emacs-lisp/edebug.el: Fix previous change.
Juanma Barranquero [Thu, 13 Dec 2012 18:15:42 +0000 (19:15 +0100)]
lisp/emacs-lisp/edebug.el: Fix previous change.
(edebug-unload-function): Make sure that unload-feature finishes even when
aborting an ongoing edebug session.  Also, do not worry about edebug-mode,
unload-feature takes care of it.

11 years ago* xdisp.c: Minor style fixes.
Paul Eggert [Thu, 13 Dec 2012 16:55:28 +0000 (08:55 -0800)]
* xdisp.c: Minor style fixes.

(init_iterator): Hoist assignment out of if-expression.
(markpos_of_region): Callers now test for sign, not for -1.

11 years ago* net/tls.el (tls-program): Update customize type.
Andreas Schwab [Thu, 13 Dec 2012 09:48:54 +0000 (10:48 +0100)]
* net/tls.el (tls-program): Update customize type.

11 years agolisp/emacs-lisp/edebug.el: Fix bug#13163.
Juanma Barranquero [Thu, 13 Dec 2012 09:45:54 +0000 (10:45 +0100)]
lisp/emacs-lisp/edebug.el: Fix bug#13163.
(edebug--require-cl-read): New function.
(edebug-setup-hook, cl-read-load-hooks): Use it.
(edebug-unload-function): New function.

11 years ago* net/tramp-adb.el (tramp-adb-file-name-p): Make it a defsubst.
Michael Albinus [Thu, 13 Dec 2012 08:42:25 +0000 (09:42 +0100)]
* net/tramp-adb.el (tramp-adb-file-name-p): Make it a defsubst.
Otherwise, there could be errors in autoloading.  (Bug#13151)

11 years ago* net/tramp-adb.el (tramp-adb-wait-for-output): Remove spurious " ^H"
Jürgen Hötzel [Thu, 13 Dec 2012 08:38:16 +0000 (09:38 +0100)]
* net/tramp-adb.el (tramp-adb-wait-for-output): Remove spurious " ^H"
sequences.

11 years agoMinor redisplay optimization when the region length is zero.
Dmitry Antipov [Thu, 13 Dec 2012 08:04:40 +0000 (12:04 +0400)]
Minor redisplay optimization when the region length is zero.
* xdisp.c (markpos_of_region): New function.
(init_iterator): Do not highlight the region of zero length.
(redisplay_window): Check whether the region is of non-zero length.
(try_cursor_movement): Allow if the region length is zero.
(try_window_reusing_current_matrix, try_window_id): Likewise.

11 years ago* doc/misc/cl.texi (Modify Macros, Obsolete Macros): Now letf == cl-letf.
Glenn Morris [Thu, 13 Dec 2012 05:33:36 +0000 (21:33 -0800)]
* doc/misc/cl.texi (Modify Macros, Obsolete Macros): Now letf == cl-letf.

* etc/NEWS: Related edit.

11 years agoMerge from emacs-24; up to 2012-11-30T04:44:52Z!cyd@gnu.org
Glenn Morris [Thu, 13 Dec 2012 05:29:15 +0000 (21:29 -0800)]
Merge from emacs-24; up to 2012-11-30T04:44:52Z!cyd@gnu.org

11 years agoAdd wisent manual to build process
Glenn Morris [Thu, 13 Dec 2012 04:47:14 +0000 (20:47 -0800)]
Add wisent manual to build process

* doc/misc/wisent.texi: Small edits.  Set copyright to FSF, update license to
GFDL 1.3+.

* doc/misc/Makefile.in (INFO_TARGETS, DVI_TARGETS, PDF_TARGETS): Add wisent.
(wisent, $(buildinfodir)/wisent$(INFO_EXT), wisent.dvi, wisent.pdf):
New targets.

* doc/misc/makefile.w32-in (INFO_TARGETS, DVI_TARGETS, clean): Add wisent.
($(infodir)/wisent$(INFO_EXT), wisent.dvi): New targets.

* info/dir: wisent.

11 years agoImport wisent manual from CEDET trunk
Eric M. Ludlam [Thu, 13 Dec 2012 04:44:07 +0000 (20:44 -0800)]
Import wisent manual from CEDET trunk

Ref
http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00419.html
and preceding discussion

Imported from
bzr://cedet.bzr.sourceforge.net/bzrroot/cedet/code/trunk
doc/texi/semantic/wisent.texi

bzr log shows (very) tiny change from authors with assignments:
David Engster <dengste@eml.cc>

and from:
emacsman@users.sourceforge.net

11 years agoAdd bovine manual to build process
Glenn Morris [Thu, 13 Dec 2012 04:25:50 +0000 (20:25 -0800)]
Add bovine manual to build process

* doc/misc/bovine.texi: Small edits.  Set copyright to FSF, update license to
GFDL 1.3+, remove empty index.

* doc/misc/Makefile.in (INFO_TARGETS, DVI_TARGETS, PDF_TARGETS): Add bovine.
(bovine, $(buildinfodir)/bovine$(INFO_EXT), bovine.dvi, bovine.pdf):
New targets.

* doc/misc/makefile.w32-in (INFO_TARGETS, DVI_TARGETS, clean): Add bovine.
($(infodir)/bovine$(INFO_EXT), bovine.dvi): New targets.

* info/dir: Add bovine.

11 years agoImport bovine manual from CEDET trunk
Eric M. Ludlam [Thu, 13 Dec 2012 04:19:48 +0000 (20:19 -0800)]
Import bovine manual from CEDET trunk

Ref
http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00419.html
and preceding discussion

Imported from
bzr://cedet.bzr.sourceforge.net/bzrroot/cedet/code/trunk
doc/texi/semantic/bovine.texi

11 years ago* fileio.c (Fcopy_file): Make fstat failure as serious as open failure.
Paul Eggert [Thu, 13 Dec 2012 02:17:49 +0000 (18:17 -0800)]
* fileio.c (Fcopy_file): Make fstat failure as serious as open failure.

fstat shouldn't fail, and if it does fail copy-file should not proceed.
Remove unnecessary S_ISLNK test, as (contra the comments) this
function can't copy symlinks.  Improve quality of error message
when attempting to copy files that are neither regular files nor
directories.

11 years ago* lisp/emacs-lisp/cl.el (letf): Make it an alias of cl-letf.
Stefan Monnier [Thu, 13 Dec 2012 01:46:47 +0000 (20:46 -0500)]
* lisp/emacs-lisp/cl.el (letf): Make it an alias of cl-letf.
(cl--symbol-function): Remove (now that funbound is like nil).

11 years agont/config.nt: Sync with autogen/config.in.
Juanma Barranquero [Thu, 13 Dec 2012 01:18:28 +0000 (02:18 +0100)]
nt/config.nt: Sync with autogen/config.in.
(HAVE_INOTIFY, HAVE_SYS_INOTIFY_H): New macros.

11 years agognus-start.el (gnus-before-resume-hook): Add :version
Katsumi Yamaoka [Thu, 13 Dec 2012 00:52:17 +0000 (00:52 +0000)]
gnus-start.el (gnus-before-resume-hook): Add :version

11 years ago* lisp/button.el (button--area-button-p): Fix typo (defun is not defalias).
Glenn Morris [Wed, 12 Dec 2012 22:39:29 +0000 (17:39 -0500)]
* lisp/button.el (button--area-button-p): Fix typo (defun is not defalias).

11 years agognus.el (gnus-other-frame-resume-function): Add :version
Katsumi Yamaoka [Wed, 12 Dec 2012 22:29:54 +0000 (22:29 +0000)]
gnus.el (gnus-other-frame-resume-function): Add :version

11 years agognus-art.el (gnus-article-browse-html-parts): Use <div align="left"> instead of ...
Katsumi Yamaoka [Wed, 12 Dec 2012 22:22:31 +0000 (22:22 +0000)]
gnus-art.el (gnus-article-browse-html-parts): Use <div align="left"> instead of <pre> to align message header

11 years agoflymake.texi fix for flymake-buildfile-dirs (bug#13148)
Glenn Morris [Wed, 12 Dec 2012 18:37:52 +0000 (13:37 -0500)]
flymake.texi fix for flymake-buildfile-dirs (bug#13148)

* doc/misc/flymake.texi (Customizable variables, Locating the buildfile):
Remove refs to flymake-buildfile-dirs, removed 2007-07-20.

11 years ago* Makefile.in (install-info): Use `${MAKE} -s' for echo-info.
Andreas Schwab [Wed, 12 Dec 2012 17:52:01 +0000 (18:52 +0100)]
* Makefile.in (install-info): Use `${MAKE} -s' for echo-info.
(uninstall): Likewise.

11 years agoAdd srecode manual to build process
Glenn Morris [Wed, 12 Dec 2012 17:19:20 +0000 (09:19 -0800)]
Add srecode manual to build process

* doc/misc/srecode.texi: Small edits.  Set copyright to FSF, add explicit
GFDL 1.3+ license, fix up index.

* doc/misc/Makefile.in (INFO_TARGETS, DVI_TARGETS, PDF_TARGETS): Add srecode.
(srecode, $(buildinfodir)/srecode$(INFO_EXT), srecode.dvi)
(srecode.pdf): New targets.

* doc/misc/makefile.w32-in (INFO_TARGETS, DVI_TARGETS, clean): Add srecode.
($(infodir)/srecode$(INFO_EXT), srecode.dvi): New targets.

* info/dir: Add srecode.

11 years agoImport srecode manual from CEDET trunk
Eric M. Ludlam [Wed, 12 Dec 2012 17:15:25 +0000 (09:15 -0800)]
Import srecode manual from CEDET trunk

Ref
http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00419.html
and preceding discussion

Imported from
bzr://cedet.bzr.sourceforge.net/bzrroot/cedet/code/trunk
doc/texi/srecode.texi

bzr log shows (very) tiny changes from authors with assignments:
Alex Ott <ottalex@users.sourceforge.net>
David Engster <dengste@eml.cc>
Vincent Belaïche <vincentb1@users.sourceforge.net>

and from:
emacsman@users.sourceforge.net
scymtym@users.sourceforge.net

Fixes: debbugs:9966

11 years agoMerge upstream Org (from commit 488eea)
Bastien Guerry [Wed, 12 Dec 2012 16:47:07 +0000 (17:47 +0100)]
Merge upstream Org (from commit 488eea)

11 years ago* dispnew.c (set_window_cursor_after_update): Use clip_to_bounds.
Dmitry Antipov [Wed, 12 Dec 2012 15:33:30 +0000 (19:33 +0400)]
* dispnew.c (set_window_cursor_after_update): Use clip_to_bounds.
* gtkutil.c (xg_set_toolkit_scroll_bar_thumb):
* window.c (Frecenter):
* xdisp.c (resize_mini_window, hscroll_window_tree, draw_glyphs):
* xterm.c (x_set_toolkit_scroll_bar_thumb): Likewise.

11 years ago* lisp/gnus/gnus.el (gnus-other-frame-resume-function): Add user option.
Sam Steingold [Wed, 12 Dec 2012 14:46:58 +0000 (09:46 -0500)]
* lisp/gnus/gnus.el (gnus-other-frame-resume-function): Add user option.
(gnus-other-frame): Call `gnus-other-frame-resume-function' on resume.

11 years ago* lisp/frame.el (frame-maximization-style): New user option.
Sam Steingold [Wed, 12 Dec 2012 14:43:45 +0000 (09:43 -0500)]
* lisp/frame.el (frame-maximization-style): New user option.
(toggle-frame-maximized): Toggle frame maximization according to
`frame-maximization-style', bound to <f11>.
(cycle-frame-maximized): Cycle between all maximization styles and
non-maximized frame, bound to shift-<f11>.

11 years ago* lisp/mpc.el (mpc-format): Use truncate-string-to-width.
David Cadé [Wed, 12 Dec 2012 14:42:03 +0000 (09:42 -0500)]
* lisp/mpc.el (mpc-format): Use truncate-string-to-width.

Fixes: debbugs:13143

11 years agoAuto-commit of generated files.
Glenn Morris [Wed, 12 Dec 2012 11:17:32 +0000 (06:17 -0500)]
Auto-commit of generated files.

11 years ago2012-12-12 Daniel Colascione <dancol@dancol.org>
Daniel Colascione [Wed, 12 Dec 2012 03:26:52 +0000 (19:26 -0800)]
2012-12-12  Daniel Colascione  <dancol@dancol.org>

* unexcw.c (fixup_executable): use posix_fallocate to ensure that
the dumped Emacs is not a sparse file, greatly improving Cygwin
"make bootstrap" performance.

11 years ago* lisp/emacs-lisp/eieio.el: Prettier object pretty-printing.
Jonas Bernoulli [Wed, 12 Dec 2012 02:16:05 +0000 (21:16 -0500)]
* lisp/emacs-lisp/eieio.el: Prettier object pretty-printing.
(eieio-override-prin1): Don't quote kewords and booleans.
(object-write) <eieio-default-superclass>: Don't put closing parens
on new line, avoid needless empty lines, align values that are objects
with the slot keyword (instead of beginning on the same line).
(eieio-list-prin1): Align value with slot keyword; increase
eieio-print-depth before printing members of the list.

Fixes: debbugs:13115

11 years agoMake CC Mode not hang when _some_ lines end in CRLF. Bug #11841.
Alan Mackenzie [Tue, 11 Dec 2012 19:06:57 +0000 (19:06 +0000)]
Make CC Mode not hang when _some_ lines end in CRLF.  Bug #11841.
cc-engine.el (c-backward-comments): Add code to work around
`forward-comment' not recognizing ^M as whitespace.

11 years ago* lisp/mail/emacsbug.el (report-emacs-bug): Move the intangible text to
Stefan Monnier [Tue, 11 Dec 2012 18:52:31 +0000 (13:52 -0500)]
* lisp/mail/emacsbug.el (report-emacs-bug): Move the intangible text to
a display text-property.
(report-emacs-bug-hook): Don't bother deleting it any more.

11 years ago* lisp/hilit-chg.el (highlight-save-buffer-state): Delete.
Stefan Monnier [Tue, 11 Dec 2012 18:51:27 +0000 (13:51 -0500)]
* lisp/hilit-chg.el (highlight-save-buffer-state): Delete.
Use with-silent-modifications instead.
(hilit-chg-set-face-on-change): Only fixup the text that's modified.

11 years ago* lisp/button.el: Handle buttons in display text-properties.
Stefan Monnier [Tue, 11 Dec 2012 18:49:25 +0000 (13:49 -0500)]
* lisp/button.el: Handle buttons in display text-properties.
(button--area-button-p, button--area-button-string):
Use (STRING . STRING-POS) representation instead of just STRING.

11 years agoBackport spelling fix from trunk
Glenn Morris [Tue, 11 Dec 2012 18:43:57 +0000 (13:43 -0500)]
Backport spelling fix from trunk

11 years agoFix for install-info in non-English locales (tiny change)
Nicolas Avrutin [Tue, 11 Dec 2012 18:37:53 +0000 (13:37 -0500)]
Fix for install-info in non-English locales (tiny change)

* Makefile.in (install-info, uninstall):
Ensure make's messages about changing directories are in English.

Fixes: debbugs:13142

11 years agoMerge from gnulib for 'inline', incorporating:
Paul Eggert [Tue, 11 Dec 2012 18:18:13 +0000 (10:18 -0800)]
Merge from gnulib for 'inline', incorporating:
2012-12-11 extern-inline: avoid incompatibility with Darwin Libc
* m4/extern-inline.m4: Update from gnulib.

Fixes: debbugs:13040

11 years agoSpelling fixes.
Paul Eggert [Tue, 11 Dec 2012 18:09:55 +0000 (10:09 -0800)]
Spelling fixes.