Paul Eggert [Mon, 17 Nov 2014 07:37:19 +0000 (23:37 -0800)]
Port new time stamp handling to old Emacs and to XEmacs.
This is needed for Gnus, which copies time-date.el and which
runs on older Emacs implementations.
* calendar/time-date.el (with-decoded-time-value):
Handle 'nil' and floating-point arg more compatibly with new Emacs.
(encode-time-value, with-decoded-time-value):
Obsolete only if new Emacs.
(time-add, time-subtract, time-less-p): Define if not new Emacs.
Paul Eggert [Mon, 17 Nov 2014 04:38:15 +0000 (20:38 -0800)]
Improve time stamp handling, and be more consistent about it.
This implements a suggestion made in:
http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00587.html
Among other things, this means timer.el no longer needs to
autoload the time-date module.
* doc/lispref/os.texi (Time of Day, Time Conversion, Time Parsing)
(Processor Run Time, Time Calculations):
Document the new behavior, plus be clearer about the old behavior.
(Idle Timers): Take advantage of new functionality.
* etc/NEWS: Document the changes.
* lisp/allout-widgets.el (allout-elapsed-time-seconds): Doc fix.
* lisp/arc-mode.el (archive-ar-summarize):
* lisp/calendar/time-date.el (seconds-to-time, days-to-time, time-since):
* lisp/emacs-lisp/timer.el (timer-relative-time, timer-event-handler)
(run-at-time, with-timeout-suspend, with-timeout-unsuspend):
* lisp/net/tramp.el (tramp-time-less-p, tramp-time-subtract):
* lisp/proced.el (proced-time-lessp):
* lisp/timezone.el (timezone-time-from-absolute):
* lisp/type-break.el (type-break-schedule, type-break-time-sum):
Simplify by using new functionality.
* lisp/calendar/cal-dst.el (calendar-next-time-zone-transition):
Do not return time values in obsolete and undocumented (HI . LO)
format; use (HI LO) instead.
* lisp/calendar/time-date.el (with-decoded-time-value):
Treat 'nil' as current time. This is mostly for XEmacs.
(encode-time-value, with-decoded-time-value): Obsolete.
(time-add, time-subtract, time-less-p): Use no-op autoloads, for
XEmacs. Define only if XEmacs, as they're now C builtins in Emacs.
* lisp/ldefs-boot.el: Update to match new time-date.el
* lisp/proced.el: Do not require time-date.
* src/editfns.c (invalid_time): New function.
Use it instead of 'error ("Invalid time specification")'.
(time_add, time_subtract, time_arith, Ftime_add, Ftime_less_p)
(decode_float_time, lisp_to_timespec, lisp_time_struct):
New functions.
(make_time_tail, make_time): Remove. All uses changed to use
new functions or plain list4i.
(disassemble_lisp_time): Return effective length if successful.
Check that LOW is an integer, if it's combined with other components.
(decode_time_components): Decode into struct lisp_time, not
struct timespec, so that we can support a wide set of times
regardless of whether time_t is signed. Decode plain numbers
as seconds since the Epoch, and nil as the current time.
(lisp_time_argument, lisp_seconds_argument, Ffloat_time):
Reimplement in terms of new functions.
(Fencode_time): Just use list2i.
(syms_of_editfns): Add time-add, time-subtract, time-less-p.
* src/keyboard.c (decode_timer): Don't allow the new formats (floating
point or nil) in timers.
* src/systime.h (LO_TIME_BITS): New constant. Use it everywhere in
place of the magic number '16'.
(struct lisp_time): New type.
(decode_time_components): Use it.
(lisp_to_timespec): New decl.
* src/buffer.c (Fbarf_if_buffer_read_only): Don't raise an error if
the text at POSITION (new optional argument) has the
`inhibit-read-only' text property set.
* src/callint.c (Fcall_interactively): Pass in nil as argument to
Fbarf_if_buffer_read_only.
* src/fileio.c (Finsert_file_contents): Ditto.
* src/insdel.c (prepare_to_modify_buffer_1): Pass start region in.
* src/intervals.h (INTERVAL_WRITABLE_P): Check the `inhibit-read-only'
text property.
* src/textprop.c (verify_interval_modification): Check buffer
readedness after the last interval.
Only show the "You can run" message if it's significantly shorter
* simple.el (execute-extended-command): Don't show the help
message if the binding isn't significantly shorter than the
M-x command the user typed (bug#19013).
Ulf Jasper [Sun, 16 Nov 2014 16:23:45 +0000 (17:23 +0100)]
icalendar: fix issues regarding timezones without dst
* lisp/calendar/icalendar.el (icalendar--convert-tz-offset): Return
complete cons when offsets of standard time and daylight saving
time are equal.
(icalendar-export-region): Fix unbound variable warning.
* test/automated/icalendar-tests.el (icalendar--parse-vtimezone): Add
testcase where offsets of standard time and daylight saving time
are equal.
(icalendar-real-world): Fix error in test case. Expected result
was wrong when offsets of standard time and daylight saving time
were equal.
Óscar Fuentes [Sun, 16 Nov 2014 14:06:23 +0000 (15:06 +0100)]
Add faces for the VC modeline state indicator.
Fixes: debbugs:19043
Add faces for the VC modeline state indicator.
* lisp/vc/vc-hooks.el: (vc-state-faces, vc-state-base-face
vc-up-to-date-state, vc-needs-update-state, vc-locked-state)
vc-locally-added-state, vc-conflict-state, vc-removed-state,
vc-missing-state, vc-edited-state): New faces.
(vc-default-mode-line-string): Use them (bug#19043).
* lisp/progmodes/python.el (python-shell-calculate-command): Rename
from python-shell-parse-command. Cleanup.
(run-python, run-python-internal): Use it.
(python-shell-calculate-pythonpath): Rename from
python-new-pythonpath.
(python-shell-calculate-process-environment): Use it.
(python-shell-calculate-exec-path): Add comment.
Jan D [Sat, 15 Nov 2014 18:09:58 +0000 (19:09 +0100)]
Redo the fix, the old takes too much CPU.
Fixes: 18993
* nsterm.m (ns_send_appdefined): Check for application defined
event on Cocoa (Bug#18993).
(run): Restore code before the previous 18993 fix.
Eli Zaretskii [Sat, 15 Nov 2014 17:04:17 +0000 (19:04 +0200)]
Fix bug #19060 with inaccurate pixel-based scrolling.
src/window.c (window_scroll_pixel_based): Avoid truncation/rounding
errors in computing the number of pixels to scroll. Suggested by
Kelly Dean <kelly@prtime.org>.
David Reitter [Fri, 14 Nov 2014 15:56:39 +0000 (10:56 -0500)]
Time-out NS event loop
OS X 10.10 will, at times, not send us the application-defined
event that is used to terminate the event loop. As a workaround,
we define a timeout and react accordingly. Leaving it in place
for other OSX and NS versions as a safety net.
Partial revert of 2014-11-08T16:32:37Z!jan.h.d@swipnet.se.
Ivan Andrus [Sat, 1 Nov 2014 18:33:02 +0000 (12:33 -0600)]
Use derived-mode-p in python.el instead of equality test on major-mode
* progmodes/python.el (python-shell-font-lock-kill-buffer):
(python-shell-font-lock-with-font-lock-buffer)
(python-shell-get-buffer, python-ffap-module-path): Use
`derived-mode-p' instead of equality test on `major-mode'.
Paul Eggert [Fri, 14 Nov 2014 20:23:11 +0000 (12:23 -0800)]
Merge from gnulib.
2014-11-14 extern-inline: update commentary about GCC bugs
2014-11-06 unistd: port to iOS
2014-11-04 update from texinfo
* doc/misc/texinfo.tex, lib/unistd.in.h, m4/extern-inline.m4:
Update from gnulib.
Paul Eggert [Fri, 14 Nov 2014 20:20:17 +0000 (12:20 -0800)]
build: port to GCC 4.6.4 + glibc 2.5
On platforms this old, building with _FORTIFY_SOURCE equal to 2
results in duplicate definitions of standard library functions.
Problem reported by Nelson H. F. Beebe.
* configure.ac (_FORTIFY_SOURCE): Sort after GNULIB_PORTCHECK.
By default, do not enable this unless GNULIB_PORTCHECK is defined.
This better matches the original intent, which as I recall was to
enable these extra checks only with --enable-gcc-warnings.
Dmitry Antipov [Fri, 14 Nov 2014 10:40:24 +0000 (13:40 +0300)]
Attempt to allocate less font entity objects in xfont_list_pattern
* xfont.c (xfont_list_pattern): Do not allocate font entity object
for each candidate font but attempt to reuse it from previous improper
candidate, if any.
Rename python-shell-virtualenv-path to fit GNU conventions
* lisp/progmodes/python.el (python-shell-virtualenv-root): Rename from
python-shell-virtualenv-path.
(python-shell-internal-get-process-name)
(python-shell-calculate-process-environment)
(python-shell-calculate-exec-path): Use it.
Paul Eggert [Fri, 14 Nov 2014 03:15:41 +0000 (19:15 -0800)]
Fix some 24-hour time stamps in documentation.
* doc/lispref/os.texi (Time of Day):
* doc/misc/org.texi (The date/time prompt, Matching tags and properties):
Use leading zero with 24-hour times less than 10:00.
Paul Eggert [Thu, 13 Nov 2014 17:16:33 +0000 (09:16 -0800)]
Backport fix for minor Bazaar leftovers.
Reported by Perry E. Metzger in:
http://lists.gnu.org/archive/html/emacs-devel/2014-11/msg00745.html
* .dir-locals.el: Remove reference to bzr commit --fixes debbugs.
* etc/CONTRIBUTE: More git transition.
Paul Eggert [Thu, 13 Nov 2014 17:16:33 +0000 (09:16 -0800)]
Fix minor Bazaar leftovers.
Reported by Perry E. Metzger in:
http://lists.gnu.org/archive/html/emacs-devel/2014-11/msg00745.html
* .dir-locals.el: Remove reference to bzr commit --fixes debbugs.
* etc/CONTRIBUTE: More git transition.
Fixes: debbugs:16244
* net/eww.el (eww-form-file): Fix version number.
* net/shr.el (shr-parse-image-data): Remove blocked bits from
external SVG images.
(shr-tag-object): Display images in <object> forms.
(shr-tag-table): Also insert <objects> after the tables.
Paul Eggert [Thu, 13 Nov 2014 06:34:52 +0000 (22:34 -0800)]
Avoid undefined behavior in color table hashing.
* image.c (CT_HASH_RGB) [COLOR_TABLE_SUPPORT]: Remove, replacing with ...
(ct_hash_rgb) [COLOR_TABLE_SUPPORT]: New function. All uses changed.
This function avoids undefined behavior with signed shift overflow.
Eric S. Raymond [Tue, 11 Nov 2014 18:28:05 +0000 (13:28 -0500)]
Git transition patch
All bzr revision IDS, and all CVS revision IDs for which a commit
could be identified, were changed to time-date!committer version
stamps. All .cvsignore files in the history became .gitignore files.
Fixes-bug annotations from bzr were copied into the corresponding
commit comments.
(The first .cvsignore commit was 1999-09-30T14:07:54Z!fx@gnu.org>.
The last CVS commit was <2009-12-27T08:11:12Z!cyd@stupidchicken.com>)
Committer/author email addresses are generally correct for the
transition day, not necessarily when the commit was originally made.
Eric S. Raymond [Tue, 11 Nov 2014 18:28:02 +0000 (13:28 -0500)]
Git transition patch
All bzr revision IDS, and all CVS revision IDs for which a commit
could be identified, were changed to time-date!committer version
stamps. All .cvsignore files in the history became .gitignore files.
Fixes-bug annotations from bzr were copied into the corresponding
commit comments.
(The first .cvsignore commit was 1999-09-30T14:07:54Z!fx@gnu.org>.
The last CVS commit was <2009-12-27T08:11:12Z!cyd@stupidchicken.com>)
Committer/author email addresses are generally correct for the
transition day, not necessarily when the commit was originally made.
* net/eww.el(eww-form-file(defface)): New defface of file upload form.
(eww-submit-file): New key map of file upload.
(eww-form-file): New file upload button and file name context.
(eww-select-file): Select file and display selected file name.
(eww-tag-input): Handle input tag of file type.
(eww-update-field): Add point offset.
(eww-submit): Add submit with multipart/form-data.
* gnus/mm-url.el (mm-url-encode-multipart-form-data):
Restore to handle "multipart/form-data" by eww.
* net/eww.el (eww-render, eww-display-html, eww-setup-buffer):
Allow taking a buffer to render data in. This allows using several
eww buffers (bug#16211).