From 9234ff7fcfa79c5e19b9d3a7ae88570f4f768b9a Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 19 Aug 2011 14:23:09 -0400 Subject: files.el fix for bug#9331 * lisp/files.el (hack-local-variables-prop-line, hack-local-variables): Downcase "Mode:". --- lisp/ChangeLog | 5 +++++ lisp/files.el | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 38c536af62c..fcccc802203 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-08-19 Glenn Morris + + * files.el (hack-local-variables-prop-line, hack-local-variables): + Downcase "Mode:". (Bug#9331) + 2011-08-18 Chong Yidong * international/characters.el: Add L and R categories. diff --git a/lisp/files.el b/lisp/files.el index 6b8a352f20c..8c7e63dda14 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3003,9 +3003,10 @@ mode, if there is one, otherwise nil." "-mode")))) (or (equal keyname "coding") (condition-case nil - (push (cons (if (eq key 'eval) - 'eval - (indirect-variable key)) + (push (cons (cond ((eq key 'eval) 'eval) + ;; Downcase "Mode:". + ((equal keyname "mode") 'mode) + (t (indirect-variable key))) val) result) (error nil)))) (skip-chars-forward " \t;"))) @@ -3153,6 +3154,7 @@ major-mode." (var (let ((read-circle nil)) (read str))) val val2) + (and (eq var 'Mode) (setq var 'mode)) ;; Read the variable value. (skip-chars-forward "^:") (forward-char 1) -- cgit v1.2.1 From 4d9db491a079712aeaf92ae3c63aebc56398b17e Mon Sep 17 00:00:00 2001 From: Gnus developers Date: Sat, 20 Aug 2011 00:20:39 +0000 Subject: Merge changes made in Gnus trunk. nnimap.el (nnimap-transform-headers): Protect against (NIL ...) bodystructures (bug#9314). starttls.el (starttls-any-program-available): Define as obsolete function. gnus-util.el (gnus-y-or-n-p): Reinstate the message-clearing y-or-n-p versions which Gnus use when appropriate. gnus-group.el (gnus-group-clear-data): Add a y-or-n query, since it's a pretty destructive command. nnmail.el (nnmail-extra-headers): Clarify slightly (bug#9302). message.el (message-fix-before-sending): Make a different warning about NUL characters (bug#9270). gnus-sum.el (gnus-auto-select-subject): Allow specifying a function from custom (bug#9260). --- lisp/gnus/ChangeLog | 26 ++++++++++++++++++++++ lisp/gnus/gnus-group.el | 15 +++++++------ lisp/gnus/gnus-sum.el | 3 ++- lisp/gnus/gnus-util.el | 59 +++++++------------------------------------------ lisp/gnus/message.el | 8 +++++-- lisp/gnus/nnimap.el | 3 ++- lisp/gnus/nnmail.el | 4 +++- lisp/gnus/starttls.el | 4 ++++ 8 files changed, 59 insertions(+), 63 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 64ac50fe8f0..52ed08a84db 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2011-08-19 Lars Magne Ingebrigtsen + + * nnimap.el (nnimap-transform-headers): Protect against (NIL ...) + bodystructures (bug#9314). + 2011-08-19 Katsumi Yamaoka * gnus-art.el (gnus-insert-mime-button, gnus-mime-display-alternative): @@ -12,8 +17,29 @@ `gnus-registry-get-id-key' since `gnus-registry-fetch-groups' isn't available anymore. +2011-08-12 Simon Josefsson + + * starttls.el (starttls-any-program-available): Define as obsolete + function. + +2011-08-18 Lars Magne Ingebrigtsen + + * gnus-util.el (gnus-y-or-n-p): Reinstate the message-clearing y-or-n-p + versions which Gnus use when appropriate. + + * gnus-group.el (gnus-group-clear-data): Add a y-or-n query, since it's + a pretty destructive command. + + * nnmail.el (nnmail-extra-headers): Clarify slightly (bug#9302). + 2011-08-17 Lars Magne Ingebrigtsen +p * message.el (message-fix-before-sending): Make a different warning + about NUL characters (bug#9270). + + * gnus-sum.el (gnus-auto-select-subject): Allow specifying a function + from custom (bug#9260). + * gnus-spec.el (gnus-lrm-string): Use 8206 instead of ?\x200e to make things work in Emacs 22 and XEmacs, too. diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 2a31ccd34f0..5ae29053b6f 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -3471,13 +3471,14 @@ sort in reverse order." "Clear all marks and read ranges from the current group. Obeys the process/prefix convention." (interactive "P") - (gnus-group-iterate arg - (lambda (group) - (let (info) - (gnus-info-clear-data (setq info (gnus-get-info group))) - (gnus-get-unread-articles-in-group info (gnus-active group) t) - (when (gnus-group-goto-group group) - (gnus-group-update-group-line)))))) + (when (gnus-y-or-n-p "Really clear data? ") + (gnus-group-iterate arg + (lambda (group) + (let (info) + (gnus-info-clear-data (setq info (gnus-get-info group))) + (gnus-get-unread-articles-in-group info (gnus-active group) t) + (when (gnus-group-goto-group group) + (gnus-group-update-group-line))))))) (defun gnus-group-clear-data-on-native-groups () "Clear all marks and read ranges from all native groups." diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index cd4699e6107..73ecffb090e 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -375,7 +375,8 @@ place point on some subject line." (const unread) (const first) (const unseen) - (const unseen-or-unread))) + (const unseen-or-unread) + (function :tag "Function to call"))) (defcustom gnus-auto-select-next t "*If non-nil, offer to go to the next group from the end of the previous. diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 7155c7f9607..03ff4a2ea4b 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -388,57 +388,14 @@ TIME defaults to the current time." (define-key keymap key (pop plist)) (pop plist))))) -;; Two silly functions to ensure that all `y-or-n-p' questions clear -;; the echo area. -;; -;; Do we really need these functions? Workarounds for bugs in the corresponding -;; Emacs functions? Maybe these bugs are no longer present in any supported -;; (X)Emacs version? Alias them to the original functions and see if anyone -;; reports a problem. If not, replace with original functions. --rsteib, -;; 2007-12-14 -;; -;; All supported Emacsen clear the echo area after `yes-or-no-p', so we can -;; remove `yes-or-no-p'. RMS says that not clearing after `y-or-n-p' is -;; intentional (see below), so we could remove `gnus-y-or-n-p' too. -;; Objections? --rsteib, 2008-02-16 -;; -;; ,----[ http://thread.gmane.org/gmane.emacs.gnus.general/65099/focus=66070 ] -;; | From: Richard Stallman -;; | Subject: Re: Do we need gnus-yes-or-no-p and gnus-y-or-n-p? -;; | To: Katsumi Yamaoka [...] -;; | Cc: emacs-devel@[...], xemacs-beta@[...], ding@[...] -;; | Date: Mon, 07 Jan 2008 12:16:05 -0500 -;; | Message-ID: -;; | -;; | The behavior of `y-or-n-p' that it doesn't clear the question -;; | and the answer is not serious of course, but I feel it is not -;; | cool. -;; | -;; | It is intentional. -;; | -;; | Currently, it is commented out in the trunk by Reiner Steib. He -;; | also wrote the benefit of leaving the question and the answer in -;; | the echo area as follows: -;; | -;; | (http://article.gmane.org/gmane.emacs.gnus.general/66061) -;; | > In contrast to yes-or-no-p it is much easier to type y, n, -;; | > SPC, DEL, etc accidentally, so it might be useful for the user -;; | > to see what he has typed. -;; | -;; | Yes, that is the reason. -;; `---- - -;; (defun gnus-y-or-n-p (prompt) -;; (prog1 -;; (y-or-n-p prompt) -;; (message ""))) -;; (defun gnus-yes-or-no-p (prompt) -;; (prog1 -;; (yes-or-no-p prompt) -;; (message ""))) - -(defalias 'gnus-y-or-n-p 'y-or-n-p) -(defalias 'gnus-yes-or-no-p 'yes-or-no-p) +(defun gnus-y-or-n-p (prompt) + (prog1 + (y-or-n-p prompt) + (message ""))) +(defun gnus-yes-or-no-p (prompt) + (prog1 + (yes-or-no-p prompt) + (message ""))) ;; By Frank Schmitt . Allows to have ;; age-depending date representations. (e.g. just the time if it's diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index a157afe2ce6..52cef1925a2 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -4254,8 +4254,10 @@ conformance." "Invisible text found and made visible; continue sending? ") (error "Invisible text found and made visible"))))) (message-check 'illegible-text - (let (char found choice) + (let (char found choice nul-chars) (message-goto-body) + (setq nul-chars (save-excursion + (search-forward "\000" nil t))) (while (progn (skip-chars-forward mm-7bit-chars) (when (get-text-property (point) 'no-illegible-text) @@ -4281,7 +4283,9 @@ conformance." (when found (setq choice (gnus-multiple-choice - "Non-printable characters found. Continue sending?" + (if nul-chars + "NUL characters found, which may cause problems. Continue sending?" + "Non-printable characters found. Continue sending?") `((?d "Remove non-printable characters and send") (?r ,(format "Replace non-printable characters with \"%s\" and send" diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index c940e06fbb6..2dbc465f8c9 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -216,9 +216,10 @@ textual parts.") (let ((structure (ignore-errors (read (current-buffer))))) (while (and (consp structure) - (not (stringp (car structure)))) + (not (atom (car structure)))) (setq structure (car structure))) (setq lines (if (and + (stringp (car structure)) (equal (upcase (nth 0 structure)) "MESSAGE") (equal (upcase (nth 1 structure)) "RFC822")) (nth 9 structure) diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el index 8906a036779..dc2080dee1a 100644 --- a/lisp/gnus/nnmail.el +++ b/lisp/gnus/nnmail.el @@ -554,7 +554,9 @@ parameter. It should return nil, `warn' or `delete'." (const delete))) (defcustom nnmail-extra-headers '(To Newsgroups) - "*Extra headers to parse." + "Extra headers to parse. +In addition to the standard headers, these extra headers will be +included in NOV headers (and the like) when backends parse headers." :version "21.1" :group 'nnmail :type '(repeat symbol)) diff --git a/lisp/gnus/starttls.el b/lisp/gnus/starttls.el index c1caca90cf0..b995f7478ce 100644 --- a/lisp/gnus/starttls.el +++ b/lisp/gnus/starttls.el @@ -301,6 +301,10 @@ GNUTLS requires a port number." starttls-gnutls-program starttls-program))) +(defalias 'starttls-any-program-available 'starttls-available-p) +(make-obsolete 'starttls-any-program-available 'starttls-available-p + "2011-08-02") + (provide 'starttls) ;;; starttls.el ends here -- cgit v1.2.1 From b911cc52c93288b12c04cc5ad658a7ce01fe4991 Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Sat, 20 Aug 2011 00:27:04 +0000 Subject: lisp/gnus/ChangeLog: Fix last change. --- lisp/gnus/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 52ed08a84db..744817e68f2 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -34,7 +34,7 @@ 2011-08-17 Lars Magne Ingebrigtsen -p * message.el (message-fix-before-sending): Make a different warning + * message.el (message-fix-before-sending): Make a different warning about NUL characters (bug#9270). * gnus-sum.el (gnus-auto-select-subject): Allow specifying a function -- cgit v1.2.1 From 13009bd867606ba6bdb826389781e12a8d931523 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Sat, 20 Aug 2011 12:02:04 +0200 Subject: When displaying a buffer don't use or split a side window unless explicitly requested. * window.el (display-buffer-reuse-window) (display-buffer-pop-up-window): Don't reuse or split a side window. --- lisp/ChangeLog | 6 ++++++ lisp/window.el | 57 ++++++--------------------------------------------------- 2 files changed, 12 insertions(+), 51 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fcccc802203..f2a41ec16d1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2011-08-20 Martin Rudalics + + * window.el (display-buffer-reuse-window) + (display-buffer-pop-up-window): Don't reuse or split a side + window. + 2011-08-19 Glenn Morris * files.el (hack-local-variables-prop-line, hack-local-variables): diff --git a/lisp/window.el b/lisp/window.el index eca3dcb435d..757740ca53b 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -4763,8 +4763,10 @@ BUFFER, nil if none was found." (dolist (window (window-list-1 nil 'nomini method-frame)) (let ((window-buffer (window-buffer window))) (when (and (not (window-minibuffer-p window)) - ;; Don't reuse a side window. - (or (not (eq (window-parameter window 'window-side) 'side)) + ;; Don't reuse a side window unless it shows the + ;; buffer already. + (or (memq (window-parameter window 'window-side) + '(nil none)) (eq window-buffer buffer)) (or (not method-window) (and (eq method-window 'same) @@ -5033,7 +5035,8 @@ description." ;; and must be neither a minibuffer window (not (window-minibuffer-p window)) ;; nor a side window. - (not (eq (window-parameter window 'window-side) 'side))) + (memq (window-parameter window 'window-side) + '(nil none))) (setq window (cond ((memq side display-buffer-side-specifiers) @@ -6079,9 +6082,6 @@ ignored. See also `same-window-regexps'." :type '(repeat (string :format "%v")) :group 'windows) -;; (make-obsolete-variable - ;; 'same-window-buffer-names - ;; "use 2nd arg of `display-buffer' instead." "24.1") (defcustom same-window-regexps nil "List of regexps saying which buffers should appear in the \"same\" window. @@ -6097,9 +6097,6 @@ the buffer name. This is for compatibility with See also `same-window-buffer-names'." :type '(repeat (regexp :format "%v")) :group 'windows) -;; (make-obsolete-variable - ;; 'same-window-regexps - ;; "use 2nd arg of `display-buffer' instead." "24.1") (defun same-window-p (buffer-name) "Return non-nil if a buffer named BUFFER-NAME would be shown in the \"same\" window. @@ -6143,9 +6140,6 @@ These supersede the values given in `default-frame-alist'." (symbol :tag "Parameter") (sexp :tag "Value"))) :group 'frames) -;; (make-obsolete-variable - ;; 'special-display-frame-alist - ;; "use 2nd arg of `display-buffer' instead." "24.1") (defun special-display-popup-frame (buffer &optional args) "Display BUFFER in a special frame and return the window chosen. @@ -6210,9 +6204,6 @@ A buffer is special when its name is either listed in :type 'function :group 'windows :group 'frames) -;; (make-obsolete-variable - ;; 'special-display-function - ;; "use 2nd arg of `display-buffer' instead." "24.1") (defcustom special-display-buffer-names nil "List of names of buffers that should be displayed specially. @@ -6277,9 +6268,6 @@ See also `special-display-regexps'." (repeat :tag "Arguments" (sexp))))) :group 'windows :group 'frames) -;; (make-obsolete-variable - ;; 'special-display-buffer-names - ;; "use 2nd arg of `display-buffer' instead." "24.1") ;;;###autoload (put 'special-display-buffer-names 'risky-local-variable t) @@ -6348,9 +6336,6 @@ See also `special-display-buffer-names'." (repeat :tag "Arguments" (sexp))))) :group 'windows :group 'frames) -;; (make-obsolete-variable - ;; 'special-display-regexps - ;; "use 2nd arg of `display-buffer' instead." "24.1") (defun special-display-p (buffer-name) "Return non-nil if a buffer named BUFFER-NAME gets a special frame. @@ -6400,9 +6385,6 @@ affected by this variable." (symbol :tag "Parameter") (sexp :tag "Value"))) :group 'frames) -;; (make-obsolete-variable - ;; 'pop-up-frame-alist - ;; "use 2nd arg of `display-buffer' instead." "24.1") (defcustom pop-up-frame-function (lambda () (make-frame pop-up-frame-alist)) @@ -6412,9 +6394,6 @@ frame. The default value calls `make-frame' with the argument `pop-up-frame-alist'." :type 'function :group 'frames) -;; (make-obsolete-variable - ;; 'pop-up-frame-function - ;; "use 2nd arg of `display-buffer' instead." "24.1") (defcustom pop-up-frames nil "Whether `display-buffer' should make a separate frame. @@ -6428,9 +6407,6 @@ Any other non-nil value means always make a separate frame." (const :tag "Always" t)) :group 'windows :group 'frames) -;; (make-obsolete-variable - ;; 'pop-up-frames - ;; "use 2nd arg of `display-buffer' instead." "24.1") (defcustom display-buffer-reuse-frames nil "Set and non-nil means `display-buffer' should reuse frames. @@ -6440,17 +6416,11 @@ that frame." :version "21.1" :group 'windows :group 'frames) -;; (make-obsolete-variable - ;; 'display-buffer-reuse-frames - ;; "use 2nd arg of `display-buffer' instead." "24.1") (defcustom pop-up-windows t "Non-nil means `display-buffer' should make a new window." :type 'boolean :group 'windows) -;; (make-obsolete-variable - ;; 'pop-up-windows - ;; "use 2nd arg of `display-buffer' instead." "24.1") (defcustom split-window-preferred-function 'split-window-sensibly "Function called by `display-buffer' to split a window. @@ -6477,9 +6447,6 @@ not want to split the selected window." :type 'function :version "23.1" :group 'windows) -;; (make-obsolete-variable - ;; 'split-window-preferred-function - ;; "use 2nd arg of `display-buffer' instead." "24.1") (defcustom split-height-threshold 80 "Minimum height for splitting a window to display a buffer. @@ -6491,9 +6458,6 @@ split it vertically disregarding the value of this variable." :type '(choice (const nil) (integer :tag "lines")) :version "23.1" :group 'windows) -;; (make-obsolete-variable - ;; 'split-height-threshold - ;; "use 2nd arg of `display-buffer' instead." "24.1") (defcustom split-width-threshold 160 "Minimum width for splitting a window to display a buffer. @@ -6503,9 +6467,6 @@ is nil, `display-buffer' cannot split windows horizontally." :type '(choice (const nil) (integer :tag "columns")) :version "23.1" :group 'windows) -;; (make-obsolete-variable - ;; 'split-width-threshold - ;; "use 2nd arg of `display-buffer' instead." "24.1") (defcustom even-window-heights t "If non-nil `display-buffer' will try to even window heights. @@ -6514,17 +6475,11 @@ alone. Heights are evened only when `display-buffer' chooses a window that appears above or below the selected window." :type 'boolean :group 'windows) -;; (make-obsolete-variable - ;; 'even-window-heights - ;; "use 2nd arg of `display-buffer' instead." "24.1") (defvar display-buffer-mark-dedicated nil "Non-nil means `display-buffer' marks the windows it creates as dedicated. The actual non-nil value of this variable will be copied to the `window-dedicated-p' flag.") -;; (make-obsolete-variable - ;; 'display-buffer-mark-dedicated - ;; "use 2nd arg of `display-buffer' instead." "24.1") (defun window-splittable-p (window &optional horizontal) "Return non-nil if `split-window-sensibly' may split WINDOW. -- cgit v1.2.1 From 11994f9ba68c3607edb86e86d86e554abe2f955c Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Sat, 20 Aug 2011 12:10:05 +0200 Subject: Remove some commented-out obsoletion declarations from window.el. --- lisp/window.el | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/lisp/window.el b/lisp/window.el index 757740ca53b..8ddb6165197 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -6121,8 +6121,6 @@ selected rather than \(as usual\) some other window. See (and (consp regexp) (stringp (car regexp)) (string-match-p (car regexp) buffer-name))) (throw 'found t)))))))) -;; (make-obsolete - ;; 'same-window-p "pass argument to buffer display function instead." "24.1") (defcustom special-display-frame-alist '((height . 14) (width . 80) (unsplittable . t)) @@ -6185,9 +6183,6 @@ and (cdr ARGS) as the rest of the arguments." (set-window-buffer (frame-selected-window frame) buffer) (set-window-dedicated-p (frame-selected-window frame) t) (frame-selected-window frame)))))) -;; (make-obsolete - ;; 'special-display-popup-frame - ;; "use 2nd arg of `display-buffer' instead." "24.1") (defcustom special-display-function 'special-display-popup-frame "Function to call for displaying special buffers. @@ -6363,9 +6358,6 @@ entry." ((and (consp regexp) (stringp (car regexp)) (string-match-p (car regexp) buffer-name)) (throw 'found (cdr regexp)))))))))) -;; (make-obsolete - ;; 'special-display-p - ;; "pass argument to buffer display function instead." "24.1") (defcustom pop-up-frame-alist nil "Alist of parameters for automatically generated new frames. @@ -6530,8 +6522,6 @@ hold: (max split-height-threshold (* 2 (max window-min-height (if mode-line-format 2 1)))))))))) -;; (make-obsolete - ;; 'window-splittable-p "use 2nd arg of `display-buffer' instead." "24.1") (defun split-window-sensibly (window) "Split WINDOW in a way suitable for `display-buffer'. @@ -6581,8 +6571,6 @@ split." (when (with-no-warnings (window-splittable-p window)) (with-selected-window window (split-window-vertically))))))) -;; (make-obsolete - ;; 'split-window-sensibly "use 2nd arg of `display-buffer' instead." "24.1") ;; Functions for converting Emacs 23 buffer display options to buffer ;; display specifiers. -- cgit v1.2.1 From b128268e4491e93c332d14c8ae92646ab5884fba Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Sat, 20 Aug 2011 14:43:33 +0000 Subject: Fontify CPP expressions correctly when starting in the middle of such a construct. Mainly for when jit-lock etc. starts a chunk here. cc-fonts.el (c-font-lock-context): new buffer local variable. (c-make-font-lock-search-form): new function, extracted from c-make-font-lock-search-function. (c-make-font-lock-search-function): Use the above function. (c-make-font-lock-context-search-function): New function. (c-cpp-matchers): Enhance the preprocessor expression case with the above function (c-font-lock-complex-decl-prepare): Test for being in a CPP form which takes an expression. cc-langs.el (c-cpp-expr-intro-re): New lang-variable. --- lisp/progmodes/cc-fonts.el | 210 ++++++++++++++++++++++++++++++++++----------- lisp/progmodes/cc-langs.el | 10 +++ 2 files changed, 172 insertions(+), 48 deletions(-) diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index 2277ba760ab..dea205221c9 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el @@ -199,10 +199,16 @@ (set-face-foreground 'c-annotation-face "blue") (eval-and-compile - ;; We need the following functions during compilation since they're - ;; called when the `c-lang-defconst' initializers are evaluated. - ;; Define them at runtime too for the sake of derived modes. - + ;; We need the following definitions during compilation since they're + ;; used when the `c-lang-defconst' initializers are evaluated. Define + ;; them at runtime too for the sake of derived modes. + + ;; This indicates the "font locking context", and is set just before + ;; fontification is done. If non-nil, it says, e.g., point starts + ;; from within a #if preprocessor construct. + (defvar c-font-lock-context nil) + (make-variable-buffer-local 'c-font-lock-context) + (defmacro c-put-font-lock-face (from to face) ;; Put a face on a region (overriding any existing face) in the way ;; font-lock would do it. In XEmacs that means putting an @@ -283,6 +289,45 @@ nil))))) res)))) + (defun c-make-font-lock-search-form (regexp highlights) + ;; Return a lisp form which will fontify every occurence of REGEXP + ;; (a regular expression, NOT a function) between POINT and `limit' + ;; with HIGHLIGHTS, a list of highlighters as specified on page + ;; "Search-based Fontification" in the elisp manual. + `(while (re-search-forward ,regexp limit t) + (unless (progn + (goto-char (match-beginning 0)) + (c-skip-comments-and-strings limit)) + (goto-char (match-end 0)) + ,@(mapcar + (lambda (highlight) + (if (integerp (car highlight)) + ;; e.g. highlight is (1 font-lock-type-face t) + (progn + (unless (eq (nth 2 highlight) t) + (error + "The override flag must currently be t in %s" + highlight)) + (when (nth 3 highlight) + (error + "The laxmatch flag may currently not be set in %s" + highlight)) + `(save-match-data + (c-put-font-lock-face + (match-beginning ,(car highlight)) + (match-end ,(car highlight)) + ,(elt highlight 1)))) + ;; highlight is an "ANCHORED HIGHLIGHER" of the form + ;; (ANCHORED-MATCHER PRE-FORM POST-FORM SUBEXP-HIGHLIGHTERS...) + (when (nth 3 highlight) + (error "Match highlights currently not supported in %s" + highlight)) + `(progn + ,(nth 1 highlight) + (save-match-data ,(car highlight)) + ,(nth 2 highlight)))) + highlights)))) + (defun c-make-font-lock-search-function (regexp &rest highlights) ;; This function makes a byte compiled function that works much like ;; a matcher element in `font-lock-keywords'. It cuts out a little @@ -313,43 +358,101 @@ ;; lambda more easily. (byte-compile `(lambda (limit) - (let (;; The font-lock package in Emacs is known to clobber + (let ( ;; The font-lock package in Emacs is known to clobber ;; `parse-sexp-lookup-properties' (when it exists). (parse-sexp-lookup-properties (cc-eval-when-compile (boundp 'parse-sexp-lookup-properties)))) - (while (re-search-forward ,regexp limit t) - (unless (progn - (goto-char (match-beginning 0)) - (c-skip-comments-and-strings limit)) - (goto-char (match-end 0)) - ,@(mapcar - (lambda (highlight) - (if (integerp (car highlight)) - (progn - (unless (eq (nth 2 highlight) t) - (error - "The override flag must currently be t in %s" - highlight)) - (when (nth 3 highlight) - (error - "The laxmatch flag may currently not be set in %s" - highlight)) - `(save-match-data - (c-put-font-lock-face - (match-beginning ,(car highlight)) - (match-end ,(car highlight)) - ,(elt highlight 1)))) - (when (nth 3 highlight) - (error "Match highlights currently not supported in %s" - highlight)) - `(progn - ,(nth 1 highlight) - (save-match-data ,(car highlight)) - ,(nth 2 highlight)))) - highlights)))) + + ;; (while (re-search-forward ,regexp limit t) + ;; (unless (progn + ;; (goto-char (match-beginning 0)) + ;; (c-skip-comments-and-strings limit)) + ;; (goto-char (match-end 0)) + ;; ,@(mapcar + ;; (lambda (highlight) + ;; (if (integerp (car highlight)) + ;; (progn + ;; (unless (eq (nth 2 highlight) t) + ;; (error + ;; "The override flag must currently be t in %s" + ;; highlight)) + ;; (when (nth 3 highlight) + ;; (error + ;; "The laxmatch flag may currently not be set in %s" + ;; highlight)) + ;; `(save-match-data + ;; (c-put-font-lock-face + ;; (match-beginning ,(car highlight)) + ;; (match-end ,(car highlight)) + ;; ,(elt highlight 1)))) + ;; (when (nth 3 highlight) + ;; (error "Match highlights currently not supported in %s" + ;; highlight)) + ;; `(progn + ;; ,(nth 1 highlight) + ;; (save-match-data ,(car highlight)) + ;; ,(nth 2 highlight)))) + ;; highlights))) + ,(c-make-font-lock-search-form regexp highlights)) + nil))) + (defun c-make-font-lock-context-search-function (normal &rest state-stanzas) + ;; This function makes a byte compiled function that works much like + ;; a matcher element in `font-lock-keywords', with the following + ;; enhancement: the generated function will test for particular "font + ;; lock contexts" at the start of the region, i.e. is this point in + ;; the middle of some particular construct? if so the generated + ;; function will first fontify the tail of the construct, before + ;; going into the main loop and fontify full constructs up to limit. + ;; + ;; The generated function takes one parameter called `limit', and + ;; will fontify the region between POINT and LIMIT. + ;; + ;; NORMAL is a list of the form (REGEXP HIGHLIGHTS .....), and is + ;; used to fontify the "regular" bit of the region. + ;; STATE-STANZAS is list of elements of the form (STATE LIM REGEXP + ;; HIGHLIGHTS), each element coding one possible font lock context. + + ;; o - REGEXP is a font-lock regular expression (NOT a function), + ;; o - HIGHLIGHTS is a list of zero or more highlighters as defined + ;; on page "Search-based Fontification" in the elisp manual. As + ;; yet (2009-06), they must have OVERRIDE set, and may not have + ;; LAXMATCH set. + ;; + ;; o - STATE is the "font lock context" (e.g. in-cpp-expr) and is + ;; not quoted. + ;; o - LIM is a lisp form whose evaluation will yield the limit + ;; position in the buffer for fontification by this stanza. + ;; + ;; This function does not do any hidden buffer changes, but the + ;; generated functions will. (They are however used in places + ;; covered by the font-lock context.) + ;; + ;; Note: Replace `byte-compile' with `eval' to debug the generated + ;; lambda more easily. + (byte-compile + `(lambda (limit) + (let ( ;; The font-lock package in Emacs is known to clobber + ;; `parse-sexp-lookup-properties' (when it exists). + (parse-sexp-lookup-properties + (cc-eval-when-compile + (boundp 'parse-sexp-lookup-properties)))) + ,@(mapcar + (lambda (stanza) + (let ((state (car stanza)) + (lim (nth 1 stanza)) + (regexp (nth 2 stanza)) + (highlights (cdr (cddr stanza)))) + `(if (eq c-font-lock-context ',state) + (let ((limit ,lim)) + ,(c-make-font-lock-search-form + regexp highlights))))) + state-stanzas) + ,(c-make-font-lock-search-form (car normal) (cdr normal)) + nil)))) + ; (eval-after-load "edebug" ; 2006-07-09: def-edebug-spec is now in subr.el. ; '(progn (def-edebug-spec c-fontify-types-and-refs let*) @@ -494,19 +597,24 @@ stuff. Used on level 1 and higher." (c-lang-const c-cpp-expr-directives))) (cef-re (c-make-keywords-re t (c-lang-const c-cpp-expr-functions)))) - `((,(c-make-font-lock-search-function - (concat noncontinued-line-end - (c-lang-const c-opt-cpp-prefix) - ced-re ; 1 + ncle-depth - ;; Match the whole logical line to look - ;; for the functions in. - "\\(\\\\\\(.\\|[\n\r]\\)\\|[^\n\r]\\)*") - `((let ((limit (match-end 0))) - (while (re-search-forward ,cef-re limit 'move) - (c-put-font-lock-face (match-beginning 1) - (match-end 1) - c-preprocessor-face-name))) - (goto-char (match-end ,(1+ ncle-depth))))))))) + + `((,(c-make-font-lock-context-search-function + `(,(concat noncontinued-line-end + (c-lang-const c-opt-cpp-prefix) + ced-re ; 1 + ncle-depth + ;; Match the whole logical line to look + ;; for the functions in. + "\\(\\\\\\(.\\|[\n\r]\\)\\|[^\n\r]\\)*") + ((let ((limit (match-end 0))) + (while (re-search-forward ,cef-re limit 'move) + (c-put-font-lock-face (match-beginning 1) + (match-end 1) + c-preprocessor-face-name))) + (goto-char (match-end ,(1+ ncle-depth))))) + `(in-cpp-expr + (save-excursion (c-end-of-macro) (point)) + ,cef-re + (1 c-preprocessor-face-name t))))))) ;; Fontify the directive names. (,(c-make-font-lock-search-function @@ -759,6 +867,12 @@ casts and declarations are fontified. Used on level 2 and higher." (c-forward-syntactic-ws limit) (c-font-lock-declarators limit t (eq prop 'c-decl-type-start)))) + (setq c-font-lock-context ;; (c-guess-font-lock-context) + (save-excursion + (if (and c-cpp-expr-intro-re + (c-beginning-of-macro) + (looking-at c-cpp-expr-intro-re)) + 'in-cpp-expr))) nil) (defun c-font-lock-<>-arglists (limit) diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 35097242cb7..153ef0880c7 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -815,6 +815,16 @@ expression." t (if (c-lang-const c-opt-cpp-prefix) '("if" "elif"))) +(c-lang-defconst c-cpp-expr-intro-re + "Regexp which matches the start of a CPP directive which contains an +expression, or nil if there aren't any in the language." + t (if (c-lang-const c-cpp-expr-directives) + (concat + (c-lang-const c-opt-cpp-prefix) + (c-make-keywords-re t (c-lang-const c-cpp-expr-directives))))) +(c-lang-defvar c-cpp-expr-intro-re + (c-lang-const c-cpp-expr-intro-re)) + (c-lang-defconst c-cpp-expr-functions "List of functions in cpp expressions." t (if (c-lang-const c-opt-cpp-prefix) -- cgit v1.2.1 From 826cee649d749f010391a5c36bb9ef4e89ad28c1 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Sat, 20 Aug 2011 14:54:21 +0000 Subject: Fontify CPP expressions correctly when starting in the middle of such a construct. Mainly for when jit-lock etc. starts a chunk here. cc-fonts.el (c-font-lock-context): new buffer local variable. (c-make-font-lock-search-form): new function, extracted from c-make-font-lock-search-function. (c-make-font-lock-search-function): Use the above function. (c-make-font-lock-context-search-function): New function. (c-cpp-matchers): Enhance the preprocessor expression case with the above function (c-font-lock-complex-decl-prepare): Test for being in a CPP form which takes an expression. cc-langs.el (c-cpp-expr-intro-re): New lang-variable. --- lisp/ChangeLog | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f2a41ec16d1..f47ff5f1d0e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,22 @@ +2011-08-20 Alan Mackenzie + + * Fontify CPP expressions correctly when starting in the middle of + such a construct. Mainly for when jit-lock etc. starts a chunk + here. + + * progmodes/cc-fonts.el (c-font-lock-context): new buffer local + variable. + (c-make-font-lock-search-form): new function, extracted from + c-make-font-lock-search-function. + (c-make-font-lock-search-function): Use the above function. + (c-make-font-lock-context-search-function): New function. + (c-cpp-matchers): Enhance the preprocessor expression case with + the above function + (c-font-lock-complex-decl-prepare): Test for being in a CPP form + which takes an expression. + + * progmodes/cc-langs.el (c-cpp-expr-intro-re): New lang-variable. + 2011-08-20 Martin Rudalics * window.el (display-buffer-reuse-window) -- cgit v1.2.1 From 04ed2e9c6a7098fe69447ecffae9692fd54faa94 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 20 Aug 2011 15:30:53 -0400 Subject: * startup.el (normal-top-level-add-subdirs-to-load-path): Doc fix (Bug#9274). --- lisp/ChangeLog | 5 +++++ lisp/startup.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f47ff5f1d0e..cab26924041 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-08-20 Chong Yidong + + * startup.el (normal-top-level-add-subdirs-to-load-path): Doc fix + (Bug#9274). + 2011-08-20 Alan Mackenzie * Fontify CPP expressions correctly when starting in the middle of diff --git a/lisp/startup.el b/lisp/startup.el index 0dee969fb5a..6c3bb397e9a 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -409,7 +409,7 @@ The regexp should not contain a starting \"\\`\" or a trailing \"\\'\"; those are added automatically by callers.") (defun normal-top-level-add-subdirs-to-load-path () - "Add all subdirectories of current directory to `load-path'. + "Add all subdirectories of `default-directory' to `load-path'. More precisely, this uses only the subdirectories whose names start with letters or digits; it excludes any subdirectory named `RCS' or `CVS', and any subdirectory that contains a file named `.nosearch'." -- cgit v1.2.1 From bd1ba3e824d2d070b76e0c77529a993db2d8b4ba Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 20 Aug 2011 17:17:06 -0400 Subject: * src/eval.c (Fsignal): Handle `debug' symbol in error handler. Fixes: debbugs:9329 --- src/ChangeLog | 4 ++++ src/eval.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 85a55b2b7c9..adf7291eadf 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-08-20 Chong Yidong + + * eval.c (Fsignal): Handle `debug' symbol in error handler (Bug#9329). + 2011-08-19 Eli Zaretskii * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of diff --git a/src/eval.c b/src/eval.c index e37425020c9..8b121665ff7 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1699,6 +1699,10 @@ See also the function `condition-case'. */) && (!NILP (Vdebug_on_signal) /* If no handler is present now, try to run the debugger. */ || NILP (clause) + /* A `debug' symbol in the handler list disables the normal + suppression of the debugger. */ + || (CONSP (clause) && CONSP (XCAR (clause)) + && !NILP (Fmemq (Qdebug, XCAR (clause)))) /* Special handler that means "print a message and run debugger if requested". */ || EQ (h->handler, Qerror))) -- cgit v1.2.1 From 024a2d76113268052dd9fa85c915c6fb9f29c152 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 20 Aug 2011 17:22:46 -0400 Subject: * eval.c (Fcondition_case): Document `debug' symbol in error handler. --- src/ChangeLog | 1 + src/eval.c | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index adf7291eadf..82d75d39b40 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,7 @@ 2011-08-20 Chong Yidong * eval.c (Fsignal): Handle `debug' symbol in error handler (Bug#9329). + (Fcondition_case): Document `debug' symbol in error handler. 2011-08-19 Eli Zaretskii diff --git a/src/eval.c b/src/eval.c index 8b121665ff7..372e9954620 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1357,8 +1357,12 @@ A handler is applicable to an error if CONDITION-NAME is one of the error's condition names. If an error happens, the first applicable handler is run. -The car of a handler may be a list of condition names -instead of a single condition name. Then it handles all of them. +The car of a handler may be a list of condition names instead of a +single condition name; then it handles all of them. If the special +condition name `debug' is present in this list, it allows another +condition in the list to run the debugger if `debug-on-error' and the +other usual mechanisms says it should (otherwise, `condition-case' +suppresses the debugger). When a handler handles an error, control returns to the `condition-case' and it executes the handler's BODY... -- cgit v1.2.1 From e371503373b87716827e2ed0f3ba5b2d89981ef4 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Sat, 20 Aug 2011 22:02:25 +0000 Subject: Resolve invalid use of a regexp in regexp-opt. cc-fonts.el (c-complex-decl-matchers): Add in special detection for a java annotation. cc-engine.el (c-forward-decl-or-cast-1): Add in special detection for a java annotation. cc-langs.el (c-prefix-spec-kwds-re): Remove the special handling for java. (c-modifier-kwds): Remove the regexp "@[A-za-z0-9]+". --- lisp/ChangeLog | 14 ++++++++++++++ lisp/progmodes/cc-engine.el | 4 +++- lisp/progmodes/cc-fonts.el | 4 +++- lisp/progmodes/cc-langs.el | 7 ++----- 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cab26924041..efacb110d1b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,17 @@ +2011-08-20 Alan Mackenzie + + Resolve invalid use of a regexp in regexp-opt. + + * cc-fonts.el (c-complex-decl-matchers): Add in special detection + for a java annotation. + + * cc-engine.el (c-forward-decl-or-cast-1): Add in special + detection for a java annotation. + + * cc-langs.el (c-prefix-spec-kwds-re): Remove the special handling + for java. + (c-modifier-kwds): Remove the regexp "@[A-za-z0-9]+". + 2011-08-20 Chong Yidong * startup.el (normal-top-level-add-subdirs-to-load-path): Doc fix diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 0d88f85d263..a1cbdc16560 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -6325,7 +6325,9 @@ comment at the start of cc-engine.el for more info." (let* ((start (point)) kwd-sym kwd-clause-end found-type) ;; Look for a specifier keyword clause. - (when (looking-at c-prefix-spec-kwds-re) + (when (or (looking-at c-prefix-spec-kwds-re) + (and (c-major-mode-is 'java-mode) + (looking-at "@[A-Za-z0-9]+"))) (if (looking-at c-typedef-key) (setq at-typedef t)) (setq kwd-sym (c-keyword-sym (match-string 1))) diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index dea205221c9..3d5dc30d823 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el @@ -1666,7 +1666,9 @@ on level 2 only and so aren't combined with `c-complex-decl-matchers'." (unless (c-skip-comments-and-strings limit) (c-forward-syntactic-ws) ;; Handle prefix declaration specifiers. - (when (looking-at c-prefix-spec-kwds-re) + (when (or (looking-at c-prefix-spec-kwds-re) + (and (c-major-mode-is 'java-mode) + (looking-at "@[A-Za-z0-9]+"))) (c-forward-keyword-clause 1)) ,(if (c-major-mode-is 'c++-mode) `(when (and (c-forward-type) diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 153ef0880c7..279c5e46c46 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -1823,7 +1823,7 @@ will be handled." "bindsTo" "delegatesTo" "implements" "proxy" "storedOn") ;; Note: "const" is not used in Java, but it's still a reserved keyword. java '("abstract" "const" "final" "native" "private" "protected" "public" - "static" "strictfp" "synchronized" "transient" "volatile" "@[A-Za-z0-9]+") + "static" "strictfp" "synchronized" "transient" "volatile") pike '("final" "inline" "local" "nomask" "optional" "private" "protected" "public" "static" "variant")) @@ -1909,10 +1909,7 @@ one of `c-type-list-kwds', `c-ref-list-kwds', (c-lang-defconst c-prefix-spec-kwds-re ;; Adorned regexp of `c-prefix-spec-kwds'. - t (c-make-keywords-re t (c-lang-const c-prefix-spec-kwds)) - java (replace-regexp-in-string - "\\\\\\[" "[" - (replace-regexp-in-string "\\\\\\+" "+" (c-make-keywords-re t (c-lang-const c-prefix-spec-kwds))))) + t (c-make-keywords-re t (c-lang-const c-prefix-spec-kwds))) (c-lang-defvar c-prefix-spec-kwds-re (c-lang-const c-prefix-spec-kwds-re)) -- cgit v1.2.1 From f624176fea1020c6786f134e175aea0d2f5c4431 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 20 Aug 2011 15:19:53 -0700 Subject: Add missing file to leim/Makefile. * leim/Makefile.in (OTHERS): * leim/makefile.w32-in (MISC): Add ipa-praat.elc. --- leim/ChangeLog | 5 +++++ leim/Makefile.in | 1 + leim/makefile.w32-in | 1 + 3 files changed, 7 insertions(+) diff --git a/leim/ChangeLog b/leim/ChangeLog index 5309671651b..2dbccf9be39 100644 --- a/leim/ChangeLog +++ b/leim/ChangeLog @@ -1,3 +1,8 @@ +2011-08-20 Glenn Morris + + * Makefile.in (OTHERS): + * makefile.w32-in (MISC): Add ipa-praat.elc. + 2011-07-23 Yair F * quail/hebrew.el ("hebrew"): Additional key mappings. diff --git a/leim/Makefile.in b/leim/Makefile.in index 18eb8b62a96..87020616a57 100644 --- a/leim/Makefile.in +++ b/leim/Makefile.in @@ -124,6 +124,7 @@ OTHERS= \ ${srcdir}/quail/arabic.elc \ ${srcdir}/quail/ethiopic.elc \ ${srcdir}/quail/ipa.elc \ + ${srcdir}/quail/ipa-praat.elc \ ${srcdir}/quail/hebrew.elc \ ${srcdir}/quail/georgian.elc \ $(srcdir)/quail/persian.elc \ diff --git a/leim/makefile.w32-in b/leim/makefile.w32-in index 1ab14c72b3d..231384308f2 100644 --- a/leim/makefile.w32-in +++ b/leim/makefile.w32-in @@ -118,6 +118,7 @@ MISC= \ $(srcdir)/quail/arabic.elc \ $(srcdir)/quail/ethiopic.elc \ $(srcdir)/quail/ipa.elc \ + $(srcdir)/quail/ipa-praat.elc \ $(srcdir)/quail/hebrew.elc \ $(srcdir)/quail/georgian.elc \ $(srcdir)/quail/persian.elc \ -- cgit v1.2.1 From 8e999f70ab17da9006eec0bac77dc3a3502a5eed Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 20 Aug 2011 15:26:52 -0700 Subject: * lisp/files.el (hack-local-variables): Fully ignore case for "mode:". --- lisp/ChangeLog | 4 ++++ lisp/files.el | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index efacb110d1b..2e06de9fd98 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-08-20 Glenn Morris + + * files.el (hack-local-variables): Fully ignore case for "mode:". + 2011-08-20 Alan Mackenzie Resolve invalid use of a regexp in regexp-opt. diff --git a/lisp/files.el b/lisp/files.el index 8c7e63dda14..07188e152b3 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3154,7 +3154,8 @@ major-mode." (var (let ((read-circle nil)) (read str))) val val2) - (and (eq var 'Mode) (setq var 'mode)) + (and (equal (downcase (symbol-name var)) "mode") + (setq var 'mode)) ;; Read the variable value. (skip-chars-forward "^:") (forward-char 1) -- cgit v1.2.1 From 59ee05427dbe2d7aaad260ea7c85515dd3c63bc0 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 20 Aug 2011 15:41:41 -0700 Subject: Update some tutorial key bindings; ref bug#8739. * lisp/tutorial.el (tutorial--default-keys): Update some default bindings. * etc/NEWS: delete-forward-char is not bound to C-d. * lisp/bindings.el, lisp/windows.el: Comments. --- etc/NEWS | 2 +- lisp/ChangeLog | 2 ++ lisp/bindings.el | 1 + lisp/tutorial.el | 4 ++-- lisp/window.el | 2 ++ 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index ec863dacef8..cec19d0c0a2 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -407,7 +407,7 @@ If non-nil, C-d, [delete], and DEL delete the region if it is active and no prefix argument is given. If set to `kill', these commands kill instead. -*** New command `delete-forward-char', bound to C-d and [delete]. +*** New command `delete-forward-char', bound to [delete]. This is meant for interactive use, and obeys `delete-active-region'. The command `delete-char' does not obey `delete-active-region'. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2e06de9fd98..4763c83c5a3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2011-08-20 Glenn Morris + * tutorial.el (tutorial--default-keys): Update some default bindings. + * files.el (hack-local-variables): Fully ignore case for "mode:". 2011-08-20 Alan Mackenzie diff --git a/lisp/bindings.el b/lisp/bindings.el index c4f9369219a..57bfeb60f82 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el @@ -834,6 +834,7 @@ if `inhibit-field-text-motion' is non-nil." (setq i (1+ i)))) (define-key global-map [?\C-\M--] 'negative-argument) +;; Update tutorial--default-keys if you change these. (define-key global-map "\177" 'delete-backward-char) (define-key global-map "\C-d" 'delete-char) diff --git a/lisp/tutorial.el b/lisp/tutorial.el index 77ef50843d3..d47079af5af 100644 --- a/lisp/tutorial.el +++ b/lisp/tutorial.el @@ -253,7 +253,7 @@ LEFT and RIGHT are the elements to compare." ;; * INSERTING AND DELETING ;; C-u 8 * to insert ********. (delete-backward-char "\d") - (delete-forward-char [?\C-d]) + (delete-char [?\C-d]) (backward-kill-word [?\M-\d]) (kill-word [?\M-d]) (kill-line [?\C-k]) @@ -298,7 +298,7 @@ LEFT and RIGHT are the elements to compare." (isearch-backward [?\C-r]) ;; * MULTIPLE WINDOWS - (split-window-vertically [?\C-x ?2]) + (split-window-above-each-other [?\C-x ?2]) (scroll-other-window [?\C-\M-v]) (other-window [?\C-x ?o]) (find-file-other-window [?\C-x ?4 ?\C-f]) diff --git a/lisp/window.el b/lisp/window.el index 8ddb6165197..75fa0b46a1c 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -7474,6 +7474,8 @@ Otherwise, consult the value of `truncate-partial-width-windows' (< (window-width window) t-p-w-w) t-p-w-w)))) +;; Some of these are in tutorial--default-keys, so update that if you +;; change these. (define-key ctl-x-map "0" 'delete-window) (define-key ctl-x-map "1" 'delete-other-windows) (define-key ctl-x-map "2" 'split-window-above-each-other) -- cgit v1.2.1 From c21a496aed7c1b0a40312197ca4ccb7376e2d96f Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 20 Aug 2011 15:53:00 -0700 Subject: * lisp/tutorial.el (help-with-tutorial): Avoid an error on short screens. --- lisp/ChangeLog | 2 ++ lisp/tutorial.el | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4763c83c5a3..c655c4968df 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2011-08-20 Glenn Morris + * tutorial.el (help-with-tutorial): Avoid an error on short screens. + * tutorial.el (tutorial--default-keys): Update some default bindings. * files.el (hack-local-variables): Fully ignore case for "mode:". diff --git a/lisp/tutorial.el b/lisp/tutorial.el index d47079af5af..c57ec33d2e2 100644 --- a/lisp/tutorial.el +++ b/lisp/tutorial.el @@ -889,6 +889,11 @@ Run the Viper tutorial? ")) (search-forward ">>") (replace-match "]"))) (beginning-of-line) + ;; FIXME: if the window is not tall, and especially if the + ;; big red "NOTICE: The main purpose..." text has been + ;; inserted at the start of the buffer, the "type C-v to + ;; move to the next screen" might not be visible on the + ;; first screen (n < 0). How will the novice know what to do? (let ((n (- (window-height (selected-window)) (count-lines (point-min) (point)) 6))) @@ -897,7 +902,7 @@ Run the Viper tutorial? ")) ;; For a short gap, we don't need the [...] line, ;; so delete it. (delete-region (point) (progn (end-of-line) (point))) - (newline n)) + (if (> n 0) (newline n))) ;; Some people get confused by the large gap. (newline (/ n 2)) -- cgit v1.2.1 From a3f2468a08e81b44491322c275f94c8c7d87c6db Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 20 Aug 2011 21:01:12 -0400 Subject: Fix for browse-url-firefox on Windows. * lisp/net/browse-url.el (browse-url-firefox): Don't call browse-url-firefox-sentinel unless using -remote. Fixes: debbugs:9328 --- lisp/ChangeLog | 5 +++++ lisp/net/browse-url.el | 34 ++++++++++++++++++++-------------- 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c655c4968df..06dd2bf1198 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-08-21 Chong Yidong + + * net/browse-url.el (browse-url-firefox): Don't call + browse-url-firefox-sentinel unless using -remote (Bug#9328). + 2011-08-20 Glenn Morris * tutorial.el (help-with-tutorial): Avoid an error on short screens. diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index e18b42a275f..f9bc13e1e25 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -1103,26 +1103,32 @@ URL in a new window." (interactive (browse-url-interactive-arg "URL: ")) (setq url (browse-url-encode-url url)) (let* ((process-environment (browse-url-process-environment)) + (use-remote + (not (memq system-type '(windows-nt ms-dos)))) (process (apply 'start-process (concat "firefox " url) nil browse-url-firefox-program (append browse-url-firefox-arguments - (if (memq system-type '(windows-nt ms-dos)) - (list url) - (list "-remote" - (concat "openURL(" - url - (if (browse-url-maybe-new-window - new-window) - (if browse-url-firefox-new-window-is-tab - ",new-tab" - ",new-window")) - ")"))))))) - (set-process-sentinel process - `(lambda (process change) - (browse-url-firefox-sentinel process ,url))))) + (if use-remote + (list "-remote" + (concat + "openURL(" + url + (if (browse-url-maybe-new-window new-window) + (if browse-url-firefox-new-window-is-tab + ",new-tab" + ",new-window")) + ")")) + (list url)))))) + ;; If we use -remote, the process exits with status code 2 if + ;; Firefox is not already running. The sentinel runs firefox + ;; directly if that happens. + (when use-remote + (set-process-sentinel process + `(lambda (process change) + (browse-url-firefox-sentinel process ,url)))))) (defun browse-url-firefox-sentinel (process url) "Handle a change to the process communicating with Firefox." -- cgit v1.2.1 From ee31aabc4ee4086d5c78dbc93dfbab07b9ecc2a7 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 20 Aug 2011 22:07:00 -0400 Subject: Fix error in compilation-error-properties. * lisp/progmodes/compile.el (compilation-error-properties): Fix confusion between file struct and message struct (Bug#9319). --- lisp/ChangeLog | 3 +++ lisp/progmodes/compile.el | 13 ++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 06dd2bf1198..53fbdf00087 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2011-08-21 Chong Yidong + * progmodes/compile.el (compilation-error-properties): Fix + confusion between file struct and message struct (Bug#9319). + * net/browse-url.el (browse-url-firefox): Don't call browse-url-firefox-sentinel unless using -remote (Bug#9328). diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index f3b873c8b1e..33bd9ff96a7 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -985,12 +985,15 @@ POS and RES.") (let* ((prev (or (get-text-property (1- prev-pos) 'compilation-message) (get-text-property prev-pos 'compilation-message))) - (prev-struct - (car (nth 2 (car prev))))) + (prev-file-struct + (and prev + (compilation--loc->file-struct + (compilation--message->loc prev))))) + ;; Construct FILE . DIR from that. - (if prev-struct - (setq file (cons (car prev-struct) - (cadr prev-struct)))))) + (if prev-file-struct + (setq file (cons (caar prev-file-struct) + (cadr (car prev-file-struct))))))) (unless file (setq file '("*unknown*"))))) ;; All of these fields are optional, get them only if we have an index, and -- cgit v1.2.1 From 02e5c89e678bf4fa9d29bcc1c4064e44672d7dde Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 20 Aug 2011 22:24:07 -0400 Subject: Fix to `ant' compile regexp. * lisp/progmodes/compile.el (compilation-error-regexp-alist-alist): Fix 2011-05-09 change to `ant' regexp. --- lisp/ChangeLog | 2 ++ lisp/progmodes/compile.el | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 53fbdf00087..7ef01205bd2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -2,6 +2,8 @@ * progmodes/compile.el (compilation-error-properties): Fix confusion between file struct and message struct (Bug#9319). + (compilation-error-regexp-alist-alist): Fix 2011-05-09 change to + `ant' regexp. * net/browse-url.el (browse-url-firefox): Don't call browse-url-firefox-sentinel unless using -remote (Bug#9328). diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 33bd9ff96a7..2fb0ac879b2 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -145,7 +145,7 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) (ant "^[ \t]*\\[[^] \n]+\\][ \t]*\\([^: \n]+\\):\\([0-9]+\\):\\(?:\\([0-9]+\\):\\([0-9]+\\):\\([0-9]+\\):\\)?\ -\\( warning\\)?" 1 (2 . 4) (3 . 5) (4)) +\\( warning\\)?" 1 (2 . 4) (3 . 5) (6)) (bash "^\\([^: \n\t]+\\): line \\([0-9]+\\):" 1 2) -- cgit v1.2.1 From 2c34e8dad78b1fc1d1473f320226ffe60510c0ab Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 20 Aug 2011 23:00:52 -0400 Subject: Add some docstrings to font-lock.el. * font-lock.el (font-lock-fontify-region) (font-lock-unfontify-region, font-lock-default-fontify-buffer) (font-lock-default-unfontify-buffer) (font-lock-default-fontify-region) (font-lock-default-unfontify-region): Add docstrings (Bug#8624). --- lisp/ChangeLog | 6 ++++++ lisp/font-lock.el | 13 +++++++++++++ 2 files changed, 19 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7ef01205bd2..edb2fc2cd9f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,11 @@ 2011-08-21 Chong Yidong + * font-lock.el (font-lock-fontify-region) + (font-lock-unfontify-region, font-lock-default-fontify-buffer) + (font-lock-default-unfontify-buffer) + (font-lock-default-fontify-region) + (font-lock-default-unfontify-region): Add docstrings (Bug#8624). + * progmodes/compile.el (compilation-error-properties): Fix confusion between file struct and message struct (Bug#9319). (compilation-error-regexp-alist-alist): Fix 2011-05-09 change to diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 9cf889e1aec..22c716ae67e 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -1018,14 +1018,20 @@ The region it returns may start or end in the middle of a line.") (funcall font-lock-unfontify-buffer-function)) (defun font-lock-fontify-region (beg end &optional loudly) + "Fontify the text between BEG and END. +If LOUDLY is non-nil, print status messages while fontifying. +This works by calling `font-lock-fontify-region-function'." (font-lock-set-defaults) (funcall font-lock-fontify-region-function beg end loudly)) (defun font-lock-unfontify-region (beg end) + "Unfontify the text between BEG and END. +This works by calling `font-lock-unfontify-region-function'." (save-buffer-state (funcall font-lock-unfontify-region-function beg end))) (defun font-lock-default-fontify-buffer () + "Fontify the whole buffer using `font-lock-fontify-buffer-function'." (let ((verbose (if (numberp font-lock-verbose) (> (buffer-size) font-lock-verbose) font-lock-verbose))) @@ -1045,6 +1051,7 @@ The region it returns may start or end in the middle of a line.") (quit (font-lock-unfontify-buffer))))))) (defun font-lock-default-unfontify-buffer () + "Unfontify the whole buffer using `font-lock-unfontify-region-function'." ;; Make sure we unfontify etc. in the whole buffer. (save-restriction (widen) @@ -1114,6 +1121,9 @@ Put first the functions more likely to cause a change and cheaper to compute.") changed)) (defun font-lock-default-fontify-region (beg end loudly) + "Fontify the text between BEG and END. +If LOUDLY is non-nil, print status messages while fontifying. +This function is the default `font-lock-fontify-region-function'." (save-buffer-state ;; Use the fontification syntax table, if any. (with-syntax-table (or font-lock-syntax-table (syntax-table)) @@ -1162,6 +1172,9 @@ This is used by `font-lock-default-unfontify-region' to decide what properties to clear before refontifying a region.") (defun font-lock-default-unfontify-region (beg end) + "Unfontify the text between BEG and END. +This function is the default value of the variable + `font-lock-unfontify-region-function'." (remove-list-of-text-properties beg end (append font-lock-extra-managed-props -- cgit v1.2.1 From 39eeb2f7c5fa7ff0b2a02e84a60d57990b19fbac Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 20 Aug 2011 23:02:39 -0400 Subject: Minor fix to last change. --- lisp/font-lock.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 22c716ae67e..c37a9ae916e 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -1031,7 +1031,7 @@ This works by calling `font-lock-unfontify-region-function'." (funcall font-lock-unfontify-region-function beg end))) (defun font-lock-default-fontify-buffer () - "Fontify the whole buffer using `font-lock-fontify-buffer-function'." + "Fontify the whole buffer using `font-lock-fontify-region-function'." (let ((verbose (if (numberp font-lock-verbose) (> (buffer-size) font-lock-verbose) font-lock-verbose))) @@ -1173,8 +1173,7 @@ what properties to clear before refontifying a region.") (defun font-lock-default-unfontify-region (beg end) "Unfontify the text between BEG and END. -This function is the default value of the variable - `font-lock-unfontify-region-function'." +This function is the default `font-lock-unfontify-region-function'." (remove-list-of-text-properties beg end (append font-lock-extra-managed-props -- cgit v1.2.1 From f5e3c5984b072553838cb15dfd4ab94a9f6ac436 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Sun, 21 Aug 2011 06:11:59 +0200 Subject: Introduce a new variable to allow controlling the SMTP user name * mail/smtpmail.el (smtpmail-smtp-user): New variable. (smtpmail-try-auth-methods): Use it. --- lisp/ChangeLog | 5 +++++ lisp/mail/smtpmail.el | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index edb2fc2cd9f..e383f86971f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-08-21 Lars Magne Ingebrigtsen + + * mail/smtpmail.el (smtpmail-smtp-user): New variable. + (smtpmail-try-auth-methods): Use it. + 2011-08-21 Chong Yidong * font-lock.el (font-lock-fontify-region) diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index 637d10135fa..caec69e7e9e 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el @@ -86,6 +86,11 @@ The default value would be \"smtp\" or 25." :type '(choice (integer :tag "Port") (string :tag "Service")) :group 'smtpmail) +(defcustom smtpmail-smtp-user nil + "User name to use when looking up credentials." + :type '(choice (const nil) string) + :group 'smtpmail) + (defcustom smtpmail-local-domain nil "Local domain name without a host name. If the function `system-name' returns the full internet address, @@ -490,6 +495,7 @@ The list is in preference order.") (auth-source-search :host host :port port + :user smtpmail-smtp-user :max 1 :require (and ask-for-password '(:user :secret)) @@ -510,6 +516,7 @@ The list is in preference order.") :max 1 :host host :port port + :user smtpmail-smtp-user :require '(:user :secret) :create t)) password (plist-get auth-info :secret))) -- cgit v1.2.1 From 1e91d50696f9d458228039f5d1e346fd4dae41e6 Mon Sep 17 00:00:00 2001 From: Gnus developers Date: Sun, 21 Aug 2011 09:39:07 +0000 Subject: Merge changes made in Gnus trunk. nntp.el (nntp-authinfo-file): Mark as obsolete -- use auth-source instead. pop3.el (pop3-wait-for-messages): Don't use Gnus functions here. gnus-util.el (gnus-process-live-p): Copy over compat function. pop3.el (pop3-wait-for-messages): If the pop3 process dies, stop processing. nntp.el (nntp-kill-buffer): Kill the process before killing the buffer to avoid warnings. gnus-agent.el (gnus-agent-expire-done-message): Use %.f as format specified to reduce precision. --- lisp/gnus/ChangeLog | 20 ++++++++++++++++++++ lisp/gnus/gnus-agent.el | 2 +- lisp/gnus/gnus-util.el | 7 +++++++ lisp/gnus/nntp.el | 5 +++++ lisp/gnus/pop3.el | 2 ++ 5 files changed, 35 insertions(+), 1 deletion(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 744817e68f2..4fc144b81b9 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,23 @@ +2011-08-21 Lars Magne Ingebrigtsen + + * nntp.el (nntp-authinfo-file): Mark as obsolete -- use auth-source + instead. + + * pop3.el (pop3-wait-for-messages): Don't use Gnus functions here. + + * gnus-util.el (gnus-process-live-p): Copy over compat function. + + * pop3.el (pop3-wait-for-messages): If the pop3 process dies, stop + processing. + + * nntp.el (nntp-kill-buffer): Kill the process before killing the + buffer to avoid warnings. + +2011-08-20 Simon Josefsson + + * gnus-agent.el (gnus-agent-expire-done-message): Use %.f as format + specified to reduce precision. + 2011-08-19 Lars Magne Ingebrigtsen * nnimap.el (nnimap-transform-headers): Protect against (NIL ...) diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el index 424c55c40f5..26222119b98 100644 --- a/lisp/gnus/gnus-agent.el +++ b/lisp/gnus/gnus-agent.el @@ -3560,7 +3560,7 @@ articles in every agentized group? ")) units (cdr units))) (format "Expiry recovered %d NOV entries, deleted %d files,\ - and freed %f %s." + and freed %.f %s." (nth 0 stats) (nth 1 stats) size (car units))) diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 03ff4a2ea4b..34953611966 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -1249,6 +1249,13 @@ This function saves the current buffer." (with-current-buffer gnus-group-buffer (eq major-mode 'gnus-group-mode)))) +(defun gnus-process-live-p (process) + "Returns non-nil if PROCESS is alive. +A process is considered alive if its status is `run', `open', +`listen', `connect' or `stop'." + (memq (process-status process) + '(run open listen connect stop))) + (defun gnus-remove-if (predicate sequence &optional hash-table-p) "Return a copy of SEQUENCE with all items satisfying PREDICATE removed. SEQUENCE should be a list, a vector, or a string. Returns always a list. diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index 986fd51a613..325aa67f80d 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el @@ -261,6 +261,8 @@ See `nnml-marks-is-evil' for more information.") (const :format "" "password") (string :format "Password: %v"))))))) +(make-obsolete 'nntp-authinfo-file nil "Emacs 24.1") + (defvoo nntp-connection-timeout nil @@ -430,6 +432,9 @@ be restored and the command retried." (defun nntp-kill-buffer (buffer) (when (buffer-name buffer) + (let ((process (get-buffer-process buffer))) + (when process + (delete-process process))) (kill-buffer buffer) (nnheader-init-server-buffer))) diff --git a/lisp/gnus/pop3.el b/lisp/gnus/pop3.el index e29ddb0d44e..54c21703836 100644 --- a/lisp/gnus/pop3.el +++ b/lisp/gnus/pop3.el @@ -178,6 +178,8 @@ Use streaming commands." (defun pop3-wait-for-messages (process count total-size) (while (< (pop3-number-of-responses total-size) count) + (unless (memq (process-status process) '(open run)) + (error "pop3 process died")) (when total-size (message "pop3 retrieved %dKB (%d%%)" (truncate (/ (buffer-size) 1000)) -- cgit v1.2.1 From 23a8a5ab697f3389ea6478cdfefe4e67fff28051 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 21 Aug 2011 13:43:31 -0400 Subject: Improve Edebug error for attempting to instrument built-in functions. * lisp/emacs-lisp/edebug.el (edebug-instrument-function): Use it to signal an error for built-in functions. * lisp/emacs-lisp/find-func.el (find-function-noselect): New arg lisp-only. Fixes: debbugs:6664 --- lisp/ChangeLog | 8 ++++++++ lisp/emacs-lisp/edebug.el | 2 +- lisp/emacs-lisp/find-func.el | 8 +++++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e383f86971f..6de159536a1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2011-08-21 Chong Yidong + + * emacs-lisp/find-func.el (find-function-noselect): New arg + lisp-only. + + * emacs-lisp/edebug.el (edebug-instrument-function): Use it to + signal an error for built-in functions (Bug#6664). + 2011-08-21 Lars Magne Ingebrigtsen * mail/smtpmail.el (smtpmail-smtp-user): New variable. diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index f84de0308bf..57d25c9e169 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -3408,7 +3408,7 @@ go to the end of the last sexp, or if that is the same point, then step." (message "%s is already instrumented." func) func) (t - (let ((loc (find-function-noselect func))) + (let ((loc (find-function-noselect func t))) (unless (cdr loc) (error "Could not find the definition in its file")) (with-current-buffer (car loc) diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index 0194af2e3a8..2c7208db8a3 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -312,7 +312,7 @@ The search is done in the source for library LIBRARY." (cons (current-buffer) nil)))))))) ;;;###autoload -(defun find-function-noselect (function) +(defun find-function-noselect (function &optional lisp-only) "Return a pair (BUFFER . POINT) pointing to the definition of FUNCTION. Finds the source file containing the definition of FUNCTION @@ -320,6 +320,10 @@ in a buffer and the point of the definition. The buffer is not selected. If the function definition can't be found in the buffer, returns (BUFFER). +If FUNCTION is a built-in function, this function normally +attempts to find it in the Emacs C sources; however, if LISP-ONLY +is non-nil, signal an error instead. + If the file where FUNCTION is defined is not known, then it is searched for in `find-function-source-path' if non-nil, otherwise in `load-path'." @@ -345,6 +349,8 @@ in `load-path'." (cond ((eq (car-safe def) 'autoload) (nth 1 def)) ((subrp def) + (if lisp-only + (error "%s is a built-in function" function)) (help-C-file-name def 'subr)) ((symbol-file function 'defun))))) (find-function-search-for-symbol function nil library)))) -- cgit v1.2.1 From ff98b2dd51e84b812e061859fa8c682d22b2e459 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 21 Aug 2011 13:56:19 -0400 Subject: * lisp/term.el (term-mouse-paste): Yank primary selection (Bug#6845). --- lisp/ChangeLog | 2 ++ lisp/term.el | 21 ++++++++++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6de159536a1..e110b962637 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2011-08-21 Chong Yidong + * term.el (term-mouse-paste): Yank primary selection (Bug#6845). + * emacs-lisp/find-func.el (find-function-noselect): New arg lisp-only. diff --git a/lisp/term.el b/lisp/term.el index 6d7f6f5c535..361ff685396 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -1227,9 +1227,9 @@ without any interpretation." (make-string 1 char) (format "\e%c" char))))) -(defun term-mouse-paste (click arg) - "Insert the last stretch of killed text at the position clicked on." - (interactive "e\nP") +(defun term-mouse-paste (click) + "Insert the primary selection at the position clicked on." + (interactive "e") (if (featurep 'xemacs) (term-send-raw-string (or (condition-case () (x-get-selection) (error ())) @@ -1238,10 +1238,17 @@ without any interpretation." (run-hooks 'mouse-leave-buffer-hook) (setq this-command 'yank) (mouse-set-point click) - (term-send-raw-string (current-kill (cond - ((listp arg) 0) - ((eq arg '-) -1) - (t (1- arg))))))) + (term-send-raw-string + (or (cond ; From `mouse-yank-primary': + ((eq system-type 'windows-nt) + (or (x-get-selection 'PRIMARY) + (x-get-selection-value))) + ((fboundp 'x-get-selection-value) + (or (x-get-selection-value) + (x-get-selection 'PRIMARY))) + (t + (x-get-selection 'PRIMARY))) + (error "No selection is available"))))) (defun term-paste () "Insert the last stretch of killed text at point." -- cgit v1.2.1 From c65c96228e787f20a7a0fb35657517931d881df5 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Sun, 21 Aug 2011 21:27:27 +0200 Subject: Only bind `coding-system-for-*' around the process open call to avoid auth-source side effects. --- lisp/ChangeLog | 6 ++++++ lisp/mail/smtpmail.el | 34 +++++++++++++++++----------------- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e110b962637..7fb9f323950 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2011-08-21 Lars Magne Ingebrigtsen + + * mail/smtpmail.el (smtpmail-via-smtp): Only bind + `coding-system-for-*' around the process open call to avoid + auth-source side effects. + 2011-08-21 Chong Yidong * term.el (term-mouse-paste): Yank primary selection (Bug#6845). diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index caec69e7e9e..381af3b963a 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el @@ -622,8 +622,6 @@ The list is in preference order.") (and mail-specify-envelope-from (mail-envelope-from)) user-mail-address)) - (coding-system-for-read 'binary) - (coding-system-for-write 'binary) response-code process-buffer result @@ -642,21 +640,23 @@ The list is in preference order.") (erase-buffer)) ;; open the connection to the server - (setq result - (open-network-stream - "smtpmail" process-buffer host port - :type smtpmail-stream-type - :return-list t - :capability-command (format "EHLO %s\r\n" (smtpmail-fqdn)) - :end-of-command "^[0-9]+ .*\r\n" - :success "^2.*\n" - :always-query-capabilities t - :starttls-function - (lambda (capabilities) - (and (string-match "-STARTTLS" capabilities) - "STARTTLS\r\n")) - :client-certificate t - :use-starttls-if-possible t)) + (let ((coding-system-for-read 'binary) + (coding-system-for-write 'binary)) + (setq result + (open-network-stream + "smtpmail" process-buffer host port + :type smtpmail-stream-type + :return-list t + :capability-command (format "EHLO %s\r\n" (smtpmail-fqdn)) + :end-of-command "^[0-9]+ .*\r\n" + :success "^2.*\n" + :always-query-capabilities t + :starttls-function + (lambda (capabilities) + (and (string-match "-STARTTLS" capabilities) + "STARTTLS\r\n")) + :client-certificate t + :use-starttls-if-possible t))) ;; If we couldn't access the server at all, we give up. (unless (setq process (car result)) -- cgit v1.2.1 From e7f2c178da01a77d782aedae40f5578a48ddedba Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Sun, 21 Aug 2011 22:10:29 +0200 Subject: (smtpmail-try-auth-methods): Expand the secret password. --- lisp/ChangeLog | 1 + lisp/mail/smtpmail.el | 2 ++ 2 files changed, 3 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7fb9f323950..f247abdd468 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -3,6 +3,7 @@ * mail/smtpmail.el (smtpmail-via-smtp): Only bind `coding-system-for-*' around the process open call to avoid auth-source side effects. + (smtpmail-try-auth-methods): Expand the secret password. 2011-08-21 Chong Yidong diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index 381af3b963a..f905eea8405 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el @@ -505,6 +505,8 @@ The list is in preference order.") (save-function (and ask-for-password (plist-get auth-info :save-function))) ret) + (when (functionp password) + (setq password (funcall password))) (when (and user (not password)) ;; The user has stored the user name, but not the password, so -- cgit v1.2.1 From 7185da524d81acaaa872f8f803870d8c57c8b4c9 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Sun, 21 Aug 2011 22:29:11 +0200 Subject: (smtpmail-query-smtp-server): Allow `quit'-ing out in case the probe hangs. --- lisp/ChangeLog | 2 ++ lisp/mail/smtpmail.el | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f247abdd468..02c88eae667 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -4,6 +4,8 @@ `coding-system-for-*' around the process open call to avoid auth-source side effects. (smtpmail-try-auth-methods): Expand the secret password. + (smtpmail-query-smtp-server): Allow `quit'-ing out in case the + probe hangs. 2011-08-21 Chong Yidong diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index f905eea8405..40fbb072594 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el @@ -602,8 +602,10 @@ The list is in preference order.") (push smtpmail-smtp-server ports)) (while (and (not smtpmail-smtp-server) (setq port (pop ports))) - (when (setq stream (ignore-errors - (open-network-stream "smtp" nil server port))) + (when (setq stream (condition-case () + (open-network-stream "smtp" nil server port) + (quit nil) + (error nil))) (customize-save-variable 'smtpmail-smtp-server server) (customize-save-variable 'smtpmail-smtp-service port) (delete-process stream))) -- cgit v1.2.1 From 138c0212ac4bc4708210ba4b3e0a4fad00a4dc5f Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Sun, 21 Aug 2011 22:10:49 +0000 Subject: Merge changes made in Gnus trunk. nnmail.el (nnmail-get-new-mail-1): If one mail source bugs out, continue on and do the clean-up phase (bug#9188). gnus-sum.el (gnus-summary-expire-articles): When expiring articles, just ignore groups that can't be opened instead of erroring out (bug#9225). gnus-art.el (gnus-article-update-date-headers): Flip the default to nil since some many people are fuddy-duddies. gnus-html.el (gnus-html-image-fetched): Don't cache zero-length images. --- lisp/gnus/ChangeLog | 13 ++++++++++++ lisp/gnus/gnus-art.el | 2 +- lisp/gnus/gnus-html.el | 15 +++++++------- lisp/gnus/gnus-sum.el | 55 +++++++++++++++++++++++++------------------------- lisp/gnus/nnmail.el | 29 +++++++++++++++----------- 5 files changed, 66 insertions(+), 48 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 4fc144b81b9..ad3e26f0f51 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,5 +1,18 @@ 2011-08-21 Lars Magne Ingebrigtsen + * nnmail.el (nnmail-get-new-mail-1): If one mail source bugs out, + continue on and do the clean-up phase (bug#9188). + + * gnus-sum.el (gnus-summary-expire-articles): When expiring articles, + just ignore groups that can't be opened instead of erroring out + (bug#9225). + + * gnus-art.el (gnus-article-update-date-headers): Flip the default to + nil since some many people are fuddy-duddies. + + * gnus-html.el (gnus-html-image-fetched): Don't cache zero-length + images. + * nntp.el (nntp-authinfo-file): Mark as obsolete -- use auth-source instead. diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index c6e0180dadc..eaf0ed52f51 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -1039,7 +1039,7 @@ Some of these headers are updated automatically. See (item :tag "ISO8601 format" :value 'iso8601) (item :tag "User-defined" :value 'user-defined))) -(defcustom gnus-article-update-date-headers 1 +(defcustom gnus-article-update-date-headers nil "A number that says how often to update the date header (in seconds). If nil, don't update it at all." :version "24.1" diff --git a/lisp/gnus/gnus-html.el b/lisp/gnus/gnus-html.el index d3da6aab1b7..f443c4021e2 100644 --- a/lisp/gnus/gnus-html.el +++ b/lisp/gnus/gnus-html.el @@ -399,15 +399,16 @@ Use ALT-TEXT for the image string." (defun gnus-html-image-fetched (status buffer image) "Callback function called when image has been fetched." (unless (plist-get status :error) - (when gnus-html-image-automatic-caching - (url-store-in-cache (current-buffer))) (when (and (or (search-forward "\n\n" nil t) (search-forward "\r\n\r\n" nil t)) - (buffer-live-p buffer)) - (let ((data (buffer-substring (point) (point-max)))) - (with-current-buffer buffer - (let ((inhibit-read-only t)) - (gnus-html-put-image data (car image) (cadr image))))))) + (not (eobp))) + (when gnus-html-image-automatic-caching + (url-store-in-cache (current-buffer))) + (when (buffer-live-p buffer) + (let ((data (buffer-substring (point) (point-max)))) + (with-current-buffer buffer + (let ((inhibit-read-only t)) + (gnus-html-put-image data (car image) (cadr image)))))))) (kill-buffer (current-buffer))) (defun gnus-html-get-image-data (url) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 73ecffb090e..c01f91973a0 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -10287,34 +10287,33 @@ This will be the case if the article has both been mailed and posted." ;; There are expirable articles in this group, so we run them ;; through the expiry process. (gnus-message 6 "Expiring articles...") - (unless (gnus-check-group gnus-newsgroup-name) - (error "Can't open server for %s" gnus-newsgroup-name)) - ;; The list of articles that weren't expired is returned. - (save-excursion - (if expiry-wait - (let ((nnmail-expiry-wait-function nil) - (nnmail-expiry-wait expiry-wait)) - (setq es (gnus-request-expire-articles - expirable gnus-newsgroup-name))) - (setq es (gnus-request-expire-articles - expirable gnus-newsgroup-name))) - (unless total - (setq gnus-newsgroup-expirable es)) - ;; We go through the old list of expirable, and mark all - ;; really expired articles as nonexistent. - (unless (eq es expirable) ;If nothing was expired, we don't mark. - (let ((gnus-use-cache nil)) - (dolist (article expirable) - (when (and (not (memq article es)) - (gnus-data-find article)) - (gnus-summary-mark-article article gnus-canceled-mark) - (run-hook-with-args 'gnus-summary-article-expire-hook - 'delete - (gnus-data-header - (assoc article (gnus-data-list nil))) - gnus-newsgroup-name - nil - nil)))))) + (when (gnus-check-group gnus-newsgroup-name) + ;; The list of articles that weren't expired is returned. + (save-excursion + (if expiry-wait + (let ((nnmail-expiry-wait-function nil) + (nnmail-expiry-wait expiry-wait)) + (setq es (gnus-request-expire-articles + expirable gnus-newsgroup-name))) + (setq es (gnus-request-expire-articles + expirable gnus-newsgroup-name))) + (unless total + (setq gnus-newsgroup-expirable es)) + ;; We go through the old list of expirable, and mark all + ;; really expired articles as nonexistent. + (unless (eq es expirable) ;If nothing was expired, we don't mark. + (let ((gnus-use-cache nil)) + (dolist (article expirable) + (when (and (not (memq article es)) + (gnus-data-find article)) + (gnus-summary-mark-article article gnus-canceled-mark) + (run-hook-with-args 'gnus-summary-article-expire-hook + 'delete + (gnus-data-header + (assoc article (gnus-data-list nil))) + gnus-newsgroup-name + nil + nil))))))) (gnus-message 6 "Expiring articles...done"))))) (defun gnus-summary-expire-articles-now () diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el index dc2080dee1a..d83467a1ed5 100644 --- a/lisp/gnus/nnmail.el +++ b/lisp/gnus/nnmail.el @@ -1842,18 +1842,23 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." ;; and fetch the mail from each. (while (setq source (pop fetching-sources)) (when (setq new - (mail-source-fetch - source - (gnus-byte-compile - `(lambda (file orig-file) - (nnmail-split-incoming - file ',(intern (format "%s-save-mail" method)) - ',spool-func - (or in-group - (if (equal file orig-file) - nil - (nnmail-get-split-group orig-file ',source))) - ',(intern (format "%s-active-number" method))))))) + (condition-case cond + (mail-source-fetch + source + (gnus-byte-compile + `(lambda (file orig-file) + (nnmail-split-incoming + file ',(intern (format "%s-save-mail" method)) + ',spool-func + (or in-group + (if (equal file orig-file) + nil + (nnmail-get-split-group orig-file + ',source))) + ',(intern (format "%s-active-number" method)))))) + ((error quit) + (message "Mail source %s failed: %s" source cond) + 0))) (incf total new) (incf i))) ;; If we did indeed read any incoming spools, we save all info. -- cgit v1.2.1 From e013fb340c50dd99676ccc4552fd6aae2e319aa8 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 21 Aug 2011 22:34:23 -0400 Subject: Fix animated gif segfault and frame clearing bug. * src/image.c (gif_load): Don't assume that each subimage has the same dimensions as the base image. Handle disposal method that is "undefined" by the gif spec. Fixes: debbugs:9335 --- src/ChangeLog | 6 ++++++ src/image.c | 54 +++++++++++++++++++++++++++++------------------------- 2 files changed, 35 insertions(+), 25 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 82d75d39b40..243a39af45d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-08-22 Chong Yidong + + * image.c (gif_load): Don't assume that each subimage has the same + dimensions as the base image. Handle disposal method that is + "undefined" by the gif spec (Bug#9335). + 2011-08-20 Chong Yidong * eval.c (Fsignal): Handle `debug' symbol in error handler (Bug#9329). diff --git a/src/image.c b/src/image.c index d1091aec6f3..65be22b087a 100644 --- a/src/image.c +++ b/src/image.c @@ -7139,7 +7139,6 @@ gif_load (struct frame *f, struct image *img) ColorMapObject *gif_color_map; unsigned long pixel_colors[256]; GifFileType *gif; - int image_height, image_width; gif_memory_source memsrc; Lisp_Object specified_bg = image_spec_value (img->spec, QCbackground, NULL); Lisp_Object specified_file = image_spec_value (img->spec, QCfile, NULL); @@ -7216,19 +7215,13 @@ gif_load (struct frame *f, struct image *img) } } - img->corners[TOP_CORNER] = gif->SavedImages[idx].ImageDesc.Top; - img->corners[LEFT_CORNER] = gif->SavedImages[idx].ImageDesc.Left; - image_height = gif->SavedImages[idx].ImageDesc.Height; - img->corners[BOT_CORNER] = img->corners[TOP_CORNER] + image_height; - image_width = gif->SavedImages[idx].ImageDesc.Width; - img->corners[RIGHT_CORNER] = img->corners[LEFT_CORNER] + image_width; + width = img->width = gif->SWidth; + height = img->height = gif->SHeight; - width = img->width = max (gif->SWidth, - max (gif->Image.Left + gif->Image.Width, - img->corners[RIGHT_CORNER])); - height = img->height = max (gif->SHeight, - max (gif->Image.Top + gif->Image.Height, - img->corners[BOT_CORNER])); + img->corners[TOP_CORNER] = gif->SavedImages[0].ImageDesc.Top; + img->corners[LEFT_CORNER] = gif->SavedImages[0].ImageDesc.Left; + img->corners[BOT_CORNER] = img->corners[TOP_CORNER] + height; + img->corners[RIGHT_CORNER] = img->corners[LEFT_CORNER] + width; if (!check_image_size (f, width, height)) { @@ -7283,6 +7276,10 @@ gif_load (struct frame *f, struct image *img) unsigned char *raster = (unsigned char *) subimage->RasterBits; int transparency_color_index = -1; int disposal = 0; + int subimg_width = subimage->ImageDesc.Width; + int subimg_height = subimage->ImageDesc.Height; + int subimg_top = subimage->ImageDesc.Top; + int subimg_left = subimage->ImageDesc.Left; /* Find the Graphic Control Extension block for this sub-image. Extract the disposal method and transparency color. */ @@ -7306,6 +7303,13 @@ gif_load (struct frame *f, struct image *img) if (j == 0) disposal = 2; + /* For disposal == 0, the spec says "No disposal specified. The + decoder is not required to take any action." In practice, it + seems we need to treat this like "keep in place", see e.g. + http://upload.wikimedia.org/wikipedia/commons/3/37/Clock.gif */ + if (disposal == 0) + disposal = 1; + /* Allocate subimage colors. */ memset (pixel_colors, 0, sizeof pixel_colors); gif_color_map = subimage->ImageDesc.ColorMap; @@ -7333,34 +7337,34 @@ gif_load (struct frame *f, struct image *img) int row, pass; for (y = 0, row = interlace_start[0], pass = 0; - y < image_height; + y < subimg_height; y++, row += interlace_increment[pass]) { - if (row >= image_height) + if (row >= subimg_height) { row = interlace_start[++pass]; - while (row >= image_height) + while (row >= subimg_height) row = interlace_start[++pass]; } - for (x = 0; x < image_width; x++) + for (x = 0; x < subimg_width; x++) { - int c = raster[y * image_width + x]; + int c = raster[y * subimg_width + x]; if (transparency_color_index != c || disposal != 1) - XPutPixel (ximg, x + img->corners[LEFT_CORNER], - row + img->corners[TOP_CORNER], pixel_colors[c]); + XPutPixel (ximg, x + subimg_left, row + subimg_top, + pixel_colors[c]); } } } else { - for (y = 0; y < image_height; ++y) - for (x = 0; x < image_width; ++x) + for (y = 0; y < subimg_height; ++y) + for (x = 0; x < subimg_width; ++x) { - int c = raster[y * image_width + x]; + int c = raster[y * subimg_width + x]; if (transparency_color_index != c || disposal != 1) - XPutPixel (ximg, x + img->corners[LEFT_CORNER], - y + img->corners[TOP_CORNER], pixel_colors[c]); + XPutPixel (ximg, x + subimg_left, y + subimg_top, + pixel_colors[c]); } } } -- cgit v1.2.1 From f13f86fbf2a9bce1abc974a4b2f457183e963d3b Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 21 Aug 2011 23:38:30 -0400 Subject: Fix some word/symbol classifications in scheme-mode's syntax table. * lisp/progmodes/scheme.el (scheme-mode-syntax-table): Don't use symbol-constituent as the default, as that stops font-lock from working properly. Fixes: debbugs:8843 --- lisp/ChangeLog | 6 ++++++ lisp/progmodes/scheme.el | 28 ++++++++++++++-------------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 02c88eae667..e8a6cd73826 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2011-08-22 Chong Yidong + + * progmodes/scheme.el (scheme-mode-syntax-table): Don't use + symbol-constituent as the default, as that stops font-lock from + working properly (Bug#8843). + 2011-08-21 Lars Magne Ingebrigtsen * mail/smtpmail.el (smtpmail-via-smtp): Only bind diff --git a/lisp/progmodes/scheme.el b/lisp/progmodes/scheme.el index 4151e2bb79a..470b309434c 100644 --- a/lisp/progmodes/scheme.el +++ b/lisp/progmodes/scheme.el @@ -55,24 +55,24 @@ (defvar scheme-mode-syntax-table (let ((st (make-syntax-table)) (i 0)) - - ;; Default is atom-constituent. - (while (< i 256) + ;; Symbol constituents + ;; We used to treat chars 128-256 as symbol-constituent, but they + ;; should be valid word constituents (Bug#8843). Note that valid + ;; identifier characters are Scheme-implementation dependent. + (while (< i ?0) (modify-syntax-entry i "_ " st) (setq i (1+ i))) - - ;; Word components. - (setq i ?0) - (while (<= i ?9) - (modify-syntax-entry i "w " st) + (setq i (1+ ?9)) + (while (< i ?A) + (modify-syntax-entry i "_ " st) (setq i (1+ i))) - (setq i ?A) - (while (<= i ?Z) - (modify-syntax-entry i "w " st) + (setq i (1+ ?Z)) + (while (< i ?a) + (modify-syntax-entry i "_ " st) (setq i (1+ i))) - (setq i ?a) - (while (<= i ?z) - (modify-syntax-entry i "w " st) + (setq i (1+ ?z)) + (while (< i 128) + (modify-syntax-entry i "_ " st) (setq i (1+ i))) ;; Whitespace -- cgit v1.2.1 From 262a14396ddccb01d20882345608e1f203cbe65b Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Mon, 22 Aug 2011 12:54:38 +0300 Subject: * lisp/progmodes/grep.el (grep-process-setup): Use `buffer-modified-p' to check for empty output. Fixes: debbugs:9226 --- lisp/ChangeLog | 5 +++++ lisp/progmodes/grep.el | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e8a6cd73826..bfcbaa27b6f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-08-22 Juri Linkov + + * progmodes/grep.el (grep-process-setup): Use `buffer-modified-p' + to check for empty output (bug#9226). + 2011-08-22 Chong Yidong * progmodes/scheme.el (scheme-mode-syntax-table): Don't use diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 31100f3fac2..709f01444bf 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -463,9 +463,12 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'." (set (make-local-variable 'compilation-exit-message-function) (lambda (status code msg) (if (eq status 'exit) - (cond ((zerop code) + ;; This relies on the fact that `compilation-start' + ;; sets buffer-modified to nil before running the command, + ;; so the buffer is still unmodified if there is no output. + (cond ((and (zerop code) (buffer-modified-p)) '("finished (matches found)\n" . "matched")) - ((= code 1) + ((or (= code 1) (not (buffer-modified-p))) '("finished with no matches found\n" . "no match")) (t (cons msg code))) -- cgit v1.2.1 From 56ee679c7f363b2ea9caf070535c0696a3af7b66 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Mon, 22 Aug 2011 15:46:45 +0300 Subject: * lisp/progmodes/compile.el (compilation-mode-font-lock-keywords): Revert regexp that highlights output switches to its old pre-2010-10-28 value and remove one `?' from it (bug#9319). --- etc/compilation.txt | 15 ++++++++++++--- lisp/ChangeLog | 4 ++++ lisp/progmodes/compile.el | 2 +- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/etc/compilation.txt b/etc/compilation.txt index 888c1f94c33..2e452b58c8d 100644 --- a/etc/compilation.txt +++ b/etc/compilation.txt @@ -546,9 +546,18 @@ checking whether to build shared libraries... yes checking whether -lc should be explicitly linked in... (cached) no checking For GLIB - version >= 2.0.0... yes (version 2.1.0) checking FONTCONFIG_CFLAGS... -g++ -o foo.o foo.cc -tool1 -output=foo foo.x -tool2 --outfile foo foo.y +tool -o foo.o foo.c +tool -o=foo.o foo.c +tool -output foo.o foo.c +tool -output=foo.o foo.c +tool -outfile foo.o foo.c +tool -outfile=foo.o foo.c +tool --output foo.o foo.c +tool --output=foo.o foo.c +tool --outfile foo.o foo.c +tool --outfile=foo.o foo.c +tool --omega foo.c +tool --output-html-file foo.c Compilation started at Wed Jul 20 12:20:10 Compilation interrupt at Wed Jul 20 12:20:10 diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bfcbaa27b6f..4c7306174d6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2011-08-22 Juri Linkov + * progmodes/compile.el (compilation-mode-font-lock-keywords): + Revert regexp that highlights output switches to its old + pre-2010-10-28 value and remove one `?' from it (bug#9319). + * progmodes/grep.el (grep-process-setup): Use `buffer-modified-p' to check for empty output (bug#9226). diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 2fb0ac879b2..79fec080d57 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -523,7 +523,7 @@ you may also want to change `compilation-page-delimiter'.") ;; Command output lines. Recognize `make[n]:' lines too. ("^\\([[:alnum:]_/.+-]+\\)\\(\\[\\([0-9]+\\)\\]\\)?[ \t]*:" (1 font-lock-function-name-face) (3 compilation-line-face nil t)) - (" -\\(?:o[= ]?\\|-\\(?:outfile\\|output\\)[= ]\\)\\(\\S +\\)" . 1) + (" --?o\\(?:utfile\\|utput\\)?[= ]\\(\\S +\\)" . 1) ("^Compilation \\(finished\\).*" (0 '(face nil compilation-message nil help-echo nil mouse-face nil) t) (1 compilation-info-face)) -- cgit v1.2.1 From e59e73d83f5aa3705ebaaa2f1637b392f0b3e4f5 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 22 Aug 2011 15:58:37 +0300 Subject: Back out inadvertent changes in minibuffer.el. --- lisp/minibuffer.el | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index b82147b97f1..313298de97e 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -1119,27 +1119,13 @@ It also eliminates runs of equal strings." `(display (space :align-to ,column))) nil)))) (if (not (consp str)) - (put-text-property (point) - (progn - (insert (bidi-string-mark-left-to-right - str)) - (point)) + (put-text-property (point) (progn (insert str) (point)) 'mouse-face 'highlight) - (put-text-property (point) - (progn - (insert - (bidi-string-mark-left-to-right - (car str))) - (point)) + (put-text-property (point) (progn (insert (car str)) (point)) 'mouse-face 'highlight) - (add-text-properties (point) - (progn - (insert - (bidi-string-mark-left-to-right - (cadr str))) - (point)) + (add-text-properties (point) (progn (insert (cadr str)) (point)) '(mouse-face nil - face completions-annotations))) + face completions-annotations))) (cond ((eq completions-format 'vertical) ;; Vertical format -- cgit v1.2.1 From 4d993e7b54b8d302f8b3f96b5c044ce1a0486357 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Mon, 22 Aug 2011 16:08:35 +0300 Subject: * etc/compilation.txt: Add more samples of output and non-output switches (bug#9319). --- etc/ChangeLog | 5 +++++ etc/compilation.txt | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/etc/ChangeLog b/etc/ChangeLog index c2f7e3cb0d2..31752a2bc2a 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,8 @@ +2011-08-22 Juri Linkov + + * compilation.txt: Add more samples of output and non-output + switches (bug#9319). + 2011-08-19 Chong Yidong * themes/dichromacy-theme.el: diff --git a/etc/compilation.txt b/etc/compilation.txt index 2e452b58c8d..eeb09b1712c 100644 --- a/etc/compilation.txt +++ b/etc/compilation.txt @@ -556,8 +556,10 @@ tool --output foo.o foo.c tool --output=foo.o foo.c tool --outfile foo.o foo.c tool --outfile=foo.o foo.c -tool --omega foo.c -tool --output-html-file foo.c +tool -omega foo.c foo2.c +tool -output-html-file foo.c foo2.c +tool --omega foo.c foo2.c +tool --output-html-file foo.c foo2.c Compilation started at Wed Jul 20 12:20:10 Compilation interrupt at Wed Jul 20 12:20:10 -- cgit v1.2.1 From dac347dd4a459bbbd7274f106797201e6e420701 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 22 Aug 2011 20:00:40 +0300 Subject: Fix vertical cursor motion under bidi on auto-composed characters. src/xdisp.c (BUFFER_POS_REACHED_P): If this is a composition, consider it a hit if to_charpos is anywhere in the range of the composed buffer positions. --- src/ChangeLog | 6 ++++++ src/xdisp.c | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 243a39af45d..e3cf7546962 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-08-22 Eli Zaretskii + + * xdisp.c (BUFFER_POS_REACHED_P): If this is a composition, + consider it a hit if to_charpos is anywhere in the range of the + composed buffer positions. + 2011-08-22 Chong Yidong * image.c (gif_load): Don't assume that each subimage has the same diff --git a/src/xdisp.c b/src/xdisp.c index e773830800e..1878327480f 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -7699,7 +7699,12 @@ move_it_in_display_line_to (struct it *it, ((op & MOVE_TO_POS) != 0 \ && BUFFERP (it->object) \ && (IT_CHARPOS (*it) == to_charpos \ - || (!it->bidi_p && IT_CHARPOS (*it) > to_charpos)) \ + || (!it->bidi_p && IT_CHARPOS (*it) > to_charpos) \ + || (it->what == IT_COMPOSITION \ + && ((IT_CHARPOS (*it) > to_charpos \ + && to_charpos >= it->cmp_it.charpos) \ + || (IT_CHARPOS (*it) < to_charpos \ + && to_charpos <= it->cmp_it.charpos)))) \ && (it->method == GET_FROM_BUFFER \ || (it->method == GET_FROM_DISPLAY_VECTOR \ && it->dpvec + it->current.dpvec_index + 1 >= it->dpend))) -- cgit v1.2.1 From 4eb613489b98093e31f2a81765a4b644fdb90fb2 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 22 Aug 2011 17:16:46 -0400 Subject: * lisp/emacs-lisp/debug.el (debug-arglist): New function. (debug-convert-byte-code): Use it. Handle lexical byte-codes. (debug-on-entry-1): Handle interpreted closures. Fixes: debbugs:9120 --- lisp/ChangeLog | 6 ++++++ lisp/emacs-lisp/debug.el | 34 +++++++++++++++++++++------------- 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4c7306174d6..4efa1de8e43 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2011-08-22 Stefan Monnier + + * emacs-lisp/debug.el (debug-arglist): New function. + (debug-convert-byte-code): Use it. Handle lexical byte-codes. + (debug-on-entry-1): Handle interpreted closures (bug#9120). + 2011-08-22 Juri Linkov * progmodes/compile.el (compilation-mode-font-lock-keywords): diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 157749500e7..8276030ccf8 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -778,6 +778,7 @@ Redefining FUNCTION also cancels it." (not (debugger-special-form-p symbol)))) t nil nil (symbol-name fn))) (list (if (equal val "") fn (intern val))))) + ;; FIXME: Use advice.el. (when (debugger-special-form-p function) (error "Function %s is a special form" function)) (if (or (symbolp (symbol-function function)) @@ -835,24 +836,30 @@ To specify a nil argument interactively, exit with an empty minibuffer." (message "Cancelling debug-on-entry for all functions") (mapcar 'cancel-debug-on-entry debug-function-list))) +(defun debug-arglist (definition) + ;; FIXME: copied from ad-arglist. + "Return the argument list of DEFINITION." + (require 'help-fns) + (help-function-arglist definition 'preserve-names)) + (defun debug-convert-byte-code (function) (let* ((defn (symbol-function function)) (macro (eq (car-safe defn) 'macro))) (when macro (setq defn (cdr defn))) - (unless (consp defn) - ;; Assume a compiled code object. - (let* ((contents (append defn nil)) + (when (byte-code-function-p defn) + (let* ((args (debug-arglist defn)) (body - (list (list 'byte-code (nth 1 contents) - (nth 2 contents) (nth 3 contents))))) - (if (nthcdr 5 contents) - (setq body (cons (list 'interactive (nth 5 contents)) body))) - (if (nth 4 contents) + `((,(if (memq '&rest args) #'apply #'funcall) + ,defn + ,@(remq '&rest (remq '&optional args)))))) + (if (> (length defn) 5) + (push `(interactive ,(aref defn 5)) body)) + (if (aref defn 4) ;; Use `documentation' here, to get the actual string, ;; in case the compiled function has a reference ;; to the .elc file. (setq body (cons (documentation function) body))) - (setq defn (cons 'lambda (cons (car contents) body)))) + (setq defn `(closure (t) ,args ,@body))) (when macro (setq defn (cons 'macro defn))) (fset function defn)))) @@ -861,11 +868,12 @@ To specify a nil argument interactively, exit with an empty minibuffer." (tail defn)) (when (eq (car-safe tail) 'macro) (setq tail (cdr tail))) - (if (not (eq (car-safe tail) 'lambda)) + (if (not (memq (car-safe tail) '(closure lambda))) ;; Only signal an error when we try to set debug-on-entry. ;; When we try to clear debug-on-entry, we are now done. (when flag (error "%s is not a user-defined Lisp function" function)) + (if (eq (car tail) 'closure) (setq tail (cdr tail))) (setq tail (cdr tail)) ;; Skip the docstring. (when (and (stringp (cadr tail)) (cddr tail)) @@ -875,9 +883,9 @@ To specify a nil argument interactively, exit with an empty minibuffer." (setq tail (cdr tail))) (unless (eq flag (equal (cadr tail) '(implement-debug-on-entry))) ;; Add/remove debug statement as needed. - (if flag - (setcdr tail (cons '(implement-debug-on-entry) (cdr tail))) - (setcdr tail (cddr tail))))) + (setcdr tail (if flag + (cons '(implement-debug-on-entry) (cdr tail)) + (cddr tail))))) defn)) (defun debugger-list-functions () -- cgit v1.2.1 From 867cab7493ffdaa9de2b06db573a5f6290a2042f Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 22 Aug 2011 18:10:21 -0400 Subject: * lisp/progmodes/sh-script.el (sh-maybe-here-document): Disable magic in strings and comments. Fixes: debbugs:9333 --- lisp/ChangeLog | 3 +++ lisp/progmodes/sh-script.el | 2 ++ 2 files changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4efa1de8e43..82d67fe476d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2011-08-22 Stefan Monnier + * progmodes/sh-script.el (sh-maybe-here-document): Disable magic in + strings and comments (bug#9333). + * emacs-lisp/debug.el (debug-arglist): New function. (debug-convert-byte-code): Use it. Handle lexical byte-codes. (debug-on-entry-1): Handle interpreted closures (bug#9120). diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 31a4fbaef4d..7b949134c6c 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -460,6 +460,7 @@ This is buffer-local in every such buffer.") (define-key map "\C-c+" 'sh-add) (define-key map "\C-\M-x" 'sh-execute-region) (define-key map "\C-c\C-x" 'executable-interpret) + ;; FIXME: Use post-self-insert-hook. (define-key map "<" 'sh-maybe-here-document) (define-key map "(" 'skeleton-pair-insert-maybe) (define-key map "{" 'skeleton-pair-insert-maybe) @@ -3659,6 +3660,7 @@ The document is bounded by `sh-here-document-word'." (save-excursion (backward-char 2) (sh-quoted-p)) + (nth 8 (syntax-ppss)) (let ((tabs (if (string-match "\\`-" sh-here-document-word) (make-string (/ (current-indentation) tab-width) ?\t) "")) -- cgit v1.2.1 From 8b76d6f8eab68baebd7cc7da85e93bf09e4d34da Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 22 Aug 2011 23:09:59 -0400 Subject: * src/cmds.c (Fself_insert_command): Mention post-self-insert-hook. --- src/ChangeLog | 22 +++++++++++++--------- src/cmds.c | 3 ++- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index e3cf7546962..a1a826d625f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-08-23 Stefan Monnier + + * cmds.c (Fself_insert_command): Mention post-self-insert-hook. + 2011-08-22 Eli Zaretskii * xdisp.c (BUFFER_POS_REACHED_P): If this is a composition, @@ -45,8 +49,8 @@ 2011-08-17 Chong Yidong * eval.c (internal_condition_case, internal_condition_case_1) - (internal_condition_case_2, internal_condition_case_n): Remove - unnecessary aborts (Bug#9081). + (internal_condition_case_2, internal_condition_case_n): + Remove unnecessary aborts (Bug#9081). 2011-08-17 Eli Zaretskii @@ -69,8 +73,8 @@ * unexcw.c ( __malloc_initialized): Declare external variable. (fixup_executable): Force the dumped emacs to reinitialize malloc. - * gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo): New - variables. + * gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo): + New variables. (malloc_initialize_1) [CYGWIN]: Prepare for reinitializing the dumped emacs. (_free_internal_nolock) [CYGWIN]: Ignore requests to free storage @@ -172,8 +176,8 @@ * xdisp.c (iterate_out_of_display_property): xassert that IT->position is set to within IT->object's boundaries. Break from the loop as soon as EOB is reached; avoids infloops in redisplay - when IT->position is set up wrongly due to some bug. Set - IT->current to match the bidi iterator unconditionally. + when IT->position is set up wrongly due to some bug. + Set IT->current to match the bidi iterator unconditionally. (push_display_prop): Allow GET_FROM_STRING as IT->method on entry. Force push_it to save on the stack the current buffer/string position, to be restored by pop_it. Fix flags in @@ -196,8 +200,8 @@ 2011-08-08 Eli Zaretskii * xdisp.c (forward_to_next_line_start): Allow to use the - no-display-properties-and-no-overlays under bidi display. Set - disp_pos in the bidi iterator to avoid searches for display + no-display-properties-and-no-overlays under bidi display. + Set disp_pos in the bidi iterator to avoid searches for display properties and overlays. 2011-08-08 Chong Yidong @@ -235,7 +239,7 @@ * bidi.c : Now static. (bidi_initialize): Initialize bidi_cache_total_alloc. - *xdisp.c (display_line): Release buffer allocated for shelved bidi + * xdisp.c (display_line): Release buffer allocated for shelved bidi cache. (Bug#9221) * bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total diff --git a/src/cmds.c b/src/cmds.c index f49cfc221be..c079ad7168f 100644 --- a/src/cmds.c +++ b/src/cmds.c @@ -271,7 +271,8 @@ Whichever character you type to run this command is inserted. Before insertion, `expand-abbrev' is executed if the inserted character does not have word syntax and the previous character in the buffer does. After insertion, the value of `auto-fill-function' is called if the -`auto-fill-chars' table has a non-nil value for the inserted character. */) +`auto-fill-chars' table has a non-nil value for the inserted character. +At the end, it runs `post-self-insert-hook'. */) (Lisp_Object n) { int remove_boundary = 1; -- cgit v1.2.1 From b3fd59bd988b168ab996bb6368af8bda2bec29b5 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 23 Aug 2011 01:21:09 -0400 Subject: * lisp/pcomplete.el (pcomplete-parse-comint-arguments): Fix inf-loop. Mark obsolete. * lisp/shell.el (shell-parse-pcomplete-arguments): New function. (shell-completion-vars): Use it instead. Fixes: debbugs:9160 --- lisp/ChangeLog | 15 +++++++++++---- lisp/pcomplete.el | 16 ++++++++++------ lisp/shell.el | 18 ++++++++++++++++-- 3 files changed, 37 insertions(+), 12 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 82d67fe476d..e0322ae4595 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2011-08-23 Stefan Monnier + + * pcomplete.el (pcomplete-parse-comint-arguments): Fix inf-loop. + Mark obsolete. + * shell.el (shell-parse-pcomplete-arguments): New function. + (shell-completion-vars): Use it instead (bug#9160). + 2011-08-22 Stefan Monnier * progmodes/sh-script.el (sh-maybe-here-document): Disable magic in @@ -54,8 +61,8 @@ (font-lock-default-fontify-region) (font-lock-default-unfontify-region): Add docstrings (Bug#8624). - * progmodes/compile.el (compilation-error-properties): Fix - confusion between file struct and message struct (Bug#9319). + * progmodes/compile.el (compilation-error-properties): + Fix confusion between file struct and message struct (Bug#9319). (compilation-error-regexp-alist-alist): Fix 2011-05-09 change to `ant' regexp. @@ -149,8 +156,8 @@ binding variables (bug#9298). Also clean up some unused autoloads. - * net/network-stream.el (network-stream-open-starttls): Support - using starttls.el without using gnutls-cli. + * net/network-stream.el (network-stream-open-starttls): + Support using starttls.el without using gnutls-cli. 2011-08-17 Juri Linkov diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el index 46a82e3720d..02f3c4ad1da 100644 --- a/lisp/pcomplete.el +++ b/lisp/pcomplete.el @@ -811,15 +811,19 @@ this is `comint-dynamic-complete-functions'." (while (< (point) end) (skip-chars-forward " \t\n") (push (point) begins) - (let ((skip t)) - (while skip - (skip-chars-forward "^ \t\n") - (if (eq (char-before) ?\\) - (skip-chars-forward " \t\n") - (setq skip nil)))) + (while + (progn + (skip-chars-forward "^ \t\n\\") + (when (eq (char-after) ?\\) + (forward-char 1) + (unless (eolp) + (forward-char 1) + t)))) (push (buffer-substring-no-properties (car begins) (point)) args)) (cons (nreverse args) (nreverse begins))))) +(make-obsolete 'pcomplete-parse-comint-arguments + 'comint-parse-pcomplete-arguments "24.1") (defun pcomplete-parse-arguments (&optional expand-p) "Parse the command line arguments. Most completions need this info." diff --git a/lisp/shell.el b/lisp/shell.el index de811543ba0..53472d9ef0a 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -383,6 +383,21 @@ to `dirtrack-mode'." :group 'shell :type '(choice (const nil) regexp)) +(defun shell-parse-pcomplete-arguments () + "Parse whitespace separated arguments in the current region." + (let ((begin (save-excursion (shell-backward-command 1) (point))) + (end (point)) + begins args) + (save-excursion + (goto-char begin) + (while (< (point) end) + (skip-chars-forward " \t\n") + (push (point) begins) + (looking-at "\\(?:[^\s\t\n\\]\\|'[^']*'\\|\"\\(?:[^\"\\]\\|\\\\.\\)*\"\\|\\\\.\\)*\\(?:\\\\\\|'[^']*\\|\"\\(?:[^\"\\]\\|\\\\.\\)*\\)?") + (goto-char (match-end 0)) + (push (buffer-substring-no-properties (car begins) (point)) + args)) + (cons (nreverse args) (nreverse begins))))) (defun shell-completion-vars () "Setup completion vars for `shell-mode' and `read-shell-command'." @@ -396,8 +411,7 @@ to `dirtrack-mode'." (set (make-local-variable 'comint-dynamic-complete-functions) shell-dynamic-complete-functions) (set (make-local-variable 'pcomplete-parse-arguments-function) - ;; FIXME: This function should be moved to shell.el. - #'pcomplete-parse-comint-arguments) + #'shell-parse-pcomplete-arguments) (set (make-local-variable 'pcomplete-termination-string) (cond ((not comint-completion-addsuffix) "") ((stringp comint-completion-addsuffix) -- cgit v1.2.1 From 1802e44433f0a36f3a3f877654cb2c2a666893e7 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 23 Aug 2011 01:25:17 -0400 Subject: * lisp/shell.el (shell-completion-vars): Set pcomplete-arg-quote-list. * lisp/pcomplete.el (pcomplete-quote-argument): Fix thinko. Fixes: debbugs:9161 --- lisp/ChangeLog | 3 +++ lisp/pcomplete.el | 2 +- lisp/shell.el | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e0322ae4595..61ef1a21065 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2011-08-23 Stefan Monnier + * shell.el (shell-completion-vars): Set pcomplete-arg-quote-list. + * pcomplete.el (pcomplete-quote-argument): Fix thinko (bug#9161). + * pcomplete.el (pcomplete-parse-comint-arguments): Fix inf-loop. Mark obsolete. * shell.el (shell-parse-pcomplete-arguments): New function. diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el index 02f3c4ad1da..bdf2dadd16c 100644 --- a/lisp/pcomplete.el +++ b/lisp/pcomplete.el @@ -883,7 +883,7 @@ Magic characters are those in `pcomplete-arg-quote-list'." (or (run-hook-with-args-until-success 'pcomplete-quote-arg-hook filename index) (when (memq c pcomplete-arg-quote-list) - (string "\\" c)) + (string ?\\ c)) (char-to-string c)) (setq index (1+ index)))) filename diff --git a/lisp/shell.el b/lisp/shell.el index 53472d9ef0a..01d1a688f0e 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -412,6 +412,8 @@ to `dirtrack-mode'." shell-dynamic-complete-functions) (set (make-local-variable 'pcomplete-parse-arguments-function) #'shell-parse-pcomplete-arguments) + (set (make-local-variable 'pcomplete-arg-quote-list) + (append "\\ \t\n\r\"'`$|&;(){}[]<>#" nil)) (set (make-local-variable 'pcomplete-termination-string) (cond ((not comint-completion-addsuffix) "") ((stringp comint-completion-addsuffix) -- cgit v1.2.1 From 1a2e6670cf53a76bfd134c8453f81a2de8c6ea5c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 23 Aug 2011 10:01:25 +0300 Subject: Fix pos-visible-in-window-p for zero-column composed character. src/xdisp.c (x_produce_glyphs): Set it->nglyphs to 1. Fixes pixel coordinates reported by pos-visible-in-window-p for a composed character in column zero. --- src/ChangeLog | 6 ++++++ src/xdisp.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index a1a826d625f..ffb8dd76366 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-08-23 Eli Zaretskii + + * xdisp.c (x_produce_glyphs): Set it->nglyphs to 1. Fixes pixel + coordinates reported by pos-visible-in-window-p for a composed + character in column zero. + 2011-08-23 Stefan Monnier * cmds.c (Fself_insert_command): Mention post-self-insert-hook. diff --git a/src/xdisp.c b/src/xdisp.c index 1878327480f..9b2b0da4317 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -24064,6 +24064,8 @@ x_produce_glyphs (struct it *it) Lisp_Object gstring; struct font_metrics metrics; + it->nglyphs = 1; + gstring = composition_gstring_from_id (it->cmp_it.id); it->pixel_width = composition_gstring_width (gstring, it->cmp_it.from, it->cmp_it.to, -- cgit v1.2.1 From 425cc014ac9191debe8c01dc360685486bba0ff1 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 23 Aug 2011 11:38:29 +0300 Subject: Fix crashes with completion and composed characters. src/dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos instead of CHAR_TO_BYTE. Fixes a crash when a completion candidate is selected by the mouse, and that candidate has a composed character under the mouse. --- src/ChangeLog | 5 +++++ src/dispnew.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index ffb8dd76366..d4f654a1028 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2011-08-23 Eli Zaretskii + * dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos + instead of CHAR_TO_BYTE. Fixes a crash when a completion + candidate is selected by the mouse, and that candidate has a + composed character under the mouse. + * xdisp.c (x_produce_glyphs): Set it->nglyphs to 1. Fixes pixel coordinates reported by pos-visible-in-window-p for a composed character in column zero. diff --git a/src/dispnew.c b/src/dispnew.c index fadfbb26603..e2bcf5d7090 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -5307,7 +5307,8 @@ buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *p if (STRINGP (it.string)) BYTEPOS (pos->pos) = string_char_to_byte (string, CHARPOS (pos->pos)); else - BYTEPOS (pos->pos) = CHAR_TO_BYTE (CHARPOS (pos->pos)); + BYTEPOS (pos->pos) = buf_charpos_to_bytepos (XBUFFER (w->buffer), + CHARPOS (pos->pos)); } #ifdef HAVE_WINDOW_SYSTEM -- cgit v1.2.1 From 3bbf23bc315e8cf47c459148dad86adeb3e38242 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Tue, 23 Aug 2011 11:31:54 +0200 Subject: Fix message in help-window-setup (Bug#9341). * help.el (help-window-setup): Fix message displayed when other window is reused. (Bug#9341) --- lisp/ChangeLog | 5 +++++ lisp/help.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 61ef1a21065..2973fa64360 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-08-23 Martin Rudalics + + * help.el (help-window-setup): Fix message displayed when other + window is reused. (Bug#9341) + 2011-08-23 Stefan Monnier * shell.el (shell-completion-vars): Set pcomplete-arg-quote-list. diff --git a/lisp/help.el b/lisp/help.el index e6496f625d1..710dc34ea89 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -1104,7 +1104,7 @@ This relies on `display-buffer-window' being correctly set up by ((eq help-value 'new-window) "Type \\[delete-other-windows] to delete the help window") ((eq help-value 'reuse-other-window) - "Type \\[switch-to-prev-buffer] RET to restore previous buffer")) + "Type \"q\" in other window to quit")) help-window 'other)) (t ;; Not much to say here. -- cgit v1.2.1 From 8ddde6516c5bd15ea8af79800779a28c8742c488 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 23 Aug 2011 13:35:47 +0300 Subject: Fix bug #8874 with recentering and header line under scroll-conservatively. src/xdisp.c (redisplay_window): When computing centering_position, account for the height of the header line. --- src/ChangeLog | 3 +++ src/xdisp.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index d4f654a1028..1b1a8f67e43 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-08-23 Eli Zaretskii + * xdisp.c (redisplay_window): When computing centering_position, + account for the height of the header line. (Bug#8874) + * dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos instead of CHAR_TO_BYTE. Fixes a crash when a completion candidate is selected by the mouse, and that candidate has a diff --git a/src/xdisp.c b/src/xdisp.c index 9b2b0da4317..6a11628f858 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -15244,7 +15244,8 @@ redisplay_window (Lisp_Object window, int just_this_one_p) if (pt_offset) centering_position -= pt_offset; centering_position -= - FRAME_LINE_HEIGHT (f) * (1 + margin + (last_line_misfit != 0)); + FRAME_LINE_HEIGHT (f) * (1 + margin + (last_line_misfit != 0)) + + WINDOW_HEADER_LINE_HEIGHT (w); /* Don't let point enter the scroll margin near top of the window. */ if (centering_position < margin * FRAME_LINE_HEIGHT (f)) -- cgit v1.2.1 From 0902a04edd7a2e0ca5d73fd996e46f26d5228501 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Tue, 23 Aug 2011 20:48:07 +0900 Subject: Fix default values of character properties. --- admin/ChangeLog | 14 +++++ admin/unidata/unidata-gen.el | 103 +++++++++++++++++++++++--------- lisp/ChangeLog | 18 ++++++ lisp/international/charprop.el | 26 +++++--- lisp/international/uni-bidi.el | Bin 8719 -> 7981 bytes lisp/international/uni-category.el | Bin 11396 -> 12759 bytes lisp/international/uni-combining.el | Bin 8369 -> 6251 bytes lisp/international/uni-comment.el | Bin 2386 -> 2407 bytes lisp/international/uni-decimal.el | Bin 1869 -> 2710 bytes lisp/international/uni-decomposition.el | Bin 28459 -> 28497 bytes lisp/international/uni-digit.el | Bin 2187 -> 3028 bytes lisp/international/uni-lowercase.el | Bin 5347 -> 6421 bytes lisp/international/uni-mirrored.el | Bin 10452 -> 9342 bytes lisp/international/uni-name.el | Bin 158765 -> 158786 bytes lisp/international/uni-numeric.el | Bin 3688 -> 4522 bytes lisp/international/uni-old-name.el | Bin 19692 -> 19713 bytes lisp/international/uni-titlecase.el | Bin 5434 -> 6462 bytes lisp/international/uni-uppercase.el | Bin 5430 -> 6458 bytes src/ChangeLog | 5 ++ src/chartab.c | 2 - 20 files changed, 129 insertions(+), 39 deletions(-) diff --git a/admin/ChangeLog b/admin/ChangeLog index bc38edfc8d4..f8eb071d96d 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog @@ -1,3 +1,17 @@ +2011-08-23 Kenichi Handa + + * unidata/unidata-gen.el (unidata-prop-alist): Provide default + values for name, general-category, canonical-combining-class, + mirrored, and bidi-class. Describe the meaning of value nil for + decimal-digit-value, digit-value, numeric-value, uppercase, + lowercase, titlecase, and mirroring. + (unidata-gen-table): Handle the case that default-value is a + list. Set default values of characters not listed in a table. + (unidata-get-name): Return an empty string if a value in a + char-table is nil. + (unidata-get-decomposition): Return a list of character itself if + a value in a char-table is nil. + 2011-08-15 Eli Zaretskii * unidata/bidimirror.awk: File removed. diff --git a/admin/unidata/unidata-gen.el b/admin/unidata/unidata-gen.el index ab1dcd134ac..03399eae213 100644 --- a/admin/unidata/unidata-gen.el +++ b/admin/unidata/unidata-gen.el @@ -146,7 +146,7 @@ (setq unidata-list (cdr table)))) ;; Alist of this form: -;; (PROP INDEX GENERATOR FILENAME DOCSTRING DESCRIBER VAL-LIST) +;; (PROP INDEX GENERATOR FILENAME DOCSTRING DESCRIBER DEFAULT VAL-LIST) ;; PROP: character property ;; INDEX: index to each element of unidata-list for PROP. ;; It may be a function that generates an alist of character codes @@ -155,14 +155,20 @@ ;; FILENAME: filename to store the char-table ;; DOCSTRING: docstring for the property ;; DESCRIBER: function to call to get a description string of property value -;; DEFAULT: the default value of the property +;; DEFAULT: the default value of the property. It may have the form +;; (VAL0 (FROM1 TO1 VAL1) ...) which indicates that the default +;; value is VAL0 except for characters in the ranges specified by +;; FROMn and TOn (incusive). The default value of characters +;; between FROMn and TOn is VALn. ;; VAL-LIST: list of specially ordered property values (defconst unidata-prop-alist '((name 1 unidata-gen-table-name "uni-name.el" "Unicode character name. -Property value is a string.") +Property value is a string." + nil + "") (general-category 2 unidata-gen-table-symbol "uni-category.el" "Unicode general category. @@ -170,7 +176,7 @@ Property value is one of the following symbols: Lu, Ll, Lt, Lm, Lo, Mn, Mc, Me, Nd, Nl, No, Pc, Pd, Ps, Pe, Pi, Pf, Po, Sm, Sc, Sk, So, Zs, Zl, Zp, Cc, Cf, Cs, Co, Cn" unidata-describe-general-category - nil + Cn ;; The order of elements must be in sync with unicode_category_t ;; in src/character.h. (Lu Ll Lt Lm Lo Mn Mc Me Nd Nl No Pc Pd Ps Pe Pi Pf Po @@ -179,7 +185,8 @@ Property value is one of the following symbols: 3 unidata-gen-table-integer "uni-combining.el" "Unicode canonical combining class. Property value is an integer." - unidata-describe-canonical-combining-class) + unidata-describe-canonical-combining-class + 0) (bidi-class 4 unidata-gen-table-symbol "uni-bidi.el" "Unicode bidi class. @@ -187,7 +194,8 @@ Property value is one of the following symbols: L, LRE, LRO, R, AL, RLE, RLO, PDF, EN, ES, ET, AN, CS, NSM, BN, B, S, WS, ON" unidata-describe-bidi-class - L + (L (#x0600 #x06FF AL) (#x0590 #x05FF R) (#x07C0 #x08FF R) + (#xFB1D #xFB4F R) (#x10800 #x10FFF R) (#x1E800 #x1EFFF R)) ;; The order of elements must be in sync with bidi_type_t in ;; src/dispextern.h. (L R EN AN BN B AL LRE LRO RLE RLO PDF ES ET CS NSM S WS ON)) @@ -202,19 +210,24 @@ one of these symbols representing compatibility formatting tag: (decimal-digit-value 6 unidata-gen-table-integer "uni-decimal.el" "Unicode numeric value (decimal digit). -Property value is an integer.") +Property value is an integer 0..9, or nil. +The value nil stands for NaN \"Numeric_Value\".") (digit-value 7 unidata-gen-table-integer "uni-digit.el" "Unicode numeric value (digit). -Property value is an integer.") +Property value is an integer 0..9, or nil. +The value nil stands for NaN \"Numeric_Value\".") (numeric-value 8 unidata-gen-table-numeric "uni-numeric.el" "Unicode numeric value (numeric). -Property value is an integer or a floating point.") +Property value is an integer, a floating point, or nil. +The value nil stands for NaN \"Numeric_Value\".") (mirrored 9 unidata-gen-table-symbol "uni-mirrored.el" "Unicode bidi mirrored flag. -Property value is a symbol `Y' or `N'. See also the property `mirroring'.") +Property value is a symbol `Y' or `N'. See also the property `mirroring'." + nil + N) (old-name 10 unidata-gen-table-name "uni-old-name.el" "Unicode old names as published in Unicode 1.0. @@ -226,23 +239,30 @@ Property value is a string.") (uppercase 12 unidata-gen-table-character "uni-uppercase.el" "Unicode simple uppercase mapping. -Property value is a character." +Property value is a character or nil. +The value nil means that the actual property value of a character +is the character itself." string) (lowercase 13 unidata-gen-table-character "uni-lowercase.el" "Unicode simple lowercase mapping. -Property value is a character." +Property value is a character or nil. +The value nil means that the actual property value of a character +is the character itself." string) (titlecase 14 unidata-gen-table-character "uni-titlecase.el" "Unicode simple titlecase mapping. -Property value is a character." +Property value is a character or nil. +The value nil means that the actual property value of a character +is the character itself." string) (mirroring unidata-gen-mirroring-list unidata-gen-table-character "uni-mirrored.el" "Unicode bidi-mirroring characters. -Property value is a character that has the corresponding mirroring image, -or nil for non-mirrored character."))) +Property value is a character that has the corresponding mirroring image or nil. +The value nil means that the actual property value of a character +is the character itself."))) ;; Functions to access the above data. (defsubst unidata-prop-index (prop) (nth 1 (assq prop unidata-prop-alist))) @@ -393,9 +413,18 @@ or nil for non-mirrored character."))) (while tail (setcar tail (cons (car tail) val-code)) (setq tail (cdr tail) val-code (1+ val-code))) - (setq default-value (unidata-encode-val val-list default-value)) - (set-char-table-range table t default-value) - (set-char-table-range table nil default-value) + (if (consp default-value) + (setq default-value (copy-sequence default-value)) + (setq default-value (list default-value))) + (setcar default-value + (unidata-encode-val val-list (car default-value))) + (set-char-table-range table t (car default-value)) + (set-char-table-range table nil (car default-value)) + (dolist (elm (cdr default-value)) + (setcar (nthcdr 2 elm) + (unidata-encode-val val-list (nth 2 elm))) + (set-char-table-range table (cons (car elm) (nth 1 elm)) (nth 2 elm))) + (setq tail unidata-list) (while tail (setq elt (car tail) tail (cdr tail)) @@ -419,17 +448,27 @@ or nil for non-mirrored character."))) (setq prev-range-data (cons (cons from to) val-code))))) (let* ((start (lsh (lsh range -7) 7)) (limit (+ start 127)) - str count new-val) - (fillarray vec 0) - ;; See the comment above. - (when (and prev-range-data - (>= (cdr (car prev-range-data)) start)) - (let ((from (car (car prev-range-data))) - (to (cdr (car prev-range-data))) - (vcode (cdr prev-range-data))) + str count new-val from to vcode) + (fillarray vec (car default-value)) + (dolist (elm (cdr default-value)) + (setq from (car elm) to (nth 1 elm)) + (when (and (<= from limit) + (or (>= from start) (>= to start))) + (setq from (max from start) + to (min to limit) + vcode (nth 2 elm)) (while (<= from to) (aset vec (- from start) vcode) (setq from (1+ from))))) + ;; See the comment above. + (when (and prev-range-data + (>= (cdr (car prev-range-data)) start)) + (setq from (car (car prev-range-data)) + to (cdr (car prev-range-data)) + vcode (cdr prev-range-data)) + (while (<= from to) + (aset vec (- from start) vcode) + (setq from (1+ from)))) (setq prev-range-data nil) (if val-code (aset vec (- range start) val-code)) @@ -669,7 +708,7 @@ or nil for non-mirrored character."))) (aset table c name) (if (= c char) (setq val name)))) - val))) + (or val "")))) ((and (integerp val) (> val 0)) (let* ((symbol-table (aref (char-table-extra-slot table 4) 1)) @@ -695,7 +734,9 @@ or nil for non-mirrored character."))) ((eq sym 'CJK\ COMPATIBILITY\ IDEOGRAPH) (format "%s-%04X" sym char)) ((eq sym 'VARIATION\ SELECTOR) - (format "%s-%d" sym (+ (- char #xe0100) 17)))))))) + (format "%s-%d" sym (+ (- char #xe0100) 17)))))) + + (t ""))) ;; Store VAL as the name of CHAR in TABLE. @@ -707,6 +748,9 @@ or nil for non-mirrored character."))) (defun unidata-get-decomposition (char val table) (cond + ((not val) + (list char)) + ((consp val) val) @@ -747,7 +791,8 @@ or nil for non-mirrored character."))) (aset vec idx (nconc word-list tail-list))) (dotimes (i 128) (aset table (+ first-char i) (aref vec i))) - (aref vec (- char first-char))))) + (setq val (aref vec (- char first-char))) + (or val (list char))))) ;; Hangul syllable ((and (eq val 0) (>= char #xAC00) (<= char #xD7A3)) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 38c536af62c..37fc5eb1a28 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,21 @@ +2011-08-23 Kenichi Handa + + * international/charprop.el: + * international/uni-bidi.el: + * international/uni-category.el: + * international/uni-combining.el: + * international/uni-comment.el: + * international/uni-decimal.el: + * international/uni-decomposition.el: + * international/uni-digit.el: + * international/uni-lowercase.el: + * international/uni-mirrored.el: + * international/uni-name.el: + * international/uni-numeric.el: + * international/uni-old-name.el: + * international/uni-titlecase.el: + * international/uni-uppercase.el: Regenerate. + 2011-08-18 Chong Yidong * international/characters.el: Add L and R categories. diff --git a/lisp/international/charprop.el b/lisp/international/charprop.el index 919666010b1..2424e87ae44 100644 --- a/lisp/international/charprop.el +++ b/lisp/international/charprop.el @@ -29,15 +29,18 @@ one of these symbols representing compatibility formatting tag: ;; FILE: uni-decimal.el (define-char-code-property 'decimal-digit-value "uni-decimal.el" "Unicode numeric value (decimal digit). -Property value is an integer.") +Property value is an integer 0..9, or nil. +The value nil stands for NaN \"Numeric_Value\".") ;; FILE: uni-digit.el (define-char-code-property 'digit-value "uni-digit.el" "Unicode numeric value (digit). -Property value is an integer.") +Property value is an integer 0..9, or nil. +The value nil stands for NaN \"Numeric_Value\".") ;; FILE: uni-numeric.el (define-char-code-property 'numeric-value "uni-numeric.el" "Unicode numeric value (numeric). -Property value is an integer or a floating point.") +Property value is an integer, a floating point, or nil. +The value nil stands for NaN \"Numeric_Value\".") ;; FILE: uni-mirrored.el (define-char-code-property 'mirrored "uni-mirrored.el" "Unicode bidi mirrored flag. @@ -53,20 +56,27 @@ Property value is a string.") ;; FILE: uni-uppercase.el (define-char-code-property 'uppercase "uni-uppercase.el" "Unicode simple uppercase mapping. -Property value is a character.") +Property value is a character or nil. +The value nil means that the actual property value of a character +is the character itself.") ;; FILE: uni-lowercase.el (define-char-code-property 'lowercase "uni-lowercase.el" "Unicode simple lowercase mapping. -Property value is a character.") +Property value is a character or nil. +The value nil means that the actual property value of a character +is the character itself.") ;; FILE: uni-titlecase.el (define-char-code-property 'titlecase "uni-titlecase.el" "Unicode simple titlecase mapping. -Property value is a character.") +Property value is a character or nil. +The value nil means that the actual property value of a character +is the character itself.") ;; FILE: uni-mirrored.el (define-char-code-property 'mirroring "uni-mirrored.el" "Unicode bidi-mirroring characters. -Property value is a character that has the corresponding mirroring image, -or nil for non-mirrored character.") +Property value is a character that has the corresponding mirroring image or nil. +The value nil means that the actual property value of a character +is the character itself.") ;; Local Variables: ;; coding: utf-8 ;; no-byte-compile: t diff --git a/lisp/international/uni-bidi.el b/lisp/international/uni-bidi.el index e7682c6d8ff..9fa7b53b508 100644 Binary files a/lisp/international/uni-bidi.el and b/lisp/international/uni-bidi.el differ diff --git a/lisp/international/uni-category.el b/lisp/international/uni-category.el index a4455decc52..94b7c18b6e2 100644 Binary files a/lisp/international/uni-category.el and b/lisp/international/uni-category.el differ diff --git a/lisp/international/uni-combining.el b/lisp/international/uni-combining.el index 227b9d0af79..1437ff9acbd 100644 Binary files a/lisp/international/uni-combining.el and b/lisp/international/uni-combining.el differ diff --git a/lisp/international/uni-comment.el b/lisp/international/uni-comment.el index c9743064bd4..21ccfe3ffe7 100644 Binary files a/lisp/international/uni-comment.el and b/lisp/international/uni-comment.el differ diff --git a/lisp/international/uni-decimal.el b/lisp/international/uni-decimal.el index 2c424ffb5de..096257add20 100644 Binary files a/lisp/international/uni-decimal.el and b/lisp/international/uni-decimal.el differ diff --git a/lisp/international/uni-decomposition.el b/lisp/international/uni-decomposition.el index b0bf07bbe85..b9660cdab0a 100644 Binary files a/lisp/international/uni-decomposition.el and b/lisp/international/uni-decomposition.el differ diff --git a/lisp/international/uni-digit.el b/lisp/international/uni-digit.el index fc52fd8c28c..efb78b0e43d 100644 Binary files a/lisp/international/uni-digit.el and b/lisp/international/uni-digit.el differ diff --git a/lisp/international/uni-lowercase.el b/lisp/international/uni-lowercase.el index 41890018204..7afd9503cb3 100644 Binary files a/lisp/international/uni-lowercase.el and b/lisp/international/uni-lowercase.el differ diff --git a/lisp/international/uni-mirrored.el b/lisp/international/uni-mirrored.el index 006cf575591..e650166c24c 100644 Binary files a/lisp/international/uni-mirrored.el and b/lisp/international/uni-mirrored.el differ diff --git a/lisp/international/uni-name.el b/lisp/international/uni-name.el index 7fac18b278d..8b681631067 100644 Binary files a/lisp/international/uni-name.el and b/lisp/international/uni-name.el differ diff --git a/lisp/international/uni-numeric.el b/lisp/international/uni-numeric.el index d16e8c00870..a1865f1fb23 100644 Binary files a/lisp/international/uni-numeric.el and b/lisp/international/uni-numeric.el differ diff --git a/lisp/international/uni-old-name.el b/lisp/international/uni-old-name.el index 4e704e5cdd0..de2d67b9450 100644 Binary files a/lisp/international/uni-old-name.el and b/lisp/international/uni-old-name.el differ diff --git a/lisp/international/uni-titlecase.el b/lisp/international/uni-titlecase.el index b8098c81876..517edb20445 100644 Binary files a/lisp/international/uni-titlecase.el and b/lisp/international/uni-titlecase.el differ diff --git a/lisp/international/uni-uppercase.el b/lisp/international/uni-uppercase.el index 899276eb725..fcb22d72470 100644 Binary files a/lisp/international/uni-uppercase.el and b/lisp/international/uni-uppercase.el differ diff --git a/src/ChangeLog b/src/ChangeLog index 85a55b2b7c9..5b4e0023ac6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-08-22 Kenichi Handa + + * chartab.c (Fset_char_table_extra_slot): Do not inhibit setting a + extra slot even if the purpose is char-code-property-table. + 2011-08-19 Eli Zaretskii * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of diff --git a/src/chartab.c b/src/chartab.c index 0cabaac4cf5..1d4ac04312a 100644 --- a/src/chartab.c +++ b/src/chartab.c @@ -589,8 +589,6 @@ DEFUN ("set-char-table-extra-slot", Fset_char_table_extra_slot, (Lisp_Object char_table, Lisp_Object n, Lisp_Object value) { CHECK_CHAR_TABLE (char_table); - if (EQ (XCHAR_TABLE (char_table)->purpose, Qchar_code_property_table)) - error ("Can't change extra-slot of char-code-property-table"); CHECK_NUMBER (n); if (XINT (n) < 0 || XINT (n) >= CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (char_table))) -- cgit v1.2.1 From 4a5885a74a3310ed4f4ba86eee3c406019b2c334 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 23 Aug 2011 10:41:07 -0400 Subject: * src/nsfont.m (ns_otf_to_script): Fix typo. --- src/ChangeLog | 4 ++++ src/nsfont.m | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index a3c7c2f09d2..e7d426f23fb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-08-23 Chong Yidong + + * nsfont.m (ns_otf_to_script): Fix typo. + 2011-08-22 Kenichi Handa * chartab.c (Fset_char_table_extra_slot): Do not inhibit setting a diff --git a/src/nsfont.m b/src/nsfont.m index 60f8c5321aa..c4d9123faef 100644 --- a/src/nsfont.m +++ b/src/nsfont.m @@ -303,7 +303,7 @@ static NSString { Lisp_Object script = assq_no_quit (XCAR (otf), Votf_script_alist); return CONSP (script) - ? [NSString stringWithUTF8String: SDATA (SYMBOL_NAME XCDR ((script)))] + ? [NSString stringWithUTF8String: SDATA (SYMBOL_NAME (XCDR ((script))))] : @""; } -- cgit v1.2.1 From bca633fb296b17c0e86d589c50fb3414b361e0b3 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 23 Aug 2011 17:45:14 +0300 Subject: Followup for character properties in 2011-08-23T11:48:07Z!handa@m17n.org. src/bidi.c (bidi_get_type): Abort if we get zero as the bidi type of a character. admin/unidata/unidata-gen.el (unidata-prop-alist): Update the default values of bidi-class according to DerivedBidiClass.txt from the latest UCD. lisp/international/uni-bidi.el: Regenerated. doc/lispref/nonascii.texi (Character Properties): Document the values for unassigned codepoints. --- admin/ChangeLog | 6 +++++ admin/unidata/unidata-gen.el | 6 ++++- doc/lispref/ChangeLog | 5 ++++ doc/lispref/nonascii.texi | 53 ++++++++++++++++++++++++++++++------------ lisp/ChangeLog | 4 ++++ lisp/international/uni-bidi.el | 2 +- src/ChangeLog | 5 ++++ src/bidi.c | 8 +++++-- 8 files changed, 70 insertions(+), 19 deletions(-) diff --git a/admin/ChangeLog b/admin/ChangeLog index f8eb071d96d..17cbcbb3bdf 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog @@ -1,3 +1,9 @@ +2011-08-23 Eli Zaretskii + + * unidata/unidata-gen.el (unidata-prop-alist): Update the default + values of bidi-class according to DerivedBidiClass.txt from the + latest UCD. + 2011-08-23 Kenichi Handa * unidata/unidata-gen.el (unidata-prop-alist): Provide default diff --git a/admin/unidata/unidata-gen.el b/admin/unidata/unidata-gen.el index 03399eae213..1002bb003af 100644 --- a/admin/unidata/unidata-gen.el +++ b/admin/unidata/unidata-gen.el @@ -194,7 +194,11 @@ Property value is one of the following symbols: L, LRE, LRO, R, AL, RLE, RLO, PDF, EN, ES, ET, AN, CS, NSM, BN, B, S, WS, ON" unidata-describe-bidi-class - (L (#x0600 #x06FF AL) (#x0590 #x05FF R) (#x07C0 #x08FF R) + ;; The assignment of default values to blocks of code points + ;; follows the file DerivedBidiClass.txt from the Unicode + ;; Character Database (UCD). + (L (#x0600 #x06FF AL) (#xFB50 #xFDFF AL) (#xFE70 #xFEFF AL) + (#x0590 #x05FF R) (#x07C0 #x08FF R) (#xFB1D #xFB4F R) (#x10800 #x10FFF R) (#x1E800 #x1EFFF R)) ;; The order of elements must be in sync with bidi_type_t in ;; src/dispextern.h. diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 4cb4d0a6f50..43add469ec0 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,8 @@ +2011-08-23 Eli Zaretskii + + * nonascii.texi (Character Properties): Document the values for + unassigned codepoints. + 2011-08-18 Eli Zaretskii * nonascii.texi (Character Properties): Document use of diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index 7b6d665b2ac..298c7c3d1a8 100644 --- a/doc/lispref/nonascii.texi +++ b/doc/lispref/nonascii.texi @@ -369,6 +369,12 @@ replacing each @samp{_} character with a dash @samp{-}. For example, @code{canonical-combining-class}. However, sometimes we shorten the names to make their use easier. +@cindex unassigned character codepoints + Some codepoints are left @dfn{unassigned} by the +@acronym{UCD}---they don't correspond to any character. The Unicode +Standard defines default values of properties for such codepoints; +they are mentioned below for each property. + Here is the full list of value types for all the character properties that Emacs knows about: @@ -376,24 +382,31 @@ properties that Emacs knows about: @item name Corresponds to the @code{Name} Unicode property. The value is a string consisting of upper-case Latin letters A to Z, digits, spaces, -and hyphen @samp{-} characters. +and hyphen @samp{-} characters. For unassigned codepoints, the value +is an empty string. @cindex unicode general category @item general-category Corresponds to the @code{General_Category} Unicode property. The value is a symbol whose name is a 2-letter abbreviation of the -character's classification. +character's classification. For unassigned codepoints, the value +is @code{Cn}. @item canonical-combining-class Corresponds to the @code{Canonical_Combining_Class} Unicode property. -The value is an integer number. +The value is an integer number. For unassigned codepoints, the value +is zero. @cindex bidirectional class of characters @item bidi-class Corresponds to the Unicode @code{Bidi_Class} property. The value is a symbol whose name is the Unicode @dfn{directional type} of the character. Emacs uses this property when it reorders bidirectional -text for display (@pxref{Bidirectional Display}). +text for display (@pxref{Bidirectional Display}). For unassigned +codepoints, the value depends on the code blocks to which the +codepoint belongs: most unassigned codepoints get the value of +@code{L} (strong L), but some get values of @code{AL} (Arabic letter) +or @code{R} (strong R). @item decomposition Corresponds to the Unicode @code{Decomposition_Type} and @@ -405,19 +418,22 @@ Note that the Unicode spec writes these tag names inside brackets; e.g., Unicode specifies @samp{} where Emacs uses @samp{small}. }; the other elements are characters that give the compatibility -decomposition sequence of this character. +decomposition sequence of this character. For unassigned codepoints, +the value is the character itself. @item decimal-digit-value Corresponds to the Unicode @code{Numeric_Value} property for characters whose @code{Numeric_Type} is @samp{Digit}. The value is an -integer number. +integer number. For unassigned codepoints, the value is @code{nil}, +which means @acronym{NaN}, or ``not-a-number''. @item digit-value Corresponds to the Unicode @code{Numeric_Value} property for characters whose @code{Numeric_Type} is @samp{Decimal}. The value is an integer number. Examples of such characters include compatibility subscript and superscript digits, for which the value is the -corresponding number. +corresponding number. For unassigned codepoints, the value is +@code{nil}, which means @acronym{NaN}. @item numeric-value Corresponds to the Unicode @code{Numeric_Value} property for @@ -426,12 +442,15 @@ this property is an integer or a floating-point number. Examples of characters that have this property include fractions, subscripts, superscripts, Roman numerals, currency numerators, and encircled numbers. For example, the value of this property for the character -@code{U+2155} (@sc{vulgar fraction one fifth}) is @code{0.2}. +@code{U+2155} (@sc{vulgar fraction one fifth}) is @code{0.2}. For +unassigned codepoints, the value is @code{nil}, which means +@acronym{NaN}. @cindex mirroring of characters @item mirrored Corresponds to the Unicode @code{Bidi_Mirrored} property. The value -of this property is a symbol, either @code{Y} or @code{N}. +of this property is a symbol, either @code{Y} or @code{N}. For +unassigned codepoints, the value is @code{N}. @item mirroring Corresponds to the Unicode @code{Bidi_Mirroring_Glyph} property. The @@ -443,29 +462,33 @@ property; however, some characters whose @code{mirrored} property is @code{Y} also have @code{nil} for @code{mirroring}, because no appropriate characters exist with mirrored glyphs. Emacs uses this property to display mirror images of characters when appropriate -(@pxref{Bidirectional Display}). +(@pxref{Bidirectional Display}). For unassigned codepoints, the value +is @code{nil}. @item old-name Corresponds to the Unicode @code{Unicode_1_Name} property. The value -is a string. +is a string. For unassigned codepoints, the value is an empty string. @item iso-10646-comment Corresponds to the Unicode @code{ISO_Comment} property. The value is -a string. +a string. For unassigned codepoints, the value is an empty string. @item uppercase Corresponds to the Unicode @code{Simple_Uppercase_Mapping} property. -The value of this property is a single character. +The value of this property is a single character. For unassigned +codepoints, the value is @code{nil}, which means the character itself. @item lowercase Corresponds to the Unicode @code{Simple_Lowercase_Mapping} property. -The value of this property is a single character. +The value of this property is a single character. For unassigned +codepoints, the value is @code{nil}, which means the character itself. @item titlecase Corresponds to the Unicode @code{Simple_Titlecase_Mapping} property. @dfn{Title case} is a special form of a character used when the first character of a word needs to be capitalized. The value of this -property is a single character. +property is a single character. For unassigned codepoints, the value +is @code{nil}, which means the character itself. @end table @defun get-char-code-property char propname diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4df4d1445b1..f8f1f98bf93 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-08-23 Eli Zaretskii + + * international/uni-bidi.el: Regenerated. + 2011-08-23 Kenichi Handa * international/charprop.el: diff --git a/lisp/international/uni-bidi.el b/lisp/international/uni-bidi.el index 9fa7b53b508..4d86fc821fa 100644 --- a/lisp/international/uni-bidi.el +++ b/lisp/international/uni-bidi.el @@ -6,7 +6,7 @@ #^^[3 0 5 5 5 5 5 5 5 5 5 17 6 17 18 6 5 5 5 5 5 5 5 5 5 5 5 5 5 5 6 6 6 17 18 19 19 14 14 14 19 19 19 19 19 13 15 13 15 15 3 3 3 3 3 3 3 3 3 3 15 19 19 19 19 19 19 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 19 19 19 19 19 19 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 19 19 19 19 5] #^^[1 0 #^^[2 0 #^^[3 0 5 5 5 5 5 5 5 5 5 17 6 17 18 6 5 5 5 5 5 5 5 5 5 5 5 5 5 5 6 6 6 17 18 19 19 14 14 14 19 19 19 19 19 13 15 13 15 15 3 3 3 3 3 3 3 3 3 3 15 19 19 19 19 19 19 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 19 19 19 19 19 19 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 19 19 19 19 5] "…š„„ƒ…—Ÿˆ" 1 1 1 "¹‡ŽŽ…‰‘" "ð„ˆ" "„î‰" 1 "ƒ‡ö" 1 "Š…­¸" "„‹°•Šƒ" "Ö‡†„Š†" "Žž›³" "¦‹Ž«‰„†" "–„‰ƒ…«ƒ¤" 2 "ƒ·„ˆ„ƒ‡Šœ" "º„„ˆ”Ž‡„" "¹„„ƒƒžƒŠ" "¹„…„”Ž" "º„ˆˆ‹œ" "½Œ¥†…" "¾ƒ…ƒ„‡‹”‡" "¼”œ" "Á„ˆ”œ" "ʇƒ©" "±‡„‡ˆ±" "±†‹†²" "˜›„³Ž" "……‹¤‰¹"] #^^[2 4096 "­„†™„ƒ„‹" "†â" 1 1 1 1 "݃ " "Šæ" "ÿ" 1 1 1 1 "šã" "’ƒƒžŒ" "·‡ˆ‹‡’Š†" "‹ƒñ" "©Ö" " ƒ„‰†ƒ„ƒº" "Þ¢" "—½‡ˆ†Š" 1 "„°……¨‰Œ" " „¼ƒƒŽ" "¬ˆÈ" "Ѓ‡„’" 1 "À§•„" 1 1 1 "½ƒ‹ƒƒƒ"] #^^[2 8192 "‹ƒ˜ …š……†ƒ† ƒ" "Š ƒ‘š–¡" "„Šƒ…†„‹„……„ " "‰†ð" "’ ì" 19 "¶Å…" "•ÞŒ" "§™‹• " "ˆ”Ζ" 19 19 19 "¬Ó" "ÿ" "˲" 1 1 19 19 19 19 "̓Š¦" 1 1 "冄ƒ‡‡" "ÿ" "à " "²Î" "šÙŒ" 19 "ÖšŒ„"] #^^[2 12288 "„ƒ™‰†……ƒÀ" "™ƒÚ„" 1 "À¤œ" "±œƒ" "±Œ„°" "÷„…" "ÞŸ" 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1] #^^[2 16384 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 "ÀÀ" 1 1 1 1] 1 1 1 1 #^^[2 36864 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -#^^[3 40832 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1]] #^^[2 40960 1 1 1 1 1 1 1 1 1 "·¹" 1 1 "ƒß„ˆ" "ðŽ" "¢Þ" "ˆ÷" "ƒ„™„Œº„ˆ" "Ä›’Ž" "¦ˆ™‹®" "ƒ°„Ã" "©†Œˆ³" "°ƒ…¾" 1 "å„’" 1 1 1 1 1 1 1 1] 1 1 #^^[2 53248 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1] 1 #^^[2 61440 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 "Š ¦°" "‘­" 7 7 "¾°" "¶¨" "Š†‡‰ ‰ ƒ„…Š" "ý" "ƒ…  Š†š†š‹š" "àƒ‡Š…"]] #^^[1 65536 #^^[2 65536 1 1 "¾À" "‹…Œá" 1 1 1 1 1 1 1 1 1 1 1 1 2 2 "Ÿà" 2 "ƒ…„¨ƒ„À" 2 "¹‡À" 2 2 2 2 2 "àŸ" 2 2 2] #^^[2 69632 "¶‹”š" "±„Å" 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1] #^^[2 73728 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1] #^^[2 77824 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1] 1 1 #^^[2 90112 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1] 1 1 1 1 #^^[2 110592 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1] 1 #^^[2 118784 1 1 "烉ˆ…" "ƒ‡ž„Ò" "ƒº" 1 "ש" 1 1 1 1 1 1 "Û¤" "•¹°" "‰¹Š²" 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1] #^^[2 122880 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2] #^^[2 126976 "¬„Ð" "”ŒŽ " "‹õ" 1 1 1 "¡†Æƒ" "”Œ¥…•‘" "¿¾" "Œë„ƒ" "¤™’˜˜" "û…" "ƒƒ†„„Œ„‹°" "ƺ" "ôŒ" 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1]] #^^[1 131072 1 1 1 1 1 1 1 1 1 1 #^^[2 172032 1 1 1 1 1 1 1 1 1 1 1 1 1 +#^^[3 40832 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1]] #^^[2 40960 1 1 1 1 1 1 1 1 1 "·¹" 1 1 "ƒß„ˆ" "ðŽ" "¢Þ" "ˆ÷" "ƒ„™„Œº„ˆ" "Ä›’Ž" "¦ˆ™‹®" "ƒ°„Ã" "©†Œˆ³" "°ƒ…¾" 1 "å„’" 1 1 1 1 1 1 1 1] 1 1 #^^[2 53248 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1] 1 #^^[2 61440 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 "Š ¦°" 7 7 7 "¾À" "ý" "Š†‡‰ ‰ ƒ„" "ÿ" "ƒ…  Š†š†š‹š" "àƒ‡Š…"]] #^^[1 65536 #^^[2 65536 1 1 "¾À" "‹…Œá" 1 1 1 1 1 1 1 1 1 1 1 1 2 2 "Ÿà" 2 "ƒ…„¨ƒ„À" 2 "¹‡À" 2 2 2 2 2 "àŸ" 2 2 2] #^^[2 69632 "¶‹”š" "±„Å" 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1] #^^[2 73728 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1] #^^[2 77824 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1] 1 1 #^^[2 90112 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1] 1 1 1 1 #^^[2 110592 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1] 1 #^^[2 118784 1 1 "烉ˆ…" "ƒ‡ž„Ò" "ƒº" 1 "ש" 1 1 1 1 1 1 "Û¤" "•¹°" "‰¹Š²" 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1] #^^[2 122880 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2] #^^[2 126976 "¬„Ð" "”ŒŽ " "‹õ" 1 1 1 "¡†Æƒ" "”Œ¥…•‘" "¿¾" "Œë„ƒ" "¤™’˜˜" "û…" "ƒƒ†„„Œ„‹°" "ƺ" "ôŒ" 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1]] #^^[1 131072 1 1 1 1 1 1 1 1 1 1 #^^[2 172032 1 1 1 1 1 1 1 1 1 1 1 1 1 #^^[3 173696 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1] #^^[2 176128 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #^^[3 177920 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1] 1 #^^[3 178176 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1] 1 1 1 #^^[2 192512 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1]] 1 1 1 1 1 1 1 1 1 1 1 #^^[1 917504 #^^[2 917504 "žà" 1 16 "ð" 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1] #^^[1 983040 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #^^[2 1044480 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 diff --git a/src/ChangeLog b/src/ChangeLog index e7d426f23fb..c629598fcf7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-08-23 Eli Zaretskii + + * bidi.c (bidi_get_type): Abort if we get zero as the bidi type of + a character. + 2011-08-23 Chong Yidong * nsfont.m (ns_otf_to_script): Fix typo. diff --git a/src/bidi.c b/src/bidi.c index 7517eca5aed..00aa31bf48d 100644 --- a/src/bidi.c +++ b/src/bidi.c @@ -108,8 +108,12 @@ bidi_get_type (int ch, bidi_dir_t override) abort (); default_type = (bidi_type_t) XINT (CHAR_TABLE_REF (bidi_type_table, ch)); - if (default_type == 0) - default_type = STRONG_L; + /* Every valid character code, even those that are unassigned by the + UCD, have some bidi-class property, according to + DerivedBidiClass.txt file. Therefore, if we ever get UNKNOWN_BT + (= zero) code from CHAR_TABLE_REF, that's a bug. */ + if (default_type == UNKNOWN_BT) + abort (); if (override == NEUTRAL_DIR) return default_type; -- cgit v1.2.1 From b177498a8afdec14883d10ec19dbb7b1a6b69b9c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 23 Aug 2011 18:21:19 +0300 Subject: cus-start.el: Add entry for bidi-paragraph-direction. --- lisp/ChangeLog | 2 ++ lisp/cus-start.el | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f8f1f98bf93..f4562e18838 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2011-08-23 Eli Zaretskii + * cus-start.el (all): Add entry for bidi-paragraph-direction. + * international/uni-bidi.el: Regenerated. 2011-08-23 Kenichi Handa diff --git a/lisp/cus-start.el b/lisp/cus-start.el index 389716b35b9..7b4f6b2f5ce 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el @@ -118,6 +118,12 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of :standard (not noninteractive) :initialize custom-initialize-delay :set custom-set-minor-mode) + (bidi-paragraph-direction + paragraphs + (choice + (const :tag "Left to Right" left-to-right) + (const :tag "Right to Left" right-to-left) + (const :tag "Dynamic, according to paragraph text" nil))) ;; callint.c (mark-even-if-inactive editing-basics boolean) ;; callproc.c -- cgit v1.2.1 From 904215d227be3e0eba925c1f69468ac96b5c36c4 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 23 Aug 2011 18:53:46 +0300 Subject: cus-start.el: Add :version tag to bidi-paragraph-direction. --- lisp/cus-start.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/cus-start.el b/lisp/cus-start.el index 7b4f6b2f5ce..232c6c3808e 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el @@ -123,7 +123,8 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of (choice (const :tag "Left to Right" left-to-right) (const :tag "Right to Left" right-to-left) - (const :tag "Dynamic, according to paragraph text" nil))) + (const :tag "Dynamic, according to paragraph text" nil)) + "24.1") ;; callint.c (mark-even-if-inactive editing-basics boolean) ;; callproc.c -- cgit v1.2.1 From 93b6b5e15dd860ed4c8928475349fc92a0299b43 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 23 Aug 2011 14:53:51 -0400 Subject: * lisp/emacs-lisp/eieio.el (eieio-defmethod, eieio-defgeneric): Add compatibility functions. Fixes: debbugs:9313 --- lisp/ChangeLog | 5 ++ lisp/emacs-lisp/eieio.el | 116 +++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 113 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f4562e18838..fe3d15f67c3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-08-23 Stefan Monnier + + * emacs-lisp/eieio.el (eieio-defmethod, eieio-defgeneric): + Add compatibility functions (bug#9313). + 2011-08-23 Eli Zaretskii * cus-start.el (all): Add entry for bidi-paragraph-direction. diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el index 83c09b6fe0f..f1fe9594fc0 100644 --- a/lisp/emacs-lisp/eieio.el +++ b/lisp/emacs-lisp/eieio.el @@ -1312,20 +1312,20 @@ Summary: (defun eieio--defmethod (method kind argclass code) "Work part of the `defmethod' macro defining METHOD with ARGS." (let ((key - ;; find optional keys + ;; find optional keys (cond ((or (eq ':BEFORE kind) (eq ':before kind)) - method-before) + method-before) ((or (eq ':AFTER kind) (eq ':after kind)) - method-after) + method-after) ((or (eq ':PRIMARY kind) (eq ':primary kind)) - method-primary) + method-primary) ((or (eq ':STATIC kind) (eq ':static kind)) - method-static) - ;; Primary key + method-static) + ;; Primary key (t method-primary)))) ;; Make sure there is a generic (when called from defclass). (eieio--defalias @@ -1338,8 +1338,8 @@ Summary: ;; under the type `primary' which is a non-specific calling of the ;; function. (if argclass - (if (not (class-p argclass)) - (error "Unknown class type %s in method parameters" + (if (not (class-p argclass)) + (error "Unknown class type %s in method parameters" argclass)) (if (= key -1) (signal 'wrong-type-argument (list :static 'non-class-arg))) @@ -2864,6 +2864,106 @@ of `eq'." ) +;;; Obsolete backward compatibility functions. +;; Needed to run byte-code compiled with the EIEIO of Emacs-23. + +(defun eieio-defmethod (method args) + "Obsolete work part of an old version of the `defmethod' macro." + (let ((key nil) (body nil) (firstarg nil) (argfix nil) (argclass nil) loopa) + ;; find optional keys + (setq key + (cond ((or (eq ':BEFORE (car args)) + (eq ':before (car args))) + (setq args (cdr args)) + method-before) + ((or (eq ':AFTER (car args)) + (eq ':after (car args))) + (setq args (cdr args)) + method-after) + ((or (eq ':PRIMARY (car args)) + (eq ':primary (car args))) + (setq args (cdr args)) + method-primary) + ((or (eq ':STATIC (car args)) + (eq ':static (car args))) + (setq args (cdr args)) + method-static) + ;; Primary key + (t method-primary))) + ;; get body, and fix contents of args to be the arguments of the fn. + (setq body (cdr args) + args (car args)) + (setq loopa args) + ;; Create a fixed version of the arguments + (while loopa + (setq argfix (cons (if (listp (car loopa)) (car (car loopa)) (car loopa)) + argfix)) + (setq loopa (cdr loopa))) + ;; make sure there is a generic + (eieio-defgeneric + method + (if (stringp (car body)) + (car body) (format "Generically created method `%s'." method))) + ;; create symbol for property to bind to. If the first arg is of + ;; the form (varname vartype) and `vartype' is a class, then + ;; that class will be the type symbol. If not, then it will fall + ;; under the type `primary' which is a non-specific calling of the + ;; function. + (setq firstarg (car args)) + (if (listp firstarg) + (progn + (setq argclass (nth 1 firstarg)) + (if (not (class-p argclass)) + (error "Unknown class type %s in method parameters" + (nth 1 firstarg)))) + (if (= key -1) + (signal 'wrong-type-argument (list :static 'non-class-arg))) + ;; generics are higher + (setq key (eieio-specialized-key-to-generic-key key))) + ;; Put this lambda into the symbol so we can find it + (if (byte-code-function-p (car-safe body)) + (eieiomt-add method (car-safe body) key argclass) + (eieiomt-add method (append (list 'lambda (reverse argfix)) body) + key argclass)) + ) + + (when eieio-optimize-primary-methods-flag + ;; Optimizing step: + ;; + ;; If this method, after this setup, only has primary methods, then + ;; we can setup the generic that way. + (if (generic-primary-only-p method) + ;; If there is only one primary method, then we can go one more + ;; optimization step. + (if (generic-primary-only-one-p method) + (eieio-defgeneric-reset-generic-form-primary-only-one method) + (eieio-defgeneric-reset-generic-form-primary-only method)) + (eieio-defgeneric-reset-generic-form method))) + + method) +(make-obsolete 'eieio-defmethod 'eieio--defmethod "24.1") + +(defun eieio-defgeneric (method doc-string) + "Obsolete work part of an old version of the `defgeneric' macro." + (if (and (fboundp method) (not (generic-p method)) + (or (byte-code-function-p (symbol-function method)) + (not (eq 'autoload (car (symbol-function method))))) + ) + (error "You cannot create a generic/method over an existing symbol: %s" + method)) + ;; Don't do this over and over. + (unless (fboundp 'method) + ;; This defun tells emacs where the first definition of this + ;; method is defined. + `(defun ,method nil) + ;; Make sure the method tables are installed. + (eieiomt-install method) + ;; Apply the actual body of this function. + (fset method (eieio-defgeneric-form method doc-string)) + ;; Return the method + 'method)) +(make-obsolete 'eieio-defgeneric nil "24.1") + ;;; Interfacing with edebug ;; (defun eieio-edebug-prin1-to-string (object &optional noescape) -- cgit v1.2.1 From 963b492b635cd33a6a5dd46119208a378e3e6378 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 23 Aug 2011 21:55:10 -0400 Subject: * lisp/mpc.el (mpc--proc-filter): Don't signal mpc-proc-error since signals from process filters aren't reliably transmitted to the surrounding accept-process-output. (mpc-proc-check): New function. (mpc-proc-sync): Use it Fixes: debbugs:8293 --- lisp/ChangeLog | 8 ++++++++ lisp/mpc.el | 39 ++++++++++++++++++++++----------------- src/process.c | 3 +++ 3 files changed, 33 insertions(+), 17 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fe3d15f67c3..85253feacc5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2011-08-24 Stefan Monnier + + * mpc.el (mpc--proc-filter): Don't signal mpc-proc-error since signals + from process filters aren't reliably transmitted to the surrounding + accept-process-output. + (mpc-proc-check): New function. + (mpc-proc-sync): Use it (bug#8293) + 2011-08-23 Stefan Monnier * emacs-lisp/eieio.el (eieio-defmethod, eieio-defgeneric): diff --git a/lisp/mpc.el b/lisp/mpc.el index 5319ea43898..932fb5926fd 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el @@ -246,11 +246,12 @@ and HOST defaults to localhost." (process-put proc 'ready t) (unless (eq (match-end 0) (point-max)) (error "Unexpected trailing text")) - (let ((error (match-string 1))) + (let ((error-text (match-string 1))) (delete-region (point) (point-max)) (let ((callback (process-get proc 'callback))) (process-put proc 'callback nil) - (if error (signal 'mpc-proc-error error)) + (if error-text + (process-put proc 'mpc-proc-error error-text)) (funcall callback))))))))) (defun mpc--proc-connect (host) @@ -314,19 +315,23 @@ and HOST defaults to localhost." mpc-proc) (setq mpc-proc (mpc--proc-connect mpc-host)))) +(defun mpc-proc-check (proc) + (let ((error-text (process-get proc 'mpc-proc-error))) + (when error-text + (process-put proc 'mpc-proc-error nil) + (signal 'mpc-proc-error error-text)))) + (defun mpc-proc-sync (&optional proc) "Wait for MPC process until it is idle again. Return the buffer in which the process is/was running." (unless proc (setq proc (mpc-proc))) (unwind-protect - (condition-case err - (progn - (while (and (not (process-get proc 'ready)) - (accept-process-output proc))) - (if (process-get proc 'ready) (process-buffer proc) - ;; (delete-process proc) - (error "No response from MPD"))) - (error (message "MPC: %s" err) (signal (car err) (cdr err)))) + (progn + (while (and (not (process-get proc 'ready)) + (accept-process-output proc))) + (mpc-proc-check proc) + (if (process-get proc 'ready) (process-buffer proc) + (error "No response from MPD"))) (unless (process-get proc 'ready) ;; (debug) (message "Killing hung process") @@ -358,13 +363,13 @@ which will be concatenated with proper quoting before passing them to MPD." "\n"))) (if callback ;; (let ((buf (current-buffer))) - (process-put proc 'callback - callback - ;; (lambda () - ;; (funcall callback - ;; (prog1 (current-buffer) - ;; (set-buffer buf))))) - ) + (process-put proc 'callback + callback + ;; (lambda () + ;; (funcall callback + ;; (prog1 (current-buffer) + ;; (set-buffer buf))))) + ) ;; If `callback' is nil, we're executing synchronously. (process-put proc 'callback 'ignore) ;; This returns the process's buffer. diff --git a/src/process.c b/src/process.c index 2125478907f..977cfb964e2 100644 --- a/src/process.c +++ b/src/process.c @@ -5186,6 +5186,9 @@ read_process_output (Lisp_Object proc, register int channel) p->decoding_carryover = coding->carryover_bytes; } if (SBYTES (text) > 0) + /* FIXME: It's wrong to wrap or not based on debug-on-error, and + sometimes it's simply wrong to wrap (e.g. when called from + accept-process-output). */ internal_condition_case_1 (read_process_output_call, Fcons (outstream, Fcons (proc, Fcons (text, Qnil))), -- cgit v1.2.1 From c1ec8ad04d002d8d8bc5bf1be208c41e47c8cefb Mon Sep 17 00:00:00 2001 From: Steve Chapel Date: Wed, 24 Aug 2011 00:31:35 -0700 Subject: * etc/refcards/refcard.tex: Add a few more commands. (tiny change) Fixes: debbugs:9343 --- etc/ChangeLog | 4 ++++ etc/refcards/refcard.tex | 20 +++++++++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/etc/ChangeLog b/etc/ChangeLog index 31752a2bc2a..092aa6fb387 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2011-08-24 Steve Chapel (tiny change) + + * refcards/refcard.tex: Add a few more commands. (Bug#9343) + 2011-08-22 Juri Linkov * compilation.txt: Add more samples of output and non-output diff --git a/etc/refcards/refcard.tex b/etc/refcards/refcard.tex index 52b9348db26..7d4f9dbfa89 100644 --- a/etc/refcards/refcard.tex +++ b/etc/refcards/refcard.tex @@ -332,6 +332,7 @@ If Emacs is still searching, \kbd{C-g} cancels only the part not matched. \shortcopyrightnotice +\newcolumn \section{Motion} \paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr @@ -352,7 +353,10 @@ If Emacs is still searching, \kbd{C-g} cancels only the part not matched. \key{scroll to previous screen}{M-v} \key{scroll left}{C-x <} \key{scroll right}{C-x >} -\key{scroll current line to center of screen}{C-u C-l} +\key{scroll current line to center, top, bottom}{C-l} + +\key{goto line}{M-g g} +\key{back to indentation}{M-m} \section{Killing and Deleting} @@ -393,14 +397,15 @@ If Emacs is still searching, \kbd{C-g} cancels only the part not matched. Valid responses in query-replace mode are -\key{{\bf replace} this one, go on to next}{SPC} +\key{{\bf replace} this one, go on to next}{SPC {\rm or} y} \key{replace this one, don't move}{,} -\key{{\bf skip} to next without replacing}{DEL} +\key{{\bf skip} to next without replacing}{DEL {\rm or} n} \key{replace all remaining matches}{!} \key{{\bf back up} to the previous match}{^} \key{{\bf exit} query-replace}{RET} \key{enter recursive edit (\kbd{C-M-c} to exit)}{C-r} +\newcolumn \section{Multiple Windows} When two commands are shown, the second is a similar command for a @@ -438,6 +443,7 @@ frame instead of a window. \key{indent {\bf region} (mode-dependent)}{C-M-\\} \key{indent {\bf sexp} (mode-dependent)}{C-M-q} \key{indent region rigidly {\it arg\/} columns}{C-x TAB} +\key{indent for comment}{M-;} \key{insert newline after point}{C-o} \key{move rest of line vertically down}{C-M-o} @@ -536,6 +542,13 @@ minibuffer. Type \kbd{F10} to activate menu bar items on text terminals. \key{expand previous word dynamically}{M-/} +\section{Miscellaneous} + +\key{numeric argument}{C-u {\it num}} +\key{negative argument}{M--} +\key{quoted insert}{C-q {\it char}} + +\newcolumn \section{Regular Expressions} \key{any single character except a newline}{. {\rm(dot)}} @@ -604,6 +617,7 @@ Other: \endindentedkeys +\newcolumn \section{Registers} \key{save region in register}{C-x r s} -- cgit v1.2.1 From de62b4dfd0dd8254aee693b3c583386e050fb739 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Wed, 24 Aug 2011 16:33:55 +0900 Subject: international/ucs-normalize.el: If decomposition property of CHAR is the default one (i.e. a list of CHAR itself), treat it as nil. --- lisp/ChangeLog | 7 +++++++ lisp/international/ucs-normalize.el | 10 ++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 85253feacc5..2a33661c9c5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2011-08-24 Kenichi Handa + + * international/ucs-normalize.el: If decomposition property of + CHAR is the default one (i.e. a list of CHAR itself), treat it as + nil. + (nfd, nfkd): Likewise. + 2011-08-24 Stefan Monnier * mpc.el (mpc--proc-filter): Don't signal mpc-proc-error since signals diff --git a/lisp/international/ucs-normalize.el b/lisp/international/ucs-normalize.el index f83e0f7588f..df05b355b46 100644 --- a/lisp/international/ucs-normalize.el +++ b/lisp/international/ucs-normalize.el @@ -139,14 +139,17 @@ (defun nfd (char) (let ((decomposition (get-char-code-property char 'decomposition))) - (if (and decomposition (numberp (car decomposition))) + (if (and decomposition (numberp (car decomposition)) + (or (> (length decomposition) 1) + (/= (car decomposition) char))) decomposition))) (defun nfkd (char) (let ((decomposition (get-char-code-property char 'decomposition))) (if (symbolp (car decomposition)) (cdr decomposition) - decomposition))) + (if (or (> (length decomposition) 1) + (/= (car decomposition) char)) decomposition)))) (defun hfs-nfd (char) (when (or (and (>= char 0) (< char #x2000)) @@ -180,6 +183,9 @@ (setq ccc (ucs-normalize-ccc char)) (setq decomposition (get-char-code-property char 'decomposition)) + (if (and (= (length decomposition) 1) + (= (car decomposition) char)) + (setq decomposition nil)) (if (and ccc (/= 0 ccc)) (add-to-list 'combining-chars char)) (if (and (numberp (car decomposition)) (/= (ucs-normalize-ccc (car decomposition)) -- cgit v1.2.1 From f67cdd7f258347b3fe21fa3c8bfc335decad02d6 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 24 Aug 2011 10:46:00 +0300 Subject: Minor changes in bidi.c. src/bidi.c (bidi_check_type): Use xassert. (bidi_cache_iterator_state): Update the disp_pos and disp_prop_p members. --- src/ChangeLog | 6 ++++++ src/bidi.c | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index c629598fcf7..f52e8cad479 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-08-24 Eli Zaretskii + + * bidi.c (bidi_check_type): Use xassert. + (bidi_cache_iterator_state): Update the disp_pos and disp_prop_p + members. + 2011-08-23 Eli Zaretskii * bidi.c (bidi_get_type): Abort if we get zero as the bidi type of diff --git a/src/bidi.c b/src/bidi.c index 00aa31bf48d..425a0be9578 100644 --- a/src/bidi.c +++ b/src/bidi.c @@ -146,11 +146,10 @@ bidi_get_type (int ch, bidi_dir_t override) } } -static void +static inline void bidi_check_type (bidi_type_t type) { - if (type < UNKNOWN_BT || type > NEUTRAL_ON) - abort (); + xassert (UNKNOWN_BT <= type && type <= NEUTRAL_ON); } /* Given a bidi TYPE of a character, return its category. */ @@ -540,6 +539,8 @@ bidi_cache_iterator_state (struct bidi_it *bidi_it, int resolved) bidi_cache[idx].next_for_neutral = bidi_it->next_for_neutral; bidi_cache[idx].next_for_ws = bidi_it->next_for_ws; bidi_cache[idx].ignore_bn_limit = bidi_it->ignore_bn_limit; + bidi_cache[idx].disp_pos = bidi_it->disp_pos; + bidi_cache[idx].disp_prop_p = bidi_it->disp_prop_p; } bidi_cache_last_idx = idx; -- cgit v1.2.1 From 11dcdbb283eb9efddf73939d3c3d12404731833f Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Wed, 24 Aug 2011 12:40:58 +0300 Subject: "C-s M-p" brings the tip of the search ring. * lisp/isearch.el (isearch-ring-adjust1): Start visiting previous search strings from the index 0 (-1 + 1) instead of 1 (0 + 1). (isearch-repeat, isearch-edit-string): Call `isearch-ring-adjust1' for empty search string (when the last search string is reused automatically) to adjust the isearch ring to the last element and prepare the correct index for further M-p commands. Fixes: debbugs:9185 --- lisp/ChangeLog | 9 +++++++++ lisp/isearch.el | 30 +++++++++++++++--------------- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2a33661c9c5..6716a879a76 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2011-08-24 Juri Linkov + + * isearch.el (isearch-ring-adjust1): Start visiting previous + search strings from the index 0 (-1 + 1) instead of 1 (0 + 1). + (isearch-repeat, isearch-edit-string): Call `isearch-ring-adjust1' + for empty search string (when the last search string is reused + automatically) to adjust the isearch ring to the last element and + prepare the correct index for further M-p commands (bug#9185). + 2011-08-24 Kenichi Handa * international/ucs-normalize.el: If decomposition property of diff --git a/lisp/isearch.el b/lisp/isearch.el index 1942641fae9..7fcc31f188f 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -1191,19 +1191,17 @@ If first char entered is \\[isearch-yank-word-or-char], then do word search inst isearch-word isearch-new-word)) ;; Empty isearch-string means use default. - (if (= 0 (length isearch-string)) - (setq isearch-string (or (car (if isearch-regexp - regexp-search-ring - search-ring)) - "") - - isearch-message - (mapconcat 'isearch-text-char-description - isearch-string "")) - ;; This used to set the last search string, - ;; but I think it is not right to do that here. - ;; Only the string actually used should be saved. - )) + (when (= 0 (length isearch-string)) + (setq isearch-string (or (car (if isearch-regexp + regexp-search-ring + search-ring)) + "") + + isearch-message + (mapconcat 'isearch-text-char-description + isearch-string "")) + ;; After taking the last element, adjust ring to previous one. + (isearch-ring-adjust1 nil))) ;; This used to push the state as of before this C-s, but it adds ;; an inconsistent state where part of variables are from the @@ -1290,7 +1288,9 @@ Use `isearch-exit' to quit without signaling." isearch-message (mapconcat 'isearch-text-char-description isearch-string "") - isearch-case-fold-search isearch-last-case-fold-search)) + isearch-case-fold-search isearch-last-case-fold-search) + ;; After taking the last element, adjust ring to previous one. + (isearch-ring-adjust1 nil)) ;; If already have what to search for, repeat it. (or isearch-success (progn @@ -2071,7 +2071,7 @@ Isearch mode." () (set yank-pointer-name (setq yank-pointer - (mod (+ (or yank-pointer 0) + (mod (+ (or yank-pointer (if advance 0 -1)) (if advance -1 1)) length))) (setq isearch-string (nth yank-pointer ring) -- cgit v1.2.1 From 5980d4c6db923da523fbb0e2fb44ecd68b13c53d Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 24 Aug 2011 14:49:54 +0300 Subject: Fix current-bidi-paragraph-direction and its doc. src/xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte buffers, return left-to-right. doc/lispref/display.texi (Bidirectional Display): Document return value in buffers that are not bidi-reordered for display, and in unibyte buffers. --- doc/lispref/ChangeLog | 6 ++++++ doc/lispref/display.texi | 4 +++- src/ChangeLog | 3 +++ src/xdisp.c | 3 ++- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 43add469ec0..4bf615328b1 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,9 @@ +2011-08-24 Eli Zaretskii + + * display.texi (Bidirectional Display): Document return value in + buffers that are not bidi-reordered for display, and in unibyte + buffers. + 2011-08-23 Eli Zaretskii * nonascii.texi (Character Properties): Document the values for diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 8f7f4003411..0593eba8f05 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -6104,7 +6104,9 @@ omitted or @code{nil}, it defaults to the current buffer. If the buffer-local value of the variable @code{bidi-paragraph-direction} is non-@code{nil}, the returned value will be identical to that value; otherwise, the returned value reflects the paragraph direction -determined dynamically by Emacs. +determined dynamically by Emacs. For buffers whose value of +@code{bidi-display-reordering} is @code{nil} as well as unibyte +buffers, this function always returns @code{left-to-right}. @end defun @cindex layout on display, and bidirectional text diff --git a/src/ChangeLog b/src/ChangeLog index f52e8cad479..d4d6a4c4bbd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-08-24 Eli Zaretskii + * xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte + buffers, return left-to-right. + * bidi.c (bidi_check_type): Use xassert. (bidi_cache_iterator_state): Update the disp_pos and disp_prop_p members. diff --git a/src/xdisp.c b/src/xdisp.c index 6a11628f858..8b3a71027b6 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -19014,7 +19014,8 @@ See also `bidi-paragraph-direction'. */) buf = XBUFFER (buffer); } - if (NILP (BVAR (buf, bidi_display_reordering))) + if (NILP (BVAR (buf, bidi_display_reordering)) + || NILP (BVAR (buf, enable_multibyte_characters))) return Qleft_to_right; else if (!NILP (BVAR (buf, bidi_paragraph_direction))) return BVAR (buf, bidi_paragraph_direction); -- cgit v1.2.1 From 8610fe8b84e22f5d962f5e480001748a6687a3b2 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 24 Aug 2011 18:51:56 +0300 Subject: Fix cursor movement in R2L text within L2R paragraphs. src/xdisp.c (set_cursor_from_row): Consider candidate row a win if its glyph represents a newline and point is on that newline. Fixes cursor positioning on the newline at EOL of R2L text within L2R paragraph, and vice versa. (try_cursor_movement): Check continued rows, in addition to continuation rows. Fixes unwarranted scroll when point enters a continued line of R2L text within an L2R paragraph, or vice versa. (cursor_row_p): Consider the case of point being equal to MATRIX_ROW_END_CHARPOS. Prevents cursor being stuck when moving from the end of a short line to the beginning of a continued line of R2L text within L2R paragraph. (RECORD_MAX_MIN_POS): For max_pos, use IT_CHARPOS even for composed characters. --- src/ChangeLog | 13 +++++++++++++ src/xdisp.c | 21 +++++++++++++++------ 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index d4d6a4c4bbd..b9c627bf160 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,19 @@ * xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte buffers, return left-to-right. + (set_cursor_from_row): Consider candidate row a win if its glyph + represents a newline and point is on that newline. Fixes cursor + positioning on the newline at EOL of R2L text within L2R + paragraph, and vice versa. + (try_cursor_movement): Check continued rows, in addition to + continuation rows. Fixes unwarranted scroll when point enters a + continued line of R2L text within an L2R paragraph, or vice versa. + (cursor_row_p): Consider the case of point being equal to + MATRIX_ROW_END_CHARPOS. Prevents cursor being stuck when moving + from the end of a short line to the beginning of a continued line + of R2L text within L2R paragraph. + (RECORD_MAX_MIN_POS): For max_pos, use IT_CHARPOS even for + composed characters. * bidi.c (bidi_check_type): Use xassert. (bidi_cache_iterator_state): Update the disp_pos and disp_prop_p diff --git a/src/xdisp.c b/src/xdisp.c index 8b3a71027b6..4ed08e72e19 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -13796,7 +13796,14 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, && glyph->charpos != pt_old))))) return 0; /* If this candidate gives an exact match, use that. */ - if (!(BUFFERP (glyph->object) && glyph->charpos == pt_old) + if (!((BUFFERP (glyph->object) && glyph->charpos == pt_old) + /* If this candidate is a glyph created for the + terminating newline of a line, and point is on that + newline, it wins because it's an exact match. */ + || (!row->continued_p + && INTEGERP (glyph->object) + && glyph->charpos == 0 + && pt_old == MATRIX_ROW_END_CHARPOS (row) - 1)) /* Otherwise, keep the candidate that comes from a row spanning less buffer positions. This may win when one or both candidate positions are on glyphs that came from @@ -14578,7 +14585,8 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste } ++row; } - while ((MATRIX_ROW_CONTINUATION_LINE_P (row) + while (((MATRIX_ROW_CONTINUATION_LINE_P (row) + || row->continued_p) && MATRIX_ROW_BOTTOM_Y (row) <= last_y) || (MATRIX_ROW_START_CHARPOS (row) == PT && MATRIX_ROW_BOTTOM_Y (row) < last_y)); @@ -18009,7 +18017,8 @@ cursor_row_p (struct glyph_row *row) { int result = 1; - if (PT == CHARPOS (row->end.pos)) + if (PT == CHARPOS (row->end.pos) + || PT == MATRIX_ROW_END_CHARPOS (row)) { /* Suppose the row ends on a string. Unless the row is continued, that means it ends on a newline @@ -18404,10 +18413,10 @@ display_line (struct it *it) min_pos = current_pos; \ min_bpos = current_bpos; \ } \ - if (current_pos > max_pos) \ + if (IT_CHARPOS (*it) > max_pos) \ { \ - max_pos = current_pos; \ - max_bpos = current_bpos; \ + max_pos = IT_CHARPOS (*it); \ + max_bpos = IT_BYTEPOS (*it); \ } \ } \ while (0) -- cgit v1.2.1 From 1ed43b0999487094d4082e431947d48bd8feb2bb Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Wed, 24 Aug 2011 13:38:46 -0400 Subject: Rename quit-restore-window into quit-window. * lisp/window.el (quit-window): Renamed from quit-restore-window. Use same arglist as old quit-window. (frame-auto-delete): Doc fix. * lisp/view.el (view-mode-exit): Use quit-window. --- lisp/ChangeLog | 8 ++++++++ lisp/view.el | 4 ++-- lisp/window.el | 54 ++++++++---------------------------------------------- 3 files changed, 18 insertions(+), 48 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6716a879a76..2335f3780dc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2011-08-24 Chong Yidong + + * window.el (quit-window): Renamed from quit-restore-window. Use + same arglist as old quit-window. + (frame-auto-delete): Doc fix. + + * view.el (view-mode-exit): Use quit-window. + 2011-08-24 Juri Linkov * isearch.el (isearch-ring-adjust1): Start visiting previous diff --git a/lisp/view.el b/lisp/view.el index 21479a70a72..be011d217fc 100644 --- a/lisp/view.el +++ b/lisp/view.el @@ -576,9 +576,9 @@ current buffer. " (cond ((or all-windows view-exits-all-viewing-windows) (dolist (window (get-buffer-window-list)) - (quit-restore-window window))) + (quit-window nil window))) ((eq (window-buffer) (current-buffer)) - (quit-restore-window))) + (quit-window))) (when exit-action (funcall exit-action buffer)) diff --git a/lisp/window.el b/lisp/window.el index 75fa0b46a1c..fb9d38c6503 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -2272,7 +2272,7 @@ another frame still exists. Functions quitting a window and consequently affected by this variable are `switch-to-prev-buffer', `delete-windows-on', -`replace-buffer-in-windows' and `quit-restore-window'." +`replace-buffer-in-windows' and `quit-window'." :type '(choice (const :tag "Never" nil) (const :tag "Automatic" automatic) @@ -2907,21 +2907,17 @@ all window-local buffer lists." ;; Unrecord BUFFER in WINDOW. (unrecord-window-buffer window buffer))))) -(defun quit-restore-window (&optional window kill) - "Quit WINDOW in some way. -WINDOW must be a live window and defaults to the selected window. -Return nil. +(defun quit-window (&optional kill window) + "Quit WINDOW and bury its buffer. +WINDOW defaults to the selected window. +With a prefix argument, kill the buffer instead. According to information stored in WINDOW's `quit-restore' window parameter either \(1) delete WINDOW and its frame, \(2) delete WINDOW, \(3) restore the buffer previously displayed in WINDOW, or \(4) make WINDOW display some other buffer than the present -one. If non-nil, reset `quit-restore' parameter to nil. - -Optional argument KILL non-nil means in addition kill WINDOW's -buffer. If KILL is nil, put WINDOW's buffer at the end of the -buffer list. Interactively, KILL is the prefix argument." - (interactive "i\nP") +one. If non-nil, reset `quit-restore' parameter to nil." + (interactive "P") (setq window (window-normalize-live-window window)) (let ((buffer (window-buffer window)) (quit-restore (window-parameter window 'quit-restore)) @@ -2971,8 +2967,7 @@ buffer list. Interactively, KILL is the prefix argument." (switch-to-prev-buffer window 'bury-or-kill))) ;; Kill WINDOW's old-buffer if requested - (when kill (kill-buffer buffer)) - nil)) + (if kill (kill-buffer buffer)))) ;;; Splitting windows. (defsubst window-split-min-size (&optional horizontal) @@ -7045,39 +7040,6 @@ Return non-nil if the window was shrunk, nil otherwise." (with-current-buffer buffer-to-kill (remove-hook 'kill-buffer-hook delete-window-hook t)))))) -(defun quit-window (&optional kill window) - "Quit WINDOW and bury its buffer. -With a prefix argument, kill the buffer instead. WINDOW defaults -to the selected window. - -If WINDOW is non-nil, dedicated, or a minibuffer window, delete -it and, if it's alone on its frame, its frame too. Otherwise, or -if deleting WINDOW fails in any of the preceding cases, display -another buffer in WINDOW using `switch-to-buffer'. - -Optional argument KILL non-nil means kill WINDOW's buffer. -Otherwise, bury WINDOW's buffer, see `bury-buffer'." - (interactive "P") - (let ((buffer (window-buffer window))) - (if (or window - (window-minibuffer-p window) - (window-dedicated-p window)) - ;; WINDOW is either non-nil, a minibuffer window, or dedicated; - ;; try to delete it. - (let* ((window (or window (selected-window))) - (frame (window-frame window))) - (if (frame-root-window-p window) - ;; WINDOW is alone on its frame. - (delete-frame frame) - ;; There are other windows on its frame, delete WINDOW. - (delete-window window))) - ;; Otherwise, switch to another buffer in the selected window. - (switch-to-buffer nil)) - - ;; Deal with the buffer. - (if kill - (kill-buffer buffer) - (bury-buffer buffer)))) (defvar recenter-last-op nil "Indicates the last recenter operation performed. -- cgit v1.2.1 From 6a93965ee87c1e1bbad0b471b5de212b74a2a4ce Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Wed, 24 Aug 2011 21:01:40 +0300 Subject: * lisp/faces.el (success): Change face color from "Green3" to "ForestGreen" on light background. Fixes: debbugs:9353 --- lisp/ChangeLog | 5 +++++ lisp/faces.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2335f3780dc..75ab64a1cfc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-08-24 Juri Linkov + + * faces.el (success): Change face color from "Green3" to + "ForestGreen" on light background (bug#9353). + 2011-08-24 Chong Yidong * window.el (quit-window): Renamed from quit-restore-window. Use diff --git a/lisp/faces.el b/lisp/faces.el index 404bd7b6609..3c4a3330c81 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -2435,7 +2435,7 @@ It is used for characters of no fonts too." (defface success '((((class color) (min-colors 16) (background light)) - (:foreground "Green3" :weight bold)) + (:foreground "ForestGreen" :weight bold)) (((class color) (min-colors 88) (background dark)) (:foreground "Green1" :weight bold)) (((class color) (min-colors 16) (background dark)) -- cgit v1.2.1 From f22f4808a08e8f985d5e6175bbd13d5260e1ab1a Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Wed, 24 Aug 2011 21:09:18 +0300 Subject: More uses of `error' and `warning' faces. * lisp/battery.el (battery-update): Use the face `error' instead of `font-lock-warning-face'. * lisp/ibuffer.el (ibuffer-marked-face): Change default face from `font-lock-warning-face' to `warning'. (ibuffer-deletion-face): Change default face from `font-lock-type-face' to `error'. * lisp/proced.el (proced-marked): Inherit from `error' instead of `font-lock-warning-face'. Fixes: debbugs:6117 --- lisp/ChangeLog | 13 +++++++++++++ lisp/battery.el | 2 +- lisp/ibuffer.el | 4 ++-- lisp/proced.el | 2 +- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 75ab64a1cfc..762779cc01e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,16 @@ +2011-08-24 Juri Linkov + + * proced.el (proced-marked): Inherit from `error' instead of + `font-lock-warning-face'. + + * ibuffer.el (ibuffer-marked-face): Change default face from + `font-lock-warning-face' to `warning'. + (ibuffer-deletion-face): Change default face from + `font-lock-type-face' to `error'. + + * battery.el (battery-update): Use the face `error' instead of + `font-lock-warning-face' (bug#6117). + 2011-08-24 Juri Linkov * faces.el (success): Change face color from "Green3" to diff --git a/lisp/battery.el b/lisp/battery.el index d7d3045fa58..e0bba96b655 100644 --- a/lisp/battery.el +++ b/lisp/battery.el @@ -199,7 +199,7 @@ seconds." 'face (and (<= (car (read-from-string (cdr (assq ?p data)))) battery-load-critical) - 'font-lock-warning-face) + 'error) 'help-echo "Battery status information"))) (force-mode-line-update)) diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 725192399ff..5a86508e144 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -356,12 +356,12 @@ directory, like `default-directory'." :type 'hook :group 'ibuffer) -(defcustom ibuffer-marked-face 'font-lock-warning-face +(defcustom ibuffer-marked-face 'warning "Face used for displaying marked buffers." :type 'face :group 'ibuffer) -(defcustom ibuffer-deletion-face 'font-lock-type-face +(defcustom ibuffer-deletion-face 'error "Face used for displaying buffers marked for deletion." :type 'face :group 'ibuffer) diff --git a/lisp/proced.el b/lisp/proced.el index 94ea579ebd8..e4987bd926c 100644 --- a/lisp/proced.el +++ b/lisp/proced.el @@ -395,7 +395,7 @@ It is a list of lists (KEY PREDICATE REVERSE).") :group 'proced-faces) (defface proced-marked - '((t (:inherit font-lock-warning-face))) + '((t (:inherit error))) "Face used for marked processes." :group 'proced-faces) -- cgit v1.2.1