Chong Yidong [Tue, 29 Jun 2010 18:17:31 +0000 (14:17 -0400)]
Allow global VC ops like `C-x v D' in Diff and Log-View buffers.
* vc/diff-mode.el (diff-vc-backend): New var.
* vc/vc.el (vc-deduce-backend): New fun. Handle diff buffers.
(vc-root-diff, vc-print-root-log, vc-log-incoming)
(vc-log-outgoing): Use it.
(vc-diff-internal): Set diff-vc-backend.
Jan D [Mon, 28 Jun 2010 10:11:26 +0000 (12:11 +0200)]
Use non-deprecated Gtk+ functions, add changes for Gtk+3 with GSEAL_ENABLE.
* configure.in: Add --with-x-toolkit=gtk3. Remove HAVE_GTK_MULTIDISPLAY,
check for gtk_file_chooser_dialog_new, and HAVE_GTK_FILE_BOTH (implied
by minimum required Gtk+ 2.6). Add checks for functions introduced
in Gtk+ 2.14 or newer.
* xterm.h (gtk_widget_get_window, gtk_widget_get_mapped)
(gtk_adjustment_get_page_size, gtk_adjustment_get_upper): New
defines based on what configure finds.
* xterm.c (XTflash): Use gtk_widget_get_window.
(xg_scroll_callback): Use gtk_adjustment_get_upper and
gtk_adjustment_get_page_size.
(handle_one_xevent): Use gtk_widget_get_mapped.
(x_term_init): Remove HAVE_GTK_MULTIDISPLAY and associated error
messages.
* gtkutil.h: Replace HAVE_GTK_FILE_BOTH with
HAVE_GTK_FILE_SELECTION_NEW.
* gtkutil.c (xg_display_open, xg_display_close): Remove
HAVE_GTK_MULTIDISPLAY, it is always defined.
(xg_display_open): Return type is void.
(gtk_widget_set_has_window)
(gtk_dialog_get_action_area, gtk_dialog_get_content_area)
(gtk_widget_get_sensitive, gtk_adjustment_set_page_size)
(gtk_adjustment_set_page_increment)
(gtk_adjustment_get_step_increment): #define these if not found
by configure.
(remove_submenu): New define based on Gtk+ version.
(xg_set_cursor, xg_frame_resized, xg_event_is_for_scrollbar): Use
gtk_widget_get_window.
(xg_frame_resized, xg_update_frame_menubar): Use gtk_widget_get_mapped.
(xg_create_frame_widgets): Use gtk_widget_set_has_window.
(create_dialog): Use gtk_dialog_get_action_area and
gtk_dialog_get_content_area.
(xg_uses_old_file_dialog, xg_get_file_name): Remove HAVE_GTK_FILE_BOTH
and HAVE_GTK_FILE_CHOOSER_DIALOG_NEW. File chooser is always
available, so checking for HAVE_GTK_FILE_SELECTION_NEW is enough.
(xg_update_menubar, xg_update_submenu, xg_show_toolbar_item): Use
g_object_ref and g_object_unref.
(xg_update_menu_item, xg_tool_bar_menu_proxy): Use
gtk_widget_get_sensitive.
(xg_update_submenu): Use remove_submenu.
(xg_update_scrollbar_pos): Don't use GtkFixedChild, use child
properties instead to get old x and y position.
(xg_set_toolkit_scroll_bar_thumb): Use gtk_adjustment_get_page_size,
gtk_adjustment_get_step_increment, gtk_adjustment_set_page_size,
gtk_adjustment_set_step_increment and gtk_adjustment_set_page_increment.
(xg_get_tool_bar_widgets): New function.
(xg_tool_bar_menu_proxy, xg_show_toolbar_item)
(update_frame_tool_bar): Call xg_get_tool_bar_widgets.
(toolbar_set_orientation): New #define based on if configure
finds gtk_orientable_set_orientation.
(xg_create_tool_bar): Call toolbar_set_orientation.
(xg_make_tool_item, xg_show_toolbar_item): Call gtk_box_pack_start
instead of gtk_box_pack_start_defaults.
Chong Yidong [Sun, 27 Jun 2010 00:30:52 +0000 (20:30 -0400)]
Change default-frame-alist and menu/tool-bar-mode interaction (Bug#2249).
Don't add entries for `menu-bar-lines' and `tool-bar-lines' to
`default-frame-alist' and `initial-frame-alist' at startup.
Instead, use X resources to update the `menu-bar-mode' and
`tool-bar-mode' variables at startup, and use them as defaults during
frame creation.
* lisp/frame.el (frame-notice-user-settings): Don't change
default-frame-alist based on menu-bar-mode and tool-bar-mode, or
vice versa.
* lisp/menu-bar.el (menu-bar-mode):
* lisp/tool-bar.el (tool-bar-mode): Don't change default-frame-alist.
Set init-value to t.
* lisp/startup.el (command-line): Use X resources to set the value of
menu-bar-mode and tool-bar-mode, before calling frame-initialize.
* src/frame.c (Vmenu_bar_mode, Vtool_bar_mode): New vars.
* src/xfns.c (Fx_create_frame): Don't consult X resouces when setting
menu-bar-lines and tool-bar-lines. Use menu-bar-mode and
tool-bar-mode, which are now set using these X resources at
startup, to determine the defaults.
Eli Zaretskii [Sat, 26 Jun 2010 14:36:27 +0000 (17:36 +0300)]
Fix the MS-DOS build due to changes in configury.
config.bat: Remove white space around "+" in COPY commands.
msods/mainmake.v2 (version): Use emacs_version[] in src/emacs.c
instead of lisp/version.el (see 2010-05-15T21:11:37Z!raeburn@raeburn.org).
msdos/sed1v2.inp (MKDEPDIR): Edit to empty.
Delete lines in rules that invoke $(MKDEPDIR).
Fix editing rules that begin with "cd ../lisp".
Edit out sh if-then-else-fi constructs that test ${CANNOT_DUMP}.
Edit out "|| exit ;\" constructs in emacs${EXEEXT} rule.
* org-agenda.el (org-agenda-goto-calendar): Do not bind obsolete
variables.
* org.el (calendar): Require calendar now on top level in org.el
and define aliases to new variables when needed.
(org-read-date, org-goto-calendar): Do not bind obsolete
variables.
Chong Yidong [Fri, 25 Jun 2010 19:24:05 +0000 (15:24 -0400)]
Change initial-frame-alist and default-frame-alist defaults (Bug#2249).
Since the menu-bar and tool-bar are now unconditionally turned on by
default, we can let the defcustom defaults reflect that.
* frame.el (initial-frame-alist): Give default value entries for
menu-bar-lines and tool-bar-lines consistent with the startup
default (Bug#2249).
* frame.c (Vdefault_frame_alist): Give default value entries for
menu-bar-lines and tool-bar-lines consistent with the startup
default (Bug#2249).
Jan Djärv [Tue, 22 Jun 2010 12:28:08 +0000 (14:28 +0200)]
Hide scroll bar when window is too small to avoid Gtk+ warning.
* gtkutil.c (xg_update_scrollbar_pos): Show/hide scroll bar as needed
if height is less than scroll bar min size.
(xg_show_scroll_bar): Remove, show moved to xg_update_scrollbar_pos.
* gtkutil.h (xg_show_scroll_bar): : Remove.
* xterm.c (x_scroll_bar_create): Remove call to xg_show_scroll_bar.
Karl Fogel [Mon, 21 Jun 2010 23:26:46 +0000 (19:26 -0400)]
* lisp/simple.el (compose-mail): Fix doc string to refer to
`compose-mail-user-agent-warnings', instead of to the
nonexistent `compose-mail-check-user-agent'.
Alan Mackenzie [Mon, 21 Jun 2010 21:08:26 +0000 (21:08 +0000)]
Fix an indentation bug:
progmodes/cc-mode.el (c-common-init): Initialise c-new-BEG/END.
(c-neutralize-syntax-in-and-mark-CPP): c-new-BEG/END: Take account
of existing values.
progmodes/cc-engine.el (c-clear-<-pair-props-if-match-after)
(c-clear->-pair-props-if-match-before): now return t when they've cleared
properties, nil otherwise.
(c-before-change-check-<>-operators): Set c-new-beg/end correctly by
taking account of the existing value.
progmodes/cc-defs.el (c-clear-char-property-with-value-function): Fix
this to clear the property rather than overwriting it with nil.
Eli Zaretskii [Sun, 20 Jun 2010 18:04:30 +0000 (21:04 +0300)]
Avoid recentering when lines differ in their height.
xdisp.c (try_scrolling): When scroll-conservatively is set to
most-positive-fixnum, be extra accurate when scrolling window
start, to avoid missing the cursor line.
Chong Yidong [Sun, 20 Jun 2010 04:55:14 +0000 (00:55 -0400)]
Tweaks to package list UI.
* help-mode.el (help-package): New button type.
* emacs-lisp/package.el (package-print-package): Add link to
package description via describe-package.
(describe-package-1): List package requirements. Add button to
perform installation.
(package-menu-describe-package): New command.
Chong Yidong [Sat, 19 Jun 2010 22:36:51 +0000 (18:36 -0400)]
Add preliminary describe-package functionality, and some cleanup.
* help-mode.el (help-package-def): New button type.
* menu-bar.el: Move package-list-packages binding here from
package.el.
* emacs-lisp/package.el: Move package-list-packages binding to
menu-bar.el.
(describe-package, describe-package-1, package--dir): New funs.
(package-activate-1): Use package--dir.
Eli Zaretskii [Sat, 19 Jun 2010 09:40:15 +0000 (12:40 +0300)]
Fix occasional recentering under scroll-conservatively.
xdisp.c (try_scrolling): Compute the limit for searching point
in forward scroll from scroll_max, instead of an arbitrary limit
of 10 screen lines. See
http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00766.html and
http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00773.html for
details.
Juri Linkov [Thu, 17 Jun 2010 20:56:17 +0000 (23:56 +0300)]
Fix revert-buffer functionality of Help mode and Info.
* lisp/help-mode.el (help-mode): Set buffer-local variable
revert-buffer-function to help-mode-revert-buffer.
(help-mode-revert-buffer): New function.
* lisp/info.el (Info-revert-find-node): Check for major-mode Info-mode
before popping to "*info*" (like in other Info functions).
Keep buffer-name in old-buffer-name. Keep Info-history-forward in
old-history-forward. Pop to old-buffer-name or "*info*" to
recreate the killed buffer. Set Info-history-forward from
old-history-forward.
(Info-breadcrumbs-depth): Add :group and :version.
Agustín Martín [Thu, 17 Jun 2010 14:44:34 +0000 (16:44 +0200)]
ispell.el (ispell-aspell-find-dictionary): Fix regexp for full xx_YY search.
This is needed for languages like Portuguese where there are aspell dicts
for pt_BR and pt_PT, not for plain pt. If we strip country part
`ispell-aspell-find-dictionary' does not find dicts for portuguese.
Chong Yidong [Thu, 17 Jun 2010 02:08:10 +0000 (22:08 -0400)]
Merge package.el, written by Tom Tromey <tromey@redhat.com>.
Changes relative to version 0.9 of package.el are listed below:
* emacs-lisp/package-x.el: New file. Package uploading
functionality split out from package.el.
* emacs-lisp/package.el (package-archive-base): Point to
elpa.gnu.org.
(package-enable, package-load-list): New defcustoms.
(package-user-dir, package-directory-list): Turn into defcustoms.
Don't include package-user-dir in package-directory-list.
(package--builtins-base): Don't include Emacs as a "package".
(package-subdirectory-regexp): New var.
(package-load-all-descriptors, package-compute-transaction)
(package-download-transaction): Obey package-load-list.
(package-activate-1): Rename from package-do-activate.
(package-list-packages-internal): Check package-load-list.
(package-load-descriptor, package-generate-autoloads)
(package-unpack, package-unpack-single)
(package--read-archive-file, package-delete): Use
expand-file-name.
* startup.el (command-line): Load packages after reading init
file.
Stefan Monnier [Wed, 16 Jun 2010 20:00:22 +0000 (16:00 -0400)]
* lisp/font-lock.el (font-lock-major-mode): Rename from
font-lock-mode-major-mode to distinguish it from
global-font-lock-mode's own font-lock-mode-major-mode.
(font-lock-set-defaults):
* lisp/font-core.el (font-lock-default-function): Adjust users.
(font-lock-mode): Don't set it at all.
Glenn Morris [Tue, 15 Jun 2010 03:42:33 +0000 (20:42 -0700)]
Tweak previous change.
* lisp/calendar/appt.el (appt-time-msg-list): Doc fix.
(appt-check): Let-bind appt-warn-time.
(appt-add): Make the 3rd argument optional.
Simplify argument names. Doc fix. Check for integer WARNTIME.
Only add WARNTIME to the output list if non-nil.
Ivan Kanis [Tue, 15 Jun 2010 03:38:58 +0000 (20:38 -0700)]
Close bug#5176.
* lisp/calendar/appt.el (appt-check): Let the 3rd element of
appt-time-msg-list specify the warning time.
(appt-add): Add new argument with the warning time.
Juri Linkov [Mon, 14 Jun 2010 16:03:04 +0000 (19:03 +0300)]
Add sort option `list-colors-sort'. (Bug#6332)
* lisp/facemenu.el (color-rgb-to-hsv): New function.
(list-colors-sort): New defcustom.
(list-colors-sort-key): New function.
(list-colors-display): Doc fix. Sort list according to the option
`list-colors-sort'.
(list-colors-print): Add HSV values to `help-echo' property of
RGB strings.
Eli Zaretskii [Sun, 13 Jun 2010 17:40:25 +0000 (20:40 +0300)]
Use Unicode database for attribute tables in bidi.c.
admin/unidata/bidimirror.awk: New file.
admin/unidata/BidiMirroring.txt: New file from
http://www.unicode.org/Public/6.0.0/ucd/BidiMirroring-6.0.0d1.txt.
admin/unidata/Makefile.in: (../../src/bidimirror.h): New target.
(all): Depend on ../../src/biditype.h and ../../src/bidimirror.h.
admin/unidata/makefile.w32-in (../../src/bidimirror.h): New target.
(all): Depend on ../../src/biditype.h and ../../src/bidimirror.h.
admin/unidata/biditype.awk: New file.
admin/unidata/Makefile.in (../../src/biditype.h): New target.
admin/unidata/makefile.w32-in (../../src/biditype.h): New target.
src/makefile.w32-in ($(BLD)/bidi.$(O)): Depend on biditype.h and
bidimirror.h.
src/deps.mk (bidi.o): Depend on biditype.h and bidimirror.h.
src/bidi.c (bidi_initialize): Remove explicit initialization of
bidi_type_table; include biditype.h instead. Don't support
entries whose second codepoint is zero. Initialize
bidi_mirror_table.
(bidi_mirror_char): Use bidi_mirror_table.
src/biditype.h: New file.
src/bidimirror.h: New file.
Eli Zaretskii [Sat, 12 Jun 2010 15:52:43 +0000 (18:52 +0300)]
Use BidiMirroring.txt for mirroring characters in bidi context.
admin/unidata/bidimirror.awk: New file.
admin/unidata/BidiMirroring.txt: New file from
http://www.unicode.org/Public/6.0.0/ucd/BidiMirroring-6.0.0d1.txt.
admin/unidata/Makefile.in: (../../src/bidimirror.h): New target.
(all): Depend on ../../src/biditype.h and ../../src/bidimirror.h.
admin/unidata/makefile.w32-in (../../src/bidimirror.h): New target.
(all): Depend on ../../src/biditype.h and ../../src/bidimirror.h.
src/makefile.w32-in ($(BLD)/bidi.$(O)): Depend on biditype.h and
bidimirror.h.
src/deps.mk (bidi.o): Depend on biditype.h and bidimirror.h.
src/bidi.c (bidi_initialize): Initialize bidi_mirror_table.
(bidi_mirror_char): Use bidi_mirror_table.
Eli Zaretskii [Sat, 12 Jun 2010 14:15:25 +0000 (17:15 +0300)]
Derive bidi type table from UnicodeData.txt.
src/bidi.c (bidi_initialize): Remove explicit initialization of
bidi_type_table; include biditype.h instead. Don't support
entries whose second codepoint is zero.
src/biditype.h: New file.
admin/unidata/biditype.awk: New file.
admin/unidata/Makefile.in (../../src/biditype.h): New target.
admin/unidata/makefile.w32-in (../../src/biditype.h): New target.
Michael Albinus [Sat, 12 Jun 2010 08:59:37 +0000 (10:59 +0200)]
* net/tramp.el (tramp-remote-process-environment): Protect version
string by apostroph.
(tramp-shell-prompt-pattern): Do not use a shy group in case of
XEmacs.
(tramp-file-name-for-operation): Add `call-process-region'.
(tramp-set-process-query-on-exit-flag): Fix wrong parentheses.
* net/tramp-compat.el (top): Do not autoload
`tramp-handle-file-remote-p'. Load tramp-util.el and tramp-vc.el
only when `start-file-process' is not bound.
(tramp-advice-file-expand-wildcards): Do not use
`tramp-handle-file-remote-p'.
(tramp-compat-make-temp-file): Handle the case, that
`make-temp-file' has no third argument EXTENSION.
Michael Albinus [Thu, 10 Jun 2010 12:44:59 +0000 (14:44 +0200)]
* net/notifications.el (notifications-on-action-signal)
(notifications-on-closed-signal): Pass notification id as first
argument to the callback functions. Add docstrings.
(notifications-notify): Fix docstring.