From ab7a60adca553313f401f510c7823ffd27d44bd3 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Thu, 8 May 2008 18:08:49 +0000 Subject: [PATCH 01/13] * killing.texi (Appending Kills): Remove a strangely off-topic index entry. --- man/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/man/ChangeLog b/man/ChangeLog index ba08ada4bc2..929f5ccb53b 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,8 @@ +2008-05-08 Chong Yidong + + * killing.texi (Appending Kills): Remove a strangely off-topic index + entry. + 2008-04-13 Reiner Steib * gnus-faq.texi ([5.2]): Adjust for message-fill-column. From 14e9a35f3ebae566f8158c1aef053d0aecab0582 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Thu, 8 May 2008 18:08:55 +0000 Subject: [PATCH 02/13] (Appending Kills): Remove a strangely off-topic index entry. --- man/killing.texi | 1 - 1 file changed, 1 deletion(-) diff --git a/man/killing.texi b/man/killing.texi index f4a4a185a66..446597edba1 100644 --- a/man/killing.texi +++ b/man/killing.texi @@ -329,7 +329,6 @@ alter the undo history and does not temporarily change the screen. @subsection Appending Kills @cindex appending kills in the ring -@cindex television Normally, each kill command pushes a new entry onto the kill ring. However, two or more kill commands in a row combine their text into a single entry, so that a single @kbd{C-y} yanks all the text as a unit, From 47b82151d2a4fb6e928839e7113d57ec4143234b Mon Sep 17 00:00:00 2001 From: Reiner Steib Date: Thu, 8 May 2008 21:41:03 +0000 Subject: [PATCH 03/13] Fix spelling. --- etc/NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/NEWS b/etc/NEWS index d1171d16833..00767282090 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -39,7 +39,7 @@ below. Emacs tries to warn you about these through `bad-packages-alist'. * Incompatible Editing Changes in Emacs 22.3 ** The following input methods were removed in Emacs 22.2, but this was -not advertized: danish-alt-postfix, esperanto-alt-postfix, +not advertised: danish-alt-postfix, esperanto-alt-postfix, finnish-alt-postfix, german-alt-postfix, icelandic-alt-postfix, norwegian-alt-postfix, scandinavian-alt-postfix, spanish-alt-postfix, and swedish-alt-postfix. Use the versions without "alt-", which are From fbc4a2f453b86bf2281e00650ac08372149c9458 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 10 May 2008 07:56:42 +0000 Subject: [PATCH 04/13] (stat): Fix test of Vw32_get_true_file_attributes against the value returned by GetDriveType. --- src/w32.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/w32.c b/src/w32.c index 894160a275d..aa6c21e4402 100644 --- a/src/w32.c +++ b/src/w32.c @@ -2491,9 +2491,9 @@ stat (const char * path, struct stat * buf) } } - if (!NILP (Vw32_get_true_file_attributes) - && !(EQ (Vw32_get_true_file_attributes, Qlocal) && - GetDriveType (name) == DRIVE_FIXED) + if (!(NILP (Vw32_get_true_file_attributes) + || (EQ (Vw32_get_true_file_attributes, Qlocal) && + GetDriveType (name) != DRIVE_FIXED)) /* No access rights required to get info. */ && (fh = CreateFile (name, 0, 0, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL)) From 688e8ff6d33a228b464d4331ab57cfd292aa823a Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 10 May 2008 07:58:50 +0000 Subject: [PATCH 05/13] (syms_of_ntproc) : Doc fix. --- src/ChangeLog | 7 +++++++ src/w32proc.c | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index f5b038846e9..984c997b544 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2008-05-10 Eli Zaretskii + + * w32proc.c (syms_of_ntproc) : Doc fix. + + * w32.c (stat): Fix test of Vw32_get_true_file_attributes against + the value returned by GetDriveType. + 2008-05-04 YAMAMOTO Mitsuharu * image.c [USE_MAC_IMAGE_IO] (image_load_image_io): diff --git a/src/w32proc.c b/src/w32proc.c index 3756f4a8dd1..3f8e2b1c72f 100644 --- a/src/w32proc.c +++ b/src/w32proc.c @@ -2354,10 +2354,10 @@ the truename of a file can be slow. */); #endif DEFVAR_LISP ("w32-get-true-file-attributes", &Vw32_get_true_file_attributes, - doc: /* Non-nil means determine accurate link count in `file-attributes'. -This option is only useful for files on NTFS volumes, where + doc: /* If non-nil, determine accurate link count and file type in `file-attributes'. +This option is mostly useful for files on NTFS volumes, where hard links are supported. The default value `local' means only do -this for files on local harddrives. Any other non-nil value means do +this for files on local fixed drives. Any other non-nil value means do this even on remote and removable drives where the performance impact may be noticeable even on modern hardware. */); Vw32_get_true_file_attributes = Qlocal; From d1712a51db8c8413f7b393103d009d84ae607774 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 10 May 2008 08:43:19 +0000 Subject: [PATCH 06/13] (Windows Files): Update the documentation of w32-get-true-file-attributes. --- man/ChangeLog | 7 ++++++- man/msdog.texi | 12 +++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/man/ChangeLog b/man/ChangeLog index 929f5ccb53b..83f3fac3cbf 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,7 +1,12 @@ +2008-05-10 Eli Zaretskii + + * msdog.texi (Windows Files): Update the documentation of + w32-get-true-file-attributes. + 2008-05-08 Chong Yidong * killing.texi (Appending Kills): Remove a strangely off-topic index - entry. + entry "television". 2008-04-13 Reiner Steib diff --git a/man/msdog.texi b/man/msdog.texi index 81dc126ea17..fd38a4145b3 100644 --- a/man/msdog.texi +++ b/man/msdog.texi @@ -171,11 +171,13 @@ backslash, and also knows about drive letters in file names. default ignores letter-case in file names during completion. @vindex w32-get-true-file-attributes - If the variable @code{w32-get-true-file-attributes} is -non-@code{nil} (the default), Emacs tries to determine the accurate -link counts for files. This option is only useful on NTFS volumes, -and it considerably slows down Dired and other features, so use it -only on fast machines. + If the variable @code{w32-get-true-file-attributes} is @code{local} +(the default), Emacs tries to determine the accurate link counts and +file types for files on local fixed drives. Any other non-@code{nil} +value means do this even on remote and removable volumes, where it +could slow down Dired and other similar features; @code{nil} means +never do this. Setting this option to non-@code{nil} is only useful +on NTFS volumes. @node ls in Lisp @section Emulation of @code{ls} on MS-Windows From 102d70a83d45105b2580fcebbef3360848ddfe18 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 10 May 2008 09:01:28 +0000 Subject: [PATCH 07/13] (Fdirectory_files_and_attributes, Ffile_attributes): Mention w32-get-true-file-attributes in the doc strings. --- src/ChangeLog | 3 +++ src/dired.c | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 984c997b544..0cb3994844b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2008-05-10 Eli Zaretskii + * dired.c (Fdirectory_files_and_attributes, Ffile_attributes): + Mention w32-get-true-file-attributes in the doc strings. + * w32proc.c (syms_of_ntproc) : Doc fix. * w32.c (stat): Fix test of Vw32_get_true_file_attributes against diff --git a/src/dired.c b/src/dired.c index 7936e04a54e..ef6c3e3f9db 100644 --- a/src/dired.c +++ b/src/dired.c @@ -374,7 +374,9 @@ If MATCH is non-nil, mention only file names that match the regexp MATCH. If NOSORT is non-nil, the list is not sorted--its order is unpredictable. NOSORT is useful if you plan to sort the result yourself. ID-FORMAT specifies the preferred format of attributes uid and gid, see -`file-attributes' for further documentation. */) +`file-attributes' for further documentation. +On MS-Windows, performance depends on `w32-get-true-file-attributes', +which see. */) (directory, full, match, nosort, id_format) Lisp_Object directory, full, match, nosort, id_format; { @@ -921,7 +923,10 @@ Elements of the attribute list are: this is a cons cell containing two integers: first the high part, then the low 16 bits. 11. Device number. If it is larger than the Emacs integer, this is - a cons cell, similar to the inode number. */) + a cons cell, similar to the inode number. + +On MS-Windows, performance depends on `w32-get-true-file-attributes', +which see. */) (filename, id_format) Lisp_Object filename, id_format; { From e76fdf5307ec8c76b2c531d3f0171a79e0afaca3 Mon Sep 17 00:00:00 2001 From: Reiner Steib Date: Sat, 10 May 2008 13:06:33 +0000 Subject: [PATCH 08/13] (smerge-command-prefix): Fix custom type. --- lisp/ChangeLog | 4 ++++ lisp/smerge-mode.el | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 71d17168f09..5889ab5fa81 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2008-05-10 Reiner Steib + + * smerge-mode.el (smerge-command-prefix): Fix custom type. + 2008-05-05 Carsten Dominik * textmodes/org.el (org-read-date-get-relative): Interpret lone diff --git a/lisp/smerge-mode.el b/lisp/smerge-mode.el index 9ef2dade0e0..451b96a261b 100644 --- a/lisp/smerge-mode.el +++ b/lisp/smerge-mode.el @@ -155,7 +155,10 @@ Used in `smerge-diff-base-mine' and related functions." (defcustom smerge-command-prefix "\C-c^" "Prefix for `smerge-mode' commands." :group 'smerge - :type '(choice (string "\e") (string "\C-c^") (string "") string)) + :type '(choice (const :tag "ESC" "\e") + (const :tag "C-c ^" "\C-c^" ) + (const :tag "none" "") + string)) (easy-mmode-defmap smerge-mode-map `((,smerge-command-prefix . ,smerge-basic-map)) From 3e9de9f617057201c453fe4febb5e4097eaf0200 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Mon, 12 May 2008 08:30:13 +0000 Subject: [PATCH 09/13] (main_thread): Conditionalize on FORWARD_SIGNAL_TO_MAIN_THREAD instead of HAVE_GTK_AND_PTHREAD. (main) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Initialize it. --- src/emacs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/emacs.c b/src/emacs.c index 95168a39a86..7cb53a4e26a 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -353,10 +353,10 @@ int fatal_error_in_progress; void (*fatal_error_signal_hook) P_ ((void)); -#ifdef HAVE_GTK_AND_PTHREAD -/* When compiled with GTK and running under Gnome, multiple threads meay be - created. Keep track of our main thread to make sure signals are delivered - to it (see syssignal.h). */ +#ifdef FORWARD_SIGNAL_TO_MAIN_THREAD +/* When compiled with GTK and running under Gnome, or Carbon under Mac + OS X, multiple threads may be created. Keep track of our main + thread to make sure signals are delivered to it (see syssignal.h). */ pthread_t main_thread; #endif @@ -1031,9 +1031,9 @@ main (argc, argv # endif /* not SYNC_INPUT */ #endif /* not SYSTEM_MALLOC */ -#ifdef HAVE_GTK_AND_PTHREAD +#ifdef FORWARD_SIGNAL_TO_MAIN_THREAD main_thread = pthread_self (); -#endif /* HAVE_GTK_AND_PTHREAD */ +#endif /* FORWARD_SIGNAL_TO_MAIN_THREAD */ #if defined (MSDOS) || defined (WINDOWSNT) /* We do all file input/output as binary files. When we need to translate From f8240abdb871f9e75bf61a6c4eb4864090bd87ad Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Mon, 12 May 2008 08:30:56 +0000 Subject: [PATCH 10/13] (FORWARD_SIGNAL_TO_MAIN_THREAD): New define. (main_thread, SIGNAL_THREAD_CHECK): Conditionalize on FORWARD_SIGNAL_TO_MAIN_THREAD instead of HAVE_GTK_AND_PTHREAD. --- src/ChangeLog | 16 +++++++++++++--- src/syssignal.h | 14 ++++++++++---- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0cb3994844b..dc4198045b8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2008-05-12 YAMAMOTO Mitsuharu + + * emacs.c (main_thread): Conditionalize on + FORWARD_SIGNAL_TO_MAIN_THREAD instead of HAVE_GTK_AND_PTHREAD. + (main) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Initialize it. + + * syssignal.h (FORWARD_SIGNAL_TO_MAIN_THREAD): New define. + (main_thread, SIGNAL_THREAD_CHECK): Conditionalize on + FORWARD_SIGNAL_TO_MAIN_THREAD instead of HAVE_GTK_AND_PTHREAD. + 2008-05-10 Eli Zaretskii * dired.c (Fdirectory_files_and_attributes, Ffile_attributes): @@ -77,7 +87,7 @@ Likewise. * mactoolbox.c (Vmac_ts_active_input_buf) [USE_MAC_TSM]: Add extern. - (fast_find_position, x_y_to_hpos_vpos, mac_ax_selected_text_range): + (fast_find_position, x_y_to_hpos_vpos, mac_ax_selected_text_range) (mac_ax_number_of_characters): Add externs. (mac_get_selected_range, mac_store_buffer_text_to_unicode_chars) [USE_MAC_TSM]: Likewise. @@ -139,7 +149,7 @@ (create_apple_event, mac_event_parameters_to_lisp) [TARGET_API_MAC_CARBON]: Add externs. - * mactoolbox.c: (Vmac_ts_script_language_on_focus) + * mactoolbox.c (Vmac_ts_script_language_on_focus) (saved_ts_script_language_on_focus) [USE_MAC_TSM]: Remove externs. (XTread_socket) [USE_MAC_TOOLBAR]: Select window if its structure part is clicked. @@ -295,7 +305,7 @@ (syms_of_macselect) : Use mac_dnd_default_known_types. - * macterm.c (mac_end_cg_clip): Add argument F. All uses changed. + * macterm.c (mac_end_clip): Add argument F. All uses changed. (mac_begin_cg_clip, mac_end_cg_clip): Allow null GC. (mac_invert_rectangle, mac_compute_glyph_string_overhangs) (mac_load_query_font): Use them instead of SetPortWindowPort. diff --git a/src/syssignal.h b/src/syssignal.h index a01d5bff302..13710d3104b 100644 --- a/src/syssignal.h +++ b/src/syssignal.h @@ -21,8 +21,14 @@ Boston, MA 02110-1301, USA. */ extern void init_signals P_ ((void)); -#ifdef HAVE_GTK_AND_PTHREAD +#if defined (HAVE_GTK_AND_PTHREAD) || (defined (HAVE_CARBON) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1020) #include +/* If defined, asynchronous signals delivered to a non-main thread are + forwarded to the main thread. */ +#define FORWARD_SIGNAL_TO_MAIN_THREAD +#endif + +#ifdef FORWARD_SIGNAL_TO_MAIN_THREAD extern pthread_t main_thread; #endif @@ -207,7 +213,7 @@ extern SIGMASKTYPE sigprocmask_set; char *strsignal (); #endif -#ifdef HAVE_GTK_AND_PTHREAD +#ifdef FORWARD_SIGNAL_TO_MAIN_THREAD #define SIGNAL_THREAD_CHECK(signo) \ do { \ if (!pthread_equal (pthread_self (), main_thread)) \ @@ -226,8 +232,8 @@ char *strsignal (); } \ } while (0) -#else /* not HAVE_GTK_AND_PTHREAD */ +#else /* not FORWARD_SIGNAL_TO_MAIN_THREAD */ #define SIGNAL_THREAD_CHECK(signo) -#endif /* not HAVE_GTK_AND_PTHREAD */ +#endif /* not FORWARD_SIGNAL_TO_MAIN_THREAD */ /* arch-tag: 4580e86a-340d-4574-9e11-a742b6e1a152 (do not change this comment) */ From 6483b8c7937f3c9c2debc2b749293e2adcac0e63 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 12 May 2008 17:30:29 +0000 Subject: [PATCH 11/13] (fast-lock-cache-directories): Remove "." from its default value and give it the risky-local-variable property. --- lisp/ChangeLog | 9 +++++++-- lisp/obsolete/fast-lock.el | 7 +++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5889ab5fa81..c815d586692 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-05-12 Simon Marshall + + * fast-lock.el (fast-lock-cache-directories): Remove "." from its + default value and give it the risky-local-variable property. + 2008-05-10 Reiner Steib * smerge-mode.el (smerge-command-prefix): Fix custom type. @@ -9,8 +14,8 @@ 2008-05-01 Nick Roberts - * progmodes/gdb-ui.el (gdb-info-breakpoints-custom): Don't - throw error if no file is found. + * progmodes/gdb-ui.el (gdb-info-breakpoints-custom): + Don't throw error if no file is found. 2008-04-28 Michael Albinus diff --git a/lisp/obsolete/fast-lock.el b/lisp/obsolete/fast-lock.el index 409027bc2d9..21ae1a0403c 100644 --- a/lisp/obsolete/fast-lock.el +++ b/lisp/obsolete/fast-lock.el @@ -286,7 +286,7 @@ for buffers in Rmail mode, and size is irrelevant otherwise." (integer :tag "size"))))) :group 'fast-lock) -(defcustom fast-lock-cache-directories '("." "~/.emacs-flc") +(defcustom fast-lock-cache-directories '("~/.emacs-flc") ; - `internal', keep each file's Font Lock cache file in the same file. ; - `external', keep each file's Font Lock cache file in the same directory. "*Directories in which Font Lock cache files are saved and read. @@ -304,12 +304,15 @@ For example: ((\"^/your/true/home/directory/\" . \".\") \"~/.emacs-flc\") would cause a file's current directory to be used if the file is under your -home directory hierarchy, or otherwise the absolute directory `~/.emacs-flc'." +home directory hierarchy, or otherwise the absolute directory `~/.emacs-flc'. +For security reasons, it is not advisable to use the file's current directory +to avoid the possibility of using the cache of another user." :type '(repeat (radio (directory :tag "directory") (cons :tag "Matching" (regexp :tag "regexp") (directory :tag "directory")))) :group 'fast-lock) +(put 'fast-lock-cache-directories 'risky-local-variable t) (defcustom fast-lock-save-events '(kill-buffer kill-emacs) "*Events under which caches will be saved. From 1937f3dc3d3d085a4cb9ad2f1c14e4ca1fbfa788 Mon Sep 17 00:00:00 2001 From: Romain Francoise Date: Mon, 12 May 2008 20:07:57 +0000 Subject: [PATCH 12/13] Mention CVE name: CVE-2008-2142. --- lisp/ChangeLog | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c815d586692..ab6fb19c1ee 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,7 +1,8 @@ 2008-05-12 Simon Marshall - * fast-lock.el (fast-lock-cache-directories): Remove "." from its - default value and give it the risky-local-variable property. + * obsolete/fast-lock.el (fast-lock-cache-directories): Remove "." + from its default value and give it the risky-local-variable + property (CVE-2008-2142). 2008-05-10 Reiner Steib From bb16531656a1daf7deec8a14e3a8a5fdb2c87818 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Tue, 13 May 2008 08:13:24 +0000 Subject: [PATCH 13/13] (handle_one_xevent): Don't pass buttons higher than 3 to Gtk+ menus. --- src/ChangeLog | 5 +++++ src/xterm.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index dc4198045b8..46ba627e2e7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-05-13 Jan Dj,Ad(Brv + + * xterm.c (handle_one_xevent): Don't pass buttons higher than 3 + to Gtk+ menus. + 2008-05-12 YAMAMOTO Mitsuharu * emacs.c (main_thread): Conditionalize on diff --git a/src/xterm.c b/src/xterm.c index 3b625b0d662..89cf06c05e0 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -6848,6 +6848,8 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) if ( #ifdef USE_GTK ! popup_activated () + /* Gtk+ menus only react to the first three buttons. */ + && event.xbutton.button < 3 && #endif f && event.type == ButtonPress