Paul Eggert [Tue, 6 May 2014 21:13:37 +0000 (14:13 -0700)]
* image.c: Do not use libpng if HAVE_NS, as NS does its own thing.
[HAVE_NS]: Do not include png.h.
(x_query_frame_background_color): New function.
(png_load_body, imagemagick_load_image, svg_load_image): Use it.
(png_load_body): Coalesce duplicate code.
Paul Eggert [Sun, 4 May 2014 21:28:08 +0000 (14:28 -0700)]
Consult libpng-config more consistently.
This is mainly for simplicity, but it should also avoid
some future problems like the ones we recently had with NetBSD.
* configure.ac (LIBPNG): Configure after LIBZ. Use libpng-config
for cflags, too. Append -lz if we're not already doing that with
LIBZ. Do not bother appending -lm, since we always append that.
Coalesce some duplicate code.
* src/Makefile.in (PNG_CFLAGS): New var.
(ALL_CFLAGS): Use it.
* src/image.c [HAVE_PNG]: Don't worry about <libpng/png.h>, as
CFLAGS now handles this.
Paul Eggert [Sun, 4 May 2014 18:51:32 +0000 (11:51 -0700)]
Revert recent libpng changes.
They fix only bugs that aren't being reported, so it may be better
to do them on the trunk.
* configure.ac (PNG_CFLAGS): Remove. All uses removed.
(LIBPNG): Don't be consistent about -lpng16 versus -lpng.
Ignore libpng-config's exit status. Always append -lz -lm.
* src/Makefile.in (PNG_CFLAGS): Remove; all uses removed.
* src/image.c [HAVE_LIBPNG_PNG_H]: Include <libpng/png.h>, not <png.h>.
Leo Liu [Sun, 4 May 2014 00:16:58 +0000 (08:16 +0800)]
Support Chinese diary entries in calendar and diary
* doc/emacs/cal-xtra.texi (Non-Gregorian Diary): Document new features for
Chinese calendar and diary.
* etc/NEWS: Mention support for Chinese dates in calendar and diary.
* lisp/calendar/cal-china.el (calendar-chinese-month-name-array): New var.
(calendar-chinese-from-absolute-for-diary)
(calendar-chinese-to-absolute-for-diary)
(calendar-chinese-mark-date-pattern, diary-chinese-mark-entries)
(diary-chinese-list-entries): New functions to list and mark
Chinese diary entries in the calendar window.
(diary-chinese-anniversary)
(diary-chinese-insert-anniversary-entry)
(diary-chinese-insert-entry, diary-chinese-insert-monthly-entry)
(diary-chinese-insert-yearly-entry): New commands to insert
Chinese diary entries.
* lisp/calendar/cal-menu.el (cal-menu-diary-menu): Add entries for
inserting Chinese diary entries.
* lisp/calendar/calendar.el (diary-chinese-entry-symbol): New
customizable variable.
(calendar-mode-map): Add bindings for inserting Chinese diary
entries.
* lisp/calendar/diary-lib.el (diary-font-lock-keywords): Support
font-locking Chinese dates.
Paul Eggert [Sat, 3 May 2014 21:06:04 +0000 (14:06 -0700)]
Require ImageMagick >= 6.3.5, due to PixelSetMagickColor.
* configure.ac (IMAGEMAGICK_MODULE): Bump prereq from 6.2.8 to 6.3.5.
A more-complicated fix would be to remove uses of PixelSetMagickColor,
introduced in ImageMagick 6.3.5 (Sept. 2007).
Paul Eggert [Sat, 3 May 2014 20:13:10 +0000 (13:13 -0700)]
Handle systems without WCONTINUED consistently.
* lib-src/emacsclient.c (WCONTINUED): Move to ../src/syswait.h.
* src/process.c (handle_child_signal): Remove WCONTINUED ifdef,
because WCONTINUED is always defined now.
* src/syswait.h (WCONTINUED): Move here from ../lib-src/emacsclient.c.
Paul Eggert [Sat, 3 May 2014 16:27:17 +0000 (09:27 -0700)]
Get --enable-gcc-warnings to work after touching configure.ac.
Preserve ACLOCAL_PATH in later builds, so that by default it has
the same value as it did in the first build after initial checkout.
* Makefile.in (ACLOCAL_PATH): New macro.
($(srcdir)/aclocal.m4): Use it.
* configure.ac (ACLOCAL_PATH): AC_SUBST it.
* autogen.sh (env_space): New var.
Tell user what variables, if any, to pass to 'configure'.
Juri Linkov [Sat, 3 May 2014 09:22:59 +0000 (12:22 +0300)]
* lisp/dired.el (dired-check-switches, dired-switches-recursive-p): New functions.
(dired-switches-escape-p, dired-move-to-end-of-filename):
Use `dired-check-switches'.
(dired-insert-old-subdirs, dired-build-subdir-alist)
(dired-sort-R-check): Use `dired-switches-recursive-p'.
Paul Eggert [Sat, 3 May 2014 08:12:06 +0000 (01:12 -0700)]
Get --enable-gcc-warnings working again.
The recent changes to configure.ac removed the transliteration of
-I to -isystem in CFLAGS, which is needed for --enable-gcc-warnings.
Bring this back while keeping the spirit of the recent changes.
* configure.ac (edit_cflags): Restore this shell var, and put it
at the top level, where it'll be useful when emacs-24 is next merged.
(EMACS_CHECK_MODULES): New macro. All uses of PKG_CHECK_MODULES
changed to use it.
Paul Eggert [Sat, 3 May 2014 07:09:16 +0000 (00:09 -0700)]
Make it easier on maintainers who use their own Automake.
* autogen.sh (ACLOCAL_PATH, AUTORECONF_ENV): New vars.
Set them to avoid problems when maintainers prepend their own
Automake installations to their PATH. Report an error if pkg.m4
can't be found.
Stefan Monnier [Sat, 3 May 2014 02:27:46 +0000 (22:27 -0400)]
* lisp/vc/ediff-diff.el (ediff-set-fine-diff-properties-in-one-buffer):
Use nil rather than `default' for the "default" appearance.
* lisp/vc/ediff-util.el (ediff-inferior-compare-regions)
(ediff-toggle-autorefine, ediff-unselect-difference): Don't use
a misleading `default' value when it's really a boolean.
* lisp/vc/ediff-init.el (ediff-set-overlay-face): Don't set help-echo if the
overlay is not visible.
Paul Eggert [Fri, 2 May 2014 19:34:03 +0000 (12:34 -0700)]
Consult libpng-config more consistently.
* configure.ac (edit_cflags): Move this up and to the top level,
so that PNG_CFLAGS can use it too.
(PNG_CFLAGS): New var.
(png_longjmp): Use PNG_CFLAGS when checking.
(LIBPNG): Be consistent about -lpng16 etc; e.g., don't use -lpng16
in some places and -lpng in others. Test libpng-config's exit
status. If it succeeds, use its output rather than appending -lz -lm.
* src/Makefile.in (PNG_CFLAGS): New var.
(ALL_CFLAGS): Use it.
* src/image.c [HAVE_PNG]: Don't worry about <libpng/png.h>, as
CFLAGS now handles this.
* todo-mode.texi: Update, improve exposition, add cross
references, fix typos.
(Inserting New Items, Editing Item Headers and Text): Rewrite to
document new user interface.
Stephen Berman [Fri, 2 May 2014 13:58:23 +0000 (15:58 +0200)]
Extend todo item insertion UI to item editing.
* calendar/todo-mode.el: Reimplement item editing to have the same
basic user interface as item insertion, and make small UI and
larger internal improvements to the latter.
(todo-insert-item): Add reference to the Todo mode user manual to
the documentation string.
(todo-insert-item--basic): Rename from todo-basic-insert-item and
adjust all callers. Change signature to combine diary and
nonmarking arguments. Incorporate functionality of deleted item
copying command and add error checking. Remove detailed
descriptions of the arguments from the documentation string, since
this is treated in the Todo mode user manual.
(todo-copy-item, todo-edit-multiline-item)
(todo-edit-done-item-comment, todo-edit-item-header)
(todo-edit-item-time, todo-edit-item-date-from-calendar)
(todo-edit-item-date-to-today, todo-edit-item-date-day-name)
(todo-edit-item-date-year, todo-edit-item-date-month)
(todo-edit-item-date-day, todo-edit-item-diary-nonmarking):
Remove.
(todo-edit-item): Reimplement as wrapper command for
todo-edit-item--next-key and make it distinguish done and not done
todo items.
(todo-edit-item--text): New function, replacing old command
todo-edit-item and incorporating deleted commands
todo-edit-multiline-item and todo-edit-done-item-comment.
(todo-edit-item--header): Rename from todo-basic-edit-item-header.
Use only numeric value of prefix argument. Remove detailed
descriptions of the arguments from the documentation string, since
this is treated in the Todo mode user manual.
(todo-edit-item--diary-inclusion): New function, replacing old
command todo-edit-item-diary-inclusion and incorporating and fixing
functionality of deleted command todo-edit-item-diary-nonmarking,
making sure to remove todo-nondiary-marker when adding
diary-nonmarking-symbol.
(todo-edit-category-diary-inclusion): Make sure to delete
diary-nonmarking-symbol when adding todo-nondiary-marker.
(todo-edit-category-diary-nonmarking): Fix indentation.
(todo-insert-item--parameters): Group diary and nonmarking
parameters together.
(todo-insert-item--apply-args): Adjust to signature of
todo-insert-item--basic and incorporate copy parameter.
Make small code improvements.
(todo-insert-item--next-param): Improve prompt and adjust it to
new parameter grouping. Remove obsolete code.
(todo-edit-item--param-key-alist)
(todo-edit-item--date-param-key-alist)
(todo-edit-done-item--param-key-alist): New defconsts.
(todo-edit-item--prompt): New variable.
(todo-edit-item--next-key): New function.
(todo-key-bindings-t): Bind "e" to todo-edit-item. Remove
bindings of deleted commands.
Eli Zaretskii [Fri, 2 May 2014 12:28:10 +0000 (15:28 +0300)]
Improve indexing in trouble-related sections of Emacs User manual.
doc/emacs/trouble.texi (Lossage, DEL Does Not Delete, Stuck Recursive)
(Screen Garbled, Text Garbled, After a Crash, Emergency Escape)
(Bug Criteria, Understanding Bug Reporting, Checklist, Service):
Improve indexing.
Katsumi Yamaoka [Fri, 2 May 2014 09:44:34 +0000 (09:44 +0000)]
Gnus: Make gnus-mime-inline-part and gnus-mime-inline-part work similarly
* gnus-art.el (gnus-mime-inline-part): Redisplay a button so as to show
the displaying state of a part.
(gnus-mime-inline-part): Don't insert a newline in the beginning of
a part like gnus-mime-inline-part doesn't; work for XEmacs.
* mm-decode.el (mm-display-part): Don't insert a newline in the top.
(mm-shr): Make undisplayer unbreakable.
Barry O'Reilly [Thu, 1 May 2014 23:25:28 +0000 (19:25 -0400)]
Change algorithm used to adjust positions for undo in region
* simple.el (undo-make-selective-list): New algorithm fixes
incorrectness of position adjustments when undoing in region.
(Bug#17235)
(undo-elt-crosses-region): Make obsolete.
(undo-adjust-elt, undo-adjust-beg-end, undo-adjust-pos): New
functions to adjust positions using undo-deltas.
* automated/undo-tests.el (undo-test-region-deletion): New test to
demonstrate bug#17235.
(undo-test-region-example): New test to verify example given in
comments for undo-make-selective-list.
Stefan Monnier [Thu, 1 May 2014 15:15:46 +0000 (11:15 -0400)]
* src/intervals.c: Tighten assertions.
(create_root_interval): Make sure the interval is not empty.
(intervals_equal): Use booleans.
(rotate_right, rotate_left): Check LENGTHs rather than TOTAL_LENGTH.
(balance_an_interval): Sanity check LENGTHs and TOTAL_LENGTHs.
(balance_possible_root_interval): Simplify and use booleans.
(split_interval_right, split_interval_left): Check LENGTH, and remove
now redundant assertion.
(adjust_intervals_for_insertion): Remove now redundant assertions.
(delete_node, interval_deletion_adjustment)
(adjust_intervals_for_deletion, merge_interval_right)
(merge_interval_left): Check LENGTH rather than TOTAL_LENGTH.
(reproduce_interval): Make sure the interval is not empty.
Eli Zaretskii [Tue, 29 Apr 2014 15:33:37 +0000 (18:33 +0300)]
Place hardware TTY cursor at the active menu item when displaying a menu.
src/term.c (tty_menu_display): Move the cursor to the active menu
item.
(tty_menu_activate): Return the cursor to the active menu item
after displaying the menu and after displaying help-echo. See
http://lists.gnu.org/archive/html/emacs-devel/2014-04/msg00402.html
for the details of why this is needed by screen readers and
Braille displays.
Stefan Monnier [Tue, 29 Apr 2014 15:16:07 +0000 (11:16 -0400)]
* src/window.c (struct saved_window): Remove mark.
(Fset_window_configuration, save_window_save)
(compare_window_configurations): Don't touch marks any more.
* doc/lispref/windows.texi (Window Configurations, Window Configurations):
Window configs don't store marks any more.
Eli Zaretskii [Tue, 29 Apr 2014 14:45:24 +0000 (17:45 +0300)]
Fix bug #17362 with inconsistent usage of @key and @kbd, and key names.
doc/emacs/trouble.texi (Quitting, DEL Does Not Delete, Emergency Escape)
(Bug Criteria): Fix usage of @kbd and @key. (Bug#17362)
doc/emacs/text.texi (Words, Pages, Foldout, HTML Mode): Fix usage of @kbd
and @key.
doc/emacs/search.texi (Special Isearch, Regexp Search): Fix usage of @kbd
and @key.
doc/emacs/screen.texi (Echo Area, Menu Bar): Fix usage of @kbd and @key.
doc/emacs/rmail.texi (Rmail Scrolling): Fix usage of @kbd and @key.
doc/emacs/programs.texi (Hungry Delete, Other C Commands): Fix usage of
@kbd and @key.
doc/emacs/picture-xtra.texi (Insert in Picture): Fix usage of @kbd and
@key.
doc/emacs/mule.texi (Unibyte Mode, Bidirectional Editing): Fix usage of
@kbd and @key.
doc/emacs/msdog.texi (Windows Keyboard, Windows Processes): Fix usage of
@kbd and @key.
doc/emacs/msdog-xtra.texi (MS-DOS Keyboard, MS-DOS Printing)
(MS-DOS Processes): Fix usage of @kbd and @key.
doc/emacs/misc.texi (Shell Ring, Printing Package): Fix usage of @kbd and
@key.
doc/emacs/mini.texi (Completion Commands, Minibuffer History): Fix usage
of @kbd and @key.
doc/emacs/kmacro.texi (Keyboard Macro Step-Edit): Fix usage of @kbd and
@key.
doc/emacs/killing.texi (Deletion, Rectangles, CUA Bindings): Fix usage of
@kbd and @key.
doc/emacs/indent.texi (Indentation Commands): Fix usage of @kbd and @key.
doc/emacs/help.texi (Help Mode, Misc Help): Fix usage of @kbd and @key.
doc/emacs/glossary.texi (Glossary): Fix usage of @kbd and @key.
doc/emacs/frames.texi (Speedbar): Fix usage of @kbd and @key.
doc/emacs/files.texi (Misc File Ops, File Name Cache, File Conveniences)
(Filesets): Fix usage of @kbd and @key.
doc/emacs/display.texi (View Mode): Fix usage of @kbd and @key.
doc/emacs/dired.texi (Image-Dired): Fix usage of @kbd and @key.
doc/emacs/custom.texi (Modifier Keys, Function Keys, Named ASCII Chars)
(Init Syntax): Fix usage of @kbd and @key.
doc/emacs/commands.texi (User Input): Fix usage of @kbd and @key.
doc/emacs/calendar.texi (Counting Days, General Calendar): Fix usage of
@kbd and @key.
doc/emacs/building.texi (Threads Buffer): Fix usage of @kbd and @key.
doc/emacs/buffers.texi (Select Buffer, Icomplete): Fix usage of @kbd and
@key.
doc/emacs/basic.texi (Inserting Text, Erasing, Arguments): Fix usage of
@kbd and @key.
Fix bug 16694 with applying X resources to faces too early.
lisp/faces.el (face-spec-recalc): Apply X resources only after the defface spec has been applied. Thus, X resources are no longer
overriden by the defface spec which also fixes issues on win32 where
the toolbar coloring was wrong because it is set through X resources
and was (wrongfully) overriden.
Paul Eggert [Mon, 28 Apr 2014 16:59:41 +0000 (09:59 -0700)]
Use bits_word for gcmarkbits.
* alloc.c (struct cons_block, struct float_block): On 64-bit hosts,
bits_word is typically a tad more efficient for mark bits than
unsigned is, so use bits_word. All uses changed.
* lisp.h (BITS_PER_INT): Remove; no longer used.
Stefan Monnier [Mon, 28 Apr 2014 04:40:41 +0000 (00:40 -0400)]
* lisp/progmodes/ps-mode.el: Use SMIE. Move string and comment recognition
to syntax-propertize.
(ps-mode-auto-indent): Mark as obsolete.
(ps-mode-font-lock-keywords-1): Remove string-or-comment handling.
(ps-mode-font-lock-keywords-3): Use symbol regexp operators instead of
word regexp operators.
(ps-mode-map): Move initialization into declaration. Remove binding
for TAB, RET, >, ], and }.
(ps-mode-syntax-table): Move initialization into declaration.
Don't give word syntax to non-word chars.
(ps-run-mode-map): Move initialization into declaration.
(ps-mode-menu-main): Remove auto-indent entry.
(ps-mode-smie-rules): New function.
(ps-mode): Setup smie, syntax-propertize, and electric-indent-mode.
(ps-mode-looking-at-nested, ps-mode-match-string-or-comment): Remove.
(ps-mode--string-syntax-table): New const.
(ps-mode--syntax-propertize-special, ps-mode-syntax-propertize):
New functions.
(ps-mode-newline, ps-mode-tabkey, ps-mode-r-brace, ps-mode-r-angle)
(ps-mode-r-gt, ps-mode-r-balance): Remove functions.
Paul Eggert [Mon, 28 Apr 2014 01:29:44 +0000 (18:29 -0700)]
Avoid undefined behavior in signed left shift.
This ports to GCC 4.9.0 with -fsanitize=undefined.
* alloc.c (bool_vector_fill, SETMARKBIT, UNSETMARKBIT):
* data.c (Fash):
* regex.c (extract_number):
* lisp.h (make_number, XINT):
Do not shift a 1 bit left into a sign bit.
* alloc.c (struct cons_block, struct float_block): Use unsigned,
not int, for gcmarkbits. All uses changed.
lisp/gnus.auth-source.el (auth-source-search): return boolean on :max 0
* lisp/gnus.auth-source.el (auth-source-search, auth-source-search-backends):
Treat :max 0 as an indicator that a boolean return is wanted, as
documented. Reported by Joe Bloggs.
Stefan Monnier [Fri, 25 Apr 2014 19:22:26 +0000 (15:22 -0400)]
* lisp/progmodes/perl-mode.el (perl--syntax-exp-intro-regexp): New var.
(perl-syntax-propertize-function): Use it. Extend handling of
here-docs to the unquoted case.
Michael Albinus [Fri, 25 Apr 2014 10:35:01 +0000 (12:35 +0200)]
* automated/tramp-tests.el (top):
* automated/file-notify-tests.el (top): Do not disable interactive
passwords in batch mode.
(password-cache-expiry): Set to nil.
Stefan Monnier [Thu, 24 Apr 2014 14:04:36 +0000 (10:04 -0400)]
* lisp/info.el: Use lexical-binding and cl-lib.
Use defvar-local and setq-local instead of make-local-variable.
(Info-apropos-matches): Avoid add-to-list.
(Info-edit-mode-map): Fix obsolescence call to Info-edit-map.
Michael Albinus [Thu, 24 Apr 2014 08:21:58 +0000 (10:21 +0200)]
Use a mock-up connection method for remote files.
* automated/file-notify-tests.el
(file-notify-test-remote-temporary-file-directory):
* automated/tramp-tests.el (tramp-test-temporary-file-directory):
Use a mock-up method as default.
(tramp-test00-availability): Print the used directory name.
(tramp-test33-recursive-load): Fix typo.
Stefan Monnier [Thu, 24 Apr 2014 03:59:19 +0000 (23:59 -0400)]
* src/window.c (Fset_window_configuration): Deactivate the mark before
unsetting the mark.
(set_window_buffer): Ignore window_initialized.
(window_initialized): Remove.
* src/keyboard.c (Qdeactivate_mark): Not static any more.
* src/buffer.c (buffer_local_value): Rename from buffer_local_value_1.
Update all callers.