Stephen Berman [Fri, 18 Jun 2010 22:52:10 +0000 (23:52 +0100)]
* calendar/todos.el: Numerous spelling and comment fixes, doc
string fixes to conform with checkdoc, further rearrangement of
definitions, etc.
(todos-previous-line, todos-previous-answer)
(todos-insert-item-ask-date, todos-change-date)
(todos-date-nodayname-pattern, todos-dayname-date-pattern)
(todos-count-items-in-category, todos-count-all-items): Remove.
(todos-update-numbered-prefix, todos-item-start-overlays)
(todos-add-item-non-interactively): Comment out, also in uses.
(todos-done-separator): Change default value.
(todos-always-add-time-string): Rename from todos-add-time-string
and adjust uses.
(todos-read-category): Rename from todos-completing-read and
adjust callers; use todos-current-category.
(todos-make-categories-alist): Rename from function
todos-categories-alist.
(todos-categories-alist): New variable.
(todos-indent-to-here): New defcustom.
(todos-button): New face.
(todos-display-categories-alphabetically, todos-raise-category)
(todos-lower-category, todos-insert-item-for-diary-ask-date-time)
(todos-insert-item-here-ask-date-time)
(todos-insert-item-ask-date-time)
(todos-insert-item-ask-dayname-time): New commands.
(todos-edit-item-header): New command replacing todos-change-date.
(todos-category-number, todos-indent, todos-item-counts)
(todos-check-category-name, todos-read-date, todos-read-dayname)
(todos-read-time, todos-padded-string)
(todos-insert-category-name): New functions.
(todos-set-item-priority): New function replacing
todos-add-item-non-interactively.
(todos-mode-map): Remap newline to newline-and-indent.
(todos-edit-mode-map): Make sparse keymap; remap newline to
newline-and-indent.
(todos-categories-mode-map): New keymap.
(todos-mode, todos-edit-mode): Make indent-line-function local
variable and set to todos-indent.
(todos-categories-mode): New major mode.
(todos-display-categories): List categories initially in their
numerical order; add optional argument to switch to alphabetical
listing.
(todos-toggle-view-done-items): Simplify implementation.
(todos-toggle-display-date-time): Fix regexp search string.
(todos-backward-item, todos-forward-item): Use variable
todos-item-start.
(todos-add-category): Use todos-check-category-name and
todos-categories-alist.
(todos-rename-category): Use todos-current-category,
todos-check-category-name and todos-categories-alist.
(todos-delete-category): Use todos-check-category-name and
todos-categories-alist and take done items into account.
(todos-insert-item): Use separate arguments to handle insertion of
date/dayname and time strings, add new argument to mark item for
diary inclusion, use new todos-read-* functions,
todos-set-item-priority and todos-item-counts.
(todos-insert-item-here, todos-insert-item-for-diary)
(todos-insert-item-from-calendar): Adapt to new version of
todos-insert-item.
(todos-delete-item, todos-item-done): Use todos-item-counts.
(todos-edit-item): Indent newlines inserted by C-q C-j if nonspace
char follows.
(todos-lower-item): Ensure only not-done items can be lowered.
(todos-move-item): Use todos-current-category, todos-read-category
and todos-item-counts.
(todos-archive-done-items): Use todos-current-category and
todos-item-counts; fix regexp search string.
(todos-item-undo): Use todos-current-category,
todos-set-item-priority, todos-insert-with-overlays and
todos-item-counts; restore if user quits before inserting undone
item.
(todos-date-pattern): Rewrite without using
todos-date-nodayname-pattern and todos-dayname-date-pattern.
(todos-date-string-match): Do not make todos-date-pattern an
unnumbered group.
(todos-time-string-match): Make todos-date-pattern a shy group.
(todos-wrap-and-indent): Use todos-indent-to-here.
(todos-reset-prefix): Revert to using todos-show instead of
todos-category-select.
(todos-prefix-overlays): Fix numbering of done items and updating
of prefix.
(todos-category-select): Use todos-current-category; fix display
of separator string; don't move point to top of category.
(todos-jump-to-category-noninteractively): Use todos-category-number.
(todos-insert-with-overlays): Use todos-item-start unconditionally.
(todos-item-start): New variable.
(todos-item-start): Use it to define this function.
(todos-item-end): Adjust if item is last unfinished one before
displayed done items.
(todos-remove-item): Use todos-item-start and todos-item-end
instead of todos-forward-item and todos-backward-item.
(todos-longest-category-name-length): Add argument for list of
categories.
Stephen Berman [Tue, 25 May 2010 00:19:50 +0000 (01:19 +0100)]
* calendar/todos.el: Comment out calendar require, since diary-lib
requires calendar. Rearrange file to group definitions according
to their use (types of commands, internal functions, etc.)
(todos-file-done, todos-insert-threshold, todos-remove-separator)
(todos-date-string, todos-time-string, todos-check-overlay)
(todos-show-paren-hack, todos-file-item, todos-more-important-p):
Comment out.
(todos-current-date, todos-item-end-overlays)
(todos-list-categories): Remove.
(todos-item-end): Remove (the variable, not the function).
(todos-item-overlays): Rename to todos-prefix-overlays and adjust
callers.
(todos-prefix-overlays): Rename from todos-item-overlays.
(todos-done-separator, todos-done-string, todos-show-with-done)
(todos-files, todos-archive-file, todos-categories-buffer)
(todos-archived-categories-buffer, todos-wrap-lines)
(todos-line-wrapping-function): New defcustoms.
(todos-done, todos-done-sep): New faces.
(todos-done-face, todos-done-sep-face): Corresponding new variables.
(todos-search-string, todos-date-nodayname-pattern)
(todos-dayname-date-pattern, todos-date-pattern): New variables.
(todos-done-string-match, todos-category-string-match)
(todos-check-format, todos-wrap-and-indent, todos-reset-separator)
(todos-current-category, todos-count-items-in-category)
(todos-done-item-p, todos-categories-alist, todos-count-all-items)
(todos-longest-category-name-length): New functions.
(todos-categories-list): New buffer-specific function replacing
todos-list-categories.
(todos-toggle-item-numbering, todos-toggle-view-done-items)
(todos-search, todos-view-archive, todos-diary-items)
(todos-toggle-display-date-time, todos-insert-item-no-time)
(todos-insert-item-ask-date, todos-insert-item-for-diary)
(todos-insert-item-from-calendar, todos-edit-quit)
(todos-change-date, todos-item-done, todos-archive-done-items)
(todos-item-undo): New commands.
(todos-archive-mode): New mode.
(todos-archive-mode-map, todos-edit-mode-map): New keymaps.
(todos-category-beg): Change value.
(todos-number-prefix): Change default value.
(todos-edit-buffer): Change from defvar to defcustom.
(todos-font-lock-keywords): Use todos-done-string-match and
todos-category-string-match.
(todos-backward-item, todos-forward-item): Use todos-done-string
and todos-date-pattern.
(todos-display-categories): Reimplement using buttons from
button.el instead of widgets.
(todos-top-priorities): Use with-current-buffer; take done items
into account; ensure buffers gets fontified.
(todos-add-category): Ensure new category does not begin with
empty lines.
(todos-jump-to-category): Use todos-category-select instead of
todos-show.
(todos-rename-category): Prompt for new name in body instead of in
interactive spec.
(todos-insert-item): Don't insert in done items section of
category. Add two optional arguments to control insertion: (i) to
insert near point without prompting for priority; (ii) to use
defaults for date and time strings, to prompt for these, or to
choose date from the Calendar.
(todos-insert-item-here): Reimplement using todos-insert-item.
(todos-delete-item): Don't move point after deleting last item.
(todos-raise-item, todos-lower-item): Take done items into account.
(todos-move-item): Don't move done items; update item numbering;
restore if user quits before inserting moved item.
(todos-print): Prompt for confirmation to print.
(todos-reset-prefix): Search backward from end of file instead of
forward from top.
(todos-jump-to-category-noninteractively): Take Todos archive into
account.
(todos-category-select): Show or hide done items according to
todos-show-with-done; if shown, coordinate separator and prefix
overlays.
(todos-add-item-non-interactively): Replace binary insertion
algorithm with prompting for numerical priority.
(todos-insert-with-overlays): Remove use of variable todos-item-end.
(todos-item-start): Take done items into account; use
todos-date-pattern.
(todos-item-end): Reimplement using todos-forward-item.
(todos-remove-item): Reimplement using todos-forward-item and
todos-backward-item; redo overlay handling.
(todos-mode-map): Add some new key bindings and change numerous
existing bindings; use "i" as prefix key for item insertion
commands.
(todos-mode): Use todos-wrap-lines and delegate word-wrap and
wrap-prefix settings to todos-wrap-and-indent; add to invisibility
spec; set buffer-read-only to t and consequently let-bind this
variable in all Todos commands that change buffer content.
(todos-edit-mode): Make an indepent mode, not derived from text-mode.
(todos-save): Don't save top priorities buffer.
(todos-show): Make a no-op if called interactively in narrowed
Todos mode, since, also to work around item prefix reduplication
bug with show-paren-mode enabled; use todos-categories-list.
Stephen Berman [Sat, 7 Nov 2009 20:27:40 +0000 (21:27 +0100)]
* calendar/todos.el: Comment out time-stamp require; require
calendar and diary-lib.
(todos-prefix): Change default value and doc string to reflect new
meaning; add :initialize and :set functions.
(todos-time-string-format, todos-entry-prefix-function)
(todos-initials, todos-entry-timestamp-initials)
(todos-prefix-face, todos-category-sep, todos-category-end)
(todos-cp): Comment out.
(todos-prefix-string): Inherit from font-lock-comment-face.
(todos-item-header, todos-item-header-face): Remove.
(todos-date, todos-time): New faces.
(todos-date-face, todos-time-face): Corresponding new variables.
(todos-add-time-string, todos-include-in-diary)
(todos-exclusion-start, todos-exclusion-end, todos-number-prefix):
New defcustoms.
(todos-item-end, todos-item-start-overlays)
(todos-item-end-overlays): New variables.
(todos-date-string-match, todos-time-string-match): New functions.
(todos-font-lock-keywords): Use them.
(todos-current-date, todos-date-string, todos-time-string)
(todos-toggle-item-diary-inclusion, todos-toggle-diary-inclusion)
(todos-reset-prefix, todos-update-numbered-prefix)
(todos-check-overlay, todos-item-overlays)
(todos-insert-with-overlays, todos-show-paren-hack): New functions.
(todos-highlight-item): New command.
(todos-category-beg): Change value.
(todos-category-select): Use todos-category-beg and todos-item-overlays.
(todos-backward-item): Add optional count argument; use it and
todos-item-start.
(todos-forward-item): Use todos-check-overlay, todos-item-start
and variable todos-item-end.
(todos-edit-item, todos-delete-item): Use todos-number-prefix,
todos-update-numbered-prefix, todos-item-overlays.
(todos-add-category, todos-rename-category)
(todos-list-categories): Use new category format.
(todos-delete-category): Allow deleting non-empty category;
use new category format.
(todos-add-item-non-interactively): Comment out unnecessary
save-excursion; use todos-insert-with-overlays.
(todos-insert-item): Comment out unnecessary save-excursion; use
new item format for date/time header and diary inclusion marking.
(todos-insert-item-here): Use new item format for date/time header
and diary inclusion marking; use todos-insert-with-overlays.
(todos-raise-item): Make a no-op if point is on an empty line; use
todos-insert-with-overlays.
(todos-lower-item): Use todos-insert-with-overlays.
(todos-top-priorities): Move call to todos-show inside
save-excursion; add save-current-buffer after save-restriction.
(todos-item-start): Use variable todos-item-end.
(todos-item-end): Use todos-check-overlay and variable todos-item-end.
(todos-remove-item): Take item overlays into account.
(todos-mode): Change calculation of wrap-prefix; make
hl-line-range-function a local variable and set it to highlight
todo item.
(todos-show): Ensure point stays at top of category.
Stephen Berman [Fri, 3 Jul 2009 23:07:26 +0000 (00:07 +0100)]
* calendar/todos.el (todos-window-configuration): Comment out.
(todos-display-categories): Comment out use of
todos-window-configuration; use switch-to-buffer instead of
pop-to-buffer.
(todos-jump-to-category-noninteractively): Comment out use of
todos-window-configuration.
(todos-edit-item): Don't allow editing of date/time item header.
(todos-insert-item, todos-insert-item-here): Insert date/time
header in front of new item string.
(todos-mode): Tweak wrap-prefix.
Stephen Berman [Fri, 26 Jun 2009 00:22:56 +0000 (01:22 +0100)]
* calendar/todos.el (todos-file-do, todos-file-done):
Change default location to directory "~/.emacs.d/".
(todos-completion-ignore-case, todos-categories-buffer):
New defcustoms.
(todos-prefix-string, todos-item-header): New faces.
(todos-prefix-face, todos-item-header-face): Corresponding
new variables.
(todos-rename-category, todos-delete-category)
(todos-display-categories, todos-move-item): New commands.
(todos-mode-map): Add key bindings for new commands and for
todos-add-category, which had no key binding.
(todos-jump-to-category-noninteractively): New function.
(todos-top-priorities): Comment out code using a previously
deleted variable.
(todos-completing-read): Allow SPC to insert a space when entering
a new category name; use todos-completion-ignore-case.
(todos-font-lock-keywords, todos-window-configuration):
New variables.
(todos-mode): Make mode-name "TODOS"; make font-lock-defaults,
word-wrap, and wrap-prefix local variables.
Stephen Berman [Thu, 12 Feb 2009 21:35:50 +0000 (22:35 +0100)]
Second commit to todos.el.
* calendar/todos.el (todos-header): Remove defvar.
(todos-add-category): Comment out code that inserts and updates
the file local variables first line of the file todos-file-do.
(todos-list-categories): New function.
(todos-show): Use it; remove use of a previously deleted variable.
Stephen Berman [Thu, 12 Feb 2009 21:00:00 +0000 (22:00 +0100)]
Reconstructed and backdated initial commit of todos.el.
* calendar/todos.el: New file. This is a copy of todo-mode.el
from 2009-01-30T13:06:07Z!lekktu@gmail.com except for the following changes: replace all
occurrences of the namespace prefix "todo-" with "todos-", delete
the defvar todo-cats (the old name of todo-categories) and its use
in todos-add-category, delete all defaliases of old command names.
Jan Djärv [Tue, 11 Sep 2012 17:08:02 +0000 (19:08 +0200)]
* nsterm.h: Add delay parameter to updateFrameSize.
* nsterm.m (ns_judge_scroll_bars): Pass NO to updateFrameSize.
(updateFrameSize:): Add delay parameter to updateFrameSize, send it
to change_frame_size.
(windowDidResize:): Pass YES to updateFrameSize.
Discard killed buffers from deleted window and frame objects.
This reduces an amount of references to killed buffers and
helps GC to reclaim them faster.
* alloc.c (discard_killed_buffers): New function.
(mark_object): Use it for deleted windows and frames.
(mark_object): If symbol's value is set up for a killed buffer
or deleted frame, restore it's global binding.
* data.c (swap_in_global_binding): Add GC notice.
(swap_in_symval_forwarding): Use convenient set_blv_where.
* window.c (wset_next_buffers, wset_prev_buffers): Move ...
* window.h: ... to here.
* Makefile.in (install-arch-dep, install-arch-indep, install-doc):
Be more explicit about dependencies, for parallel `make install'.
It is not so unreasonable to run `make -j# install' from a clean state
for a self-contained NS build, where the "installation" happens within
the build tree.
Convenient macro to check whether the buffer is live.
* buffer.h (BUFFER_LIVE_P): New macro.
* alloc.c, buffer.c, editfns.c, insdel.c, lread.c, marker.c:
* minibuf.c, print.c, process.c, window.c, xdisp.c: Use it.
Paul Eggert [Tue, 11 Sep 2012 02:28:27 +0000 (19:28 -0700)]
Simplify, document, and port floating-point.
The porting part of this patch fixes bugs on non-IEEE platforms
with frexp, ldexp, logb.
* admin/CPP-DEFINES (HAVE_CBRT, HAVE_LOGB, logb): Remove.
* configure.ac (logb, cbrt): Do not check for these functions,
as they are not being used.
* doc/lispref/numbers.texi (Float Basics, Arithmetic Operations, Math Functions):
Document that / and mod (with floating point arguments), along
with asin, acos, log, log10, expt and sqrt, return special values
instead of signaling exceptions.
(Float Basics): Document that logb operates on the absolute value
of its argument.
(Math Functions): Document that (log ARG BASE) also returns NaN if
BASE is negative. Document that (expt X Y) returns NaN if X is a
finite negative number and Y a finite non-integer.
* etc/NEWS: Document NaNs versus signaling-error change.
* src/data.c, src/lisp.h (Qdomain_error, Qsingularity_error, Qunderflow_error):
Now static.
* src/floatfns.c: Simplify discussion of functions that Emacs doesn't
support, by removing commented-out code and briefly listing the
C89 functions excluded. The commented-out stuff was confusing
maintenance, e.g., we thought we needed cbrt but it was commented out.
(logb): Remove decl; no longer needed.
(isfinite): New macro, if not already supplied.
(isnan): Don't replace any existing macro.
(Ffrexp, Fldexp): Define even if !HAVE_COPYSIGN, as frexp and ldexp
are present on all C89 platforms.
(Ffrexp): Do not special-case zero, as frexp does the right thing
for that case.
(Flogb): Do not use logb, as it doesn't have the desired meaning
on hosts that use non-base-2 floating point. Instead, stick with
frexp, which is C89 anyway. Do not pass an infinity or a NaN to
frexp, to avoid getting an unspecified result.
Paul Eggert [Mon, 10 Sep 2012 01:03:27 +0000 (18:03 -0700)]
Improve robustness of 'make bootstrap'.
Run autogen.sh after bootstrap-clean, to avoid bzr pull issues.
* INSTALL, README: Document autogen.sh.
* Makefile.in (Makefile): Mark it as precious, since it's updated
atomically.
(MAKE_CONFIG_STATUS): New macro.
(config.status, bootstrap): Use it. This causes 'make bootstrap'
to run config.status with the --recheck option, which is more
appropriate for a bootstrap.
(bootstrap): Run autogen.sh right after cleaning. Don't worry
about failures due to missing tools.
* autogen.sh: Exit with status 101 when failing due to missing tools.
* make-dist: Distribute autogen.sh.
Juri Linkov [Sun, 9 Sep 2012 22:15:24 +0000 (01:15 +0300)]
* lisp/replace.el (replace-regexp-lax-whitespace): New defcustom.
(replace-lax-whitespace, query-replace-regexp)
(query-replace-regexp-eval, replace-regexp): Doc fix.
(perform-replace, replace-highlight): Let-bind
isearch-lax-whitespace to replace-lax-whitespace and
isearch-regexp-lax-whitespace to replace-regexp-lax-whitespace.
* lisp/isearch.el (isearch-query-replace): Let-bind
replace-lax-whitespace to isearch-lax-whitespace and
replace-regexp-lax-whitespace to
isearch-regexp-lax-whitespace.
Eli Zaretskii [Sun, 9 Sep 2012 20:10:36 +0000 (23:10 +0300)]
Avoid leaving traces of cursor when entering linum-mode.
src/fringe.c (draw_fringe_bitmap_1): Don't reduce the width of the
left fringe if the window has a left margin. This avoids leaving
traces of the cursor because its leftmost pixel is not drawn over.
Paul Eggert [Sun, 9 Sep 2012 16:06:33 +0000 (09:06 -0700)]
Assume C89 or later for math functions.
This simplifies the code, and makes it a bit smaller and faster,
and (most important) makes it easier to clean up signal handling
since we can stop worring about floating-point exceptions in
library code. That was a problem before C89, but the problem
went away many years ago on all practical Emacs targets.
* configure.ac (frexp, fmod): Remove checks for these functions,
as we now assume them.
(FLOAT_CHECK_DOMAIN, HAVE_INVERSE_HYPERBOLIC, NO_MATHERR)
(HAVE_EXCEPTION):
Remove; no longer needed.
* admin/CPP-DEFINES (HAVE_FMOD, HAVE_FREXP, FLOAT_CHECK_DOMAIN)
(HAVE_INVERSE_HYPERBOLIC, NO_MATHERR): Remove.
* src/data.c, src/image.c, src/lread.c, src/print.c:
Don't include <math.h>; no longer needed.
* src/data.c, src/floatfns.c (IEEE_FLOATING_POINT): Don't worry that it
might be autoconfigured, as that never happens.
* src/data.c (fmod):
* src/doprnt.c (DBL_MAX_10_EXP):
* src/print.c (DBL_DIG):
Remove. C89 or later always defines these.
* src/floatfns.c (HAVE_MATHERR, FLOAT_CHECK_ERRNO, FLOAT_CHECK_DOMAIN)
(in_float, float_error_arg, float_error_arg2, float_error_fn_name)
(arith_error, domain_error, domain_error2):
Remove all this pre-C89 cruft. Do not include <errno.h> as that's
no longer needed -- we simply return what C returns. All uses removed.
(IN_FLOAT, IN_FLOAT2): Remove. All uses replaced with
the wrapped code.
(FLOAT_TO_INT, FLOAT_TO_INT2, range_error, range_error2):
Remove. All uses expanded, as these macros are no longer used
more than once and are now more trouble than they're worth.
(Ftan): Use tan, not sin / cos.
(Flogb): Assume C89 frexp.
(fmod_float): Assume C89 fmod.
(matherr) [HAVE_MATHERR]: Remove; no longer needed.
(init_floatfns): Remove. All uses removed.
Alan Mackenzie [Sun, 9 Sep 2012 11:03:37 +0000 (11:03 +0000)]
Correct the handling of two c-state-cache state variables.
cc-engine.el (c-state-cache-init): Initialise
c-state-semi-nonlit-pos-cache\(-limit\)? properly.
(c-record-parse-state-state): record
c-state-semi-nonlit-pos-cache\(-limit\)?.
* lisp/progmodes/ruby-mode.el (ruby-toggle-block): Guess the current block,
not just expect to be at its beginning. Adjust callees.
Succeed when do-end block has no space before the pipe character.
(ruby-brace-to-do-end): When the original block is one-liner,
convert to multiline. Reindent the result.
* test/automated/ruby-mode-tests.el:
(ruby-toggle-block-to-multiline): New test.
(ruby-should-indent-buffer, ruby-toggle-block-to-do-end)
(ruby-toggle-block-to-brace): Use buffer-string.
Jambunathan K [Sat, 8 Sep 2012 20:09:06 +0000 (16:09 -0400)]
* lisp/register.el (increment-register): Route it to `append-to-register',
if register contains text so that `C-x r +' can now be
used for appending to a text register.
(register): New group.
(register-separator): New user option.
(append-to-register, prepend-to-register): Add separator based on
`register-separator.
* doc/emacs/regs.texi (Text Registers): `C-x r +' can now be used instead of
M-x append-to-register. New option `register-separator'.
(Number Registers): Mention that `C-x r +' is polymorphic.
Alan Mackenzie [Sat, 8 Sep 2012 20:00:13 +0000 (20:00 +0000)]
AWK Mode: make auto-newline work when there's "==" in the pattern.
cc-cmds.el (c-point-syntax): Handle virtual semicolons correctly.
cc-engine.el (c-guess-basic-syntax CASE 5A.3): Test more rigorously for
"=" token.
Martin Rudalics [Sat, 8 Sep 2012 13:28:11 +0000 (15:28 +0200)]
Fix handling of debugger window. (Bug#8789)
* window.el (display-buffer-in-previous-window): New buffer
display action function.
* emacs-lisp/debug.el (debugger-bury-or-kill): New option.
(debugger-previous-window): New variable.
(debug): Rewrite using display-buffer-in-previous-window,
quit-restore-window and debugger-bury-or-kill. (Bug#8789)
Jan Djärv [Sat, 8 Sep 2012 12:48:33 +0000 (14:48 +0200)]
* nsterm.h (EmacsView): Add updateFrameSize.
* nsterm.m (ns_clip_to_row): Remove code that deals with drawing fringe
in the internal border.
(x_set_window_size): Remove static variables and their usage.
(ns_redraw_scroll_bars): Fix NSTRACE arg.
(ns_after_update_window_line, ns_draw_fringe_bitmap): Remove
fringe/internal border adjustment.
(ns_draw_fringe_bitmap): Make code more like other terms (xterm.c).
(ns_draw_window_cursor): Remove fringe/internal border adjustment.
(ns_fix_rect_ibw): Remove.
(ns_get_glyph_string_clip_rect): Remove call to ns_fix_rect_ibw.
(ns_dumpglyphs_box_or_relief): Ditto.
(ns_maybe_dumpglyphs_background): Remove fringe/internal border
adjustment.
(ns_dumpglyphs_image): Ditto.
(ns_dumpglyphs_stretch): Fix coding style. Remove fringe/internal
border adjustment.
(ns_set_vertical_scroll_bar): Remove variables barOnVeryLeft/Right and
their usage. Add fringe_extended_p and its use as in other terms.
(ns_judge_scroll_bars): Code style fix. Call updateFrameSize if
scroll bar was removed.
(updateFrameSize): New function.
(windowDidResize): Move code to updateFrameSize and call it.
Matt McClure [Fri, 7 Sep 2012 14:53:15 +0000 (16:53 +0200)]
* progmodes/python.el (python-shell-send-string): When
default-directory is remote, create temp file on remote
filesystem.
(python-shell-send-file): When file is remote, pass local view of
file paths to remote Python interpreter. (Bug#12340)
Paul Eggert [Fri, 7 Sep 2012 08:46:44 +0000 (01:46 -0700)]
More signal-handler cleanup.
* configure.ac (FLOAT_CHECK_DOMAIN): Comment fix (Bug#12327).
* src/floatfns.c: Comment fix.
* src/lisp.h (force_auto_save_soon): Declare regardless of SIGDANGER.
SIGDANGER might not be in scope so "#ifdef SIGDANGER" is not right,
and anyway the declaration is harmless even if SIGDANGER is not defined.
* src/syssignal.h (SIGIO): Also #undef if (! defined FIONREAD ||
defined BROKEN_FIONREAD). systty.h formerly did this, but other
source files not surprisingly expected syssignal.h to define, or
not define, SIGIO, and it's cleaner to do it that way, for consistency.
Include <sys/ioctl.h>, for FIONREAD.
* src/systty.h (SIGIO): Do not #undef here; it's now syssignal.h's job.
This eliminates a problem whereby other files mysteriously had
to include "syssignal.h" before including "systty.h" if they
wanted to use "#ifdef SIGIO".
* lisp/progmodes/ruby-mode.el
(ruby-beginning-of-defun): Only consider 3 keywords defun beginners.
(ruby-end-of-defun): Expect that the point is at the beginning of
the defun.
* lisp/progmodes/ruby-mode.el (ruby-end-of-defun)
(ruby-beginning-of-defun): Simplify, allow indentation before
block beginning and end keywords. Also, fix accidental change in the former.
* lisp/progmodes/ruby-mode.el (ruby-indent-beg-re): Add pieces from
ruby-beginning-of-indent, simplify, allow all keywords to have
indentation before them.
(ruby-beginning-of-indent): Adjust for above. Search until the
found point is not inside a string or comment.
(ruby-font-lock-keywords): Allow symbols to start with "@"
character, give them higher priority than variables.
(ruby-syntax-propertize-function)
(ruby-font-lock-syntactic-keywords): Remove the "not comments"
matchers. Expression expansions are not comments when inside a
string, and there comment syntax status is irrelevant.
(ruby-match-expression-expansion): New function. Check that
expression expansion is inside a string, and it's not escaped.
(ruby-font-lock-keywords): Use it.
* test/automated/ruby-mode-tests.el: New tests (Bug#11613).
Paul Eggert [Fri, 7 Sep 2012 01:27:44 +0000 (18:27 -0700)]
Signal-handler cleanup.
Emacs's signal handlers were written in the old 4.2BSD style with
sigblock and sigmask and so forth, and this led to some
inefficiencies and confusion. Rewrite these to use
pthread_sigmask etc. without copying signal sets around. Also,
get rid of the confusing macros 'SIGNAL_THREAD_CHECK' and
'signal', and instead use functions that do not attempt to take
over the system name space. This patch causes Emacs's text
segment to shrink by 0.7% on my platform, Fedora 17 x86-64.
* configure.ac (PTY_OPEN, PTY_TTY_NAME_SPRINTF):
Adjust to syssignal.h changes.
(SIGNAL_H_AB): Remove; no longer needed.
* src/alloc.c, src/emacsgtkfixed.c, src/nsfns.m, src/widget.c, src/xmenu.c:
Do not include <signal.h> or "syssignal.h", as these
modules do not use signals.
* src/atimer.c, src/callproc.c, src/data.c, src/dispnew.c, src/emacs.c:
* src/floatfns.c, src/gtkutil.c, src/keyboard.c, src/process.c, src/sound.c:
* src/sysdep.c, src/term.c, src/xterm.c:
Do not include <signal.h>, as "syssignal.h" does that for us now.
* src/atimer.c (sigmask_atimers): New function.
(block_atimers, unblock_atimers): New functions,
replacing the old macros BLOCK_ATIMERS and UNBLOCK_ATIMERS.
All uses replaced.
* src/conf_post.h [SIGNAL_H_AHB]: Do not include <signal.h>;
no longer needed here.
* src/emacs.c (main): Inspect existing signal handler with sigaction,
so that there's no need to block and unblock SIGHUP.
* src/sysdep.c (struct save_signal): New member 'action', replacing
old member 'handler'.
(save_signal_handlers, restore_signal_handlers):
Use sigaction instead of 'signal' to save and restore.
(get_set_sighandler, set_sighandler) [!WINDOWSNT]:
New function. All users of 'signal' modified to use set_sighandler
if they're writeonly, and to use sys_signal if they're read+write.
(emacs_sigaction_init, forwarded_signal): New functions.
(sys_signal): Remove. All uses replaced by calls to sigaction
and emacs_sigaction_init, or by direct calls to 'signal'.
(sys_sigmask) [!__GNUC__]: Remove; no longer needed.
(sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove;
all uses replaced by pthread_sigmask etc. calls.
* src/syssignal.h: Include <signal.h>.
(emacs_sigaction_init, forwarded_signal): New decls.
(SIGMASKTYPE): Remove. All uses replaced by its definiens, sigset_t.
(SIGEMPTYMASK): Remove; all uses replaced by its definiens, empty_mask.
(sigmask, sys_sigmask): Remove; no longer needed.
(sigpause): Remove. All uses replaced by its definiens, sigsuspend.
(sigblock, sigunblock, sigfree):
(sigsetmask) [!defined sigsetmask]:
Remove. All uses replaced by pthread_sigmask.
(signal): Remove. Its remaining uses (with SIG_DFL and SIG_IGN)
no longer need to be replaced, and its typical old uses
are now done via emacs_sigaction_init and sigaction.
(sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove decls.
(sys_sigdel): Remove; unused.
(NSIG): Remove a FIXME; the code's fine. Remove an unnecessary ifdef.
* progmodes/vhdl-mode.el (vhdl-speedbar-initialize): Don't use
obsolete alias speedbar-key-map.
(vhdl-doc-variable, vhdl-doc-mode): Use called-interactively-p.
(vhdl-index-menu-init): Don't use obsolete variable font-lock-maximum-size.
Explicitly mark buffer_defaults and buffer_local_symbols.
* alloc.c (Fgarbage_collect): Mark buffer_defaults and
mark_local_symbols here.
(mark_object): If GC_CHECK_MARKED_OBJECTS, simplify checking
since special buffers aren't marked here any more.
(allocate_buffer): Chain new buffer with all_buffers here...
* buffer.c (Fget_buffer_create, Fmake_indirect_buffer): ...and
not here.
(Vbuffer_defaults, Vbuffer_local_symbols): Remove.
(syms_of_buffer): Remove staticpro of the above.
(init_buffer_once): Set names for buffer_defaults and
buffer_local_symbols.
Juri Linkov [Thu, 6 Sep 2012 08:49:40 +0000 (11:49 +0300)]
* lisp/replace.el (replace-lax-whitespace): New defcustom.
(query-replace, query-replace-regexp, query-replace-regexp-eval)
(replace-string, replace-regexp): Mention it in docstrings.
(perform-replace, replace-highlight): Let-bind
isearch-lax-whitespace and isearch-regexp-lax-whitespace according
to the values of replace-lax-whitespace and regexp-flag.
Don't let-bind search-whitespace-regexp.
* lisp/isearch.el (isearch-query-replace): Let-bind
replace-lax-whitespace instead of let-binding
replace-search-function and replace-re-search-function.
(isearch-lazy-highlight-search): Let-bind isearch-lax-whitespace
and isearch-regexp-lax-whitespace to lazy-highlight variables.
(isearch-toggle-symbol): Set isearch-regexp to nil
in isearch-word mode (like in isearch-toggle-word).
Juri Linkov [Thu, 6 Sep 2012 08:33:17 +0000 (11:33 +0300)]
Use `isearch-search-fun' in `perform-replace' (bug#10885, bug#10887).
* lisp/replace.el (replace-search-function)
(replace-re-search-function): Set default values to nil.
(perform-replace): Let-bind isearch-related variables based on
replace-related values, call `isearch-search-fun' and let-bind
the result to `search-function'. Remove code that sets
`search-function' and `search-string' separately for
`delimited-flag'.
(replace-highlight): Add new argument `delimited-flag' and
rename other arguments to the names used in `perform-replace'.
Let-bind `isearch-word' to the argument `delimited-flag'.
* gnus-score.el (gnus-score-decode-text-parts): Use #' for
mm-text-parts used in labels macro to make it work with XEmacs 21.5.
* gnus-util.el (gnus-string-prefix-p): New function, an alias to
string-prefix-p in Emacs >=23.2.
* nnmaildir.el (nnmaildir--ensure-suffix, nnmaildir--add-flag)
(nnmaildir--remove-flag, nnmaildir--scan): Use gnus-string-match-p
instead of string-match-p.
(nnmaildir--scan): Use gnus-string-prefix-p instead of string-prefix-p.