Stephen Berman [Wed, 19 Jun 2013 12:22:46 +0000 (14:22 +0200)]
* todos.el (todos-convert-legacy-files): Add code to make it work
after the new version is renamed and has the same namespace as the
old version. This also requires there to be no live todo buffers
when this command is called.
Stephen Berman [Tue, 18 Jun 2013 17:44:01 +0000 (19:44 +0200)]
* todos.el: Reinstate current copyright dates and original
todo-mode.el author. Add reference in commentary to legacy file
format conversion command.
(todos-legacy-date-time-regexp): Rename from
todos-todo-mode-date-time-regexp and adjust uses.
Stephen Berman [Tue, 18 Jun 2013 16:05:01 +0000 (18:05 +0200)]
* diary-lib.el (diary-goto-entry-function): New variable.
(diary-entry): Use it in the action of this button type instead of
diary-goto-entry.
* todos.el (todos-diary-goto-entry): Add item locating code from
diary-goto-entry. Add it at the top-level to override the latter
function.
(todos-powerset): Use definition by Wolfgang Jenkner, posted at
http://lists.gnu.org/archive/html/emacs-devel/2013-06/msg00423.html.
Paul Eggert [Tue, 11 Jun 2013 18:34:06 +0000 (11:34 -0700)]
Tickle glib by waiting for Emacs itself, not for process 0.
* process.c (init_process_emacs) [HAVE_GLIB && !WINDOWSNT]:
Wait for self, not for 0. This can't hurt on GNU or similar
system, and may help with Cygwin.
Albert Krewinkel [Tue, 11 Jun 2013 07:32:25 +0000 (07:32 +0000)]
lisp/gnus/sievel-manage.el: fully support STARTTLS, fix bit rot
* Make sieve-manage-open work with STARTTLS: shorten stream managing
functions by using open-protocol-stream to do most of the work. Has
the nice benefit of enabling STARTTLS.
* Remove unneeded functions and options: the following functions and
options are neither in the API, nor called by any other function, so
they are deleted:
- sieve-manage-network-p
- sieve-manage-network-open
- sieve-manage-starttls-p
- sieve-manage-starttls-open
- sieve-manage-forward
- sieve-manage-streams
- sieve-manage-stream-alist
The options could not be applied in a meaningful way anymore; they
didn't happen to have much effect before.
* Cosmetic changes and code clean-up
* Enable Multibyte for SieveManage buffers: The parser won't properly
handle umlauts and line endings unless multibyte is turned on in the
process buffer.
* Wait for capabilities after STARTTLS: following RFC5804, the server
sends new capabilities after successfully establishing a TLS
connection with the client. The client should update the cached list
of capabilities, but we just ignore the answer for now.
lisp/gnus/eww.el (eww-tag-input): Implement submit buttons
(eww-click-radio): Implement radio and checkboxes
(eww-submit): Handle hidden elements
(eww-submit): Get submit button logic right
lisp/gnus/shr.el (shr-expand-url): Expand URLs that start with a slash correctly
Paul Eggert [Mon, 10 Jun 2013 20:26:20 +0000 (13:26 -0700)]
Documentation fix for 'ls' and hard links.
* compile.texi (Compilation Functions):
* files.texi (File Attributes, Changing Files):
Use current format for GNU 'ls' output.
(File Attributes): Fix problem introduced in previous change:
the link count is the number of hard links, not the number
of hard links + 1.
Aidan Gauland [Mon, 10 Jun 2013 02:41:49 +0000 (14:41 +1200)]
Update Ehsell visual-commands documentation
* eshell.texi (Input/Output): Expand to cover new visual-command
options, eshell-visual-subcommands and eshell-visual-options.
Divide into separate Visual Commands and Redirection sections.
* eshell/em-term.el (eshell-visual-commands)
(eshell-visual-subcommands)
(eshell-visual-options): Add summary line to docstrings. Add
cross-references.
Stephen Berman [Sun, 9 Jun 2013 19:16:39 +0000 (21:16 +0200)]
* todos.el: Fix and improve item date string editing.
(todos-date-pattern): Make dayname an explicitly numbered group.
(todos-basic-edit-item-header): Set match for dayname and use it
to ensure attempting to edit day, month or year of a date header
containing a day name is a noop, simplifying and fixing buggy code.
src/xdisp.c (compute_display_string_pos): When W is NULL, use the current
buffer as the object to pass to get-char-property.
(Fcurrent_bidi_paragraph_direction): Assign NULL to the window
pointer member of the bidi iterator, since no window is pertinent
to this function.
Eli Zaretskii [Sun, 9 Jun 2013 16:37:22 +0000 (19:37 +0300)]
Fix bug #14575 with window-specific overlays with line-prefix or wrap-prefix.
src/xdisp.c (get_it_property): If it->object is a buffer, pass to
get-char-property the window that is being rendered, instead of
the buffer, to support window-specific overlays.
Aidan Gauland [Sun, 9 Jun 2013 06:39:40 +0000 (18:39 +1200)]
Tidy module initialisation functions
* eshell/em-term.el (eshell-visual-command-p): New function.
(eshell-term-initialize): Move long lambda to separate function eshell-visual-command-p.
* eshell/em-dirs.el (eshell-dirs-initialise): Add missing #' to lambda.
* eshell/em-script.el (eshell-script-initialize): Add missing #' to lambda.
Eli Zaretskii [Sat, 8 Jun 2013 18:28:36 +0000 (21:28 +0300)]
Fix bug #14575 with window-specific overlays with display props.
src/bidi.c (bidi_fetch_char): Accept additional argument, the window
being displayed, and pass it to compute_display_string_pos.
(bidi_level_of_next_char, bidi_resolve_explicit_1)
(bidi_paragraph_init): All callers changed.
src/xdisp.c (init_from_display_pos, init_iterator)
(handle_single_display_spec, next_overlay_string)
(get_overlay_strings_1, reseat_1, reseat_to_string)
(push_prefix_prop, Fcurrent_bidi_paragraph_direction): Set
bidi_it.w member from it->w.
(compute_display_string_pos): Accept additional argument, the
window being displayed, and pass it to Fget_char_property.
src/dispextern.h (struct bidi_it): New member w, the window being
displayed.
(compute_display_string_pos): Adjust prototype.
Jan Djärv [Sat, 8 Jun 2013 18:13:24 +0000 (20:13 +0200)]
Fix compilation issues for GNUStep and GLIB conflicts.
* configure.ac (HAVE_GLIB): Only set XGSELOBJ if HAVE_NS = no.
(with_file_notification): Don't set to gfile if with_ns = yes.
* src/process.c (wait_reading_process_output): Check for NS before GLIB.
GLIB may be linked in due to rsvg, but ns_select must be called.
* src/xgselect.c (xg_select): Remove call to window_system_available
and g_main_context_pending at the top, so Gdk events (i.e. file
notify) are processed when Emacs is started with -nw.
Leo Liu [Sat, 8 Jun 2013 13:35:55 +0000 (21:35 +0800)]
* progmodes/octave.el (octave-add-log-current-defun): New function.
(octave-mode): Set add-log-current-defun-function.
(octave-goto-function-definition): Do not move point if not found.
(octave-find-definition): Enhance to try subfunctions first.
Jan Djärv [Sat, 8 Jun 2013 08:48:52 +0000 (10:48 +0200)]
* xgselect.c (xg_select): Remove call to window_system_available
and g_main_context_pending at the top, so Gdk events (i.e. file
notify) are processed when Emacs is started with -nw.
Stefan Monnier [Fri, 7 Jun 2013 22:58:35 +0000 (18:58 -0400)]
* lisp/emacs-lisp/smie.el: Improve show-paren-mode behavior.
(smie--opener/closer-at-point): New function.
(smie--matching-block-data): Use it. Don't match from right after an
opener or right before a closer. Obey smie-blink-matching-inners.
Don't signal a mismatch for repeated inners like "switch..case..case".
Leo Liu [Fri, 7 Jun 2013 13:00:47 +0000 (21:00 +0800)]
* progmodes/octave.el (octave-function-header-regexp): Fix.
(octave-help-mode-finish-hook, octave-help-mode-finish):
Remove. Just use temp-buffer-show-hook.
Eli Zaretskii [Fri, 7 Jun 2013 09:26:02 +0000 (12:26 +0300)]
Fix "make TAGS" on MS-Windows.
lisp/Makefile.in (TAGS TAGS-LISP): Pass the (long) list of *.el files
through xargs, to avoid failure due to MS-Windows limitations on
command-line length.
src/Makefile.in (ctagsfiles1, ctagsfiles2): Don't include *.m files.
(ctagsfiles3): New variable, includes only *.m files.
(TAGS): Use an explicit language name in the regular expressions,
to avoid transformation of '/SOMETHING' by MSYS to
'c:\MSYS\SOMETHING'.
Eli Zaretskii [Fri, 7 Jun 2013 08:31:53 +0000 (11:31 +0300)]
Minor improvements in nt/INSTALL.MSYS instructions.
nt/INSTALL.MSYS: mingw-get is not a GUI program (yet).
msys-automake is not suitable for MinGW builds. Mention the
--enable-locallisppath switch to msysconfig.sh. Suggested by
׃scar Fuentes <ofv@wanadoo.es>.
Richard Copley [Fri, 7 Jun 2013 08:08:29 +0000 (11:08 +0300)]
Fix bug #14513 with --enable-locallisppath not working on MS-Windows.
Makefile.in (msys_to_w32): Modify to support d:\foo file names.
(msys_lisppath_to_w32, msys_prefix_subst, msys_sed_sh_escape): New
variables.
(epaths-force-w32): Use them.
Paul Eggert [Thu, 6 Jun 2013 07:04:35 +0000 (00:04 -0700)]
A few porting etc. fixes for the new file monitor code.
See the thread containing
<http://lists.gnu.org/archive/html/emacs-devel/2013-06/msg00109.html>.
* gfilenotify.c (dir_monitor_callback, Fgfile_add_watch)
(Fgfile_rm_watch): Don't assume EMACS_INT is the same width as a pointer.
(dir_monitor_callback, Fgfile_rm_watch):
Use assq_no_quit instead of Fassoc, for speed.
(dir_monitor_callback, Fgfile_rm_watch):
eassert that the monitor is a fixnum.
(dir_monitor_callback): No need for CDR_SAFE.
Simplify building of lisp with alternative tails.
(Fgfile_add_watch, Fgfile_rm_watch):
Do not assume glib functions set errno reliably on failure.
(Fgfile_add_watch): Check that the monitor survives the XIL trick,
and signal an error otherwise.
(Fgfile_rm_watch): Prefer CONSP to !NILP.
Use Fdelq instead of Fdelete, for speed.
Stephen Berman [Wed, 5 Jun 2013 21:43:44 +0000 (23:43 +0200)]
* todos.el: Fix byte-compiler warnings.
(todos-merge-category): Relocate let-bound variable.
(todos-toggle-item-highlighting): Restrict to todos-mode,
todos-archive-mode and todos-filtered-items-mode.
(todos-toggle-item-header, todos-diary-goto-entry)
(todos-insert-sort-button): Let-bind variables that were
mistakenly free.
(todos-convert-legacy-files): Just require todo-mode instead of
conditionalizing it.
(todos-modes-set-2): Check whether hl-line-range-function is void.
Alan Mackenzie [Wed, 5 Jun 2013 20:57:09 +0000 (20:57 +0000)]
* isearch.el (isearch-allow-prefix): New user option.
(isearch-other-meta-char): don't exit isearch when a prefix
argument is typed whilst `isearch-allow-prefix' is non-nil.
* search.texi (Isearch Scroll): Rename to "Not Exiting Isearch".
(Net Exiting Isearch): Document new user option
`isearch-allow-prefix'.
Eli Zaretskii [Wed, 5 Jun 2013 20:45:34 +0000 (23:45 +0300)]
Fix bug #14558 with turning off mouse-highlight during highlight.
src/xdisp.c (handle_tool_bar_click): When mouse-highlight is off,
don't insist on being invoked on a highlighted tool-bar button.
Avoids losing tool-bar functionality when mouse-highlight is nil.
(note_tool_bar_highlight, note_mode_line_or_margin_highlight):
Don't highlight when mouse-highlight is nil.
(note_mouse_highlight): When mouse-highlight is nil, don't return
right away; instead, run tool-bar and mode-line highlight
subroutine, clear any existing highlight, and revert the mouse
pointer to its default shape.
Stefan Monnier [Wed, 5 Jun 2013 19:57:10 +0000 (15:57 -0400)]
* lisp/autorevert.el (auto-revert-notify-handler): Use memq.
Hide assertion failure.
* lisp/skeleton.el: Use cl-lib.
(skeleton-further-elements): Use defvar-local.
(skeleton-insert): Use cl-progv.
Stefan Monnier [Wed, 5 Jun 2013 18:10:27 +0000 (14:10 -0400)]
* lisp/simple.el: Move all the prog-mode code to prog-mode.el.
* lisp/progmodes/prog-mode.el: New file.
* lisp/loadup.el:
* src/lisp.mk (lisp): Add prog-mode.el.
Paul Eggert [Wed, 5 Jun 2013 17:04:13 +0000 (10:04 -0700)]
Chain glib's SIGCHLD handler from Emacs's (Bug#14474).
* process.c (dummy_handler): New function.
(lib_child_handler): New static var.
(handle_child_signal): Invoke it.
(catch_child_signal): If a library has set up a signal handler,
save it into lib_child_handler.
(init_process_emacs): If using glib and not on Windows, tickle glib's
child-handling code so that it initializes its private SIGCHLD handler.
* syssignal.h (SA_SIGINFO): Default to 0.
* xterm.c (x_term_init): Remove D-bus hack that I installed on May
31; it should no longer be needed now.
Stephen Berman [Wed, 5 Jun 2013 13:59:14 +0000 (15:59 +0200)]
* todos.el: Further code cleanup. Changes to commentary. Remove
autoload cookies. Handle todo items in Fancy Diary display.
(todos-done-separator): Reinstate length one less than
window-width until bug#2749 is fixed.
(todos-diary-goto-entry): New function, extracted from adapted
definition of diary-goto-entry, which is removed to be added to
diary-lib.el.
(todos-powerset): Rename from todos-powerset-iterative and remove
defalias by this name. Add doc string and comments.
(todos-modes-set-1, todos-modes-set-2, todos-modes-set-3)
(todos-mode-external-set): Add doc string.
Leo Liu [Wed, 5 Jun 2013 07:40:02 +0000 (15:40 +0800)]
Re-implement smie matching block highlight using show-paren-data-function.
* emacs-lisp/smie.el (smie-matching-block-highlight)
(smie--highlight-matching-block-overlay)
(smie--highlight-matching-block-lastpos)
(smie-highlight-matching-block)
(smie-highlight-matching-block-mode): Remove.
(smie--matching-block-data-cache): New variable.
(smie--matching-block-data): New function.
(smie-setup): Use smie--matching-block-data for
show-paren-data-function.
Stefan Monnier [Wed, 5 Jun 2013 02:35:40 +0000 (22:35 -0400)]
Fix compilation error with simultaneous dynamic+lexical scoping.
Add warning when a defvar appears after the first let-binding.
* lisp/emacs-lisp/bytecomp.el (byte-compile-lexical-variables): New var.
(byte-compile-close-variables): Initialize it.
(byte-compile--declare-var): New function.
(byte-compile-file-form-defvar)
(byte-compile-file-form-define-abbrev-table)
(byte-compile-file-form-custom-declare-variable): Use it.
(byte-compile-make-lambda-lexenv): Change the argument. Simplify.
(byte-compile-lambda): Share call to byte-compile-arglist-vars.
(byte-compile-bind): Handle dynamic bindings that shadow
lexical bindings.
(byte-compile-unbind): Make arg non-optional.
(byte-compile-let): Simplify.
* lisp/emacs-lisp/cconv.el (byte-compile-lexical-variables): Declare var.
(cconv--analyse-function, cconv-analyse-form): Populate it.
Protect byte-compile-bound-variables to limit the scope of defvars.
(cconv-analyse-form): Add missing rule for (defvar <foo>).
Remove unneeded rule for `declare'.
* lisp/emacs-lisp/cl-macs.el (cl--compiler-macro-adjoin): Use macroexp-let2
so as to avoid depending on cl-adjoin at run-time.
* lisp/emacs-lisp/cl-lib.el (cl-pushnew): Use backquotes.
* lisp/emacs-lisp/macroexp.el (macroexp--compiling-p): New function.
(macroexp--warn-and-return): Use it.
Stefan Monnier [Wed, 5 Jun 2013 01:58:43 +0000 (21:58 -0400)]
* src/keymap.c (Fcurrent_active_maps, Fdescribe_buffer_bindings):
* src/keyboard.c (menu_bar_items, tool_bar_items):
* src/doc.c (Fsubstitute_command_keys): Voverriding_terminal_local_map does
not override local keymaps any more.
Leo Liu [Tue, 4 Jun 2013 23:52:06 +0000 (07:52 +0800)]
* progmodes/compile.el (compile-goto-error): Add optional arg NOMSG.
(compilation-auto-jump): Suppress the "Mark set" message to give
way to exit message.
Stephen Berman [Tue, 4 Jun 2013 14:51:01 +0000 (16:51 +0200)]
* todos.el: Allow prompting for first item on adding a new
category. Fix handling of default todo file on adding first file.
(todos-add-item-if-new-category): New defcustom.
(todos-show, todos-jump-to-category, todos-add-category): Use it.
(todos-short-file-name): Return nil if file name is not a string.
(todos-add-file): Recalculate todos-files after adding a file.
(todos-show): If first file was just added, make it the default.
Alan Mackenzie [Tue, 4 Jun 2013 13:26:15 +0000 (13:26 +0000)]
Remove faulty optimisation from indentation calculation.
* progmodes/cc-engine.el (c-guess-basic-syntax): Don't calculate
search limit based on 2000 characters back from indent-point.