From 7f5344e1edfc004c6431baee119bbd6af9b726be Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Mon, 28 Jul 2008 03:56:41 +0000 Subject: [PATCH 01/69] * net/tramp.el (tramp-perl-directory-files-and-attributes) (tramp-get-device): Make device number a cons cell. --- lisp/ChangeLog | 5 +++++ lisp/net/tramp.el | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 74ee8238546..b7f0f8da1ec 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-07-27 Michael Albinus + + * net/tramp.el (tramp-perl-directory-files-and-attributes) + (tramp-get-device): Make device number a cons cell. + 2008-07-25 Chong Yidong * textmodes/tex-mode.el (tex-compilation-parse-errors): Check for diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 14cc6088497..0f6cb06cce8 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -1671,7 +1671,7 @@ we have this shell function.") ;; unless this spits out a complete line, including the '\n' at the ;; end. ;; The device number is returned as "-1", because there will be a virtual -;; device number set in `tramp-handle-file-attributes' +;; device number set in `tramp-handle-file-attributes'. (defconst tramp-perl-file-attributes "\ @stat = lstat($ARGV[0]); if (($stat[2] & 0170000) == 0120000) @@ -1736,7 +1736,7 @@ for($i = 0; $i < $n; $i++) $uid = ($ARGV[1] eq \"integer\") ? $stat[4] : \"\\\"\" . getpwuid($stat[4]) . \"\\\"\"; $gid = ($ARGV[1] eq \"integer\") ? $stat[5] : \"\\\"\" . getgrgid($stat[5]) . \"\\\"\"; printf( - \"(\\\"%s\\\" %s %u %s %s (%u %u) (%u %u) (%u %u) %u %u t (%u . %u) (%u %u))\\n\", + \"(\\\"%s\\\" %s %u %s %s (%u %u) (%u %u) (%u %u) %u %u t (%u . %u) (%u . %u))\\n\", $filename, $type, $stat[3], @@ -2343,7 +2343,7 @@ target of the symlink differ." ;; provided by "lstat" aren't unique, because we operate on different hosts. ;; So we use virtual device numbers, generated by Tramp. Both Ange-FTP and ;; EFS use device number "-1". In order to be different, we use device number -;; (-1 x), whereby "x" is unique for a given (multi-method method user host). +;; (-1 . x), whereby "x" is unique for a given (multi-method method user host). (defvar tramp-devices nil "Keeps virtual device numbers.") @@ -7005,7 +7005,7 @@ If it doesn't exist, generate a new one." (unless (assoc string tramp-devices) (add-to-list 'tramp-devices (list string (length tramp-devices)))) - (list -1 (nth 1 (assoc string tramp-devices))))) + (cons -1 (nth 1 (assoc string tramp-devices))))) (defun tramp-file-mode-from-int (mode) "Turn an integer representing a file mode into an ls(1)-like string." From 91594ca7b4d8727d909bdeaecc504b5475e49750 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 28 Jul 2008 19:40:22 +0000 Subject: [PATCH 02/69] * xdisp.c (redisplay_window): Check return value of compute_window_start_on_continuation_line before forcing a window start. --- src/ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 1952f115578..177af396c1f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2008-07-28 Chong Yidong + + * xdisp.c (redisplay_window): Check return value of + compute_window_start_on_continuation_line before forcing a window + start. + 2008-07-26 Eli Zaretskii * term.c (syms_of_term): Fix last change. From 4d2b0805d34cc9bb4ba04db769afb8d7dad7cc5d Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 28 Jul 2008 19:41:11 +0000 Subject: [PATCH 03/69] (redisplay_window): Check return value of compute_window_start_on_continuation_line before forcing a window start. --- src/xdisp.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index 897dd440f15..4cc4b5f233e 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -13239,14 +13239,19 @@ redisplay_window (window, just_this_one_p) && NILP (do_mouse_tracking) && CHARPOS (startp) > BEGV && CHARPOS (startp) > BEG + save_beg_unchanged - && CHARPOS (startp) <= Z - save_end_unchanged) + && CHARPOS (startp) <= Z - save_end_unchanged + /* Even if w->start_at_line_beg is nil, a new window may + start at a line_beg, since that's how set_buffer_window + sets it. So, we need to check the return value of + compute_window_start_on_continuation_line. (See also + bug#197). */ + && XMARKER (w->start)->buffer == current_buffer + && compute_window_start_on_continuation_line (w)) { w->force_start = Qt; - if (XMARKER (w->start)->buffer == current_buffer) - compute_window_start_on_continuation_line (w); SET_TEXT_POS_FROM_MARKER (startp, w->start); goto force_start; - } + } #if GLYPH_DEBUG debug_method_add (w, "same window start"); From 62864de4950602d937722dec95c7af4108a24448 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 28 Jul 2008 19:52:35 +0000 Subject: [PATCH 04/69] Revert last change. --- src/ChangeLog | 6 ------ src/xdisp.c | 13 ++++--------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 177af396c1f..1952f115578 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,9 +1,3 @@ -2008-07-28 Chong Yidong - - * xdisp.c (redisplay_window): Check return value of - compute_window_start_on_continuation_line before forcing a window - start. - 2008-07-26 Eli Zaretskii * term.c (syms_of_term): Fix last change. diff --git a/src/xdisp.c b/src/xdisp.c index 4cc4b5f233e..897dd440f15 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -13239,19 +13239,14 @@ redisplay_window (window, just_this_one_p) && NILP (do_mouse_tracking) && CHARPOS (startp) > BEGV && CHARPOS (startp) > BEG + save_beg_unchanged - && CHARPOS (startp) <= Z - save_end_unchanged - /* Even if w->start_at_line_beg is nil, a new window may - start at a line_beg, since that's how set_buffer_window - sets it. So, we need to check the return value of - compute_window_start_on_continuation_line. (See also - bug#197). */ - && XMARKER (w->start)->buffer == current_buffer - && compute_window_start_on_continuation_line (w)) + && CHARPOS (startp) <= Z - save_end_unchanged) { w->force_start = Qt; + if (XMARKER (w->start)->buffer == current_buffer) + compute_window_start_on_continuation_line (w); SET_TEXT_POS_FROM_MARKER (startp, w->start); goto force_start; - } + } #if GLYPH_DEBUG debug_method_add (w, "same window start"); From cf711abf492da7dc5da6a089578043669176ebe0 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 28 Jul 2008 20:01:45 +0000 Subject: [PATCH 05/69] * simple.el (next-error): Do a redisplay to prevent incorrect recentering (workaround for bug#197). --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b7f0f8da1ec..343050457d2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-07-28 Chong Yidong + + * simple.el (next-error): Do a redisplay to prevent incorrect + recentering (workaround for bug#197). + 2008-07-27 Michael Albinus * net/tramp.el (tramp-perl-directory-files-and-attributes) From 2f9e82278e047db15bc487bbd07356f808c10b7a Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 28 Jul 2008 20:02:04 +0000 Subject: [PATCH 06/69] (next-error): Do a redisplay to prevent incorrect recentering (workaround for bug#197). --- lisp/simple.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/simple.el b/lisp/simple.el index c6acebbb83d..75d23fe1c17 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -306,7 +306,10 @@ See variables `compilation-parse-errors-function' and ;; we know here that next-error-function is a valid symbol we can funcall (with-current-buffer next-error-last-buffer (funcall next-error-function (prefix-numeric-value arg) reset) - (run-hooks 'next-error-hook)))) + (run-hooks 'next-error-hook))) + ;; This is a workaround for a redisplay bug (bug#197). The proper + ;; fix is in the trunk: see the 2008-07-28 change to xdisp.c by cyd. + (redisplay)) (defun next-error-internal () "Visit the source code corresponding to the `next-error' message at point." From 1bd045d53a0b63429c5f8d5ec11ff1bc12842404 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 28 Jul 2008 20:18:25 +0000 Subject: [PATCH 07/69] * textmodes/flyspell.el (flyspell-word, flyspell-large-region) (flyspell-region): Call ispell-maybe-find-aspell-dictionaries. --- lisp/ChangeLog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 343050457d2..812654b8e3d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2008-07-28 Chong Yidong + * textmodes/flyspell.el (flyspell-word, flyspell-large-region) + (flyspell-region): Call ispell-maybe-find-aspell-dictionaries. + * simple.el (next-error): Do a redisplay to prevent incorrect recentering (workaround for bug#197). From 458ce40a6ab1437e388809fa4ec0dd31aa4437a8 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 28 Jul 2008 20:18:52 +0000 Subject: [PATCH 08/69] (flyspell-word, flyspell-large-region, flyspell-region): Call ispell-maybe-find-aspell-dictionaries. --- lisp/textmodes/flyspell.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 91b3f7549d1..121b4b29d3f 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -1004,6 +1004,7 @@ Mostly we check word delimiters." (defun flyspell-word (&optional following) "Spell check a word." (interactive (list ispell-following-word)) + (ispell-maybe-find-aspell-dictionaries) (save-excursion ;; use the correct dictionary (flyspell-accept-buffer-local-defs) @@ -1512,7 +1513,7 @@ The buffer to mark them in is `flyspell-large-region-buffer'." ;; this is done, we can start checking... (if flyspell-issue-message-flag (message "Checking region...")) (set-buffer curbuf) - (ispell-check-version) + (ispell-maybe-find-aspell-dictionaries) (let ((c (apply 'ispell-call-process-region beg end ispell-program-name @@ -1558,6 +1559,7 @@ The buffer to mark them in is `flyspell-large-region-buffer'." (defun flyspell-region (beg end) "Flyspell text between BEG and END." (interactive "r") + (ispell-maybe-find-aspell-dictionaries) (if (= beg end) () (save-excursion From 2f5687ffa9097882a57ea03d253cdb45636a2cb1 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Wed, 30 Jul 2008 13:37:27 +0000 Subject: [PATCH 09/69] * image-mode.el (image-mode): Set image-mode-text-map when image cannot be displayed. --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 812654b8e3d..41cf3a95ada 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-07-19 Markus Triska + + * image-mode.el (image-mode): Set image-mode-text-map when image + cannot be displayed. + 2008-07-28 Chong Yidong * textmodes/flyspell.el (flyspell-word, flyspell-large-region) From 698ab06b1655f00bb8705e1ed5ce83c10634079f Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Wed, 30 Jul 2008 13:38:28 +0000 Subject: [PATCH 10/69] (image-mode): Set image-mode-text-map when image cannot be displayed. --- lisp/image-mode.el | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lisp/image-mode.el b/lisp/image-mode.el index 6891796d122..b903d497ec0 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el @@ -208,13 +208,14 @@ to toggle between display as an image and display as text." (setq mode-name "Image") (setq major-mode 'image-mode) (add-hook 'change-major-mode-hook 'image-toggle-display-text nil t) - (if (and (display-images-p) - (not (get-text-property (point-min) 'display))) - (image-toggle-display) - ;; Set next vars when image is already displayed but local - ;; variables were cleared by kill-all-local-variables - (use-local-map image-mode-map) - (setq cursor-type nil truncate-lines t)) + (if (display-images-p) + (if (not (image-get-display-property)) + (image-toggle-display) + ;; Set next vars when image is already displayed but local + ;; variables were cleared by kill-all-local-variables + (use-local-map image-mode-map) + (setq cursor-type nil truncate-lines t)) + (use-local-map image-mode-text-map)) (run-mode-hooks 'image-mode-hook) (if (display-images-p) (message "%s" (concat From 9cce74cd9637cec46af14becf5b86f0a3639cef2 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Wed, 30 Jul 2008 13:56:34 +0000 Subject: [PATCH 11/69] * xmenu.c (Fx_menu_bar_open_internal): Use activate_item signal to open menu. * gtkutil.c (menu_nav_ended): Remove. (create_menus): Remove signal connect for menu_nav_ended. (create_menus): Connect selection-done to menu_nav_ended. --- src/ChangeLog | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 1952f115578..71c004d0b54 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2008-07-30 Jan Dj,Ad(Brv + + * xmenu.c (Fx_menu_bar_open_internal): Use activate_item signal to + open menu. + + * gtkutil.c (menu_nav_ended): Remove. + (create_menus): Remove signal connect for menu_nav_ended. + (create_menus): Connect selection-done to menu_nav_ended. + 2008-07-26 Eli Zaretskii * term.c (syms_of_term): Fix last change. From bb08f2900cf5f80f734788bb15143d6daecd50e5 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Wed, 30 Jul 2008 13:57:26 +0000 Subject: [PATCH 12/69] (Fx_menu_bar_open_internal): Use activate_item signal to open menu. --- src/xmenu.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/xmenu.c b/src/xmenu.c index d240355ef2f..6902f1e4025 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1412,11 +1412,12 @@ If FRAME is nil or not given, use the selected frame. */) /* Activate the first menu. */ GList *children = gtk_container_get_children (GTK_CONTAINER (menubar)); - gtk_menu_shell_select_item (GTK_MENU_SHELL (menubar), - GTK_WIDGET (children->data)); - - popup_activated_flag = 1; - g_list_free (children); + if (children) + { + g_signal_emit_by_name (children->data, "activate_item"); + popup_activated_flag = 1; + g_list_free (children); + } } UNBLOCK_INPUT; From df7591cb86852657628c92c39a36597285a229c7 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Wed, 30 Jul 2008 13:57:56 +0000 Subject: [PATCH 13/69] (menu_nav_ended): Remove. (create_menus): Remove signal connect for menu_nav_ended. (create_menus): Connect selection-done to menu_nav_ended. --- src/gtkutil.c | 46 +++++++--------------------------------------- 1 file changed, 7 insertions(+), 39 deletions(-) diff --git a/src/gtkutil.c b/src/gtkutil.c index 30735890143..fedfb8fa0df 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -2038,34 +2038,6 @@ xg_create_one_menuitem (item, f, select_cb, highlight_cb, cl_data, group) return w; } -/* Callback called when keyboard traversal (started by x-menu-bar-open) ends. - WMENU is the menu for which traversal has been done. DATA points to the - frame for WMENU. We must release grabs, some bad interaction between GTK - and Emacs makes the menus keep the grabs. */ - -static void -menu_nav_ended (wmenu, data) - GtkMenuShell *wmenu; - gpointer data; -{ - FRAME_PTR f = (FRAME_PTR) data; - - if (FRAME_X_OUTPUT (f)->menubar_widget) - { - GtkMenuShell *w = GTK_MENU_SHELL (FRAME_X_OUTPUT (f)->menubar_widget); - Display *dpy = FRAME_X_DISPLAY (f); - - BLOCK_INPUT; - gtk_menu_shell_deactivate (w); - gtk_menu_shell_deselect (w); - - XUngrabKeyboard (dpy, CurrentTime); - XUngrabPointer (dpy, CurrentTime); - UNBLOCK_INPUT; - } -} - - static GtkWidget *create_menus P_ ((widget_value *, FRAME_PTR, GCallback, GCallback, GCallback, int, int, int, GtkWidget *, xg_menu_cb_data *, char *)); @@ -2131,12 +2103,6 @@ create_menus (data, f, select_cb, deactivate_cb, highlight_cb, } else wmenu = gtk_menu_bar_new (); - /* Fix up grabs after keyboard traversal ends. */ - g_signal_connect (G_OBJECT (wmenu), - "selection-done", - G_CALLBACK (menu_nav_ended), - f); - /* Put cl_data on the top menu for easier access. */ cl_data = make_cl_data (cl_data, f, highlight_cb); g_object_set_data (G_OBJECT (wmenu), XG_FRAME_DATA, (gpointer)cl_data); @@ -2356,7 +2322,7 @@ xg_destroy_widgets (list) static void xg_update_menubar (menubar, f, list, iter, pos, val, - select_cb, highlight_cb, cl_data) + select_cb, deactivate_cb, highlight_cb, cl_data) GtkWidget *menubar; FRAME_PTR f; GList **list; @@ -2364,6 +2330,7 @@ xg_update_menubar (menubar, f, list, iter, pos, val, int pos; widget_value *val; GCallback select_cb; + GCallback deactivate_cb; GCallback highlight_cb; xg_menu_cb_data *cl_data; { @@ -2381,7 +2348,7 @@ xg_update_menubar (menubar, f, list, iter, pos, val, else if (! iter && val) { /* Item(s) added. Add all new items in one call. */ - create_menus (val, f, select_cb, 0, highlight_cb, + create_menus (val, f, select_cb, deactivate_cb, highlight_cb, 0, 1, 0, menubar, cl_data, 0); /* All updated. */ @@ -2488,7 +2455,8 @@ xg_update_menubar (menubar, f, list, iter, pos, val, /* Create a possibly empty submenu for menu bar items, since some themes don't highlight items correctly without it. */ GtkWidget *submenu = create_menus (NULL, f, - select_cb, NULL, highlight_cb, + select_cb, deactivate_cb, + highlight_cb, 0, 0, 0, 0, cl_data, 0); gtk_widget_set_name (w, MENU_ITEM_NAME); gtk_menu_shell_insert (GTK_MENU_SHELL (menubar), w, pos); @@ -2526,7 +2494,7 @@ xg_update_menubar (menubar, f, list, iter, pos, val, /* Update the rest of the menu bar. */ xg_update_menubar (menubar, f, list, iter, pos, val, - select_cb, highlight_cb, cl_data); + select_cb, deactivate_cb, highlight_cb, cl_data); } /* Update the menu item W so it corresponds to VAL. @@ -2831,7 +2799,7 @@ xg_modify_menubar_widgets (menubar, f, val, deep_p, XG_FRAME_DATA); xg_update_menubar (menubar, f, &list, list, 0, val->contents, - select_cb, highlight_cb, cl_data); + select_cb, deactivate_cb, highlight_cb, cl_data); if (deep_p) { From e567e175624e602ea89a10cbb694a3142133a41b Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Thu, 31 Jul 2008 14:23:37 +0000 Subject: [PATCH 14/69] * progmodes/cc-styles.el (c-style-alist): For the Ellemtel style, move the (arglist-cont-nonempty) from c-offsets-alist to c-hanging-braces-alist like other styles already have. --- lisp/ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 41cf3a95ada..de8ade79a2d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2008-07-31 Joachim Nilsson (tiny change) + + * progmodes/cc-styles.el (c-style-alist): For the Ellemtel style, + move the (arglist-cont-nonempty) from c-offsets-alist to + c-hanging-braces-alist like other styles already have. + 2008-07-19 Markus Triska * image-mode.el (image-mode): Set image-mode-text-map when image From 78b78f1514096241430ae13c1c49ce5ceb8fb03f Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Thu, 31 Jul 2008 14:24:20 +0000 Subject: [PATCH 15/69] (c-style-alist): For the Ellemtel style, move the (arglist-cont-nonempty) from c-offsets-alist to c-hanging-braces-alist like other styles already have. --- lisp/progmodes/cc-styles.el | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lisp/progmodes/cc-styles.el b/lisp/progmodes/cc-styles.el index 72bc86b6cc1..d8e577af3a2 100644 --- a/lisp/progmodes/cc-styles.el +++ b/lisp/progmodes/cc-styles.el @@ -164,16 +164,15 @@ ("ellemtel" (c-basic-offset . 3) (c-comment-only-line-offset . 0) - (c-hanging-braces-alist . ((substatement-open before after))) + (c-hanging-braces-alist . ((substatement-open before after) + (arglist-cont-nonempty))) (c-offsets-alist . ((topmost-intro . 0) (substatement . +) (substatement-open . 0) (case-label . +) (access-label . -) - (inclass . ++) - (inline-open . 0) - (arglist-cont-nonempty)))) - + (inclass . +) + (inline-open . 0)))) ("linux" (c-basic-offset . 8) (c-comment-only-line-offset . 0) From 8916b50099bf3279d3dc7e09e55ad0410c94db64 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Thu, 31 Jul 2008 21:11:38 +0000 Subject: [PATCH 16/69] * files.el (abbreviate-file-name): When replacing $HOME with ~, turn off case-fold-search. --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index de8ade79a2d..0908a0cda8e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-07-31 Sven Joachim + + * files.el (abbreviate-file-name): When replacing $HOME with ~, + turn off case-fold-search. + 2008-07-31 Joachim Nilsson (tiny change) * progmodes/cc-styles.el (c-style-alist): For the Ellemtel style, From 5fd4193c0455eb8c2962b71e23b7c1469ac1f775 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Thu, 31 Jul 2008 21:12:21 +0000 Subject: [PATCH 17/69] (abbreviate-file-name): When replacing $HOME with ~, turn off case-fold-search. --- lisp/files.el | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/lisp/files.el b/lisp/files.el index 840ab2f77fa..304cf4720df 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1318,14 +1318,18 @@ home directory is a root directory) and removes automounter prefixes (file-exists-p (file-name-directory (substring filename (1- (match-end 0)))))) (setq filename (substring filename (1- (match-end 0))))) - (let ((tail directory-abbrev-alist)) + ;; Avoid treating /home/foo as /home/Foo during `~' substitution. + ;; To fix this right, we need a `file-name-case-sensitive-p' + ;; function, but we don't have that yet, so just guess. + (let ((case-fold-search + (memq system-type '(ms-dos windows-nt darwin cygwin)))) ;; If any elt of directory-abbrev-alist matches this name, ;; abbreviate accordingly. - (while tail - (if (string-match (car (car tail)) filename) + (dolist (dir-abbrev directory-abbrev-alist) + (if (string-match (car dir-abbrev) filename) (setq filename - (concat (cdr (car tail)) (substring filename (match-end 0))))) - (setq tail (cdr tail))) + (concat (cdr dir-abbrev) + (substring filename (match-end 0)))))) ;; Compute and save the abbreviated homedir name. ;; We defer computing this until the first time it's needed, to ;; give time for directory-abbrev-alist to be set properly. From f5c3336520627d95da2efb971350bfdd151a3a57 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Fri, 1 Aug 2008 15:10:50 +0000 Subject: [PATCH 18/69] (x_draw_composite_glyph_string_foreground): Force use of Unicode output. --- src/ChangeLog | 5 +++++ src/w32term.c | 16 ++++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 71c004d0b54..4e41e9be455 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-08-01 Jason Rumney + + * w32term.c (x_draw_composite_glyph_string_foreground): Force + use of Unicode output. + 2008-07-30 Jan Dj,Ad(Brv * xmenu.c (Fx_menu_bar_open_internal): Use activate_item signal to diff --git a/src/w32term.c b/src/w32term.c index bfda8e9e9d3..402f5a212ef 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -1631,9 +1631,6 @@ x_draw_composite_glyph_string_foreground (s) SetBkMode (s->hdc, TRANSPARENT); SetTextAlign (s->hdc, TA_BASELINE | TA_LEFT); - if (s->font && s->font->hfont) - old_font = SelectObject (s->hdc, s->font->hfont); - /* Draw a rectangle for the composition if the font for the very first character of the composition could not be loaded. */ if (s->font_not_found_p) @@ -1644,6 +1641,13 @@ x_draw_composite_glyph_string_foreground (s) } else { + if (s->font && s->font->hfont) + old_font = SelectObject (s->hdc, s->font->hfont); + + /* Because of the way Emacs encodes composite glyphs, the font_type + may not be set up yet. Always use unicode for composite glyphs. */ + s->first_glyph->font_type = UNICODE_FONT; + for (i = 0; i < s->nchars; i++, ++s->gidx) { w32_text_out (s, x + s->cmp->offsets[s->gidx * 2], @@ -1654,10 +1658,10 @@ x_draw_composite_glyph_string_foreground (s) s->ybase - s->cmp->offsets[s->gidx * 2 + 1], s->char2b + i, 1); } - } - if (s->font && s->font->hfont) - SelectObject (s->hdc, old_font); + if (s->font && s->font->hfont) + SelectObject (s->hdc, old_font); + } } From 8fe2123ed131e431097b755900b3b7adfe68ab9b Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 2 Aug 2008 09:31:21 +0000 Subject: [PATCH 19/69] (Fexpand_file_name): Convert the value of $HOME to a multibyte string. --- src/ChangeLog | 5 +++++ src/fileio.c | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 4e41e9be455..5d190d543c2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-08-02 Eli Zaretskii + + * fileio.c (Fexpand_file_name): Convert the value of $HOME to a + multibyte string. + 2008-08-01 Jason Rumney * w32term.c (x_draw_composite_glyph_string_foreground): Force diff --git a/src/fileio.c b/src/fileio.c index cc6c7c2d3a7..4f703a8a743 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -1066,6 +1066,7 @@ See also the function `substitute-in-file-name'. */) int length; Lisp_Object handler, result; int multibyte; + Lisp_Object hdir; CHECK_STRING (name); @@ -1369,9 +1370,19 @@ See also the function `substitute-in-file-name'. */) #endif /* VMS */ || nm[1] == 0) /* ~ by itself */ { + Lisp_Object tem; + if (!(newdir = (unsigned char *) egetenv ("HOME"))) newdir = (unsigned char *) ""; nm++; + /* egetenv may return a unibyte string, which will bite us since + we expect the directory to be multibyte. */ + tem = build_string (newdir); + if (!STRING_MULTIBYTE (tem)) + { + hdir = DECODE_FILE (tem); + newdir = SDATA (hdir); + } #ifdef DOS_NT collapse_newdir = 0; #endif From 7b044f8d8e14f14bc8b7677b38b450ea257ed412 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 2 Aug 2008 19:03:22 +0000 Subject: [PATCH 20/69] * pgg-gpg.el (pgg-gpg-process-region): Accept any remaining pending output coming after the status change. --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0908a0cda8e..6ad04399955 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-08-02 Chong Yidong + + * pgg-gpg.el (pgg-gpg-process-region): Accept any remaining + pending output coming after the status change. + 2008-07-31 Sven Joachim * files.el (abbreviate-file-name): When replacing $HOME with ~, From 9d96724002ca9a99865f0216d7162d6da7efe979 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 2 Aug 2008 19:03:39 +0000 Subject: [PATCH 21/69] (pgg-gpg-process-region): Accept any remaining pending output coming after the status change. --- lisp/pgg-gpg.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/pgg-gpg.el b/lisp/pgg-gpg.el index 85a4e17d592..406909abe2b 100644 --- a/lisp/pgg-gpg.el +++ b/lisp/pgg-gpg.el @@ -106,6 +106,9 @@ (process-send-eof process) (while (eq 'run (process-status process)) (accept-process-output process 5)) + ;; Accept any remaining pending output coming after the + ;; status change. + (accept-process-output process 5) (setq status (process-status process) exit-status (process-exit-status process)) (delete-process process) From f7bddaf32ed4ed81af8283e4cb3e3a577466dc15 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 2 Aug 2008 21:09:08 +0000 Subject: [PATCH 22/69] * cus-edit.el (custom-save-all): Avoid destrying symlink if already visiting the custom file. --- lisp/ChangeLog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6ad04399955..478202fa67b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2008-08-02 Chong Yidong + * cus-edit.el (custom-save-all): Avoid destrying symlink if + already visiting the custom file. + * pgg-gpg.el (pgg-gpg-process-region): Accept any remaining pending output coming after the status change. From 07f540d6eda23aae8d4189b82b15fa2e4cbd59c8 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 2 Aug 2008 21:09:29 +0000 Subject: [PATCH 23/69] Fix typo in last change. --- lisp/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 478202fa67b..faf26b236cd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,6 @@ 2008-08-02 Chong Yidong - * cus-edit.el (custom-save-all): Avoid destrying symlink if + * cus-edit.el (custom-save-all): Avoid destroying symlink if already visiting the custom file. * pgg-gpg.el (pgg-gpg-process-region): Accept any remaining From 436e3ef5844956a2af52acd66d1da3dda141beeb Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 2 Aug 2008 21:10:05 +0000 Subject: [PATCH 24/69] (custom-save-all): Avoid destrying symlink if already visiting the custom file. --- lisp/cus-edit.el | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 0446102eb09..5201256bcab 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -4207,9 +4207,17 @@ if only the first line of the docstring is shown.")) (recentf-expand-file-name (custom-file))) "\\'") recentf-exclude))) - (old-buffer (find-buffer-visiting filename))) + (old-buffer (find-buffer-visiting filename)) + old-buffer-name) (with-current-buffer (let ((find-file-visit-truename t)) (or old-buffer (find-file-noselect filename))) + ;; We'll save using file-precious-flag, so avoid destroying + ;; symlinks. (If we're not already visiting the buffer, this is + ;; handled by find-file-visit-truename, above.) + (when old-buffer + (setq old-buffer-name (buffer-file-name)) + (set-visited-file-name (file-chase-links filename))) + (unless (eq major-mode 'emacs-lisp-mode) (emacs-lisp-mode)) (let ((inhibit-read-only t)) @@ -4217,7 +4225,10 @@ if only the first line of the docstring is shown.")) (custom-save-faces)) (let ((file-precious-flag t)) (save-buffer)) - (unless old-buffer + (if old-buffer + (progn + (set-visited-file-name old-buffer-name) + (set-buffer-modified-p nil)) (kill-buffer (current-buffer)))))) ;;;###autoload From 2bc0635a93cca42056c816c785d7b4399cbe0f3a Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 2 Aug 2008 22:20:53 +0000 Subject: [PATCH 25/69] Add list of deprecated systems. --- etc/NEWS | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 00767282090..83786459d4d 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -36,6 +36,31 @@ below. Emacs tries to warn you about these through `bad-packages-alist'. ** cua.el, cua-mode.el: remove old versions. +* Changes in Emacs 22.3 + +** Support for several obsolete platforms will be removed in the next +major version of Emacs: Apollo, Acorn, Alliant, Amdahl, Altos 3068, +Bull DPX/2, Bull SPS-7, AT&T UNIX 7300, AT&T 3b, Aviion Berkeley 4.1 +to 4.3, Celerity, Clipper, Convergent S series, Convex, Cydra, DG/UX, +Dual, Elxsi, ESIX, Fujitsu F301, GEC 63, Gould, Honeywell XPS100, +i860, IBM ps/2 aix386, Harris CXUX, Harris Night Hawk 1200/3000, +Harris Power PC, HP 9000 series 200 or 300, HLH Orion, Hitachi +SR2001/SR2201, IBM PS/2, Integrated Solutions 386, Integrated +Solutions Optimum V, Iris, Irix < v6, ISC Unix, ISI 68000, Masscomp +5000, Megatest 68000, Motorola System V/88, ns16000, National +Semiconductor 32000, osf1 (s/osf*) Paragon i860, PFU A-series, Plexus, +Pyramid, RTU 3.0, RISCiX SCO 3.2, sh3el, Sinix, Stride, Sun 1-3, Sun +RoadRunner, Sequent Symmetry, Sony News, SunOS 4, System V rel 0 to 3, +Tadpole 68k machines, tahoe, Tandem Integrity S2, targon31, Tektronix, +TI Nu, NCR Tower 32, U-station, Ultrix, UMAX, UniPlus 5.2, Whitechapel +Computer Works MG1, Wicat, and Xenix. + +*** Support for systems without alloca will be removed. + +*** Support for Sun windows will be removed. + +*** Support for VMS will be removed. + * Incompatible Editing Changes in Emacs 22.3 ** The following input methods were removed in Emacs 22.2, but this was From 630d42a8afbd84851d6b48c85631d8261a88817c Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 2 Aug 2008 22:36:50 +0000 Subject: [PATCH 26/69] * vm-limit.c (check_memory_limits): Don't use getrlimit on cygwin. Don't use uninitialized pointer variable when using getrlimit. --- src/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 5d190d543c2..178683d8f0f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-08-02 Chong Yidong + + * vm-limit.c (check_memory_limits): Don't use getrlimit on cygwin. + Don't use uninitialized pointer variable when using getrlimit. + 2008-08-02 Eli Zaretskii * fileio.c (Fexpand_file_name): Convert the value of $HOME to a From b6a46793c539d759cc37442ab904bb162cd5796c Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 2 Aug 2008 22:37:00 +0000 Subject: [PATCH 27/69] (check_memory_limits): Don't use getrlimit on cygwin. Don't use uninitialized pointer variable when using getrlimit. --- src/vm-limit.c | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/src/vm-limit.c b/src/vm-limit.c index f3da55bf181..7b954e12e8b 100644 --- a/src/vm-limit.c +++ b/src/vm-limit.c @@ -149,24 +149,21 @@ check_memory_limits () #endif extern POINTER (*__morecore) (); - register POINTER cp; unsigned long five_percent; unsigned long data_size; enum warnlevel new_warnlevel; -#ifdef HAVE_GETRLIMIT + /* Cygwin has a faulty getrlimit implementation: + http://lists.gnu.org/archive/html/emacs-devel/2008-08/msg00125.html */ +#if defined (HAVE_GETRLIMIT) && ! defined (CYGWIN) struct rlimit rlimit; getrlimit (RLIMIT_AS, &rlimit); - - if (RLIM_INFINITY == rlimit.rlim_max) + if (RLIM_INFINITY == rlimit.rlim_max + /* This is a nonsensical case, but it happens -- rms. */ + || rlimit.rlim_cur > rlimit.rlim_max) return; - - /* This is a nonsensical case, but it happens -- rms. */ - if (rlimit.rlim_cur > rlimit.rlim_max) - return; - five_percent = rlimit.rlim_max / 20; data_size = rlimit.rlim_cur; @@ -191,14 +188,11 @@ check_memory_limits () return; /* What level of warning does current memory usage demand? */ - if (data_size > five_percent * 19) - new_warnlevel = warned_95; - else if (data_size > five_percent * 17) - new_warnlevel = warned_85; - else if (data_size > five_percent * 15) - new_warnlevel = warned_75; - else - new_warnlevel = not_warned; + new_warnlevel + = (data_size > five_percent * 19) ? warned_95 + : (data_size > five_percent * 17) ? warned_85 + : (data_size > five_percent * 15) ? warned_75 + : not_warned; /* If we have gone up a level, give the appropriate warning. */ if (new_warnlevel > warnlevel || new_warnlevel == warned_95) @@ -235,8 +229,10 @@ check_memory_limits () warnlevel = warned_85; } +#if ! defined (HAVE_GETRLIMIT) || defined (CYGWIN) if (EXCEEDS_LISP_PTR (cp)) (*warn_function) ("Warning: memory in use exceeds lisp pointer size"); +#endif } /* Enable memory usage warnings. From 880c60ca7ecbe9af72e612897141e808182b5ff5 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 3 Aug 2008 14:07:00 +0000 Subject: [PATCH 28/69] * vm-limit.c (get_lim_data) [HAVE_GETRLIMIT && RLIMIT_AS]: Define. (check_memory_limits): Don't handle HAVE_GETRLIMIT here. --- src/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 178683d8f0f..385c9414a13 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-08-03 Andreas Schwab + + * vm-limit.c (get_lim_data) [HAVE_GETRLIMIT && RLIMIT_AS]: Define. + (check_memory_limits): Don't handle HAVE_GETRLIMIT here. + 2008-08-02 Chong Yidong * vm-limit.c (check_memory_limits): Don't use getrlimit on cygwin. From 5ced3ad912eed8acc19d5208606e28f8cb798627 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 3 Aug 2008 14:07:10 +0000 Subject: [PATCH 29/69] (get_lim_data) [HAVE_GETRLIMIT && RLIMIT_AS]: Define. (check_memory_limits): Don't handle HAVE_GETRLIMIT here. --- src/vm-limit.c | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/src/vm-limit.c b/src/vm-limit.c index 7b954e12e8b..8581bba26da 100644 --- a/src/vm-limit.c +++ b/src/vm-limit.c @@ -67,6 +67,21 @@ get_lim_data () } #else /* not NO_LIM_DATA */ +#if defined (HAVE_GETRLIMIT) && defined (RLIMIT_AS) +static void +get_lim_data () +{ + struct rlimit rlimit; + + getrlimit (RLIMIT_AS, &rlimit); + if (rlimit.rlim_cur == RLIM_INFINITY) + lim_data = -1; + else + lim_data = rlimit.rlim_cur; +} + +#else /* not HAVE_GETRLIMIT */ + #ifdef USG static void @@ -137,6 +152,7 @@ get_lim_data () #endif /* BSD4_2 */ #endif /* not WINDOWSNT */ #endif /* not USG */ +#endif /* not HAVE_GETRLIMIT */ #endif /* not NO_LIM_DATA */ /* Verify amount of memory available, complaining if we're near the end. */ @@ -154,21 +170,6 @@ check_memory_limits () unsigned long data_size; enum warnlevel new_warnlevel; - /* Cygwin has a faulty getrlimit implementation: - http://lists.gnu.org/archive/html/emacs-devel/2008-08/msg00125.html */ -#if defined (HAVE_GETRLIMIT) && ! defined (CYGWIN) - struct rlimit rlimit; - - getrlimit (RLIMIT_AS, &rlimit); - if (RLIM_INFINITY == rlimit.rlim_max - /* This is a nonsensical case, but it happens -- rms. */ - || rlimit.rlim_cur > rlimit.rlim_max) - return; - five_percent = rlimit.rlim_max / 20; - data_size = rlimit.rlim_cur; - -#else /* not HAVE_GETRLIMIT */ - if (lim_data == 0) get_lim_data (); five_percent = lim_data / 20; @@ -182,8 +183,6 @@ check_memory_limits () cp = (char *) (*__morecore) (0); data_size = (char *) cp - (char *) data_space_start; -#endif /* not HAVE_GETRLIMIT */ - if (!warn_function) return; @@ -229,10 +228,8 @@ check_memory_limits () warnlevel = warned_85; } -#if ! defined (HAVE_GETRLIMIT) || defined (CYGWIN) if (EXCEEDS_LISP_PTR (cp)) (*warn_function) ("Warning: memory in use exceeds lisp pointer size"); -#endif } /* Enable memory usage warnings. From 48a8061a636fa3fe2bc8ce1f44ed4bbdef138485 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 5 Aug 2008 18:05:35 +0000 Subject: [PATCH 30/69] * configure.in: Add checks for krb5_error.text and krb5_error.e_text struct members. * configure: Regenerate. --- ChangeLog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 643dcdd34fd..3ae0ca15ed5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-08-05 Ulrich Mueller + + * configure.in: Add checks for krb5_error.text and + krb5_error.e_text struct members. + + * configure: Regenerate. + 2008-07-25 Chong Yidong * configure.in: Check for getrlimit. From a1a490901884ce81dab559af4a9191193c608d0d Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 5 Aug 2008 18:05:47 +0000 Subject: [PATCH 31/69] Add checks for krb5_error.text and krb5_error.e_text struct members. --- configure.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index eec20f4ff1c..3d096002cd8 100644 --- a/configure.in +++ b/configure.in @@ -2700,7 +2700,9 @@ if test "${with_kerberos+set}" = set; then fi if test "${with_kerberos5+set}" = set; then - AC_CHECK_HEADERS(krb5.h) + AC_CHECK_HEADERS(krb5.h, + AC_CHECK_MEMBERS([krb5_error.text, krb5_error.e_text],,, + [#include ])) else AC_CHECK_HEADERS(des.h,, [AC_CHECK_HEADERS(kerberosIV/des.h,, From 609b5db1ad844798432f532f78daf248c46bb3e2 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 5 Aug 2008 18:05:59 +0000 Subject: [PATCH 32/69] Regenerate. --- configure | 206 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 206 insertions(+) diff --git a/configure b/configure index eb980689d24..c5d99f4d5c6 100755 --- a/configure +++ b/configure @@ -20355,6 +20355,212 @@ if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF + { echo "$as_me:$LINENO: checking for krb5_error.text" >&5 +echo $ECHO_N "checking for krb5_error.text... $ECHO_C" >&6; } +if test "${ac_cv_member_krb5_error_text+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +static krb5_error ac_aggr; +if (ac_aggr.text) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_krb5_error_text=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +static krb5_error ac_aggr; +if (sizeof ac_aggr.text) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_krb5_error_text=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_krb5_error_text=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text" >&5 +echo "${ECHO_T}$ac_cv_member_krb5_error_text" >&6; } +if test $ac_cv_member_krb5_error_text = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_ERROR_TEXT 1 +_ACEOF + + +fi +{ echo "$as_me:$LINENO: checking for krb5_error.e_text" >&5 +echo $ECHO_N "checking for krb5_error.e_text... $ECHO_C" >&6; } +if test "${ac_cv_member_krb5_error_e_text+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +static krb5_error ac_aggr; +if (ac_aggr.e_text) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_krb5_error_e_text=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +static krb5_error ac_aggr; +if (sizeof ac_aggr.e_text) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_krb5_error_e_text=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_krb5_error_e_text=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_text" >&5 +echo "${ECHO_T}$ac_cv_member_krb5_error_e_text" >&6; } +if test $ac_cv_member_krb5_error_e_text = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_ERROR_E_TEXT 1 +_ACEOF + + +fi fi From 3ae0aed3179e055db90d654d3ae71a3ed85ea4d3 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 5 Aug 2008 18:06:40 +0000 Subject: [PATCH 33/69] * pop.c (socket_connection): Add conditionals for HAVE_KRB5_ERROR_TEXT and HAVE_KRB5_ERROR_E_TEXT to support compilation with MIT Kerberos and Heimdal, respectively. --- lib-src/ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 2753a9db71c..8fe27192b49 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,9 @@ +2008-08-05 Ulrich Mueller + + * pop.c (socket_connection): Add conditionals for + HAVE_KRB5_ERROR_TEXT and HAVE_KRB5_ERROR_E_TEXT to support + compilation with MIT Kerberos and Heimdal, respectively. + 2008-04-24 Adam Go,B3j(Bbiowski (tiny change) * Makefile.in (etags${EXEEXT}, ctags${EXEEXT}): Fix quote typo. From 495a2055a5d800bb426dc90e750f8c05db04fa34 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 5 Aug 2008 18:06:53 +0000 Subject: [PATCH 34/69] (socket_connection): Add conditionals for HAVE_KRB5_ERROR_TEXT and HAVE_KRB5_ERROR_E_TEXT to support compilation with MIT Kerberos and Heimdal, respectively. --- lib-src/pop.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/lib-src/pop.c b/lib-src/pop.c index 7de5e17e20d..29c9712d3ec 100644 --- a/lib-src/pop.c +++ b/lib-src/pop.c @@ -1200,11 +1200,12 @@ socket_connection (host, flags) krb5_free_principal (kcontext, server); if (rem) { + strcpy (pop_error, KRB_ERROR); + strncat (pop_error, error_message (rem), + ERROR_MAX - sizeof (KRB_ERROR)); +#if defined HAVE_KRB5_ERROR_TEXT if (err_ret && err_ret->text.length) { - strcpy (pop_error, KRB_ERROR); - strncat (pop_error, error_message (rem), - ERROR_MAX - sizeof (KRB_ERROR)); strncat (pop_error, " [server says '", ERROR_MAX - strlen (pop_error) - 1); strncat (pop_error, err_ret->text.data, @@ -1213,12 +1214,17 @@ socket_connection (host, flags) strncat (pop_error, "']", ERROR_MAX - strlen (pop_error) - 1); } - else +#elif defined HAVE_KRB5_ERROR_E_TEXT + if (err_ret && err_ret->e_text && strlen(*err_ret->e_text)) { - strcpy (pop_error, KRB_ERROR); - strncat (pop_error, error_message (rem), - ERROR_MAX - sizeof (KRB_ERROR)); + strncat (pop_error, " [server says '", + ERROR_MAX - strlen (pop_error) - 1); + strncat (pop_error, *err_ret->e_text, + ERROR_MAX - strlen (pop_error) - 1); + strncat (pop_error, "']", + ERROR_MAX - strlen (pop_error) - 1); } +#endif if (err_ret) krb5_free_error (kcontext, err_ret); krb5_auth_con_free (kcontext, auth_context); From 7879d87c2f2272eee6da6b9427dd38d67c038bbe Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 5 Aug 2008 20:59:50 +0000 Subject: [PATCH 35/69] * symbols.texi (Other Plists): Fix incorrect example. Suggested by Florian Beck. --- lispref/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index c1213b3f9c7..cd6c580258a 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,8 @@ +2008-08-05 Chong Yidong + + * symbols.texi (Other Plists): Fix incorrect example. + Suggested by Florian Beck. + 2008-03-26 Chong Yidong * Version 22.2 released. From c5b9f22cd58d1bf242dc62ec0e52f44cef4d03a5 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 5 Aug 2008 20:59:57 +0000 Subject: [PATCH 36/69] (Other Plists): Fix incorrect example. Suggested by Florian Beck. --- lispref/symbols.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lispref/symbols.texi b/lispref/symbols.texi index 540f14cc950..92f2e74f548 100644 --- a/lispref/symbols.texi +++ b/lispref/symbols.texi @@ -537,8 +537,8 @@ stored in the property list @var{plist}. For example, @result{} 4 (plist-get '(foo 4 bad) 'foo) @result{} 4 -(plist-get '(foo 4 bad) 'bar) - @result{} @code{wrong-type-argument} error +(plist-get '(foo 4 bad) 'bad) + @result{} @code{nil} @end example It accepts a malformed @var{plist} argument and always returns @code{nil} From c0a4fe8c0840910790f20b8eaed47c1730122623 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 5 Aug 2008 21:43:50 +0000 Subject: [PATCH 37/69] * fileio.c (Vauto_save_list_file_name): Move here from file.el. (auto_save_1): Update modtime when auto-save-list-file-name is on. --- src/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 385c9414a13..1325e914178 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-08-05 Chong Yidong + + * fileio.c (Vauto_save_list_file_name): Move here from file.el. + (auto_save_1): Update modtime when auto-save-list-file-name is on. + 2008-08-03 Andreas Schwab * vm-limit.c (get_lim_data) [HAVE_GETRLIMIT && RLIMIT_AS]: Define. From f8a12fae315e95f326469e63268b60bd9a9ba738 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 5 Aug 2008 21:44:01 +0000 Subject: [PATCH 38/69] (Vauto_save_list_file_name): Move here from file.el. (auto_save_1): Update modtime when auto-save-list-file-name is on. --- src/fileio.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/fileio.c b/src/fileio.c index 4f703a8a743..81836bd8213 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -208,6 +208,9 @@ Lisp_Object Vwrite_region_annotations_so_far; /* File name in which we write a list of all our auto save files. */ Lisp_Object Vauto_save_list_file_name; +/* Whether or not files are auto-saved into themselves. */ +Lisp_Object Vauto_save_visited_file_name; + /* Function to call to read a file name. */ Lisp_Object Vread_file_name_function; @@ -5824,9 +5827,9 @@ auto_save_1 () } return - Fwrite_region (Qnil, Qnil, - current_buffer->auto_save_file_name, - Qnil, Qlambda, Qnil, Qnil); + Fwrite_region (Qnil, Qnil, current_buffer->auto_save_file_name, Qnil, + NILP (Vauto_save_visited_file_name) ? Qlambda : Qt, + Qnil, Qnil); } static Lisp_Object @@ -6772,6 +6775,11 @@ shortly after Emacs reads your `.emacs' file, if you have not yet given it a non-nil value. */); Vauto_save_list_file_name = Qnil; + DEFVAR_LISP ("auto-save-visited-file-name", &Vauto_save_visited_file_name, + doc: /* Non-nil says auto-save a buffer in the file it is visiting, when practical. +Normally auto-save files are written under other names. */); + Vauto_save_visited_file_name = Qnil; + #ifdef HAVE_FSYNC DEFVAR_BOOL ("write-region-inhibit-fsync", &write_region_inhibit_fsync, doc: /* *Non-nil means don't call fsync in `write-region'. From 141219794fd0fe97a8d23d37fb4fe89ebd5b2e00 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 5 Aug 2008 21:44:43 +0000 Subject: [PATCH 39/69] (auto-save-visited-file-name): Move definition to fileio.c. --- lisp/files.el | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lisp/files.el b/lisp/files.el index 304cf4720df..3d14d263cab 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -327,12 +327,6 @@ add a final newline, whenever you save a file that really needs one." :type 'boolean :group 'auto-save) -(defcustom auto-save-visited-file-name nil - "Non-nil says auto-save a buffer in the file it is visiting, when practical. -Normally auto-save files are written under other names." - :type 'boolean - :group 'auto-save) - (defcustom auto-save-file-name-transforms `(("\\`/[^/]*:\\([^/]*/\\)*\\([^/]*\\)\\'" ;; Don't put "\\2" inside expand-file-name, since it will be From 7336ae360e5f8588f8f54fe1a9302eeeb19f93d0 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 5 Aug 2008 21:45:31 +0000 Subject: [PATCH 40/69] Handle auto-save-visited-file-name. --- lisp/cus-start.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/cus-start.el b/lisp/cus-start.el index 8c95f9af65f..6bf4a1791ba 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el @@ -164,6 +164,7 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of (const :tag "always" t))) ;; fileio.c (insert-default-directory minibuffer boolean) + (auto-save-visited-file-name auto-save boolean) (read-file-name-completion-ignore-case minibuffer boolean "22.1") ;; fns.c (use-dialog-box menu boolean "21.1") From 8254b76996826e765b70a847ce716eac950e5508 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 5 Aug 2008 21:45:59 +0000 Subject: [PATCH 41/69] * files.el (auto-save-visited-file-name): Move definition to fileio.c. * cus-start.el (all): Handle auto-save-visited-file-name. --- lisp/ChangeLog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index faf26b236cd..a5a755207c5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2008-08-05 Chong Yidong + + * files.el (auto-save-visited-file-name): Move definition to + fileio.c. + + * cus-start.el (all): Handle auto-save-visited-file-name. + 2008-08-02 Chong Yidong * cus-edit.el (custom-save-all): Avoid destroying symlink if From 2c87c2e17b15e1c969a80042435ed457141a765b Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 5 Aug 2008 22:46:07 +0000 Subject: [PATCH 42/69] * xdisp.c (redisplay_window): Don't enforce scroll-margin when forcing a window start. --- src/ChangeLog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 1325e914178..c2207a10859 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2008-08-05 Chong Yidong + * xdisp.c (redisplay_window): Don't enforce scroll-margin when + forcing a window start. + * fileio.c (Vauto_save_list_file_name): Move here from file.el. (auto_save_1): Update modtime when auto-save-list-file-name is on. From 8eb0e152723cca62280dc53371c7ed2dc60837e3 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 5 Aug 2008 22:46:31 +0000 Subject: [PATCH 43/69] (redisplay_window): Don't enforce scroll-margin when forcing a window start. --- src/xdisp.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index 897dd440f15..46217731fa1 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -13065,7 +13065,6 @@ redisplay_window (window, just_this_one_p) { /* We set this later on if we have to adjust point. */ int new_vpos = -1; - int val; w->force_start = Qnil; w->vscroll = 0; @@ -13099,16 +13098,15 @@ redisplay_window (window, just_this_one_p) /* Redisplay, then check if cursor has been set during the redisplay. Give up if new fonts were loaded. */ - val = try_window (window, startp, 1); - if (!val) + /* We used to issue a CHECK_MARGINS argument to try_window here, + but this causes scrolling to fail when point begins inside + the scroll margin (bug#148) -- cyd */ + if (!try_window (window, startp, 0)) { w->force_start = Qt; clear_glyph_matrix (w->desired_matrix); goto need_larger_matrices; } - /* Point was outside the scroll margins. */ - if (val < 0) - new_vpos = window_box_height (w) / 2; if (w->cursor.vpos < 0 && !w->frozen_window_start_p) { From 17e5726d3b54cae3c791603ee0eebc547c8756f3 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 5 Aug 2008 22:58:44 +0000 Subject: [PATCH 44/69] * kmacro.el (kmacro-exec-ring-item): Add autoload. --- lisp/ChangeLog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a5a755207c5..d6fd42a050a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2008-08-05 Chong Yidong + * kmacro.el (kmacro-exec-ring-item): Add autoload. + * files.el (auto-save-visited-file-name): Move definition to fileio.c. From c0d37e92889a1f39e0e9e1a45ed4c3faa85fbf7a Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 5 Aug 2008 22:58:59 +0000 Subject: [PATCH 45/69] (kmacro-exec-ring-item): Add autoload. --- lisp/kmacro.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/kmacro.el b/lisp/kmacro.el index 6eec4ff57ed..09fb42026b4 100644 --- a/lisp/kmacro.el +++ b/lisp/kmacro.el @@ -444,6 +444,7 @@ Optional arg EMPTY is message to print if no macros are defined." keys))) +;;;###autoload (defun kmacro-exec-ring-item (item arg) "Execute item ITEM from the macro ring." ;; Use counter and format specific to the macro on the ring! From 9732330d81b0510ecb1269c6ab393a39e111d531 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 8 Aug 2008 15:49:52 +0000 Subject: [PATCH 46/69] * xdisp.c (move_it_to): When stopping at a charpos, check if that's a continued multi-char glyph; if so, advance to the actual glyph. (try_window): Check scroll margin on bottom window edge too. --- src/ChangeLog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index c2207a10859..566d19e1dc6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2008-08-08 Chong Yidong + + * xdisp.c (move_it_to): When stopping at a charpos, check if + that's a continued multi-char glyph; if so, advance to the actual + glyph. + (try_window): Check scroll margin on bottom window edge too. + 2008-08-05 Chong Yidong * xdisp.c (redisplay_window): Don't enforce scroll-margin when From 5c9c741451ca3664375b2c427370d2905f00f5c5 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 8 Aug 2008 15:50:53 +0000 Subject: [PATCH 47/69] (move_it_to): When stopping at a charpos, check if that's a continued multi-char glyph; if so, advance to the actual glyph. (try_window): Check scroll margin on bottom window edge too. --- src/xdisp.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/xdisp.c b/src/xdisp.c index 46217731fa1..6eca10a10e7 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -6932,6 +6932,30 @@ move_it_to (it, to_charpos, to_x, to_y, to_vpos, op) out: + /* On text terminals, we may stop at the end of a line in the middle + of a multi-character glyph. If the glyph itself is continued, + i.e. it is actually displayed on the next line, don't treat this + stopping point as valid; move to the next line instead (unless + that brings us offscreen). */ + if (!FRAME_WINDOW_P (it->f) + && op & MOVE_TO_POS + && IT_CHARPOS (*it) == to_charpos + && it->what == IT_CHARACTER + && it->nglyphs > 1 + && it->line_wrap == WINDOW_WRAP + && it->current_x == it->last_visible_x - 1 + && it->c != '\n' + && it->c != '\t' + && it->vpos < XFASTINT (it->w->window_end_vpos)) + { + it->continuation_lines_width += it->current_x; + it->current_x = it->hpos = it->max_ascent = it->max_descent = 0; + it->current_y += it->max_ascent + it->max_descent; + ++it->vpos; + last_height = it->max_ascent + it->max_descent; + last_max_ascent = it->max_ascent; + } + TRACE_MOVE ((stderr, "move_it_to: reached %d\n", reached)); } @@ -13665,7 +13689,7 @@ try_window (window, pos, check_margins) seems to give wrong results. We don't want to recenter when the last line is partly visible, we want to allow that case to be handled in the usual way. */ - || (w->cursor.y + 1) > it.last_visible_y) + || w->cursor.y > it.last_visible_y - this_scroll_margin - 1) { w->cursor.vpos = -1; clear_glyph_matrix (w->desired_matrix); From ad828eeb8524ee9a06bf12ad2f9c05d06c8aa5e4 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 8 Aug 2008 15:52:10 +0000 Subject: [PATCH 48/69] Fix last change. --- src/xdisp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xdisp.c b/src/xdisp.c index 6eca10a10e7..05fd0768bcc 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -6942,7 +6942,7 @@ move_it_to (it, to_charpos, to_x, to_y, to_vpos, op) && IT_CHARPOS (*it) == to_charpos && it->what == IT_CHARACTER && it->nglyphs > 1 - && it->line_wrap == WINDOW_WRAP + && !it->truncate_lines_p && it->current_x == it->last_visible_x - 1 && it->c != '\n' && it->c != '\t' From e9251f82752dccce1370155cf30831ef6cdb83f3 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 10 Aug 2008 02:35:40 +0000 Subject: [PATCH 49/69] (cpp_undefs): Rename from `undefs', update uses. Use $srcdir rather than $top_srcdir. Set before calling AC_OUTPUT, and explicitly export there. (Bug#507.) (Sync of trunk 2008-07-01). --- configure.in | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/configure.in b/configure.in index 3d096002cd8..2dd1e5f0e1e 100644 --- a/configure.in +++ b/configure.in @@ -3337,6 +3337,16 @@ fi test "${exec_prefix}" != NONE && exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`] +# Now get this: Some word that is part of the ${srcdir} directory name +# or the ${configuration} value might, just might, happen to be an +# identifier like `sun4' or `i386' or something, and be predefined by +# the C preprocessor to some helpful value like 1, or maybe the empty +# string. Needless to say consequent macro substitutions are less +# than conducive to the makefile finding the correct directory. +[cpp_undefs="`echo $srcdir $configuration $canonical | + sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \ + -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g'`"] + ## Check if the C preprocessor will convert `..' to `. .'. If so, set ## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile ## from Makefile.c can correctly provide the arg `-traditional' to the @@ -3360,17 +3370,6 @@ done # and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c # This must be done after src/config.h is built, since we rely on that file. -# Now get this: Some word that is part of the ${srcdir} directory name -# or the ${configuration} value might, just might, happen to be an -# identifier like `sun4' or `i386' or something, and be predefined by -# the C preprocessor to some helpful value like 1, or maybe the empty -# string. Needless to say consequent macro substitutions are less -# than conducive to the makefile finding the correct directory. -[undefs="`echo $top_srcdir $configuration $canonical | -sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \ - -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \ -`"] - echo creating src/epaths.h ${MAKE-make} epaths-force @@ -3389,7 +3388,7 @@ echo creating lib-src/Makefile sed -e '1,/start of cpp stuff/d'\ -e 's,/\*\*/#\(.*\)$,/* \1 */,' \ < Makefile.c > junk.c - $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \ + $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \ sed -e 's/^ / /' -e '/^#/d' -e '/^[ ]*$/d' > junk2.c cat junk1.c junk2.c > Makefile.new rm -f junk.c junk1.c junk2.c @@ -3405,7 +3404,7 @@ echo creating src/Makefile sed -e '1,/start of cpp stuff/d'\ -e 's,/\*\*/#\(.*\)$,/* \1 */,' \ < Makefile.c > junk.c - $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \ + $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \ sed -e 's/^ / /' -e '/^#/d' -e '/^[ ]*$/d' > junk2.c cat junk1.c junk2.c > Makefile.new rm -f junk.c junk1.c junk2.c @@ -3421,7 +3420,7 @@ fi # This is how we know whether to re-run configure in certain cases. touch src/config.stamp -], [GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"]) +], [GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS" cpp_undefs="$cpp_undefs"]) m4_if(dnl Do not change this comment arch-tag: 156a4dd5-bddc-4d18-96ac-f37742cf6a5e From aef88a00d364bbb208acff2d9b66b2a1eb6cf8f5 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 10 Aug 2008 02:40:17 +0000 Subject: [PATCH 50/69] Use __sparc__ rather than sparc. --- src/ChangeLog | 8 ++++++++ src/alloc.c | 2 +- src/ecrt0.c | 4 ++-- src/m/sparc.h | 6 +++--- src/unexsunos4.c | 4 ++-- 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 566d19e1dc6..05e78765f9c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2008-08-10 Glenn Morris + + Sync from trunk 2008-07-08: + * m/sparc.h: Define __sparc__ rather than sparc. (Bug#507.) + * alloc.c, ecrt0.c: Use __sparc__ rather than sparc. + + * unexsunos4.c: Use __sparc__ rather than sparc. + 2008-08-08 Chong Yidong * xdisp.c (move_it_to): When stopping at a charpos, check if diff --git a/src/alloc.c b/src/alloc.c index 46887bb332c..f37d74acaf4 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -4572,7 +4572,7 @@ mark_stack () /* Fixme: Code in the Boehm GC suggests flushing (with `flushrs') is needed on ia64 too. See mach_dep.c, where it also says inline assembler doesn't work with relevant proprietary compilers. */ -#ifdef sparc +#ifdef __sparc__ asm ("ta 3"); #endif diff --git a/src/ecrt0.c b/src/ecrt0.c index 36f6caeceb9..d4e88c3c835 100644 --- a/src/ecrt0.c +++ b/src/ecrt0.c @@ -582,7 +582,7 @@ _start() #endif /* elxsi */ -#ifdef sparc +#ifdef __sparc__ asm (".global __start"); asm (".text"); asm ("__start:"); @@ -600,7 +600,7 @@ asm (" sub %sp, 24, %sp"); asm (" call __exit"); asm (" nop"); -#endif /* sparc */ +#endif /* __sparc__ */ #if __FreeBSD__ == 2 char *__progname; diff --git a/src/m/sparc.h b/src/m/sparc.h index 333d78863ad..236038883b8 100644 --- a/src/m/sparc.h +++ b/src/m/sparc.h @@ -38,10 +38,10 @@ NOTE-END */ #define NO_ARG_ARRAY -/* Say this machine is a sparc */ +/* Say this machine is a sparc. Probably already defined. */ -#ifndef sparc -#define sparc +#ifndef __sparc__ +#define __sparc__ #endif /* Use type int rather than a union, to represent Lisp_Object */ diff --git a/src/unexsunos4.c b/src/unexsunos4.c index 17f2b298e00..773f3b407dd 100644 --- a/src/unexsunos4.c +++ b/src/unexsunos4.c @@ -236,11 +236,11 @@ unexec (new_name, a_name, bndry, bss_start, entry) #else /* not SUNOS4_SHARED_LIBRARIES */ rel = erel = 0; #endif /* not SUNOS4_SHARED_LIBRARIES */ -#ifdef sparc +#ifdef __sparc__ #define REL_INFO_TYPE struct reloc_info_sparc #else #define REL_INFO_TYPE struct relocation_info -#endif /* sparc */ +#endif /* __sparc__ */ #define REL_TARGET_ADDRESS(r) (((REL_INFO_TYPE *)(r))->r_address) #endif /* SUNOS4 */ #if defined (__FreeBSD__) || defined (__NetBSD__) From 59c4743d13bd0eb420fc6c5d74a83ccd5b9f8816 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 10 Aug 2008 02:44:23 +0000 Subject: [PATCH 51/69] (diary-remind): Doc fix. --- lisp/calendar/diary-lib.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 30c3afba1cf..6b0f76e666e 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -1699,7 +1699,7 @@ month, day, year), and `diary-entry' (a string)." SEXP is a diary-sexp. DAYS is either a single number or a list of numbers indicating the number(s) of days before the event that the warning(s) should occur on. If the current date is (one of) DAYS before the event indicated by -SEXP, then a suitable message (as specified by `diary-remind-message' is +SEXP, then a suitable message (as specified by `diary-remind-message') is returned. In addition to the reminders beforehand, the diary entry also appears on the From 4f44bf18d385406fa5468482e9a5aa22f5871677 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 10 Aug 2008 20:05:15 +0000 Subject: [PATCH 52/69] (simple-diary-display, diary-show-all-entries, make-diary-entry): Respect non-nil values of pop-up-frames (sync from trunk 2008-03-28). (list-sexp-diary-entries, diary-float): Doc fixes (sync from trunk 2008-04-29). --- lisp/calendar/diary-lib.el | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 6b0f76e666e..c78a989591c 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -607,7 +607,8 @@ changing the variable `diary-include-string'." (msg (format "No diary entries for %s" hol-string)) ;; If selected window is dedicated (to the calendar), ;; need a new one to display the diary. - (pop-up-frames (window-dedicated-p (selected-window)))) + (pop-up-frames (or pop-up-frames + (window-dedicated-p (selected-window))))) (calendar-set-mode-line (format "Diary for %s" hol-string)) (if (or (not diary-entries-list) (and (not (cdr diary-entries-list)) @@ -864,7 +865,8 @@ all entries, not just some, are visible. If there is no diary buffer, one is created." (interactive) (let ((d-file (diary-check-diary-file)) - (pop-up-frames (window-dedicated-p (selected-window)))) + (pop-up-frames (or pop-up-frames + (window-dedicated-p (selected-window))))) (with-current-buffer (or (find-buffer-visiting d-file) (find-file-noselect d-file t)) (when (eq major-mode default-major-mode) (diary-mode)) @@ -1297,7 +1299,7 @@ A number of built-in functions are available for this type of diary entry: when highlighting the day in the calendar. %%(diary-float MONTH DAYNAME N &optional DAY MARK) text - Entry will appear on the Nth DAYNAME of MONTH. + Entry will appear on the Nth DAYNAME after/before MONTH DAY. (DAYNAME=0 means Sunday, 1 means Monday, and so on; if N is negative it counts backward from the end of the month. MONTH can be a list of months, a single @@ -1554,12 +1556,12 @@ use when highlighting the day in the calendar." (cons mark entry)))) (defun diary-float (month dayname n &optional day mark) - "Floating diary entry--entry applies if date is the nth dayname of month. -Parameters are MONTH, DAYNAME, N. MONTH can be a list of months, the constant -t, or an integer. The constant t means all months. If N is negative, count -backward from the end of the month. - -An optional parameter DAY means the Nth DAYNAME on or after/before MONTH DAY. + "Diary entry for the Nth DAYNAME after/before MONTH DAY. +DAYNAME=0 means Sunday, DAYNAME=1 means Monday, and so on. +If N>0, use the Nth DAYNAME after MONTH DAY. +If N<0, use the Nth DAYNAME before MONTH DAY. +DAY defaults to 1 if N>0, and MONTH's last day otherwise. +MONTH can be a list of months, an integer, or `t' (meaning all months). Optional MARK specifies a face or single-character string to use when highlighting the day in the calendar." ;; This is messy because the diary entry may apply, but the date on which it @@ -1743,7 +1745,8 @@ marked on the calendar." "Insert a diary entry STRING which may be NONMARKING in FILE. If omitted, NONMARKING defaults to nil and FILE defaults to `diary-file'." - (let ((pop-up-frames (window-dedicated-p (selected-window)))) + (let ((pop-up-frames (or pop-up-frames + (window-dedicated-p (selected-window))))) (find-file-other-window (substitute-in-file-name (or file diary-file)))) (when (eq major-mode default-major-mode) (diary-mode)) (widen) From bf9b4e4e7f6697c3ce3f4d7fd88982e609879a25 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 10 Aug 2008 20:05:45 +0000 Subject: [PATCH 53/69] (holiday-julian): Fix a problem with holidays in the last fortnight in Julian October (sync from trunk 2008-03-31). --- lisp/calendar/cal-julian.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/calendar/cal-julian.el b/lisp/calendar/cal-julian.el index ef7ad67272b..273958f4e02 100644 --- a/lisp/calendar/cal-julian.el +++ b/lisp/calendar/cal-julian.el @@ -153,7 +153,7 @@ nil if it is not visible in the current calendar window." (julian-end (calendar-julian-from-absolute end-date)) (julian-y1 (extract-calendar-year julian-start)) (julian-y2 (extract-calendar-year julian-end))) - (setq year (if (< 10 month) julian-y1 julian-y2)) + (setq year (if (<= 10 month) julian-y1 julian-y2)) (let ((date (calendar-gregorian-from-absolute (calendar-absolute-from-julian (list month day year))))) From 411518022540534f3eb83cdf457ec6aebced9a2f Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 10 Aug 2008 20:06:08 +0000 Subject: [PATCH 54/69] (holiday-bahai): Use an algorithm actually relevant to this calendar system (sync from trunk 2008-03-31). (calendar-bahai-date-string): Avoid an error for pre-Bahai dates (sync from trunk 2008-03-31). (calendar-print-bahai-date): Handle pre-Bahai dates (sync from trunk 2008-03-20). (calendar-absolute-from-bahai): Fix the leap-year case (sync from trunk 2008-03-20). --- lisp/calendar/cal-bahai.el | 76 +++++++++++++++++++++++--------------- 1 file changed, 46 insertions(+), 30 deletions(-) diff --git a/lisp/calendar/cal-bahai.el b/lisp/calendar/cal-bahai.el index 9e1c411afe2..08e9d5a7547 100644 --- a/lisp/calendar/cal-bahai.el +++ b/lisp/calendar/cal-bahai.el @@ -94,7 +94,9 @@ Gregorian date Sunday, December 31, 1 BC." (* 365 (1- year)) ; Days in prior years. leap-days (calendar-sum m 1 (< m month) 19) - (if (= month 19) 4 0) + (if (= month 19) + (if (bahai-calendar-leap-year-p year) 5 4) + 0) day))) ; Days so far this month. (defun calendar-bahai-from-absolute (date) @@ -127,27 +129,31 @@ Defaults to today's date if DATE is not given." (y (extract-calendar-year bahai-date)) (m (extract-calendar-month bahai-date)) (d (extract-calendar-day bahai-date))) - (let ((monthname - (if (and (= m 19) - (<= d 0)) - "Ayyam-i-Ha" - (aref bahai-calendar-month-name-array (1- m)))) - (day (int-to-string - (if (<= d 0) - (if (bahai-calendar-leap-year-p y) - (+ d 5) - (+ d 4)) - d))) - (dayname nil) - (month (int-to-string m)) - (year (int-to-string y))) - (mapconcat 'eval calendar-date-display-form "")))) + (if (< y 1) + "" ; pre-Bahai + (let ((monthname + (if (and (= m 19) + (<= d 0)) + "Ayyam-i-Ha" + (aref bahai-calendar-month-name-array (1- m)))) + (day (int-to-string + (if (<= d 0) + (if (bahai-calendar-leap-year-p y) + (+ d 5) + (+ d 4)) + d))) + (dayname nil) + (month (int-to-string m)) + (year (int-to-string y))) + (mapconcat 'eval calendar-date-display-form ""))))) (defun calendar-print-bahai-date () "Show the Baha'i calendar equivalent of the selected date." (interactive) - (message "Baha'i date: %s" - (calendar-bahai-date-string (calendar-cursor-to-date t)))) + (let ((s (calendar-bahai-date-string (calendar-cursor-to-date t)))) + (if (string-equal s "") + (message "Date is pre-Baha'i") + (message "Baha'i date: %s" s)))) (defun calendar-goto-bahai-date (date &optional noecho) "Move cursor to Baha'i date DATE. @@ -186,23 +192,33 @@ Echo Baha'i date unless NOECHO is t." (defun holiday-bahai (month day string) "Holiday on MONTH, DAY (Baha'i) called STRING. -If MONTH, DAY (Baha'i) is visible, the value returned is corresponding -Gregorian date in the form of the list (((month day year) STRING)). Returns -nil if it is not visible in the current calendar window." +If MONTH, DAY (Baha'i) is visible in the current calendar window, +returns the corresponding Gregorian date in the form of the +list (((month day year) STRING)). Otherwise, returns nil." + ;; Since the calendar window shows 3 months at a time, there are + ;; approx +/- 45 days either side of the central month. + ;; Since the Bahai months have 19 days, this means up to +/- 3 months. (let* ((bahai-date (calendar-bahai-from-absolute (calendar-absolute-from-gregorian (list displayed-month 15 displayed-year)))) (m (extract-calendar-month bahai-date)) (y (extract-calendar-year bahai-date)) - (date)) - (if (< m 1) - nil ;; Baha'i calendar doesn't apply. - (increment-calendar-month m y (- 10 month)) - (if (> m 7) ;; Baha'i date might be visible - (let ((date (calendar-gregorian-from-absolute - (calendar-absolute-from-bahai (list month day y))))) - (if (calendar-date-is-visible-p date) - (list (list date string)))))))) + date) + (unless (< m 1) ; Baha'i calendar doesn't apply + ;; Cf holiday-fixed, holiday-islamic. + ;; With a +- 3 month calendar window, and 19 months per year, + ;; month 16 is special. When m16 is central is when the + ;; end-of-year first appears. When m1 is central, m16 is no + ;; longer visible. Hence we can do a one-sided test to see if + ;; m16 is visible. m16 is visible when the central month >= 13. + ;; To see if other months are visible we can shift the range + ;; accordingly. + (calendar-increment-month m y (- 16 month) 19) + (and (> m 12) ; Baha'i date might be visible + (calendar-date-is-visible-p + (setq date (calendar-gregorian-from-absolute + (calendar-absolute-from-bahai (list month day y))))) + (list (list date string)))))) (defun list-bahai-diary-entries () "Add any Baha'i date entries from the diary file to `diary-entries-list'. From a72196e7f4b5ac1f2f8b8c79e898cadf95267076 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 10 Aug 2008 20:06:21 +0000 Subject: [PATCH 55/69] (toggle-truncate-lines): Doc fix (sync from trunk 2008-04-10). --- lisp/simple.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/simple.el b/lisp/simple.el index 75d23fe1c17..2afc1f7801d 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -4359,7 +4359,8 @@ The variable `selective-display' has a separate value for each buffer." "Toggle whether to fold or truncate long lines for the current buffer. With prefix argument ARG, truncate long lines if ARG is positive, otherwise don't truncate them. Note that in side-by-side -windows, truncation is always enabled." +windows, this command has no effect if `truncate-partial-width-windows' +is non-nil." (interactive "P") (setq truncate-lines (if (null arg) From 9eccc8f0b6357b9e433e9a7675991dd35ded52cc Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 10 Aug 2008 20:06:35 +0000 Subject: [PATCH 56/69] (cal-tex-preamble-extra): Fix custom type (sync from trunk 2008-04-11). --- lisp/calendar/cal-tex.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/calendar/cal-tex.el b/lisp/calendar/cal-tex.el index a77eaafcf9e..011c4d3de76 100644 --- a/lisp/calendar/cal-tex.el +++ b/lisp/calendar/cal-tex.el @@ -128,7 +128,7 @@ will put the Hebrew date at the bottom of each day." "A string giving extra LaTeX commands to insert in the calendar preamble. For example, to include extra packages: \"\\\\usepackage{foo}\\n\\\\usepackage{bar}\\n\"." - :type 'string + :type '(choice (const nil) string) :group 'calendar-tex :version "22.1") From 00d66ed4bd76f3d91320e6bf4c4de424b50ab923 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 10 Aug 2008 20:06:46 +0000 Subject: [PATCH 57/69] (holiday-islamic): Doc fix (sync from trunk 2008-04-23). --- lisp/calendar/cal-islam.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/calendar/cal-islam.el b/lisp/calendar/cal-islam.el index 522704075eb..b7531339be3 100644 --- a/lisp/calendar/cal-islam.el +++ b/lisp/calendar/cal-islam.el @@ -177,9 +177,9 @@ Driven by the variable `calendar-date-display-form'." (defun holiday-islamic (month day string) "Holiday on MONTH, DAY (Islamic) called STRING. -If MONTH, DAY (Islamic) is visible, the value returned is corresponding -Gregorian date in the form of the list (((month day year) STRING)). Returns -nil if it is not visible in the current calendar window." +If MONTH, DAY (Islamic) is visible, returns the corresponding +Gregorian date as the list (((month day year) STRING)). +Returns nil if it is not visible in the current calendar window." (let* ((islamic-date (calendar-islamic-from-absolute (calendar-absolute-from-gregorian (list displayed-month 15 displayed-year)))) From 9cc03d33081054a625d3a766d68d307e49c8802e Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 10 Aug 2008 20:07:11 +0000 Subject: [PATCH 58/69] (calendar-nth-named-absday, calendar-nth-named-day): Doc fixes (sync from trunk 2008-04-29). --- lisp/calendar/calendar.el | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 0bd8a8e3e4d..dae55bf1f8b 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -3052,12 +3052,11 @@ date d, and applying it to d+7 gives the DAYNAME following absolute date d." (- date (% (- date dayname) 7))) (defun calendar-nth-named-absday (n dayname month year &optional day) - "The absolute date of Nth DAYNAME in MONTH, YEAR before/after optional DAY. -A DAYNAME of 0 means Sunday, 1 means Monday, and so on. If N<0, -return the Nth DAYNAME before MONTH DAY, YEAR (inclusive). + "Absolute date of the Nth DAYNAME after/before MONTH YEAR DAY. +A DAYNAME of 0 means Sunday, 1 means Monday, and so on. If N>0, return the Nth DAYNAME after MONTH DAY, YEAR (inclusive). - -If DAY is omitted, it defaults to 1 if N>0, and MONTH's last day otherwise." +If N<0, return the Nth DAYNAME before MONTH DAY, YEAR (inclusive). +DAY defaults to 1 if N>0, and MONTH's last day otherwise." (if (> n 0) (+ (* 7 (1- n)) (calendar-dayname-on-or-before @@ -3073,12 +3072,8 @@ If DAY is omitted, it defaults to 1 if N>0, and MONTH's last day otherwise." year)))))) (defun calendar-nth-named-day (n dayname month year &optional day) - "The date of Nth DAYNAME in MONTH, YEAR before/after optional DAY. -A DAYNAME of 0 means Sunday, 1 means Monday, and so on. If N<0, -return the Nth DAYNAME before MONTH DAY, YEAR (inclusive). -If N>0, return the Nth DAYNAME after MONTH DAY, YEAR (inclusive). - -If DAY is omitted, it defaults to 1 if N>0, and MONTH's last day otherwise." + "Date of the Nth DAYNAME after/before MONTH YEAR DAY. +Like `calendar-nth-named-absday', but returns a Gregorian date." (calendar-gregorian-from-absolute (calendar-nth-named-absday n dayname month year day))) From e2b9aaa409cd3178c4f3905ce5588998144f95e1 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 10 Aug 2008 20:07:32 +0000 Subject: [PATCH 59/69] (holiday-float): Doc fixes (sync from trunk 2008-04-29). --- lisp/calendar/holidays.el | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/lisp/calendar/holidays.el b/lisp/calendar/holidays.el index 3f008617ce1..e8acd014772 100644 --- a/lisp/calendar/holidays.el +++ b/lisp/calendar/holidays.el @@ -332,15 +332,13 @@ STRING)). Returns nil if it is not visible in the current calendar window." (list (list (list month day y) string))))) (defun holiday-float (month dayname n string &optional day) - "Holiday on MONTH, DAYNAME (Nth occurrence) called STRING. -If the Nth DAYNAME in MONTH is visible, the value returned is the list -\(((MONTH DAY year) STRING)). - -If N<0, count backward from the end of MONTH. - -An optional parameter DAY means the Nth DAYNAME on or after/before MONTH DAY. - -Returns nil if it is not visible in the current calendar window." + "Holiday called STRING on the Nth DAYNAME after/before MONTH DAY. +DAYNAME=0 means Sunday, DAYNAME=1 means Monday, and so on. +If N>0, use the Nth DAYNAME after MONTH DAY. +If N<0, use the Nth DAYNAME before MONTH DAY. +DAY defaults to 1 if N>0, and MONTH's last day otherwise. +If the holiday is visible in the calendar window, returns a +list (((month day year) STRING)). Otherwise returns nil." ;; This is messy because the holiday may be visible, while the date on which ;; it is based is not. For example, the first Monday after December 30 may be ;; visible when January is not. For large values of |n| the problem is more From cfbb09b9daed9361e4a7b577e89380addc1bb586 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 10 Aug 2008 20:07:48 +0000 Subject: [PATCH 60/69] (generated-finder-keywords-file, finder-exit): Doc fix (sync from trunk 2008-06-05). --- lisp/finder.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/finder.el b/lisp/finder.el index bc3e7fd7817..c93be8b2d4f 100644 --- a/lisp/finder.el +++ b/lisp/finder.el @@ -117,7 +117,7 @@ "Assoc list mapping file names to description & keyword lists.") (defvar generated-finder-keywords-file "finder-inf.el" - "File \\[finder-compile-keywords] puts finder keywords into.") + "The function `finder-compile-keywords' writes keywords into this file.") (defun finder-compile-keywords (&rest dirs) "Regenerate the keywords association list into `generated-finder-keywords-file'. @@ -359,7 +359,7 @@ FILE should be in a form suitable for passing to `locate-library'." finder directory, \\[finder-exit] = quit, \\[finder-summary] = help"))) (defun finder-exit () - "Exit Finder mode and kill the buffer." + "Exit Finder mode and kill all Finder-related buffers." (interactive) (or (one-window-p t) (delete-window)) From c972b4d87ece0d7688ca119be5324e2765875968 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 10 Aug 2008 20:08:03 +0000 Subject: [PATCH 61/69] (generated-custom-dependencies-file): Doc fix (sync from trunk 2008-06-05). --- lisp/cus-dep.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/cus-dep.el b/lisp/cus-dep.el index 7339bc65178..cd71e47e1de 100644 --- a/lisp/cus-dep.el +++ b/lisp/cus-dep.el @@ -32,7 +32,7 @@ (require 'cus-face) (defvar generated-custom-dependencies-file "cus-load.el" - "Output file for \\[custom-make-dependencies].") + "Output file for `custom-make-dependencies'.") (defun custom-make-dependencies () "Batch function to extract custom dependencies from .el files. From d7abeae694213d643ceeab3034a9b2b9c28db938 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 10 Aug 2008 20:08:15 +0000 Subject: [PATCH 62/69] (locate-library): Doc fix (sync from trunk 2008-06-10). --- lisp/subr.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/subr.el b/lisp/subr.el index 2f9cdd769e0..3737df9953d 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1401,7 +1401,7 @@ to the specified name LIBRARY. If the optional third arg PATH is specified, that list of directories is used instead of `load-path'. -When called from a program, the file name is normaly returned as a +When called from a program, the file name is normally returned as a string. When run interactively, the argument INTERACTIVE-CALL is t, and the file name is displayed in the echo area." (interactive (list (completing-read "Locate library: " From 51bfa3d9bcf60e4db40de296e12f94d0319f1540 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 10 Aug 2008 20:08:38 +0000 Subject: [PATCH 63/69] (byte-compile-maybe-guarded): Doc fix (sync from trunk 2008-06-13). (byte-compile-file): Doc fix (sync from trunk 2008-04-27). --- lisp/emacs-lisp/bytecomp.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 4bd94a6bc56..4e571130f3a 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1620,7 +1620,7 @@ This is normally set in local file variables at the end of the elisp file: (defun byte-compile-file (filename &optional load) "Compile a file of Lisp code named FILENAME into a file of byte code. The output file's name is generated by passing FILENAME to the -`byte-compile-dest-file' function (which see). +function `byte-compile-dest-file' (which see). With prefix arg (noninteractively: 2nd arg), LOAD the file after compiling. The value is non-nil if there were no errors, nil if errors." ;; (interactive "fByte compile file: \nP") @@ -3444,8 +3444,8 @@ That command is designed for interactive use only" fn)) (defmacro byte-compile-maybe-guarded (condition &rest body) "Execute forms in BODY, potentially guarded by CONDITION. CONDITION is a variable whose value is a test in an `if' or `cond'. -BODY is the code to compile first arm of the if or the body of the -cond clause. If CONDITION's value is of the form (fboundp 'foo) +BODY is the code to compile in the first arm of the if or the body of +the cond clause. If CONDITION's value is of the form (fboundp 'foo) or (boundp 'foo), the relevant warnings from BODY about foo's being undefined will be suppressed. From 9e7efbfa811d9464d82c1555ce6d0589008c1acd Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 10 Aug 2008 20:08:50 +0000 Subject: [PATCH 64/69] (bootstrap-prepare): Explictly pass EMACS to sub-makes that use it, for non-GNU makes (sync from trunk 2008-06-08). --- lisp/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/Makefile.in b/lisp/Makefile.in index 950ec1aab6e..291af0574a4 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -282,7 +282,7 @@ $(lisp)/mh-e/mh-loaddefs.el: $(lisp)/subdirs.el $(MH_E_SRC) bootstrap-prepare: if test -x $(EMACS); then \ - $(MAKE) $(MFLAGS) autoloads; \ + $(MAKE) $(MFLAGS) autoloads EMACS=$(EMACS); \ else \ cp $(lisp)/ldefs-boot.el $(lisp)/loaddefs.el; \ fi From 8f010b8fbbc5e868329581750396967dca51b3c0 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 10 Aug 2008 20:09:13 +0000 Subject: [PATCH 65/69] (fortran-end-of-subprogram): Check for a match before trying to move there (sync from trunk 2008-06-11). --- lisp/progmodes/fortran.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el index 0e7fd0ee051..c22f128a13b 100644 --- a/lisp/progmodes/fortran.el +++ b/lisp/progmodes/fortran.el @@ -1122,12 +1122,12 @@ Auto-indent does not happen if a numeric ARG is used." (fortran-check-end-prog-re))) (forward-line) (beginning-of-line 2) - (catch 'ok - (while (re-search-forward fortran-end-prog-re nil 'move) - (if (fortran-check-end-prog-re) - (throw 'ok t)))) - (goto-char (match-beginning 0)) - (forward-line))))) + (when (catch 'ok + (while (re-search-forward fortran-end-prog-re nil 'move) + (if (fortran-check-end-prog-re) + (throw 'ok t)))) + (goto-char (match-beginning 0)) + (forward-line)))))) (defun fortran-previous-statement () "Move point to beginning of the previous Fortran statement. From 9b38c5e22626ab4823a68ad1c570255e316d2fdf Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 10 Aug 2008 20:11:33 +0000 Subject: [PATCH 66/69] (f90-beginning-of-subprogram, f90-end-of-subprogram): Only give a message when interactive (sync from trunk 2008-06-12). --- lisp/ChangeLog | 57 +++++++++++++++++++++++++++++++++++++++++++ lisp/progmodes/f90.el | 4 +-- 2 files changed, 59 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d6fd42a050a..f23445c2bf2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,60 @@ +2008-08-10 Glenn Morris + + * Makefile.in (bootstrap-prepare): Explictly pass EMACS to sub-makes + that use it, for non-GNU makes (sync from trunk 2008-06-08). + + * cus-dep.el (generated-custom-dependencies-file): Doc fix (sync from + trunk 2008-06-05). + + * finder.el (generated-finder-keywords-file, finder-exit): + Doc fix (sync from trunk 2008-06-05). + + * simple.el (toggle-truncate-lines): Doc fix (sync from trunk + 2008-04-10). + + * subr.el (locate-library): Doc fix (sync from trunk 2008-06-10). + + * emacs-lisp/bytecomp.el (byte-compile-maybe-guarded): Doc fix (sync + from trunk 2008-06-13). + (byte-compile-file): Doc fix (sync from trunk 2008-04-27). + + * progmodes/f90.el (f90-beginning-of-subprogram) + (f90-end-of-subprogram): Only give a message when interactive (sync + from trunk 2008-06-12). + + * progmodes/fortran.el (fortran-end-of-subprogram): Check for a match + before trying to move there (sync from trunk 2008-06-11). + + * calendar/cal-bahai.el (holiday-bahai): Use an algorithm actually + relevant to this calendar system (sync from trunk 2008-03-31). + (calendar-bahai-date-string): Avoid an error for pre-Bahai dates (sync + from trunk 2008-03-31). + (calendar-print-bahai-date): Handle pre-Bahai dates (sync from trunk + 2008-03-20). + (calendar-absolute-from-bahai): Fix the leap-year case (sync from trunk + 2008-03-20). + + * calendar/cal-islam.el (holiday-islamic): Doc fix (sync from trunk + 2008-04-23). + + * calendar/cal-julian.el (holiday-julian): Fix a problem with holidays + in the last fortnight in Julian October (sync from trunk 2008-03-31). + + * calendar/cal-tex.el (cal-tex-preamble-extra): Fix custom type (sync + from trunk 2008-04-11). + + * calendar/calendar.el (calendar-nth-named-absday) + (calendar-nth-named-day): + * calendar/diary-lib.el (list-sexp-diary-entries, diary-float): + * calendar/holidays.el (holiday-float): + Doc fixes (sync from trunk 2008-04-29). + + * calendar/diary-lib.el (simple-diary-display, diary-show-all-entries) + (make-diary-entry): Respect non-nil values of pop-up-frames (sync from + trunk 2008-03-28). + + * calendar/diary-lib.el (diary-remind): Doc fix. + 2008-08-05 Chong Yidong * kmacro.el (kmacro-exec-ring-item): Add autoload. diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index 2f40e00135f..2f6051a8bd5 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el @@ -1234,7 +1234,7 @@ Return (TYPE NAME), or nil if not found." matching-beg ;; Note this includes the case of an un-named main program, ;; in which case we go to (point-min). - (message "No beginning found.") + (if (interactive-p) (message "No beginning found.")) nil))) (defun f90-end-of-subprogram () @@ -1259,7 +1259,7 @@ Return (TYPE NAME), or nil if not found." ;;; (forward-line 1) (if (zerop count) matching-end - (message "No end found.") + (if (interactive-p) (message "No end found.")) nil))) From 1cc42691c64509812a06a956d8bbe32f11ae90e6 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 10 Aug 2008 20:12:43 +0000 Subject: [PATCH 67/69] Forgot to commit this. --- ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index 3ae0ca15ed5..7e8d68f780b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-08-10 Glenn Morris + + * configure.in (cpp_undefs): Rename from `undefs', update uses. + Use $srcdir rather than $top_srcdir. Set before calling AC_OUTPUT, + and explicitly export there. (Bug#507.) (Sync of trunk 2008-07-01). + 2008-08-05 Ulrich Mueller * configure.in: Add checks for krb5_error.text and From f3f89619cfc36a44879501af536f537f3e9a4478 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 10 Aug 2008 20:28:41 +0000 Subject: [PATCH 68/69] (holiday-bahai): Fix previous change for Emacs 22. --- lisp/calendar/cal-bahai.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/calendar/cal-bahai.el b/lisp/calendar/cal-bahai.el index 08e9d5a7547..043a9d31ca9 100644 --- a/lisp/calendar/cal-bahai.el +++ b/lisp/calendar/cal-bahai.el @@ -213,7 +213,7 @@ list (((month day year) STRING)). Otherwise, returns nil." ;; m16 is visible. m16 is visible when the central month >= 13. ;; To see if other months are visible we can shift the range ;; accordingly. - (calendar-increment-month m y (- 16 month) 19) + (increment-calendar-month m y (- 16 month) 19) (and (> m 12) ; Baha'i date might be visible (calendar-date-is-visible-p (setq date (calendar-gregorian-from-absolute From 7b765ee622dace1bec3c627e459ab75e6461cdd7 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 10 Aug 2008 20:29:42 +0000 Subject: [PATCH 69/69] (increment-calendar-month): Optionally handle systems without 12 months per year (sync from trunk 2008-03-31; needed for above holiday-bahai fix). --- lisp/ChangeLog | 4 ++++ lisp/calendar/calendar.el | 14 ++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f23445c2bf2..57d81acbd6a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -34,6 +34,10 @@ (calendar-absolute-from-bahai): Fix the leap-year case (sync from trunk 2008-03-20). + * calendar/calendar.el (increment-calendar-month): Optionally handle + systems without 12 months per year (sync from trunk 2008-03-31; needed + for above holiday-bahai fix). + * calendar/cal-islam.el (holiday-islamic): Doc fix (sync from trunk 2008-04-23). diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index dae55bf1f8b..157af3f4030 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -1321,15 +1321,17 @@ with descriptive strings such as (defconst lunar-phases-buffer "*Phases of Moon*" "Name of the buffer used for the lunar phases.") -(defmacro increment-calendar-month (mon yr n) +(defmacro increment-calendar-month (mon yr n &optional nmonths) "Increment the variables MON and YR by N months. Forward if N is positive or backward if N is negative. -A negative YR is interpreted as BC; -1 being 1 BC, and so on." - `(let (macro-y) +A negative YR is interpreted as BC; -1 being 1 BC, and so on. +Optional NMONTHS is the number of months per year (default 12)." + `(let ((nmonths (or ,nmonths 12)) + macro-y) (if (< ,yr 0) (setq ,yr (1+ ,yr))) ; -1 BC -> 0 AD, etc - (setq macro-y (+ (* ,yr 12) ,mon -1 ,n) - ,mon (1+ (mod macro-y 12)) - ,yr (/ macro-y 12)) + (setq macro-y (+ (* ,yr nmonths) ,mon -1 ,n) + ,mon (1+ (mod macro-y nmonths)) + ,yr (/ macro-y nmonths)) (and (< macro-y 0) (> ,mon 1) (setq ,yr (1- ,yr))) (if (< ,yr 1) (setq ,yr (1- ,yr))))) ; 0 AD -> -1 BC, etc