Now on revision 107653. ------------------------------------------------------------ revno: 107653 committer: Glenn Morris branch nick: trunk timestamp: Wed 2012-03-21 23:47:01 -0700 message: * emacs/dired.texi (Operating on Files): Fix dired-recursive-copies default. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2012-03-17 11:11:08 +0000 +++ doc/emacs/ChangeLog 2012-03-22 06:47:01 +0000 @@ -1,3 +1,7 @@ +2012-03-22 Glenn Morris + + * dired.texi (Operating on Files): Fix dired-recursive-copies default. + 2012-03-17 Chong Yidong * package.texi (Package Installation): Document use of === modified file 'doc/emacs/dired.texi' --- doc/emacs/dired.texi 2012-03-15 08:33:42 +0000 +++ doc/emacs/dired.texi 2012-03-22 06:47:01 +0000 @@ -610,7 +610,7 @@ @cindex recursive copying The variable @code{dired-recursive-copies} controls whether to copy directories recursively (like @samp{cp -r}). The default is -@code{nil}, which means that directories cannot be copied. +@code{top}, which means to ask before recursively copying a directory. @item D @findex dired-do-delete ------------------------------------------------------------ revno: 107652 committer: Glenn Morris branch nick: trunk timestamp: Wed 2012-03-21 23:21:28 -0700 message: Document string-prefix-p * doc/lispref/strings.texi (Text Comparison): Mention string-prefix-p. * etc/NEWS: Belated entry. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2012-03-21 07:02:13 +0000 +++ doc/lispref/ChangeLog 2012-03-22 06:21:28 +0000 @@ -1,3 +1,7 @@ +2012-03-22 Glenn Morris + + * strings.texi (Text Comparison): Mention string-prefix-p. + 2012-03-21 Chong Yidong * display.texi (The Echo Area): Add xref to Output Streams. === modified file 'doc/lispref/strings.texi' --- doc/lispref/strings.texi 2012-03-10 09:55:54 +0000 +++ doc/lispref/strings.texi 2012-03-22 06:21:28 +0000 @@ -508,6 +508,13 @@ @code{string-lessp} is another name for @code{string<}. @end defun +@defun string-prefix-p string1 string2 &optional ignore-case +This function returns non-@code{nil} if @var{string1} is a prefix of +@var{string2}; i.e., if @var{string2} starts with @var{string1}. If +the optional argument @var{ignore-case} is non-@code{nil}, the +comparison ignores case differences. +@end defun + @defun compare-strings string1 start1 end1 string2 start2 end2 &optional ignore-case This function compares the specified part of @var{string1} with the specified part of @var{string2}. The specified part of @var{string1} === modified file 'etc/NEWS' --- etc/NEWS 2012-03-21 07:02:13 +0000 +++ etc/NEWS 2012-03-22 06:21:28 +0000 @@ -1548,6 +1548,10 @@ (set-keymap-parent newmap (make-composed-keymap othermap parent)) +++ +** New function `string-prefix-p'. +(This was actually added in Emacs 23.2 but was not advertised at the time.) + ++++ ** New reader macro ## that stands for the empty symbol. This means that the empty symbol can now be read back. Also, #: by itself (when not immediately followed by a possible symbol character) stands for ------------------------------------------------------------ revno: 107651 [merge] committer: Kenichi Handa branch nick: trunk timestamp: Thu 2012-03-22 13:23:51 +0900 message: international/quail.el (quail-insert-kbd-layout): Fix previous change. To avoid unwanted bidi reordering, use bidi-string-mark-left-to-right instead of inserting LRO and PDF. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-03-21 18:33:07 +0000 +++ lisp/ChangeLog 2012-03-22 04:23:16 +0000 @@ -1,3 +1,9 @@ +2012-03-22 Kenichi Handa + + * international/quail.el (quail-insert-kbd-layout): Fix previous + change. To avoid unwanted bidi reordering, use + bidi-string-mark-left-to-right instead of inserting LRO and PDF. + 2012-03-21 Dmitry Gutov * progmodes/ruby-mode.el: Don't confuse "end:" for "end" (bug#10786). === modified file 'lisp/international/quail.el' --- lisp/international/quail.el 2012-03-12 07:42:02 +0000 +++ lisp/international/quail.el 2012-03-22 04:20:07 +0000 @@ -825,8 +825,6 @@ (setq i 0) (while (< i quail-keyboard-layout-len) (when (= (% i 30) 0) - ;; Insert LRO to avoid bidi-reordering of keyboard cells. - (insert (propertize (string ?\x202d) 'invisible t)) (setq row (/ i 30)) (if (> row 1) (insert-char 32 (+ row (/ (- row 2) 2))))) @@ -835,25 +833,26 @@ (insert bar) (if (< (if (stringp lower) (string-width lower) (char-width lower)) 2) (insert " ")) - (if (and (characterp lower) - (eq (get-char-code-property lower 'general-category) 'Mn)) - ;; Pad the left and right of non-spacing characters. - (setq lower (compose-string (string lower) 0 1 - (format "\t%c\t" lower)))) - (if (and (characterp upper) - (eq (get-char-code-property upper 'general-category) 'Mn)) - ;; Pad the left and right of non-spacing characters. - (setq upper (compose-string (string upper) 0 1 - (format "\t%c\t" upper)))) - (insert lower (propertize " " 'invisible t) upper) - (if (< (if (stringp upper) (string-width upper) (char-width upper)) 2) + (if (characterp lower) + (if (eq (get-char-code-property lower 'general-category) 'Mn) + ;; Pad the left and right of non-spacing characters. + (setq lower (compose-string (string lower) 0 1 + (format "\t%c\t" lower))) + (setq lower (string lower)))) + (if (characterp upper) + (if (eq (get-char-code-property upper 'general-category) 'Mn) + ;; Pad the left and right of non-spacing characters. + (setq upper (compose-string (string upper) 0 1 + (format "\t%c\t" upper))) + (setq upper (string upper)))) + (insert (bidi-string-mark-left-to-right lower) + (propertize " " 'invisible t) + (bidi-string-mark-left-to-right upper)) + (if (< (string-width upper) 2) (insert " ")) (setq i (+ i 2)) (if (= (% i 30) 0) - (insert bar - ;; Insert PDF to deny the previously inserted LRO. - (propertize (string ?\x202c) 'invisible t) - "\n"))) + (insert bar "\n"))) ;; Insert horizontal lines while deleting blank key columns at the ;; beginning and end of each line. (save-restriction ------------------------------------------------------------ revno: 107650 fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10786 author: Dmitry Gutov committer: Stefan Monnier branch nick: trunk timestamp: Wed 2012-03-21 14:33:07 -0400 message: * lisp/progmodes/ruby-mode.el: Don't confuse "end:" for "end". (ruby-block-end-re, ruby-delimiter, ruby-parse-partial) (ruby-beginning-of-indent): Be more careful with the difference between word-boundary and symbol boundary. (ruby-mode-syntax-table): Make : a symbol constituent. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-03-21 18:27:05 +0000 +++ lisp/ChangeLog 2012-03-21 18:33:07 +0000 @@ -1,3 +1,11 @@ +2012-03-21 Dmitry Gutov + + * progmodes/ruby-mode.el: Don't confuse "end:" for "end" (bug#10786). + (ruby-block-end-re, ruby-delimiter, ruby-parse-partial) + (ruby-beginning-of-indent): Be more careful with the difference + between word-boundary and symbol boundary. + (ruby-mode-syntax-table): Make : a symbol constituent. + 2012-03-21 Andreas Politz * outline.el (outline-flag-region): Evaporate overlays (bug#10789). === modified file 'lisp/progmodes/ruby-mode.el' --- lisp/progmodes/ruby-mode.el 2012-01-19 07:21:25 +0000 +++ lisp/progmodes/ruby-mode.el 2012-03-21 18:33:07 +0000 @@ -96,7 +96,7 @@ (regexp-opt (append ruby-modifier-beg-keywords ruby-block-op-keywords)) "Regexp to match hanging block modifiers.") -(defconst ruby-block-end-re "\\") +(defconst ruby-block-end-re "\\_") (eval-and-compile (defconst ruby-here-doc-beg-re @@ -115,9 +115,9 @@ (match-string 6))))) (defconst ruby-delimiter - (concat "[?$/%(){}#\"'`.:]\\|<<\\|\\[\\|\\]\\|\\<\\(" + (concat "[?$/%(){}#\"'`.:]\\|<<\\|\\[\\|\\]\\|\\_<\\(" ruby-block-beg-re - "\\)\\>\\|" ruby-block-end-re + "\\)\\_>\\|" ruby-block-end-re "\\|^=begin\\|" ruby-here-doc-beg-re)) (defconst ruby-negative @@ -166,6 +166,7 @@ (modify-syntax-entry ?$ "." table) (modify-syntax-entry ?? "_" table) (modify-syntax-entry ?_ "_" table) + (modify-syntax-entry ?: "_" table) (modify-syntax-entry ?< "." table) (modify-syntax-entry ?> "." table) (modify-syntax-entry ?& "." table) @@ -565,7 +566,7 @@ (setq nest (cons (cons nil pnt) nest)) (setq depth (1+ depth)))) (goto-char (match-end 0))) - ((looking-at (concat "\\<\\(" ruby-block-beg-re "\\)\\>")) + ((looking-at (concat "\\_<\\(" ruby-block-beg-re "\\)\\_>")) (and (save-match-data (or (not (looking-at (concat "do" ruby-keyword-end-re))) @@ -864,7 +865,7 @@ ;; It seems like it should move to the line where indentation should deepen, ;; but ruby-indent-beg-re only accounts for whitespace before class, module and def, ;; so this will only match other block beginners at the beginning of the line. - (and (re-search-backward (concat "^\\(" ruby-indent-beg-re "\\)\\b") nil 'move) + (and (re-search-backward (concat "^\\(" ruby-indent-beg-re "\\)\\_>") nil 'move) (beginning-of-line))) (defun ruby-move-to-block (n) ------------------------------------------------------------ revno: 107649 committer: Stefan Monnier branch nick: trunk timestamp: Wed 2012-03-21 14:27:05 -0400 message: Fix last ChangeLog + Andreas Politz has signed paperwork. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-03-21 18:21:24 +0000 +++ lisp/ChangeLog 2012-03-21 18:27:05 +0000 @@ -1,7 +1,9 @@ -2012-03-21 Stefan Monnier +2012-03-21 Andreas Politz * outline.el (outline-flag-region): Evaporate overlays (bug#10789). +2012-03-21 Stefan Monnier + * progmodes/etags.el (tags-completion-at-point-function): Improve last fix. === modified file 'lisp/ChangeLog.14' --- lisp/ChangeLog.14 2012-02-23 01:31:39 +0000 +++ lisp/ChangeLog.14 2012-03-21 18:27:05 +0000 @@ -7114,7 +7114,7 @@ vc-default-mark-resolved. (vc-default-mark-resolved): Change to an alias for ignore. -2008-09-24 Andreas Politz (tiny change) +2008-09-24 Andreas Politz * term.el (term-emulate-terminal): Encode input string before checking its length. === modified file 'lisp/ChangeLog.15' --- lisp/ChangeLog.15 2012-02-24 19:32:46 +0000 +++ lisp/ChangeLog.15 2012-03-21 18:27:05 +0000 @@ -14934,7 +14934,7 @@ * woman.el (woman-make-bufname): Handle man-pages with "." in the name. (Bug#5038) -2009-12-02 Andreas Politz (tiny change) +2009-12-02 Andreas Politz * ido.el (ido-file-internal): Handle filenames at point that do not have a directory part. (Bug#5049) @@ -19488,7 +19488,7 @@ (elint-log-message): Add optional argument. Use elint-output. (elint-set-mode-line): New function. -2009-09-12 Andreas Politz (tiny change) +2009-09-12 Andreas Politz * emacs-lisp/elp.el (elp-not-profilable): Add more functions (Bug#4233). === modified file 'src/ChangeLog.11' --- src/ChangeLog.11 2012-02-24 19:39:07 +0000 +++ src/ChangeLog.11 2012-03-21 18:27:05 +0000 @@ -9627,7 +9627,7 @@ * frame.c (Vdefault_frame_scroll_bars): Put non-GTK X scroll-bars on left. -2010-03-13 Andreas Politz (tiny change) +2010-03-13 Andreas Politz * editfns.c (Fformat): Account for string precision when computing field width (Bug#5710). ------------------------------------------------------------ revno: 107648 fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10789 committer: Stefan Monnier branch nick: trunk timestamp: Wed 2012-03-21 14:21:24 -0400 message: * lisp/outline.el (outline-flag-region): Evaporate overlays. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-03-21 17:50:28 +0000 +++ lisp/ChangeLog 2012-03-21 18:21:24 +0000 @@ -1,5 +1,7 @@ 2012-03-21 Stefan Monnier + * outline.el (outline-flag-region): Evaporate overlays (bug#10789). + * progmodes/etags.el (tags-completion-at-point-function): Improve last fix. === modified file 'lisp/outline.el' --- lisp/outline.el 2012-01-19 07:21:25 +0000 +++ lisp/outline.el 2012-03-21 18:21:24 +0000 @@ -751,6 +751,7 @@ ;; very end of the heading, before the newline, so text inserted at FROM ;; belongs to the heading rather than to the entry. (let ((o (make-overlay from to nil 'front-advance))) + (overlay-put o 'evaporate t) (overlay-put o 'invisible 'outline) (overlay-put o 'isearch-open-invisible (or outline-isearch-open-invisible-function ------------------------------------------------------------ revno: 107647 committer: Stefan Monnier branch nick: trunk timestamp: Wed 2012-03-21 13:50:28 -0400 message: * progmodes/etags.el (tags-completion-at-point-function): Improve last fix. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-03-21 17:44:55 +0000 +++ lisp/ChangeLog 2012-03-21 17:50:28 +0000 @@ -1,5 +1,8 @@ 2012-03-21 Stefan Monnier + * progmodes/etags.el (tags-completion-at-point-function): + Improve last fix. + * files.el (move-file-to-trash): Files aren't regexps (bug#11055). 2012-03-21 Sam Steingold === modified file 'lisp/progmodes/etags.el' --- lisp/progmodes/etags.el 2012-03-21 17:17:23 +0000 +++ lisp/progmodes/etags.el 2012-03-21 17:50:28 +0000 @@ -809,10 +809,11 @@ beg) (when pattern (save-excursion - (when (search-backward pattern nil t) ; will fail inside pattern - (setq beg (point)) - (forward-char (length pattern)) - (list beg (point) (tags-lazy-completion-table) :exclusive 'no))))))) + (forward-char (1- (length pattern))) + (search-backward pattern) + (setq beg (point)) + (forward-char (length pattern)) + (list beg (point) (tags-lazy-completion-table) :exclusive 'no)))))) (defun find-tag-tag (string) "Read a tag name, with defaulting and completion." ------------------------------------------------------------ revno: 107646 fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11055 committer: Stefan Monnier branch nick: trunk timestamp: Wed 2012-03-21 13:44:55 -0400 message: * lisp/files.el (move-file-to-trash): Files aren't regexps. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-03-21 17:17:23 +0000 +++ lisp/ChangeLog 2012-03-21 17:44:55 +0000 @@ -1,3 +1,7 @@ +2012-03-21 Stefan Monnier + + * files.el (move-file-to-trash): Files aren't regexps (bug#11055). + 2012-03-21 Sam Steingold * progmodes/etags.el (tags-completion-at-point-function): === modified file 'lisp/files.el' --- lisp/files.el 2012-03-09 03:21:49 +0000 +++ lisp/files.el 2012-03-21 17:44:55 +0000 @@ -6563,7 +6563,7 @@ (new-fn (expand-file-name (file-name-nondirectory fn) trash-dir))) ;; We can't trash a parent directory of trash-directory. - (if (string-match fn trash-dir) + (if (string-prefix-p fn trash-dir) (error "Trash directory `%s' is a subdirectory of `%s'" trash-dir filename)) (unless (file-directory-p trash-dir) @@ -6595,10 +6595,10 @@ (file-name-directory fn))) (error "Cannot move %s to trash: Permission denied" filename)) ;; The trashed file cannot be the trash dir or its parent. - (if (string-match fn trash-files-dir) + (if (string-prefix-p fn trash-files-dir) (error "The trash directory %s is a subdirectory of %s" trash-files-dir filename)) - (if (string-match fn trash-info-dir) + (if (string-prefix-p fn trash-info-dir) (error "The trash directory %s is a subdirectory of %s" trash-info-dir filename)) ------------------------------------------------------------ revno: 107645 committer: Sam Steingold branch nick: trunk timestamp: Wed 2012-03-21 13:17:23 -0400 message: * lisp/progmodes/etags.el (tags-completion-at-point-function): Avoid the error when point is inside the pattern. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-03-21 17:02:09 +0000 +++ lisp/ChangeLog 2012-03-21 17:17:23 +0000 @@ -1,3 +1,8 @@ +2012-03-21 Sam Steingold + + * progmodes/etags.el (tags-completion-at-point-function): + Avoid the error when point is inside the pattern. + 2012-03-21 John Yates (tiny change) * progmodes/hideshow.el (hs-inside-comment-p): Fix hiding of first === modified file 'lisp/progmodes/etags.el' --- lisp/progmodes/etags.el 2012-01-19 07:21:25 +0000 +++ lisp/progmodes/etags.el 2012-03-21 17:17:23 +0000 @@ -809,10 +809,10 @@ beg) (when pattern (save-excursion - (search-backward pattern) ;FIXME: will fail if we're inside pattern. - (setq beg (point)) - (forward-char (length pattern)) - (list beg (point) (tags-lazy-completion-table) :exclusive 'no)))))) + (when (search-backward pattern nil t) ; will fail inside pattern + (setq beg (point)) + (forward-char (length pattern)) + (list beg (point) (tags-lazy-completion-table) :exclusive 'no))))))) (defun find-tag-tag (string) "Read a tag name, with defaulting and completion." ------------------------------------------------------------ revno: 107644 committer: Sam Steingold branch nick: trunk timestamp: Wed 2012-03-21 13:15:39 -0400 message: (dired-listing-switches): apparently, "ls -b" is actually supposed to work diff: === modified file 'lisp/dired.el' --- lisp/dired.el 2012-03-21 16:07:04 +0000 +++ lisp/dired.el 2012-03-21 17:15:39 +0000 @@ -52,8 +52,8 @@ ;;;###autoload (defcustom dired-listing-switches (purecopy "-al") "Switches passed to `ls' for Dired. MUST contain the `l' option. -May contain all other options that don't contradict `-l' except for `b'; -may contain even `F', `i' and `s'. See also the variable +May contain all other options that don't contradict `-l'; +may contain even `F', `b', `i' and `s'. See also the variable `dired-ls-F-marks-symlinks' concerning the `F' switch. On systems such as MS-DOS and MS-Windows, which use `ls' emulation in Lisp, some of the `ls' switches are not supported; see the doc string of ------------------------------------------------------------ revno: 107643 fixes bug(s): http://debbugs.gnu.org/10855 author: John Yates committer: Chong Yidong branch nick: trunk timestamp: Thu 2012-03-22 01:02:09 +0800 message: * progmodes/hideshow.el (hs-inside-comment-p): Fix hiding of first line. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-03-21 16:56:55 +0000 +++ lisp/ChangeLog 2012-03-21 17:02:09 +0000 @@ -1,3 +1,8 @@ +2012-03-21 John Yates (tiny change) + + * progmodes/hideshow.el (hs-inside-comment-p): Fix hiding of first + line (Bug#10855). + 2012-03-21 Drew Adams * info.el (Info-menu): Handle string value of FORK arg (Bug#10858). === modified file 'lisp/progmodes/hideshow.el' --- lisp/progmodes/hideshow.el 2012-02-08 02:12:24 +0000 +++ lisp/progmodes/hideshow.el 2012-03-21 17:02:09 +0000 @@ -607,6 +607,7 @@ ;; forward comment, and see if we are inside, then extend ;; forward and backward as long as we have comments (let ((q (point))) + (skip-chars-forward "[:blank:]") (when (or (looking-at hs-c-start-regexp) (re-search-backward hs-c-start-regexp (point-min) t)) ;; first get to the beginning of this comment... ------------------------------------------------------------ revno: 107642 fixes bug(s): http://debbugs.gnu.org/10858 committer: Chong Yidong branch nick: trunk timestamp: Thu 2012-03-22 00:56:55 +0800 message: * info.el (Info-menu): Handle string value of FORK arg. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-03-21 16:41:01 +0000 +++ lisp/ChangeLog 2012-03-21 16:56:55 +0000 @@ -1,3 +1,7 @@ +2012-03-21 Drew Adams + + * info.el (Info-menu): Handle string value of FORK arg (Bug#10858). + 2012-03-21 Anmol Khirbat (tiny change) * ido.el (ido-set-current-directory, ido-read-internal) === modified file 'lisp/info.el' --- lisp/info.el 2012-03-06 03:02:44 +0000 +++ lisp/info.el 2012-03-21 16:56:55 +0000 @@ -2594,7 +2594,9 @@ (list item current-prefix-arg)))) ;; there is a problem here in that if several menu items have the same ;; name you can only go to the node of the first with this command. - (Info-goto-node (Info-extract-menu-item menu-item) (if fork menu-item))) + (Info-goto-node (Info-extract-menu-item menu-item) + (and fork + (if (stringp fork) fork menu-item)))) (defun Info-extract-menu-item (menu-item) (setq menu-item (regexp-quote menu-item)) ------------------------------------------------------------ revno: 107641 fixes bug(s): http://debbugs.gnu.org/11008 author: Anmol Khirbat committer: Chong Yidong branch nick: trunk timestamp: Thu 2012-03-22 00:41:01 +0800 message: Handle nil value of ido-completion-buffer. * lisp/ido.el (ido-set-current-directory, ido-read-internal) (ido-choose-completion-string, ido-completion-help): Handle nil value of ido-completion-buffer. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-03-21 16:01:18 +0000 +++ lisp/ChangeLog 2012-03-21 16:41:01 +0000 @@ -1,3 +1,9 @@ +2012-03-21 Anmol Khirbat (tiny change) + + * ido.el (ido-set-current-directory, ido-read-internal) + (ido-choose-completion-string, ido-completion-help): Handle nil + value of ido-completion-buffer (Bug#11008). + 2012-03-21 Sam Steingold * window.el (switch-to-prev-buffer): Do not switch to a visible === modified file 'lisp/ido.el' --- lisp/ido.el 2012-02-04 00:59:58 +0000 +++ lisp/ido.el 2012-03-21 16:41:01 +0000 @@ -1722,8 +1722,9 @@ (unless (and ido-enable-tramp-completion (string-match "\\`/[^/]*@\\'" dir)) (setq dir (ido-final-slash dir t)))) - (if (get-buffer ido-completion-buffer) - (kill-buffer ido-completion-buffer)) + (and ido-completion-buffer + (get-buffer ido-completion-buffer) + (kill-buffer ido-completion-buffer)) (cond ((equal dir ido-current-directory) nil) @@ -1736,8 +1737,9 @@ (t (ido-trace "cd" dir) (setq ido-current-directory dir) - (if (get-buffer ido-completion-buffer) - (kill-buffer ido-completion-buffer)) + (and ido-completion-buffer + (get-buffer ido-completion-buffer) + (kill-buffer ido-completion-buffer)) (setq ido-directory-nonreadable (ido-nonreadable-directory-p dir)) (setq ido-directory-too-big (and (not ido-directory-nonreadable) (ido-directory-too-big-p dir))) @@ -1982,8 +1984,9 @@ (setq ido-text-init nil)) ido-completion-map nil hist)))) (ido-trace "read-from-minibuffer" ido-final-text) - (if (get-buffer ido-completion-buffer) - (kill-buffer ido-completion-buffer)) + (and ido-completion-buffer + (get-buffer ido-completion-buffer) + (kill-buffer ido-completion-buffer)) (ido-trace "\n_EXIT_" ido-exit) @@ -3837,8 +3840,9 @@ (defun ido-choose-completion-string (choice &rest ignored) (when (ido-active) ;; Insert the completion into the buffer where completion was requested. - (if (get-buffer ido-completion-buffer) - (kill-buffer ido-completion-buffer)) + (and ido-completion-buffer + (get-buffer ido-completion-buffer) + (kill-buffer ido-completion-buffer)) (cond ((ido-active t) ;; ido-use-merged-list (setq ido-current-directory "" @@ -3857,7 +3861,8 @@ "Show possible completions in a *File Completions* buffer." (interactive) (setq ido-rescan nil) - (let ((temp-buf (get-buffer ido-completion-buffer)) + (let ((temp-buf (and ido-completion-buffer + (get-buffer ido-completion-buffer))) display-it full-list) (if (and (eq last-command this-command) temp-buf) ;; scroll buffer @@ -3876,7 +3881,7 @@ (scroll-other-window)) (set-buffer buf)) (setq display-it t)) - (if display-it + (if (and ido-completion-buffer display-it) (with-output-to-temp-buffer ido-completion-buffer (let ((completion-list (sort (cond ------------------------------------------------------------ revno: 107640 committer: Sam Steingold branch nick: trunk timestamp: Wed 2012-03-21 12:07:04 -0400 message: (dired-listing-switches): "ls -b" breaks dired - document this diff: === modified file 'lisp/dired.el' --- lisp/dired.el 2012-03-10 05:20:58 +0000 +++ lisp/dired.el 2012-03-21 16:07:04 +0000 @@ -52,8 +52,8 @@ ;;;###autoload (defcustom dired-listing-switches (purecopy "-al") "Switches passed to `ls' for Dired. MUST contain the `l' option. -May contain all other options that don't contradict `-l'; -may contain even `F', `b', `i' and `s'. See also the variable +May contain all other options that don't contradict `-l' except for `b'; +may contain even `F', `i' and `s'. See also the variable `dired-ls-F-marks-symlinks' concerning the `F' switch. On systems such as MS-DOS and MS-Windows, which use `ls' emulation in Lisp, some of the `ls' switches are not supported; see the doc string of ------------------------------------------------------------ revno: 107639 committer: Sam Steingold branch nick: trunk timestamp: Wed 2012-03-21 12:01:18 -0400 message: * lisp/window.el (switch-to-prev-buffer): Do not switch to a visible window previous buffer, just like with the frame previous buffers. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-03-21 07:02:13 +0000 +++ lisp/ChangeLog 2012-03-21 16:01:18 +0000 @@ -1,3 +1,8 @@ +2012-03-21 Sam Steingold + + * window.el (switch-to-prev-buffer): Do not switch to a visible + window previous buffer, just like with the frame previous buffers. + 2012-03-21 Chong Yidong * faces.el (make-face, make-empty-face, copy-face): === modified file 'lisp/window.el' --- lisp/window.el 2012-03-11 13:30:30 +0000 +++ lisp/window.el 2012-03-21 16:01:18 +0000 @@ -2600,11 +2600,14 @@ (not (setq killed-buffers (cons new-buffer killed-buffers)))) (not (eq new-buffer old-buffer)) - (or bury-or-kill + (or bury-or-kill (not (memq new-buffer next-buffers)))) - (set-window-buffer-start-and-point - window new-buffer (nth 1 entry) (nth 2 entry)) - (throw 'found t))) + (if (get-buffer-window new-buffer) + ;; Try to avoid showing a buffer visible in some other window. + (setq visible new-buffer) + (set-window-buffer-start-and-point + window new-buffer (nth 1 entry) (nth 2 entry)) + (throw 'found t)))) ;; Scan reverted buffer list of WINDOW's frame next, skipping ;; entries of next buffers. Note that when we bury or kill a ;; buffer we don't reverse the global buffer list to avoid showing ------------------------------------------------------------ revno: 107638 [merge] committer: Kenichi Handa branch nick: trunk timestamp: Wed 2012-03-21 16:44:23 +0900 message: quail/indian.el ("devanagari-itrans"): Add a few more useful keys (Bug#10935). diff: === modified file 'leim/ChangeLog' --- leim/ChangeLog 2012-03-16 01:45:29 +0000 +++ leim/ChangeLog 2012-03-21 07:41:52 +0000 @@ -1,3 +1,8 @@ +2012-03-21 Kenichi Handa + + * quail/indian.el ("devanagari-itrans"): Add a few more useful + keys (Bug#10935). + 2012-03-16 Kenichi Handa * quail/indian.el (telugu-inscript): Fix typo. (Bug#10936) === modified file 'leim/quail/indian.el' --- leim/quail/indian.el 2012-03-16 01:45:29 +0000 +++ leim/quail/indian.el 2012-03-21 07:41:52 +0000 @@ -56,6 +56,11 @@ (quail-define-indian-trans-package indian-dev-itrans-v5-hash "devanagari-itrans" "Devanagari" "DevIT" "Devanagari transliteration by ITRANS method.") +(quail-defrule "..." ?॥) +(quail-defrule "\\'" ?॑) +(quail-defrule "\\_" ?॒) +(quail-defrule "\\__" ?_) +(quail-defrule "\\''" ?') (if nil (quail-define-package "devanagari-kyoto-harvard" "Devanagari" "DevKH" t "Devanagari Kyoto-Harvard")) ------------------------------------------------------------ revno: 107637 committer: Chong Yidong branch nick: trunk timestamp: Wed 2012-03-21 15:02:13 +0800 message: Updates to Display chapter of Lisp manual. * doc/lispref/display.texi (The Echo Area): Add xref to Output Streams. (Displaying Messages): Improve doc of message. (Echo Area Customization, Invisible Text): Copyedits. (Invisible Text): Mention that spec comparison is done with eq. (Width): Improve doc of char-width. (Faces): Recommend using symbol instead of string for face name. Minor clarifications. (Defining Faces): Copyedits. Update face example. (Attribute Functions): Mark set-face-foreground etc as commands. (Face Remapping): Mention text-scale-adjust. Clarify face-remapping-alist and related docs. (Face Functions): Don't document make-face or copy-face. * lisp/faces.el (make-face, make-empty-face, copy-face): * lisp/face-remap.el (face-remap-add-relative, face-remap-set-base): Doc fixes. * src/xfaces.c (Vface_remapping_alist): Doc fix. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2012-03-20 08:52:11 +0000 +++ doc/lispref/ChangeLog 2012-03-21 07:02:13 +0000 @@ -1,3 +1,18 @@ +2012-03-21 Chong Yidong + + * display.texi (The Echo Area): Add xref to Output Streams. + (Displaying Messages): Improve doc of message. + (Echo Area Customization, Invisible Text): Copyedits. + (Invisible Text): Mention that spec comparison is done with eq. + (Width): Improve doc of char-width. + (Faces): Recommend using symbol instead of string for face name. + Minor clarifications. + (Defining Faces): Copyedits. Update face example. + (Attribute Functions): Mark set-face-foreground etc as commands. + (Face Remapping): Mention text-scale-adjust. Clarify + face-remapping-alist and related docs. + (Face Functions): Don't document make-face or copy-face. + 2012-03-20 Chong Yidong * display.texi (Forcing Redisplay): Various rewrites to reflect === modified file 'doc/lispref/display.texi' --- doc/lispref/display.texi 2012-03-20 08:52:11 +0000 +++ doc/lispref/display.texi 2012-03-21 07:02:13 +0000 @@ -243,14 +243,12 @@ (@pxref{Errors}), for messages made with the @code{message} primitive, and for echoing keystrokes. It is not the same as the minibuffer, despite the fact that the minibuffer appears (when active) in the same -place on the screen as the echo area. The @cite{GNU Emacs Manual} -specifies the rules for resolving conflicts between the echo area and -the minibuffer for use of that screen space (@pxref{Minibuffer,, The -Minibuffer, emacs, The GNU Emacs Manual}). +place on the screen as the echo area. @xref{Minibuffer,, The +Minibuffer, emacs, The GNU Emacs Manual}. - You can write output in the echo area by using the Lisp printing -functions with @code{t} as the stream (@pxref{Output Functions}), or -explicitly. + Apart from the functions documented in this section, you can print +Lisp objects to the echo area by specifying @code{t} as the output +stream. @xref{Output Streams}. @menu * Displaying Messages:: Explicitly displaying text in the echo area. @@ -263,27 +261,26 @@ @subsection Displaying Messages in the Echo Area @cindex display message in echo area - This section describes the functions for explicitly producing echo -area messages. Many other Emacs features display messages there, too. + This section describes the standard functions for displaying +messages in the echo area. @defun message format-string &rest arguments -This function displays a message in the echo area. The argument -@var{format-string} is similar to a C language @code{printf} format -string. See @code{format} in @ref{Formatting Strings}, for the details -on the conversion specifications. @code{message} returns the -constructed string. - -In batch mode, @code{message} prints the message text on the standard -error stream, followed by a newline. - -If @var{format-string}, or strings among the @var{arguments}, have -@code{face} text properties, these affect the way the message is displayed. - -@c Emacs 19 feature +This function displays a message in the echo area. +@var{format-string} is a format string, and @var{arguments} are the +objects for its format specifications, like in the @code{format} +function (@pxref{Formatting Strings}). The resulting formatted string +is displayed in the echo area; if it contains @code{face} text +properties, it is displayed with the specified faces (@pxref{Faces}). +The string is also added to the @samp{*Messages*} buffer, but without +text properties (@pxref{Logging Messages}). + +In batch mode, the message is printed to the standard error stream, +followed by a newline. + If @var{format-string} is @code{nil} or the empty string, @code{message} clears the echo area; if the echo area has been -expanded automatically, this brings it back to its normal size. -If the minibuffer is active, this brings the minibuffer contents back +expanded automatically, this brings it back to its normal size. If +the minibuffer is active, this brings the minibuffer contents back onto the screen immediately. @example @@ -559,13 +556,13 @@ Normally, displaying a long message resizes the echo area to display the entire message. But if the variable @code{message-truncate-lines} is non-@code{nil}, the echo area does not resize, and the message is -truncated to fit it, as in Emacs 20 and before. +truncated to fit it. @end defvar The variable @code{max-mini-window-height}, which specifies the maximum height for resizing minibuffer windows, also applies to the -echo area (which is really a special use of the minibuffer window. -@xref{Minibuffer Misc}.). +echo area (which is really a special use of the minibuffer window; +@pxref{Minibuffer Misc}). @node Warnings @section Reporting Warnings @@ -762,10 +759,11 @@ @cindex invisible text You can make characters @dfn{invisible}, so that they do not appear on the screen, with the @code{invisible} property. This can be either a -text property (@pxref{Text Properties}) or a property of an overlay +text property (@pxref{Text Properties}) or an overlay property (@pxref{Overlays}). Cursor motion also partly ignores these -characters; if the command loop finds point within them, it moves -point to the other side of them. +characters; if the command loop finds that point is inside a range of +invisible text after a command, it relocates point to the other side +of the text. In the simplest case, any non-@code{nil} @code{invisible} property makes a character invisible. This is the default case---if you don't alter @@ -805,13 +803,15 @@ @table @code @item @var{atom} -A character is invisible if its @code{invisible} property value -is @var{atom} or if it is a list with @var{atom} as a member. +A character is invisible if its @code{invisible} property value is +@var{atom} or if it is a list with @var{atom} as a member; comparison +is done with @code{eq}. @item (@var{atom} . t) A character is invisible if its @code{invisible} property value is -@var{atom} or if it is a list with @var{atom} as a member. Moreover, -a sequence of such characters displays as an ellipsis. +@var{atom} or if it is a list with @var{atom} as a member; comparison +is done with @code{eq}. Moreover, a sequence of such characters +displays as an ellipsis. @end table @end table @end defvar @@ -846,7 +846,7 @@ (overlay-put (make-overlay beginning end) 'invisible 'my-symbol) -;; @r{When done with the overlays:} +;; @r{When done with the invisibility:} (remove-from-invisibility-spec '(my-symbol . t)) ;; @r{Or respectively:} (remove-from-invisibility-spec 'my-symbol) @@ -872,15 +872,16 @@ non-@code{nil} (the default), but only because they are explicitly programmed to do so. - However, if a command ends with point inside or at the boundary of invisible -text, the main editing loop moves point to one of the two ends of the invisible -text. Which end to move to is chosen based on the following factors: make sure -that the overall movement of the command is still in the same direction, and -prefer a position where an inserted char would not inherit the @code{invisible} -property. Additionally, if the text is not replaced by an ellipsis and the -command only moved within the invisible text, then point is moved one extra -character so as to try and reflect the command's movement by a visible movement -of the cursor. + However, if a command ends with point inside or at the boundary of +invisible text, the main editing loop relocates point to one of the +two ends of the invisible text. Emacs chooses the direction of +relocation so that it is the same as the overall movement direction of +the command; if in doubt, it prefers a position where an inserted char +would not inherit the @code{invisible} property. Additionally, if the +text is not replaced by an ellipsis and the command only moved within +the invisible text, then point is moved one extra character so as to +try and reflect the command's movement by a visible movement of the +cursor. Thus, if the command moved point back to an invisible range (with the usual stickiness), Emacs moves point back to the beginning of that range. If the @@ -1666,8 +1667,11 @@ @ref{Screen Lines}, for related functions. @defun char-width char -This function returns the width in columns of the character @var{char}, -if it were displayed in the current buffer and the selected window. +This function returns the width in columns of the character +@var{char}, if it were displayed in the current buffer (i.e.@: taking +into account the buffer's display table, if any; @pxref{Display +Tables}). The width of a tab character is usually @code{tab-width} +(@pxref{Usual Display}). @end defun @defun string-width string @@ -1813,26 +1817,27 @@ @section Faces @cindex faces - A @dfn{face} is a collection of graphical attributes for displaying -text: font, foreground color, background color, optional underlining, -and so on. Faces control how buffer text is displayed, and how some -parts of the frame, such as the mode-line, are displayed. + A @dfn{face} is a collection of graphical @dfn{attributes} for +displaying text: font, foreground color, background color, optional +underlining, and so on. Faces control how Emacs displays text in +buffers, as well as other parts of the frame such as the mode line. @xref{Standard Faces,,, emacs, The GNU Emacs Manual}, for the list of faces Emacs normally comes with. @cindex face id For most purposes, you refer to a face in Lisp programs using its -@dfn{face name}. This is either a string or (equivalently) a Lisp -symbol whose name is equal to that string. +@dfn{face name}, which is usually a Lisp symbol. For backward +compatibility, a face name can also be a string, which is equivalent +to a Lisp symbol of the same name. @defun facep object This function returns a non-@code{nil} value if @var{object} is a Lisp symbol or string that names a face. Otherwise, it returns @code{nil}. @end defun - Each face name is meaningful for all frames, and by default it has -the same meaning in all frames. But you can arrange to give a -particular face name a special meaning in one frame if you wish. + By default, each face name corresponds to the same set of attributes +in all frames. But you can also assign a face name a special set of +attributes in one frame (@pxref{Attribute Functions}). @menu * Defining Faces:: How to define a face with @code{defface}. @@ -1855,9 +1860,8 @@ @subsection Defining Faces The way to define a new face is with @code{defface}. This creates a -kind of customization item (@pxref{Customization}) which the user can -customize using the Customization buffer (@pxref{Easy Customization,,, -emacs, The GNU Emacs Manual}). +kind of customization item which the user can customize using the +Customization buffer (@pxref{Customization}). People are sometimes tempted to create variables whose values specify which faces to use (for example, Font-Lock does this). In the vast @@ -1883,14 +1887,16 @@ The purpose of @var{spec} is to specify how the face should appear on different kinds of terminals. It should be an alist whose elements -have the form @code{(@var{display} @var{atts})}. Each element's -@sc{car}, @var{display}, specifies a class of terminals. (The first -element, if its @sc{car} is @code{default}, is special---it specifies -defaults for the remaining elements). The element's @sc{cadr}, -@var{atts}, is a list of face attributes and their values; it -specifies what the face should look like on that kind of terminal. -The possible attributes are defined in the value of -@code{custom-face-attributes}. +have the form @code{(@var{display} @var{atts})}. @var{display} +specifies a class of terminals (see below), while @var{atts} is a +property list of face attributes and their values, specifying the +appearance of the face on matching terminals +@iftex +(see the next section for details about face attributes). +@end iftex +@ifnottex +(@pxref{Face Attributes}, for details about face attributes). +@end ifnottex The @var{display} part of an element of @var{spec} determines which frames the element matches. If more than one element of @var{spec} @@ -1952,29 +1958,23 @@ @end table @end defmac - Here's how the standard face @code{region} is defined: + Here's how the standard face @code{highlight} is defined: @example -@group -(defface region - '((((class color) (min-colors 88) (background dark)) - :background "blue3") -@end group - (((class color) (min-colors 88) (background light)) - :background "lightgoldenrod2") +(defface highlight + '((((class color) (min-colors 88) (background light)) + :background "darkseagreen2") + (((class color) (min-colors 88) (background dark)) + :background "darkolivegreen") + (((class color) (min-colors 16) (background light)) + :background "darkseagreen2") (((class color) (min-colors 16) (background dark)) - :background "blue3") - (((class color) (min-colors 16) (background light)) - :background "lightgoldenrod2") + :background "darkolivegreen") (((class color) (min-colors 8)) - :background "blue" :foreground "white") - (((type tty) (class mono)) - :inverse-video t) - (t :background "gray")) -@group - "Basic face for highlighting the region." + :background "green" :foreground "black") + (t :inverse-video t)) + "Basic face for highlighting." :group 'basic-faces) -@end group @end example Internally, @code{defface} uses the symbol property @@ -2010,8 +2010,8 @@ fails to specify a particular attribute, the next face gets a chance. However, the @code{default} face must specify all attributes. - Some of these font attributes are meaningful only on certain kinds -of displays. If your display cannot handle a certain attribute, the + Some of these attributes are meaningful only on certain kinds of +displays. If your display cannot handle a certain attribute, the attribute is ignored. @table @code @@ -2216,20 +2216,18 @@ the @code{defface} says. The extra arguments @var{arguments} specify the attributes to set, and -the values for them. They should consist of alternating attribute names -(such as @code{:family} or @code{:underline}) and corresponding values. -Thus, +the values for them. They should consist of alternating attribute +names (such as @code{:family} or @code{:underline}) and values. Thus, @example (set-face-attribute 'foo nil :width 'extended - :weight 'bold - :underline "red") + :weight 'bold) @end example @noindent -sets the attributes @code{:width}, @code{:weight} and @code{:underline} -to the corresponding values. +sets the attribute @code{:width} to @code{extended} and the attribute +@code{:weight} to @code{bold}. If @var{frame} is @code{t}, this function sets the default attributes for new frames. Default attribute values specified this way override @@ -2306,54 +2304,51 @@ face attribute @var{attribute}, returns @var{value1} unchanged. @end defun - The following functions provide compatibility with Emacs 20 and -below. They work by calling @code{set-face-attribute}. Values of -@code{t} and @code{nil} for their @var{frame} argument are handled -just like @code{set-face-attribute} and @code{face-attribute}. - -@defun set-face-foreground face color &optional frame -@defunx set-face-background face color &optional frame -These functions set the @code{:foreground} attribute (or -@code{:background} attribute, respectively) of @var{face} to -@var{color}. -@end defun - -@defun set-face-stipple face pattern &optional frame -This function sets the @code{:stipple} attribute of @var{face} to + The following commands and functions mostly provide compatibility +with old versions of Emacs. They work by calling +@code{set-face-attribute}. Values of @code{t} and @code{nil} for +their @var{frame} argument are handled just like +@code{set-face-attribute} and @code{face-attribute}. The commands +read their arguments using the minibuffer, if called interactively. + +@deffn Command set-face-foreground face color &optional frame +@deffnx Command set-face-background face color &optional frame +These set the @code{:foreground} attribute (or @code{:background} +attribute, respectively) of @var{face} to @var{color}. +@end deffn + +@deffn Command set-face-stipple face pattern &optional frame +This sets the @code{:stipple} attribute of @var{face} to @var{pattern}. -@end defun +@end deffn -@defun set-face-font face font &optional frame -This function sets the @code{:font} attribute of @var{face} to -@var{font}. -@end defun +@deffn Command set-face-font face font &optional frame +This sets the @code{:font} attribute of @var{face} to @var{font}. +@end deffn @defun set-face-bold-p face bold-p &optional frame -This function sets the @code{:weight} attribute of @var{face} to -@var{normal} if @var{bold-p} is @code{nil}, and to @var{bold} -otherwise. +This sets the @code{:weight} attribute of @var{face} to @var{normal} +if @var{bold-p} is @code{nil}, and to @var{bold} otherwise. @end defun @defun set-face-italic-p face italic-p &optional frame -This function sets the @code{:slant} attribute of @var{face} to -@var{normal} if @var{italic-p} is @code{nil}, and to @var{italic} -otherwise. +This sets the @code{:slant} attribute of @var{face} to @var{normal} if +@var{italic-p} is @code{nil}, and to @var{italic} otherwise. @end defun @defun set-face-underline-p face underline &optional frame -This function sets the @code{:underline} attribute of @var{face} to +This sets the @code{:underline} attribute of @var{face} to @var{underline}. @end defun @defun set-face-inverse-video-p face inverse-video-p &optional frame -This function sets the @code{:inverse-video} attribute of @var{face} -to @var{inverse-video-p}. +This sets the @code{:inverse-video} attribute of @var{face} to +@var{inverse-video-p}. @end defun -@defun invert-face face &optional frame -This function swaps the foreground and background colors of face -@var{face}. -@end defun +@deffn Command invert-face face &optional frame +This swaps the foreground and background colors of face @var{face}. +@end deffn The following functions examine the attributes of a face. If you don't specify @var{frame}, they refer to the selected frame; @code{t} @@ -2459,27 +2454,26 @@ If these various sources together specify more than one face for a particular character, Emacs merges the attributes of the various faces specified. For each attribute, Emacs tries using the above order -(i.e., first the face of any special glyph; then the face for region -highlighting, if appropriate; then faces specified by overlays, then -faces specified by text properties, then the @code{mode-line} or -@code{mode-line-inactive} or @code{header-line} face, if appropriate, -and finally the @code{default} face). +(i.e.@: first the face of any special glyph; then the face for region +highlighting, if appropriate; and so on). @node Face Remapping @subsection Face Remapping The variable @code{face-remapping-alist} is used for buffer-local or -global changes in the appearance of a face. For instance, it can be -used to make the @code{default} face a variable-pitch face within a -particular buffer. +global changes in the appearance of a face. For instance, it is used +to implement the @code{text-scale-adjust} command (@pxref{Text +Scale,,, emacs, The GNU Emacs Manual}). @defvar face-remapping-alist -An alist whose elements have the form @code{(@var{face} -@var{remapping...})}. This causes Emacs to display text using the -face @var{face} using @var{remapping...} instead of @var{face}'s -ordinary definition. @var{remapping...} may be any face specification -suitable for a @code{face} text property: either a face name, or a -property list of attribute/value pairs. @xref{Special Properties}. +The value of this variable is an alist whose elements have the form +@code{(@var{face} . @var{remapping})}. This causes Emacs to display +any text having the face @var{face} with @var{remapping}, rather than +the ordinary definition of @var{face}. @var{remapping} may be any +face specification suitable for a @code{face} text property: either a +face name, or a property list of attribute/value pairs, or a list in +which each element is either a face name or a property list +(@pxref{Special Properties}). If @code{face-remapping-alist} is buffer-local, its local value takes effect only within that buffer. @@ -2488,17 +2482,15 @@ @enumerate @item -The new definition @var{remapping...} is the complete -specification of how to display @var{face}---it entirely replaces, -rather than augmenting or modifying, the normal definition of that -face. +@var{remapping} serves as the complete specification for the remapped +face---it replaces the normal definition of @var{face}, instead of +modifying it. @item -If @var{remapping...} recursively references the same face name -@var{face}, either directly remapping entry, or via the -@code{:inherit} attribute of some other face in @var{remapping...}, -then that reference uses the normal definition of @var{face} in the -selected frame, instead of the ``remapped'' definition. +If @var{remapping} references the same face name @var{face}, either +directly or via the @code{:inherit} attribute of some other face in +@var{remapping}, that reference uses the normal definition of +@var{face}. In other words, the remapping cannot be recursive. For instance, if the @code{mode-line} face is remapped using this entry in @code{face-remapping-alist}: @@ -2512,82 +2504,72 @@ @end enumerate @end defvar - A typical use of the @code{face-remapping-alist} is to change a -buffer's @code{default} face; for example, the following changes a -buffer's @code{default} face to use the @code{variable-pitch} face, -with the height doubled: - -@example -(set (make-local-variable 'face-remapping-alist) - '((default variable-pitch :height 2.0))) -@end example - The following functions implement a higher-level interface to -@code{face-remapping-alist}, making it easier to use -``cooperatively''. They are mainly intended for buffer-local use, and -so all make @code{face-remapping-alist} variable buffer-local as a -side-effect. They use entries in @code{face-remapping-alist} which -have the general form: +@code{face-remapping-alist}. Most Lisp code should use these +functions instead of setting @code{face-remapping-alist} directly, to +avoid trampling on remappings applied elsewhere. These functions are +intended for buffer-local remappings, so they all make +@code{face-remapping-alist} buffer-local as a side-effect. They manage +@code{face-remapping-alist} entries of the form @example - (@var{face} @var{relative_specs_1} @var{relative_specs_2} @var{...} @var{base_specs}) + (@var{face} @var{relative-spec-1} @var{relative-spec-2} @var{...} @var{base-spec}) @end example -Everything except @var{face} is a ``face spec'': a list of face names -or face attribute-value pairs. All face specs are merged together, -with earlier values taking precedence. - -The @var{relative_specs_}n values are ``relative specs'', and are -added by @code{face-remap-add-relative} (and removed by -@code{face-remap-remove-relative}. These are intended for face -modifications (such as increasing the size). Typical users of these -relative specs would be minor modes. - -@var{base_specs} is the lowest-priority value, and by default is just the -face name, which causes the global definition of that face to be used. - -A non-default value of @var{base_specs} may also be set using -@code{face-remap-set-base}. Because this @emph{overwrites} the -default base-spec value (which inherits the global face definition), -it is up to the caller of @code{face-remap-set-base} to add such -inheritance if it is desired. A typical use of -@code{face-remap-set-base} would be a major mode adding a face -remappings, e.g., of the default face. - +@noindent +where, as explained above, each of the @var{relative-spec-N} and +@var{base-spec} is either a face name, or a property list of +attribute/value pairs. Each of the @dfn{relative remapping} entries, +@var{relative-spec-N}, is managed by the +@code{face-remap-add-relative} and @code{face-remap-remove-relative} +functions; these are intended for simple modifications like changing +the text size. The @dfn{base remapping} entry, @var{base-spec}, has +the lowest priority and is managed by the @code{face-remap-set-base} +and @code{face-remap-reset-base} functions; it is intended for major +modes to remap faces in the buffers they control. @defun face-remap-add-relative face &rest specs -This functions adds a face remapping entry of @var{face} to @var{specs} -in the current buffer. - -It returns a ``cookie'' which can be used to later delete the remapping with -@code{face-remap-remove-relative}. - -@var{specs} can be any value suitable for the @code{face} text -property, including a face name, a list of face names, or a -face-attribute property list. The attributes given by @var{specs} -will be merged with any other currently active face remappings of -@var{face}, and with the global definition of @var{face} (by default; -this may be changed using @code{face-remap-set-base}), with the most -recently added relative remapping taking precedence. +This functions adds the face specifications in @var{specs} as relative +remappings for face @var{face} in the current buffer. The remaining +arguments, @var{specs}, should form either a list of face names, or a +property list of attribute/value pairs. + +The return value is a Lisp object that serves as a ``cookie''; you can +pass this object as an argument to @code{face-remap-remove-relative} +if you need to remove the remapping later. + +@example +;; Remap the `escape-glyph' face into a combination +;; of the `highlight' and `italic' faces: +(face-remap-add-relative 'escape-glyph 'highlight 'italic) + +;; Increase the size of the `default' face by 50%: +(face-remap-add-relative 'default :height 1.5) +@end example @end defun @defun face-remap-remove-relative cookie -This function removes a face remapping previously added by -@code{face-remap-add-relative}. @var{cookie} should be a return value -from that function. +This function removes a relative remapping previously added by +@code{face-remap-add-relative}. @var{cookie} should be the Lisp +object returned by @code{face-remap-add-relative} when the remapping +was added. @end defun @defun face-remap-set-base face &rest specs -This function sets the ``base remapping'' of @var{face} in the current +This function sets the base remapping of @var{face} in the current buffer to @var{specs}. If @var{specs} is empty, the default base -remapping is restored, which inherits from the global definition of -@var{face}; note that this is different from @var{specs} containing a +remapping is restored, similar to calling @code{face-remap-reset-base} +(see below); note that this is different from @var{specs} containing a single value @code{nil}, which has the opposite result (the global definition of @var{face} is ignored). + +This overwrites the default @var{base-spec}, which inherits the global +face definition, so it is up to the caller to add such inheritance if +so desired. @end defun @defun face-remap-reset-base face -This function sets the ``base remapping'' of @var{face} to its default +This function sets the base remapping of @var{face} to its default value, which inherits from @var{face}'s global definition. @end defun @@ -2596,29 +2578,8 @@ Here are additional functions for creating and working with faces. -@defun make-face name -This function defines a new face named @var{name}, initially with all -attributes @code{nil}. It does nothing if there is already a face named -@var{name}. -@end defun - @defun face-list -This function returns a list of all defined faces. -@end defun - -@defun copy-face old-face new-name &optional frame new-frame -This function defines a face named @var{new-name} as a copy of the existing -face named @var{old-face}. It creates the face @var{new-name} if that -doesn't already exist. - -If the optional argument @var{frame} is given, this function applies -only to that frame. Otherwise it applies to each frame individually, -copying attributes from @var{old-face} in each frame to @var{new-face} -in the same frame. - -If the optional argument @var{new-frame} is given, then @code{copy-face} -copies the attributes of @var{old-face} in @var{frame} to @var{new-name} -in @var{new-frame}. +This function returns a list of all defined face names. @end defun @defun face-id face @@ -2752,7 +2713,7 @@ @node Font Selection @subsection Font Selection - Before Emacs can draw a character on a particular display, it must + Before Emacs can draw a character on a graphical display, it must select a @dfn{font} for that character@footnote{In this context, the term @dfn{font} has nothing to do with Font Lock (@pxref{Font Lock Mode}).}. @xref{Fonts,,, emacs, The GNU Emacs Manual}. Normally, === modified file 'etc/NEWS' --- etc/NEWS 2012-03-16 00:57:00 +0000 +++ etc/NEWS 2012-03-21 07:02:13 +0000 @@ -123,6 +123,8 @@ *** Completion style can be set per-category `completion-category-overrides'. +++ *** Completion of buffers now uses substring completion by default. +--- +*** The `widget-complete-field' option has been removed. ** Mail changes === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-03-21 02:13:52 +0000 +++ lisp/ChangeLog 2012-03-21 07:02:13 +0000 @@ -1,3 +1,9 @@ +2012-03-21 Chong Yidong + + * faces.el (make-face, make-empty-face, copy-face): + * face-remap.el (face-remap-add-relative, face-remap-set-base): + Doc fixes. + 2012-03-21 Stefan Monnier * wid-edit.el (widget-complete-field): Remove (bug#11051). === modified file 'lisp/face-remap.el' --- lisp/face-remap.el 2012-02-08 02:12:24 +0000 +++ lisp/face-remap.el 2012-03-21 07:02:13 +0000 @@ -106,21 +106,20 @@ ;;;###autoload (defun face-remap-add-relative (face &rest specs) "Add a face remapping entry of FACE to SPECS in the current buffer. - -Return a cookie which can be used to delete the remapping with +Return a cookie which can be used to delete this remapping with `face-remap-remove-relative'. -SPECS can be any value suitable for the `face' text property, -including a face name, a list of face names, or a face-attribute -property list. The attributes given by SPECS will be merged with -any other currently active face remappings of FACE, and with the -global definition of FACE. An attempt is made to sort multiple -entries so that entries with relative face-attributes are applied -after entries with absolute face-attributes. +The remaining arguments, SPECS, should be either a list of face +names, or a property list of face attribute/value pairs. The +remapping specified by SPECS takes effect alongside the +remappings from other calls to `face-remap-add-relative', as well +as the normal definition of FACE (at lowest priority). This +function tries to sort multiple remappings for the same face, so +that remappings specifying relative face attributes are applied +after remappings specifying absolute face attributes. -The base (lowest priority) remapping may be set to a specific -value, instead of the default of the global face definition, -using `face-remap-set-base'." +The base (lowest priority) remapping may be set to something +other than the normal definition of FACE via `face-remap-set-base'." (while (and (consp specs) (null (cdr specs))) (setq specs (car specs))) (make-local-variable 'face-remapping-alist) @@ -148,7 +147,9 @@ ;;;###autoload (defun face-remap-reset-base (face) - "Set the base remapping of FACE to inherit from FACE's global definition." + "Set the base remapping of FACE to the normal definition of FACE. +This causes the remappings specified by `face-remap-add-relative' +to apply on top of the normal definition of FACE." (let ((entry (assq face face-remapping-alist))) (when entry ;; If there's nothing except a base remapping, we simply remove @@ -163,10 +164,15 @@ ;;;###autoload (defun face-remap-set-base (face &rest specs) "Set the base remapping of FACE in the current buffer to SPECS. -If SPECS is empty, the default base remapping is restored, which -inherits from the global definition of FACE; note that this is -different from SPECS containing a single value `nil', which does -not inherit from the global definition of FACE." +This causes the remappings specified by `face-remap-add-relative' +to apply on top of the face specification given by SPECS. SPECS +should be either a list of face names, or a property list of face +attribute/value pairs. + +If SPECS is empty, call `face-remap-reset-base' to use the normal +definition of FACE as the base remapping; note that this is +different from SPECS containing a single value `nil', which means +not to inherit from the global definition of FACE at all." (while (and (consp specs) (not (null (car specs))) (null (cdr specs))) (setq specs (car specs))) (if (or (null specs) === modified file 'lisp/faces.el' --- lisp/faces.el 2012-03-18 14:18:01 +0000 +++ lisp/faces.el 2012-03-21 07:02:13 +0000 @@ -122,15 +122,13 @@ "Return a list of all defined faces." (mapcar #'car face-new-frame-defaults)) - -;;; ### If not frame-local initialize by what X resources? - (defun make-face (face &optional no-init-from-resources) "Define a new face with name FACE, a symbol. -NO-INIT-FROM-RESOURCES non-nil means don't initialize frame-local -variants of FACE from X resources. (X resources recognized are found -in the global variable `face-x-resources'.) If FACE is already known -as a face, leave it unmodified. Value is FACE." +Do not call this directly from Lisp code; use `defface' instead. + +If NO-INIT-FROM-RESOURCES is non-nil, don't initialize face +attributes from X resources. If FACE is already known as a face, +leave it unmodified. Return FACE." (interactive (list (read-from-minibuffer "Make face: " nil nil t 'face-name-history))) (unless (facep face) @@ -145,31 +143,30 @@ (make-face-x-resource-internal face))) face) - (defun make-empty-face (face) "Define a new, empty face with name FACE. -If the face already exists, it is left unmodified. Value is FACE." +Do not call this directly from Lisp code; use `defface' instead." (interactive (list (read-from-minibuffer "Make empty face: " nil nil t 'face-name-history))) (make-face face 'no-init-from-resources)) - (defun copy-face (old-face new-face &optional frame new-frame) - "Define a face just like OLD-FACE, with name NEW-FACE. - -If NEW-FACE already exists as a face, it is modified to be like -OLD-FACE. If it doesn't already exist, it is created. - -If the optional argument FRAME is given as a frame, NEW-FACE is -changed on FRAME only. -If FRAME is t, the frame-independent default specification for OLD-FACE -is copied to NEW-FACE. -If FRAME is nil, copying is done for the frame-independent defaults -and for each existing frame. - -If the optional fourth argument NEW-FRAME is given, -copy the information from face OLD-FACE on frame FRAME -to NEW-FACE on frame NEW-FRAME. In this case, FRAME may not be nil." + "Define a face named NEW-FACE, which is a copy of OLD-FACE. +This function does not copy face customization data, so NEW-FACE +will not be made customizable. Most Lisp code should not call +this function; use `defface' with :inherit instead. + +If NEW-FACE already exists as a face, modify it to be like +OLD-FACE. If NEW-FACE doesn't already exist, create it. + +If the optional argument FRAME is a frame, change NEW-FACE on +FRAME only. If FRAME is t, copy the frame-independent default +specification for OLD-FACE to NEW-FACE. If FRAME is nil, copy +the defaults as well as the faces on each existing frame. + +If the optional fourth argument NEW-FRAME is given, copy the +information from face OLD-FACE on frame FRAME to NEW-FACE on +frame NEW-FRAME. In this case, FRAME must not be nil." (let ((inhibit-quit t)) (if (null frame) (progn === modified file 'src/ChangeLog' --- src/ChangeLog 2012-03-20 18:49:18 +0000 +++ src/ChangeLog 2012-03-21 07:02:13 +0000 @@ -1,3 +1,7 @@ +2012-03-21 Chong Yidong + + * xfaces.c (Vface_remapping_alist): Doc fix. + 2012-03-20 Eli Zaretskii * w32proc.c (Fw32_set_console_codepage) === modified file 'src/xfaces.c' --- src/xfaces.c 2012-02-06 08:19:09 +0000 +++ src/xfaces.c 2012-03-21 07:02:13 +0000 @@ -6599,20 +6599,22 @@ doc: /* Alist of face remappings. Each element is of the form: - (FACE REPLACEMENT...), - -which causes display of the face FACE to use REPLACEMENT... instead. -REPLACEMENT... is interpreted the same way as the value of a `face' -text property: it may be (1) A face name, (2) A list of face names, -(3) A property-list of face attribute/value pairs, or (4) A list of -face names or lists containing face attribute/value pairs. - -Multiple entries in REPLACEMENT... are merged together to form the final -result, with faces or attributes earlier in the list taking precedence -over those that are later. - -Face-name remapping cycles are suppressed; recursive references use the -underlying face instead of the remapped face. So a remapping of the form: + (FACE . REPLACEMENT), + +which causes display of the face FACE to use REPLACEMENT instead. +REPLACEMENT is a face specification, i.e. one of the following: + + (1) a face name + (2) a property list of attribute/value pairs, or + (3) a list in which each element has the form of (1) or (2). + +List values for REPLACEMENT are merged to form the final face +specification, with earlier entries taking precedence, in the same as +as in the `face' text property. + +Face-name remapping cycles are suppressed; recursive references use +the underlying face instead of the remapped face. So a remapping of +the form: (FACE EXTRA-FACE... FACE) @@ -6620,13 +6622,13 @@ (FACE (FACE-ATTR VAL ...) FACE) -will cause EXTRA-FACE... or (FACE-ATTR VAL ...) to be _merged_ with the -existing definition of FACE. Note that for the default face, this isn't -necessary, as every face inherits from the default face. +causes EXTRA-FACE... or (FACE-ATTR VAL ...) to be _merged_ with the +existing definition of FACE. Note that this isn't necessary for the +default face, since every face inherits from the default face. -Making this variable buffer-local is a good way to allow buffer-specific -face definitions. For instance, the mode my-mode could define a face -`my-mode-default', and then in the mode setup function, do: +If this variable is made buffer-local, the face remapping takes effect +only in that buffer. For instance, the mode my-mode could define a +face `my-mode-default', and then in the mode setup function, do: (set (make-local-variable 'face-remapping-alist) '((default my-mode-default)))). ------------------------------------------------------------ revno: 107636 fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11051 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2012-03-20 22:13:52 -0400 message: * lisp/wid-edit.el (widget-complete-field): Remove. (widget-complete): Remove broken use of it. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-03-20 15:44:45 +0000 +++ lisp/ChangeLog 2012-03-21 02:13:52 +0000 @@ -1,7 +1,12 @@ +2012-03-21 Stefan Monnier + + * wid-edit.el (widget-complete-field): Remove (bug#11051). + (widget-complete): Remove broken use of it. + 2012-03-20 Chong Yidong - * emacs-lisp/tabulated-list.el (tabulated-list-print-entry): Use - string-width and truncate-string-width to handle arbitrary + * emacs-lisp/tabulated-list.el (tabulated-list-print-entry): + Use string-width and truncate-string-width to handle arbitrary characters. 2012-03-20 Tassilo Horn @@ -17,8 +22,7 @@ 2012-03-18 Leo Liu - * net/rcirc.el (rcirc-cmd-quit): Allow quiting all servers with - prefix. + * net/rcirc.el (rcirc-cmd-quit): Allow quiting all servers with prefix. 2012-03-17 Eli Zaretskii @@ -48,7 +52,7 @@ (hfy-fontify-buffer): Use above handlers. (hfy-face-to-css-default): Same as the earlier `hfy-face-to-css'. (hfy-face-to-css): Re-defined to be a variable. - (hfy-compile-stylesheet): Modified. Allow stylesheet to be built + (hfy-compile-stylesheet): Modify. Allow stylesheet to be built over multiple runs. This is made possible by having the caller let bind a special variable `hfy-user-sheet-assoc'. (htmlfontify-string): New defun. @@ -72,10 +76,8 @@ * progmodes/cc-engine.el (c-crosses-statement-barrier-p): Use a limit to a call of `c-literal-limits'. (c-determine-+ve-limit): New function. - (c-at-macro-vsemi-p): Move `c-in-literal' to the bottom of an - `and'. - (c-guess-basic-syntax): In macros, restrict a search limit to - 2000. + (c-at-macro-vsemi-p): Move `c-in-literal' to the bottom of an `and'. + (c-guess-basic-syntax): In macros, restrict a search limit to 2000. In CASE 5B, restrict a search limit to 500. (c-just-after-func-arglist-p): Obviouly wrong `or' -> `and'. @@ -89,7 +91,7 @@ 2012-03-16 Aaron S. Hawley * tar-mode.el (tar-mode): Fix saving by conditionally undoing - `special-mode' setting of `buffer-read-only'. (Bug#11010) + `special-mode' setting of `buffer-read-only'. (Bug#11010) 2012-03-16 Glenn Morris @@ -156,8 +158,7 @@ 2012-03-12 Leo Liu - * simple.el (kill-new): Use equal-including-properties for - comparison. + * simple.el (kill-new): Use equal-including-properties for comparison. (kill-do-not-save-duplicates): Doc fix. 2012-03-12 Stefan Monnier @@ -239,8 +240,7 @@ * net/mairix.el (mairix-replace-invalid-chars): Rename from mairix-replace-illegal-chars; all callers changed. Don't remove - ^, ~, and = characters: they are meaningful in mairix search - specs. + ^, ~, and = characters: they are meaningful in mairix search specs. (mairix-widget-create-query): Add usage information about mairix search forms: negating words, searching for substrings, etc. @@ -425,8 +425,7 @@ 2012-03-04 Chong Yidong - * cus-start.el: Make x-select-enable-clipboard-manager - customizable. + * cus-start.el: Make x-select-enable-clipboard-manager customizable. 2012-03-04 Glenn Morris @@ -557,7 +556,7 @@ (font-lock-default-function): Move the check for a specification to font-lock-spec-present. - * font-lock.el (font-lock-initial-fontify): call ... + * font-lock.el (font-lock-initial-fontify): Call ... (font-lock-spec-present): New function. 2012-02-26 Jim Blandy @@ -886,8 +885,7 @@ 2012-02-12 Teodor Zlatanov - * net/gnutls.el (gnutls-algorithm-priority): Add missing :group - tag. + * net/gnutls.el (gnutls-algorithm-priority): Add missing :group tag. 2012-02-12 Alan Mackenzie @@ -1060,8 +1058,8 @@ * progmodes/cc-guess.el (c-guess-offset-threshold, c-guess-region-max): Add :version tags. - * progmodes/compile.el (compilation-first-column) - (compilation-error-screen-columns, compilation-filter-start): Doc fixes. + * progmodes/compile.el (compilation-error-screen-columns) + (compilation-first-column, compilation-filter-start): Doc fixes. * vc/log-view.el (log-view-toggle-entry-display): * vc/vc.el (vc-merge, vc-pull): Doc fixes. === modified file 'lisp/wid-edit.el' --- lisp/wid-edit.el 2012-02-05 15:33:30 +0000 +++ lisp/wid-edit.el 2012-03-21 02:13:52 +0000 @@ -1141,12 +1141,6 @@ (kill-region (point) end) (call-interactively 'kill-line)))) -(defcustom widget-complete-field (lookup-key global-map "\M-\t") - "Default function to call for completion inside fields." - :options '(ispell-complete-word complete-tag lisp-complete-symbol) - :type 'function - :group 'widgets) - (defun widget-narrow-to-field () "Narrow to field." (interactive) @@ -1169,10 +1163,6 @@ (completion-in-region (nth 0 data) (nth 1 data) (nth 2 data) (plist-get completion-extra-properties :predicate)))) - ((widget-field-find (point)) - ;; This defaulting used to be performed in widget-default-complete, but - ;; it seems more appropriate here than in widget-default-completions. - (call-interactively 'widget-complete-field)) (t (error "Not in an editable field"))))) ;; We may want to use widget completion in buffers where the major mode ------------------------------------------------------------ Use --include-merges or -n0 to see merged revisions.