Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
11a5db4a
Commit
11a5db4a
authored
Oct 27, 2010
by
Julien Danjou
Committed by
Katsumi Yamaoka
Oct 27, 2010
Browse files
gnus-group.el: Make gnus-group-default-list-level possibly a function.
parent
ce8794df
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
6 deletions
+22
-6
doc/misc/gnus.texi
doc/misc/gnus.texi
+3
-0
lisp/gnus/ChangeLog
lisp/gnus/ChangeLog
+6
-0
lisp/gnus/gnus-group.el
lisp/gnus/gnus-group.el
+13
-6
No files found.
doc/misc/gnus.texi
View file @
11a5db4a
...
...
@@ -2415,6 +2415,9 @@ one with the best level.
All groups with a level less than or equal to
@code{gnus-group-default-list-level} will be listed in the group buffer
by default.
This variable can also be a function. In that case, that function will
be called and the result will be used as value.
@vindex gnus-group-list-inactive-groups
If @code{gnus-group-list-inactive-groups} is non-@code{nil}, non-active
lisp/gnus/ChangeLog
View file @
11a5db4a
2010-10-26 Julien Danjou <julien@danjou.info>
* gnus-group.el (gnus-group-default-list-level): Add this function to
compute the default list level.
(gnus-group-default-list-level): Add possibility to use a function.
2010-10-27 Katsumi Yamaoka <yamaoka@jpl.org>
* mm-decode.el (mm-shr): Add undisplayer to MIME handle.
...
...
lisp/gnus/gnus-group.el
View file @
11a5db4a
...
...
@@ -119,10 +119,11 @@ If nil, only list groups that have unread articles."
:type
'boolean
)
(
defcustom
gnus-group-default-list-level
gnus-level-subscribed
"
*
Default listing level.
"Default listing level.
Ignored if `gnus-group-use-permanent-levels' is non-nil."
:group
'gnus-group-listing
:type
'integer
)
:type
'
(
choice
(
integer
:tag
"Level"
)
(
function
:tag
"Function returning level"
)))
(
defcustom
gnus-group-list-inactive-groups
t
"*If non-nil, inactive groups will be listed."
...
...
@@ -1169,6 +1170,12 @@ The following commands are available:
(
mouse-set-point
e
)
(
gnus-group-read-group
nil
))
(
defun
gnus-group-default-list-level
()
"Return the real value for `gnus-group-default-list-level'."
(
if
(
functionp
gnus-group-default-list-level
)
(
funcall
gnus-group-default-list-level
)
gnus-group-default-list-level
))
;; Look at LEVEL and find out what the level is really supposed to be.
;; If LEVEL is non-nil, LEVEL will be returned, if not, what happens
;; will depend on whether `gnus-group-use-permanent-levels' is used.
...
...
@@ -1178,13 +1185,13 @@ The following commands are available:
(
or
(
setq
gnus-group-use-permanent-levels
(
or
level
(
if
(
numberp
gnus-group-use-permanent-levels
)
gnus-group-use-permanent-levels
(
or
gnus-group-default-list-level
(
or
(
gnus-group-default-list-level
)
gnus-level-subscribed
))))
gnus-group-default-list-level
gnus-level-subscribed
))
(
gnus-group-default-list-level
)
gnus-level-subscribed
))
(
number-or-nil
level
)
(
t
(
or
level
gnus-group-default-list-level
gnus-level-subscribed
))))
(
or
level
(
gnus-group-default-list-level
)
gnus-level-subscribed
))))
(
defun
gnus-group-setup-buffer
()
(
set-buffer
(
gnus-get-buffer-create
gnus-group-buffer
))
...
...
@@ -1230,7 +1237,7 @@ Also see the `gnus-group-use-permanent-levels' variable."
(
prefix-numeric-value
current-prefix-arg
)
(
or
(
gnus-group-default-level
nil
t
)
gnus-group-default-list-level
(
gnus-group-default-list-level
)
gnus-level-subscribed
))))
(
unless
level
(
setq
level
(
car
gnus-group-list-mode
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment