Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-81

Merge from emacs--cvs-trunk--0

Patches applied:

 * emacs--cvs-trunk--0  (patch 532-541)

   - Update from CVS
   - Merge from gnus--rel--5.10

 * gnus--rel--5.10  (patch 112-115)

   - Update from CVS
This commit is contained in:
Miles Bader 2005-09-11 22:21:01 +00:00
commit ff8d296438
73 changed files with 2852 additions and 1295 deletions

1507
AUTHORS

File diff suppressed because it is too large Load diff

View file

@ -1,3 +1,19 @@
2005-09-11 Kim F. Storm <storm@cua.dk>
* AUTHORS: Regenerate.
2005-09-10 Giuseppe Scrivano <gscrivano@gmail.com>
Remove the MAXPATHLEN limitations:
* configure.in (AC_CHECK_FUNCS): Check for get_current_dir_name.
* configure: Regenerated.
2005-09-09 Eli Zaretskii <eliz@fencepost.gnu.org>
* configure.in <lynxsos*>: Support for LynxOS on PPC.
* configure: Regenerated.
2005-09-05 Paul Eggert <eggert@cs.ucla.edu> 2005-09-05 Paul Eggert <eggert@cs.ucla.edu>
* config.guess, config.sub: Updated from master source. * config.guess, config.sub: Updated from master source.

View file

@ -27,10 +27,6 @@ face name prefixes should be in it for good results.
* NEW FEATURES * NEW FEATURES
** Make VC-over-Tramp work where possible, or at least fail
gracefully if something isn't supported over Tramp.
To be done by Andre Spiegel <spiegel@gnu.org>.
** Update Speedbar. ** Update Speedbar.
* FATAL ERRORS * FATAL ERRORS
@ -52,9 +48,6 @@ back burner waiting for a legal comment or an alternate implementation
* BUGS * BUGS
** The header-line buttons in the buffer list buffer
should respond to Mouse-1.
** Fix recognition of shell's `dirs' command. ** Fix recognition of shell's `dirs' command.
Is his change right? Is his change right?
@ -235,13 +228,13 @@ lispref/frames.texi "Luc Teirlinck" Chong Yidong
lispref/functions.texi "Luc Teirlinck" Chong Yidong lispref/functions.texi "Luc Teirlinck" Chong Yidong
lispref/hash.texi "Luc Teirlinck" Chong Yidong lispref/hash.texi "Luc Teirlinck" Chong Yidong
lispref/help.texi "Luc Teirlinck" Chong Yidong lispref/help.texi "Luc Teirlinck" Chong Yidong
lispref/hooks.texi Lute Kamstra lispref/hooks.texi Lute Kamstra Chong Yidong
lispref/internals.texi "Luc Teirlinck" Chong Yidong lispref/internals.texi "Luc Teirlinck" Chong Yidong
lispref/intro.texi "Luc Teirlinck" Josh Varner lispref/intro.texi "Luc Teirlinck" Josh Varner
lispref/keymaps.texi "Luc Teirlinck" Chong Yidong lispref/keymaps.texi "Luc Teirlinck" Chong Yidong
lispref/lists.texi "Luc Teirlinck" Chong Yidong lispref/lists.texi "Luc Teirlinck" Chong Yidong
lispref/loading.texi "Luc Teirlinck" Chong Yidong lispref/loading.texi "Luc Teirlinck" Chong Yidong
lispref/locals.texi lispref/locals.texi Chong Yidong
lispref/macros.texi "Luc Teirlinck" Chong Yidong lispref/macros.texi "Luc Teirlinck" Chong Yidong
lispref/maps.texi lispref/maps.texi
lispref/markers.texi "Luc Teirlinck" Chong Yidong lispref/markers.texi "Luc Teirlinck" Chong Yidong

584
configure vendored

File diff suppressed because it is too large Load diff

View file

@ -282,6 +282,15 @@ dnl see the `changequote' comment above.
esac esac
;; ;;
## LynxOS ports
*-*-lynxos* )
opsys=lynxos
case "${canonical}" in
i[3456]86-*-lynxos*) machine=intel386 ;;
powerpc-*-lynxos*) machine=powerpc ;;
esac
;;
## Acorn RISCiX: ## Acorn RISCiX:
arm-acorn-riscix1.1* ) arm-acorn-riscix1.1* )
machine=acorn opsys=riscix1-1 machine=acorn opsys=riscix1-1
@ -1083,7 +1092,6 @@ dnl see the `changequote' comment above.
*-darwin ) opsys=darwin *-darwin ) opsys=darwin
CPP="${CC-cc} -E -no-cpp-precomp" CPP="${CC-cc} -E -no-cpp-precomp"
;; ;;
*-lynxos* ) opsys=lynxos ;;
*-isc1.* | *-isc2.[01]* ) opsys=386-ix ;; *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
*-isc2.2* ) opsys=isc2-2 ;; *-isc2.2* ) opsys=isc2-2 ;;
*-isc4.0* ) opsys=isc4-0 ;; *-isc4.0* ) opsys=isc4-0 ;;
@ -2414,7 +2422,7 @@ AC_CHECK_FUNCS(touchlock)
AC_CHECK_HEADERS(maillock.h) AC_CHECK_HEADERS(maillock.h)
AC_CHECK_FUNCS(gethostname getdomainname dup2 \ AC_CHECK_FUNCS(gethostname getdomainname dup2 \
rename closedir mkdir rmdir sysinfo getrusage \ rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \ random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \ strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \ utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \

View file

@ -1,3 +1,12 @@
2005-09-00 Kevin Ryde <user42@zip.com.au>
* MORE.STUFF: Update url for calculator.el.
2005-09-08 Kenichi Handa <handa@m17n.org>
* PROBLEMS: Show a patch for Mule-UCS to make it byte-compiled
correctly.
2005-08-31 Michael Albinus <michael.albinus@gmx.de> 2005-08-31 Michael Albinus <michael.albinus@gmx.de>
* NEWS: Add entry for `make-auto-save-file-name'. * NEWS: Add entry for `make-auto-save-file-name'.

View file

@ -43,7 +43,7 @@ You might find bug-fixes or enhancements in these places.
* BS: <URL:http://www.geekware.de/software/emacs/index.html> * BS: <URL:http://www.geekware.de/software/emacs/index.html>
* Calculator: <URL:http://www.cs.cornell.edu/eli/misc/calculator.el> * Calculator: <URL:http://www.barzilay.org/misc/calculator.el>
* CC mode: <URL:http://cc-mode.sourceforge.net/> * CC mode: <URL:http://cc-mode.sourceforge.net/>

View file

@ -1218,6 +1218,12 @@ fontset appropriately.
** Customize changes: ** Customize changes:
+++
*** Custom themes are collections of customize options. Create a
custom theme with M-x customize-create-theme. Use M-x load-theme to
load and enable a theme, and M-x disable-theme to disable it. Use M-x
enable-theme to renable a disabled theme.
+++ +++
*** The commands M-x customize-face and M-x customize-face-other-window *** The commands M-x customize-face and M-x customize-face-other-window
now look at the character after point. If a face or faces are now look at the character after point. If a face or faces are
@ -1835,6 +1841,12 @@ boundaries during scrolling.
* Changes in Specialized Modes and Packages in Emacs 22.1: * Changes in Specialized Modes and Packages in Emacs 22.1:
** The variable `woman-topic-at-point' was renamed
to `woman-use-topic-at-point' and behaves differently: if this
variable is non-nil, the `woman' command uses the word at point
automatically, without asking for a confirmation. Otherwise, the word
at point is suggested as default, but not inserted at the prompt.
--- ---
** Changes to cmuscheme ** Changes to cmuscheme

View file

@ -907,6 +907,36 @@ distributions, such as Debian, may already have applied such a patch.)
Note that Emacs has native support for Unicode, roughly equivalent to Note that Emacs has native support for Unicode, roughly equivalent to
Mule-UCS's, so you may not need it. Mule-UCS's, so you may not need it.
** Mule-UCS compilation problem.
Emacs of old versions and XEmacs byte-compile the form `(progn progn
...)' the same way as `(progn ...)', but Emacs of version 21.3 and the
later process that form just as interpreter does, that is, as `progn'
variable reference. Apply the following patch to Mule-UCS 0.84 to
make it compiled by the latest Emacs.
--- mucs-ccl.el 2 Sep 2005 00:42:23 -0000 1.1.1.1
+++ mucs-ccl.el 2 Sep 2005 01:31:51 -0000 1.3
@@ -639,10 +639,14 @@
(mucs-notify-embedment 'mucs-ccl-required name)
(setq ccl-pgm-list (cdr ccl-pgm-list)))
; (message "MCCLREGFIN:%S" result)
- `(progn
- (setq mucs-ccl-facility-alist
- (quote ,mucs-ccl-facility-alist))
- ,@result)))
+ ;; The only way the function is used in this package is included
+ ;; in `mucs-package-definition-end-hook' value, where it must
+ ;; return (possibly empty) *list* of forms. Do this. Do not rely
+ ;; on byte compiler to remove extra `progn's in `(progn ...)'
+ ;; form.
+ `((setq mucs-ccl-facility-alist
+ (quote ,mucs-ccl-facility-alist))
+ ,@result)))
;;; Add hook for embedding translation informations to a package.
(add-hook 'mucs-package-definition-end-hook
** Accented ISO-8859-1 characters are displayed as | or _. ** Accented ISO-8859-1 characters are displayed as | or _.
Try other font set sizes (S-mouse-1). If the problem persists with Try other font set sizes (S-mouse-1). If the problem persists with

View file

@ -1,6 +1,187 @@
2005-09-05 Chong Yidong <cyd@stupidchicken.com> 2005-09-11 Kim F. Storm <storm@cua.dk>
* custom.el (custom-push-theme): Fix last change. * emacs-lisp/authors.el (authors-aliases): Update list.
(authors-fixed-entries): Update mldrag.el entry.
2005-09-10 Alan Mackenzie <acm@muc.de>
* page.el (narrow-to-page): Exclude _entire_ multi-line delimiter
from the region narrowed to.
2005-09-10 Magnus Henoch <mange@freemail.hu>
* textmodes/ispell.el (ispell-check-version): Signal an error if
aspell version is less than 0.60.
2005-09-10 Pascal Dupuis <Pascal.Dupuis@esat.kuleuven.be> (tiny change)
* progmodes/octave-inf.el (inferior-octave-startup): Resync
current dir at the end.
2005-09-10 Emilio C. Lopes <eclig@gmx.net>
* woman.el (woman-topic-at-point-default): Renamed to
woman-use-topic-at-point-default.
(woman-topic-at-point): Renamed to woman-use-topic-at-point.
(woman-file-name): Reflect renames above. Automatically use the
word at point as topic if woman-use-topic-at-point is non-nil.
Otherwise offer it as default but don't insert it in the
minibuffer. Also use `test-completion' instead of `assoc' as
suggested by Stefan Monnier.
2005-09-10 Andre Spiegel <spiegel@gnu.org>
* vc.el (vc-directory, vc-update-change-log): Throw an error on
the attempt to do it over Tramp. This is not yet supported.
2005-09-10 Eli Zaretskii <eliz@gnu.org>
* menu-bar.el (menu-bar-menu-frame-live-and-visible-p)
(menu-bar-non-minibuffer-window-p): New functions.
("Split Window", "Save As..."): Use them.
("Postscript Print Buffer (B+W)", "Postscript Print Buffer")
("Print Buffer", "Truncate Long Lines in this Buffer"): Use
menu-bar-menu-frame-live-and-visible-p.
("Save Buffer", "Insert File", "Open Directory...")
("Open File...", "Visit New File..."): Use
menu-bar-non-minibuffer-window-p.
(kill-this-buffer-enabled-p, dired <menu-enable>): Use
menu-bar-non-minibuffer-window-p.
2005-09-09 Eli Zaretskii <eliz@gnu.org>
* cus-start.el (all): Don't complain about fringe-related
built-ins if fringes are not supported. Ditto about
selection-related built-ins. Fix the test for GTK-related
built-ins.
* menu-bar.el ("Split Window", "Postscript Print Buffer (B+W)")
("Postscript Print Buffer", "Print Region", "Save As...")
("Save", "Insert File...", "Open Directory...")
("Open File...", "Visit New File..."")
("Truncate Long Lines in this Buffer"): Don't look at
menu-updating-frame if this display does not support multiple
frames.
2005-09-09 Frederik Fouvry <fouvry@CoLi.Uni-SB.DE>
* mail/sendmail.el (default-sendmail-coding-system): Doc fix.
2005-09-09 Emilio Lopes <eclig@gmx.net>
* woman.el: Format- and whitespace-related changes.
2005-09-09 Eli Zaretskii <eliz@gnu.org>
* woman.el: Fix my email address.
2005-09-08 Richard M. Stallman <rms@gnu.org>
* progmodes/sh-script.el (sh-skeleton-pair-default-alist): New var.
(sh-mode): Locally set skeleton-pair-default-alist.
* progmodes/make-mode.el (makefile-add-log-defun): Trim the result.
* progmodes/flymake.el: Require `compile' unconditionally.
* mail/sendmail.el (send-mail-function): Add Mailclient alternative.
* woman.el (woman-file-name): Provide a default, not initial input.
* smerge-mode.el (smerge-resolve): Pass args to smerge-remove-props.
* font-lock.el (font-lock-support-mode): Doc fix.
* descr-text.el (describe-property-list): Handle non-symbol prop names.
2005-09-06 Stefan Monnier <monnier@iro.umontreal.ca>
* net/ange-ftp.el (ange-ftp-process-filter): Revert to ^#+$.
Use with-current-buffer.
(ange-ftp-gwp-start): Remove unused var `gw-user'.
(ange-ftp-guess-hash-mark-size): Remove unused var `result'.
(ange-ftp-insert-directory): Remove unused var `short'.
(ange-ftp-file-name-sans-versions): Remove unused var `host-type'.
2005-08-30 Richard M. Stallman <rms@gnu.org>
* simple.el (blink-matching-open): Get rid of text props from
the string shown in echo area. Don't permanently set point.
Some rearrangements.
* files.el (risky-local-variable-p):
Match `-predicates' and `-commands.
* cus-edit.el (custom-buffer-sort-alphabetically): Default to t.
(custom-save-all): Visit the file if necessary;
kill the buffer if we created it.
(custom-save-delete): Don't visit file or kill buffer here.
2005-09-08 Reiner Steib <Reiner.Steib@gmx.de>
* recentf.el (recentf-filename-handler): Add custom choice
`abbreviate-file-name'.
* msb.el (msb--very-many-menus): Fix typo.
* disp-table.el (standard-display-european): Don't set
enable-multibyte-characters to nil.
2005-09-08 David Ponce <david@dponce.com>
* recentf.el (recentf-show-file-shortcuts-flag): New option.
(recentf-expand-file-name): Doc fix.
(recentf-dialog-mode-map): Define digit shortcuts.
(recentf--files-with-key): New variable.
(recentf-show-digit-shortcut-filter): New function.
(recentf-open-files-items): New function.
(recentf-open-files): Use it.
(recentf-open-file-with-key): New command.
2005-09-07 Michael Albinus <michael.albinus@gmx.de>
* woman.el (top): Remap `man' command by `woman' in `woman-mode-map'.
(Man-getpage-in-background-advice): Remove defadvice; it isn't
necessary any longer with the remapped command.
(Man-bgproc-sentinel-advice): Remove defadvice which counts
formatting time only.
* net/tramp.el (tramp-action-password)
(tramp-multi-action-password): Compile the password prompt from
`method', `user' and `host'. Sometimes it isn't obvious which
password to enter, for example with remote files offered by
recentf.el, or with multiple steps. Suggested by Robert Marshall
<robert@chezmarshall.freeserve.co.uk>.
2005-09-07 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/perl-mode.el (perl-font-lock-syntactic-keywords):
Fix regexp for when "s///" is at the beginning of line.
2005-09-07 Jay Belanger <belanger@truman.edu>
* calc/calc-poly.el (math-expand-term): Multiply out any powers
when in matrix mode.
2005-09-08 Chong Yidong <cyd@stupidchicken.com>
* buff-menu.el (Buffer-menu-sort-by-column): New function.
Suggested by Kim F. Storm.
(Buffer-menu-sort-button-map): Global keymap for sort buttons.
(Buffer-menu-make-sort-button): Use global keymap.
2005-09-06 Stefan Monnier <monnier@iro.umontreal.ca>
* buff-menu.el (Buffer-menu-make-sort-button): Add docstrings, use
non-anonymous functions.
2005-09-06 Chong Yidong <cyd@stupidchicken.com>
* buff-menu.el (Buffer-menu-make-sort-button): Allow mouse-1 clicks
when using a header line. Otherwise, use mouse-1-click-follows-link.
* mouse.el (mouse-drag-header-line): Do nothing if the header-line
can't be moved; don't signal an error.
2005-09-05 Chong Yidong <cyd@stupidchicken.com> 2005-09-05 Chong Yidong <cyd@stupidchicken.com>
@ -11,8 +192,7 @@
(custom-push-theme): Save old values in the standard theme. (custom-push-theme): Save old values in the standard theme.
(disable-theme): Correct typo. (disable-theme): Correct typo.
(custom-face-theme-value) Deleted unused function. (custom-face-theme-value) Deleted unused function.
(custom-theme-recalc-face): Rewritten to treat enable/disable (custom-theme-recalc-face): Rewritten to treat enable/disable properly.
properly.
2005-09-05 Stefan Monnier <monnier@iro.umontreal.ca> 2005-09-05 Stefan Monnier <monnier@iro.umontreal.ca>
@ -211,6 +391,16 @@
(tramp-advice-make-auto-save-file-name): Make defadvice only when (tramp-advice-make-auto-save-file-name): Make defadvice only when
`make-auto-save-file-name' is not a magic file name operation. `make-auto-save-file-name' is not a magic file name operation.
2005-08-30 Richard M. Stallman <rms@gnu.org>
* files.el (risky-local-variable-p):
Match `-predicates' and `-commands.
* cus-edit.el (custom-buffer-sort-alphabetically): Default to t.
(custom-save-all): Visit the file if necessary;
kill the buffer if we created it.
(custom-save-delete): Don't visit file or kill buffer here.
2005-08-30 Carsten Dominik <dominik@science.uva.nl> 2005-08-30 Carsten Dominik <dominik@science.uva.nl>
* textmodes/org.el (org-special-keyword): New face. * textmodes/org.el (org-special-keyword): New face.
@ -762,7 +952,7 @@
2005-08-15 David Ponce <david@dponce.com> 2005-08-15 David Ponce <david@dponce.com>
* tree-widget.el Update Commentary header. * tree-widget.el: Update Commentary header.
(tree-widget-theme): Doc fix. (tree-widget-theme): Doc fix.
(tree-widget-space-width): New option. (tree-widget-space-width): New option.
(tree-widget-image-properties): Look up in the default theme too. (tree-widget-image-properties): Look up in the default theme too.
@ -2420,7 +2610,7 @@
* ediff-ptch.el (ediff-file-name-sans-prefix): Quote regexp. * ediff-ptch.el (ediff-file-name-sans-prefix): Quote regexp.
* ediff-init: Get rid of -face in face names. * ediff-init.el: Get rid of -face in face names.
2005-07-10 Richard M. Stallman <rms@gnu.org> 2005-07-10 Richard M. Stallman <rms@gnu.org>
@ -8631,18 +8821,16 @@
2005-03-25 Werner Lemberg <wl@gnu.org> 2005-03-25 Werner Lemberg <wl@gnu.org>
* calc/calc-forms.el, calc/calc-sel: Replace `illegal' with `invalid'. * calc/calc-forms.el, calc/calc-sel.el:
* midnight.el, vc-cvs.el: Replace `illegal' with `invalid'. * midnight.el, vc-cvs.el:
* emacs-lisp/cl-macs.el: Replace `illegal' with `invalid'. * emacs-lisp/cl-macs.el:
* emulation/vip.el: Replace `illegal' with `invalid'. * emulation/vip.el:
* eshell/esh-io.el, eshell/esh-var.el: Replace `illegal' with * eshell/esh-io.el, eshell/esh-var.el:
`invalid'. * mail/supercite.el:
* mail/supercite.el: Replace `illegal' with `invalid'.
* progmodes/ebnf-abn.el, progmodes/ebnf-bnf.el * progmodes/ebnf-abn.el, progmodes/ebnf-bnf.el
* progmodes/ebnf-ebx.el, progmodes/ebnf-dtd.el, progmodes/ebnf-iso.el * progmodes/ebnf-ebx.el, progmodes/ebnf-dtd.el, progmodes/ebnf-iso.el
* progmodes/ebnf-yac.el, progmodes/ebnf2ps.el, progmodes/idlwave.el * progmodes/ebnf-yac.el, progmodes/ebnf2ps.el, progmodes/idlwave.el
* progmodes/sh-script.el, progmodes/xscheme.el: * progmodes/sh-script.el, progmodes/xscheme.el:
Replace `illegal' with `invalid'.
* textmodes/refbib.el, textmodes/refer.el, textmodes/reftex-cite.el * textmodes/refbib.el, textmodes/refer.el, textmodes/reftex-cite.el
* textmodes/reftex-index.el, textmodes/reftex-parse.el * textmodes/reftex-index.el, textmodes/reftex-parse.el
* textmodes/reftex-ref.el, textmodes/reftex-vars.el * textmodes/reftex-ref.el, textmodes/reftex-vars.el
@ -8807,7 +8995,7 @@
2005-03-22 Jay Belanger <belanger@truman.edu> 2005-03-22 Jay Belanger <belanger@truman.edu>
* calc/calc-embed (calc-embedded-original-modes): New variable. * calc/calc-embed.el (calc-embedded-original-modes): New variable.
(calc-embedded-save-original-modes) (calc-embedded-save-original-modes)
(calc-embedded-restore-original-modes): New functions. (calc-embedded-restore-original-modes): New functions.
(calc-do-embedded): Save original modes when entering embedded mode (calc-do-embedded): Save original modes when entering embedded mode
@ -18626,7 +18814,7 @@
2004-05-09 Jason Rumney <jasonr@gnu.org> 2004-05-09 Jason Rumney <jasonr@gnu.org>
* international/code-pages (cp932, cp936, cp949, c950): Remove. * international/code-pages.el (cp932, cp936, cp949, c950): Remove.
Only define cp125* if windows-125* is already defined. Only define cp125* if windows-125* is already defined.
* language/korean.el (cp949): Add alias. * language/korean.el (cp949): Add alias.

View file

@ -1127,7 +1127,7 @@
* isearch.el (isearch-intersects-p): Fix end checks. * isearch.el (isearch-intersects-p): Fix end checks.
2001-09-11 Eli Zaretskii <a34785@is.elta.co.il> 2001-09-11 Eli Zaretskii <eliz@is.elta.co.il>
* gud.el (dbx) <gud-dbx-use-stopformat-p>: Move this case into the * gud.el (dbx) <gud-dbx-use-stopformat-p>: Move this case into the
`t' branch of `cond', since Irix 6.1 and up is a special case of `t' branch of `cond', since Irix 6.1 and up is a special case of

View file

@ -633,35 +633,40 @@ For more information, see the function `buffer-menu'."
(insert m2))) (insert m2)))
(forward-line))))) (forward-line)))))
(defun Buffer-menu-sort-by-column (&optional e)
"Sort the buffer menu by the column clicked on."
(interactive (list last-input-event))
(if e (mouse-select-window e))
(let* ((pos (event-start e))
(obj (posn-object pos))
(col (if obj
(get-text-property (cdr obj) 'column (car obj))
(get-text-property (posn-point pos) 'column))))
(Buffer-menu-sort col)))
(defvar Buffer-menu-sort-button-map
(let ((map (make-sparse-keymap)))
;; This keymap handles both nil and non-nil values for
;; Buffer-menu-use-header-line.
(define-key map [header-line mouse-1] 'Buffer-menu-sort-by-column)
(define-key map [header-line mouse-2] 'Buffer-menu-sort-by-column)
(define-key map [mouse-2] 'Buffer-menu-sort-by-column)
(define-key map [follow-link] 'mouse-face)
(define-key map "\C-m" 'Buffer-menu-sort-by-column)
map)
"Local keymap for Buffer menu sort buttons.")
(defun Buffer-menu-make-sort-button (name column) (defun Buffer-menu-make-sort-button (name column)
(if (equal column Buffer-menu-sort-column) (setq column nil)) (if (equal column Buffer-menu-sort-column) (setq column nil))
(propertize name (propertize name
'help-echo (if column 'column column
'help-echo (concat
(if Buffer-menu-use-header-line (if Buffer-menu-use-header-line
(concat "mouse-2: sort by " (downcase name)) "mouse-1, mouse-2: sort by "
(concat "mouse-2, RET: sort by " "mouse-2, RET: sort by ")
(downcase name))) (if column (downcase name) "visited order"))
(if Buffer-menu-use-header-line
"mouse-2: sort by visited order"
"mouse-2, RET: sort by visited order"))
'mouse-face 'highlight 'mouse-face 'highlight
'keymap (let ((map (make-sparse-keymap))) 'keymap Buffer-menu-sort-button-map))
(if Buffer-menu-use-header-line
(define-key map [header-line mouse-2]
`(lambda (e)
(interactive "e")
(save-window-excursion
(if e (mouse-select-window e))
(Buffer-menu-sort ,column))))
(define-key map [mouse-2]
`(lambda (e)
(interactive "e")
(if e (mouse-select-window e))
(Buffer-menu-sort ,column)))
(define-key map "\C-m"
`(lambda () (interactive)
(Buffer-menu-sort ,column))))
map)))
(defun list-buffers-noselect (&optional files-only buffer-list) (defun list-buffers-noselect (&optional files-only buffer-list)
"Create and return a buffer with a list of names of existing buffers. "Create and return a buffer with a list of names of existing buffers.

View file

@ -1069,9 +1069,36 @@
(math-add-or-sub (list '/ (nth 1 (nth 1 expr)) (nth 2 expr)) (math-add-or-sub (list '/ (nth 1 (nth 1 expr)) (nth 2 expr))
(list '/ (nth 2 (nth 1 expr)) (nth 2 expr)) (list '/ (nth 2 (nth 1 expr)) (nth 2 expr))
nil (eq (car (nth 1 expr)) '-))) nil (eq (car (nth 1 expr)) '-)))
((and (eq calc-matrix-mode 'matrix)
(eq (car-safe expr) '^)
(natnump (nth 2 expr))
(> (nth 2 expr) 1)
(memq (car-safe (nth 1 expr)) '(+ -)))
(if (= (nth 2 expr) 2)
(math-add-or-sub (list '* (nth 1 (nth 1 expr)) (nth 1 expr))
(list '* (nth 2 (nth 1 expr)) (nth 1 expr))
nil (eq (car (nth 1 expr)) '-))
(math-add-or-sub (list '* (nth 1 (nth 1 expr)) (list '^ (nth 1 expr)
(1- (nth 2 expr))))
(list '* (nth 2 (nth 1 expr)) (list '^ (nth 1 expr)
(1- (nth 2 expr))))
nil (eq (car (nth 1 expr)) '-))))
((and (eq (car-safe expr) '^) ((and (eq (car-safe expr) '^)
(memq (car-safe (nth 1 expr)) '(+ -)) (memq (car-safe (nth 1 expr)) '(+ -))
(integerp (nth 2 expr)) (integerp (nth 2 expr))
(if (and (eq calc-matrix-mode 'matrix)
(> (nth 2 expr) 1))
(if (= (nth 2 expr) 2)
(math-add-or-sub (list '* (nth 1 (nth 1 expr)) (nth 1 expr))
(list '* (nth 2 (nth 1 expr)) (nth 1 expr))
nil (eq (car (nth 1 expr)) '-))
(math-add-or-sub (list '* (nth 1 (nth 1 expr))
(list '^ (nth 1 expr)
(1- (nth 2 expr))))
(list '* (nth 2 (nth 1 expr))
(list '^ (nth 1 expr)
(1- (nth 2 expr))))
nil (eq (car (nth 1 expr)) '-)))
(if (> (nth 2 expr) 0) (if (> (nth 2 expr) 0)
(or (and (or (> math-mt-many 500000) (< math-mt-many -500000)) (or (and (or (> math-mt-many 500000) (< math-mt-many -500000))
(math-expand-power (nth 1 expr) (nth 2 expr) (math-expand-power (nth 1 expr) (nth 2 expr)
@ -1080,7 +1107,7 @@
(nth 1 expr) (nth 1 expr)
(list '^ (nth 1 expr) (1- (nth 2 expr))))) (list '^ (nth 1 expr) (1- (nth 2 expr)))))
(if (< (nth 2 expr) 0) (if (< (nth 2 expr) 0)
(list '/ 1 (list '^ (nth 1 expr) (- (nth 2 expr)))))))) (list '/ 1 (list '^ (nth 1 expr) (- (nth 2 expr)))))))))
(t expr))) (t expr)))
(defun calcFunc-expand (expr &optional many) (defun calcFunc-expand (expr &optional many)

View file

@ -369,9 +369,16 @@ since it could result in memory overflow and make Emacs crash."
((string-match "\\`w32-" (symbol-name symbol)) ((string-match "\\`w32-" (symbol-name symbol))
(eq system-type 'windows-nt)) (eq system-type 'windows-nt))
((string-match "\\`x-.*gtk" (symbol-name symbol)) ((string-match "\\`x-.*gtk" (symbol-name symbol))
(or (boundp 'gtk) (not (eq system-type 'windows-nt)))) (or (boundp 'gtk)
(and window-system
(not (eq window-system 'pc))
(not (eq system-type 'windows-nt)))))
((string-match "\\`x-" (symbol-name symbol)) ((string-match "\\`x-" (symbol-name symbol))
(fboundp 'x-create-frame)) (fboundp 'x-create-frame))
((string-match "selection" (symbol-name symbol))
(fboundp 'x-selection-exists-p))
((string-match "fringe" (symbol-name symbol))
(fboundp 'define-fringe-bitmap))
(t t)))) (t t))))
(if (not (boundp symbol)) (if (not (boundp symbol))
;; If variables are removed from C code, give an error here! ;; If variables are removed from C code, give an error here!

View file

@ -108,7 +108,8 @@ into widget buttons that call `describe-text-category' or
(while properties (while properties
(push (list (pop properties) (pop properties)) ret)) (push (list (pop properties) (pop properties)) ret))
ret) ret)
(lambda (a b) (string< (nth 0 a) (nth 0 b))))) (lambda (a b) (string< (prin1-to-string (nth 0 a) t)
(prin1-to-string (nth 0 b) t)))))
(let ((key (nth 0 elt)) (let ((key (nth 0 elt))
(value (nth 1 elt))) (value (nth 1 elt)))
(widget-insert (propertize (format " %-20s " key) (widget-insert (propertize (format " %-20s " key)

View file

@ -220,8 +220,10 @@ for users who call this function in `.emacs'."
(unless (or (memq window-system '(x w32))) (unless (or (memq window-system '(x w32)))
(and (terminal-coding-system) (and (terminal-coding-system)
(set-terminal-coding-system nil)))) (set-terminal-coding-system nil))))
;; Turn off multibyte chars for more compatibility.
(setq-default enable-multibyte-characters nil) (display-warning 'i18n
"`standard-display-european' is semi-obsolete"
:warning)
;; Switch to Latin-1 language environment ;; Switch to Latin-1 language environment
;; unless some other has been specified. ;; unless some other has been specified.

View file

@ -78,6 +78,7 @@ files.")
("Jay K. Adams" "jka@ece.cmu.edu" "Jay Adams") ("Jay K. Adams" "jka@ece.cmu.edu" "Jay Adams")
("J,Ai(Br,At(Bme Marant" "J,bi(Br,bt(Bme Marant" "Jerome Marant") ("J,Ai(Br,At(Bme Marant" "J,bi(Br,bt(Bme Marant" "Jerome Marant")
("Jens-Ulrik Holger Petersen" "Jens-Ulrik Petersen") ("Jens-Ulrik Holger Petersen" "Jens-Ulrik Petersen")
("Johan Bockg,Ae(Brd" "Johan Bockgard")
("John W. Eaton" "John Eaton") ("John W. Eaton" "John Eaton")
("Jonathan I. Kamens" "Jonathan Kamens") ("Jonathan I. Kamens" "Jonathan Kamens")
("Joseph Arceneaux" "Joe Arceneaux") ("Joseph Arceneaux" "Joe Arceneaux")
@ -195,7 +196,7 @@ Changes to files in this list are not listed.")
("Michael K. Johnson" :changed "configure.in" "emacs.c" "intel386.h" ("Michael K. Johnson" :changed "configure.in" "emacs.c" "intel386.h"
"mem-limits.h" "process.c" "template.h" "sysdep.c" "syssignal.h" "systty.h" "unexec.c" "mem-limits.h" "process.c" "template.h" "sysdep.c" "syssignal.h" "systty.h" "unexec.c"
"ymakefile" "linux.h") "ymakefile" "linux.h")
("Kyle E. Jones" :wrote "mldrag.el") ("Kyle Jones" :wrote "mldrag.el")
("Henry Kautz" :wrote "bib-mode.el") ("Henry Kautz" :wrote "bib-mode.el")
("Joseph M. Kelsey" :changed "fileio.c" "vms-pwd.h" "vmsfns.c" "dir.h" ("Joseph M. Kelsey" :changed "fileio.c" "vms-pwd.h" "vmsfns.c" "dir.h"
"uaf.h") "uaf.h")

View file

@ -846,9 +846,13 @@ happens, so the major mode can be corrected."
(defcustom font-lock-support-mode 'jit-lock-mode (defcustom font-lock-support-mode 'jit-lock-mode
"*Support mode for Font Lock mode. "*Support mode for Font Lock mode.
Support modes speed up Font Lock mode by being choosy about when fontification Support modes speed up Font Lock mode by being choosy about when fontification
occurs. Known support modes are Fast Lock mode (symbol `fast-lock-mode'), occurs. The default support mode, Just-in-time Lock mode (symbol
Lazy Lock mode (symbol `lazy-lock-mode'), and Just-in-time Lock mode (symbol `jit-lock-mode'), is recommended.
`jit-lock-mode'. See those modes for more info.
Other, older support modes are Fast Lock mode (symbol `fast-lock-mode') and
Lazy Lock mode (symbol `lazy-lock-mode'). See those modes for more info.
However, they are no longer recommended, as Just-in-time Lock mode is better.
If nil, means support for Font Lock mode is never performed. If nil, means support for Font Lock mode is never performed.
If a symbol, use that support mode. If a symbol, use that support mode.
If a list, each element should be of the form (MAJOR-MODE . SUPPORT-MODE), If a list, each element should be of the form (MAJOR-MODE . SUPPORT-MODE),

View file

@ -1,3 +1,37 @@
2005-09-10 Reiner Steib <Reiner.Steib@gmx.de>
* spam-report.el (spam-report-gmane): Fix generation of spam
report URL.
2005-09-10 Simon Josefsson <jas@extundo.com>
* gnus-agent.el (gnus-agent-synchronize-flags): Make the default
t, based on discussion on the ding list with Robert Epprecht
<epprecht@solnet.ch>.
2005-09-07 Reiner Steib <Reiner.Steib@gmx.de>
* spam-report.el (spam-report-gmane): Make it work without
X-Report-Spam header. Gmane now only provides Archived-At. This
is only used if `spam-report-gmane-use-article-number' is nil.
(spam-report-gmane-spam-header): Removed. Not used anymore.
* nnweb.el (nnweb-google-wash-article): Print a message if article
is not available.
2005-09-07 TSUCHIYA Masatoshi <tsuchiya@namazu.org>
* gnus-art.el (gnus-mime-display-single): Decode text/* parts
content before displaying.
2005-09-06 Reiner Steib <Reiner.Steib@gmx.de>
* mml-smime.el: Remove defvar of gnus-extract-address-components.
2005-09-06 Katsumi Yamaoka <yamaoka@jpl.org>
* mm-view.el (mm-display-inline-fontify): Disable support modes.
2005-09-05 Reiner Steib <Reiner.Steib@gmx.de> 2005-09-05 Reiner Steib <Reiner.Steib@gmx.de>
* message.el (message-tab-body-function): Fixed mismatched custom * message.el (message-tab-body-function): Fixed mismatched custom
@ -237,8 +271,6 @@
* gnus-util.el (gnus-beginning-of-window): Remove. * gnus-util.el (gnus-beginning-of-window): Remove.
(gnus-end-of-window): Remove. (gnus-end-of-window): Remove.
* lpath.el: Don't bind scroll-margin.
2005-07-25 Simon Josefsson <jas@extundo.com> 2005-07-25 Simon Josefsson <jas@extundo.com>
* pgg.el (pgg-insert-url-with-w3): Don't load w3, it is possible * pgg.el (pgg-insert-url-with-w3): Don't load w3, it is possible

View file

@ -7658,7 +7658,7 @@
* spam.el: more compilation fixes for BBDB * spam.el: more compilation fixes for BBDB
* spam-stat.el added code from Alex Schroeder <alex@gnu.org> * spam-stat.el: added code from Alex Schroeder <alex@gnu.org>
(spam-stat-reduce-size): Interactive. (spam-stat-reduce-size): Interactive.
(spam-stat-reset): New function. (spam-stat-reset): New function.
(spam-stat-save): Interactive. (spam-stat-save): Interactive.
@ -12404,7 +12404,7 @@
2001-12-05 Katsumi Yamaoka <yamaoka@jpl.org> 2001-12-05 Katsumi Yamaoka <yamaoka@jpl.org>
* mm-view.wl (mm-inline-text): Decode a charset-encoded rich text. * mm-view.el (mm-inline-text): Decode a charset-encoded rich text.
2001-12-04 08:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> 2001-12-04 08:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>

View file

@ -115,7 +115,7 @@ If nil, only read articles will be expired."
:group 'gnus-agent :group 'gnus-agent
:type 'function) :type 'function)
(defcustom gnus-agent-synchronize-flags nil (defcustom gnus-agent-synchronize-flags t
"Indicate if flags are synchronized when you plug in. "Indicate if flags are synchronized when you plug in.
If this is `ask' the hook will query the user." If this is `ask' the hook will query the user."
:version "21.1" :version "21.1"

View file

@ -4862,7 +4862,14 @@ If displaying \"text/html\" is discouraged \(see
(forward-line -1) (forward-line -1)
(setq beg (point))) (setq beg (point)))
(gnus-article-insert-newline) (gnus-article-insert-newline)
(mm-insert-inline handle (mm-get-part handle)) (mm-insert-inline handle
(let ((charset
(mail-content-type-get
(mm-handle-type handle) 'charset)))
(if (eq charset 'gnus-decoded)
(mm-get-part handle)
(mm-decode-string (mm-get-part handle)
charset))))
(goto-char (point-max)))) (goto-char (point-max))))
;; Do highlighting. ;; Do highlighting.
(save-excursion (save-excursion

View file

@ -476,14 +476,16 @@
(buffer-disable-undo) (buffer-disable-undo)
(mm-insert-part handle) (mm-insert-part handle)
(require 'font-lock) (require 'font-lock)
;; Inhibit font-lock this time (*-mode-hook might run (let ((font-lock-maximum-size nil)
;; `turn-on-font-lock') so that jit-lock may not turn off ;; Disable support modes, e.g., jit-lock, lazy-lock, etc.
;; font-lock immediately after this. (font-lock-mode-hook nil)
(let ((font-lock-mode t)) (font-lock-support-mode nil)
(funcall mode))
(let ((font-lock-verbose nil))
;; I find font-lock a bit too verbose. ;; I find font-lock a bit too verbose.
(font-lock-fontify-buffer)) (font-lock-verbose nil))
(funcall mode)
;; The mode function might have already turned on font-lock.
(unless (symbol-value 'font-lock-mode)
(font-lock-fontify-buffer)))
;; By default, XEmacs font-lock uses non-duplicable text ;; By default, XEmacs font-lock uses non-duplicable text
;; properties. This code forces all the text properties ;; properties. This code forces all the text properties
;; to be copied along with the text. ;; to be copied along with the text.

View file

@ -29,8 +29,6 @@
(eval-when-compile (require 'cl)) (eval-when-compile (require 'cl))
(defvar gnus-extract-address-components)
(require 'smime) (require 'smime)
(require 'mm-decode) (require 'mm-decode)
(autoload 'message-narrow-to-headers "message") (autoload 'message-narrow-to-headers "message")

View file

@ -319,12 +319,22 @@ Valid types include `google', `dejanews', and `gmane'.")
;; We have Google's masked e-mail addresses here. :-/ ;; We have Google's masked e-mail addresses here. :-/
(let ((case-fold-search t)) (let ((case-fold-search t))
(goto-char (point-min)) (goto-char (point-min))
(if (save-excursion
(or (re-search-forward "The requested message.*could not be found."
nil t)
(not (and (re-search-forward "^<pre>" nil t)
(re-search-forward "^</pre>" nil t)))))
;; FIXME: Don't know how to indicate "not found".
;; Should this function throw an error? --rsteib
(progn
(gnus-message 3 "Requested article not found")
(erase-buffer))
(delete-region (point-min) (delete-region (point-min)
(1+ (re-search-forward "^<pre>" nil t))) (1+ (re-search-forward "^<pre>" nil t)))
(goto-char (point-min)) (goto-char (point-min))
(delete-region (- (re-search-forward "^</pre>" nil t) (length "</pre>")) (delete-region (- (re-search-forward "^</pre>" nil t) (length "</pre>"))
(point-max)) (point-max))
(mm-url-decode-entities))) (mm-url-decode-entities))))
(defun nnweb-google-parse-1 (&optional Message-ID) (defun nnweb-google-parse-1 (&optional Message-ID)
(let ((i 0) (let ((i 0)

View file

@ -49,12 +49,6 @@ instead."
(regexp :value "^nntp\+.*:gmane\.")) (regexp :value "^nntp\+.*:gmane\."))
:group 'spam-report) :group 'spam-report)
(defcustom spam-report-gmane-spam-header
"^X-Report-Spam: http://\\([^/]+\\)\\(.*\\)$"
"String matching Gmane spam-reporting header. Two match groups are needed."
:type 'regexp
:group 'spam-report)
(defcustom spam-report-gmane-use-article-number t (defcustom spam-report-gmane-use-article-number t
"Whether the article number (faster!) or the header should be used." "Whether the article number (faster!) or the header should be used."
:type 'boolean :type 'boolean
@ -103,19 +97,42 @@ undo that change.")
article)) article))
(with-current-buffer nntp-server-buffer (with-current-buffer nntp-server-buffer
(gnus-request-head article gnus-newsgroup-name) (gnus-request-head article gnus-newsgroup-name)
(goto-char (point-min)) (let ((case-fold-search t)
(if (re-search-forward spam-report-gmane-spam-header nil t) field host report url)
(let* ((host (match-string 1)) ;; First check for X-Report-Spam because it's more specific to
(report (match-string 2)) ;; spam reporting than Archived-At. OTOH, all new articles on
(url (format "http://%s%s" host report))) ;; Gmane don't have X-Report-Spam anymore (unless Lars changes his
;; mind :-)).
;;
;; There might be more than one Archived-At header so we need to
;; find (and transform) the one related to Gmane.
(setq field (or (gnus-fetch-field "X-Report-Spam")
(gnus-fetch-field "Archived-At")))
(setq host (progn
(string-match
(concat "http://\\([a-z]+\\.gmane\\.org\\)"
"\\(/[^:/]+[:/][0-9]+\\)")
field)
(match-string 1 field)))
(setq report (match-string 2 field))
(when (string-equal "permalink.gmane.org" host)
(setq host "spam.gmane.org")
(setq report (gnus-replace-in-string
report "/\\([0-9]+\\)$" ":\\1")))
(setq url (format "http://%s%s" host report))
(if (not (and host report url))
(gnus-message
3 "Could not find a spam report header in article %d..."
article)
(gnus-message 7 "Reporting spam through URL %s..." url) (gnus-message 7 "Reporting spam through URL %s..." url)
(spam-report-url-ping host report)) (spam-report-url-ping host report))))))))
(gnus-message 3 "Could not find X-Report-Spam in article %d..."
article)))))))
(defun spam-report-url-ping (host report) (defun spam-report-url-ping (host report)
"Ping a host through HTTP, addressing a specific GET resource using "Ping a host through HTTP, addressing a specific GET resource using
the function specified by `spam-report-url-ping-function'." the function specified by `spam-report-url-ping-function'."
;; Example:
;; host: "spam.gmane.org"
;; report: "/gmane.some.group:123456"
(funcall spam-report-url-ping-function host report)) (funcall spam-report-url-ping-function host report))
(defun spam-report-url-ping-plain (host report) (defun spam-report-url-ping-plain (host report)

View file

@ -130,6 +130,7 @@ This is used by the default mail-sending commands. See also
:type '(radio (function-item sendmail-send-it :tag "Use Sendmail package") :type '(radio (function-item sendmail-send-it :tag "Use Sendmail package")
(function-item smtpmail-send-it :tag "Use SMTPmail package") (function-item smtpmail-send-it :tag "Use SMTPmail package")
(function-item feedmail-send-it :tag "Use Feedmail package") (function-item feedmail-send-it :tag "Use Feedmail package")
(function-item mailclient-send-it :tag "Use Mailclient package")
function) function)
:group 'sendmail) :group 'sendmail)
@ -886,9 +887,9 @@ See also the function `select-message-coding-system'.")
"Default coding system for encoding the outgoing mail. "Default coding system for encoding the outgoing mail.
This variable is used only when `sendmail-coding-system' is nil. This variable is used only when `sendmail-coding-system' is nil.
This variable is set/changed by the command set-language-environment. This variable is set/changed by the command `set-language-environment'.
User should not set this variable manually, User should not set this variable manually,
instead use sendmail-coding-system to get a constant encoding instead use `sendmail-coding-system' to get a constant encoding
of outgoing mails regardless of the current language environment. of outgoing mails regardless of the current language environment.
See also the function `select-message-coding-system'.") See also the function `select-message-coding-system'.")

View file

@ -105,10 +105,8 @@ A large number or nil slows down menu responsiveness."
(define-key menu-bar-file-menu [split-window] (define-key menu-bar-file-menu [split-window]
'(menu-item "Split Window" split-window-vertically '(menu-item "Split Window" split-window-vertically
:enable (and (frame-live-p menu-updating-frame) :enable (and (menu-bar-menu-frame-live-and-visible-p)
(frame-visible-p menu-updating-frame ) (menu-bar-non-minibuffer-window-p))
(not (window-minibuffer-p
(frame-selected-window menu-updating-frame))))
:help "Split selected window in two windows")) :help "Split selected window in two windows"))
(define-key menu-bar-file-menu [separator-window] (define-key menu-bar-file-menu [separator-window]
@ -120,8 +118,7 @@ A large number or nil slows down menu responsiveness."
:help "Pretty-print marked region in black and white to PostScript printer")) :help "Pretty-print marked region in black and white to PostScript printer"))
(define-key menu-bar-file-menu [ps-print-buffer] (define-key menu-bar-file-menu [ps-print-buffer]
'(menu-item "Postscript Print Buffer (B+W)" ps-print-buffer '(menu-item "Postscript Print Buffer (B+W)" ps-print-buffer
:enable (and (frame-live-p menu-updating-frame) :enable (menu-bar-menu-frame-live-and-visible-p)
(frame-visible-p menu-updating-frame ))
:help "Pretty-print current buffer in black and white to PostScript printer")) :help "Pretty-print current buffer in black and white to PostScript printer"))
(define-key menu-bar-file-menu [ps-print-region-faces] (define-key menu-bar-file-menu [ps-print-region-faces]
'(menu-item "Postscript Print Region" ps-print-region-with-faces '(menu-item "Postscript Print Region" ps-print-region-with-faces
@ -129,8 +126,7 @@ A large number or nil slows down menu responsiveness."
:help "Pretty-print marked region to PostScript printer")) :help "Pretty-print marked region to PostScript printer"))
(define-key menu-bar-file-menu [ps-print-buffer-faces] (define-key menu-bar-file-menu [ps-print-buffer-faces]
'(menu-item "Postscript Print Buffer" ps-print-buffer-with-faces '(menu-item "Postscript Print Buffer" ps-print-buffer-with-faces
:enable (and (frame-live-p menu-updating-frame) :enable (menu-bar-menu-frame-live-and-visible-p)
(frame-visible-p menu-updating-frame ))
:help "Pretty-print current buffer to PostScript printer")) :help "Pretty-print current buffer to PostScript printer"))
(define-key menu-bar-file-menu [print-region] (define-key menu-bar-file-menu [print-region]
'(menu-item "Print Region" print-region '(menu-item "Print Region" print-region
@ -138,8 +134,7 @@ A large number or nil slows down menu responsiveness."
:help "Print region between mark and current position")) :help "Print region between mark and current position"))
(define-key menu-bar-file-menu [print-buffer] (define-key menu-bar-file-menu [print-buffer]
'(menu-item "Print Buffer" print-buffer '(menu-item "Print Buffer" print-buffer
:enable (and (frame-live-p menu-updating-frame) :enable (menu-bar-menu-frame-live-and-visible-p)
(frame-visible-p menu-updating-frame ))
:help "Print current buffer with page headings")) :help "Print current buffer with page headings"))
(define-key menu-bar-file-menu [separator-print] (define-key menu-bar-file-menu [separator-print]
@ -170,17 +165,14 @@ A large number or nil slows down menu responsiveness."
:help "Re-read current buffer from its file")) :help "Re-read current buffer from its file"))
(define-key menu-bar-file-menu [write-file] (define-key menu-bar-file-menu [write-file]
'(menu-item "Save As..." write-file '(menu-item "Save As..." write-file
:enable (and (frame-live-p menu-updating-frame) :enable (and (menu-bar-menu-frame-live-and-visible-p)
(frame-visible-p menu-updating-frame ) (menu-bar-non-minibuffer-window-p))
(not (window-minibuffer-p
(frame-selected-window menu-updating-frame))))
:help "Write current buffer to another file")) :help "Write current buffer to another file"))
(define-key menu-bar-file-menu [save-buffer] (define-key menu-bar-file-menu [save-buffer]
'(menu-item "Save" save-buffer '(menu-item "Save" save-buffer
:enable (and (buffer-modified-p) :enable (and (buffer-modified-p)
(buffer-file-name) (buffer-file-name)
(not (window-minibuffer-p (menu-bar-non-minibuffer-window-p))
(frame-selected-window menu-updating-frame))))
:help "Save current buffer to its file")) :help "Save current buffer to its file"))
(define-key menu-bar-file-menu [separator-save] (define-key menu-bar-file-menu [separator-save]
@ -192,23 +184,19 @@ A large number or nil slows down menu responsiveness."
:help "Discard (kill) current buffer")) :help "Discard (kill) current buffer"))
(define-key menu-bar-file-menu [insert-file] (define-key menu-bar-file-menu [insert-file]
'(menu-item "Insert File..." insert-file '(menu-item "Insert File..." insert-file
:enable (not (window-minibuffer-p :enable (menu-bar-non-minibuffer-window-p)
(frame-selected-window menu-updating-frame)))
:help "Insert another file into current buffer")) :help "Insert another file into current buffer"))
(define-key menu-bar-file-menu [dired] (define-key menu-bar-file-menu [dired]
'(menu-item "Open Directory..." dired '(menu-item "Open Directory..." dired
:enable (not (window-minibuffer-p :enable (menu-bar-non-minibuffer-window-p)
(frame-selected-window menu-updating-frame)))
:help "Read a directory, operate on its files")) :help "Read a directory, operate on its files"))
(define-key menu-bar-file-menu [open-file] (define-key menu-bar-file-menu [open-file]
'(menu-item "Open File..." find-file-existing '(menu-item "Open File..." find-file-existing
:enable (not (window-minibuffer-p :enable (menu-bar-non-minibuffer-window-p)
(frame-selected-window menu-updating-frame)))
:help "Read an existing file into an Emacs buffer")) :help "Read an existing file into an Emacs buffer"))
(define-key menu-bar-file-menu [new-file] (define-key menu-bar-file-menu [new-file]
'(menu-item "Visit New File..." find-file '(menu-item "Visit New File..." find-file
:enable (not (window-minibuffer-p :enable (menu-bar-non-minibuffer-window-p)
(frame-selected-window menu-updating-frame)))
:help "Read or create a file and edit it")) :help "Read or create a file and edit it"))
@ -1043,8 +1031,7 @@ mail status in mode line"))
toggle-truncate-lines toggle-truncate-lines
:help "Truncate long lines on the screen" :help "Truncate long lines on the screen"
:button (:toggle . truncate-lines) :button (:toggle . truncate-lines)
:enable (and (frame-live-p menu-updating-frame) :enable (menu-bar-menu-frame-live-and-visible-p)))
(frame-visible-p menu-updating-frame))))
(define-key menu-bar-options-menu [highlight-separator] (define-key menu-bar-options-menu [highlight-separator]
'("--")) '("--"))
@ -1425,6 +1412,23 @@ key, a click, or a menu-item"))
'(menu-item "Emacs Tutorial" help-with-tutorial '(menu-item "Emacs Tutorial" help-with-tutorial
:help "Learn how to use Emacs")) :help "Learn how to use Emacs"))
(defun menu-bar-menu-frame-live-and-visible-p ()
"Return non-nil if the menu frame is alive and visible.
The menu frame is the frame for which we are updating the menu."
(let ((menu-frame (if (display-multi-frame-p) menu-updating-frame
(selected-frame))))
(and (frame-live-p menu-frame)
(frame-visible-p menu-frame))))
(defun menu-bar-non-minibuffer-window-p ()
"Return non-nil if selected window of the menu frame is not a minibuf window.
See the documentation of `menu-bar-menu-frame-live-and-visible-p'
for the definition of the menu frame."
(let ((menu-frame (if (display-multi-frame-p) menu-updating-frame
(selected-frame))))
(not (window-minibuffer-p (frame-selected-window menu-frame)))))
(defun kill-this-buffer () ; for the menubar (defun kill-this-buffer () ; for the menubar
"Kill the current buffer." "Kill the current buffer."
(interactive) (interactive)
@ -1437,11 +1441,10 @@ key, a click, or a menu-item"))
(or (string-match "^ " (buffer-name (car buffers))) (or (string-match "^ " (buffer-name (car buffers)))
(setq count (1+ count))) (setq count (1+ count)))
(setq buffers (cdr buffers))) (setq buffers (cdr buffers)))
(and (not (window-minibuffer-p (frame-selected-window menu-updating-frame))) (and (menu-bar-non-minibuffer-window-p)
(> count 1)))) (> count 1))))
(put 'dired 'menu-enable (put 'dired 'menu-enable '(menu-bar-non-minibuffer-window-p))
'(not (window-minibuffer-p (frame-selected-window menu-updating-frame))))
;; Permit deleting frame if it would leave a visible or iconified frame. ;; Permit deleting frame if it would leave a visible or iconified frame.
(defun delete-frame-enabled-p () (defun delete-frame-enabled-p ()

View file

@ -900,7 +900,7 @@
* mh-e.el (Version, mh-version): Updated for release 7.4.3. * mh-e.el (Version, mh-version): Updated for release 7.4.3.
* This patch release contains the following two patches: This patch release contains the following two patches:
* mh-identity.el (mh-identity-make-menu): Removed condition on * mh-identity.el (mh-identity-make-menu): Removed condition on
mh-auto-fields-list. Use it to enable or disable menu item mh-auto-fields-list. Use it to enable or disable menu item
@ -8402,7 +8402,7 @@
defcustom to mh-utils because I got an error about a nil value for defcustom to mh-utils because I got an error about a nil value for
mh-tool-bar-reply-3-buttons when I fired up mh-rmail. mh-tool-bar-reply-3-buttons when I fired up mh-rmail.
* mh-comp.el, mh-funcs,el, mh-mime.el, mh-pick.el: Moved (provide) * mh-comp.el, mh-funcs.el, mh-mime.el, mh-pick.el: Moved (provide)
to the end of the file to be consistent with most other files (see to the end of the file to be consistent with most other files (see
additional rationale in mh-e.el description below). additional rationale in mh-e.el description below).
@ -9210,7 +9210,7 @@
2002-08-19 Peter S Galbraith <psg@debian.org> 2002-08-19 Peter S Galbraith <psg@debian.org>
* reply-to.xpm, reply-to.pbm, reply-from.xpm, reply-from.pbm, * reply-to.xpm, reply-to.pbm, reply-from.xpm, reply-from.pbm,
reply-all.xpm, reply-all.bpm: New icons for various reply methods. * reply-all.xpm, reply-all.bpm: New icons for various reply methods.
* mh-e.el (mh-folder-tool-bar-map): Split reply button into three * mh-e.el (mh-folder-tool-bar-map): Split reply button into three
that won't prompt for "from", "to" and "all". that won't prompt for "from", "to" and "all".
* mh-comp.el (mh-reply): Put variable reply-to in the interactive * mh-comp.el (mh-reply): Put variable reply-to in the interactive
@ -10234,7 +10234,7 @@
operations made on all messages in the selected range when operations made on all messages in the selected range when
transient-mark-mode is on doesn't work in XEmacs. transient-mark-mode is on doesn't work in XEmacs.
* mh-e.el, mh-utils: Conditionalize calls to * mh-e.el, mh-utils.el: Conditionalize calls to
'add-to-list 'facemenu-unlisted-faces for XEmacs. 'add-to-list 'facemenu-unlisted-faces for XEmacs.
2001-12-11 Jeffrey C Honig <jch@honig.net> 2001-12-11 Jeffrey C Honig <jch@honig.net>

View file

@ -538,11 +538,10 @@ resized by dragging their header-line."
(window (posn-window start)) (window (posn-window start))
(frame (window-frame window)) (frame (window-frame window))
(first-window (frame-first-window frame))) (first-window (frame-first-window frame)))
(when (or (eq window first-window) (unless (or (eq window first-window)
(= (nth 1 (window-edges window)) (= (nth 1 (window-edges window))
(nth 1 (window-edges first-window)))) (nth 1 (window-edges first-window))))
(error "Cannot move header-line at the top of the frame")) (mouse-drag-mode-line-1 start-event nil))))
(mouse-drag-mode-line-1 start-event nil)))
(defun mouse-drag-vertical-line (start-event) (defun mouse-drag-vertical-line (start-event)

View file

@ -185,7 +185,7 @@
"Elisp Files (%d)") "Elisp Files (%d)")
((eq major-mode 'latex-mode) ((eq major-mode 'latex-mode)
3030 3030
"LaTex Files (%d)") "LaTeX Files (%d)")
('no-multi ('no-multi
3099 3099
"Other files (%d)"))) "Other files (%d)")))

View file

@ -5213,7 +5213,10 @@ Returns nil if none was found, else the command is returned."
(defun tramp-action-password (p multi-method method user host) (defun tramp-action-password (p multi-method method user host)
"Query the user for a password." "Query the user for a password."
(let ((pw-prompt (match-string 0))) (let ((pw-prompt
(format "Password for %s "
(tramp-make-tramp-file-name
nil method user host ""))))
(tramp-message 9 "Sending password") (tramp-message 9 "Sending password")
(tramp-enter-password p pw-prompt user host))) (tramp-enter-password p pw-prompt user host)))
@ -5300,8 +5303,12 @@ The terminal type can be configured with `tramp-terminal-type'."
(defun tramp-multi-action-password (p method user host) (defun tramp-multi-action-password (p method user host)
"Query the user for a password." "Query the user for a password."
(let ((pw-prompt
(format "Password for %s "
(tramp-make-tramp-file-name
nil method user host ""))))
(tramp-message 9 "Sending password") (tramp-message 9 "Sending password")
(tramp-enter-password p (match-string 0) user host)) (tramp-enter-password p pw-prompt user host)))
(defun tramp-multi-action-succeed (p method user host) (defun tramp-multi-action-succeed (p method user host)
"Signal success in finding shell prompt." "Signal success in finding shell prompt."

View file

@ -4,6 +4,7 @@
;; Free Software Foundation, Inc. ;; Free Software Foundation, Inc.
;; Author: Ray Blaak <blaak@infomatch.com> ;; Author: Ray Blaak <blaak@infomatch.com>
;; Maintainer: FSF (Blaak's email addr bounces, Aug 2005)
;; Keywords: languages ;; Keywords: languages
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.

View file

@ -960,8 +960,7 @@ Convert it to flymake internal format."
(setq converted-list (cons (list regexp file line col) converted-list))))) (setq converted-list (cons (list regexp file line col) converted-list)))))
converted-list)) converted-list))
(eval-when-compile (require 'compile)
(require 'compile))
(defvar flymake-err-line-patterns ; regexp file-idx line-idx col-idx (optional) text-idx(optional), match-end to end of string is error text (defvar flymake-err-line-patterns ; regexp file-idx line-idx col-idx (optional) text-idx(optional), match-end to end of string is error text
(append (append

View file

@ -1833,6 +1833,10 @@ If it isn't in one, return nil."
;; Don't keep looking across a blank line or comment. ;; Don't keep looking across a blank line or comment.
(looking-at "$\\|#") (looking-at "$\\|#")
(not (zerop (forward-line -1)))))) (not (zerop (forward-line -1))))))
;; Remove leading and trailing whitespace.
(when found
(setq found (replace-regexp-in-string "[ \t]+\\'" "" found))
(setq found (replace-regexp-in-string "\\`[ \t]+" "" found)))
found))) found)))
(provide 'make-mode) (provide 'make-mode)

View file

@ -248,7 +248,11 @@ startup file, `~/.emacs-octave'."
;; And finally, everything is back to normal. ;; And finally, everything is back to normal.
(set-process-filter proc 'inferior-octave-output-filter) (set-process-filter proc 'inferior-octave-output-filter)
(run-hooks 'inferior-octave-startup-hook))) (run-hooks 'inferior-octave-startup-hook)
(run-hooks 'inferior-octave-startup-hook)
;; Just in case, to be sure a cd in the startup file
;; won't have detrimental effects.
(inferior-octave-resync-dirs)))
(defun inferior-octave-complete () (defun inferior-octave-complete ()

View file

@ -267,12 +267,12 @@ The expansion is entirely correct because it uses the C preprocessor."
("\\<sub\\s-+\\S-+\\s-*(\\([^)]+\\))" 1 '(1)) ("\\<sub\\s-+\\S-+\\s-*(\\([^)]+\\))" 1 '(1))
;; regexp and funny quotes ;; regexp and funny quotes
("[?:.,;=!~({[][ \t\n]*\\(/\\)" (1 '(7))) ("[?:.,;=!~({[][ \t\n]*\\(/\\)" (1 '(7)))
("[?:.,;=!~({[ \t\n]\\([msy]\\|q[qxrw]?\\|tr\\)\\>\\s-*\\([^])}> \n\t]\\)" ("\\(^\\|[?:.,;=!~({[ \t]\\)\\([msy]\\|q[qxrw]?\\|tr\\)\\>\\s-*\\([^])}> \n\t]\\)"
;; Nasty cases: ;; Nasty cases:
;; /foo/m $a->m $#m $m @m %m ;; /foo/m $a->m $#m $m @m %m
;; \s (appears often in regexps). ;; \s (appears often in regexps).
;; -s file ;; -s file
(2 (if (assoc (char-after (match-beginning 2)) (3 (if (assoc (char-after (match-beginning 3))
perl-quote-like-pairs) perl-quote-like-pairs)
'(15) '(7)))) '(15) '(7))))
;; TODO: here-documents ("<<\\(\\sw\\|['\"]\\)") ;; TODO: here-documents ("<<\\(\\sw\\|['\"]\\)")

View file

@ -490,7 +490,10 @@ This is buffer-local in every such buffer.")
map) map)
"Keymap used in Shell-Script mode.") "Keymap used in Shell-Script mode.")
(defvar sh-skeleton-pair-default-alist '((?( _ ?)) (?\))
(?[ ?\s _ ?\s ?]) (?\])
(?{ _ ?}) (?\}))
"Value to use for `skeleton-pair-default-alist' in Shell-Script mode.")
(defcustom sh-dynamic-complete-functions (defcustom sh-dynamic-complete-functions
'(shell-dynamic-complete-environment-variable '(shell-dynamic-complete-environment-variable
@ -1362,6 +1365,8 @@ with your script for an edit-interpret-debug cycle."
(make-local-variable 'sh-shell-variables-initialized) (make-local-variable 'sh-shell-variables-initialized)
(make-local-variable 'imenu-generic-expression) (make-local-variable 'imenu-generic-expression)
(make-local-variable 'sh-indent-supported-here) (make-local-variable 'sh-indent-supported-here)
(make-local-variable 'skeleton-pair-default-alist)
(setq skeleton-pair-default-alist sh-skeleton-pair-default-alist)
(setq skeleton-end-hook (lambda () (setq skeleton-end-hook (lambda ()
(or (eolp) (newline) (indent-relative))) (or (eolp) (newline) (indent-relative)))
paragraph-start (concat page-delimiter "\\|$") paragraph-start (concat page-delimiter "\\|$")

View file

@ -5,7 +5,6 @@
;; Author: David Ponce <david@dponce.com> ;; Author: David Ponce <david@dponce.com>
;; Created: July 19 1999 ;; Created: July 19 1999
;; Maintainer: FSF
;; Keywords: files ;; Keywords: files
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
@ -258,7 +257,16 @@ It is passed a filename to give a chance to transform it.
If it returns nil, the filename is left unchanged." If it returns nil, the filename is left unchanged."
:group 'recentf :group 'recentf
:type '(choice (const :tag "None" nil) :type '(choice (const :tag "None" nil)
(const abbreviate-file-name)
function)) function))
(defcustom recentf-show-file-shortcuts-flag t
"Whether to show ``[N]'' for the Nth item up to 10.
If non-nil, `recentf-open-files' will show labels for keys that can be
used as shortcuts to open the Nth file."
:group 'recentf
:type 'boolean)
;;; Utilities ;;; Utilities
;; ;;
@ -926,6 +934,9 @@ Go to the beginning of buffer if not found."
(set-keymap-parent km widget-keymap) (set-keymap-parent km widget-keymap)
(define-key km "q" 'recentf-cancel-dialog) (define-key km "q" 'recentf-cancel-dialog)
(define-key km [down-mouse-1] 'widget-button-click) (define-key km [down-mouse-1] 'widget-button-click)
;; Keys in reverse order of appearence in help.
(dolist (k '("0" "9" "8" "7" "6" "5" "4" "3" "2" "1"))
(define-key km k 'recentf-open-file-with-key))
km) km)
"Keymap used in recentf dialogs.") "Keymap used in recentf dialogs.")
@ -1063,6 +1074,18 @@ IGNORE other arguments."
(kill-buffer (current-buffer)) (kill-buffer (current-buffer))
(funcall recentf-menu-action (widget-value widget))) (funcall recentf-menu-action (widget-value widget)))
;; List of files associated to a digit shortcut key.
(defvar recentf--files-with-key nil)
(defun recentf-show-digit-shortcut-filter (l)
"Filter the list of menu-elements L to show digit shortcuts."
(let ((i 0))
(dolist (e l)
(setq i (1+ i))
(recentf-set-menu-element-item
e (format "[%d] %s" (% i 10) (recentf-menu-element-item e))))
l))
(defun recentf-open-files-item (menu-element) (defun recentf-open-files-item (menu-element)
"Return a widget to display MENU-ELEMENT in a dialog buffer." "Return a widget to display MENU-ELEMENT in a dialog buffer."
(if (consp (cdr menu-element)) (if (consp (cdr menu-element))
@ -1085,6 +1108,26 @@ IGNORE other arguments."
:action recentf-open-files-action :action recentf-open-files-action
,(cdr menu-element)))) ,(cdr menu-element))))
(defun recentf-open-files-items (files)
"Return a list of widgets to display FILES in a dialog buffer."
(set (make-local-variable 'recentf--files-with-key)
(recentf-trunc-list files 10))
(mapcar 'recentf-open-files-item
(append
;; When requested group the files with shortcuts together
;; at the top of the list.
(when recentf-show-file-shortcuts-flag
(setq files (nthcdr 10 files))
(recentf-apply-menu-filter
'recentf-show-digit-shortcut-filter
(mapcar 'recentf-make-default-menu-element
recentf--files-with-key)))
;; Then the other files.
(recentf-apply-menu-filter
recentf-menu-filter
(mapcar 'recentf-make-default-menu-element
files)))))
(defun recentf-open-files (&optional files buffer-name) (defun recentf-open-files (&optional files buffer-name)
"Show a dialog to open a recent file. "Show a dialog to open a recent file.
If optional argument FILES is non-nil, it is a list of recently-opened If optional argument FILES is non-nil, it is a list of recently-opened
@ -1093,25 +1136,43 @@ If optional argument BUFFER-NAME is non-nil, it is a buffer name to
use for the dialog. It defaults to \"*`recentf-menu-title'*\"." use for the dialog. It defaults to \"*`recentf-menu-title'*\"."
(interactive) (interactive)
(recentf-dialog (or buffer-name (format "*%s*" recentf-menu-title)) (recentf-dialog (or buffer-name (format "*%s*" recentf-menu-title))
(widget-insert "Click on a file to open it. (widget-insert "Click on a file"
Click on Cancel or type `q' to cancel.\n" ) (if recentf-show-file-shortcuts-flag
", or type the corresponding digit key,"
"")
" to open it.\n"
"Click on Cancel or type `q' to cancel.\n")
;; Use a L&F that looks like the recentf menu. ;; Use a L&F that looks like the recentf menu.
(tree-widget-set-theme "folder") (tree-widget-set-theme "folder")
(apply 'widget-create (apply 'widget-create
`(group `(group
:indent 2 :indent 2
:format "\n%v\n" :format "\n%v\n"
,@(mapcar 'recentf-open-files-item ,@(recentf-open-files-items (or files recentf-list))))
(recentf-apply-menu-filter
recentf-menu-filter
(mapcar 'recentf-make-default-menu-element
(or files recentf-list))))))
(widget-create (widget-create
'push-button 'push-button
:notify 'recentf-cancel-dialog :notify 'recentf-cancel-dialog
"Cancel") "Cancel")
(recentf-dialog-goto-first 'link))) (recentf-dialog-goto-first 'link)))
(defun recentf-open-file-with-key (n)
"Open the recent file with the shortcut numeric key N.
N must be a valid digit.
`1' opens the first file, `2' the second file, ... `9' the ninth file.
`0' opens the tenth file."
(interactive
(list
(let ((n (string-to-number (this-command-keys))))
(cond
((zerop n) 10)
((and (> n 0) (< n 10)) n)
((error "Invalid digit key %d" n))))))
(when recentf--files-with-key
(let ((file (nth (1- n) recentf--files-with-key)))
(unless file (error "Not that many recent files"))
(kill-buffer (current-buffer))
(funcall recentf-menu-action file))))
(defun recentf-open-more-files () (defun recentf-open-more-files ()
"Show a dialog to open a recent file that is not in the menu." "Show a dialog to open a recent file that is not in the menu."
(interactive) (interactive)

View file

@ -4227,18 +4227,19 @@ If nil, search stops at the beginning of the accessible portion of the buffer."
(defun blink-matching-open () (defun blink-matching-open ()
"Move cursor momentarily to the beginning of the sexp before point." "Move cursor momentarily to the beginning of the sexp before point."
(interactive) (interactive)
(and (> (point) (1+ (point-min))) (when (and (> (point) (1+ (point-min)))
blink-matching-paren blink-matching-paren
;; Verify an even number of quoting characters precede the close. ;; Verify an even number of quoting characters precede the close.
(= 1 (logand 1 (- (point) (= 1 (logand 1 (- (point)
(save-excursion (save-excursion
(forward-char -1) (forward-char -1)
(skip-syntax-backward "/\\") (skip-syntax-backward "/\\")
(point))))) (point))))))
(let* ((oldpos (point)) (let* ((oldpos (point))
(blinkpos) blinkpos
(mismatch) message-log-max ; Don't log messages about paren matching.
matching-paren) matching-paren
open-paren-line-string)
(save-excursion (save-excursion
(save-restriction (save-restriction
(if blink-matching-paren-distance (if blink-matching-paren-distance
@ -4258,27 +4259,31 @@ If nil, search stops at the beginning of the accessible portion of the buffer."
(let ((syntax (syntax-after blinkpos))) (let ((syntax (syntax-after blinkpos)))
(and (consp syntax) (and (consp syntax)
(eq (syntax-class syntax) 4) (eq (syntax-class syntax) 4)
(cdr syntax))) (cdr syntax)))))
mismatch (cond
(or (null matching-paren) ((or (null matching-paren)
(/= (char-after (1- oldpos)) (/= (char-before oldpos)
matching-paren)))) matching-paren))
(if mismatch (setq blinkpos nil)) (message "Mismatched parentheses"))
(if blinkpos ((not blinkpos)
;; Don't log messages about paren matching. (if (not blink-matching-paren-distance)
(let (message-log-max) (message "Unmatched parenthesis")))
((pos-visible-in-window-p blinkpos)
;; Matching open within window, temporarily move to blinkpos but only
;; if `blink-matching-paren-on-screen' is non-nil.
(when blink-matching-paren-on-screen
(save-excursion
(goto-char blinkpos) (goto-char blinkpos)
(if (pos-visible-in-window-p) (sit-for blink-matching-delay))))
(and blink-matching-paren-on-screen (t
(sit-for blink-matching-delay)) (save-excursion
(goto-char blinkpos) (goto-char blinkpos)
(message (setq open-paren-line-string
"Matches %s"
;; Show what precedes the open in its line, if anything. ;; Show what precedes the open in its line, if anything.
(if (save-excursion (if (save-excursion
(skip-chars-backward " \t") (skip-chars-backward " \t")
(not (bolp))) (not (bolp)))
(buffer-substring (progn (beginning-of-line) (point)) (buffer-substring (line-beginning-position)
(1+ blinkpos)) (1+ blinkpos))
;; Show what follows the open in its line, if anything. ;; Show what follows the open in its line, if anything.
(if (save-excursion (if (save-excursion
@ -4286,7 +4291,7 @@ If nil, search stops at the beginning of the accessible portion of the buffer."
(skip-chars-forward " \t") (skip-chars-forward " \t")
(not (eolp))) (not (eolp)))
(buffer-substring blinkpos (buffer-substring blinkpos
(progn (end-of-line) (point))) (line-end-position))
;; Otherwise show the previous nonblank line, ;; Otherwise show the previous nonblank line,
;; if there is one. ;; if there is one.
(if (save-excursion (if (save-excursion
@ -4295,8 +4300,7 @@ If nil, search stops at the beginning of the accessible portion of the buffer."
(concat (concat
(buffer-substring (progn (buffer-substring (progn
(skip-chars-backward "\n \t") (skip-chars-backward "\n \t")
(beginning-of-line) (line-beginning-position))
(point))
(progn (end-of-line) (progn (end-of-line)
(skip-chars-backward " \t") (skip-chars-backward " \t")
(point))) (point)))
@ -4304,11 +4308,9 @@ If nil, search stops at the beginning of the accessible portion of the buffer."
"..." "..."
(buffer-substring blinkpos (1+ blinkpos))) (buffer-substring blinkpos (1+ blinkpos)))
;; There is nothing to show except the char itself. ;; There is nothing to show except the char itself.
(buffer-substring blinkpos (1+ blinkpos)))))))) (buffer-substring blinkpos (1+ blinkpos)))))))
(cond (mismatch (message "Matches %s"
(message "Mismatched parentheses")) (substring-no-properties open-paren-line-string))))))))
((not blink-matching-paren-distance)
(message "Unmatched parenthesis"))))))))
;Turned off because it makes dbx bomb out. ;Turned off because it makes dbx bomb out.
(setq blink-paren-function 'blink-matching-open) (setq blink-paren-function 'blink-matching-open)

View file

@ -372,7 +372,7 @@ This relies on mode-specific knowledge and thus only works in
some major modes. Uses `smerge-resolve-function' to do the actual work." some major modes. Uses `smerge-resolve-function' to do the actual work."
(interactive) (interactive)
(smerge-match-conflict) (smerge-match-conflict)
(smerge-remove-props) (smerge-remove-props (match-beginning 0) (match-end 0))
(cond (cond
;; Trivial diff3 -A non-conflicts. ;; Trivial diff3 -A non-conflicts.
((and (eq (match-end 1) (match-end 3)) ((and (eq (match-end 1) (match-end 3))

View file

@ -814,7 +814,10 @@ Otherwise returns the library directory name, if that is defined."
(goto-char (point-min)) (goto-char (point-min))
(let (case-fold-search) (let (case-fold-search)
(setq ispell-really-aspell (setq ispell-really-aspell
(and (search-forward "(but really Aspell " nil t) t)))) (and (search-forward-regexp "(but really Aspell \\(.*\\))" nil t)
(if (version< (match-string 1) "0.60")
(error "aspell version 0.60 or greater is required")
t)))))
(kill-buffer (current-buffer))) (kill-buffer (current-buffer)))
result)) result))

View file

@ -112,7 +112,7 @@ thus showing a page other than the one point was originally in."
(save-excursion (save-excursion
(goto-char (match-beginning 0)) ; was (beginning-of-line) (goto-char (match-beginning 0)) ; was (beginning-of-line)
(looking-at page-delimiter))) (looking-at page-delimiter)))
(beginning-of-line)) (goto-char (match-beginning 0))) ; was (beginning-of-line)
(narrow-to-region (point) (narrow-to-region (point)
(progn (progn
;; Find the top of the page. ;; Find the top of the page.

View file

@ -2259,6 +2259,8 @@ With prefix arg READ-SWITCHES, specify a value to override
(interactive "DDired under VC (directory): \nP") (interactive "DDired under VC (directory): \nP")
(let ((vc-dired-switches (concat vc-dired-listing-switches (let ((vc-dired-switches (concat vc-dired-listing-switches
(if vc-dired-recurse "R" "")))) (if vc-dired-recurse "R" ""))))
(if (eq (string-match tramp-file-name-regexp dir) 0)
(error "Sorry, vc-directory does not work over Tramp"))
(if read-switches (if read-switches
(setq vc-dired-switches (setq vc-dired-switches
(read-string "Dired listing switches: " (read-string "Dired listing switches: "
@ -2809,6 +2811,9 @@ log entries should be gathered."
;; it should find all relevant files relative to ;; it should find all relevant files relative to
;; the default-directory. ;; the default-directory.
nil))) nil)))
(dolist (file (or args (list default-directory)))
(if (eq (string-match tramp-file-name-regexp file) 0)
(error "Sorry, vc-update-change-log does not work over Tramp")))
(vc-call-backend (vc-responsible-backend default-directory) (vc-call-backend (vc-responsible-backend default-directory)
'update-changelog args)) 'update-changelog args))

View file

@ -3,7 +3,7 @@
;; Copyright (C) 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Copyright (C) 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
;; Author: Francis J. Wright <F.J.Wright@qmul.ac.uk> ;; Author: Francis J. Wright <F.J.Wright@qmul.ac.uk>
;; Maintainer: Francis J. Wright <F.J.Wright@qmul.ac.uk> ;; Maintainer: FSF
;; Keywords: help, unix ;; Keywords: help, unix
;; Adapted-By: Eli Zaretskii <eliz@gnu.org> ;; Adapted-By: Eli Zaretskii <eliz@gnu.org>
;; Version: see `woman-version' ;; Version: see `woman-version'
@ -136,27 +136,23 @@
;; man man_page_name ;; man man_page_name
;; Using the `word at point' as a topic suggestion ;; Using the word at point as the default topic
;; =============================================== ;; ============================================
;; By default, the `woman' command uses the word nearest to point in ;; The `woman' command uses the word nearest to point in the current
;; the current buffer as a suggestion for the topic to look up. The ;; buffer as the default topic to look up if it matches the name of a
;; topic must be confirmed or edited in the minibuffer. This ;; manual page installed on the system. The default topic can also be
;; suggestion can be turned off, or `woman' can use the suggested ;; used without confirmation by setting the user-option
;; topic without confirmation* if possible, by setting the user-option ;; `woman-use-topic-at-point' to t; thanks to Benjamin Riefenstahl for
;; `woman-topic-at-point' to nil or t respectively. (Its default ;; suggesting this functionality.
;; value is neither nil nor t, meaning ask for confirmation.)
;; [* Thanks to Benjamin Riefenstahl for suggesting this ;; The variable `woman-use-topic-at-point' can be rebound locally,
;; functionality.] ;; which may be useful to provide special private key bindings, e.g.
;; The variable `woman-topic-at-point' can be rebound locally, which
;; may be useful to provide special private key bindings, e.g.
;; (global-set-key "\C-cw" ;; (global-set-key "\C-cw"
;; (lambda () ;; (lambda ()
;; (interactive) ;; (interactive)
;; (let ((woman-topic-at-point t)) ;; (let ((woman-use-topic-at-point t))
;; (woman))))) ;; (woman)))))
@ -420,10 +416,7 @@
;; Paul A. Thompson <pat@po.cwru.edu> ;; Paul A. Thompson <pat@po.cwru.edu>
;; Arrigo Triulzi <arrigo@maths.qmw.ac.uk> ;; Arrigo Triulzi <arrigo@maths.qmw.ac.uk>
;; Geoff Voelker <voelker@cs.washington.edu> ;; Geoff Voelker <voelker@cs.washington.edu>
;; Eli Zaretskii <eliz@is.elta.co.il> ;; Eli Zaretskii <eliz@gnu.org>
;;; History:
;; For recent change log see end of file.
;;; Code: ;;; Code:
@ -714,26 +707,21 @@ Default is \"CONTENTS\"."
:type 'string :type 'string
:group 'woman-interface) :group 'woman-interface)
(defcustom woman-topic-at-point-default 'confirm (defcustom woman-use-topic-at-point-default nil
;; `woman-topic-at-point' may be let-bound when woman is loaded, in ;; `woman-use-topic-at-point' may be let-bound when woman is loaded,
;; which case its global value does not get defined. ;; in which case its global value does not get defined.
;; `woman-file-name' sets it to this value if it is unbound. ;; `woman-file-name' sets it to this value if it is unbound.
"*Default value for `woman-topic-at-point'." "*Default value for `woman-use-topic-at-point'."
:type '(choice (const :tag "Yes" t) :type '(choice (const :tag "Yes" t)
(const :tag "No" nil) (const :tag "No" nil))
(other :tag "Confirm" confirm))
:group 'woman-interface) :group 'woman-interface)
(defcustom woman-topic-at-point woman-topic-at-point-default (defcustom woman-use-topic-at-point woman-use-topic-at-point-default
"*Controls use by `woman' of `word at point' as a topic suggestion. "*Control use of the word at point as the default topic.
If non-nil then the `woman' command uses the word at point as an If non-nil the `woman' command uses the word at point automatically,
initial topic suggestion when it reads a topic from the minibuffer; if without interactive confirmation, if it exists as a topic."
t then the `woman' command uses the word at point WITHOUT
INTERACTIVE CONFIRMATION if it exists as a topic. The default value
is `confirm', meaning suggest a topic and ask for confirmation."
:type '(choice (const :tag "Yes" t) :type '(choice (const :tag "Yes" t)
(const :tag "No" nil) (const :tag "No" nil))
(other :tag "Confirm" confirm))
:group 'woman-interface) :group 'woman-interface)
(defvar woman-file-regexp nil (defvar woman-file-regexp nil
@ -956,8 +944,9 @@ This is usually either black or white."
:group 'woman-faces) :group 'woman-faces)
(defcustom woman-use-symbol-font nil (defcustom woman-use-symbol-font nil
"*If non-nil then may use the symbol font. It is off by default, "*If non-nil then may use the symbol font.
mainly because it may change the line spacing (in NTEmacs 20.5)." It is off by default, mainly because it may change the line spacing
\(in NTEmacs 20.5)."
:type 'boolean :type 'boolean
:group 'woman-faces) :group 'woman-faces)
@ -1200,10 +1189,11 @@ It is saved to the file named by the variable `woman-cache-filename'."
(defun woman-file-name (topic &optional re-cache) (defun woman-file-name (topic &optional re-cache)
"Get the name of the UN*X man-page file describing a chosen TOPIC. "Get the name of the UN*X man-page file describing a chosen TOPIC.
When `woman' is called interactively, the word at point may be used as When `woman' is called interactively, the word at point may be
the topic or initial topic suggestion, subject to the value of the automatically used as the topic, if the value of the user option
user option `woman-topic-at-point'. Return nil if no file can be found. `woman-use-topic-at-point' is non-nil. Return nil if no file can
Optional argument RE-CACHE, if non-nil, forces the cache to be re-read." be found. Optional argument RE-CACHE, if non-nil, forces the
cache to be re-read."
;; Handle the caching of the directory and topic lists: ;; Handle the caching of the directory and topic lists:
(if (and (not re-cache) (if (and (not re-cache)
(or (or
@ -1221,25 +1211,30 @@ Optional argument RE-CACHE, if non-nil, forces the cache to be re-read."
;; completions, but to return only a case-sensitive match. This ;; completions, but to return only a case-sensitive match. This
;; does not seem to work properly by default, so I re-do the ;; does not seem to work properly by default, so I re-do the
;; completion if necessary. ;; completion if necessary.
(let (files) (let (files
(default (current-word)))
(or (stringp topic) (or (stringp topic)
(and (eq t (and (if (boundp 'woman-use-topic-at-point)
(if (boundp 'woman-topic-at-point) woman-use-topic-at-point
woman-topic-at-point
;; Was let-bound when file loaded, so ... ;; Was let-bound when file loaded, so ...
(setq woman-topic-at-point woman-topic-at-point-default))) (setq woman-use-topic-at-point woman-use-topic-at-point-default))
(setq topic (setq topic (or (current-word t) "")) ; only within or adjacent to word
(or (current-word t) "")) ; only within or adjacent to word (test-completion topic woman-topic-all-completions))
(assoc topic woman-topic-all-completions))
(setq topic (setq topic
(let* ((word-at-point (current-word))
(default
(when (and word-at-point
(test-completion
word-at-point woman-topic-all-completions))
word-at-point)))
(completing-read (completing-read
"Manual entry: " (if default
(format "Manual entry [default: %s]: " default)
"Manual entry: ")
woman-topic-all-completions nil 1 woman-topic-all-completions nil 1
;; Initial input suggestion (was nil), with nil
;; cursor at left ready to kill suggestion!: 'woman-topic-history
(and woman-topic-at-point default))))
(cons (or (current-word) "") 0)) ; nearest word
'woman-topic-history)))
;; Note that completing-read always returns a string. ;; Note that completing-read always returns a string.
(if (= (length topic) 0) (if (= (length topic) 0)
nil ; no topic, so no file! nil ; no topic, so no file!
@ -1261,8 +1256,7 @@ Optional argument RE-CACHE, if non-nil, forces the cache to be re-read."
;; minibuffer contents as far as possible. ;; minibuffer contents as far as possible.
(setq unread-command-events '(9)) ; and delete any type-ahead! (setq unread-command-events '(9)) ; and delete any type-ahead!
(completing-read "Manual file: " files nil 1 (completing-read "Manual file: " files nil 1
(try-completion "" files) 'woman-file-history))) (try-completion "" files) 'woman-file-history))))))
)))
(defun woman-select (predicate list) (defun woman-select (predicate list)
"Select unique elements for which PREDICATE is true in LIST. "Select unique elements for which PREDICATE is true in LIST.
@ -1741,7 +1735,10 @@ Leave point at end of new text. Return length of inserted text."
(define-key woman-mode-map "w" 'woman) (define-key woman-mode-map "w" 'woman)
(define-key woman-mode-map "\en" 'WoMan-next-manpage) (define-key woman-mode-map "\en" 'WoMan-next-manpage)
(define-key woman-mode-map "\ep" 'WoMan-previous-manpage) (define-key woman-mode-map "\ep" 'WoMan-previous-manpage)
(define-key woman-mode-map [M-mouse-2] 'woman-follow-word)) (define-key woman-mode-map [M-mouse-2] 'woman-follow-word)
;; We don't need to call `man' when we are in `woman-mode'.
(define-key woman-mode-map [remap man] 'woman))
(defun woman-follow-word (event) (defun woman-follow-word (event)
"Run WoMan with word under mouse as topic. "Run WoMan with word under mouse as topic.
@ -1942,25 +1939,33 @@ Optional argument REDRAW, if non-nil, forces mode line to be updated."
(defvar WoMan-Man-start-time nil (defvar WoMan-Man-start-time nil
"Used to record formatting time used by the `man' command.") "Used to record formatting time used by the `man' command.")
(defadvice Man-getpage-in-background ;; Both advices are disabled because "a file in Emacs should not put
(around Man-getpage-in-background-advice (topic) activate) ;; advice on a function in Emacs" (see Info node "(elisp)Advising
"Use WoMan unless invoked outside a WoMan buffer or invoked explicitly. ;; Functions"). Counting the formatting time is useful for
Otherwise use Man and record start of formatting time." ;; developping, but less applicable for daily use. The advice for
(if (and (eq major-mode 'woman-mode) ;; `Man-getpage-in-background' can be discarded, because the
(not (eq (caar command-history) 'man))) ;; key-binding in `woman-mode-map' has been remapped to call `woman'
(WoMan-getpage-in-background topic) ;; but `man'. Michael Albinus <michael.albinus@gmx.de>
;; Initiates man processing
(setq WoMan-Man-start-time (current-time))
ad-do-it))
(defadvice Man-bgproc-sentinel ;; (defadvice Man-getpage-in-background
(after Man-bgproc-sentinel-advice activate) ;; (around Man-getpage-in-background-advice (topic) activate)
;; Terminates man processing ;; "Use WoMan unless invoked outside a WoMan buffer or invoked explicitly.
"Report formatting time." ;; Otherwise use Man and record start of formatting time."
(let* ((time (current-time)) ;; (if (and (eq major-mode 'woman-mode)
(time (+ (* (- (car time) (car WoMan-Man-start-time)) 65536) ;; (not (eq (caar command-history) 'man)))
(- (cadr time) (cadr WoMan-Man-start-time))))) ;; (WoMan-getpage-in-background topic)
(message "Man formatting done in %d seconds" time))) ;; ;; Initiates man processing
;; (setq WoMan-Man-start-time (current-time))
;; ad-do-it))
;; (defadvice Man-bgproc-sentinel
;; (after Man-bgproc-sentinel-advice activate)
;; ;; Terminates man processing
;; "Report formatting time."
;; (let* ((time (current-time))
;; (time (+ (* (- (car time) (car WoMan-Man-start-time)) 65536)
;; (- (cadr time) (cadr WoMan-Man-start-time)))))
;; (message "Man formatting done in %d seconds" time)))
;;; Buffer handling: ;;; Buffer handling:

View file

@ -1,3 +1,44 @@
2005-09-10 Chong Yidong <cyd@stupidchicken.com>
* files.texi (Saving Buffers): Fix typo.
2005-09-08 Richard M. Stallman <rms@gnu.org>
* tips.texi (Programming Tips): Correct the "default" prompt spec.
2005-09-08 Chong Yidong <cyd@stupidchicken.com>
* locals.texi (Standard Buffer-Local Variables): Don't include
mode variables for minor modes.
Fix xrefs for buffer-display-count, buffer-display-table,
buffer-offer-save, buffer-saved-size, cache-long-line-scans,
enable-multibyte-characters, fill-column, header-line-format,
left-fringe-width, left-margin, and right-fringe-width.
* hooks.texi (Standard Hooks): All hooks should conform to the
standard naming convention now.
Fix xref for `echo-area-clear-hook'.
* display.texi (Usual Display): Note that indicate-empty-lines and
tab-width are buffer-local.
* files.texi (Saving Buffers): Add xref to `Killing Buffers'.
* modes.texi (Mode Help): Note that major-mode is buffer-local.
* nonascii.texi (Encoding and I/O): Note that
buffer-file-coding-system is buffer-local.
* positions.texi (List Motion): Note that defun-prompt-regexp is
buffer-local.
* text.texi (Auto Filling): Note that auto-fill-function is
buffer-local.
(Undo): Note that buffer-undo-list is buffer-local.
* windows.texi (Buffers and Windows): Document
buffer-display-count.
2005-09-06 Richard M. Stallman <rms@gnu.org> 2005-09-06 Richard M. Stallman <rms@gnu.org>
* tips.texi (Coding Conventions): Sometimes it is ok to put the * tips.texi (Coding Conventions): Sometimes it is ok to put the

View file

@ -4546,11 +4546,11 @@ buffers that do not override it. @xref{Default Value}.
@end defvar @end defvar
@defopt tab-width @defopt tab-width
The value of this variable is the spacing between tab stops used for The value of this buffer-local variable is the spacing between tab
displaying tab characters in Emacs buffers. The value is in units of stops used for displaying tab characters in Emacs buffers. The value
columns, and the default is 8. Note that this feature is completely is in units of columns, and the default is 8. Note that this feature
independent of the user-settable tab stops used by the command is completely independent of the user-settable tab stops used by the
@code{tab-to-tab-stop}. @xref{Indent Tabs}. command @code{tab-to-tab-stop}. @xref{Indent Tabs}.
@end defopt @end defopt
@defopt indicate-empty-lines @defopt indicate-empty-lines
@ -4559,6 +4559,7 @@ independent of the user-settable tab stops used by the command
When this is non-@code{nil}, Emacs displays a special glyph in the When this is non-@code{nil}, Emacs displays a special glyph in the
fringe of each empty line at the end of the buffer, on terminals that fringe of each empty line at the end of the buffer, on terminals that
support it (window systems). @xref{Fringes}. support it (window systems). @xref{Fringes}.
This variable is automatically buffer-local in every buffer.
@end defopt @end defopt
@defvar indicate-buffer-boundaries @defvar indicate-buffer-boundaries

View file

@ -341,10 +341,10 @@ The optional @var{pred} argument controls which buffers to ask about
If it is @code{nil}, that means to ask only about file-visiting buffers. If it is @code{nil}, that means to ask only about file-visiting buffers.
If it is @code{t}, that means also offer to save certain other non-file If it is @code{t}, that means also offer to save certain other non-file
buffers---those that have a non-@code{nil} buffer-local value of buffers---those that have a non-@code{nil} buffer-local value of
@code{buffer-offer-save}. (A user who says @samp{yes} to saving a @code{buffer-offer-save} (@pxref{Killing Buffers}). A user who says
non-file buffer is asked to specify the file name to use.) The @samp{yes} to saving a non-file buffer is asked to specify the file
@code{save-buffers-kill-emacs} function passes the value @code{t} for name to use. The @code{save-buffers-kill-emacs} function passes the
@var{pred}. value @code{t} for @var{pred}.
If @var{pred} is neither @code{t} nor @code{nil}, then it should be If @var{pred} is neither @code{t} nor @code{nil}, then it should be
a function of no arguments. It will be called in each buffer to decide a function of no arguments. It will be called in each buffer to decide

View file

@ -26,14 +26,13 @@ are omitted in the list below.
The variables whose names end in @samp{-hooks} or @samp{-functions} are The variables whose names end in @samp{-hooks} or @samp{-functions} are
usually @dfn{abnormal hooks}; their values are lists of functions, but usually @dfn{abnormal hooks}; their values are lists of functions, but
these functions are called in a special way (they are passed arguments, these functions are called in a special way (they are passed arguments,
or their values are used). A few of these variables are actually normal or their values are used). The variables whose names end in
hooks which were named before we established the convention that normal @samp{-function} have single functions as their values.
hooks' names should end in @samp{-hook}.
The variables whose names end in @samp{-function} have single functions (In older Emacs versions, some normal hooks had names ending in
as their values. (In older Emacs versions, some of these variables had @samp{-hooks} or @samp{-functions}, and some abnormal hooks had names
names ending in @samp{-hook} even though they were not normal hooks; ending in @samp{-hook}. We have renamed all of these to conform to
however, we have renamed all of those.) the above conventions.)
@c We need to xref to where each hook is documented or else document @c We need to xref to where each hook is documented or else document
@c it here. @c it here.
@ -135,7 +134,7 @@ for appointment notification.
@xref{Disabling Commands}. @xref{Disabling Commands}.
@item echo-area-clear-hook @item echo-area-clear-hook
@xref{The Echo Area}. @xref{Echo Area Customization}.
@item emacs-startup-hook @item emacs-startup-hook
@xref{Init File}. @xref{Init File}.

View file

@ -15,10 +15,11 @@ buffer-local only when set; a few of them are always local in every
buffer. Many Lisp packages define such variables for their internal buffer. Many Lisp packages define such variables for their internal
use, but we don't try to list them all here. use, but we don't try to list them all here.
@table @code Each minor modes defines a buffer-local variable named
@item abbrev-mode @samp{@var{modename}-mode}. @xref{Minor Mode Conventions}. Minor
@xref{Abbrevs}. mode variables will not be listed here.
@table @code
@item auto-fill-function @item auto-fill-function
@xref{Auto Filling}. @xref{Auto Filling}.
@ -29,13 +30,13 @@ use, but we don't try to list them all here.
@xref{Auto-Saving}. @xref{Auto-Saving}.
@item buffer-backed-up @item buffer-backed-up
@xref{Backup Files}. @xref{Making Backups}.
@item buffer-display-count @item buffer-display-count
@xref{Displaying Buffers}. @xref{Buffers and Windows}.
@item buffer-display-table @item buffer-display-table
@xref{Display Tables}. @xref{Active Display Table}.
@item buffer-display-time @item buffer-display-time
@xref{Buffers and Windows}. @xref{Buffers and Windows}.
@ -62,19 +63,19 @@ use, but we don't try to list them all here.
@xref{Invisible Text}. @xref{Invisible Text}.
@item buffer-offer-save @item buffer-offer-save
@xref{Saving Buffers}. @xref{Killing Buffers}.
@item buffer-read-only @item buffer-read-only
@xref{Read Only Buffers}. @xref{Read Only Buffers}.
@item buffer-saved-size @item buffer-saved-size
@xref{Point}. @xref{Auto-Saving}.
@item buffer-undo-list @item buffer-undo-list
@xref{Undo}. @xref{Undo}.
@item cache-long-line-scans @item cache-long-line-scans
@xref{Text Lines}. @xref{Truncation}.
@item case-fold-search @item case-fold-search
@xref{Searching and Case}. @xref{Searching and Case}.
@ -103,10 +104,10 @@ Does not work yet.
@end ignore @end ignore
@item enable-multibyte-characters @item enable-multibyte-characters
@ref{Non-ASCII Characters}. @ref{Text Representations}.
@item fill-column @item fill-column
@xref{Auto Filling}. @xref{Margins}.
@item fringes-outside-margins @item fringes-outside-margins
@xref{Fringes}. @xref{Fringes}.
@ -115,7 +116,7 @@ Does not work yet.
@xref{Moving Point,,, emacs, The GNU Emacs Manual}. @xref{Moving Point,,, emacs, The GNU Emacs Manual}.
@item header-line-format @item header-line-format
@xref{Mode Line Data}. @xref{Header Lines}.
@item indicate-buffer-boundaries @item indicate-buffer-boundaries
@xref{Usual Display}. @xref{Usual Display}.
@ -124,10 +125,10 @@ Does not work yet.
@xref{Usual Display}. @xref{Usual Display}.
@item left-fringe-width @item left-fringe-width
@xref{Fringes}. @xref{Fringe Size/Pos}.
@item left-margin @item left-margin
@xref{Indentation}. @xref{Margins}.
@item left-margin-width @item left-margin-width
@xref{Display Margins}. @xref{Display Margins}.
@ -136,7 +137,7 @@ Does not work yet.
@xref{Line Height}. @xref{Line Height}.
@item local-abbrev-table @item local-abbrev-table
@xref{Abbrevs}. @xref{Standard Abbrev Tables}.
@item major-mode @item major-mode
@xref{Mode Help}. @xref{Mode Help}.
@ -162,14 +163,11 @@ Does not work yet.
@item mode-name @item mode-name
@xref{Mode Line Variables}. @xref{Mode Line Variables}.
@item overwrite-mode
@xref{Insertion}.
@item point-before-scroll @item point-before-scroll
Used for communication between mouse commands and scroll-bar commands. Used for communication between mouse commands and scroll-bar commands.
@item right-fringe-width @item right-fringe-width
@xref{Fringes}. @xref{Fringe Size/Pos}.
@item right-margin-width @item right-margin-width
@xref{Display Margins}. @xref{Display Margins}.
@ -195,9 +193,6 @@ Used for communication between mouse commands and scroll-bar commands.
@item truncate-lines @item truncate-lines
@xref{Truncation}. @xref{Truncation}.
@item vc-mode
@xref{Mode Line Variables}.
@item vertical-scroll-bar @item vertical-scroll-bar
@xref{Scroll Bars}. @xref{Scroll Bars}.
@end table @end table

View file

@ -961,11 +961,11 @@ displays the documentation string of the major mode function.
@end deffn @end deffn
@defvar major-mode @defvar major-mode
This variable holds the symbol for the current buffer's major mode. This buffer-local variable holds the symbol for the current buffer's
This symbol should have a function definition that is the command to major mode. This symbol should have a function definition that is the
switch to that major mode. The @code{describe-mode} function uses the command to switch to that major mode. The @code{describe-mode}
documentation string of the function as the documentation of the major function uses the documentation string of the function as the
mode. documentation of the major mode.
@end defvar @end defvar
@node Derived Modes @node Derived Modes

View file

@ -717,8 +717,8 @@ operation finishes the job of choosing a coding system. Very often
you will want to find out afterwards which coding system was chosen. you will want to find out afterwards which coding system was chosen.
@defvar buffer-file-coding-system @defvar buffer-file-coding-system
This variable records the coding system that was used for visiting the This buffer-local variable records the coding system that was used to visit
current buffer. It is used for saving the buffer, and for writing part the current buffer. It is used for saving the buffer, and for writing part
of the buffer with @code{write-region}. If the text to be written of the buffer with @code{write-region}. If the text to be written
cannot be safely encoded using the coding system specified by this cannot be safely encoded using the coding system specified by this
variable, these operations select an alternative encoding by calling variable, these operations select an alternative encoding by calling

View file

@ -720,11 +720,11 @@ to 1.
@end deffn @end deffn
@defopt defun-prompt-regexp @defopt defun-prompt-regexp
If non-@code{nil}, this variable holds a regular expression that If non-@code{nil}, this buffer-local variable holds a regular
specifies what text can appear before the open-parenthesis that starts a expression that specifies what text can appear before the
defun. That is to say, a defun begins on a line that starts with a open-parenthesis that starts a defun. That is to say, a defun begins
match for this regular expression, followed by a character with on a line that starts with a match for this regular expression,
open-parenthesis syntax. followed by a character with open-parenthesis syntax.
@end defopt @end defopt
@defopt open-paren-in-column-0-is-defun-start @defopt open-paren-in-column-0-is-defun-start

View file

@ -1200,8 +1200,8 @@ text in the buffer automatically add elements to the front of the undo
list, which is in the variable @code{buffer-undo-list}. list, which is in the variable @code{buffer-undo-list}.
@defvar buffer-undo-list @defvar buffer-undo-list
This variable's value is the undo list of the current buffer. This buffer-local variable's value is the undo list of the current
A value of @code{t} disables the recording of undo information. buffer. A value of @code{t} disables the recording of undo information.
@end defvar @end defvar
Here are the kinds of elements an undo list can have: Here are the kinds of elements an undo list can have:
@ -1768,8 +1768,8 @@ justify existing text, see @ref{Filling}.
justification style to refill portions of the text. @xref{Margins}. justification style to refill portions of the text. @xref{Margins}.
@defvar auto-fill-function @defvar auto-fill-function
The value of this variable should be a function (of no arguments) to be The value of this buffer-local variable should be a function (of no
called after self-inserting a character from the table arguments) to be called after self-inserting a character from the table
@code{auto-fill-chars}. It may be @code{nil}, in which case nothing @code{auto-fill-chars}. It may be @code{nil}, in which case nothing
special is done in that case. special is done in that case.

View file

@ -386,7 +386,7 @@ put it and the word @samp{default} inside parentheses.
It should look like this: It should look like this:
@example @example
Enter the answer: (default 42) Enter the answer (default 42):
@end example @end example
@item @item

View file

@ -717,6 +717,12 @@ based on the local variables of @var{buffer}. However, if
widths of @var{window} remain unchanged. @xref{Fringes}. widths of @var{window} remain unchanged. @xref{Fringes}.
@end defun @end defun
@defvar buffer-display-count
This buffer-local variable records the number of times a buffer is
displayed in a window. It is incremented each time
@code{set-window-buffer} is called for the buffer.
@end defvar
@defun window-buffer &optional window @defun window-buffer &optional window
This function returns the buffer that @var{window} is displaying. If This function returns the buffer that @var{window} is displaying. If
@var{window} is omitted, this function returns the buffer for the @var{window} is omitted, this function returns the buffer for the

View file

@ -2108,7 +2108,7 @@
* pgg.texi (User Commands, Backend methods): Do. * pgg.texi (User Commands, Backend methods): Do.
* gnus.texi: Markup fixes. * gnus.texi: Markup fixes.
(Setting Process Marks): Fix `M P a' entry. (Setting Process Marks): Fix `M P a' entry.
* emacs-mime: Fixes. * emacs-mime.texi: Fixes.
2004-09-23 Reiner Steib <Reiner.Steib@gmx.de> 2004-09-23 Reiner Steib <Reiner.Steib@gmx.de>

View file

@ -1,3 +1,8 @@
2005-09-10 Sven Joachim <svenjoac@gmx.de> (tiny change)
* sed3v2.inp (GETOPT_H, GETOPTOBJS): Define to use getopt.h,
getopt.o and getopt1.o.
2005-07-04 Lute Kamstra <lute@gnu.org> 2005-07-04 Lute Kamstra <lute@gnu.org>
Update FSF's address in GPL notices. Update FSF's address in GPL notices.

View file

@ -31,6 +31,8 @@
/^LOADLIBES *=/s!=.*$!=! /^LOADLIBES *=/s!=.*$!=!
/^ALLOCA *=/s!@ALLOCA@!! /^ALLOCA *=/s!@ALLOCA@!!
/^EXEEXT *=/s!@EXEEXT@!! /^EXEEXT *=/s!@EXEEXT@!!
/^GETOPT_H *=/s!@GETOPT_H@!getopt.h!
/^GETOPTOBJS *=/s!@GETOPTOBJS@!getopt.o getopt1.o!
/^INSTALLABLES/s/emacsclient *// /^INSTALLABLES/s/emacsclient *//
s!^ \./! ! s!^ \./! !
/^UTILITIES=/s/ wakeup// /^UTILITIES=/s/ wakeup//

View file

@ -1,3 +1,7 @@
2005-09-10 Eli Zaretskii <eliz@gnu.org>
* config.nt (HAVE_GET_CURRENT_DIR_NAME): Undefine.
2005-08-10 Juanma Barranquero <lekktu@gmail.com> 2005-08-10 Juanma Barranquero <lekktu@gmail.com>
* .cvsignore: Add `obj' and `oo' for in-place installations. * .cvsignore: Add `obj' and `oo' for in-place installations.

View file

@ -233,6 +233,7 @@ Boston, MA 02110-1301, USA. */
#undef HAVE_MKTIME #undef HAVE_MKTIME
#undef HAVE_EUIDACCESS #undef HAVE_EUIDACCESS
#undef HAVE_GETPAGESIZE #undef HAVE_GETPAGESIZE
#undef HAVE_GET_CURRENT_DIR_NAME
#undef HAVE_TZSET #undef HAVE_TZSET
#undef HAVE_SETLOCALE #undef HAVE_SETLOCALE
#undef HAVE_UTIMES #undef HAVE_UTIMES

View file

@ -1,3 +1,75 @@
2005-09-11 Chris Prince <cprince@gmail.com> (tiny change)
* w32term.c (x_bitmap_icon): Load small icons too.
2005-09-10 Romain Francoise <romain@orebokech.com>
* buffer.c (init_buffer): Grow buffer to add directory separator
and terminal zero. Fix typos.
2005-09-10 Eli Zaretskii <eliz@gnu.org>
* buffer.c (init_buffer): Fix error message for failed call to
get_current_dir_name.
(get_current_dir_name): Remove prototype.
* xsmfns.c: (get_current_dir_name): Remove prototype.
* lisp.h: (get_current_dir_name) [!HAVE_GET_CURRENT_DIR_NAME]: Add
prototype.
* sysdep.c [WINDOWSNT]: Add prototype for getwd.
Don't #undef NULL after including blockinput.h.
* config.in: Regenerated.
2005-09-10 Giuseppe Scrivano <gscrivano@gmail.com>
Remove the MAXPATHLEN limitations:
* sysdep.c (get_current_dir_name) [!HAVE_GET_CURRENT_DIR_NAME]:
New function.
* buffer.c (init_buffer): Use it.
* xsmfns.c (smc_save_yourself_CB): Ditto.
2005-09-09 Kim F. Storm <storm@cua.dk>
* doc.c (Fsubstitute_command_keys): Lookup key binding for
commands that are remapped from some other command.
* xdisp.c (try_window_reusing_current_matrix): Clear mode_line_p
flag in disabled rows below the window.
* frame.h (struct frame): New member updated_p.
* xdisp.c (redisplay_internal): Mark updated frames in new updated_p
member. Remove local `updated' array and associated variables.
2005-09-07 Kim F. Storm <storm@cua.dk>
* xdisp.c (handle_display_prop): Respect overlay window property.
* xdisp.c (try_window): Remove superfluous cursor_height calculation.
Fixes crash reported by YAMAMOTO Mitsuharu.
2005-09-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* macterm.c (struct xlfdpat_block, struct xlfdpat): New structs.
(xlfdpat_destroy, xlfdpat_create, xlfdpat_exact_p)
(xlfdpat_block_match_1, xlfdpat_match): New functions.
(xlfdpat_block_match): New macro.
(mac_to_x_fontname): Don't use tolower for non-ASCII characters.
(x_font_name_to_mac_font_name): Set coding.dst_multibyte to 0.
(add_font_name_table_entry): Increase font_name_table_size more
rapidly.
(mac_c_string_match): Remove function.
(mac_do_list_fonts): Use XLFD pattern match instead of regular
expression match.
* xfaces.c (xstrlwr): Don't use tolower for non-ASCII characters.
2005-09-03 Richard M. Stallman <rms@gnu.org> 2005-09-03 Richard M. Stallman <rms@gnu.org>
* xdisp.c (redisplay_internal): Make UPDATED as long as needed. * xdisp.c (redisplay_internal): Make UPDATED as long as needed.

View file

@ -32,10 +32,6 @@ Boston, MA 02110-1301, USA. */
extern int errno; extern int errno;
#endif #endif
#ifndef MAXPATHLEN
/* in 4.1 [probably SunOS? -stef] , param.h fails to define this. */
#define MAXPATHLEN 1024
#endif /* not MAXPATHLEN */
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
#include <unistd.h> #include <unistd.h>
@ -5131,7 +5127,6 @@ init_buffer_once ()
void void
init_buffer () init_buffer ()
{ {
char buf[MAXPATHLEN + 1];
char *pwd; char *pwd;
struct stat dotstat, pwdstat; struct stat dotstat, pwdstat;
Lisp_Object temp; Lisp_Object temp;
@ -5154,40 +5149,28 @@ init_buffer ()
if (NILP (buffer_defaults.enable_multibyte_characters)) if (NILP (buffer_defaults.enable_multibyte_characters))
Fset_buffer_multibyte (Qnil); Fset_buffer_multibyte (Qnil);
/* If PWD is accurate, use it instead of calling getwd. PWD is pwd = get_current_dir_name ();
sometimes a nicer name, and using it may avoid a fatal error if a
parent directory is searchable but not readable. */ if (!pwd)
if ((pwd = getenv ("PWD")) != 0 fatal ("`get_current_dir_name' failed: %s\n", strerror (errno));
&& (IS_DIRECTORY_SEP (*pwd) || (*pwd && IS_DEVICE_SEP (pwd[1])))
&& stat (pwd, &pwdstat) == 0
&& stat (".", &dotstat) == 0
&& dotstat.st_ino == pwdstat.st_ino
&& dotstat.st_dev == pwdstat.st_dev
&& strlen (pwd) < MAXPATHLEN)
strcpy (buf, pwd);
#ifdef HAVE_GETCWD
else if (getcwd (buf, MAXPATHLEN+1) == 0)
fatal ("`getcwd' failed: %s\n", strerror (errno));
#else
else if (getwd (buf) == 0)
fatal ("`getwd' failed: %s\n", buf);
#endif
#ifndef VMS #ifndef VMS
/* Maybe this should really use some standard subroutine /* Maybe this should really use some standard subroutine
whose definition is filename syntax dependent. */ whose definition is filename syntax dependent. */
rc = strlen (buf); rc = strlen (pwd);
if (!(IS_DIRECTORY_SEP (buf[rc - 1]))) if (!(IS_DIRECTORY_SEP (pwd[rc - 1])))
{ {
buf[rc] = DIRECTORY_SEP; /* Grow buffer to add directory separator and '\0'. */
buf[rc + 1] = '\0'; pwd = (char *) xrealloc (pwd, rc + 2);
pwd[rc] = DIRECTORY_SEP;
pwd[rc + 1] = '\0';
} }
#endif /* not VMS */ #endif /* not VMS */
current_buffer->directory = make_unibyte_string (buf, strlen (buf)); current_buffer->directory = make_unibyte_string (pwd, strlen (pwd));
if (! NILP (buffer_defaults.enable_multibyte_characters)) if (! NILP (buffer_defaults.enable_multibyte_characters))
/* At this momemnt, we still don't know how to decode the /* At this moment, we still don't know how to decode the
direcotry name. So, we keep the bytes in multibyte form so directory name. So, we keep the bytes in multibyte form so
that ENCODE_FILE correctly gets the original bytes. */ that ENCODE_FILE correctly gets the original bytes. */
current_buffer->directory current_buffer->directory
= string_to_multibyte (current_buffer->directory); = string_to_multibyte (current_buffer->directory);
@ -5206,6 +5189,8 @@ init_buffer ()
temp = get_minibuffer (0); temp = get_minibuffer (0);
XBUFFER (temp)->directory = current_buffer->directory; XBUFFER (temp)->directory = current_buffer->directory;
free (pwd);
} }
/* initialize the buffer routines */ /* initialize the buffer routines */

View file

@ -221,6 +221,9 @@ Boston, MA 02110-1301, USA. */
/* Define to 1 if you have the `getwd' function. */ /* Define to 1 if you have the `getwd' function. */
#undef HAVE_GETWD #undef HAVE_GETWD
/* Define to 1 if you have the `get_current_dir_name' function. */
#undef HAVE_GET_CURRENT_DIR_NAME
/* Define to 1 if you have the ungif library (-lungif). */ /* Define to 1 if you have the ungif library (-lungif). */
#undef HAVE_GIF #undef HAVE_GIF

View file

@ -57,6 +57,8 @@ static Lisp_Object Vbuild_files;
extern Lisp_Object Voverriding_local_map; extern Lisp_Object Voverriding_local_map;
extern Lisp_Object Qremap;
/* For VMS versions with limited file name syntax, /* For VMS versions with limited file name syntax,
convert the name to something VMS will allow. */ convert the name to something VMS will allow. */
static void static void
@ -812,6 +814,7 @@ thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ int
else if (strp[0] == '\\' && strp[1] == '[') else if (strp[0] == '\\' && strp[1] == '[')
{ {
int start_idx; int start_idx;
int follow_remap = 1;
changed = 1; changed = 1;
strp += 2; /* skip \[ */ strp += 2; /* skip \[ */
@ -830,11 +833,21 @@ thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ int
idx = strp - SDATA (string); idx = strp - SDATA (string);
name = Fintern (make_string (start, length_byte), Qnil); name = Fintern (make_string (start, length_byte), Qnil);
do_remap:
/* Ignore remappings unless there are no ordinary bindings. */ /* Ignore remappings unless there are no ordinary bindings. */
tem = Fwhere_is_internal (name, keymap, Qt, Qnil, Qt); tem = Fwhere_is_internal (name, keymap, Qt, Qnil, Qt);
if (NILP (tem)) if (NILP (tem))
tem = Fwhere_is_internal (name, keymap, Qt, Qnil, Qnil); tem = Fwhere_is_internal (name, keymap, Qt, Qnil, Qnil);
if (VECTORP (tem) && XVECTOR (tem)->size > 1
&& EQ (AREF (tem, 0), Qremap) && SYMBOLP (AREF (tem, 1))
&& follow_remap)
{
name = AREF (tem, 1);
follow_remap = 0;
goto do_remap;
}
/* Note the Fwhere_is_internal can GC, so we have to take /* Note the Fwhere_is_internal can GC, so we have to take
relocation of string contents into account. */ relocation of string contents into account. */
strp = SDATA (string) + idx; strp = SDATA (string) + idx;

View file

@ -468,6 +468,9 @@ struct frame
/* Set to non-zero if this frame has already been hscrolled during /* Set to non-zero if this frame has already been hscrolled during
current redisplay. */ current redisplay. */
unsigned already_hscrolled_p : 1; unsigned already_hscrolled_p : 1;
/* Set to non-zero when current redisplay has updated frame. */
unsigned updated_p : 1;
}; };
#ifdef MULTI_KBOARD #ifdef MULTI_KBOARD

View file

@ -3141,6 +3141,9 @@ EXFUN (Fx_popup_dialog, 3);
extern void syms_of_xmenu P_ ((void)); extern void syms_of_xmenu P_ ((void));
/* defined in sysdep.c */ /* defined in sysdep.c */
#ifndef HAVE_GET_CURRENT_DIR_NAME
extern char *get_current_dir_name P_ ((void));
#endif
extern void stuff_char P_ ((char c)); extern void stuff_char P_ ((char c));
extern void init_sigio P_ ((int)); extern void init_sigio P_ ((int));
extern void request_sigio P_ ((void)); extern void request_sigio P_ ((void));

View file

@ -6098,6 +6098,335 @@ x_wm_set_icon_position (f, icon_x, icon_y)
#endif /* MAC_TODO */ #endif /* MAC_TODO */
} }
/***********************************************************************
XLFD Pattern Match
***********************************************************************/
/* An XLFD pattern is divided into blocks delimited by '*'. This
structure holds information for each block. */
struct xlfdpat_block
{
/* Length of the pattern string in this block. Non-zero except for
the first and the last blocks. */
int len;
/* Pattern string except the last character in this block. The last
character is replaced with NUL in order to use it as a
sentinel. */
unsigned char *pattern;
/* Last character of the pattern string. Must not be '?'. */
unsigned char last_char;
/* One of the tables for the Boyer-Moore string search. It
specifies the number of positions to proceed for each character
with which the match fails. */
int skip[256];
/* The skip value for the last character in the above `skip' is
assigned to `infinity' in order to simplify a loop condition.
The original value is saved here. */
int last_char_skip;
};
struct xlfdpat
{
/* Normalized pattern string. "Normalized" means that capital
letters are lowered, blocks are not empty except the first and
the last ones, and trailing '?'s in a block that is not the last
one are moved to the next one. The last character in each block
is replaced with NUL. */
unsigned char *buf;
/* Number of characters except '*'s and trailing '?'s in the
normalized pattern string. */
int nchars;
/* Number of trailing '?'s in the normalized pattern string. */
int trailing_anychars;
/* Number of blocks and information for each block. The latter is
NULL if the pattern is exact (no '*' or '?' in it). */
int nblocks;
struct xlfdpat_block *blocks;
};
static void
xlfdpat_destroy (pat)
struct xlfdpat *pat;
{
if (pat)
{
if (pat->buf)
{
if (pat->blocks)
xfree (pat->blocks);
xfree (pat->buf);
}
xfree (pat);
}
}
static struct xlfdpat *
xlfdpat_create (pattern)
char *pattern;
{
struct xlfdpat *pat;
int nblocks, i, skip;
unsigned char last_char, *p, *q, *anychar_head;
struct xlfdpat_block *blk;
pat = xmalloc (sizeof (struct xlfdpat));
if (pat == NULL)
goto error;
pat->buf = xmalloc (strlen (pattern) + 1);
if (pat->buf == NULL)
goto error;
/* Normalize the pattern string and store it to `pat->buf'. */
nblocks = 0;
anychar_head = NULL;
q = pat->buf;
last_char = '\0';
for (p = pattern; *p; p++)
{
unsigned char c = *p;
if (c == '*')
if (last_char == '*')
/* ...a** -> ...a* */
continue;
else
{
if (last_char == '?')
if (anychar_head > pat->buf && *(anychar_head - 1) == '*')
/* ...*??* -> ...*?? */
continue;
else
/* ...a??* -> ...a*?? */
{
*anychar_head++ = '*';
c = '?';
}
nblocks++;
}
else if (c == '?')
{
if (last_char != '?')
anychar_head = q;
}
else
/* On Mac OS X 10.3, tolower also converts non-ASCII
characters for some locales. */
if (isascii (c))
c = tolower (c);
*q++ = last_char = c;
}
*q = '\0';
nblocks++;
pat->nblocks = nblocks;
if (last_char != '?')
pat->trailing_anychars = 0;
else
{
pat->trailing_anychars = q - anychar_head;
q = anychar_head;
}
pat->nchars = q - pat->buf - (nblocks - 1);
if (anychar_head == NULL && nblocks == 1)
{
/* The pattern is exact. */
pat->blocks = NULL;
return pat;
}
pat->blocks = xmalloc (sizeof (struct xlfdpat_block) * nblocks);
if (pat->blocks == NULL)
goto error;
/* Divide the normalized pattern into blocks. */
p = pat->buf;
for (blk = pat->blocks; blk < pat->blocks + nblocks - 1; blk++)
{
blk->pattern = p;
while (*p != '*')
p++;
blk->len = p - blk->pattern;
p++;
}
blk->pattern = p;
blk->len = q - blk->pattern;
/* Setup a table for the Boyer-Moore string search. */
for (blk = pat->blocks; blk < pat->blocks + nblocks; blk++)
if (blk->len != 0)
{
blk->last_char = blk->pattern[blk->len - 1];
blk->pattern[blk->len - 1] = '\0';
for (skip = 1; skip < blk->len; skip++)
if (blk->pattern[blk->len - skip - 1] == '?')
break;
for (i = 0; i < 256; i++)
blk->skip[i] = skip;
p = blk->pattern + (blk->len - skip);
while (--skip > 0)
blk->skip[*p++] = skip;
blk->last_char_skip = blk->skip[blk->last_char];
}
return pat;
error:
xlfdpat_destroy (pat);
return NULL;
}
static INLINE int
xlfdpat_exact_p (pat)
struct xlfdpat *pat;
{
return (pat)->blocks == NULL;
}
/* Return the first string in STRING + 0, ..., STRING + START_MAX such
that the pattern in *BLK matches with its prefix. Return NULL
there is no such strings. STRING must be lowered in advance. */
static char *
xlfdpat_block_match_1 (blk, string, start_max)
struct xlfdpat_block *blk;
unsigned char *string;
int start_max;
{
int start, infinity;
unsigned char *p, *s;
xassert (blk->len > 0);
xassert (start_max + blk->len <= strlen (string));
xassert (blk->pattern[blk->len - 1] != '?');
/* See the comments in the function `boyer_moore' (search.c) for the
use of `infinity'. */
infinity = start_max + blk->len + 1;
blk->skip[blk->last_char] = infinity;
start = 0;
do
{
/* Check the last character of the pattern. */
s = string + blk->len - 1;
do
{
start += blk->skip[*(s + start)];
}
while (start <= start_max);
if (start < infinity)
/* Couldn't find the last character. */
return NULL;
/* No less than `infinity' means we could find the last
character at `s[start - infinity]'. */
start -= infinity;
/* Check the remaining characters. We prefer making no-'?'
cases faster because the use of '?' is really rare. */
p = blk->pattern;
s = string + start;
do
{
while (*p++ == *s++)
;
}
while (*(p - 1) == '?');
if (*(p - 1) == '\0')
/* Matched. */
return string + start;
/* Didn't match. */
start += blk->last_char_skip;
}
while (start <= start_max);
return NULL;
}
#define xlfdpat_block_match(b, s, m) \
((b)->len == 1 ? memchr ((s), (b)->last_char, (m) + 1) \
: xlfdpat_block_match_1 (b, s, m))
/* Check if XLFD pattern PAT, which is generated by `xfldpat_create',
matches with STRING. STRING must be lowered in advance. */
static int
xlfdpat_match (pat, string)
struct xlfdpat *pat;
unsigned char *string;
{
int str_len, nblocks, i, start_max;
struct xlfdpat_block *blk;
unsigned char *s;
xassert (pat->nblocks > 0);
if (xlfdpat_exact_p (pat))
return strcmp (pat->buf, string) == 0;
/* The number of the characters in the string must not be smaller
than that in the pattern. */
str_len = strlen (string);
if (str_len < pat->nchars + pat->trailing_anychars)
return 0;
/* Chop off the trailing '?'s. */
str_len -= pat->trailing_anychars;
/* The last block. When it is non-empty, it must match at the end
of the string. */
nblocks = pat->nblocks;
blk = pat->blocks + (nblocks - 1);
if (nblocks == 1)
/* The last block is also the first one. */
return (str_len == blk->len
&& (blk->len == 0 || xlfdpat_block_match (blk, string, 0)));
else if (blk->len != 0)
if (!xlfdpat_block_match (blk, string + (str_len - blk->len), 0))
return 0;
/* The first block. When it is non-empty, it must match at the
beginning of the string. */
blk = pat->blocks;
if (blk->len != 0)
{
s = xlfdpat_block_match (blk, string, 0);
if (s == NULL)
return 0;
string = s + blk->len;
}
/* The rest of the blocks. */
start_max = str_len - pat->nchars;
for (i = 1, blk++; i < nblocks - 1; i++, blk++)
{
s = xlfdpat_block_match (blk, string, start_max);
if (s == NULL)
return 0;
start_max -= s - string;
string = s + blk->len;
}
return 1;
}
/*********************************************************************** /***********************************************************************
Fonts Fonts
@ -6198,7 +6527,8 @@ mac_to_x_fontname (name, size, style, charset)
{ {
Str31 foundry, cs; Str31 foundry, cs;
Str255 family; Str255 family;
char xf[256], *result, *p; char xf[256], *result;
unsigned char *p;
if (sscanf (name, "%31[^-]-%255[^-]-%31s", foundry, family, cs) == 3) if (sscanf (name, "%31[^-]-%255[^-]-%31s", foundry, family, cs) == 3)
charset = cs; charset = cs;
@ -6215,6 +6545,9 @@ mac_to_x_fontname (name, size, style, charset)
result = xmalloc (strlen (foundry) + strlen (family) + strlen (xf) + 3 + 1); result = xmalloc (strlen (foundry) + strlen (family) + strlen (xf) + 3 + 1);
sprintf (result, "-%s-%s-%s", foundry, family, xf); sprintf (result, "-%s-%s-%s", foundry, family, xf);
for (p = result; *p; p++) for (p = result; *p; p++)
/* On Mac OS X 10.3, tolower also converts non-ASCII characters
for some locales. */
if (isascii (*p))
*p = tolower (*p); *p = tolower (*p);
return result; return result;
} }
@ -6275,7 +6608,7 @@ x_font_name_to_mac_font_name (xf, mf, mf_decoded, style, cs)
{ {
setup_coding_system (coding_system, &coding); setup_coding_system (coding_system, &coding);
coding.src_multibyte = 1; coding.src_multibyte = 1;
coding.dst_multibyte = 1; coding.dst_multibyte = 0;
coding.mode |= CODING_MODE_LAST_BLOCK; coding.mode |= CODING_MODE_LAST_BLOCK;
encode_coding (&coding, mf_decoded, mf, encode_coding (&coding, mf_decoded, mf,
strlen (mf_decoded), sizeof (Str255) - 1); strlen (mf_decoded), sizeof (Str255) - 1);
@ -6290,13 +6623,13 @@ add_font_name_table_entry (char *font_name)
{ {
if (font_name_table_size == 0) if (font_name_table_size == 0)
{ {
font_name_table_size = 16; font_name_table_size = 256;
font_name_table = (char **) font_name_table = (char **)
xmalloc (font_name_table_size * sizeof (char *)); xmalloc (font_name_table_size * sizeof (char *));
} }
else if (font_name_count + 1 >= font_name_table_size) else if (font_name_count + 1 >= font_name_table_size)
{ {
font_name_table_size += 16; font_name_table_size *= 2;
font_name_table = (char **) font_name_table = (char **)
xrealloc (font_name_table, xrealloc (font_name_table,
font_name_table_size * sizeof (char *)); font_name_table_size * sizeof (char *));
@ -6520,40 +6853,17 @@ static int xlfd_scalable_fields[] =
-1 -1
}; };
static Lisp_Object
mac_c_string_match (regexp, string, nonspecial, exact)
Lisp_Object regexp;
const char *string, *nonspecial;
int exact;
{
if (exact)
{
if (strcmp (string, nonspecial) == 0)
return build_string (string);
}
else if (strstr (string, nonspecial))
{
Lisp_Object str = build_string (string);
if (fast_string_match (regexp, str) >= 0)
return str;
}
return Qnil;
}
static Lisp_Object static Lisp_Object
mac_do_list_fonts (pattern, maxnames) mac_do_list_fonts (pattern, maxnames)
char *pattern; char *pattern;
int maxnames; int maxnames;
{ {
int i, n_fonts = 0; int i, n_fonts = 0;
Lisp_Object font_list = Qnil, pattern_regex, fontname; Lisp_Object font_list = Qnil;
char *regex = (char *) alloca (strlen (pattern) * 2 + 3); struct xlfdpat *pat;
char *scaled, *ptr; char *scaled, *ptr;
int scl_val[XLFD_SCL_LAST], *field, *val; int scl_val[XLFD_SCL_LAST], *field, *val;
char *longest_start, *cur_start, *nonspecial; int exact;
int longest_len, exact;
if (font_name_table == NULL) /* Initialize when first used. */ if (font_name_table == NULL) /* Initialize when first used. */
init_font_name_table (); init_font_name_table ();
@ -6611,61 +6921,17 @@ mac_do_list_fonts (pattern, maxnames)
else else
scl_val[XLFD_SCL_PIXEL_SIZE] = -1; scl_val[XLFD_SCL_PIXEL_SIZE] = -1;
ptr = regex; pat = xlfdpat_create (pattern);
*ptr++ = '^'; if (pat == NULL)
return Qnil;
longest_start = cur_start = ptr; exact = xlfdpat_exact_p (pat);
longest_len = 0;
exact = 1;
/* Turn pattern into a regexp and do a regexp match. Also find the
longest substring containing no special characters. */
for (; *pattern; pattern++)
{
if (*pattern == '?' || *pattern == '*')
{
if (ptr - cur_start > longest_len)
{
longest_start = cur_start;
longest_len = ptr - cur_start;
}
exact = 0;
if (*pattern == '?')
*ptr++ = '.';
else /* if (*pattern == '*') */
{
*ptr++ = '.';
*ptr++ = '*';
}
cur_start = ptr;
}
else
*ptr++ = tolower (*pattern);
}
if (ptr - cur_start > longest_len)
{
longest_start = cur_start;
longest_len = ptr - cur_start;
}
*ptr = '$';
*(ptr + 1) = '\0';
nonspecial = xmalloc (longest_len + 1);
strncpy (nonspecial, longest_start, longest_len);
nonspecial[longest_len] = '\0';
pattern_regex = build_string (regex);
for (i = 0; i < font_name_count; i++) for (i = 0; i < font_name_count; i++)
{ {
fontname = mac_c_string_match (pattern_regex, font_name_table[i], if (xlfdpat_match (pat, font_name_table[i]))
nonspecial, exact);
if (!NILP (fontname))
{ {
font_list = Fcons (fontname, font_list); font_list = Fcons (build_string (font_name_table[i]), font_list);
if (exact || maxnames > 0 && ++n_fonts >= maxnames) if (exact || maxnames > 0 && ++n_fonts >= maxnames)
break; break;
} }
@ -6675,6 +6941,8 @@ mac_do_list_fonts (pattern, maxnames)
int former_len = ptr - font_name_table[i]; int former_len = ptr - font_name_table[i];
scaled = xmalloc (strlen (font_name_table[i]) + 20 + 1); scaled = xmalloc (strlen (font_name_table[i]) + 20 + 1);
if (scaled == NULL)
continue;
memcpy (scaled, font_name_table[i], former_len); memcpy (scaled, font_name_table[i], former_len);
sprintf (scaled + former_len, sprintf (scaled + former_len,
"-%d-%d-75-75-m-%d-%s", "-%d-%d-75-75-m-%d-%s",
@ -6682,19 +6950,20 @@ mac_do_list_fonts (pattern, maxnames)
scl_val[XLFD_SCL_POINT_SIZE], scl_val[XLFD_SCL_POINT_SIZE],
scl_val[XLFD_SCL_AVGWIDTH], scl_val[XLFD_SCL_AVGWIDTH],
ptr + sizeof ("-0-0-0-0-m-0-") - 1); ptr + sizeof ("-0-0-0-0-m-0-") - 1);
fontname = mac_c_string_match (pattern_regex, scaled,
nonspecial, exact); if (xlfdpat_match (pat, scaled))
xfree (scaled);
if (!NILP (fontname))
{ {
font_list = Fcons (fontname, font_list); font_list = Fcons (build_string (scaled), font_list);
xfree (scaled);
if (exact || maxnames > 0 && ++n_fonts >= maxnames) if (exact || maxnames > 0 && ++n_fonts >= maxnames)
break; break;
} }
else
xfree (scaled);
} }
} }
xfree (nonspecial); xlfdpat_destroy (pat);
return font_list; return font_list;
} }

View file

@ -47,7 +47,6 @@ extern void srandom P_ ((unsigned int));
#endif #endif
#include "blockinput.h" #include "blockinput.h"
#undef NULL
#ifdef MAC_OS8 #ifdef MAC_OS8
/* It is essential to include stdlib.h so that this file picks up /* It is essential to include stdlib.h so that this file picks up
@ -187,6 +186,7 @@ extern int quit_char;
#define _P_WAIT 0 #define _P_WAIT 0
int _CRTAPI1 _spawnlp (int, const char *, const char *, ...); int _CRTAPI1 _spawnlp (int, const char *, const char *, ...);
int _CRTAPI1 _getpid (void); int _CRTAPI1 _getpid (void);
extern char *getwd (char *);
#endif #endif
#ifdef NONSYSTEM_DIR_LIBRARY #ifdef NONSYSTEM_DIR_LIBRARY
@ -258,6 +258,81 @@ void hft_reset ();
SIGMASKTYPE sigprocmask_set; SIGMASKTYPE sigprocmask_set;
#ifndef HAVE_GET_CURRENT_DIR_NAME
/* Return the current working directory. Returns NULL on errors.
Any other returned value must be freed with free. This is used
only when get_current_dir_name is not defined on the system. */
char*
get_current_dir_name ()
{
char *buf;
char *pwd;
struct stat dotstat, pwdstat;
/* If PWD is accurate, use it instead of calling getwd. PWD is
sometimes a nicer name, and using it may avoid a fatal error if a
parent directory is searchable but not readable. */
if ((pwd = getenv ("PWD")) != 0
&& (IS_DIRECTORY_SEP (*pwd) || (*pwd && IS_DEVICE_SEP (pwd[1])))
&& stat (pwd, &pwdstat) == 0
&& stat (".", &dotstat) == 0
&& dotstat.st_ino == pwdstat.st_ino
&& dotstat.st_dev == pwdstat.st_dev
#ifdef MAXPATHLEN
&& strlen (pwd) < MAXPATHLEN
#endif
)
{
buf = (char *) malloc (strlen (pwd) + 1);
if (!buf)
return NULL;
strcpy (buf, pwd);
}
#ifdef HAVE_GETCWD
else
{
size_t buf_size = 1024;
buf = (char *) malloc (buf_size);
if (!buf)
return NULL;
for (;;)
{
if (getcwd (buf, buf_size) == buf)
break;
if (errno != ERANGE)
{
int tmp_errno = errno;
free (buf);
errno = tmp_errno;
return NULL;
}
buf_size *= 2;
buf = (char *) realloc (buf, buf_size);
if (!buf)
return NULL;
}
}
#else
else
{
/* We need MAXPATHLEN here. */
buf = (char *) malloc (MAXPATHLEN + 1);
if (!buf)
return NULL;
if (getwd (buf) == NULL)
{
int tmp_errno = errno;
free (buf);
errno = tmp_errno;
return NULL;
}
}
#endif
return buf;
}
#endif
/* Specify a different file descriptor for further input operations. */ /* Specify a different file descriptor for further input operations. */

View file

@ -5418,16 +5418,25 @@ x_bitmap_icon (f, icon)
struct frame *f; struct frame *f;
Lisp_Object icon; Lisp_Object icon;
{ {
HANDLE hicon; HANDLE main_icon;
HANDLE small_icon = NULL;
if (FRAME_W32_WINDOW (f) == 0) if (FRAME_W32_WINDOW (f) == 0)
return 1; return 1;
if (NILP (icon)) if (NILP (icon))
hicon = LoadIcon (hinst, EMACS_CLASS); main_icon = LoadIcon (hinst, EMACS_CLASS);
else if (STRINGP (icon)) else if (STRINGP (icon))
hicon = LoadImage (NULL, (LPCTSTR) SDATA (icon), IMAGE_ICON, 0, 0, {
/* Load the main icon from the named file. */
main_icon = LoadImage (NULL, (LPCTSTR) SDATA (icon), IMAGE_ICON, 0, 0,
LR_DEFAULTSIZE | LR_LOADFROMFILE); LR_DEFAULTSIZE | LR_LOADFROMFILE);
/* Try to load a small icon to go with it. */
small_icon = LoadImage (NULL, (LPCSTR) SDATA (icon), IMAGE_ICON,
GetSystemMetrics (SM_CXSMICON),
GetSystemMetrics (SM_CYSMICON),
LR_LOADFROMFILE);
}
else if (SYMBOLP (icon)) else if (SYMBOLP (icon))
{ {
LPCTSTR name; LPCTSTR name;
@ -5447,16 +5456,21 @@ x_bitmap_icon (f, icon)
else else
return 1; return 1;
hicon = LoadIcon (NULL, name); main_icon = LoadIcon (NULL, name);
} }
else else
return 1; return 1;
if (hicon == NULL) if (main_icon == NULL)
return 1; return 1;
PostMessage (FRAME_W32_WINDOW (f), WM_SETICON, (WPARAM) ICON_BIG, PostMessage (FRAME_W32_WINDOW (f), WM_SETICON, (WPARAM) ICON_BIG,
(LPARAM) hicon); (LPARAM) main_icon);
/* If there is a small icon that goes with it, set that too. */
if (small_icon)
PostMessage (FRAME_W32_WINDOW (f), WM_SETICON, (WPARAM) ICON_SMALL,
(LPARAM) small_icon);
return 0; return 0;
} }

View file

@ -3431,7 +3431,7 @@ handle_display_prop (it)
} }
else else
{ {
object = it->w->buffer; XSETWINDOW (object, it->w);
position = &it->current.pos; position = &it->current.pos;
} }
@ -3452,6 +3452,9 @@ handle_display_prop (it)
if (NILP (prop)) if (NILP (prop))
return HANDLED_NORMALLY; return HANDLED_NORMALLY;
if (!STRINGP (it->string))
object = it->w->buffer;
if (CONSP (prop) if (CONSP (prop)
/* Simple properties. */ /* Simple properties. */
&& !EQ (XCAR (prop), Qimage) && !EQ (XCAR (prop), Qimage)
@ -10718,13 +10721,9 @@ redisplay_internal (preserve_echo_area)
if (consider_all_windows_p) if (consider_all_windows_p)
{ {
Lisp_Object tail, frame; Lisp_Object tail, frame;
int i, n = 0, size = 5;
struct frame **updated;
FOR_EACH_FRAME (tail, frame) FOR_EACH_FRAME (tail, frame)
size++; XFRAME (frame)->updated_p = 0;
updated = (struct frame **) alloca (size * sizeof *updated);
/* Recompute # windows showing selected buffer. This will be /* Recompute # windows showing selected buffer. This will be
incremented each time such a window is displayed. */ incremented each time such a window is displayed. */
@ -10786,15 +10785,7 @@ redisplay_internal (preserve_echo_area)
break; break;
#endif #endif
if (n == size) f->updated_p = 1;
{
int nbytes = size * sizeof *updated;
struct frame **p = (struct frame **) alloca (2 * nbytes);
bcopy (updated, p, nbytes);
size *= 2;
}
updated[n++] = f;
} }
} }
} }
@ -10804,15 +10795,18 @@ redisplay_internal (preserve_echo_area)
/* Do the mark_window_display_accurate after all windows have /* Do the mark_window_display_accurate after all windows have
been redisplayed because this call resets flags in buffers been redisplayed because this call resets flags in buffers
which are needed for proper redisplay. */ which are needed for proper redisplay. */
for (i = 0; i < n; ++i) FOR_EACH_FRAME (tail, frame)
{
struct frame *f = XFRAME (frame);
if (f->updated_p)
{ {
struct frame *f = updated[i];
mark_window_display_accurate (f->root_window, 1); mark_window_display_accurate (f->root_window, 1);
if (frame_up_to_date_hook) if (frame_up_to_date_hook)
frame_up_to_date_hook (f); frame_up_to_date_hook (f);
} }
} }
} }
}
else if (FRAME_VISIBLE_P (sf) && !FRAME_OBSCURED_P (sf)) else if (FRAME_VISIBLE_P (sf) && !FRAME_OBSCURED_P (sf))
{ {
Lisp_Object mini_window; Lisp_Object mini_window;
@ -12925,12 +12919,11 @@ try_window (window, pos, check_margins)
if (check_margins if (check_margins
&& !MINI_WINDOW_P (w)) && !MINI_WINDOW_P (w))
{ {
int this_scroll_margin, cursor_height; int this_scroll_margin;
this_scroll_margin = max (0, scroll_margin); this_scroll_margin = max (0, scroll_margin);
this_scroll_margin = min (this_scroll_margin, WINDOW_TOTAL_LINES (w) / 4); this_scroll_margin = min (this_scroll_margin, WINDOW_TOTAL_LINES (w) / 4);
this_scroll_margin *= FRAME_LINE_HEIGHT (it.f); this_scroll_margin *= FRAME_LINE_HEIGHT (it.f);
cursor_height = MATRIX_ROW (w->desired_matrix, w->cursor.vpos)->height;
if ((w->cursor.y < this_scroll_margin if ((w->cursor.y < this_scroll_margin
&& CHARPOS (pos) > BEGV) && CHARPOS (pos) > BEGV)
@ -13181,7 +13174,7 @@ try_window_reusing_current_matrix (w)
/* Disable lines in the current matrix which are now /* Disable lines in the current matrix which are now
below the window. */ below the window. */
for (++row; row < bottom_row; ++row) for (++row; row < bottom_row; ++row)
row->enabled_p = 0; row->enabled_p = row->mode_line_p = 0;
} }
/* Update window_end_pos etc.; last_reused_text_row is the last /* Update window_end_pos etc.; last_reused_text_row is the last

View file

@ -835,6 +835,9 @@ xstrlwr (s)
unsigned char *p = s; unsigned char *p = s;
for (p = s; *p; ++p) for (p = s; *p; ++p)
/* On Mac OS X 10.3, tolower also converts non-ASCII characters
for some locales. */
if (isascii (*p))
*p = tolower (*p); *p = tolower (*p);
return s; return s;

View file

@ -52,11 +52,6 @@ Boston, MA 02110-1301, USA. */
#include "termopts.h" #include "termopts.h"
#include "xterm.h" #include "xterm.h"
#ifndef MAXPATHLEN
#define MAXPATHLEN 1024
#endif /* not MAXPATHLEN */
/* The user login name. */ /* The user login name. */
extern Lisp_Object Vuser_login_name; extern Lisp_Object Vuser_login_name;
@ -205,7 +200,7 @@ smc_save_yourself_CB (smcConn,
int val_idx = 0; int val_idx = 0;
int props_idx = 0; int props_idx = 0;
char cwd[MAXPATHLEN+1]; char *cwd = NULL;
char *smid_opt; char *smid_opt;
/* How to start a new instance of Emacs. */ /* How to start a new instance of Emacs. */
@ -259,12 +254,9 @@ smc_save_yourself_CB (smcConn,
props[props_idx]->vals[0].value = SDATA (Vuser_login_name); props[props_idx]->vals[0].value = SDATA (Vuser_login_name);
++props_idx; ++props_idx;
/* The current directory property, not mandatory. */ cwd = get_current_dir_name ();
#ifdef HAVE_GETCWD
if (getcwd (cwd, MAXPATHLEN+1) != 0) if (cwd)
#else
if (getwd (cwd) != 0)
#endif
{ {
props[props_idx] = &prop_ptr[props_idx]; props[props_idx] = &prop_ptr[props_idx];
props[props_idx]->name = SmCurrentDirectory; props[props_idx]->name = SmCurrentDirectory;
@ -281,6 +273,9 @@ smc_save_yourself_CB (smcConn,
xfree (smid_opt); xfree (smid_opt);
if (cwd)
free (cwd);
/* See if we maybe shall interact with the user. */ /* See if we maybe shall interact with the user. */
if (interactStyle != SmInteractStyleAny if (interactStyle != SmInteractStyleAny
|| ! shutdown || ! shutdown