Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 101661. ------------------------------------------------------------ revno: 101661 committer: Katsumi Yamaoka branch nick: trunk timestamp: Tue 2010-09-28 05:12:21 +0000 message: nnimap.el (auth-source-forget-user-or-password, auth-source-user-or-password): Autoload. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-09-28 02:13:41 +0000 +++ lisp/gnus/ChangeLog 2010-09-28 05:12:21 +0000 @@ -1,5 +1,8 @@ 2010-09-28 Katsumi Yamaoka + * nnimap.el (auth-source-forget-user-or-password) + (auth-source-user-or-password): Autoload. + * message.el (message-from-style, message-interactive) (message-signature): Remove comment. (message-cite-prefix-regexp): Default to mail-citation-prefix-regexp === modified file 'lisp/gnus/nnimap.el' --- lisp/gnus/nnimap.el 2010-09-27 23:07:47 +0000 +++ lisp/gnus/nnimap.el 2010-09-28 05:12:21 +0000 @@ -40,6 +40,9 @@ (require 'utf7) (require 'parse-time) +(autoload 'auth-source-forget-user-or-password "auth-source") +(autoload 'auth-source-user-or-password "auth-source") + (nnoo-declare nnimap) (defvoo nnimap-address nil ------------------------------------------------------------ revno: 101660 committer: Glenn Morris branch nick: trunk timestamp: Mon 2010-09-27 20:00:09 -0700 message: * lisp/calendar/appt.el (appt-check): Minor simplification. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-09-28 02:13:41 +0000 +++ lisp/ChangeLog 2010-09-28 03:00:09 +0000 @@ -1,3 +1,7 @@ +2010-09-28 Glenn Morris + + * calendar/appt.el (appt-check): Minor simplification. + 2010-09-28 Katsumi Yamaoka * mail/sendmail.el (mail-citation-prefix-regexp): Remove "}" from === modified file 'lisp/calendar/appt.el' --- lisp/calendar/appt.el 2010-09-23 19:00:31 +0000 +++ lisp/calendar/appt.el 2010-09-28 03:00:09 +0000 @@ -335,41 +335,25 @@ (null appt-prev-comp-time) ; first check (< cur-comp-time appt-prev-comp-time)) ; new day (ignore-errors - (if appt-display-diary - (let ((diary-hook - (if (assoc 'appt-make-list diary-hook) - diary-hook - (cons 'appt-make-list diary-hook)))) - (diary)) - (let* ((diary-display-function 'appt-make-list) - (d-buff (find-buffer-visiting diary-file)) - (selective - (if d-buff ; diary buffer exists - (with-current-buffer d-buff - diary-selective-display))) - d-buff2) + (let ((diary-hook (if (assoc 'appt-make-list diary-hook) + diary-hook + (cons 'appt-make-list diary-hook))) + d-buff d-buff2) + (if appt-display-diary + (diary) + (setq d-buff (find-buffer-visiting diary-file)) ;; Not displaying the diary, so we can ignore ;; diary-number-of-entries. Since appt.el only ;; works on a daily basis, no need for more entries. - ;; FIXME why not using diary-list-entries with - ;; non-nil LIST-ONLY? - (diary 1) - ;; If the diary buffer existed before this command, - ;; restore its display state. Otherwise, kill it. - (and (setq d-buff2 (find-buffer-visiting diary-file)) - (if d-buff - (or selective - (with-current-buffer d-buff2 - (if diary-selective-display - ;; diary-show-all-entries displays - ;; the diary buffer. - (diary-unhide-everything)))) - ;; FIXME does not kill any included diary files. - ;; The real issue is that (diary) should not - ;; have the side effect of visiting all the - ;; diary files. It is not really appt.el's job to - ;; clean up this mess... - (kill-buffer d-buff2))))))) + (diary-list-entries (calendar-current-date) 1 t) + ;; If diary buffer did not exist before this command, kill it. + ;; FIXME does not kill any included diary files. + ;; The real issue is that (diary) should not have + ;; the side effect of visiting all the diary files. + ;; It is not really appt.el's job to clean up this mess... + (and (not d-buff) + (setq d-buff2 (find-buffer-visiting diary-file)) + (kill-buffer d-buff2)))))) (setq appt-prev-comp-time cur-comp-time appt-mode-string nil appt-display-count nil) ------------------------------------------------------------ revno: 101659 committer: Glenn Morris branch nick: trunk timestamp: Mon 2010-09-27 19:41:18 -0700 message: Minor NEWS fix. diff: === modified file 'etc/NEWS' --- etc/NEWS 2010-09-27 20:53:35 +0000 +++ etc/NEWS 2010-09-28 02:41:18 +0000 @@ -114,8 +114,9 @@ for this. ** ImageMagick support. -It is now possible to use the Imagemagick library to load many new -image formats in Emacs. It is enable by default. To disable this, use +It is now possible to use the ImageMagick library to load many new +image formats in Emacs. By default, Emacs links with the ImageMagick +libraries if they are present at build time. To disable this, use the configure option `--without-imagemagick'. The new function `imagemagick-types' returns a list of image file ------------------------------------------------------------ revno: 101658 committer: Glenn Morris branch nick: trunk timestamp: Mon 2010-09-27 19:22:37 -0700 message: * configure.in (HAVE_GNUTLS): Add a description to make autoheader happy. diff: === modified file 'ChangeLog' --- ChangeLog 2010-09-27 20:53:35 +0000 +++ ChangeLog 2010-09-28 02:22:37 +0000 @@ -1,3 +1,8 @@ +2010-09-28 Glenn Morris + + * configure.in (HAVE_GNUTLS): Add a description to make autoheader + happy. + 2010-09-27 Lars Magne Ingebrigtsen * configure.in: Enable imagemagick by default. === modified file 'configure.in' --- configure.in 2010-09-27 20:53:35 +0000 +++ configure.in 2010-09-28 02:22:37 +0000 @@ -2004,7 +2004,7 @@ if test "${with_gnutls}" = "yes" ; then PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 2.2.4], HAVE_GNUTLS=yes, HAVE_GNUTLS=no) if test "${HAVE_GNUTLS}" = "yes"; then - AC_DEFINE(HAVE_GNUTLS) + AC_DEFINE(HAVE_GNUTLS, 1, [Define if using GnuTLS.]) fi fi AC_SUBST(LIBGNUTLS_LIBS) ------------------------------------------------------------ revno: 101657 committer: Katsumi Yamaoka branch nick: trunk timestamp: Tue 2010-09-28 02:13:41 +0000 message: Fix message-* user options that differ from Gnus trunk. message.el (message-from-style, message-interactive, message-signature): Remove comment. message.el (message-cite-prefix-regexp): Default to mail-citation-prefix-regexp always. message.el (message-sendmail-envelope-from): Comment fix. message.el (message-yank-prefix): Default to mail-yank-prefix always. message.el (message-indentation-spaces): Default to mail-indentation-spaces always. message.el (message-signature-file): Default to mail-signature-file always. sendmail.el (mail-citation-prefix-regexp): Remove "}" from citation prefix. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-09-27 23:25:27 +0000 +++ lisp/ChangeLog 2010-09-28 02:13:41 +0000 @@ -1,3 +1,8 @@ +2010-09-28 Katsumi Yamaoka + + * mail/sendmail.el (mail-citation-prefix-regexp): Remove "}" from + citation prefix. + 2010-09-27 Andreas Schwab * emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-09-27 23:07:47 +0000 +++ lisp/gnus/ChangeLog 2010-09-28 02:13:41 +0000 @@ -1,3 +1,14 @@ +2010-09-28 Katsumi Yamaoka + + * message.el (message-from-style, message-interactive) + (message-signature): Remove comment. + (message-cite-prefix-regexp): Default to mail-citation-prefix-regexp + always. + (message-sendmail-envelope-from): Comment fix. + (message-yank-prefix): Default to mail-yank-prefix always. + (message-indentation-spaces): Default to mail-indentation-spaces always. + (message-signature-file): Default to mail-signature-file always. + 2010-09-27 Lars Magne Ingebrigtsen * gnus-sum.el (gnus-summary-read-group-1): Set gnus-newsgroup-highest. === modified file 'lisp/gnus/message.el' --- lisp/gnus/message.el 2010-09-26 14:35:50 +0000 +++ lisp/gnus/message.el 2010-09-28 02:13:41 +0000 @@ -160,8 +160,6 @@ :type 'regexp) (defcustom message-from-style mail-from-style -;; Default to the value of `mail-from-style', available in all Emacsen -;; that Gnus supports. "*Specifies how \"From\" headers look. If nil, they contain just the return address like: @@ -446,8 +444,6 @@ :group 'message-various) (defcustom message-interactive mail-interactive -;; Default to the value of `mail-interactive', available in all Emacsen -;; that Gnus supports. "Non-nil means when sending a message wait for and display errors. A value of nil means let mailer mail back a message to report errors." :version "23.2" @@ -625,22 +621,7 @@ :link '(custom-manual "(message)Insertion Variables") :type 'regexp) -(defcustom message-cite-prefix-regexp - (if (string-match "[[:digit:]]" "1") - ;; Support POSIX? XEmacs 21.5.27 doesn't. - "\\([ \t]*[_.[:word:]]+>+\\|[ \t]*[]>|]\\)+" - ;; ?-, ?_ or ?. MUST NOT be in syntax entry w. - (let (non-word-constituents) - (with-syntax-table text-mode-syntax-table - (setq non-word-constituents - (concat - (if (string-match "\\w" "_") "" "_") - (if (string-match "\\w" ".") "" ".")))) - (if (equal non-word-constituents "") - "\\([ \t]*\\(\\w\\)+>+\\|[ \t]*[]>|]\\)+" - (concat "\\([ \t]*\\(\\w\\|[" - non-word-constituents - "]\\)+>+\\|[ \t]*[]>|]\\)+")))) +(defcustom message-cite-prefix-regexp mail-citation-prefix-regexp "*Regexp matching the longest possible citation prefix on a line." :version "24.1" :group 'message-insertion @@ -834,9 +815,7 @@ :type 'boolean) (defcustom message-sendmail-envelope-from - ;; Default to the value of `mail-envelope-from' if available. - ;; Note: as for Emacsen that Gnus supports, except for SXEmacs, it is - ;; unavailable unless sendmail.el is loaded. + ;; `mail-envelope-from' is unavailable unless sendmail.el is loaded. (if (boundp 'mail-envelope-from) mail-envelope-from) "*Envelope-from when sending mail with sendmail. If this is nil, use `user-mail-address'. If it is the symbol @@ -1014,10 +993,7 @@ :version "23.1" ;; No Gnus :group 'message-insertion) -(defcustom message-yank-prefix - ;; Default to the value of `mail-yank-prefix' if available. - ;; Note: as for Emacs 21, it is unavailable unless sendmail.el is loaded. - (if (boundp 'mail-yank-prefix) mail-yank-prefix "> ") +(defcustom message-yank-prefix mail-yank-prefix "*Prefix inserted on the lines of yanked messages. Fix `message-cite-prefix-regexp' if it is set to an abnormal value. See also `message-yank-cited-prefix' and `message-yank-empty-prefix'." @@ -1043,11 +1019,7 @@ :link '(custom-manual "(message)Insertion Variables") :group 'message-insertion) -(defcustom message-indentation-spaces - ;; Default to the value of `mail-indentation-spaces' if available. - ;; Note: as for Emacs 21, XEmacs 21.4 and 21.5, it is unavailable - ;; unless sendmail.el is loaded. - (if (boundp 'mail-indentation-spaces) mail-indentation-spaces 3) +(defcustom message-indentation-spaces mail-indentation-spaces "*Number of spaces to insert at the beginning of each cited line. Used by `message-yank-original' via `message-yank-cite'." :version "23.2" @@ -1078,8 +1050,6 @@ :group 'message-insertion) (defcustom message-signature mail-signature - ;; Default to the value of `mail-signature', available in all Emacsen - ;; that Gnus supports. "*String to be inserted at the end of the message buffer. If t, the `message-signature-file' file will be inserted instead. If a function, the result from the function will be used instead. @@ -1089,11 +1059,7 @@ :link '(custom-manual "(message)Insertion Variables") :group 'message-insertion) -(defcustom message-signature-file - ;; Default to the value of `mail-signature-file' if available. - ;; Note: as for Emacs 21, XEmacs 21.4 and 21.5, it is unavailable - ;; unless sendmail.el is loaded. - (if (boundp 'mail-signature-file) mail-signature-file "~/.signature") +(defcustom message-signature-file mail-signature-file "*Name of file containing the text inserted at end of message buffer. Ignored if the named file doesn't exist. If nil, don't insert a signature. === modified file 'lisp/mail/sendmail.el' --- lisp/mail/sendmail.el 2010-09-20 11:20:38 +0000 +++ lisp/mail/sendmail.el 2010-09-28 02:13:41 +0000 @@ -285,14 +285,14 @@ ;;;###autoload (defcustom mail-citation-prefix-regexp - (purecopy "\\([ \t]*\\(\\w\\|[_.]\\)+>+\\|[ \t]*[]>|}]\\)+") + (purecopy "\\([ \t]*\\(\\w\\|[_.]\\)+>+\\|[ \t]*[]>|]\\)+") "Regular expression to match a citation prefix plus whitespace. It should match whatever sort of citation prefixes you want to handle, with whitespace before and after; it should also match just whitespace. The default value matches citations like `foo-bar>' plus whitespace." :type 'regexp :group 'sendmail - :version "20.3") + :version "24.1") (defvar mail-abbrevs-loaded nil) (defvar mail-mode-map ------------------------------------------------------------ revno: 101656 committer: Juanma Barranquero branch nick: trunk timestamp: Tue 2010-09-28 02:55:08 +0200 message: nt/*.c: Use const char*; remove unused code. * addpm.c (entry, add_registry, main): * addsection.c (file_data, open_input_file, open_output_file) (find_section, PTR_TO_OFFSET, copy_executable_and_add_section) (COPY_CHUNK): * cmdproxy.c (vfprintf, fprintf, printf, fail, warn, skip_space) (skip_nonspace, get_next_token, search_dir, make_absolute) (spawn, main): * preprep.c (file_data, open_input_file, open_output_file) (open_inout_file, find_section, PTR_TO_OFFSET, COPY_CHUNK, main): Use const char*. * cmdproxy.c (stdin): Don't define, not used. (main): Don't assign remlen after last use. diff: === modified file 'nt/ChangeLog' --- nt/ChangeLog 2010-09-22 23:14:00 +0000 +++ nt/ChangeLog 2010-09-28 00:55:08 +0000 @@ -1,3 +1,19 @@ +2010-09-28 Juanma Barranquero + + * addpm.c (entry, add_registry, main): + * addsection.c (file_data, open_input_file, open_output_file) + (find_section, PTR_TO_OFFSET, copy_executable_and_add_section) + (COPY_CHUNK): + * cmdproxy.c (vfprintf, fprintf, printf, fail, warn, skip_space) + (skip_nonspace, get_next_token, search_dir, make_absolute) + (spawn, main): + * preprep.c (file_data, open_input_file, open_output_file) + (open_inout_file, find_section, PTR_TO_OFFSET, COPY_CHUNK, main): + Use const char*. + + * cmdproxy.c (stdin): Don't define, not used. + (main): Don't assign remlen after last use. + 2010-09-22 Juanma Barranquero * configure.bat: Err out when the argument of --cflags contains === modified file 'nt/addpm.c' --- nt/addpm.c 2010-08-19 16:38:41 +0000 +++ nt/addpm.c 2010-09-28 00:55:08 +0000 @@ -67,8 +67,8 @@ static struct entry { - char *name; - char *value; + const char *name; + const char *value; } env_vars[] = { @@ -85,7 +85,7 @@ }; BOOL -add_registry (char *path) +add_registry (const char *path) { HKEY hrootkey = NULL; int i; @@ -178,7 +178,7 @@ for (i = 0; i < (sizeof (env_vars) / sizeof (env_vars[0])); i++) { - char * value = env_vars[i].value ? env_vars[i].value : path; + const char * value = env_vars[i].value ? env_vars[i].value : path; if (RegSetValueEx (hrootkey, env_vars[i].name, 0, REG_EXPAND_SZ, @@ -198,8 +198,8 @@ int shortcuts_created = 0; int com_available = 1; char modname[MAX_PATH]; - char *prog_name; - char *emacs_path; + const char *prog_name; + const char *emacs_path; char *p; int quiet = 0; HRESULT result; === modified file 'nt/addsection.c' --- nt/addsection.c 2010-01-13 08:35:10 +0000 +++ nt/addsection.c 2010-09-28 00:55:08 +0000 @@ -37,9 +37,9 @@ PIMAGE_NT_HEADERS (__stdcall * pfnCheckSumMappedFile) (LPVOID BaseAddress, - DWORD FileLength, - LPDWORD HeaderSum, - LPDWORD CheckSum); + DWORD FileLength, + LPDWORD HeaderSum, + LPDWORD CheckSum); #undef min #undef max @@ -50,15 +50,15 @@ /* File handling. */ typedef struct file_data { - char *name; - unsigned long size; - HANDLE file; - HANDLE file_mapping; - unsigned char *file_base; + const char *name; + unsigned long size; + HANDLE file; + HANDLE file_mapping; + unsigned char *file_base; } file_data; int -open_input_file (file_data *p_file, char *filename) +open_input_file (file_data *p_file, const char *filename) { HANDLE file; HANDLE file_mapping; @@ -90,7 +90,7 @@ } int -open_output_file (file_data *p_file, char *filename, unsigned long size) +open_output_file (file_data *p_file, const char *filename, unsigned long size) { HANDLE file; HANDLE file_mapping; @@ -146,7 +146,7 @@ /* Return pointer to section header for named section. */ IMAGE_SECTION_HEADER * -find_section (char * name, IMAGE_NT_HEADERS * nt_header) +find_section (const char *name, IMAGE_NT_HEADERS *nt_header) { PIMAGE_SECTION_HEADER section; int i; @@ -260,7 +260,7 @@ #define PTR_TO_RVA(ptr) ((DWORD)(ptr) - (DWORD) GetModuleHandle (NULL)) #define PTR_TO_OFFSET(ptr, pfile_data) \ - ((unsigned char *)(ptr) - (pfile_data)->file_base) + ((unsigned const char *)(ptr) - (pfile_data)->file_base) #define OFFSET_TO_PTR(offset, pfile_data) \ ((pfile_data)->file_base + (DWORD)(offset)) @@ -272,7 +272,7 @@ static void copy_executable_and_add_section (file_data *p_infile, file_data *p_outfile, - char *new_section_name, + const char *new_section_name, DWORD new_section_size) { unsigned char *dst; @@ -287,7 +287,7 @@ #define COPY_CHUNK(message, src, size, verbose) \ do { \ - unsigned char *s = (void *)(src); \ + unsigned const char *s = (void *)(src); \ unsigned long count = (size); \ if (verbose) \ { \ === modified file 'nt/cmdproxy.c' --- nt/cmdproxy.c 2010-08-08 21:12:29 +0000 +++ nt/cmdproxy.c 2010-09-28 00:55:08 +0000 @@ -43,12 +43,11 @@ /* These routines are used primarily to minimize the executable size. */ -#define stdin GetStdHandle (STD_INPUT_HANDLE) #define stdout GetStdHandle (STD_OUTPUT_HANDLE) #define stderr GetStdHandle (STD_ERROR_HANDLE) int -vfprintf(HANDLE hnd, char * msg, va_list args) +vfprintf (HANDLE hnd, const char * msg, va_list args) { DWORD bytes_written; char buf[1024]; @@ -58,7 +57,7 @@ } int -fprintf(HANDLE hnd, char * msg, ...) +fprintf (HANDLE hnd, const char * msg, ...) { va_list args; int rc; @@ -71,7 +70,7 @@ } int -printf(char * msg, ...) +printf (const char * msg, ...) { va_list args; int rc; @@ -84,7 +83,7 @@ } void -fail (char * msg, ...) +fail (const char * msg, ...) { va_list args; @@ -96,7 +95,7 @@ } void -warn (char * msg, ...) +warn (const char * msg, ...) { va_list args; @@ -122,15 +121,15 @@ return fname; } -char * -skip_space (char *str) +const char * +skip_space (const char *str) { while (isspace (*str)) str++; return str; } -char * -skip_nonspace (char *str) +const char * +skip_nonspace (const char *str) { while (*str && !isspace (*str)) str++; return str; @@ -140,9 +139,9 @@ /* Get next token from input, advancing pointer. */ int -get_next_token (char * buf, char ** pSrc) +get_next_token (char * buf, const char ** pSrc) { - char * p = *pSrc; + const char * p = *pSrc; char * o = buf; p = skip_space (p); @@ -209,7 +208,7 @@ else { /* Next token is delimited by whitespace. */ - char * p1 = skip_nonspace (p); + const char * p1 = skip_nonspace (p); memcpy (o, p, p1 - p); o += (p1 - p); *o = '\0'; @@ -224,9 +223,9 @@ /* Search for EXEC file in DIR. If EXEC does not have an extension, DIR is searched for EXEC with the standard extensions appended. */ int -search_dir (char *dir, char *exec, int bufsize, char *buffer) +search_dir (const char *dir, const char *exec, int bufsize, char *buffer) { - char *exts[] = {".bat", ".cmd", ".exe", ".com"}; + const char *exts[] = {".bat", ".cmd", ".exe", ".com"}; int n_exts = sizeof (exts) / sizeof (char *); char *dummy; int i, rc; @@ -246,13 +245,13 @@ any file extensions. If an absolute name for PROG cannot be found, return NULL. */ char * -make_absolute (char *prog) +make_absolute (const char *prog) { char absname[MAX_PATH]; char dir[MAX_PATH]; char curdir[MAX_PATH]; - char *p, *fname; - char *path; + char *p, *path; + const char *fname; int i; /* At least partial absolute path specified; search there. */ @@ -372,7 +371,7 @@ /* Change from normal usage; return value indicates whether spawn succeeded or failed - program return code is returned separately. */ int -spawn (char * progname, char * cmdline, char * dir, int * retcode) +spawn (const char *progname, char *cmdline, const char *dir, int *retcode) { BOOL success = FALSE; SECURITY_ATTRIBUTES sec_attrs; @@ -470,8 +469,8 @@ /* Due to problems with interaction between API functions that use "OEM" codepage vs API functions that use the "ANSI" codepage, we need to make things consistent by choosing one and sticking with it. */ - SetConsoleCP (GetACP()); - SetConsoleOutputCP (GetACP()); + SetConsoleCP (GetACP ()); + SetConsoleOutputCP (GetACP ()); /* Although Emacs always sets argv[0] to an absolute pathname, we might get run in other ways as well, so convert argv[0] to an @@ -509,7 +508,7 @@ /* Ask command.com to create an environment block with a reasonable amount of free space. */ envsize = get_env_size () + 300; - pass_through_args = (char **) alloca (argc * sizeof(char *)); + pass_through_args = (char **) alloca (argc * sizeof (char *)); num_pass_through_args = 0; while (--argc > 0) @@ -583,7 +582,7 @@ if (strpbrk (cmdline, copout_chars) == NULL) { - char *args; + const char *args; /* The program name is the first token of cmdline. Since filenames cannot legally contain embedded quotes, the value @@ -659,7 +658,6 @@ _snprintf (p, remlen, " /e:%d /c %s", envsize, cmdline); else _snprintf (p, remlen, " /c %s", cmdline); - remlen = maxlen - (p - buf); cmdline = buf; } else @@ -696,10 +694,7 @@ } if (run_command_dot_com) - { - _snprintf (p, remlen, " /e:%d", envsize); - remlen = maxlen - (p - cmdline); - } + _snprintf (p, remlen, " /e:%d", envsize); } } === modified file 'nt/preprep.c' --- nt/preprep.c 2010-01-13 08:35:10 +0000 +++ nt/preprep.c 2010-09-28 00:55:08 +0000 @@ -1,4 +1,4 @@ -/* Pro-process emacs.exe for profiling by MSVC. +/* Pre-process emacs.exe for profiling by MSVC. Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. @@ -37,9 +37,9 @@ PIMAGE_NT_HEADERS (__stdcall * pfnCheckSumMappedFile) (LPVOID BaseAddress, - DWORD FileLength, - LPDWORD HeaderSum, - LPDWORD CheckSum); + DWORD FileLength, + LPDWORD HeaderSum, + LPDWORD CheckSum); #undef min #undef max @@ -50,15 +50,15 @@ /* File handling. */ typedef struct file_data { - char *name; - unsigned long size; - HANDLE file; - HANDLE file_mapping; - unsigned char *file_base; + const char *name; + unsigned long size; + HANDLE file; + HANDLE file_mapping; + unsigned char *file_base; } file_data; int -open_input_file (file_data *p_file, char *filename) +open_input_file (file_data *p_file, const char *filename) { HANDLE file; HANDLE file_mapping; @@ -90,7 +90,7 @@ } int -open_output_file (file_data *p_file, char *filename, unsigned long size) +open_output_file (file_data *p_file, const char *filename, unsigned long size) { HANDLE file; HANDLE file_mapping; @@ -120,7 +120,7 @@ } int -open_inout_file (file_data *p_file, char *filename) +open_inout_file (file_data *p_file, const char *filename) { HANDLE file; HANDLE file_mapping; @@ -178,7 +178,7 @@ /* Return pointer to section header for named section. */ IMAGE_SECTION_HEADER * -find_section (char * name, IMAGE_NT_HEADERS * nt_header) +find_section (const char *name, IMAGE_NT_HEADERS *nt_header) { PIMAGE_SECTION_HEADER section; int i; @@ -295,7 +295,7 @@ #define PTR_TO_RVA(ptr) ((DWORD)(ptr) - (DWORD) GetModuleHandle (NULL)) #define PTR_TO_OFFSET(ptr, pfile_data) \ - ((unsigned char *)(ptr) - (pfile_data)->file_base) + ((unsigned const char *)(ptr) - (pfile_data)->file_base) #define OFFSET_TO_PTR(offset, pfile_data) \ ((pfile_data)->file_base + (DWORD)(offset)) @@ -361,7 +361,7 @@ #define COPY_CHUNK(message, src, size) \ do { \ - unsigned char *s = (void *)(src); \ + unsigned const char *s = (void *)(src); \ unsigned long count = (size); \ printf ("%s\n", (message)); \ printf ("\t0x%08x Offset in input file.\n", s - p_infile->file_base); \ @@ -766,7 +766,7 @@ PIMAGE_NT_HEADERS nt_header; file_data in_file, out_file; char out_filename[MAX_PATH], in_filename[MAX_PATH]; - char *ptr; + const char *ptr; strcpy (in_filename, argv[1]); strcpy (out_filename, argv[2]); ------------------------------------------------------------ revno: 101655 [merge] committer: Juanma Barranquero branch nick: trunk timestamp: Tue 2010-09-28 01:25:27 +0200 message: Merge changes from emacs-23 branch. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-09-27 20:11:33 +0000 +++ lisp/ChangeLog 2010-09-27 23:25:27 +0000 @@ -1,3 +1,24 @@ +2010-09-27 Andreas Schwab + + * emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): + Avoid infinite recursion on erroneous lambda form. (Bug#7114) + +2010-09-27 Kenichi Handa + + * tar-mode.el (tar-header-block-tokenize): Decode filenames in + "ustar" format. + +2010-09-27 Kenichi Handa + + * international/mule.el (define-coding-system): Docstring fixed. + + * international/mule-diag.el (describe-character-set): Use princ + with proper print-length and print-level instead of insert. + +2010-09-27 Juanma Barranquero + + * window.el (walk-windows): Doc fix (bug#7105). + 2010-09-27 Stefan Monnier * emacs-lisp/float-sup.el (e): Remove. @@ -1304,8 +1325,8 @@ Setup standard-display-table for 8-bit characters by storing 8-bit characters in the element vector. - * disp-table.el (standard-display-8bit): Setup - standard-display-table for 8-bit characters by storing 8-bit + * disp-table.el (standard-display-8bit): + Setup standard-display-table for 8-bit characters by storing 8-bit characters in the element vector. (standard-display-european): Likewise. @@ -1570,8 +1591,8 @@ (tramp-compat-file-attributes): Handle only `wrong-number-of-arguments' error. - * net/tramp-fish.el (tramp-fish-handle-copy-file): Add - PRESERVE_SELINUX_CONTEXT. + * net/tramp-fish.el (tramp-fish-handle-copy-file): + Add PRESERVE_SELINUX_CONTEXT. (tramp-fish-handle-delete-file): Add TRASH arg. (tramp-fish-handle-directory-files-and-attributes): Do not use `tramp-fish-handle-file-attributes. @@ -1589,8 +1610,8 @@ (with-tramp-dbus-call-method): Format trace message. (tramp-gvfs-handle-copy-file): Handle PRESERVE-SELINUX-CONTEXT. (tramp-gvfs-handle-copy-file, tramp-gvfs-handle-rename-file): - Implement backup call, when operation on local files fails. Use - progress reporter. Flush properties of changed files. + Implement backup call, when operation on local files fails. + Use progress reporter. Flush properties of changed files. (tramp-gvfs-handle-delete-file): Add TRASH arg. Use `tramp-compat-delete-file'. (tramp-gvfs-handle-expand-file-name): Expand "~/". @@ -1601,12 +1622,12 @@ into account for the resulting file name. (tramp-gvfs-handler-askquestion): Preserve current message, in order to let progress reporter continue afterwards. (Bug#6257) - Return dummy mountpoint, when the answer is "no". See - `tramp-gvfs-maybe-open-connection'. + Return dummy mountpoint, when the answer is "no". + See `tramp-gvfs-maybe-open-connection'. (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p): Test also for new mountspec - attribute "default_location". Set "prefix" property. Handle - default-location. + attribute "default_location". Set "prefix" property. + Handle default-location. (tramp-gvfs-mount-spec): Return both prefix and mountspec. (tramp-gvfs-maybe-open-connection): Test, whether mountpoint exists. Raise an error, if not (due to a corresponding answer @@ -1620,8 +1641,8 @@ (tramp-imap-handle-file-local-copy): Use `with-progress-reporter'. (tramp-imap-handle-delete-file): Add TRASH arg. - * net/tramp-smb.el (tramp-smb-handle-copy-file): Add - PRESERVE-SELINUX-CONTEXT. + * net/tramp-smb.el (tramp-smb-handle-copy-file): + Add PRESERVE-SELINUX-CONTEXT. (tramp-smb-handle-copy-file) (tramp-smb-handle-file-local-copy, tramp-smb-handle-rename-file) (tramp-smb-handle-write-region, tramp-smb-maybe-open-connection): @@ -1688,8 +1709,8 @@ (tramp-get-remote-path): Use `copy-tree'. (tramp-completion-handle-file-name-all-completions): Ensure, that non remote files are still checked. Oops. - (tramp-handle-copy-file, tramp-do-copy-or-rename-file): Handle - PRESERVE-SELINUX-CONTEXT. + (tramp-handle-copy-file, tramp-do-copy-or-rename-file): + Handle PRESERVE-SELINUX-CONTEXT. (tramp-do-copy-or-rename-file): Add progress reporter. (tramp-do-copy-or-rename-file-directly): Do not use `tramp-handle-file-remote-p'. @@ -1703,8 +1724,8 @@ cache. (tramp-handle-expand-file-name) (tramp-completion-handle-file-name-all-completions) - (tramp-completion-handle-file-name-completion): Use - `tramp-connectable-p'. + (tramp-completion-handle-file-name-completion): + Use `tramp-connectable-p'. (tramp-handle-start-file-process): Set connection property "vec". Use it, in order to invalidate file caches. Check only for `remote-tty' process property. @@ -3219,8 +3240,7 @@ 2010-07-03 Michael Albinus * net/zeroconf.el (zeroconf-resolve-service) - (zeroconf-service-resolver-handler): Use - `dbus-byte-array-to-string'. + (zeroconf-service-resolver-handler): Use `dbus-byte-array-to-string'. (zeroconf-publish-service): Use `dbus-string-to-byte-array'. 2010-07-03 Jan Moringen @@ -3382,8 +3402,7 @@ * emacs-lisp/package-x.el: New file. Package uploading functionality split out from package.el. - * startup.el (command-line): Load packages after reading init - file. + * startup.el (command-line): Load packages after reading init file. 2010-06-17 Tom Tromey @@ -3434,8 +3453,8 @@ 2010-06-21 Dan Nicolaescu Fix reading file names in Git annotate buffers. - * vc/vc-git.el (vc-git-annotate-extract-revision-at-line): Remove - trailing whitespace. Suggested by Eric Hanchrow. (Bug#6481) + * vc/vc-git.el (vc-git-annotate-extract-revision-at-line): + Remove trailing whitespace. Suggested by Eric Hanchrow. (Bug#6481) 2010-06-20 Alan Mackenzie @@ -6228,10 +6247,6 @@ * net/trampver.el: Update release number. -2010-03-24 Glenn Morris - - * Makefile.in (ELCFILES): Add cedet/semantic/imenu.el. - 2010-03-24 Michael Albinus * net/tramp.el (tramp-find-executable): === modified file 'lisp/emacs-lisp/byte-opt.el' --- lisp/emacs-lisp/byte-opt.el 2010-08-29 16:17:13 +0000 +++ lisp/emacs-lisp/byte-opt.el 2010-09-27 23:25:27 +0000 @@ -382,9 +382,11 @@ form)) ((or (byte-code-function-p fn) (eq 'lambda (car-safe fn))) - (byte-optimize-form-code-walker - (byte-compile-unfold-lambda form) - for-effect)) + (let ((newform (byte-compile-unfold-lambda form))) + (if (eq newform form) + ;; Some error occured, avoid infinite recursion + form + (byte-optimize-form-code-walker newform for-effect)))) ((memq fn '(let let*)) ;; recursively enter the optimizer for the bindings and body ;; of a let or let*. This for depth-firstness: forms that === modified file 'lisp/international/mule-diag.el' --- lisp/international/mule-diag.el 2010-01-13 08:35:10 +0000 +++ lisp/international/mule-diag.el 2010-09-27 04:52:56 +0000 @@ -368,7 +368,8 @@ (when val (if (cadr elt) (insert (cadr elt))) (if (nth 2 elt) - (insert (funcall (nth 2 elt) val))) + (let ((print-length 10) (print-level 2)) + (princ (funcall (nth 2 elt) val) (current-buffer)))) (insert ?\n))))))) ;;; CODING-SYSTEM === modified file 'lisp/international/mule.el' --- lisp/international/mule.el 2010-09-25 21:42:48 +0000 +++ lisp/international/mule.el 2010-09-27 23:25:27 +0000 @@ -635,18 +635,19 @@ VALUE must be a function to call after some text is inserted and decoded by the coding system itself and before any functions in -`after-insert-functions' are called. The arguments to this function -are the same as those of a function in `after-insert-file-functions', -i.e. LENGTH of the text to be decoded with point at the head of it, -and the function should leave point unchanged. +`after-insert-functions' are called. This function is passed one +argument; the number of characters in the text to convert, with +point at the start of the text. The function should leave point +the same, and return the new character count. `:pre-write-conversion' VALUE must be a function to call after all functions in -`write-region-annotate-functions' and `buffer-file-format' are called, -and before the text is encoded by the coding system itself. The -arguments to this function are the same as those of a function in -`write-region-annotate-functions'. +`write-region-annotate-functions' and `buffer-file-format' are +called, and before the text is encoded by the coding system +itself. This function should convert the whole text in the +current buffer. For backward compatibility, this funciton is +passed two arguments which can be ignored. `:default-char' === modified file 'lisp/tar-mode.el' --- lisp/tar-mode.el 2010-05-03 02:29:46 +0000 +++ lisp/tar-mode.el 2010-09-27 23:25:27 +0000 @@ -285,7 +285,8 @@ (let* ((size (tar-parse-octal-integer string tar-size-offset tar-time-offset)) ;; -1 so as to strip the terminating 0 byte. - (name (buffer-substring pos (+ pos size -1))) + (name (decode-coding-string + (buffer-substring pos (+ pos size -1)) coding)) (descriptor (tar-header-block-tokenize (+ pos (tar-roundup-512 size)) coding))) === modified file 'lisp/window.el' --- lisp/window.el 2010-08-30 13:03:05 +0000 +++ lisp/window.el 2010-09-27 23:25:27 +0000 @@ -162,8 +162,8 @@ which you entered the minibuffer, as well as the minibuffer window. -ALL-FRAMES nil or omitted means cycle through all windows on - WINDOW's frame, plus the minibuffer window if specified by the +ALL-FRAMES nil or omitted means cycle through all windows on the + selected frame, plus the minibuffer window if specified by the MINIBUF argument, see above. If the minibuffer counts, cycle through all windows on all frames that share that minibuffer too. @@ -175,8 +175,8 @@ iconified frames. ALL-FRAMES a frame means cycle through all windows on that frame only. -Anything else means cycle through all windows on WINDOW's frame - and no others. +Anything else means cycle through all windows on the selected + frame and no others. This function changes neither the order of recently selected windows nor the buffer list." === modified file 'src/ChangeLog' --- src/ChangeLog 2010-09-27 20:43:03 +0000 +++ src/ChangeLog 2010-09-27 23:25:27 +0000 @@ -1,5 +1,13 @@ +2010-09-27 Michael Albinus + + * dbusbind.c (syms_of_dbusbind): Set $DBUS_FATAL_WARNINGS to "0". + (Bug#7113) + 2010-09-27 Jan Djärv + * xgselect.c (xg_select): Clear file descriptors not set from + rfds and wfds. + * process.c (wait_reading_process_output): Add missing FD_CLR for write_mask (must mirror connect_wait_mask). === modified file 'src/dbusbind.c' --- src/dbusbind.c 2010-09-27 15:34:04 +0000 +++ src/dbusbind.c 2010-09-27 23:25:27 +0000 @@ -2161,8 +2161,12 @@ doc: /* If non-nil, debug messages of D-Bus bindings are raised. */); #ifdef DBUS_DEBUG Vdbus_debug = Qt; + /* We can also set environment DBUS_VERBOSE=1 in order to see more + traces. */ #else Vdbus_debug = Qnil; + /* We do not want to abort. */ + setenv ("DBUS_FATAL_WARNINGS", "0", 1); #endif Fprovide (intern_c_string ("dbusbind"), Qnil); === modified file 'src/xgselect.c' --- src/xgselect.c 2010-07-04 13:41:55 +0000 +++ src/xgselect.c 2010-09-27 23:25:27 +0000 @@ -109,11 +109,17 @@ if (rfds && FD_ISSET (i, rfds)) ++retval; else ++our_fds; } + else if (rfds) + FD_CLR (i, rfds); + if (have_wfds && FD_ISSET (i, &all_wfds)) { if (wfds && FD_ISSET (i, wfds)) ++retval; else ++our_fds; } + else if (wfds) + FD_CLR (i, wfds); + if (efds && FD_ISSET (i, efds)) ++retval; } ------------------------------------------------------------ revno: 101654 author: Gnus developers committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2010-09-27 23:07:47 +0000 message: Merge changes made in Gnus trunk. sieve-manage.el (sieve-manage-default-stream): Make default stream customizable. nnimap.el (nnimap-request-accept-article): Send a "." at the end, which may or may not help. nnimap.el (nnimap-open-connection): Have the `network' nnimap connection use STARTTLS opportunistically. gnus-sum.el (gnus-summary-insert-new-articles): Copy the old-high watermark so that nothing alters it while scanning for new messages. nnimap.el (nnimap-request-accept-article): Remove the "." at the end, since some servers don't like it. nnimap.el (nnimap-open-connection): Forget credentials if the server says the password was wrong. nnimap.el (nnimap-parse-line): Protect against invalid data. gnus-art.el, gnus-sum.el, nnimap.el: Allow setting the partial fetch per server instead of globally. message.el (message-cite-prefix-regexp): Revert last edit. nnmairix.el: Make it work with latest changes in nnimap. gnus-sum.el (gnus-summary-move-article): Don't alter gnus-newsgroup-active. gnus-sum.el (gnus-summary-exit): Kill the article buffer later, so that you don't get flashes of other buffers. nnimap.el: Fix up partial nnimap fetching. gnus-sum.el: Rework the `/ N' based on the new gnus-newsgroup-highest variable. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-09-27 13:22:21 +0000 +++ lisp/gnus/ChangeLog 2010-09-27 23:07:47 +0000 @@ -1,5 +1,64 @@ 2010-09-27 Lars Magne Ingebrigtsen + * gnus-sum.el (gnus-summary-read-group-1): Set gnus-newsgroup-highest. + (gnus-summary-insert-new-articles): Use gnus-newsgroup-highest to get + new articles. + + * nnimap.el (nnimap-request-article): Don't partial-fetch single-part + parts. + (nnimap-request-article): Work with the t setting, too. + + * gnus-sum.el (gnus-summary-exit): Kill the article buffer later, so + that you don't get flashes of other buffers. + (gnus-summary-show-complete-article): Intern before setting. + +2010-09-27 David Engster + + * nnmairix.el: (nnmairix-replace-group-and-numbers): Deal with NOV as + well as HEADERS. + (nnmairix-retrieve-headers): Provide new argument for the above. + +2010-09-27 Lars Magne Ingebrigtsen + + * gnus-sum.el (gnus-summary-move-article): Don't alter + gnus-newsgroup-active. This makes `/ N' work after copying to the same + group. + + * nnimap.el (nnimap-update-info): Don't destructively alter active. + + * message.el (message-cite-prefix-regexp): Revert my last edit. + + * gnus-sum.el (gnus-summary-show-complete-article): Bind the server + variable instead of the Gnus variable. + + * nnimap.el (nnimap-find-wanted-parts-1): Use it. + + * gnus-art.el (gnus-fetch-partial-articles): Moved back to nnimap + again. + + * nnimap.el (nnimap-request-accept-article): Remove the "." at the end, + since some servers don't like it. + (nnimap-open-connection): Forget credentials if the server says the + password was wrong. + (nnimap-parse-line): Protect against invalid data. + + * gnus-sum.el (gnus-summary-move-article): Add comment. + (gnus-summary-insert-new-articles): Copy the old-high watermark so that + nothing alters it while scanning for new messages. + + * nnimap.el (nnimap-request-accept-article): Send a "." at the end, + which may or may not help. + (nnimap-open-connection): If we're doing a stream connection, and then + discover we're on a STARTTLS-capable server, then open a STARTTLS + connection instead. + +2010-09-27 Florian Ragwitz (tiny change) + + * sieve-manage.el (sieve-manage-default-stream): Make default stream + customizable. + +2010-09-27 Lars Magne Ingebrigtsen + * nnimap.el (utf7): Required. * message.el (message-cite-prefix-regexp): Remove "}" from citation @@ -18,7 +77,7 @@ * gnus-art.el (gnus-mime-delete-part): Fix Lisp type of byte(s). -2010-09-26 Florian Ragwitz +2010-09-26 Florian Ragwitz (tiny change) * gnus-html.el (gnus-html-wash-tags): Decode URL entities to avoid handing broken links to browse-url. === modified file 'lisp/gnus/gnus-art.el' --- lisp/gnus/gnus-art.el 2010-09-27 03:16:55 +0000 +++ lisp/gnus/gnus-art.el 2010-09-27 23:07:47 +0000 @@ -257,22 +257,6 @@ (regexp :value ".*")) :group 'gnus-article-signature) -(defcustom gnus-fetch-partial-articles nil - "If non-nil, Gnus will fetch partial articles. -If t, nnimap will fetch only the first part. If a string, it -will fetch all parts that have types that match that string. A -likely value would be \"text/\" to automatically fetch all -textual parts. - -Currently only the nnimap backend actually supports partial -article fetching. If the backend doesn't support it, it has no -effect." - :version "24.1" - :type '(choice (const nil) - (const t) - (regexp)) - :group 'gnus-article) - (defcustom gnus-hidden-properties '(invisible t intangible t) "Property list to use for hiding text." :type 'sexp === modified file 'lisp/gnus/gnus-sum.el' --- lisp/gnus/gnus-sum.el 2010-09-26 12:47:09 +0000 +++ lisp/gnus/gnus-sum.el 2010-09-27 23:07:47 +0000 @@ -1431,6 +1431,7 @@ (defvar gnus-newsgroup-last-directory nil) (defvar gnus-newsgroup-auto-expire nil) (defvar gnus-newsgroup-active nil) +(defvar gnus-newsgroup-highest nil) (defvar gnus-newsgroup-data nil) (defvar gnus-newsgroup-data-reverse nil) @@ -1582,6 +1583,7 @@ (gnus-summary-mark-below . global) (gnus-orphan-score . global) gnus-newsgroup-active gnus-scores-exclude-files + gnus-newsgroup-highest gnus-newsgroup-history gnus-newsgroup-ancient gnus-newsgroup-sparse gnus-newsgroup-process-stack (gnus-newsgroup-adaptive . gnus-use-adaptive-scoring) @@ -3957,6 +3959,7 @@ (setq gnus-newsgroup-active (gnus-copy-sequence (gnus-active gnus-newsgroup-name))) + (setq gnus-newsgroup-highest (cdr gnus-newsgroup-active)) ;; You can change the summary buffer in some way with this hook. (gnus-run-hooks 'gnus-select-group-hook) (when (memq 'summary (gnus-update-format-specifications @@ -7090,15 +7093,6 @@ (when gnus-use-scoring (gnus-score-save))) (gnus-run-hooks 'gnus-summary-prepare-exit-hook) - ;; If we have several article buffers, we kill them at exit. - (unless gnus-single-article-buffer - (when (gnus-buffer-live-p gnus-article-buffer) - (with-current-buffer gnus-article-buffer - ;; Don't kill sticky article buffers - (unless (eq major-mode 'gnus-sticky-article-mode) - (gnus-kill-buffer gnus-article-buffer) - (setq gnus-article-current nil)))) - (gnus-kill-buffer gnus-original-article-buffer)) (when gnus-use-cache (gnus-cache-possibly-remove-articles) (gnus-cache-save-buffers)) @@ -7147,6 +7141,17 @@ ;; Return to group mode buffer. (when (eq mode 'gnus-summary-mode) (gnus-kill-buffer buf))) + + ;; If we have several article buffers, we kill them at exit. + (unless gnus-single-article-buffer + (when (gnus-buffer-live-p gnus-article-buffer) + (with-current-buffer gnus-article-buffer + ;; Don't kill sticky article buffers + (unless (eq major-mode 'gnus-sticky-article-mode) + (gnus-kill-buffer gnus-article-buffer) + (setq gnus-article-current nil)))) + (gnus-kill-buffer gnus-original-article-buffer)) + (setq gnus-current-select-method gnus-select-method) (set-buffer gnus-group-buffer) (if quit-config @@ -9360,9 +9365,19 @@ (let ((gnus-keep-backlog nil) (gnus-use-cache nil) (gnus-agent nil) - (gnus-fetch-partial-articles nil)) - (gnus-flush-original-article-buffer) - (gnus-summary-show-article))) + (variable (intern + (format "%s-fetch-partial-articles" + (car (gnus-find-method-for-group + gnus-newsgroup-name))) + obarray)) + old-val) + (unwind-protect + (progn + (setq old-val (symbol-value variable)) + (set variable nil) + (gnus-flush-original-article-buffer) + (gnus-summary-show-article)) + (set variable old-val)))) (defun gnus-summary-show-article (&optional arg) "Force redisplaying of the current article. @@ -9797,8 +9812,9 @@ (not (memq article gnus-newsgroup-unreads))) ;; Mark this article as read in this group. (push (cons to-article gnus-read-mark) gnus-newsgroup-reads) + ;; Increase the active status of this group. (setcdr (gnus-active to-group) to-article) - (setcdr gnus-newsgroup-active to-article)) + (setcdr gnus-newsgroup-active to-article)) (while marks (when (eq (gnus-article-mark-to-type (cdar marks)) 'list) @@ -12624,13 +12640,15 @@ (interactive) (prog1 (let ((old (sort (mapcar 'car gnus-newsgroup-data) '<)) - (old-active gnus-newsgroup-active) + (old-high gnus-newsgroup-highest) (nnmail-fetched-sources (list t)) i new) (setq gnus-newsgroup-active - (gnus-activate-group gnus-newsgroup-name 'scan)) - (setq i (cdr gnus-newsgroup-active)) - (while (> i (cdr old-active)) + (gnus-copy-sequence + (gnus-activate-group gnus-newsgroup-name 'scan))) + (setq i (cdr gnus-newsgroup-active) + gnus-newsgroup-highest i) + (while (> i old-high) (push i new) (decf i)) (if (not new) === modified file 'lisp/gnus/nnimap.el' --- lisp/gnus/nnimap.el 2010-09-27 13:22:21 +0000 +++ lisp/gnus/nnimap.el 2010-09-27 23:07:47 +0000 @@ -85,6 +85,13 @@ (defvoo nnimap-current-infos nil) +(defvoo nnimap-fetch-partial-articles nil + "If non-nil, Gnus will fetch partial articles. +If t, nnimap will fetch only the first part. If a string, it +will fetch all parts that have types that match that string. A +likely value would be \"text/\" to automatically fetch all +textual parts.") + (defvar nnimap-process nil) (defvar nnimap-status-string "") @@ -271,91 +278,110 @@ (unless nnimap-keepalive-timer (setq nnimap-keepalive-timer (run-at-time (* 60 15) (* 60 15) 'nnimap-keepalive))) - (with-current-buffer (nnimap-make-process-buffer buffer) - (let* ((coding-system-for-read 'binary) - (coding-system-for-write 'binary) - (port nil) - (ports - (cond - ((eq nnimap-stream 'network) - (open-network-stream - "*nnimap*" (current-buffer) nnimap-address - (setq port - (or nnimap-server-port - (if (netrc-find-service-number "imap") - "imap" - "143")))) - '("143" "imap")) - ((eq nnimap-stream 'shell) - (nnimap-open-shell-stream - "*nnimap*" (current-buffer) nnimap-address - (setq port (or nnimap-server-port "imap"))) - '("imap")) - ((eq nnimap-stream 'starttls) - (starttls-open-stream - "*nnimap*" (current-buffer) nnimap-address - (setq port (or nnimap-server-port "imap"))) - '("imap")) - ((eq nnimap-stream 'ssl) - (open-tls-stream - "*nnimap*" (current-buffer) nnimap-address - (setq port - (or nnimap-server-port - (if (netrc-find-service-number "imaps") - "imaps" - "993")))) - '("143" "993" "imap" "imaps")))) - connection-result login-result credentials) - (setf (nnimap-process nnimap-object) - (get-buffer-process (current-buffer))) - (if (not (and (nnimap-process nnimap-object) - (memq (process-status (nnimap-process nnimap-object)) - '(open run)))) - (nnheader-report 'nnimap "Unable to contact %s:%s via %s" - nnimap-address port nnimap-stream) - (gnus-set-process-query-on-exit-flag (nnimap-process nnimap-object) nil) - (if (not (setq connection-result (nnimap-wait-for-connection))) - (nnheader-report 'nnimap - "%s" (buffer-substring - (point) (line-end-position))) - (setf (nnimap-greeting nnimap-object) - (buffer-substring (line-beginning-position) - (line-end-position))) - (when (eq nnimap-stream 'starttls) - (nnimap-command "STARTTLS") - (starttls-negotiate (nnimap-process nnimap-object))) - (when nnimap-server-port - (push (format "%s" nnimap-server-port) ports)) - (unless (equal connection-result "PREAUTH") - (if (not (setq credentials - (if (eq nnimap-authenticator 'anonymous) - (list "anonymous" - (message-make-address)) - (or - ;; First look for the credentials based - ;; on the virtual server name. - (nnimap-credentials - (nnoo-current-server 'nnimap) ports t) - ;; Then look them up based on the - ;; physical address. - (nnimap-credentials nnimap-address ports))))) - (setq nnimap-object nil) - (setq login-result (nnimap-command "LOGIN %S %S" - (car credentials) - (cadr credentials))) - (unless (car login-result) - (delete-process (nnimap-process nnimap-object)) - (setq nnimap-object nil)))) - (when nnimap-object + (block nil + (with-current-buffer (nnimap-make-process-buffer buffer) + (let* ((coding-system-for-read 'binary) + (coding-system-for-write 'binary) + (port nil) + (ports + (cond + ((eq nnimap-stream 'network) + (open-network-stream + "*nnimap*" (current-buffer) nnimap-address + (setq port + (or nnimap-server-port + (if (netrc-find-service-number "imap") + "imap" + "143")))) + '("143" "imap")) + ((eq nnimap-stream 'shell) + (nnimap-open-shell-stream + "*nnimap*" (current-buffer) nnimap-address + (setq port (or nnimap-server-port "imap"))) + '("imap")) + ((eq nnimap-stream 'starttls) + (starttls-open-stream + "*nnimap*" (current-buffer) nnimap-address + (setq port (or nnimap-server-port "imap"))) + '("imap")) + ((eq nnimap-stream 'ssl) + (open-tls-stream + "*nnimap*" (current-buffer) nnimap-address + (setq port + (or nnimap-server-port + (if (netrc-find-service-number "imaps") + "imaps" + "993")))) + '("143" "993" "imap" "imaps")))) + connection-result login-result credentials) + (setf (nnimap-process nnimap-object) + (get-buffer-process (current-buffer))) + (if (not (and (nnimap-process nnimap-object) + (memq (process-status (nnimap-process nnimap-object)) + '(open run)))) + (nnheader-report 'nnimap "Unable to contact %s:%s via %s" + nnimap-address port nnimap-stream) + (gnus-set-process-query-on-exit-flag (nnimap-process nnimap-object) nil) + (if (not (setq connection-result (nnimap-wait-for-connection))) + (nnheader-report 'nnimap + "%s" (buffer-substring + (point) (line-end-position))) + ;; Store the greeting (for debugging purposes). + (setf (nnimap-greeting nnimap-object) + (buffer-substring (line-beginning-position) + (line-end-position))) + ;; Store the capabilities. (setf (nnimap-capabilities nnimap-object) (mapcar #'upcase - (or (nnimap-find-parameter "CAPABILITY" (cdr login-result)) - (nnimap-find-parameter - "CAPABILITY" (cdr (nnimap-command "CAPABILITY")))))) - (when (member "QRESYNC" (nnimap-capabilities nnimap-object)) - (nnimap-command "ENABLE QRESYNC")) - t)))))) + (nnimap-find-parameter + "CAPABILITY" (cdr (nnimap-command "CAPABILITY"))))) + (when (eq nnimap-stream 'starttls) + (nnimap-command "STARTTLS") + (starttls-negotiate (nnimap-process nnimap-object))) + ;; If this is a STARTTLS-capable server, then sever the + ;; connection and start a STARTTLS connection instead. + (when (and (eq nnimap-stream 'network) + (member "STARTTLS" (nnimap-capabilities nnimap-object))) + (let ((nnimap-stream 'starttls)) + (delete-process (nnimap-process nnimap-object)) + (kill-buffer (current-buffer)) + (return + (nnimap-open-connection buffer)))) + (when nnimap-server-port + (push (format "%s" nnimap-server-port) ports)) + (unless (equal connection-result "PREAUTH") + (if (not (setq credentials + (if (eq nnimap-authenticator 'anonymous) + (list "anonymous" + (message-make-address)) + (or + ;; First look for the credentials based + ;; on the virtual server name. + (nnimap-credentials + (nnoo-current-server 'nnimap) ports t) + ;; Then look them up based on the + ;; physical address. + (nnimap-credentials nnimap-address ports))))) + (setq nnimap-object nil) + (setq login-result (nnimap-command "LOGIN %S %S" + (car credentials) + (cadr credentials))) + (unless (car login-result) + ;; If the login failed, then forget the credentials + ;; that are now possibly cached. + (dolist (host (list (nnoo-current-server 'nnimap) + nnimap-address)) + (dolist (port ports) + (dolist (element '("login" "password")) + (auth-source-forget-user-or-password + element host port)))) + (delete-process (nnimap-process nnimap-object)) + (setq nnimap-object nil)))) + (when nnimap-object + (when (member "QRESYNC" (nnimap-capabilities nnimap-object)) + (nnimap-command "ENABLE QRESYNC")) + t))))))) (defun nnimap-find-parameter (parameter elems) (let (result) @@ -395,14 +421,12 @@ (erase-buffer) (with-current-buffer (nnimap-buffer) (erase-buffer) - (when gnus-fetch-partial-articles - (if (eq gnus-fetch-partial-articles t) - (setq parts '(1)) - (nnimap-command "UID FETCH %d (BODYSTRUCTURE)" article) - (goto-char (point-min)) - (when (re-search-forward "FETCH.*BODYSTRUCTURE" nil t) - (setq structure (ignore-errors (read (current-buffer))) - parts (nnimap-find-wanted-parts structure))))) + (when nnimap-fetch-partial-articles + (nnimap-command "UID FETCH %d (BODYSTRUCTURE)" article) + (goto-char (point-min)) + (when (re-search-forward "FETCH.*BODYSTRUCTURE" nil t) + (setq structure (ignore-errors (read (current-buffer))) + parts (nnimap-find-wanted-parts structure)))) (when (if parts (nnimap-get-partial-article article parts structure) (nnimap-get-whole-article article)) @@ -525,7 +549,9 @@ (number-to-string num) (format "%s.%s" prefix num)))) (setcar (nthcdr 9 sub) id) - (when (string-match gnus-fetch-partial-articles type) + (when (if (eq nnimap-fetch-partial-articles t) + (equal id "1") + (string-match nnimap-fetch-partial-articles type)) (push id parts)))) (incf num))) (nreverse parts))) @@ -941,7 +967,10 @@ (t ;; No articles and no uidnext. nil))) - (setcdr (gnus-active group) (or high (1- uidnext)))) + (gnus-set-active + group + (cons (car (gnus-active group)) + (or high (1- uidnext))))) (when (and (not high) uidnext) (setq high (1- uidnext))) @@ -1193,13 +1222,18 @@ (cond ((eql char ?\[) (split-string (buffer-substring - (1+ (point)) (1- (search-forward "]"))))) + (1+ (point)) + (1- (search-forward "]" (line-end-position) 'move))))) ((eql char ?\() (split-string (buffer-substring - (1+ (point)) (1- (search-forward ")"))))) + (1+ (point)) + (1- (search-forward ")" (line-end-position) 'move))))) ((eql char ?\") (forward-char 1) - (buffer-substring (point) (1- (search-forward "\"")))) + (buffer-substring + (point) + (1- (or (search-forward "\"" (line-end-position) 'move) + (point))))) (t (buffer-substring (point) (if (search-forward " " nil t) (1- (point)) === modified file 'lisp/gnus/nnmairix.el' --- lisp/gnus/nnmairix.el 2010-09-23 23:14:02 +0000 +++ lisp/gnus/nnmairix.el 2010-09-27 23:07:47 +0000 @@ -562,9 +562,8 @@ "retrieve-headers" articles folder nnmairix-backend-server fetch-old)) (nnmairix-call-backend "retrieve-headers" articles folder nnmairix-backend-server fetch-old))) - (when (eq rval 'nov) - (nnmairix-replace-group-and-numbers articles folder group numcorr) - rval))) + (nnmairix-replace-group-and-numbers articles folder group numcorr rval) + rval)) (deffoo nnmairix-request-article (article &optional group server to-buffer) (when server (nnmairix-open-server server)) @@ -1413,43 +1412,55 @@ (setq cur lastplusone)) (setq lastplusone (1+ cur))))) -(defun nnmairix-replace-group-and-numbers (articles backendgroup mairixgroup numc) +(defun nnmairix-replace-group-and-numbers (articles backendgroup mairixgroup numc type) "Replace folder names in Xref header and correct article numbers. Do this for all ARTICLES on BACKENDGROUP. Replace using -MAIRIXGROUP. NUMC contains values for article number correction." - (let ((buf (get-buffer-create " *nnmairix buffer*")) - (corr (not (zerop numc))) - (name (buffer-name nntp-server-buffer)) - header cur xref) - (with-current-buffer buf - (erase-buffer) - (set-buffer nntp-server-buffer) - (goto-char (point-min)) - (nnheader-message 7 "nnmairix: Rewriting headers...") - (mapc - (lambda (article) - (when (or (looking-at (number-to-string article)) - (nnheader-find-nov-line article)) - (setq cur (nnheader-parse-nov)) - (when corr - (setq article (+ (mail-header-number cur) numc)) - (mail-header-set-number cur article)) - (setq xref (mail-header-xref cur)) - (when (and (stringp xref) - (string-match (format "[ \t]%s:[0-9]+" backendgroup) xref)) - (setq xref (replace-match (format " %s:%d" mairixgroup article) t nil xref)) - (mail-header-set-xref cur xref)) - (set-buffer buf) - (nnheader-insert-nov cur) - (set-buffer nntp-server-buffer) - (when (not (eobp)) - (forward-line 1)))) - articles) - (nnheader-message 7 "nnmairix: Rewriting headers... done") - (kill-buffer nntp-server-buffer) - (set-buffer buf) - (rename-buffer name) - (setq nntp-server-buffer buf)))) +MAIRIXGROUP. NUMC contains values for article number correction. +TYPE is either 'nov or 'headers." + (nnheader-message 7 "nnmairix: Rewriting headers...") + (cond + ((eq type 'nov) + (let ((buf (get-buffer-create " *nnmairix buffer*")) + (corr (not (zerop numc))) + (name (buffer-name nntp-server-buffer)) + header cur xref) + (with-current-buffer buf + (erase-buffer) + (set-buffer nntp-server-buffer) + (goto-char (point-min)) + (mapc + (lambda (article) + (when (or (looking-at (number-to-string article)) + (nnheader-find-nov-line article)) + (setq cur (nnheader-parse-nov)) + (when corr + (setq article (+ (mail-header-number cur) numc)) + (mail-header-set-number cur article)) + (setq xref (mail-header-xref cur)) + (when (and (stringp xref) + (string-match (format "[ \t]%s:[0-9]+" backendgroup) xref)) + (setq xref (replace-match (format " %s:%d" mairixgroup article) t nil xref)) + (mail-header-set-xref cur xref)) + (set-buffer buf) + (nnheader-insert-nov cur) + (set-buffer nntp-server-buffer) + (when (not (eobp)) + (forward-line 1)))) + articles) + (kill-buffer nntp-server-buffer) + (set-buffer buf) + (rename-buffer name) + (setq nntp-server-buffer buf)))) + ((and (eq type 'headers) + (not (zerop numc))) + (with-current-buffer nntp-server-buffer + (save-excursion + (goto-char (point-min)) + (while (re-search-forward "^[23][0-9]+ \\([0-9]+\\)" nil t) + (replace-match (number-to-string + (+ (string-to-number (match-string 1)) numc)) + t t nil 1)))))) + (nnheader-message 7 "nnmairix: Rewriting headers... done")) (defun nnmairix-backend-to-server (server) "Return nnmairix server most probably responsible for back end SERVER. === modified file 'lisp/gnus/sieve-manage.el' --- lisp/gnus/sieve-manage.el 2010-09-02 01:42:32 +0000 +++ lisp/gnus/sieve-manage.el 2010-09-27 23:07:47 +0000 @@ -162,6 +162,12 @@ :type 'integer :group 'sieve-manage) +(defcustom sieve-manage-default-stream 'network + "Default stream type to use for `sieve-manage'. +Must be a name of a stream in `sieve-manage-stream-alist'." + :type 'symbol + :group 'sieve-manage) + ;; Internal variables: (defconst sieve-manage-local-variables '(sieve-manage-server @@ -174,7 +180,6 @@ sieve-manage-client-eol sieve-manage-server-eol sieve-manage-capability)) -(defconst sieve-manage-default-stream 'network) (defconst sieve-manage-coding-system-for-read 'binary) (defconst sieve-manage-coding-system-for-write 'binary) (defvar sieve-manage-stream nil) ------------------------------------------------------------ revno: 101653 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Mon 2010-09-27 22:53:35 +0200 message: Compile with imagemagick support by default. diff: === modified file 'ChangeLog' --- ChangeLog 2010-09-26 15:18:47 +0000 +++ ChangeLog 2010-09-27 20:53:35 +0000 @@ -1,3 +1,7 @@ +2010-09-27 Lars Magne Ingebrigtsen + + * configure.in: Enable imagemagick by default. + 2010-09-26 Lars Magne Ingebrigtsen * configure.in (HAVE_GNUTLS): Don't break if we don't have the === modified file 'configure' --- configure 2010-09-26 15:18:47 +0000 +++ configure 2010-09-27 20:53:35 +0000 @@ -1521,7 +1521,7 @@ --without-png don't compile with PNG image support --without-rsvg don't compile with SVG image support --without-xml2 don't compile with XML parsing support - --with-imagemagick compile with ImageMagick image support + --without-imagemagick don't compile with ImageMagick image support --without-xft don't use XFT for anti aliased fonts --without-libotf don't use libotf for OpenType font support --without-m17n-flt don't use m17n-flt for text shaping @@ -2752,7 +2752,7 @@ if test "${with_imagemagick+set}" = set; then : withval=$with_imagemagick; else - with_imagemagick=no + with_imagemagick=yes fi === modified file 'configure.in' --- configure.in 2010-09-26 15:18:47 +0000 +++ configure.in 2010-09-27 20:53:35 +0000 @@ -156,7 +156,7 @@ OPTION_DEFAULT_ON([png],[don't compile with PNG image support]) OPTION_DEFAULT_ON([rsvg],[don't compile with SVG image support]) OPTION_DEFAULT_ON([xml2],[don't compile with XML parsing support]) -OPTION_DEFAULT_OFF([imagemagick],[compile with ImageMagick image support]) +OPTION_DEFAULT_ON([imagemagick],[don't compile with ImageMagick image support]) OPTION_DEFAULT_ON([xft],[don't use XFT for anti aliased fonts]) OPTION_DEFAULT_ON([libotf],[don't use libotf for OpenType font support]) === modified file 'etc/NEWS' --- etc/NEWS 2010-09-22 03:10:16 +0000 +++ etc/NEWS 2010-09-27 20:53:35 +0000 @@ -115,8 +115,8 @@ ** ImageMagick support. It is now possible to use the Imagemagick library to load many new -image formats in Emacs. To enable this, use the configure option -`--with-imagemagick'. +image formats in Emacs. It is enable by default. To disable this, use +the configure option `--without-imagemagick'. The new function `imagemagick-types' returns a list of image file extensions that your installation of ImageMagick supports. The ------------------------------------------------------------ revno: 101652 committer: Jan D branch nick: trunk timestamp: Mon 2010-09-27 22:43:03 +0200 message: * process.c (wait_reading_process_output): Add missing FD_CLR for write_mask (must mirror connect_wait_mask). diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-09-27 16:44:31 +0000 +++ src/ChangeLog 2010-09-27 20:43:03 +0000 @@ -1,3 +1,8 @@ +2010-09-27 Jan Djärv + + * process.c (wait_reading_process_output): Add missing FD_CLR + for write_mask (must mirror connect_wait_mask). + 2010-09-27 Teodor Zlatanov * gnutls.c (gnutls_log_function): Show level and "gnutls.c" === modified file 'src/process.c' --- src/process.c 2010-09-27 16:44:31 +0000 +++ src/process.c 2010-09-27 20:43:03 +0000 @@ -5068,6 +5068,7 @@ struct Lisp_Process *p; FD_CLR (channel, &connect_wait_mask); + FD_CLR (channel, &write_mask); if (--num_pending_connects < 0) abort (); ------------------------------------------------------------ revno: 101651 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2010-09-27 22:11:33 +0200 message: * lisp/emacs-lisp/float-sup.el (e): Remove. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-09-27 16:44:31 +0000 +++ lisp/ChangeLog 2010-09-27 20:11:33 +0000 @@ -1,3 +1,7 @@ +2010-09-27 Stefan Monnier + + * emacs-lisp/float-sup.el (e): Remove. + 2010-09-27 Teodor Zlatanov * net/gnutls.el (gnutls, gnutls-log-level): Add group and custom === modified file 'lisp/emacs-lisp/float-sup.el' --- lisp/emacs-lisp/float-sup.el 2010-09-23 19:00:31 +0000 +++ lisp/emacs-lisp/float-sup.el 2010-09-27 20:11:33 +0000 @@ -39,7 +39,6 @@ (defconst pi float-pi "Obsolete since Emacs-23.3. Use `float-pi' instead.") (defconst float-e (exp 1) "The value of e (2.7182818...).") -(defvar e float-e "Obsolete since Emacs-23.3. Use `float-e' instead.") (defconst degrees-to-radians (/ float-pi 180.0) "Degrees to radian conversion constant.") @@ -49,10 +48,10 @@ ;; these expand to a single multiply by a float when byte compiled (defmacro degrees-to-radians (x) - "Convert ARG from degrees to radians." + "Convert X from degrees to radians." (list '* degrees-to-radians x)) (defmacro radians-to-degrees (x) - "Convert ARG from radians to degrees." + "Convert X from radians to degrees." (list '* radians-to-degrees x)) (provide 'lisp-float-type) ------------------------------------------------------------ revno: 101650 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Mon 2010-09-27 18:44:31 +0200 message: Add gnutls logging and clean up various gnutls bits. From: Teodor Zlatanov diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-09-27 14:56:27 +0000 +++ lisp/ChangeLog 2010-09-27 16:44:31 +0000 @@ -1,3 +1,9 @@ +2010-09-27 Teodor Zlatanov + + * net/gnutls.el (gnutls, gnutls-log-level): Add group and custom + variable. + (starttls-negotiate): Use it. + 2010-09-27 Lars Magne Ingebrigtsen * net/gnutls.el (starttls-negotiate): Stop looping when we get a t === modified file 'lisp/net/gnutls.el' --- lisp/net/gnutls.el 2010-09-27 14:35:22 +0000 +++ lisp/net/gnutls.el 2010-09-27 16:44:31 +0000 @@ -32,6 +32,16 @@ ;;; Code: +(defgroup gnutls nil + "Emacs interface to the GnuTLS library." + :prefix "gnutls-" + :group 'net-utils) + +(defcustom gnutls-log-level 2 + "Logging level to be used by `starttls-negotiate' and GnuTLS." + :type 'integer + :group 'gnutls) + (defun open-ssl-stream (name buffer host service) "Open a SSL connection for a service to a host. Returns a subprocess-object to represent the connection. @@ -72,7 +82,9 @@ ret) (gnutls-message-maybe - (setq ret (gnutls-boot proc priority-string credentials credentials-file)) + (setq ret (gnutls-boot proc priority-string + credentials credentials-file + nil nil gnutls-log-level)) "boot: %s") (when (gnutls-errorp ret) === modified file 'src/ChangeLog' --- src/ChangeLog 2010-09-27 16:27:37 +0000 +++ src/ChangeLog 2010-09-27 16:44:31 +0000 @@ -1,3 +1,18 @@ +2010-09-27 Teodor Zlatanov + + * gnutls.c (gnutls_log_function): Show level and "gnutls.c" + prefix. + (Fgnutls_boot): Use changed process members. Use log level with a + function parameter to set it. Bring back Emacs-level debugging + messages at log level 1 and 2. + + * process.c (make_process): Initialize gnutls_log_level. + + * process.h: Add gnutls_log_level and rename x509_cred and + anon_cred to have the gnutls_ prefix for consistency. + + * gnutls.h (GNUTLS_LOG): Add convenience macro. + 2010-09-27 Juanma Barranquero * w32.c (g_b_init_get_sid_identifier_authority) === modified file 'src/gnutls.c' --- src/gnutls.c 2010-09-27 15:03:58 +0000 +++ src/gnutls.c 2010-09-27 16:44:31 +0000 @@ -220,11 +220,12 @@ return gnutls_make_error (GNUTLS_E_SUCCESS); } -static void gnutls_log_function (int level, const char* string) { - message("debug: %s", string); +static void gnutls_log_function (int level, const char* string) +{ + message("gnutls.c: [%d] %s", level, string); } -DEFUN ("gnutls-boot", Fgnutls_boot, Sgnutls_boot, 3, 6, 0, +DEFUN ("gnutls-boot", Fgnutls_boot, Sgnutls_boot, 3, 7, 0, doc: /* Initializes client-mode GnuTLS for process PROC. Currently only client mode is supported. Returns a success/failure value you can check with `gnutls-errorp'. @@ -234,6 +235,10 @@ TRUSTFILE is a PEM encoded trust file for `gnutls-x509pki'. KEYFILE is ... for `gnutls-x509pki' (TODO). CALLBACK is ... for `gnutls-x509pki' (TODO). +LOGLEVEL is the debug level requested from GnuTLS, try 4. + +LOGLEVEL will be set for this process AND globally for GnuTLS. So if +you set it higher or lower at any point, it affects global debugging. Note that the priority is set on the client. The server does not use the protocols's priority except for disabling protocols that were not @@ -247,10 +252,13 @@ work. For X.509 PKI (`gnutls-x509pki'), you need TRUSTFILE and KEYFILE and optionally CALLBACK. */) (Lisp_Object proc, Lisp_Object priority_string, Lisp_Object type, - Lisp_Object trustfile, Lisp_Object keyfile, Lisp_Object callback) + Lisp_Object trustfile, Lisp_Object keyfile, Lisp_Object callback, + Lisp_Object loglevel) { int ret = GNUTLS_E_SUCCESS; + int max_log_level = 0; + /* TODO: GNUTLS_X509_FMT_DER is also an option. */ int file_format = GNUTLS_X509_FMT_PEM; @@ -267,8 +275,14 @@ state = XPROCESS (proc)->gnutls_state; - //gnutls_global_set_log_level(4); - //gnutls_global_set_log_function(gnutls_log_function); + if (NUMBERP (loglevel)) + { + message ("setting up log level %d", XINT (loglevel)); + gnutls_global_set_log_function (gnutls_log_function); + gnutls_global_set_log_level (XINT (loglevel)); + max_log_level = XINT (loglevel); + XPROCESS (proc)->gnutls_log_level = max_log_level; + } /* always initialize globals. */ global_init = gnutls_emacs_global_init (); @@ -278,14 +292,18 @@ /* deinit and free resources. */ if (GNUTLS_INITSTAGE (proc) >= GNUTLS_STAGE_CRED_ALLOC) { + GNUTLS_LOG (1, max_log_level, "deallocating credentials"); + if (EQ (type, Qgnutls_x509pki)) { - x509_cred = XPROCESS (proc)->x509_cred; + GNUTLS_LOG (2, max_log_level, "deallocating x509 credentials"); + x509_cred = XPROCESS (proc)->gnutls_x509_cred; gnutls_certificate_free_credentials (x509_cred); } else if (EQ (type, Qgnutls_anon)) { - anon_cred = XPROCESS (proc)->anon_cred; + GNUTLS_LOG (2, max_log_level, "deallocating anon credentials"); + anon_cred = XPROCESS (proc)->gnutls_anon_cred; gnutls_anon_free_client_credentials (anon_cred); } else @@ -296,21 +314,26 @@ if (GNUTLS_INITSTAGE (proc) >= GNUTLS_STAGE_INIT) { + GNUTLS_LOG (1, max_log_level, "deallocating x509 credentials"); Fgnutls_deinit (proc); } } GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_EMPTY; + GNUTLS_LOG (1, max_log_level, "allocating credentials"); + if (EQ (type, Qgnutls_x509pki)) { - x509_cred = XPROCESS (proc)->x509_cred; + GNUTLS_LOG (2, max_log_level, "allocating x509 credentials"); + x509_cred = XPROCESS (proc)->gnutls_x509_cred; if (gnutls_certificate_allocate_credentials (&x509_cred) < 0) memory_full (); } else if (EQ (type, Qgnutls_anon)) { - anon_cred = XPROCESS (proc)->anon_cred; + GNUTLS_LOG (2, max_log_level, "allocating anon credentials"); + anon_cred = XPROCESS (proc)->gnutls_anon_cred; if (gnutls_anon_allocate_client_credentials (&anon_cred) < 0) memory_full (); } @@ -329,6 +352,7 @@ { if (STRINGP (trustfile)) { + GNUTLS_LOG (1, max_log_level, "setting the trustfile"); ret = gnutls_certificate_set_x509_trust_file (x509_cred, XSTRING (trustfile)->data, @@ -340,6 +364,7 @@ if (STRINGP (keyfile)) { + GNUTLS_LOG (1, max_log_level, "setting the keyfile"); ret = gnutls_certificate_set_x509_crl_file (x509_cred, XSTRING (keyfile)->data, @@ -352,6 +377,8 @@ GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_FILES; + GNUTLS_LOG (1, max_log_level, "gnutls_init"); + ret = gnutls_init (&state, GNUTLS_CLIENT); if (ret < GNUTLS_E_SUCCESS) @@ -361,6 +388,8 @@ GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_INIT; + GNUTLS_LOG (1, max_log_level, "setting the priority string"); + ret = gnutls_priority_set_direct(state, (char*) SDATA (priority_string), NULL); @@ -393,8 +422,8 @@ if (ret < GNUTLS_E_SUCCESS) return gnutls_make_error (ret); - XPROCESS (proc)->anon_cred = anon_cred; - XPROCESS (proc)->x509_cred = x509_cred; + XPROCESS (proc)->gnutls_anon_cred = anon_cred; + XPROCESS (proc)->gnutls_x509_cred = x509_cred; XPROCESS (proc)->gnutls_cred_type = type; GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_CRED_SET; @@ -449,6 +478,7 @@ { gnutls_session_t state; int ret; + int max_log_level = XPROCESS (proc)->gnutls_log_level; CHECK_PROCESS (proc); state = XPROCESS (proc)->gnutls_state; @@ -473,11 +503,10 @@ ret = gnutls_handshake (state); GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_HANDSHAKE_TRIED; - if (GNUTLS_E_SUCCESS == ret || ret == 0) + if (GNUTLS_E_SUCCESS == ret) { /* here we're finally done. */ GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_READY; - return Qt; } return gnutls_make_error (ret); === modified file 'src/gnutls.h' --- src/gnutls.h 2010-09-26 06:06:28 +0000 +++ src/gnutls.h 2010-09-27 16:44:31 +0000 @@ -46,6 +46,8 @@ #define GNUTLS_PROCESS_USABLE(proc) (GNUTLS_INITSTAGE(proc) >= GNUTLS_STAGE_READY) +#define GNUTLS_LOG(level, max, string) if (level <= max) { gnutls_log_function (level, "(Emacs) " string); } + int emacs_gnutls_write (int fildes, gnutls_session_t state, char *buf, unsigned int nbyte); === modified file 'src/process.c' --- src/process.c 2010-09-26 20:48:13 +0000 +++ src/process.c 2010-09-27 16:44:31 +0000 @@ -671,6 +671,7 @@ #ifdef HAVE_GNUTLS p->gnutls_initstage = GNUTLS_STAGE_EMPTY; + p->gnutls_log_level = 0; #endif /* If name is already in use, modify it until it is unused. */ === modified file 'src/process.h' --- src/process.h 2010-09-26 16:20:01 +0000 +++ src/process.h 2010-09-27 16:44:31 +0000 @@ -133,8 +133,9 @@ #ifdef HAVE_GNUTLS gnutls_initstage_t gnutls_initstage; gnutls_session_t gnutls_state; - gnutls_certificate_client_credentials x509_cred; - gnutls_anon_client_credentials_t anon_cred; + gnutls_certificate_client_credentials gnutls_x509_cred; + gnutls_anon_client_credentials_t gnutls_anon_cred; + int gnutls_log_level; #endif }; ------------------------------------------------------------ revno: 101649 committer: Juanma Barranquero branch nick: trunk timestamp: Mon 2010-09-27 18:27:37 +0200 message: src/w32.c: Remove unused code and make static many functions. (g_b_init_get_sid_identifier_authority, GetSidIdentifierAuthority_Proc) (get_sid_identifier_authority): Remove, not used. (globals_of_w32): Don't set g_b_init_get_sid_identifier_authority. (init_winsock): Remove useless assignment. (open_process_token, get_token_information, lookup_account_sid) (get_sid_sub_authority, get_sid_sub_authority_count, get_file_security) (get_security_descriptor_owner, get_security_descriptor_group) (is_valid_sid, equal_sid, get_length_sid, copy_sid) (get_native_system_info, get_system_times, init_user_info, crlf_to_lf) (is_unc_volume, GetCachedVolumeInformation, get_volume_info) (is_fat_volume, open_unc_volume, read_unc_volume, close_unc_volume) (unc_volume_file_attributes, convert_from_time_t) (create_toolhelp32_snapshot, process32_first, process32_next) (open_thread_token, impersonate_self, revert_to_self) (get_process_memory_info, get_process_working_set_size) (global_memory_status, global_memory_status_ex, socket_to_fd) (shutdown_handler): Make static. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-09-27 15:34:04 +0000 +++ src/ChangeLog 2010-09-27 16:27:37 +0000 @@ -1,3 +1,24 @@ +2010-09-27 Juanma Barranquero + + * w32.c (g_b_init_get_sid_identifier_authority) + (GetSidIdentifierAuthority_Proc, get_sid_identifier_authority): + Remove, not used. + (globals_of_w32): Don't set g_b_init_get_sid_identifier_authority. + (init_winsock): Remove useless assignment. + (open_process_token, get_token_information, lookup_account_sid) + (get_sid_sub_authority, get_sid_sub_authority_count, get_file_security) + (get_security_descriptor_owner, get_security_descriptor_group) + (is_valid_sid, equal_sid, get_length_sid, copy_sid) + (get_native_system_info, get_system_times, init_user_info, crlf_to_lf) + (is_unc_volume, GetCachedVolumeInformation, get_volume_info) + (is_fat_volume, open_unc_volume, read_unc_volume, close_unc_volume) + (unc_volume_file_attributes, convert_from_time_t) + (create_toolhelp32_snapshot, process32_first, process32_next) + (open_thread_token, impersonate_self, revert_to_self) + (get_process_memory_info, get_process_working_set_size) + (global_memory_status, global_memory_status_ex, socket_to_fd) + (shutdown_handler): Make static. + 2010-09-27 Michael Albinus * dbusbind.c (dbus_fd_cb, xd_get_dispatch_status) === modified file 'src/w32.c' --- src/w32.c 2010-09-26 01:39:24 +0000 +++ src/w32.c 2010-09-27 16:27:37 +0000 @@ -78,15 +78,15 @@ /* Some versions of compiler define MEMORYSTATUSEX, some don't, so we use a different name to avoid compilation problems. */ typedef struct _MEMORY_STATUS_EX { - DWORD dwLength; - DWORD dwMemoryLoad; - DWORDLONG ullTotalPhys; - DWORDLONG ullAvailPhys; - DWORDLONG ullTotalPageFile; - DWORDLONG ullAvailPageFile; - DWORDLONG ullTotalVirtual; - DWORDLONG ullAvailVirtual; - DWORDLONG ullAvailExtendedVirtual; + DWORD dwLength; + DWORD dwMemoryLoad; + DWORDLONG ullTotalPhys; + DWORDLONG ullAvailPhys; + DWORDLONG ullTotalPageFile; + DWORDLONG ullAvailPageFile; + DWORDLONG ullTotalVirtual; + DWORDLONG ullAvailVirtual; + DWORDLONG ullAvailExtendedVirtual; } MEMORY_STATUS_EX,*LPMEMORY_STATUS_EX; #include @@ -100,17 +100,17 @@ _WIN32_WINNT than what we use. w32api suplied with MinGW 3.15 defines it in psapi.h */ typedef struct _PROCESS_MEMORY_COUNTERS_EX { - DWORD cb; - DWORD PageFaultCount; - DWORD PeakWorkingSetSize; - DWORD WorkingSetSize; - DWORD QuotaPeakPagedPoolUsage; - DWORD QuotaPagedPoolUsage; - DWORD QuotaPeakNonPagedPoolUsage; - DWORD QuotaNonPagedPoolUsage; - DWORD PagefileUsage; - DWORD PeakPagefileUsage; - DWORD PrivateUsage; + DWORD cb; + DWORD PageFaultCount; + DWORD PeakWorkingSetSize; + DWORD WorkingSetSize; + DWORD QuotaPeakPagedPoolUsage; + DWORD QuotaPagedPoolUsage; + DWORD QuotaPeakNonPagedPoolUsage; + DWORD QuotaNonPagedPoolUsage; + DWORD PagefileUsage; + DWORD PeakPagefileUsage; + DWORD PrivateUsage; } PROCESS_MEMORY_COUNTERS_EX,*PPROCESS_MEMORY_COUNTERS_EX; #endif @@ -172,7 +172,6 @@ static BOOL g_b_init_open_process_token; static BOOL g_b_init_get_token_information; static BOOL g_b_init_lookup_account_sid; -static BOOL g_b_init_get_sid_identifier_authority; static BOOL g_b_init_get_sid_sub_authority; static BOOL g_b_init_get_sid_sub_authority_count; static BOOL g_b_init_get_file_security; @@ -235,8 +234,6 @@ LPTSTR DomainName, LPDWORD cbDomainName, PSID_NAME_USE peUse); -typedef PSID_IDENTIFIER_AUTHORITY (WINAPI * GetSidIdentifierAuthority_Proc) ( - PSID pSid); typedef PDWORD (WINAPI * GetSidSubAuthority_Proc) ( PSID pSid, DWORD n); @@ -303,13 +300,11 @@ LPFILETIME lpKernelTime, LPFILETIME lpUserTime); - - /* ** A utility function ** */ static BOOL is_windows_9x (void) { - static BOOL s_b_ret=0; + static BOOL s_b_ret = 0; OSVERSIONINFO os_ver; if (g_b_init_is_windows_9x == 0) { @@ -366,10 +361,10 @@ /* ** The wrapper functions ** */ -BOOL WINAPI open_process_token ( - HANDLE ProcessHandle, - DWORD DesiredAccess, - PHANDLE TokenHandle) +static BOOL WINAPI +open_process_token (HANDLE ProcessHandle, + DWORD DesiredAccess, + PHANDLE TokenHandle) { static OpenProcessToken_Proc s_pfn_Open_Process_Token = NULL; HMODULE hm_advapi32 = NULL; @@ -396,12 +391,12 @@ ); } -BOOL WINAPI get_token_information ( - HANDLE TokenHandle, - TOKEN_INFORMATION_CLASS TokenInformationClass, - LPVOID TokenInformation, - DWORD TokenInformationLength, - PDWORD ReturnLength) +static BOOL WINAPI +get_token_information (HANDLE TokenHandle, + TOKEN_INFORMATION_CLASS TokenInformationClass, + LPVOID TokenInformation, + DWORD TokenInformationLength, + PDWORD ReturnLength) { static GetTokenInformation_Proc s_pfn_Get_Token_Information = NULL; HMODULE hm_advapi32 = NULL; @@ -430,14 +425,14 @@ ); } -BOOL WINAPI lookup_account_sid ( - LPCTSTR lpSystemName, - PSID Sid, - LPTSTR Name, - LPDWORD cbName, - LPTSTR DomainName, - LPDWORD cbDomainName, - PSID_NAME_USE peUse) +static BOOL WINAPI +lookup_account_sid (LPCTSTR lpSystemName, + PSID Sid, + LPTSTR Name, + LPDWORD cbName, + LPTSTR DomainName, + LPDWORD cbDomainName, + PSID_NAME_USE peUse) { static LookupAccountSid_Proc s_pfn_Lookup_Account_Sid = NULL; HMODULE hm_advapi32 = NULL; @@ -468,33 +463,8 @@ ); } -PSID_IDENTIFIER_AUTHORITY WINAPI get_sid_identifier_authority ( - PSID pSid) -{ - static GetSidIdentifierAuthority_Proc s_pfn_Get_Sid_Identifier_Authority = NULL; - HMODULE hm_advapi32 = NULL; - if (is_windows_9x () == TRUE) - { - return NULL; - } - if (g_b_init_get_sid_identifier_authority == 0) - { - g_b_init_get_sid_identifier_authority = 1; - hm_advapi32 = LoadLibrary ("Advapi32.dll"); - s_pfn_Get_Sid_Identifier_Authority = - (GetSidIdentifierAuthority_Proc) GetProcAddress ( - hm_advapi32, "GetSidIdentifierAuthority"); - } - if (s_pfn_Get_Sid_Identifier_Authority == NULL) - { - return NULL; - } - return (s_pfn_Get_Sid_Identifier_Authority (pSid)); -} - -PDWORD WINAPI get_sid_sub_authority ( - PSID pSid, - DWORD n) +static PDWORD WINAPI +get_sid_sub_authority (PSID pSid, DWORD n) { static GetSidSubAuthority_Proc s_pfn_Get_Sid_Sub_Authority = NULL; static DWORD zero = 0U; @@ -518,8 +488,8 @@ return (s_pfn_Get_Sid_Sub_Authority (pSid, n)); } -PUCHAR WINAPI get_sid_sub_authority_count ( - PSID pSid) +static PUCHAR WINAPI +get_sid_sub_authority_count (PSID pSid) { static GetSidSubAuthorityCount_Proc s_pfn_Get_Sid_Sub_Authority_Count = NULL; static UCHAR zero = 0U; @@ -543,12 +513,12 @@ return (s_pfn_Get_Sid_Sub_Authority_Count (pSid)); } -BOOL WINAPI get_file_security ( - LPCTSTR lpFileName, - SECURITY_INFORMATION RequestedInformation, - PSECURITY_DESCRIPTOR pSecurityDescriptor, - DWORD nLength, - LPDWORD lpnLengthNeeded) +static BOOL WINAPI +get_file_security (LPCTSTR lpFileName, + SECURITY_INFORMATION RequestedInformation, + PSECURITY_DESCRIPTOR pSecurityDescriptor, + DWORD nLength, + LPDWORD lpnLengthNeeded) { static GetFileSecurity_Proc s_pfn_Get_File_Security = NULL; HMODULE hm_advapi32 = NULL; @@ -573,10 +543,10 @@ lpnLengthNeeded)); } -BOOL WINAPI get_security_descriptor_owner ( - PSECURITY_DESCRIPTOR pSecurityDescriptor, - PSID *pOwner, - LPBOOL lpbOwnerDefaulted) +static BOOL WINAPI +get_security_descriptor_owner (PSECURITY_DESCRIPTOR pSecurityDescriptor, + PSID *pOwner, + LPBOOL lpbOwnerDefaulted) { static GetSecurityDescriptorOwner_Proc s_pfn_Get_Security_Descriptor_Owner = NULL; HMODULE hm_advapi32 = NULL; @@ -600,10 +570,10 @@ lpbOwnerDefaulted)); } -BOOL WINAPI get_security_descriptor_group ( - PSECURITY_DESCRIPTOR pSecurityDescriptor, - PSID *pGroup, - LPBOOL lpbGroupDefaulted) +static BOOL WINAPI +get_security_descriptor_group (PSECURITY_DESCRIPTOR pSecurityDescriptor, + PSID *pGroup, + LPBOOL lpbGroupDefaulted) { static GetSecurityDescriptorGroup_Proc s_pfn_Get_Security_Descriptor_Group = NULL; HMODULE hm_advapi32 = NULL; @@ -627,8 +597,8 @@ lpbGroupDefaulted)); } -BOOL WINAPI is_valid_sid ( - PSID sid) +static BOOL WINAPI +is_valid_sid (PSID sid) { static IsValidSid_Proc s_pfn_Is_Valid_Sid = NULL; HMODULE hm_advapi32 = NULL; @@ -651,9 +621,8 @@ return (s_pfn_Is_Valid_Sid (sid)); } -BOOL WINAPI equal_sid ( - PSID sid1, - PSID sid2) +static BOOL WINAPI +equal_sid (PSID sid1, PSID sid2) { static EqualSid_Proc s_pfn_Equal_Sid = NULL; HMODULE hm_advapi32 = NULL; @@ -676,8 +645,8 @@ return (s_pfn_Equal_Sid (sid1, sid2)); } -DWORD WINAPI get_length_sid ( - PSID sid) +static DWORD WINAPI +get_length_sid (PSID sid) { static GetLengthSid_Proc s_pfn_Get_Length_Sid = NULL; HMODULE hm_advapi32 = NULL; @@ -700,10 +669,8 @@ return (s_pfn_Get_Length_Sid (sid)); } -BOOL WINAPI copy_sid ( - DWORD destlen, - PSID dest, - PSID src) +static BOOL WINAPI +copy_sid (DWORD destlen, PSID dest, PSID src) { static CopySid_Proc s_pfn_Copy_Sid = NULL; HMODULE hm_advapi32 = NULL; @@ -732,8 +699,8 @@ supported in Windows NT / 2k / XP */ -void WINAPI get_native_system_info ( - LPSYSTEM_INFO lpSystemInfo) +static void WINAPI +get_native_system_info (LPSYSTEM_INFO lpSystemInfo) { static GetNativeSystemInfo_Proc s_pfn_Get_Native_System_Info = NULL; if (is_windows_9x () != TRUE) @@ -752,10 +719,10 @@ lpSystemInfo->dwNumberOfProcessors = -1; } -BOOL WINAPI get_system_times ( - LPFILETIME lpIdleTime, - LPFILETIME lpKernelTime, - LPFILETIME lpUserTime) +static BOOL WINAPI +get_system_times (LPFILETIME lpIdleTime, + LPFILETIME lpKernelTime, + LPFILETIME lpUserTime) { static GetSystemTimes_Proc s_pfn_Get_System_times = NULL; if (is_windows_9x () == TRUE) @@ -1078,7 +1045,7 @@ return pw; } -void +static void init_user_info (void) { /* Find the user's real name by opening the process token and @@ -1284,7 +1251,7 @@ /* Remove all CR's that are followed by a LF. (From msdos.c...probably should figure out a way to share it, although this code isn't going to ever change.) */ -int +static int crlf_to_lf (register int n, register unsigned char *buf) { unsigned char *np = buf; @@ -1423,7 +1390,7 @@ return TRUE; } -int +static int is_unc_volume (const char *filename) { const char *ptr = filename; @@ -2079,7 +2046,7 @@ /* Wrapper for GetVolumeInformation, which uses caching to avoid performance penalty (~2ms on 486 for local drives, 7.5ms for local cdrom drive, ~5-10ms or more for remote drives on LAN). */ -volume_info_data * +static volume_info_data * GetCachedVolumeInformation (char * root_dir) { volume_info_data * info; @@ -2170,7 +2137,7 @@ /* Get information on the volume where name is held; set path pointer to start of pathname in name (past UNC header\volume header if present). */ -int +static int get_volume_info (const char * name, const char ** pPath) { char temp[MAX_PATH]; @@ -2221,7 +2188,7 @@ /* Determine if volume is FAT format (ie. only supports short 8.3 names); also set path pointer to start of pathname in name. */ -int +static int is_fat_volume (const char * name, const char ** pPath) { if (get_volume_info (name, pPath)) @@ -2359,9 +2326,9 @@ /* Support shares on a network resource as subdirectories of a read-only root directory. */ static HANDLE wnet_enum_handle = INVALID_HANDLE_VALUE; -HANDLE open_unc_volume (const char *); -char *read_unc_volume (HANDLE, char *, int); -void close_unc_volume (HANDLE); +static HANDLE open_unc_volume (const char *); +static char *read_unc_volume (HANDLE, char *, int); +static void close_unc_volume (HANDLE); DIR * opendir (char *filename) @@ -2497,7 +2464,7 @@ return &dir_static; } -HANDLE +static HANDLE open_unc_volume (const char *path) { NETRESOURCE nr; @@ -2522,7 +2489,7 @@ return INVALID_HANDLE_VALUE; } -char * +static char * read_unc_volume (HANDLE henum, char *readbuf, int size) { DWORD count; @@ -2547,14 +2514,14 @@ return readbuf; } -void +static void close_unc_volume (HANDLE henum) { if (henum != INVALID_HANDLE_VALUE) WNetCloseEnum (henum); } -DWORD +static DWORD unc_volume_file_attributes (const char *path) { HANDLE henum; @@ -3014,8 +2981,7 @@ return (time_t) ((tmp - utc_base) / 10000000L); } - -void +static void convert_from_time_t (time_t time, FILETIME * pft) { ULARGE_INTEGER tmp; @@ -3236,10 +3202,9 @@ } static void -get_file_owner_and_group ( - PSECURITY_DESCRIPTOR psd, - const char *fname, - struct stat *st) +get_file_owner_and_group (PSECURITY_DESCRIPTOR psd, + const char *fname, + struct stat *st) { int dflt_usr = 0, dflt_grp = 0; @@ -3492,7 +3457,6 @@ buf->st_dev = volume_info.serialnum; buf->st_rdev = volume_info.serialnum; - buf->st_size = wfd.nFileSizeHigh; buf->st_size <<= 32; buf->st_size += wfd.nFileSizeLow; @@ -3665,9 +3629,8 @@ /* Helper wrapper functions. */ -HANDLE WINAPI create_toolhelp32_snapshot ( - DWORD Flags, - DWORD Ignored) +static HANDLE WINAPI +create_toolhelp32_snapshot (DWORD Flags, DWORD Ignored) { static CreateToolhelp32Snapshot_Proc s_pfn_Create_Toolhelp32_Snapshot = NULL; @@ -3685,9 +3648,8 @@ return (s_pfn_Create_Toolhelp32_Snapshot (Flags, Ignored)); } -BOOL WINAPI process32_first ( - HANDLE hSnapshot, - LPPROCESSENTRY32 lppe) +static BOOL WINAPI +process32_first (HANDLE hSnapshot, LPPROCESSENTRY32 lppe) { static Process32First_Proc s_pfn_Process32_First = NULL; @@ -3705,9 +3667,8 @@ return (s_pfn_Process32_First (hSnapshot, lppe)); } -BOOL WINAPI process32_next ( - HANDLE hSnapshot, - LPPROCESSENTRY32 lppe) +static BOOL WINAPI +process32_next (HANDLE hSnapshot, LPPROCESSENTRY32 lppe) { static Process32Next_Proc s_pfn_Process32_Next = NULL; @@ -3725,11 +3686,11 @@ return (s_pfn_Process32_Next (hSnapshot, lppe)); } -BOOL WINAPI open_thread_token ( - HANDLE ThreadHandle, - DWORD DesiredAccess, - BOOL OpenAsSelf, - PHANDLE TokenHandle) +static BOOL WINAPI +open_thread_token (HANDLE ThreadHandle, + DWORD DesiredAccess, + BOOL OpenAsSelf, + PHANDLE TokenHandle) { static OpenThreadToken_Proc s_pfn_Open_Thread_Token = NULL; HMODULE hm_advapi32 = NULL; @@ -3759,8 +3720,8 @@ ); } -BOOL WINAPI impersonate_self ( - SECURITY_IMPERSONATION_LEVEL ImpersonationLevel) +static BOOL WINAPI +impersonate_self (SECURITY_IMPERSONATION_LEVEL ImpersonationLevel) { static ImpersonateSelf_Proc s_pfn_Impersonate_Self = NULL; HMODULE hm_advapi32 = NULL; @@ -3782,7 +3743,8 @@ return s_pfn_Impersonate_Self (ImpersonationLevel); } -BOOL WINAPI revert_to_self (void) +static BOOL WINAPI +revert_to_self (void) { static RevertToSelf_Proc s_pfn_Revert_To_Self = NULL; HMODULE hm_advapi32 = NULL; @@ -3804,10 +3766,10 @@ return s_pfn_Revert_To_Self (); } -BOOL WINAPI get_process_memory_info ( - HANDLE h_proc, - PPROCESS_MEMORY_COUNTERS mem_counters, - DWORD bufsize) +static BOOL WINAPI +get_process_memory_info (HANDLE h_proc, + PPROCESS_MEMORY_COUNTERS mem_counters, + DWORD bufsize) { static GetProcessMemoryInfo_Proc s_pfn_Get_Process_Memory_Info = NULL; HMODULE hm_psapi = NULL; @@ -3830,10 +3792,10 @@ return s_pfn_Get_Process_Memory_Info (h_proc, mem_counters, bufsize); } -BOOL WINAPI get_process_working_set_size ( - HANDLE h_proc, - DWORD *minrss, - DWORD *maxrss) +static BOOL WINAPI +get_process_working_set_size (HANDLE h_proc, + DWORD *minrss, + DWORD *maxrss) { static GetProcessWorkingSetSize_Proc s_pfn_Get_Process_Working_Set_Size = NULL; @@ -3856,8 +3818,8 @@ return s_pfn_Get_Process_Working_Set_Size (h_proc, minrss, maxrss); } -BOOL WINAPI global_memory_status ( - MEMORYSTATUS *buf) +static BOOL WINAPI +global_memory_status (MEMORYSTATUS *buf) { static GlobalMemoryStatus_Proc s_pfn_Global_Memory_Status = NULL; @@ -3879,8 +3841,8 @@ return s_pfn_Global_Memory_Status (buf); } -BOOL WINAPI global_memory_status_ex ( - MEMORY_STATUS_EX *buf) +static BOOL WINAPI +global_memory_status_ex (MEMORY_STATUS_EX *buf) { static GlobalMemoryStatusEx_Proc s_pfn_Global_Memory_Status_Ex = NULL; @@ -4438,7 +4400,6 @@ if (winsock_lib != NULL) return TRUE; - pfn_SetHandleInformation = NULL; pfn_SetHandleInformation = (void *) GetProcAddress (GetModuleHandle ("kernel32.dll"), "SetHandleInformation"); @@ -4647,7 +4608,7 @@ #define SOCK_HANDLE(fd) ((SOCKET) fd_info[fd].hnd) -int socket_to_fd (SOCKET s); +static int socket_to_fd (SOCKET s); int sys_socket (int af, int type, int protocol) @@ -4673,7 +4634,7 @@ } /* Convert a SOCKET to a file descriptor. */ -int +static int socket_to_fd (SOCKET s) { int fd; @@ -4766,7 +4727,6 @@ return -1; } - int sys_bind (int s, const struct sockaddr * addr, int namelen) { @@ -4788,7 +4748,6 @@ return SOCKET_ERROR; } - int sys_connect (int s, const struct sockaddr * name, int namelen) { @@ -4901,7 +4860,6 @@ return SOCKET_ERROR; } - int sys_shutdown (int s, int how) { @@ -5168,7 +5126,6 @@ return new_fd; } - int sys_dup2 (int src, int dst) { @@ -5872,7 +5829,7 @@ shutdown_handler ensures that buffers' autosave files are up to date when the user logs off, or the system shuts down. */ -BOOL WINAPI +static BOOL WINAPI shutdown_handler (DWORD type) { /* Ctrl-C and Ctrl-Break are already suppressed, so don't handle them. */ @@ -5905,7 +5862,6 @@ g_b_init_open_process_token = 0; g_b_init_get_token_information = 0; g_b_init_lookup_account_sid = 0; - g_b_init_get_sid_identifier_authority = 0; g_b_init_get_sid_sub_authority = 0; g_b_init_get_sid_sub_authority_count = 0; g_b_init_get_file_security = 0; ------------------------------------------------------------ revno: 101648 committer: Michael Albinus branch nick: trunk timestamp: Mon 2010-09-27 17:34:04 +0200 message: * dbusbind.c (dbus_fd_cb, xd_get_dispatch_status) (xd_pending_messages): Functions removed. (xd_read_queued_messages): Add parameters fd, *data, for_read in order to be compatible with add_read_fd. Determine bus from data, and call xd_read_message just for this bus. (xd_add_watch): Use xd_read_queued_messages as callback function. Add data. * lisp.h (xd_pending_messages, xd_read_queued_messages): Remove. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-09-27 15:03:58 +0000 +++ src/ChangeLog 2010-09-27 15:34:04 +0000 @@ -1,3 +1,15 @@ +2010-09-27 Michael Albinus + + * dbusbind.c (dbus_fd_cb, xd_get_dispatch_status) + (xd_pending_messages): Functions removed. + (xd_read_queued_messages): Add parameters fd, *data, for_read in + order to be compatible with add_read_fd. Determine bus from data, + and call xd_read_message just for this bus. + (xd_add_watch): Use xd_read_queued_messages as callback function. + Add data. + + * lisp.h (xd_pending_messages, xd_read_queued_messages): Remove. + 2010-09-27 Lars Magne Ingebrigtsen * gnutls.c (gnutls_log_function): Added more debugging. === modified file 'src/dbusbind.c' --- src/dbusbind.c 2010-09-26 16:20:01 +0000 +++ src/dbusbind.c 2010-09-27 15:34:04 +0000 @@ -800,16 +800,7 @@ return connection; } -/* Callback called when something is read to read ow write. */ - -static void -dbus_fd_cb (int fd, void *data, int for_read) -{ - xd_read_queued_messages (); -} - /* Return the file descriptor for WATCH, -1 if not found. */ - static int xd_find_watch_fd (DBusWatch *watch) { @@ -824,9 +815,11 @@ return fd; } +/* Prototype. */ +static void +xd_read_queued_messages (int fd, void *data, int for_read); /* Start monitoring WATCH for possible I/O. */ - static dbus_bool_t xd_add_watch (DBusWatch *watch, void *data) { @@ -843,9 +836,9 @@ if (dbus_watch_get_enabled (watch)) { if (flags & DBUS_WATCH_WRITABLE) - add_write_fd (fd, dbus_fd_cb, NULL); + add_write_fd (fd, xd_read_queued_messages, data); if (flags & DBUS_WATCH_READABLE) - add_read_fd (fd, dbus_fd_cb, NULL); + add_read_fd (fd, xd_read_queued_messages, data); } return TRUE; } @@ -853,7 +846,6 @@ /* Stop monitoring WATCH for possible I/O. DATA is the used bus, either a string or QCdbus_system_bus or QCdbus_session_bus. */ - static void xd_remove_watch (DBusWatch *watch, void *data) { @@ -862,8 +854,8 @@ XD_DEBUG_MESSAGE ("fd %d", fd); - if (fd == -1) return; - + if (fd == -1) + return; /* Unset session environment. */ if (data != NULL && data == (void*) XHASH (QCdbus_session_bus)) @@ -879,7 +871,6 @@ } /* Toggle monitoring WATCH for possible I/O. */ - static void xd_toggle_watch (DBusWatch *watch, void *data) { @@ -1613,54 +1604,9 @@ return Qt; } -/* Check, whether there is pending input in the message queue of the - D-Bus BUS. BUS is either a Lisp symbol, :system or :session, or a - string denoting the bus address. */ -int -xd_get_dispatch_status (Lisp_Object bus) -{ - DBusConnection *connection; - - /* Open a connection to the bus. */ - connection = xd_initialize (bus, FALSE); - if (connection == NULL) return FALSE; - - /* Non blocking read of the next available message. */ - dbus_connection_read_write (connection, 0); - - /* Return. */ - return - (dbus_connection_get_dispatch_status (connection) - == DBUS_DISPATCH_DATA_REMAINS) - ? TRUE : FALSE; -} - -/* Check for queued incoming messages from the buses. */ -int -xd_pending_messages (void) -{ - Lisp_Object busp = Vdbus_registered_buses; - - while (!NILP (busp)) - { - /* We do not want to have an autolaunch for the session bus. */ - if (EQ ((CAR_SAFE (busp)), QCdbus_session_bus) - && getenv ("DBUS_SESSION_BUS_ADDRESS") == NULL) - continue; - - if (xd_get_dispatch_status (CAR_SAFE (busp))) - return TRUE; - - busp = CDR_SAFE (busp); - } - - return FALSE; -} - /* Read one queued incoming message of the D-Bus BUS. BUS is either a Lisp symbol, :system or :session, or a string denoting the bus address. */ - static void xd_read_message_1 (DBusConnection *connection, Lisp_Object bus) { @@ -1814,7 +1760,6 @@ /* Read queued incoming messages of the D-Bus BUS. BUS is either a Lisp symbol, :system or :session, or a string denoting the bus address. */ - static Lisp_Object xd_read_message (Lisp_Object bus) { @@ -1830,19 +1775,28 @@ return Qnil; } -/* Read queued incoming messages from all buses. */ -void -xd_read_queued_messages (void) +/* Callback called when something is ready to read or write. */ +static void +xd_read_queued_messages (int fd, void *data, int for_read) { Lisp_Object busp = Vdbus_registered_buses; - + Lisp_Object bus = Qnil; + + /* Find bus related to fd. */ + if (data != NULL) + while (!NILP (busp)) + { + if (data == (void*) XHASH (CAR_SAFE (busp))) + bus = CAR_SAFE (busp); + busp = CDR_SAFE (busp); + } + + if (NILP(bus)) + return; + + /* We ignore all Lisp errors during the call. */ xd_in_read_queued_messages = 1; - while (!NILP (busp)) - { - /* We ignore all Lisp errors during the call. */ - internal_catch (Qdbus_error, xd_read_message, CAR_SAFE (busp)); - busp = CDR_SAFE (busp); - } + internal_catch (Qdbus_error, xd_read_message, bus); xd_in_read_queued_messages = 0; } === modified file 'src/lisp.h' --- src/lisp.h 2010-09-25 09:36:36 +0000 +++ src/lisp.h 2010-09-27 15:34:04 +0000 @@ -3593,8 +3593,6 @@ #ifdef HAVE_DBUS /* Defined in dbusbind.c */ -int xd_pending_messages (void); -void xd_read_queued_messages (void); void syms_of_dbusbind (void); #endif ------------------------------------------------------------ revno: 101647 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Mon 2010-09-27 17:03:58 +0200 message: (emacs_gnutls_read): Don't infloop while reading. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-09-27 14:35:22 +0000 +++ src/ChangeLog 2010-09-27 15:03:58 +0000 @@ -1,6 +1,7 @@ 2010-09-27 Lars Magne Ingebrigtsen * gnutls.c (gnutls_log_function): Added more debugging. + (emacs_gnutls_read): Don't infloop while reading. 2010-09-27 Kenichi Handa === modified file 'src/gnutls.c' --- src/gnutls.c 2010-09-27 14:35:22 +0000 +++ src/gnutls.c 2010-09-27 15:03:58 +0000 @@ -67,12 +67,11 @@ { register int rtnval; - do { - rtnval = gnutls_read (state, buf, nbyte); - } while (rtnval == GNUTLS_E_INTERRUPTED || rtnval == GNUTLS_E_AGAIN); - fsync (STDOUT_FILENO); - - return (rtnval); + rtnval = gnutls_read (state, buf, nbyte); + if (rtnval >= 0) + return rtnval; + else + return -1; } /* convert an integer error to a Lisp_Object; it will be either a @@ -268,8 +267,8 @@ state = XPROCESS (proc)->gnutls_state; - gnutls_global_set_log_level(4); - gnutls_global_set_log_function(gnutls_log_function); + //gnutls_global_set_log_level(4); + //gnutls_global_set_log_function(gnutls_log_function); /* always initialize globals. */ global_init = gnutls_emacs_global_init (); ------------------------------------------------------------ revno: 101646 committer: Juanma Barranquero branch nick: trunk timestamp: Mon 2010-09-27 16:56:27 +0200 message: Fix typos in ChangeLogs. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-09-27 14:35:22 +0000 +++ lisp/ChangeLog 2010-09-27 14:56:27 +0000 @@ -1524,8 +1524,7 @@ 2010-08-26 David Reitter * server.el (server-visit-files): Run pre-command-hook and - post-command-hook for each buffer while it is current - (Bug#6910). + post-command-hook for each buffer while it is current (Bug#6910). (server-execute): Do not run hooks here. 2010-08-26 Michael Albinus @@ -1866,10 +1865,10 @@ 2010-08-22 Leo Fix buffer-list rename&refresh after killing a buffer in ido. - * lisp/ido.el: Revert Óscar's. + * ido.el: Revert Óscar's. (ido-kill-buffer-at-head): Exit the minibuffer with ido-exit=refresh. Remember the buffers at head, rather than their name. - * lisp/iswitchb.el (iswitchb-kill-buffer): Re-make the list. + * iswitchb.el (iswitchb-kill-buffer): Re-make the list. 2010-08-22 Kirk Kelsey (tiny change) Stefan Monnier @@ -3383,7 +3382,7 @@ 2010-06-22 Dan Nicolaescu Fix vc-annotate for renamed files when using Git. - * vc-git.el (vc-git-find-revision): Deal with empty results from + * vc/vc-git.el (vc-git-find-revision): Deal with empty results from ls-files. Doe not pass the object as a file name to cat-file, it is not a file name. (vc-git-annotate-command): Pass the file name using -- to avoid @@ -3404,28 +3403,28 @@ 2010-06-22 Dan Nicolaescu Fix annotating other revisions for renamed files in vc-annotate. - * vc-annotate.el (vc-annotate): Add an optional argument for the + * vc/vc-annotate.el (vc-annotate): Add an optional argument for the VC backend. Use it when non-nil. (vc-annotate-warp-revision): Pass the VC backend to vc-annotate. (Bug#6487) Fix vc-annotate-show-changeset-diff-revision-at-line for git. - * vc-annotate.el (vc-annotate-show-diff-revision-at-line-internal): + * vc/vc-annotate.el (vc-annotate-show-diff-revision-at-line-internal): Do not pass the file name to the 'previous-revision call when we don't want a file diff. (Bug#6489) 2010-06-21 Dan Nicolaescu Fix finding revisions for renamed files in vc-annotate. - * vc.el (vc-find-revision): Add an optional argument for + * vc/vc.el (vc-find-revision): Add an optional argument for the VC backend. Use it when non-nil. - * vc-annotate.el (vc-annotate-find-revision-at-line): Pass the VC + * vc/vc-annotate.el (vc-annotate-find-revision-at-line): Pass the VC backend to vc-find-revision. (Bug#6487) 2010-06-21 Dan Nicolaescu Fix reading file names in Git annotate buffers. - * vc-git.el (vc-git-annotate-extract-revision-at-line): Remove + * vc/vc-git.el (vc-git-annotate-extract-revision-at-line): Remove trailing whitespace. Suggested by Eric Hanchrow. (Bug#6481) 2010-06-20 Alan Mackenzie @@ -3472,7 +3471,7 @@ 2010-06-16 Stefan Monnier - * vc-annotate.el (vc-annotate): Use vc-read-revision. + * vc/vc-annotate.el (vc-annotate): Use vc-read-revision. 2010-06-16 Glenn Morris @@ -3490,7 +3489,7 @@ 2010-06-16 Bob Rogers (tiny change) - * vc-svn.el (vc-svn-after-dir-status): Fix regexp for Subversions + * vc/vc-svn.el (vc-svn-after-dir-status): Fix regexp for Subversions older than version 1.6. (Bug#6361) 2010-06-16 Helmut Eller @@ -4210,7 +4209,7 @@ * bs.el, expand.el, ido.el, image-dired.el, lpr.el, pcomplete.el, * skeleton.el, term.el, time.el, wid-edit.el, woman.el, * calc/calc-graph.el, calc/calc-help.el, calc/calc-incom.el, - * calc/calc.el, emacs-cl-extra.el, emacs-cl-loaddefs.el, + * calc/calc.el, emacs-lisp/cl-extra.el, emacs-lips/cl-loaddefs.el, * emulation/cua-rect.el, emulation/viper-ex.el, eshell/esh-test.el, * eshell/eshell.el, gnus/gnus-uu.el, gnus/nndoc.el, gnus/nnrss.el, * gnus/rfc2047.el, gnus/utf7.el, international/utf-7.el, @@ -4881,7 +4880,7 @@ 2010-05-07 Christian von Roques (tiny change) - * lisp/epg.el (epg-key-capablity-alist): Add "D" flag (Bug#5592). + * epg.el (epg-key-capablity-alist): Add "D" flag (Bug#5592). 2010-05-07 Katsumi Yamaoka @@ -5529,25 +5528,25 @@ 2010-04-18 Jay Belanger - * calc.el (calc-mode-map): Bind "O" to `calc-missing-key'. + * calc/calc.el (calc-mode-map): Bind "O" to `calc-missing-key'. - * calc-bin.el (calc-radix): Have the "O" option turn on + * calc/calc-bin.el (calc-radix): Have the "O" option turn on twos-complement mode. 2010-04-17 Jay Belanger - * calc-ext.el (calc-init-extensions): Add keybinding for 'calc-option'. - Add `calc-option-prefix-help' to calc-help autoloads. + * calc/calc-ext.el (calc-init-extensions): Add keybinding for + 'calc-option'. Add `calc-option-prefix-help' to calc-help autoloads. (calc-inverse): Add "Option" to message, as appropriate. (calc-hyperbolic): Add "Option" to message, as appropriate. (calc-option, calc-is-option): New functions. - * calc-help.el (calc-full-help): Add `calc-option-help'. + * calc/calc-help.el (calc-full-help): Add `calc-option-help'. (calc-option-prefix-help): New function. - * calc-misc.el (calc-help): Add "Option" entry. + * calc/calc-misc.el (calc-help): Add "Option" entry. - * calc.el (calc-local-var-list): Add `calc-option-flag'. + * calc/calc.el (calc-local-var-list): Add `calc-option-flag'. (calc-option-flag): New variable. (calc-do): Set `calc-option-flag to nil. (calc-set-mode-line): Add "Opt " as appropriate. @@ -6118,9 +6117,9 @@ 2010-03-27 Nick Roberts Restore GDB/MI fuctionality removed by r99212. - * lisp/progmodes/gdb-mi.el: Restore. - * lisp/progmodes/gdb-ui.el: Remove. - * lisp/progmodes/gud.el: Re-accommodate for gdb-mi.el. + * progmodes/gdb-mi.el: Restore. + * progmodes/gdb-ui.el: Remove. + * progmodes/gud.el: Re-accommodate for gdb-mi.el. 2010-03-25 Glenn Morris @@ -6803,11 +6802,6 @@ * files.el (hack-local-variables-filter): For eval forms, also check safe-local-variable-p (Bug#5636). -2010-02-24 Eduard Wiebe - - * javascript.el (wisent-javascript-jv-expand-tag): Avoid c(ad)ddr - and use c(ad)r of cddr (Bug#5640). - 2010-02-22 Michael Albinus * net/tramp.el (tramp-do-copy-or-rename-file-out-of-band): Protect === modified file 'lisp/ChangeLog.3' --- lisp/ChangeLog.3 2010-07-24 11:53:19 +0000 +++ lisp/ChangeLog.3 2010-09-27 14:56:27 +0000 @@ -172,7 +172,7 @@ Choose string< or < as predicate. Reorder messages by exchanging them, with inhibit-quit bound. (rmail-fetch-field): Start by widening. - (rmail-sortable-date-strng): Deleted. + (rmail-sortable-date-string): Deleted. (rmail-make-date-sortable): New function, used instead. * paths.el (gnus-local-organization): Renamed from ...-your-... === modified file 'lisp/cedet/ChangeLog' --- lisp/cedet/ChangeLog 2010-09-25 18:55:16 +0000 +++ lisp/cedet/ChangeLog 2010-09-27 14:56:27 +0000 @@ -524,6 +524,11 @@ * ede/make.el (ede-make-check-version): Use with-current-buffer instead of save-excursion. +2010-02-24 Eduard Wiebe + + * semantic/wisent/javascript.el (wisent-javascript-jv-expand-tag): + Avoid c(ad)ddr and use c(ad)r of cddr (Bug#5640). + 2010-02-16 Chong Yidong * data-debug.el (data-debug): Move to extensions group. === modified file 'lisp/org/ChangeLog' --- lisp/org/ChangeLog 2010-09-25 12:04:35 +0000 +++ lisp/org/ChangeLog 2010-09-27 14:56:27 +0000 @@ -373,7 +373,7 @@ 2010-07-19 Carsten Dominik - * org.el (org-confirm-shell-link-function): + * org.el (org-confirm-shell-link-function) (org-confirm-elisp-link-function): Limit the values that can be set by file variables. @@ -391,8 +391,7 @@ * org-capture.el (org-capture-position-for-last-stored) (org-capture-bookmark-last-stored-position): New functions. (org-capture-place-table-line): Better error catching. - (org-capture-place-item): - (org-capture-place-entry): + (org-capture-place-item, org-capture-place-entry) (org-capture-place-plain-text): Call `org-capture-position-for-last-stored'. (org-capture-finalize): Just call @@ -449,7 +448,7 @@ * org-macs.el (org-not-nil): Return the value if not interpreted as nil. - * org.el (org-entry-get): + * org.el (org-entry-get) (org-entry-get-with-inheritance): Interpret the value "nil" as nil for properties. @@ -481,9 +480,7 @@ * org.el (org-timestamp-change): New optional argument UPDOWN. Use this to identify calls from org-timestamp-up/down, so that we can skip by rounding minutes in this case. - (org-timestamp-up): - (org-timestamp-down): - (org-timestamp-up-day): + (org-timestamp-up, org-timestamp-down, org-timestamp-up-day) (org-timestamp-down-day): Call org-timestamp-change with the updown argument. @@ -546,7 +543,7 @@ 2010-07-19 Bastien Guerry - * org-agenda.el (org-agenda-get-deadlines): + * org-agenda.el (org-agenda-get-deadlines) (org-agenda-get-scheduled): * org.el (org-time-string-to-seconds): For deadline and scheduled agenda display ignore the cyclic repeater @@ -5064,8 +5061,8 @@ * org.el (org-global-properties-fixed): Add default for CLOCK_MODELINE_TOTAL. - * org-clock.el (org-clock-sum): Accept lists and strigs as tstart - andd tend. + * org-clock.el (org-clock-sum): Accept lists and strings as tstart + and tend. (org-clock-sum-current-item): Optional argument TSTART, pass it to org-clock-sum. (org-clock-get-sum-start): New function. @@ -8029,7 +8026,7 @@ set-text-properties to remove text properties from the clipboard value. - * lisp/org-clock.el (org-update-mode-line): Support limiting the + * org-clock.el (org-update-mode-line): Support limiting the modeline clock string, and display the full todo value in the tooltip. Set a local keymap so mouse-3 on the clock string goes to the currently clocked task. ------------------------------------------------------------ revno: 101645 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Mon 2010-09-27 16:35:22 +0200 message: Add debugging to the gnutls library, and finish handshaking when it's done. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-09-26 22:42:53 +0000 +++ lisp/ChangeLog 2010-09-27 14:35:22 +0000 @@ -1,3 +1,8 @@ +2010-09-27 Lars Magne Ingebrigtsen + + * net/gnutls.el (starttls-negotiate): Stop looping when we get a t + back. + 2010-09-26 Stefan Monnier * emacs-lisp/pcase.el (pcase-let*, pcase-let): plet -> pcase-let. === modified file 'lisp/net/gnutls.el' --- lisp/net/gnutls.el 2010-09-26 15:30:44 +0000 +++ lisp/net/gnutls.el 2010-09-27 14:35:22 +0000 @@ -80,13 +80,11 @@ (let ((ret 'gnutls-e-again) (n 25000)) - (while (and (not (gnutls-error-fatalp ret)) + (while (and (not (eq ret t)) + (not (gnutls-error-fatalp ret)) (> n 0)) (setq n (1- n)) - (gnutls-message-maybe - (setq ret (gnutls-handshake proc)) - "handshake: %s") - ;(debug "handshake ret" ret (gnutls-error-string ret))) + (setq ret (gnutls-handshake proc)) ) (if (gnutls-errorp ret) (progn === modified file 'src/ChangeLog' --- src/ChangeLog 2010-09-27 11:53:44 +0000 +++ src/ChangeLog 2010-09-27 14:35:22 +0000 @@ -1,3 +1,7 @@ +2010-09-27 Lars Magne Ingebrigtsen + + * gnutls.c (gnutls_log_function): Added more debugging. + 2010-09-27 Kenichi Handa These changes are to remove restriction on the number of glyphs in === modified file 'src/gnutls.c' --- src/gnutls.c 2010-09-26 06:06:28 +0000 +++ src/gnutls.c 2010-09-27 14:35:22 +0000 @@ -221,6 +221,10 @@ return gnutls_make_error (GNUTLS_E_SUCCESS); } +static void gnutls_log_function (int level, const char* string) { + message("debug: %s", string); +} + DEFUN ("gnutls-boot", Fgnutls_boot, Sgnutls_boot, 3, 6, 0, doc: /* Initializes client-mode GnuTLS for process PROC. Currently only client mode is supported. Returns a success/failure @@ -264,6 +268,9 @@ state = XPROCESS (proc)->gnutls_state; + gnutls_global_set_log_level(4); + gnutls_global_set_log_function(gnutls_log_function); + /* always initialize globals. */ global_init = gnutls_emacs_global_init (); if (! NILP (Fgnutls_errorp (global_init))) @@ -272,19 +279,13 @@ /* deinit and free resources. */ if (GNUTLS_INITSTAGE (proc) >= GNUTLS_STAGE_CRED_ALLOC) { - message ("gnutls: deallocating certificates"); - if (EQ (type, Qgnutls_x509pki)) { - message ("gnutls: deallocating x509 certificates"); - x509_cred = XPROCESS (proc)->x509_cred; gnutls_certificate_free_credentials (x509_cred); } else if (EQ (type, Qgnutls_anon)) { - message ("gnutls: deallocating anon certificates"); - anon_cred = XPROCESS (proc)->anon_cred; gnutls_anon_free_client_credentials (anon_cred); } @@ -296,28 +297,20 @@ if (GNUTLS_INITSTAGE (proc) >= GNUTLS_STAGE_INIT) { - message ("gnutls: deinitializing"); - Fgnutls_deinit (proc); } } GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_EMPTY; - message ("gnutls: allocating credentials"); - if (EQ (type, Qgnutls_x509pki)) { - message ("gnutls: allocating x509 credentials"); - x509_cred = XPROCESS (proc)->x509_cred; if (gnutls_certificate_allocate_credentials (&x509_cred) < 0) memory_full (); } else if (EQ (type, Qgnutls_anon)) { - message ("gnutls: allocating anon credentials"); - anon_cred = XPROCESS (proc)->anon_cred; if (gnutls_anon_allocate_client_credentials (&anon_cred) < 0) memory_full (); @@ -333,8 +326,6 @@ GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_CRED_ALLOC; - message ("gnutls: setting the trustfile"); - if (EQ (type, Qgnutls_x509pki)) { if (STRINGP (trustfile)) @@ -346,12 +337,8 @@ if (ret < GNUTLS_E_SUCCESS) return gnutls_make_error (ret); - - message ("gnutls: processed %d CA certificates", ret); } - message ("gnutls: setting the keyfile"); - if (STRINGP (keyfile)) { ret = gnutls_certificate_set_x509_crl_file @@ -361,15 +348,11 @@ if (ret < GNUTLS_E_SUCCESS) return gnutls_make_error (ret); - - message ("gnutls: processed %d CRL(s)", ret); } } GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_FILES; - message ("gnutls: gnutls_init"); - ret = gnutls_init (&state, GNUTLS_CLIENT); if (ret < GNUTLS_E_SUCCESS) @@ -379,8 +362,6 @@ GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_INIT; - message ("gnutls: setting the priority string"); - ret = gnutls_priority_set_direct(state, (char*) SDATA (priority_string), NULL); @@ -490,15 +471,14 @@ GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_TRANSPORT_POINTERS_SET; } - message ("gnutls: handshake: handshaking"); ret = gnutls_handshake (state); - GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_HANDSHAKE_TRIED; - if (GNUTLS_E_SUCCESS == ret) + if (GNUTLS_E_SUCCESS == ret || ret == 0) { /* here we're finally done. */ GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_READY; + return Qt; } return gnutls_make_error (ret); ------------------------------------------------------------ revno: 101644 author: Lars Magne Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2010-09-27 13:22:21 +0000 message: nnimap.el (utf7): Required. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-09-27 12:22:22 +0000 +++ lisp/gnus/ChangeLog 2010-09-27 13:22:21 +0000 @@ -1,3 +1,10 @@ +2010-09-27 Lars Magne Ingebrigtsen + + * nnimap.el (utf7): Required. + + * message.el (message-cite-prefix-regexp): Remove "}" from citation + prefix. + 2010-09-27 Juanma Barranquero * nnmail.el (nnmail-fancy-expiry-targets): Fix typo in docstring. === modified file 'lisp/gnus/nnimap.el' --- lisp/gnus/nnimap.el 2010-09-27 12:22:22 +0000 +++ lisp/gnus/nnimap.el 2010-09-27 13:22:21 +0000 @@ -37,6 +37,7 @@ (require 'gnus) (require 'nnoo) (require 'netrc) +(require 'utf7) (require 'parse-time) (nnoo-declare nnimap) ------------------------------------------------------------ revno: 101643 author: Gnus developers committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2010-09-27 12:22:22 +0000 message: gnus-html.el (gnus-html-wash-tags): Decode URL entities to avoid handing broken links to browse-url. nnimap.el (nnimap-request-accept-article): Message the error on error. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-09-27 11:53:44 +0000 +++ lisp/gnus/ChangeLog 2010-09-27 12:22:22 +0000 @@ -2,10 +2,20 @@ * nnmail.el (nnmail-fancy-expiry-targets): Fix typo in docstring. +2010-09-27 Lars Magne Ingebrigtsen + + * nnimap.el (nnimap-request-accept-article): Message the error on + error. + 2010-09-27 Katsumi Yamaoka * gnus-art.el (gnus-mime-delete-part): Fix Lisp type of byte(s). +2010-09-26 Florian Ragwitz + + * gnus-html.el (gnus-html-wash-tags): Decode URL entities to avoid + handing broken links to browse-url. + 2010-09-26 Lars Magne Ingebrigtsen * nndoc.el (nndoc-request-list): Return success always. === modified file 'lisp/gnus/gnus-html.el' --- lisp/gnus/gnus-html.el 2010-09-26 23:01:31 +0000 +++ lisp/gnus/gnus-html.el 2010-09-27 12:22:22 +0000 @@ -286,7 +286,7 @@ (setq url (match-string 1 parameters)) (gnus-message 8 "gnus-html-wash-tags: fetching link URL %s" url) (gnus-article-add-button start end - 'browse-url url + 'browse-url (mm-url-decode-entities-string url) url) (let ((overlay (gnus-make-overlay start end))) (gnus-overlay-put overlay 'evaporate t) === modified file 'lisp/gnus/nnimap.el' --- lisp/gnus/nnimap.el 2010-09-26 23:01:31 +0000 +++ lisp/gnus/nnimap.el 2010-09-27 12:22:22 +0000 @@ -772,7 +772,10 @@ "\n" "\r\n")) (let ((result (nnimap-get-response sequence))) - (when result + (if (not (car result)) + (progn + (message "%s" (nnheader-get-report-string 'nnimap)) + nil) (cons group (nnimap-find-article-by-message-id group message-id)))))))) ------------------------------------------------------------ revno: 101642 committer: Juanma Barranquero branch nick: trunk timestamp: Mon 2010-09-27 13:53:44 +0200 message: Fix typos. diff: === modified file 'lisp/ChangeLog.8' --- lisp/ChangeLog.8 2010-08-01 04:37:41 +0000 +++ lisp/ChangeLog.8 2010-09-27 11:53:44 +0000 @@ -1172,7 +1172,7 @@ 1999-12-03 Kenichi Handa - * international/mule-util.el (truncate-string-to-width): Docsting + * international/mule-util.el (truncate-string-to-width): Docstring fixed. 1999-12-02 Stefan Monnier === modified file 'lisp/ChangeLog.9' --- lisp/ChangeLog.9 2010-09-25 12:04:35 +0000 +++ lisp/ChangeLog.9 2010-09-27 11:53:44 +0000 @@ -5773,7 +5773,7 @@ 2001-02-05 Kenichi Handa * isearch.el (isearch-forward): Add description about input method - in the docsting. + in the docstring. 2001-02-04 Stefan Monnier @@ -19040,7 +19040,7 @@ (fontset-default-styles): Likewise. (x-modify-font-name): Function removed. (create-fontset-from-fontset-spec): Ignore the argument STYLE-VARIANT. - (create-fontset-from-ascii-font): Docsting adjusted for the above + (create-fontset-from-ascii-font): Docstring adjusted for the above change. (instantiate-fontset, resolve-fontset-name): Functions removed. (fontset-list): Now implemented by C code. === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-09-27 03:16:55 +0000 +++ lisp/gnus/ChangeLog 2010-09-27 11:53:44 +0000 @@ -1,3 +1,7 @@ +2010-09-27 Juanma Barranquero + + * nnmail.el (nnmail-fancy-expiry-targets): Fix typo in docstring. + 2010-09-27 Katsumi Yamaoka * gnus-art.el (gnus-mime-delete-part): Fix Lisp type of byte(s). === modified file 'lisp/gnus/nnmail.el' --- lisp/gnus/nnmail.el 2010-09-23 00:30:37 +0000 +++ lisp/gnus/nnmail.el 2010-09-27 11:53:44 +0000 @@ -225,7 +225,7 @@ In this case, articles containing the string \"boss\" in the To or the From header will be expired to the group \"nnfolder:Work\"; -articles containing the sting \"IMPORTANT\" in the Subject header will +articles containing the string \"IMPORTANT\" in the Subject header will be expired to the group \"nnfolder:IMPORTANT.YYYY.MMM\"; and everything else will be expired to \"nnfolder:Archive-YYYY\"." :version "22.1" === modified file 'src/ChangeLog' --- src/ChangeLog 2010-09-27 10:25:04 +0000 +++ src/ChangeLog 2010-09-27 11:53:44 +0000 @@ -1038,7 +1038,7 @@ 2010-08-18 Jan Djärv - * gtkutil.c (update_frame_tool_bar): Literal stings are const char*. + * gtkutil.c (update_frame_tool_bar): Literal strings are const char*. 2010-08-18 David De La Harpe Golden ------------------------------------------------------------ revno: 101641 committer: Juanma Barranquero branch nick: trunk timestamp: Mon 2010-09-27 12:25:04 +0200 message: Fix typos in ChangeLogs. diff: === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2010-09-25 21:42:48 +0000 +++ lib-src/ChangeLog 2010-09-27 10:25:04 +0000 @@ -4,9 +4,9 @@ 2010-08-11 Jan Djärv - * fakemail.c: Include stdlib.h for getenv. Remove declaration of + * fakemail.c: Include stdlib.h for getenv. Remove declaration of popen, fclose and pclose. - (my_name, fatal, error, put_line): Use const char* + (my_name, fatal, error, put_line): Use const char*. (main): Remove extern getenv, mail_program_name is const char*. * update-game-score.c (get_prefix, write_scores, main): Use const char*. @@ -16,7 +16,7 @@ * pop.h (pop_multi_first): Use const char *. (_ARGS): Remove. - * pop.c (pop_multi_first, socket_connection, sendline): Use conat char*. + * pop.c (pop_multi_first, socket_connection, sendline): Use const char*. * movemail.c (fatal, error, concat): Use const char *. @@ -61,7 +61,7 @@ 2010-08-06 Dan Nicolaescu * emacsclient.c: Move socket related #includes together with the - rest of the #includes. Move a WINDOWSNT includes closer together. + rest of the #includes. Move WINDOWSNT includes closer together. (HAVE_CONFIG_H): Remove. (NO_RETURN): Remove, defined in config.h. (main): Convert definition to standard C. @@ -164,7 +164,7 @@ (fatal): Make static. (error): Likewise. (pfatal_with_name): Likewise. - (pfatal_and_delete). Likewise. + (pfatal_and_delete): Likewise. (concat): Likewise. (xmalloc): Likewise. (popmail): Likewise. === modified file 'src/ChangeLog' --- src/ChangeLog 2010-09-27 05:42:43 +0000 +++ src/ChangeLog 2010-09-27 10:25:04 +0000 @@ -39,21 +39,21 @@ (write_mask): New variable. (max_input_desc): Renamed from max_keyboard_desc. (fd_callback_info): New variable. - (add_read_fd, delete_read_fd, add_write_fd, delete_write_fd): New - functions. + (add_read_fd, delete_read_fd, add_write_fd, delete_write_fd): + New functions. (Fmake_network_process): FD_SET write_mask. (deactivate_process): FD_CLR write_mask. (wait_reading_process_output): Connecting renamed to Writeok. - check_connect removed. check_write is new. Remove references to - gpm. Use Writeok/check_write unconditionally (i.e. no #ifdef + check_connect removed. check_write is new. Remove references to gpm. + Use Writeok/check_write unconditionally (i.e. no #ifdef NON_BLOCKING_CONNECT) instead of Connecting. Loop over file descriptors and call callbacks in fd_callback_info if file descriptor is ready for I/O. (add_gpm_wait_descriptor): Just call add_keyboard_wait_descriptor. (delete_gpm_wait_descriptor): Just call delete_keyboard_wait_descriptor. (keyboard_bit_set): Use max_input_desc. - (add_keyboard_wait_descriptor, delete_keyboard_wait_descriptor): Remove - #ifdef subprocesses. Use max_input_desc. + (add_keyboard_wait_descriptor, delete_keyboard_wait_descriptor): + Remove #ifdef subprocesses. Use max_input_desc. (init_process): Initialize write_mask and fd_callback_info. * keyboard.c (readable_events, gobble_input): Remove DBUS code. @@ -61,20 +61,20 @@ * dbusbind.c: Include process.h. (dbus_fd_cb, xd_find_watch_fd, xd_toggle_watch) (xd_read_message_1): New functions. - (xd_add_watch, xd_remove_watch): Call xd_find_watch_fd. Handle - watch for both read and write. + (xd_add_watch, xd_remove_watch): Call xd_find_watch_fd. + Handle watch for both read and write. (Fdbus_init_bus): Also register xd_toggle_watch. (Fdbus_call_method_asynchronously, Fdbus_method_return_internal) (Fdbus_method_error_internal, Fdbus_send_signal): Remove call to dbus_connection_flush. - (xd_read_message): Move most of the code to xd_read_message_1. + (xd_read_message): Move most of the code to xd_read_message_1. Call xd_read_message_1 until status is COMPLETE. 2010-09-26 Dan Nicolaescu * term.c: Do not include sys/ioctl.h, not needed. - (init_tty): Reorder code to reduce the number of #ifdefs. No code - changes. + (init_tty): Reorder code to reduce the number of #ifdefs. + No code changes. 2010-09-26 Teodor Zlatanov @@ -2997,7 +2997,7 @@ (smc_save_yourself_CB, x_session_initialize): Use SSDATA for strings passed to strlen/strcpy/strcat. (create_client_leader_window): Surround with #ifndef USE_GTK. Cast - 7:th arg to XChangeProperty to (unsigned char *) + 7:th arg to XChangeProperty to (unsigned char *). * xsettings.c (something_changedCB, parse_settings) (apply_xft_settings): Reformat prototype. ------------------------------------------------------------ revno: 101640 [merge] committer: Kenichi Handa branch nick: trunk timestamp: Mon 2010-09-27 14:55:41 +0900 message: Remove restriction on the number of glyphs in one composition. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-09-26 20:48:13 +0000 +++ src/ChangeLog 2010-09-27 05:42:43 +0000 @@ -1,3 +1,29 @@ +2010-09-27 Kenichi Handa + + These changes are to remove restriction on the number of glyphs in + one composition. + + * dispextern.h (struct glyph): Change the member "slice" to union. + Remove u.cmp.from and u.cmp.to. Give more bits to u.cmp.id. + (GLYPH_SLICE_EQUAL_P): Adjusted for the above change. + + * dispnew.c (buffer_posn_from_coords): Use glyph->slice.img + instead of glyph->slice. + (marginal_area_string): Likewise. + + * term.c (encode_terminal_code): Use glyph->slice.cmp instead of + glyph->u.cmp. + (append_composite_glyph): Likewise. + + * xdisp.c (dump_glyph): Use glyph->slice.cmp instead of + glyph->u.cmp. + (fill_gstring_glyph_string, x_get_glyph_overhangs) + (append_composite_glyph): Likewise. + (fill_image_glyph_string): Use glyph->slice.img instead of + glyph->slice. + (append_glyph, produce_image_glyph, append_stretch_glyph) + (note_mouse_highlight): Likewise. + 2010-09-26 Jan Djärv * process.c (add_keyboard_wait_descriptor) === modified file 'src/dispextern.h' --- src/dispextern.h 2010-09-25 16:39:13 +0000 +++ src/dispextern.h 2010-09-27 05:42:43 +0000 @@ -394,7 +394,15 @@ w32_char_font_type. Otherwise it equals FONT_TYPE_UNKNOWN. */ unsigned font_type : 3; - struct glyph_slice slice; + /* A union of sub-structures for different glyph types. */ + union + { + /* Metrics of a partial glyph of an image (type == IMAGE_GLYPH). */ + struct glyph_slice img; + /* Start and end indices of glyphs of a graphme cluster of a + composition (type == COMPOSITE_GLYPH). */ + struct { int from, to; } cmp; + } slice; /* A union of sub-structures for different glyph types. */ union @@ -402,16 +410,13 @@ /* Character code for character glyphs (type == CHAR_GLYPH). */ unsigned ch; - /* Sub-structures for type == COMPOSITION_GLYPH. */ + /* Sub-structures for type == COMPOSITE_GLYPH. */ struct { /* Flag to tell if the composition is automatic or not. */ unsigned automatic : 1; /* ID of the composition. */ - unsigned id : 23; - /* Start and end indices of glyphs of the composition. */ - unsigned from : 4; - unsigned to : 4; + unsigned id : 31; } cmp; /* Image ID for image glyphs (type == IMAGE_GLYPH). */ @@ -443,13 +448,21 @@ #define CHAR_GLYPH_SPACE_P(GLYPH) \ ((GLYPH).u.ch == SPACEGLYPH && (GLYPH).face_id == DEFAULT_FACE_ID) -/* Are glyph slices of glyphs *X and *Y equal */ - -#define GLYPH_SLICE_EQUAL_P(X, Y) \ - ((X)->slice.x == (Y)->slice.x \ - && (X)->slice.y == (Y)->slice.y \ - && (X)->slice.width == (Y)->slice.width \ - && (X)->slice.height == (Y)->slice.height) +/* Are glyph slices of glyphs *X and *Y equal? It assumes that both + glyphs have the same type. + + Note: for composition glyphs, we don't have to compare slice.cmp.to + because they should be the same if and only if slice.cmp.from are + the same. */ + +#define GLYPH_SLICE_EQUAL_P(X, Y) \ + ((X)->type == IMAGE_GLYPH \ + ? ((X)->slice.img.x == (Y)->slice.img.x \ + && (X)->slice.img.y == (Y)->slice.img.y \ + && (X)->slice.img.width == (Y)->slice.img.width \ + && (X)->slice.img.height == (Y)->slice.img.height) \ + : ((X)->type != COMPOSITE_GLYPH \ + || (X)->slice.cmp.from == (Y)->slice.cmp.from)) /* Are glyphs *X and *Y displayed equal? */ === modified file 'src/dispnew.c' --- src/dispnew.c 2010-09-24 17:48:10 +0000 +++ src/dispnew.c 2010-09-27 05:42:43 +0000 @@ -5460,8 +5460,8 @@ if (img) { *dy -= row->ascent - glyph->ascent; - *dx += glyph->slice.x; - *dy += glyph->slice.y; + *dx += glyph->slice.img.x; + *dy += glyph->slice.img.y; /* Image slices positions are still relative to the entire image */ *width = img->width; *height = img->height; @@ -5627,8 +5627,8 @@ if (img != NULL) *object = img->spec; y0 -= row->ascent - glyph->ascent; - x0 += glyph->slice.x; - y0 += glyph->slice.y; + x0 += glyph->slice.img.x; + y0 += glyph->slice.img.y; } #endif } === modified file 'src/term.c' --- src/term.c 2010-09-26 15:06:21 +0000 +++ src/term.c 2010-09-27 05:42:43 +0000 @@ -594,7 +594,7 @@ if (src->u.cmp.automatic) { gstring = composition_gstring_from_id (src->u.cmp.id); - required = src->u.cmp.to + 1 - src->u.cmp.from; + required = src->slice.cmp.to + 1 - src->slice.cmp.from; } else { @@ -611,7 +611,7 @@ } if (src->u.cmp.automatic) - for (i = src->u.cmp.from; i <= src->u.cmp.to; i++) + for (i = src->slice.cmp.from; i <= src->slice.cmp.to; i++) { Lisp_Object g = LGSTRING_GLYPH (gstring, i); int c = LGLYPH_CHAR (g); @@ -1791,8 +1791,8 @@ { glyph->u.cmp.automatic = 1; glyph->u.cmp.id = it->cmp_it.id; - glyph->u.cmp.from = it->cmp_it.from; - glyph->u.cmp.to = it->cmp_it.to - 1; + glyph->slice.cmp.from = it->cmp_it.from; + glyph->slice.cmp.to = it->cmp_it.to - 1; } glyph->face_id = it->face_id; === modified file 'src/xdisp.c' --- src/xdisp.c 2010-09-25 16:39:13 +0000 +++ src/xdisp.c 2010-09-27 05:42:43 +0000 @@ -16219,7 +16219,7 @@ if (glyph->u.cmp.automatic) fprintf (stderr, "[%d-%d]", - glyph->u.cmp.from, glyph->u.cmp.to); + glyph->slice.cmp.from, glyph->slice.cmp.to); fprintf (stderr, " . %4d %1.1d%1.1d\n", glyph->face_id, glyph->left_box_line_p, @@ -20605,8 +20605,8 @@ glyph = s->row->glyphs[s->area] + start; last = s->row->glyphs[s->area] + end; s->cmp_id = glyph->u.cmp.id; - s->cmp_from = glyph->u.cmp.from; - s->cmp_to = glyph->u.cmp.to + 1; + s->cmp_from = glyph->slice.cmp.from; + s->cmp_to = glyph->slice.cmp.to + 1; s->face = FACE_FROM_ID (s->f, face_id); lgstring = composition_gstring_from_id (s->cmp_id); s->font = XFONT_OBJECT (LGSTRING_FONT (lgstring)); @@ -20614,8 +20614,8 @@ while (glyph < last && glyph->u.cmp.automatic && glyph->u.cmp.id == s->cmp_id - && s->cmp_to == glyph->u.cmp.from) - s->cmp_to = (glyph++)->u.cmp.to + 1; + && s->cmp_to == glyph->slice.cmp.from) + s->cmp_to = (glyph++)->slice.cmp.to + 1; for (i = s->cmp_from; i < s->cmp_to; i++) { @@ -20705,7 +20705,7 @@ xassert (s->first_glyph->type == IMAGE_GLYPH); s->img = IMAGE_FROM_ID (s->f, s->first_glyph->u.img_id); xassert (s->img); - s->slice = s->first_glyph->slice; + s->slice = s->first_glyph->slice.img; s->face = FACE_FROM_ID (s->f, s->first_glyph->face_id); s->font = s->face->font; s->width = s->first_glyph->pixel_width; @@ -20811,8 +20811,8 @@ Lisp_Object gstring = composition_gstring_from_id (glyph->u.cmp.id); struct font_metrics metrics; - composition_gstring_width (gstring, glyph->u.cmp.from, - glyph->u.cmp.to + 1, &metrics); + composition_gstring_width (gstring, glyph->slice.cmp.from, + glyph->slice.cmp.to + 1, &metrics); if (metrics.rbearing > metrics.width) *right = metrics.rbearing - metrics.width; if (metrics.lbearing < 0) @@ -21517,7 +21517,7 @@ glyph->glyph_not_available_p = it->glyph_not_available_p; glyph->face_id = it->face_id; glyph->u.ch = it->char_to_display; - glyph->slice = null_glyph_slice; + glyph->slice.img = null_glyph_slice; glyph->font_type = FONT_TYPE_UNKNOWN; if (it->bidi_p) { @@ -21574,13 +21574,14 @@ { glyph->u.cmp.automatic = 0; glyph->u.cmp.id = it->cmp_it.id; + glyph->slice.cmp.from = glyph->slice.cmp.to = 0; } else { glyph->u.cmp.automatic = 1; glyph->u.cmp.id = it->cmp_it.id; - glyph->u.cmp.from = it->cmp_it.from; - glyph->u.cmp.to = it->cmp_it.to - 1; + glyph->slice.cmp.from = it->cmp_it.from; + glyph->slice.cmp.to = it->cmp_it.to - 1; } glyph->avoid_cursor_p = it->avoid_cursor_p; glyph->multibyte_p = it->multibyte_p; @@ -21591,7 +21592,6 @@ glyph->padding_p = 0; glyph->glyph_not_available_p = 0; glyph->face_id = it->face_id; - glyph->slice = null_glyph_slice; glyph->font_type = FONT_TYPE_UNKNOWN; if (it->bidi_p) { @@ -21770,7 +21770,7 @@ glyph->glyph_not_available_p = 0; glyph->face_id = it->face_id; glyph->u.img_id = img->id; - glyph->slice = slice; + glyph->slice.img = slice; glyph->font_type = FONT_TYPE_UNKNOWN; if (it->bidi_p) { @@ -21831,7 +21831,7 @@ glyph->face_id = it->face_id; glyph->u.stretch.ascent = ascent; glyph->u.stretch.height = height; - glyph->slice = null_glyph_slice; + glyph->slice.img = null_glyph_slice; glyph->font_type = FONT_TYPE_UNKNOWN; if (it->bidi_p) { @@ -24519,8 +24519,8 @@ if ((image_map = Fplist_get (XCDR (img->spec), QCmap), !NILP (image_map)) && (hotspot = find_hot_spot (image_map, - glyph->slice.x + dx, - glyph->slice.y + dy), + glyph->slice.img.x + dx, + glyph->slice.img.y + dy), CONSP (hotspot)) && (hotspot = XCDR (hotspot), CONSP (hotspot))) { ------------------------------------------------------------ Use --include-merges or -n0 to see merged revisions.