Alan Mackenzie [Sat, 22 Nov 2014 21:41:00 +0000 (21:41 +0000)]
Fix error with `mark-defun' and "protected:" in C++ Mode. Fixes: debbugs:19134.
progmodes/cc-cmds.el (c-where-wrt-brace-construct): Handle a return code
of (label) from c-beginning-of-decl-1.
“Martin [Sat, 22 Nov 2014 16:59:59 +0000 (17:59 +0100)]
Don't shrink frame when using desktop-save-mode (Bug#19048).
* w32fns.c (x_set_tool_bar_lines): Always call
x_change_tool_bar_height (Bug#19048).
(x_change_tool_bar_height): Mark frame as garbaged since
adjust_frame_size might not have done that.
* xfns.c (x_set_tool_bar_lines): Always call
x_change_tool_bar_height (Bug#19048).
(x_change_tool_bar_height): Mark frame as garbaged since
adjust_frame_size might not have done that.
Eric S. Raymond [Sat, 22 Nov 2014 05:31:20 +0000 (00:31 -0500)]
Isolating support code for the file-granularity back ends: the easy part.
* vc-filewise.el: New file to isolate code used only by the
file-oriented back ends (SCCS/RCS/CVS/SRC) which should not live in
vc.el and certainly not in vc-hooks.el.
Eric S. Raymond [Sat, 22 Nov 2014 05:10:31 +0000 (00:10 -0500)]
Rename vc-name to vc-master-rename.
* vc-hooks.el, vc-rcs.el, vc-sccs.el: vc-name -> vc-master-name. This
is preaparatory to isolating all the 'master' functions used only by
the file-oriented back ends. With this done first, the substantive
diffs will be easier to read.
Ulf Jasper [Fri, 21 Nov 2014 15:31:30 +0000 (16:31 +0100)]
'libxml-parse(html|xml)-region': new optional param 'discard-comments'.
* doc/lispref/text.texi (Parsing HTML/XML): Document new optional parameter
'discard-comments' of 'libxml-parse(html|xml)-region'.
* src/xml.c (parse_region): Take care of new optional parameter
'discard-comments' of 'libxml-parse(html|xml)-region'.
(Flibxml_parse_html_region, Flibxml_parse_xml_region): New
optional parameter 'discard-comments'.
* test/automated/libxml-tests.el
(libxml-tests--data-comments-preserved): Renamed from
'libxml-tests--data'.
(libxml-tests--data-comments-discarded): New.
(libxml-tests): Check whether 'libxml-parse-xml-region' is
discarding comments correctly.
Eli Zaretskii [Fri, 21 Nov 2014 09:32:53 +0000 (11:32 +0200)]
Fix the build of the Emacs User manual.
doc/emacs/maintaining.texi (Version Control Systems): Move "@end itemize"
past the last @item. Fix a typo (reported by H. Dieter Wilhelm
<dieter@duenenhof-wilhelm.de>).
where this matters (which is only in SCCS and RCS) files are now always
checked out editable. This may actually have been dynamically true
already - it looks like the vc-next-action code evolved past visiting
the other case. Tested with RCS.
Ivan Shmakov [Wed, 19 Nov 2014 17:21:58 +0000 (18:21 +0100)]
Add desktop support to eww
* net/eww.el (eww-desktop-remove-duplicates)
(eww-restore-desktop, eww-restore-reload-prompt): New variables.
(eww-mode): Set up desktop mode.
(eww-desktop-data-save, eww-desktop-data-1)
(eww-desktop-history-duplicate, eww-desktop-misc-data)
(eww-restore-desktop): New functions.
Juri Linkov [Tue, 18 Nov 2014 21:59:14 +0000 (23:59 +0200)]
* lisp/replace.el (query-replace-from-to-separator): Turn defvar into defcustom.
Wrap char-displayable-p in ignore-errors because an attempt
to autoload char-displayable-p fails during pre-loading.
Move (propertize "\0" ... 'separator t) out of customizable part
to query-replace-read-from.
(query-replace-read-from): Call custom-reevaluate-setting on
query-replace-from-to-separator to reevaluate the separator
depending on the return value of char-displayable-p.
http://lists.gnu.org/archive/html/emacs-devel/2014-11/msg00466.html
Juri Linkov [Tue, 18 Nov 2014 21:33:42 +0000 (23:33 +0200)]
Use <up> and <down> keys to move point in the multi-line minibuffer.
* lisp/bindings.el (minibuffer-local-map): Rebind [down] from
next-history-element to next-line-or-history-element, and [up]
from previous-history-element to previous-line-or-history-element.
* lisp/simple.el (next-line-or-history-element)
(previous-line-or-history-element): New commands.
Daiki Ueno [Tue, 18 Nov 2014 07:19:14 +0000 (16:19 +0900)]
epg: Support key editing
* epg.el (epg-context): New slot EDIT-CALLBACK.
(epg--process-filter): Call EDIT-CALLBACK when editing a key.
(epg-reset): Reset EDIT-CALLBACK of the context.
(epg-start-edit-key): New function.
(epg-edit-key): New function.
Paul Eggert [Tue, 18 Nov 2014 06:44:27 +0000 (22:44 -0800)]
Port new time stamp handling to Emacs 23.2.
This fix is for Gnus. Problem reported by Katsumi Yamaoka.
* calendar/time-date.el (time-add, time-subtract, time-less-p):
Use eval-and-compile, not eval-when-compile.
tildify.el: introduce a `tildify-foreach-region-function' variable
* 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'.
tildify.el: introduce a `tildify-pattern' variable
* 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.
tildify.el: introduce a `tildify-space-string' variable
* 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.
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.