diff options
Diffstat (limited to 'lisp')
36 files changed, 723 insertions, 323 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a0256150af9..b0e895a3707 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,187 @@ -2005-09-05 Chong Yidong <cyd@stupidchicken.com> +2005-09-11 Kim F. Storm <storm@cua.dk> + + * 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. - * custom.el (custom-push-theme): Fix last change. + * 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> @@ -11,8 +192,7 @@ (custom-push-theme): Save old values in the standard theme. (disable-theme): Correct typo. (custom-face-theme-value) Deleted unused function. - (custom-theme-recalc-face): Rewritten to treat enable/disable - properly. + (custom-theme-recalc-face): Rewritten to treat enable/disable properly. 2005-09-05 Stefan Monnier <monnier@iro.umontreal.ca> @@ -211,6 +391,16 @@ (tramp-advice-make-auto-save-file-name): Make defadvice only when `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> * textmodes/org.el (org-special-keyword): New face. @@ -762,7 +952,7 @@ 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-space-width): New option. (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-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> @@ -8631,18 +8821,16 @@ 2005-03-25 Werner Lemberg <wl@gnu.org> - * calc/calc-forms.el, calc/calc-sel: Replace `illegal' with `invalid'. - * midnight.el, vc-cvs.el: Replace `illegal' with `invalid'. - * emacs-lisp/cl-macs.el: Replace `illegal' with `invalid'. - * emulation/vip.el: Replace `illegal' with `invalid'. - * eshell/esh-io.el, eshell/esh-var.el: Replace `illegal' with - `invalid'. - * mail/supercite.el: Replace `illegal' with `invalid'. + * calc/calc-forms.el, calc/calc-sel.el: + * midnight.el, vc-cvs.el: + * emacs-lisp/cl-macs.el: + * emulation/vip.el: + * eshell/esh-io.el, eshell/esh-var.el: + * mail/supercite.el: * progmodes/ebnf-abn.el, progmodes/ebnf-bnf.el * progmodes/ebnf-ebx.el, progmodes/ebnf-dtd.el, progmodes/ebnf-iso.el * progmodes/ebnf-yac.el, progmodes/ebnf2ps.el, progmodes/idlwave.el * progmodes/sh-script.el, progmodes/xscheme.el: - Replace `illegal' with `invalid'. * textmodes/refbib.el, textmodes/refer.el, textmodes/reftex-cite.el * textmodes/reftex-index.el, textmodes/reftex-parse.el * textmodes/reftex-ref.el, textmodes/reftex-vars.el @@ -8807,7 +8995,7 @@ 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-restore-original-modes): New functions. (calc-do-embedded): Save original modes when entering embedded mode @@ -18626,7 +18814,7 @@ 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. * language/korean.el (cp949): Add alias. diff --git a/lisp/ChangeLog.9 b/lisp/ChangeLog.9 index a0688eefe37..6bd0b347c30 100644 --- a/lisp/ChangeLog.9 +++ b/lisp/ChangeLog.9 @@ -1127,7 +1127,7 @@ * 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 `t' branch of `cond', since Irix 6.1 and up is a special case of diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el index 9418eebe98f..4c45847df0f 100644 --- a/lisp/buff-menu.el +++ b/lisp/buff-menu.el @@ -633,35 +633,40 @@ For more information, see the function `buffer-menu'." (insert m2))) (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) (if (equal column Buffer-menu-sort-column) (setq column nil)) (propertize name - 'help-echo (if column - (if Buffer-menu-use-header-line - (concat "mouse-2: sort by " (downcase name)) - (concat "mouse-2, RET: sort by " - (downcase name))) - (if Buffer-menu-use-header-line - "mouse-2: sort by visited order" - "mouse-2, RET: sort by visited order")) + 'column column + 'help-echo (concat + (if Buffer-menu-use-header-line + "mouse-1, mouse-2: sort by " + "mouse-2, RET: sort by ") + (if column (downcase name) "visited order")) 'mouse-face 'highlight - 'keymap (let ((map (make-sparse-keymap))) - (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))) + 'keymap Buffer-menu-sort-button-map)) (defun list-buffers-noselect (&optional files-only buffer-list) "Create and return a buffer with a list of names of existing buffers. diff --git a/lisp/calc/calc-poly.el b/lisp/calc/calc-poly.el index 3dd19b6f67a..e27705de98a 100644 --- a/lisp/calc/calc-poly.el +++ b/lisp/calc/calc-poly.el @@ -1069,18 +1069,45 @@ (math-add-or-sub (list '/ (nth 1 (nth 1 expr)) (nth 2 expr)) (list '/ (nth 2 (nth 1 expr)) (nth 2 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) '^) (memq (car-safe (nth 1 expr)) '(+ -)) (integerp (nth 2 expr)) - (if (> (nth 2 expr) 0) - (or (and (or (> math-mt-many 500000) (< math-mt-many -500000)) - (math-expand-power (nth 1 expr) (nth 2 expr) - nil t)) - (list '* - (nth 1 expr) - (list '^ (nth 1 expr) (1- (nth 2 expr))))) - (if (< (nth 2 expr) 0) - (list '/ 1 (list '^ (nth 1 expr) (- (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) + (or (and (or (> math-mt-many 500000) (< math-mt-many -500000)) + (math-expand-power (nth 1 expr) (nth 2 expr) + nil t)) + (list '* + (nth 1 expr) + (list '^ (nth 1 expr) (1- (nth 2 expr))))) + (if (< (nth 2 expr) 0) + (list '/ 1 (list '^ (nth 1 expr) (- (nth 2 expr))))))))) (t expr))) (defun calcFunc-expand (expr &optional many) diff --git a/lisp/cus-start.el b/lisp/cus-start.el index 71565963e3d..87393e43ff7 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el @@ -369,9 +369,16 @@ since it could result in memory overflow and make Emacs crash." ((string-match "\\`w32-" (symbol-name symbol)) (eq system-type 'windows-nt)) ((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)) (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)))) (if (not (boundp symbol)) ;; If variables are removed from C code, give an error here! diff --git a/lisp/descr-text.el b/lisp/descr-text.el index 5ca9aa08093..cf6ac6ac4ad 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el @@ -108,7 +108,8 @@ into widget buttons that call `describe-text-category' or (while properties (push (list (pop properties) (pop properties)) 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)) (value (nth 1 elt))) (widget-insert (propertize (format " %-20s " key) diff --git a/lisp/disp-table.el b/lisp/disp-table.el index 87b3eb5057a..f7052013bae 100644 --- a/lisp/disp-table.el +++ b/lisp/disp-table.el @@ -220,8 +220,10 @@ for users who call this function in `.emacs'." (unless (or (memq window-system '(x w32))) (and (terminal-coding-system) (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 ;; unless some other has been specified. diff --git a/lisp/emacs-lisp/authors.el b/lisp/emacs-lisp/authors.el index ec5446eef38..437332baec9 100644 --- a/lisp/emacs-lisp/authors.el +++ b/lisp/emacs-lisp/authors.el @@ -78,6 +78,7 @@ files.") ("Jay K. Adams" "jka@ece.cmu.edu" "Jay Adams") ("J,Ai(Br,At(Bme Marant" "J,bi(Br,bt(Bme Marant" "Jerome Marant") ("Jens-Ulrik Holger Petersen" "Jens-Ulrik Petersen") + ("Johan Bockg,Ae(Brd" "Johan Bockgard") ("John W. Eaton" "John Eaton") ("Jonathan I. Kamens" "Jonathan Kamens") ("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" "mem-limits.h" "process.c" "template.h" "sysdep.c" "syssignal.h" "systty.h" "unexec.c" "ymakefile" "linux.h") - ("Kyle E. Jones" :wrote "mldrag.el") + ("Kyle Jones" :wrote "mldrag.el") ("Henry Kautz" :wrote "bib-mode.el") ("Joseph M. Kelsey" :changed "fileio.c" "vms-pwd.h" "vmsfns.c" "dir.h" "uaf.h") diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 38ea3aa029d..21e25ac8a54 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -846,9 +846,13 @@ happens, so the major mode can be corrected." (defcustom font-lock-support-mode 'jit-lock-mode "*Support mode for Font Lock mode. 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'), -Lazy Lock mode (symbol `lazy-lock-mode'), and Just-in-time Lock mode (symbol -`jit-lock-mode'. See those modes for more info. +occurs. The default support mode, Just-in-time Lock mode (symbol +`jit-lock-mode'), is recommended. + +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 a symbol, use that support mode. If a list, each element should be of the form (MAJOR-MODE . SUPPORT-MODE), diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 530758aefb0..96052e04c12 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -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> * message.el (message-tab-body-function): Fixed mismatched custom @@ -5,7 +39,7 @@ * gnus.el (gnus-group-change-level-function): Ditto. - * gnus-msg.el (gnus-outgoing-message-group): Ditto. + * gnus-msg.el (gnus-outgoing-message-group): Ditto. * gnus-art.el (gnus-signature-limit) (gnus-article-mime-part-function): Ditto. @@ -237,8 +271,6 @@ * gnus-util.el (gnus-beginning-of-window): Remove. (gnus-end-of-window): Remove. - * lpath.el: Don't bind scroll-margin. - 2005-07-25 Simon Josefsson <jas@extundo.com> * pgg.el (pgg-insert-url-with-w3): Don't load w3, it is possible diff --git a/lisp/gnus/ChangeLog.2 b/lisp/gnus/ChangeLog.2 index 5d7a608054e..f39bf525db8 100644 --- a/lisp/gnus/ChangeLog.2 +++ b/lisp/gnus/ChangeLog.2 @@ -7658,7 +7658,7 @@ * 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-reset): New function. (spam-stat-save): Interactive. @@ -12404,7 +12404,7 @@ 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> diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el index ea45a139ab0..47d1dfd7364 100644 --- a/lisp/gnus/gnus-agent.el +++ b/lisp/gnus/gnus-agent.el @@ -115,7 +115,7 @@ If nil, only read articles will be expired." :group 'gnus-agent :type 'function) -(defcustom gnus-agent-synchronize-flags nil +(defcustom gnus-agent-synchronize-flags t "Indicate if flags are synchronized when you plug in. If this is `ask' the hook will query the user." :version "21.1" diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index b07954772d2..3bdc93935bc 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -4862,7 +4862,14 @@ If displaying \"text/html\" is discouraged \(see (forward-line -1) (setq beg (point))) (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)))) ;; Do highlighting. (save-excursion diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el index 2d78ccab864..ac408aa179f 100644 --- a/lisp/gnus/mm-view.el +++ b/lisp/gnus/mm-view.el @@ -476,14 +476,16 @@ (buffer-disable-undo) (mm-insert-part handle) (require 'font-lock) - ;; Inhibit font-lock this time (*-mode-hook might run - ;; `turn-on-font-lock') so that jit-lock may not turn off - ;; font-lock immediately after this. - (let ((font-lock-mode t)) - (funcall mode)) - (let ((font-lock-verbose nil)) - ;; I find font-lock a bit too verbose. - (font-lock-fontify-buffer)) + (let ((font-lock-maximum-size nil) + ;; Disable support modes, e.g., jit-lock, lazy-lock, etc. + (font-lock-mode-hook nil) + (font-lock-support-mode nil) + ;; I find font-lock a bit too verbose. + (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 ;; properties. This code forces all the text properties ;; to be copied along with the text. diff --git a/lisp/gnus/mml-smime.el b/lisp/gnus/mml-smime.el index 25cb3094cbb..2933c14744a 100644 --- a/lisp/gnus/mml-smime.el +++ b/lisp/gnus/mml-smime.el @@ -29,8 +29,6 @@ (eval-when-compile (require 'cl)) -(defvar gnus-extract-address-components) - (require 'smime) (require 'mm-decode) (autoload 'message-narrow-to-headers "message") diff --git a/lisp/gnus/nnweb.el b/lisp/gnus/nnweb.el index 85c8d4c5239..d3737cd66fd 100644 --- a/lisp/gnus/nnweb.el +++ b/lisp/gnus/nnweb.el @@ -319,12 +319,22 @@ Valid types include `google', `dejanews', and `gmane'.") ;; We have Google's masked e-mail addresses here. :-/ (let ((case-fold-search t)) (goto-char (point-min)) - (delete-region (point-min) - (1+ (re-search-forward "^<pre>" nil t))) - (goto-char (point-min)) - (delete-region (- (re-search-forward "^</pre>" nil t) (length "</pre>")) - (point-max)) - (mm-url-decode-entities))) + (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) + (1+ (re-search-forward "^<pre>" nil t))) + (goto-char (point-min)) + (delete-region (- (re-search-forward "^</pre>" nil t) (length "</pre>")) + (point-max)) + (mm-url-decode-entities)))) (defun nnweb-google-parse-1 (&optional Message-ID) (let ((i 0) diff --git a/lisp/gnus/spam-report.el b/lisp/gnus/spam-report.el index 50a564885bb..173306ec55e 100644 --- a/lisp/gnus/spam-report.el +++ b/lisp/gnus/spam-report.el @@ -49,12 +49,6 @@ instead." (regexp :value "^nntp\+.*:gmane\.")) :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 "Whether the article number (faster!) or the header should be used." :type 'boolean @@ -103,19 +97,42 @@ undo that change.") article)) (with-current-buffer nntp-server-buffer (gnus-request-head article gnus-newsgroup-name) - (goto-char (point-min)) - (if (re-search-forward spam-report-gmane-spam-header nil t) - (let* ((host (match-string 1)) - (report (match-string 2)) - (url (format "http://%s%s" host report))) - (gnus-message 7 "Reporting spam through URL %s..." url) - (spam-report-url-ping host report)) - (gnus-message 3 "Could not find X-Report-Spam in article %d..." - article))))))) + (let ((case-fold-search t) + field host report url) + ;; First check for X-Report-Spam because it's more specific to + ;; spam reporting than Archived-At. OTOH, all new articles on + ;; 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) + (spam-report-url-ping host report)))))))) (defun spam-report-url-ping (host report) "Ping a host through HTTP, addressing a specific GET resource using 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)) (defun spam-report-url-ping-plain (host report) diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index b7ea845f8ae..4255788605f 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el @@ -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") (function-item smtpmail-send-it :tag "Use SMTPmail package") (function-item feedmail-send-it :tag "Use Feedmail package") + (function-item mailclient-send-it :tag "Use Mailclient package") function) :group 'sendmail) @@ -886,9 +887,9 @@ See also the function `select-message-coding-system'.") "Default coding system for encoding the outgoing mail. 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, -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. See also the function `select-message-coding-system'.") diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 302ede8c8ff..401513c3583 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -105,10 +105,8 @@ A large number or nil slows down menu responsiveness." (define-key menu-bar-file-menu [split-window] '(menu-item "Split Window" split-window-vertically - :enable (and (frame-live-p menu-updating-frame) - (frame-visible-p menu-updating-frame ) - (not (window-minibuffer-p - (frame-selected-window menu-updating-frame)))) + :enable (and (menu-bar-menu-frame-live-and-visible-p) + (menu-bar-non-minibuffer-window-p)) :help "Split selected window in two windows")) (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")) (define-key menu-bar-file-menu [ps-print-buffer] '(menu-item "Postscript Print Buffer (B+W)" ps-print-buffer - :enable (and (frame-live-p menu-updating-frame) - (frame-visible-p menu-updating-frame )) + :enable (menu-bar-menu-frame-live-and-visible-p) :help "Pretty-print current buffer in black and white to PostScript printer")) (define-key menu-bar-file-menu [ps-print-region-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")) (define-key menu-bar-file-menu [ps-print-buffer-faces] '(menu-item "Postscript Print Buffer" ps-print-buffer-with-faces - :enable (and (frame-live-p menu-updating-frame) - (frame-visible-p menu-updating-frame )) + :enable (menu-bar-menu-frame-live-and-visible-p) :help "Pretty-print current buffer to PostScript printer")) (define-key menu-bar-file-menu [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")) (define-key menu-bar-file-menu [print-buffer] '(menu-item "Print Buffer" print-buffer - :enable (and (frame-live-p menu-updating-frame) - (frame-visible-p menu-updating-frame )) + :enable (menu-bar-menu-frame-live-and-visible-p) :help "Print current buffer with page headings")) (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")) (define-key menu-bar-file-menu [write-file] '(menu-item "Save As..." write-file - :enable (and (frame-live-p menu-updating-frame) - (frame-visible-p menu-updating-frame ) - (not (window-minibuffer-p - (frame-selected-window menu-updating-frame)))) + :enable (and (menu-bar-menu-frame-live-and-visible-p) + (menu-bar-non-minibuffer-window-p)) :help "Write current buffer to another file")) (define-key menu-bar-file-menu [save-buffer] '(menu-item "Save" save-buffer :enable (and (buffer-modified-p) (buffer-file-name) - (not (window-minibuffer-p - (frame-selected-window menu-updating-frame)))) + (menu-bar-non-minibuffer-window-p)) :help "Save current buffer to its file")) (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")) (define-key menu-bar-file-menu [insert-file] '(menu-item "Insert File..." insert-file - :enable (not (window-minibuffer-p - (frame-selected-window menu-updating-frame))) + :enable (menu-bar-non-minibuffer-window-p) :help "Insert another file into current buffer")) (define-key menu-bar-file-menu [dired] '(menu-item "Open Directory..." dired - :enable (not (window-minibuffer-p - (frame-selected-window menu-updating-frame))) + :enable (menu-bar-non-minibuffer-window-p) :help "Read a directory, operate on its files")) (define-key menu-bar-file-menu [open-file] '(menu-item "Open File..." find-file-existing - :enable (not (window-minibuffer-p - (frame-selected-window menu-updating-frame))) + :enable (menu-bar-non-minibuffer-window-p) :help "Read an existing file into an Emacs buffer")) (define-key menu-bar-file-menu [new-file] '(menu-item "Visit New File..." find-file - :enable (not (window-minibuffer-p - (frame-selected-window menu-updating-frame))) + :enable (menu-bar-non-minibuffer-window-p) :help "Read or create a file and edit it")) @@ -1043,8 +1031,7 @@ mail status in mode line")) toggle-truncate-lines :help "Truncate long lines on the screen" :button (:toggle . truncate-lines) - :enable (and (frame-live-p menu-updating-frame) - (frame-visible-p menu-updating-frame)))) + :enable (menu-bar-menu-frame-live-and-visible-p))) (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 :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 "Kill the current buffer." (interactive) @@ -1437,11 +1441,10 @@ key, a click, or a menu-item")) (or (string-match "^ " (buffer-name (car buffers))) (setq count (1+ count))) (setq buffers (cdr buffers))) - (and (not (window-minibuffer-p (frame-selected-window menu-updating-frame))) + (and (menu-bar-non-minibuffer-window-p) (> count 1)))) -(put 'dired 'menu-enable - '(not (window-minibuffer-p (frame-selected-window menu-updating-frame)))) +(put 'dired 'menu-enable '(menu-bar-non-minibuffer-window-p)) ;; Permit deleting frame if it would leave a visible or iconified frame. (defun delete-frame-enabled-p () diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index 82bedd7c2a6..28cc6c2a6d0 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog @@ -43,7 +43,7 @@ (mh-show-from-face, mh-show-xface-face, mh-speedbar-folder-face) (mh-speedbar-selected-folder-face) (mh-speedbar-folder-with-unseen-messages-face) - (mh-speedbar-selected-folder-with-unseen-messages-face): + (mh-speedbar-selected-folder-with-unseen-messages-face): New backward-compatibility aliases for renamed faces. (mh-folder-body-face, mh-folder-cur-msg-face) (mh-folder-cur-msg-number-face, mh-folder-date-face) @@ -56,7 +56,7 @@ (mh-show-pgg-unknown-face, mh-show-pgg-bad-face) (mh-show-to-face, mh-show-from-face, mh-show-subject-face) (mh-speedbar-folder-with-unseen-messages) - (mh-speedbar-selected-folder-with-unseen-messages): + (mh-speedbar-selected-folder-with-unseen-messages): Use renamed MH-E faces. * mh-utils.el (mh-letter-font-lock-keywords) @@ -900,7 +900,7 @@ * 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-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 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 additional rationale in mh-e.el description below). @@ -9210,7 +9210,7 @@ 2002-08-19 Peter S Galbraith <psg@debian.org> * 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 that won't prompt for "from", "to" and "all". * 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 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. 2001-12-11 Jeffrey C Honig <jch@honig.net> diff --git a/lisp/mouse.el b/lisp/mouse.el index c928e04f8ed..1970fbf1eeb 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -538,11 +538,10 @@ resized by dragging their header-line." (window (posn-window start)) (frame (window-frame window)) (first-window (frame-first-window frame))) - (when (or (eq window first-window) - (= (nth 1 (window-edges 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))) + (unless (or (eq window first-window) + (= (nth 1 (window-edges window)) + (nth 1 (window-edges first-window)))) + (mouse-drag-mode-line-1 start-event nil)))) (defun mouse-drag-vertical-line (start-event) diff --git a/lisp/msb.el b/lisp/msb.el index 8fa63d98051..94a1599371f 100644 --- a/lisp/msb.el +++ b/lisp/msb.el @@ -185,7 +185,7 @@ "Elisp Files (%d)") ((eq major-mode 'latex-mode) 3030 - "LaTex Files (%d)") + "LaTeX Files (%d)") ('no-multi 3099 "Other files (%d)"))) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index e721f3fb016..b8b3fb9068a 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -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) "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-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) "Query the user for a password." - (tramp-message 9 "Sending password") - (tramp-enter-password p (match-string 0) user host)) + (let ((pw-prompt + (format "Password for %s " + (tramp-make-tramp-file-name + nil method user host "")))) + (tramp-message 9 "Sending password") + (tramp-enter-password p pw-prompt user host))) (defun tramp-multi-action-succeed (p method user host) "Signal success in finding shell prompt." diff --git a/lisp/progmodes/delphi.el b/lisp/progmodes/delphi.el index 0c94120a0f8..85f7e1339f3 100644 --- a/lisp/progmodes/delphi.el +++ b/lisp/progmodes/delphi.el @@ -4,6 +4,7 @@ ;; Free Software Foundation, Inc. ;; Author: Ray Blaak <blaak@infomatch.com> +;; Maintainer: FSF (Blaak's email addr bounces, Aug 2005) ;; Keywords: languages ;; This file is part of GNU Emacs. diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index d137284f795..e5089d84fb0 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -960,8 +960,7 @@ Convert it to flymake internal format." (setq converted-list (cons (list regexp file line col) 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 (append diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el index b8336691307..11ae1c66aa7 100644 --- a/lisp/progmodes/make-mode.el +++ b/lisp/progmodes/make-mode.el @@ -1833,6 +1833,10 @@ If it isn't in one, return nil." ;; Don't keep looking across a blank line or comment. (looking-at "$\\|#") (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))) (provide 'make-mode) diff --git a/lisp/progmodes/octave-inf.el b/lisp/progmodes/octave-inf.el index 917016cf159..4f0875bbf99 100644 --- a/lisp/progmodes/octave-inf.el +++ b/lisp/progmodes/octave-inf.el @@ -248,7 +248,11 @@ startup file, `~/.emacs-octave'." ;; And finally, everything is back to normal. (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 () diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index 25a414e69d2..cb2ec81f501 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -267,12 +267,12 @@ The expansion is entirely correct because it uses the C preprocessor." ("\\<sub\\s-+\\S-+\\s-*(\\([^)]+\\))" 1 '(1)) ;; regexp and funny quotes ("[?:.,;=!~({[][ \t\n]*\\(/\\)" (1 '(7))) - ("[?:.,;=!~({[ \t\n]\\([msy]\\|q[qxrw]?\\|tr\\)\\>\\s-*\\([^])}> \n\t]\\)" + ("\\(^\\|[?:.,;=!~({[ \t]\\)\\([msy]\\|q[qxrw]?\\|tr\\)\\>\\s-*\\([^])}> \n\t]\\)" ;; Nasty cases: ;; /foo/m $a->m $#m $m @m %m ;; \s (appears often in regexps). ;; -s file - (2 (if (assoc (char-after (match-beginning 2)) + (3 (if (assoc (char-after (match-beginning 3)) perl-quote-like-pairs) '(15) '(7)))) ;; TODO: here-documents ("<<\\(\\sw\\|['\"]\\)") diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index d39cc4b7281..663332fb8c6 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -490,7 +490,10 @@ This is buffer-local in every such buffer.") map) "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 '(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 'imenu-generic-expression) (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 () (or (eolp) (newline) (indent-relative))) paragraph-start (concat page-delimiter "\\|$") diff --git a/lisp/recentf.el b/lisp/recentf.el index 524d00d389d..20251508941 100644 --- a/lisp/recentf.el +++ b/lisp/recentf.el @@ -5,7 +5,6 @@ ;; Author: David Ponce <david@dponce.com> ;; Created: July 19 1999 -;; Maintainer: FSF ;; Keywords: files ;; 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." :group 'recentf :type '(choice (const :tag "None" nil) + (const abbreviate-file-name) 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 ;; @@ -349,7 +357,7 @@ filenames." "Convert filename NAME to absolute, and canonicalize it. See also the function `expand-file-name'. If defined, call the function `recentf-filename-handler' -to postprocess the canonical name." +to post process the canonical name." (let* ((filename (expand-file-name name))) (or (and recentf-filename-handler (funcall recentf-filename-handler filename)) @@ -926,6 +934,9 @@ Go to the beginning of buffer if not found." (set-keymap-parent km widget-keymap) (define-key km "q" 'recentf-cancel-dialog) (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) "Keymap used in recentf dialogs.") @@ -1063,6 +1074,18 @@ IGNORE other arguments." (kill-buffer (current-buffer)) (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) "Return a widget to display MENU-ELEMENT in a dialog buffer." (if (consp (cdr menu-element)) @@ -1085,6 +1108,26 @@ IGNORE other arguments." :action recentf-open-files-action ,(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) "Show a dialog to open a recent file. 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'*\"." (interactive) (recentf-dialog (or buffer-name (format "*%s*" recentf-menu-title)) - (widget-insert "Click on a file to open it. -Click on Cancel or type `q' to cancel.\n" ) + (widget-insert "Click on a file" + (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. (tree-widget-set-theme "folder") (apply 'widget-create `(group :indent 2 :format "\n%v\n" - ,@(mapcar 'recentf-open-files-item - (recentf-apply-menu-filter - recentf-menu-filter - (mapcar 'recentf-make-default-menu-element - (or files recentf-list)))))) + ,@(recentf-open-files-items (or files recentf-list)))) (widget-create 'push-button :notify 'recentf-cancel-dialog "Cancel") (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 () "Show a dialog to open a recent file that is not in the menu." (interactive) diff --git a/lisp/simple.el b/lisp/simple.el index 746c670b086..20973e9e699 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -4227,88 +4227,90 @@ If nil, search stops at the beginning of the accessible portion of the buffer." (defun blink-matching-open () "Move cursor momentarily to the beginning of the sexp before point." (interactive) - (and (> (point) (1+ (point-min))) - blink-matching-paren - ;; Verify an even number of quoting characters precede the close. - (= 1 (logand 1 (- (point) - (save-excursion - (forward-char -1) - (skip-syntax-backward "/\\") - (point))))) - (let* ((oldpos (point)) - (blinkpos) - (mismatch) - matching-paren) - (save-excursion - (save-restriction - (if blink-matching-paren-distance - (narrow-to-region (max (point-min) - (- (point) blink-matching-paren-distance)) - oldpos)) - (condition-case () - (let ((parse-sexp-ignore-comments - (and parse-sexp-ignore-comments - (not blink-matching-paren-dont-ignore-comments)))) - (setq blinkpos (scan-sexps oldpos -1))) - (error nil))) - (and blinkpos - ;; Not syntax '$'. - (not (eq (syntax-class (syntax-after blinkpos)) 8)) - (setq matching-paren - (let ((syntax (syntax-after blinkpos))) - (and (consp syntax) - (eq (syntax-class syntax) 4) - (cdr syntax))) - mismatch - (or (null matching-paren) - (/= (char-after (1- oldpos)) - matching-paren)))) - (if mismatch (setq blinkpos nil)) - (if blinkpos - ;; Don't log messages about paren matching. - (let (message-log-max) - (goto-char blinkpos) - (if (pos-visible-in-window-p) - (and blink-matching-paren-on-screen - (sit-for blink-matching-delay)) - (goto-char blinkpos) - (message - "Matches %s" - ;; Show what precedes the open in its line, if anything. - (if (save-excursion - (skip-chars-backward " \t") - (not (bolp))) - (buffer-substring (progn (beginning-of-line) (point)) - (1+ blinkpos)) - ;; Show what follows the open in its line, if anything. - (if (save-excursion - (forward-char 1) - (skip-chars-forward " \t") - (not (eolp))) - (buffer-substring blinkpos - (progn (end-of-line) (point))) - ;; Otherwise show the previous nonblank line, - ;; if there is one. - (if (save-excursion - (skip-chars-backward "\n \t") - (not (bobp))) - (concat - (buffer-substring (progn + (when (and (> (point) (1+ (point-min))) + blink-matching-paren + ;; Verify an even number of quoting characters precede the close. + (= 1 (logand 1 (- (point) + (save-excursion + (forward-char -1) + (skip-syntax-backward "/\\") + (point)))))) + (let* ((oldpos (point)) + blinkpos + message-log-max ; Don't log messages about paren matching. + matching-paren + open-paren-line-string) + (save-excursion + (save-restriction + (if blink-matching-paren-distance + (narrow-to-region (max (point-min) + (- (point) blink-matching-paren-distance)) + oldpos)) + (condition-case () + (let ((parse-sexp-ignore-comments + (and parse-sexp-ignore-comments + (not blink-matching-paren-dont-ignore-comments)))) + (setq blinkpos (scan-sexps oldpos -1))) + (error nil))) + (and blinkpos + ;; Not syntax '$'. + (not (eq (syntax-class (syntax-after blinkpos)) 8)) + (setq matching-paren + (let ((syntax (syntax-after blinkpos))) + (and (consp syntax) + (eq (syntax-class syntax) 4) + (cdr syntax))))) + (cond + ((or (null matching-paren) + (/= (char-before oldpos) + matching-paren)) + (message "Mismatched parentheses")) + ((not blinkpos) + (if (not blink-matching-paren-distance) + (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) + (sit-for blink-matching-delay)))) + (t + (save-excursion + (goto-char blinkpos) + (setq open-paren-line-string + ;; Show what precedes the open in its line, if anything. + (if (save-excursion + (skip-chars-backward " \t") + (not (bolp))) + (buffer-substring (line-beginning-position) + (1+ blinkpos)) + ;; Show what follows the open in its line, if anything. + (if (save-excursion + (forward-char 1) + (skip-chars-forward " \t") + (not (eolp))) + (buffer-substring blinkpos + (line-end-position)) + ;; Otherwise show the previous nonblank line, + ;; if there is one. + (if (save-excursion + (skip-chars-backward "\n \t") + (not (bobp))) + (concat + (buffer-substring (progn (skip-chars-backward "\n \t") - (beginning-of-line) - (point)) - (progn (end-of-line) - (skip-chars-backward " \t") - (point))) - ;; Replace the newline and other whitespace with `...'. - "..." - (buffer-substring blinkpos (1+ blinkpos))) - ;; There is nothing to show except the char itself. - (buffer-substring blinkpos (1+ blinkpos)))))))) - (cond (mismatch - (message "Mismatched parentheses")) - ((not blink-matching-paren-distance) - (message "Unmatched parenthesis")))))))) + (line-beginning-position)) + (progn (end-of-line) + (skip-chars-backward " \t") + (point))) + ;; Replace the newline and other whitespace with `...'. + "..." + (buffer-substring blinkpos (1+ blinkpos))) + ;; There is nothing to show except the char itself. + (buffer-substring blinkpos (1+ blinkpos))))))) + (message "Matches %s" + (substring-no-properties open-paren-line-string)))))))) ;Turned off because it makes dbx bomb out. (setq blink-paren-function 'blink-matching-open) diff --git a/lisp/smerge-mode.el b/lisp/smerge-mode.el index 4b677edc36a..31c7c4f2f12 100644 --- a/lisp/smerge-mode.el +++ b/lisp/smerge-mode.el @@ -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." (interactive) (smerge-match-conflict) - (smerge-remove-props) + (smerge-remove-props (match-beginning 0) (match-end 0)) (cond ;; Trivial diff3 -A non-conflicts. ((and (eq (match-end 1) (match-end 3)) diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index d8b6b6e23de..e1805f0e87d 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -814,7 +814,10 @@ Otherwise returns the library directory name, if that is defined." (goto-char (point-min)) (let (case-fold-search) (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))) result)) diff --git a/lisp/textmodes/page.el b/lisp/textmodes/page.el index ffb4c89f2db..3ec1eca1fb7 100644 --- a/lisp/textmodes/page.el +++ b/lisp/textmodes/page.el @@ -112,7 +112,7 @@ thus showing a page other than the one point was originally in." (save-excursion (goto-char (match-beginning 0)) ; was (beginning-of-line) (looking-at page-delimiter))) - (beginning-of-line)) + (goto-char (match-beginning 0))) ; was (beginning-of-line) (narrow-to-region (point) (progn ;; Find the top of the page. diff --git a/lisp/vc.el b/lisp/vc.el index a0b6ffa0ad8..8e87cb50eb4 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -2259,6 +2259,8 @@ With prefix arg READ-SWITCHES, specify a value to override (interactive "DDired under VC (directory): \nP") (let ((vc-dired-switches (concat vc-dired-listing-switches (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 (setq vc-dired-switches (read-string "Dired listing switches: " @@ -2809,6 +2811,9 @@ log entries should be gathered." ;; it should find all relevant files relative to ;; the default-directory. 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) 'update-changelog args)) diff --git a/lisp/woman.el b/lisp/woman.el index 5ecc4744305..9b7bce889b3 100644 --- a/lisp/woman.el +++ b/lisp/woman.el @@ -3,7 +3,7 @@ ;; Copyright (C) 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; 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 ;; Adapted-By: Eli Zaretskii <eliz@gnu.org> ;; Version: see `woman-version' @@ -136,27 +136,23 @@ ;; 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 current buffer as a suggestion for the topic to look up. The -;; topic must be confirmed or edited in the minibuffer. This -;; suggestion can be turned off, or `woman' can use the suggested -;; topic without confirmation* if possible, by setting the user-option -;; `woman-topic-at-point' to nil or t respectively. (Its default -;; value is neither nil nor t, meaning ask for confirmation.) +;; The `woman' command uses the word nearest to point in the current +;; buffer as the default topic to look up if it matches the name of a +;; manual page installed on the system. The default topic can also be +;; used without confirmation by setting the user-option +;; `woman-use-topic-at-point' to t; thanks to Benjamin Riefenstahl for +;; suggesting this functionality. -;; [* Thanks to Benjamin Riefenstahl for suggesting this -;; functionality.] - -;; The variable `woman-topic-at-point' can be rebound locally, which -;; may be useful to provide special private key bindings, e.g. +;; The variable `woman-use-topic-at-point' can be rebound locally, +;; which may be useful to provide special private key bindings, e.g. ;; (global-set-key "\C-cw" ;; (lambda () ;; (interactive) -;; (let ((woman-topic-at-point t)) +;; (let ((woman-use-topic-at-point t)) ;; (woman))))) @@ -420,10 +416,7 @@ ;; Paul A. Thompson <pat@po.cwru.edu> ;; Arrigo Triulzi <arrigo@maths.qmw.ac.uk> ;; Geoff Voelker <voelker@cs.washington.edu> -;; Eli Zaretskii <eliz@is.elta.co.il> - -;;; History: -;; For recent change log see end of file. +;; Eli Zaretskii <eliz@gnu.org> ;;; Code: @@ -714,26 +707,21 @@ Default is \"CONTENTS\"." :type 'string :group 'woman-interface) -(defcustom woman-topic-at-point-default 'confirm - ;; `woman-topic-at-point' may be let-bound when woman is loaded, in - ;; which case its global value does not get defined. +(defcustom woman-use-topic-at-point-default nil + ;; `woman-use-topic-at-point' may be let-bound when woman is loaded, + ;; in which case its global value does not get defined. ;; `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) - (const :tag "No" nil) - (other :tag "Confirm" confirm)) + (const :tag "No" nil)) :group 'woman-interface) -(defcustom woman-topic-at-point woman-topic-at-point-default - "*Controls use by `woman' of `word at point' as a topic suggestion. -If non-nil then the `woman' command uses the word at point as an -initial topic suggestion when it reads a topic from the minibuffer; if -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." +(defcustom woman-use-topic-at-point woman-use-topic-at-point-default + "*Control use of the word at point as the default topic. +If non-nil the `woman' command uses the word at point automatically, +without interactive confirmation, if it exists as a topic." :type '(choice (const :tag "Yes" t) - (const :tag "No" nil) - (other :tag "Confirm" confirm)) + (const :tag "No" nil)) :group 'woman-interface) (defvar woman-file-regexp nil @@ -956,8 +944,9 @@ This is usually either black or white." :group 'woman-faces) (defcustom woman-use-symbol-font nil - "*If non-nil then may use the symbol font. It is off by default, -mainly because it may change the line spacing (in NTEmacs 20.5)." + "*If non-nil then may use the symbol font. +It is off by default, mainly because it may change the line spacing +\(in NTEmacs 20.5)." :type 'boolean :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) "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 -the topic or initial topic suggestion, subject to the value of the -user option `woman-topic-at-point'. Return nil if no file can be found. -Optional argument RE-CACHE, if non-nil, forces the cache to be re-read." +When `woman' is called interactively, the word at point may be +automatically used as the topic, if the value of the user option +`woman-use-topic-at-point' is non-nil. Return nil if no file can +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: (if (and (not re-cache) (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 ;; does not seem to work properly by default, so I re-do the ;; completion if necessary. - (let (files) + (let (files + (default (current-word))) (or (stringp topic) - (and (eq t - (if (boundp 'woman-topic-at-point) - woman-topic-at-point - ;; Was let-bound when file loaded, so ... - (setq woman-topic-at-point woman-topic-at-point-default))) - (setq topic - (or (current-word t) "")) ; only within or adjacent to word - (assoc topic woman-topic-all-completions)) + (and (if (boundp 'woman-use-topic-at-point) + woman-use-topic-at-point + ;; Was let-bound when file loaded, so ... + (setq woman-use-topic-at-point woman-use-topic-at-point-default)) + (setq topic (or (current-word t) "")) ; only within or adjacent to word + (test-completion topic woman-topic-all-completions)) (setq topic - (completing-read - "Manual entry: " - woman-topic-all-completions nil 1 - ;; Initial input suggestion (was nil), with - ;; cursor at left ready to kill suggestion!: - (and woman-topic-at-point - (cons (or (current-word) "") 0)) ; nearest word - 'woman-topic-history))) + (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 + (if default + (format "Manual entry [default: %s]: " default) + "Manual entry: ") + woman-topic-all-completions nil 1 + nil + 'woman-topic-history + default)))) ;; Note that completing-read always returns a string. (if (= (length topic) 0) nil ; no topic, so no file! @@ -1259,10 +1254,9 @@ Optional argument RE-CACHE, if non-nil, forces the cache to be re-read." ;; Unread the command event (TAB = ?\t = 9) that runs the command ;; `minibuffer-complete' in order to automatically complete the ;; 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 - (try-completion "" files) 'woman-file-history))) - ))) + (try-completion "" files) 'woman-file-history)))))) (defun woman-select (predicate 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 "\en" 'WoMan-next-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) "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 "Used to record formatting time used by the `man' command.") -(defadvice Man-getpage-in-background - (around Man-getpage-in-background-advice (topic) activate) - "Use WoMan unless invoked outside a WoMan buffer or invoked explicitly. -Otherwise use Man and record start of formatting time." - (if (and (eq major-mode 'woman-mode) - (not (eq (caar command-history) 'man))) - (WoMan-getpage-in-background topic) - ;; 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))) +;; Both advices are disabled because "a file in Emacs should not put +;; advice on a function in Emacs" (see Info node "(elisp)Advising +;; Functions"). Counting the formatting time is useful for +;; developping, but less applicable for daily use. The advice for +;; `Man-getpage-in-background' can be discarded, because the +;; key-binding in `woman-mode-map' has been remapped to call `woman' +;; but `man'. Michael Albinus <michael.albinus@gmx.de> + +;; (defadvice Man-getpage-in-background +;; (around Man-getpage-in-background-advice (topic) activate) +;; "Use WoMan unless invoked outside a WoMan buffer or invoked explicitly. +;; Otherwise use Man and record start of formatting time." +;; (if (and (eq major-mode 'woman-mode) +;; (not (eq (caar command-history) 'man))) +;; (WoMan-getpage-in-background topic) +;; ;; 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: |