Commit 3ca74e53 authored by Bill Wohler's avatar Bill Wohler
Browse files

Merge from trunk.

parents 92ec073e a555cb87
2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
* display.texi (Scrolling): `C-v' (etc) are now bound to
`scroll-*-command' (bug#8349).
2011-07-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
* dired.texi (Subdirectories in Dired): Clarify that `C-u k'
......
......@@ -61,11 +61,11 @@ order; also, maybe redisplay the screen (@code{recenter-top-bottom}).
@item C-v
@itemx @key{next}
@itemx @key{PageDown}
Scroll forward by nearly a full window (@code{scroll-up}).
Scroll forward by nearly a full window (@code{scroll-up-command}).
@item M-v
@itemx @key{prior}
@itemx @key{PageUp}
Scroll backward (@code{scroll-down}).
Scroll backward (@code{scroll-down-command}).
@item C-M-l
Scroll heuristically to bring useful information onto the screen
(@code{reposition-window}).
......
2011-07-03 Tobias C. Rittweiler <tcr@freebits.de> (tiny change)
* searching.texi (Match Data): Note that match data can be
overwritten by most functions (bug#2499).
2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
* strings.texi (Formatting Strings): Clarify what the "-" and "0"
flags mean (bug#6659).
* functions.texi (What Is a Function): Document the autoload
object (bug#6496).
2011-07-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
* customize.texi (Variable Definitions): Clarify that SETFUNCTION
......
......@@ -112,6 +112,13 @@ editors; for Lisp programs, the distinction is normally unimportant.
@item byte-code function
A @dfn{byte-code function} is a function that has been compiled by the
byte compiler. @xref{Byte-Code Type}.
@item autoload object
@cindex autoload object
An @dfn{autoload object} is a place-holder for a real function. If
the autoload object is called, it will make Emacs load the file
containing the definition of the real function, and then call the real
function instead.
@end table
@defun functionp object
......
......@@ -1207,6 +1207,12 @@ search you wish to refer back to and the use of the match data. If you
can't avoid another intervening search, you must save and restore the
match data around it, to prevent it from being overwritten.
Notice that all functions are allowed to overwrite the match data
unless they're explicitly documented not to do so. A consequence is
that functions that are run implictly in the background
(@pxref{Timers}, and @ref{Idle Timers}) should likely save and restore
the match data explicitly.
@menu
* Replacing Match:: Replacing a substring that was matched.
* Simple Match Data:: Accessing single items of match data,
......
......@@ -856,14 +856,16 @@ with @samp{0x} or @samp{0X}. For @samp{%e}, @samp{%f}, and @samp{%g},
the @samp{#} flag means include a decimal point even if the precision
is zero.
The flag @samp{0} ensures that the padding consists of @samp{0}
characters instead of spaces. This flag is ignored for non-numerical
specification characters like @samp{%s}, @samp{%S} and @samp{%c}.
These specification characters accept the @samp{0} flag, but still pad
with @emph{spaces}.
The flag @samp{-} causes the padding inserted by the width
specifier, if any, to be inserted on the right rather than the left.
The flag @samp{0} ensures that the padding consists of @samp{0}
characters instead of spaces, inserted on the left. These flags are
ignored for specification characters for which they do not make sense:
@samp{%s}, @samp{%S} and @samp{%c} accept the @samp{0} flag, but still
pad with @emph{spaces} on the left. If both @samp{-} and @samp{0} are
present and valid, @samp{-} takes precedence.
If both @samp{-} and @samp{0} are present, the @samp{0} flag is
ignored.
@example
@group
......
2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus.texi (Subscription Methods): Link to "Group Levels" to explain
zombies.
(Checking New Groups): Ditto (bug#8974).
(Checking New Groups): Moved the reference to the right place.
2011-07-03 Dave Abrahams <dave@boostpro.com> (tiny change)
* gnus.texi (Startup Files): Clarify that we're talking about numbered
backups, and not actual vc (bug#8975).
2011-07-03 Kevin Ryde <user42@zip.com.au>
* cl.texi (For Clauses): @items for hash-values and key-bindings
to make them more visible when skimming. Add examples of `using'
clause to them, examples being clearer than a description in
words (bug#6599).
2011-07-01 Alan Mackenzie <acm@muc.de>
* cc-mode.texi (Guessing the Style): New page.
......
......@@ -2449,22 +2449,33 @@ one of these types of clauses with other clauses like @code{for ... to}
or @code{while}.
@item for @var{var} being the hash-keys of @var{hash-table}
This clause iterates over the entries in @var{hash-table}. For each
hash table entry, @var{var} is bound to the entry's key. If you write
@samp{the hash-values} instead, @var{var} is bound to the values
of the entries. The clause may be followed by the additional
term @samp{using (hash-values @var{var2})} (where @code{hash-values}
is the opposite word of the word following @code{the}) to cause
@var{var} and @var{var2} to be bound to the two parts of each
hash table entry.
@itemx for @var{var} being the hash-values of @var{hash-table}
This clause iterates over the entries in @var{hash-table} with
@var{var} bound to each key, or value. A @samp{using} clause can bind
a second variable to the opposite part.
@example
(loop for k being the hash-keys of h
using (hash-values v)
do
(message "key %S -> value %S" k v))
@end example
@item for @var{var} being the key-codes of @var{keymap}
@itemx for @var{var} being the key-bindings of @var{keymap}
This clause iterates over the entries in @var{keymap}.
The iteration does not enter nested keymaps but does enter inherited
(parent) keymaps.
You can use @samp{the key-bindings} to access the commands bound to
the keys rather than the key codes, and you can add a @code{using}
clause to access both the codes and the bindings together.
A @code{using} clause can access both the codes and the bindings
together.
@example
(loop for c being the key-codes of (current-local-map)
using (key-bindings b)
do
(message "key %S -> binding %S" c b))
@end example
@item for @var{var} being the key-seqs of @var{keymap}
This clause iterates over all key sequences defined by @var{keymap}
......
......@@ -1167,16 +1167,17 @@ when you do the @kbd{g} command (@pxref{Scanning New Messages}).
@node Checking New Groups
@subsection Checking New Groups
 
Gnus normally determines whether a group is new or not by comparing the
list of groups from the active file(s) with the lists of subscribed and
dead groups. This isn't a particularly fast method. If
@code{gnus-check-new-newsgroups} is @code{ask-server}, Gnus will ask the
server for new groups since the last time. This is both faster and
cheaper. This also means that you can get rid of the list of killed
groups altogether, so you may set @code{gnus-save-killed-list} to
@code{nil}, which will save time both at startup, at exit, and all over.
Saves disk space, too. Why isn't this the default, then?
Unfortunately, not all servers support this command.
Gnus normally determines whether a group is new or not by comparing
the list of groups from the active file(s) with the lists of
subscribed and dead groups. This isn't a particularly fast method.
If @code{gnus-check-new-newsgroups} is @code{ask-server}, Gnus will
ask the server for new groups since the last time. This is both
faster and cheaper. This also means that you can get rid of the list
of killed groups (@pxref{Group Levels}) altogether, so you may set
@code{gnus-save-killed-list} to @code{nil}, which will save time both
at startup, at exit, and all over. Saves disk space, too. Why isn't
this the default, then? Unfortunately, not all servers support this
command.
 
I bet I know what you're thinking now: How do I find out whether my
server supports @code{ask-server}? No? Good, because I don't have a
......@@ -1214,9 +1215,10 @@ Some handy pre-fab functions are:
 
@item gnus-subscribe-zombies
@vindex gnus-subscribe-zombies
Make all new groups zombies. This is the default. You can browse the
zombies later (with @kbd{A z}) and either kill them all off properly
(with @kbd{S z}), or subscribe to them (with @kbd{u}).
Make all new groups zombies (@pxref{Group Levels}). This is the
default. You can browse the zombies later (with @kbd{A z}) and either
kill them all off properly (with @kbd{S z}), or subscribe to them
(with @kbd{u}).
 
@item gnus-subscribe-randomly
@vindex gnus-subscribe-randomly
......@@ -1430,7 +1432,7 @@ several servers where not all servers support @code{ask-server}.
The @code{gnus-startup-file} variable says where the startup files are.
The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
file being whatever that one is, with a @samp{.eld} appended.
If you want version control for this file, set
If you want to keep multiple numbered backups of this file, set
@code{gnus-backup-startup-file}. It respects the same values as the
@code{version-control} variable.
 
......@@ -2360,6 +2362,7 @@ empty subscribed groups and unsubscribed groups, too. Type @kbd{l} to
go back to showing nonempty subscribed groups again. Thus, unsubscribed
groups are hidden, in a way.
 
@cindex zombie groups
Zombie and killed groups are similar to unsubscribed groups in that they
are hidden by default. But they are different from subscribed and
unsubscribed groups in that Gnus doesn't ask the news server for
2011-03-29 Kevin Ryde <user42@zip.com.au>
* compilation.txt (perl-Test2): New samples.
2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
* tutorials/TUTORIAL.zh: Remove spurious ")" character on the
......
......@@ -496,6 +496,16 @@ symbol: perl--Test
# Failed test 1 in foo.t at line 6
* Perl Test.pm module error messages comparing two values
symbol: perl--Test2
# Test 3 got: "99" (d-compilation-perl.t at line 29)
# Expected: "88" (my test name)
# d-compilation-perl.t line 29 is: ok(99,88,'my test name');
# Test 6 got: "xx" (foo.t at line 33 fail #2)
# Expected: "yy"
* Perl Test::Harness output
......
2011-07-04 Juanma Barranquero <lekktu@gmail.com>
* type-break.el (timep): Use the value of `float-time' to avoid a
byte-compiler warning.
* server.el (server-eval-and-print): Return any result, even nil.
2011-07-03 Paul Eggert <eggert@cs.ucla.edu>
* type-break.el: Accept time formats that the builtins accept.
(timep, type-break-time-difference): Accept any format that
float-time accepts, rather than insisting on (HIGH LOW USECS) format.
This is simpler and helps future-proof the code.
(type-break-time-difference): Round rather than ignoring
subseconds components.
2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
* info.el (Info-apropos-matches): Make non-interactive, since it
doesn't seem to do anything useful as a command (bug#8829).
2011-07-03 Chong Yidong <cyd@stupidchicken.com>
* frame.el (frame-background-mode, frame-set-background-mode):
Moved from faces.el.
(frame-default-terminal-background): New function.
* custom.el (custom-push-theme): Don't record faces in `changed'
theme; this doesn't work correctly for per-frame face settings.
(disable-theme): Use face-set-after-frame-default to reset faces.
(custom--frame-color-default): New function.
2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
* dired.el (dired-flagging-regexp): Removed unused variable
(bug#8769).
2011-03-29 Kevin Ryde <user42@zip.com.au>
* progmodes/compile.el (compilation-error-regexp-alist-alist):
`perl-Test2' extend to match possible "fail #N" rep count
(bug#8377).
2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
* mail/feedmail.el (feedmail-buffer-to-smtpmail):
`smtpmail-via-smtp' now returns the error instead of nil.
* isearch.el (isearch-search-fun-function): Clarify the doc string
(bug#8101).
2011-07-03 Richard Kim <emacs18@gmail.com> (tiny change)
* textmodes/texnfo-upd.el (texinfo-insert-menu): Don't insert
unnecessary spaces (bug#8987).
2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
* net/network-stream.el (open-network-stream): Use the
:end-of-capability command thoughout.
2011-07-03 Wolfgang Jenkner <wjenkner@inode.at> (tiny change)
* net/network-stream.el (open-network-stream): Add the
:end-of-capability command parameter, used by pop3.el.
2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
* dired.el (dired-map-over-marks): Refill the doc string (bug#6814).
* fringe.el (fringe-query-style): Remove redundant text " (type ?
for list)" (bug#6475).
......@@ -447,7 +515,7 @@
(ses-cell-symbol): Set macro as safe, so that it can be used in
formulas.
* ses.el: Update cycle detection algorithm.
* ses.el: Update cycle detection algorithm.
(ses-localvars): Add ses--Dijkstra-attempt-nb and
ses--Dijkstra-weight-bound, and initial values thereof when applicable.
(ses-set-localvars): New function.
......
......@@ -855,25 +855,18 @@ See `custom-known-themes' for a list of known themes."
;; Add a new setting:
(t
(unless old
;; If the user changed the value outside of Customize, we
;; first save the current value to a fake theme, `changed'.
;; This ensures that the user-set value comes back if the
;; theme is later disabled.
(cond ((and (eq prop 'theme-value)
(boundp symbol))
(let ((sv (get symbol 'standard-value))
(val (symbol-value symbol)))
(unless (and sv (equal (eval (car sv)) val))
(setq old `((changed ,(custom-quote val)))))))
((and (facep symbol)
(not (face-attr-match-p
symbol
(custom-fix-face-spec
(face-spec-choose
(get symbol 'face-defface-spec))))))
(setq old `((changed
(,(append '(t) (custom-face-attributes-get
symbol nil)))))))))
;; If the user changed a variable outside of Customize, save
;; the value to a fake theme, `changed'. If the theme is
;; later disabled, we use this to bring back the old value.
;;
;; For faces, we just use `face-new-frame-defaults' to
;; recompute when the theme is disabled.
(when (and (eq prop 'theme-value)
(boundp symbol))
(let ((sv (get symbol 'standard-value))
(val (symbol-value symbol)))
(unless (and sv (equal (eval (car sv)) val))
(setq old `((changed ,(custom-quote val))))))))
(put symbol prop (cons (list theme value) old))
(put theme 'theme-settings
(cons (list prop symbol theme value) theme-settings))))))
......@@ -1356,11 +1349,33 @@ See `custom-enabled-themes' for a list of enabled themes."
;; If the face spec specified by this theme is in the
;; saved-face property, reset that property.
(when (equal (nth 3 s) (get symbol 'saved-face))
(put symbol 'saved-face (and val (cadr (car val)))))
(custom-theme-recalc-face symbol)))))
(put symbol 'saved-face (and val (cadr (car val)))))))))
;; Recompute faces on all frames.
(dolist (frame (frame-list))
;; We must reset the fg and bg color frame parameters, or
;; `face-set-after-frame-default' will use the existing
;; parameters, which could be from the disabled theme.
(set-frame-parameter frame 'background-color
(custom--frame-color-default
frame :background "background" "Background"
"unspecified-bg" "white"))
(set-frame-parameter frame 'foreground-color
(custom--frame-color-default
frame :foreground "foreground" "Foreground"
"unspecified-fg" "black"))
(face-set-after-frame-default frame))
(setq custom-enabled-themes
(delq theme custom-enabled-themes)))))
(defun custom--frame-color-default (frame attribute resource-attr resource-class
tty-default x-default)
(let ((col (face-attribute 'default attribute t)))
(cond
((and col (not (eq col 'unspecified))) col)
((null (window-system frame)) tty-default)
((setq col (x-get-resource resource-attr resource-class)) col)
(t x-default))))
(defun custom-variable-theme-value (variable)
"Return (list VALUE) indicating the custom theme value of VARIABLE.
That is to say, it specifies what the value should be according to
......
......@@ -238,8 +238,6 @@ This is what the do-commands look for, and what the mark-commands store.")
;; (> baud-rate search-slow-speed)
"Non-nil means Dired shrinks the display buffer to fit the marked files.")
(defvar dired-flagging-regexp nil);; Last regexp used to flag files.
(defvar dired-file-version-alist)
;;;###autoload
......@@ -515,24 +513,31 @@ Return value is the number of files marked, or nil if none were marked."
(defmacro dired-map-over-marks (body arg &optional show-progress
distinguish-one-marked)
"Eval BODY with point on each marked line. Return a list of BODY's results.
If no marked file could be found, execute BODY on the current line.
ARG, if non-nil, specifies the files to use instead of the marked files.
If ARG is an integer, use the next ARG (or previous -ARG, if
ARG<0) files. In that case, point is dragged along. This is
so that commands on the next ARG (instead of the marked) files
can be chained easily.
For any other non-nil value of ARG, use the current file.
If no marked file could be found, execute BODY on the current
line. ARG, if non-nil, specifies the files to use instead of the
marked files.
If ARG is an integer, use the next ARG (or previous -ARG, if
ARG<0) files. In that case, point is dragged along. This is so
that commands on the next ARG (instead of the marked) files can
be chained easily.
For any other non-nil value of ARG, use the current file.
If optional third arg SHOW-PROGRESS evaluates to non-nil,
redisplay the dired buffer after each file is processed.
No guarantee is made about the position on the marked line.
BODY must ensure this itself if it depends on this.
Search starts at the beginning of the buffer, thus the car of the list
corresponds to the line nearest to the buffer's bottom. This
is also true for (positive and negative) integer values of ARG.
redisplay the dired buffer after each file is processed.
No guarantee is made about the position on the marked line. BODY
must ensure this itself if it depends on this.
Search starts at the beginning of the buffer, thus the car of the
list corresponds to the line nearest to the buffer's bottom.
This is also true for (positive and negative) integer values of
ARG.
BODY should not be too long as it is expanded four times.
If DISTINGUISH-ONE-MARKED is non-nil, then if we find just one marked file,
return (t FILENAME) instead of (FILENAME)."
If DISTINGUISH-ONE-MARKED is non-nil, then if we find just one
marked file, return (t FILENAME) instead of (FILENAME)."
;;
;;Warning: BODY must not add new lines before point - this may cause an
;;endless loop.
......
......@@ -1821,109 +1821,6 @@ Return nil if it has no specified face."
(cond ((memq 'background-color face) (cdr (memq 'background-color face)))
((memq ':background face) (cadr (memq ':background face)))))
(t nil)))) ; Invalid face value.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Background mode.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defcustom frame-background-mode nil
"The brightness of the background.
Set this to the symbol `dark' if your background color is dark,
`light' if your background is light, or nil (automatic by default)
if you want Emacs to examine the brightness for you. Don't set this
variable with `setq'; this won't have the expected effect."
:group 'faces
:set #'(lambda (var value)
(set-default var value)
(mapc 'frame-set-background-mode (frame-list)))
:initialize 'custom-initialize-changed
:type '(choice (const dark)
(const light)
(const :tag "automatic" nil)))
(declare-function x-get-resource "frame.c"
(attribute class &optional component subclass))
(defvar inhibit-frame-set-background-mode nil)
(defun frame-set-background-mode (frame &optional keep-face-specs)
"Set up display-dependent faces on FRAME.
Display-dependent faces are those which have different definitions
according to the `background-mode' and `display-type' frame parameters.
If optional arg KEEP-FACE-SPECS is non-nil, don't recalculate
face specs for the new background mode."
(unless inhibit-frame-set-background-mode
(let* ((bg-resource
(and (window-system frame)
(x-get-resource "backgroundMode" "BackgroundMode")))
(bg-color (frame-parameter frame 'background-color))
(terminal-bg-mode (terminal-parameter frame 'background-mode))
(tty-type (tty-type frame))
(default-bg-mode
(if (or (window-system frame)
(and tty-type
(string-match "^\\(xterm\\|\\rxvt\\|dtterm\\|eterm\\)"
tty-type)))
'light
'dark))
(non-default-bg-mode (if (eq default-bg-mode 'light) 'dark 'light))
(bg-mode
(cond (frame-background-mode)
(bg-resource (intern (downcase bg-resource)))
(terminal-bg-mode)
((equal bg-color "unspecified-fg") ; inverted colors
non-default-bg-mode)
((not (color-values bg-color frame))
default-bg-mode)
((>= (apply '+ (color-values bg-color frame))
;; Just looking at the screen, colors whose
;; values add up to .6 of the white total
;; still look dark to me.
(* (apply '+ (color-values "white" frame)) .6))
'light)
(t 'dark)))
(display-type
(cond ((null (window-system frame))
(if (tty-display-color-p frame) 'color 'mono))
((display-color-p frame)
'color)
((x-display-grayscale-p frame)
'grayscale)
(t 'mono)))
(old-bg-mode
(frame-parameter frame 'background-mode))
(old-display-type
(frame-parameter frame 'display-type)))
(unless (and (eq bg-mode old-bg-mode) (eq display-type old-display-type))
(let ((locally-modified-faces nil)
;; Prevent face-spec-recalc from calling this function
;; again, resulting in a loop (bug#911).
(inhibit-frame-set-background-mode t)
(params (list (cons 'background-mode bg-mode)
(cons 'display-type display-type))))
(if keep-face-specs
(modify-frame-parameters frame params)
;; If we are recomputing face specs, first collect a list
;; of faces that don't match their face-specs. These are
;; the faces modified on FRAME, and we avoid changing them
;; below. Use a negative list to avoid consing (we assume
;; most faces are unmodified).
(dolist (face (face-list))
(and (not (get face 'face-override-spec))
(not (face-spec-match-p face
(face-user-default-spec face)
(selected-frame)))
(push face locally-modified-faces)))
;; Now change to the new frame parameters
(modify-frame-parameters frame params)
;; For all unmodified named faces, choose face specs
;; matching the new frame parameters.
(dolist (face (face-list))
(unless (memq face locally-modified-faces)
(face-spec-recalc face frame)))))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
......@@ -2020,7 +1917,8 @@ settings, X resources, and `face-new-frame-defaults'.
Finally, apply any relevant face attributes found amongst the
frame parameters in PARAMETERS."
(let ((window-system-p (memq (window-system frame) '(x w32))))
(dolist (face (nreverse (face-list))) ;Why reverse? --Stef
;; The `reverse' is so that `default' goes first.
(dolist (face (nreverse (face-list)))
(condition-case ()
(progn
;; Initialize faces from face spec and custom theme.
......
......@@ -847,6 +847,116 @@ If there is no frame by that name, signal an error."
(if frame
(select-frame-set-input-focus frame)
(error "There is no frame named `%s'" name))))
;;;; Background mode.
(defcustom frame-background-mode nil
"The brightness of the background.
Set this to the symbol `dark' if your background color is dark,
`light' if your background is light, or nil (automatic by default)
if you want Emacs to examine the brightness for you. Don't set this
variable with `setq'; this won't have the expected effect."
:group 'faces
:set #'(lambda (var value)
(set-default var value)
(mapc 'frame-set-background-mode (frame-list)))
:initialize 'custom-initialize-changed
:type '(choice (const dark)
(const light)
(const :tag "automatic" nil)))
(declare-function x-get-resource "frame.c"
(attribute class &optional component subclass))
(defvar inhibit-frame-set-background-mode nil)
(defun frame-set-background-mode (frame &optional keep-face-specs)
"Set up display-dependent faces on FRAME.
Display-dependent faces are those which have different definitions
according to the `background-mode' and `display-type' frame parameters.
If optional arg KEEP-FACE-SPECS is non-nil, don't recalculate
face specs for the new background mode."
(unless inhibit-frame-set-background-mode
(let* ((frame-default-bg-mode (frame-terminal-default-bg-mode frame))
(bg-color (frame-parameter frame 'background-color))
(tty-type (tty-type frame))
(default-bg-mode
(if (or (window-system frame)
(and tty-type
(string-match "^\\(xterm\\|\\rxvt\\|dtterm\\|eterm\\)"
tty-type)))
'light
'dark))
(non-default-bg-mode (if (eq default-bg-mode 'light) 'dark 'light))
(bg-mode
(cond (frame-default-bg-mode)
((equal bg-color "unspecified-fg") ; inverted colors
non-default-bg-mode)
((not (color-values bg-color frame))
default-bg-mode)
((>= (apply '+ (color-values bg-color frame))