From ad9ae06519f6f4eb0be14f9f09101b349f0fe462 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 30 Jul 2010 02:50:13 +0200 Subject: align.el: Doc fixes. --- lisp/ChangeLog | 5 +++++ lisp/align.el | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 670f07c2683..f2450f22ea6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-07-30 Juanma Barranquero + + * align.el (align-default-spacing): Doc fix. + (align-region-heuristic, align-regexp): Fix typos in docstrings. + 2010-07-23 Juanma Barranquero * help-fns.el (find-lisp-object-file-name): Doc fix (bug#6494). diff --git a/lisp/align.el b/lisp/align.el index 83ed0f4693a..9d811327021 100644 --- a/lisp/align.el +++ b/lisp/align.el @@ -140,8 +140,8 @@ "An integer that represents the default amount of padding to use. If `align-to-tab-stop' is non-nil, this will represent the number of tab stops to use for alignment, rather than the number of spaces. -Each alignment rule can optionally override both this variable. See -`align-mode-alist'." +Each alignment rule can optionally override both this variable and +`align-to-tab-stop'. See `align-rules-list'." :type 'integer :group 'align) @@ -157,8 +157,8 @@ Since each alignment rule can possibly have its own set of alignment sections (whenever `align-region-separate' is non-nil, and not a string), this heuristic is used to determine how far before and after point we should search in looking for a region separator. Larger -values can mean slower perform in large files, although smaller values -may cause unexpected behavior at times." +values can mean slower performance in large files, although smaller +values may cause unexpected behavior at times." :type 'integer :group 'align) @@ -926,7 +926,7 @@ align them so that the opening parentheses would line up: Joe (123) 456-7890 There is no predefined rule to handle this, but you could easily do it -using a REGEXP like \"(\". All you would have to do is to mark the +using a REGEXP like \"(\". All you would have to do is to mark the region, call `align-regexp' and type in that regular expression." (interactive (append -- cgit v1.2.1 From 16b0b3479eff21b64a311dd791e5ea17f845a790 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Fri, 30 Jul 2010 19:25:06 -0400 Subject: * lisp/eshell/esh-io.el (eshell-get-target): Better detection of read-only file (Bug#6762). --- lisp/ChangeLog | 5 +++++ lisp/eshell/esh-io.el | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f2450f22ea6..2b196d22c72 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-07-30 Leo + + * eshell/esh-io.el (eshell-get-target): Better detection of + read-only file (Bug#6762). + 2010-07-30 Juanma Barranquero * align.el (align-default-spacing): Doc fix. diff --git a/lisp/eshell/esh-io.el b/lisp/eshell/esh-io.el index 1bcfe2b46e7..3aa785c7c1b 100644 --- a/lisp/eshell/esh-io.el +++ b/lisp/eshell/esh-io.el @@ -343,8 +343,9 @@ it defaults to `insert'." (let* ((exists (get-file-buffer target)) (buf (find-file-noselect target t))) (with-current-buffer buf - (if buffer-read-only + (if buffer-file-read-only (error "Cannot write to read-only file `%s'" target)) + (setq buffer-read-only nil) (set (make-local-variable 'eshell-output-file-buffer) (if (eq exists buf) 0 t)) (cond ((eq mode 'overwrite) -- cgit v1.2.1 From 9aea20c9f876b8da85789f9922bc0c3b4e201d14 Mon Sep 17 00:00:00 2001 From: MON KEY Date: Sun, 1 Aug 2010 02:24:55 +0200 Subject: * lisp/emacs-lisp/syntax.el (syntax-ppss-toplevel-pos): Fix typo in docstring. Fixes: debbugs:6747 --- lisp/ChangeLog | 5 +++++ lisp/emacs-lisp/syntax.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2b196d22c72..a6d127a8841 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-08-01 MON KEY (tiny change) + + * emacs-lisp/syntax.el (syntax-ppss-toplevel-pos): + Fix typo in docstring (bug#6747). + 2010-07-30 Leo * eshell/esh-io.el (eshell-get-target): Better detection of diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el index a3110f8d8c5..5cc89596ef5 100644 --- a/lisp/emacs-lisp/syntax.el +++ b/lisp/emacs-lisp/syntax.el @@ -52,7 +52,7 @@ (defun syntax-ppss-toplevel-pos (ppss) "Get the latest syntactically outermost position found in a syntactic scan. -PPSS is a scan state, as returned by `partial-parse-sexp' or `syntax-ppss'. +PPSS is a scan state, as returned by `parse-partial-sexp' or `syntax-ppss'. An \"outermost position\" means one that it is outside of any syntactic entity: outside of any parentheses, comments, or strings encountered in the scan. If no such position is recorded in PPSS (because the end of the scan was -- cgit v1.2.1 From bbc4e17cc2a4286dcdc1ea3caa584aed8b6f1857 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Sun, 1 Aug 2010 05:19:23 +0200 Subject: * dabbrev.el (dabbrev-completion): Fix typo in docstring. --- lisp/ChangeLog | 4 ++++ lisp/dabbrev.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a6d127a8841..73b5700aeb9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2010-08-01 Juanma Barranquero + + * dabbrev.el (dabbrev-completion): Fix typo in docstring. + 2010-08-01 MON KEY (tiny change) * emacs-lisp/syntax.el (syntax-ppss-toplevel-pos): diff --git a/lisp/dabbrev.el b/lisp/dabbrev.el index 3ba9d56af16..1127181dca2 100644 --- a/lisp/dabbrev.el +++ b/lisp/dabbrev.el @@ -377,7 +377,7 @@ With a prefix argument ARG, it searches all buffers accepted by the function pointed out by `dabbrev-friend-buffer-function' to find the completions. -If the prefix argument is 16 (which comes from \\[prefix-argument] \\[prefix-argument]), +If the prefix argument is 16 (which comes from \\[universal-argument] \\[universal-argument]), then it searches *all* buffers." (interactive "*P") (dabbrev--reset-global-variables) -- cgit v1.2.1 From a7e26d8b89846dece4e4485f270def955a3460be Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 2 Aug 2010 02:13:02 +0200 Subject: * bindings.el (function-key-map): Add a S-tab => backtab fallback. --- lisp/ChangeLog | 4 ++++ lisp/bindings.el | 3 +++ 2 files changed, 7 insertions(+) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 73b5700aeb9..6d05931b146 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2010-08-02 Stefan Monnier + + * bindings.el (function-key-map): Add a S-tab => backtab fallback. + 2010-08-01 Juanma Barranquero * dabbrev.el (dabbrev-completion): Fix typo in docstring. diff --git a/lisp/bindings.el b/lisp/bindings.el index 37ca3b86055..3ec43b3041f 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el @@ -1035,6 +1035,9 @@ or \\[semantic-mode]"))))) ;; so we can't distinguish those two keys, but usually we consider C-SPC ;; (rather than C-@) as the "canonical" binding. (define-key function-key-map [?\C-@] [?\C-\s]) +;; Many keyboards don't have a `backtab' key, so by convention the user +;; can use S-tab instead to access that binding. +(define-key function-key-map [S-tab] [backtab]) (define-key global-map [mouse-movement] 'ignore) -- cgit v1.2.1 From f63a7652ef45f8e0e413c61cecbbc0db77114e83 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 2 Aug 2010 06:14:26 +0200 Subject: * term.el: Fix typos in docstrings. --- lisp/ChangeLog | 7 +++++++ lisp/term.el | 20 ++++++++++---------- 2 files changed, 17 insertions(+), 10 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6d05931b146..11fdeae6eaa 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2010-08-02 Juanma Barranquero + + * term.el (term-delimiter-argument-list): Reflow docstring. + (term-read-input-ring, term-write-input-ring, term-send-input) + (term-bol, term-erase-in-display, serial-supported-or-barf): + Fix typos in docstrings. + 2010-08-02 Stefan Monnier * bindings.el (function-key-map): Add a S-tab => backtab fallback. diff --git a/lisp/term.el b/lisp/term.el index 7cb364af622..2223ff2587d 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -502,8 +502,8 @@ This is a good thing to set in mode hooks.") (defvar term-delimiter-argument-list () "List of characters to recognize as separate arguments in input. Strings comprising a character in this list will separate the arguments -surrounding them, and also be regarded as arguments in their own right (unlike -whitespace). See `term-arguments'. +surrounding them, and also be regarded as arguments in their own right +\(unlike whitespace). See `term-arguments'. Defaults to the empty list. For shells, a good value is (?\\| ?& ?< ?> ?\\( ?\\) ?\\;). @@ -1516,7 +1516,7 @@ if [ $1 = .. ]; then shift; fi; exec \"$@\"" ;; term-replace-by-expanded-history-before-point Workhorse function. (defun term-read-input-ring (&optional silent) - "Sets the buffer's `term-input-ring' from a history file. + "Set the buffer's `term-input-ring' from a history file. The name of the file is given by the variable `term-input-ring-file-name'. The history ring is of size `term-input-ring-size', regardless of file size. If `term-input-ring-file-name' is nil this function does nothing. @@ -1564,7 +1564,7 @@ See also `term-input-ignoredups' and `term-write-input-ring'." term-input-ring-index nil))))) (defun term-write-input-ring () - "Writes the buffer's `term-input-ring' to a history file. + "Write the buffer's `term-input-ring' to a history file. The name of the file is given by the variable `term-input-ring-file-name'. The original contents of the file are lost if `term-input-ring' is not empty. If `term-input-ring-file-name' is nil this function does nothing. @@ -1996,12 +1996,12 @@ Argument 0 is the command name." "Send input to process. After the process output mark, sends all text from the process mark to point as input to the process. Before the process output mark, calls value -of variable term-get-old-input to retrieve old input, copies it to the +of variable `term-get-old-input' to retrieve old input, copies it to the process mark, and sends it. A terminal newline is also inserted into the buffer and sent to the process. The list of function names contained in the value of `term-input-filter-functions' is called on the input before sending it. The input is entered into the input history ring, if the value of variable -term-input-filter returns non-nil when called on the input. +`term-input-filter' returns non-nil when called on the input. Any history reference may be expanded depending on the value of the variable `term-input-autoexpand'. The list of function names contained in the value @@ -2137,7 +2137,7 @@ set the hook `term-input-sender'." (term-send-string proc "\n")) (defun term-bol (arg) - "Goes to the beginning of line, then skips past the prompt, if any. + "Go to the beginning of line, then skip past the prompt, if any. If a prefix argument is given (\\[universal-argument]), then no prompt skip -- go straight to column 0. @@ -3760,7 +3760,7 @@ all pending output has been dealt with.")) (goto-char saved-point)))) (defun term-erase-in-display (kind) - "Erases (that is blanks out) part of the window. + "Erase (that is blank out) part of the window. If KIND is 0, erase from (point) to (point-max); if KIND is 1, erase from home to point; else erase from home to point-max." (term-handle-deferred-scroll) @@ -4166,7 +4166,7 @@ Typing SPC flushes the help buffer." ;; I need a make-term that doesn't surround with *s -mm (defun term-ansi-make-term (name program &optional startfile &rest switches) -"Make a term process NAME in a buffer, running PROGRAM. + "Make a term process NAME in a buffer, running PROGRAM. The name of the buffer is NAME. If there is already a running process in that buffer, it is not restarted. Optional third arg STARTFILE is the name of a file to send the contents of to @@ -4267,7 +4267,7 @@ returns nil, which is recognized by `serial-process-configure' for special serial ports that cannot be configured.") (defun serial-supported-or-barf () - "Signal an error if serial processes are not supported" + "Signal an error if serial processes are not supported." (unless (fboundp 'make-serial-process) (error "Serial processes are not supported on this system"))) -- cgit v1.2.1 From a2077b7f8f31af20194cfefb3328cfbd01766b9b Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 2 Aug 2010 16:23:50 +0200 Subject: * bindings.el (complete-symbol): Run completion-at-point as a fallback. --- lisp/ChangeLog | 4 ++++ lisp/bindings.el | 1 + 2 files changed, 5 insertions(+) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 11fdeae6eaa..1d7cfe90f9b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2010-08-02 Stefan Monnier + + * bindings.el (complete-symbol): Run completion-at-point as a fallback. + 2010-08-02 Juanma Barranquero * term.el (term-delimiter-argument-list): Reflow docstring. diff --git a/lisp/bindings.el b/lisp/bindings.el index 3ec43b3041f..3ce21a578d5 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el @@ -688,6 +688,7 @@ language you are using." (fboundp 'semantic-active-p) (semantic-active-p)) (semantic-ia-complete-symbol)) + (completion-at-point-functions (completion-at-point)) (t (error "%s" (substitute-command-keys -- cgit v1.2.1 From d5b8058fb09545686338769edf92a4f73c166520 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 3 Aug 2010 15:04:20 +0200 Subject: * server.el (server-start): Force IPv4 and use literal 127.0.0.1. --- lisp/ChangeLog | 5 +++++ lisp/server.el | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1d7cfe90f9b..f0650ea89e2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-08-03 Juanma Barranquero + + * server.el (server-start): When using TCP sockets, force IPv4 + and use a literal 127.0.0.1 for localhost. (Related to bug#6781.) + 2010-08-02 Stefan Monnier * bindings.el (complete-symbol): Run completion-at-point as a fallback. diff --git a/lisp/server.el b/lisp/server.el index d36b99cc5b6..e8a0125f554 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -560,9 +560,9 @@ server or call `M-x server-force-delete' to forcibly disconnect it.") :coding 'raw-text-unix ;; The other args depend on the kind of socket used. (if server-use-tcp - (list :family nil + (list :family 'ipv4 ;; We're not ready for IPv6 yet :service t - :host (or server-host 'local) + :host (or server-host "127.0.0.1") ;; See bug#6781 :plist '(:authenticated nil)) (list :family 'local :service server-file -- cgit v1.2.1 From 9ebc731b45fea0b4d7d547cb37ca2675d5940106 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 3 Aug 2010 18:39:37 +0200 Subject: which-func.el (which-func-format): Split help-echo text into lines. --- lisp/ChangeLog | 3 +++ lisp/progmodes/which-func.el | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f0650ea89e2..00f6fcfac02 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2010-08-03 Juanma Barranquero + * progmodes/which-func.el (which-func-format): Split help-echo text + into lines, like other mode-line tooltips. + * server.el (server-start): When using TCP sockets, force IPv4 and use a literal 127.0.0.1 for localhost. (Related to bug#6781.) diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el index 6a72c161429..469786e04dd 100644 --- a/lisp/progmodes/which-func.el +++ b/lisp/progmodes/which-func.el @@ -145,7 +145,9 @@ Zero means compute the Imenu menu regardless of size." local-map ,which-func-keymap face which-func ;;mouse-face highlight ; currently not evaluated :-( - help-echo "mouse-1: go to beginning, mouse-2: toggle rest visibility, mouse-3: go to end") + help-echo "mouse-1: go to beginning\n\ +mouse-2: toggle rest visibility\n\ +mouse-3: go to end") "]") "Format for displaying the function in the mode line." :group 'which-func -- cgit v1.2.1 From 6b4d96c2f04e5a08c4f9fff144743ff16c151dae Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Wed, 4 Aug 2010 17:06:52 +0900 Subject: Modify the coding system compound-text-with-extensions to conform to the spec of Compound Text. --- lisp/ChangeLog | 17 +++++ lisp/international/mule-conf.el | 14 ++-- lisp/international/mule.el | 147 +++++++++++++++++++++------------------- lisp/language/cyrillic.el | 7 -- 4 files changed, 104 insertions(+), 81 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 670f07c2683..775ddcdc2e7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,20 @@ +2010-08-04 Kenichi Handa + + * language/cyrillic.el: Don't add "microsoft-cp1251" to + ctext-non-standard-encodings-alist here. + + * international/mule.el (ctext-non-standard-encodings-alist): Add + "koi8-r" and "microsoft-cp1251". + (ctext-standard-encodings): New variable. + (ctext-non-standard-encodings-table): List only elements for + non-standard encodings. + (ctext-pre-write-conversion): Adjusted for the above change. + Check ctext-standard-encodings. + + * international/mule-conf.el (compound-text): Doc fix. + (ctext-no-compositions): Doc fix. + (compound-text-with-extensions): Doc fix. + 2010-07-23 Juanma Barranquero * help-fns.el (find-lisp-object-file-name): Doc fix (bug#6494). diff --git a/lisp/international/mule-conf.el b/lisp/international/mule-conf.el index f53b69eed8b..9ee8d22463a 100644 --- a/lisp/international/mule-conf.el +++ b/lisp/international/mule-conf.el @@ -1410,9 +1410,10 @@ is treated as a character." :flags '(ascii-at-eol ascii-at-cntl designation single-shift composition)) (define-coding-system 'compound-text - "Compound text based generic encoding for decoding unknown messages. - -This coding system does not support extended segments of CTEXT." + "Compound text based generic encoding. +This coding system is an extension of X's \"Compound Text Encoding\". +It encodes many characters using the normal ISO-2022 designation sequences, +but it doesn't support extended segments of CTEXT." :coding-type 'iso-2022 :mnemonic ?x :charset-list 'iso-2022 @@ -1432,7 +1433,7 @@ This coding system does not support extended segments of CTEXT." ;; not have a mime-charset property, to prevent it from showing up ;; close to the beginning of coding systems ordered by priority. (define-coding-system 'ctext-no-compositions - "Compound text based generic encoding for decoding unknown messages. + "Compound text based generic encoding. Like `compound-text', but does not produce escape sequences for compositions." :coding-type 'iso-2022 @@ -1445,8 +1446,9 @@ Like `compound-text', but does not produce escape sequences for compositions." (define-coding-system 'compound-text-with-extensions "Compound text encoding with ICCCM Extended Segment extensions. -See the variable `ctext-non-standard-encodings-alist' for the -detail about how extended segments are handled. +See the variables `ctext-standard-encodings' and +`ctext-non-standard-encodings-alist' for the detail about how +extended segments are handled. This coding system should be used only for X selections. It is inappropriate for decoding and encoding files, process I/O, etc." diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 7e7e55728c8..e030acbef02 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -1408,7 +1408,9 @@ This function is provided for backward compatibility." '(("big5-0" big5 2 big5) ("ISO8859-14" iso-8859-14 1 latin-iso8859-14) ("ISO8859-15" iso-8859-15 1 latin-iso8859-15) - ("gbk-0" gbk 2 chinese-gbk))) + ("gbk-0" gbk 2 chinese-gbk) + ("koi8-r" koi8-r 1 koi8-r) + ("microsoft-cp1251" windows-1251 1 windows-1251))) "Alist of non-standard encoding names vs the corresponding usages in CTEXT. It controls how extended segments of a compound text are handled @@ -1497,6 +1499,20 @@ Each element must be one of the names listed in the variable (goto-char (point-min)) (- (point-max) (point))))) +(defvar ctext-standard-encodings + '(ascii latin-jisx0201 katakana-jisx0201 + latin-iso8859-1 latin-iso8859-2 latin-iso8859-3 latin-iso8859-4 + greek-iso8859-7 arabic-iso8859-6 hebrew-iso8859-8 cyrillic-iso8859-5 + latin-iso8859-9 + chinese-gb2312 japanese-jisx0208 korean-ksc5601) + "List of approved standard encodings (i.e. charsets) of X's Compound Text. +Coding-system `compound-text-with-extensions' encodes a character +belonging to any of those charsets using the normal ISO2022 +designation sequence unless the current language environment or +the variable `ctext-non-standard-encodings' decide to use an extended +segment of CTEXT for that character. See also the documentation +of `ctext-non-standard-encodings-alist'.") + ;; Return an alist of CHARSET vs CTEXT-USAGE-INFO generated from ;; `ctext-non-standard-encodings' and a list specified by the key ;; `ctext-non-standard-encodings' for the currrent language @@ -1508,77 +1524,74 @@ Each element must be one of the names listed in the variable ;; is encoded using UTF-8 encoding extention. (defun ctext-non-standard-encodings-table () - (let (table) - ;; Setup charsets specified by the key - ;; `ctext-non-standard-encodings' for the current language - ;; environment and in `ctext-non-standard-encodings'. - (dolist (encoding (append - (get-language-info current-language-environment - 'ctext-non-standard-encodings) - ctext-non-standard-encodings)) - (let* ((slot (assoc encoding ctext-non-standard-encodings-alist)) + (let* ((table (append ctext-non-standard-encodings + (copy-sequence + (get-language-info current-language-environment + 'ctext-non-standard-encodings)))) + (tail table) + elt) + (while tail + (setq elt (car tail)) + (let* ((slot (assoc elt ctext-non-standard-encodings-alist)) (charset (nth 3 slot))) (if (charsetp charset) - (push (cons charset slot) table) - (dolist (cs charset) - (push (cons cs slot) table))))) - - ;; Next prepend charsets for ISO2022 designation sequence. - (dolist (charset charset-list) - (let ((final (plist-get (charset-plist charset) :iso-final-char))) - (if (and (integerp final) - (>= final #x40) (<= final #x7e) - ;; Exclude ascii and chinese-cns11643-X. - (not (eq charset 'ascii)) - (not (string-match "cns11643" (symbol-name charset)))) - (push (cons charset nil) table)))) - - ;; Returned reversed list so that the charsets specified by the - ;; key `ctext-non-standard-encodings' for the current language - ;; have the highest priority. - (nreverse table))) + (setcar tail (cons charset slot)) + (setcar tail (cons (car charset) slot)) + (dolist (cs (cdr charset)) + (setcdr tail + (cons (cons (car cs) slot) (cdr tail))) + (setq tail (cdr tail)))) + (setq tail (cdr tail)))) + table)) (defun ctext-pre-write-conversion (from to) "Encode characters between FROM and TO as Compound Text w/Extended Segments. -If FROM is a string, or if the current buffer is not the one set up for us -by `encode-coding-string', generate a new temp buffer, insert the text, -and convert it in the temporary buffer. Otherwise, convert in-place." +If FROM is a string, generate a new temp buffer, insert the text, +and convert it in the temporary buffer. Otherwise, convert +in-place." (save-match-data ;; Setup a working buffer if necessary. (when (stringp from) (set-buffer (generate-new-buffer " *temp")) (set-buffer-multibyte (multibyte-string-p from)) - (insert from)) - - ;; Now we can encode the whole buffer. - (let ((encoding-table (ctext-non-standard-encodings-table)) - last-coding-system-used - last-pos last-encoding-info - encoding-info end-pos ch) - (goto-char (setq last-pos (point-min))) - (setq end-pos (point-marker)) - (while (re-search-forward "[^\000-\177]+" nil t) - ;; Found a sequence of non-ASCII characters. - (setq last-pos (match-beginning 0) - ch (char-after last-pos) - last-encoding-info (catch 'tag - (dolist (elt encoding-table) - (if (encode-char ch (car elt)) - (throw 'tag (cdr elt)))) - 'utf-8)) - (set-marker end-pos (match-end 0)) - (goto-char (1+ last-pos)) - (catch 'tag - (while t - (setq encoding-info - (if (< (point) end-pos) - (catch 'tag - (setq ch (following-char)) - (dolist (elt encoding-table) - (if (encode-char ch (car elt)) - (throw 'tag (cdr elt)))) - 'utf-8))) + (insert from) + (setq from 1 to (point-max))) + (save-restriction + (narrow-to-region from to) + (let ((encoding-table (ctext-non-standard-encodings-table)) + (charset-list ctext-standard-encodings) + last-coding-system-used + last-pos last-encoding-info + encoding-info end-pos ch charset) + (dolist (elt encoding-table) + (push (car elt) charset-list)) + (goto-char (setq last-pos from)) + (setq end-pos (point-marker)) + (while (re-search-forward "[^\000-\177]+" nil t) + ;; Found a sequence of non-ASCII characters. + (setq last-pos (match-beginning 0) + ch (char-after last-pos) + charset (char-charset ch charset-list) + last-encoding-info + (if charset + (or (cdr (assq charset encoding-table)) + charset) + 'utf-8)) + (set-marker end-pos (match-end 0)) + (goto-char (1+ last-pos)) + (while (marker-position end-pos) + (if (< (point) end-pos) + (progn + (setq charset (char-charset (following-char) charset-list) + encoding-info + (if charset + (or (cdr (assq charset encoding-table)) + charset) + 'utf-8)) + (forward-char 1)) + (setq encoding-info nil) + (set-marker end-pos nil)) (unless (eq last-encoding-info encoding-info) (cond ((consp last-encoding-info) ;; Encode the previous range using an extended @@ -1609,14 +1622,12 @@ and convert it in the temporary buffer. Otherwise, convert in-place." (save-excursion (goto-char last-pos) (insert "\e%G")) - (insert "\e%@"))) + (insert "\e%@")) + (t + (put-text-property last-pos (point) 'charset charset))) (setq last-pos (point) - last-encoding-info encoding-info)) - (if (< (point) end-pos) - (forward-char 1) - (throw 'tag nil))))) - (set-marker end-pos nil) - (goto-char (point-min)))) + last-encoding-info encoding-info)))) + (goto-char (point-min))))) ;; Must return nil, as build_annotations_2 expects that. nil) diff --git a/lisp/language/cyrillic.el b/lisp/language/cyrillic.el index 7d2f082579f..b293ad1ff0b 100644 --- a/lisp/language/cyrillic.el +++ b/lisp/language/cyrillic.el @@ -239,13 +239,6 @@ Support for Russian using koi8-r and the russian-computer input method.") (documentation . "Support for Tajik using KOI8-T.")) '("Cyrillic")) -(let ((elt `("microsoft-cp1251" windows-1251 1 - ,(get 'encode-windows-1251 'translation-table))) - (slot (assoc "microsoft-cp1251" ctext-non-standard-encodings-alist))) - (if slot - (setcdr slot (cdr elt)) - (push elt ctext-non-standard-encodings-alist))) - (set-language-info-alist "Bulgarian" `((coding-system windows-1251) (coding-priority windows-1251) -- cgit v1.2.1 From c613687be4a79df9fe2e3ef12b4fe3fecd07a591 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 4 Aug 2010 20:04:29 +0200 Subject: * lisp/simple.el (exchange-dot-and-mark): Mark obsolete, finally. --- lisp/ChangeLog | 4 ++++ lisp/simple.el | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 00f6fcfac02..cd9e142f8e7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2010-08-04 Stefan Monnier + + * simple.el (exchange-dot-and-mark): Mark obsolete, finally. + 2010-08-03 Juanma Barranquero * progmodes/which-func.el (which-func-format): Split help-echo text diff --git a/lisp/simple.el b/lisp/simple.el index 6c8725a813f..d0c27656e41 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3819,7 +3819,8 @@ Does not set point. Does nothing if mark ring is empty." (setq mark-ring (cdr mark-ring))) (deactivate-mark)) -(defalias 'exchange-dot-and-mark 'exchange-point-and-mark) +(define-obsolete-function-alias + 'exchange-dot-and-mark 'exchange-point-and-mark "23.3") (defun exchange-point-and-mark (&optional arg) "Put the mark where point is now, and point where the mark is now. This command works even when the mark is not active, -- cgit v1.2.1 From f6b55526bd58545b480a2a79d944971be67d9c07 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Thu, 5 Aug 2010 23:31:03 +0200 Subject: * emulation/pc-select.el: Fix typos in docstrings. --- lisp/ChangeLog | 6 ++++++ lisp/emulation/pc-select.el | 12 ++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cd9e142f8e7..168af7c4abe 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2010-08-05 Juanma Barranquero + + * emulation/pc-select.el (pc-selection-mode-hook) + (copy-region-as-kill-nomark, beginning-of-buffer-mark) + (pc-selection-mode): Fix typos in docstrings. + 2010-08-04 Stefan Monnier * simple.el (exchange-dot-and-mark): Mark obsolete, finally. diff --git a/lisp/emulation/pc-select.el b/lisp/emulation/pc-select.el index db47ee4276b..22983f49694 100644 --- a/lisp/emulation/pc-select.el +++ b/lisp/emulation/pc-select.el @@ -108,7 +108,7 @@ This gives mostly Emacs-like behavior with only the selection keys enabled." :group 'pc-select) (defcustom pc-selection-mode-hook nil - "The hook to run when pc-selection-mode is toggled." + "The hook to run when PC Selection mode is toggled." :type 'hook :group 'pc-select) @@ -259,7 +259,7 @@ association.") (provide 'pc-select) (defun copy-region-as-kill-nomark (beg end) - "Save the region as if killed; but don't kill it; deactivate mark. + "Save the region as if killed, but don't kill it; deactivate mark. If `interprogram-cut-function' is non-nil, also save the text for a window system cut and paste. @@ -567,7 +567,7 @@ Don't use this command in Lisp programs! ;;;;;;;;;;;;;;;;;;;; (defun backward-char-mark (&optional arg) -"Ensure mark is active; move point left ARG characters (right if ARG negative). + "Ensure mark is active; move point left ARG characters (right if ARG negative). On attempt to pass beginning or end of buffer, stop and signal error." (interactive "p") (pc-select-ensure-mark) @@ -631,7 +631,7 @@ If scan reaches end of buffer, stop there without error." (defun scroll-up-mark (&optional arg) -"Ensure mark is active; scroll upward ARG lines; or near full screen if no ARG. + "Ensure mark is active; scroll upward ARG lines; or near full screen if no ARG. A near full screen is `next-screen-context-lines' less than a full screen. Negative ARG means scroll downward. When calling from a program, supply a number as argument or nil. @@ -652,7 +652,7 @@ If the buffer is narrowed, this command uses the beginning and size of the accessible part of the buffer. Don't use this command in Lisp programs! -\(goto-char (p\oint-min)) is faster and avoids clobbering the mark." +\(goto-char (point-min)) is faster and avoids clobbering the mark." (interactive "P") (pc-select-ensure-mark) (let ((size (- (point-max) (point-min)))) @@ -839,7 +839,7 @@ If the value is non-nil, call the function MODE with an argument of ;;;###autoload (define-minor-mode pc-selection-mode - "Change mark behavior to emulate Motif, MAC or MS-Windows cut and paste style. + "Change mark behavior to emulate Motif, Mac or MS-Windows cut and paste style. This mode enables Delete Selection mode and Transient Mark mode. -- cgit v1.2.1 From 7a84eee5b745ad577d414158716ffe2ee487a117 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 6 Aug 2010 17:11:19 +0900 Subject: Improve the encoding by compound-text-with-extensions. --- lisp/ChangeLog | 11 +++++ lisp/international/mule.el | 111 ++++++++++++++++++++------------------------- 2 files changed, 59 insertions(+), 63 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 149de6629f0..1b2f0ebd99e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2010-08-06 Kenichi Handa + + * international/mule.el (define-charset): Store NAME as :base + property. + (ctext-non-standard-encodings-table): Pay attention to charset + aliases. + (ctext-pre-write-conversion): Sort ctext-standard-encodings by the + current priority. Force using the designation of the specific + charset by adding `charset' text property. Improve the whole + algorithm. + 2010-08-04 Kenichi Handa * language/cyrillic.el: Don't add "microsoft-cp1251" to diff --git a/lisp/international/mule.el b/lisp/international/mule.el index e030acbef02..105163a5d11 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -282,6 +282,7 @@ attribute." (plist-put props :short-name (symbol-name name))) (or (plist-get props :long-name) (plist-put props :long-name (plist-get props :short-name))) + (plist-put props :base name) ;; We can probably get a worthwhile amount in purespace. (setq props (mapcar (lambda (elt) @@ -1535,11 +1536,13 @@ of `ctext-non-standard-encodings-alist'.") (let* ((slot (assoc elt ctext-non-standard-encodings-alist)) (charset (nth 3 slot))) (if (charsetp charset) - (setcar tail (cons charset slot)) + (setcar tail + (cons (plist-get (charset-plist charset) :base) slot)) (setcar tail (cons (car charset) slot)) (dolist (cs (cdr charset)) (setcdr tail - (cons (cons (car cs) slot) (cdr tail))) + (cons (cons (plist-get (charset-plist (car cs)) :base) slot) + (cdr tail))) (setq tail (cdr tail)))) (setq tail (cdr tail)))) table)) @@ -1559,74 +1562,56 @@ in-place." (setq from 1 to (point-max))) (save-restriction (narrow-to-region from to) + (goto-char from) (let ((encoding-table (ctext-non-standard-encodings-table)) - (charset-list ctext-standard-encodings) + (charset-list (sort-charsets + (copy-sequence ctext-standard-encodings))) + (end-pos (make-marker)) last-coding-system-used - last-pos last-encoding-info - encoding-info end-pos ch charset) + last-pos charset encoding-info) (dolist (elt encoding-table) (push (car elt) charset-list)) - (goto-char (setq last-pos from)) (setq end-pos (point-marker)) - (while (re-search-forward "[^\000-\177]+" nil t) + (while (re-search-forward "[^\0-\177]+" nil t) ;; Found a sequence of non-ASCII characters. - (setq last-pos (match-beginning 0) - ch (char-after last-pos) - charset (char-charset ch charset-list) - last-encoding-info - (if charset - (or (cdr (assq charset encoding-table)) - charset) - 'utf-8)) (set-marker end-pos (match-end 0)) - (goto-char (1+ last-pos)) - (while (marker-position end-pos) - (if (< (point) end-pos) - (progn - (setq charset (char-charset (following-char) charset-list) - encoding-info - (if charset - (or (cdr (assq charset encoding-table)) - charset) - 'utf-8)) - (forward-char 1)) - (setq encoding-info nil) - (set-marker end-pos nil)) - (unless (eq last-encoding-info encoding-info) - (cond ((consp last-encoding-info) - ;; Encode the previous range using an extended - ;; segment. - (let ((encoding-name (car last-encoding-info)) - (coding-system (nth 1 last-encoding-info)) - (noctets (nth 2 last-encoding-info)) - len) - (encode-coding-region last-pos (point) coding-system) - (setq len (+ (length encoding-name) 1 - (- (point) last-pos))) - ;; According to the spec of CTEXT, it is not - ;; necessary to produce this extra designation - ;; sequence, but some buggy application - ;; (e.g. crxvt-gb) requires it. - (insert "\e(B") - (save-excursion - (goto-char last-pos) - (insert (format "\e%%/%d" noctets)) - (insert-byte (+ (/ len 128) 128) 1) - (insert-byte (+ (% len 128) 128) 1) - (insert encoding-name) - (insert 2)))) - ((eq last-encoding-info 'utf-8) - ;; Encode the previous range using UTF-8 encoding - ;; extention. - (encode-coding-region last-pos (point) 'mule-utf-8) - (save-excursion - (goto-char last-pos) - (insert "\e%G")) - (insert "\e%@")) - (t - (put-text-property last-pos (point) 'charset charset))) - (setq last-pos (point) - last-encoding-info encoding-info)))) + (goto-char (match-beginning 0)) + (setq last-pos (point) + charset (char-charset (following-char) charset-list)) + (forward-char 1) + (while (and (< (point) end-pos) + (eq charset (char-charset (following-char) charset-list))) + (forward-char 1)) + (if charset + (if (setq encoding-info (cdr (assq charset encoding-table))) + ;; Encode this range using an extended segment. + (let ((encoding-name (car encoding-info)) + (coding-system (nth 1 encoding-info)) + (noctets (nth 2 encoding-info)) + len) + (encode-coding-region last-pos (point) coding-system) + (setq len (+ (length encoding-name) 1 + (- (point) last-pos))) + ;; According to the spec of CTEXT, it is not + ;; necessary to produce this extra designation + ;; sequence, but some buggy application + ;; (e.g. crxvt-gb) requires it. + (insert "\e(B") + (save-excursion + (goto-char last-pos) + (insert (format "\e%%/%d" noctets)) + (insert-byte (+ (/ len 128) 128) 1) + (insert-byte (+ (% len 128) 128) 1) + (insert encoding-name) + (insert 2))) + ;; Encode this range as characters in CHARSET. + (put-text-property last-pos (point) 'charset charset)) + ;; Encode this range using UTF-8 encoding extention. + (encode-coding-region last-pos (point) 'mule-utf-8) + (save-excursion + (goto-char last-pos) + (insert "\e%G")) + (insert "\e%@"))) (goto-char (point-min))))) ;; Must return nil, as build_annotations_2 expects that. nil) -- cgit v1.2.1 From e54a1075033073f835596ab666eeed099028beb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Bockg=C3=A5rd?= Date: Sun, 8 Aug 2010 16:55:52 -0400 Subject: Fix query-replace-regexp incomplete highlighting (Bug#6808). * replace.el (replace-highlight): Bind isearch-forward and isearch-error, ensuring that highlighting is updated if the user switches the search direction (Bug#6808). * isearch.el (isearch-lazy-highlight-forward): New var. (isearch-lazy-highlight-new-loop, isearch-lazy-highlight-search): (isearch-lazy-highlight-update): Use it. --- lisp/ChangeLog | 10 ++++++++++ lisp/isearch.el | 19 ++++++++++++------- lisp/replace.el | 4 +++- 3 files changed, 25 insertions(+), 8 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2097f6c1973..3a37cf2dfb4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2010-08-08 Johan Bockgård + + * replace.el (replace-highlight): Bind isearch-forward and + isearch-error, ensuring that highlighting is updated if the user + switches the search direction (Bug#6808). + + * isearch.el (isearch-lazy-highlight-forward): New var. + (isearch-lazy-highlight-new-loop, isearch-lazy-highlight-search): + (isearch-lazy-highlight-update): Use it. + 2010-08-06 Kenichi Handa * international/mule.el (define-charset): Store NAME as :base diff --git a/lisp/isearch.el b/lisp/isearch.el index d0ad330c5c0..7071497cbfb 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -2574,6 +2574,7 @@ since they have special meaning in a regexp." (defvar isearch-lazy-highlight-case-fold-search nil) (defvar isearch-lazy-highlight-regexp nil) (defvar isearch-lazy-highlight-space-regexp nil) +(defvar isearch-lazy-highlight-forward nil) (defun lazy-highlight-cleanup (&optional force) "Stop lazy highlighting and remove extra highlighting from current buffer. @@ -2613,7 +2614,9 @@ by other Emacs features." (not (= (window-start) isearch-lazy-highlight-window-start)) (not (= (window-end) ; Window may have been split/joined. - isearch-lazy-highlight-window-end)))) + isearch-lazy-highlight-window-end)) + (not (eq isearch-forward + isearch-lazy-highlight-forward)))) ;; something important did indeed change (lazy-highlight-cleanup t) ;kill old loop & remove overlays (when (not isearch-error) @@ -2628,7 +2631,8 @@ by other Emacs features." isearch-lazy-highlight-case-fold-search isearch-case-fold-search isearch-lazy-highlight-regexp isearch-regexp isearch-lazy-highlight-wrapped nil - isearch-lazy-highlight-space-regexp search-whitespace-regexp) + isearch-lazy-highlight-space-regexp search-whitespace-regexp + isearch-lazy-highlight-forward isearch-forward) (unless (equal isearch-string "") (setq isearch-lazy-highlight-timer (run-with-idle-timer lazy-highlight-initial-delay nil @@ -2644,7 +2648,8 @@ Attempt to do the search exactly the way the pending Isearch would." (search-invisible nil) ; don't match invisible text (retry t) (success nil) - (bound (if isearch-forward + (isearch-forward isearch-lazy-highlight-forward) + (bound (if isearch-lazy-highlight-forward (min (or isearch-lazy-highlight-end-limit (point-max)) (if isearch-lazy-highlight-wrapped isearch-lazy-highlight-start @@ -2678,7 +2683,7 @@ Attempt to do the search exactly the way the pending Isearch would." (select-window isearch-lazy-highlight-window)) (save-excursion (save-match-data - (goto-char (if isearch-forward + (goto-char (if isearch-lazy-highlight-forward isearch-lazy-highlight-end isearch-lazy-highlight-start)) (while looping @@ -2691,7 +2696,7 @@ Attempt to do the search exactly the way the pending Isearch would." (let ((mb (match-beginning 0)) (me (match-end 0))) (if (= mb me) ;zero-length match - (if isearch-forward + (if isearch-lazy-highlight-forward (if (= mb (if isearch-lazy-highlight-wrapped isearch-lazy-highlight-start (window-end))) @@ -2711,7 +2716,7 @@ Attempt to do the search exactly the way the pending Isearch would." (overlay-put ov 'priority 1000) (overlay-put ov 'face lazy-highlight-face) (overlay-put ov 'window (selected-window)))) - (if isearch-forward + (if isearch-lazy-highlight-forward (setq isearch-lazy-highlight-end (point)) (setq isearch-lazy-highlight-start (point))))) @@ -2721,7 +2726,7 @@ Attempt to do the search exactly the way the pending Isearch would." (setq looping nil nomore t) (setq isearch-lazy-highlight-wrapped t) - (if isearch-forward + (if isearch-lazy-highlight-forward (progn (setq isearch-lazy-highlight-end (window-start)) (goto-char (max (or isearch-lazy-highlight-start-limit (point-min)) diff --git a/lisp/replace.el b/lisp/replace.el index 57b29442605..12263cf5aa6 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -1893,7 +1893,9 @@ make, or the user didn't cancel the call." (let ((isearch-string string) (isearch-regexp regexp) (search-whitespace-regexp nil) - (isearch-case-fold-search case-fold)) + (isearch-case-fold-search case-fold) + (isearch-forward t) + (isearch-error nil)) (isearch-lazy-highlight-new-loop range-beg range-end)))) (defun replace-dehighlight () -- cgit v1.2.1