Juri Linkov [Tue, 29 May 2012 09:27:39 +0000 (12:27 +0300)]
* lisp/isearch.el (isearch-word): Add docstring.
(isearch-occur, isearch-search-and-update): If `isearch-word' is
a function, call it to get the regexp.
(isearch-message-prefix): If `isearch-word' holds a symbol, use its
property `isearch-message-prefix' instead of the string "word ".
(isearch-search-fun-default): For the case of `isearch-word',
return a lambda that calls re-search-forward/re-search-backward
with a regexp returned by `word-search-regexp' or by the function
in `isearch-word'.
Juri Linkov [Tue, 29 May 2012 09:09:38 +0000 (12:09 +0300)]
* lisp/isearch.el (isearch-search-fun-default): New function.
(isearch-search-fun): Move default part to the new function
`isearch-search-fun-default'.
(isearch-search-fun-function): Set the default value to
`isearch-search-fun-default'.
* lisp/comint.el (comint-history-isearch-end):
Use `isearch-search-fun-default'.
(comint-history-isearch-search): Use `isearch-search-fun-default'
and remove spacial case for `isearch-word'.
(comint-history-isearch-wrap): Remove spacial case for
`isearch-word'.
* lisp/hexl.el (hexl-isearch-search-function):
Use `isearch-search-fun-default'.
* lisp/info.el (Info-isearch-search): Use `isearch-search-fun-default'.
Use `word-search-regexp' for `isearch-word'.
* lisp/misearch.el (multi-isearch-search-fun):
Use `isearch-search-fun-default'.
* lisp/simple.el (minibuffer-history-isearch-search):
Use `isearch-search-fun-default' and remove spacial case for
`isearch-word'.
(minibuffer-history-isearch-wrap): Remove spacial case for
`isearch-word'.
* lisp/textmodes/reftex-global.el (reftex-isearch-wrap-function):
Remove spacial case for `isearch-word'.
(reftex-isearch-isearch-search): Use `isearch-search-fun-default'.
Eli Zaretskii [Mon, 28 May 2012 17:22:40 +0000 (20:22 +0300)]
Fix bug #11513 with raise-frame on MS-Windows.
src/w32term.c (my_bring_window_to_top): New function.
(x_raise_frame): Use handle returned by DeferWindowPos, which
could be different from the original one. Call
my_bring_window_to_top instead of my_set_foreground_window.
src/w32fns.c (w32_wnd_proc): Accept and process WM_EMACS_BRINGTOTOP
by calling BringWindowToTop.
src/w32term.h (WM_EMACS_BRINGTOTOP): New message.
(WM_EMACS_END): Increase by one.
* flyspell.el:
(flyspell-check-pre-word-p): Use `string-match'.
(flyspell-delete-region-overlays): Use alternative definition for XEmacs.
(flyspell-delete-all-overlays): Use `flyspell-delete-region-overlays'.
(flyspell-word): Use `process-kill-without-query' if XEmacs.
(flyspell-mode-on): Use `interactive-p' if XEmacs.
(flyspell-incorrect-face, flyspell-duplicate-face):
Do not use `define-obsolete-face-alias' under XEmacs, but old method.
* ispell.el:
(ispell-with-no-warnings): XEmacs alternative `with-no-warnings'
definition or Emacs alias.
(ispell-command-loop, ispell-message): Use `ispell-with-no-warnings'.
(ispell-word): Do not use `region-p' if XEmacs.
Agustín Martín [Mon, 28 May 2012 14:36:27 +0000 (16:36 +0200)]
textmodes/ispell.el: Fix variable name. Show spellchecker on process start.
* (ispell-find-aspell-dictionaries): Check for
`ispell-dictionary-base-alist' instead of full `ispell-dictionary-alist'.
* (ispell-init-process): Show spellchecker when starting new Ispell process.
Paul Eggert [Mon, 28 May 2012 00:46:33 +0000 (17:46 -0700)]
Make 'configure' a bit smaller and faster.
* configure.in (INSTALL_INFO): Set it with one call to
AC_PATH_PROG, not three.
(PKG_CONFIG): Hoist this out of PKG_CHECK_MODULES, since it's
so likely that it'll be needed.
(AC_CHECK_HEADERS_ONCE): Prefer to AC_CHECK_HEADERS where either works.
(AC_PROG_MAKE_SET): Remove; Automake does this.
(sysinfo): Do not check for this function, as it's never used.
(tzset): Check for this function just once.
* admin/CPP-DEFINES: Remove HAVE_SYSINFO.
* m4/manywarnings.m4: Sync from gnulib, incorporating the following:
2012-05-27 manywarnings: remove duplicate -Wmultichar entry
Eli Zaretskii [Sun, 27 May 2012 12:11:23 +0000 (15:11 +0300)]
Fix the MS-Windows build broken by 1995-02-25T20:57:45Z!rms@gnu.org.
lib/makefile.w32-in ($(BLD)/md5.$(O)):
($(BLD)/sha1.$(O)):
($(BLD)/sha256.$(O)):
($(BLD)/sha512.$(O)): Depend on $(EMACS_ROOT)/nt/inc/stdalign.h.
Suggested by Christoph Scholtes <cschol2112@googlemail.com>.
lib/getopt_.h: Regenerate.
nt/inc/stdalign.h: New file.
Paul Eggert [Sat, 26 May 2012 22:27:21 +0000 (15:27 -0700)]
Fix coding-related core dumps with gcc -ftrapv.
The code was computing A - B, where A and B are pointers, and B is
random garbage. This can lead to core dumps on platforms that
have special pointer registers, and it also leads to core dumps on
x86-64 when compiled with gcc -ftrapv. The fix is to compute
A - B only when B is initialized properly.
* coding.c (coding_set_source, coding_set_destination): Return void.
(coding_change_source, coding_change_destinations): New functions,
with the old behaviors of coding_set_source and coding_set_destination.
All callers that need an offset changed to use these new functions.
Glenn Morris [Sat, 26 May 2012 21:23:28 +0000 (14:23 -0700)]
Don't mess with INFOPATH in ns builds
It's not necessary, and would break if INFOPATH was already set (bug#2791).
Ref also
http://lists.gnu.org/archive/html/emacs-devel/2009-05/msg00035.html
http://lists.gnu.org/archive/html/emacs-devel/2005-06/msg00064.html
* lisp/paths.el (Info-default-directory-list):
* lisp/info.el (info-initialize): For self-contained NS builds, put the
included info/ directory at the front.
* src/nsterm.m (ns_init_paths): Don't mess with INFOPATH.
Stefan Monnier [Sat, 26 May 2012 15:52:27 +0000 (11:52 -0400)]
Use `declare' in `lambda' and mis minor changes.
* lisp/subr.el (lambda): Use declare.
* lisp/emacs-lisp/lisp-mode.el (lambda):
* lisp/emacs-lisp/edebug.el (lambda): Move properties to its definition.
* lisp/gnus/legacy-gnus-agent.el (gnus-agent-unhook-expire-days):
* lisp/gnus/gnus-demon.el (gnus-demon-init): Don't bother with type-of.
Eli Zaretskii [Sat, 26 May 2012 12:14:56 +0000 (15:14 +0300)]
Extend mouse support on W32 text-mode console.
src/xdisp.c (draw_row_with_mouse_face): Call
tty_draw_row_with_mouse_face for WINDOWSNT as well.
src/w32console.c: Include window.h.
(w32con_write_glyphs_with_face, tty_draw_row_with_mouse_face): New
functions.
(initialize_w32_display): Initialize mouse-highlight data.
src/w32inevt.c: Include termchar.h and window.h.
(do_mouse_event): Support mouse-autoselect-window. When the mouse
moves, call note_mouse_highlight. If help_echo changed, call
gen_help_event to produce help-echo message in the echo area.
Call clear_mouse_face if mouse_face_hidden is set in the mouse
highlight info.
Eli Zaretskii [Sat, 26 May 2012 09:56:31 +0000 (12:56 +0300)]
Refactor mouse highlight invocation for w32 console.
src/w32inevt.c: Include termchar.h.
(mouse_moved_to): Move the call to note_mouse_highlight from here...
(do_mouse_event): ...to here.
Call clear_mouse_face if mouse_face_hidden is set in the mouse
highlight info.
Eli Zaretskii [Sat, 26 May 2012 09:31:59 +0000 (12:31 +0300)]
Support mouse highlight on w32 text-mode frames.
src/xdisp.c (draw_row_with_mouse_face): Call
tty_draw_row_with_mouse_face for WINDOWSNT as well.
src/w32inevt.c (mouse_moved_to): When the mouse moves, call
note_mouse_highlight.
src/w32console.c: Include window.h.
(w32con_write_glyphs_with_face, tty_draw_row_with_mouse_face): New
functions.
(initialize_w32_display): Initialize mouse-highlight data.
Glenn Morris [Fri, 25 May 2012 18:57:51 +0000 (14:57 -0400)]
There's no reason not to compile version.el
AFAICS, this is ancient code dating from when there was an "inc-vers.el",
that was used to bump the build number on version.el. Nowadays that
happens in loadup.el.
* lisp/version.el: Remove no-byte-compile and associated formatting.
* lisp/loadup.el: No need to load lisp/version.el uncompiled.
Stefan Monnier [Fri, 25 May 2012 18:06:13 +0000 (14:06 -0400)]
* src/lread.c: Remove `read_pure' which makes no difference.
(read_pure): Remove var.
(unreadpure): Remove function.
(readevalloop): Don't call read_list with -1 flag.
(read1, read_vector): Don't test read_pure any more.
(read_list): Simplify.
Stefan Monnier [Fri, 25 May 2012 14:58:17 +0000 (10:58 -0400)]
* lisp/gnus/gnus-win.el (gnus-configure-frame): Don't signal an error when
jumping to *Server* from a dedicated *Group* window.
(gnus-configure-frame): CSE.
* lisp/gnus/gnus-registry.el: Minor style cleanup.
(gnus-registry--set/remove-mark): New function, extracted from
gnus-registry-install-shortcuts.
(gnus-registry-install-shortcuts): Use it.
Eli Zaretskii [Fri, 25 May 2012 10:35:13 +0000 (13:35 +0300)]
Minor fixes for MSDOS build to track latest changes.
msdos/sed6.inp (INFO_EXT): Edit to .info.
(INFO_OPTS): Edit to --no-split.
lisp/cus-start.el <vertical-centering-font-regexp>: Avoid warning on
platforms that don't link in fontset.c.
Juri Linkov [Fri, 25 May 2012 00:55:40 +0000 (03:55 +0300)]
Use the same diff color scheme as in modern VCSes (bug#10181).
* lisp/vc/diff-mode.el (diff-header, diff-file-header): Remove "green"
to avoid confusion with `diff-added' that now uses green colors.
(diff-removed): Use shades of red.
(diff-added): Use shades of green.
(diff-changed): Leave just the yellow color.
(diff-use-changed-face): New variable.
(diff-font-lock-keywords): Use `diff-use-changed-face' to decide
how to highlight context diff changes.
(diff-refine-change): Use shades of yellow.
(diff-refine-removed): New face that uses shades of red.
(diff-refine-added): New face that uses shades of green.
(diff-refine-hunk): Use `diff-refine-change', `diff-refine-added',
`diff-refine-removed' in the call to `smerge-refine-subst'
depending on the value of `diff-use-changed-face'.
* lisp/vc/ediff-init.el (ediff-current-diff-A, ediff-fine-diff-A):
Add face condition `min-colors 88' with shades of red.
(ediff-current-diff-B, ediff-fine-diff-B): Add face condition
`min-colors 88' with shades of green.
(ediff-current-diff-C, ediff-fine-diff-C): Add face condition
`min-colors 88' with shades of yellow.
* lisp/vc/smerge-mode.el (smerge-mine): Use shades of red.
(smerge-other): Use shades of green.
(smerge-base): Use shades of yellow.
(smerge-refined-change): Empty face.
(smerge-refined-removed): New face that uses shades of red.
(smerge-refined-added): New face that uses shades of green.
(smerge-refine-subst): Rename arg `props' to `props-c'. Add new
args `props-r' and `props-a', and use them. Doc fix.
(smerge-refine): Evaluate `smerge-use-changed-face' and depending
on its value use different faces `smerge-refined-change',
`smerge-refined-removed', `smerge-refined-added' in the call to
`smerge-refine-subst'.
Glenn Morris [Thu, 24 May 2012 07:31:45 +0000 (00:31 -0700)]
* paths.el (news-inews-program): Move to gnus/nnspool.el.
* gnus/nnspool.el (news-inews-program): Move here from paths.el.
Don't see a need for this to be autoloaded. (Or even to exist; it is
only used to init another variable.)
Glenn Morris [Thu, 24 May 2012 07:27:24 +0000 (00:27 -0700)]
* paths.el (news-directory, news-path): Move to gnus/nnspool.el.
* gnus/nnspool.el (news-directory, news-path): Move here from paths.el.
Don't see a need for these to be autoloaded. This file is the only
place that uses them, to init another variable.
* paths.el (rmail-file-name, rmail-spool-directory): Move from here...
* mail/rmail.el (rmail-file-name, rmail-spool-directory): ... to here.
Make the latter a defcustom, with a delayed initialization.
Eli Zaretskii [Wed, 23 May 2012 17:32:28 +0000 (20:32 +0300)]
Fix bug #11519 with relocation of buffer text during regex search.
src/lisp.h [REL_ALLOC]: Add prototypes for external functions
defined on ralloc.c.
src/buffer.c [REL_ALLOC]: Remove prototypes of
r_alloc_reset_variable, r_alloc, r_re_alloc, and r_alloc_free,
they are now on lisp.h.
src/ralloc.c (r_alloc_inhibit_buffer_relocation): New function.
src/search.c (search_buffer): Use it to inhibit relocation of buffer
text while re_search_2 is doing its job, because re_search_2 is
passed C pointers to buffer text.
Paul Eggert [Tue, 22 May 2012 16:20:27 +0000 (09:20 -0700)]
Remove src/m/*.
* configure.in: Remove all mention of src/m/*.
(machine, machfile, M_FILE, config_machfile, and_machfile): Remove.
All uses removed.
(BITS_PER_CHAR, BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG)
(BITS_PER_LONG_LONG): Move to src/lisp.h.
* lib/makefile.w32-in: Remove dependencies on
$(EMACS_ROOT)/src/m/intel386.h.
* make-dist: Don't make links to src/m.
* admin/CPP-DEFINES: Do not mention src/m/*.h.
(BITS_PER_EMACS_INT, BITS_PER_LONG, BITS_PER_CHAR)
(BITS_PER_SHORT, BITS_PER_INT): Remove.
* admin/MAINTAINERS: Remove src/m/.
* lib-src/makefile.w32-in: Remove dependencies on
$(EMACS_ROOT)/src/m/intel386.h.
* msdos/mainmake.v2 (TAGS tags): Don't look at $(CURDIR)/src/m/intel386.h.
* nt/config.nt: Do not include "m/intel386.h"; file was removed.
(BITS_PER_CHAR, BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG):
Move to src/lisp.h.
(EMACS_INT_MAX): New macro.
This directory predates autoconf and is no longer needed nowadays.
Move its few remaining bits of functionality to where they're needed.
* src/m/README, src/m/alpha.h, src/m/amdx86-64.h, src/m/ia64.h, src/m/ibmrs6000.h:
* src/m/ibms390x.h, src/m/intel386.h, src/m/m68k.h, src/m/macppc.h:
* src/m/sparc.h, src/m/template.h: Remove.
* src/Makefile.in (M_FILE): Remove. All uses removed.
* src/alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS):
* src/lisp.h (USE_LSB_TAG):
* src/mem-limits.h (EXCEEDS_LISP_PTR):
Use VAL_MAX, not VALBITS, in #if.
* src/lisp.h (EMACS_INT_MAX): New macro, useful in #if.
(EMACS_UINT): Define unconditionally now.
(BITS_PER_CHAR, BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG)
(BITS_PER_EMACS_INT): New constants, replacing
what used to be in config.h, but not useful in #if.
(GCTYPEBITS, VALBITS): Define unconditionally, since m/* files don't
define them any more.
(VAL_MAX): New macro.
(VALMASK): Use it.
* src/puresize.h (PURESIZE_RATIO): Use EMACS_INT_MAX, not
BITS_PER_EMACS_INT, in #if.
* src/s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
(BROKEN_SIGPOLL): Move here from m/ibmrs6000.h, which was removed.
* src/s/gnu-linux.h (ULIMIT_BREAK_VALUE) [__i386__]:
* src/s/ms-w32.h (DATA_START):
Move here from removed file m/intel386.h.
* src/s/gnu.h (NLIST_STRUCT): Remove undef; 'configure' does this.
* src/s/irix6-5.h (_LP64): Remove; lisp.h no longer needs this.
Glenn Morris [Tue, 22 May 2012 03:31:34 +0000 (20:31 -0700)]
Add "How to Report a Bug" to Help menu
* lisp/info.el (info-emacs-bug): New command.
* lisp/menu-bar.el (menu-bar-help-menu): Add "How to Report a Bug" to Help.
* lisp/mail/emacsbug.el (report-emacs-bug): Replace with info-emacs-bug.