From 53ad04fc4628d0c75ff3054bd3b77c8689fca6d4 Mon Sep 17 00:00:00 2001 From: Drew Adams Date: Tue, 28 Sep 2010 01:41:00 +0200 Subject: [PATCH 01/25] * dired.el (dired-save-positions): Doc fix. (Bug#7119) --- lisp/ChangeLog | 4 ++++ lisp/dired.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8e3164cc551..87520c2721b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2010-09-27 Drew Adams + + * dired.el (dired-save-positions): Doc fix. (Bug#7119) + 2010-09-27 Andreas Schwab * Makefile.in (ELCFILES): Update. diff --git a/lisp/dired.el b/lisp/dired.el index 4a23865dfca..bb0cc223281 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1177,7 +1177,7 @@ Preserves old cursor, marks/flags, hidden-p." The positions have the form (BUFFER-POSITION WINDOW-POSITIONS). BUFFER-POSITION is the point position in the current dired buffer. -The buffer position have the form (BUFFER DIRED-FILENAME BUFFER-POINT). +It has the form (BUFFER DIRED-FILENAME BUFFER-POINT). WINDOW-POSITIONS are current positions in all windows displaying this dired buffer. The window positions have the form (WINDOW From dec834684640a6495b39bf11e500d326b4ff193b Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Tue, 28 Sep 2010 15:39:22 +0200 Subject: [PATCH 02/25] * dbusbind.c (syms_of_dbusbind): Use putenv instead of setenv, it is more portable. * keyboard.c (gobble_input): Move call of xd_read_queued_messages ... (kbd_buffer_get_event): ... here. This is needed for cygwin, which has not defined SIGIO. --- src/ChangeLog | 9 +++++++++ src/dbusbind.c | 2 +- src/keyboard.c | 12 ++++++------ 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index c74dd66edbb..9a5043cf65c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2010-09-28 Michael Albinus + + * dbusbind.c (syms_of_dbusbind): Use putenv instead of setenv, it + is more portable. + + * keyboard.c (gobble_input): Move call of xd_read_queued_messages ... + (kbd_buffer_get_event): ... here. This is needed for cygwin, which + has not defined SIGIO. + 2010-09-27 Michael Albinus * dbusbind.c (syms_of_dbusbind): Set $DBUS_FATAL_WARNINGS to "0". diff --git a/src/dbusbind.c b/src/dbusbind.c index 93887fa9902..f3a573d3bce 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c @@ -2135,7 +2135,7 @@ message arrives. */); #else Vdbus_debug = Qnil; /* We do not want to abort. */ - setenv ("DBUS_FATAL_WARNINGS", "0", 1); + putenv ("DBUS_FATAL_WARNINGS=0"); #endif Fprovide (intern_c_string ("dbusbind"), Qnil); diff --git a/src/keyboard.c b/src/keyboard.c index 056e379a44a..22c58985a56 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -4106,6 +4106,11 @@ kbd_buffer_get_event (kbp, used_mouse_menu, end_time) /* One way or another, wait until input is available; then, if interrupt handlers have not read it, read it now. */ +#ifdef HAVE_DBUS + /* Read D-Bus messages. */ + xd_read_queued_messages (); +#endif /* HAVE_DBUS */ + /* Note SIGIO has been undef'd if FIONREAD is missing. */ #ifdef SIGIO gobble_input (0); @@ -4757,7 +4762,7 @@ timer_check (do_it_now) { EMACS_TIME nexttime; - do + do { nexttime = timer_check_2 (); } @@ -7051,11 +7056,6 @@ void gobble_input (expected) int expected; { -#ifdef HAVE_DBUS - /* Read D-Bus messages. */ - xd_read_queued_messages (); -#endif /* HAVE_DBUS */ - #ifdef SIGIO if (interrupt_input) { From 18acb5ad4fcf3b8b00aacaca14cb5e0b24a854c4 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Wed, 29 Sep 2010 09:52:03 +0900 Subject: [PATCH 03/25] xfont.c (xfont_open): Fix setting of font->average_width from :avgwidth property (Bug#7123). --- src/ChangeLog | 5 +++++ src/xfont.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 435c09f0ff8..55636cc9f40 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-09-29 Kenichi Handa + + * xfont.c (xfont_open): Fix setting of font->average_width from + :avgwidth property (Bug#7123). + 2010-09-26 Jan Djärv * xgselect.c (xg_select): Clear file descriptors not set from diff --git a/src/xfont.c b/src/xfont.c index d8fe40eaa93..a676cd29c82 100644 --- a/src/xfont.c +++ b/src/xfont.c @@ -861,7 +861,7 @@ xfont_open (f, entity, pixel_size) val = Ffont_get (font_object, QCavgwidth); if (INTEGERP (val)) - font->average_width = XINT (val); + font->average_width = XINT (val) / 10; if (font->average_width < 0) font->average_width = - font->average_width; if (font->average_width == 0 From 2b7ba565a6954bd9258051a13f950a0fc23abc9c Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Wed, 29 Sep 2010 15:24:55 +0200 Subject: [PATCH 04/25] lisp/server.el (server-process-filter): Doc fix. --- lisp/ChangeLog | 4 ++++ lisp/server.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 87520c2721b..22cc8f3a3ed 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2010-09-29 Juanma Barranquero + + * server.el (server-process-filter): Doc fix. + 2010-09-27 Drew Adams * dired.el (dired-save-positions): Doc fix. (Bug#7119) diff --git a/lisp/server.el b/lisp/server.el index e8a0125f554..265b422e957 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -857,7 +857,7 @@ The following commands are accepted by the client: returned by -eval. `-error DESCRIPTION' - Signal an error (but continue processing). + Signal an error and delete process PROC. `-suspend' Suspend this terminal, i.e., stop the client process. From ac73b1faea8c6c16e2f8c528e15cf4241855316f Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Wed, 29 Sep 2010 12:09:21 -0400 Subject: [PATCH 05/25] Fix errors in CEDET 1.0 merge. * semantic/tag.el (semantic-tag-version): Bump to 2.0. * semantic/db-typecache.el (semanticdb-typecache-find-default): * semantic/imenu.el (semantic-create-imenu-index): * semantic/grammar.el (semantic--grammar-macro-function-tag): * semantic/fw.el (semanticdb-without-unloaded-file-searches): Fix require. Suggested by David Engster. * semantic/bovine/c-by.el: Regenerate. * semantic/lex-spp.el (semantic-lex-spp-debug-symbol): New var. (semantic-lex-spp-enable-debug-symbol): New command (semantic-lex-spp-value-valid-p) (semantic-lex-spp-validate-value): New functions (semantic-lex-spp-symbol-set) (semantic-lex-spp-symbol-push): Add call to validate value. (semantic-lex-spp-table-write-slot-value): Instead of erroring on invalid values during save, just save a nil. --- lisp/cedet/ChangeLog | 23 +++++ lisp/cedet/semantic/bovine/c-by.el | 125 ++++++++++++++-------------- lisp/cedet/semantic/db-typecache.el | 2 +- lisp/cedet/semantic/fw.el | 2 +- lisp/cedet/semantic/grammar.el | 2 +- lisp/cedet/semantic/imenu.el | 2 +- lisp/cedet/semantic/lex-spp.el | 33 ++++++++ lisp/cedet/semantic/tag.el | 3 +- 8 files changed, 125 insertions(+), 67 deletions(-) diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog index 5b75dfb5048..73761b4ee98 100644 --- a/lisp/cedet/ChangeLog +++ b/lisp/cedet/ChangeLog @@ -1,3 +1,26 @@ +2010-09-29 Chong Yidong + + * semantic/tag.el (semantic-tag-version): Bump to 2.0. + + * semantic/db-typecache.el (semanticdb-typecache-find-default): + * semantic/imenu.el (semantic-create-imenu-index): + * semantic/grammar.el (semantic--grammar-macro-function-tag): + * semantic/fw.el (semanticdb-without-unloaded-file-searches): Fix + require. Suggested by David Engster. + + * semantic/bovine/c-by.el: Regenerate. + +2010-09-29 Eric Ludlam + + * semantic/lex-spp.el (semantic-lex-spp-debug-symbol): New var. + (semantic-lex-spp-enable-debug-symbol): New command + (semantic-lex-spp-value-valid-p) + (semantic-lex-spp-validate-value): New functions + (semantic-lex-spp-symbol-set) + (semantic-lex-spp-symbol-push): Add call to validate value. + (semantic-lex-spp-table-write-slot-value): Instead of erroring on + invalid values during save, just save a nil. + 2010-09-25 Chong Yidong * ede/linux.el (ede-project-class-files): diff --git a/lisp/cedet/semantic/bovine/c-by.el b/lisp/cedet/semantic/bovine/c-by.el index 09fb42261a4..c33f3fb67f5 100644 --- a/lisp/cedet/semantic/bovine/c-by.el +++ b/lisp/cedet/semantic/bovine/c-by.el @@ -1240,7 +1240,9 @@ (nth 7 vals)) (nth 0 vals) (nth 10 vals) - (nth 4 vals)) + (list + (nth 4 vals)) + (nth 9 vals)) ) (opt-stars opt-class @@ -1262,7 +1264,9 @@ (nth 6 vals)) (nth 0 vals) (nth 9 vals) - (nth 4 vals)) + (list + (nth 4 vals)) + (nth 8 vals)) ) ) ;; end func-decl @@ -1433,13 +1437,11 @@ namespace-symbol opt-bits opt-array - opt-assign ,(semantic-lambda (nth 2 vals) (nth 0 vals) (nth 3 vals) - (nth 4 vals) - (nth 5 vals)) + (nth 4 vals)) ) ) ;; end varname @@ -1484,19 +1486,28 @@ ) ) ;; end variablearg-opt-name + (varname-opt-initializer + (semantic-list) + (opt-assign) + ( ;;EMPTY + ) + ) ;; end varname-opt-initializer + (varnamelist (opt-ref varname + varname-opt-initializer punctuation "\\`[,]\\'" varnamelist ,(semantic-lambda (cons (nth 1 vals) - (nth 3 vals))) + (nth 4 vals))) ) (opt-ref varname + varname-opt-initializer ,(semantic-lambda (list (nth 1 vals))) @@ -2108,74 +2119,64 @@ "\\`[&]\\'") ) ;; end expr-start + (expr-binop + (punctuation + "\\`[-]\\'") + (punctuation + "\\`[+]\\'") + (punctuation + "\\`[*]\\'") + (punctuation + "\\`[/]\\'") + (punctuation + "\\`[&]\\'" + punctuation + "\\`[&]\\'") + (punctuation + "\\`[&]\\'") + (punctuation + "\\`[|]\\'" + punctuation + "\\`[|]\\'") + (punctuation + "\\`[|]\\'") + ) ;; end expr-binop + (expression - (number + (unaryexpression + expr-binop + unaryexpression ,(semantic-lambda (list (identity start) (identity end))) ) - (multi-stage-dereference - ,(semantic-lambda - (list - (identity start) - (identity end))) - ) - (NEW - multi-stage-dereference - ,(semantic-lambda - (list - (identity start) - (identity end))) - ) - (NEW - builtintype-types - semantic-list - ,(semantic-lambda - (list - (identity start) - (identity end))) - ) - (namespace-symbol - ,(semantic-lambda - (list - (identity start) - (identity end))) - ) - (string-seq - ,(semantic-lambda - (list - (identity start) - (identity end))) - ) - (type-cast - expression - ,(semantic-lambda - (list - (identity start) - (identity end))) - ) - (semantic-list - expression - ,(semantic-lambda - (list - (identity start) - (identity end))) - ) - (semantic-list - ,(semantic-lambda - (list - (identity start) - (identity end))) - ) - (expr-start - expression + (unaryexpression ,(semantic-lambda (list (identity start) (identity end))) ) ) ;; end expression + + (unaryexpression + (number) + (multi-stage-dereference) + (NEW + multi-stage-dereference) + (NEW + builtintype-types + semantic-list) + (namespace-symbol) + (string-seq) + (type-cast + expression) + (semantic-list + expression) + (semantic-list) + (expr-start + expression) + ) ;; end unaryexpression ) "Parser table.") diff --git a/lisp/cedet/semantic/db-typecache.el b/lisp/cedet/semantic/db-typecache.el index 71b15fdf82a..59ba83fe9d0 100644 --- a/lisp/cedet/semantic/db-typecache.el +++ b/lisp/cedet/semantic/db-typecache.el @@ -403,7 +403,7 @@ TYPE is the datatype to find. PATH is the search path, which should be one table object. If FIND-FILE-MATCH is non-nil, then force the file belonging to the found tag to be loaded." - (if (not (and (featurep 'semanticdb) semanticdb-current-database)) + (if (not (and (featurep 'semantic/db) semanticdb-current-database)) nil ;; No DB, no search (save-excursion (semanticdb-typecache-find-method (or path semanticdb-current-table) diff --git a/lisp/cedet/semantic/fw.el b/lisp/cedet/semantic/fw.el index 49790861632..811508377b8 100644 --- a/lisp/cedet/semantic/fw.el +++ b/lisp/cedet/semantic/fw.el @@ -315,7 +315,7 @@ FILE, NOWARN, RAWFILE, and WILDCARDS are passed into `find-file-noselect'" (defmacro semanticdb-without-unloaded-file-searches (forms) "Execute FORMS with `unloaded' removed from the current throttle." `(let ((semanticdb-find-default-throttle - (if (featurep 'semanticdb-find) + (if (featurep 'semantic/db-find) (remq 'unloaded semanticdb-find-default-throttle) nil))) ,forms)) diff --git a/lisp/cedet/semantic/grammar.el b/lisp/cedet/semantic/grammar.el index 65365768f98..d99ae0cb0ac 100644 --- a/lisp/cedet/semantic/grammar.el +++ b/lisp/cedet/semantic/grammar.el @@ -1519,7 +1519,7 @@ Return the tag found or nil if not found." (car (semantic-find-tags-by-class 'function (or (semantic-find-tags-by-name name (current-buffer)) - (and (featurep 'semanticdb) + (and (featurep 'semantic/db) semanticdb-current-database (cdar (semanticdb-find-tags-by-name name nil t))))))) diff --git a/lisp/cedet/semantic/imenu.el b/lisp/cedet/semantic/imenu.el index e38b50bcd57..465a93a16dd 100644 --- a/lisp/cedet/semantic/imenu.el +++ b/lisp/cedet/semantic/imenu.el @@ -235,7 +235,7 @@ Optional argument STREAM is an optional stream of tags used to create menus." (setq imenu-default-goto-function 'semantic-imenu-goto-function) (prog1 (if (and semantic-imenu-index-directory - (featurep 'semanticdb) + (featurep 'semantic/db) (semanticdb-minor-mode-p)) (semantic-create-imenu-directory-index (or stream (semantic-fetch-tags-fast))) diff --git a/lisp/cedet/semantic/lex-spp.el b/lisp/cedet/semantic/lex-spp.el index 88b77e50e1d..0b4fa930b1b 100644 --- a/lisp/cedet/semantic/lex-spp.el +++ b/lisp/cedet/semantic/lex-spp.el @@ -173,10 +173,42 @@ The search priority is: (setq semantic-lex-spp-dynamic-macro-symbol-obarray-stack (make-vector 13 0)))) +(defun semantic-lex-spp-value-valid-p (value) + "Return non-nil if VALUE is valid." + (or (null value) + (stringp value) + (and (consp value) + (or (semantic-lex-token-p (car value)) + (eq (car (car value)) 'spp-arg-list))))) + +(defvar semantic-lex-spp-debug-symbol nil + "A symbol to break on if it is being set somewhere.") + +(defun semantic-lex-spp-enable-debug-symbol (sym) + "Enable debugging for symbol SYM. +Disable debugging by entering nothing." + (interactive "sSymbol: ") + (if (string= sym "") + (setq semantic-lex-spp-debug-symbol nil) + (setq semantic-lex-spp-debug-symbol sym))) + +(defmacro semantic-lex-spp-validate-value (name value) + "Validate the NAME and VALUE of a macro before it is set." +; `(progn +; (when (not (semantic-lex-spp-value-valid-p ,value)) +; (error "Symbol \"%s\" with bogus value %S" ,name ,value)) +; (when (and semantic-lex-spp-debug-symbol +; (string= semantic-lex-spp-debug-symbol name)) +; (debug)) +; ) + nil + ) + (defun semantic-lex-spp-symbol-set (name value &optional obarray-in) "Set value of spp symbol with NAME to VALUE and return VALUE. If optional OBARRAY-IN is non-nil, then use that obarray instead of the dynamic map." + (semantic-lex-spp-validate-value name value) (if (and (stringp value) (string= value "")) (setq value nil)) (set (intern name (or obarray-in (semantic-lex-spp-dynamic-map))) @@ -192,6 +224,7 @@ the dynamic map." (defun semantic-lex-spp-symbol-push (name value) "Push macro NAME with VALUE into the map. Reverse with `semantic-lex-spp-symbol-pop'." + (semantic-lex-spp-validate-value name value) (let* ((map (semantic-lex-spp-dynamic-map)) (stack (semantic-lex-spp-dynamic-map-stack)) (mapsym (intern name map)) diff --git a/lisp/cedet/semantic/tag.el b/lisp/cedet/semantic/tag.el index e9094fcb051..0195a29b66e 100644 --- a/lisp/cedet/semantic/tag.el +++ b/lisp/cedet/semantic/tag.el @@ -53,7 +53,7 @@ (declare-function semantic-fetch-tags "semantic") (declare-function semantic-clear-toplevel-cache "semantic") -(defconst semantic-tag-version "2.0pre7" +(defconst semantic-tag-version "2.0" "Version string of semantic tags made with this code.") (defconst semantic-tag-incompatible-version "1.0" @@ -221,6 +221,7 @@ See also the function `semantic-ctxt-current-mode'." ;; beginning of TAG. (or (and (>= (point) start) (< (point) end)) (goto-char start)) + (require 'semantic/ctxt) (semantic-ctxt-current-mode))))) (defsubst semantic--tag-attributes-cdr (tag) From 5d2e937703a5ccc2b3c731fe227915c0d8bc8315 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Wed, 29 Sep 2010 21:41:13 -0400 Subject: [PATCH 06/25] Fix more CEDET require statements. * semantic/bovine/el.el: * semantic/mru-bookmark.el (global-semantic-mru-bookmark-mode): Fix require statements. --- lisp/cedet/ChangeLog | 6 ++++++ lisp/cedet/semantic/bovine/el.el | 2 +- lisp/cedet/semantic/mru-bookmark.el | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog index 73761b4ee98..c0d96e795cc 100644 --- a/lisp/cedet/ChangeLog +++ b/lisp/cedet/ChangeLog @@ -1,3 +1,9 @@ +2010-09-30 Chong Yidong + + * semantic/bovine/el.el: + * semantic/mru-bookmark.el (global-semantic-mru-bookmark-mode): + Fix require statements. + 2010-09-29 Chong Yidong * semantic/tag.el (semantic-tag-version): Bump to 2.0. diff --git a/lisp/cedet/semantic/bovine/el.el b/lisp/cedet/semantic/bovine/el.el index 5b5a5660b7d..ed1f74c590f 100644 --- a/lisp/cedet/semantic/bovine/el.el +++ b/lisp/cedet/semantic/bovine/el.el @@ -958,7 +958,7 @@ ELisp variables can be pretty long, so track this one too.") (add-hook 'lisp-mode-hook 'semantic-default-elisp-setup) (eval-after-load "semanticdb" - '(require 'semanticdb-el) + '(require 'semantic/db-el) ) (provide 'semantic/bovine/el) diff --git a/lisp/cedet/semantic/mru-bookmark.el b/lisp/cedet/semantic/mru-bookmark.el index 1982f81cbad..2a6ac8f9b10 100644 --- a/lisp/cedet/semantic/mru-bookmark.el +++ b/lisp/cedet/semantic/mru-bookmark.el @@ -246,7 +246,7 @@ been edited, and you can re-visit them with \\[semantic-mrub-switch-tags]." :group 'semantic :group 'semantic-modes :type 'boolean - :require 'semantic-util-modes + :require 'semantic/util-modes :initialize 'custom-initialize-default :set (lambda (sym val) (global-semantic-mru-bookmark-mode (if val 1 -1)))) From fcaf88782ba68e7c0618a663db51cf4a26cb3926 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Thu, 30 Sep 2010 13:28:34 +0900 Subject: [PATCH 07/25] Complement a coding system for encoding arguments and input to a process. --- src/ChangeLog | 16 ++++++++++++++ src/callproc.c | 21 ++++++------------- src/coding.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/coding.h | 1 + src/process.c | 36 ++++++++++++++++++++++++------- 5 files changed, 108 insertions(+), 23 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index b756aebe8a5..773715ed1f2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,19 @@ +2010-09-30 Kenichi Handa + + * coding.c (complement_process_encoding_system): New function. + + * coding.h (complement_process_encoding_system): Extern it. + + * callproc.c (Fcall_process): Complement the coding system for + encoding arguments. + (Fcall_process_region): Complement the coding system for encoding + the input to the process. + + * process.c (Fstart_process): Complement the coding system for + encoding arguments. + (send_process): Complement the coding system for encoding what + sent to the process. + 2010-09-29 Kenichi Handa * xfont.c (xfont_open): Fix setting of font->average_width from diff --git a/src/callproc.c b/src/callproc.c index bed3302e508..863d4e41dbd 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -287,21 +287,16 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) if (!NILP (Vcoding_system_for_write)) val = Vcoding_system_for_write; else if (! must_encode) - val = Qnil; + val = Qraw_text; else { args2 = (Lisp_Object *) alloca ((nargs + 1) * sizeof *args2); args2[0] = Qcall_process; for (i = 0; i < nargs; i++) args2[i + 1] = args[i]; coding_systems = Ffind_operation_coding_system (nargs + 1, args2); - if (CONSP (coding_systems)) - val = XCDR (coding_systems); - else if (CONSP (Vdefault_process_coding_system)) - val = XCDR (Vdefault_process_coding_system); - else - val = Qnil; + val = CONSP (coding_systems) ? XCDR (coding_systems) : Qnil; } - val = coding_inherit_eol_type (val, Qnil); + val = complement_process_encoding_system (val); setup_coding_system (Fcheck_coding_system (val), &argument_coding); coding_attrs = CODING_ID_ATTRS (argument_coding.id); if (NILP (CODING_ATTR_ASCII_COMPAT (coding_attrs))) @@ -954,20 +949,16 @@ usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &r if (!NILP (Vcoding_system_for_write)) val = Vcoding_system_for_write; else if (NILP (current_buffer->enable_multibyte_characters)) - val = Qnil; + val = Qraw_text; else { args2 = (Lisp_Object *) alloca ((nargs + 1) * sizeof *args2); args2[0] = Qcall_process_region; for (i = 0; i < nargs; i++) args2[i + 1] = args[i]; coding_systems = Ffind_operation_coding_system (nargs + 1, args2); - if (CONSP (coding_systems)) - val = XCDR (coding_systems); - else if (CONSP (Vdefault_process_coding_system)) - val = XCDR (Vdefault_process_coding_system); - else - val = Qnil; + val = CONSP (coding_systems) ? XCDR (coding_systems) : Qnil; } + val = complement_process_encoding_system (val); { int count1 = SPECPDL_INDEX (); diff --git a/src/coding.c b/src/coding.c index 92b328091ff..cbebeff6310 100644 --- a/src/coding.c +++ b/src/coding.c @@ -6112,6 +6112,63 @@ coding_inherit_eol_type (coding_system, parent) return coding_system; } + +/* Check if text-conversion and eol-conversion of CODING_SYSTEM are + decided for writing to a process. If not, complement them, and + return a new coding system. */ + +Lisp_Object +complement_process_encoding_system (coding_system) + Lisp_Object coding_system; +{ + Lisp_Object spec, attrs, coding_type, eol_type; + + if (NILP (coding_system)) + coding_system = Qundecided; + spec = CODING_SYSTEM_SPEC (coding_system); + attrs = AREF (spec, 0); + coding_type = CODING_ATTR_TYPE (attrs); + eol_type = AREF (spec, 2); + + if (EQ (coding_type, Qundecided)) + { + /* We must decide the text-conversion part. */ + if (CONSP (Vdefault_process_coding_system)) + { + coding_system = XCDR (Vdefault_process_coding_system); + if (! NILP (coding_system)) + { + spec = CODING_SYSTEM_SPEC (coding_system); + attrs = AREF (spec, 0); + coding_type = CODING_ATTR_TYPE (attrs); + eol_type = AREF (spec, 2); + } + } + if (EQ (coding_type, Qundecided)) + { + coding_system = preferred_coding_system (); + spec = CODING_SYSTEM_SPEC (coding_system); + attrs = AREF (spec, 0); + coding_type = CODING_ATTR_TYPE (attrs); + eol_type = AREF (spec, 2); + } + if (EQ (coding_type, Qundecided)) + { + coding_system = Qraw_text; + coding_type = Qraw_text; + eol_type = Qnil; + } + } + if (NILP (eol_type) || VECTORP (eol_type)) + { + /* We must decide the eol-conversion part. */ + coding_system = coding_inherit_eol_type (coding_system, Qnil); + } + + return coding_system; +} + + /* Emacs has a mechanism to automatically detect a coding system if it is one of Emacs' internal format, ISO2022, SJIS, and BIG5. But, it's impossible to distinguish some coding systems accurately diff --git a/src/coding.h b/src/coding.h index f47c33847f9..58d70644124 100644 --- a/src/coding.h +++ b/src/coding.h @@ -707,6 +707,7 @@ extern Lisp_Object code_convert_string_norecord P_ ((Lisp_Object, Lisp_Object, int)); extern Lisp_Object raw_text_coding_system P_ ((Lisp_Object)); extern Lisp_Object coding_inherit_eol_type P_ ((Lisp_Object, Lisp_Object)); +extern Lisp_Object complement_process_encoding_system P_ ((Lisp_Object)); extern int decode_coding_gap P_ ((struct coding_system *, EMACS_INT, EMACS_INT)); diff --git a/src/process.c b/src/process.c index 7adc114075e..3e2aa61ffe6 100644 --- a/src/process.c +++ b/src/process.c @@ -1727,6 +1727,11 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) val = XCDR (Vdefault_process_coding_system); } XPROCESS (proc)->encode_coding_system = val; + /* Note: At this momemnt, the above coding system may leave + text-conversion or eol-conversion unspecified. They will be + decided after we read output from the process and decode it by + some coding system, or just before we actually send a text to + the process. */ } @@ -1769,6 +1774,7 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) tem = Fsubstring (tem, make_number (2), Qnil); { + Lisp_Object arg_encoding = Qnil; struct gcpro gcpro1; GCPRO1 (tem); @@ -1786,9 +1792,14 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) tem = Fcons (args[i], tem); CHECK_STRING (XCAR (tem)); if (STRING_MULTIBYTE (XCAR (tem))) - XSETCAR (tem, - code_convert_string_norecord - (XCAR (tem), XPROCESS (proc)->encode_coding_system, 1)); + { + if (NILP (arg_encoding)) + arg_encoding = (complement_process_encoding_system + (XPROCESS (proc)->encode_coding_system)); + XSETCAR (tem, + code_convert_string_norecord + (XCAR (tem), arg_encoding, 1)); + } } UNGCPRO; @@ -5690,12 +5701,21 @@ send_process (proc, buf, len, object) && !NILP (XBUFFER (object)->enable_multibyte_characters)) || EQ (object, Qt)) { + p->encode_coding_system + = complement_process_encoding_system (p->encode_coding_system); if (!EQ (Vlast_coding_system_used, p->encode_coding_system)) - /* The coding system for encoding was changed to raw-text - because we sent a unibyte text previously. Now we are - sending a multibyte text, thus we must encode it by the - original coding system specified for the current process. */ - setup_coding_system (p->encode_coding_system, coding); + { + /* The coding system for encoding was changed to raw-text + because we sent a unibyte text previously. Now we are + sending a multibyte text, thus we must encode it by the + original coding system specified for the current process. + + Another reason we comming here is that the coding system + was just complemented and new one was returned by + complement_process_encoding_system. */ + setup_coding_system (p->encode_coding_system, coding); + Vlast_coding_system_used = p->encode_coding_system; + } coding->src_multibyte = 1; } else From 55586d2a88c1273958893da1e17979a3e7a89691 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 1 Oct 2010 01:05:26 +0200 Subject: [PATCH 08/25] * lisp/minibuffer.el (completion--replace): Better preserve markers. Fixes: debbugs:7138 --- lisp/ChangeLog | 9 +++++++-- lisp/minibuffer.el | 22 +++++++++++++++++++++- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 22cc8f3a3ed..696941f93cd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-09-30 Stefan Monnier + + * minibuffer.el (completion--replace): + Better preserve markers (bug#7138). + 2010-09-29 Juanma Barranquero * server.el (server-process-filter): Doc fix. @@ -10,8 +15,8 @@ * Makefile.in (ELCFILES): Update. - * emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Avoid - infinite recursion on erroneous lambda form. (Bug#7114) + * emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): + Avoid infinite recursion on erroneous lambda form. (Bug#7114) 2010-09-27 Kenichi Handa diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 93a222053f6..9a477020421 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -475,10 +475,30 @@ in the last `cdr'." (defun completion--replace (beg end newtext) "Replace the buffer text between BEG and END with NEWTEXT. Moves point to the end of the new text." - ;; This should be in subr.el. + ;; Maybe this should be in subr.el. ;; You'd think this is trivial to do, but details matter if you want ;; to keep markers "at the right place" and be robust in the face of ;; after-change-functions that may themselves modify the buffer. + (let ((prefix-len 0)) + ;; Don't touch markers in the shared prefix (if any). + (while (and (< prefix-len (length newtext)) + (< (+ beg prefix-len) end) + (eq (char-after (+ beg prefix-len)) + (aref newtext prefix-len))) + (setq prefix-len (1+ prefix-len))) + (unless (zerop prefix-len) + (setq beg (+ beg prefix-len)) + (setq newtext (substring newtext prefix-len)))) + (let ((suffix-len 0)) + ;; Don't touch markers in the shared suffix (if any). + (while (and (< suffix-len (length newtext)) + (< beg (- end suffix-len)) + (eq (char-before (- end suffix-len)) + (aref newtext (- (length newtext) suffix-len 1)))) + (setq suffix-len (1+ suffix-len))) + (unless (zerop suffix-len) + (setq end (- end suffix-len)) + (setq newtext (substring newtext 0 (- suffix-len))))) (goto-char beg) (insert newtext) (delete-region (point) (+ (point) (- end beg)))) From b336bfcdf39f1e4d35bff4a7bd01d3b4bca8f516 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 30 Sep 2010 20:41:12 -0700 Subject: [PATCH 09/25] Close bug#3992. * lib-src/emacsclient.c (set_local_socket) [DARWIN_OS]: Try as a fall-back DARWIN_USER_TEMP_DIR. --- lib-src/ChangeLog | 5 +++++ lib-src/emacsclient.c | 13 ++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 6b3584eb90f..11da74f63b0 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,8 @@ +2010-10-01 Glenn Morris + + * emacsclient.c (set_local_socket) [DARWIN_OS]: Try as a fall-back + DARWIN_USER_TEMP_DIR. (Bug#3992) + 2010-05-07 Chong Yidong * Version 23.2 released. diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 01241b518bb..05f01b3b097 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -1249,7 +1249,18 @@ set_local_socket () { tmpdir = egetenv ("TMPDIR"); if (!tmpdir) - tmpdir = "/tmp"; + { +#ifdef DARWIN_OS + size_t n = confstr (_CS_DARWIN_USER_TEMP_DIR, NULL, (size_t) 0); + if (n > 0) + { + tmpdir = alloca (n); + confstr (_CS_DARWIN_USER_TEMP_DIR, tmpdir, n); + } + else +#endif + tmpdir = "/tmp"; + } socket_name = alloca (strlen (tmpdir) + strlen (server_name) + EXTRA_SPACE); sprintf (socket_name, "%s/emacs%d/%s", From 1911a33b9dc4beefaf75f67719ea7f6cf447b3ff Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Sat, 2 Oct 2010 10:44:50 +0900 Subject: [PATCH 10/25] Fix complementing of a coding system --- src/ChangeLog | 7 +++++++ src/coding.c | 13 +++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 773715ed1f2..eb9ba22b0b2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2010-10-02 Kenichi Handa + + * coding.c (coding_inherit_eol_type): If parent doesn't specify + eol-format, inherit from the system's default. + (complement_process_encoding_system): Make a new coding system + inherit the original eol-format. + 2010-09-30 Kenichi Handa * coding.c (complement_process_encoding_system): New function. diff --git a/src/coding.c b/src/coding.c index cbebeff6310..e2819f62e55 100644 --- a/src/coding.c +++ b/src/coding.c @@ -6073,10 +6073,9 @@ raw_text_coding_system (coding_system) } -/* If CODING_SYSTEM doesn't specify end-of-line format but PARENT - does, return one of the subsidiary that has the same eol-spec as - PARENT. Otherwise, return CODING_SYSTEM. If PARENT is nil, - inherit end-of-line format from the system's setting +/* If CODING_SYSTEM doesn't specify end-of-line format, return one of + the subsidiary that has the same eol-spec as PARENT (if it is not + nil and specifies end-of-line format) or the system's setting (system_eol_type). */ Lisp_Object @@ -6099,6 +6098,8 @@ coding_inherit_eol_type (coding_system, parent) parent_spec = CODING_SYSTEM_SPEC (parent); parent_eol_type = AREF (parent_spec, 2); + if (VECTORP (parent_eol_type)) + parent_eol_type = system_eol_type; } else parent_eol_type = system_eol_type; @@ -6132,7 +6133,7 @@ complement_process_encoding_system (coding_system) if (EQ (coding_type, Qundecided)) { - /* We must decide the text-conversion part. */ + /* We must decide the text-conversion part ar first. */ if (CONSP (Vdefault_process_coding_system)) { coding_system = XCDR (Vdefault_process_coding_system); @@ -6162,7 +6163,7 @@ complement_process_encoding_system (coding_system) if (NILP (eol_type) || VECTORP (eol_type)) { /* We must decide the eol-conversion part. */ - coding_system = coding_inherit_eol_type (coding_system, Qnil); + coding_system = coding_inherit_eol_type (coding_system, coding_system); } return coding_system; From 39f9da30e9ddc652496faf8eaa561a427946744f Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 2 Oct 2010 18:18:35 -0700 Subject: [PATCH 11/25] Add missing ChangeLog entry for r1.146 of lispref/text.texi. --- doc/lispref/ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 4302da5aa27..2aca9fce5bf 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -2325,6 +2325,12 @@ * display.texi (Images): Delete redundant @findex. +2007-08-16 Stefan Monnier + + * text.texi (Change Hooks): (after|before)-change-functions are no + longer bound to nil while running; rather inhibit-modification-hooks + is t. + 2007-08-16 Richard Stallman * processes.texi (Asynchronous Processes): Clarify From 7b2bf907f15edfed9480e7c4087cc54b603e426c Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 2 Oct 2010 18:23:50 -0700 Subject: [PATCH 12/25] Doc fix. * src/buffer.c (before-change-functions, after-change-functions): Three-year overdue doc fix following 2007-08-13 change. --- src/ChangeLog | 5 +++++ src/buffer.c | 10 ++-------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index eb9ba22b0b2..e985c8f84cf 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-10-03 Glenn Morris + + * buffer.c (before-change-functions, after-change-functions): + Three-year overdue doc fix following 2007-08-13 change. + 2010-10-02 Kenichi Handa * coding.c (coding_inherit_eol_type): If parent doesn't specify diff --git a/src/buffer.c b/src/buffer.c index adb85b83e5f..939e2bb0e19 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -6096,10 +6096,7 @@ No information is given about the length of the text after the change. Buffer changes made while executing the `before-change-functions' don't call any before-change or after-change functions. -That's because these variables are temporarily set to nil. -As a result, a hook function cannot straightforwardly alter the -value of these variables. See the Emacs Lisp manual for a way of -accomplishing an equivalent result by using other variables. +That's because `inhibit-modification-hooks' is temporarily set non-nil. If an unhandled error happens in running these functions, the variable's value remains nil. That prevents the error @@ -6117,10 +6114,7 @@ and the post-change beginning and end are at the same place.) Buffer changes made while executing the `after-change-functions' don't call any before-change or after-change functions. -That's because these variables are temporarily set to nil. -As a result, a hook function cannot straightforwardly alter the -value of these variables. See the Emacs Lisp manual for a way of -accomplishing an equivalent result by using other variables. +That's because `inhibit-modification-hooks' is temporarily set non-nil. If an unhandled error happens in running these functions, the variable's value remains nil. That prevents the error From 83b8ea28ea1d3f9f7c73af717fefaaeca18a1594 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Sat, 2 Oct 2010 21:27:39 -0400 Subject: [PATCH 13/25] Fix return value of dnd-get-local-file-name (Bug#7090). * lisp/dnd.el (dnd-get-local-file-name): If MUST-EXIST is non-nil, only return non-nil if the file exists (Bug#7090). --- lisp/ChangeLog | 5 +++++ lisp/dnd.el | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 696941f93cd..acc2e0c382f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-10-03 Leo + + * dnd.el (dnd-get-local-file-name): If MUST-EXIST is non-nil, only + return non-nil if the file exists (Bug#7090). + 2010-09-30 Stefan Monnier * minibuffer.el (completion--replace): diff --git a/lisp/dnd.el b/lisp/dnd.el index d7cbb641bab..aadfad6d7ac 100644 --- a/lisp/dnd.el +++ b/lisp/dnd.el @@ -154,10 +154,11 @@ Return nil if URI is not a local file." (let* ((decoded-f (decode-coding-string f (or file-name-coding-system - default-file-name-coding-system))) - (try-f (if (file-readable-p decoded-f) decoded-f f))) - (when (file-readable-p try-f) try-f))))) - + default-file-name-coding-system)))) + (setq f (cond ((file-readable-p decoded-f) decoded-f) + ((file-readable-p f) f) + (t nil))))) + f)) (defun dnd-open-local-file (uri action) "Open a local file. From a79b0f2863d2222fed175f6c6b3d535590c59558 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sun, 3 Oct 2010 11:23:07 +0200 Subject: [PATCH 14/25] * dbusbind.c (syms_of_dbusbind): Move putenv call ... (Fdbus_init_bus): ... here. (Bug#7113) --- src/ChangeLog | 5 +++++ src/dbusbind.c | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index e985c8f84cf..156e64a1d45 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-10-03 Michael Albinus + + * dbusbind.c (syms_of_dbusbind): Move putenv call ... + (Fdbus_init_bus): ... here. (Bug#7113) + 2010-10-03 Glenn Morris * buffer.c (before-change-functions, after-change-functions): diff --git a/src/dbusbind.c b/src/dbusbind.c index f3a573d3bce..460cf52364e 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c @@ -854,6 +854,9 @@ This is an internal function, it shall not be used outside dbus.el. */) NULL, (void*) XHASH (bus), NULL)) XD_SIGNAL1 (build_string ("Cannot add watch functions")); + /* We do not want to abort. */ + putenv ("DBUS_FATAL_WARNINGS=0"); + /* Return. */ return Qnil; } @@ -2130,12 +2133,11 @@ message arrives. */); doc: /* If non-nil, debug messages of D-Bus bindings are raised. */); #ifdef DBUS_DEBUG Vdbus_debug = Qt; - /* We can also set environment DBUS_VERBOSE=1 in order to see more - traces. */ + /* We can also set environment variable DBUS_VERBOSE=1 in order to + see more traces. This requires libdbus-1 to be configured with + --enable-verbose-mode. */ #else Vdbus_debug = Qnil; - /* We do not want to abort. */ - putenv ("DBUS_FATAL_WARNINGS=0"); #endif Fprovide (intern_c_string ("dbusbind"), Qnil); From 8686a5eafc46055d39c30104ebe209a100940f1c Mon Sep 17 00:00:00 2001 From: Olof Ohlsson Sax Date: Sun, 3 Oct 2010 12:43:54 -0700 Subject: [PATCH 15/25] * lisp/vc-svn.el (vc-svn-merge-news): Use --non-interactive. (Bug#7152) --- lisp/ChangeLog | 4 ++++ lisp/vc-svn.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index acc2e0c382f..84162ef502d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2010-10-03 Olof Ohlsson Sax (tiny change) + + * vc-svn.el (vc-svn-merge-news): Use --non-interactive. (Bug#7152) + 2010-10-03 Leo * dnd.el (dnd-get-local-file-name): If MUST-EXIST is non-nil, only diff --git a/lisp/vc-svn.el b/lisp/vc-svn.el index 34ebc3bb949..7b95c2a214d 100644 --- a/lisp/vc-svn.el +++ b/lisp/vc-svn.el @@ -373,7 +373,7 @@ The changes are between FIRST-VERSION and SECOND-VERSION." (message "Merging changes into %s..." file) ;; (vc-file-setprop file 'vc-working-revision nil) (vc-file-setprop file 'vc-checkout-time 0) - (vc-svn-command nil 0 file "update") + (vc-svn-command nil 0 file "--non-interactive" "update") ; see bug#7152 ;; Analyze the merge result reported by SVN, and set ;; file properties accordingly. (with-current-buffer (get-buffer "*vc*") From 397ae2261860609d3f320b9c4255ca8f92353c50 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 3 Oct 2010 15:50:14 -0400 Subject: [PATCH 16/25] Use lexical-let to avoid false matches in var completion (Bug#7056). * lisp/minibuffer.el (completion--some, completion--do-completion) (minibuffer-complete-and-exit, minibuffer-completion-help) (completion-basic-try-completion) (completion-basic-all-completions) (completion-pcm--find-all-completions): Use lexical-let to avoid some false matches in variable completion (Bug#7056) --- lisp/ChangeLog | 9 ++++ lisp/minibuffer.el | 112 ++++++++++++++++++++++++--------------------- 2 files changed, 68 insertions(+), 53 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 84162ef502d..85d108356cc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2010-10-03 Chong Yidong + + * minibuffer.el (completion--some, completion--do-completion) + (minibuffer-complete-and-exit, minibuffer-completion-help) + (completion-basic-try-completion) + (completion-basic-all-completions) + (completion-pcm--find-all-completions): Use lexical-let to + avoid some false matches in variable completion (Bug#7056) + 2010-10-03 Olof Ohlsson Sax (tiny change) * vc-svn.el (vc-svn-merge-news): Use --non-interactive. (Bug#7152) diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 9a477020421..a4ab5261f7c 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -129,8 +129,8 @@ the closest directory separators." "Apply FUN to each element of XS in turn. Return the first non-nil returned value. Like CL's `some'." - (let ((firsterror nil) - res) + (lexical-let ((firsterror nil) + res) (while (and (not res) xs) (condition-case err (setq res (funcall fun (pop xs))) @@ -518,15 +518,16 @@ E = after completion we now have an Exact match. 101 5 ??? impossible 110 6 some completion happened 111 7 completed to an exact completion" - (let* ((beg (field-beginning)) - (end (field-end)) - (string (buffer-substring beg end)) - (comp (funcall (or try-completion-function - 'completion-try-completion) - string - minibuffer-completion-table - minibuffer-completion-predicate - (- (point) beg)))) + (lexical-let* + ((beg (field-beginning)) + (end (field-end)) + (string (buffer-substring beg end)) + (comp (funcall (or try-completion-function + 'completion-try-completion) + string + minibuffer-completion-table + minibuffer-completion-predicate + (- (point) beg)))) (cond ((null comp) (minibuffer-hide-completions) @@ -539,14 +540,15 @@ E = after completion we now have an Exact match. ;; `completed' should be t if some completion was done, which doesn't ;; include simply changing the case of the entered string. However, ;; for appearance, the string is rewritten if the case changes. - (let* ((comp-pos (cdr comp)) - (completion (car comp)) - (completed (not (eq t (compare-strings completion nil nil - string nil nil t)))) - (unchanged (eq t (compare-strings completion nil nil - string nil nil nil)))) + (lexical-let* + ((comp-pos (cdr comp)) + (completion (car comp)) + (completed (not (eq t (compare-strings completion nil nil + string nil nil t)))) + (unchanged (eq t (compare-strings completion nil nil + string nil nil nil)))) (if unchanged - (goto-char end) + (goto-char end) ;; Insert in minibuffer the chars we got. (completion--replace beg end completion)) ;; Move point to its completion-mandated destination. @@ -693,8 +695,8 @@ If `minibuffer-completion-confirm' is `confirm-after-completion', `minibuffer-confirm-exit-commands', and accept the input otherwise." (interactive) - (let ((beg (field-beginning)) - (end (field-end))) + (lexical-let ((beg (field-beginning)) + (end (field-end))) (cond ;; Allow user to specify null string ((= beg end) (exit-minibuffer)) @@ -1071,13 +1073,13 @@ variables.") "Display a list of possible completions of the current minibuffer contents." (interactive) (message "Making completion list...") - (let* ((start (field-beginning)) - (string (field-string)) - (completions (completion-all-completions - string - minibuffer-completion-table - minibuffer-completion-predicate - (- (point) (field-beginning))))) + (lexical-let* ((start (field-beginning)) + (string (field-string)) + (completions (completion-all-completions + string + minibuffer-completion-table + minibuffer-completion-predicate + (- (point) (field-beginning))))) (message nil) (if (and completions (or (consp (cdr completions)) @@ -1707,9 +1709,10 @@ Return the new suffix." suffix)) (defun completion-basic-try-completion (string table pred point) - (let* ((beforepoint (substring string 0 point)) - (afterpoint (substring string point)) - (bounds (completion-boundaries beforepoint table pred afterpoint))) + (lexical-let* + ((beforepoint (substring string 0 point)) + (afterpoint (substring string point)) + (bounds (completion-boundaries beforepoint table pred afterpoint))) (if (zerop (cdr bounds)) ;; `try-completion' may return a subtly different result ;; than `all+merge', so try to use it whenever possible. @@ -1720,28 +1723,30 @@ Return the new suffix." (concat completion (completion--merge-suffix completion point afterpoint)) (length completion)))) - (let* ((suffix (substring afterpoint (cdr bounds))) - (prefix (substring beforepoint 0 (car bounds))) - (pattern (delete - "" (list (substring beforepoint (car bounds)) - 'point - (substring afterpoint 0 (cdr bounds))))) - (all (completion-pcm--all-completions prefix pattern table pred))) + (lexical-let* + ((suffix (substring afterpoint (cdr bounds))) + (prefix (substring beforepoint 0 (car bounds))) + (pattern (delete + "" (list (substring beforepoint (car bounds)) + 'point + (substring afterpoint 0 (cdr bounds))))) + (all (completion-pcm--all-completions prefix pattern table pred))) (if minibuffer-completing-file-name (setq all (completion-pcm--filename-try-filter all))) (completion-pcm--merge-try pattern all prefix suffix))))) (defun completion-basic-all-completions (string table pred point) - (let* ((beforepoint (substring string 0 point)) - (afterpoint (substring string point)) - (bounds (completion-boundaries beforepoint table pred afterpoint)) - (suffix (substring afterpoint (cdr bounds))) - (prefix (substring beforepoint 0 (car bounds))) - (pattern (delete - "" (list (substring beforepoint (car bounds)) - 'point - (substring afterpoint 0 (cdr bounds))))) - (all (completion-pcm--all-completions prefix pattern table pred))) + (lexical-let* + ((beforepoint (substring string 0 point)) + (afterpoint (substring string point)) + (bounds (completion-boundaries beforepoint table pred afterpoint)) + (suffix (substring afterpoint (cdr bounds))) + (prefix (substring beforepoint 0 (car bounds))) + (pattern (delete + "" (list (substring beforepoint (car bounds)) + 'point + (substring afterpoint 0 (cdr bounds))))) + (all (completion-pcm--all-completions prefix pattern table pred))) (completion-hilit-commonality all point (car bounds)))) ;;; Partial-completion-mode style completion. @@ -1896,12 +1901,13 @@ POINT is a position inside STRING. FILTER is a function applied to the return value, that can be used, e.g. to filter out additional entries (because TABLE migth not obey PRED)." (unless filter (setq filter 'identity)) - (let* ((beforepoint (substring string 0 point)) - (afterpoint (substring string point)) - (bounds (completion-boundaries beforepoint table pred afterpoint)) - (prefix (substring beforepoint 0 (car bounds))) - (suffix (substring afterpoint (cdr bounds))) - firsterror) + (lexical-let* + ((beforepoint (substring string 0 point)) + (afterpoint (substring string point)) + (bounds (completion-boundaries beforepoint table pred afterpoint)) + (prefix (substring beforepoint 0 (car bounds))) + (suffix (substring afterpoint (cdr bounds))) + firsterror) (setq string (substring string (car bounds) (+ point (cdr bounds)))) (let* ((relpoint (- point (car bounds))) (pattern (completion-pcm--string->pattern string relpoint)) From 5886ec9c0c7a250d987ac6180577b4574ea00f21 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Mon, 4 Oct 2010 10:47:51 +0900 Subject: [PATCH 17/25] coding.c (complement_process_encoding_system): Fix previous change. --- src/ChangeLog | 5 +++++ src/coding.c | 54 +++++++++++++++++++++++++++------------------------ 2 files changed, 34 insertions(+), 25 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index eb9ba22b0b2..bb20d5739de 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-10-04 Kenichi Handa + + * coding.c (complement_process_encoding_system): Fix previous + change. + 2010-10-02 Kenichi Handa * coding.c (coding_inherit_eol_type): If parent doesn't specify diff --git a/src/coding.c b/src/coding.c index e2819f62e55..4b52c838d67 100644 --- a/src/coding.c +++ b/src/coding.c @@ -6122,51 +6122,55 @@ Lisp_Object complement_process_encoding_system (coding_system) Lisp_Object coding_system; { - Lisp_Object spec, attrs, coding_type, eol_type; + Lisp_Object coding_base = Qnil, eol_base = Qnil; + Lisp_Object spec, attrs; if (NILP (coding_system)) coding_system = Qundecided; spec = CODING_SYSTEM_SPEC (coding_system); attrs = AREF (spec, 0); - coding_type = CODING_ATTR_TYPE (attrs); - eol_type = AREF (spec, 2); + if (! EQ (CODING_ATTR_TYPE (attrs), Qundecided)) + coding_base = CODING_ATTR_BASE_NAME (attrs); + if (! VECTORP (AREF (spec, 2))) + eol_base = coding_system; - if (EQ (coding_type, Qundecided)) + if (NILP (coding_base)) { /* We must decide the text-conversion part ar first. */ - if (CONSP (Vdefault_process_coding_system)) + if (CONSP (Vdefault_process_coding_system) + && ! NILP (XCDR (Vdefault_process_coding_system))) { coding_system = XCDR (Vdefault_process_coding_system); - if (! NILP (coding_system)) - { - spec = CODING_SYSTEM_SPEC (coding_system); - attrs = AREF (spec, 0); - coding_type = CODING_ATTR_TYPE (attrs); - eol_type = AREF (spec, 2); - } + spec = CODING_SYSTEM_SPEC (coding_system); + attrs = AREF (spec, 0); + if (! EQ (CODING_ATTR_TYPE (attrs), Qundecided)) + coding_base = CODING_ATTR_BASE_NAME (attrs); + if (NILP (eol_base) && ! VECTORP (AREF (spec, 2))) + eol_base = coding_system; } - if (EQ (coding_type, Qundecided)) + if (NILP (coding_base)) { coding_system = preferred_coding_system (); spec = CODING_SYSTEM_SPEC (coding_system); attrs = AREF (spec, 0); - coding_type = CODING_ATTR_TYPE (attrs); - eol_type = AREF (spec, 2); + if (! EQ (CODING_ATTR_TYPE (attrs), Qundecided)) + coding_base = CODING_ATTR_BASE_NAME (attrs); + if (NILP (eol_base) && ! VECTORP (AREF (spec, 2))) + eol_base = coding_system; } - if (EQ (coding_type, Qundecided)) + if (NILP (coding_base)) { - coding_system = Qraw_text; - coding_type = Qraw_text; - eol_type = Qnil; + spec = CODING_SYSTEM_SPEC (Qraw_text); + attrs = AREF (spec, 0); + if (! EQ (CODING_ATTR_TYPE (attrs), Qundecided)) + coding_base = CODING_ATTR_BASE_NAME (attrs); + if (NILP (eol_base) && ! VECTORP (AREF (spec, 2))) + eol_base = coding_system; } } - if (NILP (eol_type) || VECTORP (eol_type)) - { - /* We must decide the eol-conversion part. */ - coding_system = coding_inherit_eol_type (coding_system, coding_system); - } - return coding_system; + /* We must decide the eol-conversion part (if not yet done). */ + return coding_inherit_eol_type (coding_base, eol_base); } From 6003ea5325a407a2bed17317f86e25ebe31fb92d Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 5 Oct 2010 19:19:42 -0700 Subject: [PATCH 18/25] * doc/misc/cl.texi (Usage, Installation): Remove outdated information. --- doc/misc/ChangeLog | 4 ++++ doc/misc/cl.texi | 42 +++++++----------------------------------- 2 files changed, 11 insertions(+), 35 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 322be57330d..accf71c2d69 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,7 @@ +2010-10-06 Glenn Morris + + * cl.texi (Usage, Installation): Remove outdated information. + 2010-08-26 Michael Albinus Sync with Tramp 2.1.19. diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi index 755b2f3f1b7..948ba786066 100644 --- a/doc/misc/cl.texi +++ b/doc/misc/cl.texi @@ -163,19 +163,6 @@ include at the beginning: @end example @noindent -If you want to ensure that the new (Gillespie) version of @dfn{CL} -is the one that is present, add an additional @code{(require 'cl-19)} -call: - -@example -(require 'cl) -(require 'cl-19) -@end example - -@noindent -The second call will fail (with ``@file{cl-19.el} not found'') if -the old @file{cl.el} package was in use. - It is safe to arrange to load @dfn{CL} at all times, e.g., in your @file{.emacs} file. But it's a good idea, for portability, to @code{(require 'cl)} in your code even if you do this. @@ -229,29 +216,14 @@ multiple-values feature. @xref{Old CL Compatibility}. @section Installation @noindent -Installation of the @dfn{CL} package is simple: Just put the -byte-compiled files @file{cl.elc}, @file{cl-extra.elc}, -@file{cl-seq.elc}, @file{cl-macs.elc}, and @file{cl-compat.elc} -into a directory on your @code{load-path}. +The @dfn{CL} package is distributed with Emacs, so there is no need +to install anything. -There are no special requirements to compile this package: -The files do not have to be loaded before they are compiled, -nor do they need to be compiled in any particular order. - -You may choose to put the files into your main @file{lisp/} -directory, replacing the original @file{cl.el} file there. Or, -you could put them into a directory that comes before @file{lisp/} -on your @code{load-path} so that the old @file{cl.el} is -effectively hidden. - -Also, format the @file{cl.texinfo} file and put the resulting -Info files in the @file{info/} directory or another suitable place. - -You may instead wish to leave this package's components all in -their own directory, and then add this directory to your -@code{load-path} and @code{Info-directory-list}. -Add the directory to the front of the list so the old @dfn{CL} -package and its documentation are hidden. +If you do need to install it, just put the byte-compiled files +@file{cl.elc}, @file{cl-extra.elc}, @file{cl-seq.elc}, +@file{cl-macs.elc}, and @file{cl-compat.elc} into a directory on your +@code{load-path}. Also, format the @file{cl.texi} file and put the +resulting Info files into a directory in your @code{Info-directory-list}. @node Naming Conventions, , Installation, Overview @section Naming Conventions From e1a8c4c0464500b01923c75e85e2183154ec60a9 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 6 Oct 2010 19:16:02 -0700 Subject: [PATCH 19/25] * doc/misc/eudc.texi (CCSO PH/QI, LDAP Requirements): Remove old information. --- doc/misc/ChangeLog | 4 ++++ doc/misc/eudc.texi | 36 +++++++++++------------------------- 2 files changed, 15 insertions(+), 25 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index accf71c2d69..785d3d425a0 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,7 @@ +2010-10-07 Glenn Morris + + * eudc.texi (CCSO PH/QI, LDAP Requirements): Remove old information. + 2010-10-06 Glenn Morris * cl.texi (Usage, Installation): Remove outdated information. diff --git a/doc/misc/eudc.texi b/doc/misc/eudc.texi index 48606e0d664..b62c0ed75ea 100644 --- a/doc/misc/eudc.texi +++ b/doc/misc/eudc.texi @@ -137,7 +137,7 @@ complement to the DAP itself. LDAP servers usually store (but are not limited to) information about people such as their name, phone number, email address, office location, etc@enddots{} More information about LDAP can be found at -@url{http://www.openldap.org/} +@url{http://www.openldap.org/}. EUDC requires external support to access LDAP directory servers (@pxref{LDAP Requirements}) @@ -148,17 +148,15 @@ EUDC requires external support to access LDAP directory servers @section CCSO PH/QI The Central Computing Services Office (CCSO) of the University of -Illinois at Urbana Champaign (UIUC) created and freely distributes a -directory system that is currently in use in more than 300 organizations -around the world. The system records information about people such as -their address, phone number, email, academic information or any other -details it was configured to. +Illinois at Urbana Champaign created and freely distributed a +directory system that was used by many organizations in the 1990s. +The system records information about people such as their address, +phone number, email, academic information or any other details it was +configured to. Nowadays this system is not widely used. The system consists of two parts: a database server traditionally called -@samp{qi} and a command-line client called @samp{ph}. -@url{ftp://uiarchive.cso.uiuc.edu/pub/packages/ph} is the main -distribution site. @url{http://www.uiuc.edu/cgi-bin/ph/lookup?Query=.} -provides a listing of the active @samp{qi} servers. +@samp{qi} and a command-line client called @samp{ph}. As of 2010, the +code can still be downloaded from @url{http://www-dev.cites.uiuc.edu/ph/}. The original command-line @samp{ph} client that comes with the @samp{ph/qi} distribution provides additional features like the @@ -225,18 +223,10 @@ email composition buffers (@pxref{Inline Query Expansion}) @comment node-name, next, previous, up @section LDAP Requirements -LDAP support is added by means of @file{ldap.el} which is part of Emacs. +LDAP support is added by means of @file{ldap.el}, which is part of Emacs. @file{ldap.el} needs an external command line utility named -@file{ldapsearch} which is available as part of LDAP toolkits: - -@itemize @bullet -@item -Open LDAP Libraries -(@url{http://www.openldap.org/}) -@item -University of Michigan's LDAP Client software -(@url{http://www.umich.edu/~dirsvcs/ldap/}) -@end itemize +@file{ldapsearch}, available as part of Open LDAP +(@url{http://www.openldap.org/}). @node Usage, Credits, Installation, Top @@ -968,7 +958,3 @@ in testing and proofreading the code and docs of @file{ph.el}. @printindex vr @bye - -@ignore - arch-tag: 1b79460b-4ea1-441d-ab45-05ddd16ef241 -@end ignore From 93d50df81d3aa5fa1db9e50e4107e262523e3ae9 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 8 Oct 2010 09:43:16 +0900 Subject: [PATCH 20/25] coding.c (complement_process_encoding_system): Fix previous change. --- src/ChangeLog | 5 ++++ src/coding.c | 65 +++++++++++++++++---------------------------------- 2 files changed, 27 insertions(+), 43 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 53adc561021..13ed963f6bf 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-10-08 Kenichi Handa + + * coding.c (complement_process_encoding_system): Fix previous + change. + 2010-10-04 Kenichi Handa * coding.c (complement_process_encoding_system): Fix previous diff --git a/src/coding.c b/src/coding.c index 4b52c838d67..8e6642bb80d 100644 --- a/src/coding.c +++ b/src/coding.c @@ -6124,53 +6124,32 @@ complement_process_encoding_system (coding_system) { Lisp_Object coding_base = Qnil, eol_base = Qnil; Lisp_Object spec, attrs; + int i; - if (NILP (coding_system)) - coding_system = Qundecided; - spec = CODING_SYSTEM_SPEC (coding_system); - attrs = AREF (spec, 0); - if (! EQ (CODING_ATTR_TYPE (attrs), Qundecided)) - coding_base = CODING_ATTR_BASE_NAME (attrs); - if (! VECTORP (AREF (spec, 2))) - eol_base = coding_system; - - if (NILP (coding_base)) + for (i = 0; i < 3; i++) { - /* We must decide the text-conversion part ar first. */ - if (CONSP (Vdefault_process_coding_system) - && ! NILP (XCDR (Vdefault_process_coding_system))) - { - coding_system = XCDR (Vdefault_process_coding_system); - spec = CODING_SYSTEM_SPEC (coding_system); - attrs = AREF (spec, 0); - if (! EQ (CODING_ATTR_TYPE (attrs), Qundecided)) - coding_base = CODING_ATTR_BASE_NAME (attrs); - if (NILP (eol_base) && ! VECTORP (AREF (spec, 2))) - eol_base = coding_system; - } - if (NILP (coding_base)) - { - coding_system = preferred_coding_system (); - spec = CODING_SYSTEM_SPEC (coding_system); - attrs = AREF (spec, 0); - if (! EQ (CODING_ATTR_TYPE (attrs), Qundecided)) - coding_base = CODING_ATTR_BASE_NAME (attrs); - if (NILP (eol_base) && ! VECTORP (AREF (spec, 2))) - eol_base = coding_system; - } - if (NILP (coding_base)) - { - spec = CODING_SYSTEM_SPEC (Qraw_text); - attrs = AREF (spec, 0); - if (! EQ (CODING_ATTR_TYPE (attrs), Qundecided)) - coding_base = CODING_ATTR_BASE_NAME (attrs); - if (NILP (eol_base) && ! VECTORP (AREF (spec, 2))) - eol_base = coding_system; - } + if (i == 1) + coding_system = CDR_SAFE (Vdefault_process_coding_system); + else if (i == 2) + coding_system = preferred_coding_system (); + spec = CODING_SYSTEM_SPEC (coding_system); + if (NILP (spec)) + continue; + attrs = AREF (spec, 0); + if (NILP (coding_base) && ! EQ (CODING_ATTR_TYPE (attrs), Qundecided)) + coding_base = CODING_ATTR_BASE_NAME (attrs); + if (NILP (eol_base) && ! VECTORP (AREF (spec, 2))) + eol_base = coding_system; + if (! NILP (coding_base) && ! NILP (eol_base)) + break; } - /* We must decide the eol-conversion part (if not yet done). */ - return coding_inherit_eol_type (coding_base, eol_base); + if (i > 0) + /* The original CODING_SYSTEM didn't specify text-conversion or + eol-conversion. Be sure that we return a fully complemented + coding system. */ + coding_system = coding_inherit_eol_type (coding_base, eol_base); + return coding_system; } From 12359245f6b9651541e00e6d59e07d6a25a4df8a Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 7 Oct 2010 20:01:23 -0700 Subject: [PATCH 21/25] Minor cl.texi change. * doc/misc/cl.texi (Organization, Installation, Old CL Compatibility): Deprecate cl-compat for new code. --- doc/misc/ChangeLog | 5 +++++ doc/misc/cl.texi | 16 +++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 785d3d425a0..238cec8e82b 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,8 @@ +2010-10-08 Glenn Morris + + * cl.texi (Organization, Installation, Old CL Compatibility): + Deprecate cl-compat for new code. + 2010-10-07 Glenn Morris * eudc.texi (CCSO PH/QI, LDAP Requirements): Remove old information. diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi index 948ba786066..780d53c9017 100644 --- a/doc/misc/cl.texi +++ b/doc/misc/cl.texi @@ -206,11 +206,12 @@ will take care of pulling in the other files when they are needed. There is another file, @file{cl-compat.el}, which defines some -routines from the older @file{cl.el} package that are no longer +routines from the older @file{cl.el} package that are not otherwise present in the new package. This includes internal routines like @code{setelt} and @code{zip-lists}, deprecated features like @code{defkeyword}, and an emulation of the old-style -multiple-values feature. @xref{Old CL Compatibility}. +multiple-values feature. This file is obsolete and should not be used +in new code. @xref{Old CL Compatibility}. @node Installation, Naming Conventions, Organization, Overview @section Installation @@ -221,9 +222,10 @@ to install anything. If you do need to install it, just put the byte-compiled files @file{cl.elc}, @file{cl-extra.elc}, @file{cl-seq.elc}, -@file{cl-macs.elc}, and @file{cl-compat.elc} into a directory on your -@code{load-path}. Also, format the @file{cl.texi} file and put the -resulting Info files into a directory in your @code{Info-directory-list}. +@file{cl-macs.elc}, and (if necessary) @file{cl-compat.elc} into a +directory on your @code{load-path}. Also, format the @file{cl.texi} +file and put the resulting Info files into a directory in your +@code{Info-directory-list}. @node Naming Conventions, , Installation, Overview @section Naming Conventions @@ -5048,8 +5050,8 @@ Lisp. @noindent The @dfn{CL} package includes emulations of some features of the old @file{cl.el}, in the form of a compatibility package -@code{cl-compat}. To use it, put @code{(require 'cl-compat)} in -your program. +@code{cl-compat}. This file is obsolete and may be removed in future, +so it should not be used in new code. The old package defined a number of internal routines without @code{cl-} prefixes or other annotations. Call to these routines From e5d495899c82e7e7936cb2ff4c7a6e651183e8cd Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 7 Oct 2010 20:05:09 -0700 Subject: [PATCH 22/25] Rename some shadow.el things. * lisp/emacs-lisp/shadow.el (lisp-shadow): Change prefix. (shadows-compare-text-p): Make it an obsolete alias for... (load-path-shadows-compare-text): ... new name. (find-emacs-lisp-shadows): Update for above name change. (load-path-shadows-same-file-or-nonexistent): New name for the old shadow-same-file-or-nonexistent. --- lisp/ChangeLog | 9 +++++++++ lisp/emacs-lisp/shadow.el | 15 +++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 85d108356cc..bba7a2e5d24 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2010-10-08 Glenn Morris + + * emacs-lisp/shadow.el (lisp-shadow): Change prefix. + (shadows-compare-text-p): Make it an obsolete alias for... + (load-path-shadows-compare-text): ... new name. + (find-emacs-lisp-shadows): Update for above name change. + (load-path-shadows-same-file-or-nonexistent): New name for the old + shadow-same-file-or-nonexistent. + 2010-10-03 Chong Yidong * minibuffer.el (completion--some, completion--do-completion) diff --git a/lisp/emacs-lisp/shadow.el b/lisp/emacs-lisp/shadow.el index a41db864a1b..15cb37b8ff3 100644 --- a/lisp/emacs-lisp/shadow.el +++ b/lisp/emacs-lisp/shadow.el @@ -53,10 +53,13 @@ (defgroup lisp-shadow nil "Locate Emacs Lisp file shadowings." - :prefix "shadows-" + :prefix "load-path-shadows-" :group 'lisp) -(defcustom shadows-compare-text-p nil +(define-obsolete-variable-alias 'shadows-compare-text-p + 'load-path-shadows-compare-text "23.3") + +(defcustom load-path-shadows-compare-text nil "If non-nil, then shadowing files are reported only if their text differs. This is slower, but filters out some innocuous shadowing." :type 'boolean @@ -124,11 +127,11 @@ See the documentation for `list-load-path-shadows' for further information." ;; Report it unless the files are identical. (let ((base1 (concat (cdr orig-dir) "/" file)) (base2 (concat dir "/" file))) - (if (not (and shadows-compare-text-p - (shadow-same-file-or-nonexistent + (if (not (and load-path-shadows-compare-text + (load-path-shadows-same-file-or-nonexistent (concat base1 ".el") (concat base2 ".el")) ;; This is a bit strict, but safe. - (shadow-same-file-or-nonexistent + (load-path-shadows-same-file-or-nonexistent (concat base1 ".elc") (concat base2 ".elc")))) (setq shadows (append shadows (list base1 base2))))) @@ -140,7 +143,7 @@ See the documentation for `list-load-path-shadows' for further information." ;; Return true if neither file exists, or if both exist and have identical ;; contents. -(defun shadow-same-file-or-nonexistent (f1 f2) +(defun load-path-shadows-same-file-or-nonexistent (f1 f2) (let ((exists1 (file-exists-p f1)) (exists2 (file-exists-p f2))) (or (and (not exists1) (not exists2)) From 5823f53fc2ae1c152f4830159388d20d2b6e4d7d Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 7 Oct 2010 20:08:32 -0700 Subject: [PATCH 23/25] * emacs-lisp/cl-compat.el, emacs-lisp/lmenu.el: Move to obsolete/. --- lisp/ChangeLog | 2 ++ lisp/{emacs-lisp => obsolete}/cl-compat.el | 0 lisp/{emacs-lisp => obsolete}/lmenu.el | 0 3 files changed, 2 insertions(+) rename lisp/{emacs-lisp => obsolete}/cl-compat.el (100%) rename lisp/{emacs-lisp => obsolete}/lmenu.el (100%) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bba7a2e5d24..95a8287f005 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2010-10-08 Glenn Morris + * emacs-lisp/cl-compat.el, emacs-lisp/lmenu.el: Move to obsolete/. + * emacs-lisp/shadow.el (lisp-shadow): Change prefix. (shadows-compare-text-p): Make it an obsolete alias for... (load-path-shadows-compare-text): ... new name. diff --git a/lisp/emacs-lisp/cl-compat.el b/lisp/obsolete/cl-compat.el similarity index 100% rename from lisp/emacs-lisp/cl-compat.el rename to lisp/obsolete/cl-compat.el diff --git a/lisp/emacs-lisp/lmenu.el b/lisp/obsolete/lmenu.el similarity index 100% rename from lisp/emacs-lisp/lmenu.el rename to lisp/obsolete/lmenu.el From 2f1cc3365b5dcdc8afe00923ef1727cc007764fe Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 7 Oct 2010 20:12:43 -0700 Subject: [PATCH 24/25] * lisp/obsolete/cl-compat.el, lisp/obsolete/lmenu.el: Comments. --- lisp/obsolete/cl-compat.el | 8 +++++--- lisp/obsolete/lmenu.el | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/lisp/obsolete/cl-compat.el b/lisp/obsolete/cl-compat.el index 68d7c0ae3ba..f4582081031 100644 --- a/lisp/obsolete/cl-compat.el +++ b/lisp/obsolete/cl-compat.el @@ -1,11 +1,12 @@ ;;; cl-compat.el --- Common Lisp extensions for GNU Emacs Lisp (compatibility) -;; Copyright (C) 1993, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1993, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, +;; 2009, 2010 Free Software Foundation, Inc. ;; Author: Dave Gillespie ;; Version: 2.02 ;; Keywords: extensions +;; Obsolete-since: 23.3 ;; This file is part of GNU Emacs. @@ -24,6 +25,8 @@ ;;; Commentary: +;; This file has been obsolete since Emacs 23.3. + ;; These are extensions to Emacs Lisp that provide a degree of ;; Common Lisp compatibility, beyond what is already built-in ;; in Emacs Lisp. @@ -195,5 +198,4 @@ ;; byte-compile-warnings: (not cl-functions) ;; End: -;; arch-tag: 9996bb4f-aaf5-4592-b436-bf64759a3163 ;;; cl-compat.el ends here diff --git a/lisp/obsolete/lmenu.el b/lisp/obsolete/lmenu.el index 54fb488ed59..14f6398eef1 100644 --- a/lisp/obsolete/lmenu.el +++ b/lisp/obsolete/lmenu.el @@ -1,9 +1,10 @@ ;;; lmenu.el --- emulate Lucid's menubar support -;; Copyright (C) 1992, 1993, 1994, 1997, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1992, 1993, 1994, 1997, 2001, 2002, 2003, 2004, 2005, +;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. ;; Keywords: emulations obsolete +;; Obsolete-since: 23.3 ;; This file is part of GNU Emacs. @@ -22,6 +23,8 @@ ;;; Commentary: +;; This file has been obsolete since Emacs 23.3. + ;;; Code: @@ -439,5 +442,4 @@ BEFORE, if provided, is the name of a menu before which this menu should (provide 'lmenu) -;; arch-tag: 7051c396-2837-435a-ae11-b2d2e2af8fc1 ;;; lmenu.el ends here From 2b7c934285417d2eac7a3c603231d22ce7e212d8 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 7 Oct 2010 20:19:47 -0700 Subject: [PATCH 25/25] ChangeLog fix. --- src/ChangeLog | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 13ed963f6bf..0aa12b4aabe 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,12 +1,6 @@ 2010-10-08 Kenichi Handa - * coding.c (complement_process_encoding_system): Fix previous - change. - -2010-10-04 Kenichi Handa - - * coding.c (complement_process_encoding_system): Fix previous - change. + * coding.c (complement_process_encoding_system): Fix previous change. 2010-10-03 Michael Albinus