* textmodes/tildify.el (tildify-foreach-region-function): New
variable specifying a function determining portions of buffer that
should be tildified. It allows major modes to create a filtering
function more elaborate than a set of regular expressions.
Initialised to `tildify--deprecated-ignore-evironments' by default
to handle now deprecated `tildify-ignored-environments-alist'
variable.
(tildify--foreach-region): A new function that takes
`tildify-foreach-region-function' into account and calls callback
for regions of the buffer that should be tildified.
(tildify-foreach-ignore-environments): A new function which can be
partially applied and used as `tildify-foreach-region-function'.
(tildify-ignored-environments-alist, tildify--pick-alist-entry):
Mark as obsolete.
(tildify--find-env): Rename from `tildify-find-env' and mark as
obsolete.
(tildify--deprecated-ignore-evironments): New function,
immediately marked as obsolete, used to handle deprecated
`tildify-ignored-environments-alist'.
* textmodes/tex-mode.el (tex-common-initialization): Set
`tildify-foreach-region-function' variable in all variants of TeX
mode since `tildify-ignored-environments-alist' variable is now
empty by default.
* nxml/nxml-mode.el (nxml-mode): Ditto in `nxml-mode'.
* textmodes/sgml-mode.el (sgml-mode): Ditto in `sgml-mode'.
* textmodes/tildify.el (tildify-pattern): New variable for
defining tildifying pattern. Being a buffer-local variable it is
much easier to handle than `tildify-pattern-alist' that has been
used so far. It also works better with derived modes.
(tildify-pattern-alist): Mark as obsolete.
* textmodes/tildify.el (tildify-space-string): New variable for
specifying representation of a hard space -- a no-break space by
default. Being a buffer-local variable it is much easier to
handle than `tildify-string-alist' that has been used so far. It
also works better with derived modes.
(tildify-string-alist): Mark as obsolete.
* textmodes/tex-mode.el (tex-common-initialization): Set
`tildify-space-string' variable in all variants of TeX mode since
`tildify-string-alist' is now empty by default.
* nxml/nxml-mode.el (nxml-mode): Ditto in `nxml-mode'. If
encoding supports it use no-break space instead of character
entity; this changes previous default which used a numeric
reference.
* textmodes/sgml-mode.el (sgml-mode): ditto in `sgml-mode'. If
encoding does not support no-break space, use numeric reference;
this changes previous default which used named entity (“ ”)
in HTML mode.
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.
* doc/lispref/text.texi (Special Properties): Mention `inhibit-read-only'.
* 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.
* 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).
(vc-print-log-internal): Use cl-some.
* lisp/vc/vc-git.el (vc-git-region-history): New function.
(vc-git-region-history-mode-map)
(vc-git--log-view-long-font-lock-keywords)
(vc-git-region-history-font-lock-keywords): New vars.
(vc-git-region-history-font-lock): New function.
(vc-git-region-history-mode): New major mode.
(read-extended-command): Set it.
Don't complete obsolete commands.
(execute-extended-command--shorter-1)
(execute-extended-command--shorter): New functions.
(execute-extended-command): Use them to suggest shorter names.
(indicate-copied-region, deactivate-mark): Use region-active-p.
and make it generic instead by relying on the lower-level selection
management functions.
* select.el (select-enable-clipboard): Rename from
gui-select-enable-clipboard.
(select-enable-primary): Move from x-win.el and rename from
x-select-enable-primary.
(gui-last-selected-text): Remove.
(gui--last-selected-text-clipboard, gui--last-selected-text-primary):
New vars.
(gui-select-text): Rewrite, based on x-win.el's old x-select-text.
(gui-select-text-alist, gui-selection-value-alist): Remove.
(x-select-request-type): Move from x-win.el.
(gui--selection-value-internal): New function, taken from x-win's
x-selection-value-internal.
(gui-selection-value): Rewrite, based on x-win.el's old x-selection-value.
(gui-set-selection-alist): Rename from gui-own-selection-alist and
extend it to handle a nil value as a "disown" request.
(gui-disown-selection-alist): Remove.
(xselect-convert-to-delete): Adjust accordingly.
(gui-set-selection): Simplify accordingly as well. Use dotimes.
* lisp/frame.el (gui-method): Use window-system rather than framep.
(gui-method-declare): The tty case is now nil rather than t.
(make-frame): Adjust accordingly.
* lisp/term/x-win.el (x-last-selected-text-primary)
(x-select-enable-primary): Remove (moved to select.el).
(x-select-request-type): Move to select.el.
(x-selection-value-internal, x--selection-value): Remove functions.
(gui-selection-value, gui-select-text): Remove moethods.
(gui-set-selection): Merge own and disown methods.
* lisp/startup.el (command-line): Adjust now that `gui-method' expects nil
for ttys.
* lisp/term/ns-win.el (ns-get-pasteboard, ns-set-pasteboard)
(ns-selection-value): Remove functions.
(gui-select-text, gui-selection-value): Don't define method any more.
(gui-set-selection): Merge the old own and disown methods.
(gui-selection-exists-p, gui-get-selection): Adjust to new name of
underlying C primitive.
* lisp/term/pc-win.el (w16-get-selection-value): Add dummy argument and drop
test of gui-select-enable-clipboard, to make it usable as
a gui-get-selection method.
(gui-selection-exists-p): Adjust to new name of C primitive.
(gui-set-selection): Merge own and disown methods.
(gui-select-text, gui-selection-value): Delete methods.
(w16--select-text): Delete function.
* lisp/term/w32-win.el (w32--select-text, w32--get-selection-value):
Delete function (move functionality into w32--set-selection and
w32--get-selection).
(gui-select-text, gui-selection-value): Don't define methods.
(w32--set-selection, w32--get-selection, w32--selection-owner-p):
New functions.
(gui-get-selection, gui-selection-owner-p, gui-selection-exists-p):
Use them.
(gui-selection-exists-p): Adjust to new name of C primitive.
* src/nsselect.m (ns_get_local_selection): Signal error rather than `quit'.
(Fns_own_selection_internal): Tighten scoping.
(Fns_selection_exists_p): Rename from Fx_selection_exists_p.
(Fns_get_selection): Rename from Fx_get_selection_internal.
(Fns_get_selection_internal, Fns_store_selection_internal):
Remove functions.
(syms_of_nsselect): Adjust accordingly.
* src/w16select.c (Fw16_selection_exists_p): Rename from
Fx_selection_exists_p.
(syms_of_win16select): Adjust accordingly.
* src/w32select.c (Fw32_selection_exists_p): Rename from
Fx_selection_exists_p.
(syms_of_w32select): Adjust accordingly.
(css-mode-syntax-table): Use d style comment, to ease the scss case.
(css-ident-re): Allow things like @-moz-keyframes.
(scss--hash-re): New const.
(css--font-lock-keywords): New function, extracted from
css-font-lock-keywords.
(css-font-lock-keywords): Use it.
(scss-mode-syntax-table, scss-font-lock-keywords): New vars.
(scss-smie--not-interpolation-p): New function.
(css-smie--forward-token, css-smie--backward-token): Use it.
(css-mode): Remove left-over code.
* test/indent/scss-mode.scss: New file.
* test/indent/css-mode.css: Add a few uneventful examples.
* lisp/calendar/diary-lib.el (diary-display-function):
Drop support for deprecated nil and list forms.
(diary-list-entries): Update for the above.
* lisp/calendar/cal-x.el (calendar-dedicate-diary): Simplify accordingly.
* lisp/select.el (gui-get-selection-alist): New method.
(gui-get-selection): Use it. Rename from x-get-selection.
(x-get-selection): Define as obsolete alias.
(x-get-clipboard): Mark obsolete.
(gui-get-primary-selection): New function.
(x-get-selection-value): Mark obsolete.
(gui-own-selection-alist, gui-disown-selection-alist)
(gui-selection-owner-p-alist): New methods.
(gui-set-selection): Use them. Rename from x-set-selection.
(x-set-selection): Define as obsolete alias.
(gui--valid-simple-selection-p): Rename from
x-valid-simple-selection-p.
* lisp/w32-common-fns.el (gui-own-selection, gui-disown-selection)
(gui-selection-owner-p, gui-get-selection): Define for w32.
(w32-get-selection-value): Rename from x-get-selection-value.
Use the new gui-last-selected-text.
* lisp/term/x-win.el (x-get-selection-value): Remove.
(x-clipboard-yank): Declare obsolete.
(gui-own-selection, gui-disown-selection, gui-get-selection)
(gui-selection-owner-p): Define for x.
* lisp/term/w32-win.el (w32-win-suspend-error): Rename from
x-win-suspend-error.
* lisp/term/pc-win.el (w16-get-selection-value): Rename from
x-get-selection-value.
(w16-selection-owner-p): Rename from x-selection-owner-p.
(gui-own-selection, gui-disown-selection, gui-get-selection)
(gui-selection-owner-p): Define for pc.
(w16--select-text): New function.
* lisp/term/ns-win.el (gui-own-selection, gui-disown-selection)
(gui-get-selection, gui-selection-owner-p): Define for ns.
* lisp/term.el (term-mouse-paste):
* lisp/mouse.el (mouse-yank-primary): Use gui-get-primary-selection.
* src/nsselect.m (ns-own-selection-internal, ns-disown-selection-internal):
Rename from the "x-" prefix.
* lisp/emacs-lisp/pcase.el (pcase--app-subst-match, pcase--app-subst-rest):
New optimization functions.
(pcase--u1): Add support for `quote' and `app'.
(pcase): Document them in the docstring.