Commit graph

52635 commits

Author SHA1 Message Date
Kenichi Handa
66399c0a66 merge emacs-23 2011-01-14 13:08:30 +09:00
Kenichi Handa
1a6a03e4a3 Fix setting of buffer-file-coding-system of RMAIL buffer. 2011-01-14 13:04:10 +09:00
Stefan Monnier
fc55380c5c * lisp/emacs-lisp/easymenu.el: Add :enable, and obey :label. Require CL.
(easy-menu-create-menu, easy-menu-convert-item-1):
Use :label rather than nil for labels.  Use `case'.
Add :enable as alias for :active.
(easy-menu-binding): Obey :label.

Fixes: debbugs:7754
2011-01-13 21:12:43 -05:00
Stefan Monnier
4d789d84b8 Use run-mode-hooks for major mode hooks.
* lisp/textmodes/reftex-toc.el (reftex-toc-mode-map):
Rename from reftex-toc-map.
(reftex-toc-mode): Use define-derived-mode.
* lisp/textmodes/reftex-sel.el (reftex-select-shared-map): New map.
(reftex-select-label-mode-map, reftex-select-bib-mode-map):
Rename from reftex-select-(label|bib)-map.  Move init into declaration.
(reftex-select-label-mode, reftex-select-bib-mode):
Use define-derived-mode.
* lisp/textmodes/reftex-index.el (reftex-index-phrases-mode-map)
(reftex-index-mode-map): Rename from reftex-index(-phrases)-map.
Move init into delcaration.
(reftex-index-mode, reftex-index-phrases-mode):
Use define-derived-mode.
* lisp/speedbar.el (speedbar-mode-syntax-table): Renaqme from
speedbar-syntax-table.  Move init into declaration.
(speedbar-mode-map): Rename from speedbar-key-map.
Move init into declaration.
(speedbar-file-key-map): Move init into declaration.
(speedbar-mode): Use define-derived-mode.
* lisp/recentf.el (recentf-mode): Don't run hook (or message) redundantly.
* lisp/net/rcirc.el (rcirc-mode): Use run-mode-hooks.
* lisp/emacs-lisp/chart.el (chart-mode-map): Rename from chart-map.
(chart-face-list): Move initialization into declaration.
(chart-mode): Use define-derived-mode.
* lisp/calculator.el (calculator-mode-map): Move init into declaration.
(calculator-mode): Use define-derived-mode.
* lisp/cedet/srecode/srt-mode.el (srecode-template-mode):
Use define-derived-mode.
* lisp/cedet/semantic/symref/list.el (semantic-symref-results-mode):
Use run-mode-hooks.
* lisp/erc/erc.el (erc-mode):
* lisp/erc/erc-dcc.el (erc-dcc-chat-mode): Use define-derived-mode.
* lisp/org/org-remember.el (org-remember-mode):
* lisp/org/org-capture.el (org-capture-mode): Don't run hook redundantly.

Fixes: debbugs:513
2011-01-13 18:14:30 -05:00
Stefan Monnier
b49a2dbf58 * lisp/mail/mail-utils.el (mail-strip-quoted-names): Make the regexp code
work for nested comments.
2011-01-13 16:48:34 -05:00
Stefan Monnier
dbed16aa06 * lisp/progmodes/prolog.el: Use syntax-propertize. Further code cleanup.
(prolog-use-prolog-tokenizer-flag): Change default when
syntax-propertize can be used.
(prolog-syntax-propertize-function): New var.
(prolog-mode-variables): Move make-local-variable into `set'.
Don't make comment-column local since we don't set it.
Set comment-add (as it was in previous prolog.el).  Use dolist.
Set syntax-propertize-function.
(prolog-mode, prolog-inferior-mode):
Call prolog(-inferior)-menu directly, not through the mode-hook.
(prolog-buffer-module, prolog-indent-level)
(prolog-paren-is-the-first-on-line-p, prolog-paren-balance)
(prolog-comment-limits, prolog-goto-comment-column):
Use line-(end|beginning)-position.
(prolog-build-prolog-command): Tighten up regexp.
(prolog-consult-compile): Move make-local-variable into `set'.
(prolog-consult-compile-filter, prolog-goto-next-paren)
(prolog-help-on-predicate, prolog-clause-info)
(prolog-mark-predicate): Don't let+setq.
(prolog-indent-line): Use indent-line-to.
Only call prolog-goto-comment-column if necessary.
(prolog-indent-level): Use bobp.
(prolog-first-pos-on-line): Remove, not used any more.
(prolog-in-string-or-comment): Use syntax-ppss if available.
(prolog-help-on-predicate): Use read-string.
(prolog-goto-predicate-info): Simplify.
(prolog-read-predicate): Use `default' rather than `initial'.
(prolog-temporary-file): Use make-temp-file to close a security hole.
(prolog-toggle-sicstus-sd): New command.
(prolog-electric-underscore, prolog-variables-to-anonymous):
Use dynamic-scoping as it was meant.
(prolog-menu): Move menu definitions to top-level.
Use a toggle-button for Sicstus's source debugger.
Change "Code" to the more usual "Prolog", and hence change "Prolog"
to "System".
(prolog-inferior-menu): Reuse prolog-menu's help menu.
Move other menu definition to top-level.
2011-01-13 15:46:38 -05:00
Tassilo Horn
1281bd51e8 (doc-view-initiate-display): Fall back to normal mode when
doc-view-mode cannot be enabled, also when extracting the document
text into a separate buffer (bug#6446).
2011-01-13 21:17:15 +01:00
Tassilo Horn
5b3553158d * doc-view.el (doc-view-open-text): Use meaningful text buffer
name.  Keep original document's directory as default-directory
(bug#6446).
2011-01-13 20:48:26 +01:00
Tassilo Horn
50f8cd9617 * simple.el (shell-command): Don't error out if shell command
buffer contains text with non-nil read-only property when erasing
the buffer.
2011-01-13 19:58:28 +01:00
Kim F. Storm
821f936d1c * ido.el (ido-may-cache-directory): Move "too-big" check later.
(ido-next-match, ido-prev-match): Fix stray reordering of matching
items when cycling through the matches.
2011-01-13 17:26:40 +01:00
Tassilo Horn
f754f89846 * dired-x.el (dired-omit-verbose): New defcustom that allows
disabling the omit messages.
(dired-omit-expunge): Use it.
2011-01-13 16:44:41 +01:00
Christian Ohler
8b845e3b89 Merged from trunk. 2011-01-13 19:08:58 +11:00
Chong Yidong
c88aaf48b2 * lisp/subr.el (event-start, event-end): Doc fix (Bug#7826). 2011-01-13 00:12:01 -05:00
Chong Yidong
a03b542a78 * font-lock.el (font-lock-verbose): Default to nil. 2011-01-12 23:30:23 -05:00
Chong Yidong
5399653b53 * message.el (message-bury): Add special-case handling for Rmail.
This should not be merged into the trunk.
2011-01-12 23:24:31 -05:00
Chong Yidong
25ca2e6140 New arg RETURN-ACTION for compose-mail, and related functions.
* lisp/mail/sendmail.el (mail-return-action): New var.
(mail-mode): Make it buffer-local.
(mail-bury): Obey it.  Move special Rmail window handling to
rmail-mail-return.
(mail, mail-setup): New arg RETURN-ACTION.
(sendmail-user-agent-compose): Move from simple.el.

* lisp/simple.el (sendmail-user-agent-compose): Move to sendmail.el.
(compose-mail): New arg RETURN-ACTION.
(compose-mail-other-window, compose-mail-other-frame): Likewise.

* lisp/gnus/gnus-msg.el (gnus-msg-mail): New arg RETURN-ACTION.  Pass it to
message-mail.

* lisp/gnus/message.el (message-mail): New arg RETURN-ACTION.
(message-return-action): New var.
(message-bury): Use it.
(message-mode): Make it buffer-local.
(message-send-and-exit): Always call message-bury.
(message-tool-bar-gnome): Tweak tool-bar items.  Add :vert-only tags.

* lisp/mail/rmail.el (rmail-mail-return): New function.
(rmail-start-mail): Pass it to compose-mail.

* lisp/mh-e/mh-comp.el (mh-user-agent-compose): New arg RETURN-ACTION.
2011-01-12 23:23:41 -05:00
Chong Yidong
b2948a8779 * cus-theme.el (customize-themes): Use switch-to-buffer.
* menu-bar.el (menu-bar-custom-menu): Tweak Mule and Customize
menus.  Add menu item for customize-themes.
2011-01-12 14:10:00 -05:00
Chong Yidong
2a8b13afb7 * emacs-lisp/package.el (package--list-packages): Use switch-to-buffer. 2011-01-12 13:57:23 -05:00
Christian Ohler
d221e7808c Add ERT, a tool for automated testing in Emacs Lisp.
* Makefile.in, configure.in, doc/misc/Makefile.in, doc/misc/makefile.w32-in:
Add ERT.  Make "make check" run tests in test/automated.

* doc/misc/ert.texi, lisp/emacs-lisp/ert.el, lisp/emacs-lisp/ert-x.el:
New files.

* test/automated: New directory.
2011-01-13 03:08:24 +11:00
Kenichi Handa
07ee935146 merge emacs-23 2011-01-12 15:11:40 +09:00
Kenichi Handa
e7ca0062a4 Another improvement of MIME handling in rmail. 2011-01-12 15:08:55 +09:00
Glenn Morris
ae01d7ca64 * message.el (message-mail): A compose-mail function should accept headers as strings. 2011-01-11 19:53:28 -08:00
Chong Yidong
ba404aa123 lisp/emulation/tpu-edt.el: Regenerate md5sum. 2011-01-11 21:13:33 -05:00
Lars Magne Ingebrigtsen
c516cd6dc7 proto-stream.el (open-protocol-stream): Protect against the low-level transport functions returning nil.
gnus-sum.el (gnus-summary-next-article): Remove hack to reselect group window, because it does the wrong thing when a separate frame displays the group buffer.
gnus-int.el (gnus-request-accept-article): Don't try to update marks and stuff if the backend didn't return the article number.  This fixes an Exchange-related nnimap bug.
mm-decode.el (mm-preferred-alternative-precedence): Discourage showing empty parts.
nnimap.el (nnimap-convert-partial-article): Protect against zero-length body parts.
2011-01-11 23:32:50 +00:00
Johan Bockgård
059616e5a8 * lisp/emacs-lisp/unsafep.el (unsafep): Handle backquoted forms. 2011-01-11 19:42:30 +01:00
Stefan Monnier
04380ff1b8 * lisp/progmodes/prolog.el: Fix up coding conventions and such.
(prolog-indent-width): Use the same default as in
previous prolog.el rather than tab-width which depends on which buffer
is current when the file is loaded.
(prolog-electric-newline-flag): Only enable if electric-indent-mode
is not available.
(prolog-emacs): Remove.  Use (featurep 'xemacs) instead.
(prolog-known-systems): Remove.
(prolog-mode-syntax-table, prolog-inferior-mode-map):
Move initialization into declaration.
(prolog-mode-map): Move initialization into declaration.
Remove system-specific mode-map vars, since they referred to the same
keymap anyway.
(prolog-mode-variables): Obey the user's preference w.r.t
adaptive-fill-mode.  Prefer symbol-value to `eval'.
(prolog-mode-keybindings-edit): Add compatibility bindings.
(prolog-mode): Use define-derived-mode.  Don't handle mercury here.
(mercury-mode-map): New var.
(mercury-mode, prolog-inferior-mode): Use define-derived-mode.
(prolog-ensure-process, prolog-process-insert-string)
(prolog-consult-compile): Use with-current-buffer.
(prolog-guess-fill-prefix): Simplify data flow.
(prolog-replace-in-string): New function to use instead of
replace-in-string.
(prolog-enable-sicstus-sd): Don't abuse `eval'.
(prolog-uncomment-region): Use `uncomment-region' when available.
(prolog-electric-colon, prolog-electric-dash): Use `eolp'.
(prolog-int-to-char, prolog-char-to-int): New functions to use instead
of int-to-char and char-to-int.
(prolog-mode-hook, prolog-inferior-mode-hook): Don't force font-lock.
2011-01-11 00:07:32 -05:00
Stefan Bruda
e20195263b * lisp/progmodes/prolog.el: Replace by a whole new file. 2011-01-10 23:34:06 -05:00
Stefan Monnier
3fa173b4d9 * lisp/subr.el (eval-after-load): Fix timing for features.
(declare-function, undefined, insert-for-yank)
(replace-regexp-in-string): Follow checkdoc's recommendations.
* doc/lispref/loading.texi (Hooks for Loading): Adjust doc of eval-after-load.

Fixes: debbugs:7769
2011-01-10 22:23:04 -05:00
Stefan Monnier
9ca3fe48ff * tmm.el (tmm-get-keymap): Skip bindings without labels.
(tmm-prompt): Simplify.
(tmm-add-prompt): Remove unused var `win'.

Fixes: debbugs:7721
2011-01-10 21:28:48 -05:00
Stefan Monnier
cfab9f9bd7 * whitespace.el (global-whitespace-newline-mode): Fix call
to minor mode which used nil accidentally to mean "turn off".

Fixes: debbugs:7810
2011-01-10 19:14:25 -05:00
Stefan Monnier
7973bcea7f * lisp/calendar/diary-lib.el (diary-mode): Refresh *Calendar* after
refreshing the diary buffer.
2011-01-10 18:31:47 -05:00
Ken Manheimer
0af8c88bf2 allout.el: Add 2011 to the file copyright.
(allout-encrypt-string): Prevent encryption from adding an extra newline at
the end of the topic body.
(allout-version): Increment to 2.3.
2011-01-10 17:05:42 -05:00
Michael Albinus
01d70c32ce * net/tramp.el (tramp-find-inline-compress)
(tramp-get-inline-coding): Quote command after pipe symbol for
local calls under W32.  (Bug#6784)
2011-01-10 21:36:09 +01:00
Michael Albinus
6a0ecd86d2 * net/tramp.el (tramp-default-method): Initialize with pscp/plink
only when running under W32.
2011-01-10 20:42:46 +01:00
Michael Albinus
5c0b407077 * net/dbus.el (dbus-unregister-service): Complete doc. Fix
call of dbus-error signal.
2011-01-10 12:21:01 +01:00
Michael Albinus
1a27c64e1c * net/dbus.el (dbus-register-property): Use `dont-register' keyword. 2011-01-10 11:53:13 +01:00
Michael Albinus
0a203b6115 * net/dbus.el (dbus-unregister-service): Translate returned
integer into a symbol.
(dbus-register-property): Use `dbus-register-service' to do the
name registration.
2011-01-10 10:46:19 +01:00
Chong Yidong
12e1f3289d Make org-link and idlwave-help-link inherit from link face.
Suggested by Joakim Verona.

* lisp/org/org-faces.el (org-link):
* lisp/progmodes/idlw-help.el (idlwave-help-link): Inherit from link face.
2011-01-09 16:24:07 -05:00
Chong Yidong
732eb50a1d * lisp/comint.el (comint-highlight-prompt): Inherit from minibuffer-prompt. 2011-01-09 16:07:30 -05:00
Chong Yidong
895123f566 Fix 2010-03-12T22:56:30Z!cyd@stupidchicken.com change -- rename :on/off-image widget props to :on/off-glyph.
* wid-edit.el (visibility): Replace :on-image and :off-image
widget properties with :on-glyph and :off-glyph, for consistency
with the `visibility' widget.
(widget-toggle-value-create, widget-visibility-value-create):
Merge into a single function `widget-toggle-value-create'.

* cus-edit.el (custom-variable-value-create, custom-visibility)
(custom-face-edit-value-create, custom-face-value-create): Replace
:on-image and :off-image widget properties with :on-glyph and
:off-glyph, for consistency with the `visibility' widget.
2011-01-09 16:05:53 -05:00
Andreas Schwab
9094fd8fc8 Update dired.el 2011-01-09 20:34:20 +01:00
Andreas Schwab
c8043a225f * lisp/net/ldap.el (ldap-search-internal): Don't use eval. 2011-01-09 20:34:19 +01:00
Eli Zaretskii
88ecd0a566 Fix bug #6684 with shell pipelines on MS-Windows.
progmodes/grep.el (grep-compute-defaults): Quote the program
 file name after the pipe symbol in Grep templates.
 jka-compr.el (jka-compr-partial-uncompress): Likewise.

Fixes: debbugs:6784
2011-01-09 19:52:57 +02:00
Chong Yidong
973f1f2a81 * lisp/subr.el (read-char-choice): Use read-key. Suggested by Stefan.
* src/fns.c (Fyes_or_no_p): Minor doc fix.
2011-01-09 09:26:29 -05:00
Chong Yidong
b7617f6d8b Record "safe themes" as sha1 hashes, as suggested by Stefan Monnier.
* lisp/custom.el (custom-safe-themes): Rename from
custom-safe-theme-files.  Add :risky tag.
(load-theme, custom-theme-load-confirm): Save sha1 hashes to
custom-safe-themes, not filenames.  Suggested by Stefan Monnier.
2011-01-08 23:59:56 -05:00
Chong Yidong
900503ae79 Tweaks to tool-bar for default, VC-dir, Compile, and Info.
* tool-bar.el (tool-bar-setup): Remove Help button.  Remove label
from Search and add a label to Undo.

* vc/vc-dir.el (vc-dir-tool-bar-map): Rearrange, removing
inappropriate buttons and adding :vert-only tags.

* progmodes/compile.el (compilation-mode-tool-bar-map): Adjust to
removal of Help tool-bar button.  Remove Undo button for space.

* info.el (info-tool-bar-map): Add :vert-only tags.
2011-01-08 23:13:47 -05:00
Tassilo Horn
c44d54b34f * doc-view.el (doc-view-mode-p): Check for png or imagemagick
image backend support.  Either of them is fine.
2011-01-08 23:57:07 +01:00
Lennart Borgman
320912fb3d Fix permanancy of BUFFER-LIST arg to list-buffers-noselect (Bug#7749).
* buff-menu.el (Buffer-menu-buffer-list): New var.
(Buffer-menu-revert-function, list-buffers-noselect): Use it, so a
restricted buffer list is not lost on revert (Bug#7749).
2011-01-08 17:15:51 -05:00
Chong Yidong
2b9f65621b * lisp/files.el (directory-abbrev-alist): Minor doc fix (Bug#7777).
* doc/lispref/files.texi: Likewise.
2011-01-08 16:22:19 -05:00
Chong Yidong
3d91e30286 Doc fix for y-or-n-p and yes-or-no-p.
* subr.el (y-or-n-p): Doc fix.
* fns.c (Fyes_or_no_p): Doc fix.
2011-01-08 16:17:58 -05:00