Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
8af8e70e
Commit
8af8e70e
authored
Mar 22, 2011
by
Paul Eggert
Browse files
Options
Browse Files
Download
Plain Diff
Merge from mainline.
parents
b12ef411
4b978a67
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
337 additions
and
183 deletions
+337
-183
.gitignore
.gitignore
+4
-2
ChangeLog
ChangeLog
+6
-3
autogen.sh
autogen.sh
+1
-1
autogen/copy_autogen
autogen/copy_autogen
+7
-2
etc/NEWS
etc/NEWS
+1
-0
lisp/ChangeLog
lisp/ChangeLog
+69
-0
lisp/abbrev.el
lisp/abbrev.el
+22
-14
lisp/cus-theme.el
lisp/cus-theme.el
+8
-2
lisp/custom.el
lisp/custom.el
+62
-66
lisp/eshell/esh-opt.el
lisp/eshell/esh-opt.el
+47
-8
lisp/gnus/ChangeLog
lisp/gnus/ChangeLog
+17
-0
lisp/gnus/gnus-art.el
lisp/gnus/gnus-art.el
+10
-28
lisp/gnus/gnus-sum.el
lisp/gnus/gnus-sum.el
+1
-4
lisp/gnus/mm-util.el
lisp/gnus/mm-util.el
+7
-0
lisp/gnus/mm-view.el
lisp/gnus/mm-view.el
+12
-5
lisp/ido.el
lisp/ido.el
+4
-1
lisp/image.el
lisp/image.el
+14
-12
lisp/minibuffer.el
lisp/minibuffer.el
+12
-8
lisp/net/rcirc.el
lisp/net/rcirc.el
+22
-15
lisp/simple.el
lisp/simple.el
+9
-9
lisp/subr.el
lisp/subr.el
+2
-0
lisp/vc/log-view.el
lisp/vc/log-view.el
+0
-3
No files found.
.gitignore
View file @
8af8e70e
configure
aclocal.m4
lib/Makefile.in
src/config.in
autom4te.cache
makefile
*~
...
...
@@ -5,5 +9,3 @@ makefile
/bin/
/site-lisp/
# arch-tag: 75cd3c50-1875-4814-8360-190f7de38302
ChangeLog
View file @
8af8e70e
2011-03-2
1
Paul Eggert <eggert@cs.ucla.edu>
2011-03-2
2
Paul Eggert <eggert@cs.ucla.edu>
* Makefile.in (GNULIB_MODULES): Add socklen.
* configure.in: Do not check for sys/socket.h, since socklen does that.
* m4/socklen.m4: New automatically-generated file, from gnulib.
2011-03-21 Paul Eggert <eggert@cs.ucla.edu>
fakemail: Remove dependency on ignore-value.
* Makefile.in (GNULIB_MODULES): Add stdio.
* lib/stdio.in.h, m4/stdio_h.m4: New files, automatically
imported from gnulib.
* .bzrignore: Add lib/stdio.h.
2011-03-22 Glenn Morris <rgm@gnu.org>
* autogen/copy_autogen: Work from ./ or ../.
Fix time-stamps.
* autogen.sh: Doc fix.
2011-03-20 Glenn Morris <rgm@gnu.org>
...
...
autogen.sh
View file @
8af8e70e
...
...
@@ -184,7 +184,7 @@ instead of this script.
If all else fails, you can try using the pre-built versions of the
generated files by doing:
cd
autogen
&& .
/copy_autogen
./
autogen/copy_autogen
This is not recommended - see the comments in
\`
copy_autogen'.
...
...
autogen/copy_autogen
View file @
8af8e70e
...
...
@@ -8,12 +8,17 @@
## regenerate configure and will fail if you do not have the required
## tools. You will have to run this script again.
test
-d
autogen
&&
cd
autogen
if
test
!
-e
config.in
;
then
echo
"
You must run this script from the
autogen/ directory."
echo
"
Cannot find
autogen/ directory."
exit
1
fi
cp
configure aclocal.m4 ../
## Order implied by top-level Makefile's rules, for time-stamps.
cp
aclocal.m4 ../
cp
configure ../
touch
../src/stamp-h.in
cp
config.in ../src/
cp
Makefile.in ../lib/
...
...
etc/NEWS
View file @
8af8e70e
...
...
@@ -746,6 +746,7 @@ sc.el, x-menu.el, rnews.el, rnewspost.el
* Lisp changes in Emacs 24.1
** byte-compile-disable-print-circle is obsolete.
** deferred-action-list and deferred-action-function are obsolete.
** Removed the stack-trace-on-error variable.
Also the debugger can now "continue" from an error, which means it will jump
to the error handler as if the debugger had not been invoked instead of
...
...
lisp/ChangeLog
View file @
8af8e70e
2011-03-22 Leo Liu <sdl.web@gmail.com>
* abbrev.el (write-abbrev-file): Use utf-8 for writing if it can
encode all chars in abbrevs; otherwise use emacs-mule or
utf-8-emacs. (Bug#8308)
2011-03-22 Juanma Barranquero <lekktu@gmail.com>
* simple.el (backward-delete-char-untabify):
Avoid warning about using `delete-backward-char'.
* image.el (image-type-file-name-regexps): Make it variable.
`imagemagick-register-types' modifies it, and the user may want
to add new extensions for known image types.
(imagemagick-register-types): Throw error if not using ImageMagick.
2011-03-22 Leo Liu <sdl.web@gmail.com>
* net/rcirc.el (rcirc-completion-at-point): Return nil if point is
located before rcirc-prompt-end-marker.
(rcirc-complete): Error if point is not after rcirc prompt.
Handle the case when table is nil.
(rcirc-user-authenticated): Define to fix compiler warning.
2011-03-22 Chong Yidong <cyd@stupidchicken.com>
* custom.el (custom--inhibit-theme-enable): Make it affect only
custom-theme-set-variables and custom-theme-set-faces.
(provide-theme): Ignore custom--inhibit-theme-enable.
(load-theme): Enable the theme explicitly if NO-ENABLE is non-nil.
(custom-enabling-themes): Delete variable.
(enable-theme): Accept only loaded themes as arguments. Ignore
the special custom-enabled-themes variable.
(custom-enabled-themes): Forbid themes from setting this.
Eliminate use of custom-enabling-themes.
(custom-push-theme): Quote "changed" custom var entry.
2011-03-21 Leo Liu <sdl.web@gmail.com>
* ido.el (ido-read-internal): Add ido-selected to history instead
of user input.
2011-03-21 Stefan Monnier <monnier@iro.umontreal.ca>
* subr.el (deferred-action-list, deferred-action-function):
Mark obsolete.
2011-03-21 Leo Liu <sdl.web@gmail.com>
* vc/log-view.el: Remove (require 'wid-edit), not needed after the
change on 2011-02-13 (bug#8309).
* minibuffer.el (read-file-name-function): Change default value.
(read-file-name--defaults): Rename from read-file-name-defaults.
(read-file-name-default): Rename from read-file-name.
(read-file-name): Call read-file-name-function.
2011-03-21 Glenn Morris <rgm@gnu.org>
* eshell/esh-opt.el (eshell-eval-using-options, eshell-process-args):
Doc fixes.
2011-03-21 Chong Yidong <cyd@stupidchicken.com>
* cus-theme.el: Add missing provide statement.
(customize-create-theme): Extract theme value correctly.
(custom-theme-visit-theme): Autoload.
(customize-create-theme): Prompt before inserting default faces.
2011-03-20 Jay Belanger <jay.p.belanger@gmail.com>
* calc/calc-menu.el (calc-units-menu): Add entries for logarithmic
...
...
lisp/abbrev.el
View file @
8af8e70e
...
...
@@ -225,21 +225,29 @@ specified in `abbrev-file-name' is used."
abbrev-file-name
)))
(
or
(
and
file
(
>
(
length
file
)
0
))
(
setq
file
abbrev-file-name
))
(
let
((
coding-system-for-write
'emacs-mule
))
(
with-temp-file
file
(
insert
";;-*-coding: emacs-mule;-*-\n"
)
(
let
((
coding-system-for-write
'utf-8
))
(
with-temp-buffer
(
dolist
(
table
;; We sort the table in order to ease the automatic
;; merging of different versions of the user's abbrevs
;; file. This is useful, for example, for when the
;; user keeps their home directory in a revision
;; control system, and is therefore keeping multiple
;; slightly-differing copies loosely synchronized.
(
sort
(
copy-sequence
abbrev-table-name-list
)
(
lambda
(
s1
s2
)
(
string<
(
symbol-name
s1
)
(
symbol-name
s2
)))))
(
insert-abbrev-table-description
table
nil
)))))
;; We sort the table in order to ease the automatic
;; merging of different versions of the user's abbrevs
;; file. This is useful, for example, for when the
;; user keeps their home directory in a revision
;; control system, and is therefore keeping multiple
;; slightly-differing copies loosely synchronized.
(
sort
(
copy-sequence
abbrev-table-name-list
)
(
lambda
(
s1
s2
)
(
string<
(
symbol-name
s1
)
(
symbol-name
s2
)))))
(
insert-abbrev-table-description
table
nil
))
(
when
(
unencodable-char-position
(
point-min
)
(
point-max
)
'utf-8
)
(
setq
coding-system-for-write
(
if
(
>
emacs-major-version
24
)
'utf-8-emacs
;; For compatibility with Emacs 22 (See Bug#8308)
'emacs-mule
)))
(
goto-char
(
point-min
))
(
insert
(
format
";;-*-coding: %s;-*-\n"
coding-system-for-write
))
(
write-region
nil
nil
file
nil
0
))))
(
defun
add-mode-abbrev
(
arg
)
"Define mode-specific abbrev for last word(s) before point.
...
...
lisp/cus-theme.el
View file @
8af8e70e
...
...
@@ -100,6 +100,9 @@ named *Custom Theme*."
(
make-local-variable
'custom-theme-insert-face-marker
)
(
make-local-variable
'custom-theme-insert-variable-marker
)
(
make-local-variable
'custom-theme--listed-faces
)
(
when
(
called-interactively-p
'interactive
)
(
unless
(
y-or-n-p
"Include basic face customizations in this theme? "
)
(
setq
custom-theme--listed-faces
nil
)))
(
if
(
eq
theme
'user
)
(
widget-insert
"This buffer contains all the Custom settings you have made.
...
...
@@ -188,7 +191,7 @@ remove them from your saved Custom file.\n\n"))
(
while
vars
(
if
(
eq
(
car
vars
)
'custom-enabled-themes
)
(
progn
(
pop
vars
)
(
pop
values
))
(
custom-theme-add-var-1
(
pop
vars
)
(
pop
values
)))))
(
custom-theme-add-var-1
(
pop
vars
)
(
eval
(
pop
values
)))))
)
(
setq
custom-theme-insert-variable-marker
(
point-marker
))
(
widget-insert
" "
)
(
widget-create
'push-button
...
...
@@ -297,8 +300,9 @@ SPEC, if non-nil, should be a face spec to which to set the widget."
;;; Reading and writing
;;;###autoload
(
defun
custom-theme-visit-theme
(
theme
)
"
Load the custom theme THEME's settings into the current buffer
."
"
Set up a Custom buffer to edit custom theme THEME
."
(
interactive
(
list
(
intern
(
completing-read
"Find custom theme: "
...
...
@@ -663,4 +667,6 @@ Theme files are named *-theme.el in `"))
(
widget-toggle-action
widget
event
)
(
setq
custom-theme-allow-multiple-selections
(
widget-value
widget
)))
(
provide
'cus-theme
)
;;; cus-theme.el ends here
lisp/custom.el
View file @
8af8e70e
...
...
@@ -849,10 +849,10 @@ See `custom-known-themes' for a list of known themes."
;; theme is later disabled.
(
cond
((
and
(
eq
prop
'theme-value
)
(
boundp
symbol
))
(
let
((
sv
(
get
symbol
'standard-value
))
)
(
unless
(
and
sv
(
equal
(
eval
(
car
sv
))
(
symbol-value
symbol
)
))
(
setq
old
(
list
(
list
'changed
(
symbol-value
symbo
l
)))))))
(
let
((
sv
(
get
symbol
'standard-value
))
(
val
(
symbol-value
symbol
)))
(
unless
(
and
sv
(
equal
(
eval
(
car
sv
))
val
))
(
setq
old
`
((
changed
,
(
custom-quote
va
l
)))))))
((
and
(
facep
symbol
)
(
not
(
face-attr-match-p
symbol
...
...
@@ -1081,10 +1081,10 @@ name."
:version
"24.1"
)
(
defvar
custom--inhibit-theme-enable
nil
"
If non-nil, loading a theme does not enable it
.
This internal variable is set by `load-theme' when its NO-ENABLE
argument is non-nil, and it affects `custom-theme-set-variables',
`custom-theme-set-faces', and `provide-theme'
."
)
"
Whether the custom-theme-set-* functions act immediately
.
If nil, `custom-theme-set-variables' and `custom-theme-set-faces'
change the current values of the given variable or face. If
non-nil, they just make a record of the theme settings
."
)
(
defun
provide-theme
(
theme
)
"Indicate that this file provides THEME.
...
...
@@ -1094,15 +1094,7 @@ property `theme-feature' (which is usually a symbol created by
(
unless
(
custom-theme-name-valid-p
theme
)
(
error
"Custom theme cannot be named %S"
theme
))
(
custom-check-theme
theme
)
(
provide
(
get
theme
'theme-feature
))
(
unless
custom--inhibit-theme-enable
;; By default, loading a theme also enables it.
(
push
theme
custom-enabled-themes
)
;; `user' must always be the highest-precedence enabled theme.
;; Make that remain true. (This has the effect of making user
;; settings override the ones just loaded, too.)
(
let
((
custom-enabling-themes
t
))
(
enable-theme
'user
))))
(
provide
(
get
theme
'theme-feature
)))
(
defcustom
custom-safe-themes
'
(
default
)
"List of themes that are considered safe to load.
...
...
@@ -1154,9 +1146,11 @@ Return t if THEME was successfully loaded, nil otherwise."
(
expand-file-name
"themes/"
data-directory
)))
(
member
hash
custom-safe-themes
)
(
custom-theme-load-confirm
hash
))
(
let
((
custom--inhibit-theme-enable
no-enable
))
(
eval-buffer
)
t
)))))
(
let
((
custom--inhibit-theme-enable
t
))
(
eval-buffer
))
(
unless
no-enable
(
enable-theme
theme
))
t
))))
(
defun
custom-theme-load-confirm
(
hash
)
"Query the user about loading a Custom theme that may not be safe.
...
...
@@ -1235,68 +1229,70 @@ NAME should be a symbol."
;;; Enabling and disabling loaded themes.
(
defvar
custom-enabling-themes
nil
)
(
defun
enable-theme
(
theme
)
"Reenable all variable and face settings defined by THEME.
The newly enabled theme gets the highest precedence (after `user').
If it is already enabled, just give it highest precedence (after `user').
If THEME does not specify any theme settings, this tries to load
the theme from its theme file, by calling `load-theme'."
THEME should be either `user', or a theme loaded via `load-theme'.
After this function completes, THEME will have the highest
precedence (after `user')."
(
interactive
(
list
(
intern
(
completing-read
"Enable custom theme: "
obarray
(
lambda
(
sym
)
(
get
sym
'theme-settings
))))))
obarray
(
lambda
(
sym
)
(
get
sym
'theme-settings
))
t
))))
(
if
(
not
(
custom-theme-p
theme
))
(
load-theme
theme
)
;; This could use a bit of optimization -- cyd
(
let
((
settings
(
get
theme
'theme-settings
)))
(
dolist
(
s
settings
)
(
let*
((
prop
(
car
s
))
(
symbol
(
cadr
s
))
(
spec-list
(
get
symbol
prop
)))
(
put
symbol
prop
(
cons
(
cddr
s
)
(
assq-delete-all
theme
spec-list
)))
(
if
(
eq
prop
'theme-value
)
(
custom-theme-recalc-variable
symbol
)
(
custom-theme-recalc-face
symbol
)))))
(
unless
(
eq
theme
'user
)
(
setq
custom-enabled-themes
(
cons
theme
(
delq
theme
custom-enabled-themes
)))
(
unless
custom-enabling-themes
(
enable-theme
'user
)))))
(
error
"Undefined Custom theme %s"
theme
))
(
let
((
settings
(
get
theme
'theme-settings
)))
;; Loop through theme settings, recalculating vars/faces.
(
dolist
(
s
settings
)
(
let*
((
prop
(
car
s
))
(
symbol
(
cadr
s
))
(
spec-list
(
get
symbol
prop
)))
(
put
symbol
prop
(
cons
(
cddr
s
)
(
assq-delete-all
theme
spec-list
)))
(
cond
((
eq
prop
'theme-face
)
(
custom-theme-recalc-face
symbol
))
((
eq
prop
'theme-value
)
;; Don't change `custom-enabled-themes'; that's special.
(
unless
(
eq
symbol
'custom-enabled-themes
)
(
custom-theme-recalc-variable
symbol
)))))))
(
unless
(
eq
theme
'user
)
(
setq
custom-enabled-themes
(
cons
theme
(
delq
theme
custom-enabled-themes
)))
;; Give the `user' theme the highest priority.
(
enable-theme
'user
)))
(
defcustom
custom-enabled-themes
nil
"List of enabled Custom Themes, highest precedence first.
This list does not include the `user' theme, which is set by
Customize and always takes precedence over other Custom Themes.
This
does not include the `user' theme, which is set by Customize,
and always takes precedence over other Custom Themes
."
This
variable cannot be defined inside a Custom theme; there, it
is simply ignored
."
:group
'customize
:type
'
(
repeat
symbol
)
:set-after
'
(
custom-theme-directory
custom-theme-load-path
custom-safe-themes
)
:risky
t
:set
(
lambda
(
symbol
themes
)
;; Avoid an infinite loop when custom-enabled-themes is
;; defined in a
theme (
e.g. `user'). Enabling the
theme
sets
;;
custom-enabled-themes, which enables the theme..
.
(
unless
custom-enabling-themes
(
let
((
custom-enabling-themes
t
)
failures
)
(
setq
themes
(
delq
'user
(
delete-dups
themes
))
)
(
if
(
boundp
symbol
)
(
dolist
(
theme
(
symbol-value
symbol
))
(
if
(
not
(
memq
them
e
themes
))
(
disable-theme
theme
))))
(
dolist
(
theme
(
reverse
theme
s
)
)
(
condition-case
nil
(
enable
-theme
theme
)
(
error
(
progn
(
push
theme
failures
)
(
setq
themes
(
delq
theme
themes
)))))
)
(
enable-theme
'user
)
(
custom-set-default
symbol
themes
)
(
if
failures
(
message
"Failed to enable theme
s
: %s"
(
mapconcat
'symbol-name
failures
" "
))))))
)
(
let
(
failures
)
(
setq
theme
s
(
delq
'user
(
delete-dups
theme
s
)))
;;
Disable all themes not in THEMES
.
(
if
(
boundp
symbol
)
(
dolist
(
theme
(
symbol-value
symbol
)
)
(
if
(
not
(
memq
theme
themes
))
(
disable-theme
theme
)))
)
;; Call `enable-theme' or `load-theme' on each of THEMES.
(
dolist
(
theme
(
revers
e
themes
))
(
condition-case
nil
(
if
(
custom-theme-p
theme
)
(
enable-theme
theme
)
(
load
-theme
theme
)
)
(
error
(
setq
failures
(
cons
theme
failures
)
themes
(
delq
theme
themes
)))))
(
enable-theme
'user
)
(
custom-set-default
symbol
themes
)
(
if
failures
(
message
"Failed to enable theme: %s"
(
mapconcat
'symbol-name
failures
"
,
"
))))))
(
defsubst
custom-theme-enabled-p
(
theme
)
"Return non-nil if THEME is enabled."
...
...
lisp/eshell/esh-opt.el
View file @
8af8e70e
...
...
@@ -35,13 +35,51 @@ Eshell commands implemented in Lisp."
;;; User Functions:
(
defmacro
eshell-eval-using-options
(
name
macro-args
options
&rest
body-forms
)
(
defmacro
eshell-eval-using-options
(
name
macro-args
options
&rest
body-forms
)
"Process NAME's MACRO-ARGS using a set of command line OPTIONS.
After doing so, settings
will be stored
in local symbols as declared
by OPTIONS; FORMS will
then
be
evaluate
d
-- assuming all was OK.
After doing so, s
tores s
ettings in local symbols as declared
by OPTIONS;
then evaluate
s BODY-FORMS
-- assuming all was OK.
The syntax of OPTIONS is:
OPTIONS is a list, beginning with one or more elements of the form:
\(SHORT LONG VALUE SYMBOL HELP-STRING)
Each of these elements represents a particular command-line switch.
SHORT is either nil, or a character that can be used as a switch -SHORT.
LONG is either nil, or a string that can be used as a switch --LONG.
At least one of SHORT and LONG must be non-nil.
VALUE is the value associated with the option. It can be either:
t - the option needs a value to be specified after the switch;
nil - the option is given the value t;
anything else - specifies the actual value for the option.
SYMBOL is either nil, or the name of the Lisp symbol that will be bound
to VALUE. A nil SYMBOL calls `eshell-show-usage', and so is appropriate
for a \"--help\" type option.
HELP-STRING is a documentation string for the option.
Any remaining elements of OPTIONS are :KEYWORD arguments. Some take
arguments, some do not. The recognized :KEYWORDS are:
:external STRING
STRING is an external command to run if there are unknown switches.
:usage STRING
STRING is the initial part of the command's documentation string.
It appears before the options are listed.
:post-usage STRING
STRING is an optional trailing part of the command's documentation string.
It appears after the options, but before the final part of the
documentation about the associated external command (if there is one).
:show-usage
If present, then show the usage message if the command is called with no
arguments.
:preserve-args
If present, do not pass MACRO-ARGS through `eshell-flatten-list'
and `eshell-stringify-list'.
For example, OPTIONS might look like:
'((?C nil nil multi-column \"multi-column display\")
(nil \"help\" nil nil \"show this usage display\")
...
...
@@ -52,8 +90,9 @@ The syntax of OPTIONS is:
Sort entries alphabetically across.\")
`eshell-eval-using-options' returns the value of the last form in
BODY-FORMS. If instead an external command is run, the tag
`eshell-external' will be thrown with the new process for its value.
BODY-FORMS. If instead an external command is run (because of
an unknown option), the tag `eshell-external' will be thrown with
the new process for its value.
Lastly, any remaining arguments will be available in a locally
interned variable `args' (created using a `let' form)."
...
...
@@ -200,7 +239,7 @@ switch is unrecognized."
(
defun
eshell-process-args
(
name
args
options
)
"Process the given ARGS using OPTIONS.
This assumes that symbols have been intern'd by `eshell-
with
-options'."
This assumes that symbols have been intern'd by `eshell-
eval-using
-options'."
(
let
((
ai
0
)
arg
)
(
while
(
<
ai
(
length
args
))
(
setq
arg
(
nth
ai
args
))
...
...
lisp/gnus/ChangeLog
View file @
8af8e70e
2011-03-21 Julien Danjou <julien@danjou.info>
* mm-view.el (mm-display-inline-fontify): Make mode optional, and call
normal-mode if not set. Set temp buffer unmodified to avoid kill-buffer
query.
(mm-inline-text): Render normal text with fontification whenever
possible.
* gnus-sum.el (gnus-summary-save-parts-1):
* gnus-art.el (gnus-article-browse-html-save-cid-content)
(gnus-article-browse-html-parts, gnus-mime-delete-part)
(gnus-mime-copy-part, gnus-mime-inline-part, gnus-insert-mime-button):
Use `mm-handle-filename'.
* mm-util.el (mm-handle-filename): New function, return the filename of
an handle.
2011-03-18 Julien Danjou <julien@danjou.info>
* gnus-util.el (gnus-buffer-live-p): Simplify gnus-buffer-live-p.
...
...
lisp/gnus/gnus-art.el
View file @
8af8e70e
...
...
@@ -2811,14 +2811,11 @@ Return file name."
((equal (concat "<" cid ">") (mm-handle-id handle))
(setq file
(expand-file-name
(or (mail-content-type-get
(mm-handle-disposition handle) 'filename)
(mail-content-type-get
(setq type (mm-handle-type handle)) 'name)
(concat
(make-temp-name "cid")
(car (rassoc (car type) mailcap-mime-extensions))))
directory))
(or (mm-handle-filename handle)
(concat
(make-temp-name "cid")
(car (rassoc (car (mm-handle-type handle)) mailcap-mime-extensions))))
directory))
(mm-save-part-to-file handle file)
(throw 'found file))))))))
...
...
@@ -2835,10 +2832,7 @@ message header will be added to the bodies of the \"text/html\" parts."
((or (equal (car (setq type (mm-handle-type handle))) "text/html")
(and (equal (car type) "message/external-body")
(or header
(setq file (or (mail-content-type-get type 'name)
(mail-content-type-get
(mm-handle-disposition handle)
'filename))))
(setq file (mm-handle-filename handle)))
(or (mm-handle-cache handle)
(condition-case code
(progn (mm-extern-cache-contents handle) t)
...
...
@@ -5043,14 +5037,11 @@ Deleting parts may malfunction or destroy the article; continue? "))
(
let*
((
data
(
get-text-property
(
point
)
'gnus-data
))
(
id
(
get-text-property
(
point
)
'gnus-part
))
(
handles
gnus-article-mime-handles
)
(
none
"(none)"
)
(
description
(
let
((
desc
(
mm-handle-description
data
)))
(
when
desc
(
mail-decode-encoded-word-string
desc
))))
(
filename
(
or
(
mail-content-type-get
(
mm-handle-disposition
data
)
'filename
)
none
))
(
filename
(
or
(
mm-handle-filename
(
mm-handle-disposition
data
))
"(none)"
))
(
type
(
mm-handle-media-type
data
)))
(
unless
data
(
error
"No MIME part under point"
))
...
...
@@ -5168,10 +5159,7 @@ are decompressed."
(
unless
handle
(
setq
handle
(
get-text-property
(
point
)
'gnus-data
)))
(
when
handle
(
let
((
filename
(
or
(
mail-content-type-get
(
mm-handle-type
handle
)
'name
)
(
mail-content-type-get
(
mm-handle-disposition
handle
)
'filename
)))
(
let
((
filename
(
mm-handle-filename
handle
))
contents
dont-decode
charset
coding-system
)
(
mm-with-unibyte-buffer
(
mm-insert-part
handle
)
...
...
@@ -5261,12 +5249,7 @@ Compressed files like .gz and .bz2 are decompressed."
(
mm-with-unibyte-buffer
(
mm-insert-part
handle
)
(
setq
contents
(
or
(
mm-decompress-buffer
(
or
(
mail-content-type-get
(
mm-handle-type
handle
)
'name
)
(
mail-content-type-get
(
mm-handle-disposition
handle
)
'filename
))
nil
t
)
(
or
(
mm-decompress-buffer
(
mm-handle-filename
handle
)
nil
t
)
(
buffer-string
))))
(
cond
((
not
arg
)
...
...
@@ -5671,8 +5654,7 @@ all parts."
(
defun
gnus-insert-mime-button
(
handle
gnus-tmp-id
&optional
displayed
)
(
let
((
gnus-tmp-name
(
or
(
mail-content-type-get
(
mm-handle-type
handle
)
'name
)
(
mail-content-type-get
(
mm-handle-disposition
handle
)
'filename
)
(
or
(
mm-handle-filename
handle
)
(
mail-content-type-get
(
mm-handle-type
handle
)
'url
)
""
))
(
gnus-tmp-type
(
mm-handle-media-type
handle
))
...
...
lisp/gnus/gnus-sum.el
View file @
8af8e70e
...
...
@@ -12142,10 +12142,7 @@ If REVERSE, save parts that do not match TYPE."
mm-file-name-rewrite-functions
(file-name-nondirectory
(or
(mail-content-type-get
(mm-handle-disposition handle) 'filename)
(mail-content-type-get
(mm-handle-type handle) 'name)
(mm-handle-filename handle)
(format "%s.%d.%d" gnus-newsgroup-name
(cdr gnus-article-current)
gnus-summary-save-parts-counter))))
...
...
lisp/gnus/mm-util.el
View file @
8af8e70e
...
...
@@ -1667,6 +1667,13 @@ gzip, bzip2, etc. are allowed."
(
when
decomp
(
kill-buffer
(
current-buffer
)))))))
(
defun
mm-handle-filename
(
handle
)
"Return filename of HANDLE if any."
(
or
(
mail-content-type-get
(
mm-handle-type
handle
)
'name
)
(
mail-content-type-get
(
mm-handle-disposition
handle
)
'filename
)))
(
provide
'mm-util
)
;;; mm-util.el ends here
lisp/gnus/mm-view.el
View file @
8af8e70e
...
...
@@ -455,7 +455,7 @@
(narrow-to-region (point) (point))
(mm-insert-part handle)
(goto-char (point-max)))
(
insert (mm-decode-string (mm-get-part handle) charset)
))
(
mm-display-inline-fontify handle
))
(when (and mm-fill-flowed
(equal type "
plain
")
(equal (cdr (assoc 'format (mm-handle-type handle)))
...
...
@@ -565,15 +565,16 @@