From 2fc88dcc2551856ae7c2c709421c64d3af5aa3aa Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Wed, 31 Oct 2007 00:22:34 +0000 Subject: [PATCH 01/53] (shadow-inhibit-overload, shadow-remove-from-todo, shadow-insert-var): Doc fixes. (shadow-file-match, shadow-define-cluster, shadow-define-regexp-group): Reflow docstrings. (shadow-parse-fullname, shadow-read-files): Fix typos in docstrings. --- lisp/ChangeLog | 8 ++++++++ lisp/shadowfile.el | 29 +++++++++++++++-------------- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e9794cb4055..9deefd183f2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2007-10-31 Juanma Barranquero + + * shadowfile.el (shadow-inhibit-overload, shadow-remove-from-todo) + (shadow-insert-var): Doc fixes. + (shadow-file-match, shadow-define-cluster, shadow-define-regexp-group): + Reflow docstrings. + (shadow-parse-fullname, shadow-read-files): Fix typos in docstrings. + 2007-10-30 Juanma Barranquero * ediff-hook.el (ediff, ediff-files, ediff-buffers, ebuffers, ediff3) diff --git a/lisp/shadowfile.el b/lisp/shadowfile.el index d1de8be3910..8e970919721 100644 --- a/lisp/shadowfile.el +++ b/lisp/shadowfile.el @@ -103,8 +103,8 @@ is no buffer currently visiting the file." (defcustom shadow-inhibit-overload nil "If non-nil, shadowfile won't redefine \\[save-buffers-kill-emacs]. -Normally it overloads the function `save-buffers-kill-emacs' to check -for files have been changed and need to be copied to other systems." +Normally it overloads the function `save-buffers-kill-emacs' to check for +files that have been changed and need to be copied to other systems." :type 'boolean :group 'shadow) @@ -305,7 +305,7 @@ be matched against the primary of SITE2." (defun shadow-parse-fullname (fullname) "Parse FULLNAME into \(site user path) list. -Leave it alone if it already is one. Returns nil if the argument is +Leave it alone if it already is one. Return nil if the argument is not a full ange-ftp pathname." (if (listp fullname) fullname @@ -398,9 +398,9 @@ local filename." "Return t if PATTERN matches FILE. If REGEXP is supplied and non-nil, the file part of the pattern is a regular expression, otherwise it must match exactly. The sites and usernames must -match---see `shadow-same-site'. The pattern must be in full ange-ftp format, but -the file can be any valid filename. This function does not do any filename -expansion or contraction, you must do that yourself first." +match---see `shadow-same-site'. The pattern must be in full ange-ftp format, +but the file can be any valid filename. This function does not do any +filename expansion or contraction, you must do that yourself first." (let* ((pattern-sup (shadow-parse-fullname pattern)) (file-sup (shadow-parse-name file))) (and (shadow-same-site pattern-sup file-sup) @@ -418,8 +418,8 @@ expansion or contraction, you must do that yourself first." This is a group of hosts that share directories, so that copying to or from one of them is sufficient to update the file on all of them. Clusters are defined by a name, the network address of a primary host \(the one we copy -files to), and a regular expression that matches the hostnames of all the sites -in the cluster." +files to), and a regular expression that matches the hostnames of all the +sites in the cluster." (interactive (list (completing-read "Cluster name: " shadow-clusters () ()))) (let* ((old (shadow-get-cluster name)) (primary (read-string "Primary host: " @@ -475,8 +475,8 @@ specific hostnames, or names of clusters \(see `shadow-define-cluster')." "Make each of a group of files be shared between hosts. Prompts for regular expression; files matching this are shared between a list of sites, which are also prompted for. The filenames must be identical on all -hosts \(if they aren't, use `shadow-define-literal-group' instead of this function). -Each site can be either a hostname or the name of a cluster \(see +hosts \(if they aren't, use `shadow-define-literal-group' instead of this +function). Each site can be either a hostname or the name of a cluster \(see `shadow-define-cluster')." (interactive) (let ((regexp (read-string @@ -647,7 +647,7 @@ Consider them as regular expressions if third arg REGEXP is true." (defun shadow-remove-from-todo (pair) "Remove PAIR from `shadow-files-to-copy'. -PAIR must be (eq to) one of the elements of that list." +PAIR must be `eq' to one of the elements of that list." (setq shadow-files-to-copy (shadow-remove-if (function (lambda (s) (eq s pair))) shadow-files-to-copy))) @@ -655,7 +655,7 @@ PAIR must be (eq to) one of the elements of that list." (defun shadow-read-files () "Visit and load `shadow-info-file' and `shadow-todo-file'. Thus restores shadowfile's state from your last Emacs session. -Returns t unless files were locked; then returns nil." +Return t unless files were locked; then return nil." (interactive) (if (and (fboundp 'file-locked-p) (or (stringp (file-locked-p shadow-info-file)) @@ -731,8 +731,9 @@ With non-nil argument also saves the buffer." (setq shadow-hashtable (make-vector 37 0))) (defun shadow-insert-var (variable) - "Prettily insert a `setq' command for VARIABLE, -which, when later evaluated, will restore it to its current setting. + "Build a `setq' to restore VARIABLE. +Prettily insert a `setq' command which, when later evaluated, +will restore VARIABLE to its current setting. VARIABLE must be the name of a variable whose value is a list." (let ((standard-output (current-buffer))) (insert (format "(setq %s" variable)) From 377eafa4bb4cd9b0e09f898848d96bdd1e6c067d Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 31 Oct 2007 03:01:49 +0000 Subject: [PATCH 02/53] *** empty log message *** --- admin/FOR-RELEASE | 2 ++ 1 file changed, 2 insertions(+) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index c1557d32635..1a0d5a8b55a 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -59,6 +59,8 @@ http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg00519.html I proposed a patch, which fixed this and seemed right, but the patch caused other problems. They are being investigated now. +** usenet@pusto.de, Oct 17: minor bug in footnote.el + * DOCUMENTATION ** Check the Emacs Tutorial. From 1cf46be3ab3cc3e6011f8073433578a2b83d28af Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 31 Oct 2007 03:16:56 +0000 Subject: [PATCH 03/53] (install): Change ownership of installed files. --- leim/ChangeLog | 4 ++++ leim/Makefile.in | 1 + 2 files changed, 5 insertions(+) diff --git a/leim/ChangeLog b/leim/ChangeLog index 9475635653d..2beefa938ee 100644 --- a/leim/ChangeLog +++ b/leim/ChangeLog @@ -1,3 +1,7 @@ +2007-10-31 Glenn Morris + + * Makefile.in (install): Change ownership of installed files. + 2007-10-24 Juanma Barranquero * quail/indian.el (quail-indian-update-preceding-char): diff --git a/leim/Makefile.in b/leim/Makefile.in index 188ac81c880..d2dcd8bfa70 100644 --- a/leim/Makefile.in +++ b/leim/Makefile.in @@ -251,6 +251,7 @@ install: all done) \ else true; fi -chmod -R a+r ${INSTALLDIR} + -find ${INSTALLDIR} -exec chown $${LOGNAME:-$$USERNAME} '{}' ';' clean mostlyclean: rm -f ${TIT-MISC} ${TIT-MISC:.elc=.el} \ From 20ba690ce00c42cc2be78778ba32caba76491b8c Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Wed, 31 Oct 2007 09:02:14 +0000 Subject: [PATCH 04/53] (msb--many-menus): Remove variable. (msb-max-menu-items, msb--add-to-menu): Doc fixes. (msb-menu-cond, msb-item-handling-function, msb--create-function-info) (msb--toggle-menu-type): Fix typos in docstrings. --- lisp/msb.el | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/lisp/msb.el b/lisp/msb.el index 11c9cfc4d37..81ad924ccd4 100644 --- a/lisp/msb.el +++ b/lisp/msb.el @@ -190,9 +190,6 @@ 3099 "Other files (%d)"))) -;; msb--many-menus is obsolete -(defvar msb--many-menus msb--very-many-menus) - ;;; ;;; Customizable variables ;;; @@ -235,12 +232,12 @@ A value of nil means don't display this menu. MENU-TITLE is really a format. If you add %d in it, the %d is replaced with the number of items in that menu. -ITEM-HANDLING-FN, is optional. If it is supplied and is a function, -than it is used for displaying the items in that particular buffer +ITEM-HANDLING-FN is optional. If it is supplied and is a function, +then it is used for displaying the items in that particular buffer menu, otherwise the function pointed out by `msb-item-handling-function' is used. -ITEM-SORT-FN, is also optional. +ITEM-SORT-FN is also optional. If it is not supplied, the function pointed out by `msb-item-sort-function' is used. If it is nil, then no sort takes place and the buffers are presented @@ -282,7 +279,7 @@ that differs by this value or more." (defcustom msb-max-menu-items 15 "*The maximum number of items in a menu. If this variable is set to 15 for instance, then the submenu will be -split up in minor parts, 15 items each. nil means no limit." +split up in minor parts, 15 items each. A value of nil means no limit." :type '(choice integer (const nil)) :set 'msb-custom-set :group 'msb) @@ -336,7 +333,7 @@ names that starts with a space character." "*The appearance of a buffer menu. The default function to call for handling the appearance of a menu -item. It should take to arguments, BUFFER and MAX-BUFFER-NAME-LENGTH, +item. It should take two arguments, BUFFER and MAX-BUFFER-NAME-LENGTH, where the latter is the max length of all buffer names. The function should return the string to use in the menu. @@ -664,7 +661,7 @@ If the argument is left out or nil, then the current buffer is considered." (defun msb--create-function-info (menu-cond-elt) "Create a vector from an element MENU-COND-ELT of `msb-menu-cond'. This takes the form: -\]BUFFER-LIST-VARIABLE CONDITION MENU-SORT-KEY MENU-TITLE ITEM-HANDLER SORTER) +\[BUFFER-LIST-VARIABLE CONDITION MENU-SORT-KEY MENU-TITLE ITEM-HANDLER SORTER] See `msb-menu-cond' for a description of its elements." (let* ((list-symbol (make-symbol "-msb-buffer-list")) (tmp-ih (and (> (length menu-cond-elt) 3) @@ -727,7 +724,7 @@ See `msb-menu-cond' for a description of its elements." (defun msb--add-to-menu (buffer function-info max-buffer-name-length) "Add BUFFER to the menu depicted by FUNCTION-INFO. All side-effects. Adds an element of form (BUFFER-TITLE . BUFFER) -to the buffer-list variable in function-info." +to the buffer-list variable in FUNCTION-INFO." (let ((list-symbol (aref function-info 0))) ;BUFFER-LIST-VARIABLE ;; Here comes the hairy side-effect! (set list-symbol @@ -961,7 +958,7 @@ It takes the form ((TITLE . BUFFER-LIST)...)." (msb--create-buffer-menu-2)))) (defun msb--toggle-menu-type () - "Multi purpose function for selecting a buffer with the mouse." + "Multi-purpose function for selecting a buffer with the mouse." (interactive) (setq msb-files-by-directory (not msb-files-by-directory)) ;; This gets a warning, but it is correct, From 5126b171eaefd2e59570f2f1f10665d39565fd6b Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Wed, 31 Oct 2007 09:15:32 +0000 Subject: [PATCH 05/53] *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9deefd183f2..05ca05027b8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2007-10-31 Juanma Barranquero + * msb.el (msb--many-menus): Remove variable. + (msb-max-menu-items, msb--add-to-menu): Doc fixes. + (msb-menu-cond, msb-item-handling-function, msb--create-function-info) + (msb--toggle-menu-type): Fix typos in docstrings. + * shadowfile.el (shadow-inhibit-overload, shadow-remove-from-todo) (shadow-insert-var): Doc fixes. (shadow-file-match, shadow-define-cluster, shadow-define-regexp-group): From 7837948ffc1fd83f8d285e27f14e2acfaa9a01b3 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Wed, 31 Oct 2007 09:40:12 +0000 Subject: [PATCH 06/53] [USE_ATSUI] (Fmac_atsu_font_face_attributes): Fix conversion from Lisp object to ATSUFontID. --- src/ChangeLog | 5 +++++ src/macfns.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 8ee05c00808..c69eb2db180 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2007-10-31 YAMAMOTO Mitsuharu + + * macfns.c [USE_ATSUI] (Fmac_atsu_font_face_attributes): + Fix conversion from Lisp object to ATSUFontID. + 2007-10-30 Jason Rumney * xdisp.c (Fformat_mode_line): Do nothing when noninteractive. diff --git a/src/macfns.c b/src/macfns.c index 1139158f165..f2d435eb740 100644 --- a/src/macfns.c +++ b/src/macfns.c @@ -4621,8 +4621,8 @@ ID is specified by either an integer or a float. */) Lisp_Object result; check_mac (); - CHECK_NUMBER_OR_FLOAT(id); - font_id = NUMBERP (id) ? XINT (id) : (ATSUFontID) XFLOAT (id); + CHECK_NUMBER_OR_FLOAT (id); + font_id = INTEGERP (id) ? XINT (id) : XFLOAT_DATA (id); BLOCK_INPUT; result = mac_atsu_font_face_attributes (font_id); UNBLOCK_INPUT; From 1cc5b8f8b42d62bd7fbc80077ee8a68bee2fb39c Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Wed, 31 Oct 2007 12:09:33 +0000 Subject: [PATCH 07/53] (elp-report-limit, elp-restore-all, elp-unset-master, elp-results): Fix typos. (elp-sort-by-function, elp-use-standard-output, elp-recycle-buffers-p): Doc fixes. --- lisp/emacs-lisp/elp.el | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lisp/emacs-lisp/elp.el b/lisp/emacs-lisp/elp.el index ed09599f4dd..eeeb72a3c3d 100644 --- a/lisp/emacs-lisp/elp.el +++ b/lisp/emacs-lisp/elp.el @@ -147,16 +147,16 @@ Results are displayed with the `elp-results' command." :group 'elp) (defcustom elp-sort-by-function 'elp-sort-by-total-time - "*Non-nil specifies elp results sorting function. + "*Non-nil specifies ELP results sorting function. These functions are currently available: elp-sort-by-call-count -- sort by the highest call count elp-sort-by-total-time -- sort by the highest total time elp-sort-by-average-time -- sort by the highest average times -You can write you're own sort function. It should adhere to the -interface specified by the PRED argument for the `sort' defun. Each -\"element of LIST\" is really a 4 element vector where element 0 is +You can write your own sort function. It should adhere to the +interface specified by the PREDICATE argument for `sort'. +Each \"element of LIST\" is really a 4 element vector where element 0 is the call count, element 1 is the total time spent in the function, element 2 is the average time spent in the function, and element 3 is the symbol's name string." @@ -164,7 +164,7 @@ the symbol's name string." :group 'elp) (defcustom elp-report-limit 1 - "*Prevents some functions from being displayed in the results buffer. + "*Prevent some functions from being displayed in the results buffer. If a number, no function that has been called fewer than that number of times will be displayed in the output buffer. If nil, all functions will be displayed." @@ -173,12 +173,12 @@ functions will be displayed." :group 'elp) (defcustom elp-use-standard-output nil - "*Non-nil says to output to `standard-output' instead of a buffer." + "*If non-nil, output to `standard-output' instead of a buffer." :type 'boolean :group 'elp) (defcustom elp-recycle-buffers-p t - "*nil says to not recycle the `elp-results-buffer'. + "*If nil, don't recycle the `elp-results-buffer'. In other words, a new unique buffer is create every time you run \\[elp-results]." :type 'boolean @@ -372,7 +372,7 @@ Use optional LIST if provided instead." (mapcar 'elp-restore-function list))) (defun elp-restore-all () - "Restores the original definitions of all functions being profiled." + "Restore the original definitions of all functions being profiled." (interactive) (elp-restore-list elp-all-instrumented-list)) @@ -412,7 +412,7 @@ Use optional LIST if provided instead." (elp-instrument-function funsym))) (defun elp-unset-master () - "Unsets the master function." + "Unset the master function." (interactive) ;; when there's no master function, recording is turned on by default. (setq elp-master nil @@ -558,7 +558,7 @@ original definition, use \\[elp-restore-function] or \\[elp-restore-all]." (defun elp-results () "Display current profiling results. If `elp-reset-after-results' is non-nil, then current profiling -information for all instrumented functions are reset after results are +information for all instrumented functions is reset after results are displayed." (interactive) (let ((curbuf (current-buffer)) From e87d7cb441781106511411d68982286f9add486b Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Wed, 31 Oct 2007 12:19:55 +0000 Subject: [PATCH 08/53] *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 05ca05027b8..ebd92a40033 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2007-10-31 Juanma Barranquero + * emacs-lisp/elp.el (elp-report-limit, elp-restore-all) + (elp-unset-master, elp-results): Fix typos. + (elp-sort-by-function, elp-use-standard-output, elp-recycle-buffers-p): + Doc fixes. + * msb.el (msb--many-menus): Remove variable. (msb-max-menu-items, msb--add-to-menu): Doc fixes. (msb-menu-cond, msb-item-handling-function, msb--create-function-info) From 59e1bd2913bfeb01d12f0ba419aa63d6cd00a604 Mon Sep 17 00:00:00 2001 From: Vinicius Jose Latorre Date: Wed, 31 Oct 2007 12:46:29 +0000 Subject: [PATCH 09/53] Default argument for find-library --- lisp/ChangeLog | 5 +++++ lisp/emacs-lisp/find-func.el | 20 +++++++++++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ebd92a40033..7aa77756e45 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-10-31 Sean O'Rourke + + * emacs-lisp/find-func.el (find-library): use library at + point as default interactive argument. + 2007-10-31 Juanma Barranquero * emacs-lisp/elp.el (elp-report-limit, elp-restore-all) diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index 6a259ffd4f7..ede196721ae 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -194,11 +194,21 @@ TYPE should be nil to find a function, or `defvar' to find a variable." (defun find-library (library) "Find the elisp source of LIBRARY." (interactive - (list - (completing-read "Library name: " - 'locate-file-completion - (cons (or find-function-source-path load-path) - (find-library-suffixes))))) + (let* ((path (cons (or find-function-source-path load-path) + (find-library-suffixes))) + (def (if (eq (function-called-at-point) 'require) + (save-excursion + (backward-up-list) + (forward-char) + (backward-sexp -2) + (thing-at-point 'symbol)) + (thing-at-point 'symbol)))) + (when def + (setq def (and (locate-file-completion def path 'test) def))) + (list + (completing-read (if def (format "Library name (default %s): " def) + "Library name: ") + 'locate-file-completion path nil nil nil def)))) (let ((buf (find-file-noselect (find-library-name library)))) (condition-case nil (switch-to-buffer buf) (error (pop-to-buffer buf))))) From f5d47fb2622a7503f90bfba3503d254af3da11b4 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Wed, 31 Oct 2007 13:07:03 +0000 Subject: [PATCH 10/53] (strokes-alphabetic-lessp): Doc fix. --- lisp/ChangeLog | 6 +++++- lisp/strokes.el | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7aa77756e45..cf0e02ddfb4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,10 @@ +2007-10-31 Juanma Barranquero + + * strokes.el (strokes-alphabetic-lessp): Doc fix. + 2007-10-31 Sean O'Rourke - * emacs-lisp/find-func.el (find-library): use library at + * emacs-lisp/find-func.el (find-library): Use library at point as default interactive argument. 2007-10-31 Juanma Barranquero diff --git a/lisp/strokes.el b/lisp/strokes.el index de4123453f5..8f6d57b10a0 100644 --- a/lisp/strokes.el +++ b/lisp/strokes.el @@ -1370,7 +1370,7 @@ If STROKES-MAP is not given, `strokes-global-map' will be used instead." (goto-char (point-min)))) (defun strokes-alphabetic-lessp (stroke1 stroke2) - "T if command name for STROKE1 is less than STROKE2's in lexicographic order." + "Return t if STROKE1's command name precedes STROKE2's in lexicographic order." (let ((command-name-1 (symbol-name (cdr stroke1))) (command-name-2 (symbol-name (cdr stroke2)))) (string-lessp command-name-1 command-name-2))) From 6341c3fc0b4da35afa56b6c2008a4b56201ef9a9 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Wed, 31 Oct 2007 15:59:19 +0000 Subject: [PATCH 11/53] (whitespace-write-file-hook): Remove interactive spec. (whitespace-unload-function): New-style unload function. If run, stop old style `-hook' function from running. --- lisp/ChangeLog | 4 ++++ lisp/whitespace.el | 13 ++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cf0e02ddfb4..2ab695c5bdd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2007-10-31 Juanma Barranquero + * whitespace.el (whitespace-write-file-hook): Remove interactive spec. + (whitespace-unload-function): New-style unload function. + If run, stop old style `-hook' function from running. + * strokes.el (strokes-alphabetic-lessp): Doc fix. 2007-10-31 Sean O'Rourke diff --git a/lisp/whitespace.el b/lisp/whitespace.el index 3ea8394b0b7..0251618f099 100644 --- a/lisp/whitespace.el +++ b/lisp/whitespace.el @@ -782,7 +782,6 @@ When this mode is active, `whitespace-buffer' is added to (defun whitespace-write-file-hook () "Hook function to be called on the buffer when whitespace check is enabled. This is meant to be added buffer-locally to `write-file-functions'." - (interactive) (let ((werr nil)) (if whitespace-auto-cleanup (whitespace-cleanup-internal) @@ -792,6 +791,18 @@ This is meant to be added buffer-locally to `write-file-functions'." buffer-file-name)))) nil) +(defun whitespace-unload-function () + "Unload the whitespace library." + (whitespace-global-mode -1) + (save-current-buffer + (dolist (buf (buffer-list)) + (set-buffer buf) + (remove-hook 'write-file-functions 'whitespace-write-file-hook t))) + ;; new-style unloading, stop old style from running + (with-no-warnings (setq whitespace-unload-hook nil)) + ;; continue standard unloading + nil) + (defun whitespace-unload-hook () (remove-hook 'find-file-hook 'whitespace-buffer) (remove-hook 'write-file-functions 'whitespace-write-file-hook t) From 89242dda1535be54a1540858b17e4444147e496c Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Wed, 31 Oct 2007 18:14:41 +0000 Subject: [PATCH 12/53] (dired-copy-file-recursive): Preserve directory permissions. --- lisp/ChangeLog | 5 +++++ lisp/dired-aux.el | 13 +++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2ab695c5bdd..e1720346d26 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-10-31 Sven Joachim + + * dired-aux.el (dired-copy-file-recursive): + Preserve directory permissions. + 2007-10-31 Juanma Barranquero * whitespace.el (whitespace-write-file-hook): Remove interactive spec. diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 4d9849cd534..8d0f184eb7c 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -1162,7 +1162,8 @@ Special value `always' suppresses confirmation." (or (eq recursive 'always) (yes-or-no-p (format "Recursive copies of %s? " from)))) ;; This is a directory. - (let ((files + (let ((mode (file-modes from)) + (files (condition-case err (directory-files from nil dired-re-no-dot) (file-error @@ -1176,7 +1177,9 @@ Special value `always' suppresses confirmation." (if (file-exists-p to) (or top (dired-handle-overwrite to)) (condition-case err - (make-directory to) + (progn + (make-directory to) + (set-file-modes to #o700)) (file-error (push (dired-make-relative from) dired-create-files-failures) @@ -1195,7 +1198,9 @@ Special value `always' suppresses confirmation." (file-error (push (dired-make-relative thisfrom) dired-create-files-failures) - (dired-log "Copying error for %s:\n%s\n" thisfrom err)))))) + (dired-log "Copying error for %s:\n%s\n" thisfrom err))))) + (when (file-directory-p to) + (set-file-modes to mode))) ;; Not a directory. (or top (dired-handle-overwrite to)) (condition-case err @@ -1203,7 +1208,7 @@ Special value `always' suppresses confirmation." ;; It is a symlink (make-symbolic-link (car attrs) to ok-flag) (copy-file from to ok-flag dired-copy-preserve-time)) - (file-date-error + (file-date-error (push (dired-make-relative from) dired-create-files-failures) (dired-log "Can't set date on %s:\n%s\n" from err)))))) From 3e1da21463d582c0f3c9f989c435b5021d09741f Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Wed, 31 Oct 2007 18:45:14 +0000 Subject: [PATCH 13/53] (whitespace-unload-function): New-style unload function. When run, unintern `whitespace-unload-hook' and call `unload-feature' recursively to stop the old hook from messing with the unloading. --- lisp/ChangeLog | 5 +++-- lisp/whitespace.el | 21 ++++++++++++--------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e1720346d26..c6326fed8c3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -6,8 +6,9 @@ 2007-10-31 Juanma Barranquero * whitespace.el (whitespace-write-file-hook): Remove interactive spec. - (whitespace-unload-function): New-style unload function. - If run, stop old style `-hook' function from running. + (whitespace-unload-function): New-style unload function. When run, + unintern `whitespace-unload-hook' and call `unload-feature' recursively + to stop the old hook from messing with the unloading. * strokes.el (strokes-alphabetic-lessp): Doc fix. diff --git a/lisp/whitespace.el b/lisp/whitespace.el index 0251618f099..9c3a6cc18d8 100644 --- a/lisp/whitespace.el +++ b/lisp/whitespace.el @@ -793,15 +793,18 @@ This is meant to be added buffer-locally to `write-file-functions'." (defun whitespace-unload-function () "Unload the whitespace library." - (whitespace-global-mode -1) - (save-current-buffer - (dolist (buf (buffer-list)) - (set-buffer buf) - (remove-hook 'write-file-functions 'whitespace-write-file-hook t))) - ;; new-style unloading, stop old style from running - (with-no-warnings (setq whitespace-unload-hook nil)) - ;; continue standard unloading - nil) + (if (unintern "whitespace-unload-hook") + ;; if whitespace-unload-hook is defined, let's get rid of it + ;; and recursively call `unload-feature' + (progn (unload-feature 'whitespace) t) + ;; this only happens in the recursive call + (whitespace-global-mode -1) + (save-current-buffer + (dolist (buf (buffer-list)) + (set-buffer buf) + (remove-hook 'write-file-functions 'whitespace-write-file-hook t))) + ;; continue standard unloading + nil)) (defun whitespace-unload-hook () (remove-hook 'find-file-hook 'whitespace-buffer) From f2196d574189da79aec3e99dd157c7d932bd531b Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Wed, 31 Oct 2007 20:48:52 +0000 Subject: [PATCH 14/53] *** empty log message *** --- lisp/ChangeLog | 6 ++++++ lisp/net/tramp.el | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c6326fed8c3..452d7d7707d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2007-10-31 Michael Albinus + + * net/tramp.el (tramp-open-connection-telnet) + (tramp-open-connection-rsh, tramp-open-connection-su) + (tramp-open-connection-multi): Set $LC_ALL to "C". + 2007-10-31 Sven Joachim * dired-aux.el (dired-copy-file-recursive): diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 4bff0f8ee3f..d40d0c75813 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -5712,6 +5712,7 @@ Maybe the different regular expressions need to be tuned. (or user (user-login-name)) host method) (let ((process-environment (copy-sequence process-environment))) (setenv "TERM" tramp-terminal-type) + (setenv "LC_ALL" "C") (setenv "PROMPT_COMMAND") (setenv "PS1" "$ ") (let* ((default-directory (tramp-temporary-file-directory)) @@ -5794,6 +5795,7 @@ arguments, and xx will be used as the host name to connect to. (setq login-args (cons "-p" (cons (match-string 2 host) login-args))) (setq real-host (match-string 1 host))) (setenv "TERM" tramp-terminal-type) + (setenv "LC_ALL" "C") (setenv "PROMPT_COMMAND") (setenv "PS1" "$ ") (let* ((default-directory (tramp-temporary-file-directory)) @@ -5847,6 +5849,7 @@ prompt than you do, so it is not at all unlikely that the variable (or user "") method) (let ((process-environment (copy-sequence process-environment))) (setenv "TERM" tramp-terminal-type) + (setenv "LC_ALL" "C") (setenv "PROMPT_COMMAND") (setenv "PS1" "$ ") (let* ((default-directory (tramp-temporary-file-directory)) @@ -5913,6 +5916,7 @@ log in as u2 to h2." (tramp-message 7 "Opening `%s' connection..." multi-method) (let ((process-environment (copy-sequence process-environment))) (setenv "TERM" tramp-terminal-type) + (setenv "LC_ALL" "C") (setenv "PROMPT_COMMAND") (setenv "PS1" "$ ") (let* ((default-directory (tramp-temporary-file-directory)) From 62b1cb943f4b343b02778248c8e5ee206d68b601 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 1 Nov 2007 03:40:30 +0000 Subject: [PATCH 15/53] (footnote-numeric-regexp) (footnote-english-upper-regexp, footnote-english-lower-regexp) (footnote-roman-lower-regexp, footnote-roman-upper-regexp): Match multi-character footnotes. --- lisp/mail/footnote.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lisp/mail/footnote.el b/lisp/mail/footnote.el index be47032a0c2..b94f3bc8297 100644 --- a/lisp/mail/footnote.el +++ b/lisp/mail/footnote.el @@ -139,7 +139,7 @@ See also `footnote-section-tag'." ;;; Default styles ;;; NUMERIC -(defconst footnote-numeric-regexp "[0-9]" +(defconst footnote-numeric-regexp "[0-9]+" "Regexp for digits.") (defun Footnote-numeric (n) @@ -151,7 +151,7 @@ Use Arabic numerals for footnoting." (defconst footnote-english-upper "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "Upper case English alphabet.") -(defconst footnote-english-upper-regexp "[A-Z]" +(defconst footnote-english-upper-regexp "[A-Z]+" "Regexp for upper case English alphabet.") (defun Footnote-english-upper (n) @@ -170,7 +170,7 @@ Wrapping around the alphabet implies successive repetitions of letters." (defconst footnote-english-lower "abcdefghijklmnopqrstuvwxyz" "Lower case English alphabet.") -(defconst footnote-english-lower-regexp "[a-z]" +(defconst footnote-english-lower-regexp "[a-z]+" "Regexp of lower case English alphabet.") (defun Footnote-english-lower (n) @@ -191,7 +191,7 @@ Wrapping around the alphabet implies successive repetitions of letters." (50 . "l") (100 . "c") (500 . "d") (1000 . "m")) "List of roman numerals with their values.") -(defconst footnote-roman-lower-regexp "[ivxlcdm]" +(defconst footnote-roman-lower-regexp "[ivxlcdm]+" "Regexp of roman numerals.") (defun Footnote-roman-lower (n) @@ -204,7 +204,7 @@ Wrapping around the alphabet implies successive repetitions of letters." (50 . "L") (100 . "C") (500 . "D") (1000 . "M")) "List of roman numerals with their values.") -(defconst footnote-roman-upper-regexp "[IVXLCDM]" +(defconst footnote-roman-upper-regexp "[IVXLCDM]+" "Regexp of roman numerals. Not complete") (defun Footnote-roman-upper (n) @@ -270,6 +270,7 @@ Wrapping around the alphabet implies successive repetitions of letters." (defconst footnote-latin-string "¹²³ºª§¶" "String of Latin-1 footnoting characters.") +;; Note not [...]+, because this style cycles. (defconst footnote-latin-regexp (concat "[" footnote-latin-string "]") "Regexp for Latin-1 footnoting characters.") From b4a638b358651b9694738e9a610a48dddd3ebca3 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 1 Nov 2007 03:47:34 +0000 Subject: [PATCH 16/53] =?UTF-8?q?Johan=20Bockg=EF=BF=BD=20=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (x_draw_stretch_glyph_string): Don't set s->stippled_p here, since it has already been set by x_set_glyph_string_gc from x_draw_glyph_string. http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg01571.html --- src/ChangeLog | 6 ++++++ src/macterm.c | 1 - src/w32term.c | 1 - src/xterm.c | 1 - 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index c69eb2db180..1d33322996e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2007-11-01 Johan Bockg,Ae(Brd + + * macterm.c, w32term.c, xterm.c (x_draw_stretch_glyph_string): + Don't set s->stippled_p here, since it has already been set by + x_set_glyph_string_gc from x_draw_glyph_string. + 2007-10-31 YAMAMOTO Mitsuharu * macfns.c [USE_ATSUI] (Fmac_atsu_font_face_attributes): diff --git a/src/macterm.c b/src/macterm.c index 726a0f72b18..9bc96e492d3 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -3704,7 +3704,6 @@ x_draw_stretch_glyph_string (s) struct glyph_string *s; { xassert (s->first_glyph->type == STRETCH_GLYPH); - s->stippled_p = s->face->stipple != 0; if (s->hl == DRAW_CURSOR && !x_stretch_cursor_p) diff --git a/src/w32term.c b/src/w32term.c index 510f2381a6d..a2d64ba581f 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -2364,7 +2364,6 @@ x_draw_stretch_glyph_string (s) struct glyph_string *s; { xassert (s->first_glyph->type == STRETCH_GLYPH); - s->stippled_p = s->face->stipple != 0; if (s->hl == DRAW_CURSOR && !x_stretch_cursor_p) diff --git a/src/xterm.c b/src/xterm.c index ee26f054b4e..5bfd95b8aaf 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -2539,7 +2539,6 @@ x_draw_stretch_glyph_string (s) struct glyph_string *s; { xassert (s->first_glyph->type == STRETCH_GLYPH); - s->stippled_p = s->face->stipple != 0; if (s->hl == DRAW_CURSOR && !x_stretch_cursor_p) From 0ecaad6399dfabeaf13f59984f00e9d67c4f56b2 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 1 Nov 2007 03:48:55 +0000 Subject: [PATCH 17/53] Fixed: minor bug in footnote.el. --- admin/FOR-RELEASE | 2 -- lisp/ChangeLog | 7 +++++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 1a0d5a8b55a..c1557d32635 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -59,8 +59,6 @@ http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg00519.html I proposed a patch, which fixed this and seemed right, but the patch caused other problems. They are being investigated now. -** usenet@pusto.de, Oct 17: minor bug in footnote.el - * DOCUMENTATION ** Check the Emacs Tutorial. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 452d7d7707d..24334c9513a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2007-11-01 Glenn Morris + + * mail/footnote.el (footnote-numeric-regexp) + (footnote-english-upper-regexp, footnote-english-lower-regexp) + (footnote-roman-lower-regexp, footnote-roman-upper-regexp): + Match multi-character footnotes. + 2007-10-31 Michael Albinus * net/tramp.el (tramp-open-connection-telnet) From 17b159c4e46e77beb476ac63a57322adfeb159d6 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Thu, 1 Nov 2007 03:57:27 +0000 Subject: [PATCH 18/53] (printing): Fix :version, printing.el was included for in emacs-22.1. (pr-path-style, pr-path-alist, pr-txt-name) (pr-txt-printer-alist, pr-ps-name, pr-ps-printer-alist) (pr-temp-dir, pr-ps-temp-file, pr-file-modes, pr-gv-command) (pr-gs-command, pr-gs-switches, pr-gs-device, pr-gs-resolution) (pr-print-using-ghostscript, pr-file-tumble, pr-auto-region) (pr-auto-mode, pr-mode-alist, pr-ps-utility) (pr-ps-utility-alist, pr-menu-char-height, pr-menu-char-width) (pr-setting-database, pr-visible-entry-list) (pr-delete-temp-file, pr-list-directory, pr-buffer-name) (pr-buffer-name-ignore, pr-buffer-verbose): Remove incorrect :version. --- lisp/ChangeLog | 16 ++++++++++++++++ lisp/printing.el | 37 +------------------------------------ 2 files changed, 17 insertions(+), 36 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 24334c9513a..37959364533 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,19 @@ +2007-11-01 Dan Nicolaescu + + * printing.el (printing): Fix :version, printing.el was included + in emacs-22.1. + (pr-path-style, pr-path-alist, pr-txt-name) + (pr-txt-printer-alist, pr-ps-name, pr-ps-printer-alist) + (pr-temp-dir, pr-ps-temp-file, pr-file-modes, pr-gv-command) + (pr-gs-command, pr-gs-switches, pr-gs-device, pr-gs-resolution) + (pr-print-using-ghostscript, pr-file-tumble, pr-auto-region) + (pr-auto-mode, pr-mode-alist, pr-ps-utility) + (pr-ps-utility-alist, pr-menu-char-height, pr-menu-char-width) + (pr-setting-database, pr-visible-entry-list) + (pr-delete-temp-file, pr-list-directory, pr-buffer-name) + (pr-buffer-name-ignore, pr-buffer-verbose): Remove incorrect + :version. + 2007-11-01 Glenn Morris * mail/footnote.el (footnote-numeric-regexp) diff --git a/lisp/printing.el b/lisp/printing.el index 412f0b342fc..f83509d085e 100644 --- a/lisp/printing.el +++ b/lisp/printing.el @@ -1176,7 +1176,7 @@ If SUFFIX is non-nil, add that at the end of the file name." :tag "Printing Utilities" :link '(emacs-library-link :tag "Source Lisp File" "printing.el") :prefix "pr-" - :version "20" + :version "22.1" :group 'wp :group 'postscript) @@ -1196,7 +1196,6 @@ Valid values are: :type '(choice :tag "Path style" (const :tag "Windows 9x/NT Style (\\)" :value windows) (const :tag "Unix Style (/)" :value unix)) - :version "20" :group 'printing) @@ -1308,7 +1307,6 @@ Examples: :tag "Directory" (string :value "") (symbol :value symbol))))) - :version "20" :group 'printing) @@ -1323,7 +1321,6 @@ modified by other means (for example, a lisp function), use `pr-update-menus' function (see it for documentation) to update text printer menu." :type 'symbol :set 'pr-txt-name-custom-set - :version "20" :group 'printing) @@ -1456,7 +1453,6 @@ Useful links: (const :tag "None" nil) string))) :set 'pr-alist-custom-set - :version "20" :group 'printing) @@ -1471,7 +1467,6 @@ modified by other means (for example, a lisp function), use `pr-update-menus' function (see it for documentation) to update PostScript printer menu." :type 'symbol :set 'pr-ps-name-custom-set - :version "20" :group 'printing) @@ -1744,7 +1739,6 @@ Useful links: (sexp :tag "Value"))) )) :set 'pr-alist-custom-set - :version "20" :group 'printing) @@ -1763,7 +1757,6 @@ Useful links: See also `pr-ps-temp-file' and `pr-file-modes'." :type '(directory :tag "Temporary Directory") - :version "20" :group 'printing) @@ -1772,7 +1765,6 @@ See also `pr-ps-temp-file' and `pr-file-modes'." See also `pr-temp-dir' and `pr-file-modes'." :type '(file :tag "PostScript Temporary File Name") - :version "21" :group 'printing) @@ -1786,7 +1778,6 @@ It should be an integer; only the low 9 bits are used. See also `pr-temp-dir' and `pr-ps-temp-file'." :type '(integer :tag "File Permission Bits") - :version "21.3" :group 'printing) @@ -1828,7 +1819,6 @@ Useful links: `http://www.cs.wisc.edu/~ghost/macos/index.htm' " :type '(string :tag "Ghostview Utility") - :version "20" :group 'printing) @@ -1855,7 +1845,6 @@ Useful links: `http://www.cs.wisc.edu/~ghost/doc/printer.htm' " :type '(string :tag "Ghostscript Utility") - :version "20" :group 'printing) @@ -1898,7 +1887,6 @@ Useful links: `http://www.cs.wisc.edu/~ghost/doc/printer.htm' " :type '(repeat (string :tag "Ghostscript Switch")) - :version "20" :group 'printing) @@ -1915,7 +1903,6 @@ A note on the gs switches: See `pr-gs-switches' for documentation. See also `pr-ps-printer-alist'." :type '(string :tag "Ghostscript Device") - :version "20" :group 'printing) @@ -1929,7 +1916,6 @@ A note on the gs switches: See `pr-gs-switches' for documentation. See also `pr-ps-printer-alist'." :type '(integer :tag "Ghostscript Resolution") - :version "20" :group 'printing) @@ -1942,35 +1928,30 @@ ghostscript to print a PostScript file. In GNU or Unix system, if ghostscript is set as a PostScript filter, this variable should be nil." :type 'boolean - :version "20" :group 'printing) (defcustom pr-faces-p nil "*Non-nil means print with face attributes." :type 'boolean - :version "20" :group 'printing) (defcustom pr-spool-p nil "*Non-nil means spool printing in a buffer." :type 'boolean - :version "20" :group 'printing) (defcustom pr-file-landscape nil "*Non-nil means print PostScript file in landscape orientation." :type 'boolean - :version "20" :group 'printing) (defcustom pr-file-duplex nil "*Non-nil means print PostScript file in duplex mode." :type 'boolean - :version "20" :group 'printing) @@ -1982,7 +1963,6 @@ right. If tumble is on, produces a printing suitable for binding at the top or bottom." :type 'boolean - :version "20" :group 'printing) @@ -1995,7 +1975,6 @@ When this variable is non-nil, the `*-buffer*' commands will behave like `*-region*' commands, that is, `*-buffer*' commands will print only the region marked instead of all buffer." :type 'boolean - :version "20" :group 'printing) @@ -2007,7 +1986,6 @@ and `*-region*' commands will behave like `*-mode*' commands; otherwise, `*-buffer*' commands will print the current buffer and `*-region*' commands will print the current region." :type 'boolean - :version "20" :group 'printing) @@ -2208,7 +2186,6 @@ DEFAULT It's a way to set default values when this entry is selected. (variable :tag "Other")) (sexp :tag "Value"))) )) - :version "20" :group 'printing) @@ -2226,7 +2203,6 @@ NOTE: Don't forget to download and install the utilities declared on `pr-ps-utility-alist'." :type '(symbol :tag "PS File Utility") :set 'pr-ps-utility-custom-set - :version "20" :group 'printing) @@ -2439,7 +2415,6 @@ Useful links: (sexp :tag "Value"))) )) :set 'pr-alist-custom-set - :version "20" :group 'printing) @@ -2448,7 +2423,6 @@ Useful links: See also `pr-menu-char-height' and `pr-menu-char-width'." :type 'boolean - :version "20" :group 'printing) @@ -2464,7 +2438,6 @@ menu, so don't forget to adjust it if menu position is not ok. See also `pr-menu-lock' and `pr-menu-char-width'." :type 'integer - :version "20" :group 'printing) @@ -2480,7 +2453,6 @@ menu, so don't forget to adjust it if menu position is not ok. See also `pr-menu-lock' and `pr-menu-char-height'." :type 'integer - :version "20" :group 'printing) @@ -2597,7 +2569,6 @@ SETTING It's a cons like: (variable :tag "Other")) (sexp :tag "Value"))) )) - :version "20" :group 'printing) @@ -2651,7 +2622,6 @@ Any other value is ignored." (const postscript-process) (const printing) (const help))) - :version "20" :group 'printing) @@ -2663,7 +2633,6 @@ happens when printing: Error: could not open \"c:\\temp\\prspool.ps\" for reading." :type 'boolean - :version "20" :group 'printing) @@ -2677,7 +2646,6 @@ It's used by `pr-ps-directory-preview', `pr-ps-directory-using-ghostscript', `pr-ps-directory-print', `pr-ps-directory-ps-print', `pr-printify-directory' and `pr-txt-directory'." :type 'boolean - :version "20" :group 'printing) @@ -2686,7 +2654,6 @@ and `pr-txt-directory'." It's used by `pr-interface'." :type 'string - :version "20" :group 'printing) @@ -2700,7 +2667,6 @@ NOTE: Case is important for matching, that is, `case-fold-search' is always It's used by `pr-interface'." :type '(repeat (regexp :tag "Buffer Name Regexp")) - :version "20" :group 'printing) @@ -2709,7 +2675,6 @@ It's used by `pr-interface'." It's used by `pr-interface'." :type 'boolean - :version "20" :group 'printing) From 31cf791e20a025f5cde92a551b5751c972da451a Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 1 Nov 2007 04:03:12 +0000 Subject: [PATCH 19/53] (nroff-mode): Set indent-line-function. (nroff-indent-line-function): New function. (nroff-count-text-lines): Use nroff-forward-text-line rather than obsolete alias. --- lisp/ChangeLog | 5 +++++ lisp/textmodes/nroff-mode.el | 16 +++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 37959364533..ce984fb410c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -21,6 +21,11 @@ (footnote-roman-lower-regexp, footnote-roman-upper-regexp): Match multi-character footnotes. + * textmodes/nroff-mode.el (nroff-mode): Set indent-line-function. + (nroff-indent-line-function): New function. + (nroff-count-text-lines): Use nroff-forward-text-line rather than + obsolete alias. + 2007-10-31 Michael Albinus * net/tramp.el (tramp-open-connection-telnet) diff --git a/lisp/textmodes/nroff-mode.el b/lisp/textmodes/nroff-mode.el index 18156071e1c..8297bb05827 100644 --- a/lisp/textmodes/nroff-mode.el +++ b/lisp/textmodes/nroff-mode.el @@ -130,6 +130,7 @@ closing requests for requests that are used in matched pairs." (set (make-local-variable 'comment-start-skip) "\\\\\"[ \t]*") (set (make-local-variable 'comment-column) 24) (set (make-local-variable 'comment-indent-function) 'nroff-comment-indent) + (set (make-local-variable 'indent-line-function) 'nroff-indent-line-function) (set (make-local-variable 'imenu-generic-expression) nroff-imenu-expression)) (defun nroff-outline-level () @@ -161,6 +162,19 @@ Puts a full-stop before comments on a line by themselves." 9) 8)))))) ; add 9 to ensure at least two blanks (goto-char pt)))) +;; All this does is insert a "." at the start of comment-lines, +;; for the sake of comment-dwim adding a new comment on an empty line. +;; Hack! The right fix probably involves ;; comment-insert-comment-function, +;; but comment-dwim does not call that for the empty line case. +;; http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg01869.html +(defun nroff-indent-line-function () + "Function for `indent-line-function' in `nroff-mode'." + (save-excursion + (forward-line 0) + (when (looking-at "[ \t]*\\\\\"[ \t]*") ; \# does not need this + (delete-horizontal-space) + (insert ?.)))) + (defun nroff-count-text-lines (start end &optional print) "Count lines in region, except for nroff request lines. All lines not starting with a period are counted up. @@ -173,7 +187,7 @@ Noninteractively, return number of non-request lines from START to END." (save-restriction (narrow-to-region start end) (goto-char (point-min)) - (- (buffer-size) (forward-text-line (buffer-size))))))) + (- (buffer-size) (nroff-forward-text-line (buffer-size))))))) (defun nroff-forward-text-line (&optional cnt) "Go forward one nroff text line, skipping lines of nroff requests. From 9930c3c1881b4b840c0b5c5c47e609b37dbc5068 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 1 Nov 2007 08:09:02 +0000 Subject: [PATCH 20/53] (bad-packages-alist): Add an entry for standalone vc-svn. --- lisp/ChangeLog | 2 ++ lisp/simple.el | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ce984fb410c..871d799da88 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -16,6 +16,8 @@ 2007-11-01 Glenn Morris + * simple.el (bad-packages-alist): Add an entry for standalone vc-svn. + * mail/footnote.el (footnote-numeric-regexp) (footnote-english-upper-regexp, footnote-english-lower-regexp) (footnote-roman-lower-regexp, footnote-roman-upper-regexp): diff --git a/lisp/simple.el b/lisp/simple.el index e1cf249f01c..ebb200aa25d 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -5647,7 +5647,14 @@ so you can now enable CUA via the Options menu or by customizing `cua-mode'. You have loaded an older version of CUA-mode which does not work correctly with this version of Emacs. You should remove the old -version and use the one distributed with Emacs.")) +version and use the one distributed with Emacs.") + ;; vc-svn doesn't have a version variable (do we see the limitations + ;; of this approach now?), but the Emacs version uses `vc-svn-program', + ;; rather than `vc-svn-program-name', hence this hack should work. + (vc-svn-program-name t nil +"`vc-svn' is now part of the standard GNU Emacs distribution. +You have tried to load an older version which does not work as well with Emacs. +You should remove the old version and use the one distributed with Emacs.")) "Alist of packages known to cause problems in this version of Emacs. Each element has the form (PACKAGE SYMBOL REGEXP STRING). PACKAGE is either a regular expression to match file names, or a From 658674b070b70db1e8e6b7582d33f9a152e414aa Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 1 Nov 2007 08:12:58 +0000 Subject: [PATCH 21/53] Advise removal of old vc-svn. --- etc/NEWS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 15fbb6c83d3..0d02a9589cb 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -34,6 +34,8 @@ below. Emacs tries to warn you about these through `bad-packages-alist'. ** Semantic (used by CEDET, ECB, JDEE): upgrade to latest version. ** cua.el, cua-mode.el: remove old versions. + +** vc-svn.el: remove old version. * Installation Changes in Emacs 22.2 From c590ed3a9753d91d228905a55db0eef19c79da47 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 2 Nov 2007 01:39:46 +0000 Subject: [PATCH 22/53] Merge from gnus--rel--5.10 Patches applied: * gnus--rel--5.10 (patch 266-268) - Merge from emacs--rel--22 - Update from CVS 2007-11-01 Reiner Steib * lisp/gnus/mm-util.el (mm-charset-eval-alist): Mark as risky local variable. * lisp/gnus/gnus.el (gnus-group-charter-alist): Mark as risky local variable. * lisp/gnus/gnus-art.el (gnus-button-alist, gnus-header-button-alist): Mark as risky local variable. * lisp/gnus/gnus-group.el (gnus-group-icon-list): Mark as risky local variable. 2007-11-01 ARISAWA Akihiro (tiny change) * lisp/gnus/message.el (message-use-alternative-email-as-from): Examine the From header as well; use message-make-from in order to include a user's full name. [ Backported bug fix from No Gnus. ] 2007-10-30 Reiner Steib * lisp/gnus/qp.el (quoted-printable-decode-string): Fix typo in doc string. 2007-10-30 Katsumi Yamaoka * lisp/gnus/gnus-ems.el (gnus-x-splash): Work even if there's no scroll bar. Revision: emacs@sv.gnu.org/emacs--rel--22--patch-143 --- lisp/gnus/ChangeLog | 25 +++++++++++++++++++++++++ lisp/gnus/gnus-art.el | 2 ++ lisp/gnus/gnus-ems.el | 4 +++- lisp/gnus/gnus-group.el | 1 + lisp/gnus/gnus.el | 1 + lisp/gnus/message.el | 5 +++-- lisp/gnus/mm-util.el | 1 + lisp/gnus/qp.el | 2 +- 8 files changed, 37 insertions(+), 4 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 88cc5e07d39..5df07f75355 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,28 @@ +2007-11-01 Reiner Steib + + * mm-util.el (mm-charset-eval-alist): Mark as risky local variable. + + * gnus.el (gnus-group-charter-alist): Mark as risky local variable. + + * gnus-art.el (gnus-button-alist, gnus-header-button-alist): Mark as + risky local variable. + + * gnus-group.el (gnus-group-icon-list): Mark as risky local variable. + +2007-11-01 ARISAWA Akihiro (tiny change) + + * message.el (message-use-alternative-email-as-from): Examine the + From header as well; use message-make-from in order to include a + user's full name. [ Backported bug fix from No Gnus. ] + +2007-10-30 Reiner Steib + + * qp.el (quoted-printable-decode-string): Fix typo in doc string. + +2007-10-30 Katsumi Yamaoka + + * gnus-ems.el (gnus-x-splash): Work even if there's no scroll bar. + 2007-10-23 Richard Stallman * gnus-group.el (gnus-group-highlight): Mark as risky. diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 696222e0043..1ab31bb519f 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -6708,6 +6708,7 @@ variable it the real callback function." (repeat :tag "Par" :inline t (integer :tag "Regexp group"))))) +(put 'gnus-button-alist 'risky-local-variable t) (defcustom gnus-header-button-alist '(("^\\(References\\|Message-I[Dd]\\|^In-Reply-To\\):" "<[^<>]+>" @@ -6745,6 +6746,7 @@ HEADER is a regexp to match a header. For a fuller explanation, see (repeat :tag "Par" :inline t (integer :tag "Regexp group"))))) +(put 'gnus-header-button-alist 'risky-local-variable t) ;;; Commands: diff --git a/lisp/gnus/gnus-ems.el b/lisp/gnus/gnus-ems.el index 88190b8085b..a4d24603b4c 100644 --- a/lisp/gnus/gnus-ems.el +++ b/lisp/gnus/gnus-ems.el @@ -208,7 +208,9 @@ (setq sbars (cons (/ (or (frame-parameter nil 'scroll-bar-width) 14) fcw) - 0)))) + 0))) + (t + (setq sbars '(0 . 0)))) (setq left (- (* (round (/ (1- (/ (+ (window-width) (car sbars) (cdr sbars) (/ (+ (or (car fringes) 0) diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 3c5cd7bedef..e92f463a846 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -416,6 +416,7 @@ score: The score of the group. ticked: The number of ticked articles." :group 'gnus-group-icons :type '(repeat (cons (sexp :tag "Form") file))) +(put 'gnus-group-icon-list 'risky-local-variable t) (defcustom gnus-group-name-charset-method-alist nil "Alist of method and the charset for group names. diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index 6fe8b1c3cbe..663a417c283 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el @@ -1466,6 +1466,7 @@ When FORM is evaluated `name' is bound to the name of the group." :version "22.1" :group 'gnus-group-various :type '(repeat (cons (string :tag "Hierarchy") (sexp :tag "Form")))) +(put 'gnus-group-charter-alist 'risky-local-variable t) (defcustom gnus-group-fetch-control-use-browse-url nil "*Non-nil means that control messages are displayed using `browse-url'. diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 419fd07727c..8b282dacc96 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -7164,7 +7164,7 @@ regexp VARSTR." address in `message-alternative-emails', looking at To, Cc and From headers in the original article." (require 'mail-utils) - (let* ((fields '("To" "Cc")) + (let* ((fields '("To" "Cc" "From")) (emails (split-string (mail-strip-quoted-names @@ -7179,7 +7179,8 @@ From headers in the original article." (unless (or (not email) (equal email user-mail-address)) (message-remove-header "From") (goto-char (point-max)) - (insert "From: " email "\n")))) + (insert "From: " (let ((user-mail-address email)) (message-make-from)) + "\n")))) (defun message-options-get (symbol) (cdr (assq symbol message-options))) diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el index 04a600abf25..4f41cf3645b 100644 --- a/lisp/gnus/mm-util.el +++ b/lisp/gnus/mm-util.el @@ -420,6 +420,7 @@ could use `autoload-coding-system' here." (cons (symbol :tag "charset") (symbol :tag "form")))) :group 'mime) +(put 'mm-charset-eval-alist 'risky-local-variable t) (defvar mm-binary-coding-system (cond diff --git a/lisp/gnus/qp.el b/lisp/gnus/qp.el index 17cc7ef2cf6..cb9c779e4b5 100644 --- a/lisp/gnus/qp.el +++ b/lisp/gnus/qp.el @@ -82,7 +82,7 @@ them into characters should be done separately." (defun quoted-printable-decode-string (string &optional coding-system) "Decode the quoted-printable encoded STRING and return the result. -If CODING-SYSTEM is non-nil, decode the region with coding-system. +If CODING-SYSTEM is non-nil, decode the string with coding-system. Use of CODING-SYSTEM is deprecated; this function should deal with raw bytes, and coding conversion should be done separately." (mm-with-unibyte-buffer From 4fda797e41ae06d532045c06343adc1dd1dbd18d Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Fri, 2 Nov 2007 04:11:00 +0000 Subject: [PATCH 23/53] *** empty log message *** --- man/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/man/ChangeLog b/man/ChangeLog index 5d222f408fc..c70b92ac099 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +2007-11-02 Nick Roberts + + * building.texi (Watch Expressions): Remove obscure sentence. + 2007-10-27 Emanuele Giaquinta (tiny change) * gnus-faq.texi ([5.12]): Remove reference to discontinued service. From 32ef39ff0b625213098f41ac471d020ddd7fc1fb Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Fri, 2 Nov 2007 04:12:31 +0000 Subject: [PATCH 24/53] (Watch Expressions): Remove obscure sentence. --- man/building.texi | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/man/building.texi b/man/building.texi index 989c5732711..3a52182724d 100644 --- a/man/building.texi +++ b/man/building.texi @@ -1118,11 +1118,9 @@ scope less noticeable. When a variable goes out of scope you can't edit its value. @vindex gdb-delete-out-of-scope - If the variable @code{gdb-delete-out-of-scope} is -non-@code{nil} (the default value), Emacs automatically deletes watch -expressions which go out of scope. This is safest because GDB may -think that a variable in a new frame is an old one that previously -went of of scope. Sometimes, when re-entering the same function, + If the variable @code{gdb-delete-out-of-scope} is non-@code{nil} +(the default value), Emacs automatically deletes watch expressions +which go out of scope. Sometimes, when re-entering the same function, it may be useful to set this value to nil so that you don't need to recreate the watch expression. From c1cf6983a5e7870ad895dedb9baaeeed6ed9cc8a Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 2 Nov 2007 07:56:02 +0000 Subject: [PATCH 25/53] (bad-packages-alist): Revert previous change. --- lisp/ChangeLog | 4 ++++ lisp/simple.el | 9 +-------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 871d799da88..7bc6a68bbf0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2007-11-02 Glenn Morris + + * simple.el (bad-packages-alist): Revert previous change. + 2007-11-01 Dan Nicolaescu * printing.el (printing): Fix :version, printing.el was included diff --git a/lisp/simple.el b/lisp/simple.el index ebb200aa25d..e1cf249f01c 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -5647,14 +5647,7 @@ so you can now enable CUA via the Options menu or by customizing `cua-mode'. You have loaded an older version of CUA-mode which does not work correctly with this version of Emacs. You should remove the old -version and use the one distributed with Emacs.") - ;; vc-svn doesn't have a version variable (do we see the limitations - ;; of this approach now?), but the Emacs version uses `vc-svn-program', - ;; rather than `vc-svn-program-name', hence this hack should work. - (vc-svn-program-name t nil -"`vc-svn' is now part of the standard GNU Emacs distribution. -You have tried to load an older version which does not work as well with Emacs. -You should remove the old version and use the one distributed with Emacs.")) +version and use the one distributed with Emacs.")) "Alist of packages known to cause problems in this version of Emacs. Each element has the form (PACKAGE SYMBOL REGEXP STRING). PACKAGE is either a regular expression to match file names, or a From b51404df27391fdfd7e152b1656b3d9c1fe21394 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 2 Nov 2007 07:58:44 +0000 Subject: [PATCH 26/53] Revert previous change. Whitespace. --- etc/NEWS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 0d02a9589cb..64ad1929ada 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -35,7 +35,6 @@ below. Emacs tries to warn you about these through `bad-packages-alist'. ** cua.el, cua-mode.el: remove old versions. -** vc-svn.el: remove old version. * Installation Changes in Emacs 22.2 @@ -107,7 +106,8 @@ This can be used to add menu entries for backend specific functions. * Lisp Changes in Emacs 22.2. ** Frame-local variables are deprecated and are slated for removal. - Use frame parameters instead. +Use frame parameters instead. + ** The function invisible-p returns non-nil if the character after a specified position is invisible. From 6da047e7418803afa986aa01f34abda32cfd40cc Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 2 Nov 2007 08:19:17 +0000 Subject: [PATCH 27/53] (tags-table-mode): Disable undo. --- admin/FOR-RELEASE | 4 ---- lisp/ChangeLog | 2 ++ lisp/progmodes/etags.el | 5 +++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index c1557d32635..38ffd38391a 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -42,10 +42,6 @@ from 2007-08-27. Impossible to procede without more input from OP (as of 20070912, emails are bouncing) or someone else who can reproduce this. http://lists.gnu.org/archive/html/emacs-devel/2007-08/msg01497.html -** TAGS buffer generates spurious undo warnings -Waiting for recipe to produce these warnings. -http://lists.gnu.org/archive/html/bug-gnu-emacs/2007-09/msg00070.html - ** emacs-22.1 with GTK problems (with patches) Only outstanding issue seems to be whether Solaris 2.6 GTK can be supported in the absence of recursive mutexes, via a change to diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7bc6a68bbf0..00448b64715 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2007-11-02 Glenn Morris + * progmodes/etags.el (tags-table-mode): Disable undo. + * simple.el (bad-packages-alist): Revert previous change. 2007-11-01 Dan Nicolaescu diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index 4148f327ecc..823b4e7a058 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -277,8 +277,9 @@ One argument, the tag info returned by `snarf-tag-function'.") (defun tags-table-mode () "Major mode for tags table file buffers." (interactive) - (setq major-mode 'tags-table-mode) - (setq mode-name "Tags Table") + (setq major-mode 'tags-table-mode + mode-name "Tags Table" + buffer-undo-list t) (initialize-new-tags-table)) ;;;###autoload From d7a2fd422e9aa62460fe9479203f7c212af36bc6 Mon Sep 17 00:00:00 2001 From: Romain Francoise Date: Fri, 2 Nov 2007 11:02:13 +0000 Subject: [PATCH 28/53] 2007-11-02 Drake Wilson (tiny change) * files.el (hack-local-variables): Fix membership tests to avoid treating all variables as safe if `enable-local-variables' is set to :safe. --- lisp/ChangeLog | 6 ++++++ lisp/files.el | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 00448b64715..dd5ab69e37c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2007-11-02 Drake Wilson (tiny change) + + * files.el (hack-local-variables): Fix membership tests to avoid + treating all variables as safe if `enable-local-variables' is + set to :safe. + 2007-11-02 Glenn Morris * progmodes/etags.el (tags-table-mode): Disable undo. diff --git a/lisp/files.el b/lisp/files.el index 9ae4396946b..169912b94bc 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2764,8 +2764,8 @@ is specified, returning t if it is specified." ;; If caller wants only the safe variables, ;; install only them. (dolist (elt result) - (unless (or (memq (car elt) unsafe-vars) - (memq (car elt) risky-vars)) + (unless (or (member elt unsafe-vars) + (member elt risky-vars)) (hack-one-local-variable (car elt) (cdr elt)))) ;; Query, except in the case where all are known safe ;; if the user wants no quuery in that case. From d85b2f1e851dd703f60dcb473c7cbb62f201bc7e Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 3 Nov 2007 01:50:31 +0000 Subject: [PATCH 29/53] (handle_stop): Move some code out of loop. --- src/ChangeLog | 4 ++++ src/xdisp.c | 12 +++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 1d33322996e..42ebbddb652 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2007-11-03 Richard Stallman + + * xdisp.c (handle_stop): Move some code out of loop. + 2007-11-01 Johan Bockg,Ae(Brd * macterm.c, w32term.c, xterm.c (x_draw_stretch_glyph_string): diff --git a/src/xdisp.c b/src/xdisp.c index 9e3a3bade1f..ef8c6c836aa 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -3073,16 +3073,18 @@ handle_stop (it) if (it->method == GET_FROM_DISPLAY_VECTOR) handle_overlay_change_p = 0; - /* Handle overlay changes. */ + /* Handle overlay changes. + This sets HANDLED to HANDLED_RECOMPUTE_PROPS + if it finds overlays. */ if (handle_overlay_change_p) handled = handle_overlay_change (it); - - /* Determine where to stop next. */ - if (handled == HANDLED_NORMALLY) - compute_stop_pos (it); } } while (handled == HANDLED_RECOMPUTE_PROPS); + + /* Determine where to stop next. */ + if (handled == HANDLED_NORMALLY) + compute_stop_pos (it); } From e2f953832a310bd9a81caaa1e020198c8be15e96 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 3 Nov 2007 03:08:46 +0000 Subject: [PATCH 30/53] Ulrich Mueller (tiny change) (bad-packages-alist): Anchor semantic regexp. --- lisp/ChangeLog | 4 ++++ lisp/simple.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index dd5ab69e37c..4cf229d2838 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2007-11-03 Ulrich Mueller (tiny change) + + * simple.el (bad-packages-alist): Anchor semantic regexp. + 2007-11-02 Drake Wilson (tiny change) * files.el (hack-local-variables): Fix membership tests to avoid diff --git a/lisp/simple.el b/lisp/simple.el index e1cf249f01c..551c93b773a 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -5633,7 +5633,7 @@ works by saving the value of `buffer-invisibility-spec' and setting it to nil." (defconst bad-packages-alist ;; Not sure exactly which semantic versions have problems. ;; Definitely 2.0pre3, probably all 2.0pre's before this. - '((semantic semantic-version "2\\.0pre[1-3]" + '((semantic semantic-version "\\`2\\.0pre[1-3]\\'" "The version of `semantic' loaded does not work in Emacs 22. It can cause constant high CPU load. Upgrade to at least Semantic 2.0pre4 (distributed with CEDET 1.0pre4).") From 03e1d617913b11ba869e43ac65e801f6c34a8974 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 3 Nov 2007 03:46:22 +0000 Subject: [PATCH 31/53] (face_at_buffer_position_no_overlays): New function. --- src/xfaces.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/src/xfaces.c b/src/xfaces.c index 418d8922bb3..ef8842ac804 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -7706,6 +7706,82 @@ face_at_buffer_position (w, pos, region_beg, region_end, return lookup_face (f, attrs, 0, NULL); } +/* Return the face ID associated with buffer position POS for + displaying ASCII characters, but without overlays. + Like face_at_buffer_position except it ignores overlays. */ + +int +face_at_buffer_position_no_overlays (w, pos, region_beg, region_end, + endptr, limit, mouse) + struct window *w; + int pos; + int region_beg, region_end; + int *endptr; + int limit; + int mouse; +{ + struct frame *f = XFRAME (w->frame); + Lisp_Object attrs[LFACE_VECTOR_SIZE]; + Lisp_Object prop, position; + int i, noverlays; + Lisp_Object *overlay_vec; + Lisp_Object frame; + int endpos; + Lisp_Object propname = mouse ? Qmouse_face : Qface; + Lisp_Object limit1, end; + struct face *default_face; + + /* W must display the current buffer. We could write this function + to use the frame and buffer of W, but right now it doesn't. */ + /* xassert (XBUFFER (w->buffer) == current_buffer); */ + + XSETFRAME (frame, f); + XSETFASTINT (position, pos); + + endpos = ZV; + if (pos < region_beg && region_beg < endpos) + endpos = region_beg; + + /* Get the `face' or `mouse_face' text property at POS, and + determine the next position at which the property changes. */ + prop = Fget_text_property (position, propname, w->buffer); + XSETFASTINT (limit1, (limit < endpos ? limit : endpos)); + end = Fnext_single_property_change (position, propname, w->buffer, limit1); + if (INTEGERP (end)) + endpos = XINT (end); + + *endptr = endpos; + + default_face = FACE_FROM_ID (f, DEFAULT_FACE_ID); + + /* Optimize common cases where we can use the default face. */ + if (NILP (prop) + && !(pos >= region_beg && pos < region_end)) + return DEFAULT_FACE_ID; + + /* Begin with attributes from the default face. */ + bcopy (default_face->lface, attrs, sizeof attrs); + + /* Merge in attributes specified via text properties. */ + if (!NILP (prop)) + merge_face_ref (f, prop, attrs, 1, 0); + + /* If in the region, merge in the region face. */ + if (pos >= region_beg && pos < region_end) + { + merge_named_face (f, Qregion, attrs, 0); + + if (region_end < endpos) + endpos = region_end; + } + + *endptr = endpos; + + /* Look up a realized face with the given face attributes, + or realize a new one for ASCII characters. */ + return lookup_face (f, attrs, 0, NULL); +} + /* Compute the face at character position POS in Lisp string STRING on window W, for ASCII characters. From 490943fe146878558e7e123b0fe7ded4b8df6384 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 3 Nov 2007 03:46:57 +0000 Subject: [PATCH 32/53] (face_at_buffer_position_no_overlays): Add decl. --- src/dispextern.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/dispextern.h b/src/dispextern.h index 9e899f9ccb2..c59403b0205 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -1808,6 +1808,9 @@ struct it_slice Lisp_Object height; }; +/* Input sources for fetching characters or data to display. + The input source is found in the `method' field. */ + enum it_method { GET_FROM_BUFFER = 0, GET_FROM_DISPLAY_VECTOR, @@ -2856,6 +2859,9 @@ void free_frame_faces P_ ((struct frame *)); void recompute_basic_faces P_ ((struct frame *)); int face_at_buffer_position P_ ((struct window *, int, int, int, int *, int, int)); +int face_at_buffer_position_no_overlays P_ ((struct window *, int, int, + int, int *, + int, int)); int face_at_string_position P_ ((struct window *, Lisp_Object, int, int, int, int, int *, enum face_id, int)); int merge_faces P_ ((struct frame *, Lisp_Object, int, int)); From 17d6c69d11cf3b63a39d893894d7f360615fedc2 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 3 Nov 2007 03:48:12 +0000 Subject: [PATCH 33/53] (handle_face_prop): Use face_at_buffer_position_no_overlays to get the base face for an overlay string. --- src/ChangeLog | 7 +++++++ src/xdisp.c | 31 +++++++++++++++++++++++-------- 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 42ebbddb652..13c5b452676 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,12 @@ 2007-11-03 Richard Stallman + * xdisp.c (handle_face_prop): Use face_at_buffer_position_no_overlays + to get the base face for an overlay string. + + * dispextern.h (face_at_buffer_position_no_overlays): Add decl. + + * xfaces.c (face_at_buffer_position_no_overlays): New function. + * xdisp.c (handle_stop): Move some code out of loop. 2007-11-01 Johan Bockg,Ae(Brd diff --git a/src/xdisp.c b/src/xdisp.c index ef8c6c836aa..4e3c0445e2e 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -3367,16 +3367,31 @@ handle_face_prop (it) int base_face_id, bufpos; if (it->current.overlay_string_index >= 0) - bufpos = IT_CHARPOS (*it); + { + bufpos = IT_CHARPOS (*it); + /* For an overlay face, the base face depends + only on text properties and ignores overlays. */ + base_face_id + = face_at_buffer_position_no_overlays (it->w, + IT_CHARPOS (*it), + it->region_beg_charpos, + it->region_end_charpos, + &next_stop, + (IT_CHARPOS (*it) + + TEXT_PROP_DISTANCE_LIMIT), + 0); + } else - bufpos = 0; + { + bufpos = 0; - /* For strings from a buffer, i.e. overlay strings or strings - from a `display' property, use the face at IT's current - buffer position as the base face to merge with, so that - overlay strings appear in the same face as surrounding - text, unless they specify their own faces. */ - base_face_id = underlying_face_id (it); + /* For strings from a `display' property, use the face at + IT's current buffer position as the base face to merge + with, so that overlay strings appear in the same face as + surrounding text, unless they specify their own + faces. */ + base_face_id = underlying_face_id (it); + } new_face_id = face_at_string_position (it->w, it->string, From 6ec21bf4d9c75a69ff7ec78f217245bf1e48434a Mon Sep 17 00:00:00 2001 From: Romain Francoise Date: Sat, 3 Nov 2007 08:49:17 +0000 Subject: [PATCH 34/53] *** empty log message *** --- lisp/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4cf229d2838..7bc4e8b1e8b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -6,7 +6,7 @@ * files.el (hack-local-variables): Fix membership tests to avoid treating all variables as safe if `enable-local-variables' is - set to :safe. + set to :safe (CVE-2007-5795). 2007-11-02 Glenn Morris From 7c9008ce0cff13f6ad4aa1d97e68bc88ba70b3a2 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 4 Nov 2007 01:18:24 +0000 Subject: [PATCH 35/53] Riccardo Murri Require rx when compiling. (tls-end-of-info): New variable. (open-tls-stream): Keep reading input until `tls-end-of-info' is matched. --- lisp/ChangeLog | 7 +++++ lisp/net/tls.el | 68 +++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 67 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7bc4e8b1e8b..6a448ccadfe 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2007-11-04 Riccardo Murri + + * net/tls.el: Require rx when compiling. + (tls-end-of-info): New variable. + (open-tls-stream): Keep reading input until `tls-end-of-info' is + matched. + 2007-11-03 Ulrich Mueller (tiny change) * simple.el (bad-packages-alist): Anchor semantic regexp. diff --git a/lisp/net/tls.el b/lisp/net/tls.el index 2e890a4a476..bdade42073f 100644 --- a/lisp/net/tls.el +++ b/lisp/net/tls.el @@ -51,10 +51,45 @@ (autoload 'format-spec "format-spec") (autoload 'format-spec-make "format-spec")) +(eval-when-compile + (require 'rx)) + (defgroup tls nil "Transport Layer Security (TLS) parameters." :group 'comm) +(defcustom tls-end-of-info + (rx + (or + ;; `openssl s_client` regexp + (sequence + ;; see ssl/ssl_txt.c lines 219--220 + line-start + " Verify return code: " + (one-or-more not-newline) + "\n" + ;; according to apps/s_client.c line 1515 this is always the last + ;; line that is printed by s_client before the real data + "---\n") + ;; `gnutls` regexp + (sequence + ;; see src/cli.c lines 721-- + (sequence line-start "- Simple Client Mode:\n") + (zero-or-more + (or + "\n" ; ignore blank lines + ;; XXX: we have no way of knowing if the STARTTLS handshake + ;; sequence has completed successfully, because `gnutls` will + ;; only report failure. + (sequence line-start "\*\*\* Starting TLS handshake\n")))))) + "Regexp matching end of TLS client informational messages. +Client data stream begins after the last character matched by +this. The default matches `openssl s_client' (version 0.9.8c) +and `gnutls-cli' (version 2.0.1) output." + :version "22.2" + :type 'regexp + :group 'tls) + (defcustom tls-program '("gnutls-cli -p %p %h" "gnutls-cli -p %p %h --protocols ssl3" "openssl s_client -connect %h:%p -no_ssl2") @@ -130,7 +165,9 @@ Fourth arg PORT is an integer specifying a port to connect to." process cmd done) (if use-temp-buffer (setq buffer (generate-new-buffer " TLS"))) - (message "Opening TLS connection to `%s'..." host) + (save-excursion + (set-buffer buffer) + (message "Opening TLS connection to `%s'..." host) (while (and (not done) (setq cmd (pop cmds))) (message "Opening TLS connection with `%s'..." cmd) (let ((process-connection-type tls-process-connection-type) @@ -146,19 +183,34 @@ Fourth arg PORT is an integer specifying a port to connect to." port))))) (while (and process (memq (process-status process) '(open run)) - (save-excursion - (set-buffer buffer) ;; XXX "blue moon" nntp.el bug + (progn (goto-char (point-min)) (not (setq done (re-search-forward tls-success nil t))))) (unless (accept-process-output process 1) - (sit-for 1))) + (sit-for 1))) (message "Opening TLS connection with `%s'...%s" cmd (if done "done" "failed")) - (if done - (setq done process) - (delete-process process)))) + (if (not done) + (delete-process process) + ;; advance point to after all informational messages that + ;; `openssl s_client' and `gnutls' print + (let ((start-of-data nil)) + (while + (not (setq start-of-data + ;; the string matching `tls-end-of-info' + ;; might come in separate chunks from + ;; `accept-process-output', so start the + ;; search where `tls-success' ended + (save-excursion + (if (re-search-forward tls-end-of-info nil t) + (match-end 0))))) + (accept-process-output process 1)) + (if start-of-data + ;; move point to start of client data + (goto-char start-of-data))) + (setq done process)))) (message "Opening TLS connection to `%s'...%s" - host (if done "done" "failed")) + host (if done "done" "failed"))) (when use-temp-buffer (if done (set-process-buffer process nil)) (kill-buffer buffer)) From 6519d955f965373c6142fcdaad738cd4bf575038 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 4 Nov 2007 06:57:16 +0000 Subject: [PATCH 36/53] Whitespace change. --- src/textprop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/textprop.c b/src/textprop.c index 8ce5656e5a2..2026cded9d1 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -713,7 +713,7 @@ POSITION is at the end of OBJECT, both car and cdr are nil. */) Lisp_Object overlay; Lisp_Object val = get_char_property_and_overlay (position, prop, object, &overlay); - return Fcons(val, overlay); + return Fcons (val, overlay); } From c69a28f1e6fe35ccac4848a4a7644fed1250afe3 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 4 Nov 2007 07:31:56 +0000 Subject: [PATCH 37/53] (struct it): New elt string_overlays. New elt from_overlay, also in stack. Rearrange a few elements. (face_for_overlay_string): Decl renamed from face_at_buffer_position_no_overlays, and add argument. --- src/dispextern.h | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/src/dispextern.h b/src/dispextern.h index c59403b0205..a3c62637497 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -1912,20 +1912,28 @@ struct it position in overlay strings etc. */ struct display_pos current; + /* Total number of overlay strings to process. This can be > + OVERLAY_STRING_CHUNK_SIZE. */ + int n_overlay_strings; + /* Vector of overlays to process. Overlay strings are processed OVERLAY_STRING_CHUNK_SIZE at a time. */ #define OVERLAY_STRING_CHUNK_SIZE 16 Lisp_Object overlay_strings[OVERLAY_STRING_CHUNK_SIZE]; - /* Total number of overlay strings to process. This can be > - OVERLAY_STRING_CHUNK_SIZE. */ - int n_overlay_strings; + /* For each overlay string, the overlay it came from. */ +#define OVERLAY_STRING_CHUNK_SIZE 16 + Lisp_Object string_overlays[OVERLAY_STRING_CHUNK_SIZE]; /* If non-nil, a Lisp string being processed. If current.overlay_string_index >= 0, this is an overlay string from pos. */ Lisp_Object string; + /* If non-nil, we are processing a string that came + from a `display' property given by an overlay. */ + Lisp_Object from_overlay; + /* Stack of saved values. New entries are pushed when we begin to process an overlay string or a string from a `glyph' property. Entries are popped when we return to deliver display elements @@ -1961,6 +1969,7 @@ struct it /* current text and display positions. */ struct text_pos position; struct display_pos current; + Lisp_Object from_overlay; enum glyph_row_area area; enum it_method method; unsigned multibyte_p : 1; @@ -1977,13 +1986,6 @@ struct it /* Stack pointer. */ int sp; - /* Setting of buffer-local variable selective-display-ellipsis. */ - unsigned selective_display_ellipsis_p : 1; - - /* 1 means control characters are translated into the form `^C' - where the `^' can be replaced by a display table entry. */ - unsigned ctl_arrow_p : 1; - /* -1 means selective display hides everything between a \r and the next newline; > 0 means hide lines indented more than that value. */ int selective; @@ -1995,6 +1997,16 @@ struct it /* Face to use. */ int face_id; + /* Setting of buffer-local variable selective-display-ellipsis. */ + unsigned selective_display_ellipsis_p : 1; + + /* 1 means control characters are translated into the form `^C' + where the `^' can be replaced by a display table entry. */ + unsigned ctl_arrow_p : 1; + + /* 1 means lines are truncated. */ + unsigned truncate_lines_p : 1; + /* Non-zero means that the current face has a box. */ unsigned face_box_p : 1; @@ -2074,9 +2086,6 @@ struct it Lisp_Object object; struct text_pos position; - /* 1 means lines are truncated. */ - unsigned truncate_lines_p : 1; - /* Number of columns per \t. */ short tab_width; @@ -2859,9 +2868,9 @@ void free_frame_faces P_ ((struct frame *)); void recompute_basic_faces P_ ((struct frame *)); int face_at_buffer_position P_ ((struct window *, int, int, int, int *, int, int)); -int face_at_buffer_position_no_overlays P_ ((struct window *, int, int, - int, int *, - int, int)); +int face_for_overlay_string P_ ((struct window *, int, int, + int, int *, + int, int, Lisp_Object)); int face_at_string_position P_ ((struct window *, Lisp_Object, int, int, int, int, int *, enum face_id, int)); int merge_faces P_ ((struct frame *, Lisp_Object, int, int)); From a193ecf139c3a9876272385b68f31eb5f2d824d5 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 4 Nov 2007 07:32:41 +0000 Subject: [PATCH 38/53] (face_for_overlay_string): Function renamed from face_at_buffer_position_no_overlays, and add arg OVERLAY. --- src/xfaces.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/xfaces.c b/src/xfaces.c index ef8842ac804..e405988704d 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -7706,19 +7706,22 @@ face_at_buffer_position (w, pos, region_beg, region_end, return lookup_face (f, attrs, 0, NULL); } -/* Return the face ID associated with buffer position POS for - displaying ASCII characters, but without overlays. - Like face_at_buffer_position except it ignores overlays. */ +/* Return the face ID at buffer position POS for displaying ASCII + characters associated with overlay strings for overlay OVERLAY. + + Like face_at_buffer_position except for OVERLAY. Currently it + simply disregards the `face' properties of all overlays. */ int -face_at_buffer_position_no_overlays (w, pos, region_beg, region_end, - endptr, limit, mouse) +face_for_overlay_string (w, pos, region_beg, region_end, + endptr, limit, mouse, overlay) struct window *w; int pos; int region_beg, region_end; int *endptr; int limit; int mouse; + Lisp_Object overlay; { struct frame *f = XFRAME (w->frame); Lisp_Object attrs[LFACE_VECTOR_SIZE]; From 9cf635a6e25370de417c7901f557ce20ce16bd4b Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 4 Nov 2007 07:42:21 +0000 Subject: [PATCH 39/53] (handle_face_prop): Test for strings that came from overlays, not just for after-strings and before-strings. Call face_for_overlay_string and pass the overlay to it. (handle_display_prop): Determine whether property came from an overlay. Pass OVERLAY arg to handle_single_display_spec. (handle_single_display_spec): New arg OVERLAY sets it->from_overlay. (load_overlay_strings): Fill in it->string_overlays. (get_overlay_strings_1, push_it, pop_it): Handle it->from_overlays. --- src/xdisp.c | 82 +++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 61 insertions(+), 21 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index 4e3c0445e2e..60bca299bc1 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -967,8 +967,8 @@ static void compute_string_pos P_ ((struct text_pos *, struct text_pos, static int face_before_or_after_it_pos P_ ((struct it *, int)); static int next_overlay_change P_ ((int)); static int handle_single_display_spec P_ ((struct it *, Lisp_Object, - Lisp_Object, struct text_pos *, - int)); + Lisp_Object, Lisp_Object, + struct text_pos *, int)); static int underlying_face_id P_ ((struct it *)); static int in_ellipses_for_invisible_text_p P_ ((struct display_pos *, struct window *)); @@ -3365,21 +3365,46 @@ handle_face_prop (it) else { int base_face_id, bufpos; + int i; + Lisp_Object from_overlay + = (it->current.overlay_string_index >= 0 + ? it->string_overlays[it->current.overlay_string_index] + : from_overlay); - if (it->current.overlay_string_index >= 0) + /* See we got to this string directly or indirectly from + an overlay property. That includes the before-string or + after-string of an overlay, strings in display properties + provided by an overlay, their text properties, etc. + + FROM_OVERLAY is the overlay that brought us here, or nil if none. */ + if (! NILP (from_overlay)) + for (i = it->sp - 1; i >= 0; i--) + { + if (it->stack[i].current.overlay_string_index >= 0) + from_overlay + = it->string_overlays[it->stack[i].current.overlay_string_index]; + else if (! NILP (it->stack[i].from_overlay)) + from_overlay = it->stack[i].from_overlay; + + if (!NILP (from_overlay)) + break; + } + + if (! NILP (from_overlay)) { bufpos = IT_CHARPOS (*it); - /* For an overlay face, the base face depends + /* For a string from an overlay, the base face depends only on text properties and ignores overlays. */ base_face_id - = face_at_buffer_position_no_overlays (it->w, - IT_CHARPOS (*it), - it->region_beg_charpos, - it->region_end_charpos, - &next_stop, - (IT_CHARPOS (*it) - + TEXT_PROP_DISTANCE_LIMIT), - 0); + = face_for_overlay_string (it->w, + IT_CHARPOS (*it), + it->region_beg_charpos, + it->region_end_charpos, + &next_stop, + (IT_CHARPOS (*it) + + TEXT_PROP_DISTANCE_LIMIT), + 0, + from_overlay); } else { @@ -3801,7 +3826,7 @@ static enum prop_handled handle_display_prop (it) struct it *it; { - Lisp_Object prop, object; + Lisp_Object prop, object, overlay; struct text_pos *position; /* Nonzero if some property replaces the display of the text itself. */ int display_replaced_p = 0; @@ -3829,10 +3854,12 @@ handle_display_prop (it) if (!it->string_from_display_prop_p) it->area = TEXT_AREA; - prop = Fget_char_property (make_number (position->charpos), - Qdisplay, object); + prop = get_char_property_and_overlay (make_number (position->charpos), + Qdisplay, object, &overlay); if (NILP (prop)) return HANDLED_NORMALLY; + /* Now OVERLAY is the overlay that gave us this property, or nil + if it was a text property. */ if (!STRINGP (it->string)) object = it->w->buffer; @@ -3854,7 +3881,7 @@ handle_display_prop (it) { for (; CONSP (prop); prop = XCDR (prop)) { - if (handle_single_display_spec (it, XCAR (prop), object, + if (handle_single_display_spec (it, XCAR (prop), object, overlay, position, display_replaced_p)) { display_replaced_p = 1; @@ -3869,7 +3896,7 @@ handle_display_prop (it) { int i; for (i = 0; i < ASIZE (prop); ++i) - if (handle_single_display_spec (it, AREF (prop, i), object, + if (handle_single_display_spec (it, AREF (prop, i), object, overlay, position, display_replaced_p)) { display_replaced_p = 1; @@ -3881,7 +3908,8 @@ handle_display_prop (it) } else { - int ret = handle_single_display_spec (it, prop, object, position, 0); + int ret = handle_single_display_spec (it, prop, object, overlay, + position, 0); if (ret < 0) /* Replaced by "", i.e. nothing. */ return HANDLED_RECOMPUTE_PROPS; if (ret) @@ -3923,6 +3951,9 @@ display_prop_end (it, object, start_pos) replaced text display with something else, for example an image; we ignore such properties after the first one has been processed. + OVERLAY is the overlay this `display' property came from, + or nil if it was a text property. + If PROP is a `space' or `image' specification, and in some other cases too, set *POSITION to the position where the `display' property ends. @@ -3932,11 +3963,12 @@ display_prop_end (it, object, start_pos) "something" is "nothing". */ static int -handle_single_display_spec (it, spec, object, position, +handle_single_display_spec (it, spec, object, overlay, position, display_replaced_before_p) struct it *it; Lisp_Object spec; Lisp_Object object; + Lisp_Object overlay; struct text_pos *position; int display_replaced_before_p; { @@ -4046,7 +4078,7 @@ handle_single_display_spec (it, spec, object, position, return 0; } - /* Handle `(space_width WIDTH)'. */ + /* Handle `(space-width WIDTH)'. */ if (CONSP (spec) && EQ (XCAR (spec), Qspace_width) && CONSP (XCDR (spec))) @@ -4170,6 +4202,7 @@ handle_single_display_spec (it, spec, object, position, it->position = start_pos; it->object = NILP (object) ? it->w->buffer : object; it->method = GET_FROM_IMAGE; + it->from_overlay = Qnil; it->face_id = face_id; /* Say that we haven't consumed the characters with @@ -4240,6 +4273,7 @@ handle_single_display_spec (it, spec, object, position, it->position = *position; push_it (it); it->position = save_pos; + it->from_overlay = overlay; if (NILP (location)) it->area = TEXT_AREA; @@ -4883,7 +4917,10 @@ load_overlay_strings (it, charpos) i = 0; j = it->current.overlay_string_index; while (i < OVERLAY_STRING_CHUNK_SIZE && j < n) - it->overlay_strings[i++] = entries[j++].string; + { + it->overlay_strings[i++] = entries[j++].string; + it->string_overlays[i++] = entries[j++].overlay; + } CHECK_IT (it); } @@ -4929,6 +4966,7 @@ get_overlay_strings_1 (it, charpos, compute_stop_p) string. */ IT_STRING_CHARPOS (*it) = IT_STRING_BYTEPOS (*it) = 0; it->string = it->overlay_strings[0]; + it->from_overlay = Qnil; it->stop_charpos = 0; xassert (STRINGP (it->string)); it->end_charpos = SCHARS (it->string); @@ -4982,6 +5020,7 @@ push_it (it) p->face_id = it->face_id; p->string = it->string; p->method = it->method; + p->from_overlay = it->from_overlay; switch (p->method) { case GET_FROM_IMAGE: @@ -5035,6 +5074,7 @@ pop_it (it) it->current = p->current; it->position = p->position; it->string = p->string; + it->from_overlay = p->from_overlay; if (NILP (it->string)) SET_TEXT_POS (it->current.string_pos, -1, -1); it->method = p->method; From 146836787ab306b254ebb40e48435345d92afd80 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Mon, 5 Nov 2007 06:38:48 +0000 Subject: [PATCH 40/53] *** empty log message *** --- lisp/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6a448ccadfe..d39bc8c8ae0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2007-11-05 Nick Roberts + + * progmodes/gud.el (gud-gdb): Remove vestigial gdba doc and code. + 2007-11-04 Riccardo Murri * net/tls.el: Require rx when compiling. From c91d7cbb087fa8119fbf1f32c68472bb61df2750 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Mon, 5 Nov 2007 06:40:26 +0000 Subject: [PATCH 41/53] (gud-gdb): Remove vestigial gdba doc and code. --- lisp/progmodes/gud.el | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index e5217b7162a..5e11b73916e 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -696,25 +696,14 @@ The option \"--fullname\" must be included in this value." (defvar gud-filter-pending-text nil "Non-nil means this is text that has been saved for later in `gud-filter'.") -;; The old gdb command. The new one is in gdb-ui.el. +;; The old gdb command (text command mode). The new one is in gdb-ui.el. ;;;###autoload (defun gud-gdb (command-line) "Run gdb on program FILE in buffer *gud-FILE*. The directory containing FILE becomes the initial working -directory and source-file directory for your debugger. By -default this command starts GDB using a graphical interface. See -`gdba' for more information. - -To run GDB in text command mode, replace the GDB \"--annotate=3\" -option with \"--fullname\" either in the minibuffer for the -current Emacs session, or the custom variable -`gud-gdb-command-name' for all future sessions. You need to use -text command mode to debug multiple programs within one Emacs -session." +directory and source-file directory for your debugger." (interactive (list (gud-query-cmdline 'gud-gdb))) - (require 'gdb-ui) - (when (and gud-comint-buffer (buffer-name gud-comint-buffer) (get-buffer-process gud-comint-buffer) @@ -723,8 +712,8 @@ session." (error "Multiple debugging requires restarting in text command mode")) - (gud-common-init command-line nil 'gud-gdba-marker-filter) - (set (make-local-variable 'gud-minor-mode) 'gdba) + (gud-common-init command-line nil 'gud-gdb-marker-filter) + (set (make-local-variable 'gud-minor-mode) 'gdb) (gud-def gud-break "break %f:%l" "\C-b" "Set breakpoint at current line.") (gud-def gud-tbreak "tbreak %f:%l" "\C-t" From 59961aa44f8b28b097285537b9d97e8cdaaa724e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Tue, 6 Nov 2007 11:17:38 +0000 Subject: [PATCH 42/53] (xg_tool_bar_menu_proxy): Handle GTK_IMAGE_ICON_NAME and abort with a message on unhandled store_type values. --- src/ChangeLog | 5 +++++ src/gtkutil.c | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 13c5b452676..af622289279 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2007-11-06 Jan Dj,Ad(Brv + + * gtkutil.c (xg_tool_bar_menu_proxy): Handle GTK_IMAGE_ICON_NAME and + abort with a message on unhandled store_type values. + 2007-11-03 Richard Stallman * xdisp.c (handle_face_prop): Use face_at_buffer_position_no_overlays diff --git a/src/gtkutil.c b/src/gtkutil.c index b37620caa9c..86a4703d0b7 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -3476,6 +3476,25 @@ xg_tool_bar_menu_proxy (toolitem, user_data) wmenuimage = gtk_image_new_from_pixbuf (dest_pixbuf); } + else + { + fprintf (stderr, "internal error: GTK_IMAGE_PIXBUF failed\n"); + abort (); + } + } + else if (store_type == GTK_IMAGE_ICON_NAME) + { + const gchar *icon_name; + GtkIconSize icon_size; + + gtk_image_get_icon_name (wimage, &icon_name, &icon_size); + wmenuimage = gtk_image_new_from_icon_name (icon_name, + GTK_ICON_SIZE_MENU); + } + else + { + fprintf (stderr, "internal error: store_type is %d\n", store_type); + abort (); } } if (wmenuimage) From db3a4b2f77099dcbaf415e6ae3a2bacf69417cca Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 6 Nov 2007 16:33:18 +0000 Subject: [PATCH 43/53] *** empty log message *** --- src/ChangeLog | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index af622289279..88a3c84aa9a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,26 @@ * gtkutil.c (xg_tool_bar_menu_proxy): Handle GTK_IMAGE_ICON_NAME and abort with a message on unhandled store_type values. +2007-11-04 Richard Stallman + + * xdisp.c (handle_face_prop): Test for strings that came from overlays, + not just for after-strings and before-strings. + Call face_for_overlay_string and pass the overlay to it. + (handle_display_prop): Determine whether property came from an overlay. + Pass OVERLAY arg to handle_single_display_spec. + (handle_single_display_spec): New arg OVERLAY sets it->from_overlay. + (load_overlay_strings): Fill in it->string_overlays. + (get_overlay_strings_1, push_it, pop_it): Handle it->from_overlays. + + * xfaces.c (face_for_overlay_string): Function renamed from + face_at_buffer_position_no_overlays, and add arg OVERLAY. + + * dispextern.h (struct it): New elt string_overlays. + New elt from_overlay, also in stack. + Rearrange a few elements. + (face_for_overlay_string): Decl renamed from + face_at_buffer_position_no_overlays, and add argument. + 2007-11-03 Richard Stallman * xdisp.c (handle_face_prop): Use face_at_buffer_position_no_overlays From cba974dec6edeb6a70e2321f93c3cbcdc8641ff9 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 7 Nov 2007 01:27:30 +0000 Subject: [PATCH 44/53] *** empty log message *** --- admin/FOR-RELEASE | 5 ----- 1 file changed, 5 deletions(-) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 38ffd38391a..54a3983e9a3 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -50,11 +50,6 @@ http://lists.gnu.org/archive/html/bug-gnu-emacs/2007-09/msg00055.html * BUGS -** lekktu@gmail.com, Oct 11: frame-local variables weirdness -http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg00519.html -I proposed a patch, which fixed this and seemed right, but the patch -caused other problems. They are being investigated now. - * DOCUMENTATION ** Check the Emacs Tutorial. From 3b32d9a56a6287840a777bd94158fd345d5eee6b Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 7 Nov 2007 03:32:41 +0000 Subject: [PATCH 45/53] =?UTF-8?q?Johan=20Bockg=EF=BF=BD=20=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (eshell-output-filter): Use `with-current-buffer'. --- lisp/eshell/esh-mode.el | 62 ++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 32 deletions(-) diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el index fd3cfb93996..203bab86924 100644 --- a/lisp/eshell/esh-mode.el +++ b/lisp/eshell/esh-mode.el @@ -775,38 +775,36 @@ This is done after all necessary filtering has been done." (setq string (funcall (car functions) string)) (setq functions (cdr functions)))) (if (and string oprocbuf (buffer-name oprocbuf)) - (let ((obuf (current-buffer)) - opoint obeg oend) - (set-buffer oprocbuf) - (setq opoint (point)) - (setq obeg (point-min)) - (setq oend (point-max)) - (let ((buffer-read-only nil) - (nchars (length string)) - (ostart nil)) - (widen) - (goto-char eshell-last-output-end) - (setq ostart (point)) - (if (<= (point) opoint) - (setq opoint (+ opoint nchars))) - (if (< (point) obeg) - (setq obeg (+ obeg nchars))) - (if (<= (point) oend) - (setq oend (+ oend nchars))) - (insert-before-markers string) - (if (= (window-start (selected-window)) (point)) - (set-window-start (selected-window) - (- (point) nchars))) - (if (= (point) eshell-last-input-end) - (set-marker eshell-last-input-end - (- eshell-last-input-end nchars))) - (set-marker eshell-last-output-start ostart) - (set-marker eshell-last-output-end (point)) - (force-mode-line-update)) - (narrow-to-region obeg oend) - (goto-char opoint) - (eshell-run-output-filters) - (set-buffer obuf))))) + (let (opoint obeg oend) + (with-current-buffer oprocbuf + (setq opoint (point)) + (setq obeg (point-min)) + (setq oend (point-max)) + (let ((buffer-read-only nil) + (nchars (length string)) + (ostart nil)) + (widen) + (goto-char eshell-last-output-end) + (setq ostart (point)) + (if (<= (point) opoint) + (setq opoint (+ opoint nchars))) + (if (< (point) obeg) + (setq obeg (+ obeg nchars))) + (if (<= (point) oend) + (setq oend (+ oend nchars))) + (insert-before-markers string) + (if (= (window-start (selected-window)) (point)) + (set-window-start (selected-window) + (- (point) nchars))) + (if (= (point) eshell-last-input-end) + (set-marker eshell-last-input-end + (- eshell-last-input-end nchars))) + (set-marker eshell-last-output-start ostart) + (set-marker eshell-last-output-end (point)) + (force-mode-line-update)) + (narrow-to-region obeg oend) + (goto-char opoint) + (eshell-run-output-filters)))))) (defun eshell-run-output-filters () "Run the `eshell-output-filter-functions' on the current output." From 1b3f94df29c903411b6550fdd5a4f73a3e48943c Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 7 Nov 2007 03:33:16 +0000 Subject: [PATCH 46/53] =?UTF-8?q?Johan=20Bockg=EF=BF=BD=20=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (eshell-insertion-filter, eshell-sentinel): Use `with-current-buffer'. --- lisp/ChangeLog | 6 +++++ lisp/eshell/esh-proc.el | 56 ++++++++++++++++++++--------------------- 2 files changed, 34 insertions(+), 28 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d39bc8c8ae0..ee381421a7d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2007-11-07 Johan Bockg,Ae(Brd + + * eshell/esh-mode.el (eshell-output-filter): + * eshell/esh-proc.el (eshell-insertion-filter, eshell-sentinel): + Use `with-current-buffer'. + 2007-11-05 Nick Roberts * progmodes/gud.el (gud-gdb): Remove vestigial gdba doc and code. diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el index fb226cf51fb..7338756e3f8 100644 --- a/lisp/eshell/esh-proc.el +++ b/lisp/eshell/esh-proc.el @@ -335,39 +335,39 @@ Used only on systems which do not support async subprocesses.") PROC is the process for which we're inserting output. STRING is the output." (when (buffer-live-p (process-buffer proc)) - (set-buffer (process-buffer proc)) - (let ((entry (assq proc eshell-process-list))) - (when entry - (setcar (nthcdr 3 entry) - (concat (nth 3 entry) string)) - (unless (nth 4 entry) ; already being handled? - (while (nth 3 entry) - (let ((data (nth 3 entry))) - (setcar (nthcdr 3 entry) nil) - (setcar (nthcdr 4 entry) t) - (eshell-output-object data nil (cadr entry)) - (setcar (nthcdr 4 entry) nil)))))))) + (with-current-buffer (process-buffer proc) + (let ((entry (assq proc eshell-process-list))) + (when entry + (setcar (nthcdr 3 entry) + (concat (nth 3 entry) string)) + (unless (nth 4 entry) ; already being handled? + (while (nth 3 entry) + (let ((data (nth 3 entry))) + (setcar (nthcdr 3 entry) nil) + (setcar (nthcdr 4 entry) t) + (eshell-output-object data nil (cadr entry)) + (setcar (nthcdr 4 entry) nil))))))))) (defun eshell-sentinel (proc string) "Generic sentinel for command processes. Reports only signals. PROC is the process that's exiting. STRING is the exit message." (when (buffer-live-p (process-buffer proc)) - (set-buffer (process-buffer proc)) - (unwind-protect - (let* ((entry (assq proc eshell-process-list))) -; (if (not entry) -; (error "Sentinel called for unowned process `%s'" -; (process-name proc)) - (when entry - (unwind-protect - (progn - (unless (string= string "run") - (unless (string-match "^\\(finished\\|exited\\)" string) - (eshell-insertion-filter proc string)) - (eshell-close-handles (process-exit-status proc) 'nil - (cadr entry)))) - (eshell-remove-process-entry entry)))) - (run-hook-with-args 'eshell-kill-hook proc string)))) + (with-current-buffer (process-buffer proc) + (unwind-protect + (let* ((entry (assq proc eshell-process-list))) +; (if (not entry) +; (error "Sentinel called for unowned process `%s'" +; (process-name proc)) + (when entry + (unwind-protect + (progn + (unless (string= string "run") + (unless (string-match "^\\(finished\\|exited\\)" string) + (eshell-insertion-filter proc string)) + (eshell-close-handles (process-exit-status proc) 'nil + (cadr entry)))) + (eshell-remove-process-entry entry)))) + (run-hook-with-args 'eshell-kill-hook proc string))))) (defun eshell-process-interact (func &optional all query) "Interact with a process, using PROMPT if more than one, via FUNC. From d388d2ac7d9a01e664637287677bde25db2a872c Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Wed, 7 Nov 2007 15:29:56 +0000 Subject: [PATCH 47/53] * dispextern.h (struct it): Don't define OVERLAY_STRING_CHUNK_SIZE twice. * xdisp.c (handle_face_prop): Fix last change. --- src/ChangeLog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 88a3c84aa9a..5849ac96f4e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2007-11-07 Chong Yidong + + * dispextern.h (struct it): Don't define OVERLAY_STRING_CHUNK_SIZE + twice. + + * xdisp.c (handle_face_prop): Fix last change. + 2007-11-06 Jan Dj,Ad(Brv * gtkutil.c (xg_tool_bar_menu_proxy): Handle GTK_IMAGE_ICON_NAME and From ebe7c7e71023de407998016be49fad97172cdd92 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Wed, 7 Nov 2007 15:30:51 +0000 Subject: [PATCH 48/53] (struct it): Don't define OVERLAY_STRING_CHUNK_SIZE twice. --- src/dispextern.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/dispextern.h b/src/dispextern.h index a3c62637497..f96a5ace4e9 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -1922,7 +1922,6 @@ struct it Lisp_Object overlay_strings[OVERLAY_STRING_CHUNK_SIZE]; /* For each overlay string, the overlay it came from. */ -#define OVERLAY_STRING_CHUNK_SIZE 16 Lisp_Object string_overlays[OVERLAY_STRING_CHUNK_SIZE]; /* If non-nil, a Lisp string being processed. If From 566242b78fad53044e4fee8f7271aa9a62a13d98 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Wed, 7 Nov 2007 15:31:20 +0000 Subject: [PATCH 49/53] (handle_face_prop): Fix last change. --- src/xdisp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index 60bca299bc1..4c78f6ac8f8 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -3369,9 +3369,9 @@ handle_face_prop (it) Lisp_Object from_overlay = (it->current.overlay_string_index >= 0 ? it->string_overlays[it->current.overlay_string_index] - : from_overlay); + : Qnil); - /* See we got to this string directly or indirectly from + /* See if we got to this string directly or indirectly from an overlay property. That includes the before-string or after-string of an overlay, strings in display properties provided by an overlay, their text properties, etc. From 76a05775d83f87c9ce17a2f16883b04e253c41ea Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 8 Nov 2007 08:51:39 +0000 Subject: [PATCH 50/53] Explain combine-and-quote-strings, split-string-and-unquote. Some re-ordering. --- etc/NEWS | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 64ad1929ada..ebc04fb173e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -42,15 +42,6 @@ below. Emacs tries to warn you about these through `bad-packages-alist'. * Changes in Emacs 22.2 -** `browse-url-emacs' loads a URL into an Emacs buffer. Handy for *.el URLs. - -** `bad-packages-alist' will warn about external packages that are known -to cause problems in this version of Emacs. - -** The values of `dired-recursive-deletes' and `dired-recursive-copies' -have been changed to `top'. This means that the user is asked once, -before deleting/copying the indicated directory recursively. - ** In Image mode, whenever the displayed image is wider and/or higher than the window, the usual keys for moving the cursor cause the image to be scrolled horizontally or vertically instead. @@ -67,6 +58,15 @@ Windows installations. Users of software which modifies the behaviour of Windows to cause focus to follow the mouse will now need to explicitly set this variable. +** `bad-packages-alist' will warn about external packages that are known +to cause problems in this version of Emacs. + +** The values of `dired-recursive-deletes' and `dired-recursive-copies' +have been changed to `top'. This means that the user is asked once, +before deleting/copying the indicated directory recursively. + +** `browse-url-emacs' loads a URL into an Emacs buffer. Handy for *.el URLs. + ** The command gdba has been removed as gdb works now for those cases where it was needed. In text command mode, if you have problems before execution has started, use M-x gud-gdb. @@ -122,9 +122,16 @@ as its frame. ** The new function `image-refresh' refreshes all images associated with a given image specification. -** The new function `split-string-and-unquote' does (what?) +** The new function `combine-and-quote-strings' concatenates a list of strings +using a specified separator. If a string contains double quotes, they +are escaped in the output. + +** The new function `split-string-and-unquote' performs the inverse operation to +`combine-and-quote-strings', i.e. splits a single string into a list +of strings, undoing any quoting added by `combine-and-quote-strings'. +(For some separator/string combinations, the original strings cannot +be recovered.) -** The new function `combine-and-quote-strings' does (what?) * Installation Changes in Emacs 22.1 From f71ee9c1b32f5145829aa0d3eb5c6a302734c2cd Mon Sep 17 00:00:00 2001 From: Vinicius Jose Latorre Date: Thu, 8 Nov 2007 17:14:46 +0000 Subject: [PATCH 51/53] Change regexp to match dir like 'a...b' --- lisp/ChangeLog | 5 +++++ lisp/eshell/em-dirs.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ee381421a7d..30b0241e8fd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-11-08 David Hansen (tiny change) + + * eshell/em-dirs.el (eshell-expand-multiple-dots): Change regexp to + match dir like "a...b". + 2007-11-07 Johan Bockg,Ae(Brd * eshell/esh-mode.el (eshell-output-filter): diff --git a/lisp/eshell/em-dirs.el b/lisp/eshell/em-dirs.el index 0000cae5adf..02556661b1b 100644 --- a/lisp/eshell/em-dirs.el +++ b/lisp/eshell/em-dirs.el @@ -319,7 +319,7 @@ in the minibuffer: (before translate-multiple-dots (filename &optional directory) activate) (setq filename (eshell-expand-multiple-dots filename)))" - (while (string-match "\\.\\.\\(\\.+\\)" path) + (while (string-match "\\(?:^\\|/\\)\\.\\.\\(\\.+\\)\\(?:$\\|/\\)" path) (let* ((extra-dots (match-string 1 path)) (len (length extra-dots)) replace-text) From 3f2623c37738dd634fd3fa1eb1581b134cbea70c Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 9 Nov 2007 03:19:27 +0000 Subject: [PATCH 52/53] (enable-local-variables): Doc fix. --- lisp/ChangeLog | 4 ++++ lisp/files.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 30b0241e8fd..20f4f7480f6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2007-11-09 Juanma Barranquero + + * files.el (enable-local-variables): Doc fix. + 2007-11-08 David Hansen (tiny change) * eshell/em-dirs.el (eshell-expand-multiple-dots): Change regexp to diff --git a/lisp/files.el b/lisp/files.el index 169912b94bc..6aff489e0a2 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -450,7 +450,7 @@ use `before-save-hook'.") (defcustom enable-local-variables t "Control use of local variables in files you visit. -The value can be t, nil, :safe, or something else. +The value can be t, nil, :safe, :all or something else. A value of t means file local variables specifications are obeyed if all the specified variable values are safe; if any values are From 9d2185d10e3da9062672d96d3b59fcea31ff17ed Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Fri, 9 Nov 2007 08:45:13 +0000 Subject: [PATCH 53/53] (face-normalize-spec): Remove function. (frame-set-background-mode): Undo last change. --- lisp/ChangeLog | 5 +++++ lisp/faces.el | 25 +------------------------ 2 files changed, 6 insertions(+), 24 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 20f4f7480f6..983fb37c1d2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-11-09 YAMAMOTO Mitsuharu + + * faces.el (face-normalize-spec): Remove function. + (frame-set-background-mode): Undo last change. + 2007-11-09 Juanma Barranquero * files.el (enable-local-variables): Doc fix. diff --git a/lisp/faces.el b/lisp/faces.el index f22b79e8fc3..ceadb6f764f 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -1505,28 +1505,6 @@ If there is neither a user setting nor a default for FACE, return nil." (get face 'saved-face) (face-default-spec face))) -(defsubst face-normalize-spec (spec) - "Return a normalized face-spec of SPEC." - (let (normalized-spec) - (while spec - (let ((attribute (car spec)) - (value (car (cdr spec)))) - ;; Support some old-style attribute names and values. - (case attribute - (:bold (setq attribute :weight value (if value 'bold 'normal))) - (:italic (setq attribute :slant value (if value 'italic 'normal))) - ((:foreground :background) - ;; Compatibility with 20.x. Some bogus face specs seem to - ;; exist containing things like `:foreground nil'. - (if (null value) (setq value 'unspecified))) - (t (unless (assq attribute face-x-resources) - (setq attribute nil)))) - (when attribute - (push attribute normalized-spec) - (push value normalized-spec))) - (setq spec (cdr (cdr spec)))) - (nreverse normalized-spec))) - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Frame-type independent color support. @@ -1669,8 +1647,7 @@ according to the `background-mode' and `display-type' frame parameters." ;; be unmodified, so we can avoid consing in the common case. (dolist (face (face-list)) (when (not (face-spec-match-p face - (face-normalize-spec - (face-user-default-spec face)) + (face-user-default-spec face) (selected-frame))) (push face locally-modified-faces))) ;; Now change to the new frame parameters