From 9f685258681faec407791bd4b93af7cd46b04ba1 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 09:32:15 +0000 Subject: [PATCH 001/294] (Frun_hooks): Mention run-mode-hooks in docstring. --- src/eval.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/eval.c b/src/eval.c index 7f043daa555..8bb201c5df5 100644 --- a/src/eval.c +++ b/src/eval.c @@ -2292,7 +2292,7 @@ static Lisp_Object run_hook_with_args P_ ((int, Lisp_Object *, enum run_hooks_condition)); DEFUN ("run-hooks", Frun_hooks, Srun_hooks, 0, MANY, 0, - doc: /* Run each hook in HOOKS. Major mode functions use this. + doc: /* Run each hook in HOOKS. Each argument should be a symbol, a hook variable. These symbols are processed in the order specified. If a hook symbol has a non-nil value, that value may be a function @@ -2300,6 +2300,9 @@ or a list of functions to be called to run the hook. If the value is a function, it is called with no arguments. If it is a list, the elements are called, in order, with no arguments. +Major modes should not use this function directly to run their mode +hook; they should use `run-mode-hooks' instead. + Do not use `make-local-variable' to make a hook variable buffer-local. Instead, use `add-hook' and specify t for the LOCAL argument. usage: (run-hooks &rest HOOKS) */) From b1149f514c6064b9fe2fc4ef6e8ca55397164a08 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 09:43:46 +0000 Subject: [PATCH 002/294] (delay-mode-hooks): Specify indentation. --- lisp/subr.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/subr.el b/lisp/subr.el index 41116c2839c..63951b92bb2 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1853,7 +1853,7 @@ Major mode functions should use this." These hooks will be executed by the first following call to `run-mode-hooks' that occurs outside any `delayed-mode-hooks' form. Only affects hooks run in the current buffer." - (declare (debug t)) + (declare (debug t) (indent 0)) `(progn (make-local-variable 'delay-mode-hooks) (let ((delay-mode-hooks t)) From 59244a3fff256f437a62b99b34a7fd1269f5157b Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 09:44:35 +0000 Subject: [PATCH 003/294] *** empty log message *** --- lisp/ChangeLog | 4 ++++ src/ChangeLog | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4ccd0626318..e25c4b86308 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2005-05-25 Lute Kamstra + + * subr.el (delay-mode-hooks): Specify indentation. + 2005-05-26 Nick Roberts * log-edit.el (log-edit-changelog-entries): Distinguish between diff --git a/src/ChangeLog b/src/ChangeLog index 4fc3ad1f8f7..5ae649cb301 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2005-05-26 Lute Kamstra + + * eval.c (Frun_hooks): Mention run-mode-hooks in docstring. + 2005-05-24 Masatake YAMATO * xdisp.c (note_mode_line_or_margin_highlight): Use b and e From 094f65d4a428f5b07612326ee28d5598fe213ff3 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Thu, 26 May 2005 10:31:20 +0000 Subject: [PATCH 004/294] (org-mode): Use `define-derived-mode' to define `org-mode'. (org-agenda-mode): Use `run-mode-hooks' instead of `run-hooks'. --- lisp/textmodes/org.el | 46 +++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el index bd81f97138c..bbc59768aaf 100644 --- a/lisp/textmodes/org.el +++ b/lisp/textmodes/org.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar ;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/ -;; Version: 3.09 +;; Version: 3.10 ;; ;; This file is part of GNU Emacs. ;; @@ -80,6 +80,9 @@ ;; ;; Changes: ;; ------- +;; Version 3.10 +;; - Using `define-derived-mode' to derive `org-mode' from `outline-mode'. +;; ;; Version 3.09 ;; - Time-of-day specifications in agenda are extracted and placed ;; into the prefix. Timed entries can be placed into a time grid for @@ -151,10 +154,12 @@ (require 'outline) (require 'time-date) (require 'easymenu) +(or (fboundp 'run-mode-hooks) + (defalias 'run-mode-hooks 'run-hooks)) ;;; Customization variables -(defvar org-version "3.09" +(defvar org-version "3.10" "The version number of the file org.el.") (defun org-version () (interactive) @@ -372,7 +377,11 @@ Such files should use a file variable to set it, for example -*- mode: org; org-category: \"ELisp\" -If the file does not specify a category, the file's base name +or contain a special line + +#+CATEGORY: ELisp + +If the file does not specify a category, then file's base name is used instead.") (defun org-set-regexps-and-options () @@ -1525,7 +1534,7 @@ sets it back to nil.") ;;;###autoload -(defun org-mode (&optional arg) +(define-derived-mode org-mode outline-mode "Org" "Outline-based notes management and organizer, alias \"Carstens outline-mode for keeping track of everything.\" @@ -1538,16 +1547,11 @@ calendar. Tables are easily created with a built-in table editor. Plain text URL-like links connect to websites, emails (VM), Usenet messages (Gnus), BBDB entries, and any files related to the project. For printing and sharing of notes, an Org-mode file (or a part of it) -can be exported as a well-structured ASCII or HTML file. +can be exported as a structured ASCII or HTML file. The following commands are available: \\{org-mode-map}" - (interactive "P") - (outline-mode) - (setq major-mode 'org-mode) - (setq mode-name "Org") - (use-local-map org-mode-map) (easy-menu-add org-org-menu) (org-install-agenda-files-menu) (setq outline-regexp "\\*+") @@ -1569,15 +1573,10 @@ The following commands are available: (if org-enable-table-editor "|" "") (if org-enable-fixed-width-editor ":" "") "]")))) - ;; Hook, and startup actions - (if (or arg - (and org-insert-mode-line-in-empty-file - (interactive-p) - (= (point-min) (point-max)))) - (save-excursion - (goto-char (point-min)) - (insert " -*- mode: org -*-\n\n"))) - (run-hooks 'org-mode-hook) + (if (and org-insert-mode-line-in-empty-file + (interactive-p) + (= (point-min) (point-max))) + (insert " -*- mode: org -*-\n\n")) (unless org-inhibit-startup (if org-startup-with-deadline-check (call-interactively 'org-check-deadlines) @@ -1641,7 +1640,6 @@ The following commands are available: 'keymap org-mouse-map)) t))) - (defun org-font-lock-level () (save-excursion (org-back-to-heading t) @@ -3120,7 +3118,7 @@ The following commands are available: "--") (mapcar 'org-file-menu-entry org-agenda-files))) (org-agenda-set-mode-name) - (run-hooks 'org-agenda-mode-hook)) + (run-mode-hooks 'org-agenda-mode-hook)) (define-key org-agenda-mode-map [(tab)] 'org-agenda-goto) (define-key org-agenda-mode-map [(return)] 'org-agenda-switch-to) @@ -6700,7 +6698,7 @@ table editor in arbitrary modes.") (concat "\\([ \t]*|\\|" auto-fill-inhibit-regexp) "[ \t]*|")) (easy-menu-add orgtbl-mode-menu) - (run-hooks (quote orgtbl-mode-hook))) + (run-hooks 'orgtbl-mode-hook)) (setq auto-fill-inhibit-regexp org-old-auto-fill-inhibit-regexp) (remove-hook 'before-change-functions 'org-before-change-function t) (easy-menu-remove orgtbl-mode-menu) @@ -8433,7 +8431,7 @@ the automatic table editor has been turned off." ;;; Menu entries -;; First, remove the outline menus. +;; First, remove the outline menus. Org-mode does not neede these commands. (if org-xemacs-p (add-hook 'org-mode-hook (lambda () @@ -8442,7 +8440,7 @@ the automatic table editor has been turned off." (delete-menu-item '("Hide")) (set-menubar-dirty-flag))) (setq org-mode-map (delq (assoc 'menu-bar (cdr org-mode-map)) - org-mode-map))) + org-mode-map))) ;; Define the Org-mode menus (easy-menu-define org-org-menu org-mode-map "Org menu" From 8ba93b1c2d07fbf09cec595aee8519ddcc311c4e Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Thu, 26 May 2005 10:32:45 +0000 Subject: [PATCH 005/294] *** empty log message *** --- lisp/ChangeLog | 6 ++++++ man/org.texi | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e25c4b86308..abb4378963e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2005-05-26 Carsten Dominik + + * textmodes/org.el: (org-mode): Use `define-derived-mode' to + define `org-mode'. + (org-agenda-mode): Use `run-mode-hooks' instead of `run-hooks'. + 2005-05-25 Lute Kamstra * subr.el (delay-mode-hooks): Specify indentation. diff --git a/man/org.texi b/man/org.texi index 444256762b8..4f3576d57c4 100644 --- a/man/org.texi +++ b/man/org.texi @@ -4,7 +4,7 @@ @setfilename ../info/org @settitle Org Mode Manual -@set VERSION 3.09 +@set VERSION 3.10 @set DATE May 2005 @dircategory Emacs From 21a88c56b3223ef150632d012e2003ebbaf7130e Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 12:11:10 +0000 Subject: [PATCH 006/294] (archive-mode): Use run-mode-hooks. --- lisp/arc-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index e72d38f3a3f..13f4559cfaf 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el @@ -672,7 +672,7 @@ archive. (setq major-mode 'archive-mode) (setq mode-name (concat typename "-Archive")) ;; Run archive-foo-mode-hook and archive-mode-hook - (run-hooks (archive-name "mode-hook") 'archive-mode-hook) + (run-mode-hooks (archive-name "mode-hook") 'archive-mode-hook) (use-local-map archive-mode-map)) (make-local-variable 'archive-proper-file-start) From e3e4b1f233ec3d7875ba8ceca8d534b148e15b49 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 12:16:05 +0000 Subject: [PATCH 007/294] (array-mode): Use kill-all-local-variables and run-mode-hooks. --- lisp/array.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/array.el b/lisp/array.el index f65f14ac550..2f270d0f086 100644 --- a/lisp/array.el +++ b/lisp/array.el @@ -872,6 +872,7 @@ take a numeric prefix argument): Entering array mode calls the function `array-mode-hook'." (interactive) + (kill-all-local-variables) ;; Number of rows in the array. (make-local-variable 'array-max-row) ;; Number of columns in the array. @@ -907,7 +908,7 @@ Entering array mode calls the function `array-mode-hook'." (setq truncate-lines t) (setq overwrite-mode 'overwrite-mode-textual) (use-local-map array-mode-map) - (run-hooks 'array-mode-hook)) + (run-mode-hooks 'array-mode-hook)) From 5770a942e767f732f390b25bc592fe92a154e3e4 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Thu, 26 May 2005 12:20:21 +0000 Subject: [PATCH 008/294] (gdb-frame-address): Rename from gdb-current-address. (gdb-previous-frame-address): Rename from gdb-previous-address. (gdb-selected-frame): Rename from gdb-current-frame. (gdb-get-selected-frame): Rename from gdb-get-current-frame. (gdb-frame-number): Rename from gdb-current-stack-level. (gdb-ann3): Match new mode-name for disassembly buffer. Extend initialisation of variables. (gdb-post-prompt): Update disassembly from gdb-frame-handler. (gdb-memory-mode): Use mouse-face in header line. (gdb-assembler-buffer-name): Call it disassembly and give frame in mode line. (gdb-source-spec-regexp, gdb-assembler-custom) (gdb-invalidate-assembler, gdb-frame-handler): Make robust to leading zeroes in address format. --- lisp/progmodes/gdb-ui.el | 160 +++++++++++++++++++++------------------ 1 file changed, 85 insertions(+), 75 deletions(-) diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 1a26b64beca..f7773a98f34 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -66,12 +66,12 @@ (require 'gud) -(defvar gdb-current-address "main" "Initialisation for Assembler buffer.") -(defvar gdb-previous-address nil) +(defvar gdb-frame-address "main" "Initialisation for Assembler buffer.") +(defvar gdb-previous-frame-address nil) (defvar gdb-memory-address "main") (defvar gdb-previous-frame nil) -(defvar gdb-current-frame nil) -(defvar gdb-current-stack-level nil) +(defvar gdb-selected-frame nil) +(defvar gdb-frame-number nil) (defvar gdb-current-language nil) (defvar gdb-var-list nil "List of variables in watch window.") (defvar gdb-var-changed nil "Non-nil means that gdb-var-list has changed.") @@ -295,7 +295,7 @@ predefined macros." (set (make-local-variable 'gud-minor-mode) 'gdba) (set (make-local-variable 'gud-marker-filter) 'gud-gdba-marker-filter) ;; - (gud-def gud-break (if (not (string-equal mode-name "Machine")) + (gud-def gud-break (if (not (string-match "Machine" mode-name)) (gud-call "break %f:%l" arg) (save-excursion (beginning-of-line) @@ -303,7 +303,7 @@ predefined macros." (gud-call "break *%a" arg))) "\C-b" "Set breakpoint at current line or address.") ;; - (gud-def gud-remove (if (not (string-equal mode-name "Machine")) + (gud-def gud-remove (if (not (string-match "Machine" mode-name)) (gud-call "clear %f:%l" arg) (save-excursion (beginning-of-line) @@ -311,7 +311,7 @@ predefined macros." (gud-call "clear *%a" arg))) "\C-d" "Remove breakpoint at current line or address.") ;; - (gud-def gud-until (if (not (string-equal mode-name "Machine")) + (gud-def gud-until (if (not (string-match "Machine" mode-name)) (gud-call "until %f:%l" arg) (save-excursion (beginning-of-line) @@ -332,25 +332,26 @@ predefined macros." (setq comint-input-sender 'gdb-send) ;; ;; (re-)initialize - (setq gdb-current-address "main") - (setq gdb-previous-address nil) - (setq gdb-memory-address "main") - (setq gdb-previous-frame nil) - (setq gdb-current-frame nil) - (setq gdb-current-stack-level nil) - (setq gdb-var-list nil) - (setq gdb-var-changed nil) - (setq gdb-first-prompt nil) - (setq gdb-prompting nil) - (setq gdb-input-queue nil) - (setq gdb-current-item nil) - (setq gdb-pending-triggers nil) - (setq gdb-output-sink 'user) - (setq gdb-server-prefix "server ") - (setq gdb-flush-pending-output nil) - (setq gdb-location-alist nil) - (setq gdb-find-file-unhook nil) - (setq gdb-macro-info nil) + (setq gdb-frame-address (if gdb-show-main "main" nil)) + (setq gdb-previous-frame-address nil + gdb-memory-address "main" + gdb-previous-frame nil + gdb-selected-frame nil + gdb-current-language nil + gdb-frame-number nil + gdb-var-list nil + gdb-var-changed nil + gdb-first-prompt nil + gdb-prompting nil + gdb-input-queue nil + gdb-current-item nil + gdb-pending-triggers nil + gdb-output-sink 'user + gdb-server-prefix "server " + gdb-flush-pending-output nil + gdb-location-alist nil + gdb-find-file-unhook nil + gdb-macro-info nil) ;; (setq gdb-buffer-type 'gdba) ;; @@ -380,8 +381,8 @@ predefined macros." (require 'tooltip) (let ((expr (tooltip-identifier-from-point (point)))) (if (and (string-equal gdb-current-language "c") - gdb-use-colon-colon-notation gdb-current-frame) - (setq expr (concat gdb-current-frame "::" expr))) + gdb-use-colon-colon-notation gdb-selected-frame) + (setq expr (concat gdb-selected-frame "::" expr))) (catch 'already-watched (dolist (var gdb-var-list) (if (string-equal expr (car var)) (throw 'already-watched nil))) @@ -862,7 +863,7 @@ This filter may simply queue input for a later time." (setq gdb-prompting t)) (defconst gdb-source-spec-regexp - "\\(.*\\):\\([0-9]*\\):[0-9]*:[a-z]*:\\(0x[a-f0-9]*\\)") + "\\(.*\\):\\([0-9]*\\):[0-9]*:[a-z]*:0x0*\\([a-f0-9]*\\)") ;; Do not use this except as an annotation handler. (defun gdb-source (args) @@ -872,7 +873,7 @@ This filter may simply queue input for a later time." (cons (match-string 1 args) (string-to-number (match-string 2 args)))) - (setq gdb-current-address (match-string 3 args)) + (setq gdb-frame-address (match-string 3 args)) ;; cover for auto-display output which comes *before* ;; stopped annotation (if (eq gdb-output-sink 'inferior) (setq gdb-output-sink 'user))) @@ -985,10 +986,12 @@ sink to `user' in `gdb-stopping', that is fine." This begins the collection of output from the current command if that happens to be appropriate." (unless gdb-pending-triggers - (gdb-get-current-frame) + (gdb-get-selected-frame) (gdb-invalidate-frames) (gdb-invalidate-breakpoints) - (gdb-invalidate-assembler) + ;; Do this through gdb-get-selected-frame -> gdb-frame-handler + ;; so gdb-frame-address is updated. + ;; (gdb-invalidate-assembler) (gdb-invalidate-registers) (gdb-invalidate-memory) (gdb-invalidate-locals) @@ -1511,7 +1514,7 @@ static char *magick[] = { help-echo "mouse-2, RET: Select frame")) (beginning-of-line) (when (and (looking-at "^#\\([0-9]+\\)") - (equal (match-string 1) gdb-current-stack-level)) + (equal (match-string 1) gdb-frame-number)) (put-text-property (line-beginning-position) (line-end-position) 'face '(:inverse-video t))) (forward-line 1)))))) @@ -1915,6 +1918,7 @@ corresponding to the mode line clicked." (propertize gdb-memory-address 'face font-lock-warning-face 'help-echo "mouse-1: Set memory address" + 'mouse-face 'mode-line-highlight 'local-map (gdb-make-header-line-mouse-map 'mouse-1 #'gdb-memory-set-address)) @@ -1922,6 +1926,7 @@ corresponding to the mode line clicked." (propertize (number-to-string gdb-memory-repeat-count) 'face font-lock-warning-face 'help-echo "mouse-1: Set repeat count" + 'mouse-face 'mode-line-highlight 'local-map (gdb-make-header-line-mouse-map 'mouse-1 #'gdb-memory-set-repeat-count)) @@ -1929,11 +1934,13 @@ corresponding to the mode line clicked." (propertize gdb-memory-format 'face font-lock-warning-face 'help-echo "mouse-3: Select display format" + 'mouse-face 'mode-line-highlight 'local-map gdb-memory-format-keymap) " Unit Size: " (propertize gdb-memory-unit 'face font-lock-warning-face 'help-echo "mouse-3: Select unit size" + 'mouse-face 'mode-line-highlight 'local-map gdb-memory-unit-keymap)))) (run-mode-hooks 'gdb-memory-mode-hook) 'gdb-invalidate-memory) @@ -2009,7 +2016,7 @@ corresponding to the mode line clicked." \\{gdb-locals-mode-map}" (kill-all-local-variables) (setq major-mode 'gdb-locals-mode) - (setq mode-name (concat "Locals:" gdb-current-frame)) + (setq mode-name (concat "Locals:" gdb-selected-frame)) (setq buffer-read-only t) (use-local-map gdb-locals-mode-map) (run-mode-hooks 'gdb-locals-mode-hook) @@ -2069,7 +2076,8 @@ corresponding to the mode line clicked." (define-key menu [gdb] '("Gdb" . gdb-display-gdb-buffer)) (define-key menu [threads] '("Threads" . gdb-display-threads-buffer)) (define-key menu [memory] '("Memory" . gdb-display-memory-buffer)) - (define-key menu [assembler] '("Machine" . gdb-display-assembler-buffer)) + (define-key menu [disassembly] + '("Disassembly" . gdb-display-assembler-buffer)) (define-key menu [registers] '("Registers" . gdb-display-registers-buffer)) (define-key menu [inferior] '(menu-item "Inferior IO" gdb-display-inferior-io-buffer @@ -2086,7 +2094,7 @@ corresponding to the mode line clicked." (define-key menu [gdb] '("Gdb" . gdb-frame-gdb-buffer)) (define-key menu [threads] '("Threads" . gdb-frame-threads-buffer)) (define-key menu [memory] '("Memory" . gdb-frame-memory-buffer)) - (define-key menu [assembler] '("Machine" . gdb-frame-assembler-buffer)) + (define-key menu [disassembly] '("Disassembiy" . gdb-frame-assembler-buffer)) (define-key menu [registers] '("Registers" . gdb-frame-registers-buffer)) (define-key menu [inferior] '(menu-item "Inferior IO" gdb-frame-inferior-io-buffer @@ -2132,7 +2140,8 @@ corresponding to the mode line clicked." (defvar gdb-main-file nil "Source file from which program execution begins.") (defcustom gdb-show-main nil - "Nil means don't display source file containing the main routine." + "Non-nil means display source file containing the main routine at startup." +"Also display the main routine in the disassembly buffer if present." :type 'boolean :group 'gud :version "22.1") @@ -2399,7 +2408,9 @@ BUFFER nil or omitted means use the current buffer." (def-gdb-auto-updated-buffer gdb-assembler-buffer gdb-invalidate-assembler - (concat gdb-server-prefix "disassemble " gdb-current-address "\n") + (concat gdb-server-prefix "disassemble " + (if (member gdb-frame-address '(nil "main")) nil "0x") + gdb-frame-address "\n") gdb-assembler-handler gdb-assembler-custom) @@ -2407,10 +2418,11 @@ BUFFER nil or omitted means use the current buffer." (let ((buffer (gdb-get-buffer 'gdb-assembler-buffer)) (pos 1) (address) (flag) (bptno)) (with-current-buffer buffer - (if (not (equal gdb-current-address "main")) + (if (not (equal gdb-frame-address "main")) (progn (goto-char (point-min)) - (if (re-search-forward gdb-current-address nil t) + (if (and gdb-frame-address + (re-search-forward gdb-frame-address nil t)) (progn (setq pos (point)) (beginning-of-line) @@ -2427,18 +2439,15 @@ BUFFER nil or omitted means use the current buffer." (if (looking-at "[^\t].*breakpoint") (progn (looking-at - "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\(.\\)\\s-+0x\\(\\S-+\\)") + "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\(.\\)\\s-+0x0*\\(\\S-+\\)") (setq bptno (match-string 1)) (setq flag (char-after (match-beginning 2))) (setq address (match-string 3)) - ;; remove leading 0s from output of info break. - (if (string-match "^0+\\(.*\\)" address) - (setq address (match-string 1 address))) (with-current-buffer buffer (goto-char (point-min)) (if (re-search-forward address nil t) (gdb-put-breakpoint-icon (eq flag ?y) bptno))))))) - (if (not (equal gdb-current-address "main")) + (if (not (equal gdb-frame-address "main")) (set-window-point (get-buffer-window buffer 0) pos)))) (defvar gdb-assembler-mode-map @@ -2468,7 +2477,7 @@ BUFFER nil or omitted means use the current buffer." \\{gdb-assembler-mode-map}" (kill-all-local-variables) (setq major-mode 'gdb-assembler-mode) - (setq mode-name "Machine") + (setq mode-name (concat "Machine:" gdb-selected-frame)) (setq gdb-overlay-arrow-position nil) (add-to-list 'overlay-arrow-variable-list 'gdb-overlay-arrow-position) (setq fringes-outside-margins t) @@ -2482,7 +2491,7 @@ BUFFER nil or omitted means use the current buffer." (defun gdb-assembler-buffer-name () (with-current-buffer gud-comint-buffer - (concat "*Machine Code " (gdb-get-target-string) "*"))) + (concat "*Disassembly of " (gdb-get-target-string) "*"))) (defun gdb-display-assembler-buffer () "Display disassembly view." @@ -2497,18 +2506,19 @@ BUFFER nil or omitted means use the current buffer." (special-display-frame-alist gdb-frame-parameters)) (display-buffer (gdb-get-create-buffer 'gdb-assembler-buffer)))) -;; modified because if gdb-current-address has changed value a new command +;; modified because if gdb-frame-address has changed value a new command ;; must be enqueued to update the buffer with the new output (defun gdb-invalidate-assembler (&optional ignored) (if (gdb-get-buffer 'gdb-assembler-buffer) (progn - (unless (string-equal gdb-current-frame gdb-previous-frame) + (unless (and gdb-selected-frame + (string-equal gdb-selected-frame gdb-previous-frame)) (if (or (not (member 'gdb-invalidate-assembler gdb-pending-triggers)) - (not (string-equal gdb-current-address - gdb-previous-address))) + (not (string-equal gdb-frame-address + gdb-previous-frame-address))) (progn - ;; take previous disassemble command off the queue + ;; take previous disassemble command, if any, off the queue (with-current-buffer gud-comint-buffer (let ((queue gdb-input-queue)) (dolist (item queue) @@ -2516,46 +2526,46 @@ BUFFER nil or omitted means use the current buffer." (setq gdb-input-queue (delete item gdb-input-queue)))))) (gdb-enqueue-input - (list (concat gdb-server-prefix "disassemble " - gdb-current-address "\n") + (list + (concat gdb-server-prefix "disassemble " + (if (member gdb-frame-address '(nil "main")) nil "0x") + gdb-frame-address "\n") 'gdb-assembler-handler)) (push 'gdb-invalidate-assembler gdb-pending-triggers) - (setq gdb-previous-address gdb-current-address) - (setq gdb-previous-frame gdb-current-frame))))))) + (setq gdb-previous-frame-address gdb-frame-address) + (setq gdb-previous-frame gdb-selected-frame))))))) -(defun gdb-get-current-frame () - (if (not (member 'gdb-get-current-frame gdb-pending-triggers)) +(defun gdb-get-selected-frame () + (if (not (member 'gdb-get-selected-frame gdb-pending-triggers)) (progn (gdb-enqueue-input (list (concat gdb-server-prefix "info frame\n") 'gdb-frame-handler)) - (push 'gdb-get-current-frame + (push 'gdb-get-selected-frame gdb-pending-triggers)))) (defun gdb-frame-handler () (setq gdb-pending-triggers - (delq 'gdb-get-current-frame gdb-pending-triggers)) + (delq 'gdb-get-selected-frame gdb-pending-triggers)) (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer) (goto-char (point-min)) - (if (looking-at "Stack level \\([0-9]+\\)") - (setq gdb-current-stack-level (match-string 1))) - (forward-line) - (if (looking-at ".*=\\s-+0x\\(\\S-*\\)\\s-+in\\s-+\\(\\S-*?\\);? ") + (if (re-search-forward "Stack level \\([0-9]+\\)" nil t) + (setq gdb-frame-number (match-string 1))) + (goto-char (point-min)) + (if (re-search-forward + ".*=\\s-+0x0*\\(\\S-*\\)\\s-+in\\s-+\\(\\S-*?\\);? " nil t) (progn - (setq gdb-current-frame (match-string 2)) + (setq gdb-selected-frame (match-string 2)) (if (gdb-get-buffer 'gdb-locals-buffer) (with-current-buffer (gdb-get-buffer 'gdb-locals-buffer) - (setq mode-name (concat "Locals:" gdb-current-frame)))) - (let ((address (match-string 1))) - ;; remove leading 0s from output of info frame command. - (if (string-match "^0+\\(.*\\)" address) - (setq gdb-current-address - (concat "0x" (match-string 1 address))) - (setq gdb-current-address (concat "0x" address)))) - (if (not (re-search-forward "(\\S-*:[0-9]*);" nil t)) - ;;update with new frame for machine code if necessary - (gdb-invalidate-assembler))))) + (setq mode-name (concat "Locals:" gdb-selected-frame)))) + (if (gdb-get-buffer 'gdb-assembler-buffer) + (with-current-buffer (gdb-get-buffer 'gdb-assembler-buffer) + (setq mode-name (concat "Machine:" gdb-selected-frame)))) + (setq gdb-frame-address (match-string 1)))) + (goto-char (point-min)) (if (re-search-forward " source language \\(\\S-*\\)\." nil t) (setq gdb-current-language (match-string 1)))) + (gdb-invalidate-assembler)) (provide 'gdb-ui) From 562f26cb58ef115f9eff571ec2daa719ac5a20b9 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Thu, 26 May 2005 12:24:05 +0000 Subject: [PATCH 009/294] (calc-user-define-edit): Don't find substring of nil. --- lisp/calc/calc-prog.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el index 230b0f6a6c5..0a24fbf574c 100644 --- a/lisp/calc/calc-prog.el +++ b/lisp/calc/calc-prog.el @@ -702,7 +702,7 @@ (get func 'calc-user-defn))) (kys (concat "z" (char-to-string (car def)))) (intcmd (symbol-name (cdr def))) - (algcmd (substring (symbol-name func) 9))) + (algcmd (if func (substring (symbol-name func) 9) ""))) (if (and defn (calc-valid-formula-func func)) (let ((niceexpr (math-format-nice-expr defn (frame-width)))) (calc-wrapper From f33cee8546e0f31ec1920b5db0559854a3502bad Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 12:28:39 +0000 Subject: [PATCH 010/294] (bookmark-read-annotation-mode, bookmark-edit-annotation-mode) (bookmark-bmenu-mode): Use run-mode-hooks. --- lisp/bookmark.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/bookmark.el b/lisp/bookmark.el index 0696f929584..bbf9b3bcce4 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -866,7 +866,7 @@ the annotation. (use-local-map bookmark-read-annotation-mode-map) (setq major-mode 'bookmark-read-annotation-mode) (insert (funcall bookmark-read-annotation-text-func bookmark)) - (run-hooks 'text-mode-hook)) + (run-mode-hooks 'text-mode-hook)) (defun bookmark-read-annotation (parg bookmark) @@ -903,7 +903,7 @@ When you have finished composing, type \\[bookmark-send-annotation]. (let ((annotation (bookmark-get-annotation bookmark))) (if (and annotation (not (string-equal annotation ""))) (insert annotation))) - (run-hooks 'text-mode-hook)) + (run-mode-hooks 'text-mode-hook)) (defun bookmark-send-edited-annotation () @@ -1618,7 +1618,7 @@ Bookmark names preceded by a \"*\" have annotations. (setq buffer-read-only t) (setq major-mode 'bookmark-bmenu-mode) (setq mode-name "Bookmark Menu") - (run-hooks 'bookmark-bmenu-mode-hook)) + (run-mode-hooks 'bookmark-bmenu-mode-hook)) (defun bookmark-bmenu-toggle-filenames (&optional show) From 2a16b26c421495eab3b7c8e3072f76c321ba032b Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 12:30:34 +0000 Subject: [PATCH 011/294] (bs-mode): Use run-mode-hooks. --- lisp/bs.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/bs.el b/lisp/bs.el index 76d8d25051f..4c8b74bb59f 100644 --- a/lisp/bs.el +++ b/lisp/bs.el @@ -656,7 +656,7 @@ to show always. truncate-lines t font-lock-defaults '(bs-mode-font-lock-keywords t) font-lock-verbose nil) - (run-hooks 'bs-mode-hook)) + (run-mode-hooks 'bs-mode-hook)) (defun bs-kill () "Let buffer disappear and reset window-configuration." From 262f835258eda1bfb1414e2e5329b02503fca953 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 12:33:15 +0000 Subject: [PATCH 012/294] (calculator-mode): Use run-mode-hooks. --- lisp/calculator.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/calculator.el b/lisp/calculator.el index f11be4747b1..0c6ad53dbce 100644 --- a/lisp/calculator.el +++ b/lisp/calculator.el @@ -4,7 +4,7 @@ ;; Author: Eli Barzilay ;; Keywords: tools, convenience -;; Time-stamp: <2002-07-13 01:14:35 eli> +;; Time-stamp: <26 May 2005, 14:32:34, Lute Kamstra, pijl> ;; This file is part of GNU Emacs. @@ -680,7 +680,7 @@ more information. (setq major-mode 'calculator-mode) (setq mode-name "Calculator") (use-local-map calculator-mode-map) - (run-hooks 'calculator-mode-hook)) + (run-mode-hooks 'calculator-mode-hook)) (eval-when-compile (require 'electric) (require 'ehelp)) From 95ea7b285fdc68be88dcb87bf4cd4254ff239876 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 12:34:51 +0000 Subject: [PATCH 013/294] (command-history-mode): Use run-mode-hooks. --- lisp/chistory.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/chistory.el b/lisp/chistory.el index dde30c75e0e..ddbc0863a0e 100644 --- a/lisp/chistory.el +++ b/lisp/chistory.el @@ -145,7 +145,7 @@ Keybindings: (setq major-mode 'command-history-mode) (setq mode-name "Command History") (use-local-map command-history-map) - (run-hooks 'command-history-mode-hook)) + (run-mode-hooks 'command-history-mode-hook)) (defun Command-history-setup () (kill-all-local-variables) From 9598ae533d2420e1cf57d3945c09808601575238 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 12:40:44 +0000 Subject: [PATCH 014/294] (custom-mode): Use run-mode-hooks. --- lisp/cus-edit.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 50c9accb9ce..82a5e887bed 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -4276,7 +4276,7 @@ if that value is non-nil." (set (make-local-variable 'widget-link-prefix) "") (set (make-local-variable 'widget-link-suffix) "")) (add-hook 'widget-edit-functions 'custom-state-buffer-message nil t) - (run-hooks 'custom-mode-hook)) + (run-mode-hooks 'custom-mode-hook)) (put 'custom-mode 'mode-class 'special) From 8da4dd7626b610104b15b332663d3d1ca7339650 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Thu, 26 May 2005 12:41:35 +0000 Subject: [PATCH 015/294] *** empty log message *** --- lisp/ChangeLog | 18 ++++++++++++++++++ lisp/progmodes/gdb-ui.el | 19 +++++++++---------- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index abb4378963e..96e011fcb50 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,21 @@ +2005-05-27 Nick Roberts + + * progmodes/gdb-ui.el (gdb-frame-address): + Rename from gdb-current-address. + (gdb-previous-frame-address): Rename from gdb-previous-address. + (gdb-selected-frame): Rename from gdb-current-frame. + (gdb-get-selected-frame): Rename from gdb-get-current-frame. + (gdb-frame-number): Rename from gdb-current-stack-level. + (gdb-ann3): Match new mode-name for disassembly buffer. + Extend initialisation of variables. + (gdb-post-prompt): Update disassembly from gdb-frame-handler. + (gdb-memory-mode): Use mouse-face in header line. + (gdb-assembler-buffer-name): Call it disassembly and give frame + in mode line. + (gdb-source-spec-regexp, gdb-assembler-custom) + (gdb-invalidate-assembler, gdb-frame-handler): + Make robust to leading zeroes in address format. + 2005-05-26 Carsten Dominik * textmodes/org.el: (org-mode): Use `define-derived-mode' to diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index f7773a98f34..56d52eff6c3 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -75,6 +75,7 @@ (defvar gdb-current-language nil) (defvar gdb-var-list nil "List of variables in watch window.") (defvar gdb-var-changed nil "Non-nil means that gdb-var-list has changed.") +(defvar gdb-main-file nil "Source file from which program execution begins.") (defvar gdb-buffer-type nil) (defvar gdb-overlay-arrow-position nil) (defvar gdb-server-prefix nil) @@ -211,11 +212,18 @@ predefined macros." :version "22.1") (defcustom gdb-cpp-define-alist-flags "" - "*Preprocessor flags for `gdb-cpp-define-alist-program'." + "Preprocessor flags for `gdb-cpp-define-alist-program'." :type 'string :group 'gud :version "22.1") +(defcustom gdb-show-main nil + "Non-nil means display source file containing the main routine at startup. +Also display the main routine in the disassembly buffer if present." + :type 'boolean + :group 'gud + :version "22.1") + (defvar gdb-define-alist nil "Alist of #define directives for GUD tooltips.") (defun gdb-create-define-alist () @@ -2137,15 +2145,6 @@ corresponding to the mode line clicked." (gdb-display-buffer (gdb-get-create-buffer 'gdba))) -(defvar gdb-main-file nil "Source file from which program execution begins.") - -(defcustom gdb-show-main nil - "Non-nil means display source file containing the main routine at startup." -"Also display the main routine in the disassembly buffer if present." - :type 'boolean - :group 'gud - :version "22.1") - (defun gdb-set-window-buffer (name) (set-window-buffer (selected-window) (get-buffer name)) (set-window-dedicated-p (selected-window) t)) From 258cf562864dbe391929d54b771df3078a6797b6 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 12:41:52 +0000 Subject: [PATCH 016/294] (describe-text-mode): Use run-mode-hooks. --- lisp/descr-text.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/descr-text.el b/lisp/descr-text.el index f1e1e9b9cdd..ce46b3f828d 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el @@ -61,7 +61,7 @@ if that value is non-nil." (use-local-map describe-text-mode-map) (widget-setup) (add-hook 'change-major-mode-hook 'font-lock-defontify nil t) - (run-hooks 'describe-text-mode-hook)) + (run-mode-hooks 'describe-text-mode-hook)) ;;; Describe-Text Utilities. From 3e00c50e8a193668e612d0d6d797f337a5b8f1dc Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Thu, 26 May 2005 12:42:58 +0000 Subject: [PATCH 017/294] *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 96e011fcb50..b2d3bf81286 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-05-26 Jay Belanger + + * calc/calc-prog.el (calc-user-define-edit): Don't find substring + of nil. + 2005-05-27 Nick Roberts * progmodes/gdb-ui.el (gdb-frame-address): From a3d9e1face21a61a84c031db417dbcbc9fe5f9dd Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 12:43:17 +0000 Subject: [PATCH 018/294] (Electric-buffer-menu-mode): Use run-mode-hooks. --- lisp/ebuff-menu.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ebuff-menu.el b/lisp/ebuff-menu.el index bfac2afe6e9..ec230bc8a62 100644 --- a/lisp/ebuff-menu.el +++ b/lisp/ebuff-menu.el @@ -162,7 +162,7 @@ Entry to this mode via command `electric-buffer-list' calls the value of (setq major-mode 'Electric-buffer-menu-mode) (goto-char (point-min)) (if (search-forward "\n." nil t) (forward-char -1)) - (run-hooks 'electric-buffer-menu-mode-hook)) + (run-mode-hooks 'electric-buffer-menu-mode-hook)) ;; generally the same as Buffer-menu-mode-map ;; (except we don't indirect to global-map) From ce8c84b6160421b54095525c269a3f8a856b839b Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 12:45:54 +0000 Subject: [PATCH 019/294] (ediff-mode): Use run-mode-hooks. --- lisp/ediff-util.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/ediff-util.el b/lisp/ediff-util.el index 79f85cc1896..b7b39f405e5 100644 --- a/lisp/ediff-util.el +++ b/lisp/ediff-util.el @@ -1,6 +1,7 @@ ;;; ediff-util.el --- the core commands and utilities of ediff -;; Copyright (C) 1994, 95, 96, 97, 98, 99, 2000, 01, 02, 04 Free Software Foundation, Inc. +;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +;; 2004 Free Software Foundation, Inc. ;; Author: Michael Kifer @@ -116,7 +117,7 @@ Commands: (kill-all-local-variables) (setq major-mode 'ediff-mode) (setq mode-name "Ediff") - (run-hooks 'ediff-mode-hook)) + (run-mode-hooks 'ediff-mode-hook)) From 784c2025d3de9f80027b30dbe2022af280cae42f Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 12:50:09 +0000 Subject: [PATCH 020/294] (forms-mode): Use run-mode-hooks. --- lisp/forms.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/forms.el b/lisp/forms.el index 61d2441a9ea..57985a7297f 100644 --- a/lisp/forms.el +++ b/lisp/forms.el @@ -713,7 +713,7 @@ Commands: Equivalent keys in read-only mode: ;; user customising ;;(message "forms: proceeding setup (user hooks)...") - (run-hooks 'forms-mode-hook 'forms-mode-hooks) + (run-mode-hooks 'forms-mode-hook 'forms-mode-hooks) ;;(message "forms: setting up... done.") ;; be helpful From 40bd2cfb436f53c092c37d069748c093d9ad84cd Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 12:51:09 +0000 Subject: [PATCH 021/294] (help-mode): Use run-mode-hooks. --- lisp/help-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/help-mode.el b/lisp/help-mode.el index d94f03200dc..1c516930c3b 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el @@ -196,7 +196,7 @@ Commands: (view-mode) (make-local-variable 'view-no-disable-on-exit) (setq view-no-disable-on-exit t) - (run-hooks 'help-mode-hook)) + (run-mode-hooks 'help-mode-hook)) ;;;###autoload (defun help-mode-setup () From 36555efc195aa2dcb471a62bdd5f6e7a1e4de4f3 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 12:54:22 +0000 Subject: [PATCH 022/294] (hexl-mode): Use run-mode-hooks. --- lisp/hexl.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/hexl.el b/lisp/hexl.el index db6edfa48c1..b67ab7876b4 100644 --- a/lisp/hexl.el +++ b/lisp/hexl.el @@ -291,7 +291,7 @@ You can use \\[hexl-find-file] to visit a file in Hexl mode. "hexl-current-address") (if hexl-follow-ascii (hexl-follow-ascii 1))) - (run-hooks 'hexl-mode-hook)) + (run-mode-hooks 'hexl-mode-hook)) (defun hexl-isearch-search-function () From 3e803487e8aa8a9bfbe375111f2ab3fffe1bcae2 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 12:56:21 +0000 Subject: [PATCH 023/294] (ibuffer-mode): Use run-mode-hooks. --- lisp/ibuffer.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 213160b6f37..217696cb4aa 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -2511,7 +2511,7 @@ will be inserted before the group at point." (when ibuffer-default-directory (setq default-directory ibuffer-default-directory)) (add-hook 'change-major-mode-hook 'font-lock-defontify nil t) - (run-hooks 'ibuffer-mode-hook) + (run-mode-hooks 'ibuffer-mode-hook) ;; called after mode hooks to allow the user to add filters (ibuffer-update-mode-name)) From d395b3b565e9e4d1ef0b3f6fd52e783197a1daf2 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 12:58:00 +0000 Subject: [PATCH 024/294] (inferior-emacs-lisp-mode): Use run-mode-hooks. --- lisp/ielm.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ielm.el b/lisp/ielm.el index 65654ca2c7a..757b31a47f4 100644 --- a/lisp/ielm.el +++ b/lisp/ielm.el @@ -548,7 +548,7 @@ Customized bindings may be defined in `ielm-map', which currently contains: (set-marker comint-last-input-start (ielm-pm)) (set-process-filter (get-buffer-process (current-buffer)) 'comint-output-filter)) - (run-hooks 'ielm-mode-hook)) + (run-mode-hooks 'ielm-mode-hook)) (defun ielm-get-old-input nil ;; Return the previous input surrounding point From d39f149d73929309b1605753b5805d6cb4f34019 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 13:01:03 +0000 Subject: [PATCH 025/294] (Info-mode, Info-edit-mode): Use run-mode-hooks. --- lisp/info.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/info.el b/lisp/info.el index cfb44cb18f1..0747245f41b 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -3259,7 +3259,7 @@ Advanced commands: (set (make-local-variable 'search-whitespace-regexp) Info-search-whitespace-regexp) (Info-set-mode-line) - (run-hooks 'Info-mode-hook)) + (run-mode-hooks 'Info-mode-hook)) ;; When an Info buffer is killed, make sure the associated tags buffer ;; is killed too. @@ -3301,7 +3301,7 @@ which returns to Info mode for browsing. (setq buffer-read-only nil) (force-mode-line-update) (buffer-enable-undo (current-buffer)) - (run-hooks 'Info-edit-mode-hook)) + (run-mode-hooks 'Info-edit-mode-hook)) (defun Info-edit () "Edit the contents of this Info node. From 32173724d450978b7e868517dde314a5ae46aafb Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 13:02:42 +0000 Subject: [PATCH 026/294] (ledit-from-lisp-mode): Use run-mode-hooks. --- lisp/ledit.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ledit.el b/lisp/ledit.el index 8568740fd0b..38e03ca60cc 100644 --- a/lisp/ledit.el +++ b/lisp/ledit.el @@ -152,7 +152,7 @@ do (setq lisp-mode-hook 'ledit-from-lisp-mode)" (use-local-map ledit-mode-map) (setq mode-name "Ledit") (setq major-mode 'ledit-mode) - (run-hooks 'ledit-mode-hook)) + (run-mode-hooks 'ledit-mode-hook)) (provide 'ledit) From 9b5e13c4f823dd20dac201a1f9a6b691d9a496bd Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 13:04:16 +0000 Subject: [PATCH 027/294] (locate-mode): Use run-mode-hooks. --- lisp/locate.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/locate.el b/lisp/locate.el index 42463a160fa..30a6ff41df3 100644 --- a/lisp/locate.el +++ b/lisp/locate.el @@ -393,7 +393,7 @@ do not work in subdirectories. (make-local-variable 'revert-buffer-function) (setq revert-buffer-function 'locate-update) (set (make-local-variable 'page-delimiter) "\n\n") - (run-hooks 'locate-mode-hook)) + (run-mode-hooks 'locate-mode-hook)) (defun locate-do-setup (search-string) (goto-char (point-min)) From 430663bc89121001dbfafa9e7f6aaa503db901be Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 13:07:46 +0000 Subject: [PATCH 028/294] (Man-mode): Use kill-all-local-variables and run-mode-hooks. --- lisp/man.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/man.el b/lisp/man.el index 712b1f30e7f..aa5bd04dd57 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -1061,6 +1061,7 @@ The following variables may be of some use. Try The following key bindings are currently in effect in the buffer: \\{Man-mode-map}" (interactive) + (kill-all-local-variables) (setq major-mode 'Man-mode mode-name "Man" buffer-auto-save-file-name nil @@ -1069,7 +1070,7 @@ The following key bindings are currently in effect in the buffer: " {" 'Man-page-mode-string "}") truncate-lines t buffer-read-only t) - (buffer-disable-undo (current-buffer)) + (buffer-disable-undo) (auto-fill-mode -1) (use-local-map Man-mode-map) (set-syntax-table man-mode-syntax-table) @@ -1080,7 +1081,7 @@ The following key bindings are currently in effect in the buffer: (Man-strip-page-headers) (Man-unindent) (Man-goto-page 1) - (run-hooks 'Man-mode-hook)) + (run-mode-hooks 'Man-mode-hook)) (defsubst Man-build-section-alist () "Build the association list of manpage sections." From 92e9557c064b050de524c48e3e2d56b4db27e9bc Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 13:08:57 +0000 Subject: [PATCH 029/294] (occur-mode): Use run-mode-hooks. --- lisp/replace.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/replace.el b/lisp/replace.el index c9c70b59de5..ba3d5fcfbf4 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -693,7 +693,7 @@ Alternatively, click \\[occur-mode-mouse-goto] on an item to go to it. (make-local-variable 'occur-revert-arguments) (add-hook 'change-major-mode-hook 'font-lock-defontify nil t) (setq next-error-function 'occur-next-error) - (run-hooks 'occur-mode-hook)) + (run-mode-hooks 'occur-mode-hook)) (defun occur-revert-function (ignore1 ignore2) "Handle `revert-buffer' for Occur mode buffers." From 859540e3fc76cf18055ea37d15b4388018439d59 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 13:10:29 +0000 Subject: [PATCH 030/294] (ses-mode): Use run-mode-hooks. --- lisp/ses.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ses.el b/lisp/ses.el index 502acf868dc..d01a8307ffd 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -1552,7 +1552,7 @@ These are active only in the minibuffer, when entering or editing a formula: (setq ses--deferred-narrow 'ses-mode) (1value (add-hook 'post-command-hook 'ses-command-hook nil t)) (run-with-idle-timer 0.01 nil 'ses-command-hook) - (run-hooks 'ses-mode-hook))) + (run-mode-hooks 'ses-mode-hook))) (put 'ses-mode 'mode-class 'special) From b27779130606ea3f75b77e1bde02e02f91ccdc13 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 13:12:00 +0000 Subject: [PATCH 031/294] (completion-list-mode): Use run-mode-hooks. --- lisp/simple.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/simple.el b/lisp/simple.el index 3c9ea979fed..2cb412e4882 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -4762,7 +4762,7 @@ Use \\\\[mouse-choose-completion] to select one\ (setq major-mode 'completion-list-mode) (make-local-variable 'completion-base-size) (setq completion-base-size nil) - (run-hooks 'completion-list-mode-hook)) + (run-mode-hooks 'completion-list-mode-hook)) (defun completion-list-mode-finish () "Finish setup of the completions buffer. From 1c4c2dac52dde09c0c25bf975a7410ccb203af16 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 13:13:36 +0000 Subject: [PATCH 032/294] Use run-mode-hooks in example. --- lisp/comint.el | 2 +- lisp/skeleton.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/comint.el b/lisp/comint.el index fbb5810de16..37550b7b6d9 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -3437,7 +3437,7 @@ REGEXP-GROUP is the regular expression group in REGEXP to use." ;; (make-local-variable 'shell-directory-stack) ;; (setq shell-directory-stack nil) ;; (add-hook 'comint-input-filter-functions 'shell-directory-tracker) -;; (run-hooks 'shell-mode-hook)) +;; (run-mode-hooks 'shell-mode-hook)) ;; ;; ;; Completion for comint-mode users diff --git a/lisp/skeleton.el b/lisp/skeleton.el index e843ef9f02d..d4caca3ca42 100644 --- a/lisp/skeleton.el +++ b/lisp/skeleton.el @@ -557,7 +557,7 @@ symmetrical ones, and the same character twice for the others." ;; (aset map i nil) ;; (aset map (+ i 128) nil) ;; (setq i (1+ i)))) -;; (run-hooks 'mirror-mode-hook)) +;; (run-mode-hooks 'mirror-mode-hook)) (provide 'skeleton) From c91809b285df320be8db53a449001c0159b857c2 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 26 May 2005 13:15:07 +0000 Subject: [PATCH 033/294] (Lisp Eval): C-M-x with arg runs Edebug. --- man/building.texi | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/man/building.texi b/man/building.texi index c362b817034..78eb49702f4 100644 --- a/man/building.texi +++ b/man/building.texi @@ -1149,10 +1149,11 @@ mode. It does not treat @code{defvar} specially. @kbd{C-x C-e} a second time to display the value of the integer result in additional formats (octal, hexadecimal, and character). - If @kbd{C-M-x}, @kbd{C-x C-e}, or @kbd{M-:} is given a numeric -argument, it inserts the value into the current buffer at point, rather -than displaying it in the echo area. The argument's value does not -matter. + If @kbd{C-x C-e}, or @kbd{M-:} is given a numeric argument, it +inserts the value into the current buffer at point, rather than +displaying it in the echo area. The argument's value does not matter. +@kbd{C-M-x} with a numeric argument instruments the function +definition for Edebug (@pxref{Instrumenting, Instrumenting for Edebug,, elisp, the Emacs Lisp Reference Manual}). @findex eval-region @findex eval-current-buffer From d936d373349fdefa24e9588b2eb58b6564f20ac0 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 13:15:33 +0000 Subject: [PATCH 034/294] (speedbar-mode): Use run-mode-hooks. --- lisp/speedbar.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/speedbar.el b/lisp/speedbar.el index 7a6e01f2859..a01b9ddb47e 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el @@ -1306,7 +1306,7 @@ in the selected file. (if speedbar-track-mouse-flag (set (make-local-variable 'track-mouse) t)) ;this could be messy. (setq auto-show-mode nil)) ;no auto-show for Emacs - (run-hooks 'speedbar-mode-hook)) + (run-mode-hooks 'speedbar-mode-hook)) (speedbar-update-contents) speedbar-buffer) From 3851a30d2f2f90eaa9bdfb89cc1f360da1752ec6 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 26 May 2005 13:15:42 +0000 Subject: [PATCH 035/294] *** empty log message *** --- man/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/man/ChangeLog b/man/ChangeLog index 26e9aad20bd..91613a08cd8 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +2005-05-26 Richard M. Stallman + + * building.texi (Lisp Eval): C-M-x with arg runs Edebug. + 2005-05-25 Jay Belanger * calc.texi: Change Calc version number throughout. From 6d0be2925aca572a46c716a70eca062e48e3e228 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 13:17:27 +0000 Subject: [PATCH 036/294] Use run-mode-hooks in example. (term-mode): Use run-mode-hooks. --- lisp/term.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/term.el b/lisp/term.el index 2b89b83fb04..47411b5099a 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -1102,7 +1102,7 @@ Entry to this mode runs the hooks on `term-mode-hook'." (make-local-variable 'term-current-face) (make-local-variable 'term-pending-frame) (setq term-pending-frame nil) - (run-hooks 'term-mode-hook) + (run-mode-hooks 'term-mode-hook) (term-if-xemacs (set-buffer-menubar (append current-menubar (list term-terminal-menu)))) @@ -4179,7 +4179,7 @@ the process. Any more args are arguments to PROGRAM." ;;; (make-local-variable 'shell-directory-stack) ;;; (setq shell-directory-stack nil) ;;; (add-hook 'term-input-filter-functions 'shell-directory-tracker) -;;; (run-hooks 'shell-mode-hook)) +;;; (run-mode-hooks 'shell-mode-hook)) ;;; ;;; ;;; Completion for term-mode users From caaaa40ef94ac38d2c1b0d2b24e0d42edab25781 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 13:21:00 +0000 Subject: [PATCH 037/294] (terminal-edit-mode): Use run-mode-hooks. --- lisp/terminal.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/terminal.el b/lisp/terminal.el index b84b1b6ed00..6b055200359 100644 --- a/lisp/terminal.el +++ b/lisp/terminal.el @@ -1,6 +1,6 @@ ;;; terminal.el --- terminal emulator for GNU Emacs -;; Copyright (C) 1986,87,88,89,93,94 Free Software Foundation, Inc. +;; Copyright (C) 1986, 1987, 1988, 1989, 1993, 1994 Free Software Foundation, Inc. ;; Author: Richard Mlynarik ;; Maintainer: FSF @@ -537,7 +537,7 @@ together with a command \\to return to terminal emulation: \\ (setq mode-name "Terminal Edit") (setq mode-line-modified (default-value 'mode-line-modified)) (setq mode-line-process nil) - (run-hooks 'terminal-edit-mode-hook)) + (run-mode-hooks 'terminal-edit-mode-hook)) (defun te-edit () "Start editing the terminal emulator buffer with ordinary Emacs commands." From 24444a7a6e0576341d1a48425f83c53ee8c697f6 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 13:24:25 +0000 Subject: [PATCH 038/294] (wdired-change-to-wdired-mode): Use run-mode-hooks. --- lisp/wdired.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/wdired.el b/lisp/wdired.el index 3941fd681df..a82176af5e8 100644 --- a/lisp/wdired.el +++ b/lisp/wdired.el @@ -263,7 +263,7 @@ See `wdired-mode'." (buffer-enable-undo) ; Performance hack. See above. (set-buffer-modified-p nil) (setq buffer-undo-list nil) - (run-hooks 'wdired-mode-hook) + (run-mode-hooks 'wdired-mode-hook) (message (substitute-command-keys "Press \\[wdired-finish-edit] when finished \ or \\[wdired-abort-changes] to abort changes"))) From e998b4010839be3ce081561036002ab50e70c22e Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 13:25:51 +0000 Subject: [PATCH 039/294] (widget-browse-mode): Use run-mode-hooks. --- lisp/wid-browse.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/wid-browse.el b/lisp/wid-browse.el index 3878289b467..57c4ebdb548 100644 --- a/lisp/wid-browse.el +++ b/lisp/wid-browse.el @@ -82,7 +82,7 @@ if that value is non-nil." (use-local-map widget-browse-mode-map) (easy-menu-add widget-browse-mode-customize-menu) (easy-menu-add widget-browse-mode-menu) - (run-hooks 'widget-browse-mode-hook)) + (run-mode-hooks 'widget-browse-mode-hook)) (put 'widget-browse-mode 'mode-class 'special) From 5c5fb26b814fa5ca38a678ea547a5a017333cbfb Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 13:27:35 +0000 Subject: [PATCH 040/294] (calc-edit-mode): Use run-mode-hooks. --- lisp/calc/calc-yank.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/calc/calc-yank.el b/lisp/calc/calc-yank.el index 84c117a1723..1544e8956c1 100644 --- a/lisp/calc/calc-yank.el +++ b/lisp/calc/calc-yank.el @@ -447,7 +447,7 @@ To cancel the edit, simply kill the *Calc Edit* buffer." (setq truncate-lines nil) (setq major-mode 'calc-edit-mode) (setq mode-name "Calc Edit") - (run-hooks 'calc-edit-mode-hook) + (run-mode-hooks 'calc-edit-mode-hook) (make-local-variable 'calc-original-buffer) (setq calc-original-buffer oldbuf) (make-local-variable 'calc-return-buffer) From d74fa98c012bb90aa499cf4ce3ed9ed2fe789814 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 13:30:23 +0000 Subject: [PATCH 041/294] (calc-mode, calc-trail-mode): Use run-mode-hooks. --- lisp/calc/calc.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 173785dc912..27623907d45 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -1131,7 +1131,7 @@ Notations: 3.14e6 3.14 * 10^6 (string-match "full" (nth 1 p)) (setq calc-standalone-flag t)) (setq p (cdr p)))) - (run-hooks 'calc-mode-hook) + (run-mode-hooks 'calc-mode-hook) (calc-refresh t) (calc-set-mode-line) (calc-check-defines)) @@ -1181,7 +1181,7 @@ commands given here will actually operate on the *Calculator* stack." (insert (propertize (concat "Emacs Calculator v" calc-version " by Dave Gillespie\n") 'font-lock-face 'italic)))) - (run-hooks 'calc-trail-mode-hook)) + (run-mode-hooks 'calc-trail-mode-hook)) (defun calc-create-buffer () (set-buffer (get-buffer-create "*Calculator*")) From 4f4ac1b406876205de267bcaeee8ff0cd474083d Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 13:32:44 +0000 Subject: [PATCH 042/294] (gnus-score-mode): Use run-mode-hooks. --- lisp/gnus/score-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/gnus/score-mode.el b/lisp/gnus/score-mode.el index a54b57f6fa4..4d5d293d398 100644 --- a/lisp/gnus/score-mode.el +++ b/lisp/gnus/score-mode.el @@ -71,7 +71,7 @@ This mode is an extended emacs-lisp mode. (setq mode-name "Score") (lisp-mode-variables nil) (make-local-variable 'gnus-score-edit-exit-function) - (run-hooks 'emacs-lisp-mode-hook 'gnus-score-mode-hook)) + (run-mode-hooks 'emacs-lisp-mode-hook 'gnus-score-mode-hook)) (defun gnus-score-make-menu-bar () (unless (boundp 'gnus-score-menu) From 6441d280dfcc2c809ea14ba65c4cd505ad1927dc Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 13:41:35 +0000 Subject: [PATCH 043/294] *** empty log message *** --- lisp/ChangeLog | 44 ++++++++++++++++++++++++++++++++++++++++---- lisp/gnus/ChangeLog | 4 ++++ 2 files changed, 44 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b2d3bf81286..852de36e6b9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,43 @@ +2005-05-26 Lute Kamstra + + * arc-mode.el (archive-mode): + * bookmark.el (bookmark-read-annotation-mode) + (bookmark-edit-annotation-mode, bookmark-bmenu-mode): + * bs.el (bs-mode): + * calc/calc-yank.el (calc-edit-mode): + * calc/calc.el (calc-mode, calc-trail-mode): + * calculator.el (calculator-mode): + * chistory.el (command-history-mode): + * comint.el: + * cus-edit.el (custom-mode): + * descr-text.el (describe-text-mode): + * ebuff-menu.el (Electric-buffer-menu-mode): + * ediff-util.el (ediff-mode): + * forms.el (forms-mode): + * help-mode.el (help-mode): + * hexl.el (hexl-mode): + * ibuffer.el (ibuffer-mode): + * ielm.el (inferior-emacs-lisp-mode): + * info.el (Info-mode, Info-edit-mode): + * ledit.el (ledit-from-lisp-mode): + * locate.el (locate-mode): + * replace.el (occur-mode): + * ses.el (ses-mode): + * simple.el (completion-list-mode): + * skeleton.el: + * speedbar.el (speedbar-mode): + * term.el: + (term-mode): + * terminal.el (terminal-edit-mode): + * wdired.el (wdired-change-to-wdired-mode): + * wid-browse.el (widget-browse-mode): Use run-mode-hooks. + + * array.el (array-mode): + * man.el (Man-mode): Use kill-all-local-variables and + run-mode-hooks. + + * subr.el (delay-mode-hooks): Specify indentation. + 2005-05-26 Jay Belanger * calc/calc-prog.el (calc-user-define-edit): Don't find substring @@ -27,10 +67,6 @@ define `org-mode'. (org-agenda-mode): Use `run-mode-hooks' instead of `run-hooks'. -2005-05-25 Lute Kamstra - - * subr.el (delay-mode-hooks): Specify indentation. - 2005-05-26 Nick Roberts * log-edit.el (log-edit-changelog-entries): Distinguish between diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 14450ee3a14..93e612207d9 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,7 @@ +2005-05-26 Lute Kamstra + + * score-mode.el (gnus-score-mode): Use run-mode-hooks. + 2005-05-16 Katsumi Yamaoka * gnus-art.el: Don't autoload mail-extract-address-components. From f8ab034e35f9f1acc1ca3f4a2401c67403472b9c Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Thu, 26 May 2005 14:35:47 +0000 Subject: [PATCH 044/294] 2005-05-26 Mark A. Hershberger * xml.el (xml-substitute-special): Don't die for undefined xml entities. --- lisp/ChangeLog | 5 +++++ lisp/xml.el | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 852de36e6b9..dbd80ea6f38 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-05-26 Mark A. Hershberger + + * xml.el (xml-substitute-special): Don't die for undefined xml + entities. + 2005-05-26 Lute Kamstra * arc-mode.el (archive-mode): diff --git a/lisp/xml.el b/lisp/xml.el index daf5689c18b..f9527a276b1 100644 --- a/lisp/xml.el +++ b/lisp/xml.el @@ -84,6 +84,9 @@ ;;** ;;******************************************************************* +(defconst xml-undefined-entity "?" + "What to substitute for undefined entities") + (defvar xml-entity-alist '(("lt" . "<") ("gt" . ">") @@ -745,9 +748,10 @@ This follows the rule [28] in the XML specifications." ((eq (length this-part) 0) (error "XML: (Not Well-Formed) No entity given")) (t - (when xml-validating-parser + (if xml-validating-parser (error "XML: (Validity) Undefined entity `%s'" - this-part)))))) + this-part) + xml-undefined-entity))))) (cond ((null children) ;; FIXME: If we have an entity that expands into XML, this won't work. From 6e604a9b7863a808d37791730767e080031491d1 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Thu, 26 May 2005 14:56:28 +0000 Subject: [PATCH 045/294] (Frecursive_edit): Fix typo in docstring. (Fposn_at_x_y): Make arguments match the docstring. --- src/ChangeLog | 11 ++++++++--- src/keyboard.c | 6 +++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 5ae649cb301..ab05e235098 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-05-26 Juanma Barranquero + + * keyboard.c (Frecursive_edit): Fix typo in docstring. + (Fposn_at_x_y): Make argument name match its use in docstring. + 2005-05-26 Lute Kamstra * eval.c (Frun_hooks): Mention run-mode-hooks in docstring. @@ -30,9 +35,9 @@ 2005-05-23 Masatake YAMATO - * xdisp.c (note_mode_line_or_margin_highlight): Added code - for mouse-face. Change the type of the first argument from `window' - to `List_Object'. + * xdisp.c (note_mode_line_or_margin_highlight): Add code + for mouse-face. Change the type of the first argument from `window' + to `Lisp_Object'. (note_mouse_highlight): Call note_mode_line_or_margin_highlight with window instead of w. diff --git a/src/keyboard.c b/src/keyboard.c index 22da49907c7..baba3c466d2 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1020,7 +1020,7 @@ DEFUN ("recursive-edit", Frecursive_edit, Srecursive_edit, 0, 0, "", doc: /* Invoke the editor command loop recursively. To get out of the recursive edit, a command can do `(throw 'exit nil)'; that tells this function to return. -Alternately, `(throw 'exit t)' makes this function signal an error. +Alternatively, `(throw 'exit t)' makes this function signal an error. This function is called by the editor initialization to begin editing. */) () { @@ -10548,7 +10548,7 @@ The elements of this list correspond to the arguments of DEFUN ("posn-at-x-y", Fposn_at_x_y, Sposn_at_x_y, 2, 4, 0, doc: /* Return position information for pixel coordinates X and Y. By default, X and Y are relative to text area of the selected window. -Optional third arg FRAME_OR_WINDOW non-nil specifies frame or window. +Optional third arg FRAME-OR-WINDOW non-nil specifies frame or window. If optional fourth arg WHOLE is non-nil, X is relative to the left edge of the window. @@ -10848,7 +10848,7 @@ syms_of_keyboard () staticpro (&Qdrag_n_drop); Qsave_session = intern ("save-session"); - staticpro(&Qsave_session); + staticpro (&Qsave_session); Qusr1_signal = intern ("usr1-signal"); staticpro (&Qusr1_signal); From d0859c9ada9d335e0872f92e6e93bad3bdfa3114 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Thu, 26 May 2005 15:03:29 +0000 Subject: [PATCH 046/294] Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-324 Merge from gnus--rel--5.10 Patches applied: * gnus--rel--5.10 (patch 70) - Update from CVS 2005-05-17 Katsumi Yamaoka * lisp/gnus/canlock.el (canlock): Change the parent group to news. * lisp/gnus/deuglify.el (gnus-outlook-deuglify): Add :group. * lisp/gnus/dig.el (dig): Add :group. * lisp/gnus/gnus-art.el (gnus-inhibit-mime-unbuttonizing): Add :group. * lisp/gnus/gnus-cite.el (gnus-cite-attribution-face): Add :group. (gnus-cite-face-1, gnus-cite-face-2, gnus-cite-face-3): Ditto. (gnus-cite-face-4, gnus-cite-face-5, gnus-cite-face-6): Ditto. (gnus-cite-face-7, gnus-cite-face-8, gnus-cite-face-9): Ditto. (gnus-cite-face-10, gnus-cite-face-11): Ditto. * lisp/gnus/gnus-diary.el (gnus-diary): Add :group. * lisp/gnus/gnus.el (gnus-group-news-1-face): Add :group. (gnus-group-news-1-empty-face): Ditto. (gnus-group-news-2-face, gnus-group-news-2-empty-face): Ditto. (gnus-group-news-3-face, gnus-group-news-3-empty-face): Ditto. (gnus-group-news-4-face, gnus-group-news-4-empty-face): Ditto. (gnus-group-news-5-face, gnus-group-news-5-empty-face): Ditto. (gnus-group-news-6-face, gnus-group-news-6-empty-face): Ditto. (gnus-group-news-low-face, gnus-group-news-low-empty-face): Ditto. (gnus-group-mail-1-face, gnus-group-mail-1-empty-face): Ditto. (gnus-group-mail-2-face, gnus-group-mail-2-empty-face): Ditto. (gnus-group-mail-3-face, gnus-group-mail-3-empty-face): Ditto. (gnus-group-mail-low-face, gnus-group-mail-low-empty-face): Ditto. (gnus-summary-selected-face, gnus-summary-cancelled-face): Ditto. (gnus-summary-high-ticked-face): Ditto. (gnus-summary-low-ticked-face): Ditto. (gnus-summary-normal-ticked-face): Ditto. (gnus-summary-high-ancient-face): Ditto. (gnus-summary-low-ancient-face): Ditto. (gnus-summary-normal-ancient-face): Ditto. (gnus-summary-high-undownloaded-face): Ditto. (gnus-summary-low-undownloaded-face): Ditto. (gnus-summary-normal-undownloaded-face): Ditto. (gnus-summary-high-unread-face): Ditto. (gnus-summary-low-unread-face): Ditto. (gnus-summary-normal-unread-face): Ditto. (gnus-summary-high-read-face, gnus-summary-low-read-face): Diito (gnus-summary-normal-read-face, gnus-splash-face): Ditto. * lisp/gnus/message.el (message-minibuffer-local-map): Add :group. * lisp/gnus/sieve-manage.el (sieve-manage-log): Add :group. (sieve-manage-default-user): Diito. (sieve-manage-server-eol, sieve-manage-client-eol): Ditto. (sieve-manage-streams, sieve-manage-stream-alist): Ditto. (sieve-manage-authenticators): Ditto. (sieve-manage-authenticator-alist): Ditto (sieve-manage-default-port): Ditto. * lisp/gnus/sieve-mode.el (sieve-control-commands-face): Add :group. (sieve-action-commands-face): Ditto. (sieve-test-commands-face): Ditto. (sieve-tagged-arguments-face): Ditto. * lisp/gnus/smime.el (smime): Add :group. * lisp/gnus/spam-report.el (spam-report): Add :group. * lisp/gnus/spam.el (spam, spam-face): Add :group. --- lisp/gnus/ChangeLog | 67 +++++++++++++++++++++ lisp/gnus/canlock.el | 4 +- lisp/gnus/deuglify.el | 5 +- lisp/gnus/dig.el | 5 +- lisp/gnus/gnus-art.el | 1 + lisp/gnus/gnus-cite.el | 39 ++++++++----- lisp/gnus/gnus-diary.el | 5 +- lisp/gnus/gnus.el | 120 +++++++++++++++++++++++++------------- lisp/gnus/message.el | 3 +- lisp/gnus/sieve-manage.el | 27 ++++++--- lisp/gnus/sieve-mode.el | 14 +++-- lisp/gnus/smime.el | 3 +- lisp/gnus/spam-report.el | 6 +- lisp/gnus/spam.el | 9 ++- 14 files changed, 226 insertions(+), 82 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 93e612207d9..4498ac3f1c3 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,70 @@ +2005-05-17 Katsumi Yamaoka + + * canlock.el (canlock): Change the parent group to news. + + * deuglify.el (gnus-outlook-deuglify): Add :group. + + * dig.el (dig): Add :group. + + * gnus-art.el (gnus-inhibit-mime-unbuttonizing): Add :group. + + * gnus-cite.el (gnus-cite-attribution-face): Add :group. + (gnus-cite-face-1, gnus-cite-face-2, gnus-cite-face-3): Ditto. + (gnus-cite-face-4, gnus-cite-face-5, gnus-cite-face-6): Ditto. + (gnus-cite-face-7, gnus-cite-face-8, gnus-cite-face-9): Ditto. + (gnus-cite-face-10, gnus-cite-face-11): Ditto. + + * gnus-diary.el (gnus-diary): Add :group. + + * gnus.el (gnus-group-news-1-face): Add :group. + (gnus-group-news-1-empty-face): Ditto. + (gnus-group-news-2-face, gnus-group-news-2-empty-face): Ditto. + (gnus-group-news-3-face, gnus-group-news-3-empty-face): Ditto. + (gnus-group-news-4-face, gnus-group-news-4-empty-face): Ditto. + (gnus-group-news-5-face, gnus-group-news-5-empty-face): Ditto. + (gnus-group-news-6-face, gnus-group-news-6-empty-face): Ditto. + (gnus-group-news-low-face, gnus-group-news-low-empty-face): Ditto. + (gnus-group-mail-1-face, gnus-group-mail-1-empty-face): Ditto. + (gnus-group-mail-2-face, gnus-group-mail-2-empty-face): Ditto. + (gnus-group-mail-3-face, gnus-group-mail-3-empty-face): Ditto. + (gnus-group-mail-low-face, gnus-group-mail-low-empty-face): Ditto. + (gnus-summary-selected-face, gnus-summary-cancelled-face): Ditto. + (gnus-summary-high-ticked-face): Ditto. + (gnus-summary-low-ticked-face): Ditto. + (gnus-summary-normal-ticked-face): Ditto. + (gnus-summary-high-ancient-face): Ditto. + (gnus-summary-low-ancient-face): Ditto. + (gnus-summary-normal-ancient-face): Ditto. + (gnus-summary-high-undownloaded-face): Ditto. + (gnus-summary-low-undownloaded-face): Ditto. + (gnus-summary-normal-undownloaded-face): Ditto. + (gnus-summary-high-unread-face): Ditto. + (gnus-summary-low-unread-face): Ditto. + (gnus-summary-normal-unread-face): Ditto. + (gnus-summary-high-read-face, gnus-summary-low-read-face): Diito + (gnus-summary-normal-read-face, gnus-splash-face): Ditto. + + * message.el (message-minibuffer-local-map): Add :group. + + * sieve-manage.el (sieve-manage-log): Add :group. + (sieve-manage-default-user): Diito. + (sieve-manage-server-eol, sieve-manage-client-eol): Ditto. + (sieve-manage-streams, sieve-manage-stream-alist): Ditto. + (sieve-manage-authenticators): Ditto. + (sieve-manage-authenticator-alist): Ditto + (sieve-manage-default-port): Ditto. + + * sieve-mode.el (sieve-control-commands-face): Add :group. + (sieve-action-commands-face): Ditto. + (sieve-test-commands-face): Ditto. + (sieve-tagged-arguments-face): Ditto. + + * smime.el (smime): Add :group. + + * spam-report.el (spam-report): Add :group. + + * spam.el (spam, spam-face): Add :group. + 2005-05-26 Lute Kamstra * score-mode.el (gnus-score-mode): Use run-mode-hooks. diff --git a/lisp/gnus/canlock.el b/lisp/gnus/canlock.el index 71c7dbe03d8..126ec0c60ca 100644 --- a/lisp/gnus/canlock.el +++ b/lisp/gnus/canlock.el @@ -1,6 +1,6 @@ ;;; canlock.el --- functions for Cancel-Lock feature -;; Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004 +;; Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2005 ;; Free Software Foundation, Inc. ;; Author: Katsumi Yamaoka @@ -50,7 +50,7 @@ (defgroup canlock nil "The Cancel-Lock feature." - :group 'applications) + :group 'news) (defcustom canlock-password nil "Password to use when signing a Cancel-Lock or a Cancel-Key header." diff --git a/lisp/gnus/deuglify.el b/lisp/gnus/deuglify.el index 0dc6e6d002a..cae18951f7e 100644 --- a/lisp/gnus/deuglify.el +++ b/lisp/gnus/deuglify.el @@ -1,6 +1,6 @@ ;;; deuglify.el --- deuglify broken Outlook (Express) articles -;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Copyright (C) 2001, 2002 Raymond Scholz ;; Author: Raymond Scholz @@ -231,7 +231,8 @@ (defgroup gnus-outlook-deuglify nil "Deuglify articles generated by broken user agents like MS Outlook (Express)." - :version "22.1") + :version "22.1" + :group 'gnus) ;;;###autoload (defcustom gnus-outlook-deuglify-unwrap-min 45 diff --git a/lisp/gnus/dig.el b/lisp/gnus/dig.el index 08070e985f8..a3d55cbf824 100644 --- a/lisp/gnus/dig.el +++ b/lisp/gnus/dig.el @@ -1,5 +1,5 @@ ;;; dig.el --- Domain Name System dig interface -;; Copyright (c) 2000, 2001, 2003 Free Software Foundation, Inc. +;; Copyright (c) 2000, 2001, 2003, 2005 Free Software Foundation, Inc. ;; Author: Simon Josefsson ;; Keywords: DNS BIND dig @@ -40,7 +40,8 @@ (eval-when-compile (require 'cl)) (defgroup dig nil - "Dig configuration.") + "Dig configuration." + :group 'comm) (defcustom dig-program "dig" "Name of dig (domain information groper) binary." diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index b1a51d65edd..5d0e7835d7f 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -814,6 +814,7 @@ When nil (the default value), then some MIME parts do not get buttons, as described by the variables `gnus-buttonized-mime-types' and `gnus-unbuttonized-mime-types'." :version "22.1" + :group 'gnus-article-mime :type 'boolean) (defcustom gnus-body-boundary-delimiter "_" diff --git a/lisp/gnus/gnus-cite.el b/lisp/gnus/gnus-cite.el index e60ea32e126..6053b2ae502 100644 --- a/lisp/gnus/gnus-cite.el +++ b/lisp/gnus/gnus-cite.el @@ -1,6 +1,7 @@ ;;; gnus-cite.el --- parse citations in articles for Gnus -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +;; 2005 ;; Free Software Foundation, Inc. ;; Author: Per Abhiddenware @@ -138,7 +139,8 @@ the envelope From line." (defface gnus-cite-attribution-face '((t (:italic t))) - "Face used for attribution lines.") + "Face used for attribution lines." + :group 'gnus-cite) (defcustom gnus-cite-attribution-face 'gnus-cite-attribution-face "Face used for attribution lines. @@ -155,7 +157,8 @@ It is merged with the face for the cited text belonging to the attribution." (:foreground "MidnightBlue")) (t (:italic t))) - "Citation face.") + "Citation face." + :group 'gnus-cite) (defface gnus-cite-face-2 '((((class color) (background dark)) @@ -165,7 +168,8 @@ It is merged with the face for the cited text belonging to the attribution." (:foreground "firebrick")) (t (:italic t))) - "Citation face.") + "Citation face." + :group 'gnus-cite) (defface gnus-cite-face-3 '((((class color) (background dark)) @@ -175,7 +179,8 @@ It is merged with the face for the cited text belonging to the attribution." (:foreground "dark green")) (t (:italic t))) - "Citation face.") + "Citation face." + :group 'gnus-cite) (defface gnus-cite-face-4 '((((class color) (background dark)) @@ -185,7 +190,8 @@ It is merged with the face for the cited text belonging to the attribution." (:foreground "OrangeRed")) (t (:italic t))) - "Citation face.") + "Citation face." + :group 'gnus-cite) (defface gnus-cite-face-5 '((((class color) (background dark)) @@ -195,7 +201,8 @@ It is merged with the face for the cited text belonging to the attribution." (:foreground "dark khaki")) (t (:italic t))) - "Citation face.") + "Citation face." + :group 'gnus-cite) (defface gnus-cite-face-6 '((((class color) (background dark)) @@ -205,7 +212,8 @@ It is merged with the face for the cited text belonging to the attribution." (:foreground "dark violet")) (t (:italic t))) - "Citation face.") + "Citation face." + :group 'gnus-cite) (defface gnus-cite-face-7 '((((class color) (background dark)) @@ -215,7 +223,8 @@ It is merged with the face for the cited text belonging to the attribution." (:foreground "SteelBlue4")) (t (:italic t))) - "Citation face.") + "Citation face." + :group 'gnus-cite) (defface gnus-cite-face-8 '((((class color) (background dark)) @@ -225,7 +234,8 @@ It is merged with the face for the cited text belonging to the attribution." (:foreground "magenta")) (t (:italic t))) - "Citation face.") + "Citation face." + :group 'gnus-cite) (defface gnus-cite-face-9 '((((class color) (background dark)) @@ -235,7 +245,8 @@ It is merged with the face for the cited text belonging to the attribution." (:foreground "violet")) (t (:italic t))) - "Citation face.") + "Citation face." + :group 'gnus-cite) (defface gnus-cite-face-10 '((((class color) (background dark)) @@ -245,7 +256,8 @@ It is merged with the face for the cited text belonging to the attribution." (:foreground "medium purple")) (t (:italic t))) - "Citation face.") + "Citation face." + :group 'gnus-cite) (defface gnus-cite-face-11 '((((class color) (background dark)) @@ -255,7 +267,8 @@ It is merged with the face for the cited text belonging to the attribution." (:foreground "turquoise")) (t (:italic t))) - "Citation face.") + "Citation face." + :group 'gnus-cite) (defcustom gnus-cite-face-list '(gnus-cite-face-1 gnus-cite-face-2 gnus-cite-face-3 gnus-cite-face-4 diff --git a/lisp/gnus/gnus-diary.el b/lisp/gnus/gnus-diary.el index 093f4bd7806..c34c3b6df88 100644 --- a/lisp/gnus/gnus-diary.el +++ b/lisp/gnus/gnus-diary.el @@ -1,6 +1,6 @@ ;;; gnus-diary.el --- Wrapper around the NNDiary Gnus backend -;; Copyright (c) 2001, 2002, 2003 Free Software Foundation, Inc. +;; Copyright (c) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Copyright (C) 1999, 2000, 2001 Didier Verna. ;; Author: Didier Verna @@ -103,7 +103,8 @@ (defgroup gnus-diary nil "Utilities on top of the nndiary backend for Gnus." - :version "22.1") + :version "22.1" + :group 'gnus) (defcustom gnus-diary-summary-line-format "%U%R%z %uD: %(%s%) (%ud)\n" "*Summary line format for nndiary groups." diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index 98c41de45e5..a134ac661ac 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el @@ -366,7 +366,8 @@ be set in `.emacs' instead." (:foreground "ForestGreen" :bold t)) (t ())) - "Level 1 newsgroup face.") + "Level 1 newsgroup face." + :group 'gnus-group) (defface gnus-group-news-1-empty-face '((((class color) @@ -377,7 +378,8 @@ be set in `.emacs' instead." (:foreground "ForestGreen")) (t ())) - "Level 1 empty newsgroup face.") + "Level 1 empty newsgroup face." + :group 'gnus-group) (defface gnus-group-news-2-face '((((class color) @@ -388,7 +390,8 @@ be set in `.emacs' instead." (:foreground "CadetBlue4" :bold t)) (t ())) - "Level 2 newsgroup face.") + "Level 2 newsgroup face." + :group 'gnus-group) (defface gnus-group-news-2-empty-face '((((class color) @@ -399,7 +402,8 @@ be set in `.emacs' instead." (:foreground "CadetBlue4")) (t ())) - "Level 2 empty newsgroup face.") + "Level 2 empty newsgroup face." + :group 'gnus-group) (defface gnus-group-news-3-face '((((class color) @@ -410,7 +414,8 @@ be set in `.emacs' instead." (:bold t)) (t ())) - "Level 3 newsgroup face.") + "Level 3 newsgroup face." + :group 'gnus-group) (defface gnus-group-news-3-empty-face '((((class color) @@ -421,7 +426,8 @@ be set in `.emacs' instead." ()) (t ())) - "Level 3 empty newsgroup face.") + "Level 3 empty newsgroup face." + :group 'gnus-group) (defface gnus-group-news-4-face '((((class color) @@ -432,7 +438,8 @@ be set in `.emacs' instead." (:bold t)) (t ())) - "Level 4 newsgroup face.") + "Level 4 newsgroup face." + :group 'gnus-group) (defface gnus-group-news-4-empty-face '((((class color) @@ -443,7 +450,8 @@ be set in `.emacs' instead." ()) (t ())) - "Level 4 empty newsgroup face.") + "Level 4 empty newsgroup face." + :group 'gnus-group) (defface gnus-group-news-5-face '((((class color) @@ -454,7 +462,8 @@ be set in `.emacs' instead." (:bold t)) (t ())) - "Level 5 newsgroup face.") + "Level 5 newsgroup face." + :group 'gnus-group) (defface gnus-group-news-5-empty-face '((((class color) @@ -465,7 +474,8 @@ be set in `.emacs' instead." ()) (t ())) - "Level 5 empty newsgroup face.") + "Level 5 empty newsgroup face." + :group 'gnus-group) (defface gnus-group-news-6-face '((((class color) @@ -476,7 +486,8 @@ be set in `.emacs' instead." (:bold t)) (t ())) - "Level 6 newsgroup face.") + "Level 6 newsgroup face." + :group 'gnus-group) (defface gnus-group-news-6-empty-face '((((class color) @@ -487,7 +498,8 @@ be set in `.emacs' instead." ()) (t ())) - "Level 6 empty newsgroup face.") + "Level 6 empty newsgroup face." + :group 'gnus-group) (defface gnus-group-news-low-face '((((class color) @@ -498,7 +510,8 @@ be set in `.emacs' instead." (:foreground "DarkGreen" :bold t)) (t ())) - "Low level newsgroup face.") + "Low level newsgroup face." + :group 'gnus-group) (defface gnus-group-news-low-empty-face '((((class color) @@ -509,7 +522,8 @@ be set in `.emacs' instead." (:foreground "DarkGreen")) (t ())) - "Low level empty newsgroup face.") + "Low level empty newsgroup face." + :group 'gnus-group) (defface gnus-group-mail-1-face '((((class color) @@ -520,7 +534,8 @@ be set in `.emacs' instead." (:foreground "DeepPink3" :bold t)) (t (:bold t))) - "Level 1 mailgroup face.") + "Level 1 mailgroup face." + :group 'gnus-group) (defface gnus-group-mail-1-empty-face '((((class color) @@ -531,7 +546,8 @@ be set in `.emacs' instead." (:foreground "DeepPink3")) (t (:italic t :bold t))) - "Level 1 empty mailgroup face.") + "Level 1 empty mailgroup face." + :group 'gnus-group) (defface gnus-group-mail-2-face '((((class color) @@ -542,7 +558,8 @@ be set in `.emacs' instead." (:foreground "HotPink3" :bold t)) (t (:bold t))) - "Level 2 mailgroup face.") + "Level 2 mailgroup face." + :group 'gnus-group) (defface gnus-group-mail-2-empty-face '((((class color) @@ -553,7 +570,8 @@ be set in `.emacs' instead." (:foreground "HotPink3")) (t (:bold t))) - "Level 2 empty mailgroup face.") + "Level 2 empty mailgroup face." + :group 'gnus-group) (defface gnus-group-mail-3-face '((((class color) @@ -564,7 +582,8 @@ be set in `.emacs' instead." (:foreground "magenta4" :bold t)) (t (:bold t))) - "Level 3 mailgroup face.") + "Level 3 mailgroup face." + :group 'gnus-group) (defface gnus-group-mail-3-empty-face '((((class color) @@ -575,7 +594,8 @@ be set in `.emacs' instead." (:foreground "magenta4")) (t ())) - "Level 3 empty mailgroup face.") + "Level 3 empty mailgroup face." + :group 'gnus-group) (defface gnus-group-mail-low-face '((((class color) @@ -586,7 +606,8 @@ be set in `.emacs' instead." (:foreground "DeepPink4" :bold t)) (t (:bold t))) - "Low level mailgroup face.") + "Low level mailgroup face." + :group 'gnus-group) (defface gnus-group-mail-low-empty-face '((((class color) @@ -597,18 +618,21 @@ be set in `.emacs' instead." (:foreground "DeepPink4")) (t (:bold t))) - "Low level empty mailgroup face.") + "Low level empty mailgroup face." + :group 'gnus-group) ;; Summary mode faces. (defface gnus-summary-selected-face '((t (:underline t))) - "Face used for selected articles.") + "Face used for selected articles." + :group 'gnus-summary) (defface gnus-summary-cancelled-face '((((class color)) (:foreground "yellow" :background "black"))) - "Face used for cancelled articles.") + "Face used for cancelled articles." + :group 'gnus-summary) (defface gnus-summary-high-ticked-face '((((class color) @@ -619,7 +643,8 @@ be set in `.emacs' instead." (:foreground "firebrick" :bold t)) (t (:bold t))) - "Face used for high interest ticked articles.") + "Face used for high interest ticked articles." + :group 'gnus-summary) (defface gnus-summary-low-ticked-face '((((class color) @@ -630,7 +655,8 @@ be set in `.emacs' instead." (:foreground "firebrick" :italic t)) (t (:italic t))) - "Face used for low interest ticked articles.") + "Face used for low interest ticked articles." + :group 'gnus-summary) (defface gnus-summary-normal-ticked-face '((((class color) @@ -641,7 +667,8 @@ be set in `.emacs' instead." (:foreground "firebrick")) (t ())) - "Face used for normal interest ticked articles.") + "Face used for normal interest ticked articles." + :group 'gnus-summary) (defface gnus-summary-high-ancient-face '((((class color) @@ -652,7 +679,8 @@ be set in `.emacs' instead." (:foreground "RoyalBlue" :bold t)) (t (:bold t))) - "Face used for high interest ancient articles.") + "Face used for high interest ancient articles." + :group 'gnus-summary) (defface gnus-summary-low-ancient-face '((((class color) @@ -663,7 +691,8 @@ be set in `.emacs' instead." (:foreground "RoyalBlue" :italic t)) (t (:italic t))) - "Face used for low interest ancient articles.") + "Face used for low interest ancient articles." + :group 'gnus-summary) (defface gnus-summary-normal-ancient-face '((((class color) @@ -674,7 +703,8 @@ be set in `.emacs' instead." (:foreground "RoyalBlue")) (t ())) - "Face used for normal interest ancient articles.") + "Face used for normal interest ancient articles." + :group 'gnus-summary) (defface gnus-summary-high-undownloaded-face '((((class color) @@ -683,7 +713,8 @@ be set in `.emacs' instead." (((class color) (background dark)) (:bold t :foreground "LightGray")) (t (:inverse-video t :bold t))) - "Face used for high interest uncached articles.") + "Face used for high interest uncached articles." + :group 'gnus-summary) (defface gnus-summary-low-undownloaded-face '((((class color) @@ -692,7 +723,8 @@ be set in `.emacs' instead." (((class color) (background dark)) (:italic t :foreground "LightGray" :bold nil)) (t (:inverse-video t :italic t))) - "Face used for low interest uncached articles.") + "Face used for low interest uncached articles." + :group 'gnus-summary) (defface gnus-summary-normal-undownloaded-face '((((class color) @@ -701,22 +733,26 @@ be set in `.emacs' instead." (((class color) (background dark)) (:foreground "LightGray" :bold nil)) (t (:inverse-video t))) - "Face used for normal interest uncached articles.") + "Face used for normal interest uncached articles." + :group 'gnus-summary) (defface gnus-summary-high-unread-face '((t (:bold t))) - "Face used for high interest unread articles.") + "Face used for high interest unread articles." + :group 'gnus-summary) (defface gnus-summary-low-unread-face '((t (:italic t))) - "Face used for low interest unread articles.") + "Face used for low interest unread articles." + :group 'gnus-summary) (defface gnus-summary-normal-unread-face '((t ())) - "Face used for normal interest unread articles.") + "Face used for normal interest unread articles." + :group 'gnus-summary) (defface gnus-summary-high-read-face '((((class color) @@ -729,7 +765,8 @@ be set in `.emacs' instead." :bold t)) (t (:bold t))) - "Face used for high interest read articles.") + "Face used for high interest read articles." + :group 'gnus-summary) (defface gnus-summary-low-read-face '((((class color) @@ -742,7 +779,8 @@ be set in `.emacs' instead." :italic t)) (t (:italic t))) - "Face used for low interest read articles.") + "Face used for low interest read articles." + :group 'gnus-summary) (defface gnus-summary-normal-read-face '((((class color) @@ -753,7 +791,8 @@ be set in `.emacs' instead." (:foreground "DarkGreen")) (t ())) - "Face used for normal interest read articles.") + "Face used for normal interest read articles." + :group 'gnus-summary) ;;; @@ -806,7 +845,8 @@ be set in `.emacs' instead." (:foreground "#888888")) (t ())) - "Face for the splash screen.") + "Face for the splash screen." + :group 'gnus) (defun gnus-splash () (save-excursion diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index c07b6c34d3c..eaac4e390a9 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -842,7 +842,8 @@ the signature is inserted." (set-keymap-parent map minibuffer-local-map) map) "Keymap for `message-read-from-minibuffer'." - :version "22.1") + :version "22.1" + :group 'message-various) ;;;###autoload (defcustom message-citation-line-function 'message-insert-citation-line diff --git a/lisp/gnus/sieve-manage.el b/lisp/gnus/sieve-manage.el index 5b7ef9a99fb..d43808d788a 100644 --- a/lisp/gnus/sieve-manage.el +++ b/lisp/gnus/sieve-manage.el @@ -86,22 +86,27 @@ (defcustom sieve-manage-log "*sieve-manage-log*" "Name of buffer for managesieve session trace." - :type 'string) + :type 'string + :group 'sieve-manage) (defcustom sieve-manage-default-user (user-login-name) "Default username to use." - :type 'string) + :type 'string + :group 'sieve-manage) (defcustom sieve-manage-server-eol "\r\n" "The EOL string sent from the server." - :type 'string) + :type 'string + :group 'sieve-manage) (defcustom sieve-manage-client-eol "\r\n" "The EOL string we send to the server." - :type 'string) + :type 'string + :group 'sieve-manage) (defcustom sieve-manage-streams '(network starttls shell) - "Priority of streams to consider when opening connection to server.") + "Priority of streams to consider when opening connection to server." + :group 'sieve-manage) (defcustom sieve-manage-stream-alist '((network sieve-manage-network-p sieve-manage-network-open) @@ -113,10 +118,12 @@ NAME names the stream, CHECK is a function returning non-nil if the server support the stream and OPEN is a function for opening the -stream.") +stream." + :group 'sieve-manage) (defcustom sieve-manage-authenticators '(cram-md5 plain) - "Priority of authenticators to consider when authenticating to server.") + "Priority of authenticators to consider when authenticating to server." + :group 'sieve-manage) (defcustom sieve-manage-authenticator-alist '((cram-md5 sieve-manage-cram-md5-p sieve-manage-cram-md5-auth) @@ -127,11 +134,13 @@ stream.") NAME names the authenticator. CHECK is a function returning non-nil if the server support the authenticator and AUTHENTICATE is a function -for doing the actual authentication.") +for doing the actual authentication." + :group 'sieve-manage) (defcustom sieve-manage-default-port 2000 "Default port number for managesieve protocol." - :type 'integer) + :type 'integer + :group 'sieve-manage) ;; Internal variables: diff --git a/lisp/gnus/sieve-mode.el b/lisp/gnus/sieve-mode.el index e303e8e70b5..c4d019da6df 100644 --- a/lisp/gnus/sieve-mode.el +++ b/lisp/gnus/sieve-mode.el @@ -1,5 +1,5 @@ ;;; sieve-mode.el --- Sieve code editing commands for Emacs -;; Copyright (C) 2001, 2003 Free Software Foundation, Inc. +;; Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. ;; Author: Simon Josefsson @@ -75,7 +75,8 @@ (((class color) (background light)) (:foreground "Orchid")) (((class color) (background dark)) (:foreground "LightSteelBlue")) (t (:bold t))) - "Face used for Sieve Control Commands.") + "Face used for Sieve Control Commands." + :group 'sieve) (defvar sieve-action-commands-face 'sieve-action-commands-face "Face name used for Sieve Action Commands.") @@ -85,7 +86,8 @@ (((class color) (background light)) (:foreground "Blue")) (((class color) (background dark)) (:foreground "LightSkyBlue")) (t (:inverse-video t :bold t))) - "Face used for Sieve Action Commands.") + "Face used for Sieve Action Commands." + :group 'sieve) (defvar sieve-test-commands-face 'sieve-test-commands-face "Face name used for Sieve Test Commands.") @@ -99,7 +101,8 @@ (((class color) (background light)) (:foreground "CadetBlue")) (((class color) (background dark)) (:foreground "Aquamarine")) (t (:bold t :underline t))) - "Face used for Sieve Test Commands.") + "Face used for Sieve Test Commands." + :group 'sieve) (defvar sieve-tagged-arguments-face 'sieve-tagged-arguments-face "Face name used for Sieve Tagged Arguments.") @@ -111,7 +114,8 @@ (((class color) (background light)) (:foreground "Purple")) (((class color) (background dark)) (:foreground "Cyan")) (t (:bold t))) - "Face used for Sieve Tagged Arguments.") + "Face used for Sieve Tagged Arguments." + :group 'sieve) (defconst sieve-font-lock-keywords diff --git a/lisp/gnus/smime.el b/lisp/gnus/smime.el index cd921719045..399c0678c41 100644 --- a/lisp/gnus/smime.el +++ b/lisp/gnus/smime.el @@ -122,7 +122,8 @@ (eval-when-compile (require 'cl)) (defgroup smime nil - "S/MIME configuration.") + "S/MIME configuration." + :group 'mime) (defcustom smime-keys nil "*Map mail addresses to a file containing Certificate (and private key). diff --git a/lisp/gnus/spam-report.el b/lisp/gnus/spam-report.el index 59119dc5438..e988199755d 100644 --- a/lisp/gnus/spam-report.el +++ b/lisp/gnus/spam-report.el @@ -1,5 +1,5 @@ ;;; spam-report.el --- Reporting spam -;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Teodor Zlatanov ;; Keywords: network @@ -35,7 +35,9 @@ (autoload 'mm-url-insert "mm-url")) (defgroup spam-report nil - "Spam reporting configuration.") + "Spam reporting configuration." + :group 'mail + :group 'news) (defcustom spam-report-gmane-regex nil "Regexp matching Gmane newsgroups, e.g. \"^nntp\\+.*:gmane\\.\" diff --git a/lisp/gnus/spam.el b/lisp/gnus/spam.el index e36bf8b26c8..5e73c2deb2e 100644 --- a/lisp/gnus/spam.el +++ b/lisp/gnus/spam.el @@ -1,5 +1,5 @@ ;;; spam.el --- Identifying spam -;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; Keywords: network @@ -77,7 +77,9 @@ (defgroup spam nil "Spam configuration." - :version "22.1") + :version "22.1" + :group 'mail + :group 'news) (defcustom spam-directory (nnheader-concat gnus-directory "spam/") "Directory for spam whitelists and blacklists." @@ -308,7 +310,8 @@ All unmarked article in such group receive the spam mark on group entry." (((class color) (background light)) (:foreground "ivory4")) (t :inverse-video t)) - "Face for spam-marked articles.") + "Face for spam-marked articles." + :group 'spam) (defcustom spam-face 'spam-face "Face for spam-marked articles." From 30d33965d03c899e3558a4ae715098d5803e771a Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 15:11:23 +0000 Subject: [PATCH 047/294] (todo-mode): Use kill-all-local-variables and run-mode-hooks. --- lisp/calendar/todo-mode.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el index 0caedee7c8a..132f42369c6 100644 --- a/lisp/calendar/todo-mode.el +++ b/lisp/calendar/todo-mode.el @@ -904,11 +904,12 @@ Number of entries for each category is given by `todo-print-priorities'." \\{todo-mode-map}" (interactive) + (kill-all-local-variables) (setq major-mode 'todo-mode) (setq mode-name "TODO") (use-local-map todo-mode-map) (easy-menu-add todo-menu) - (run-hooks 'todo-mode-hook)) + (run-mode-hooks 'todo-mode-hook)) (eval-when-compile (defvar date) From d47f3fc56f94c8e4d118fe4ad8ee7124c8bc7c9b Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 15:13:09 +0000 Subject: [PATCH 048/294] (reb-mode): Use run-mode-hooks. --- lisp/emacs-lisp/re-builder.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el index a2aed39d00a..8a53c202ed8 100644 --- a/lisp/emacs-lisp/re-builder.el +++ b/lisp/emacs-lisp/re-builder.el @@ -254,7 +254,7 @@ Except for Lisp syntax this is the same as `reb-regexp'.") mode-name "RE Builder") (use-local-map reb-mode-map) (reb-mode-common) - (run-hooks 'reb-mode-hook)) + (run-mode-hooks 'reb-mode-hook)) (define-derived-mode reb-lisp-mode emacs-lisp-mode "RE Builder Lisp" From ec965cd42b8d90fadeb9c21510c2149163996058 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 15:14:23 +0000 Subject: [PATCH 049/294] (vi-mode-setup): Use run-mode-hooks. --- lisp/emulation/vi.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emulation/vi.el b/lisp/emulation/vi.el index 70a52617431..cd0092e5e87 100644 --- a/lisp/emulation/vi.el +++ b/lisp/emulation/vi.el @@ -403,7 +403,7 @@ form that is ready to be `apply'ed.") (make-local-variable 'vi-mode-old-mode-name) (make-local-variable 'vi-mode-old-major-mode) (make-local-variable 'vi-mode-old-case-fold) - (run-hooks 'vi-mode-hook)) + (run-mode-hooks 'vi-mode-hook)) ;;;###autoload (defun vi-mode () From b98d0467653dc789c1dfa1080603f66a98b5d347 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 15:14:51 +0000 Subject: [PATCH 050/294] (wordstar-mode): Use run-mode-hooks. --- lisp/emulation/ws-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emulation/ws-mode.el b/lisp/emulation/ws-mode.el index 54be36299c5..482753f111e 100644 --- a/lisp/emulation/ws-mode.el +++ b/lisp/emulation/ws-mode.el @@ -294,7 +294,7 @@ The key bindings are: (use-local-map wordstar-mode-map) (setq mode-name "WordStar") (setq major-mode 'wordstar-mode) - (run-hooks 'wordstar-mode-hook)) + (run-mode-hooks 'wordstar-mode-hook)) (defun wordstar-center-paragraph () From 5c3066b81a5fd5a57e2bf28866cf013ffb4e47c7 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 15:15:18 +0000 Subject: [PATCH 051/294] (eshell-mode): Use run-mode-hooks. --- lisp/eshell/esh-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el index 54d4c4acb9e..51b9f71b75d 100644 --- a/lisp/eshell/esh-mode.el +++ b/lisp/eshell/esh-mode.el @@ -435,7 +435,7 @@ This is used by `eshell-watch-for-password-prompt'." (if eshell-first-time-p (run-hooks 'eshell-first-time-mode-hook)) - (run-hooks 'eshell-mode-hook) + (run-mode-hooks 'eshell-mode-hook) (run-hooks 'eshell-post-command-hook)) (put 'eshell-mode 'mode-class 'special) From 0124295f1708bf9b5baa71a460cca60b3cf2577a Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 15:16:00 +0000 Subject: [PATCH 052/294] Use run-mode-hooks. --- lisp/international/swedish.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/international/swedish.el b/lisp/international/swedish.el index 7f300da9c45..29ef995a6d1 100644 --- a/lisp/international/swedish.el +++ b/lisp/international/swedish.el @@ -131,7 +131,7 @@ Leaves point just after the word that looks Swedish." ; (setq major-mode 'swedish-mode) ; (setq local-abbrev-table swedish-mode-abbrev-table) ; (set-syntax-table text-mode-syntax-table) -; (run-hooks 'text-mode-hook)) +; (run-mode-hooks 'text-mode-hook)) ;(defun indented-swedish-mode () ; "Major mode for editing indented Swedish text intended for @@ -149,7 +149,7 @@ Leaves point just after the word that looks Swedish." ; (use-local-map indented-text-mode-map) ; (setq mode-name "Indented Swedish") ; (setq major-mode 'indented-swedish-mode) -; (run-hooks 'text-mode-hook)) +; (run-mode-hooks 'text-mode-hook)) (provide 'swedish) From 6f9402ebb199fd60e631131cf48e8950f3dedebb Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 15:16:48 +0000 Subject: [PATCH 053/294] (rmail-mode): Use run-mode-hooks. --- lisp/mail/rmail.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 591ebad2b68..33d71a1d502 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -1156,7 +1156,7 @@ Instead, these commands are available: (when rmail-display-summary (rmail-summary)) (rmail-construct-io-menu)) - (run-hooks 'rmail-mode-hook))) + (run-mode-hooks 'rmail-mode-hook))) (defun rmail-mode-2 () (kill-all-local-variables) From 7f9b6634a85fd33b4bef7bc1ffdc9644f8948797 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 15:17:14 +0000 Subject: [PATCH 054/294] (rmail-edit-mode): Use run-mode-hooks. --- lisp/mail/rmailedit.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/mail/rmailedit.el b/lisp/mail/rmailedit.el index a057c019b82..ceea389cea1 100644 --- a/lisp/mail/rmailedit.el +++ b/lisp/mail/rmailedit.el @@ -68,7 +68,7 @@ This functions runs the normal hook `rmail-edit-mode-hook'. (save-excursion (set-buffer rmail-summary-buffer) (rmail-summary-disable))) - (run-hooks 'rmail-edit-mode-hook)) + (run-mode-hooks 'rmail-edit-mode-hook)) (defvar rmail-old-pruned nil) (put 'rmail-old-pruned 'permanent-local t) From 46b248505c7ce14349c4c66adb158244ce9285b3 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 15:17:48 +0000 Subject: [PATCH 055/294] (rmail-summary-mode): Use run-mode-hooks. --- lisp/mail/rmailsum.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index f551239907d..9c647126d5c 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el @@ -760,7 +760,7 @@ Commands for sorting the summary: (make-local-variable 'font-lock-defaults) (setq font-lock-defaults '(rmail-summary-font-lock-keywords t)) (rmail-summary-enable) - (run-hooks 'rmail-summary-mode-hook)) + (run-mode-hooks 'rmail-summary-mode-hook)) ;; Summary features need to be disabled during edit mode. (defun rmail-summary-disable () From ca11f4a867c4d68badfed630c36c2b7a28d58337 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 15:20:30 +0000 Subject: [PATCH 056/294] (sc-electric-mode): Use run-mode-hooks. --- lisp/mail/supercite.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/mail/supercite.el b/lisp/mail/supercite.el index d9a9d78d0b9..f37988e8a3f 100644 --- a/lisp/mail/supercite.el +++ b/lisp/mail/supercite.el @@ -1667,7 +1667,7 @@ header style to use, unless not supplied or invalid, in which case (major-mode 'sc-electric-mode)) (use-local-map sc-electric-mode-map) (sc-eref-show sc-eref-style) - (run-hooks 'sc-electric-mode-hook) + (run-mode-hooks 'sc-electric-mode-hook) (recursive-edit) ))) From 05617e8a701468b7912b48adf81236fbcd27674d Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 15:21:29 +0000 Subject: [PATCH 057/294] (mh-pick-mode): Remove spurious run-hooks. --- lisp/mh-e/mh-pick.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lisp/mh-e/mh-pick.el b/lisp/mh-e/mh-pick.el index 7b0ae4bafdf..f15bef7ec4d 100644 --- a/lisp/mh-e/mh-pick.el +++ b/lisp/mh-e/mh-pick.el @@ -140,8 +140,7 @@ with no arguments, upon entry to this mode. (make-local-variable 'mh-searching-function) (make-local-variable 'mh-help-messages) (easy-menu-add mh-pick-menu) - (setq mh-help-messages mh-pick-mode-help-messages) - (run-hooks 'mh-pick-mode-hook)) + (setq mh-help-messages mh-pick-mode-help-messages)) ;;;###mh-autoload (defun mh-pick-do-search () From cf8402ae917bb45098ef2cdf07064a4e718651c3 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 15:22:06 +0000 Subject: [PATCH 058/294] (mh-show-mode): Remove spurious run-hooks. --- lisp/mh-e/mh-utils.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el index a7ba9311403..16ae64b1549 100644 --- a/lisp/mh-e/mh-utils.el +++ b/lisp/mh-e/mh-utils.el @@ -1129,8 +1129,7 @@ See also `mh-folder-mode'. (make-local-variable 'mh-show-folder-buffer) (buffer-disable-undo) (setq buffer-read-only t) - (use-local-map mh-show-mode-map) - (run-hooks 'mh-show-mode-hook)) + (use-local-map mh-show-mode-map)) (defun mh-show-addr () "Use `goto-address'." From 57f9923ee76a501ac930a014197a3dd803028d3c Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 15:23:59 +0000 Subject: [PATCH 059/294] * net/eudc.el (eudc-mode): * net/quickurl.el (quickurl-list-mode): * net/snmp-mode.el (snmp-mode, snmpv2-mode): Use run-mode-hooks. --- lisp/net/eudc.el | 3 +-- lisp/net/quickurl.el | 2 +- lisp/net/snmp-mode.el | 6 ++---- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/lisp/net/eudc.el b/lisp/net/eudc.el index b279715329f..f234ab059d5 100644 --- a/lisp/net/eudc.el +++ b/lisp/net/eudc.el @@ -670,8 +670,7 @@ These are the special commands of EUDC mode: (if eudc-emacs-p (easy-menu-define eudc-emacs-menu eudc-mode-map "" (eudc-menu)) (setq mode-popup-menu (eudc-menu))) - (run-hooks 'eudc-mode-hook) - ) + (run-mode-hooks 'eudc-mode-hook)) ;;}}} diff --git a/lisp/net/quickurl.el b/lisp/net/quickurl.el index ebf4dcd3618..d2ff0140dce 100644 --- a/lisp/net/quickurl.el +++ b/lisp/net/quickurl.el @@ -458,7 +458,7 @@ The key bindings for `quickurl-list-mode' are: (use-local-map quickurl-list-mode-map) (setq major-mode 'quickurl-list-mode mode-name "quickurl list") - (run-hooks 'quickurl-list-mode-hook) + (run-mode-hooks 'quickurl-list-mode-hook) (setq buffer-read-only t truncate-lines t)) diff --git a/lisp/net/snmp-mode.el b/lisp/net/snmp-mode.el index 73fef1452a0..f41dd845261 100644 --- a/lisp/net/snmp-mode.el +++ b/lisp/net/snmp-mode.el @@ -393,8 +393,7 @@ Turning on snmp-mode runs the hooks in `snmp-common-mode-hook', then (setq snmp-mode-status-list snmp-rfc1212-status) ;; Run hooks - (run-hooks 'snmp-common-mode-hook) - (run-hooks 'snmp-mode-hook)) + (run-mode-hooks 'snmp-common-mode-hook 'snmp-mode-hook)) ;;;###autoload @@ -429,8 +428,7 @@ then `snmpv2-mode-hook'." (setq snmp-mode-status-list snmp-rfc1902-status) ;; Run hooks - (run-hooks 'snmp-common-mode-hook) - (run-hooks 'snmpv2-mode-hook)) + (run-mode-hooks 'snmp-common-mode-hook 'snmpv2-mode-hook)) ;;;---------------------------------------------------------------------------- From e1c31ddba8d6832cee2fe0b565fa0414b91819b9 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 15:24:51 +0000 Subject: [PATCH 060/294] * obsolete/ooutline.el (outline-mode): * obsolete/options.el (Edit-options-mode): * obsolete/rnews.el (news-mode): * obsolete/rnewspost.el (news-reply-mode): Use run-mode-hooks. --- lisp/obsolete/ooutline.el | 2 +- lisp/obsolete/options.el | 2 +- lisp/obsolete/rnews.el | 2 +- lisp/obsolete/rnewspost.el | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/obsolete/ooutline.el b/lisp/obsolete/ooutline.el index 6b595b86297..0218d097b64 100644 --- a/lisp/obsolete/ooutline.el +++ b/lisp/obsolete/ooutline.el @@ -224,7 +224,7 @@ Turning on outline mode calls the value of `text-mode-hook' and then of (setq font-lock-defaults '(outline-font-lock-keywords t)) (make-local-variable 'change-major-mode-hook) (add-hook 'change-major-mode-hook 'show-all) - (run-hooks 'text-mode-hook 'outline-mode-hook)) + (run-mode-hooks 'text-mode-hook 'outline-mode-hook)) (defcustom outline-minor-mode-prefix "\C-c@" "*Prefix key to use for Outline commands in Outline minor mode. diff --git a/lisp/obsolete/options.el b/lisp/obsolete/options.el index 34d7e532d1a..5ea14678d0b 100644 --- a/lisp/obsolete/options.el +++ b/lisp/obsolete/options.el @@ -109,7 +109,7 @@ For convenience, the characters \\[backward-paragraph] and \\[forward-paragraph] (setq truncate-lines t) (setq major-mode 'Edit-options-mode) (setq mode-name "Options") - (run-hooks 'Edit-options-mode-hook)) + (run-mode-hooks 'Edit-options-mode-hook)) (defun Edit-options-set () (interactive) (Edit-options-modify diff --git a/lisp/obsolete/rnews.el b/lisp/obsolete/rnews.el index cb2ed034ffc..7a546aa3081 100644 --- a/lisp/obsolete/rnews.el +++ b/lisp/obsolete/rnews.el @@ -375,7 +375,7 @@ U unsubscribe from specified newsgroup." (set-syntax-table text-mode-syntax-table) (use-local-map news-mode-map) (setq local-abbrev-table text-mode-abbrev-table) - (run-hooks 'news-mode-hook)) + (run-mode-hooks 'news-mode-hook)) (defun string-subst-char (new old string) (let (index) diff --git a/lisp/obsolete/rnewspost.el b/lisp/obsolete/rnewspost.el index 1b7623f78ae..e1a378c6fb6 100644 --- a/lisp/obsolete/rnewspost.el +++ b/lisp/obsolete/rnewspost.el @@ -130,7 +130,7 @@ C-c C-r caesar rotate all letters by 13 places in the article's body (rot13)." (setq mode-name "News Reply") (make-local-variable 'paragraph-separate) (make-local-variable 'paragraph-start) - (run-hooks 'text-mode-hook 'news-reply-mode-hook)) + (run-mode-hooks 'text-mode-hook 'news-reply-mode-hook)) (defvar news-reply-yank-from "" "Save `From:' field for `news-reply-yank-original'.") From c83c96545bef192935a4681aa7a9361c8454ea5a Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 15:26:09 +0000 Subject: [PATCH 061/294] * play/5x5.el (5x5-mode): * play/decipher.el (decipher-mode, decipher-stats-mode): * play/gomoku.el (gomoku-mode): * play/snake.el (snake-mode): * play/solitaire.el (solitaire-mode): * play/tetris.el (tetris-mode): Use run-mode-hooks. * play/landmark.el (lm-mode): * play/mpuz.el (mpuz-mode): Use kill-all-local-variables and run-mode-hooks. --- lisp/play/5x5.el | 4 ++-- lisp/play/decipher.el | 4 ++-- lisp/play/gomoku.el | 2 +- lisp/play/landmark.el | 3 ++- lisp/play/mpuz.el | 3 ++- lisp/play/snake.el | 2 +- lisp/play/solitaire.el | 2 +- lisp/play/tetris.el | 2 +- 8 files changed, 12 insertions(+), 10 deletions(-) diff --git a/lisp/play/5x5.el b/lisp/play/5x5.el index a7860244a8a..f012f132352 100644 --- a/lisp/play/5x5.el +++ b/lisp/play/5x5.el @@ -178,10 +178,10 @@ The key bindings for 5x5-mode are: (use-local-map 5x5-mode-map) (setq major-mode '5x5-mode mode-name "5x5") - (run-hooks '5x5-mode-hook) + (run-mode-hooks '5x5-mode-hook) (setq buffer-read-only t truncate-lines t) - (buffer-disable-undo (current-buffer))) + (buffer-disable-undo)) ;;;###autoload (defun 5x5 (&optional size) diff --git a/lisp/play/decipher.el b/lisp/play/decipher.el index f314a10a9e2..9ef8d0fd01f 100644 --- a/lisp/play/decipher.el +++ b/lisp/play/decipher.el @@ -314,7 +314,7 @@ The most useful commands are: (lambda () (setq buffer-read-only nil buffer-undo-list nil)) nil t) - (run-hooks 'decipher-mode-hook) + (run-mode-hooks 'decipher-mode-hook) (setq buffer-read-only t)) (put 'decipher-mode 'mode-class 'special) @@ -998,7 +998,7 @@ Creates the statistics buffer if it doesn't exist." major-mode 'decipher-stats-mode mode-name "Decipher-Stats") (use-local-map decipher-stats-mode-map) - (run-hooks 'decipher-stats-mode-hook)) + (run-mode-hooks 'decipher-stats-mode-hook)) (put 'decipher-stats-mode 'mode-class 'special) ;;-------------------------------------------------------------------- diff --git a/lisp/play/gomoku.el b/lisp/play/gomoku.el index b640c1bbbd8..69ec07496d5 100644 --- a/lisp/play/gomoku.el +++ b/lisp/play/gomoku.el @@ -206,7 +206,7 @@ is non-nil." (make-local-variable 'font-lock-defaults) (setq font-lock-defaults '(gomoku-font-lock-keywords t)) (toggle-read-only t) - (run-hooks 'gomoku-mode-hook)) + (run-mode-hooks 'gomoku-mode-hook)) ;;; ;;; THE BOARD. diff --git a/lisp/play/landmark.el b/lisp/play/landmark.el index 87ebd88fd58..3dc5e8ad320 100644 --- a/lisp/play/landmark.el +++ b/lisp/play/landmark.el @@ -248,6 +248,7 @@ Other useful commands: Entry to this mode calls the value of `lm-mode-hook' if that value is non-nil. One interesting value is `turn-on-font-lock'." (interactive) + (kill-all-local-variables) (setq major-mode 'lm-mode mode-name "Lm") (lm-display-statistics) @@ -255,7 +256,7 @@ is non-nil. One interesting value is `turn-on-font-lock'." (make-local-variable 'font-lock-defaults) (setq font-lock-defaults '(lm-font-lock-keywords t)) (toggle-read-only t) - (run-hooks 'lm-mode-hook)) + (run-mode-hooks 'lm-mode-hook)) ;;;_ + THE SCORE TABLE. diff --git a/lisp/play/mpuz.el b/lisp/play/mpuz.el index a637a2e98d1..849e87a28b0 100644 --- a/lisp/play/mpuz.el +++ b/lisp/play/mpuz.el @@ -129,11 +129,12 @@ To leave the game to do other editing work, just switch buffers. Then you may resume the game with M-x mpuz. You may abort a game by typing \\\\[mpuz-offer-abort]." (interactive) + (kill-all-local-variables) (setq major-mode 'mpuz-mode mode-name "Mult Puzzle" tab-width 30) (use-local-map mpuz-mode-map) - (run-hooks 'mpuz-mode-hook)) + (run-mode-hooks 'mpuz-mode-hook)) ;; Some variables for statistics diff --git a/lisp/play/snake.el b/lisp/play/snake.el index 71c460feae5..e676d734755 100644 --- a/lisp/play/snake.el +++ b/lisp/play/snake.el @@ -385,7 +385,7 @@ Snake mode keybindings: (gamegrid-init (snake-display-options)) - (run-hooks 'snake-mode-hook)) + (run-mode-hooks 'snake-mode-hook)) ;;;###autoload (defun snake () diff --git a/lisp/play/solitaire.el b/lisp/play/solitaire.el index 1dc57b61c65..22dcea47599 100644 --- a/lisp/play/solitaire.el +++ b/lisp/play/solitaire.el @@ -105,7 +105,7 @@ The usual mnemonic keys move the cursor around the board; in addition, (setq truncate-lines t) (setq major-mode 'solitaire-mode) (setq mode-name "Solitaire") - (run-hooks 'solitaire-mode-hook)) + (run-mode-hooks 'solitaire-mode-hook)) (defvar solitaire-stones 0 "Counter for the stones that are still there.") diff --git a/lisp/play/tetris.el b/lisp/play/tetris.el index 045534c2cea..5b8746bb1d7 100644 --- a/lisp/play/tetris.el +++ b/lisp/play/tetris.el @@ -616,7 +616,7 @@ tetris-mode keybindings: (gamegrid-init (tetris-display-options)) - (run-hooks 'tetris-mode-hook)) + (run-mode-hooks 'tetris-mode-hook)) ;;;###autoload (defun tetris () From 4b66bdf054026e8e07f935fe329497a03a3d3826 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 15:28:32 +0000 Subject: [PATCH 062/294] *** empty log message *** --- lisp/ChangeLog | 37 +++++++++++++++++++++++++++++++------ lisp/mh-e/ChangeLog | 5 +++++ 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index dbd80ea6f38..057ed951994 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,8 +1,3 @@ -2005-05-26 Mark A. Hershberger - - * xml.el (xml-substitute-special): Don't die for undefined xml - entities. - 2005-05-26 Lute Kamstra * arc-mode.el (archive-mode): @@ -18,14 +13,36 @@ * descr-text.el (describe-text-mode): * ebuff-menu.el (Electric-buffer-menu-mode): * ediff-util.el (ediff-mode): + * emacs-lisp/re-builder.el (reb-mode): + * emulation/vi.el (vi-mode-setup): + * emulation/ws-mode.el (wordstar-mode): + * eshell/esh-mode.el (eshell-mode): * forms.el (forms-mode): * help-mode.el (help-mode): * hexl.el (hexl-mode): * ibuffer.el (ibuffer-mode): * ielm.el (inferior-emacs-lisp-mode): * info.el (Info-mode, Info-edit-mode): + * international/swedish.el: * ledit.el (ledit-from-lisp-mode): * locate.el (locate-mode): + * mail/rmail.el (rmail-mode): + * mail/rmailedit.el (rmail-edit-mode): + * mail/rmailsum.el (rmail-summary-mode): + * mail/supercite.el (sc-electric-mode): + * net/eudc.el (eudc-mode): + * net/quickurl.el (quickurl-list-mode): + * net/snmp-mode.el (snmp-mode, snmpv2-mode): + * obsolete/ooutline.el (outline-mode): + * obsolete/options.el (Edit-options-mode): + * obsolete/rnews.el (news-mode): + * obsolete/rnewspost.el (news-reply-mode): + * play/5x5.el (5x5-mode): + * play/decipher.el (decipher-mode, decipher-stats-mode): + * play/gomoku.el (gomoku-mode): + * play/snake.el (snake-mode): + * play/solitaire.el (solitaire-mode): + * play/tetris.el (tetris-mode): * replace.el (occur-mode): * ses.el (ses-mode): * simple.el (completion-list-mode): @@ -38,11 +55,19 @@ * wid-browse.el (widget-browse-mode): Use run-mode-hooks. * array.el (array-mode): - * man.el (Man-mode): Use kill-all-local-variables and + * calendar/todo-mode.el (todo-mode): + * man.el (Man-mode): + * play/landmark.el (lm-mode): + * play/mpuz.el (mpuz-mode): Use kill-all-local-variables and run-mode-hooks. * subr.el (delay-mode-hooks): Specify indentation. +2005-05-26 Mark A. Hershberger + + * xml.el (xml-substitute-special): Don't die for undefined xml + entities. + 2005-05-26 Jay Belanger * calc/calc-prog.el (calc-user-define-edit): Don't find substring diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index 92f997d7b4a..394331fbcd2 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog @@ -1,3 +1,8 @@ +2005-05-26 Lute Kamstra + + * mh-utils.el (mh-show-mode): + * mh-pick.el (mh-pick-mode): Remove spurious run-hooks. + 2005-04-08 Dan Nicolaescu * mh-customize.el (mh-speedbar-selected-folder-face): Special case From 9a9691963ddcdcbe3aeba52c591b728b73e8796c Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 16:43:37 +0000 Subject: [PATCH 063/294] * progmodes/ada-mode.el (ada-mode): * progmodes/antlr-mode.el (antlr-mode): * progmodes/autoconf.el (autoconf-mode): * progmodes/dcl-mode.el (dcl-mode): * progmodes/delphi.el (delphi-mode): * progmodes/ebrowse.el (ebrowse-tree-mode) (ebrowse-electric-list-mode, ebrowse-member-mode) (ebrowse-electric-position-mode): * progmodes/f90.el (f90-mode): * progmodes/fortran.el (fortran-mode): * progmodes/icon.el (icon-mode): * progmodes/idlw-help.el (idlwave-help-mode): * progmodes/idlw-shell.el (idlwave-shell-mode): * progmodes/idlwave.el (idlwave-mode): * progmodes/inf-lisp.el (inferior-lisp-mode): * progmodes/m4-mode.el (m4-mode): * progmodes/meta-mode.el (metafont-mode, metapost-mode): * progmodes/modula2.el (modula-2-mode): * progmodes/octave-inf.el (inferior-octave-mode): * progmodes/octave-mod.el (octave-mode): * progmodes/pascal.el (pascal-mode): * progmodes/sh-script.el (sh-mode): * progmodes/sql.el (sql-mode, sql-interactive-mode): * progmodes/vhdl-mode.el (vhdl-mode): * progmodes/xscheme.el (scheme-interaction-mode): Use run-mode-hooks. --- lisp/ChangeLog | 25 +++++++++++++++++++++++++ lisp/progmodes/ada-mode.el | 2 +- lisp/progmodes/antlr-mode.el | 2 +- lisp/progmodes/autoconf.el | 2 +- lisp/progmodes/dcl-mode.el | 2 +- lisp/progmodes/delphi.el | 2 +- lisp/progmodes/ebrowse.el | 8 ++++---- lisp/progmodes/f90.el | 2 +- lisp/progmodes/fortran.el | 2 +- lisp/progmodes/icon.el | 2 +- lisp/progmodes/idlw-help.el | 2 +- lisp/progmodes/idlw-shell.el | 2 +- lisp/progmodes/idlwave.el | 2 +- lisp/progmodes/inf-lisp.el | 2 +- lisp/progmodes/m4-mode.el | 2 +- lisp/progmodes/meta-mode.el | 4 ++-- lisp/progmodes/modula2.el | 2 +- lisp/progmodes/octave-inf.el | 2 +- lisp/progmodes/octave-mod.el | 2 +- lisp/progmodes/pascal.el | 2 +- lisp/progmodes/sh-script.el | 2 +- lisp/progmodes/sql.el | 4 ++-- lisp/progmodes/vhdl-mode.el | 2 +- lisp/progmodes/xscheme.el | 2 +- 24 files changed, 53 insertions(+), 28 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 057ed951994..70a22f6123e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -43,6 +43,31 @@ * play/snake.el (snake-mode): * play/solitaire.el (solitaire-mode): * play/tetris.el (tetris-mode): + * progmodes/ada-mode.el (ada-mode): + * progmodes/antlr-mode.el (antlr-mode): + * progmodes/autoconf.el (autoconf-mode): + * progmodes/dcl-mode.el (dcl-mode): + * progmodes/delphi.el (delphi-mode): + * progmodes/ebrowse.el (ebrowse-tree-mode) + (ebrowse-electric-list-mode, ebrowse-member-mode) + (ebrowse-electric-position-mode): + * progmodes/f90.el (f90-mode): + * progmodes/fortran.el (fortran-mode): + * progmodes/icon.el (icon-mode): + * progmodes/idlw-help.el (idlwave-help-mode): + * progmodes/idlw-shell.el (idlwave-shell-mode): + * progmodes/idlwave.el (idlwave-mode): + * progmodes/inf-lisp.el (inferior-lisp-mode): + * progmodes/m4-mode.el (m4-mode): + * progmodes/meta-mode.el (metafont-mode, metapost-mode): + * progmodes/modula2.el (modula-2-mode): + * progmodes/octave-inf.el (inferior-octave-mode): + * progmodes/octave-mod.el (octave-mode): + * progmodes/pascal.el (pascal-mode): + * progmodes/sh-script.el (sh-mode): + * progmodes/sql.el (sql-mode, sql-interactive-mode): + * progmodes/vhdl-mode.el (vhdl-mode): + * progmodes/xscheme.el (scheme-interaction-mode): * replace.el (occur-mode): * ses.el (ses-mode): * simple.el (completion-list-mode): diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el index d31978b5ec9..bc0edb1f047 100644 --- a/lisp/progmodes/ada-mode.el +++ b/lisp/progmodes/ada-mode.el @@ -1369,7 +1369,7 @@ If you use ada-xref.el: (min ada-indent (current-column)))))) (add-hook 'skeleton-end-hook 'ada-adjust-case-skeleton nil t) - (run-hooks 'ada-mode-hook) + (run-mode-hooks 'ada-mode-hook) ;; To be run after the hook, in case the user modified ;; ada-fill-comment-prefix diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el index 03587577f59..bdf376bfab7 100644 --- a/lisp/progmodes/antlr-mode.el +++ b/lisp/progmodes/antlr-mode.el @@ -2624,7 +2624,7 @@ the default language." (imenu-add-to-menubar (if (stringp antlr-imenu-name) antlr-imenu-name "Index"))) (antlr-set-tabs) - (run-hooks 'antlr-mode-hook)) + (run-mode-hooks 'antlr-mode-hook)) ;; A smarter version of `group-buffers-menu-by-mode-then-alphabetically' (in ;; XEmacs) could use the following property. The header of the submenu would diff --git a/lisp/progmodes/autoconf.el b/lisp/progmodes/autoconf.el index ec83e33b10d..908b18b070b 100644 --- a/lisp/progmodes/autoconf.el +++ b/lisp/progmodes/autoconf.el @@ -103,7 +103,7 @@ searching backwards at another AC_... command." (set (make-local-variable 'indent-line-function) #'indent-relative) (set (make-local-variable 'add-log-current-defun-function) #'autoconf-current-defun-function) - (run-hooks 'autoconf-mode-hook)) + (run-mode-hooks 'autoconf-mode-hook)) (provide 'autoconf-mode) diff --git a/lisp/progmodes/dcl-mode.el b/lisp/progmodes/dcl-mode.el index b52e004e5bb..0a89091165c 100644 --- a/lisp/progmodes/dcl-mode.el +++ b/lisp/progmodes/dcl-mode.el @@ -641,7 +641,7 @@ There is some minimal font-lock support (see vars (setq mode-name "DCL") (use-local-map dcl-mode-map) (tempo-use-tag-list 'dcl-tempo-tags) - (run-hooks 'dcl-mode-hook)) + (run-mode-hooks 'dcl-mode-hook)) ;;; *** Movement commands *************************************************** diff --git a/lisp/progmodes/delphi.el b/lisp/progmodes/delphi.el index 8d3ee554026..3d86f15c175 100644 --- a/lisp/progmodes/delphi.el +++ b/lisp/progmodes/delphi.el @@ -2002,7 +2002,7 @@ no args, if that value is non-nil." (delphi-parse-region (point-min) (point-max)) (delphi-progress-done)))) - (run-hooks 'delphi-mode-hook)) + (run-mode-hooks 'delphi-mode-hook)) ;;; arch-tag: 410e192d-e9b5-4397-ad62-12340fc3fa41 ;;; delphi.el ends here diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el index 6dd15897e7b..953ecd79f7f 100644 --- a/lisp/progmodes/ebrowse.el +++ b/lisp/progmodes/ebrowse.el @@ -1162,7 +1162,7 @@ Tree mode key bindings: (when tree (ebrowse-redraw-tree) (set-buffer-modified-p nil)) - (run-hooks 'ebrowse-tree-mode-hook))) + (run-mode-hooks 'ebrowse-tree-mode-hook))) @@ -2026,7 +2026,7 @@ COLLAPSE non-nil means collapse the branch." truncate-lines t buffer-read-only t major-mode 'ebrowse-electric-list-mode) - (run-hooks 'ebrowse-electric-list-mode-hook)) + (run-mode-hooks 'ebrowse-electric-list-mode-hook)) (defun ebrowse-list-tree-buffers () @@ -2277,7 +2277,7 @@ See 'Electric-command-loop' for a description of STATE and CONDITION." ebrowse--const-display-flag nil ebrowse--pure-display-flag nil) (modify-syntax-entry ?_ (char-to-string (char-syntax ?a))) - (run-hooks 'ebrowse-member-mode-hook)) + (run-mode-hooks 'ebrowse-member-mode-hook)) @@ -3987,7 +3987,7 @@ Runs the hook `ebrowse-electric-position-mode-hook'." truncate-lines t buffer-read-only t major-mode 'ebrowse-electric-position-mode) - (run-hooks 'ebrowse-electric-position-mode-hook)) + (run-mode-hooks 'ebrowse-electric-position-mode-hook)) (defun ebrowse-draw-position-buffer () diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index eb6db05c159..6eb39051984 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el @@ -830,7 +830,7 @@ with no args, if that value is non-nil." (set (make-local-variable 'end-of-defun-function) 'f90-end-of-subprogram) (set (make-local-variable 'add-log-current-defun-function) #'f90-current-defun) - (run-hooks 'f90-mode-hook)) + (run-mode-hooks 'f90-mode-hook)) ;; Inline-functions. diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el index 30e1977d28d..458a4c8de2b 100644 --- a/lisp/progmodes/fortran.el +++ b/lisp/progmodes/fortran.el @@ -799,7 +799,7 @@ with no args, if that value is non-nil." #'fortran-current-defun) (set (make-local-variable 'dabbrev-case-fold-search) 'case-fold-search) (set (make-local-variable 'gud-find-expr-function) 'fortran-gud-find-expr) - (run-hooks 'fortran-mode-hook)) + (run-mode-hooks 'fortran-mode-hook)) (defun fortran-gud-find-expr () diff --git a/lisp/progmodes/icon.el b/lisp/progmodes/icon.el index c61c64532a3..0eb1b8bf3df 100644 --- a/lisp/progmodes/icon.el +++ b/lisp/progmodes/icon.el @@ -205,7 +205,7 @@ with no args, if that value is non-nil." (cons '(icon-mode "\\" "\\" nil icon-forward-sexp-function) hs-special-modes-alist))) - (run-hooks 'icon-mode-hook)) + (run-mode-hooks 'icon-mode-hook)) ;; This is used by indent-for-comment to decide how much to ;; indent a comment in Icon code based on its context. diff --git a/lisp/progmodes/idlw-help.el b/lisp/progmodes/idlw-help.el index 8696e1a7d63..6c2cb00bbde 100644 --- a/lisp/progmodes/idlw-help.el +++ b/lisp/progmodes/idlw-help.el @@ -278,7 +278,7 @@ Here are all keybindings. (set (make-local-variable 'idlwave-help-def-pos) nil) (set (make-local-variable 'idlwave-help-args) nil) (set (make-local-variable 'idlwave-help-in-header) nil) - (run-hooks 'idlwave-help-mode-hook)) + (run-mode-hooks 'idlwave-help-mode-hook)) (defun idlwave-html-help-location () "Return the help directory where HTML files are, or nil if that is unknown." diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el index 77244819f1b..e804b9f8d50 100644 --- a/lisp/progmodes/idlw-shell.el +++ b/lisp/progmodes/idlw-shell.el @@ -1055,7 +1055,7 @@ IDL has currently stepped.") (set (make-local-variable 'tool-bar-map) nil) ;; Run the hooks. - (run-hooks 'idlwave-shell-mode-hook) + (run-mode-hooks 'idlwave-shell-mode-hook) (idlwave-shell-send-command idlwave-shell-initial-commands nil 'hide) ;; Turn off IDL's ^d interpreting, and define a system ;; variable which knows the version of IDLWAVE diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index a118b0055a9..6bd7e0eaced 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el @@ -1954,7 +1954,7 @@ The main features of this mode are (idlwave-new-buffer-update) ;; Run the mode hook - (run-hooks 'idlwave-mode-hook)) + (run-mode-hooks 'idlwave-mode-hook)) (defvar idlwave-setup-done nil) (defun idlwave-setup () diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el index 13bc7f08999..b59ac86d417 100644 --- a/lisp/progmodes/inf-lisp.el +++ b/lisp/progmodes/inf-lisp.el @@ -269,7 +269,7 @@ to continue it." (use-local-map inferior-lisp-mode-map) ;c-c c-k for "kompile" file (setq comint-get-old-input (function lisp-get-old-input)) (setq comint-input-filter (function lisp-input-filter)) - (run-hooks 'inferior-lisp-mode-hook)) + (run-mode-hooks 'inferior-lisp-mode-hook)) (defun lisp-get-old-input () "Return a string containing the sexp ending at point." diff --git a/lisp/progmodes/m4-mode.el b/lisp/progmodes/m4-mode.el index bd6fac5c639..5becd22f6eb 100644 --- a/lisp/progmodes/m4-mode.el +++ b/lisp/progmodes/m4-mode.el @@ -147,7 +147,7 @@ font-lock-defaults '(m4-font-lock-keywords nil) ) (set-syntax-table m4-mode-syntax-table) - (run-hooks 'm4-mode-hook)) + (run-mode-hooks 'm4-mode-hook)) (provide 'm4-mode) ;;stuff to play with for debugging diff --git a/lisp/progmodes/meta-mode.el b/lisp/progmodes/meta-mode.el index 7bf9921b2ee..3d77de8f182 100644 --- a/lisp/progmodes/meta-mode.el +++ b/lisp/progmodes/meta-mode.el @@ -998,7 +998,7 @@ Turning on Metafont mode calls the value of the variables (setq meta-complete-list (list (list "\\<\\(\\sw+\\)" 1 'meta-symbol-list) (list "" 'ispell-complete-word))) - (run-hooks 'meta-common-mode-hook 'metafont-mode-hook)) + (run-mode-hooks 'meta-common-mode-hook 'metafont-mode-hook)) ;;;###autoload (defun metapost-mode () @@ -1023,7 +1023,7 @@ Turning on MetaPost mode calls the value of the variable (setq meta-complete-list (list (list "\\<\\(\\sw+\\)" 1 'meta-symbol-list) (list "" 'ispell-complete-word))) - (run-hooks 'meta-common-mode-hook 'metapost-mode-hook)) + (run-mode-hooks 'meta-common-mode-hook 'metapost-mode-hook)) ;;; Just in case ... diff --git a/lisp/progmodes/modula2.el b/lisp/progmodes/modula2.el index 0fa46bee0f9..5fd3dbcb11b 100644 --- a/lisp/progmodes/modula2.el +++ b/lisp/progmodes/modula2.el @@ -172,7 +172,7 @@ followed by the first character of the construct. ;; Obsoleted by Emacs 19.35 parse-partial-sexp's COMMENTSTOP. ;(font-lock-comment-start-regexp . "(\\*") )) - (run-hooks 'm2-mode-hook)) + (run-mode-hooks 'm2-mode-hook)) ;; Regexps written with help from Ron Forrester ;; and Spencer Allain . diff --git a/lisp/progmodes/octave-inf.el b/lisp/progmodes/octave-inf.el index 265cf6c049b..250d00171f2 100644 --- a/lisp/progmodes/octave-inf.el +++ b/lisp/progmodes/octave-inf.el @@ -158,7 +158,7 @@ Entry to this mode successively runs the hooks `comint-mode-hook' and inferior-octave-dynamic-complete-functions) (comint-read-input-ring t) - (run-hooks 'inferior-octave-mode-hook)) + (run-mode-hooks 'inferior-octave-mode-hook)) ;;;###autoload (defun inferior-octave (&optional arg) diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el index 281edfd693e..35d5bd897c9 100644 --- a/lisp/progmodes/octave-mod.el +++ b/lisp/progmodes/octave-mod.el @@ -555,7 +555,7 @@ including a reproducible test case and send the message." (octave-add-octave-menu) (octave-initialize-completions) - (run-hooks 'octave-mode-hook)) + (run-mode-hooks 'octave-mode-hook)) ;;; Miscellaneous useful functions (defun octave-describe-major-mode () diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el index 6292fd36a67..e4d36244537 100644 --- a/lisp/progmodes/pascal.el +++ b/lisp/progmodes/pascal.el @@ -383,7 +383,7 @@ no args, if that value is non-nil." (make-local-variable 'imenu-generic-expression) (setq imenu-generic-expression pascal-imenu-generic-expression) (setq imenu-case-fold-search t) - (run-hooks 'pascal-mode-hook)) + (run-mode-hooks 'pascal-mode-hook)) diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index e2d82f7f13b..604ff8c1e78 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -1392,7 +1392,7 @@ with your script for an edit-interpret-debug cycle." (string-match "\\.m?spec\\'" buffer-file-name)) "rpm"))))) (sh-set-shell (or interpreter sh-shell-file) nil nil)) - (run-hooks 'sh-mode-hook)) + (run-mode-hooks 'sh-mode-hook)) ;;;###autoload (defalias 'shell-script-mode 'sh-mode) diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index 902cd920ead..add4493e5f8 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -2249,7 +2249,7 @@ you must tell Emacs. Here's how to do that in your `~/.emacs' file: (setq local-abbrev-table sql-mode-abbrev-table) (setq abbrev-all-caps 1) ;; Run hook - (run-hooks 'sql-mode-hook) + (run-mode-hooks 'sql-mode-hook) ;; Catch changes to sql-product and highlight accordingly (sql-highlight-product) (add-hook 'hack-local-variables-hook 'sql-highlight-product t t)) @@ -2367,7 +2367,7 @@ you entered, right above the output it created. (make-local-variable 'sql-input-ring-separator) (make-local-variable 'sql-input-ring-file-name) ;; Run hook. - (run-hooks 'sql-interactive-mode-hook) + (run-mode-hooks 'sql-interactive-mode-hook) ;; Set comint based on user overrides. (setq comint-prompt-regexp sql-prompt-regexp) (setq left-margin sql-prompt-length) diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index f840ef356d9..af05de75b34 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -4622,7 +4622,7 @@ Key bindings: (if noninteractive "" " See menu for documentation and release notes.")) ;; run hooks - (run-hooks 'vhdl-mode-hook)) + (run-mode-hooks 'vhdl-mode-hook)) (defun vhdl-activate-customizations () "Activate all customizations on local variables." diff --git a/lisp/progmodes/xscheme.el b/lisp/progmodes/xscheme.el index bf1279da8a0..8ee791affe1 100644 --- a/lisp/progmodes/xscheme.el +++ b/lisp/progmodes/xscheme.el @@ -338,7 +338,7 @@ with no args, if that value is non-nil. (setq xscheme-previous-process-state (cons nil nil))))))) (scheme-interaction-mode-initialize) (scheme-mode-variables) - (run-hooks 'scheme-mode-hook 'scheme-interaction-mode-hook)) + (run-mode-hooks 'scheme-mode-hook 'scheme-interaction-mode-hook)) (defun exit-scheme-interaction-mode () "Take buffer out of scheme interaction mode" From 7023d838b077e093d392909ca08f5d90b64c0985 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 17:13:30 +0000 Subject: [PATCH 064/294] * textmodes/reftex-index.el (reftex-index-mode) (reftex-index-phrases-mode): * textmodes/reftex-sel.el (reftex-select-label-mode) (reftex-select-bib-mode): * textmodes/reftex-toc.el (reftex-toc-mode): Use run-mode-hooks. --- lisp/textmodes/reftex-index.el | 4 ++-- lisp/textmodes/reftex-sel.el | 4 ++-- lisp/textmodes/reftex-toc.el | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lisp/textmodes/reftex-index.el b/lisp/textmodes/reftex-index.el index ff2ea70a011..43e56df6685 100644 --- a/lisp/textmodes/reftex-index.el +++ b/lisp/textmodes/reftex-index.el @@ -310,7 +310,7 @@ Here are all local bindings. (easy-menu-add reftex-index-menu reftex-index-map) (add-hook 'post-command-hook 'reftex-index-post-command-hook nil t) (add-hook 'pre-command-hook 'reftex-index-pre-command-hook nil t) - (run-hooks 'reftex-index-mode-hook)) + (run-mode-hooks 'reftex-index-mode-hook)) (defconst reftex-index-help " AVAILABLE KEYS IN INDEX BUFFER @@ -1308,7 +1308,7 @@ Here are all local bindings. reftex-index-phrases-font-lock-defaults) (easy-menu-add reftex-index-phrases-menu reftex-index-phrases-map) (set (make-local-variable 'reftex-index-phrases-marker) (make-marker)) - (run-hooks 'reftex-index-phrases-mode-hook)) + (run-mode-hooks 'reftex-index-phrases-mode-hook)) (add-hook 'reftex-index-phrases-mode-hook 'turn-on-font-lock) ;; Font Locking stuff diff --git a/lisp/textmodes/reftex-sel.el b/lisp/textmodes/reftex-sel.el index eb8c3035c90..725c5122a0b 100644 --- a/lisp/textmodes/reftex-sel.el +++ b/lisp/textmodes/reftex-sel.el @@ -60,7 +60,7 @@ During a selection process, these are the local bindings. (when (syntax-table-p reftex-latex-syntax-table) (set-syntax-table reftex-latex-syntax-table)) ;; We do not set a local map - reftex-select-item does this. - (run-hooks 'reftex-select-label-mode-hook)) + (run-mode-hooks 'reftex-select-label-mode-hook)) (defvar reftex-select-bib-map nil "Keymap used for *RefTeX Select* buffer, when selecting a BibTeX entry. @@ -88,7 +88,7 @@ During a selection process, these are the local bindings. mode-name "BSelect") (set (make-local-variable 'reftex-select-marked) nil) ;; We do not set a local map - reftex-select-item does this. - (run-hooks 'reftex-select-bib-mode-hook)) + (run-mode-hooks 'reftex-select-bib-mode-hook)) ;;; (defun reftex-get-offset (buf here-am-I &optional typekey toc index file) ;;; ;; Find the correct offset data, like insert-docstruct would, but faster. diff --git a/lisp/textmodes/reftex-toc.el b/lisp/textmodes/reftex-toc.el index 8ad811391c7..b5edba97f4b 100644 --- a/lisp/textmodes/reftex-toc.el +++ b/lisp/textmodes/reftex-toc.el @@ -73,7 +73,7 @@ Here are all local bindings. (add-hook 'post-command-hook 'reftex-toc-post-command-hook nil t) (add-hook 'pre-command-hook 'reftex-toc-pre-command-hook nil t) (easy-menu-add reftex-toc-menu reftex-toc-map) - (run-hooks 'reftex-toc-mode-hook)) + (run-mode-hooks 'reftex-toc-mode-hook)) (defvar reftex-last-toc-file nil "Stores the file name from which `reftex-toc' was called. For redo command.") From 681c6a3735bad291d54a0dd7cc2bf839742a9998 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 17:19:46 +0000 Subject: [PATCH 065/294] *** empty log message *** --- lisp/ChangeLog | 51 +++++++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 70a22f6123e..e4e46847346 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -43,31 +43,31 @@ * play/snake.el (snake-mode): * play/solitaire.el (solitaire-mode): * play/tetris.el (tetris-mode): - * progmodes/ada-mode.el (ada-mode): - * progmodes/antlr-mode.el (antlr-mode): - * progmodes/autoconf.el (autoconf-mode): - * progmodes/dcl-mode.el (dcl-mode): - * progmodes/delphi.el (delphi-mode): + * progmodes/ada-mode.el (ada-mode): + * progmodes/antlr-mode.el (antlr-mode): + * progmodes/autoconf.el (autoconf-mode): + * progmodes/dcl-mode.el (dcl-mode): + * progmodes/delphi.el (delphi-mode): * progmodes/ebrowse.el (ebrowse-tree-mode) (ebrowse-electric-list-mode, ebrowse-member-mode) - (ebrowse-electric-position-mode): - * progmodes/f90.el (f90-mode): - * progmodes/fortran.el (fortran-mode): - * progmodes/icon.el (icon-mode): - * progmodes/idlw-help.el (idlwave-help-mode): - * progmodes/idlw-shell.el (idlwave-shell-mode): - * progmodes/idlwave.el (idlwave-mode): - * progmodes/inf-lisp.el (inferior-lisp-mode): - * progmodes/m4-mode.el (m4-mode): - * progmodes/meta-mode.el (metafont-mode, metapost-mode): - * progmodes/modula2.el (modula-2-mode): - * progmodes/octave-inf.el (inferior-octave-mode): - * progmodes/octave-mod.el (octave-mode): - * progmodes/pascal.el (pascal-mode): - * progmodes/sh-script.el (sh-mode): - * progmodes/sql.el (sql-mode, sql-interactive-mode): - * progmodes/vhdl-mode.el (vhdl-mode): - * progmodes/xscheme.el (scheme-interaction-mode): + (ebrowse-electric-position-mode): + * progmodes/f90.el (f90-mode): + * progmodes/fortran.el (fortran-mode): + * progmodes/icon.el (icon-mode): + * progmodes/idlw-help.el (idlwave-help-mode): + * progmodes/idlw-shell.el (idlwave-shell-mode): + * progmodes/idlwave.el (idlwave-mode): + * progmodes/inf-lisp.el (inferior-lisp-mode): + * progmodes/m4-mode.el (m4-mode): + * progmodes/meta-mode.el (metafont-mode, metapost-mode): + * progmodes/modula2.el (modula-2-mode): + * progmodes/octave-inf.el (inferior-octave-mode): + * progmodes/octave-mod.el (octave-mode): + * progmodes/pascal.el (pascal-mode): + * progmodes/sh-script.el (sh-mode): + * progmodes/sql.el (sql-mode, sql-interactive-mode): + * progmodes/vhdl-mode.el (vhdl-mode): + * progmodes/xscheme.el (scheme-interaction-mode): * replace.el (occur-mode): * ses.el (ses-mode): * simple.el (completion-list-mode): @@ -76,6 +76,11 @@ * term.el: (term-mode): * terminal.el (terminal-edit-mode): + * textmodes/reftex-index.el (reftex-index-mode) + (reftex-index-phrases-mode): + * textmodes/reftex-sel.el (reftex-select-label-mode) + (reftex-select-bib-mode): + * textmodes/reftex-toc.el (reftex-toc-mode): * wdired.el (wdired-change-to-wdired-mode): * wid-browse.el (widget-browse-mode): Use run-mode-hooks. From 04e9c13cc2b6f0bd21722e2a82c63313ed818638 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Thu, 26 May 2005 18:02:06 +0000 Subject: [PATCH 066/294] (calc-language-alist): Remove extra defvar. --- lisp/ChangeLog | 4 ++++ lisp/calc/calc.el | 14 -------------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e4e46847346..be5f552393a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2005-05-26 Jay Belanger + + * calc/calc.el (calc-language-alist): Remove extra defvar. + 2005-05-26 Lute Kamstra * arc-mode.el (archive-mode): diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 27623907d45..3917cfab3fe 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -830,20 +830,6 @@ If nil, selections displayed but ignored.") (defvar var-gamma '(special-const (math-gamma-const))) (defvar var-Modes '(special-const (math-get-modes-vec))) -(defvar calc-language-alist - '((latex-mode . latex) - (tex-mode . tex) - (plain-tex-mode . tex) - (context-mode . tex) - (nroff-mode . eqn) - (pascal-mode . pascal) - (c-mode . c) - (c++-mode . c) - (fortran-mode . fortran) - (f90-mode . fortran)) - "Alist of major modes with appropriate Calc languages.") - - (mapcar (lambda (v) (or (boundp v) (set v nil))) calc-local-var-list) From 3a02b63eb53a4f0508a6a0d5470635ad6ce6c606 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Thu, 26 May 2005 20:43:39 +0000 Subject: [PATCH 067/294] (display-time-string-forms, display-time-update): Use mode-line-highlight as mouse-face. --- lisp/time.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/time.el b/lisp/time.el index ddf0d932733..180d7c44cf3 100644 --- a/lisp/time.el +++ b/lisp/time.el @@ -200,6 +200,7 @@ depend on `display-time-day-and-date' and `display-time-24hr-format'." (list :background bg))))) 'face display-time-mail-face 'help-echo "You have new mail; mouse-2: Read mail" + 'mouse-face 'mode-line-highlight 'local-map (make-mode-line-mouse-map 'mouse-2 read-mail-command))) "")) @@ -293,6 +294,7 @@ update which can wait for the next redisplay." (concat (substring str 0 -2) "." (substring str -2)) 'local-map (make-mode-line-mouse-map 'mouse-2 'display-time-next-load-average) + 'mouse-face 'mode-line-highlight 'help-echo (concat "System load average for past " (if (= 0 display-time-load-average) From a9dd908b16ab37812c703d447774fb90d65de706 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Thu, 26 May 2005 20:48:37 +0000 Subject: [PATCH 068/294] (calendar-mode-line-format): Use mode-line-highlight as mouse-face. --- lisp/calendar/calendar.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 45754110319..fdf565c7923 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -2335,6 +2335,7 @@ movement commands will not work correctly." (propertize (substitute-command-keys "\\\\[scroll-calendar-left]") 'help-echo "mouse-2: scroll left" + 'mouse-face 'mode-line-highlight 'keymap (make-mode-line-mouse-map 'mouse-2 'mouse-scroll-calendar-left)) "Calendar" @@ -2343,12 +2344,14 @@ movement commands will not work correctly." (substitute-command-keys "\\\\[calendar-goto-info-node] info") 'help-echo "mouse-2: read Info on Calendar" + 'mouse-face 'mode-line-highlight 'keymap (make-mode-line-mouse-map 'mouse-2 'calendar-goto-info-node)) "/" (propertize (substitute-command-keys "\\\\[calendar-other-month] other") 'help-echo "mouse-2: choose another month" + 'mouse-face 'mode-line-highlight 'keymap (make-mode-line-mouse-map 'mouse-2 'mouse-calendar-other-month)) "/" @@ -2356,11 +2359,13 @@ movement commands will not work correctly." (substitute-command-keys "\\\\[calendar-goto-today] today") 'help-echo "mouse-2: go to today's date" + 'mouse-face 'mode-line-highlight 'keymap (make-mode-line-mouse-map 'mouse-2 #'calendar-goto-today))) '(calendar-date-string (calendar-current-date) t) (propertize (substitute-command-keys "\\\\[scroll-calendar-right]") 'help-echo "mouse-2: scroll right" + 'mouse-face 'mode-line-highlight 'keymap (make-mode-line-mouse-map 'mouse-2 'mouse-scroll-calendar-right))) "The mode line of the calendar buffer. From 27a0c0bc1b0b0dade4f80d40e216841ad2f907e7 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Thu, 26 May 2005 20:52:42 +0000 Subject: [PATCH 069/294] (gnus-agent-make-mode-line-string): Use mode-line-highlight as mouse-face. --- lisp/gnus/gnus-agent.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el index 4236c7958fb..ff09f3bcb19 100644 --- a/lisp/gnus/gnus-agent.el +++ b/lisp/gnus/gnus-agent.el @@ -561,7 +561,8 @@ manipulated as follows: (if (and (fboundp 'propertize) (fboundp 'make-mode-line-mouse-map)) (propertize string 'local-map - (make-mode-line-mouse-map mouse-button mouse-func)) + (make-mode-line-mouse-map mouse-button mouse-func) + 'mouse-face 'mode-line-highlight) string)) (defun gnus-agent-toggle-plugged (set-to) From ddfbe5db8f4cab8ef61ca62d2557aeaf44c85ae2 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Thu, 26 May 2005 20:58:42 +0000 Subject: [PATCH 070/294] *** empty log message *** --- lisp/ChangeLog | 8 ++++++++ lisp/gnus/ChangeLog | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index be5f552393a..fc0fbad4eb6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2005-05-26 Luc Teirlinck + + * calendar/calendar.el (calendar-mode-line-format): + Use mode-line-highlight as mouse-face. + + * time.el (display-time-string-forms, display-time-update): + Use mode-line-highlight as mouse-face. + 2005-05-26 Jay Belanger * calc/calc.el (calc-language-alist): Remove extra defvar. diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 4498ac3f1c3..84d38f3ff33 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2005-05-26 Luc Teirlinck + + * gnus-agent.el (gnus-agent-make-mode-line-string): + Use mode-line-highlight as mouse-face. + 2005-05-17 Katsumi Yamaoka * canlock.el (canlock): Change the parent group to news. From 9f15b4dfc727ab13a1ee612d154929205507ccbd Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Fri, 27 May 2005 01:35:51 +0000 Subject: [PATCH 071/294] *** empty log message *** --- man/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/man/ChangeLog b/man/ChangeLog index 91613a08cd8..6f2cb820128 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,8 @@ +2005-05-27 Nick Roberts + + * files.texi (Log Buffer): Merge in description of Log Edit + mode from pcl-cvs.texi. + 2005-05-26 Richard M. Stallman * building.texi (Lisp Eval): C-M-x with arg runs Edebug. From e07ddddb891c37ac6ecabebf3c86f3b4dda246c7 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Fri, 27 May 2005 01:36:41 +0000 Subject: [PATCH 072/294] (Log Buffer): Merge in description of Log Edit mode from pcl-cvs.texi. --- man/files.texi | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/man/files.texi b/man/files.texi index 6be4d0f467d..c83572a8550 100644 --- a/man/files.texi +++ b/man/files.texi @@ -1526,8 +1526,29 @@ Version Control}). When you check in changes, @kbd{C-x v v} first reads a log entry. It pops up a buffer called @samp{*VC-Log*} for you to enter the log entry. -When you are finished, type @kbd{C-c C-c} in the @samp{*VC-Log*} buffer. -That is when check-in really happens. + +Sometimes the @samp{*VC-Log*} buffer contains default text when you enter it, +typically the last log message entered. If it does, mark and point +are set around the entire contents of the buffer so that it is easy to +kill the contents of the buffer with @kbd{C-w}. + +@findex log-edit-insert-changelog +If you work by writing entries in the @file{ChangeLog} +(@pxref{Change Log}) and then commit the change under revision +control, you can generate the Log Edit text from the ChangeLog using +@kbd{C-c C-a} (@kbd{log-edit-insert-changelog}). This looks for +entries for the file(s) concerned in the top entry in the ChangeLog +and uses those paragraphs as the log text. This text is only inserted +if the top entry was made under your user name on the current date. +@xref{Change Logs and VC}, for the opposite way of +working---generating ChangeLog entries from the revision control log. + +In the @samp{*VC-Log*} buffer, @kbd{C-c C-f} (@kbd{M-x log-edit-show-files}) +shows the list of files to be committed in case you need to check +that. + +When you have finished editing the log message, type @kbd{C-c C-c} to +exit the buffer and commit the change. To abort check-in, just @strong{don't} type @kbd{C-c C-c} in that buffer. You can switch buffers and do other editing. As long as you From 34204d803d55e8126575b53368de1826c33253fc Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 27 May 2005 02:11:39 +0000 Subject: [PATCH 073/294] (eshell-complete-parse-arguments): If the character before a space at the end of a line is \, assume the space is part of the last argument rather than a final argument separator. --- lisp/eshell/em-cmpl.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/eshell/em-cmpl.el b/lisp/eshell/em-cmpl.el index 695a9fb4ed8..5f529b07991 100644 --- a/lisp/eshell/em-cmpl.el +++ b/lisp/eshell/em-cmpl.el @@ -370,7 +370,8 @@ to writing a completion function." (setq args (nthcdr (1+ l) args) posns (nthcdr (1+ l) posns)))) (assert (= (length args) (length posns))) - (when (and args (eq (char-syntax (char-before end)) ? )) + (when (and args (eq (char-syntax (char-before end)) ? ) + (not (eq (char-before (1- end)) ?\\))) (nconc args (list "")) (nconc posns (list (point)))) (cons (mapcar From 9c041409339fbd92ca875ba034bcf8ca3410330e Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 27 May 2005 02:15:36 +0000 Subject: [PATCH 074/294] (eshell-get-target): If `eshell-buffer-shorthand' is in use, and the target is `t' or `nil' (which are the most common values), don't assume that the symbol target is a buffer. --- lisp/ChangeLog | 12 ++++++++++++ lisp/eshell/esh-io.el | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fc0fbad4eb6..2795764f959 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,15 @@ +2005-05-26 John Wiegley + + * eshell/em-cmpl.el (eshell-complete-parse-arguments): If the + character before a space at the end of a line is \, assume the + space is part of the last argument rather than a final argument + separator. + + * eshell/esh-io.el (eshell-get-target): If + `eshell-buffer-shorthand' is in use, and the target is `t' or + `nil' (which are the most common values), don't assume that the + symbol target is a buffer. + 2005-05-26 Luc Teirlinck * calendar/calendar.el (calendar-mode-line-format): diff --git a/lisp/eshell/esh-io.el b/lisp/eshell/esh-io.el index 6944770dbc9..1161013cf58 100644 --- a/lisp/eshell/esh-io.el +++ b/lisp/eshell/esh-io.el @@ -353,7 +353,8 @@ it defaults to `insert'." ((or (bufferp target) (and (boundp 'eshell-buffer-shorthand) (symbol-value 'eshell-buffer-shorthand) - (symbolp target))) + (symbolp target) + (not (memq target '(t nil))))) (let ((buf (if (bufferp target) target (get-buffer-create From 6b6f91b357f6fe2f1e0d72f046a1b8d8a2d6d8c3 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 27 May 2005 02:57:18 +0000 Subject: [PATCH 075/294] (eshell-eval-command): If the return value of `eshell-resume-eval' is wrapped in a list, it indicates that the command was run asynchronously. In that case, unwrap the value before checking the delimiter value. --- lisp/ChangeLog | 5 +++++ lisp/eshell/esh-cmd.el | 9 ++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2795764f959..fd18c875ada 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2005-05-26 John Wiegley + * eshell/esh-cmd.el (eshell-eval-command): If the return value of + `eshell-resume-eval' is wrapped in a list, it indicates that the + command was run asynchronously. In that case, unwrap the value + before checking the delimiter value. + * eshell/em-cmpl.el (eshell-complete-parse-arguments): If the character before a space at the end of a line is \, assume the space is part of the last argument rather than a final argument diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el index d7c65066ac6..355369d35ae 100644 --- a/lisp/eshell/esh-cmd.el +++ b/lisp/eshell/esh-cmd.el @@ -757,7 +757,7 @@ nil)' if none)." (defmacro eshell-do-subjob (object) "Evaluate a command OBJECT as a subjob. -We indicate thet the process was run in the background by returned it +We indicate that the process was run in the background by returning it ensconced in a list." `(let ((eshell-current-subjob-p t)) ,object)) @@ -1006,11 +1006,10 @@ at the moment are: (eshell-resume-eval)))) ;; On systems that don't support async subprocesses, eshell-resume ;; can return t. Don't treat that as an error. + (if (listp delim) + (setq delim (car delim))) (if (and delim (not (eq delim t))) - (error "Unmatched delimiter: %c" - (if (listp delim) - (car delim) - delim)))))) + (error "Unmatched delimiter: %c" delim))))) (defun eshell-resume-command (proc status) "Resume the current command when a process ends." From b4e8a25b8afdaed88fc62a0e222bc9b2ff686a6e Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 27 May 2005 04:08:12 +0000 Subject: [PATCH 076/294] Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-330 Merge from gnus--rel--5.10 Patches applied: * gnus--rel--5.10 (patch 71-73) - Merge from emacs--cvs-trunk--0 - Update from CVS 2005-05-27 Katsumi Yamaoka * lisp/gnus/gnus-util.el (gnus-run-mode-hooks): New function. * lisp/gnus/score-mode.el (gnus-score-mode): Use gnus-run-mode-hooks. --- lisp/gnus/ChangeLog | 6 ++++++ lisp/gnus/gnus-util.el | 6 ++++++ lisp/gnus/score-mode.el | 6 +++--- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 84d38f3ff33..a5e1ccb3f7f 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,9 @@ +2005-05-27 Katsumi Yamaoka + + * gnus-util.el (gnus-run-mode-hooks): New function. + + * score-mode.el (gnus-score-mode): Use gnus-run-mode-hooks. + 2005-05-26 Luc Teirlinck * gnus-agent.el (gnus-agent-make-mode-line-string): diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 237e0507775..9e409001cf0 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -1015,6 +1015,12 @@ ARG is passed to the first function." (save-current-buffer (apply 'run-hooks funcs))) +(defun gnus-run-mode-hooks (&rest funcs) + "Run `run-mode-hooks' if it is available. Otherwise run `run-hooks'." + (if (fboundp 'run-mode-hooks) + (apply 'run-mode-hooks funcs) + (apply 'run-hooks funcs))) + ;;; Various (defvar gnus-group-buffer) ; Compiler directive diff --git a/lisp/gnus/score-mode.el b/lisp/gnus/score-mode.el index 4d5d293d398..c537012a422 100644 --- a/lisp/gnus/score-mode.el +++ b/lisp/gnus/score-mode.el @@ -1,6 +1,6 @@ ;;; score-mode.el --- mode for editing Gnus score files -;; Copyright (C) 1996, 2001, 2004 Free Software Foundation, Inc. +;; Copyright (C) 1996, 2001, 2004, 2005 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; Keywords: news, mail @@ -28,7 +28,7 @@ (eval-when-compile (require 'cl)) (require 'mm-util) ; for mm-universal-coding-system -(require 'gnus-util) ; for gnus-pp +(require 'gnus-util) ; for gnus-pp, gnus-run-mode-hooks (defvar gnus-score-mode-hook nil "*Hook run in score mode buffers.") @@ -71,7 +71,7 @@ This mode is an extended emacs-lisp mode. (setq mode-name "Score") (lisp-mode-variables nil) (make-local-variable 'gnus-score-edit-exit-function) - (run-mode-hooks 'emacs-lisp-mode-hook 'gnus-score-mode-hook)) + (gnus-run-mode-hooks 'emacs-lisp-mode-hook 'gnus-score-mode-hook)) (defun gnus-score-make-menu-bar () (unless (boundp 'gnus-score-menu) From 48985adc8a3eb33f582f3348cb9192a7e0979240 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 27 May 2005 08:11:59 +0000 Subject: [PATCH 077/294] *** empty log message *** --- lisp/ChangeLog | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fd18c875ada..7befb3415c3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -102,8 +102,7 @@ * simple.el (completion-list-mode): * skeleton.el: * speedbar.el (speedbar-mode): - * term.el: - (term-mode): + * term.el (term-mode): * terminal.el (terminal-edit-mode): * textmodes/reftex-index.el (reftex-index-mode) (reftex-index-phrases-mode): @@ -111,14 +110,15 @@ (reftex-select-bib-mode): * textmodes/reftex-toc.el (reftex-toc-mode): * wdired.el (wdired-change-to-wdired-mode): - * wid-browse.el (widget-browse-mode): Use run-mode-hooks. + * wid-browse.el (widget-browse-mode): + Use run-mode-hooks. * array.el (array-mode): * calendar/todo-mode.el (todo-mode): * man.el (Man-mode): * play/landmark.el (lm-mode): - * play/mpuz.el (mpuz-mode): Use kill-all-local-variables and - run-mode-hooks. + * play/mpuz.el (mpuz-mode): + Use kill-all-local-variables and run-mode-hooks. * subr.el (delay-mode-hooks): Specify indentation. From 5e2ad10b99541b8c1d66bb9b6ceca4b69dfa6131 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 27 May 2005 11:02:11 +0000 Subject: [PATCH 078/294] (Fbuffer_local_value): Make argument name match its use in docstring. --- src/ChangeLog | 5 +++++ src/buffer.c | 36 ++++++++++++++++++------------------ 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index ab05e235098..9a3a814d6c2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-05-27 Juanma Barranquero + + * buffer.c (Fbuffer_local_value): Make argument name match its use + in docstring. + 2005-05-26 Juanma Barranquero * keyboard.c (Frecursive_edit): Fix typo in docstring. diff --git a/src/buffer.c b/src/buffer.c index e9567841c8e..dfcf4a9a0b9 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -877,20 +877,20 @@ DEFUN ("buffer-local-value", Fbuffer_local_value, Sbuffer_local_value, 2, 2, 0, doc: /* Return the value of VARIABLE in BUFFER. If VARIABLE does not have a buffer-local binding in BUFFER, the value -is the default binding of variable. */) - (symbol, buffer) - register Lisp_Object symbol; +is the default binding of the variable. */) + (variable, buffer) + register Lisp_Object variable; register Lisp_Object buffer; { register struct buffer *buf; register Lisp_Object result; - CHECK_SYMBOL (symbol); + CHECK_SYMBOL (variable); CHECK_BUFFER (buffer); buf = XBUFFER (buffer); /* Look in local_var_list */ - result = Fassoc (symbol, buf->local_var_alist); + result = Fassoc (variable, buf->local_var_alist); if (NILP (result)) { int offset, idx; @@ -905,7 +905,7 @@ is the default binding of variable. */) idx = PER_BUFFER_IDX (offset); if ((idx == -1 || PER_BUFFER_VALUE_P (buf, idx)) && SYMBOLP (PER_BUFFER_SYMBOL (offset)) - && EQ (PER_BUFFER_SYMBOL (offset), symbol)) + && EQ (PER_BUFFER_SYMBOL (offset), variable)) { result = PER_BUFFER_VALUE (buf, offset); found = 1; @@ -914,7 +914,7 @@ is the default binding of variable. */) } if (!found) - result = Fdefault_value (symbol); + result = Fdefault_value (variable); } else { @@ -922,7 +922,7 @@ is the default binding of variable. */) Lisp_Object current_alist_element; /* What binding is loaded right now? */ - valcontents = SYMBOL_VALUE (symbol); + valcontents = SYMBOL_VALUE (variable); current_alist_element = XCAR (XBUFFER_LOCAL_VALUE (valcontents)->cdr); @@ -939,7 +939,7 @@ is the default binding of variable. */) } if (EQ (result, Qunbound)) - return Fsignal (Qvoid_variable, Fcons (symbol, Qnil)); + return Fsignal (Qvoid_variable, Fcons (variable, Qnil)); return result; } @@ -5276,19 +5276,19 @@ This is the same as (default-value 'abbrev-mode). */); doc: /* Default value of `ctl-arrow' for buffers that do not override it. This is the same as (default-value 'ctl-arrow). */); - DEFVAR_LISP_NOPRO ("default-direction-reversed", - &buffer_defaults.direction_reversed, - doc: /* Default value of `direction-reversed' for buffers that do not override it. + DEFVAR_LISP_NOPRO ("default-direction-reversed", + &buffer_defaults.direction_reversed, + doc: /* Default value of `direction-reversed' for buffers that do not override it. This is the same as (default-value 'direction-reversed). */); - DEFVAR_LISP_NOPRO ("default-enable-multibyte-characters", - &buffer_defaults.enable_multibyte_characters, - doc: /* *Default value of `enable-multibyte-characters' for buffers not overriding it. + DEFVAR_LISP_NOPRO ("default-enable-multibyte-characters", + &buffer_defaults.enable_multibyte_characters, + doc: /* *Default value of `enable-multibyte-characters' for buffers not overriding it. This is the same as (default-value 'enable-multibyte-characters). */); - DEFVAR_LISP_NOPRO ("default-buffer-file-coding-system", - &buffer_defaults.buffer_file_coding_system, - doc: /* Default value of `buffer-file-coding-system' for buffers not overriding it. + DEFVAR_LISP_NOPRO ("default-buffer-file-coding-system", + &buffer_defaults.buffer_file_coding_system, + doc: /* Default value of `buffer-file-coding-system' for buffers not overriding it. This is the same as (default-value 'buffer-file-coding-system). */); DEFVAR_LISP_NOPRO ("default-truncate-lines", From 848613f8691dfab1b9e4de0b0a7a3254d9e00fb4 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 27 May 2005 11:20:16 +0000 Subject: [PATCH 079/294] Don't register a coding system into non-iso-charset-alist more than once. (cp-make-coding-system): Likewise. --- lisp/international/code-pages.el | 34 +++++++++++++++++++------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/lisp/international/code-pages.el b/lisp/international/code-pages.el index 73c953a2fe4..c70388ba4c9 100644 --- a/lisp/international/code-pages.el +++ b/lisp/international/code-pages.el @@ -193,15 +193,18 @@ Return an updated `non-iso-charset-alist'." ;; a separate table that only translates the coding ;; system's safe-chars. (cons 'translation-table-for-input 'ucs-mule-to-mule-unicode))) - (push (list ',name - nil ; charset list - ',decoder - (let (l) ; code range - (dolist (elt (reverse codes)) - (push (cdr elt) l) - (push (car elt) l)) - (list l))) - non-iso-charset-alist)))) + (let ((slot (assq ',name non-iso-charset-alist)) + (elt (list nil ; charset list + ',decoder + (let (l) ; code range + (dolist (elt (reverse codes)) + (push (cdr elt) l) + (push (car elt) l)) + (list l))))) + (if (not slot) + (push (cons ',name elt) non-iso-charset-alist) + (setcdr slot elt) + non-iso-charset-alist))))) (eval-when-compile (defvar non-iso-charset-alist)) @@ -4502,11 +4505,14 @@ Return an updated `non-iso-charset-alist'." ;; Define cp125* as aliases for all windows-125*, so on Windows ;; we can just concat "cp" to the ANSI codepage we get from the system ;; and not have to worry about whether it should be "cp" or "windows-". - (if (coding-system-p w) - (define-coding-system-alias c w)) - ;; Compatibility with codepage.el, though cp... are not the - ;; canonical names. - (push (assoc w non-iso-charset-alist) non-iso-charset-alist))) + (when (coding-system-p w) + (define-coding-system-alias c w) + ;; Compatibility with codepage.el, though cp... are not the + ;; canonical names. + (if (not (assq c non-iso-charset-alist)) + (let ((slot (assq w non-iso-charset-alist))) + (if slot + (push (cons c (cdr slot)) non-iso-charset-alist))))))) (provide 'code-pages) From 514eb97bbf3ed6ed9bf799efd8fc63591678c1ff Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 27 May 2005 11:21:36 +0000 Subject: [PATCH 080/294] (ucs-set-table-for-input): If translation-table-for-input of a coding system is a symbol, get its translation-table property. --- lisp/international/ucs-tables.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/international/ucs-tables.el b/lisp/international/ucs-tables.el index 0ee7fc94028..f952b7817a4 100644 --- a/lisp/international/ucs-tables.el +++ b/lisp/international/ucs-tables.el @@ -2517,7 +2517,9 @@ This function is automatically called directly at the end of `get-buffer-create' (if (and table (symbolp table)) (setq table (get table 'translation-table))) (unless (char-table-p table) - (setq table (coding-system-get cs 'translation-table-for-input))) + (setq table (coding-system-get cs 'translation-table-for-input)) + (if (and table (symbolp table)) + (setq table (get table 'translation-table)))) (when (char-table-p table) (if buffer (with-current-buffer buffer From 968786fd0ed183f9d8d651e740822c021a1e96ec Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 27 May 2005 11:22:39 +0000 Subject: [PATCH 081/294] Add cyrillic-iso8859-5 characters in the encoding table of windows-1251. --- lisp/language/cyrillic.el | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lisp/language/cyrillic.el b/lisp/language/cyrillic.el index 44a9ccc66a1..ea7f6b0624b 100644 --- a/lisp/language/cyrillic.el +++ b/lisp/language/cyrillic.el @@ -475,6 +475,23 @@ Support for Russian using koi8-r and the russian-computer input method.") ?\$,1(V(B ?\$,1(W(B ?\$,1(X(B ?\$,1(Y(B ?\$,1(Z(B ?\$,1([(B ?\$,1(\(B ?\$,1(](B ?\$,1(^(B ?\$,1(_(B ?\$,1(`(B ?\$,1(a(B ?\$,1(b(B ?\$,1(c(B ?\$,1(d(B ?\$,1(e(B ?\$,1(f(B ?\$,1(g(B ?\$,1(h(B ?\$,1(i(B ?\$,1(j(B ?\$,1(k(B ?\$,1(l(B ?\$,1(m(B ?\$,1(n(B ?\$,1(o(B] nil ?b))) +;; Register cyrillic-iso8859-5 characters in the encode table of +;; windows-1251. +(let ((table (get 'encode-windows-1251 'translation-table)) + ;; Nth element is a cyrillic-iso8859-5 character encoded to a + ;; code (128 + N), or nil. + (vec [?\,L"(B ?\,L#(B nil ?\,Ls(B nil nil nil nil nil nil ?\,L)(B nil ?\,L*(B ?\,L,(B ?\,L+(B ?\,L/(B + ?\,Lr(B nil nil nil nil nil nil nil nil nil ?\,Ly(B nil ?\,Lz(B ?\,L|(B ?\,L{(B ?\,L(B + nil ?\,L.(B ?\,L~(B ?\,L((B nil nil nil nil ?\,L!(B nil ?\,L$(B nil nil nil nil ?\,L'(B + nil nil ?\,L&(B ?\,Lv(B nil nil nil nil ?\,Lq(B ?\,Lp(B ?\,Lt(B nil ?\,Lx(B ?\,L%(B ?\,Lu(B ?\,Lw(B + ?\,L0(B ?\,L1(B ?\,L2(B ?\,L3(B ?\,L4(B ?\,L5(B ?\,L6(B ?\,L7(B ?\,L8(B ?\,L9(B ?\,L:(B ?\,L;(B ?\,L<(B ?\,L=(B ?\,L>(B ?\,L?(B + ?\,L@(B ?\,LA(B ?\,LB(B ?\,LC(B ?\,LD(B ?\,LE(B ?\,LF(B ?\,LG(B ?\,LH(B ?\,LI(B ?\,LJ(B ?\,LK(B ?\,LL(B ?\,LM(B ?\,LN(B ?\,LO(B + ?\,LP(B ?\,LQ(B ?\,LR(B ?\,LS(B ?\,LT(B ?\,LU(B ?\,LV(B ?\,LW(B ?\,LX(B ?\,LY(B ?\,LZ(B ?\,L[(B ?\,L\(B ?\,L](B ?\,L^(B ?\,L_(B + ?\,L`(B ?\,La(B ?\,Lb(B ?\,Lc(B ?\,Ld(B ?\,Le(B ?\,Lf(B ?\,Lg(B ?\,Lh(B ?\,Li(B ?\,Lj(B ?\,Lk(B ?\,Ll(B ?\,Lm(B ?\,Ln(B ?\,Lo(B])) + (dotimes (i (length vec)) + (if (aref vec i) + (aset table (aref vec i) (+ 128 i))))) + (define-coding-system-alias 'cp1251 'windows-1251) (let ((elt `("microsoft-cp1251" windows-1251 1 From 2a69c66e3ab906db41a40bbe452db563335cb6ab Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 27 May 2005 11:27:50 +0000 Subject: [PATCH 082/294] Now an element of Vccl_program_table is a vector of length 4, not 3. (ccl_get_compiled_code): New arg idx. Caller changed. Adjusted for the change of Vccl_program_table. (setup_ccl_program): Adjusted for the change of Vccl_program_table. (check_ccl_update): New function. (Fregister_ccl_program): Use ASET to set an element of a vector. Adjusted for the change of Vccl_program_table. --- src/ccl.c | 72 ++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 56 insertions(+), 16 deletions(-) diff --git a/src/ccl.c b/src/ccl.c index 5bff1f3a0ad..3ce0eb77f70 100644 --- a/src/ccl.c +++ b/src/ccl.c @@ -49,10 +49,12 @@ Lisp_Object Qcode_conversion_map_id; Lisp_Object Qccl_program_idx; /* Table of registered CCL programs. Each element is a vector of - NAME, CCL_PROG, and RESOLVEDP where NAME (symbol) is the name of - the program, CCL_PROG (vector) is the compiled code of the program, - RESOLVEDP (t or nil) is the flag to tell if symbols in CCL_PROG is - already resolved to index numbers or not. */ + NAME, CCL_PROG, RESOLVEDP, and UPDATEDP, where NAME (symbol) is the + name of the program, CCL_PROG (vector) is the compiled code of the + program, RESOLVEDP (t or nil) is the flag to tell if symbols in + CCL_PROG is already resolved to index numbers or not, UPDATEDP (t + or nil) is the flat to tell if the CCL program is updated after it + was once used. */ Lisp_Object Vccl_program_table; /* Vector of registered hash tables for translation. */ @@ -2028,14 +2030,16 @@ resolve_symbol_ccl_program (ccl) symbols, return Qnil. */ static Lisp_Object -ccl_get_compiled_code (ccl_prog) +ccl_get_compiled_code (ccl_prog, idx) Lisp_Object ccl_prog; + int *idx; { Lisp_Object val, slot; if (VECTORP (ccl_prog)) { val = resolve_symbol_ccl_program (ccl_prog); + *idx = -1; return (VECTORP (val) ? val : Qnil); } if (!SYMBOLP (ccl_prog)) @@ -2047,9 +2051,10 @@ ccl_get_compiled_code (ccl_prog) return Qnil; slot = AREF (Vccl_program_table, XINT (val)); if (! VECTORP (slot) - || ASIZE (slot) != 3 + || ASIZE (slot) != 4 || ! VECTORP (AREF (slot, 1))) return Qnil; + *idx = XINT (val); if (NILP (AREF (slot, 2))) { val = resolve_symbol_ccl_program (AREF (slot, 1)); @@ -2078,7 +2083,7 @@ setup_ccl_program (ccl, ccl_prog) { struct Lisp_Vector *vp; - ccl_prog = ccl_get_compiled_code (ccl_prog); + ccl_prog = ccl_get_compiled_code (ccl_prog, &ccl->idx); if (! VECTORP (ccl_prog)) return -1; vp = XVECTOR (ccl_prog); @@ -2086,6 +2091,13 @@ setup_ccl_program (ccl, ccl_prog) ccl->prog = vp->contents; ccl->eof_ic = XINT (vp->contents[CCL_HEADER_EOF]); ccl->buf_magnification = XINT (vp->contents[CCL_HEADER_BUF_MAG]); + if (ccl->idx >= 0) + { + Lisp_Object slot; + + slot = AREF (Vccl_program_table, ccl->idx); + ASET (slot, 3, Qnil); + } } ccl->ic = CCL_HEADER_MAIN; for (i = 0; i < 8; i++) @@ -2100,6 +2112,33 @@ setup_ccl_program (ccl, ccl_prog) return 0; } + +/* Check if CCL is updated or not. If not, re-setup members of CCL. */ + +int +check_ccl_update (ccl) + struct ccl_program *ccl; +{ + struct Lisp_Vector *vp; + Lisp_Object slot, ccl_prog; + + if (ccl->idx < 0) + return 0; + slot = AREF (Vccl_program_table, ccl->idx); + if (NILP (AREF (slot, 3))) + return 0; + ccl_prog = ccl_get_compiled_code (AREF (slot, 0), &ccl->idx); + if (! VECTORP (ccl_prog)) + return -1; + ccl->size = ASIZE (ccl_prog); + ccl->prog = XVECTOR (ccl_prog)->contents; + ccl->eof_ic = XINT (AREF (ccl_prog, CCL_HEADER_EOF)); + ccl->buf_magnification = XINT (AREF (ccl_prog, CCL_HEADER_BUF_MAG)); + ASET (slot, 3, Qnil); + return 0; +} + + DEFUN ("ccl-program-p", Fccl_program_p, Sccl_program_p, 1, 1, 0, doc: /* Return t if OBJECT is a CCL program name or a compiled CCL program code. See the documentation of `define-ccl-program' for the detail of CCL program. */) @@ -2298,8 +2337,9 @@ Return index number of the registered CCL program. */) if (EQ (name, AREF (slot, 0))) { /* Update this slot. */ - AREF (slot, 1) = ccl_prog; - AREF (slot, 2) = resolved; + ASET (slot, 1, ccl_prog); + ASET (slot, 2, resolved); + ASET (slot, 3, Qt); return make_number (idx); } } @@ -2312,19 +2352,19 @@ Return index number of the registered CCL program. */) new_table = Fmake_vector (make_number (len * 2), Qnil); for (j = 0; j < len; j++) - AREF (new_table, j) - = AREF (Vccl_program_table, j); + ASET (new_table, j, AREF (Vccl_program_table, j)); Vccl_program_table = new_table; } { Lisp_Object elt; - elt = Fmake_vector (make_number (3), Qnil); - AREF (elt, 0) = name; - AREF (elt, 1) = ccl_prog; - AREF (elt, 2) = resolved; - AREF (Vccl_program_table, idx) = elt; + elt = Fmake_vector (make_number (4), Qnil); + ASET (elt, 0, name); + ASET (elt, 1, ccl_prog); + ASET (elt, 2, resolved); + ASET (elt, 3, Qt); + ASET (Vccl_program_table, idx, elt); } Fput (name, Qccl_program_idx, make_number (idx)); From d8752c9ec0de92e270f5b6c8178d6bde15c10028 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 27 May 2005 11:28:30 +0000 Subject: [PATCH 083/294] (x_encode_char): Call check_ccl_update in advance. --- src/xterm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/xterm.c b/src/xterm.c index 74e82735b6f..4f9081425f3 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -904,6 +904,7 @@ x_encode_char (c, char2b, font_info, two_byte_p) /* It's a program. */ struct ccl_program *ccl = font_info->font_encoder; + check_ccl_update (ccl); if (CHARSET_DIMENSION (charset) == 1) { ccl->reg[0] = charset; From 7cf49add818a6f2e43bedb3869ed8b647f3435fe Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 27 May 2005 11:28:42 +0000 Subject: [PATCH 084/294] *** empty log message *** --- lisp/ChangeLog | 13 +++++++++++++ src/ChangeLog | 17 +++++++++++++++++ src/ccl.h | 7 +++++++ 3 files changed, 37 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7befb3415c3..27b778bdd37 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,16 @@ +2005-05-27 Kenichi Handa + + * language/cyrillic.el: Add cyrillic-iso8859-5 characters in the + encoding table of windows-1251. + + * international/ucs-tables.el (ucs-set-table-for-input): If + translation-table-for-input of a coding system is a symbol, get + its translation-table property. + + * international/code-pages.el: Don't register a coding system into + non-iso-charset-alist more than once. + (cp-make-coding-system): Likewise. + 2005-05-26 John Wiegley * eshell/esh-cmd.el (eshell-eval-command): If the return value of diff --git a/src/ChangeLog b/src/ChangeLog index 9a3a814d6c2..d85709e4c35 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,20 @@ +2005-05-27 Kenichi Handa + + * xterm.c (x_encode_char): Call check_ccl_update in advance. + + * ccl.c: Now an element of Vccl_program_table is a vector of + length 4, not 3. + (ccl_get_compiled_code): New arg idx. Caller changed. Adjusted + for the change of Vccl_program_table. + (setup_ccl_program): Adjusted for the change of + Vccl_program_table. + (check_ccl_update): New function. + (Fregister_ccl_program): Use ASET to set an element of a vector. + Adjusted for the change of Vccl_program_table. + + * ccl.h (struct ccl_program): New member idx. + (check_ccl_update): Extern it. + 2005-05-27 Juanma Barranquero * buffer.c (Fbuffer_local_value): Make argument name match its use diff --git a/src/ccl.h b/src/ccl.h index cda611007f8..1c9c1b3b34e 100644 --- a/src/ccl.h +++ b/src/ccl.h @@ -33,6 +33,10 @@ Boston, MA 02111-1307, USA. */ /* Structure to hold information about running CCL code. Read comments in the file ccl.c for the detail of each field. */ struct ccl_program { + int idx; /* Index number of the CCL program. + -1 means that the program was given + by a vector, not by a program + name. */ int size; /* Size of the compiled code. */ Lisp_Object *prog; /* Pointer into the compiled code. */ int ic; /* Instruction Counter (index for PROG). */ @@ -90,6 +94,9 @@ extern Lisp_Object Vfont_ccl_encoder_alist; execution of ccl program CCL_PROG (symbol or vector). */ extern int setup_ccl_program P_ ((struct ccl_program *, Lisp_Object)); +/* Check if CCL is updated or not. If not, re-setup members of CCL. */ +extern int check_ccl_update P_ ((struct ccl_program *)); + extern int ccl_driver P_ ((struct ccl_program *, unsigned char *, unsigned char *, int, int, int *)); From 25ba62c5571c4d96707514a389539ebddd686033 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Fri, 27 May 2005 11:36:51 +0000 Subject: [PATCH 085/294] Don't require easy-mmode. (longlines-visible-face): Specify customization group. --- lisp/longlines.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lisp/longlines.el b/lisp/longlines.el index ebfb7a660b0..e9c300fdbec 100644 --- a/lisp/longlines.el +++ b/lisp/longlines.el @@ -39,8 +39,6 @@ ;;; Code: -(require 'easy-mmode) - (defgroup longlines nil "Automatic wrapping of long lines when loading files." :group 'fill) @@ -157,7 +155,8 @@ major mode changes." (defface longlines-visible-face '((t (:background "red"))) - "Face used to make hard newlines visible in `longlines-mode'.") + "Face used to make hard newlines visible in `longlines-mode'." + :group 'longlines) (defun longlines-show-hard-newlines (&optional arg) "Make hard newlines visible by adding a face. From 6c5a38fa3fb7c995768c6dd44274f1f8c6188396 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Fri, 27 May 2005 11:43:28 +0000 Subject: [PATCH 086/294] *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 27b778bdd37..76c39d30a97 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-05-27 Lute Kamstra + + * longlines.el: Don't require easy-mmode. + (longlines-visible-face): Specify customization group. + 2005-05-27 Kenichi Handa * language/cyrillic.el: Add cyrillic-iso8859-5 characters in the From 1f2503a581d35bcb2669254b5a2b58acf3a85e76 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Fri, 27 May 2005 11:51:14 +0000 Subject: [PATCH 087/294] (outline-1, outline-2, outline-3, outline-4) (outline-5, outline-6, outline-7, outline-8): Specify customization group. --- lisp/ChangeLog | 6 +++++- lisp/outline.el | 49 ++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 45 insertions(+), 10 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 76c39d30a97..d803aebf37c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2005-05-27 Lute Kamstra + * outline.el (outline-1, outline-2, outline-3, outline-4) + (outline-5, outline-6, outline-7, outline-8): Specify + customization group. + * longlines.el: Don't require easy-mmode. (longlines-visible-face): Specify customization group. @@ -15,7 +19,7 @@ * international/code-pages.el: Don't register a coding system into non-iso-charset-alist more than once. (cp-make-coding-system): Likewise. - + 2005-05-26 John Wiegley * eshell/esh-cmd.el (eshell-eval-command): If the return value of diff --git a/lisp/outline.el b/lisp/outline.el index 89e9e193e9c..b807365f733 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -1,6 +1,6 @@ ;;; outline.el --- outline mode commands for Emacs -;; Copyright (C) 1986, 93, 94, 95, 97, 2000, 01, 2004 +;; Copyright (C) 1986, 1993, 1994, 1995, 1997, 2000, 2001, 2004 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -167,14 +167,45 @@ in the file it applies to." 0 '(outline-font-lock-face) nil t))) "Additional expressions to highlight in Outline mode.") -(defface outline-1 '((t :inherit font-lock-function-name-face)) "Level 1.") -(defface outline-2 '((t :inherit font-lock-variable-name-face)) "Level 2.") -(defface outline-3 '((t :inherit font-lock-keyword-face)) "Level 3.") -(defface outline-4 '((t :inherit font-lock-builtin-face)) "Level 4.") -(defface outline-5 '((t :inherit font-lock-comment-face)) "Level 5.") -(defface outline-6 '((t :inherit font-lock-constant-face)) "Level 6.") -(defface outline-7 '((t :inherit font-lock-type-face)) "Level 7.") -(defface outline-8 '((t :inherit font-lock-string-face)) "Level 8.") +(defface outline-1 + '((t :inherit font-lock-function-name-face)) + "Level 1." + :group 'outlines) + +(defface outline-2 + '((t :inherit font-lock-variable-name-face)) + "Level 2." + :group 'outlines) + +(defface outline-3 + '((t :inherit font-lock-keyword-face)) + "Level 3." + :group 'outlines) + +(defface outline-4 + '((t :inherit font-lock-builtin-face)) + "Level 4." + :group 'outlines) + +(defface outline-5 + '((t :inherit font-lock-comment-face)) + "Level 5." + :group 'outlines) + +(defface outline-6 + '((t :inherit font-lock-constant-face)) + "Level 6." + :group 'outlines) + +(defface outline-7 + '((t :inherit font-lock-type-face)) + "Level 7." + :group 'outlines) + +(defface outline-8 + '((t :inherit font-lock-string-face)) + "Level 8." + :group 'outlines) (defvar outline-font-lock-faces [outline-1 outline-2 outline-3 outline-4 From 462789ab2a6bceaa9a00706f88255c18a878a0ae Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Fri, 27 May 2005 12:14:21 +0000 Subject: [PATCH 088/294] (calc): Specify customization group. --- lisp/ChangeLog | 2 ++ lisp/calc/calc.el | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d803aebf37c..1be288a2e4e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2005-05-27 Lute Kamstra + * calc/calc.el (calc): Specify customization group. + * outline.el (outline-1, outline-2, outline-3, outline-4) (outline-5, outline-6, outline-7, outline-8): Specify customization group. diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 3917cfab3fe..60449aa1e2c 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -209,7 +209,8 @@ (defgroup calc nil "GNU Calc" :prefix "calc-" - :tag "Calc") + :tag "Calc" + :group 'applications) ;;;###autoload (defcustom calc-settings-file From 55d56d3270886a76083b3e3394485bfdc2e8e75e Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Fri, 27 May 2005 12:32:51 +0000 Subject: [PATCH 089/294] (dns-mode): Specify customization group. --- lisp/ChangeLog | 2 ++ lisp/textmodes/dns-mode.el | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1be288a2e4e..aec381d7eea 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2005-05-27 Lute Kamstra + * textmodes/dns-mode.el (dns-mode): Specify customization group. + * calc/calc.el (calc): Specify customization group. * outline.el (outline-1, outline-2, outline-3, outline-4) diff --git a/lisp/textmodes/dns-mode.el b/lisp/textmodes/dns-mode.el index 400f87205c4..ac32eccd9ec 100644 --- a/lisp/textmodes/dns-mode.el +++ b/lisp/textmodes/dns-mode.el @@ -48,7 +48,8 @@ ;;; Code: (defgroup dns-mode nil - "DNS master file mode configuration.") + "DNS master file mode configuration." + :group 'data) (defconst dns-mode-classes '("IN" "CS" "CH" "HS") "List of strings with known DNS classes.") From dc11bf767ad8cf124b8954536b21199a313888c4 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Fri, 27 May 2005 12:38:19 +0000 Subject: [PATCH 090/294] (sgml-namespace-face): Specify customization group. --- lisp/ChangeLog | 3 +++ lisp/textmodes/sgml-mode.el | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index aec381d7eea..6eb1b614310 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2005-05-27 Lute Kamstra + * textmodes/sgml-mode.el (sgml-namespace-face): Specify + customization group. + * textmodes/dns-mode.el (dns-mode): Specify customization group. * calc/calc.el (calc): Specify customization group. diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index c4019d39fe5..cdc2916e799 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el @@ -250,7 +250,8 @@ Any terminating `>' or `/' is not matched.") (defface sgml-namespace-face '((t (:inherit font-lock-builtin-face))) - "`sgml-mode' face used to highlight the namespace part of identifiers.") + "`sgml-mode' face used to highlight the namespace part of identifiers." + :group 'sgml) (defvar sgml-namespace-face 'sgml-namespace-face) ;; internal From 18a8c7738bc1d8b5cedcfa28dcf9abae6cc5e063 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Fri, 27 May 2005 13:00:57 +0000 Subject: [PATCH 091/294] (superscript, subscript, tex-math-face) (tex-verbatim-face, tex-use-reftex): Specify customization group. --- lisp/ChangeLog | 15 ++++++--------- lisp/textmodes/tex-mode.el | 15 ++++++++++----- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6eb1b614310..c1e3a52fbe8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,15 +1,12 @@ 2005-05-27 Lute Kamstra - * textmodes/sgml-mode.el (sgml-namespace-face): Specify - customization group. - - * textmodes/dns-mode.el (dns-mode): Specify customization group. - - * calc/calc.el (calc): Specify customization group. - + * calc/calc.el (calc): * outline.el (outline-1, outline-2, outline-3, outline-4) - (outline-5, outline-6, outline-7, outline-8): Specify - customization group. + (outline-5, outline-6, outline-7, outline-8): + * textmodes/dns-mode.el (dns-mode): + * textmodes/sgml-mode.el (sgml-namespace-face): + * textmodes/tex-mode.el (superscript, subscript, tex-math-face) + (tex-verbatim-face, tex-use-reftex): Specify customization group. * longlines.el: Don't require easy-mmode. (longlines-visible-face): Specify customization group. diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 3f4a30dc792..e3efa32d551 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -643,19 +643,23 @@ An alternative value is \" . \", if you use a font with a narrow period." (defface superscript '((t :height 0.8)) ;; :raise 0.3 - "Face used for superscripts.") + "Face used for superscripts." + :group 'tex) (defface subscript '((t :height 0.8)) ;; :raise -0.3 - "Face used for subscripts.") + "Face used for subscripts." + :group 'tex) (defface tex-math-face '((t :inherit font-lock-string-face)) - "Face used to highlight TeX math expressions.") + "Face used to highlight TeX math expressions." + :group 'tex) (defvar tex-math-face 'tex-math-face) (defface tex-verbatim-face ;; '((t :inherit font-lock-string-face)) '((t :family "courier")) - "Face used to highlight TeX verbatim environments.") + "Face used to highlight TeX verbatim environments." + :group 'tex) (defvar tex-verbatim-face 'tex-verbatim-face) ;; Use string syntax but math face for $...$. @@ -1623,7 +1627,8 @@ If NOT-ALL is non-nil, save the `.dvi' file." (defcustom tex-use-reftex t "If non-nil, use RefTeX's list of files to determine what command to use." - :type 'boolean) + :type 'boolean + :group 'tex) (defvar tex-compile-commands '(((concat "pdf" tex-command From 3ec0e903957204e3620f1600edaa3423a13a965f Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Fri, 27 May 2005 13:09:37 +0000 Subject: [PATCH 092/294] (texinfo-heading-face): Specify customization group. --- lisp/ChangeLog | 4 +++- lisp/textmodes/texinfo.el | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c1e3a52fbe8..f795ead42f8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -6,7 +6,9 @@ * textmodes/dns-mode.el (dns-mode): * textmodes/sgml-mode.el (sgml-namespace-face): * textmodes/tex-mode.el (superscript, subscript, tex-math-face) - (tex-verbatim-face, tex-use-reftex): Specify customization group. + (tex-verbatim-face, tex-use-reftex): + * textmodes/texinfo.el (texinfo-heading-face): Specify + customization group. * longlines.el: Don't require easy-mmode. (longlines-visible-face): Specify customization group. diff --git a/lisp/textmodes/texinfo.el b/lisp/textmodes/texinfo.el index ec983077d26..bd14c658379 100644 --- a/lisp/textmodes/texinfo.el +++ b/lisp/textmodes/texinfo.el @@ -345,7 +345,8 @@ Subexpression 1 is what goes into the corresponding `@end' statement.") (defface texinfo-heading-face '((t (:inherit font-lock-function-name-face))) - "Face used for section headings in `texinfo-mode'.") + "Face used for section headings in `texinfo-mode'." + :group 'texinfo) (defvar texinfo-heading-face 'texinfo-heading-face) (defvar texinfo-font-lock-keywords From 2a611c1a4f9b6c374c4ae304eb07bfebf58af114 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 27 May 2005 13:16:05 +0000 Subject: [PATCH 093/294] (Vimage_library_alist): Moved from image.el. (syms_of_image): Defvar it. (lookup_image_type): Use it. --- src/image.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/image.c b/src/image.c index b61b07876d3..15e835fef3b 100644 --- a/src/image.c +++ b/src/image.c @@ -616,6 +616,10 @@ static struct image_type *image_types; Lisp_Object Vimage_types; +/* An alist of image types and libraries that implement the type. */ + +Lisp_Object Vimage_library_alist; + /* Cache for delayed-loading image types. */ static Lisp_Object Vimage_type_cache; @@ -696,7 +700,7 @@ lookup_image_type (symbol) struct image_type *type; /* We must initialize the image-type if it hasn't been already. */ - if (NILP (Finit_image_library (symbol, Qnil))) + if (NILP (Finit_image_library (symbol, Vimage_library_alist))) return 0; /* unimplemented */ for (type = image_types; type; type = type->next) @@ -7985,6 +7989,8 @@ of `image-library-alist', which see). */) void syms_of_image () { + extern Lisp_Object Qrisky_local_variable; /* Syms_of_xdisp has already run. */ + /* Must be defined now becase we're going to update it below, while defining the supported image types. */ DEFVAR_LISP ("image-types", &Vimage_types, @@ -7993,6 +7999,20 @@ Each element of the list is a symbol for a image type, like 'jpeg or 'png. To check whether it is really supported, use `image-type-available-p'. */); Vimage_types = Qnil; + DEFVAR_LISP ("image-library-alist", &Vimage_library_alist, + doc: /* Alist of image types vs external libraries needed to display them. + +Each element is a list (IMAGE-TYPE LIBRARY...), where the car is a symbol +representing a supported image type, and the rest are strings giving +alternate filenames for the corresponding external libraries. + +Emacs tries to load the libraries in the order they appear on the +list; if none is loaded, the running session of Emacs won't +support the image type. Types 'pbm and 'xbm don't need to be +listed; they're always supported. */); + Vimage_library_alist = Qnil; + Fput (intern ("image-library-alist"), Qrisky_local_variable, Qt); + Vimage_type_cache = Qnil; staticpro (&Vimage_type_cache); From c6d1b44698df6d501f4130e72887cb9fb25a3d1d Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 27 May 2005 13:17:50 +0000 Subject: [PATCH 094/294] (image-library-alist): Moved to image.c. (image-type-available-p): Doc fix. --- lisp/image.el | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/lisp/image.el b/lisp/image.el index ced73c8fb3a..b7b2d9988a8 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -48,20 +48,6 @@ IMAGE-TYPE must be a pair (PREDICATE . TYPE). PREDICATE is called with one argument, a string containing the image data. If PREDICATE returns a non-nil value, TYPE is the image's type.") -;;;###autoload -(defvar image-library-alist nil - "Alist of image types vs external libraries needed to display them. - -Each element is a list (IMAGE-TYPE LIBRARY...), where the car is a symbol -representing a supported image type, and the rest are strings giving -alternate filenames for the corresponding external libraries. - -Emacs tries to load the libraries in the order they appear on the -list; if none is loaded, the running session of Emacs won't -support the image type. Types 'pbm and 'xbm don't need to be -listed; they're always supported.") -;;;###autoload (put 'image-library-alist 'risky-local-variable t) - (defun image-jpeg-p (data) "Value is non-nil if DATA, a string, consists of JFIF image data. We accept the tag Exif because that is the same format." @@ -122,7 +108,7 @@ be determined." ;;;###autoload (defun image-type-available-p (type) - "Value is non-nil if image type TYPE is available. + "Return non-nil if image type TYPE is available. Image types are symbols like `xbm' or `jpeg'." (and (fboundp 'init-image-library) (init-image-library type image-library-alist))) From d5e1a786b7c9543d56f1a84c1695943fd90c6da1 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 27 May 2005 13:20:48 +0000 Subject: [PATCH 095/294] *** empty log message *** --- lisp/ChangeLog | 7 ++++++- src/ChangeLog | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f795ead42f8..49972c07676 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-05-27 Juanma Barranquero + + * image.el (image-library-alist): Moved to image.c. + (image-type-available-p): Doc fix. + 2005-05-27 Lute Kamstra * calc/calc.el (calc): @@ -180,7 +185,7 @@ 2005-05-26 Carsten Dominik - * textmodes/org.el: (org-mode): Use `define-derived-mode' to + * textmodes/org.el (org-mode): Use `define-derived-mode' to define `org-mode'. (org-agenda-mode): Use `run-mode-hooks' instead of `run-hooks'. diff --git a/src/ChangeLog b/src/ChangeLog index d85709e4c35..a5aee6ad56c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -17,6 +17,10 @@ 2005-05-27 Juanma Barranquero + * image.c (Vimage_library_alist): Moved from image.el. + (syms_of_image): Defvar it. + (lookup_image_type): Use it. + * buffer.c (Fbuffer_local_value): Make argument name match its use in docstring. From faa3b6fc5d8f35df624789c535540ab3e06983b7 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Fri, 27 May 2005 14:18:59 +0000 Subject: [PATCH 096/294] (Queries in Keyboard Macros): Rewrite to reflect current behavior. --- man/calc.texi | 43 +++++++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/man/calc.texi b/man/calc.texi index 9e9eeee68a5..e99aca582a8 100644 --- a/man/calc.texi +++ b/man/calc.texi @@ -31395,23 +31395,35 @@ are @emph{not} affected by @kbd{Z `} and @kbd{Z '}. @node Queries in Macros, , Local Values in Macros, Keyboard Macros @subsection Queries in Keyboard Macros -@noindent -@kindex Z = -@pindex calc-kbd-report -The @kbd{Z =} (@code{calc-kbd-report}) command displays an informative -message including the value on the top of the stack. You are prompted -to enter a string. That string, along with the top-of-stack value, -is displayed unless @kbd{m w} (@code{calc-working}) has been used -to turn such messages off. +@c @noindent +@c @kindex Z = +@c @pindex calc-kbd-report +@c The @kbd{Z =} (@code{calc-kbd-report}) command displays an informative +@c message including the value on the top of the stack. You are prompted +@c to enter a string. That string, along with the top-of-stack value, +@c is displayed unless @kbd{m w} (@code{calc-working}) has been used +@c to turn such messages off. +@noindent @kindex Z # @pindex calc-kbd-query -The @kbd{Z #} (@code{calc-kbd-query}) command displays a prompt message -(which you enter during macro definition), then does an algebraic entry -which takes its input from the keyboard, even during macro execution. -This command allows your keyboard macros to accept numbers or formulas -as interactive input. All the normal conventions of algebraic input, -including the use of @kbd{$} characters, are supported. +The @kbd{Z #} (@code{calc-kbd-query}) command prompts for an algebraic +entry which takes its input from the keyboard, even during macro +execution. All the normal conventions of algebraic input, including the +use of @kbd{$} characters, are supported. The prompt message itself is +taken from the top of the stack, and so must be entered (as a string) +before the @kbd{Z #} command. (Recall, as a string it can be entered by +pressing the @kbd{"} key and will appear as a vector when it is put on +the stack. The prompt message is only put on the stack to provide a +prompt for the @kbd{Z #} command; it will not play any role in any +subsequent calculations.) This command allows your keyboard macros to +accept numbers or formulas as interactive input. + +As an example, +@kbd{2 @key{RET} "Power: " @key{RET} Z # 3 @key{RET}} will prompt for +input with ``Power: '' in the minibuffer, then return 2 to the provided +power. (The response to the prompt that's given, 3 in this example, +will not be part of the macro.) @xref{Keyboard Macro Query, , , emacs, the Emacs Manual}, for a description of @kbd{C-x q} (@code{kbd-macro-query}), the standard Emacs way to accept @@ -35869,8 +35881,7 @@ keystrokes are not listed in this summary. @c @r{ @: Z ` @: @: @:calc-kbd-push@:} @r{ @: Z ' @: @: @:calc-kbd-pop@:} -@r{ a@: Z = @:message @: 28 @:calc-kbd-report@:} -@r{ @: Z # @:prompt @: @:calc-kbd-query@:} +@r{ @: Z # @: @: @:calc-kbd-query@:} @c @r{ comp@: Z C @:func, args @: 50 @:calc-user-define-composition@:} From fb9cc23825dca26a71b1af1ec2b1b6cad7276b18 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Fri, 27 May 2005 14:25:16 +0000 Subject: [PATCH 097/294] (calc-kbd-report): Remove. (calc-kbd-query): Rewrite. --- lisp/calc/calc-prog.el | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el index 0a24fbf574c..7bfb47ee61b 100644 --- a/lisp/calc/calc-prog.el +++ b/lisp/calc/calc-prog.el @@ -1446,15 +1446,22 @@ Redefine the corresponding command." (error "Unbalanced Z' in keyboard macro"))) -(defun calc-kbd-report (msg) - (interactive "sMessage: ") - (calc-wrapper - (math-working msg (calc-top-n 1)))) +;; (defun calc-kbd-report (msg) +;; (interactive "sMessage: ") +;; (calc-wrapper +;; (math-working msg (calc-top-n 1)))) -(defun calc-kbd-query (msg) - (interactive "sPrompt: ") - (calc-wrapper - (calc-alg-entry nil (and (not (equal msg "")) msg)))) +(defun calc-kbd-query () + (interactive) + (let ((defining-kbd-macro nil) + (executing-kbd-macro nil) + (msg (calc-top 1))) + (if (not (eq (car-safe msg) 'vec)) + (error "No prompt string provided on stack") + (setq msg (math-vector-to-string msg)) + (calc-wrapper + (calc-pop-stack 1) + (calc-alg-entry nil (and (not (equal msg "")) msg)))))) ;;;; Logical operations. From f62a8348f0df8480af5b0d029d672b668cdf3b9c Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Fri, 27 May 2005 14:31:10 +0000 Subject: [PATCH 098/294] (calc-kbd-query): Change error message. --- lisp/calc/calc-prog.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el index 7bfb47ee61b..8d2fba7fef0 100644 --- a/lisp/calc/calc-prog.el +++ b/lisp/calc/calc-prog.el @@ -1457,7 +1457,7 @@ Redefine the corresponding command." (executing-kbd-macro nil) (msg (calc-top 1))) (if (not (eq (car-safe msg) 'vec)) - (error "No prompt string provided on stack") + (error "No prompt string provided") (setq msg (math-vector-to-string msg)) (calc-wrapper (calc-pop-stack 1) From 63971eab9980207248a356f6d20a354abd385bd6 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Fri, 27 May 2005 14:48:25 +0000 Subject: [PATCH 099/294] *** empty log message *** --- lisp/ChangeLog | 5 +++++ man/ChangeLog | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 49972c07676..4a65384b67f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-05-27 Jay Belanger + + * calc/calc-prog.el (calc-kbd-report): Remove. + (calc-kbd-query): Rewrite. + 2005-05-27 Juanma Barranquero * image.el (image-library-alist): Moved to image.c. diff --git a/man/ChangeLog b/man/ChangeLog index 6f2cb820128..af06858ac3c 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,8 @@ +2005-05-27 Jay Belanger + + * calc.texi (Queries in Keyboard Macros): Rewrite to reflect + current behavior. + 2005-05-27 Nick Roberts * files.texi (Log Buffer): Merge in description of Log Edit From 83040cb0999eb9027c2517c78bd9166505a6ea8a Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 27 May 2005 16:19:36 +0000 Subject: [PATCH 100/294] (Info-goto-node): Revert autoload addition (2004-06-12). --- lisp/ChangeLog | 52 ++++++++++++++++++++++++-------------------------- lisp/info.el | 17 ++++++++++------- 2 files changed, 35 insertions(+), 34 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4a65384b67f..1083e2d9aa5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2005-05-27 Stefan Monnier + + * info.el (Info-goto-node): Revert autoload addition (2004-06-12). + 2005-05-27 Jay Belanger * calc/calc-prog.el (calc-kbd-report): Remove. @@ -5,7 +9,7 @@ 2005-05-27 Juanma Barranquero - * image.el (image-library-alist): Moved to image.c. + * image.el (image-library-alist): Move to image.c. (image-type-available-p): Doc fix. 2005-05-27 Lute Kamstra @@ -17,8 +21,8 @@ * textmodes/sgml-mode.el (sgml-namespace-face): * textmodes/tex-mode.el (superscript, subscript, tex-math-face) (tex-verbatim-face, tex-use-reftex): - * textmodes/texinfo.el (texinfo-heading-face): Specify - customization group. + * textmodes/texinfo.el (texinfo-heading-face): + Specify customization group. * longlines.el: Don't require easy-mmode. (longlines-visible-face): Specify customization group. @@ -28,8 +32,8 @@ * language/cyrillic.el: Add cyrillic-iso8859-5 characters in the encoding table of windows-1251. - * international/ucs-tables.el (ucs-set-table-for-input): If - translation-table-for-input of a coding system is a symbol, get + * international/ucs-tables.el (ucs-set-table-for-input): + If translation-table-for-input of a coding system is a symbol, get its translation-table property. * international/code-pages.el: Don't register a coding system into @@ -44,14 +48,12 @@ before checking the delimiter value. * eshell/em-cmpl.el (eshell-complete-parse-arguments): If the - character before a space at the end of a line is \, assume the - space is part of the last argument rather than a final argument - separator. + character before a space at the end of a line is \, assume the space + is part of the last argument rather than a final argument separator. - * eshell/esh-io.el (eshell-get-target): If - `eshell-buffer-shorthand' is in use, and the target is `t' or - `nil' (which are the most common values), don't assume that the - symbol target is a buffer. + * eshell/esh-io.el (eshell-get-target): If `eshell-buffer-shorthand' + is in use, and the target is `t' or `nil' (which are the most common + values), don't assume that the symbol target is a buffer. 2005-05-26 Luc Teirlinck @@ -162,8 +164,7 @@ 2005-05-26 Mark A. Hershberger - * xml.el (xml-substitute-special): Don't die for undefined xml - entities. + * xml.el (xml-substitute-special): Don't die for undefined xml entities. 2005-05-26 Jay Belanger @@ -194,11 +195,10 @@ define `org-mode'. (org-agenda-mode): Use `run-mode-hooks' instead of `run-hooks'. -2005-05-26 Nick Roberts +2005-05-26 Stefan Monnier * log-edit.el (log-edit-changelog-entries): Distinguish between filenames like xfns.c and fns.c. - Coded by Stefan Monnier . 2005-05-25 Luc Teirlinck @@ -231,7 +231,7 @@ 2005-05-24 Andre Spiegel - * progmodes/cperl-mode.el (cperl-vc-header-alist): Obsoleted. + * progmodes/cperl-mode.el (cperl-vc-header-alist): Obsolete. (cperl-vc-rcs-header, cperl-vc-sccs-header): New user options. (cperl-mode): Use them. @@ -272,11 +272,11 @@ CC Mode update to 5.30.10: - * cc-fonts.el (c-font-lock-declarators): Fixed bug where the point + * cc-fonts.el (c-font-lock-declarators): Fix bug where the point could go past the limit in decoration level 2, thereby causing errors during interactive fontification. - * cc-mode.el (c-make-inherited-keymap): Fixed cc-bytecomp bug when + * cc-mode.el (c-make-inherited-keymap): Fix cc-bytecomp bug when the file is evaluated interactively. * cc-engine.el (c-guess-basic-syntax): Handle operator @@ -294,7 +294,7 @@ Compensate for return value from `forward-line' when it has moved but not to a different line due to eob. - * cc-engine.el (c-guess-basic-syntax): Fixed anchoring in + * cc-engine.el (c-guess-basic-syntax): Fix anchoring in `objc-method-intro' and `objc-method-args-cont'. 2005-05-23 Alan Mackenzie @@ -323,8 +323,7 @@ * subr.el (font-lock-defaults): Remove defvar as it's already defined in font-core.el. - * font-lock.el (font-lock-beginning-of-syntax-function): Fix - docstring. + * font-lock.el (font-lock-beginning-of-syntax-function): Fix docstring. 2005-05-23 Nick Roberts @@ -336,8 +335,8 @@ * font-core.el: Update comment. - * emacs-lisp/easy-mmode.el (define-global-minor-mode): Use - `after-change-major-mode-hook' instead of `find-file-hook'. + * emacs-lisp/easy-mmode.el (define-global-minor-mode): + Use `after-change-major-mode-hook' instead of `find-file-hook'. * buff-menu.el (Buffer-menu-mode): Use `run-mode-hooks'. @@ -397,9 +396,8 @@ * vc-cvs.el (vc-cvs-checkout-model): Handle the case where FILE doesn't exist. - * vc.el (vc-trunk-p): Add autoload cookie. The function is used - in vc-rcs.el when vc-mistrust-permissions is t, which is not the - default. + * vc.el (vc-trunk-p): Add autoload cookie. The function is used in + vc-rcs.el when vc-mistrust-permissions is t, which is not the default. 2005-05-22 Nick Roberts diff --git a/lisp/info.el b/lisp/info.el index 0747245f41b..c36554e6a7a 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -1,7 +1,7 @@ ;;; info.el --- info package for Emacs -;; Copyright (C) 1985,86,92,93,94,95,96,97,98,99,2000,01,02,03,04,2005 -;; Free Software Foundation, Inc. +;; Copyright (C) 1985, 1986, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +;; 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: help @@ -515,9 +515,10 @@ in all the directories in that path." ;; since the argument will then be parsed improperly. This also ;; has the added benefit of allowing node names to be included ;; following the parenthesized filename. - (if (and (stringp file) (string-match "(.*)" file)) - (Info-goto-node file) - (Info-goto-node (concat "(" file ")"))) + (Info-goto-node + (if (and (stringp file) (string-match "(.*)" file)) + file + (concat "(" file ")"))) (if (zerop (buffer-size)) (Info-directory)))) @@ -1344,7 +1345,9 @@ any double quotes or backslashes must be escaped (\\\",\\\\)." ;; Go to an info node specified with a filename-and-nodename string ;; of the sort that is found in pointers in nodes. -;;;###autoload +;; Don't autoload this function: the correct entry point for other packages +;; to use is `info'. --Stef +;; ;;;###autoload (defun Info-goto-node (nodename &optional fork) "Go to info node named NODENAME. Give just NODENAME or (FILENAME)NODENAME. If NODENAME is of the form (FILENAME)NODENAME, the node is in the Info file @@ -4127,5 +4130,5 @@ BUFFER is the buffer speedbar is requesting buttons for." (provide 'info) -;;; arch-tag: f2480fe2-2139-40c1-a49b-6314991164ac +;; arch-tag: f2480fe2-2139-40c1-a49b-6314991164ac ;;; info.el ends here From edfaeb4ee9abb4bed5d8fe723cc123c3299252e8 Mon Sep 17 00:00:00 2001 From: Masatake YAMATO Date: Fri, 27 May 2005 16:59:55 +0000 Subject: [PATCH 101/294] * xdisp.c (note_mode_line_or_margin_highlight): Change the pointer to a hand cursor when hoovering over a mouse-face. --- src/ChangeLog | 5 +++++ src/xdisp.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index a5aee6ad56c..8c64defd5db 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-05-28 Masatake YAMATO + + * xdisp.c (note_mode_line_or_margin_highlight): Change the + pointer to a hand cursor when hoovering over a mouse-face. + 2005-05-27 Kenichi Handa * xterm.c (x_encode_char): Call check_ccl_update in advance. diff --git a/src/xdisp.c b/src/xdisp.c index 53d881072ce..b20c4815abc 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -21443,6 +21443,9 @@ note_mode_line_or_margin_highlight (window, x, y, area) 0, 0, 0, &ignore, glyph->face_id, 1); show_mouse_face (dpyinfo, DRAW_MOUSE_FACE); + + if (NILP (pointer)) + pointer = Qhand; } } From e9d3dbea9641e23b59dfd5ebcbbd6548fb04b950 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Fri, 27 May 2005 20:40:06 +0000 Subject: [PATCH 102/294] (Queries in Keyboard Macros): Fix example. --- man/calc.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/calc.texi b/man/calc.texi index e99aca582a8..1376fb5deeb 100644 --- a/man/calc.texi +++ b/man/calc.texi @@ -31420,7 +31420,7 @@ subsequent calculations.) This command allows your keyboard macros to accept numbers or formulas as interactive input. As an example, -@kbd{2 @key{RET} "Power: " @key{RET} Z # 3 @key{RET}} will prompt for +@kbd{2 @key{RET} "Power: " @key{RET} Z # 3 @key{RET} ^} will prompt for input with ``Power: '' in the minibuffer, then return 2 to the provided power. (The response to the prompt that's given, 3 in this example, will not be part of the macro.) From be820e8d82e00577e69b07a9a29f207144439a73 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Fri, 27 May 2005 20:54:58 +0000 Subject: [PATCH 103/294] (gud-goto-info): Use info. Don't use require. (toggle-gud-tooltip-dereference): Rename from gud-toggle-tooltip-dereference. --- lisp/progmodes/gud.el | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 4c95fc65d58..31b9e7d7204 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -25,17 +25,17 @@ ;;; Commentary: -;; The ancestral gdb.el was by W. Schelter -;; It was later rewritten by rms. Some ideas were due to Masanobu. -;; Grand Unification (sdb/dbx support) by Eric S. Raymond -;; The overloading code was then rewritten by Barry Warsaw , -;; who also hacked the mode to use comint.el. Shane Hartman -;; added support for xdb (HPUX debugger). Rick Sladkey -;; wrote the GDB command completion code. Dave Love -;; added the IRIX kluge, re-implemented the Mips-ish variant and added -;; a menu. Brian D. Carlstrom combined the IRIX kluge with -;; the gud-xdb-directories hack producing gud-dbx-directories. Derek L. Davies -;; added support for jdb (Java debugger.) +;; The ancestral gdb.el was by W. Schelter It was +;; later rewritten by rms. Some ideas were due to Masanobu. Grand +;; Unification (sdb/dbx support) by Eric S. Raymond Barry +;; Warsaw hacked the mode to use comint.el. Shane Hartman +;; added support for xdb (HPUX debugger). Rick Sladkey +;; wrote the GDB command completion code. Dave Love +;; added the IRIX kluge, re-implemented the Mips-ish variant +;; and added a menu. Brian D. Carlstrom combined the IRIX +;; kluge with the gud-xdb-directories hack producing gud-dbx-directories. +;; Derek L. Davies added support for jdb (Java +;; debugger.) ;;; Code: @@ -107,11 +107,10 @@ Used to grey out relevant togolbar icons.") (setq same-window-regexps nil) (throw 'info-found nil)))) nil 0) - (require 'info) (select-frame (make-frame))) (if (memq gud-minor-mode '(gdbmi gdba)) - (Info-goto-node "(emacs)GDB Graphical Interface") - (Info-goto-node "(emacs)Debuggers")))) + (info "(emacs)GDB Graphical Interface") + (info "(emacs)Debuggers")))) (easy-mmode-defmap gud-menu-map '(([help] "Info" . gud-goto-info) @@ -343,13 +342,13 @@ t means that there is no stack, and we are in display-file mode.") (defvar gud-speedbar-menu-items ;; Note to self. Add expand, and turn off items when not available. - '(["Jump to stack frame" speedbar-edit-line + '(["Jump to stack frame" speedbar-edit-line (with-current-buffer gud-comint-buffer (not (memq gud-minor-mode '(gdbmi gdba))))] - ["Edit value" speedbar-edit-line + ["Edit value" speedbar-edit-line (with-current-buffer gud-comint-buffer (not (memq gud-minor-mode '(gdbmi gdba))))] - ["Delete expression" gdb-var-delete + ["Delete expression" gdb-var-delete (with-current-buffer gud-comint-buffer (not (memq gud-minor-mode '(gdbmi gdba))))]) "Additional menu items to add to the speedbar frame.") @@ -3192,7 +3191,7 @@ For C this would dereference a pointer expression.") "The mouse movement event that led to a tooltip display. This event can be examined by forms in GUD-TOOLTIP-DISPLAY.") -(defun gud-tooltip-toggle-dereference () +(defun toggle-gud-tooltip-dereference () "Toggle whether tooltips should show `* expr' or `expr'." (interactive) (setq gud-tooltip-dereference (not gud-tooltip-dereference)) @@ -3201,7 +3200,7 @@ This event can be examined by forms in GUD-TOOLTIP-DISPLAY.") (if gud-tooltip-dereference "on" "off")))) (define-obsolete-function-alias 'tooltip-gud-toggle-dereference - 'gud-tooltip-toggle-dereference "22.1") + 'toggle-gud-tooltip-dereference "22.1") (define-minor-mode gud-tooltip-mode "Toggle the display of GUD tooltips." From 9594f9294b16c3e828b593c4cc9159b6328e1aa3 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Fri, 27 May 2005 20:56:43 +0000 Subject: [PATCH 104/294] (gdb-all-registers): New variable. (gdb-registers-buffer, toggle-gdb-all-registers): Toggle display of floating point registers. (gdb-registers-mode-map): Bind SPC to toggle-gdb-all-registers. --- lisp/progmodes/gdb-ui.el | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 56d52eff6c3..ecb8f63f8ea 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -1659,13 +1659,20 @@ static char *magick[] = { ;; Registers buffer. ;; +(defcustom gdb-all-registers nil + "Non-nil means include floating-point registers." + :type 'boolean + :group 'gud + :version "22.1") + (gdb-set-buffer-rules 'gdb-registers-buffer 'gdb-registers-buffer-name 'gdb-registers-mode) (def-gdb-auto-updated-buffer gdb-registers-buffer gdb-invalidate-registers - (concat gdb-server-prefix "info registers\n") + (concat + gdb-server-prefix "info " (if gdb-all-registers "all-") "registers\n") gdb-info-registers-handler gdb-info-registers-custom) @@ -1674,6 +1681,7 @@ static char *magick[] = { (defvar gdb-registers-mode-map (let ((map (make-sparse-keymap))) (suppress-keymap map) + (define-key map " " 'toggle-gdb-all-registers) (define-key map "q" 'kill-this-buffer) map)) @@ -1683,7 +1691,7 @@ static char *magick[] = { \\{gdb-registers-mode-map}" (kill-all-local-variables) (setq major-mode 'gdb-registers-mode) - (setq mode-name "Registers") + (setq mode-name "Registers:") (setq buffer-read-only t) (use-local-map gdb-registers-mode-map) (run-mode-hooks 'gdb-registers-mode-hook) @@ -1706,6 +1714,20 @@ static char *magick[] = { (special-display-frame-alist gdb-frame-parameters)) (display-buffer (gdb-get-create-buffer 'gdb-registers-buffer)))) +(defun toggle-gdb-all-registers () + "Toggle the display of floating-point registers." + (interactive) + (if gdb-all-registers + (progn + (setq gdb-all-registers nil) + (with-current-buffer (gdb-get-buffer 'gdb-registers-buffer) + (setq mode-name "Registers:"))) + (setq gdb-all-registers t) + (with-current-buffer (gdb-get-buffer 'gdb-registers-buffer) + (setq mode-name "Registers:All"))) + (gdb-invalidate-registers)) + + ;; Memory buffer. ;; (defcustom gdb-memory-repeat-count 32 From f8916156891a6ef1a4369074eee513fc119cf179 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Fri, 27 May 2005 21:27:22 +0000 Subject: [PATCH 105/294] *** empty log message *** --- lisp/ChangeLog | 11 +++++++++++ man/ChangeLog | 5 +++++ 2 files changed, 16 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1083e2d9aa5..2bbd2b010a9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2005-05-28 Nick Roberts + + * progmodes/gdb-ui.el (gdb-all-registers): New variable. + (gdb-registers-buffer, toggle-gdb-all-registers): + Toggle display of floating point registers. + (gdb-registers-mode-map): Bind SPC to toggle-gdb-all-registers. + + * progmodes/gud.el (gud-goto-info): Use info. Don't use require. + (toggle-gud-tooltip-dereference): + Rename from gud-toggle-tooltip-dereference. + 2005-05-27 Stefan Monnier * info.el (Info-goto-node): Revert autoload addition (2004-06-12). diff --git a/man/ChangeLog b/man/ChangeLog index af06858ac3c..468e204c03d 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,8 @@ +2005-05-28 Nick Roberts + + * building.texi (Other Buffers): SPC toggles display of + floating point registers. + 2005-05-27 Jay Belanger * calc.texi (Queries in Keyboard Macros): Rewrite to reflect From 4f0ea16cbae5cf530deac348187d8d0b6916a033 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Fri, 27 May 2005 21:28:01 +0000 Subject: [PATCH 106/294] (Other Buffers): SPC toggles display of floating point registers. --- man/building.texi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/man/building.texi b/man/building.texi index 78eb49702f4..f98136f9db1 100644 --- a/man/building.texi +++ b/man/building.texi @@ -932,7 +932,8 @@ separately to examine their values. @xref{Watch Expressions}. @item Registers Buffer The registers buffer displays the values held by the registers -(@pxref{Registers,,, gdb, The GNU debugger}). +(@pxref{Registers,,, gdb, The GNU debugger}). Press @key{SPC} to +toggle the display of floating point registers. @item Assembler Buffer The assembler buffer displays the current frame as machine code. An @@ -944,7 +945,7 @@ appear in the fringe or margin. The threads buffer displays a summary of all threads currently in your program (@pxref{Threads,,, gdb, The GNU debugger}). Move point to -any thread in the list and type @key{RET} to make it become the +any thread in the list and press @key{RET} to make it become the current thread (@code{gdb-threads-select}) and display the associated source in the source buffer. Alternatively, click @kbd{Mouse-2} to make the selected thread become the current one. From 1565a620708ff16527b2588b89ce1329f907b447 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Fri, 27 May 2005 21:45:14 +0000 Subject: [PATCH 107/294] (calc-info-goto-node): Use info instead of Info-goto-node. --- lisp/ChangeLog | 5 +++++ lisp/calc/calc-misc.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2bbd2b010a9..012a24301ee 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-05-27 Jay Belanger + + * calc/calc-misc.el (calc-info-goto-node): Use info instead of + Info-goto-node. + 2005-05-28 Nick Roberts * progmodes/gdb-ui.el (gdb-all-registers): New variable. diff --git a/lisp/calc/calc-misc.el b/lisp/calc/calc-misc.el index e8bdfe2fa5a..ce0da11ecaa 100644 --- a/lisp/calc/calc-misc.el +++ b/lisp/calc/calc-misc.el @@ -160,7 +160,7 @@ Calc user interface as before (either M-# C or M-# K; initially M-# C)." "Go to a node in the Calculator info documentation." (interactive) (select-window (get-largest-window)) - (Info-goto-node (concat "(Calc)" node))) + (info (concat "(Calc)" node))) (defun calc-tutorial () "Run the Emacs Info system on the Calculator Tutorial." From 9ca6c34d5e3400ee21f2b6a87ad511ba9270040d Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sat, 28 May 2005 04:36:16 +0000 Subject: [PATCH 108/294] (calc-embed-arg): New variable. (calc-do-embedded-activate, calc-embedded-activate-formula) (calc-embedded-edit, calc-do-embedded-activate) (calc-embedded-make-info): Use new variable in place of undeclared variable. --- lisp/calc/calc-embed.el | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/lisp/calc/calc-embed.el b/lisp/calc/calc-embed.el index 6b94cd0af0c..48114735b72 100644 --- a/lisp/calc/calc-embed.el +++ b/lisp/calc/calc-embed.el @@ -192,8 +192,15 @@ (defvar calc-embed-top) (defvar calc-embed-bot) +;; The variable calc-embed-arg is local to calc-do-embedded, +;; calc-embedded-update-formula, calc-embedded-edit and +;; calc-do-embedded-activate, but is used by +;; calc-embedded-make-info, which is called by the above +;; functions. +(defvar calc-embed-arg) + (defvar calc-embedded-quiet nil) -(defun calc-do-embedded (arg end obeg oend) +(defun calc-do-embedded (calc-embed-arg end obeg oend) (if calc-embedded-info ;; Turn embedded mode off or switch to a new buffer. @@ -237,7 +244,7 @@ (buffer-name))) (keyboard-quit)) (calc-embedded nil))) - (calc-embedded arg end obeg oend))) + (calc-embedded calc-embed-arg end obeg oend))) ;; Turn embedded mode on. (calc-plain-buffer-only) @@ -250,7 +257,8 @@ (calc-embedded-save-original-modes) (or calc-embedded-globals (calc-find-globals)) - (setq info (calc-embedded-make-info (point) nil t arg end obeg oend)) + (setq info + (calc-embedded-make-info (point) nil t calc-embed-arg end obeg oend)) (if (eq (car-safe (aref info 8)) 'error) (progn (setq calc-embedded-original-modes nil) @@ -311,13 +319,13 @@ (calc-select-part 2))) -(defun calc-embedded-update-formula (arg) +(defun calc-embedded-update-formula (calc-embed-arg) (interactive "P") - (if arg + (if calc-embed-arg (let ((entry (assq (current-buffer) calc-embedded-active))) (while (setq entry (cdr entry)) (and (eq (car-safe (aref (car entry) 8)) 'calcFunc-evalto) - (or (not (consp arg)) + (or (not (consp calc-embed-arg)) (and (<= (aref (car entry) 2) (region-beginning)) (>= (aref (car entry) 3) (region-end)))) (save-excursion @@ -337,9 +345,9 @@ (goto-char (+ (aref info 4) pt)))))))) -(defun calc-embedded-edit (arg) +(defun calc-embedded-edit (calc-embed-arg) (interactive "P") - (let ((info (calc-embedded-make-info (point) nil t arg)) + (let ((info (calc-embedded-make-info (point) nil t calc-embed-arg)) str) (if (eq (car-safe (aref info 8)) 'error) (progn @@ -374,12 +382,12 @@ (aset info 8 val) (calc-embedded-update info 14 t t)))) -(defun calc-do-embedded-activate (arg cbuf) +(defun calc-do-embedded-activate (calc-embed-arg cbuf) (calc-plain-buffer-only) - (if arg + (if calc-embed-arg (calc-embedded-forget)) (calc-find-globals) - (if (< (prefix-numeric-value arg) 0) + (if (< (prefix-numeric-value calc-embed-arg) 0) (message "Deactivating %s for Calc Embedded mode" (buffer-name)) (message "Activating %s for Calc Embedded mode..." (buffer-name)) (save-excursion @@ -802,13 +810,13 @@ The command \\[yank] can retrieve it from there." (if (and (integerp calc-embed-top) (not calc-embed-bot)) ; started with a user-supplied argument (progn - (if (= (setq arg (prefix-numeric-value arg)) 0) + (if (= (setq calc-embed-arg (prefix-numeric-value calc-embed-arg)) 0) (progn (aset info 2 (copy-marker (region-beginning))) (aset info 3 (copy-marker (region-end)))) - (aset info (if (> arg 0) 2 3) (point-marker)) - (forward-line arg) - (aset info (if (> arg 0) 3 2) (point-marker))) + (aset info (if (> calc-embed-arg 0) 2 3) (point-marker)) + (forward-line calc-embed-arg) + (aset info (if (> calc-embed-arg 0) 3 2) (point-marker))) (aset info 4 (copy-marker (aref info 2))) (aset info 5 (copy-marker (aref info 3)))) (if (aref info 4) From 430c8528faee2ca180060abea4132abded8c2150 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sat, 28 May 2005 04:37:43 +0000 Subject: [PATCH 109/294] (calc-help-map, calc-alg-map, calc-alg-esc-map): Declare them. --- lisp/calc/calc-ext.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el index adbdf7a96e2..0b177b06dc4 100644 --- a/lisp/calc/calc-ext.el +++ b/lisp/calc/calc-ext.el @@ -43,6 +43,9 @@ (defvar math-comp-sel-cpos nil) (defvar math-compose-hash-args nil) +(defvar calc-alg-map) +(defvar calc-alg-esc-map) + ;;; The following was made a function so that it could be byte-compiled. (defun calc-init-extensions () @@ -1192,8 +1195,9 @@ calc-kill calc-kill-region calc-yank)))) (math-normalize val))))) +(defvar calc-help-map nil) -(if (boundp 'calc-help-map) +(if calc-help-map nil (setq calc-help-map (make-keymap)) (define-key calc-help-map "b" 'calc-describe-bindings) From e206ee4c1a272190466a2cbeb9da220eb779b524 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sat, 28 May 2005 04:38:23 +0000 Subject: [PATCH 110/294] (math-decls-cache-tag): Declare it. --- lisp/calc/calc-stuff.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/calc/calc-stuff.el b/lisp/calc/calc-stuff.el index c6e8d8bbf27..0564e39ed57 100644 --- a/lisp/calc/calc-stuff.el +++ b/lisp/calc/calc-stuff.el @@ -171,6 +171,7 @@ With a prefix, push that prefix as a number onto the stack." (defvar math-max-digits-cache) ; calc-bin.el (defvar math-integral-cache) ; calcalg2.el (defvar math-units-table) ; calc-units.el +(defvar math-decls-cache-tag) ; calc-arith.el (defvar math-format-date-cache) ; calc-forms.el (defvar math-holidays-cache-tag) ; calc-forms.el From 9d871e6da5b22b9fe5149f23cf496be15cac5635 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sat, 28 May 2005 04:39:45 +0000 Subject: [PATCH 111/294] (math-decls-cache, math-decls-all): Declare them. --- lisp/calc/calcalg2.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/calc/calcalg2.el b/lisp/calc/calcalg2.el index 7e502aa1a87..d139dcf28ba 100644 --- a/lisp/calc/calcalg2.el +++ b/lisp/calc/calcalg2.el @@ -202,6 +202,8 @@ (defvar math-deriv-var) (defvar math-deriv-total) (defvar math-deriv-symb) +(defvar math-decls-cache) +(defvar math-decls-all) (defun math-derivative (expr) (cond ((equal expr math-deriv-var) From 35cdbd30519d44804d52b28fd417fa4f1e49a889 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sat, 28 May 2005 04:40:31 +0000 Subject: [PATCH 112/294] (calc-arg-values): Declare it. --- lisp/calc/calc-aent.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/calc/calc-aent.el b/lisp/calc/calc-aent.el index b947b597acf..8af03c4d206 100644 --- a/lisp/calc/calc-aent.el +++ b/lisp/calc/calc-aent.el @@ -947,6 +947,9 @@ in Calc algebraic input.") first nil)) x)) +;; calc-arg-values is defined in calc-ext.el, but is used here. +(defvar calc-arg-values) + (defun calc-check-user-syntax (&optional x prec) (let ((p calc-user-parse-table) (matches nil) From f5a3eb30e9e058c90a45b3a0218c3bf8add614a3 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sat, 28 May 2005 04:41:46 +0000 Subject: [PATCH 113/294] (calc-alg-map): Declare it. --- lisp/calc/calc.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 60449aa1e2c..7656f14bb87 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -1053,7 +1053,7 @@ If nil, selections displayed but ignored.") (use-global-map glob) (use-local-map loc))))) - +(defvar calc-alg-map) ; Defined in calc-ext.el (defun calc-mode () "Calculator major mode. From 21646dd1cdc1efe13cf6450dd6491a64b3eb7755 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sat, 28 May 2005 05:05:55 +0000 Subject: [PATCH 114/294] (calc-embedded-make-info): When selecting region with positive prefix argument, use end of line instead of beginning of next line. --- lisp/calc/calc-embed.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/calc/calc-embed.el b/lisp/calc/calc-embed.el index 48114735b72..75ba72a694b 100644 --- a/lisp/calc/calc-embed.el +++ b/lisp/calc/calc-embed.el @@ -816,6 +816,9 @@ The command \\[yank] can retrieve it from there." (aset info 3 (copy-marker (region-end)))) (aset info (if (> calc-embed-arg 0) 2 3) (point-marker)) (forward-line calc-embed-arg) + (when (> calc-embed-arg 0) + (forward-line -1) + (end-of-line)) (aset info (if (> calc-embed-arg 0) 3 2) (point-marker))) (aset info 4 (copy-marker (aref info 2))) (aset info 5 (copy-marker (aref info 3)))) From 909bd0cae66db515c5efe0fc8d78ea686e648fa7 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sat, 28 May 2005 05:16:52 +0000 Subject: [PATCH 115/294] (Assignments in Embedded Mode): Fix variable name. --- man/calc.texi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/man/calc.texi b/man/calc.texi index 1376fb5deeb..d9eb1e2cf22 100644 --- a/man/calc.texi +++ b/man/calc.texi @@ -30495,7 +30495,7 @@ mode. @kindex M-# u @kindex M-# = -@pindex calc-embedded-update +@pindex calc-embedded-update-formula Another way to change the assignment to @code{foo} would simply be to edit the number using regular Emacs editing rather than Embedded mode. Then, we have to find a way to get Embedded mode to notice @@ -35101,11 +35101,12 @@ keystrokes are not listed in this summary. @r{ @: M-# r @: @: 36 @:calc-grab-rectangle@:} @r{ @: M-# s @: @: @:calc-info-summary@:} @r{ @: M-# t @: @: @:calc-tutorial@:} -@r{ @: M-# u @: @: @:calc-embedded-update@:} +@r{ @: M-# u @: @: @:calc-embedded-update-formula@:} @r{ @: M-# w @: @: @:calc-embedded-word@:} @r{ @: M-# x @: @: @:calc-quit@:} @r{ @: M-# y @: @:1,28,49 @:calc-copy-to-buffer@:} @r{ @: M-# z @: @: @:calc-user-invocation@:} +@r{ @: M-# = @: @: @:calc-embedded-update-formula@:} @r{ @: M-# : @: @: 36 @:calc-grab-sum-down@:} @r{ @: M-# _ @: @: 36 @:calc-grab-sum-across@:} @r{ @: M-# ` @:editing @: 30 @:calc-embedded-edit@:} From e0b43b66a5025dca7527495dc456150d1c66e847 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sat, 28 May 2005 05:29:14 +0000 Subject: [PATCH 116/294] *** empty log message *** --- man/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/man/ChangeLog b/man/ChangeLog index 468e204c03d..d469cf60def 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +2005-05-28 Jay Belanger + + * calc.texi (Assignments in Embedded Mode): Fix variable name. + 2005-05-28 Nick Roberts * building.texi (Other Buffers): SPC toggles display of From c622c18ec0d4aed4a57fea55171f52eff59e2c20 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sat, 28 May 2005 05:36:16 +0000 Subject: [PATCH 117/294] (calc-embedded-make-info): Adjust positioning of end of selected region when an argument is given. --- lisp/calc/calc-embed.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lisp/calc/calc-embed.el b/lisp/calc/calc-embed.el index 75ba72a694b..e6e95cae0ac 100644 --- a/lisp/calc/calc-embed.el +++ b/lisp/calc/calc-embed.el @@ -815,10 +815,11 @@ The command \\[yank] can retrieve it from there." (aset info 2 (copy-marker (region-beginning))) (aset info 3 (copy-marker (region-end)))) (aset info (if (> calc-embed-arg 0) 2 3) (point-marker)) - (forward-line calc-embed-arg) - (when (> calc-embed-arg 0) - (forward-line -1) - (end-of-line)) + (if (> calc-embed-arg 0) + (progn + (forward-line (1- calc-embed-arg)) + (end-of-line)) + (forward-line (1+ calc-embed-arg))) (aset info (if (> calc-embed-arg 0) 3 2) (point-marker))) (aset info 4 (copy-marker (aref info 2))) (aset info 5 (copy-marker (aref info 3)))) From f16fc7f9c6f4c5506445ebf4c364285050b29211 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sat, 28 May 2005 05:48:15 +0000 Subject: [PATCH 118/294] (Basic Embedded Mode): Explain behavior of arguments to calc-embedded-mode. --- man/calc.texi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/man/calc.texi b/man/calc.texi index d9eb1e2cf22..9b89282aa3d 100644 --- a/man/calc.texi +++ b/man/calc.texi @@ -30113,9 +30113,9 @@ your own favorite delimiters. Delimiters like @samp{$ $} can appear on their own separate lines or in-line with the formula. If you give a positive or negative numeric prefix argument, Calc -instead uses the current point as one end of the formula, and moves -forward or backward (respectively) by that many lines to find the -other end. Explicit delimiters are not necessary in this case. +instead uses the current point as one end of the formula, and includes +that many lines forward or backward (respectively, including the current +line). Explicit delimiters are not necessary in this case. With a prefix argument of zero, Calc uses the current region (delimited by point and mark) instead of formula delimiters. From 05294d63496985243beaa96a46c7e59338380d84 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sat, 28 May 2005 05:49:44 +0000 Subject: [PATCH 119/294] *** empty log message *** --- lisp/ChangeLog | 19 +++++++++++++++++++ man/ChangeLog | 2 ++ 2 files changed, 21 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 012a24301ee..b1e9042b620 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -3,6 +3,25 @@ * calc/calc-misc.el (calc-info-goto-node): Use info instead of Info-goto-node. + * calc/calc-embed.el (calc-embed-arg): New variable. + (calc-do-embedded-activate, calc-embedded-activate-formula) + (calc-embedded-edit, calc-do-embedded-activate): Replace undeclared + variable by new variable. + (calc-embedded-make-info): Replace undeclared variable by new + variable. When selecting region with positive prefix + argument, use end of previous line instead of beginning of line. + + * calc/calc-aent.el (calc-arg-values): Declare it. + + * calc/calc-ext.el (calc-help-map, calc-alg-map, calc-alg-esc-map): + Declare them. + + * calc/calc-stuff.el (math-decls-cache-tag): Declare it. + + * calc/calc.el (calc-alg-map): Declare it. + + * calc/calcalg2.el (math-decls-cache, math-decls-all): Declare them. + 2005-05-28 Nick Roberts * progmodes/gdb-ui.el (gdb-all-registers): New variable. diff --git a/man/ChangeLog b/man/ChangeLog index d469cf60def..6d00db07079 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,6 +1,8 @@ 2005-05-28 Jay Belanger * calc.texi (Assignments in Embedded Mode): Fix variable name. + (Basic Embedded Mode): Explain behavior of arguments to + calc-embedded-mode. 2005-05-28 Nick Roberts From 37fa88eb505c34b831b5e5ea562e8fc4889ed11a Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 28 May 2005 09:30:00 +0000 Subject: [PATCH 120/294] Change NBSP to space. --- etc/TUTORIAL.fr | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/etc/TUTORIAL.fr b/etc/TUTORIAL.fr index 38853c608b9..e3e940abd4e 100644 --- a/etc/TUTORIAL.fr +++ b/etc/TUTORIAL.fr @@ -746,14 +746,14 @@ syst périodiquement un fichier de « sauvegarde automatique » pour chaque fichier en cours d'édition. Le nom de ce fichier commence et se termine par un # : si, par exemple, votre fichier s'appelle -« hello.c », son fichier de sauvegarde automatique s'appellera -« #hello.c# ». Lorsque vous sauvegardez le fichier de la façon +« hello.c », son fichier de sauvegarde automatique s'appellera +« #hello.c# ». Lorsque vous sauvegardez le fichier de la façon habituelle, Emacs détruit son fichier de sauvegarde automatique. Si l'ordinateur se plante, vous pouvez récupérer ce qui a été sauvegardé automatiquement en ouvrant normalement le fichier (celui que vous éditiez, pas la sauvegarde automatique), puis en faisant -M-x recover file. Lorsqu'Emacs vous demande de confirmer, +M-x recover file. Lorsqu'Emacs vous demande de confirmer, tapez yes pour continuer et récupérer ainsi les données sauvées par la sauvegarde automatique. @@ -847,7 +847,7 @@ et que la ligne est trop longue. Vous pouvez activer le mode Auto Fill en faisant M-x auto fill mode. Lorsqu'il est activé, vous pouvez le désactiver en -faisant à nouveau M-x auto fill mode. Si le mode est +faisant à nouveau M-x auto fill mode. Si le mode est désactivé, cette commande l'active et, s'il est activé, elle le désactive : on dit que la commande « fait basculer le mode ». @@ -913,10 +913,10 @@ de mettre fin REMARQUE : Sur certains systèmes, C-s gèlera l'écran et vous ne verrez plus rien se produire dans Emacs. Cela indique qu'une -« fonctionnalité » du système d'exploitation, appelée « contrôle de +« fonctionnalité » du système d'exploitation, appelée « contrôle de flux », a intercepté le C-s et ne lui permet pas de parvenir à Emacs. Pour décoincer l'écran, faites C-q puis consultez la section -« Spontaneous Entry to Incremental Search » dans le manuel d'Emacs +« Spontaneous Entry to Incremental Search » dans le manuel d'Emacs pour avoir des avis sur la gestion de cette « fonctionnalité ». Si vous vous trouvez au milieu d'une recherche incrémentale et que @@ -924,7 +924,7 @@ vous tapez , vous remarquerez que cela supprime le dernier caractère de la chaîne recherchée et que la recherche reprend à l'endroit où elle se trouvait précédemment. Supposons, par exemple, que vous ayiez tapé « c » pour trouver la première occurrence de -« c ». Si vous tapez maintenant « u », le curseur ira sur la première +« c ». Si vous tapez maintenant « u », le curseur ira sur la première occurrence de « cu ». Faites : cela supprime le « u » de la chaîne de recherche et le curseur revient à la première occurrence de « c ». @@ -1038,7 +1038,7 @@ de possibilit ici. Cependant, vous pouvez vouloir en apprendre plus, car il a bien d'autres fonctionnalités utiles. Emacs dispose de commandes pour lire la documentation sur ses commandes. Ces commandes d'« aide » -commencent toutes par le caractère C-h, le « caractère d'aide ». +commencent toutes par le caractère C-h, le « caractère d'aide ». Pour utiliser l'aide, tapez C-h suivi d'un caractère indiquant le type d'aide que vous souhaitez. Si vous êtes VRAIMENT perdu, faites C-h ? @@ -1113,7 +1113,7 @@ leur correspondent, comme find-file. C-h i Manuels en ligne (alias Info). Cette commande vous place dans un tampon spéciale, appelé « *info* », où vous pouvez lire les manuels en ligne des paquetages installés sur - votre système. Faites m emacs  pour lire le + votre système. Faites m emacs pour lire le manuel d'Emacs. Si vous n'avez jamais utilisé Info auparavant, tapez ? et Emacs vous fera faire une visite guidée des fonctionnalités du mode Info. Lorsque vous @@ -1133,7 +1133,7 @@ frappe, et dired, qui simplifie la manipulation des fichiers. La complétion permet d'éviter les frappes inutiles. Si, par exemple, vous voulez basculer vers le tampon *Messages*, tapez simplement -C-x b *M et Emacs complètera le nom du tampon s'il peut le +C-x b *M et Emacs complètera le nom du tampon s'il peut le déterminer à partir de ce que vous avez saisi avant la tabulation. La complétion est décrite dans la version Info du manuel Emacs, à la rubrique "Completion". From 3daabdddfa51d48c66afa21d27d789c46d52b3b2 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Sat, 28 May 2005 12:12:06 +0000 Subject: [PATCH 121/294] *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b1e9042b620..8963e850a18 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-05-29 Nick Roberts + + * progmodes/gdb-ui.el (gdb-assembler-custom): Be more careful + about preserving point. + 2005-05-27 Jay Belanger * calc/calc-misc.el (calc-info-goto-node): Use info instead of From 8164904190cf82406b0dbd9b5a4437635caeb0dc Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Sat, 28 May 2005 12:15:33 +0000 Subject: [PATCH 122/294] (gdb-assembler-custom): Be more careful about preserving point. --- lisp/progmodes/gdb-ui.el | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index ecb8f63f8ea..df9d455f7df 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -2439,20 +2439,21 @@ BUFFER nil or omitted means use the current buffer." (let ((buffer (gdb-get-buffer 'gdb-assembler-buffer)) (pos 1) (address) (flag) (bptno)) (with-current-buffer buffer - (if (not (equal gdb-frame-address "main")) - (progn - (goto-char (point-min)) - (if (and gdb-frame-address - (re-search-forward gdb-frame-address nil t)) - (progn - (setq pos (point)) - (beginning-of-line) - (or gdb-overlay-arrow-position - (setq gdb-overlay-arrow-position (make-marker))) - (set-marker gdb-overlay-arrow-position - (point) (current-buffer)))))) - ;; remove all breakpoint-icons in assembler buffer before updating. - (gdb-remove-breakpoint-icons (point-min) (point-max))) + (save-excursion + (if (not (equal gdb-frame-address "main")) + (progn + (goto-char (point-min)) + (if (and gdb-frame-address + (re-search-forward gdb-frame-address nil t)) + (progn + (setq pos (point)) + (beginning-of-line) + (or gdb-overlay-arrow-position + (setq gdb-overlay-arrow-position (make-marker))) + (set-marker gdb-overlay-arrow-position + (point) (current-buffer)))))) + ;; remove all breakpoint-icons in assembler buffer before updating. + (gdb-remove-breakpoint-icons (point-min) (point-max)))) (with-current-buffer (gdb-get-buffer 'gdb-breakpoints-buffer) (goto-char (point-min)) (while (< (point) (- (point-max) 1)) @@ -2465,9 +2466,10 @@ BUFFER nil or omitted means use the current buffer." (setq flag (char-after (match-beginning 2))) (setq address (match-string 3)) (with-current-buffer buffer + (save-excursion (goto-char (point-min)) (if (re-search-forward address nil t) - (gdb-put-breakpoint-icon (eq flag ?y) bptno))))))) + (gdb-put-breakpoint-icon (eq flag ?y) bptno)))))))) (if (not (equal gdb-frame-address "main")) (set-window-point (get-buffer-window buffer 0) pos)))) From b5352ff5ec4f313dc5e4035041fbae2d21029281 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 28 May 2005 16:57:21 +0000 Subject: [PATCH 123/294] remove extraneous calls to shell-quote-argument --- lisp/ChangeLog | 13 ++++++++----- lisp/textmodes/tex-mode.el | 18 ++++++++---------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8963e850a18..839f7783404 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2005-05-28 Karl Berry + + * textmodes/tex-mode.el: now that tex-send-command calls + shell-quote-argument (2005-03-31 change), remove all calls to + shell-quote-argument; they all end up invoking tex-send-command. + The double quoting loses on filenames with non-safe characters, + such as "@". Reported by Frederik Fouvry. + 2005-05-29 Nick Roberts * progmodes/gdb-ui.el (gdb-assembler-custom): Be more careful @@ -3106,11 +3114,6 @@ (fill-newline): Use fill-text-properties-at instead of text-properties-at. -2005-03-31 Karl Berry - - * textmodes/tex-mode.el (tex-compile): Use shell-quote-argument, - not comint-quote-filename. - 2005-03-31 Olive Lin (tiny change) * textmodes/tex-mode.el (tex-start-tex) Use shell-quote-argument, diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index e3efa32d551..1b91afeac8d 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -1633,11 +1633,11 @@ If NOT-ALL is non-nil, save the `.dvi' file." (defvar tex-compile-commands '(((concat "pdf" tex-command " " (if (< 0 (length tex-start-commands)) - (shell-quote-argument tex-start-commands)) " %f") + tex-start-commands) " %f") t "%r.pdf") ((concat tex-command " " (if (< 0 (length tex-start-commands)) - (shell-quote-argument tex-start-commands)) " %f") + tex-start-commands) " %f") t "%r.dvi") ("yap %r &" "%r.dvi") ("xdvi %r &" "%r.dvi") @@ -1900,8 +1900,8 @@ FILE is typically the output DVI or PDF file." (prog1 (file-name-directory (expand-file-name file)) (setq file (file-name-nondirectory file)))) (root (file-name-sans-extension file)) - (fspec (list (cons ?r (shell-quote-argument root)) - (cons ?f (shell-quote-argument file)))) + (fspec (list (cons ?r root) + (cons ?f file))) (default (tex-compile-default fspec))) (list default-directory (completing-read @@ -1922,14 +1922,13 @@ FILE is typically the output DVI or PDF file." (compile-command (if star (concat (substring command 0 star) - (shell-quote-argument file) + file (substring command (1+ star))) (concat command " " tex-start-options (if (< 0 (length tex-start-commands)) - (concat - (shell-quote-argument tex-start-commands) " ")) - (shell-quote-argument file))))) + (concat tex-start-commands " ")) + file)))) (tex-send-tex-command compile-command dir))) (defun tex-send-tex-command (cmd &optional dir) @@ -2232,8 +2231,7 @@ is provided, use the alternative command, `tex-alt-dvi-print-command'." (tex-start-shell)) (tex-send-command (if alt tex-alt-dvi-print-command tex-dvi-print-command) - (shell-quote-argument - print-file-name-dvi) + print-file-name-dvi t)))) (defun tex-alt-print () From e495eaec9cfa70e8a392e822dad178bd86f7f9cc Mon Sep 17 00:00:00 2001 From: Bill Wohler Date: Sat, 28 May 2005 22:04:54 +0000 Subject: [PATCH 124/294] Upgraded to MH-E version 7.84. See etc/MH-E-NEWS and lisp/mh-e/ChangeLog for details. --- etc/ChangeLog | 4 + etc/MH-E-NEWS | 88 +++++++- etc/NEWS | 2 +- lisp/mh-e/ChangeLog | 363 ++++++++++++++++++++++++++++---- lisp/mh-e/mh-acros.el | 8 +- lisp/mh-e/mh-alias.el | 11 +- lisp/mh-e/mh-comp.el | 23 ++- lisp/mh-e/mh-customize.el | 421 +++++++++++++++++++++++--------------- lisp/mh-e/mh-e.el | 69 ++++--- lisp/mh-e/mh-funcs.el | 7 +- lisp/mh-e/mh-gnus.el | 2 +- lisp/mh-e/mh-identity.el | 46 +++-- lisp/mh-e/mh-inc.el | 12 +- lisp/mh-e/mh-index.el | 280 ++++++++++++++----------- lisp/mh-e/mh-init.el | 2 +- lisp/mh-e/mh-junk.el | 6 +- lisp/mh-e/mh-loaddefs.el | 369 ++++++++++++++++++++------------- lisp/mh-e/mh-mime.el | 19 +- lisp/mh-e/mh-pick.el | 75 ++++++- lisp/mh-e/mh-print.el | 2 +- lisp/mh-e/mh-seq.el | 33 ++- lisp/mh-e/mh-speed.el | 2 +- lisp/mh-e/mh-utils.el | 10 +- 23 files changed, 1277 insertions(+), 577 deletions(-) diff --git a/etc/ChangeLog b/etc/ChangeLog index 0efca03ac29..15d6f3649c0 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2005-05-28 Bill Wohler + + * NEWS, MH-E-NEWS: Upgraded to MH-E version 7.84. + 2005-05-19 Nick Roberts * TODO: post-command-idle-hook has gone. diff --git a/etc/MH-E-NEWS b/etc/MH-E-NEWS index 25f649b5434..e5b408c8785 100644 --- a/etc/MH-E-NEWS +++ b/etc/MH-E-NEWS @@ -1,16 +1,94 @@ * COPYRIGHT -Copyright (C) 2003, 2004 Free Software Foundation, Inc. - +Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. + Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. +* Changes in MH-E 7.84 + +Version 7.84 contains no user-visible changes. This version +incorporates changes made in CVS Emacs such as the removal of some +deprecated software. + +* Changes in MH-E 7.83 + +Version 7.83 fixes a handful of bugs, adds colors to buttons for +signed or encrypted messages, and contains some documentation changes +related to the upcoming release of the manual. Some options were moved +to other customization groups as a result. + +While not related to this release, the MH-E mailing lists are now +gatewayed at gmane.org (closes SF #979308). + +** New Variables in MH-E 7.83 + +*** mh-show-pgg-bad-face + +Face used to highlight a bad PGG signature. + +*** mh-show-pgg-good-face + +Face used to highlight a good PGG signature. + +*** mh-show-pgg-unknown-face + +Face used to highlight a PGG signature whose status is unknown. This +face is also used for a signature when the signer is untrusted. + +** Bug Fixes in MH-E 7.83 + +*** Whitespace in pick Expressions + +The "C-u / s RET" command now works. In addition, you can now add +whitespace to any of the limiting (/) commands (closes SF #1122655). + +*** auto-mode-alist Updated + +MH-E originally updated auto-mode-alist to set the major mode of +drafts. Now that we explicitly set the mode, there is no reason to do +this, and this behavior caused problems for people who didn't use MH-E +who were editing files that looked like MH message files (closes SF +#1032353). + +*** mh-show-unquote-From Fails (read-only buffer) + +MH-E quotes the "From " header field that is inserted by MTAs. +However, it was trying to do this in a read-only buffer. This has been +fixed (closes SF #1089870). + +*** rmmproc Refile Complains No Such Message + +MH-E would get confused about which folder to delete messages from if +you were refiling and deleting messages at the same time. This has +been fixed (closes SF #1023959). + +*** ! Doesn't Do Regions + +Now it does (closes SF #1046330). + +*** Swish Fixes + +Items in swish indexes that aren't mail messages are now handled more +gracefully. + +*** Spamassassin Fixes + +If you use spamassassin, there was an error when you tried to junk +mail if the option mh-junk-background was set. This has been fixed. + +*** Mairix Support + +Indexing now compatible with Mairix version 0.12 and later. + + + * Changes in MH-E 7.82 Version 7.82 continues to address the saga surrounding the use of CL -macros in CVS Emacs and fixes the auto-detection of vanilla MH (SF -#1014781). +macros in CVS Emacs and fixes the auto-detection of vanilla MH (closes +SF #1014781). * Changes in MH-E 7.81 @@ -23,6 +101,8 @@ of "default" in `mh-identity-handlers' to avoid problems with to ":default". This release also corrects the release numbering; the previous version number was intended to be 7.80. + + * Changes in MH-E 7.4.80 Version 7.4.80 now supports GNU mailutils, S/MIME, picons, diff --git a/etc/NEWS b/etc/NEWS index 34bbf3d1a37..c21ffa85e67 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2651,7 +2651,7 @@ See the file GNUS-NEWS or the node "Oort Gnus" in the Gnus manual for details. --- ** MH-E changes. -Upgraded to MH-E version 7.82. There have been major changes since +Upgraded to MH-E version 7.84. There have been major changes since version 5.0.2; see MH-E-NEWS for details. ** Calendar changes: diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index 394331fbcd2..23e7c6d44cb 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog @@ -1,32 +1,305 @@ -2005-05-26 Lute Kamstra +2005-05-28 Bill Wohler - * mh-utils.el (mh-show-mode): - * mh-pick.el (mh-pick-mode): Remove spurious run-hooks. + Released MH-E version 7.84. -2005-04-08 Dan Nicolaescu + * MH-E-NEWS, README: Updated for release 7.84. + + * mh-e.el (Version, mh-version): Updated for release 7.84. + +2005-05-28 Bill Wohler + + * mh-e.el, mh-comp.el: Don't autoload Info-goto-node. It's not + used, and if it were, the code should use the info function + instead. + + Use full year in copyright notices (for example, 2005, not 05). + + * Makefile (mh-loaddefs.el, mh-e-autoloads.el): Added 2005 to + copyright notice. + + * mh-inc.el: Use three ;;; to precede Local Variables to be + consistent with other files. Will have to ask Stefan Monnier why + he changed it. + + * README: This version of MH-E to appear in GNU Emacs 22.1, not + 21.5. + + * ChangeLog: The * in a ChangeLog entry must only be used before a + filename. + + Fixed compilation warnings in CVS Emacs. This included using + "public" functions instead of "private" ones (info instead of + Info-goto-node, view-mode-enter instead of view-mode), and + removing a customization group that didn't have a parent group. In + addition, string-to-int was recently deprecated; use + string-to-number instead. + + * mh-customize.el (Info-goto-node): Deleted autoload. + (mh-e): Deleted mh group. Use single mh-e group instead. + (mh-tool-bar-folder-help, mh-tool-bar-letter-help): Use info + instead of Info-goto-node. + + * mh-e.el (mh-read-msg-list): string-to-int deprecated; use + string-to-number. + + * mh-funcs.el (mh-list-folders): Use view-mode-enter instead of + view-mode. + + * mh-seq.el (mh-list-sequences): Use view-mode-enter instead of + view-mode. + + * mh-utils.el (mh-get-msg-num): string-to-int deprecated; use + string-to-number. + + Merged in changes from CVS Emacs including: + + * mh-utils.el (mh-show-mode): + * mh-pick.el (mh-pick-mode): Remove spurious run-hooks. Lute + Kamstra 2005-05-26. + +2005-05-25 Bill Wohler + + Merged in changes from CVS Emacs including: * mh-customize.el (mh-speedbar-selected-folder-face): Special case - high number of colors displays. + high number of colors displays. Dan Nicolaescu + 2005-04-08. -2005-03-25 Werner Lemberg + * mh-e.el, mh-identity.el, mh-mime.el: Replace `legal' with + `valid'. Replace `illegal' with `invalid'. Werner Lemberg + 2005-03-25. - * mh-e.el, mh-identity.el, mh-mime.el: Replace `legal' with `valid'. + * mh-inc.el (mh-inc-spool-list): Correctly declare the external + var. Stefan 2004-09-07. -2005-03-25 Werner Lemberg +2005-05-18 Bill Wohler - * mh-e.el: Replace `illegal' with `invalid'. + * mh-comp.el (mh-reply): Mention use of mh-repl-group-formfile in + docstring. -2004-09-07 Stefan +2005-05-05 Bill Wohler - * mh-inc.el (mh-inc-spool-list): Correctly declare the external var. + * mh-e.el (Version, mh-version): Added +cvs to release number. -2004-08-21 Bill Wohler +2005-05-05 Bill Wohler - * Released MH-E version 7.82. + Released MH-E version 7.83. + + * MH-E-NEWS, README: Updated for release 7.83. + + * mh-e.el (Version, mh-version): Updated for release 7.83. + +2005-05-05 Bill Wohler + + * README: To appear in Emacs 21.5, since 21.4 was released (but + without the latest MH-E). + + * release-utils (usage): Added --variable-changes. + +2005-05-04 Bill Wohler + + * mh-customize.el (*-face): Made docstrings consistent. + + * mh-seq.el (mh-pick-args-list): Extracted function for turning + string of pick arguments to list. Fixed list so that multi-word + arguments were put in a single string (closes SF #1122655). + (mh-edit-pick-expr): Use it. + + * mh-unit.el (mh-unit): Since 21.4 snuck out but didn't contain + updated lm-verify, don't run lm-verify on versions before 21.5. + (mh-unit-test-pick-args-list): Added. + + * mh-customize.el (mh-yank-from-start-of-msg): Use headline + capitalization. Changed wording of some choices to be more consistent. + (mh-invisible-header-fields-internal): Added fields from usa.net. + +2005-04-24 Satyaki Das + + * mh-mime.el (mh-mime-security-button-face): New function which + determines the face to use to colorize encrypted or signed emails. + (mh-insert-mime-security-button): Modified to colorize the button + differently based on whether the signature was valid or not, + whether the decryption was successful or not, etc. + + * mh-customize.el (mh-show-pgg-good-face) + (mh-show-pgg-unknown-face, mh-show-pgg-bad-face): Faces added to + highlight buttons introduced for encrpted or signed MIME parts. + +2005-03-19 Bill Wohler + + * mh-customize.el (mh-mml-method-default): Sorted alphabetically. + (mh-insert-x-mailer-flag, mh-reply-show-message-flag): Moved from + mh-letter group to mh-sending-mail group. The writing of the + documentation revealed that these options were misplaced. + +2005-03-17 Bill Wohler + + * mh-customize.el (mh-junk-background): Put in alphabetical order. + Synced with manual. + (mh-junk-program): Use double-quotes on non-symbols. + + * mh-pick.el: (mh-search-folder): Synced docstrings with manual. + + * mh-index.el: (mh-index-search, mh-pick-execute-search) + (mh-grep-execute-search, mh-mairix-execute-search) + (mh-swish-execute-search, mh-swish++-execute-search) + (mh-namazu-execute-search): Synced docstrings with manual. Note + that I'm now grabbing the output of an Info buffer which is why + the indents on the examples has changed a bit. If we all use that + methodology in the future, we shouldn't produce as many gratuitous + diffs. I also noticed that `grep' and `search' became links to + unrelated things, so let's use double-quotes for quoting + non-symbols in the docstrings. + + * mh-customize.el (mh-index-new-messages-folders) + (mh-index-ticked-messages-folders): Synced docstrings with manual. + +2005-02-16 Satyaki Das + + * mh-index.el (mh-swish-execute-search): Simplify the indexing + recipe for swish. Thanks to Eric Jensen for the suggestion. + +2005-02-11 Satyaki Das + + * mh-index.el (mh-swish-execute-search) + (mh-swish++-execute-search): Make the indexing recipes better. + (mh-swish-next-result): The indexer might find matches in files + that aren't messages. Make the function handle that case + gracefully. + +2005-02-07 Bill Wohler + + * mh-customize.el (mh-inc-prog, mh-inc-spool-list): Synced + docstrings with manual. + +2005-02-06 Bill Wohler + + * mh-junk.el (mh-spamassassin-blacklist): Removed trailing + whitespace. + + * mh-e.el (mh-refile-or-write-again): Checkdoc fix. + + * mh-identity.el (mh-identity-list-set) + (mh-identity-field-handler, mh-identity-handler-gpg-identity) + (mh-identity-handler-signature) + (mh-identity-handler-attribution-verb) + (mh-identity-handler-default, mh-identity-handler-top): Docstring + editing. + + * mh-customize.el (mh-identity-list, mh-auto-fields-list) + (mh-identity-default, mh-identity-handlers): Synced docstrings + with manual. + +2005-02-03 Bill Wohler + + * mh-xemacs.el (define-behavior 'mh): Moved Ben's code here from + mh-e.el and added standard documentation. + + * mh-e.el: Received patch from Ben Wing to add + define-behavior on XEmacs. + +2005-01-28 Jeffrey C Honig + + * mh-customize.el (mh-invisible-header-fields-internal): Added + X-Evolution header added by Evolution mai client. + +2005-01-18 Bill Wohler + + * mh-customize.el (mh-invisible-header-fields-internal): Added + DomainKey-Signature (http://antispam.yahoo.com/domainkeys/). + There's a Comment field that goes with it, but I thought it was + too general to add. + +2005-01-06 Bill Wohler + + * mh-junk.el (mh-spamassassin-blacklist): Fixed typo to fix an + error when junking spamassassin mail when mh-junk-background is + turned on. + +2004-12-25 Satyaki Das + + * mh-utils.el (mh-show-unquote-From): Make the buffer writable + before trying to change it (closes SF #1089870). + + * mh-comp.el (mh-complete-word): Fix a typo in a variable + name (closes SF #1089870) + +2004-11-28 Jeffrey C Honig + + * mh-comp.el (mh-complete-word): Kill the *Completions* buffer in + any cases where we belive we are done with it. Not perfect, but + better than just leaving it around. + +2004-11-08 Satyaki Das + + * mh-acros.el (mh-funcall-if-exists): In XEmacs, presence of a + function at compile time doesn't guarantee it's existence at run + time. So make the macro handle that situation better. + +2004-11-05 Satyaki Das + + * mh-acros.el (advice): Load advice, since it isn't loaded in + XEmacs causing compilation problems. + +2004-10-24 Satyaki Das + + * mh-index.el (mh-mairix-execute-search) + (mh-mairix-regexp-builder): Update the interface to mairix so that + it will work with versions of mairix 0.12 and later. + + * mh-funcs.el (mh-rmf-daemon): Avoid using + beginning-of-buffer since it clobbers the mark and it was pointed + out on the Emacs developers list to be the wrong thing to do. + + * mh-e.el (mh-inc-folder): Only remove the window on the show + buffer. This means if the user has BBDB enabled then the window + displaying BBDB information isn't clobbered. + (mh-refile-or-write-again): Don't use the function + interactive-p. There was a long thread on the Emacs developers + list where it was pointed out that it is incorrect to use this + function most of the time. + + * mh-comp.el (autoload): Don't set auto-mode-alist. This could + screw things up for users that don't use MH-E (closes SF #1032353). + +2004-10-13 Satyaki Das + + * mh-e.el (mh-refile-or-write-again): Generalize the function to + work on a range of messages (closes SF #1046330). + +2004-09-02 Satyaki Das + + * mh-e.el (mh-process-commands): The concurrent execution of mark + and refile can cause problems since both the commands change the + current folder. This change avoids that by getting rid of the + concurrency. Another change covers the corner case where we refile + messages to a previously empty folder. Before the modification + sequences weren't preserved even if the appropriate flag was + set. That is no longer the case. + +2004-08-26 Satyaki Das + + * mh-e.el (mh-get-new-mail): Also, update the unseen sequence from + disk. Otherwise, the new messages aren't highlighted. + + * mh-seq.el (mh-thread-inc): Fix a bug which appears when inc is + run in a narrowed folder. The user sequence notation was getting + lost. The change fixes that. + + * mh-e.el (mh-get-new-mail): Make inc more efficient by reusing + the existing user sequence notation and deleted/refiled notation. + +2004-08-24 Bill Wohler + + * mh-e.el (Version, mh-version): Added +cvs to release number. + +2004-08-24 Bill Wohler + + Released MH-E version 7.82. * MH-E-NEWS, README: Updated for release 7.82. - * mh-e.el (Version, mh-version): Update for release 7.82. + * mh-e.el (Version, mh-version): Updated for release 7.82. 2004-08-24 Bill Wohler @@ -57,11 +330,11 @@ 2004-08-21 Bill Wohler - * Released MH-E version 7.81. + Released MH-E version 7.81. * MH-E-NEWS, README: Updated for release 7.81. - * mh-e.el (Version, mh-version): Update for release 7.81. + * mh-e.el (Version, mh-version): Updated for release 7.81. 2004-08-21 Bill Wohler @@ -94,7 +367,7 @@ 2004-08-15 Bill Wohler - * Released MH-E version 7.4.80. + Released MH-E version 7.4.80. * MH-E-NEWS, README: Updated for release 7.4.80. @@ -324,13 +597,13 @@ are more useful than a key sequence in these cases. Use "See also" instead of "See also documentation for". - * Merged in 7.4.4 changes, described below. + Merged in 7.4.4 changes, described below. * mh-e.el (Version, mh-version): Set to 7.4.4+cvs. 2004-07-10 Bill Wohler - * Released MH-E version 7.4.4. + Released MH-E version 7.4.4. * MH-E-NEWS, README: Updated for release 7.4.4. @@ -399,9 +672,9 @@ routines in the best way possible (closes SF #930012). (require 'mouse): To shush compiler. - * Use new function mh-require-cl throughout. + Use new function mh-require-cl throughout. - * Add arch taglines (courtesy Miles Bader). + Add arch taglines (courtesy Miles Bader). * mh-unit.el (mh-unit-files): Replaced mh-xemacs-compat.el and mh-xemacs-icons.el with mh-xemacs.el. @@ -541,7 +814,7 @@ 2003-11-18 Bill Wohler - * Released MH-E version 7.4.3. + Released MH-E version 7.4.3. * MH-E-NEWS, README: Updated for release 7.4.3. @@ -684,8 +957,8 @@ 2003-11-04 Steve Youngs - * Makefile (XEMACS_LOADDEFS_FILE): New. Used to generate mh-loaddefs.el - in XEmacs. + * Makefile (XEMACS_LOADDEFS_FILE): New. Used to generate + mh-loaddefs.el in XEmacs. (XEMACS_LOADDEFS_COOKIE): Ditto. (XEMACS_LOADDEFS_PKG_NAME): Ditto. (xemacs): Add target to build mh-loaddefs.el in XEmacs @@ -1363,7 +1636,7 @@ 2003-08-19 Bill Wohler - * Released MH-E version 7.4.2. + Released MH-E version 7.4.2. * MH-E-NEWS, README: Updated for release 7.4.2. @@ -2233,7 +2506,7 @@ 2003-06-25 Bill Wohler - * Released MH-E version 7.4.1. + Released MH-E version 7.4.1. * MH-E-NEWS, README: Updated for release 7.4.1. @@ -2255,7 +2528,7 @@ 2003-06-24 Bill Wohler - * Released MH-E version 7.4. + Released MH-E version 7.4. * MH-E-NEWS, README: Updated for release 7.4. @@ -3362,7 +3635,7 @@ 2003-04-24 Bill Wohler - * Released MH-E version 7.3. + Released MH-E version 7.3. * MH-E-NEWS, README: Updated for release 7.3. @@ -4920,7 +5193,7 @@ 2003-02-03 Bill Wohler - * Released MH-E version 7.2. + Released MH-E version 7.2. * MH-E-NEWS, README: Updated for release 7.2. @@ -5584,7 +5857,7 @@ 2003-01-07 Bill Wohler - * Released MH-E version 7.1. + Released MH-E version 7.1. * MH-E-NEWS, README: Updated for release 7.1. @@ -6678,7 +6951,7 @@ 2002-11-29 Bill Wohler - * Released MH-E version 7.0. + Released MH-E version 7.0. * mh-e.el (Version, mh-version): Updated for release 7.0. @@ -6703,7 +6976,7 @@ 2002-11-21 Bill Wohler - * Released MH-E version 6.1.91. + Released MH-E version 6.1.91. * mh-e.el (Version, mh-version): Updated for release 6.1.91. @@ -6727,7 +7000,7 @@ 2002-11-15 Bill Wohler - * Released MH-E version 6.1.90. + Released MH-E version 6.1.90. * README (Compile): New section. Users must now compile MH-E due to the vagaries of the various versions of gnus. @@ -9688,7 +9961,7 @@ 2002-04-08 Bill Wohler - * Released mh-e version 6.1. + Released mh-e version 6.1. * mh-e.el (mh-folder-unseen-seq-name): Use "mhparam -component Unseen-Sequence" command and "Unseen-Sequence: \\(.*\\)$" regexp @@ -9792,7 +10065,7 @@ 2001-12-16 Bill Wohler - * Released mh-e version 6.0. + Released mh-e version 6.0. * MH-E-NEWS: Be a little more specific about incompatible changes. Added info about outdated manual. @@ -9815,7 +10088,7 @@ 2001-12-14 Bill Wohler - * Released mh-e version 5.0.93. + Released mh-e version 5.0.93. * Makefile (MH-E-SRC): Added mh-xemacs-compat.el. (MH-E-IMG): Added .pbm images for all. Removed mail_ prefix from @@ -10000,7 +10273,7 @@ 2001-12-04 Bill Wohler - * Released mh-e version 5.0.92. + Released mh-e version 5.0.92. * mh-utils.el (gnus-cite-face-list) (mh-gnus-article-highlight-citation): Don't autoload. Revert to @@ -10010,7 +10283,7 @@ 2001-12-03 Bill Wohler - * Released mh-e version 5.0.91. + Released mh-e version 5.0.91. * MH-E-NEWS: Removed info about bumping up `max-specpdl-size' now that workaround has been implemented. @@ -10916,17 +11189,17 @@ 2001-04-14 chad brown - * rearrange the font-lock keywords a bit + Rearrange the font-lock keywords a bit. 2001-04-12 chad brown - * preliminary (somewhat boring) font-lock support for mh-e. More + Preliminary (somewhat boring) font-lock support for mh-e. More interesting font-lock support probably wants to have better support for multiple format files 2001-02-24 chad brown - * add default nmh paths to mh-find-prog in mh-utils.el. + Add default nmh paths to mh-find-prog in mh-utils.el. change to mh-kill-folder in mh-funcs.el to make it more general. 2001-02-19 Bill Wohler @@ -10939,10 +11212,10 @@ (dist): Leave release in current directory. -Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. -Copying and distribution of this file, with or without modification, -are permitted in any medium without royalty provided the copyright -notice and this notice are preserved. + Copying and distribution of this file, with or without modification, + are permitted in any medium without royalty provided the copyright + notice and this notice are preserved. ;;; arch-tag: 87324964-69b6-4925-a3c2-9c1df53d7d51 diff --git a/lisp/mh-e/mh-acros.el b/lisp/mh-e/mh-acros.el index e4921b047df..455daf687a3 100644 --- a/lisp/mh-e/mh-acros.el +++ b/lisp/mh-e/mh-acros.el @@ -1,6 +1,6 @@ ;;; mh-acros.el --- Macros used in MH-E -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 2004 Free Software Foundation, Inc. ;; Author: Satyaki Das ;; Maintainer: Bill Wohler @@ -40,6 +40,7 @@ ;;; Code: (require 'cl) +(require 'advice) ;; The Emacs coding conventions require that the cl package not be required at ;; runtime. However, the cl package in versions of Emacs prior to 21.4 left cl @@ -68,8 +69,9 @@ recognizes that and loads `cl' where appropriate." (defmacro mh-funcall-if-exists (function &rest args) "Call FUNCTION with ARGS as parameters if it exists." - (if (fboundp function) - `(funcall ',function ,@args))) + (when (fboundp function) + `(when (fboundp ',function) + (funcall ',function ,@args)))) (defmacro mh-make-local-hook (hook) "Make HOOK local if needed. diff --git a/lisp/mh-e/mh-alias.el b/lisp/mh-e/mh-alias.el index 7f2cd2f5266..0819c0a7925 100644 --- a/lisp/mh-e/mh-alias.el +++ b/lisp/mh-e/mh-alias.el @@ -1,6 +1,7 @@ ;;; mh-alias.el --- MH-E mail alias completion and expansion ;; -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 1994, 1995, 1996, 1997, +;; 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ;; Author: Peter S. Galbraith ;; Maintainer: Bill Wohler @@ -162,16 +163,16 @@ Exclude all aliases already in `mh-alias-alist' from `ali'" (while (< (point) (point-max)) (cond ((looking-at "\\([^:]*\\):[^:]*:\\([^:]*\\):[^:]*:\\([^:]*\\):") - (when (> (string-to-int (match-string 2)) 200) + (when (> (string-to-number (match-string 2)) 200) (let* ((username (match-string 1)) (gecos-name (match-string 3)) (realname (mh-alias-gecos-name gecos-name username mh-alias-passwd-gecos-comma-separator-flag)) (alias-name (if mh-alias-local-users-prefix - (concat mh-alias-local-users-prefix - (mh-alias-suggest-alias realname t)) - username)) + (concat mh-alias-local-users-prefix + (mh-alias-suggest-alias realname t)) + username)) (alias-translation (if (string-equal username realname) (concat "<" username ">") diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el index 4f7e413d464..82d0f5b7fd7 100644 --- a/lisp/mh-e/mh-comp.el +++ b/lisp/mh-e/mh-comp.el @@ -1,6 +1,7 @@ ;;; mh-comp.el --- MH-E functions for composing messages -;; Copyright (C) 1993, 95, 1997, 2000, 2005 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1995, 1997, +;; 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ;; Author: Bill Wohler ;; Maintainer: Bill Wohler @@ -52,7 +53,6 @@ (defvar mh-identity-menu) ;;; Autoloads -(autoload 'Info-goto-node "info") (autoload 'mail-mode-fill-paragraph "sendmail") (autoload 'mm-handle-displayed-p "mm-decode") @@ -490,8 +490,10 @@ to reply to: cc/all sender and all recipients. If optional prefix argument INCLUDEP provided, then include the message in the reply using filter `mhl.reply' in your MH directory. -If the file named by `mh-repl-formfile' exists, it is used as a skeleton -for the reply. +If the file named by `mh-repl-formfile' exists, it is used as a skeleton for +the reply. If REPLY-TO is cc or all and you're using either the nmh or GNU +mailutils variants and the file names by `mh-repl-group-formfile' exists, it +is used instead. See also `mh-send'." (interactive (list @@ -1629,15 +1631,22 @@ This is useful in breaking up paragraphs in replies." (defun mh-complete-word (word choices begin end) "Complete WORD at from CHOICES. Any match found replaces the text from BEGIN to END." - (let ((completion (try-completion word choices))) + (let ((completion (try-completion word choices)) + (completions-buffer "*Completions*")) (cond ((eq completion t) + (ignore-errors + (kill-buffer completions-buffer)) (message "Completed: %s" word)) ((null completion) + (ignore-errors + (kill-buffer completions-buffer)) (message "No completion for `%s'" word)) ((stringp completion) (if (equal word completion) - (with-output-to-temp-buffer "*Completions*" + (with-output-to-temp-buffer completions-buffer (display-completion-list (all-completions word choices))) + (ignore-errors + (kill-buffer completions-buffer)) (delete-region begin end) (insert completion)))))) @@ -1965,8 +1974,6 @@ Otherwise return the empty string." ;; "C-c /" prefix is used in mh-letter-mode by pgp.el and mailcrypt.el. -;;;###autoload(add-to-list 'auto-mode-alist '("/drafts/[0-9]+\\'" . mh-letter-mode)) - (provide 'mh-comp) ;;; Local Variables: diff --git a/lisp/mh-e/mh-customize.el b/lisp/mh-e/mh-customize.el index c5689afc13e..54141164391 100644 --- a/lisp/mh-e/mh-customize.el +++ b/lisp/mh-e/mh-customize.el @@ -1,6 +1,6 @@ ;;; mh-customize.el --- MH-E customization -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Bill Wohler ;; Maintainer: Bill Wohler @@ -69,8 +69,6 @@ (mh-require-cl) (require 'mh-loaddefs) -(autoload 'Info-goto-node "info") - (eval-and-compile (defvar mh-xemacs-flag (featurep 'xemacs) "Non-nil means the current Emacs is XEmacs.")) @@ -102,121 +100,115 @@ the frame are removed." ;;; MH-E Customization Groups -(defgroup mh nil +(defgroup mh-e nil "Emacs interface to the MH mail system. MH is the Rand Mail Handler. Other implementations include nmh and GNU mailutils." :link '(custom-manual "(mh-e)Top") :group 'mail) -(defgroup mh-e '((mh custom-group)) ; Sort of an alias for 'mh group - "Emacs interface to the MH mail system. -MH is the Rand Mail Handler. Other implementations include nmh and GNU -mailutils." - :link '(custom-manual "(mh-e)Top")) - (defgroup mh-alias nil "Aliases." :link '(custom-manual "(mh-e)Aliases") :prefix "mh-alias-" - :group 'mh) + :group 'mh-e) (defgroup mh-folder nil "Organizing your mail with folders." :prefix "mh-" :link '(custom-manual "(mh-e)Organizing") - :group 'mh) + :group 'mh-e) (defgroup mh-folder-selection nil "Folder selection." :prefix "mh-" :link '(custom-manual "(mh-e)Folder Selection") - :group 'mh) + :group 'mh-e) (defgroup mh-identity nil "Identities." :link '(custom-manual "(mh-e)Identities") :prefix "mh-identity-" - :group 'mh) + :group 'mh-e) (defgroup mh-inc nil "Incorporating your mail." :prefix "mh-inc-" :link '(custom-manual "(mh-e)Incorporating Mail") - :group 'mh) + :group 'mh-e) (defgroup mh-index nil "Searching." :link '(custom-manual "(mh-e)Searching") :prefix "mh-index-" - :group 'mh) + :group 'mh-e) (defgroup mh-junk nil "Dealing with junk mail." :link '(custom-manual "(mh-e)Junk") :prefix "mh-junk-" - :group 'mh) + :group 'mh-e) (defgroup mh-letter nil "Editing a draft." :prefix "mh-" :link '(custom-manual "(mh-e)Editing Drafts") - :group 'mh) + :group 'mh-e) (defgroup mh-ranges nil "Ranges." :prefix "mh-" :link '(custom-manual "(mh-e)Ranges") - :group 'mh) + :group 'mh-e) (defgroup mh-scan-line-formats nil "Scan line formats." :link '(custom-manual "(mh-e)Scan Line Formats") :prefix "mh-" - :group 'mh) + :group 'mh-e) (defgroup mh-sending-mail nil "Sending mail." :prefix "mh-" :link '(custom-manual "(mh-e)Sending Mail") - :group 'mh) + :group 'mh-e) (defgroup mh-sequences nil "Sequences." :prefix "mh-" :link '(custom-manual "(mh-e)Sequences") - :group 'mh) + :group 'mh-e) (defgroup mh-show nil "Reading your mail." :prefix "mh-" :link '(custom-manual "(mh-e)Reading Mail") - :group 'mh) + :group 'mh-e) (defgroup mh-speed nil "The speedbar." :prefix "mh-speed-" :link '(custom-manual "(mh-e)Speedbar") - :group 'mh) + :group 'mh-e) (defgroup mh-toolbar nil "The toolbar" :link '(custom-manual "(mh-e)Toolbar") :prefix "mh-" - :group 'mh) + :group 'mh-e) (defgroup mh-faces nil "Faces used in MH-E." :link '(custom-manual "(mh-e)Top") :prefix "mh-" :group 'faces - :group 'mh) + :group 'mh-e) (defgroup mh-hooks nil "MH-E hooks." :link '(custom-manual "(mh-e)Top") :prefix "mh-" - :group 'mh) + :group 'mh-e) ;;; Faces @@ -280,7 +272,7 @@ accordingly." :set (lambda (symbol value) (set-default symbol value) ;Done in mh-variant-set-variant! (mh-variant-set value)) - :group 'mh) + :group 'mh-e) @@ -448,14 +440,34 @@ information." (defcustom mh-identity-list nil "*List of identities. -Each element consists of an identity label, and a collection of header fields -and a signature to insert if the identity is selected (see -`mh-identity-default', `mh-insert-identity' and the `Identity' menu in a -MH-Letter buffer). The `Value Menu' contains the common header fields `From' -and `Organization'. Other header fields may be added using the `Other Field' -menu item. The `Signature' menu item is used to insert a signature with -`mh-insert-signature'. The `GPG Key ID' menu item is used to specify a -different key to sign or encrypt messages." +To customize this option, click on the `INS' button and enter a label such as +`Home' or `Work'. Then click on the `INS' button with the label `Add at least +one item below'. Then choose one of the items in the `Value Menu'. + +You can specify an alternate `From:' header field using the `From Field' menu +item. You must include a valid email address. A standard format is `First Last +'. If you use an initial with a period, then you must +quote your name as in `\"First I. Last\" '. People usually +list the name of the company where they work using the `Organization Field' +menu item. Set any arbitrary header field and value in the `Other Field' menu +item. Unless the header field is a standard one, precede the name of your +field's label with `X-', as in `X-Fruit-of-the-Day:'. The value of +`Attribution Verb' overrides the setting of +`mh-extract-from-attribution-verb'. Set your signature with the `Signature' +menu item. You can specify the contents of `mh-signature-file-name', a file, +or a function. Specify a different key to sign or encrypt messages with the +`GPG Key ID' menu item. + +You can select the identities you have added via the menu called `Identity' in +the MH-Letter buffer. You can also use \\[mh-insert-identity]. To clear the +fields and signature added by the identity, select the `None' identity. + +The `Identity' menu contains two other items to save you from having to set +the identity on every message. The menu item `Set Default for Session' can be +used to set the default identity to the current identity until you exit Emacs. +The menu item `Save as Default' sets the option `mh-identity-default' to the +current identity setting. You can also customize the `mh-identity-default' +option in the usual fashion." :type '(repeat (list :tag "" (string :tag "Label") (repeat :tag "Add at least one item below" @@ -489,12 +501,38 @@ different key to sign or encrypt messages." (defcustom mh-auto-fields-list nil "List of recipients for which header lines are automatically inserted. -Each element consists of the recipient, which is a regular expression, and a -collection of header fields and identities to insert if the message is sent to -this recipient. The `Value Menu' contains the common header fields `Fcc' and -`Mail-Followup-To'. Other header fields may be added using the `Other Field' -menu item. The `Identity' menu item is used to insert entire identities with -`mh-insert-identity'." + +This option can be used to set the identity depending on the recipient. To +customize this option, click on the `INS' button and enter a regular +expression for the recipient's address. Click on the `INS' button with the +`Add at least one item below' label. Then choose one of the items in the +`Value Menu'. + +The `Identity' menu item is used to select an identity from those configured +in `mh-identity-list'. All of the information for that identity will be added +if the recipient matches. The `Fcc Field' menu item is used to select a folder +that is used in the `Fcc:' header. When you send the message, MH will put a +copy of your message in this folder. The `Mail-Followup-To Field' menu item is +used to insert an `Mail-Followup-To:' header field with the recipients you +provide. If the recipient's mail user agent supports this header field (as nmh +does), then their replies will go to the addresses listed. This is useful if +their replies go both to the list and to you and you don't have a mechanism to +suppress duplicates. If you reply to someone not on the list, you must either +remove the `Mail-Followup-To:' field, or ensure the recipient is also listed +there so that he receives replies to your reply. Other header fields may be +added using the `Other Field' menu item. + +These fields can only be added after the recipient is known. Once the header +contains one or more recipients, run the \\[mh-insert-auto-fields] command or +choose the `Identity -> Insert Auto Fields' menu item to insert these fields +manually. However, you can just send the message and the fields will be added +automatically. You are given a chance to see these fields and to confirm them +before the message is actually sent. You can do away with this confirmation by +turning off the option `mh-auto-fields-prompt-flag'. + +You should avoid using the same header field in `mh-auto-fields-list' and +`mh-identity-list' definitions that may apply to the same message as the +result is undefined." :type `(repeat (list :tag "" (string :tag "Recipient") @@ -525,7 +563,8 @@ See `mh-auto-fields-list'." :group 'mh-identity) (defcustom mh-identity-default nil - "Default identity to use when `mh-letter-mode' is called." + "Default identity to use when `mh-letter-mode' is called. +See `mh-identity-list'." :type (append '(radio) (cons '(const :tag "None" nil) @@ -534,16 +573,32 @@ See `mh-auto-fields-list'." :group 'mh-identity) (defcustom mh-identity-handlers - '((":default" . mh-identity-handler-bottom) - ("from" . mh-identity-handler-top) + '(("From" . mh-identity-handler-top) + (":default" . mh-identity-handler-bottom) (":attribution-verb" . mh-identity-handler-attribution-verb) (":signature" . mh-identity-handler-signature) (":pgg-default-user-id" . mh-identity-handler-gpg-identity)) "Handler functions for fields in `mh-identity-list'. -This is an alist of fields (strings) and handlers (functions). Strings are -lowercase. Use \":signature\" for Signature and \":pgg-default-user-id\" for -GPG Key ID. The function associated with the string \":default\" is used if no -other functions are appropriate." + +This option is used to change the way that fields, signatures, and +attributions in `mh-identity-list' are added. To customize +`mh-identity-handlers', replace the name of an existing handler function +associated with the field you want to change with the name of a function you +have written. You can also click on an `INS' button and insert a field of your +choice and the name of the function you have written to handle it. + +The `Field' field can be any field that you've used in your +`mh-identity-list'. The special fields `:attribution-verb', `:signature', or +`:pgg-default-user-id' are used for the `mh-identity-list' choices +`Attribution Verb', `Signature', and `GPG Key ID' respectively. + +The handler associated with the `:default' field is used when no other field +matches. + +The handler functions are passed two or three arguments: the FIELD itself (for +example, `From'), or one of the special fields (for example, `:signature'), +and the ACTION `'remove' or `'add'. If the action is `'add', an additional +argument containing the VALUE for the field is given." :type '(repeat (cons (string :tag "Field") function)) :group 'mh-identity) @@ -552,45 +607,45 @@ other functions are appropriate." ;;; Incorporating Your Mail (:group 'mh-inc) (defcustom mh-inc-prog "inc" - "*Program to run to incorporate new mail into a folder. -Normally \"inc\". This program is relative to the `mh-progs' directory unless -it is an absolute pathname." + "*Program to incorporate new mail into a folder. + +This program generates a one-line summary for each of the new messages. Unless +it is an absolute pathname, the file is assumed to be in the `mh-progs' +directory. You may also link a file to `inc' that uses a different format. +You'll then need to modify several scan line format variables appropriately." :type 'string :group 'mh-inc) (defcustom mh-inc-spool-list nil - "*Alist of alternate spool files, corresponding folders and keybindings. -This option will be described by example. + "*Alternate spool files. -Suppose you have subscribed to the mh-e-devel mailing list and you use -procmail to filter its mail into `~/mail/mh-e' with the following -`.procmailrc' recipe: +You can use the `mh-inc-spool-list' variable to direct MH-E to retrieve mail +from arbitrary spool files other than your system mailbox, file it in folders +other than your `+inbox', and assign key bindings to incorporate this mail. + +Suppose you are subscribed to the `mh-e-devel' mailing list and you use +`procmail' to filter this mail into `~/mail/mh-e' with the following recipe in +`.procmailrc': MAILDIR=$HOME/mail :0: - * ^From mh-e-devel-admin@lists.sourceforge.net + * ^From mh-e-devel-admin@stop.mail-abuse.org mh-e -If you wanted to incorporate that spool file into an MH folder called mh-e -with the \"I m\" or \\[mh-inc-spool-mh-e] commands, you would use the -following: +In order to incorporate `~/mail/mh-e' into `+mh-e' with an `I m' +\(`mh-inc-spool-mh-e'\) command, customize this option, and click on the `INS' +button. Enter a `Spool File' of `~/mail/mh-e', a `Folder' of `mh-e', and a +`Key Binding' of `m'. - Spool File: ~/mail/mh-e - Folder: mh-e - Key Binding: m - -Then, you could also install `xbuffy' and configure an extra mailbox using the -gnuserv package to run the `mh-inc-spool-mh-e' command in Emacs: +You can use `xbuffy' to automate the incorporation of this mail using the +`gnudoit' command in the `gnuserv' package as follows: box ~/mail/mh-e title mh-e origMode polltime 10 headertime 0 - command gnudoit -q '(mh-inc-spool-mh-e)' - -To incorporate the spool file, click the xbuffy box with the middle mouse -button." + command gnudoit -q '(mh-inc-spool-mh-e)'" :type '(repeat (list (file :tag "Spool File") (string :tag "Folder") (character :tag "Key Binding"))) @@ -602,10 +657,10 @@ button." ;;; Searching (:group 'mh-index) (defcustom mh-index-new-messages-folders t - "Folders searched for the `unseen' sequence. -This option can be set to `Inbox' to search the `+inbox' folder or `All' to + "Folders searched for the \"unseen\" sequence. +Set this option to \"Inbox\" to search the \"+inbox\" folder or \"All\" to search all of the top level folders. Otherwise, list the folders that should -be searched with the `Choose Folders' menu item. +be searched with the \"Choose Folders\" menu item. See also `mh-recursive-folders-flag'." :group 'mh-index @@ -633,9 +688,9 @@ found in the documentation of `mh-index-search'." (defcustom mh-index-ticked-messages-folders t "Folders searched for `mh-tick-seq'. -This option can be set to `Inbox' to search the `+inbox' folder or `All' to +Set this option to \"Inbox\" to search the \"+inbox\" folder or \"All\" to search all of the top level folders. Otherwise, list the folders that should -be searched with the `Choose Folders' menu item. +be searched with the \"Choose Folders\" menu item. See also `mh-recursive-folders-flag'." :group 'mh-index @@ -672,25 +727,6 @@ bound to the new value of `mh-junk-program'. The function sets the variable finally return (car element))))) ;; User customizable variables -(defcustom mh-junk-disposition nil - "Disposition of junk mail." - :type '(choice (const :tag "Delete Spam" nil) - (string :tag "Spam Folder")) - :group 'mh-junk) - -(defcustom mh-junk-program nil - "Spam program that MH-E should use. -The default setting of this option is `Auto-detect' which means that MH-E will -automatically choose one of SpamAssassin, Bogofilter, or SpamProbe in that -order. If, for example, you have both SpamAssassin and Bogofilter installed -and you want to use BogoFilter, then you can set this option to `Bogofilter'." - :type '(choice (const :tag "Auto-detect" nil) - (const :tag "SpamAssassin" spamassassin) - (const :tag "Bogofilter" bogofilter) - (const :tag "SpamProbe" spamprobe)) - :set 'mh-junk-choose - :group 'mh-junk) - (defcustom mh-junk-background nil "If on, spam programs are run in background. By default, the programs are run in the foreground, but this can be slow when @@ -700,23 +736,31 @@ that many messages at the same time, you might try turning on this option." (const :tag "On" 0)) :group 'mh-junk) +(defcustom mh-junk-disposition nil + "Disposition of junk mail." + :type '(choice (const :tag "Delete Spam" nil) + (string :tag "Spam Folder")) + :group 'mh-junk) + +(defcustom mh-junk-program nil + "Spam program that MH-E should use. + +The default setting of this option is \"Auto-detect\" which means that MH-E +will automatically choose one of SpamAssassin, Bogofilter, or SpamProbe in +that order. If, for example, you have both SpamAssassin and Bogofilter +installed and you want to use BogoFilter, then you can set this option to +\"Bogofilter\"." + :type '(choice (const :tag "Auto-detect" nil) + (const :tag "SpamAssassin" spamassassin) + (const :tag "Bogofilter" bogofilter) + (const :tag "SpamProbe" spamprobe)) + :set 'mh-junk-choose + :group 'mh-junk) + ;;; Editing a Draft (:group 'mh-letter) -(defcustom mh-mml-method-default (if mh-gnus-pgp-support-flag "pgpmime" "none") - "Default method to use in security directives." - :type '(choice (const :tag "PGP (MIME)" "pgpmime") - (const :tag "PGP" "pgp") - (const :tag "S/MIME" "smime") - (const :tag "None" "none")) - :group 'mh-letter) - -(defcustom mh-compose-forward-as-mime-flag t - "Non-nil means that messages are forwarded as a MIME part." - :type 'boolean - :group 'mh-letter) - (defcustom mh-compose-insertion (if (locate-library "mml") 'gnus 'mhn) "Type of MIME message directives in messages. @@ -761,11 +805,6 @@ by \\\\[mh-insert-letter] or \\[mh-yank-cur-msg]." :type 'string :group 'mh-letter) -(defcustom mh-insert-x-mailer-flag t - "*Non-nil means append an X-Mailer field to the header." - :type 'boolean - :group 'mh-letter) - (defcustom mh-letter-complete-function 'ispell-complete-word "*Function to call when completing outside of address or folder fields. By default, this is set to `ispell-complete-word'." @@ -780,16 +819,12 @@ and it's best to avoid quoted lines that span more than 80 columns." :type 'integer :group 'mh-letter) -(defcustom mh-reply-show-message-flag t - "*Non-nil means the show buffer is displayed using \\\\[mh-reply]. - -The setting of this variable determines whether the MH `show-buffer' is -displayed with the current message when using `mh-reply' without a prefix -argument. Set it to nil if you already include the message automatically -in your draft using - repl: -filter repl.filter -in your ~/.mh_profile file." - :type 'boolean +(defcustom mh-mml-method-default (if mh-gnus-pgp-support-flag "pgpmime" "none") + "Default method to use in security directives." + :type '(choice (const :tag "PGP (MIME)" "pgpmime") + (const :tag "PGP" "pgp") + (const :tag "S/MIME" "smime") + (const :tag "None" "none")) :group 'mh-letter) (defcustom mh-signature-file-name "~/.signature" @@ -881,14 +916,14 @@ If nil, yank only the portion of the message following the point. If the show buffer has a region, this variable is ignored unless its value is one of `attribution' or `autoattrib' in which case the attribution is added to the yanked region." - :type '(choice (const :tag "Below point" nil) - (const :tag "Without header" body) + :type '(choice (const :tag "Body and Header" t) + (const :tag "Body" body) + (const :tag "Below Point" nil) (const :tag "Invoke supercite" supercite) - (const :tag "Invoke supercite, automatically" autosupercite) - (const :tag "Without header, with attribution" attribution) - (const :tag "Without header, with attribution, automatically" - autoattrib) - (const :tag "Entire message with headers" t)) + (const :tag "Invoke supercite, Automatically" autosupercite) + (const :tag "Body With Attribution" attribution) + (const :tag "Body With Attribution, Automatically" + autoattrib)) :group 'mh-letter) @@ -947,6 +982,11 @@ for relative to the `mh-progs' directory unless it is an absolute pathname." ;;; Sending Mail (:group 'mh-sending-mail) +(defcustom mh-compose-forward-as-mime-flag t + "Non-nil means that messages are forwarded as a MIME part." + :type 'boolean + :group 'mh-sending-mail) + (defcustom mh-compose-letter-function nil "Invoked when setting up a letter draft. It is passed three arguments: TO recipients, SUBJECT, and CC recipients." @@ -965,6 +1005,11 @@ message and the original subject line." :type 'string :group 'mh-sending-mail) +(defcustom mh-insert-x-mailer-flag t + "*Non-nil means append an X-Mailer field to the header." + :type 'boolean + :group 'mh-sending-mail) + (defcustom mh-reply-default-reply-to nil "*Sets the person or persons to whom a reply will be sent. If nil, prompt for recipient. If non-nil, then \\`\\[mh-reply]' will use this @@ -975,6 +1020,18 @@ The values \"cc\" and \"all\" do the same thing." (const "cc") (const "all")) :group 'mh-sending-mail) +(defcustom mh-reply-show-message-flag t + "*Non-nil means the show buffer is displayed using \\\\[mh-reply]. + +The setting of this variable determines whether the MH `show-buffer' is +displayed with the current message when using `mh-reply' without a prefix +argument. Set it to nil if you already include the message automatically +in your draft using + repl: -filter repl.filter +in your ~/.mh_profile file." + :type 'boolean + :group 'mh-sending-mail) + ;;; Sequences (:group 'mh-sequences) @@ -1120,6 +1177,7 @@ The gnus method uses a different color for each indentation." "Delivered-To:" ; Egroups/yahoogroups mailing list manager "Delivery-Date:" ; MH "Delivery:" + "DomainKey-Signature:" ;http://antispam.yahoo.com/domainkeys "Encoding:" "Envelope-to:" "Errors-To:" @@ -1188,6 +1246,7 @@ The gnus method uses a different color for each indentation." "X-Envelope-From:" "X-Envelope-Sender:" "X-Envelope-To:" + "X-Evolution:" ; Evolution mail client "X-Face:" "X-Folder:" ; Spam "X-From-Line" @@ -1264,6 +1323,7 @@ The gnus method uses a different color for each indentation." "X-Trace:" "X-UID" "X-UIDL:" + "X-USANET-" ; usa.net "X-UserInfo1:" "X-VSMLoop:" ; NTMail "X-Vms-To:" @@ -1527,13 +1587,13 @@ Optional argument ARG is not used." (defun mh-tool-bar-folder-help () "Visit \"(mh-e)Top\"." (interactive) - (Info-goto-node "(mh-e)Top") + (info "(mh-e)Top") (delete-other-windows)) (defun mh-tool-bar-letter-help () "Visit \"(mh-e)Draft Editing\"." (interactive) - (Info-goto-node "(mh-e)Draft Editing") + (info "(mh-e)Draft Editing") (delete-other-windows)) (defmacro mh-tool-bar-reply-generator (function recipient folder-buffer-flag) @@ -1907,9 +1967,9 @@ This button runs `mh-previous-undeleted-msg'") ;; Common buttons (mh-tool-bar-customize (folder letter) "preferences" "MH-E Preferences") (mh-tool-bar-folder-help (folder) "help" - "Help! (general help)\nThis button runs `Info-goto-node'") + "Help! (general help)\nThis button runs `info'") (mh-tool-bar-letter-help (letter) "help" - "Help! (general help)\nThis button runs `Info-goto-node'") + "Help! (general help)\nThis button runs `info'") ;; Folder narrowed to sequence buttons (mh-widen (sequence) "widen" "Widen from the sequence\nThis button runs `mh-widen'")) @@ -2085,7 +2145,7 @@ will be removed from the unseen sequence." ;;; Faces Used in Scan Listing (:group 'mh-folder-faces) (defvar mh-folder-body-face 'mh-folder-body-face - "Face for highlighting body text in MH-Folder buffers.") + "Face used to highlight body text in MH-Folder buffers.") (defface mh-folder-body-face '((((type tty) (class color)) (:foreground "green")) (((class grayscale) (background light)) (:foreground "DimGray" :italic t)) @@ -2093,11 +2153,11 @@ will be removed from the unseen sequence." (((class color) (background light)) (:foreground "RosyBrown")) (((class color) (background dark)) (:foreground "LightSalmon")) (t (:italic t))) - "Face for highlighting body text in MH-Folder buffers." + "Face used to highlight body text in MH-Folder buffers." :group 'mh-folder-faces) (defvar mh-folder-cur-msg-face 'mh-folder-cur-msg-face - "Face for the current message line in MH-Folder buffers.") + "Face used for the current message line in MH-Folder buffers.") (defface mh-folder-cur-msg-face '((((type tty pc) (class color)) (:background "LightGreen")) @@ -2108,11 +2168,11 @@ will be removed from the unseen sequence." (((class color) (background dark)) (:background "DarkOliveGreen4")) (t (:underline t))) - "Face for the current message line in MH-Folder buffers." + "Face used for the current message line in MH-Folder buffers." :group 'mh-folder-faces) (defvar mh-folder-cur-msg-number-face 'mh-folder-cur-msg-number-face - "Face for highlighting the current message in MH-Folder buffers.") + "Face used to highlight the current message in MH-Folder buffers.") (defface mh-folder-cur-msg-number-face '((((type tty) (class color)) (:foreground "cyan" :weight bold)) (((class grayscale) (background light)) (:foreground "LightGray" :bold t)) @@ -2120,11 +2180,11 @@ will be removed from the unseen sequence." (((class color) (background light)) (:foreground "Purple")) (((class color) (background dark)) (:foreground "Cyan")) (t (:bold t))) - "Face for highlighting the current message in MH-Folder buffers." + "Face used to highlight the current message in MH-Folder buffers." :group 'mh-folder-faces) (defvar mh-folder-date-face 'mh-folder-date-face - "Face for highlighting the date in MH-Folder buffers.") + "Face used to highlight the date in MH-Folder buffers.") (defface mh-folder-date-face '((((class color) (background light)) (:foreground "snow4")) @@ -2132,11 +2192,11 @@ will be removed from the unseen sequence." (:foreground "snow3")) (t (:bold t))) - "Face for highlighting the date in MH-Folder buffers." + "Face used to highlight the date in MH-Folder buffers." :group 'mh-folder-faces) (defvar mh-folder-followup-face 'mh-folder-followup-face - "Face for highlighting Re: (followup) subject text in MH-Folder buffers.") + "Face used to highlight Re: subject text in MH-Folder buffers.") (defface mh-folder-followup-face '((((class color) (background light)) (:foreground "blue3")) @@ -2144,11 +2204,11 @@ will be removed from the unseen sequence." (:foreground "LightGoldenRod")) (t (:bold t))) - "Face for highlighting Re: (followup) subject text in MH-Folder buffers." + "Face used to highlight Re: subject text in MH-Folder buffers." :group 'mh-folder-faces) (defvar mh-folder-msg-number-face 'mh-folder-msg-number-face - "Face for highlighting the message number in MH-Folder buffers.") + "Face used to highlight the message number in MH-Folder buffers.") (defface mh-folder-msg-number-face '((((class color) (background light)) (:foreground "snow4")) @@ -2156,15 +2216,15 @@ will be removed from the unseen sequence." (:foreground "snow3")) (t (:bold t))) - "Face for highlighting the message number in MH-Folder buffers." + "Face used to highlight the message number in MH-Folder buffers." :group 'mh-folder-faces) (defvar mh-folder-deleted-face 'mh-folder-deleted-face - "Face for highlighting deleted messages in MH-Folder buffers.") + "Face used to highlight deleted messages in MH-Folder buffers.") (copy-face 'mh-folder-msg-number-face 'mh-folder-deleted-face) (defvar mh-folder-refiled-face 'mh-folder-refiled-face - "Face for highlighting refiled messages in MH-Folder buffers.") + "Face used to highlight refiled messages in MH-Folder buffers.") (defface mh-folder-refiled-face '((((type tty) (class color)) (:foreground "yellow" :weight light)) (((class grayscale) (background light)) @@ -2174,11 +2234,11 @@ will be removed from the unseen sequence." (((class color) (background light)) (:foreground "DarkGoldenrod")) (((class color) (background dark)) (:foreground "LightGoldenrod")) (t (:bold t :italic t))) - "Face for highlighting refiled messages in MH-Folder buffers." + "Face used to highlight refiled messages in MH-Folder buffers." :group 'mh-folder-faces) (defvar mh-folder-subject-face 'mh-folder-subject-face - "Face for highlighting subject text in MH-Folder buffers.") + "Face used to highlight subject text in MH-Folder buffers.") (if (boundp 'facemenu-unlisted-faces) (add-to-list 'facemenu-unlisted-faces "^mh-folder")) (defface mh-folder-subject-face @@ -2188,7 +2248,7 @@ will be removed from the unseen sequence." (:foreground "yellow")) (t (:bold t))) - "Face for highlighting subject text in MH-Folder buffers." + "Face used to highlight subject text in MH-Folder buffers." :group 'mh-folder-faces) (defface mh-folder-tick-face @@ -2199,15 +2259,15 @@ will be removed from the unseen sequence." :group 'mh-folder-faces) (defvar mh-folder-address-face 'mh-folder-address-face - "Face for highlighting the address in MH-Folder buffers.") + "Face used to highlight the address in MH-Folder buffers.") (copy-face 'mh-folder-subject-face 'mh-folder-address-face) (defvar mh-folder-scan-format-face 'mh-folder-scan-format-face - "Face for highlighting `mh-scan-format-regexp' matches in MH-Folder buffers.") + "Face used to highlight `mh-scan-format-regexp' matches in MH-Folder buffers.") (copy-face 'mh-folder-followup-face 'mh-folder-scan-format-face) (defvar mh-folder-to-face 'mh-folder-to-face - "Face for highlighting the To: string in MH-Folder buffers.") + "Face used to highlight the To: string in MH-Folder buffers.") (defface mh-folder-to-face '((((type tty) (class color)) (:foreground "green")) (((class grayscale) (background light)) (:foreground "DimGray" :italic t)) @@ -2215,7 +2275,7 @@ will be removed from the unseen sequence." (((class color) (background light)) (:foreground "RosyBrown")) (((class color) (background dark)) (:foreground "LightSalmon")) (t (:italic t))) - "Face for highlighting the To: string in MH-Folder buffers." + "Face used to highlight the To: string in MH-Folder buffers." :group 'mh-folder-faces) @@ -2223,7 +2283,7 @@ will be removed from the unseen sequence." ;;; Faces Used in Searching (:group 'mh-index-faces) (defvar mh-index-folder-face 'mh-index-folder-face - "Face for highlighting folders in MH-Index buffers.") + "Face used to highlight folders in MH-Index buffers.") (defface mh-index-folder-face '((((class color) (background light)) (:foreground "dark green" :bold t)) @@ -2231,7 +2291,7 @@ will be removed from the unseen sequence." (:foreground "indian red" :bold t)) (t (:bold t))) - "Face for highlighting folders in MH-Index buffers." + "Face used to highlight folders in MH-Index buffers." :group 'mh-index-faces) @@ -2244,7 +2304,7 @@ will be removed from the unseen sequence." (((class color) (background dark)) (:background "gray10")) (t (:bold t))) - "Face for displaying header fields in draft buffers." + "Face used to display header fields in draft buffers." :group 'mh-letter-faces) @@ -2252,7 +2312,7 @@ will be removed from the unseen sequence." ;;; Faces Used in Message Display (:group 'mh-show-faces) (defvar mh-show-cc-face 'mh-show-cc-face - "Face for highlighting cc header fields.") + "Face used to highlight cc: header fields.") (defface mh-show-cc-face '((((type tty) (class color)) (:foreground "yellow" :weight light)) (((class grayscale) (background light)) @@ -2262,11 +2322,11 @@ will be removed from the unseen sequence." (((class color) (background light)) (:foreground "DarkGoldenrod")) (((class color) (background dark)) (:foreground "LightGoldenrod")) (t (:bold t :italic t))) - "Face for highlighting cc header fields." + "Face used to highlight cc: header fields." :group 'mh-show-faces) (defvar mh-show-date-face 'mh-show-date-face - "Face for highlighting the Date header field.") + "Face used to highlight the Date: header field.") (defface mh-show-date-face '((((type tty) (class color)) (:foreground "green")) (((class grayscale) (background light)) (:foreground "Gray90" :bold t)) @@ -2274,7 +2334,7 @@ will be removed from the unseen sequence." (((class color) (background light)) (:foreground "ForestGreen")) (((class color) (background dark)) (:foreground "PaleGreen")) (t (:bold t :underline t))) - "Face for highlighting the Date header field." + "Face used to highlight the Date: header field." :group 'mh-show-faces) (defvar mh-show-header-face 'mh-show-header-face @@ -2289,13 +2349,36 @@ will be removed from the unseen sequence." "Face used to deemphasize unspecified header fields." :group 'mh-show-faces) +(defvar mh-show-pgg-good-face 'mh-show-pgg-good-face + "Face used to highlight a good PGG signature.") +(defface mh-show-pgg-good-face + '((t (:bold t :foreground "LimeGreen"))) + "Face used to highlight a good PGG signature." + :group 'mh-show-faces) + +(defvar mh-show-pgg-unknown-face 'mh-show-pgg-unknown-face + "Face used to highlight a PGG signature whose status is unknown. +This face is also used for a signature when the signer is untrusted.") +(defface mh-show-pgg-unknown-face + '((t (:bold t :foreground "DarkGoldenrod2"))) + "Face used to highlight a PGG signature whose status is unknown. +This face is also used for a signature when the signer is untrusted." + :group 'mh-show-faces) + +(defvar mh-show-pgg-bad-face 'mh-show-pgg-bad-face + "Face used to highlight a bad PGG signature.") +(defface mh-show-pgg-bad-face + '((t (:bold t :foreground "DeepPink1"))) + "Face used to highlight a bad PGG signature." + :group 'mh-show-faces) + (defface mh-show-signature-face '((t (:italic t))) - "Face for highlighting message signature." + "Face used to highlight the message signature." :group 'mh-show-faces) (defvar mh-show-to-face 'mh-show-to-face - "Face for highlighting the To: header field.") + "Face used to highlight the To: header field.") (if (boundp 'facemenu-unlisted-faces) (add-to-list 'facemenu-unlisted-faces "^mh-show")) (defface mh-show-to-face @@ -2306,11 +2389,11 @@ will be removed from the unseen sequence." (((class color) (background light)) (:foreground "SaddleBrown")) (((class color) (background dark)) (:foreground "burlywood")) (t (:underline t))) - "Face for highlighting the To: header field." + "Face used to highlight the To: header field." :group 'mh-show-faces) (defvar mh-show-from-face 'mh-show-from-face - "Face for highlighting the From: header field.") + "Face used to highlight the From: header field.") (defface mh-show-from-face '((((class color) (background light)) (:foreground "red3")) @@ -2318,17 +2401,17 @@ will be removed from the unseen sequence." (:foreground "cyan")) (t (:bold t))) - "Face for highlighting the From: header field." + "Face used to highlight the From: header field." :group 'mh-show-faces) (defface mh-show-xface-face '((t (:foreground "black" :background "white"))) - "Face for displaying the X-Face image. + "Face used to display the X-Face image. The background and foreground is used in the image." :group 'mh-show-faces) (defvar mh-show-subject-face 'mh-show-subject-face - "Face for highlighting the Subject header field.") + "Face used to highlight the Subject: header field.") (copy-face 'mh-folder-subject-face 'mh-show-subject-face) diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el index b5eea79ae1e..0cfb053c887 100644 --- a/lisp/mh-e/mh-e.el +++ b/lisp/mh-e/mh-e.el @@ -1,11 +1,12 @@ ;;; mh-e.el --- GNU Emacs interface to the MH mail system -;; Copyright (C) 1985, 86, 87, 88, 90, 92, 93, 94, 95, 97, 1999, -;; 2000, 2005 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1986, 1987, 1988, +;; 1990, 1992, 1993, 1994, 1995, 1997, 1999, +;; 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Bill Wohler ;; Maintainer: Bill Wohler -;; Version: 7.82 +;; Version: 7.84 ;; Keywords: mail ;; This file is part of GNU Emacs. @@ -97,10 +98,7 @@ (defvar font-lock-auto-fontify) (defvar font-lock-defaults) -(defconst mh-version "7.82" "Version number of MH-E.") - -;;; Autoloads -(autoload 'Info-goto-node "info") +(defconst mh-version "7.84" "Version number of MH-E.") (defvar mh-partial-folder-mode-line-annotation "select" "Annotation when displaying part of a folder. @@ -578,7 +576,8 @@ Do not call this function from outside MH-E; use \\[mh-rmail] instead." (setq folder mh-inbox)) (let ((threading-needed-flag nil)) (let ((config (current-window-configuration))) - (delete-other-windows) + (when (and mh-show-buffer (get-buffer mh-show-buffer)) + (delete-windows-on mh-show-buffer)) (cond ((not (get-buffer folder)) (mh-make-folder folder) (setq threading-needed-flag mh-show-threads-flag) @@ -717,22 +716,24 @@ updated." (mh-refile-a-msg nil folder)) (when (looking-at mh-scan-refiled-msg-regexp) (mh-next-msg))) -(defun mh-refile-or-write-again (message) - "Re-execute the last refile or write command on the given MESSAGE. +(defun mh-refile-or-write-again (range &optional interactive-flag) + "Re-execute the last refile or write command on the given RANGE. Default is the displayed message. Use the same folder or file as the previous -refile or write command." - (interactive (list (mh-get-msg-num t))) +refile or write command. +If INTERACTIVE-FLAG is non-nil then the function was called interactively." + (interactive (list (mh-interactive-range "Redo") t)) (if (null mh-last-destination) (error "No previous refile or write")) (let (output) (setq output (cond ((eq (car mh-last-destination) 'refile) - (mh-refile-a-msg message (cdr mh-last-destination)) + (mh-refile-msg range (cdr mh-last-destination)) (format "Destination folder: %s" (cdr mh-last-destination))) (t - (apply 'mh-write-msg-to-file message (cdr mh-last-destination)) + (mh-iterate-on-range msg range + (apply 'mh-write-msg-to-file msg (cdr mh-last-destination))) + (mh-next-msg interactive-flag) (format "Destination: %s" (cdr mh-last-destination))))) - (mh-next-msg (interactive-p)) (message output))) (defun mh-quit () @@ -1801,7 +1802,7 @@ Return in the current buffer." (message "inc %s..." folder)) (setq mh-next-direction 'forward) (goto-char (point-max)) - (mh-remove-all-notation) + (mh-remove-cur-notation) (let ((start-of-inc (point))) (if maildrop-name ;; I think MH 5 used "-ms-file" instead of "-file", @@ -1827,7 +1828,7 @@ Return in the current buffer." start-of-inc (point-max)))) (delete-region start-of-inc (point-max)) (unwind-protect (mh-widen t) - (mh-remove-all-notation) + (mh-remove-cur-notation) (goto-char (point-max)) (setq start-of-inc (point)) (insert saved-text) @@ -1846,7 +1847,15 @@ Return in the current buffer." (t (setq new-mail-flag t))) (keep-lines mh-scan-valid-regexp) ; Flush random scan lines - (setq mh-seq-list (mh-read-folder-sequences folder t)) + (let* ((sequences (mh-read-folder-sequences folder t)) + (new-cur (assoc 'cur sequences)) + (new-unseen (assoc mh-unseen-seq sequences))) + (unless (assoc 'cur mh-seq-list) + (push (list 'cur) mh-seq-list)) + (unless (assoc mh-unseen-seq mh-seq-list) + (push (list mh-unseen-seq) mh-seq-list)) + (setcdr (assoc 'cur mh-seq-list) (cdr new-cur)) + (setcdr (assoc mh-unseen-seq mh-seq-list) (cdr new-unseen))) (when (equal (point-max) start-of-inc) (mh-notate-cur)) (if new-mail-flag @@ -1858,8 +1867,7 @@ Return in the current buffer." (mh-thread-inc folder start-of-inc)) (mh-goto-cur-msg)) (goto-char point-before-inc)) - (mh-notate-user-sequences) - (mh-notate-deleted-and-refiled))))) + (mh-notate-user-sequences (cons start-of-inc (point-max))))))) (defun mh-make-folder-mode-line (&optional ignored) "Set the fields of the mode line for a folder buffer. @@ -2033,18 +2041,18 @@ with no arguments, before the commands are processed." (mh-coalesce-msg-list msgs)) (mh-delete-scan-msgs msgs) ;; Preserve sequences in destination folder... - (when (and mh-refile-preserves-sequences-flag - (numberp last)) + (when mh-refile-preserves-sequences-flag (clrhash dest-map) - (loop for i from (1+ last) + (loop for i from (1+ (or last 0)) for msg in (sort (copy-sequence msgs) #'<) do (loop for seq-name in (gethash msg seq-map) do (push i (gethash seq-name dest-map)))) (maphash #'(lambda (seq msgs) - ;; Run it in the background, since we don't care - ;; about the results. - (apply #'mh-exec-cmd-daemon "mark" #'ignore + ;; Can't be run in the background, since the + ;; current folder is changed by mark this could + ;; lead to a race condition with the next refile. + (apply #'mh-exec-cmd "mark" "-sequence" (symbol-name seq) dest-folder "-add" (mapcar #'(lambda (x) (format "%s" x)) (mh-coalesce-msg-list msgs)))) @@ -2201,13 +2209,14 @@ Expands ranges into set of individual numbers." (end-of-line (save-excursion (end-of-line) (point))) num) (while (re-search-forward "[0-9]+" end-of-line t) - (setq num (string-to-int (buffer-substring (match-beginning 0) - (match-end 0)))) + (setq num (string-to-number (buffer-substring (match-beginning 0) + (match-end 0)))) (cond ((looking-at "-") ; Message range (forward-char 1) (re-search-forward "[0-9]+" end-of-line t) - (let ((num2 (string-to-int (buffer-substring (match-beginning 0) - (match-end 0))))) + (let ((num2 (string-to-number + (buffer-substring (match-beginning 0) + (match-end 0))))) (if (< num2 num) (error "Bad message range: %d-%d" num num2)) (while (<= num num2) diff --git a/lisp/mh-e/mh-funcs.el b/lisp/mh-e/mh-funcs.el index a632efc7856..126fd84ce9b 100644 --- a/lisp/mh-e/mh-funcs.el +++ b/lisp/mh-e/mh-funcs.el @@ -1,6 +1,7 @@ ;;; mh-funcs.el --- MH-E functions not everyone will use right away -;; Copyright (C) 1993, 1995, 2005 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1995, +;; 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ;; Author: Bill Wohler ;; Maintainer: Bill Wohler @@ -127,7 +128,7 @@ Display the results only if something went wrong." (set-buffer (get-buffer-create mh-temp-buffer)) (insert-before-markers output) (when (save-excursion - (beginning-of-buffer) + (goto-char (point-min)) (re-search-forward "^rmf: " (point-max) t)) (display-buffer mh-temp-buffer))) @@ -148,7 +149,7 @@ Display the results only if something went wrong." "-recurse" "-norecurse")) (goto-char (point-min)) - (view-mode 1) + (view-mode-enter) (setq view-exit-action 'kill-buffer) (message "Listing folders...done"))))) diff --git a/lisp/mh-e/mh-gnus.el b/lisp/mh-e/mh-gnus.el index e4b4a5b0d54..b850c8fdc43 100644 --- a/lisp/mh-e/mh-gnus.el +++ b/lisp/mh-e/mh-gnus.el @@ -1,6 +1,6 @@ ;;; mh-gnus.el --- Make MH-E compatible with installed version of Gnus. -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2004 Free Software Foundation, Inc. ;; Author: Satyaki Das ;; Maintainer: Bill Wohler diff --git a/lisp/mh-e/mh-identity.el b/lisp/mh-e/mh-identity.el index 7b44dae1d06..dc076751865 100644 --- a/lisp/mh-e/mh-identity.el +++ b/lisp/mh-e/mh-identity.el @@ -1,6 +1,6 @@ ;;; mh-identity.el --- Multiple identify support for MH-E. -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. ;; Author: Peter S. Galbraith ;; Maintainer: Bill Wohler @@ -87,18 +87,18 @@ change." ;;;###mh-autoload (defun mh-identity-list-set (symbol value) "Update the `mh-identity-list' variable, and rebuild the menu. -Sets the default for SYMBOL (e.g. `mh-identity-list') to VALUE (as set in -customization). This is called after 'customize is used to alter +Sets the default for SYMBOL (for example, `mh-identity-list') to VALUE (as set +in customization). This is called after 'customize is used to alter `mh-identity-list'." (set-default symbol value) (mh-identity-make-menu)) (defvar mh-identity-local nil - "Buffer-local variable holding the identity currently in use.") + "Buffer-local variable that holds the identity currently in use.") (make-variable-buffer-local 'mh-identity-local) (defun mh-header-field-delete (field value-only) - "Delete FIELD in the mail header, or only its value if VALUE-ONLY is t. + "Delete header FIELD, or only its value if VALUE-ONLY is t. Return t if anything is deleted." (let ((field-colon (if (string-match "^.*:$" field) field @@ -119,11 +119,11 @@ Return t if anything is deleted." "Marker for the end of a signature inserted by `mh-insert-identity'.") (defun mh-identity-field-handler (field) - "Return the handler for a FIELD or nil if none set. + "Return the handler for header FIELD or nil if none set. The field name is downcased. If the FIELD begins with the character `:', then it must have a special handler defined in `mh-identity-handlers', else return an error since it is not a valid -message header." +header field." (or (cdr (assoc (downcase field) mh-identity-handlers)) (and (eq (aref field 0) ?:) (error (format "Field %s - unknown mh-identity-handler" field))) @@ -132,8 +132,8 @@ message header." ;;;###mh-autoload (defun mh-insert-identity (identity) - "Insert proper fields for given IDENTITY. -Edit the `mh-identity-list' variable to define identity." + "Insert fields specified by given IDENTITY. +See `mh-identity-list'." (interactive (list (completing-read "Identity: " @@ -167,7 +167,8 @@ Edit the `mh-identity-list' variable to define identity." ;;;###mh-autoload (defun mh-identity-handler-gpg-identity (field action &optional value) - "For FIELD \"pgg-default-user-id\", process for ACTION 'remove or 'add. + "Process header FIELD \":pgg-default-user-id\". +The ACTION is one of 'remove or 'add. If 'add, the VALUE is added. The buffer-local variable `mh-identity-pgg-default-user-id' is set to VALUE when action 'add is selected." (cond @@ -180,8 +181,8 @@ when action 'add is selected." ;;;###mh-autoload (defun mh-identity-handler-signature (field action &optional value) - "For FIELD \"signature\", process headers for ACTION 'remove or 'add. -The VALUE is added." + "Process header FIELD \":signature\". +The ACTION is one of 'remove or 'add. If 'add, the VALUE is added." (cond ((equal action 'remove) (when (and (markerp mh-identity-signature-start) @@ -210,8 +211,8 @@ The VALUE is added." ;;;###mh-autoload (defun mh-identity-handler-attribution-verb (field action &optional value) - "For FIELD \"attribution_verb\", process headers for ACTION 'remove or 'add. -The VALUE is added." + "Process header FIELD \":attribution-verb\". +The ACTION is one of 'remove or 'add. If 'add, the VALUE is added." (when (and (markerp mh-identity-attribution-verb-start) (markerp mh-identity-attribution-verb-end)) (delete-region mh-identity-attribution-verb-start @@ -239,9 +240,10 @@ If VALUE is nil, use `mh-extract-from-attribution-verb'." (point-max-marker)))) (defun mh-identity-handler-default (field action top &optional value) - "For FIELD, process mh-identity headers for ACTION 'remove or 'add. -if TOP is non-nil, add the field and it's VALUE at the top of the header, else -add it at the bottom of the header." + "Process header FIELD. +The ACTION is one of 'remove or 'add. If TOP is non-nil, add the field and its +VALUE at the top of the header, else add it at the bottom of the header. If +action is 'add, the VALUE is added." (let ((field-colon (if (string-match "^.*:$" field) field (concat field ":")))) @@ -266,14 +268,16 @@ add it at the bottom of the header." ;;;###mh-autoload (defun mh-identity-handler-top (field action &optional value) - "For FIELD, process mh-identity headers for ACTION 'remove or 'add. -If the field wasn't present, the VALUE is added at the top of the header." + "Process header FIELD. +The ACTION is one of 'remove or 'add. If 'add, the VALUE is added. +If the field wasn't present, it is added to the top of the header." (mh-identity-handler-default field action t value)) ;;;###mh-autoload (defun mh-identity-handler-bottom (field action &optional value) - "For FIELD, process mh-identity headers for ACTION 'remove or 'add. -If the field wasn't present, the VALUE is added at the bottom of the header." + "Process header FIELD. +The ACTION is one of 'remove or 'add. If 'add, the VALUE is added. +If the field wasn't present, it is added to the bottom of the header." (mh-identity-handler-default field action nil value)) (provide 'mh-identity) diff --git a/lisp/mh-e/mh-inc.el b/lisp/mh-e/mh-inc.el index 95341fa75f7..c9a9c6cb6b6 100644 --- a/lisp/mh-e/mh-inc.el +++ b/lisp/mh-e/mh-inc.el @@ -1,6 +1,6 @@ ;;; mh-inc.el --- MH-E `inc' and separate mail spool handling ;; -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2004 Free Software Foundation, Inc. ;; Author: Peter S. Galbraith ;; Maintainer: Bill Wohler @@ -98,10 +98,10 @@ This is called after 'customize is used to alter `mh-inc-spool-list'." (provide 'mh-inc) -;; Local Variables: -;; indent-tabs-mode: nil -;; sentence-end-double-space: nil -;; End: +;;; Local Variables: +;;; indent-tabs-mode: nil +;;; sentence-end-double-space: nil +;;; End: -;; arch-tag: 3713cf2a-6082-4cb4-8ce2-99d9acaba835 +;;; arch-tag: 3713cf2a-6082-4cb4-8ce2-99d9acaba835 ;;; mh-inc.el ends here diff --git a/lisp/mh-e/mh-index.el b/lisp/mh-e/mh-index.el index cde630236b0..7a52b94dd2b 100644 --- a/lisp/mh-e/mh-index.el +++ b/lisp/mh-e/mh-index.el @@ -1,6 +1,6 @@ ;;; mh-index -- MH-E interface to indexing programs -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Satyaki Das ;; Maintainer: Bill Wohler @@ -31,6 +31,7 @@ ;;; swish-e ;;; mairix ;;; namazu +;;; pick ;;; grep ;;; ;;; (2) To use this package, you first have to build an index. Please read @@ -352,43 +353,74 @@ they are concatenated to construct the base name." (defun* mh-index-search (redo-search-flag folder search-regexp &optional window-config) "Perform an indexed search in an MH mail folder. -Use a prefix argument to repeat the search, as in REDO-SEARCH-FLAG below. +Use a prefix argument to repeat the search. -If REDO-SEARCH-FLAG is non-nil and the current folder buffer was generated by a -index search, then the search is repeated. Otherwise, FOLDER is searched with -SEARCH-REGEXP and the results are presented in an MH-E folder. If FOLDER is -\"+\" then mail in all folders are searched. Optional argument WINDOW-CONFIG -stores the window configuration that will be restored after the user quits the -folder containing the index search results. +Unlike regular searches, the prompt for the folder to search can be `all' to +search all folders; in addition, the search works recursively on the listed +folder. The search criteria are entered in an MH-Pick buffer as described in +`mh-search-folder'. -Four indexing programs are supported; if none of these are present, then grep -is used. This function picks the first program that is available on your -system. If you would prefer to use a different program, set the customization -variable `mh-index-program' accordingly. +To perform the search, type \\\\[mh-do-search]. Another +difference from the regular searches is that because the search operates on +more than one folder, the messages that are found are put in a temporary +sub-folder of `+mhe-index' and are displayed in an MH-Folder buffer. This +buffer is special because it displays messages from multiple folders; each set +of messages from a given folder has a heading with the folder name. -The documentation for the following functions describes how to generate the -index for each program: +In addition, the \\\\[mh-index-visit-folder] command can +be used to visit the folder of the message at point. Initially, only the +messages that matched the search criteria are displayed in the folder. While +the temporary buffer has its own set of message numbers, the actual messages +numbers are shown in the visited folder. Thus, the \\[mh-index-visit-folder] +command is useful to find the actual message number of an interesting message, +or to view surrounding messages with the \\[mh-rescan-folder] command. + +Because this folder is temporary, you'll probably get in the habit of killing +it when you're done with \\[mh-kill-folder]. + +If you have run the \\[mh-search-folder] command, but change your mind while +entering the search criteria and actually want to run an indexed search, then +you can use the \\\\[mh-index-do-search] command in the +MH-Pick buffer. + +The \\\\[mh-index-search] command runs the command defined +by the `mh-index-program' option. The default value is \"Auto-detect\" which +means that MH-E will automatically choose one of \"swish++\", \"swish-e\", +\"mairix\", \"namazu\", \"pick\" and \"grep\" in that order. If, for example, +you have both \"swish++\" and \"mairix\" installed and you want to use +\"mairix\", then you can set this option to \"mairix\". + + *NOTE* + + The \"pick\" and \"grep\" commands do not perform a recursive search on + the given folder. + +This command uses an \"X-MHE-Checksum:\" header field to cache the MD5 +checksum of a message. This means that if an incoming message already contains +an \"X-MHE-Checksum:\" field, that message might not be found by this command. +The following \"procmail\" recipe avoids this problem by renaming the existing +header field: + + :0 wf + | formail -R \"X-MHE-Checksum\" \"X-Old-MHE-Checksum\" + +The documentation for the following commands describe how to set up the +various indexing programs to use with MH-E. The \"pick\" and \"grep\" commands +do not require additional configuration. - `mh-swish++-execute-search' - `mh-swish-execute-search' - `mh-mairix-execute-search' - `mh-namazu-execute-search' - -If none of these programs are present then we use pick. If desired grep can be -used instead. Details about these methods can be found in: - - `mh-pick-execute-search' - `mh-grep-execute-search' -This and related functions use an X-MHE-Checksum header to cache the MD5 -checksum of a message. This means that already present X-MHE-Checksum headers -in the incoming email could result in messages not being found. The following -procmail recipe should avoid this: - - :0 wf - | formail -R \"X-MHE-Checksum\" \"Old-X-MHE-Checksum\" - -This has the effect of renaming already present X-MHE-Checksum headers." +In a program, if REDO-SEARCH-FLAG is non-nil and the current folder buffer was +generated by a index search, then the search is repeated. Otherwise, FOLDER is +searched with SEARCH-REGEXP and the results are presented in an MH-E folder. +If FOLDER is \"+\" then mail in all folders are searched. Optional argument +WINDOW-CONFIG stores the window configuration that will be restored after the +user quits the folder containing the index search results." (interactive (list current-prefix-arg (progn @@ -998,8 +1030,8 @@ Unlike the other index search programs \"pick\" only searches messages present in the folder itself and does not descend into any sub-folders that may be present. -FOLDER-PATH is the directory containing the mails to be searched and -SEARCH-REGEXP is the pattern that pick gets." +In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used +to search." (set-buffer (get-buffer-create mh-index-temp-buffer)) (erase-buffer) (setq mh-index-pick-folder @@ -1029,7 +1061,13 @@ SEARCH-REGEXP is the pattern that pick gets." (defun mh-grep-execute-search (folder-path search-regexp) "Execute grep and read the results. -FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." + +Unlike the other index search programs \"grep\" only searches messages present +in the folder itself and does not descend into any sub-folders that may be +present. + +In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used +to search." (set-buffer (get-buffer-create mh-index-temp-buffer)) (erase-buffer) (call-process mh-grep-binary nil '(t nil) nil @@ -1081,34 +1119,34 @@ other matches left then return nil. If the current record is invalid return (defun mh-mairix-execute-search (folder-path search-regexp-list) "Execute mairix and read the results. -In the examples below replace /home/user/Mail with the path to your MH +In the examples below, replace \"/home/user/Mail\" with the path to your MH directory. -First create the directory /home/user/Mail/.mairix. Then create the file -/home/user/Mail/.mairix/config with the following contents: +First create the directory \"/home/user/Mail/.mairix\". Then create the file +\"/home/user/Mail/.mairix/config\" with the following contents: - # This should contain the same thing as your `mh-user-path' - base=/home/user/Mail + base=/home/user/Mail - # List of folders that should be indexed. 3 dots at the end means there are - # subfolders within the folder - mh_folders=archive...:inbox:drafts:news:sent:trash + # List of folders that should be indexed. 3 dots at the end means there + # are subfolders within the folder + mh=archive...:inbox:drafts:news:sent:trash - vfolder_format=raw - database=/home/user/Mail/mairix/database + vfolder_format=raw + database=/home/user/Mail/mairix/database Use the following command line to generate the mairix index. Run this daily from cron: - mairix -f /home/user/Mail/.mairix/config + mairix -f /home/user/Mail/.mairix/config -FOLDER-PATH is the directory in which SEARCH-REGEXP-LIST is used to search." +In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP-LIST is used +to search." (set-buffer (get-buffer-create mh-index-temp-buffer)) (erase-buffer) (unless mh-mairix-binary (error "Set mh-mairix-binary appropriately")) (apply #'call-process mh-mairix-binary nil '(t nil) nil - "-f" (format "%s%s/config" mh-user-path mh-mairix-directory) + "-r" "-f" (format "%s%s/config" mh-user-path mh-mairix-directory) search-regexp-list) (goto-char (point-min)) (setq mh-mairix-folder @@ -1167,10 +1205,10 @@ REGEXP-LIST is an alist of fields and values." (let ((expr-list (cdr conjunct)) (expr-string "")) (dolist (e expr-list) - (setq expr-string (concat expr-string "+" + (setq expr-string (concat expr-string "," (if (atom e) "" "~") (if (atom e) e (cadr e))))) - (setq final (concat final "," (substring expr-string 1))))) + (setq final (concat final "/" (substring expr-string 1))))) (substring final 1))) result))) result)) @@ -1327,52 +1365,49 @@ space-separated list of FOLDERS, or nothing to search all folders." (defun mh-swish-execute-search (folder-path search-regexp) "Execute swish-e and read the results. -In the examples below, replace /home/user/Mail with the path to your MH -directory. +In the examples below, replace \"/home/user/Mail\" with the path to your +MH directory. -First create the directory /home/user/Mail/.swish. Then create the file -/home/user/Mail/.swish/config with the following contents: +First create the directory \"/home/user/Mail/.swish\". Then create the file +\"/home/user/Mail/.swish/config\" with the following contents: - IndexDir /home/user/Mail - IndexFile /home/user/Mail/.swish/index - IndexName \"Mail Index\" - IndexDescription \"Mail Index\" - IndexPointer \"http://nowhere\" - IndexAdmin \"nobody\" - #MetaNames automatic - IndexReport 3 - FollowSymLinks no - UseStemming no - IgnoreTotalWordCountWhenRanking yes - WordCharacters abcdefghijklmnopqrstuvwxyz0123456789- - BeginCharacters abcdefghijklmnopqrstuvwxyz - EndCharacters abcdefghijklmnopqrstuvwxyz0123456789 - IgnoreLimit 50 1000 - IndexComments 0 - FileRules pathname contains /home/user/Mail/.swish - FileRules pathname contains /home/user/Mail/mhe-index - FileRules filename is index - FileRules filename is \\..* - FileRules filename is #.* - FileRules filename is ,.* - FileRules filename is .*~ + DefaultContents TXT* + IndexDir /home/user/Mail + IndexFile /home/user/Mail/.swish/index + IndexName \"Mail Index\" + IndexDescription \"Mail Index\" + IndexPointer \"http://nowhere\" + IndexAdmin \"nobody\" + #MetaNames automatic + IndexReport 3 + FollowSymLinks no + UseStemming no + IgnoreTotalWordCountWhenRanking yes + WordCharacters abcdefghijklmnopqrstuvwxyz0123456789- + BeginCharacters abcdefghijklmnopqrstuvwxyz + EndCharacters abcdefghijklmnopqrstuvwxyz0123456789 + IgnoreLimit 50 1000 + IndexComments 0 + FileRules filename contains \\D + FileRules pathname contains /home/user/Mail/.swish + FileRules pathname contains /home/user/Mail/mhe-index + +This configuration does not index the folders that hold the results of your +searches in \"+mhe-index\" since they tend to be ephemeral and the original +messages are indexed anyway. If there are any directories you would like to ignore, append lines like the -following to config: +following to \"config\": - FileRules pathname contains /home/user/Mail/scripts + FileRules pathname contains /home/user/Mail/scripts -You do not want to index the folders that hold the results of your searches -since they tend to be ephemeral and the original messages are indexed anyway. -The configuration file above assumes that the results are found in sub-folders -of `mh-index-folder' which is +mhe-index by default. +Use the following command line to generate the swish index. Run this daily +from cron: -Use the following command line to generate the swish index. Run this -daily from cron: + swish-e -c /home/user/Mail/.swish/config - swish-e -c /home/user/Mail/.swish/config - -FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." +In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to +search." (set-buffer (get-buffer-create mh-index-temp-buffer)) (erase-buffer) (unless mh-swish-binary @@ -1407,7 +1442,8 @@ FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." (list (let* ((s (buffer-substring-no-properties start (1+ (point))))) (unless (string-match mh-swish-folder s) (return 'error)) - (if (string-match mh-user-path s) + (if (and (string-match mh-user-path s) + (< (match-end 0) (1- (length s)))) (format "+%s" (substring s (match-end 0) (1- (length s)))) (return 'error))) @@ -1431,34 +1467,35 @@ FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." (defun mh-swish++-execute-search (folder-path search-regexp) "Execute swish++ and read the results. -In the examples below, replace /home/user/Mail with the path to your MH +In the examples below, replace \"/home/user/Mail\" with the path to your MH directory. -First create the directory /home/user/Mail/.swish++. Then create the file -/home/user/Mail/.swish++/swish++.conf with the following contents: +First create the directory \"/home/user/Mail/.swish++\". Then create the file +\"/home/user/Mail/.swish++/swish++.conf\" with the following contents: - IncludeMeta Bcc Cc Comments Content-Description From Keywords - IncludeMeta Newsgroups Resent-To Subject To - IncludeMeta Message-Id References In-Reply-To - IncludeFile Mail * - IndexFile /home/user/Mail/.swish++/swish++.index + IncludeMeta Bcc Cc Comments Content-Description From Keywords + IncludeMeta Newsgroups Resent-To Subject To + IncludeMeta Message-Id References In-Reply-To + IncludeFile Mail * + IndexFile /home/user/Mail/.swish++/swish++.index -Use the following command line to generate the swish index. Run this -daily from cron: +Use the following command line to generate the swish index. Run this daily +from cron: - find /home/user/Mail -path /home/user/Mail/mhe-index -prune \\ - -o -path /home/user/Mail/.swish++ -prune \\ - -o -name \"[0-9]*\" -print \\ - | index -c /home/user/Mail/.swish++/swish++.conf /home/user/Mail + find /home/user/Mail -path /home/user/Mail/mhe-index -prune \\ + -o -path /home/user/Mail/.swish++ -prune \\ + -o -name \"[0-9]*\" -print \\ + | index -c /home/user/Mail/.swish++/swish++.conf - -You do not want to index the folders that hold the results of your searches -since they tend to be ephemeral and the original messages are indexed anyway. -The command above assumes that the results are found in sub-folders of -`mh-index-folder' which is +mhe-index by default. +This command does not index the folders that hold the results of your searches +in \"+mhe-index\" since they tend to be ephemeral and the original messages +are indexed anyway. -On some systems (Debian GNU/Linux, for example), use index++ instead of index. +On some systems (Debian GNU/Linux, for example), use \"index++\" instead of +\"index\". -FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." +In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to +search." (set-buffer (get-buffer-create mh-index-temp-buffer)) (erase-buffer) (unless mh-swish++-binary @@ -1512,32 +1549,29 @@ REGEXP-LIST is an alist of fields and values." (defun mh-namazu-execute-search (folder-path search-regexp) "Execute namazu and read the results. -In the examples below, replace /home/user/Mail with the path to your MH +In the examples below, replace \"/home/user/Mail\" with the path to your MH directory. -First create the directory /home/user/Mail/.namazu. Then create the file -/home/user/Mail/.namazu/mknmzrc with the following contents: +First create the directory \"/home/user/Mail/.namazu\". Then create the file +\"/home/user/Mail/.namazu/mknmzrc\" with the following contents: - package conf; # Don't remove this line! - $ADDRESS = 'user@localhost'; - $ALLOW_FILE = \"[0-9]*\"; - $EXCLUDE_PATH = \"^/home/user/Mail/(mhe-index|spam)\"; + package conf; # Don't remove this line! + $ADDRESS = 'user@localhost'; + $ALLOW_FILE = \"[0-9]*\"; + $EXCLUDE_PATH = \"^/home/user/Mail/(mhe-index|spam)\"; -In the above example configuration, none of the mail files contained in the -directories /home/user/Mail/mhe-index and /home/user/Mail/spam are indexed. +This configuration does not index the folders that hold the results of your +searches in \"+mhe-index\" since they tend to be ephemeral and the original +messages are indexed anyway. -You do not want to index the folders that hold the results of your searches -since they tend to be ephemeral and the original messages are indexed anyway. -The configuration file above assumes that the results are found in sub-folders -of `mh-index-folder' which is +mhe-index by default. +Use the following command line to generate the namazu index. Run this daily +from cron: -Use the following command line to generate the namazu index. Run this -daily from cron: + mknmz -f /home/user/Mail/.namazu/mknmzrc -O /home/user/Mail/.namazu \\ + /home/user/Mail - mknmz -f /home/user/Mail/.namazu/mknmzrc -O /home/user/Mail/.namazu \\ - /home/user/Mail - -FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." +In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to +search." (let ((namazu-index-directory (format "%s%s" mh-user-path mh-namazu-directory))) (unless (file-exists-p namazu-index-directory) diff --git a/lisp/mh-e/mh-init.el b/lisp/mh-e/mh-init.el index b97e9fcde65..a975b882128 100644 --- a/lisp/mh-e/mh-init.el +++ b/lisp/mh-e/mh-init.el @@ -1,6 +1,6 @@ ;;; mh-init.el --- MH-E initialization. -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2004 Free Software Foundation, Inc. ;; Author: Peter S. Galbraith ;; Maintainer: Bill Wohler diff --git a/lisp/mh-e/mh-junk.el b/lisp/mh-e/mh-junk.el index 29005d47aa6..e66f49e3a55 100644 --- a/lisp/mh-e/mh-junk.el +++ b/lisp/mh-e/mh-junk.el @@ -1,6 +1,6 @@ ;;; mh-junk.el --- Interface to anti-spam measures -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2004 Free Software Foundation, Inc. ;; Author: Satyaki Das , ;; Bill Wohler @@ -191,8 +191,8 @@ done by adding the following to your crontab: (message (format "Blacklisting message %d..." msg)) (set-buffer (get-buffer-create mh-temp-buffer)) (erase-buffer) - (call-process (expand-file-name mh-scan-prog mh-progs) mh-junk-background - t nil + (call-process (expand-file-name mh-scan-prog mh-progs) + nil mh-junk-background nil (format "%s" msg) current-folder "-format" "%<(mymbox{from})%|%(addr{from})%>") (goto-char (point-min)) diff --git a/lisp/mh-e/mh-loaddefs.el b/lisp/mh-e/mh-loaddefs.el index 4abe3b208ef..9accabede57 100644 --- a/lisp/mh-e/mh-loaddefs.el +++ b/lisp/mh-e/mh-loaddefs.el @@ -1,6 +1,6 @@ ;;; mh-loaddefs.el --- automatically extracted autoloads ;; -;;; Copyright (C) 2005 Free Software Foundation, Inc. +;;; Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. ;;; Author: Bill Wohler ;;; Keywords: mail ;;; Commentary: @@ -13,7 +13,7 @@ ;;;;;; mh-check-whom mh-insert-signature mh-to-fcc mh-to-field mh-fill-paragraph-function ;;;;;; mh-get-header-field mh-send-other-window mh-send mh-reply ;;;;;; mh-redistribute mh-forward mh-extract-rejected-mail mh-edit-again) -;;;;;; "mh-comp" "mh-comp.el" (16665 53716)) +;;;;;; "mh-comp" "mh-comp.el" (17048 51103)) ;;; Generated autoloads from mh-comp.el (autoload (quote mh-edit-again) "mh-comp" "\ @@ -56,8 +56,10 @@ to reply to: cc/all sender and all recipients. If optional prefix argument INCLUDEP provided, then include the message in the reply using filter `mhl.reply' in your MH directory. -If the file named by `mh-repl-formfile' exists, it is used as a skeleton -for the reply. +If the file named by `mh-repl-formfile' exists, it is used as a skeleton for +the reply. If REPLY-TO is cc or all and you're using either the nmh or GNU +mailutils variants and the file names by `mh-repl-group-formfile' exists, it +is used instead. See also `mh-send'." t nil) @@ -183,7 +185,7 @@ If we are at the first header field go to the start of the message body." t nil) ;;;;;; mh-store-msg mh-undo-folder mh-sort-folder mh-page-digest-backwards ;;;;;; mh-page-digest mh-pipe-msg mh-pack-folder mh-list-folders ;;;;;; mh-kill-folder mh-copy-msg mh-burst-digest) "mh-funcs" "mh-funcs.el" -;;;;;; (16671 48788)) +;;;;;; (17048 47864)) ;;; Generated autoloads from mh-funcs.el (autoload (quote mh-burst-digest) "mh-funcs" "\ @@ -261,7 +263,7 @@ Display cheat sheet for the commands of the current prefix in minibuffer." t nil ;;;;;; mh-identity-insert-attribution-verb mh-identity-handler-attribution-verb ;;;;;; mh-identity-handler-signature mh-identity-handler-gpg-identity ;;;;;; mh-insert-identity mh-identity-list-set mh-identity-make-menu) -;;;;;; "mh-identity" "mh-identity.el" (16671 57010)) +;;;;;; "mh-identity" "mh-identity.el" (17044 63778)) ;;; Generated autoloads from mh-identity.el (autoload (quote mh-identity-make-menu) "mh-identity" "\ @@ -271,43 +273,46 @@ change." nil nil) (autoload (quote mh-identity-list-set) "mh-identity" "\ Update the `mh-identity-list' variable, and rebuild the menu. -Sets the default for SYMBOL (e.g. `mh-identity-list') to VALUE (as set in -customization). This is called after 'customize is used to alter +Sets the default for SYMBOL (for example, `mh-identity-list') to VALUE (as set +in customization). This is called after 'customize is used to alter `mh-identity-list'." nil nil) (autoload (quote mh-insert-identity) "mh-identity" "\ -Insert proper fields for given IDENTITY. -Edit the `mh-identity-list' variable to define identity." t nil) +Insert fields specified by given IDENTITY. +See `mh-identity-list'." t nil) (autoload (quote mh-identity-handler-gpg-identity) "mh-identity" "\ -For FIELD \"pgg-default-user-id\", process for ACTION 'remove or 'add. +Process header FIELD \":pgg-default-user-id\". +The ACTION is one of 'remove or 'add. If 'add, the VALUE is added. The buffer-local variable `mh-identity-pgg-default-user-id' is set to VALUE when action 'add is selected." nil nil) (autoload (quote mh-identity-handler-signature) "mh-identity" "\ -For FIELD \"signature\", process headers for ACTION 'remove or 'add. -The VALUE is added." nil nil) +Process header FIELD \":signature\". +The ACTION is one of 'remove or 'add. If 'add, the VALUE is added." nil nil) (autoload (quote mh-identity-handler-attribution-verb) "mh-identity" "\ -For FIELD \"attribution_verb\", process headers for ACTION 'remove or 'add. -The VALUE is added." nil nil) +Process header FIELD \":attribution-verb\". +The ACTION is one of 'remove or 'add. If 'add, the VALUE is added." nil nil) (autoload (quote mh-identity-insert-attribution-verb) "mh-identity" "\ Insert VALUE as attribution verb, setting up delimiting markers. If VALUE is nil, use `mh-extract-from-attribution-verb'." nil nil) (autoload (quote mh-identity-handler-top) "mh-identity" "\ -For FIELD, process mh-identity headers for ACTION 'remove or 'add. -If the field wasn't present, the VALUE is added at the top of the header." nil nil) +Process header FIELD. +The ACTION is one of 'remove or 'add. If 'add, the VALUE is added. +If the field wasn't present, it is added to the top of the header." nil nil) (autoload (quote mh-identity-handler-bottom) "mh-identity" "\ -For FIELD, process mh-identity headers for ACTION 'remove or 'add. -If the field wasn't present, the VALUE is added at the bottom of the header." nil nil) +Process header FIELD. +The ACTION is one of 'remove or 'add. If 'add, the VALUE is added. +If the field wasn't present, it is added to the bottom of the header." nil nil) ;;;*** -;;;### (autoloads (mh-inc-spool-list-set) "mh-inc" "mh-inc.el" (16671 -;;;;;; 48848)) +;;;### (autoloads (mh-inc-spool-list-set) "mh-inc" "mh-inc.el" (17048 +;;;;;; 44143)) ;;; Generated autoloads from mh-inc.el (autoload (quote mh-inc-spool-list-set) "mh-inc" "\ @@ -326,7 +331,7 @@ This is called after 'customize is used to alter `mh-inc-spool-list'." nil nil) ;;;;;; mh-index-parse-search-regexp mh-index-do-search mh-index-p ;;;;;; mh-index-read-data mh-index-search mh-index-create-sequences ;;;;;; mh-create-sequence-map mh-index-update-maps) "mh-index" "mh-index.el" -;;;;;; (16665 53754)) +;;;;;; (17044 64025)) ;;; Generated autoloads from mh-index.el (autoload (quote mh-index-update-maps) "mh-index" "\ @@ -346,43 +351,74 @@ Mirror sequences present in source folders in index folder." nil nil) (autoload (quote mh-index-search) "mh-index" "\ Perform an indexed search in an MH mail folder. -Use a prefix argument to repeat the search, as in REDO-SEARCH-FLAG below. +Use a prefix argument to repeat the search. -If REDO-SEARCH-FLAG is non-nil and the current folder buffer was generated by a -index search, then the search is repeated. Otherwise, FOLDER is searched with -SEARCH-REGEXP and the results are presented in an MH-E folder. If FOLDER is -\"+\" then mail in all folders are searched. Optional argument WINDOW-CONFIG -stores the window configuration that will be restored after the user quits the -folder containing the index search results. +Unlike regular searches, the prompt for the folder to search can be `all' to +search all folders; in addition, the search works recursively on the listed +folder. The search criteria are entered in an MH-Pick buffer as described in +`mh-search-folder'. -Four indexing programs are supported; if none of these are present, then grep -is used. This function picks the first program that is available on your -system. If you would prefer to use a different program, set the customization -variable `mh-index-program' accordingly. +To perform the search, type \\\\[mh-do-search]. Another +difference from the regular searches is that because the search operates on +more than one folder, the messages that are found are put in a temporary +sub-folder of `+mhe-index' and are displayed in an MH-Folder buffer. This +buffer is special because it displays messages from multiple folders; each set +of messages from a given folder has a heading with the folder name. -The documentation for the following functions describes how to generate the -index for each program: +In addition, the \\\\[mh-index-visit-folder] command can +be used to visit the folder of the message at point. Initially, only the +messages that matched the search criteria are displayed in the folder. While +the temporary buffer has its own set of message numbers, the actual messages +numbers are shown in the visited folder. Thus, the \\[mh-index-visit-folder] +command is useful to find the actual message number of an interesting message, +or to view surrounding messages with the \\[mh-rescan-folder] command. + +Because this folder is temporary, you'll probably get in the habit of killing +it when you're done with \\[mh-kill-folder]. + +If you have run the \\[mh-search-folder] command, but change your mind while +entering the search criteria and actually want to run an indexed search, then +you can use the \\\\[mh-index-do-search] command in the +MH-Pick buffer. + +The \\\\[mh-index-search] command runs the command defined +by the `mh-index-program' option. The default value is \"Auto-detect\" which +means that MH-E will automatically choose one of \"swish++\", \"swish-e\", +\"mairix\", \"namazu\", \"pick\" and \"grep\" in that order. If, for example, +you have both \"swish++\" and \"mairix\" installed and you want to use +\"mairix\", then you can set this option to \"mairix\". + + *NOTE* + + The \"pick\" and \"grep\" commands do not perform a recursive search on + the given folder. + +This command uses an \"X-MHE-Checksum:\" header field to cache the MD5 +checksum of a message. This means that if an incoming message already contains +an \"X-MHE-Checksum:\" field, that message might not be found by this command. +The following \"procmail\" recipe avoids this problem by renaming the existing +header field: + + :0 wf + | formail -R \"X-MHE-Checksum\" \"X-Old-MHE-Checksum\" + +The documentation for the following commands describe how to set up the +various indexing programs to use with MH-E. The \"pick\" and \"grep\" commands +do not require additional configuration. - `mh-swish++-execute-search' - `mh-swish-execute-search' - `mh-mairix-execute-search' - `mh-namazu-execute-search' - -If none of these programs are present then we use pick. If desired grep can be -used instead. Details about these methods can be found in: - - `mh-pick-execute-search' - `mh-grep-execute-search' -This and related functions use an X-MHE-Checksum header to cache the MD5 -checksum of a message. This means that already present X-MHE-Checksum headers -in the incoming email could result in messages not being found. The following -procmail recipe should avoid this: - - :0 wf - | formail -R \"X-MHE-Checksum\" \"Old-X-MHE-Checksum\" - -This has the effect of renaming already present X-MHE-Checksum headers." t nil) +In a program, if REDO-SEARCH-FLAG is non-nil and the current folder buffer was +generated by a index search, then the search is repeated. Otherwise, FOLDER is +searched with SEARCH-REGEXP and the results are presented in an MH-E folder. +If FOLDER is \"+\" then mail in all folders are searched. Optional argument +WINDOW-CONFIG stores the window configuration that will be restored after the +user quits the folder containing the index search results." t nil) (autoload (quote mh-index-read-data) "mh-index" "\ Read index data from file." nil nil) @@ -463,114 +499,109 @@ space-separated list of FOLDERS, or nothing to search all folders." t nil) (autoload (quote mh-swish-execute-search) "mh-index" "\ Execute swish-e and read the results. -In the examples below, replace /home/user/Mail with the path to your MH -directory. +In the examples below, replace \"/home/user/Mail\" with the path to your +MH directory. -First create the directory /home/user/Mail/.swish. Then create the file -/home/user/Mail/.swish/config with the following contents: +First create the directory \"/home/user/Mail/.swish\". Then create the file +\"/home/user/Mail/.swish/config\" with the following contents: - IndexDir /home/user/Mail - IndexFile /home/user/Mail/.swish/index - IndexName \"Mail Index\" - IndexDescription \"Mail Index\" - IndexPointer \"http://nowhere\" - IndexAdmin \"nobody\" - #MetaNames automatic - IndexReport 3 - FollowSymLinks no - UseStemming no - IgnoreTotalWordCountWhenRanking yes - WordCharacters abcdefghijklmnopqrstuvwxyz0123456789- - BeginCharacters abcdefghijklmnopqrstuvwxyz - EndCharacters abcdefghijklmnopqrstuvwxyz0123456789 - IgnoreLimit 50 1000 - IndexComments 0 - FileRules pathname contains /home/user/Mail/.swish - FileRules pathname contains /home/user/Mail/mhe-index - FileRules filename is index - FileRules filename is \\..* - FileRules filename is #.* - FileRules filename is ,.* - FileRules filename is .*~ + DefaultContents TXT* + IndexDir /home/user/Mail + IndexFile /home/user/Mail/.swish/index + IndexName \"Mail Index\" + IndexDescription \"Mail Index\" + IndexPointer \"http://nowhere\" + IndexAdmin \"nobody\" + #MetaNames automatic + IndexReport 3 + FollowSymLinks no + UseStemming no + IgnoreTotalWordCountWhenRanking yes + WordCharacters abcdefghijklmnopqrstuvwxyz0123456789- + BeginCharacters abcdefghijklmnopqrstuvwxyz + EndCharacters abcdefghijklmnopqrstuvwxyz0123456789 + IgnoreLimit 50 1000 + IndexComments 0 + FileRules filename contains \\D + FileRules pathname contains /home/user/Mail/.swish + FileRules pathname contains /home/user/Mail/mhe-index + +This configuration does not index the folders that hold the results of your +searches in \"+mhe-index\" since they tend to be ephemeral and the original +messages are indexed anyway. If there are any directories you would like to ignore, append lines like the -following to config: +following to \"config\": - FileRules pathname contains /home/user/Mail/scripts + FileRules pathname contains /home/user/Mail/scripts -You do not want to index the folders that hold the results of your searches -since they tend to be ephemeral and the original messages are indexed anyway. -The configuration file above assumes that the results are found in sub-folders -of `mh-index-folder' which is +mhe-index by default. +Use the following command line to generate the swish index. Run this daily +from cron: -Use the following command line to generate the swish index. Run this -daily from cron: + swish-e -c /home/user/Mail/.swish/config - swish-e -c /home/user/Mail/.swish/config - -FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." nil nil) +In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to +search." nil nil) (autoload (quote mh-swish++-execute-search) "mh-index" "\ Execute swish++ and read the results. -In the examples below, replace /home/user/Mail with the path to your MH +In the examples below, replace \"/home/user/Mail\" with the path to your MH directory. -First create the directory /home/user/Mail/.swish++. Then create the file -/home/user/Mail/.swish++/swish++.conf with the following contents: +First create the directory \"/home/user/Mail/.swish++\". Then create the file +\"/home/user/Mail/.swish++/swish++.conf\" with the following contents: - IncludeMeta Bcc Cc Comments Content-Description From Keywords - IncludeMeta Newsgroups Resent-To Subject To - IncludeMeta Message-Id References In-Reply-To - IncludeFile Mail * - IndexFile /home/user/Mail/.swish++/swish++.index + IncludeMeta Bcc Cc Comments Content-Description From Keywords + IncludeMeta Newsgroups Resent-To Subject To + IncludeMeta Message-Id References In-Reply-To + IncludeFile Mail * + IndexFile /home/user/Mail/.swish++/swish++.index -Use the following command line to generate the swish index. Run this -daily from cron: +Use the following command line to generate the swish index. Run this daily +from cron: - find /home/user/Mail -path /home/user/Mail/mhe-index -prune \\ - -o -path /home/user/Mail/.swish++ -prune \\ - -o -name \"[0-9]*\" -print \\ - | index -c /home/user/Mail/.swish++/swish++.conf /home/user/Mail + find /home/user/Mail -path /home/user/Mail/mhe-index -prune \\ + -o -path /home/user/Mail/.swish++ -prune \\ + -o -name \"[0-9]*\" -print \\ + | index -c /home/user/Mail/.swish++/swish++.conf - -You do not want to index the folders that hold the results of your searches -since they tend to be ephemeral and the original messages are indexed anyway. -The command above assumes that the results are found in sub-folders of -`mh-index-folder' which is +mhe-index by default. +This command does not index the folders that hold the results of your searches +in \"+mhe-index\" since they tend to be ephemeral and the original messages +are indexed anyway. -On some systems (Debian GNU/Linux, for example), use index++ instead of index. +On some systems (Debian GNU/Linux, for example), use \"index++\" instead of +\"index\". -FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." nil nil) +In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to +search." nil nil) (autoload (quote mh-namazu-execute-search) "mh-index" "\ Execute namazu and read the results. -In the examples below, replace /home/user/Mail with the path to your MH +In the examples below, replace \"/home/user/Mail\" with the path to your MH directory. -First create the directory /home/user/Mail/.namazu. Then create the file -/home/user/Mail/.namazu/mknmzrc with the following contents: +First create the directory \"/home/user/Mail/.namazu\". Then create the file +\"/home/user/Mail/.namazu/mknmzrc\" with the following contents: - package conf; # Don't remove this line! - $ADDRESS = 'user@localhost'; - $ALLOW_FILE = \"[0-9]*\"; - $EXCLUDE_PATH = \"^/home/user/Mail/(mhe-index|spam)\"; + package conf; # Don't remove this line! + $ADDRESS = 'user@localhost'; + $ALLOW_FILE = \"[0-9]*\"; + $EXCLUDE_PATH = \"^/home/user/Mail/(mhe-index|spam)\"; -In the above example configuration, none of the mail files contained in the -directories /home/user/Mail/mhe-index and /home/user/Mail/spam are indexed. +This configuration does not index the folders that hold the results of your +searches in \"+mhe-index\" since they tend to be ephemeral and the original +messages are indexed anyway. -You do not want to index the folders that hold the results of your searches -since they tend to be ephemeral and the original messages are indexed anyway. -The configuration file above assumes that the results are found in sub-folders -of `mh-index-folder' which is +mhe-index by default. +Use the following command line to generate the namazu index. Run this daily +from cron: -Use the following command line to generate the namazu index. Run this -daily from cron: + mknmz -f /home/user/Mail/.namazu/mknmzrc -O /home/user/Mail/.namazu \\ + /home/user/Mail - mknmz -f /home/user/Mail/.namazu/mknmzrc -O /home/user/Mail/.namazu \\ - /home/user/Mail - -FOLDER-PATH is the directory in which SEARCH-REGEXP is used to search." nil nil) +In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to +search." nil nil) (autoload (quote mh-index-choose) "mh-index" "\ Choose an indexing function. @@ -582,7 +613,7 @@ system." nil nil) ;;;*** ;;;### (autoloads (mh-variants mh-variant-p mh-variant-set) "mh-init" -;;;;;; "mh-init.el" (16684 6777)) +;;;;;; "mh-init.el" (17044 64253)) ;;; Generated autoloads from mh-init.el (autoload (quote mh-variant-set) "mh-init" "\ @@ -604,7 +635,7 @@ by the variable `mh-variants'." nil nil) ;;;*** ;;;### (autoloads (mh-junk-whitelist mh-junk-blacklist) "mh-junk" -;;;;;; "mh-junk.el" (16671 48929)) +;;;;;; "mh-junk.el" (17044 64253)) ;;; Generated autoloads from mh-junk.el (autoload (quote mh-junk-blacklist) "mh-junk" "\ @@ -644,7 +675,7 @@ The `mh-junk-program' option specifies the spam program in use." t nil) ;;;;;; mh-mhn-compose-external-compressed-tar mh-mhn-compose-anon-ftp ;;;;;; mh-mhn-compose-insertion mh-file-mime-type mh-have-file-command ;;;;;; mh-compose-forward mh-compose-insertion) "mh-mime" "mh-mime.el" -;;;;;; (16684 7323)) +;;;;;; (17048 47895)) ;;; Generated autoloads from mh-mime.el (autoload (quote mh-compose-insertion) "mh-mime" "\ @@ -857,15 +888,79 @@ View MIME PART-INDEX externally." t nil) ;;;*** ;;;### (autoloads (mh-do-search mh-pick-do-search mh-search-folder) -;;;;;; "mh-pick" "mh-pick.el" (16671 49140)) +;;;;;; "mh-pick" "mh-pick.el" (17048 47905)) ;;; Generated autoloads from mh-pick.el (autoload (quote mh-search-folder) "mh-pick" "\ Search FOLDER for messages matching a pattern. -This function uses the MH command `pick' to do the work. -Add the messages found to the sequence named `search'. -Argument WINDOW-CONFIG is the current window configuration and is used when -the search folder is dismissed." t nil) + +With this command, you can search a folder for messages to or from a +particular person or about a particular subject. In fact, you can also search +for messages containing selected strings in any arbitrary header field or any +string found within the messages. + +You are first prompted for the name of the folder to search and then placed in +the following buffer in MH-Pick mode: + + From: + To: + Cc: + Date: + Subject: + -------- + +Edit this template by entering your search criteria in an appropriate header +field that is already there, or create a new field yourself. If the string +you're looking for could be anywhere in a message, then place the string +underneath the row of dashes. The \\[mh-search-folder] command uses the MH +command \"pick\" to do the real work. + +There are no semantics associated with the search criteria--they are simply +treated as strings. Case is ignored when all lowercase is used, and regular +expressions (a la \"ed\") are available. It is all right to specify several +search criteria. What happens then is that a logical _and_ of the various +fields is performed. If you prefer a logical _or_ operation, run +\\[mh-search-folder] multiple times. + +As an example, let's say that we want to find messages from Ginnean about +horseback riding in the Kosciusko National Park (Australia) during January, +1994. Normally we would start with a broad search and narrow it down if +necessary to produce a manageable amount of data, but we'll cut to the chase +and create a fairly restrictive set of criteria as follows: + + From: ginnean + To: + Cc: + Date: Jan 1994 + Subject: horse.*kosciusko + -------- + +As with MH-Letter mode, MH-Pick provides commands like +\\\\[mh-to-field] to help you fill in the blanks. + +To perform the search, type \\[mh-do-search]. The selected messages are placed +in the \"search\" sequence, which you can use later in forwarding, printing, +or narrowing your field of view. Subsequent searches are appended to the +\"search\" sequence. If, however, you wish to start with a clean slate, first +delete the \"search\" sequence. + +If you're searching in a folder that is already displayed in an MH-Folder +buffer, only those messages contained in the buffer are used for the search. +Therefore, if you want to search in all messages, first kill the folder's +buffer with \\\\[kill-buffer] or scan the entire folder +with \\[mh-rescan-folder]. + +If you find that you do the same thing over and over when editing the search +template, you may wish to bind some shortcuts to keys. This can be done with +the variable `mh-pick-mode-hook', which is called when \\[mh-search-folder] is +run on a new pattern. + +If you have run the \\[mh-index-search] command, but change your mind while +entering the search criteria and actually want to run a regular search, then +you can use the \\\\[mh-pick-do-search] command. + +In a program, argument WINDOW-CONFIG is the current window configuration and +is used when the search folder is dismissed." t nil) (autoload (quote mh-pick-do-search) "mh-pick" "\ Find messages that match the qualifications in the current pattern buffer. @@ -882,7 +977,7 @@ indexing program specified in `mh-index-program' is used." t nil) ;;;### (autoloads (mh-print-msg mh-ps-print-toggle-mime mh-ps-print-toggle-color ;;;;;; mh-ps-print-toggle-faces mh-ps-print-msg-show mh-ps-print-msg-file -;;;;;; mh-ps-print-msg) "mh-print" "mh-print.el" (16680 11171)) +;;;;;; mh-ps-print-msg) "mh-print" "mh-print.el" (17044 64253)) ;;; Generated autoloads from mh-print.el (autoload (quote mh-ps-print-msg) "mh-print" "\ @@ -935,7 +1030,7 @@ The messages are formatted by mhl. See the variable `mhl-formfile'." t nil) ;;;;;; mh-rename-seq mh-translate-range mh-read-range mh-read-seq-default ;;;;;; mh-notate-deleted-and-refiled mh-widen mh-put-msg-in-seq ;;;;;; mh-narrow-to-seq mh-msg-is-in-seq mh-list-sequences mh-delete-seq) -;;;;;; "mh-seq" "mh-seq.el" (16671 65286)) +;;;;;; "mh-seq" "mh-seq.el" (17048 47921)) ;;; Generated autoloads from mh-seq.el (autoload (quote mh-delete-seq) "mh-seq" "\ @@ -1157,7 +1252,7 @@ Use \\\\[mh-widen] to undo this command." t nil) ;;;### (autoloads (mh-speed-add-folder mh-speed-invalidate-map mh-speed-flists ;;;;;; mh-speed-view mh-speed-toggle mh-folder-speedbar-buttons) -;;;;;; "mh-speed" "mh-speed.el" (16665 53793)) +;;;;;; "mh-speed" "mh-speed.el" (17044 64253)) ;;; Generated autoloads from mh-speed.el (autoload (quote mh-folder-speedbar-buttons) "mh-speed" "\ @@ -1196,7 +1291,7 @@ The function invalidates the latest ancestor that is present." nil nil) ;;;;;; mh-alias-grab-from-field mh-alias-add-alias mh-alias-for-from-p ;;;;;; mh-alias-address-to-alias mh-alias-letter-expand-alias mh-alias-minibuffer-confirm-address ;;;;;; mh-read-address mh-alias-reload-maybe mh-alias-reload) "mh-alias" -;;;;;; "mh-alias.el" (16671 49382)) +;;;;;; "mh-alias.el" (17048 47789)) ;;; Generated autoloads from mh-alias.el (autoload (quote mh-alias-reload) "mh-alias" "\ diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el index d286069ba4b..dcd8f67a0f3 100644 --- a/lisp/mh-e/mh-mime.el +++ b/lisp/mh-e/mh-mime.el @@ -1,6 +1,7 @@ ;;; mh-mime.el --- MH-E support for composing MIME messages -;; Copyright (C) 1993, 1995, 2005 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1995, +;; 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ;; Author: Bill Wohler ;; Maintainer: Bill Wohler @@ -1325,6 +1326,18 @@ Parameter EL is unused." (point-max))) (forward-line -1))))) +(defun mh-mime-security-button-face (info) + "Return the button face to use for encrypted/signed mail based on INFO." + (cond ((string-match "OK" info) ;Decrypted mail + mh-show-pgg-good-face) + ((string-match "Failed" info) ;Decryption failed or signature invalid + mh-show-pgg-bad-face) + ((string-match "Undecided" info);Unprocessed mail + mh-show-pgg-unknown-face) + ((string-match "Untrusted" info);Key not trusted + mh-show-pgg-unknown-face) + (t mh-show-pgg-good-face))) + (defun mh-mime-security-press-button (handle) "Callback from security button for part HANDLE." (if (mm-handle-multipart-ctl-parameter handle 'gnus-info) @@ -1364,9 +1377,10 @@ Parameter EL is unused." (info (or (mm-handle-multipart-ctl-parameter handle 'gnus-info) "Undecided")) (details (mm-handle-multipart-ctl-parameter handle 'gnus-details)) - pressed-details begin end) + pressed-details begin end face) (setq details (if details (concat "\n" details) "")) (setq pressed-details (if mh-mime-security-button-pressed details "")) + (setq face (mh-mime-security-button-face info)) (unless (bolp) (insert "\n")) (setq begin (point)) (gnus-eval-format @@ -1382,6 +1396,7 @@ Parameter EL is unused." :mime-handle handle :action 'mh-widget-press-button :button-keymap mh-mime-security-button-map + :button-face face :help-echo "Mouse-2 click or press RET (in show buffer) to see security details.") (dolist (ov (mh-funcall-if-exists overlays-in begin end)) (mh-funcall-if-exists overlay-put ov 'evaporate t)) diff --git a/lisp/mh-e/mh-pick.el b/lisp/mh-e/mh-pick.el index f15bef7ec4d..5c31fb167cb 100644 --- a/lisp/mh-e/mh-pick.el +++ b/lisp/mh-e/mh-pick.el @@ -1,6 +1,7 @@ ;;; mh-pick.el --- make a search pattern and search for a message in MH-E -;; Copyright (C) 1993, 1995, 2005 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1995, +;; 2001, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Bill Wohler ;; Maintainer: Bill Wohler @@ -52,10 +53,74 @@ ;;;###mh-autoload (defun mh-search-folder (folder window-config) "Search FOLDER for messages matching a pattern. -This function uses the MH command `pick' to do the work. -Add the messages found to the sequence named `search'. -Argument WINDOW-CONFIG is the current window configuration and is used when -the search folder is dismissed." + +With this command, you can search a folder for messages to or from a +particular person or about a particular subject. In fact, you can also search +for messages containing selected strings in any arbitrary header field or any +string found within the messages. + +You are first prompted for the name of the folder to search and then placed in +the following buffer in MH-Pick mode: + + From: + To: + Cc: + Date: + Subject: + -------- + +Edit this template by entering your search criteria in an appropriate header +field that is already there, or create a new field yourself. If the string +you're looking for could be anywhere in a message, then place the string +underneath the row of dashes. The \\[mh-search-folder] command uses the MH +command \"pick\" to do the real work. + +There are no semantics associated with the search criteria--they are simply +treated as strings. Case is ignored when all lowercase is used, and regular +expressions (a la \"ed\") are available. It is all right to specify several +search criteria. What happens then is that a logical _and_ of the various +fields is performed. If you prefer a logical _or_ operation, run +\\[mh-search-folder] multiple times. + +As an example, let's say that we want to find messages from Ginnean about +horseback riding in the Kosciusko National Park (Australia) during January, +1994. Normally we would start with a broad search and narrow it down if +necessary to produce a manageable amount of data, but we'll cut to the chase +and create a fairly restrictive set of criteria as follows: + + From: ginnean + To: + Cc: + Date: Jan 1994 + Subject: horse.*kosciusko + -------- + +As with MH-Letter mode, MH-Pick provides commands like +\\\\[mh-to-field] to help you fill in the blanks. + +To perform the search, type \\[mh-do-search]. The selected messages are placed +in the \"search\" sequence, which you can use later in forwarding, printing, +or narrowing your field of view. Subsequent searches are appended to the +\"search\" sequence. If, however, you wish to start with a clean slate, first +delete the \"search\" sequence. + +If you're searching in a folder that is already displayed in an MH-Folder +buffer, only those messages contained in the buffer are used for the search. +Therefore, if you want to search in all messages, first kill the folder's +buffer with \\\\[kill-buffer] or scan the entire folder +with \\[mh-rescan-folder]. + +If you find that you do the same thing over and over when editing the search +template, you may wish to bind some shortcuts to keys. This can be done with +the variable `mh-pick-mode-hook', which is called when \\[mh-search-folder] is +run on a new pattern. + +If you have run the \\[mh-index-search] command, but change your mind while +entering the search criteria and actually want to run a regular search, then +you can use the \\\\[mh-pick-do-search] command. + +In a program, argument WINDOW-CONFIG is the current window configuration and +is used when the search folder is dismissed." (interactive (list (mh-prompt-for-folder "Search" mh-current-folder nil nil t) (current-window-configuration))) (let ((pick-folder (if (equal folder "+") mh-current-folder folder))) diff --git a/lisp/mh-e/mh-print.el b/lisp/mh-e/mh-print.el index 9a7df0b8fd4..7539e455919 100644 --- a/lisp/mh-e/mh-print.el +++ b/lisp/mh-e/mh-print.el @@ -1,6 +1,6 @@ ;;; mh-print.el --- MH-E printing support -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2004 Free Software Foundation, Inc. ;; Author: Jeffrey C Honig ;; Maintainer: Bill Wohler diff --git a/lisp/mh-e/mh-seq.el b/lisp/mh-e/mh-seq.el index d09e9805682..e618e6f41b3 100644 --- a/lisp/mh-e/mh-seq.el +++ b/lisp/mh-e/mh-seq.el @@ -1,6 +1,7 @@ ;;; mh-seq.el --- MH-E sequences support -;; Copyright (C) 1993, 1995, 2005 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1995, +;; 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Bill Wohler ;; Maintainer: Bill Wohler @@ -195,7 +196,7 @@ redone to get the new thread tree. This makes incremental threading easier.") (insert "\n")) (setq seq-list (cdr seq-list))) (goto-char (point-min)) - (view-mode 1) + (view-mode-enter) (setq view-exit-action 'kill-buffer) (message "Listing sequences...done"))))) @@ -788,10 +789,33 @@ This function can only be used the folder is threaded." If no prefix arg is given, then return DEFAULT." (let ((default-string (loop for x in default concat (format " %s" x)))) (if (or current-prefix-arg (equal default-string "")) - (delete "" (split-string (read-string "Pick expression: " - default-string))) + (mh-pick-args-list (read-string "Pick expression: " + default-string)) default))) +(defun mh-pick-args-list (s) + "Form list by grouping elements in string S suitable for pick arguments. +For example, the string \"-subject a b c -from Joe User \" +is converted to (\"-subject\" \"a b c\" \"-from\" +\"Joe User \"" + (let ((full-list (split-string s)) + current-arg collection arg-list) + (while full-list + (setq current-arg (car full-list)) + (if (null (string-match "^-" current-arg)) + (setq collection + (if (null collection) + current-arg + (format "%s %s" collection current-arg))) + (when collection + (setq arg-list (append arg-list (list collection))) + (setq collection nil)) + (setq arg-list (append arg-list (list current-arg)))) + (setq full-list (cdr full-list))) + (when collection + (setq arg-list (append arg-list (list collection)))) + arg-list)) + ;;;###mh-autoload (defun mh-narrow-to-subject (&optional pick-expr) "Limit to messages with same subject. @@ -1315,6 +1339,7 @@ All messages after START-POINT are added to the thread tree." (old-buffer-modified-flag (buffer-modified-p))) (delete-region (point-min) (point-max)) (mh-thread-print-scan-lines thread-tree) + (mh-notate-user-sequences) (mh-notate-deleted-and-refiled) (mh-notate-cur) (set-buffer-modified-p old-buffer-modified-flag)))) diff --git a/lisp/mh-e/mh-speed.el b/lisp/mh-e/mh-speed.el index a20e6e0a410..2617a941de1 100644 --- a/lisp/mh-e/mh-speed.el +++ b/lisp/mh-e/mh-speed.el @@ -1,6 +1,6 @@ ;;; mh-speed.el --- Speedbar interface for MH-E. -;; Copyright (C) 2005 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. ;; Author: Satyaki Das ;; Maintainer: Bill Wohler diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el index 16ae64b1549..d371087cc6d 100644 --- a/lisp/mh-e/mh-utils.el +++ b/lisp/mh-e/mh-utils.el @@ -1,6 +1,7 @@ ;;; mh-utils.el --- MH-E code needed for both sending and reading -;; Copyright (C) 1993, 95, 1997, 2000, 01, 2005 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1995, 1997, +;; 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ;; Author: Bill Wohler ;; Maintainer: Bill Wohler @@ -703,8 +704,8 @@ not pointing to a message." (save-excursion (beginning-of-line) (cond ((looking-at mh-scan-msg-number-regexp) - (string-to-int (buffer-substring (match-beginning 1) - (match-end 1)))) + (string-to-number (buffer-substring (match-beginning 1) + (match-end 1)))) (error-if-no-message (error "Cursor not pointing to message")) (t nil)))) @@ -1672,7 +1673,8 @@ The message is displayed in raw form." "Decode >From at beginning of lines for `mh-show-mode'." (save-excursion (let ((modified (buffer-modified-p)) - (case-fold-search nil)) + (case-fold-search nil) + (buffer-read-only nil)) (goto-char (mh-mail-header-end)) (while (re-search-forward "^>From" nil t) (replace-match "From")) From 36f28e7f14f8fc3bece59fab31f1b4d8c0d35c1a Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 29 May 2005 02:58:17 +0000 Subject: [PATCH 125/294] *** empty log message *** --- etc/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/etc/ChangeLog b/etc/ChangeLog index 15d6f3649c0..c5842407805 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2005-05-28 Richard M. Stallman + + * TUTORIAL.fr: Change NBSP to space. + 2005-05-28 Bill Wohler * NEWS, MH-E-NEWS: Upgraded to MH-E version 7.84. From adde76933c7fd17301782f3dbe8e74e473148ea8 Mon Sep 17 00:00:00 2001 From: Daniel Pfeiffer Date: Sun, 29 May 2005 07:54:07 +0000 Subject: [PATCH 126/294] (makefile-rule-action-regex, makefile-macroassign-regex): Continuation lines may be empty. Reported by Joshua Varner. (makefile-makepp-font-lock-keywords): Add $(stem). --- lisp/ChangeLog | 7 +++++++ lisp/progmodes/make-mode.el | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 839f7783404..8d688e59af9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2005-05-29 Daniel Pfeiffer + + * progmodes/make-mode.el (makefile-rule-action-regex) + (makefile-macroassign-regex): Continuation lines may be empty. + Reported by Joshua Varner. + (makefile-makepp-font-lock-keywords): Add $(stem). + 2005-05-28 Karl Berry * textmodes/tex-mode.el: now that tex-send-command calls diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el index 05c3ac50787..a8090657b2a 100644 --- a/lisp/progmodes/make-mode.el +++ b/lisp/progmodes/make-mode.el @@ -266,14 +266,14 @@ not be enclosed in { } or ( )." "Characters to skip to find a line that might be a dependency.") (defvar makefile-rule-action-regex - "^\t[ \t]*\\([-@]*\\)[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)" + "^\t[ \t]*\\([-@]*\\)[ \t]*\\(\\(?:.*\\\\\n\\)*.*\\)" "Regex used to highlight rule action lines in font lock mode.") ;; Note that the first and second subexpression is used by font lock. Note ;; that if you change this regexp you might have to fix the imenu index in ;; makefile-imenu-generic-expression. (defconst makefile-macroassign-regex - "^ *\\([^ \n\t][^:#= \t\n]*\\)[ \t]*\\(?:!=[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)\\|[*:+]?[:?]?=[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)\\)" + "^ *\\([^ \n\t][^:#= \t\n]*\\)[ \t]*\\(?:!=[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)\\|[*:+]?[:?]?=[ \t]*\\(\\(?:.*\\\\\n\\)*.*\\)\\)" "Regex used to find macro assignment lines in a makefile.") (defconst makefile-var-use-regex @@ -420,7 +420,7 @@ not be enclosed in { } or ( )." nil "^\\(?: [ \t]*\\)?\\(?:and[ \t]+\\|else[ \t]+\\|or[ \t]+\\)?if\\(n\\)\\(?:def\\|eq\\|sys\\)\\>" - '("[^$]\\(\\$[({]\\(?:target\\|output\\)s?\\_>.*?[})]\\)" + '("[^$]\\(\\$[({]\\(?:output\\|stem\\|target\\)s?\\_>.*?[})]\\)" 1 'makefile-targets-face prepend) ;; Colon modifier keywords. From d85d15c8ee97f2159bcd0eb2cfa35bbe61a290ad Mon Sep 17 00:00:00 2001 From: Daniel Pfeiffer Date: Sun, 29 May 2005 08:01:17 +0000 Subject: [PATCH 127/294] (makefile-makepp-mode, makefile-bsdmake-mode): Continuation lines may be empty. --- lisp/ChangeLog | 3 ++- lisp/progmodes/make-mode.el | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8d688e59af9..1fcdcde0a97 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,7 +1,8 @@ 2005-05-29 Daniel Pfeiffer * progmodes/make-mode.el (makefile-rule-action-regex) - (makefile-macroassign-regex): Continuation lines may be empty. + (makefile-macroassign-regex, makefile-makepp-mode) + (makefile-bsdmake-mode): Continuation lines may be empty. Reported by Joshua Varner. (makefile-makepp-font-lock-keywords): Add $(stem). diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el index a8090657b2a..055cdf7fc7d 100644 --- a/lisp/progmodes/make-mode.el +++ b/lisp/progmodes/make-mode.el @@ -851,7 +851,7 @@ Makefile mode can be configured by modifying the following variables: "An adapted `makefile-mode' that knows about makepp." (set (make-local-variable 'makefile-rule-action-regex) ;; Don't care about initial tab, but I don't know how to font-lock correctly without. - "^\t[ \t]*\\(\\(?:\\(?:noecho\\|ignore[-_]error\\|[-@]+\\)[ \t]*\\)*\\)\\(\\(&\\S +\\)?\\(?:.+\\\\\n\\)*.+\\)") + "^\t[ \t]*\\(\\(?:\\(?:noecho\\|ignore[-_]error\\|[-@]+\\)[ \t]*\\)*\\)\\(\\(&\\S +\\)?\\(?:.*\\\\\n\\)*.*\\)") (setq font-lock-defaults `(makefile-makepp-font-lock-keywords ,@(cdr font-lock-defaults)) @@ -867,7 +867,7 @@ Makefile mode can be configured by modifying the following variables: "^ *\\(\\(?: *\\$\\(?:[({]\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[^({]\\|.[^\n$#})]+?[})]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\| *[^ \n$#:=]+\\)+?\\)[ \t]*\\([:!]\\)\\(?:[ \t]*$\\|[^=\n]\\(?:[^#\n]*?;[ \t]*\\(.+\\)\\)?\\)") (set (make-local-variable 'makefile-dependency-skip) "^:!") (set (make-local-variable 'makefile-rule-action-regex) - "^\t[ \t]*\\([-+@]*\\)[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)") + "^\t[ \t]*\\([-+@]*\\)[ \t]*\\(\\(?:.*\\\\\n\\)*.*\\)") (setq font-lock-defaults `(makefile-bsdmake-font-lock-keywords ,@(cdr font-lock-defaults)))) From bebcc4b15f19eece27de86b553ffc29f2953a48e Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 29 May 2005 08:24:41 +0000 Subject: [PATCH 128/294] (Window Frame Parameters): Document user-size. Shorten entry for top by referring to left. --- lispref/ChangeLog | 10 ++++++++++ lispref/frames.texi | 21 +++++++-------------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 25909586102..2aefb23ac16 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,13 @@ +2005-05-29 Richard M. Stallman + + * frames.texi (Window Frame Parameters): Document user-size. + Shorten entry for top by referring to left. + +2005-05-26 Richard M. Stallman + + * modes.texi (Mode Hooks): Explain that after-change-major-mode-hook + is new, and what the implications are. Other clarifications. + 2005-05-24 Richard M. Stallman * frames.texi (Dialog Boxes): Minor fixes. diff --git a/lispref/frames.texi b/lispref/frames.texi index 77694c87130..ffcc16f6289 100644 --- a/lispref/frames.texi +++ b/lispref/frames.texi @@ -362,20 +362,8 @@ non-@code{nil} value for the @code{user-position} parameter as well. @item top The screen position of the top edge, in pixels, with respect to the -top edge of the screen. The value may be a positive number @var{pos}, -or a list of the form @code{(+ @var{pos})} which permits specifying a -negative @var{pos} value. - -A negative number @minus{}@var{pos}, or a list of the form @code{(- -@var{pos})}, actually specifies the position of the bottom edge of the -window with respect to the bottom edge of the screen. A positive value -of @var{pos} counts toward the top. @strong{Reminder:} if the -parameter is a negative integer @minus{}@var{pos}, then @var{pos} is -positive. - -Some window managers ignore program-specified positions. If you want to -be sure the position you specify is not ignored, specify a -non-@code{nil} value for the @code{user-position} parameter as well. +top edge of the screen. It works just like @code{left}, except vertically +instead of horizontally. @item icon-left The screen position of the left edge @emph{of the frame's icon}, in @@ -418,6 +406,11 @@ pixels, call @code{frame-pixel-height}; see @ref{Size and Position}.) The width of the frame contents, in characters. (To get the height in pixels, call @code{frame-pixel-width}; see @ref{Size and Position}.) +@item user-size +This does for the size parameters @code{height} and @code{width} what +the @code{user-position} parameter (see above) does for the position +parameters @code{top} and @code{left}. + @item fullscreen Specify that width, height or both shall be set to the size of the screen. The value @code{fullwidth} specifies that width shall be the size of the From 0e4d0c9af9b226de5f17dccd52840c1e8050fa14 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 29 May 2005 08:25:17 +0000 Subject: [PATCH 129/294] (Fbuffer_local_value): Call indirect_variable. --- src/buffer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/buffer.c b/src/buffer.c index dfcf4a9a0b9..a287e45df78 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -889,6 +889,9 @@ is the default binding of the variable. */) CHECK_BUFFER (buffer); buf = XBUFFER (buffer); + if (SYMBOLP (variable)) + variable = indirect_variable (variable); + /* Look in local_var_list */ result = Fassoc (variable, buf->local_var_alist); if (NILP (result)) From a1a886a1d5aec8087a0f9c688a3502506c831d14 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 29 May 2005 08:27:37 +0000 Subject: [PATCH 130/294] (Locating Files): Clean up the text. --- lispref/files.texi | 45 ++++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/lispref/files.texi b/lispref/files.texi index 25c4dfeb0d0..766220aa882 100644 --- a/lispref/files.texi +++ b/lispref/files.texi @@ -1261,36 +1261,36 @@ is on file system number -32252. @cindex locate files @cindex find files - Sometimes, you need to find a file that could reside in one of the -standard directories. One example is when you need to look for a -program's executable file, e.g., to find out whether a given program -is installed on the user's system. Another example is the search for + This section explains how to search for a file in a list of +directories. One example is when you need to look for a program's +executable file, e.g., to find out whether a given program is +installed on the user's system. Another example is the search for Lisp libraries (@pxref{Library Search}). Such searches generally need -to try several alternative file name extensions, in addition to -looking in every standard directory where the file could be found. -Emacs provides a function for such a generalized search for a file. +to try various possible file name extensions, in addition to various +possible directories. Emacs provides a function for such a +generalized search for a file. @defun locate-file filename path &optional suffixes predicate -This function searches for the file whose name is @var{filename} in -a list of directories given by @var{path}. If it finds the file, it -returns its full @dfn{absolute file name} (@pxref{Relative File -Names}); if the file is not found, the function returns @code{nil}. +This function searches for a file whose name is @var{filename} in a +list of directories given by @var{path}, trying the suffixes in +@var{suffixes}. If it finds such a file, it returns the full +@dfn{absolute file name} of the file (@pxref{Relative File Names}); +otherwise it returns @code{nil}. The optional argument @var{suffixes} gives the list of file-name -suffixes to append to @var{filename} when searching. If -@var{suffixes} is @code{nil}, it's equivalent to passing a list with a -single element that is an empty string @code{""}. +suffixes to append to @var{filename} when searching. +@code{locate-file} tries each possible directory with each of these +suffixes. If @var{suffixes} is @code{nil}, or @code{("")}, then there +are no suffixes, and @var{filename} is used only as-is. Typical +values of @var{suffixes} are @code{exec-suffixes} (@pxref{Subprocess +Creation, exec-suffixes}) and @code{load-suffixes} (@pxref{Library +Search, load-suffixes}). -Typical values of @var{path} are @code{exec-path} (@pxref{Subprocess +Typical values for @var{path} are @code{exec-path} (@pxref{Subprocess Creation, exec-path}) when looking for executable programs or @code{load-path} (@pxref{Library Search, load-path}) when looking for -Lisp files. Use @code{("/")} to disable the path search (e.g., if -@var{filename} already includes the leading directories), but still -try the extensions in @var{suffixes}. - -Typical values of @var{suffixes} are @code{exec-suffixes} -(@pxref{Subprocess Creation, exec-suffixes}) and @code{load-suffixes} -(@pxref{Library Search, load-suffixes}). +Lisp files. If @var{filename} is absolute, @var{path} has no effect, +but the suffixes in @var{suffixes} are still tried. The optional argument @var{predicate}, if non-@code{nil}, specifies the predicate function to use for testing whether a candidate file is @@ -1316,7 +1316,6 @@ in @code{exec-path} and tries all the file-name extensions in @code{exec-suffixes}. @end defun - @node Changing Files @section Changing File Names and Attributes @cindex renaming files From 801f0dc37d6c930ff63ef9573bcea63a117facd9 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 29 May 2005 08:28:51 +0000 Subject: [PATCH 131/294] (Mode Hooks): Explain that after-change-major-mode-hook is new, and what that implies. Clarify. --- lispref/modes.texi | 52 ++++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/lispref/modes.texi b/lispref/modes.texi index 61bc878b581..488265b0b68 100644 --- a/lispref/modes.texi +++ b/lispref/modes.texi @@ -1117,7 +1117,7 @@ it runs the mode hook variable @code{@var{mode}-hook}. @node Mode Hooks @subsection Mode Hooks -The two last things a major mode function does is to run its mode + The two last things a major mode function should do is run its mode hook and finally the mode independent normal hook @code{after-change-major-mode-hook}. If the major mode is a derived mode, that is if it calls another major mode (the parent mode) in its @@ -1125,45 +1125,53 @@ body, then the parent's mode hook is run just before the derived mode's hook. Neither the parent's mode hook nor @code{after-change-major-mode-hook} are run at the end of the actual call to the parent mode. This applies recursively if the parent mode -has itself a parent. That is, the mode hooks of all major modes called -directly or indirectly by the major mode function are all run in -sequence at the end, just before @code{after-change-major-mode-hook}. +has itself a parent. That is, the mode hooks of all major modes +called directly or indirectly by the major mode function are all run +in sequence at the end, just before +@code{after-change-major-mode-hook}. -If you are customizing a major mode, rather than defining one, the -above is all you need to know about the hooks run at the end of a -major mode. This also applies if you use @code{define-derived-mode} -to define a major mode, because that macro will automatically -implement the above for you. + These conventions are new in Emacs 22, and some major modes +implemented by users do not follow them yet. So if you put a function +onto @code{after-change-major-mode-hook}, keep in mind that some modes +will fail to run it. If user complains about that, you can respond, +``That major mode fails to follow Emacs conventions, and that's why it +fails to work. Please fix the major mode.'' In most cases, that is +good enough, so go ahead and use @code{after-change-major-mode-hook}. +However, if a certain feature needs to be completely reliable, +it should not use @code{after-change-major-mode-hook} as of yet. -Programmers wishing to define a major mode without using -@code{define-derived-mode}, should make sure that their major mode -follows the above conventions. @xref{Major Mode Conventions}, for how -this should be accomplished. Below, we give some implementation -details. + When you defined a major mode using @code{define-derived-mode}, it +automatically makes sure these conventions are followed. If you +define a major mode ``from scratch'', not using +@code{define-derived-mode}, make sure the major mode command follows +these and other conventions. @xref{Major Mode Conventions}. You use +these functions to do it properly. @defun run-mode-hooks &rest hookvars Major modes should run their mode hook using this function. It is -similar to @code{run-hooks} (@pxref{Hooks}), but if run inside a -@code{delay-mode-hooks} form, this function does not run any hooks. -Instead, it arranges for @var{hookvars} to be run at a later call to -the function. Otherwise, @code{run-mode-hooks} runs any delayed hooks -in order, then @var{hookvars} and finally +similar to @code{run-hooks} (@pxref{Hooks}), but it also runs @code{after-change-major-mode-hook}. + +When the call to this function is dynamically inside a +@code{delay-mode-hooks} form, this function does not run any hooks. +Instead, it arranges for the next call to @code{run-mode-hooks} to run +@var{hookvars}. @end defun @defmac delay-mode-hooks body... This macro executes @var{body} like @code{progn}, but all calls to @code{run-mode-hooks} inside @var{body} delay running their hooks. They will be run by the first call to @code{run-mode-hooks} after exit -from @code{delay-mode-hooks}. +from @code{delay-mode-hooks}. This is the proper way for a major mode +command to invoke its parent mode. @end defmac @defvar after-change-major-mode-hook Every major mode function should run this normal hook at its very end. It normally does not need to do so explicitly. Indeed, a major mode function should normally run its mode hook with @code{run-mode-hooks} -as the very last thing it does and @code{run-mode-hooks} runs -@code{after-change-major-mode-hook} at its very end. +as the very last thing it does, and the last thing +@code{run-mode-hooks} does is run @code{after-change-major-mode-hook}. @end defvar @node Minor Modes From 7d2026d5184a6297ed6e6ea012a19a2bd482929c Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 29 May 2005 08:31:54 +0000 Subject: [PATCH 132/294] (which-func-update-1): Turn the mode off in case of error by setting which-func-mode. --- lisp/progmodes/which-func.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el index d329e234025..1fa37532ab0 100644 --- a/lisp/progmodes/which-func.el +++ b/lisp/progmodes/which-func.el @@ -196,7 +196,7 @@ It creates the Imenu index for the buffer, if necessary." (puthash window current which-func-table) (force-mode-line-update))) (error - (which-func-mode -1) + (setq which-func-mode nil) (error "Error in which-func-update: %s" info)))))) ;;;###autoload From 6d2957c46015fc0ad06448fc8b41195911ec5581 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 29 May 2005 08:32:57 +0000 Subject: [PATCH 133/294] (compilation-start): Set the mode before inserting the initial text. --- lisp/progmodes/compile.el | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index ad43228a100..0cb87a5b17a 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -935,12 +935,20 @@ Returns the compilation buffer created." (substitute-env-vars (match-string 1 command)) "~") default-directory)) + ;; Select the desired mode. + (if (not (eq mode t)) + (funcall mode) + (setq buffer-read-only nil) + (with-no-warnings (comint-mode)) + (compilation-shell-minor-mode)) + (if highlight-regexp + (set (make-local-variable 'compilation-highlight-regexp) + highlight-regexp)) (erase-buffer) - ;; output a mode setter, for saving and later reloading this buffer + ;; Output a mode setter, for saving and later reloading this buffer. (insert "-*- mode: " name-of-mode "; default-directory: " (prin1-to-string default-directory) - " -*-\n" command "\n") - (setq thisdir default-directory)) + " -*-\n" command "\n") (setq thisdir default-directory)) (set-buffer-modified-p nil)) ;; If we're already in the compilation buffer, go to the end ;; of the buffer, so point will track the compilation output. @@ -963,14 +971,6 @@ Returns the compilation buffer created." ;; don't override users' setting of $EMACS. (unless (getenv "EMACS") '("EMACS=t")) (copy-sequence process-environment)))) - (if (not (eq mode t)) - (funcall mode) - (setq buffer-read-only nil) - (with-no-warnings (comint-mode)) - (compilation-shell-minor-mode)) - (if highlight-regexp - (set (make-local-variable 'compilation-highlight-regexp) - highlight-regexp)) (set (make-local-variable 'compilation-arguments) (list command mode name-function highlight-regexp)) (set (make-local-variable 'revert-buffer-function) From c1b1a4f3ef3bbe140ad4db7568e82814f81e2e2e Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 29 May 2005 08:34:07 +0000 Subject: [PATCH 134/294] (gnus-cite-add-face): Set overlay's evaporate property. --- lisp/gnus/gnus-cite.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/gnus/gnus-cite.el b/lisp/gnus/gnus-cite.el index 6053b2ae502..090a365f994 100644 --- a/lisp/gnus/gnus-cite.el +++ b/lisp/gnus/gnus-cite.el @@ -1017,6 +1017,7 @@ See also the documentation for `gnus-article-highlight-citation'." (when (< from to) (push (setq overlay (gnus-make-overlay from to)) gnus-cite-overlay-list) + (gnus-overlay-put overlay 'evaporate t) (gnus-overlay-put overlay 'face face)))))) (defun gnus-cite-toggle (prefix) From 46065dd4a54fa1a056ab4c86f754d0f99aa9be4e Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 29 May 2005 08:34:46 +0000 Subject: [PATCH 135/294] (looking-back): New argument GREEDY. --- lisp/subr.el | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/lisp/subr.el b/lisp/subr.el index 63951b92bb2..45bcccbb6e5 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1996,14 +1996,34 @@ STRING should be given if the last search was by `string-match' on STRING." (buffer-substring-no-properties (match-beginning num) (match-end num))))) -(defun looking-back (regexp &optional limit) +(defun looking-back (regexp &optional limit greedy) "Return non-nil if text before point matches regular expression REGEXP. Like `looking-at' except matches before point, and is slower. LIMIT if non-nil speeds up the search by specifying how far back the -match can start." - (not (null - (save-excursion - (re-search-backward (concat "\\(?:" regexp "\\)\\=") limit t))))) +match can start. + +If GREEDY is non-nil, extend the match backwards as far as possible, +stopping when a single additional previous character cannot be part +of a match for REGEXP." + (let ((start (point)) + (pos + (save-excursion + (and (re-search-backward (concat "\\(?:" regexp "\\)\\=") limit t) + (point))))) + (if (and greedy pos) + (save-restriction + (narrow-to-region (point-min) start) + (while (and (> pos (point-min)) + (save-excursion + (goto-char pos) + (backward-char 1) + (looking-at (concat "\\(?:" regexp "\\)\\'")))) + (setq pos (1- pos))) + (save-excursion + (goto-char pos) + (looking-at (concat "\\(?:" regexp "\\)\\'"))))) + (not (null pos)))) + (defconst split-string-default-separators "[ \f\t\n\r\v]+" "The default value of separators for `split-string'. From cfde584f6d25db8c0ba229ebb85fba60e99eb1af Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 29 May 2005 08:36:26 +0000 Subject: [PATCH 136/294] (save-place-alist-to-file): Write the file using write-region. --- lisp/saveplace.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/saveplace.el b/lisp/saveplace.el index 9dc7b858e37..34c88a89948 100644 --- a/lisp/saveplace.el +++ b/lisp/saveplace.el @@ -222,7 +222,8 @@ may have changed\) back to `save-place-alist'." (t t)))) (condition-case nil - (write-file file) + ;; Don't use write-file; we don't want this buffer to visit it. + (write-region (point-min) (point-max) file) (file-error (message "Can't write %s" file))) (kill-buffer (current-buffer)) (message "Saving places to %s...done" file))))) From a1594703887d102b8f64f9672500ee3222a3fc0b Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 29 May 2005 08:39:40 +0000 Subject: [PATCH 137/294] (font-lock-fontify-syntactically-region): Pass t for GREEDY to looking-back. --- lisp/font-lock.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 4ad82a39b7e..d2507474f12 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -1351,7 +1351,7 @@ START should be at the beginning of a line." comment-start-skip)) (put-text-property beg (match-end 0) 'face font-lock-comment-delimiter-face))) - (if (looking-back comment-end-regexp (point-at-bol)) + (if (looking-back comment-end-regexp (point-at-bol) t) (put-text-property (match-beginning 0) (point) 'face font-lock-comment-delimiter-face)))) (< (point) end)) From 1f94ceaf650191262aaeaf0a9aaf9bd8e4ad5e1b Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 29 May 2005 08:40:37 +0000 Subject: [PATCH 138/294] (jit-lock-function, jit-lock-after-change): Do nothing if memory is full. --- lisp/jit-lock.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el index b34e26f74d4..ba2eed9f17e 100644 --- a/lisp/jit-lock.el +++ b/lisp/jit-lock.el @@ -298,7 +298,7 @@ Only applies to the current buffer." "Fontify current buffer starting at position START. This function is added to `fontification-functions' when `jit-lock-mode' is active." - (when jit-lock-mode + (when (and jit-lock-mode (not (memory-full-p))) (if (null jit-lock-defer-time) ;; No deferral. (jit-lock-fontify-now start (+ start jit-lock-chunk-size)) @@ -540,7 +540,7 @@ is the pre-change length. This function ensures that lines following the change will be refontified in case the syntax of those lines has changed. Refontification will take place when text is fontified stealthily." - (when jit-lock-mode + (when (and jit-lock-mode (not (memory-full-p))) (save-excursion (with-buffer-prepared-for-jit-lock ;; It's important that the `fontified' property be set from the From c16b13943f8d97229d1cfcdf636a1d959e62498f Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 29 May 2005 08:43:30 +0000 Subject: [PATCH 139/294] *** empty log message *** --- lisp/ChangeLog | 19 +++++++++++++++++++ lispref/ChangeLog | 5 +++++ src/ChangeLog | 4 ++++ 3 files changed, 28 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1fcdcde0a97..4adcbef1cce 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,22 @@ +2005-05-29 Richard M. Stallman + + * jit-lock.el (jit-lock-function, jit-lock-after-change): + Do nothing if memory is full. + + * font-lock.el (font-lock-fontify-syntactically-region): + Pass t for GREEDY to looking-back. + + * saveplace.el (save-place-alist-to-file): Write the file + using write-region. + + * subr.el (looking-back): New argument GREEDY. + + * progmodes/compile.el (compilation-start): Set the mode + before inserting the initial text. + + * progmodes/which-func.el (which-func-update-1): Turn the mode + off in case of error by setting which-func-mode. + 2005-05-29 Daniel Pfeiffer * progmodes/make-mode.el (makefile-rule-action-regex) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 2aefb23ac16..6e8700f1b36 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,5 +1,10 @@ 2005-05-29 Richard M. Stallman + * modes.texi (Mode Hooks): Explain that after-change-major-mode-hook is + new, and what that implies. Clarify. + + * files.texi (Locating Files): Clean up the text. + * frames.texi (Window Frame Parameters): Document user-size. Shorten entry for top by referring to left. diff --git a/src/ChangeLog b/src/ChangeLog index 8c64defd5db..e40048b4c35 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2005-05-29 Richard M. Stallman + + * buffer.c (Fbuffer_local_value): Call indirect_variable. + 2005-05-28 Masatake YAMATO * xdisp.c (note_mode_line_or_margin_highlight): Change the From 8c6fb9d004c0ae9f48fa405712645386854a2256 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Sun, 29 May 2005 10:47:05 +0000 Subject: [PATCH 140/294] *** empty log message *** --- lisp/ChangeLog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4adcbef1cce..e9b6f94a619 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2005-05-29 Nick Roberts + + * progmodes/gdb-ui.el (gdb-memory-set-repeat-count): + Throw error when count <= 0 to ensure input is a number. + (gdb-read-memory-custom): Pick up address from buffer. + (gdb-memory-mode): Allow user to increment and decrement + memory address from header line. + 2005-05-29 Richard M. Stallman * jit-lock.el (jit-lock-function, jit-lock-after-change): From 1f1f4de2dac71b48495ba00425022f8d5f52e7bf Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Sun, 29 May 2005 10:48:29 +0000 Subject: [PATCH 141/294] (gdb-memory-set-repeat-count): Throw error when count <= 0 to ensure input is a number. (gdb-read-memory-custom): Pick up address from buffer. (gdb-memory-mode): Allow user to increment and decrement memory address from header line. --- lisp/progmodes/gdb-ui.el | 43 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index df9d455f7df..54778b7b89c 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -1766,7 +1766,11 @@ static char *magick[] = { gdb-read-memory-handler gdb-read-memory-custom) -(defun gdb-read-memory-custom ()) +(defun gdb-read-memory-custom () + (save-excursion + (goto-char (point-min)) + (if (looking-at "0x[[:xdigit:]]+") + (setq gdb-memory-address (match-string 0))))) (defvar gdb-memory-mode-map (let ((map (make-sparse-keymap))) @@ -1790,8 +1794,8 @@ static char *magick[] = { (select-window (posn-window (event-start event))) (let* ((arg (read-from-minibuffer "Repeat count: ")) (count (string-to-number arg))) - (if (< count 0) - (error "Non-negative numbers only") + (if (<= count 0) + (error "Positive numbers only") (customize-set-variable 'gdb-memory-repeat-count count) (gdb-invalidate-memory))))) @@ -1944,7 +1948,38 @@ corresponding to the mode line clicked." (setq header-line-format '(:eval (concat - "Read address: " + "Read address[" + (propertize + "-" + 'face font-lock-warning-face + 'help-echo "mouse-1: Decrement address" + 'mouse-face 'mode-line-highlight + 'local-map + (gdb-make-header-line-mouse-map + 'mouse-1 + #'(lambda () (interactive) + (let ((gdb-memory-address + ;; let GDB do the arithmetic + (concat + gdb-memory-address " - " + (number-to-string + (* gdb-memory-repeat-count + (cond ((string= gdb-memory-unit "b") 1) + ((string= gdb-memory-unit "h") 2) + ((string= gdb-memory-unit "w") 4) + ((string= gdb-memory-unit "g") 8))))))) + (gdb-invalidate-memory))))) + "|" + (propertize "+" + 'face font-lock-warning-face + 'help-echo "mouse-1: Increment address" + 'mouse-face 'mode-line-highlight + 'local-map (gdb-make-header-line-mouse-map + 'mouse-1 + #'(lambda () (interactive) + (let ((gdb-memory-address nil)) + (gdb-invalidate-memory))))) + "]: " (propertize gdb-memory-address 'face font-lock-warning-face 'help-echo "mouse-1: Set memory address" From a8c453e62da101436b7bde3ff3a6096ea73edfea Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 29 May 2005 14:29:34 +0000 Subject: [PATCH 142/294] (flyspell-version): Function deleted. (flyspell-auto-correct-previous-hook): Doc fix. (flyspell-emacs, flyspell-use-local-map): Vars moved up. (flyspell-default-delayed-commands): add backward-delete-char-untabify. (flyspell-abbrev-p): Default to nil. (flyspell-use-global-abbrev-table-p): Doc fix. (flyspell-large-region): Allow nil as value. (flyspell-use-meta-tab, flyspell-auto-correct-binding): New variables. (mail-mode-flyspell-verify): More robust handling of `mail-header-separator'. More efficient signature detection. Allow for regexp metacharacters in message-header-separator. Adding `To' not to be checked in mail-mode-flyspell-verify. (flyspell-prog-mode): Run flyspell-prog-mode-hook. (flyspell-mouse-map, flyspell-mode-map): Bind C-. and C-, . Bind M-TAB only if flyspell-use-meta-tab. Bind flyspell-auto-correct-binding. (flyspell-mode-on): Bind flyspell-mouse-map and flyspell-mode-map. (flyspell-mode): Doc fix. (flyspell-accept-buffer-local-defs): Preserve current buffer. (flyspell-word-cache-result): New var, always local. (flyspell-check-pre-word-p): Doc fix. (flyspell-check-changed-word-p): Handle spc like newline. (flyspell-post-command-hook): Set flyspell-word-cache-result. (flyspell-word-search-backward, flyspell-word-search-forward): New functions. (flyspell-word): Return t if nothing to check. When parsing TeX code, check for after } or \. Use flyspell-word-search-backward to find previous word. Return nil if duplicated word. For word already checked, return same value as last time. Set flyspell-word-cache-result after checking. Don't clobber the return value. (flyspell-get-word): Major rewrite. (flyspell-external-point-words): New locals pword, pcount. Fix size used in progress message. Find the proper corresponding word in flyspell-large-region-buffer. (flyspell-region): Check for flyspell-large-region = nil. (flyspell-highlight-incorrect-region): Clean up overlays in region. (flyspell-auto-correct-word): Check that WORD is a cons. (flyspell-correct-word): Likewise. (flyspell-auto-correct-previous-word): Narrow down to what's on the screen, and recenter overlays at the end of the next word. --- lisp/ChangeLog | 50 +++ lisp/textmodes/flyspell.el | 772 ++++++++++++++++++++++--------------- 2 files changed, 507 insertions(+), 315 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e9b6f94a619..493435c96dd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -8,6 +8,9 @@ 2005-05-29 Richard M. Stallman + * flyspell.el (flyspell-version): Function deleted. + (flyspell-auto-correct-previous-hook): Doc fix. + * jit-lock.el (jit-lock-function, jit-lock-after-change): Do nothing if memory is full. @@ -25,6 +28,53 @@ * progmodes/which-func.el (which-func-update-1): Turn the mode off in case of error by setting which-func-mode. +2005-05-29 Manuel Serrano + + * flyspell.el (flyspell-emacs, flyspell-use-local-map): Vars moved up. + (flyspell-default-delayed-commands): add backward-delete-char-untabify. + (flyspell-abbrev-p): Default to nil. + (flyspell-use-global-abbrev-table-p): Doc fix. + (flyspell-large-region): Allow nil as value. + (flyspell-use-meta-tab, flyspell-auto-correct-binding): New variables. + + (mail-mode-flyspell-verify): More robust handling + of `mail-header-separator'. More efficient signature detection. + Allow for regexp metacharacters in message-header-separator. + Adding `To' not to be checked in mail-mode-flyspell-verify. + + (flyspell-prog-mode): Run flyspell-prog-mode-hook. + (flyspell-mouse-map): Bind M-TAB only if flyspell-use-meta-tab. + Bind flyspell-auto-correct-binding. + Bind C-. and C-, . + (flyspell-mode-map): Likewise. + (flyspell-mode): Doc fix. + (flyspell-accept-buffer-local-defs): Preserve current buffer. + (flyspell-mode-on): Bind flyspell-mouse-map and flyspell-mode-map. + (flyspell-word-cache-result): New var, always local. + (flyspell-check-pre-word-p): Doc fix. + (flyspell-check-changed-word-p): Handle spc like newline. + (flyspell-post-command-hook): Set flyspell-word-cache-result. + (flyspell-word-search-backward, flyspell-word-search-forward): + New functions. + (flyspell-word): Return t if nothing to check. + When parsing TeX code, check for after } or \. + Use flyspell-word-search-backward to find previous word. + Return nil if duplicated word. + For word already checked, return same value as last time. + Set flyspell-word-cache-result after checking. + Don't clobber the return value. + (flyspell-get-word): Major rewrite. + (flyspell-external-point-words): New locals pword, pcount. + Fix size used in progress message. + Find the proper corresponding word in flyspell-large-region-buffer. + (flyspell-region): Check for flyspell-large-region = nil. + (flyspell-highlight-incorrect-region): Clean up overlays in region. + (flyspell-auto-correct-word): Check that WORD is a cons. + (flyspell-correct-word): Likewise. + (flyspell-auto-correct-previous-word): + Narrow down to what's on the screen, and recenter overlays + at the end of the next word. + 2005-05-29 Daniel Pfeiffer * progmodes/make-mode.el (makefile-rule-action-regex) diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index dbe8b1cfbc6..3175b73c22a 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -1,6 +1,6 @@ ;;; flyspell.el --- on-the-fly spell checker -;; Copyright (C) 1998, 2000, 2001, 2002, 2004 Free Software Foundation, Inc. +;; Copyright (C) 1998, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Manuel Serrano ;; Maintainer: FSF @@ -55,6 +55,21 @@ :group 'ispell :group 'processes) +;*---------------------------------------------------------------------*/ +;* Which emacs are we currently running */ +;*---------------------------------------------------------------------*/ +(defvar flyspell-emacs + (cond + ((string-match "XEmacs" emacs-version) + 'xemacs) + (t + 'emacs)) + "The type of Emacs we are currently running.") + +(defvar flyspell-use-local-map + (or (eq flyspell-emacs 'xemacs) + (not (string< emacs-version "20")))) + ;*---------------------------------------------------------------------*/ ;* User configuration ... */ ;*---------------------------------------------------------------------*/ @@ -109,7 +124,8 @@ is highlighted." delete-backward-char backward-or-forward-delete-char delete-char - scrollbar-vertical-drag) + scrollbar-vertical-drag + backward-delete-char-untabify) "The standard list of delayed commands for Flyspell. See `flyspell-delayed-commands'." :group 'flyspell @@ -199,15 +215,15 @@ http://strw.leidenuniv.nl/~dominik/Tools" :type '(repeat (string))) (defcustom flyspell-abbrev-p - t - "*If true, add correction to abbreviation table." + nil + "*If non-nil, add correction to abbreviation table." :group 'flyspell :version "21.1" :type 'boolean) (defcustom flyspell-use-global-abbrev-table-p nil - "*If true, prefer global abbrev table to local abbrev table." + "*If non-nil, prefer global abbrev table to local abbrev table." :group 'flyspell :version "21.1" :type 'boolean) @@ -224,10 +240,12 @@ Set this to nil if you don't want a modeline indicator." If the region is smaller than this number of characters, `flyspell-region' checks the words sequentially using regular flyspell methods. Else, if the region is large, a new Ispell process is -spawned for speed." +spawned for speed. + +If `flyspell-large-region' is nil, all regions are treated as small." :group 'flyspell :version "21.1" - :type 'number) + :type '(choice number boolean)) (defcustom flyspell-insert-function (function insert) "*Function for inserting word by flyspell upon correction." @@ -244,6 +262,20 @@ spawned for speed." :group 'flyspell :type '(choice string (const nil))) +(defcustom flyspell-use-meta-tab t + "*Non-nil means that flyspell uses META-TAB to correct word." + :group 'flyspell + :type 'boolean) + +(defcustom flyspell-auto-correct-binding + (cond + ((eq flyspell-emacs 'xemacs) + [(control \;)]) + (t + [?\C-\;])) + "The key binding for flyspell auto correction." + :group 'flyspell) + ;*---------------------------------------------------------------------*/ ;* Mode specific options */ ;* ------------------------------------------------------------- */ @@ -267,17 +299,24 @@ property of the major mode name.") (put 'message-mode 'flyspell-mode-predicate 'mail-mode-flyspell-verify) (defun mail-mode-flyspell-verify () "This function is used for `flyspell-generic-check-word-p' in Mail mode." - (let ((in-headers (save-excursion - ;; When mail-header-separator is "", - ;; it is likely to be found in both directions. - (not (re-search-backward (concat "^" (regexp-quote mail-header-separator) "$") nil t)))) - (in-signature (save-excursion - (re-search-backward message-signature-separator nil t)))) - (cond (in-headers + (let ((header-end (save-excursion + (goto-char (point-min)) + (re-search-forward + (concat "^" + (regexp-quote mail-header-separator) + "$") + nil t) + (point))) + (signature-begin (save-excursion + (goto-char (point-max)) + (re-search-backward message-signature-separator + nil t) + (point)))) + (cond ((< (point) header-end) (and (save-excursion (beginning-of-line) (looking-at "^Subject:")) (> (point) (match-end 0)))) - (in-signature + ((> (point) signature-begin) nil) (t (save-excursion @@ -351,7 +390,8 @@ property of the major mode name.") "Turn on `flyspell-mode' for comments and strings." (interactive) (setq flyspell-generic-check-word-p 'flyspell-generic-progmode-verify) - (flyspell-mode 1)) + (flyspell-mode 1) + (run-hooks 'flyspell-prog-mode-hook)) ;*---------------------------------------------------------------------*/ ;* Overlay compatibility */ @@ -365,21 +405,6 @@ property of the major mode name.") (autoload 'overlay-get "overlay" "Overlay compatibility kit." t) (autoload 'previous-overlay-change "overlay" "Overlay compatibility kit." t) -;*---------------------------------------------------------------------*/ -;* Which emacs are we currently running */ -;*---------------------------------------------------------------------*/ -(defvar flyspell-emacs - (cond - ((string-match "XEmacs" emacs-version) - 'xemacs) - (t - 'emacs)) - "The type of Emacs we are currently running.") - -(defvar flyspell-use-local-map - (or (eq flyspell-emacs 'xemacs) - (not (string< emacs-version "20")))) - ;*---------------------------------------------------------------------*/ ;* The minor mode declaration. */ ;*---------------------------------------------------------------------*/ @@ -391,9 +416,13 @@ property of the major mode name.") (defvar flyspell-mouse-map (let ((map (make-sparse-keymap))) + (if flyspell-use-meta-tab + (define-key map "\M-\t" #'flyspell-auto-correct-word)) (define-key map (if (featurep 'xemacs) [button2] [down-mouse-2]) #'flyspell-correct-word) - (define-key map "\M-\t" #'flyspell-auto-correct-word) + (define-key map flyspell-auto-correct-binding 'flyspell-auto-correct-previous-word) + (define-key map [(control \,)] 'flyspell-goto-next-error) + (define-key map [(control \.)] 'flyspell-auto-correct-word) map)) ;;;###autoload @@ -404,7 +433,18 @@ property of the major mode name.") (setq minor-mode-map-alist (cons (cons 'flyspell-mode flyspell-mode-map) minor-mode-map-alist))) - (define-key flyspell-mode-map "\M-\t" 'flyspell-auto-correct-word)) + (if flyspell-use-meta-tab + (define-key flyspell-mode-map "\M-\t" 'flyspell-auto-correct-word)) + (cond + ((eq flyspell-emacs 'xemacs) + (define-key flyspell-mode-map flyspell-auto-correct-binding 'flyspell-auto-correct-previous-word) + (define-key flyspell-mode-map [(control \,)] 'flyspell-goto-next-error) + (define-key flyspell-mode-map [(control \.)] 'flyspell-auto-correct-word)) + (flyspell-use-local-map + (define-key flyspell-mode-map flyspell-auto-correct-binding 'flyspell-auto-correct-previous-word) + (define-key flyspell-mode-map [?\C-\,] 'flyspell-goto-next-error) + (define-key flyspell-mode-map [?\C-\.] 'flyspell-auto-correct-word)))) + ;; the name of the overlay property that defines the keymap (defvar flyspell-overlay-keymap-property-name 'keymap) @@ -456,7 +496,8 @@ With a prefix argument ARG, turn Flyspell minor mode on iff ARG is positive. Bindings: \\[ispell-word]: correct words (using Ispell). \\[flyspell-auto-correct-word]: automatically correct word. -\\[flyspell-correct-word] (or mouse-2): popup correct words. +\\[flyspell-auto-correct-previous-word]: automatically correct the last misspelled word. +\\[flyspell-correct-word] (or down-mouse-2): popup correct words. Hooks: This runs `flyspell-mode-hook' after flyspell is entered. @@ -511,23 +552,20 @@ in your .emacs file. (let ((ws (get-buffer-window-list buffer t))) (and (consp ws) (window-minibuffer-p (car ws))))) -;*---------------------------------------------------------------------*/ -;* flyspell-version ... */ -;*---------------------------------------------------------------------*/ -;;;###autoload -(defun flyspell-version () - "The flyspell version" - (interactive) - "1.6h") - ;*---------------------------------------------------------------------*/ ;* flyspell-accept-buffer-local-defs ... */ ;*---------------------------------------------------------------------*/ (defun flyspell-accept-buffer-local-defs () - (ispell-accept-buffer-local-defs) + ;; strange problem. If buffer in current window has font-lock turned on, + ;; but SET-BUFFER was called to point to an invisible buffer, this ispell + ;; call will reset the buffer to the buffer in the current window. However, + ;; it only happens at startup (fix by Albert L. Ting). + (let ((buf (current-buffer))) + (ispell-accept-buffer-local-defs) + (set-buffer buf)) (if (not (and (eq flyspell-dash-dictionary ispell-dictionary) (eq flyspell-dash-local-dictionary ispell-local-dictionary))) - ;; the dictionary has changed + ;; The dictionary has changed (progn (setq flyspell-dash-dictionary ispell-dictionary) (setq flyspell-dash-local-dictionary ispell-local-dictionary) @@ -566,6 +604,22 @@ in your .emacs file. (let ((mode-predicate (get major-mode 'flyspell-mode-predicate))) (if mode-predicate (setq flyspell-generic-check-word-p mode-predicate))) + ;; work around the fact that the `local-map' text-property replaces the + ;; buffer's local map rather than shadowing it. + (set (make-local-variable 'flyspell-mouse-map) + (let ((map (copy-keymap flyspell-mouse-map))) + (set-keymap-parent map (current-local-map)) + (if (and (eq flyspell-emacs 'emacs) + (not (string< emacs-version "20"))) + (define-key map '[tool-bar] nil)) + map)) + (set (make-local-variable 'flyspell-mode-map) + (let ((map (copy-keymap flyspell-mode-map))) + (set-keymap-parent map (current-local-map)) + (if (and (eq flyspell-emacs 'emacs) + (not (string< emacs-version "20"))) + (define-key map '[tool-bar] nil)) + map)) ;; the welcome message (if (and flyspell-issue-message-flag flyspell-issue-welcome-flag @@ -624,9 +678,11 @@ not the very same deplacement command." (defvar flyspell-word-cache-start nil) (defvar flyspell-word-cache-end nil) (defvar flyspell-word-cache-word nil) +(defvar flyspell-word-cache-result '_) (make-variable-buffer-local 'flyspell-word-cache-start) (make-variable-buffer-local 'flyspell-word-cache-end) (make-variable-buffer-local 'flyspell-word-cache-word) +(make-variable-buffer-local 'flyspell-word-cache-result) ;*---------------------------------------------------------------------*/ ;* The flyspell pre-hook, store the current position. In the */ @@ -678,7 +734,7 @@ not the very same deplacement command." ;* flyspell-check-pre-word-p ... */ ;*---------------------------------------------------------------------*/ (defun flyspell-check-pre-word-p () - "Return non-nil if we should to check the word before point. + "Return non-nil if we should check the word before point. More precisely, it applies to the word that was before point before the current command." (cond @@ -735,7 +791,7 @@ before the current command." The answer depends of several criteria. Mostly we check word delimiters." (cond - ((and (eq (char-after start) ?\n) (> stop start)) + ((and (memq (char-after start) '(?\n ? )) (> stop start)) t) ((not (numberp flyspell-pre-point)) t) @@ -924,7 +980,9 @@ Mostly we check word delimiters." ;; when a word is not checked because of a delayed command ;; we do not disable the ispell cache. (if (and (symbolp this-command) (get this-command 'flyspell-delayed)) - (setq flyspell-word-cache-end -1)))) + (progn + (setq flyspell-word-cache-end -1) + (setq flyspell-word-cache-result '_))))) (while (consp flyspell-changes) (let ((start (car (car flyspell-changes))) (stop (cdr (car flyspell-changes)))) @@ -948,6 +1006,34 @@ Mostly we check word delimiters." (if flyspell-issue-message-flag (message (format "mispelling `%s' %S" word replacements))))) +;*---------------------------------------------------------------------*/ +;* flyspell-word-search-backward ... */ +;*---------------------------------------------------------------------*/ +(defun flyspell-word-search-backward (word bound) + (save-excursion + (let ((r '()) + p) + (while (and (not r) (setq p (search-backward word bound t))) + (let ((lw (flyspell-get-word '()))) + (if (and (consp lw) (string-equal (car lw) word)) + (setq r p) + (goto-char p)))) + r))) + +;*---------------------------------------------------------------------*/ +;* flyspell-word-search-forward ... */ +;*---------------------------------------------------------------------*/ +(defun flyspell-word-search-forward (word bound) + (save-excursion + (let ((r '()) + p) + (while (and (not r) (setq p (search-forward word bound t))) + (let ((lw (flyspell-get-word '()))) + (if (and (consp lw) (string-equal (car lw) word)) + (setq r p) + (goto-char (1+ p))))) + r))) + ;*---------------------------------------------------------------------*/ ;* flyspell-word ... */ ;*---------------------------------------------------------------------*/ @@ -963,7 +1049,7 @@ Mostly we check word delimiters." (if (or (eq flyspell-word nil) (and (fboundp flyspell-generic-check-word-p) (not (funcall flyspell-generic-check-word-p)))) - '() + t (progn ;; destructure return flyspell-word info list. (setq start (car (cdr flyspell-word)) @@ -972,21 +1058,24 @@ Mostly we check word delimiters." ;; before checking in the directory, we check for doublons. (cond ((and (or (not (eq ispell-parser 'tex)) - (not (eq (char-after start) ?\\))) + (and (> start (point-min)) + (not (eq (char-after (1- start)) ?})) + (not (eq (char-after (1- start)) ?\\)))) flyspell-mark-duplications-flag (save-excursion - (goto-char start) - (word-search-backward word - (- start - (+ 1 (- end start))) - t))) + (goto-char (1- start)) + (let ((p (flyspell-word-search-backward + word + (- start (1+ (- end start)))))) + (and p (/= p (1- start)))))) ;; yes, this is a doublon - (flyspell-highlight-incorrect-region start end 'doublon)) + (flyspell-highlight-incorrect-region start end 'doublon) + nil) ((and (eq flyspell-word-cache-start start) (eq flyspell-word-cache-end end) (string-equal flyspell-word-cache-word word)) ;; this word had been already checked, we skip - nil) + flyspell-word-cache-result) ((and (eq ispell-parser 'tex) (flyspell-tex-command-p flyspell-word)) ;; this is a correct word (because a tex command) @@ -1016,59 +1105,68 @@ Mostly we check word delimiters." (setq ispell-filter (cdr ispell-filter)) (if (consp ispell-filter) (setq poss (ispell-parse-output (car ispell-filter)))) - (cond ((eq poss t) - ;; correct - (flyspell-unhighlight-at start) - (if (> end start) - (flyspell-unhighlight-at (- end 1))) - t) - ((and (stringp poss) flyspell-highlight-flag) - ;; correct - (flyspell-unhighlight-at start) - (if (> end start) - (flyspell-unhighlight-at (- end 1))) - t) - ((null poss) - (flyspell-unhighlight-at start) - (if (> end start) - (flyspell-unhighlight-at (- end 1)))) - ((or (and (< flyspell-duplicate-distance 0) - (or (save-excursion - (goto-char start) - (word-search-backward word - (point-min) - t)) - (save-excursion - (goto-char end) - (word-search-forward word - (point-max) - t)))) - (and (> flyspell-duplicate-distance 0) - (or (save-excursion - (goto-char start) - (word-search-backward - word - (- start - flyspell-duplicate-distance) - t)) - (save-excursion - (goto-char end) - (word-search-forward - word - (+ end - flyspell-duplicate-distance) - t))))) - (if flyspell-highlight-flag - (flyspell-highlight-duplicate-region start end poss) - (message (format "duplicate `%s'" word)))) - (t - ;; incorrect highlight the location - (if flyspell-highlight-flag - (flyspell-highlight-incorrect-region start end poss) - (flyspell-notify-misspell start end word poss)))) - ;; return to original location - (goto-char cursor-location) - (if ispell-quit (setq ispell-quit nil))))))))) + (let ((res (cond ((eq poss t) + ;; correct + (setq flyspell-word-cache-result t) + (flyspell-unhighlight-at start) + (if (> end start) + (flyspell-unhighlight-at (- end 1))) + t) + ((and (stringp poss) flyspell-highlight-flag) + ;; correct + (setq flyspell-word-cache-result t) + (flyspell-unhighlight-at start) + (if (> end start) + (flyspell-unhighlight-at (- end 1))) + t) + ((null poss) + (setq flyspell-word-cache-result t) + (flyspell-unhighlight-at start) + (if (> end start) + (flyspell-unhighlight-at (- end 1))) + t) + ((or (and (< flyspell-duplicate-distance 0) + (or (save-excursion + (goto-char start) + (flyspell-word-search-backward + word + (point-min))) + (save-excursion + (goto-char end) + (flyspell-word-search-forward + word + (point-max))))) + (and (> flyspell-duplicate-distance 0) + (or (save-excursion + (goto-char start) + (flyspell-word-search-backward + word + (- start + flyspell-duplicate-distance))) + (save-excursion + (goto-char end) + (flyspell-word-search-forward + word + (+ end + flyspell-duplicate-distance)))))) + (setq flyspell-word-cache-result nil) + (if flyspell-highlight-flag + (flyspell-highlight-duplicate-region + start end poss) + (message (format "duplicate `%s'" word))) + nil) + (t + (setq flyspell-word-cache-result nil) + ;; incorrect highlight the location + (if flyspell-highlight-flag + (flyspell-highlight-incorrect-region + start end poss) + (flyspell-notify-misspell start end word poss)) + nil)))) + ;; return to original location + (goto-char cursor-location) + (if ispell-quit (setq ispell-quit nil)) + res)))))))) ;*---------------------------------------------------------------------*/ ;* flyspell-tex-math-initialized ... */ @@ -1175,30 +1273,31 @@ this function changes the last char of the `ispell-casechars' string." ;*---------------------------------------------------------------------*/ ;* flyspell-get-word ... */ ;*---------------------------------------------------------------------*/ -(defun flyspell-get-word (following) +(defun flyspell-get-word (following &optional extra-otherchars) "Return the word for spell-checking according to Ispell syntax. -If argument FOLLOWING is non-nil or if `ispell-following-word' +If optional argument FOLLOWING is non-nil or if `flyspell-following-word' is non-nil when called interactively, then the following word \(rather than preceding\) is checked when the cursor is not over a word. -Optional second argument contains other chars that can be included in word +Optional second argument contains otherchars that can be included in word many times. -Word syntax described by `ispell-dictionary-alist' (which see)." +Word syntax described by `flyspell-dictionary-alist' (which see)." (let* ((flyspell-casechars (flyspell-get-casechars)) (flyspell-not-casechars (flyspell-get-not-casechars)) (ispell-otherchars (ispell-get-otherchars)) (ispell-many-otherchars-p (ispell-get-many-otherchars-p)) - (word-regexp (if (string< "" ispell-otherchars) - (concat flyspell-casechars - "+\\(" - ispell-otherchars - "?" - flyspell-casechars - "+\\)" - (if ispell-many-otherchars-p - "*" "?")) - (concat flyspell-casechars "+"))) - did-it-once + (word-regexp (concat flyspell-casechars + "+\\(" + (if (not (string= "" ispell-otherchars)) + (concat ispell-otherchars "?")) + (if extra-otherchars + (concat extra-otherchars "?")) + flyspell-casechars + "+\\)" + (if (or ispell-many-otherchars-p + extra-otherchars) + "*" "?"))) + did-it-once prevpt start end word) ;; find the word (if (not (looking-at flyspell-casechars)) @@ -1207,21 +1306,26 @@ Word syntax described by `ispell-dictionary-alist' (which see)." (re-search-backward flyspell-casechars (point-min) t))) ;; move to front of word (re-search-backward flyspell-not-casechars (point-min) 'start) - (let ((pos nil)) - (if (string< "" ispell-otherchars) - (while (and (looking-at ispell-otherchars) - (not (bobp)) - (or (not did-it-once) - ispell-many-otherchars-p) - (not (eq pos (point)))) - (setq pos (point)) - (setq did-it-once t) + (while (and (or (and (not (string= "" ispell-otherchars)) + (looking-at ispell-otherchars)) + (and extra-otherchars (looking-at extra-otherchars))) + (not (bobp)) + (or (not did-it-once) + ispell-many-otherchars-p) + (not (eq prevpt (point)))) + (if (and extra-otherchars (looking-at extra-otherchars)) + (progn (backward-char 1) (if (looking-at flyspell-casechars) - (re-search-backward flyspell-not-casechars (point-min) 'move) - (backward-char -1))))) + (re-search-backward flyspell-not-casechars (point-min) 'move))) + (setq did-it-once t + prevpt (point)) + (backward-char 1) + (if (looking-at flyspell-casechars) + (re-search-backward flyspell-not-casechars (point-min) 'move) + (backward-char -1)))) ;; Now mark the word and save to string. - (if (eq (re-search-forward word-regexp (point-max) t) nil) + (if (not (re-search-forward word-regexp (point-max) t)) nil (progn (setq start (match-beginning 0) @@ -1280,25 +1384,37 @@ Word syntax described by `ispell-dictionary-alist' (which see)." (set-buffer buffer) (goto-char (point-min)) (let ((size (- flyspell-large-region-end flyspell-large-region-beg)) - (start flyspell-large-region-beg)) + (start flyspell-large-region-beg) + (pword "") + (pcount 1)) ;; now we are done with ispell, we have to find the word in ;; the initial buffer (while (< (point) (- (point-max) 1)) ;; we have to fetch the incorrect word (if (re-search-forward "\\([^\n]+\\)\n" (point-max) t) (let ((word (match-string 1))) + (if (string= word pword) + (setq pcount (1+ pcount)) + (progn + (setq pword word) + (setq pcount 1))) (goto-char (match-end 0)) - (set-buffer flyspell-large-region-buffer) - (goto-char flyspell-large-region-beg) (if flyspell-issue-message-flag (message "Spell Checking...%d%% [%s]" - (* 100 (/ (float (- (point) start)) size)) + (* 100 (/ (float (point)) (point-max))) word)) - (if (search-forward word flyspell-large-region-end t) + (set-buffer flyspell-large-region-buffer) + (goto-char flyspell-large-region-beg) + (let ((keep t) + (n 0)) + (while (and (or (< n pcount) keep) + (search-forward word flyspell-large-region-end t)) (progn - (setq flyspell-large-region-beg (point)) (goto-char (- (point) 1)) - (flyspell-word))) + (setq n (1+ n)) + (setq keep (flyspell-word)))) + (if (= n pcount) + (setq flyspell-large-region-beg (point)))) (set-buffer buffer)) (goto-char (point-max))))) ;; we are done @@ -1370,7 +1486,7 @@ Word syntax described by `ispell-dictionary-alist' (which see)." (let ((old beg)) (setq beg end) (setq end old))) - (if (> (- end beg) flyspell-large-region) + (if (and flyspell-large-region (> (- end beg) flyspell-large-region)) (flyspell-large-region beg end) (flyspell-small-region beg end))))) @@ -1517,15 +1633,23 @@ for the overlay." (if (or flyspell-highlight-properties (not (flyspell-properties-at-p beg))) (progn + ;; we cleanup all the overlay that are in the region, not + ;; beginning at the word start position + (if (< (1+ beg) end) + (let ((os (overlays-in (1+ beg) end))) + (while (consp os) + (if (flyspell-overlay-p (car os)) + (delete-overlay (car os))) + (setq os (cdr os))))) ;; we cleanup current overlay at the same position (if (and (not flyspell-persistent-highlight) (overlayp flyspell-overlay)) (delete-overlay flyspell-overlay) - (let ((overlays (overlays-at beg))) - (while (consp overlays) - (if (flyspell-overlay-p (car overlays)) - (delete-overlay (car overlays))) - (setq overlays (cdr overlays))))) + (let ((os (overlays-at beg))) + (while (consp os) + (if (flyspell-overlay-p (car os)) + (delete-overlay (car os))) + (setq os (cdr os))))) ;; now we can use a new overlay (setq flyspell-overlay (make-flyspell-overlay @@ -1677,69 +1801,71 @@ This command proposes various successive corrections for the current word." (flyspell-ajust-cursor-point pos (point) old-max) (setq flyspell-auto-correct-pos (point))) ;; fetch the word to be checked - (let ((word (flyspell-get-word nil)) - start end poss) - ;; destructure return word info list. - (setq start (car (cdr word)) - end (car (cdr (cdr word))) - word (car word)) - (setq flyspell-auto-correct-word word) - ;; now check spelling of word. - (process-send-string ispell-process "%\n") ;put in verbose mode - (process-send-string ispell-process (concat "^" word "\n")) - ;; wait until ispell has processed word - (while (progn - (accept-process-output ispell-process) - (not (string= "" (car ispell-filter))))) - (setq ispell-filter (cdr ispell-filter)) - (if (consp ispell-filter) - (setq poss (ispell-parse-output (car ispell-filter)))) - (cond ((or (eq poss t) (stringp poss)) - ;; don't correct word - t) - ((null poss) - ;; ispell error - (error "Ispell: error in Ispell process")) - (t - ;; the word is incorrect, we have to propose a replacement - (let ((replacements (if flyspell-sort-corrections - (sort (car (cdr (cdr poss))) 'string<) - (car (cdr (cdr poss)))))) - (setq flyspell-auto-correct-region nil) - (if (consp replacements) - (progn - (let ((replace (car replacements))) - (let ((new-word replace)) - (if (not (equal new-word (car poss))) - (progn - ;; the save the current replacements - (setq flyspell-auto-correct-region - (cons start (length new-word))) - (let ((l replacements)) - (while (consp (cdr l)) - (setq l (cdr l))) - (rplacd l (cons (car poss) replacements))) - (setq flyspell-auto-correct-ring - replacements) - (flyspell-unhighlight-at start) - (delete-region start end) - (funcall flyspell-insert-function new-word) - (if flyspell-abbrev-p - (if (flyspell-already-abbrevp - (flyspell-abbrev-table) word) - (flyspell-change-abbrev - (flyspell-abbrev-table) - word - new-word) - (flyspell-define-abbrev word new-word))) - (flyspell-word) - (flyspell-display-next-corrections - (cons new-word flyspell-auto-correct-ring)) - (flyspell-ajust-cursor-point pos - (point) - old-max)))))))))) - (setq flyspell-auto-correct-pos (point)) - (ispell-pdict-save t))))) + (let ((word (flyspell-get-word nil))) + (if (consp word) + (let ((start (car (cdr word))) + (end (car (cdr (cdr word)))) + (word (car word)) + poss) + (setq flyspell-auto-correct-word word) + ;; now check spelling of word. + (process-send-string ispell-process "%\n") ;put in verbose mode + (process-send-string ispell-process (concat "^" word "\n")) + ;; wait until ispell has processed word + (while (progn + (accept-process-output ispell-process) + (not (string= "" (car ispell-filter))))) + (setq ispell-filter (cdr ispell-filter)) + (if (consp ispell-filter) + (setq poss (ispell-parse-output (car ispell-filter)))) + (cond + ((or (eq poss t) (stringp poss)) + ;; don't correct word + t) + ((null poss) + ;; ispell error + (error "Ispell: error in Ispell process")) + (t + ;; the word is incorrect, we have to propose a replacement + (let ((replacements (if flyspell-sort-corrections + (sort (car (cdr (cdr poss))) 'string<) + (car (cdr (cdr poss)))))) + (setq flyspell-auto-correct-region nil) + (if (consp replacements) + (progn + (let ((replace (car replacements))) + (let ((new-word replace)) + (if (not (equal new-word (car poss))) + (progn + ;; the save the current replacements + (setq flyspell-auto-correct-region + (cons start (length new-word))) + (let ((l replacements)) + (while (consp (cdr l)) + (setq l (cdr l))) + (rplacd l (cons (car poss) replacements))) + (setq flyspell-auto-correct-ring + replacements) + (flyspell-unhighlight-at start) + (delete-region start end) + (funcall flyspell-insert-function new-word) + (if flyspell-abbrev-p + (if (flyspell-already-abbrevp + (flyspell-abbrev-table) word) + (flyspell-change-abbrev + (flyspell-abbrev-table) + word + new-word) + (flyspell-define-abbrev word + new-word))) + (flyspell-word) + (flyspell-display-next-corrections + (cons new-word flyspell-auto-correct-ring)) + (flyspell-ajust-cursor-point pos + (point) + old-max)))))))))) + (setq flyspell-auto-correct-pos (point)) + (ispell-pdict-save t))))))) ;*---------------------------------------------------------------------*/ ;* flyspell-auto-correct-previous-pos ... */ @@ -1752,8 +1878,8 @@ This command proposes various successive corrections for the current word." ;*---------------------------------------------------------------------*/ (defun flyspell-auto-correct-previous-hook () "Hook to track successive calls to `flyspell-auto-correct-previous-word'. -Sets flyspell-auto-correct-previous-pos to nil" - (interactive) +Sets `flyspell-auto-correct-previous-pos' to nil" + (interactive) (remove-hook 'pre-command-hook (function flyspell-auto-correct-previous-hook) t) (unless (eq this-command (function flyspell-auto-correct-previous-word)) (setq flyspell-auto-correct-previous-pos nil))) @@ -1761,45 +1887,57 @@ Sets flyspell-auto-correct-previous-pos to nil" ;*---------------------------------------------------------------------*/ ;* flyspell-auto-correct-previous-word ... */ ;*---------------------------------------------------------------------*/ -(defun flyspell-auto-correct-previous-word (position) - "*Auto correct the first mispelled word that occurs before point." +(defun flyspell-auto-correct-previous-word (position) + "*Auto correct the first mispelled word that occurs before point. +But don't look beyond what's visible on the screen." (interactive "d") - (add-hook 'pre-command-hook - (function flyspell-auto-correct-previous-hook) t t) + (let (top bot) + (save-excursion + (move-to-window-line 0) + (setq top (point)) + (move-to-window-line -1) + (setq bot (point))) + (save-excursion + (save-restriction + (narrow-to-region top bot) + (re-search-forward "\\s \\|\\'" nil t) + (overlay-recenter (point)) - (save-excursion - (unless flyspell-auto-correct-previous-pos - ;; only reset if a new overlay exists - (setq flyspell-auto-correct-previous-pos nil) + (add-hook 'pre-command-hook + (function flyspell-auto-correct-previous-hook) t t) - (let ((overlay-list (overlays-in (point-min) position)) - (new-overlay 'dummy-value)) + (unless flyspell-auto-correct-previous-pos + ;; only reset if a new overlay exists + (setq flyspell-auto-correct-previous-pos nil) + + (let ((overlay-list (overlays-in (point-min) position)) + (new-overlay 'dummy-value)) + + ;; search for previous (new) flyspell overlay + (while (and new-overlay + (or (not (flyspell-overlay-p new-overlay)) + ;; check if its face has changed + (not (eq (get-char-property + (overlay-start new-overlay) 'face) + 'flyspell-incorrect-face)))) + (setq new-overlay (car-safe overlay-list)) + (setq overlay-list (cdr-safe overlay-list))) + + ;; if nothing new exits new-overlay should be nil + (if new-overlay ;; the length of the word may change so go to the start + (setq flyspell-auto-correct-previous-pos + (overlay-start new-overlay))))) - ;; search for previous (new) flyspell overlay - (while (and new-overlay - (or (not (flyspell-overlay-p new-overlay)) - ;; check if its face has changed - (not (eq (get-char-property - (overlay-start new-overlay) 'face) - 'flyspell-incorrect-face)))) - (setq new-overlay (car-safe overlay-list)) - (setq overlay-list (cdr-safe overlay-list))) - - ;; if nothing new exits new-overlay should be nil - (if new-overlay;; the length of the word may change so go to the start - (setq flyspell-auto-correct-previous-pos - (overlay-start new-overlay))))) - - (when flyspell-auto-correct-previous-pos - (save-excursion - (goto-char flyspell-auto-correct-previous-pos) - (let ((ispell-following-word t));; point is at start - (if (numberp flyspell-auto-correct-previous-pos) - (goto-char flyspell-auto-correct-previous-pos)) - (flyspell-auto-correct-word)) - ;; the point may have moved so reset this - (setq flyspell-auto-correct-previous-pos (point)))))) + (when flyspell-auto-correct-previous-pos + (save-excursion + (goto-char flyspell-auto-correct-previous-pos) + (let ((ispell-following-word t)) ;; point is at start + (if (numberp flyspell-auto-correct-previous-pos) + (goto-char flyspell-auto-correct-previous-pos)) + (flyspell-auto-correct-word)) + ;; the point may have moved so reset this + (setq flyspell-auto-correct-previous-pos (point)))))))) ;*---------------------------------------------------------------------*/ ;* flyspell-correct-word ... */ @@ -1814,72 +1952,76 @@ The word checked is the word at the mouse position." (let ((save (point))) (mouse-set-point event) (let ((cursor-location (point)) - (word (flyspell-get-word nil)) - start end poss replace) - ;; destructure return word info list. - (setq start (car (cdr word)) - end (car (cdr (cdr word))) - word (car word)) - ;; now check spelling of word. - (process-send-string ispell-process "%\n") ;put in verbose mode - (process-send-string ispell-process (concat "^" word "\n")) - ;; wait until ispell has processed word - (while (progn - (accept-process-output ispell-process) - (not (string= "" (car ispell-filter))))) - (setq ispell-filter (cdr ispell-filter)) - (if (consp ispell-filter) - (setq poss (ispell-parse-output (car ispell-filter)))) - (cond ((or (eq poss t) (stringp poss)) - ;; don't correct word - t) - ((null poss) - ;; ispell error - (error "Ispell: error in Ispell process")) - ((string-match "GNU" (emacs-version)) - ;; the word is incorrect, we have to propose a replacement - (setq replace (flyspell-emacs-popup event poss word)) - (cond ((eq replace 'ignore) - (goto-char save) - nil) - ((eq replace 'save) - (goto-char save) - (process-send-string ispell-process (concat "*" word "\n")) - (flyspell-unhighlight-at cursor-location) - (setq ispell-pdict-modified-p '(t))) - ((or (eq replace 'buffer) (eq replace 'session)) - (process-send-string ispell-process (concat "@" word "\n")) - (if (null ispell-pdict-modified-p) - (setq ispell-pdict-modified-p - (list ispell-pdict-modified-p))) - (flyspell-unhighlight-at cursor-location) - (goto-char save) - (if (eq replace 'buffer) - (ispell-add-per-file-word-list word))) - (replace - (flyspell-unhighlight-at cursor-location) - (let ((new-word (if (atom replace) - replace - (car replace))) - (cursor-location (+ (- (length word) (- end start)) - cursor-location))) - (if (not (equal new-word (car poss))) - (let ((old-max (point-max))) - (delete-region start end) - (funcall flyspell-insert-function new-word) - (if flyspell-abbrev-p - (flyspell-define-abbrev word new-word)) - (flyspell-ajust-cursor-point save - cursor-location - old-max))))) - (t - (goto-char save) - nil))) - ((eq flyspell-emacs 'xemacs) - (flyspell-xemacs-popup - event poss word cursor-location start end save) - (goto-char save))) - (ispell-pdict-save t)))) + (word (flyspell-get-word nil))) + (if (consp word) + (let ((start (car (cdr word))) + (end (car (cdr (cdr word)))) + (word (car word)) + poss replace) + ;; now check spelling of word. + (process-send-string ispell-process "%\n") ;put in verbose mode + (process-send-string ispell-process (concat "^" word "\n")) + ;; wait until ispell has processed word + (while (progn + (accept-process-output ispell-process) + (not (string= "" (car ispell-filter))))) + (setq ispell-filter (cdr ispell-filter)) + (if (consp ispell-filter) + (setq poss (ispell-parse-output (car ispell-filter)))) + (cond + ((or (eq poss t) (stringp poss)) + ;; don't correct word + t) + ((null poss) + ;; ispell error + (error "Ispell: error in Ispell process")) + ((string-match "GNU" (emacs-version)) + ;; the word is incorrect, we have to propose a replacement + (setq replace (flyspell-emacs-popup event poss word)) + (cond ((eq replace 'ignore) + (goto-char save) + nil) + ((eq replace 'save) + (goto-char save) + (process-send-string ispell-process + (concat "*" word "\n")) + (flyspell-unhighlight-at cursor-location) + (setq ispell-pdict-modified-p '(t))) + ((or (eq replace 'buffer) (eq replace 'session)) + (process-send-string ispell-process + (concat "@" word "\n")) + (if (null ispell-pdict-modified-p) + (setq ispell-pdict-modified-p + (list ispell-pdict-modified-p))) + (flyspell-unhighlight-at cursor-location) + (goto-char save) + (if (eq replace 'buffer) + (ispell-add-per-file-word-list word))) + (replace + (flyspell-unhighlight-at cursor-location) + (let ((new-word (if (atom replace) + replace + (car replace))) + (cursor-location + (+ (- (length word) (- end start)) + cursor-location))) + (if (not (equal new-word (car poss))) + (let ((old-max (point-max))) + (delete-region start end) + (funcall flyspell-insert-function new-word) + (if flyspell-abbrev-p + (flyspell-define-abbrev word new-word)) + (flyspell-ajust-cursor-point save + cursor-location + old-max))))) + (t + (goto-char save) + nil))) + ((eq flyspell-emacs 'xemacs) + (flyspell-xemacs-popup + event poss word cursor-location start end save) + (goto-char save))) + (ispell-pdict-save t)))))) ;*---------------------------------------------------------------------*/ ;* flyspell-xemacs-correct ... */ From cad2b41461c2b773f4297aad9e90aa7dab1550df Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 29 May 2005 14:38:52 +0000 Subject: [PATCH 143/294] (flyspell-auto-correct-previous-word): Undo the change that moves to end of the current word. --- lisp/ChangeLog | 14 +++++++++++--- lisp/textmodes/flyspell.el | 1 - 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 493435c96dd..7c5062261c4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-05-29 Richard M. Stallman + + * textmodes/flyspell.el (flyspell-auto-correct-previous-word): + Undo the change that moves to end of the current word. + 2005-05-29 Nick Roberts * progmodes/gdb-ui.el (gdb-memory-set-repeat-count): @@ -27,7 +32,13 @@ * progmodes/which-func.el (which-func-update-1): Turn the mode off in case of error by setting which-func-mode. + +2005-05-29 Peter Heslin (tiny change) + * flyspell.el (flyspell-auto-correct-previous-word): + Narrow down to what's on the screen, and recenter overlays + at the end of the next word. + 2005-05-29 Manuel Serrano * flyspell.el (flyspell-emacs, flyspell-use-local-map): Vars moved up. @@ -71,9 +82,6 @@ (flyspell-highlight-incorrect-region): Clean up overlays in region. (flyspell-auto-correct-word): Check that WORD is a cons. (flyspell-correct-word): Likewise. - (flyspell-auto-correct-previous-word): - Narrow down to what's on the screen, and recenter overlays - at the end of the next word. 2005-05-29 Daniel Pfeiffer diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 3175b73c22a..0b65993df3c 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -1901,7 +1901,6 @@ But don't look beyond what's visible on the screen." (save-excursion (save-restriction (narrow-to-region top bot) - (re-search-forward "\\s \\|\\'" nil t) (overlay-recenter (point)) (add-hook 'pre-command-hook From 01f52a8797d5da496d96561f7003e2ef69c1eb0b Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sun, 29 May 2005 14:44:08 +0000 Subject: [PATCH 144/294] (Major Mode Conventions): A derived mode only needs to put the call to the parent mode inside `delay-mode-hooks'. --- lispref/modes.texi | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lispref/modes.texi b/lispref/modes.texi index 488265b0b68..c8152705439 100644 --- a/lispref/modes.texi +++ b/lispref/modes.texi @@ -437,10 +437,8 @@ The major mode command may start by calling some other major mode command (called the @dfn{parent mode}) and then alter some of its settings. A mode that does this is called a @dfn{derived mode}. The recommended way to define one is to use @code{define-derived-mode}, -but this is not required. Such a mode should use -@code{delay-mode-hooks} around its entire body (including the call to -the parent mode command) @emph{except} for the final call to -@code{run-mode-hooks}, which runs the derived mode's hook. (Using +but this is not required. Such a mode should call the parent mode +command inside a @code{delay-mode-hooks} form. (Using @code{define-derived-mode} does this automatically.) @xref{Derived Modes}, and @ref{Mode Hooks}. From 7fa9f4ebb3b49b3a8edfdac4129438944f5e4f97 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sun, 29 May 2005 15:04:53 +0000 Subject: [PATCH 145/294] *** empty log message *** --- lisp/ChangeLog | 16 +++++++++++----- lispref/ChangeLog | 5 +++++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7c5062261c4..44dad961c60 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2005-05-29 Luc Teirlinck + + * progmodes/inf-lisp.el (inferior-lisp-mode): Use delay-mode-hooks. + + * ielm.el (inferior-emacs-lisp-mode): Ditto. + 2005-05-29 Richard M. Stallman * textmodes/flyspell.el (flyspell-auto-correct-previous-word): @@ -15,7 +21,7 @@ * flyspell.el (flyspell-version): Function deleted. (flyspell-auto-correct-previous-hook): Doc fix. - + * jit-lock.el (jit-lock-function, jit-lock-after-change): Do nothing if memory is full. @@ -32,15 +38,15 @@ * progmodes/which-func.el (which-func-update-1): Turn the mode off in case of error by setting which-func-mode. - + 2005-05-29 Peter Heslin (tiny change) * flyspell.el (flyspell-auto-correct-previous-word): - Narrow down to what's on the screen, and recenter overlays + Narrow down to what's on the screen, and recenter overlays at the end of the next word. - + 2005-05-29 Manuel Serrano - + * flyspell.el (flyspell-emacs, flyspell-use-local-map): Vars moved up. (flyspell-default-delayed-commands): add backward-delete-char-untabify. (flyspell-abbrev-p): Default to nil. diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 6e8700f1b36..6077deea9bb 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,8 @@ +2005-05-29 Luc Teirlinck + + * modes.texi (Major Mode Conventions): A derived mode only needs + to put the call to the parent mode inside `delay-mode-hooks'. + 2005-05-29 Richard M. Stallman * modes.texi (Mode Hooks): Explain that after-change-major-mode-hook is From e89a81c02e4ae1d8b4472deeefb2e15f9bbcb3c2 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sun, 29 May 2005 15:07:28 +0000 Subject: [PATCH 146/294] (inferior-lisp-mode): Use delay-mode-hooks. --- lisp/progmodes/inf-lisp.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el index b59ac86d417..ad7c4cb4cf2 100644 --- a/lisp/progmodes/inf-lisp.el +++ b/lisp/progmodes/inf-lisp.el @@ -260,7 +260,8 @@ Paragraphs are separated only by blank lines. Semicolons start comments. If you accidentally suspend your process, use \\[comint-continue-subjob] to continue it." (interactive) - (comint-mode) + (delay-mode-hooks + (comint-mode)) (setq comint-prompt-regexp inferior-lisp-prompt) (setq major-mode 'inferior-lisp-mode) (setq mode-name "Inferior Lisp") From 9c5e65b24bd01b0a5dc281d46020e9d03d27a078 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sun, 29 May 2005 15:09:39 +0000 Subject: [PATCH 147/294] (inferior-emacs-lisp-mode): Use delay-mode-hooks.. --- lisp/ielm.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/ielm.el b/lisp/ielm.el index 757b31a47f4..5a91361f2d2 100644 --- a/lisp/ielm.el +++ b/lisp/ielm.el @@ -480,7 +480,8 @@ The behaviour of IELM may be customized with the following variables: Customized bindings may be defined in `ielm-map', which currently contains: \\{ielm-map}" (interactive) - (comint-mode) + (delay-mode-hooks + (comint-mode)) (setq comint-prompt-regexp (concat "^" (regexp-quote ielm-prompt))) (set (make-local-variable 'paragraph-separate) "\\'") (make-local-variable 'paragraph-start) From fbc6ab1a4d4c1bc1b65c009119741d0fc624bbf0 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sun, 29 May 2005 15:58:27 +0000 Subject: [PATCH 148/294] (Mode Hooks): Fix typo. --- lispref/modes.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lispref/modes.texi b/lispref/modes.texi index c8152705439..f8c1ae82a4e 100644 --- a/lispref/modes.texi +++ b/lispref/modes.texi @@ -1131,7 +1131,7 @@ in sequence at the end, just before These conventions are new in Emacs 22, and some major modes implemented by users do not follow them yet. So if you put a function onto @code{after-change-major-mode-hook}, keep in mind that some modes -will fail to run it. If user complains about that, you can respond, +will fail to run it. If a user complains about that, you can respond, ``That major mode fails to follow Emacs conventions, and that's why it fails to work. Please fix the major mode.'' In most cases, that is good enough, so go ahead and use @code{after-change-major-mode-hook}. From 7397a79f133a85bcf2cb88d6432e60510f6ee590 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Sun, 29 May 2005 16:09:04 +0000 Subject: [PATCH 149/294] (change-log-font-lock-keywords): Add `+' to e-mail regexp to accept mail address with keywords. --- lisp/add-log.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/add-log.el b/lisp/add-log.el index 6dcbfca0c26..4131b237e5c 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el @@ -220,7 +220,7 @@ Note: The search is conducted only within 10%, at the beginning of the file." ("^\\sw.........[0-9:+ ]*" (0 'change-log-date-face) ;; Name and e-mail; some people put e-mail in parens, not angles. - ("\\([^<(]+?\\)[ \t]*[(<]\\([A-Za-z0-9_.-]+@[A-Za-z0-9_.-]+\\)[>)]" nil nil + ("\\([^<(]+?\\)[ \t]*[(<]\\([A-Za-z0-9_.+-]+@[A-Za-z0-9_.-]+\\)[>)]" nil nil (1 'change-log-name-face) (2 'change-log-email-face))) ;; From 5f43c63c204e8d746abdf5702856e081dfd5602b Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Sun, 29 May 2005 16:09:50 +0000 Subject: [PATCH 150/294] (Man-name-regexp): Add `:' to accept qualified names. --- lisp/ChangeLog | 7 +++++++ lisp/man.el | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 44dad961c60..aaf3b286f3d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2005-05-29 Juri Linkov + + * add-log.el (change-log-font-lock-keywords): + Add `+' to e-mail regexp to accept mail address with keywords. + + * man.el (Man-name-regexp): Add `:' to accept qualified names. + 2005-05-29 Luc Teirlinck * progmodes/inf-lisp.el (inferior-lisp-mode): Use delay-mode-hooks. diff --git a/lisp/man.el b/lisp/man.el index aa5bd04dd57..d7344ed2f7a 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -259,7 +259,7 @@ the associated section number." (defvar Man-cooked-hook nil "Hook run after removing backspaces but before `Man-mode' processing.") -(defvar Man-name-regexp "[-a-zA-Z0-9_­+][-a-zA-Z0-9_.­+]*" +(defvar Man-name-regexp "[-a-zA-Z0-9_­+][-a-zA-Z0-9_.:­+]*" "Regular expression describing the name of a manpage (without section).") (defvar Man-section-regexp "[0-9][a-zA-Z+]*\\|[LNln]" From dd168a3e47cc6cfc109cc71eca02ed081bbe51d8 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 30 May 2005 02:49:54 +0000 Subject: [PATCH 151/294] (calc-user-invocation): Check if calc-invocation-macro is non-nil. --- lisp/calc/calc.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 7656f14bb87..dbc5e90b917 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -3431,7 +3431,7 @@ Also looks for the equivalent TeX words, \\gets and \\evalto." (defun calc-user-invocation () (interactive) - (unless (stringp calc-invocation-macro) + (unless calc-invocation-macro (error "Use `Z I' inside Calc to define a `M-# Z' keyboard macro")) (execute-kbd-macro calc-invocation-macro nil)) From 2a1669a2a1715223b3c37ce789294616d2d87324 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 30 May 2005 02:56:59 +0000 Subject: [PATCH 152/294] *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index aaf3b286f3d..23a6687dc66 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-05-29 Jay Belanger + + * calc/calc.el (calc-user-invocation): Check if + calc-invocation-macro is non-nil. + 2005-05-29 Juri Linkov * add-log.el (change-log-font-lock-keywords): From 9ad41fb7a1e796727bf109c190bbb475d2bdee95 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 30 May 2005 03:52:48 +0000 Subject: [PATCH 153/294] *** empty log message *** --- lisp/gnus/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index a5e1ccb3f7f..90a86b06f44 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,7 @@ +2005-05-29 Richard M. Stallman + + * gnus-cite.el (gnus-cite-add-face): Set overlay's evaporate property. + 2005-05-27 Katsumi Yamaoka * gnus-util.el (gnus-run-mode-hooks): New function. From 4809e59f4281d80077c1d2714a79fa0001c6b34e Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Mon, 30 May 2005 06:10:14 +0000 Subject: [PATCH 154/294] *** empty log message *** --- lisp/ChangeLog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 23a6687dc66..c0c31005681 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2005-05-30 Nick Roberts + + * progmodes/gdb-ui.el (gdb-toggle-breakpoint): + Make regexp more robust. + (gdb-display-assembler-buffer, gdb-frame-assembler-buffer): + Force regeneration of disassembly. + 2005-05-29 Jay Belanger * calc/calc.el (calc-user-invocation): Check if From af3f7411df31f32e1c26eea1ce67f4239a3989b1 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Mon, 30 May 2005 06:11:01 +0000 Subject: [PATCH 155/294] (gdb-toggle-breakpoint): Make regexp more robust. (gdb-display-assembler-buffer, gdb-frame-assembler-buffer): Force regeneration of disassembly. --- lisp/progmodes/gdb-ui.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 54778b7b89c..c906e101339 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -1446,9 +1446,9 @@ static char *magick[] = { (save-excursion (beginning-of-line 1) (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) - (looking-at "\\([0-9]+\\).*point\\s-*\\S-*\\s-*\\(.\\)") + (looking-at "\\([0-9]+\\).*?point\\s-+\\S-+\\s-+\\(.\\)\\s-+") (looking-at - "\\([0-9]+\\)\\s-*\\S-*\\s-*\\S-*\\s-*\\(.\\)\\s-*\\S-*\\s-*\\S-*:[0-9]+")) + "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\(.\\)\\s-+\\S-+\\s-+\\S-+:[0-9]+")) (gdb-enqueue-input (list (concat gdb-server-prefix @@ -2554,12 +2554,14 @@ BUFFER nil or omitted means use the current buffer." (defun gdb-display-assembler-buffer () "Display disassembly view." (interactive) + (setq gdb-previous-frame nil) (gdb-display-buffer (gdb-get-create-buffer 'gdb-assembler-buffer))) (defun gdb-frame-assembler-buffer () "Display disassembly view in a new frame." (interactive) + (setq gdb-previous-frame nil) (let ((special-display-regexps (append special-display-regexps '(".*"))) (special-display-frame-alist gdb-frame-parameters)) (display-buffer (gdb-get-create-buffer 'gdb-assembler-buffer)))) From cbd87c94ac75cbc30b069dd56af48b30ab2952b0 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 30 May 2005 06:49:18 +0000 Subject: [PATCH 156/294] (byte-compile-nogroup-warn): Warn only when name to be defined is quoted. --- lisp/emacs-lisp/bytecomp.el | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index e5b429604c7..3948dae610b 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1248,15 +1248,15 @@ extra args." (defun byte-compile-nogroup-warn (form) (let ((keyword-args (cdr (cdr (cdr (cdr form))))) (name (cadr form))) - (unless (plist-get keyword-args :group) - (byte-compile-warn - "%s for `%s' fails to specify containing group" - (cdr (assq (car form) - '((custom-declare-group . defgroup) - (custom-declare-face . defface) - (custom-declare-variable . defcustom)))) - (if (and (consp name) (eq (car name) 'quote)) - (cadr name) name))))) + (or (plist-get keyword-args :group) + (not (and (consp name) (eq (car name) 'quote))) + (byte-compile-warn + "%s for `%s' fails to specify containing group" + (cdr (assq (car form) + '((custom-declare-group . defgroup) + (custom-declare-face . defface) + (custom-declare-variable . defcustom)))) + (cadr name))))) ;; Warn if the function or macro is being redefined with a different ;; number of arguments. From ced6cb71123f2bbadeceb9a8737b4dc844834564 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 30 May 2005 06:49:59 +0000 Subject: [PATCH 157/294] Use eval-buffer, not eval-current-buffer. --- lisp/emulation/tpu-mapper.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emulation/tpu-mapper.el b/lisp/emulation/tpu-mapper.el index 68a760e2011..db2daf09093 100644 --- a/lisp/emulation/tpu-mapper.el +++ b/lisp/emulation/tpu-mapper.el @@ -375,7 +375,7 @@ ;;; ;;; Load the newly defined keys and clean up ;;; -(eval-current-buffer) +(eval-buffer) (kill-buffer (current-buffer)) (kill-buffer "*scratch*") (kill-buffer "Gold-Keys") From ff4ed9e5e2105a06b3c3fb03531921f20c8d9de0 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 30 May 2005 06:50:35 +0000 Subject: [PATCH 158/294] (pr-interactive-n-up): Use string-to-number. --- lisp/printing.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/printing.el b/lisp/printing.el index b70c55b3f98..ddfe6fd5cc0 100644 --- a/lisp/printing.el +++ b/lisp/printing.el @@ -5466,7 +5466,7 @@ non-nil." (str (pr-f-read-string (format fmt-prompt prompt mess) "1" nil "1")) int) (while (if (string-match "^\\s *[0-9]+$" str) - (setq int (string-to-int str) + (setq int (string-to-number str) prompt (cond ((< int 1) "Integer below 1; ") ((> int 100) "Integer above 100; ") (t nil))) From b8caac06e0174eedfcb8e89a26f88e27eb7433ad Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 30 May 2005 06:51:33 +0000 Subject: [PATCH 159/294] (filesets-menu-ensure-use-cached): Prevent warning when emacs-version>= is undefined. --- lisp/ChangeLog | 12 ++++++++++++ lisp/filesets.el | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c0c31005681..f7104c21885 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,15 @@ +2005-05-30 Richard M. Stallman + + * filesets.el (filesets-menu-ensure-use-cached): + Prevent warning when emacs-version>= is undefined. + + * printing.el (pr-interactive-n-up): Use string-to-number. + + * emulation/tpu-mapper.el: Use eval-buffer, not eval-current-buffer. + + * emacs-lisp/bytecomp.el (byte-compile-nogroup-warn): + Warn only when name to be defined is quoted. + 2005-05-30 Nick Roberts * progmodes/gdb-ui.el (gdb-toggle-breakpoint): diff --git a/lisp/filesets.el b/lisp/filesets.el index 9d60f20316f..7bbf55d9823 100644 --- a/lisp/filesets.el +++ b/lisp/filesets.el @@ -132,7 +132,8 @@ Is buffer local variable.") (defvar filesets-menu-ensure-use-cached (and filesets-running-xemacs - (not (emacs-version>= 21 5))) + (if (fboundp 'emacs-version>=) + (not (emacs-version>= 21 5)))) "Make sure (X)Emacs uses filesets' cache. Well, if you use XEmacs (prior to 21.5?) custom.el is loaded after From cfcd5c914a4b35939c62255e67e5a033aa7aa7e5 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Mon, 30 May 2005 08:20:19 +0000 Subject: [PATCH 160/294] Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-336 Merge from gnus--rel--5.10 Patches applied: * gnus--rel--5.10 (patch 74-75) - Merge from emacs--cvs-trunk--0 - Update from CVS 2005-05-30 Katsumi Yamaoka * lisp/gnus/gnus-agent.el (gnus-category-mode): Use gnus-run-mode-hooks. * lisp/gnus/gnus-art.el (gnus-article-mode): Use gnus-run-mode-hooks. * lisp/gnus/gnus-cus.el (gnus-custom-mode): Use gnus-run-mode-hooks. * lisp/gnus/gnus-eform.el (gnus-edit-form-mode): Use gnus-run-mode-hooks. * lisp/gnus/gnus-group.el (gnus-group-mode): Use gnus-run-mode-hooks. * lisp/gnus/gnus-kill.el (gnus-kill-file-mode): Use gnus-run-mode-hooks. * lisp/gnus/gnus-salt.el (gnus-tree-mode): Use gnus-run-mode-hooks. (gnus-carpal-mode): Ditto. * lisp/gnus/gnus-srvr.el (gnus-server-mode): Use gnus-run-mode-hooks. (gnus-browse-mode): Ditto. * lisp/gnus/gnus-sum.el (gnus-summary-mode): Use gnus-run-mode-hooks. * lisp/gnus/gnus-util.el (gnus-run-mode-hooks): Save current buffer. --- lisp/gnus/ChangeLog | 24 ++++++++++++++++++++++++ lisp/gnus/gnus-agent.el | 2 +- lisp/gnus/gnus-art.el | 2 +- lisp/gnus/gnus-cus.el | 4 ++-- lisp/gnus/gnus-eform.el | 4 ++-- lisp/gnus/gnus-group.el | 4 ++-- lisp/gnus/gnus-kill.el | 4 ++-- lisp/gnus/gnus-salt.el | 6 +++--- lisp/gnus/gnus-srvr.el | 7 ++++--- lisp/gnus/gnus-sum.el | 2 +- lisp/gnus/gnus-util.el | 7 ++++--- 11 files changed, 46 insertions(+), 20 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 90a86b06f44..16db594bf01 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,27 @@ +2005-05-30 Katsumi Yamaoka + + * gnus-agent.el (gnus-category-mode): Use gnus-run-mode-hooks. + + * gnus-art.el (gnus-article-mode): Use gnus-run-mode-hooks. + + * gnus-cus.el (gnus-custom-mode): Use gnus-run-mode-hooks. + + * gnus-eform.el (gnus-edit-form-mode): Use gnus-run-mode-hooks. + + * gnus-group.el (gnus-group-mode): Use gnus-run-mode-hooks. + + * gnus-kill.el (gnus-kill-file-mode): Use gnus-run-mode-hooks. + + * gnus-salt.el (gnus-tree-mode): Use gnus-run-mode-hooks. + (gnus-carpal-mode): Ditto. + + * gnus-srvr.el (gnus-server-mode): Use gnus-run-mode-hooks. + (gnus-browse-mode): Ditto. + + * gnus-sum.el (gnus-summary-mode): Use gnus-run-mode-hooks. + + * gnus-util.el (gnus-run-mode-hooks): Save current buffer. + 2005-05-29 Richard M. Stallman * gnus-cite.el (gnus-cite-add-face): Set overlay's evaporate property. diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el index ff09f3bcb19..3d353d1ba56 100644 --- a/lisp/gnus/gnus-agent.el +++ b/lisp/gnus/gnus-agent.el @@ -2552,7 +2552,7 @@ The following commands are available: (buffer-disable-undo) (setq truncate-lines t) (setq buffer-read-only t) - (gnus-run-hooks 'gnus-category-mode-hook)) + (gnus-run-mode-hooks 'gnus-category-mode-hook)) (defalias 'gnus-category-position-point 'gnus-goto-colon) diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 5d0e7835d7f..70096b58729 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -3742,7 +3742,7 @@ commands: (setq buffer-read-only t) (set-syntax-table gnus-article-mode-syntax-table) (mm-enable-multibyte) - (gnus-run-hooks 'gnus-article-mode-hook)) + (gnus-run-mode-hooks 'gnus-article-mode-hook)) (defun gnus-article-setup-buffer () "Initialize the article buffer." diff --git a/lisp/gnus/gnus-cus.el b/lisp/gnus/gnus-cus.el index 4388db5c9e5..0c31ea9dd1b 100644 --- a/lisp/gnus/gnus-cus.el +++ b/lisp/gnus/gnus-cus.el @@ -1,6 +1,6 @@ ;;; gnus-cus.el --- customization commands for Gnus ;; -;; Copyright (C) 1996, 1999, 2000, 2001, 2002, 2003, 2004 +;; Copyright (C) 1996, 1999, 2000, 2001, 2002, 2003, 2004, 2005 ;; Free Software Foundation, Inc. ;; Author: Per Abrahamsen @@ -67,7 +67,7 @@ if that value is non-nil." (set (make-local-variable 'widget-push-button-suffix) "") (set (make-local-variable 'widget-link-prefix) "") (set (make-local-variable 'widget-link-suffix) "")) - (gnus-run-hooks 'gnus-custom-mode-hook)) + (gnus-run-mode-hooks 'gnus-custom-mode-hook)) ;;; Group Customization: diff --git a/lisp/gnus/gnus-eform.el b/lisp/gnus/gnus-eform.el index ae5debaff01..b1e83eab7ec 100644 --- a/lisp/gnus/gnus-eform.el +++ b/lisp/gnus/gnus-eform.el @@ -1,5 +1,5 @@ ;;; gnus-eform.el --- a mode for editing forms for Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2004 +;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2004, 2005 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -83,7 +83,7 @@ It is a slightly enhanced emacs-lisp-mode. (use-local-map gnus-edit-form-mode-map) (make-local-variable 'gnus-edit-form-done-function) (make-local-variable 'gnus-prev-winconf) - (gnus-run-hooks 'gnus-edit-form-mode-hook)) + (gnus-run-mode-hooks 'gnus-edit-form-mode-hook)) (defun gnus-edit-form (form documentation exit-func) "Edit FORM in a new buffer. diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 30b7fe68dd1..44d59729b6f 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -1,5 +1,5 @@ ;;; gnus-group.el --- group mode commands for Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -1042,7 +1042,7 @@ The following commands are available: (gnus-undo-mode 1)) (when gnus-slave (gnus-slave-mode)) - (gnus-run-hooks 'gnus-group-mode-hook)) + (gnus-run-mode-hooks 'gnus-group-mode-hook)) (defun gnus-update-group-mark-positions () (save-excursion diff --git a/lisp/gnus/gnus-kill.el b/lisp/gnus/gnus-kill.el index 7b04422b36c..e35ee0858b4 100644 --- a/lisp/gnus/gnus-kill.el +++ b/lisp/gnus/gnus-kill.el @@ -1,5 +1,5 @@ ;;; gnus-kill.el --- kill commands for Gnus -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003 +;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 ;; Free Software Foundation, Inc. ;; Author: Masanobu UMEDA @@ -161,7 +161,7 @@ gnus-kill-file-mode-hook with no arguments, if that value is non-nil." (setq major-mode 'gnus-kill-file-mode) (setq mode-name "Kill") (lisp-mode-variables nil) - (gnus-run-hooks 'emacs-lisp-mode-hook 'gnus-kill-file-mode-hook)) + (gnus-run-mode-hooks 'emacs-lisp-mode-hook 'gnus-kill-file-mode-hook)) (defun gnus-kill-file-edit-file (newsgroup) "Begin editing a kill file for NEWSGROUP. diff --git a/lisp/gnus/gnus-salt.el b/lisp/gnus/gnus-salt.el index 0f4984112f5..f3ad1546993 100644 --- a/lisp/gnus/gnus-salt.el +++ b/lisp/gnus/gnus-salt.el @@ -1,6 +1,6 @@ ;;; gnus-salt.el --- alternate summary mode interfaces for Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2001 +;; Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2004, 2005 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -496,7 +496,7 @@ Two predefined functions are available: (gnus-set-work-buffer) (gnus-tree-node-insert (make-mail-header "") nil) (setq gnus-tree-node-length (1- (point)))) - (gnus-run-hooks 'gnus-tree-mode-hook)) + (gnus-run-mode-hooks 'gnus-tree-mode-hook)) (defun gnus-tree-read-summary-keys (&optional arg) "Read a summary buffer key sequence and execute it." @@ -1009,7 +1009,7 @@ The following commands are available: (buffer-disable-undo) (setq buffer-read-only t) (make-local-variable 'gnus-carpal-attached-buffer) - (gnus-run-hooks 'gnus-carpal-mode-hook)) + (gnus-run-mode-hooks 'gnus-carpal-mode-hook)) (defun gnus-carpal-setup-buffer (type) (let ((buffer (symbol-value (intern (format "gnus-carpal-%s-buffer" type))))) diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el index 7b3c033fddb..1c2ba9447ff 100644 --- a/lisp/gnus/gnus-srvr.el +++ b/lisp/gnus/gnus-srvr.el @@ -1,5 +1,6 @@ ;;; gnus-srvr.el --- virtual server support for Gnus -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, +;; 2004, 2005 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -269,7 +270,7 @@ The following commands are available: (put 'gnus-server-mode 'font-lock-defaults '(gnus-server-font-lock-keywords t)) (set (make-local-variable 'font-lock-defaults) '(gnus-server-font-lock-keywords t))) - (gnus-run-hooks 'gnus-server-mode-hook)) + (gnus-run-mode-hooks 'gnus-server-mode-hook)) (defun gnus-server-insert-server-line (gnus-tmp-name method) (let* ((gnus-tmp-how (car method)) @@ -849,7 +850,7 @@ buffer. (setq truncate-lines t) (gnus-set-default-directory) (setq buffer-read-only t) - (gnus-run-hooks 'gnus-browse-mode-hook)) + (gnus-run-mode-hooks 'gnus-browse-mode-hook)) (defun gnus-browse-read-group (&optional no-article number) "Enter the group at the current line. diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 17cb1ea2a6b..fd44e475ddd 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -2722,7 +2722,7 @@ The following commands are available: (make-local-variable 'gnus-summary-mark-positions) (gnus-make-local-hook 'pre-command-hook) (add-hook 'pre-command-hook 'gnus-set-global-variables nil t) - (gnus-run-hooks 'gnus-summary-mode-hook) + (gnus-run-mode-hooks 'gnus-summary-mode-hook) (turn-on-gnus-mailing-list-mode) (mm-enable-multibyte) (gnus-update-format-specifications nil 'summary 'summary-mode 'summary-dummy) diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 9e409001cf0..0f92c1fc189 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -1016,10 +1016,11 @@ ARG is passed to the first function." (apply 'run-hooks funcs))) (defun gnus-run-mode-hooks (&rest funcs) - "Run `run-mode-hooks' if it is available. Otherwise run `run-hooks'." + "Run `run-mode-hooks' if it is available, otherwise `run-hooks'. +This function saves the current buffer." (if (fboundp 'run-mode-hooks) - (apply 'run-mode-hooks funcs) - (apply 'run-hooks funcs))) + (save-current-buffer (apply 'run-mode-hooks funcs)) + (save-current-buffer (apply 'run-hooks funcs)))) ;;; Various From 0df06447d496ba82bd595c1d272a8c9dcfb417b9 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 30 May 2005 09:45:11 +0000 Subject: [PATCH 161/294] (thumbs-thumbname): The resulting thubname includes a hash value to improve its uniqueness, and has a ".jpg" extension. Also, it is now a valid filename on all systems. (thumbs-make-thumb): Use `let', not `let*'. (thumbs-show-thumbs-list): Check for JPEG availability. --- lisp/ChangeLog | 16 ++++++++++++---- lisp/thumbs.el | 26 +++++++++++++++----------- 2 files changed, 27 insertions(+), 15 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f7104c21885..fee028e52eb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2005-05-30 Juanma Barranquero + + * thumbs.el (thumbs-thumbname): The resulting thubname now + includes a hash value to improve its uniqueness, and has a ".jpg" + extension. Also, it is now a valid filename on all systems. + (thumbs-make-thumb): Use `let', not `let*'. + (thumbs-show-thumbs-list): Check for JPEG availability. + 2005-05-30 Richard M. Stallman * filesets.el (filesets-menu-ensure-use-cached): @@ -14,7 +22,7 @@ * progmodes/gdb-ui.el (gdb-toggle-breakpoint): Make regexp more robust. - (gdb-display-assembler-buffer, gdb-frame-assembler-buffer): + (gdb-display-assembler-buffer, gdb-frame-assembler-buffer): Force regeneration of disassembly. 2005-05-29 Jay Belanger @@ -79,7 +87,7 @@ 2005-05-29 Manuel Serrano * flyspell.el (flyspell-emacs, flyspell-use-local-map): Vars moved up. - (flyspell-default-delayed-commands): add backward-delete-char-untabify. + (flyspell-default-delayed-commands): Add backward-delete-char-untabify. (flyspell-abbrev-p): Default to nil. (flyspell-use-global-abbrev-table-p): Doc fix. (flyspell-large-region): Allow nil as value. @@ -130,7 +138,7 @@ 2005-05-28 Karl Berry - * textmodes/tex-mode.el: now that tex-send-command calls + * textmodes/tex-mode.el: Now that tex-send-command calls shell-quote-argument (2005-03-31 change), remove all calls to shell-quote-argument; they all end up invoking tex-send-command. The double quoting loses on filenames with non-safe characters, @@ -172,7 +180,7 @@ Toggle display of floating point registers. (gdb-registers-mode-map): Bind SPC to toggle-gdb-all-registers. - * progmodes/gud.el (gud-goto-info): Use info. Don't use require. + * progmodes/gud.el (gud-goto-info): Use info. Don't use require. (toggle-gud-tooltip-dereference): Rename from gud-toggle-tooltip-dereference. diff --git a/lisp/thumbs.el b/lisp/thumbs.el index 1657c4b01a9..03491873c9d 100644 --- a/lisp/thumbs.el +++ b/lisp/thumbs.el @@ -302,18 +302,21 @@ Or, alternatively, a SIZE may be specified." (defun thumbs-thumbname (img) "Return a thumbnail name for the image IMG." - (concat thumbs-thumbsdir "/" - (subst-char-in-string - ?\ ?\_ - (apply - 'concat - (split-string - (expand-file-name img) "/"))))) + (convert-standard-filename + (let ((filename (expand-file-name img))) + (format "%s/%08x-%s.jpg" + thumbs-thumbsdir + (sxhash filename) + (subst-char-in-string + ?\s ?\_ + (apply + 'concat + (split-string filename "/"))))))) (defun thumbs-make-thumb (img) "Create the thumbnail for IMG." - (let* ((fn (expand-file-name img)) - (tn (thumbs-thumbname img))) + (let ((fn (expand-file-name img)) + (tn (thumbs-thumbname img))) (if (or (not (file-exists-p tn)) ;; This is not the right fix, but I don't understand ;; the external program or why it produces a geometry @@ -378,8 +381,9 @@ If MARKED is non-nil, the image is marked." (unless (bobp) (newline)))) (defun thumbs-show-thumbs-list (L &optional buffer-name same-window) - (when (not (display-images-p)) - (error "Images are not supported in this Emacs session")) + (unless (and (display-images-p) + (image-type-available-p 'jpeg)) + (error "Required image type is not supported in this Emacs session")) (funcall (if same-window 'switch-to-buffer 'pop-to-buffer) (or buffer-name "*THUMB-View*")) (let ((inhibit-read-only t)) From a7868bfa4e5bdf849f97e5f6541899c3c8eff0a7 Mon Sep 17 00:00:00 2001 From: Noah Friedman Date: Mon, 30 May 2005 10:30:51 +0000 Subject: [PATCH 162/294] New file --- etc/ChangeLog | 4 + etc/emacs-buffer.gdb | 270 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 274 insertions(+) create mode 100644 etc/emacs-buffer.gdb diff --git a/etc/ChangeLog b/etc/ChangeLog index c5842407805..35c72c7b1a3 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2005-05-30 Noah Friedman + + * emacs-buffer.gdb: New file. + 2005-05-28 Richard M. Stallman * TUTORIAL.fr: Change NBSP to space. diff --git a/etc/emacs-buffer.gdb b/etc/emacs-buffer.gdb new file mode 100644 index 00000000000..b99abe8a228 --- /dev/null +++ b/etc/emacs-buffer.gdb @@ -0,0 +1,270 @@ +# emacs-buffer.gdb --- gdb macros for recovering buffers from emacs coredumps + +# Copyright (C) 2005 Free Software Foundation, Inc. + +# Maintainer: Noah Friedman +# Status: tested with Emacs 22 +# Created: 2005-04-28 + +# $Id$ + +# This file is part of GNU Emacs. +# +# GNU Emacs is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU Emacs is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Emacs; see the file COPYING. If not, write to the +# Free Software Foundation, Inc.; 51 Franklin Street, Fifth Floor; +# Boston, MA 02110-1301, USA. + +# Commentary: + +# This is a set of gdb macros for recovering the contents of buffers from +# an Emacs coredump; they may not always be file-backed or have a recent +# autosave. +# +# The Emacs executable must have debugging symbols for this to work. But +# you never strip Emacs, right? Right! +# +# The main commands of interest are `ybuffer-list', `yfile-buffers', +# `ysave-buffer', and `ybuffer-contents'. The `y' prefix avoids any +# namespace collisions with emacs/src/.gdbinit. + +# Example usage: +# +# $ gdb /export/src/emacs/2005-05-02--03-17/src/emacs core.emacs.6.9845 +# Current directory is /u/noah/ +# GNU gdb (6.1post-1.20040607.43rh) +# ... +# #0 0x400007a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 +# (gdb) source emacs-buffer.gdb +# (gdb) ybuffer-list +# B# M Size Name Mode File +# -- - ---- ---- ---- ---- +# 0 * 556 mail to emacs-devel@gnu.org Mail +# 1 * 0 *Minibuf-1* Fundamental +# 2 145769 ChangeLog Change Log /u/noah/lib/elisp/noahf/ChangeLog +# 3 6619 ascii-table.el Elisp /u/noah/lib/elisp/noahf/ascii-table.el +# 4 * 48396 *Messages* Fundamental +# 5 3191 *Apropos* Apropos +# 6 17642 init-21.el Elisp /u/noah/etc/init/emacs/init-21.el +# 7 333 cpuid.c C /u/noah/cpuid.c +# 8 230 src Dired +# 9 218 noah Dired +# 10 * 21 *Echo Area 0* Fundamental +# 11 * 0 *Echo Area 1* Fundamental +# 12 319952 *bbdb data* Text /u/noah/.bbdb +# (gdb) ysave-buffer 0 mail.save +# [Wrote buffer "mail to emacs-devel@gnu.org" to file mail.save] +# (gdb) quit +# $ ls -l mail.save +# -rw-rw-rw- 1 noah user 556 May 2 04:05 mail.save +# $ + +# Code: + +# Force loading of symbols, enough to give us gdb_valbits etc. +set main + +# When nonzero, display some extra diagnostics in various commands +set $yverbose = 1 +set $yfile_buffers_only = 0 + +set $tagmask = (((long)1 << gdb_gctypebits) - 1) +set $valmask = gdb_use_lsb ? ~($tagmask) : ((long)1 << gdb_valbits) - 1 + +define ygetptr + set $ptr = $arg0 + set $ptr = (gdb_use_union ? $ptr.u.val : $ptr & $valmask) | gdb_data_seg_bits +end + +define ybuffer-list + set $files_only = $yfile_buffers_only + set $yfile_buffers_only = 0 + + if $yverbose + printf "B# M Size Name Mode File\n" + printf "-- - ---- ---- ---- ----\n" + end + + set $i = 0 + set $alist = Vbuffer_alist + while $alist != Qnil + ygetptr $alist + set $this = ((struct Lisp_Cons *) $ptr)->car + set $alist = ((struct Lisp_Cons *) $ptr)->cdr + + # Vbuffer_alist elts are pairs of the form (name . buffer) + ygetptr $this + set $buf = ((struct Lisp_Cons *) $ptr)->cdr + ygetptr $buf + set $buf = (struct buffer *) $ptr + + if ! ($files_only && $buf->filename == Qnil) + ygetptr $buf->name + set $name = ((struct Lisp_String *) $ptr)->data + set $modp = ($buf->text->modiff > $buf->text->save_modiff) ? '*' : ' ' + + ygetptr $buf->mode_name + set $mode = ((struct Lisp_String *) $ptr)->data + + if $buf->filename != Qnil + ygetptr $buf->filename + set $filename = ((struct Lisp_String *) $ptr)->data + else + set $filename = ' ' + end + + printf "%2d %c %9d %-20s %-10s %s\n", \ + $i, $modp, ($buf->text->z_byte - 1), $name, $mode, $filename + end + + set $i++ + end +end +document ybuffer-list + Display a list of buffer names, sizes, and other attributes. + The buffer number in the first column is used as an argument + to some other emacs-buffer recovery commands, e.g. `ysave-buffer'. +end + +define yfile-buffers + set $yfile_buffers_only = 1 + ybuffer-list +end +document yfile-buffers + Display a list of buffers which are associated with files. + This is like `ybuffer-list', but only buffers that were visiting files + are displayed. +end + +define yset-buffer + set $i = $arg0 + + set $alist = Vbuffer_alist + while ($alist != Qnil && $i > 0) + ygetptr $alist + set $alist = ((struct Lisp_Cons *) $ptr)->cdr + set $i-- + end + + # Get car of alist; this is a pair (name . buffer) + ygetptr $alist + set $this = ((struct Lisp_Cons *) $ptr)->car + + # Get the buffer object + ygetptr $this + set $this = ((struct Lisp_Cons *) $ptr)->cdr + + ygetptr $this + set $ycurrent_buffer = (struct buffer *) $ptr +end +document yset-buffer + Set current buffer (for other emacs-buffer recovery commands) to the ARG'th + buffer as displayed by `ybuffer-list'. +end + +define yget-buffer-pointers + yset-buffer $arg0 + set $buf = $ycurrent_buffer->text + + set $beg = $buf->beg + set $gap = $beg + $buf->gpt_byte + set $gap_end = $gap + $buf->gap_size - 1 + set $end = $gap_end + ($buf->z_byte - $buf->gpt_byte) + + set $modp = $buf->modiff > $buf->save_modiff + + #print *$beg@($gap - $beg) + #print *$gap_end@($end - $gap_end) +end +document yget-buffer-pointers + Update convenience variables with address pointers for the ARG'th buffer + as displayed by `ybuffer-list'. + + This also sets the current buffer using `yset-buffer' (which see). +end + +define yget-current-buffer-name + set $this = $ycurrent_buffer->name + ygetptr $this + set $ycurrent_buffer_name = ((struct Lisp_String *) $ptr)->data +end +document yget-current-buffer-name + Set $ycurrent_buffer_name to the name of the currently selected buffer. +end + +define ycurrent-buffer + yget-current-buffer-name + printf "%s\n", $ycurrent_buffer_name +end +document ycurrent-buffer + Display the currently selected buffer. +end + +define ydump-buffer + yget-buffer-pointers $arg0 + if $buf->z_byte > 1 + if $buf->z_byte <= $buf->gpt_byte + set $endptr = $beg + $buf->gpt_byte - 1 + dump binary memory $arg1 $beg $endptr + else + dump binary memory $arg1 $beg $gap-1 + append binary memory $arg1 $gap_end $end + set $endptr = $end + end + end +end +document ydump-buffer + Write contents of buffer N (as numbered according to `ybuffer-list') to + file FILE. + + This is mainly used as an internal subroutine for `ysave-buffer' and + `ybuffer-contents', which see. +end + +define ysave-buffer + ydump-buffer $arg0 $arg1 + if $yverbose + yget-current-buffer-name + if $buf->z_byte <= 1 + printf "[Buffer \"%s\" is empty.]\n", $ycurrent_buffer_name + else + # Output string broken into separate calls as necessary to avoid + # requiring a running process for evaluation. + printf "[Wrote buffer \"%s\" to file ", $ycurrent_buffer_name + echo $arg1]\n + end + end +end +document ysave-buffer + Save contents of buffer N (as numbered according to `ybuffer-list') to + file FILE. +end + +define ybuffer-contents + ydump-buffer $arg0 /dev/stdout + if $yverbose && $buf->z_byte <= 1 + yget-current-buffer-name + printf "[Buffer \"%s\" is empty.]\n", $ycurrent_buffer_name + else + if *($endptr-1) != '\n' + echo \n + end + end +end +document ybuffer-contents + Write contents of buffer N (numbered according to `ybuffer-list') to stdout. +end + +# local variables: +# mode: gdb-script +# end: From 0854cf4287fcc2d76c1a7b7b0336786a8b647613 Mon Sep 17 00:00:00 2001 From: Noah Friedman Date: Mon, 30 May 2005 10:38:35 +0000 Subject: [PATCH 163/294] Mention emacs-buffer.gdb --- etc/NEWS | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index c21ffa85e67..3e5a12fde9a 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -108,6 +108,11 @@ types any more. Add -DUSE_LISP_UNION_TYPE if you want union types. --- ** When pure storage overflows while dumping, Emacs now prints how much pure storage it will approximately need. + +** The script etc/emacs-buffer.gdb can be used with gdb to retrieve the +contents of buffers from a core dump and save them to files easily, should +emacs crash. + * Startup Changes in Emacs 22.1 From 615cdecfffabcc2ec814dc394f9a3d0763ecbca7 Mon Sep 17 00:00:00 2001 From: Noah Friedman Date: Mon, 30 May 2005 10:48:33 +0000 Subject: [PATCH 164/294] (After a Crash): Mention emacs-buffer.gdb as a recovery mechanism. --- man/trouble.texi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/man/trouble.texi b/man/trouble.texi index df6a2763f3f..2c815926796 100644 --- a/man/trouble.texi +++ b/man/trouble.texi @@ -351,6 +351,13 @@ visits the file but gets the text from the auto-save file. recover are present in Emacs buffers. You should then save them. Only this---saving them---updates the files themselves. + As a last resort, if you had buffers with content which were not +associated with any files, or if the autosave was not recent enough to +have recorded important changes, you can use the +@file{etc/emacs-buffer.gdb} script with @code{gdb} to retrieve them +from a core dump--provided that a core dump was saved, and that the +emacs executable was not stripped of its debugging symbols. + @node Emergency Escape @subsection Emergency Escape From e55df387ea6d222588ec597f6308d0b308335c59 Mon Sep 17 00:00:00 2001 From: Noah Friedman Date: Mon, 30 May 2005 10:48:47 +0000 Subject: [PATCH 165/294] *** empty log message *** --- etc/ChangeLog | 1 + man/ChangeLog | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/etc/ChangeLog b/etc/ChangeLog index 35c72c7b1a3..faab8dceb07 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,6 +1,7 @@ 2005-05-30 Noah Friedman * emacs-buffer.gdb: New file. + * NEWS: Mention it. 2005-05-28 Richard M. Stallman diff --git a/man/ChangeLog b/man/ChangeLog index 6d00db07079..61d765a3a30 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,8 @@ +2005-05-30 Noah Friedman + + * trouble.texi (After a Crash): Mention emacs-buffer.gdb as a + recovery mechanism. + 2005-05-28 Jay Belanger * calc.texi (Assignments in Embedded Mode): Fix variable name. From 165408692a30fbff60917888e43cffcaa79a2be3 Mon Sep 17 00:00:00 2001 From: Noah Friedman Date: Mon, 30 May 2005 10:59:43 +0000 Subject: [PATCH 166/294] (After a Crash): Describe how to use emacs-buffer.gdb more explicitly. --- man/trouble.texi | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/man/trouble.texi b/man/trouble.texi index 2c815926796..ff846821ff2 100644 --- a/man/trouble.texi +++ b/man/trouble.texi @@ -351,12 +351,25 @@ visits the file but gets the text from the auto-save file. recover are present in Emacs buffers. You should then save them. Only this---saving them---updates the files themselves. + As a last resort, if you had buffers with content which were not associated with any files, or if the autosave was not recent enough to have recorded important changes, you can use the -@file{etc/emacs-buffer.gdb} script with @code{gdb} to retrieve them -from a core dump--provided that a core dump was saved, and that the -emacs executable was not stripped of its debugging symbols. +@file{etc/emacs-buffer.gdb} script with GDB (the GNU Debugger) to +retrieve them from a core dump--provided that a core dump was saved, +and that the Emacs executable was not stripped of its debugging +symbols. + + To use this script, run @code{gdb} with the file name of your +Emacs executable and the file name of the core dump, e.g. @samp{gdb +/usr/bin/emacs core.emacs}. At the @code{(gdb)} prompt, load the +recovery script: @samp{source /usr/src/emacs/etc/emacs-buffer.gdb}. +You can now use the commands @code{ybuffer-list} and +@code{ysave-buffer} to list and save buffers. The @code{ysave-buffer} +command takes a buffer number (as listed by @code{ybuffer-list}) and a +file name to which to write the buffer contents. You should use a +file name which does not already exist; no backups of the previous +contents of the file will be saved, if any. @node Emergency Escape @subsection Emergency Escape From 85be564d99c1a093b414b564a0af48c395937cbd Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 30 May 2005 11:20:30 +0000 Subject: [PATCH 167/294] *** empty log message *** --- lisp/ChangeLog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fee028e52eb..c51db6eee86 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -96,7 +96,7 @@ (mail-mode-flyspell-verify): More robust handling of `mail-header-separator'. More efficient signature detection. Allow for regexp metacharacters in message-header-separator. - Adding `To' not to be checked in mail-mode-flyspell-verify. + Adding `To' not to be checked in mail-mode-flyspell-verify. (flyspell-prog-mode): Run flyspell-prog-mode-hook. (flyspell-mouse-map): Bind M-TAB only if flyspell-use-meta-tab. @@ -831,7 +831,7 @@ post-command-idle-delay. * faces.el (list-faces-display): Provide button when describe-face - is called to take user back to the list of faces. + is called to take user back to the list of faces. * help-fns.el (describe-variable): Remove hyperlinks in a variable's value as these are quite frequently inappropriate. From bf87510ab4d8617528bb4240528fb8c23ae87eab Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 30 May 2005 11:30:47 +0000 Subject: [PATCH 168/294] (mark-included-diary-files): Only kill included diary buffer if it was not already being visited. Reported by Stephen Berman . --- lisp/calendar/diary-lib.el | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 312b8841cf9..c8e6843d4b2 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -1050,15 +1050,18 @@ changing the variable `diary-include-string'." (regexp-quote diary-include-string) " \"\\([^\"]*\\)\"") nil t) - (let ((diary-file (substitute-in-file-name - (buffer-substring-no-properties - (match-beginning 2) (match-end 2)))) - (mark-diary-entries-hook 'mark-included-diary-files)) + (let* ((diary-file (substitute-in-file-name + (match-string-no-properties 2))) + (mark-diary-entries-hook 'mark-included-diary-files) + (dbuff (find-buffer-visiting diary-file))) + ;; TODO if dbuff is non-nil, should we check for modifications + ;; and offer to save it first? (if (file-exists-p diary-file) (if (file-readable-p diary-file) (progn (mark-diary-entries) - (kill-buffer (find-buffer-visiting diary-file))) + (unless dbuff + (kill-buffer (find-buffer-visiting diary-file)))) (beep) (message "Can't read included diary file %s" diary-file) (sleep-for 2)) From d1f8ed14e82367fd6c49751c601ec39aa4c17f52 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 30 May 2005 11:32:09 +0000 Subject: [PATCH 169/294] (top-level): Do not require 'appt. --- lisp/calendar/icalendar.el | 1 - 1 file changed, 1 deletion(-) diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el index f37b966a45a..d15a4b78e2f 100644 --- a/lisp/calendar/icalendar.el +++ b/lisp/calendar/icalendar.el @@ -165,7 +165,6 @@ replaced by the organizer." ;; all the other libs we need ;; ====================================================================== (require 'calendar) -(require 'appt) ;; ====================================================================== ;; misc From 9c6760b6aad3f1b5c9176f992751caaa484fc01f Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 30 May 2005 11:36:35 +0000 Subject: [PATCH 170/294] (sc-select-attribution): Only use a list element from sc-attrib-selection-list if it returns a string. Reported by Davide G. M. Salvetti . --- lisp/mail/supercite.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/mail/supercite.el b/lisp/mail/supercite.el index f37988e8a3f..7ed1c2d97b6 100644 --- a/lisp/mail/supercite.el +++ b/lisp/mail/supercite.el @@ -1182,8 +1182,11 @@ to the auto-selected attribution string." (setq attribution attrib attriblist nil)) ((listp attrib) - (setq attribution (eval attrib) - attriblist nil)) + (setq attribution (eval attrib)) + (if (stringp attribution) + (setq attriblist nil) + (setq attribution nil + attriblist (cdr attriblist)))) (t (error "%s did not evaluate to a string or list!" "sc-attrib-selection-list")) ))) From 3f72dc735d8fe46001d4fc79caa82aafaf74f808 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 30 May 2005 11:50:10 +0000 Subject: [PATCH 171/294] *** empty log message *** --- lisp/ChangeLog | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c51db6eee86..1b67921f88b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,15 @@ +2005-05-30 Glenn Morris + + * calendar/diary-lib.el (mark-included-diary-files): Only kill + included diary buffer if it was not already being visited. + Reported by Stephen Berman . + + * calendar/icalendar.el (top-level): Do not require 'appt. + + * mail/supercite.el (sc-select-attribution): Only use a list + element from sc-attrib-selection-list if it returns a string. + Reported by Davide G. M. Salvetti . + 2005-05-30 Juanma Barranquero * thumbs.el (thumbs-thumbname): The resulting thubname now From 22b58b5ea09c32a86e587bb6e5a4e9dacbd73d8b Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Mon, 30 May 2005 16:54:34 +0000 Subject: [PATCH 172/294] Add arch tagline --- etc/emacs-buffer.gdb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/etc/emacs-buffer.gdb b/etc/emacs-buffer.gdb index b99abe8a228..d29a6b3ba7f 100644 --- a/etc/emacs-buffer.gdb +++ b/etc/emacs-buffer.gdb @@ -6,7 +6,7 @@ # Status: tested with Emacs 22 # Created: 2005-04-28 -# $Id$ +# $Id: emacs-buffer.gdb,v 1.1 2005/05/30 10:30:34 friedman Exp $ # This file is part of GNU Emacs. # @@ -268,3 +268,5 @@ end # local variables: # mode: gdb-script # end: + +# arch-tag: 02087f62-2663-4868-977a-1fbb2fc2e7ef From 6b5341d34af60a549a1f4f7cdd77b2016a03a7f6 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Mon, 30 May 2005 17:01:09 +0000 Subject: [PATCH 173/294] Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-338 etc/emacs-buffer.gdb: Remove RCS keywords --- etc/ChangeLog | 4 ++++ etc/emacs-buffer.gdb | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/etc/ChangeLog b/etc/ChangeLog index faab8dceb07..2a21b596300 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2005-05-30 Miles Bader + + * emacs-buffer.gdb: Remove RCS keywords. + 2005-05-30 Noah Friedman * emacs-buffer.gdb: New file. diff --git a/etc/emacs-buffer.gdb b/etc/emacs-buffer.gdb index d29a6b3ba7f..cd0bf0dd59d 100644 --- a/etc/emacs-buffer.gdb +++ b/etc/emacs-buffer.gdb @@ -6,8 +6,6 @@ # Status: tested with Emacs 22 # Created: 2005-04-28 -# $Id: emacs-buffer.gdb,v 1.1 2005/05/30 10:30:34 friedman Exp $ - # This file is part of GNU Emacs. # # GNU Emacs is free software; you can redistribute it and/or modify From e9bd5782648b11fce3900f34c14ddea46394e501 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Mon, 30 May 2005 17:13:58 +0000 Subject: [PATCH 174/294] Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-339 Merge from gnus--rel--5.10 Patches applied: * gnus--rel--5.10 (patch 76) - Update from CVS 2005-05-30 Reiner Steib * lisp/gnus/gnus-agent.el (gnus-agent-regenerate-group) (gnus-agent-fetch-articles): Replace `string-to-int' by `string-to-number'. * lisp/gnus/gnus-art.el (gnus-button-fetch-group): Ditto. * lisp/gnus/gnus-cache.el (gnus-cache-generate-active) (gnus-cache-articles-in-group): Ditto. * lisp/gnus/gnus-group.el (gnus-group-set-current-level) (gnus-group-insert-group-line): Ditto. * lisp/gnus/gnus-score.el (gnus-score-set-expunge-below) (gnus-score-set-mark-below, gnus-summary-score-effect) (gnus-summary-score-entry): Ditto. * lisp/gnus/gnus-soup.el (gnus-soup-send-packet, gnus-soup-parse-areas) (gnus-soup-pack): Ditto. * lisp/gnus/gnus-spec.el (gnus-xmas-format): Ditto. * lisp/gnus/gnus-start.el (gnus-newsrc-to-gnus-format): Ditto. * lisp/gnus/gnus-sum.el (gnus-create-xref-hashtb): Ditto. * lisp/gnus/gnus-uu.el (gnus-uu-expand-numbers): Ditto. * lisp/gnus/nnbabyl.el (nnbabyl-article-group-number): Ditto. * lisp/gnus/nndb.el (nndb-get-remote-expire-response): Ditto. * lisp/gnus/nndiary.el (nndiary-parse-schedule-value) (nndiary-string-to-number, nndiary-request-replace-article) (nndiary-request-article): Ditto. * lisp/gnus/nndoc.el (nndoc-rnews-body-end, nndoc-mbox-body-end): Ditto. * lisp/gnus/nndraft.el (nndraft-articles, nndraft-request-group): Ditto. * lisp/gnus/nneething.el (nneething-make-head): Ditto. * lisp/gnus/nnfolder.el (nnfolder-request-article) (nnfolder-retrieve-headers): Ditto. * lisp/gnus/nnheader.el (nnheader-file-to-number): Ditto. * lisp/gnus/nnkiboze.el (nnkiboze-request-article): Ditto. * lisp/gnus/nnmail.el (nnmail-process-unix-mail-format) (nnmail-process-babyl-mail-format): Ditto. * lisp/gnus/nnmbox.el (nnmbox-read-mbox, nnmbox-article-group-number): Ditto. * lisp/gnus/nnmh.el (nnmh-update-gnus-unreads, nnmh-active-number) (nnmh-request-create-group, nnmh-request-list-1) (nnmh-request-group, nnmh-request-article): Ditto. * lisp/gnus/nnml.el (nnml-request-replace-article, nnml-request-article): Ditto. * lisp/gnus/nnrss.el (nnrss-find-rss-via-syndic8): Ditto. * lisp/gnus/nnsoup.el (nnsoup-make-active): Ditto. * lisp/gnus/nnspool.el (nnspool-find-id, nnspool-request-group): Ditto. * lisp/gnus/nntp.el (nntp-find-group-and-number) (nntp-retrieve-headers-with-xover): Ditto. * lisp/gnus/pgg-gpg.el (pgg-gpg-snarf-keys-region): Ditto. * lisp/gnus/pgg-parse.el (pgg-read-body, pgg-read-bytes) (pgg-format-key-identifier): Ditto. * lisp/gnus/pop3.el (pop3-last, pop3-stat): Ditto. * lisp/gnus/qp.el (quoted-printable-decode-region): Ditto. * lisp/gnus/spam-report.el (spam-report-url-ping-mm-url): Use format instead of concat. --- lisp/gnus/ChangeLog | 52 ++++++++++++++++++++++++++++++++++++++++ lisp/gnus/gnus-agent.el | 4 ++-- lisp/gnus/gnus-art.el | 2 +- lisp/gnus/gnus-cache.el | 4 ++-- lisp/gnus/gnus-group.el | 4 ++-- lisp/gnus/gnus-score.el | 8 +++---- lisp/gnus/gnus-soup.el | 8 +++---- lisp/gnus/gnus-spec.el | 2 +- lisp/gnus/gnus-start.el | 2 +- lisp/gnus/gnus-sum.el | 2 +- lisp/gnus/gnus-uu.el | 2 +- lisp/gnus/nnbabyl.el | 2 +- lisp/gnus/nndb.el | 2 +- lisp/gnus/nndiary.el | 16 ++++++------- lisp/gnus/nndoc.el | 4 ++-- lisp/gnus/nndraft.el | 4 ++-- lisp/gnus/nneething.el | 2 +- lisp/gnus/nnfolder.el | 6 ++--- lisp/gnus/nnheader.el | 4 ++-- lisp/gnus/nnkiboze.el | 2 +- lisp/gnus/nnmail.el | 4 ++-- lisp/gnus/nnmbox.el | 4 ++-- lisp/gnus/nnmh.el | 12 +++++----- lisp/gnus/nnml.el | 4 ++-- lisp/gnus/nnrss.el | 2 +- lisp/gnus/nnsoup.el | 4 ++-- lisp/gnus/nnspool.el | 4 ++-- lisp/gnus/nntp.el | 6 ++--- lisp/gnus/pgg-gpg.el | 2 +- lisp/gnus/pgg-parse.el | 6 ++--- lisp/gnus/pop3.el | 6 ++--- lisp/gnus/qp.el | 6 ++--- lisp/gnus/spam-report.el | 4 ++-- 33 files changed, 124 insertions(+), 72 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 16db594bf01..1f8f23bbf18 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,55 @@ +2005-05-30 Reiner Steib + + * gnus-agent.el (gnus-agent-regenerate-group) + (gnus-agent-fetch-articles): Replace `string-to-int' by + `string-to-number'. + * gnus-art.el (gnus-button-fetch-group): Ditto. + * gnus-cache.el (gnus-cache-generate-active) + (gnus-cache-articles-in-group): Ditto. + * gnus-group.el (gnus-group-set-current-level) + (gnus-group-insert-group-line): Ditto. + * gnus-score.el (gnus-score-set-expunge-below) + (gnus-score-set-mark-below, gnus-summary-score-effect) + (gnus-summary-score-entry): Ditto. + * gnus-soup.el (gnus-soup-send-packet, gnus-soup-parse-areas) + (gnus-soup-pack): Ditto. + * gnus-spec.el (gnus-xmas-format): Ditto. + * gnus-start.el (gnus-newsrc-to-gnus-format): Ditto. + * gnus-sum.el (gnus-create-xref-hashtb): Ditto. + * gnus-uu.el (gnus-uu-expand-numbers): Ditto. + * nnbabyl.el (nnbabyl-article-group-number): Ditto. + * nndb.el (nndb-get-remote-expire-response): Ditto. + * nndiary.el (nndiary-parse-schedule-value) + (nndiary-string-to-number, nndiary-request-replace-article) + (nndiary-request-article): Ditto. + * nndoc.el (nndoc-rnews-body-end, nndoc-mbox-body-end): Ditto. + * nndraft.el (nndraft-articles, nndraft-request-group): Ditto. + * nneething.el (nneething-make-head): Ditto. + * nnfolder.el (nnfolder-request-article) + (nnfolder-retrieve-headers): Ditto. + * nnheader.el (nnheader-file-to-number): Ditto. + * nnkiboze.el (nnkiboze-request-article): Ditto. + * nnmail.el (nnmail-process-unix-mail-format) + (nnmail-process-babyl-mail-format): Ditto. + * nnmbox.el (nnmbox-read-mbox, nnmbox-article-group-number): Ditto. + * nnmh.el (nnmh-update-gnus-unreads, nnmh-active-number) + (nnmh-request-create-group, nnmh-request-list-1) + (nnmh-request-group, nnmh-request-article): Ditto. + * nnml.el (nnml-request-replace-article, nnml-request-article): Ditto. + * nnrss.el (nnrss-find-rss-via-syndic8): Ditto. + * nnsoup.el (nnsoup-make-active): Ditto. + * nnspool.el (nnspool-find-id, nnspool-request-group): Ditto. + * nntp.el (nntp-find-group-and-number) + (nntp-retrieve-headers-with-xover): Ditto. + * pgg-gpg.el (pgg-gpg-snarf-keys-region): Ditto. + * pgg-parse.el (pgg-read-body, pgg-read-bytes) + (pgg-format-key-identifier): Ditto. + * pop3.el (pop3-last, pop3-stat): Ditto. + * qp.el (quoted-printable-decode-region): Ditto. + + * spam-report.el (spam-report-url-ping-mm-url): Use format instead + of concat. + 2005-05-30 Katsumi Yamaoka * gnus-agent.el (gnus-category-mode): Use gnus-run-mode-hooks. diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el index 3d353d1ba56..9f4525e1ae2 100644 --- a/lisp/gnus/gnus-agent.el +++ b/lisp/gnus/gnus-agent.el @@ -1540,7 +1540,7 @@ downloaded into the agent." (while (looking-at "\\([^: \n]+\\):\\([0-9]+\\) *") (push (cons (buffer-substring (match-beginning 1) (match-end 1)) - (string-to-int + (string-to-number (buffer-substring (match-beginning 2) (match-end 2)))) crosses) @@ -3703,7 +3703,7 @@ If REREAD is not nil, downloaded articles are marked as unread." (dir (file-name-directory file)) point (downloaded (if (file-exists-p dir) - (sort (mapcar (lambda (name) (string-to-int name)) + (sort (mapcar (lambda (name) (string-to-number name)) (directory-files dir nil "^[0-9]+$" t)) '>) (progn (gnus-make-directory dir) nil))) diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 70096b58729..c3076cbb22e 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -6787,7 +6787,7 @@ specified by `gnus-button-alist'." (match-string 3 address) "nntp"))) nil nil nil - (and (match-end 6) (list (string-to-int (match-string 6 address)))))))) + (and (match-end 6) (list (string-to-number (match-string 6 address)))))))) (defun gnus-url-parse-query-string (query &optional downcase) (let (retval pairs cur key val) diff --git a/lisp/gnus/gnus-cache.el b/lisp/gnus/gnus-cache.el index 657ade98167..55544d1525c 100644 --- a/lisp/gnus/gnus-cache.el +++ b/lisp/gnus/gnus-cache.el @@ -487,7 +487,7 @@ Returns the list of articles removed." articles) (when (file-exists-p dir) (setq articles - (sort (mapcar (lambda (name) (string-to-int name)) + (sort (mapcar (lambda (name) (string-to-number name)) (directory-files dir nil "^[0-9]+$" t)) '<)) ;; Update the cache active file, just to synch more. @@ -681,7 +681,7 @@ If LOW, update the lower bound instead." ;; Separate articles from all other files and directories. (while files (if (string-match "^[0-9]+$" (file-name-nondirectory (car files))) - (push (string-to-int (file-name-nondirectory (pop files))) nums) + (push (string-to-number (file-name-nondirectory (pop files))) nums) (push (pop files) alphs))) ;; If we have nums, then this is probably a valid group. (when (setq nums (sort nums '<)) diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 44d59729b6f..578e74d2a0e 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -1452,7 +1452,7 @@ if it is a string, only list groups matching REGEXP." (eval gnus-group-line-format-spec))) `(gnus-group ,(gnus-intern-safe gnus-tmp-group gnus-active-hashtb) gnus-unread ,(if (numberp number) - (string-to-int gnus-tmp-number-of-unread) + (string-to-number gnus-tmp-number-of-unread) t) gnus-marked ,gnus-tmp-marked-mark gnus-indentation ,gnus-group-indentation @@ -3246,7 +3246,7 @@ Uses the process/prefix convention." (progn (unless (gnus-group-process-prefix current-prefix-arg) (error "No group on the current line")) - (string-to-int + (string-to-number (let ((s (read-string (format "Level (default %s): " (or (gnus-group-group-level) diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el index 3a22f9030e5..a2c3b249343 100644 --- a/lisp/gnus/gnus-score.el +++ b/lisp/gnus/gnus-score.el @@ -826,7 +826,7 @@ If optional argument `EXTRA' is non-nil, it's a non-standard overview header." ;; If this is an integer comparison, we transform from string to int. (if (eq (nth 2 (assoc header gnus-header-index)) 'gnus-score-integer) (if (stringp match) - (setq match (string-to-int match))) + (setq match (string-to-number match))) (set-text-properties 0 (length match) nil match)) (unless (eq date 'now) @@ -891,7 +891,7 @@ EXTRA is the possible non-standard header." t) (read-string "Match: ") (if (y-or-n-p "Use regexp match? ") 'r 's) - (string-to-int (read-string "Score: ")))) + (string-to-number (read-string "Score: ")))) (save-excursion (unless (and (stringp match) (> (length match) 0)) (error "No match")) @@ -945,7 +945,7 @@ EXTRA is the possible non-standard header." "Automatically mark articles with score below SCORE as read." (interactive (list (or (and current-prefix-arg (prefix-numeric-value current-prefix-arg)) - (string-to-int (read-string "Mark below: "))))) + (string-to-number (read-string "Mark below: "))))) (setq score (or score gnus-summary-default-score 0)) (gnus-score-set 'mark (list score)) (gnus-score-set 'touched '(t)) @@ -979,7 +979,7 @@ EXTRA is the possible non-standard header." "Automatically expunge articles with score below SCORE." (interactive (list (or (and current-prefix-arg (prefix-numeric-value current-prefix-arg)) - (string-to-int (read-string "Set expunge below: "))))) + (string-to-number (read-string "Set expunge below: "))))) (setq score (or score gnus-summary-default-score 0)) (gnus-score-set 'expunge (list score)) (gnus-score-set 'touched '(t))) diff --git a/lisp/gnus/gnus-soup.el b/lisp/gnus/gnus-soup.el index 55dc1635542..48a8fc0c380 100644 --- a/lisp/gnus/gnus-soup.el +++ b/lisp/gnus/gnus-soup.el @@ -349,9 +349,9 @@ If NOT-ALL, don't pack ticked articles." (packer (if (< (string-match "%s" packer) (string-match "%d" packer)) (format packer files - (string-to-int (gnus-soup-unique-prefix dir))) + (string-to-number (gnus-soup-unique-prefix dir))) (format packer - (string-to-int (gnus-soup-unique-prefix dir)) + (string-to-number (gnus-soup-unique-prefix dir)) files))) (dir (expand-file-name dir))) (gnus-make-directory dir) @@ -385,7 +385,7 @@ though the two last may be nil if they are missing." (and (eq (preceding-char) ?\t) (gnus-soup-field)) (and (eq (preceding-char) ?\t) - (string-to-int (gnus-soup-field)))) + (string-to-number (gnus-soup-field)))) areas) (when (eq (preceding-char) ?\t) (beginning-of-line 2))) @@ -535,7 +535,7 @@ Return whether the unpacking was successful." (error "Bad header")) (forward-line 1) (setq beg (point) - end (+ (point) (string-to-int + end (+ (point) (string-to-number (buffer-substring (match-beginning 1) (match-end 1))))) (switch-to-buffer tmp-buf) diff --git a/lisp/gnus/gnus-spec.el b/lisp/gnus/gnus-spec.el index ef1c43167f5..39b87727279 100644 --- a/lisp/gnus/gnus-spec.el +++ b/lisp/gnus/gnus-spec.el @@ -509,7 +509,7 @@ are supported for %s." (t (if (null args) (error 'wrong-number-of-arguments #'my-format n fstring)) - (let* ((minlen (string-to-int (or (match-string 2) ""))) + (let* ((minlen (string-to-number (or (match-string 2) ""))) (arg (car args)) (str (if (stringp arg) arg (format "%s" arg))) (lpad (null (match-string 1))) diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index 6eec4f4e846..785ad87a2ee 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el @@ -2517,7 +2517,7 @@ If FORCE is non-nil, the .newsrc file is read." (cond ((looking-at "[0-9]+") ;; We narrow and read a number instead of buffer-substring/ - ;; string-to-int because it's faster. narrow/widen is + ;; string-to-number because it's faster. narrow/widen is ;; faster than save-restriction/narrow, and save-restriction ;; produces a garbage object. (setq num1 (progn diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index fd44e475ddd..8d4c536229b 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -5660,7 +5660,7 @@ The resulting hash table is returned, or nil if no Xrefs were found." (match-end 1))) (substring xrefs (match-beginning 1) (match-end 1)))) (setq number - (string-to-int (substring xrefs (match-beginning 2) + (string-to-number (substring xrefs (match-beginning 2) (match-end 2)))) (if (setq entry (gnus-gethash group xref-hashtb)) (setcdr entry (cons number (cdr entry))) diff --git a/lisp/gnus/gnus-uu.el b/lisp/gnus/gnus-uu.el index 3b2a29c238e..a705f230241 100644 --- a/lisp/gnus/gnus-uu.el +++ b/lisp/gnus/gnus-uu.el @@ -1185,7 +1185,7 @@ When called interactively, prompt for REGEXP." (ignore-errors (replace-match (format "%06d" - (string-to-int (buffer-substring + (string-to-number (buffer-substring (match-beginning 0) (match-end 0))))))) (setq string (buffer-substring 1 (point-max))) (setcar (car string-list) string) diff --git a/lisp/gnus/nnbabyl.el b/lisp/gnus/nnbabyl.el index e69b6a0304a..dae51fca50b 100644 --- a/lisp/gnus/nnbabyl.el +++ b/lisp/gnus/nnbabyl.el @@ -493,7 +493,7 @@ (when (re-search-forward "^X-Gnus-Newsgroup: +\\([^:]+\\):\\([0-9]+\\) " nil t) (cons (buffer-substring (match-beginning 1) (match-end 1)) - (string-to-int + (string-to-number (buffer-substring (match-beginning 2) (match-end 2))))))) (defun nnbabyl-insert-lines () diff --git a/lisp/gnus/nndb.el b/lisp/gnus/nndb.el index 6aaf57c81e1..fe4072c5d35 100644 --- a/lisp/gnus/nndb.el +++ b/lisp/gnus/nndb.el @@ -196,7 +196,7 @@ article was posted to nndb") ;; otherwise, pull all of the following numbers into the list (re-search-forward "follows\r?\n?" nil t) (while (re-search-forward "^[0-9]+$" nil t) - (push (string-to-int (match-string 0)) list))) + (push (string-to-number (match-string 0)) list))) list)) (defun nndb-request-expire-articles-remote diff --git a/lisp/gnus/nndiary.el b/lisp/gnus/nndiary.el index de33cd156c6..e4b087eec2e 100644 --- a/lisp/gnus/nndiary.el +++ b/lisp/gnus/nndiary.el @@ -601,7 +601,7 @@ all. This may very well take some time.") (nnheader-report 'nndiary "Article %s retrieved" id) ;; We return the article number. (cons (if group-num (car group-num) group) - (string-to-int (file-name-nondirectory path))))))) + (string-to-number (file-name-nondirectory path))))))) (deffoo nndiary-request-group (group &optional server dont-check) (let ((file-name-coding-system nnmail-pathname-coding-system)) @@ -820,7 +820,7 @@ all. This may very well take some time.") ;; we should insert it. (This situation should never ;; occur, but one likes to make sure...) (while (and (looking-at "[0-9]+\t") - (< (string-to-int + (< (string-to-number (buffer-substring (match-beginning 0) (match-end 0))) article) @@ -1281,14 +1281,14 @@ all. This may very well take some time.") (nnheader-article-to-file-alist nndiary-current-directory)))) -(defun nndiary-string-to-int (str min &optional max) - ;; Like `string-to-int' but barf if STR is not exactly an integer, and not +(defun nndiary-string-to-number (str min &optional max) + ;; Like `string-to-number' but barf if STR is not exactly an integer, and not ;; within the specified bounds. ;; Signals are caught by `nndiary-schedule'. (if (not (string-match "^[ \t]*[0-9]+[ \t]*$" str)) (nndiary-error "not an integer value") ;; else - (let ((val (string-to-int str))) + (let ((val (string-to-number str))) (and (or (< val min) (and max (> val max))) (nndiary-error "value out of range")) @@ -1315,12 +1315,12 @@ all. This may very well take some time.") (let ((res (split-string val "-"))) (cond ((= (length res) 1) - (nndiary-string-to-int (car res) min-or-values max)) + (nndiary-string-to-number (car res) min-or-values max)) ((= (length res) 2) ;; don't know if crontab accepts this, but ensure ;; that BEG is <= END - (let ((beg (nndiary-string-to-int (car res) min-or-values max)) - (end (nndiary-string-to-int (cadr res) min-or-values max))) + (let ((beg (nndiary-string-to-number (car res) min-or-values max)) + (end (nndiary-string-to-number (cadr res) min-or-values max))) (cond ((< beg end) (cons beg end)) ((= beg end) diff --git a/lisp/gnus/nndoc.el b/lisp/gnus/nndoc.el index 47a3cbd0292..a7948365680 100644 --- a/lisp/gnus/nndoc.el +++ b/lisp/gnus/nndoc.el @@ -421,7 +421,7 @@ from the document.") (search-forward "\n\n" beg t) (re-search-backward "^Content-Length:[ \t]*\\([0-9]+\\) *$" end t) - (setq len (string-to-int (match-string 1))) + (setq len (string-to-number (match-string 1))) (search-forward "\n\n" beg t) (unless (= (setq len (+ (point) len)) (point-max)) (and (< len (point-max)) @@ -444,7 +444,7 @@ from the document.") (defun nndoc-rnews-body-end () (and (re-search-backward nndoc-article-begin nil t) (forward-line 1) - (goto-char (+ (point) (string-to-int (match-string 1)))))) + (goto-char (+ (point) (string-to-number (match-string 1)))))) (defun nndoc-babyl-type-p () (when (re-search-forward "\^_\^L *\n" nil t) diff --git a/lisp/gnus/nndraft.el b/lisp/gnus/nndraft.el index 9235bf72a29..a71376155c1 100644 --- a/lisp/gnus/nndraft.el +++ b/lisp/gnus/nndraft.el @@ -185,7 +185,7 @@ (file-name-coding-system nnmail-pathname-coding-system) dir file) (nnheader-re-read-dir pathname) - (setq dir (mapcar (lambda (name) (string-to-int (substring name 1))) + (setq dir (mapcar (lambda (name) (string-to-number (substring name 1))) (ignore-errors (directory-files pathname nil "^#[0-9]+#$" t)))) (dolist (n dir) @@ -293,7 +293,7 @@ "Return the list of messages in the group." (gnus-make-directory nndraft-current-directory) (sort - (mapcar 'string-to-int + (mapcar 'string-to-number (directory-files nndraft-current-directory nil "\\`[0-9]+\\'" t)) '<)) diff --git a/lisp/gnus/nneething.el b/lisp/gnus/nneething.el index d7698efb845..61f8eefbf17 100644 --- a/lisp/gnus/nneething.el +++ b/lisp/gnus/nneething.el @@ -329,7 +329,7 @@ included.") (when (re-search-forward "<[a-zA-Z0-9_]@[-a-zA-Z0-9_]>" 1000 t) (concat "From: " (match-string 0) "\n")))) (nneething-from-line (nth 2 atts) file)) - (if (> (string-to-int (int-to-string (nth 7 atts))) 0) + (if (> (string-to-number (int-to-string (nth 7 atts))) 0) (concat "Chars: " (int-to-string (nth 7 atts)) "\n") "") (if buffer diff --git a/lisp/gnus/nnfolder.el b/lisp/gnus/nnfolder.el index f50530ab459..961f124a614 100644 --- a/lisp/gnus/nnfolder.el +++ b/lisp/gnus/nnfolder.el @@ -200,7 +200,7 @@ the group. Then the marks file will be regenerated properly by Gnus.") ((search-backward (concat "\n" nnfolder-article-marker) nil t) (goto-char (match-end 0)) - (setq num (string-to-int + (setq num (string-to-number (buffer-substring (point) (gnus-point-at-eol)))) (goto-char start) @@ -210,7 +210,7 @@ the group. Then the marks file will be regenerated properly by Gnus.") (search-forward (concat "\n" nnfolder-article-marker) nil t) (progn - (setq num (string-to-int + (setq num (string-to-number (buffer-substring (point) (gnus-point-at-eol)))) (> num article)) @@ -285,7 +285,7 @@ the group. Then the marks file will be regenerated properly by Gnus.") (cons nnfolder-current-group (if (search-forward (concat "\n" nnfolder-article-marker) nil t) - (string-to-int (buffer-substring + (string-to-number (buffer-substring (point) (gnus-point-at-eol))) -1)))))))) diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el index 6224f9718f1..c55252e5b64 100644 --- a/lisp/gnus/nnheader.el +++ b/lisp/gnus/nnheader.el @@ -683,9 +683,9 @@ the line could be found." (defsubst nnheader-file-to-number (file) "Take a FILE name and return the article number." (if (string= nnheader-numerical-short-files "^[0-9]+$") - (string-to-int file) + (string-to-number file) (string-match nnheader-numerical-short-files file) - (string-to-int (match-string 0 file)))) + (string-to-number (match-string 0 file)))) (defvar nnheader-directory-files-is-safe (or (eq system-type 'windows-nt) diff --git a/lisp/gnus/nnkiboze.el b/lisp/gnus/nnkiboze.el index f68bb8b5f55..f6766836fe1 100644 --- a/lisp/gnus/nnkiboze.el +++ b/lisp/gnus/nnkiboze.el @@ -106,7 +106,7 @@ (error "nnkiboze: No xref")) (unless (string-match " \\([^ ]+\\):\\([0-9]+\\)" xref) (error "nnkiboze: Malformed xref")) - (setq num (string-to-int (match-string 2 xref)) + (setq num (string-to-number (match-string 2 xref)) group (match-string 1 xref)) (or (with-current-buffer buffer (or (and gnus-use-cache (gnus-cache-request-article num group)) diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el index c0689335f67..affe72c75c8 100644 --- a/lisp/gnus/nnmail.el +++ b/lisp/gnus/nnmail.el @@ -769,7 +769,7 @@ If SOURCE is a directory spec, try to return the group name component." (if (not (save-excursion (and (re-search-backward "^Content-Length:[ \t]*\\([0-9]+\\)" start t) - (setq content-length (string-to-int + (setq content-length (string-to-number (buffer-substring (match-beginning 1) (match-end 1)))) @@ -906,7 +906,7 @@ If SOURCE is a directory spec, try to return the group name component." (if (not (re-search-forward "^Content-Length:[ \t]*\\([0-9]+\\)" nil t)) (setq content-length nil) - (setq content-length (string-to-int (match-string 1))) + (setq content-length (string-to-number (match-string 1))) ;; We destroy the header, since none of the backends ever ;; use it, and we do not want to confuse other mailers by ;; having a (possibly) faulty header. diff --git a/lisp/gnus/nnmbox.el b/lisp/gnus/nnmbox.el index a1957fa0dcd..42721f2e92e 100644 --- a/lisp/gnus/nnmbox.el +++ b/lisp/gnus/nnmbox.el @@ -475,7 +475,7 @@ (when (re-search-forward "^X-Gnus-Newsgroup: +\\([^:]+\\):\\([0-9]+\\) " nil t) (cons (buffer-substring (match-beginning 1) (match-end 1)) - (string-to-int + (string-to-number (buffer-substring (match-beginning 2) (match-end 2))))))) (defun nnmbox-in-header-p (pos) @@ -681,7 +681,7 @@ (let (alist) (while (re-search-forward " \\([^:]+\\):\\([0-9]+\\)" end-header t) (push (cons (match-string 1) - (string-to-int (match-string 2))) alist)) + (string-to-number (match-string 2))) alist)) (nnmbox-insert-newsgroup-line alist)) ;; this is really a new article (nnmbox-save-mail diff --git a/lisp/gnus/nnmh.el b/lisp/gnus/nnmh.el index 37f0bb353e8..af99217fe6d 100644 --- a/lisp/gnus/nnmh.el +++ b/lisp/gnus/nnmh.el @@ -150,7 +150,7 @@ as unread by Gnus.") (file-exists-p file) (not (file-directory-p file)) (save-excursion (nnmail-find-file file)) - (string-to-int (file-name-nondirectory file))))) + (string-to-number (file-name-nondirectory file))))) (deffoo nnmh-request-group (group &optional server dont-check) (nnheader-init-server-buffer) @@ -176,7 +176,7 @@ as unread by Gnus.") (nnheader-re-read-dir pathname) (setq dir (sort - (mapcar (lambda (name) (string-to-int name)) + (mapcar (lambda (name) (string-to-number name)) (directory-files pathname nil "^[0-9]+$" t)) '<)) (cond @@ -224,7 +224,7 @@ as unread by Gnus.") ;; For each directory, generate an active file line. (unless (string= (expand-file-name nnmh-toplev) dir) (let ((files (mapcar - (lambda (name) (string-to-int name)) + (lambda (name) (string-to-number name)) (directory-files dir nil "^[0-9]+$" t)))) (when files (save-excursion @@ -358,7 +358,7 @@ as unread by Gnus.") (nnmh-possibly-change-directory group server) (let ((articles (mapcar (lambda (file) - (string-to-int file)) + (string-to-number file)) (directory-files nnmh-current-directory nil "^[0-9]+$")))) (when articles @@ -486,7 +486,7 @@ as unread by Gnus.") (let ((files (sort (mapcar (lambda (f) - (string-to-int f)) + (string-to-number f)) (directory-files dir nil "^[0-9]+$")) '>))) (when files @@ -509,7 +509,7 @@ as unread by Gnus.") ;; articles in this folder. The articles that are "new" will be ;; marked as unread by Gnus. (let* ((dir nnmh-current-directory) - (files (sort (mapcar (function (lambda (name) (string-to-int name))) + (files (sort (mapcar (function (lambda (name) (string-to-number name))) (directory-files nnmh-current-directory nil "^[0-9]+$" t)) '<)) diff --git a/lisp/gnus/nnml.el b/lisp/gnus/nnml.el index b82df8f979a..f330fa97a5a 100644 --- a/lisp/gnus/nnml.el +++ b/lisp/gnus/nnml.el @@ -212,7 +212,7 @@ marks file will be regenerated properly by Gnus.") (nnheader-report 'nnml "Article %s retrieved" id) ;; We return the article number. (cons (if group-num (car group-num) group) - (string-to-int (file-name-nondirectory path))))))) + (string-to-number (file-name-nondirectory path))))))) (deffoo nnml-request-group (group &optional server dont-check) (let ((file-name-coding-system nnmail-pathname-coding-system)) @@ -426,7 +426,7 @@ marks file will be regenerated properly by Gnus.") ;; we should insert it. (This situation should never ;; occur, but one likes to make sure...) (while (and (looking-at "[0-9]+\t") - (< (string-to-int + (< (string-to-number (buffer-substring (match-beginning 0) (match-end 0))) article) diff --git a/lisp/gnus/nnrss.el b/lisp/gnus/nnrss.el index 42ab072f438..ee5d6560354 100644 --- a/lisp/gnus/nnrss.el +++ b/lisp/gnus/nnrss.el @@ -899,7 +899,7 @@ whether they are `offsite' or `onsite'." (selection (mapcar (lambda (listinfo) (cons (cdr (assoc "sitename" listinfo)) - (string-to-int + (string-to-number (cdr (assoc "feedid" listinfo))))) feedinfo))) (cdr (assoc diff --git a/lisp/gnus/nnsoup.el b/lisp/gnus/nnsoup.el index 9c69b1d3c63..836d97e1e42 100644 --- a/lisp/gnus/nnsoup.el +++ b/lisp/gnus/nnsoup.el @@ -752,9 +752,9 @@ backend for the messages.") (let ((files (sort (directory-files nnsoup-directory t "IDX$") (lambda (f1 f2) (< (progn (string-match "/\\([0-9]+\\)\\." f1) - (string-to-int (match-string 1 f1))) + (string-to-number (match-string 1 f1))) (progn (string-match "/\\([0-9]+\\)\\." f2) - (string-to-int (match-string 1 f2))))))) + (string-to-number (match-string 1 f2))))))) active group lines ident elem min) (set-buffer (get-buffer-create " *nnsoup work*")) (while files diff --git a/lisp/gnus/nnspool.el b/lisp/gnus/nnspool.el index d54897a7750..6418c96d931 100644 --- a/lisp/gnus/nnspool.el +++ b/lisp/gnus/nnspool.el @@ -248,7 +248,7 @@ there.") ;; Fix by Sudish Joseph (when (setq dir (directory-files pathname nil "^[0-9]+$" t)) (setq dir - (sort (mapcar (lambda (name) (string-to-int name)) dir) '<))) + (sort (mapcar (lambda (name) (string-to-number name)) dir) '<))) (if dir (nnheader-insert "211 %d %d %d %s\n" (length dir) (car dir) @@ -440,7 +440,7 @@ there.") (goto-char (point-min)) (prog1 (when (looking-at "<[^>]+>[ \t]+[-0-9~]+[ \t]+\\([^ /\t\n]+\\)/\\([0-9]+\\)[ \t\n]") - (cons (match-string 1) (string-to-int (match-string 2)))) + (cons (match-string 1) (string-to-number (match-string 2)))) (kill-buffer (current-buffer))))) (defun nnspool-find-file (file) diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index ab85ad25931..1c964a5706c 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el @@ -1499,7 +1499,7 @@ password contained in '~/.nntp-authinfo'." (when (<= count 1) (goto-char (point-min)) (when (re-search-forward "^[0-9][0-9][0-9] .*\n\\([0-9]+\\)" nil t) - (let ((low-limit (string-to-int + (let ((low-limit (string-to-number (buffer-substring (match-beginning 1) (match-end 1))))) (while (and articles (<= (car articles) low-limit)) @@ -1571,7 +1571,7 @@ password contained in '~/.nntp-authinfo'." (goto-char (point-min)) ;; We first find the number by looking at the status line. (let ((number (and (looking-at "2[0-9][0-9] +\\([0-9]+\\) ") - (string-to-int + (string-to-number (buffer-substring (match-beginning 1) (match-end 1))))) newsgroups xref) @@ -1609,7 +1609,7 @@ password contained in '~/.nntp-authinfo'." "\\([^ :]+\\):\\([0-9]+\\)") xref)) (setq group (match-string 1 xref) - number (string-to-int (match-string 2 xref)))) + number (string-to-number (match-string 2 xref)))) ((and (setq newsgroups (mail-fetch-field "newsgroups")) (not (string-match "," newsgroups))) diff --git a/lisp/gnus/pgg-gpg.el b/lisp/gnus/pgg-gpg.el index 2b3e521c60f..463020838c9 100644 --- a/lisp/gnus/pgg-gpg.el +++ b/lisp/gnus/pgg-gpg.el @@ -252,7 +252,7 @@ If optional argument SIGN is non-nil, do a combined sign and encrypt." (when (re-search-forward "^\\[GNUPG:] IMPORT_RES\\>" nil t) (setq status (buffer-substring (match-end 0) (progn (end-of-line)(point))) - status (vconcat (mapcar #'string-to-int (split-string status)))) + status (vconcat (mapcar #'string-to-number (split-string status)))) (erase-buffer) (insert (format "Imported %d key(s). \tArmor contains %d key(s) [%d bad, %d old].\n" diff --git a/lisp/gnus/pgg-parse.el b/lisp/gnus/pgg-parse.el index bf04ca914a8..7929b54010d 100644 --- a/lisp/gnus/pgg-parse.el +++ b/lisp/gnus/pgg-parse.el @@ -113,7 +113,7 @@ `(mapconcat (lambda (c) (format "%02X" (pgg-char-int c))) ,string "") ;; `(upcase (apply #'format "%02x%02x%02x%02x%02x%02x%02x%02x" - ;; (string-to-int-list ,string))) + ;; (string-to-number-list ,string))) ) (defmacro pgg-parse-time-field (bytes) @@ -136,7 +136,7 @@ (defmacro pgg-read-bytes (nbytes) `(mapcar #'pgg-char-int (pgg-read-bytes-string ,nbytes)) - ;; `(string-to-int-list (pgg-read-bytes-string ,nbytes)) + ;; `(string-to-number-list (pgg-read-bytes-string ,nbytes)) ) (defmacro pgg-read-body-string (ptag) @@ -146,7 +146,7 @@ (defmacro pgg-read-body (ptag) `(mapcar #'pgg-char-int (pgg-read-body-string ,ptag)) - ;; `(string-to-int-list (pgg-read-body-string ,ptag)) + ;; `(string-to-number-list (pgg-read-body-string ,ptag)) ) (defalias 'pgg-skip-bytes 'forward-char) diff --git a/lisp/gnus/pop3.el b/lisp/gnus/pop3.el index b21b3dcd5ae..75efaf4e512 100644 --- a/lisp/gnus/pop3.el +++ b/lisp/gnus/pop3.el @@ -398,8 +398,8 @@ If NOW, use that time instead." "Return the number of messages in the maildrop and the maildrop's size." (pop3-send-command process "STAT") (let ((response (pop3-read-response process t))) - (list (string-to-int (nth 1 (split-string response " "))) - (string-to-int (nth 2 (split-string response " ")))) + (list (string-to-number (nth 1 (split-string response " "))) + (string-to-number (nth 2 (split-string response " ")))) )) (defun pop3-list (process &optional msg) @@ -449,7 +449,7 @@ This function currently does nothing.") "Return highest accessed message-id number for the session." (pop3-send-command process "LAST") (let ((response (pop3-read-response process t))) - (string-to-int (nth 1 (split-string response " "))) + (string-to-number (nth 1 (split-string response " "))) )) (defun pop3-rset (process) diff --git a/lisp/gnus/qp.el b/lisp/gnus/qp.el index 1004abeb02b..07ed552ef46 100644 --- a/lisp/gnus/qp.el +++ b/lisp/gnus/qp.el @@ -69,9 +69,9 @@ them into characters should be done separately." (cond ((eq (char-after (1+ (point))) ?\n) (delete-char 2)) ((looking-at "=[0-9A-F][0-9A-F]") - (let ((byte (string-to-int (buffer-substring (1+ (point)) - (+ 3 (point))) - 16))) + (let ((byte (string-to-number (buffer-substring (1+ (point)) + (+ 3 (point))) + 16))) (mm-insert-byte byte 1) (delete-char 3))) (t diff --git a/lisp/gnus/spam-report.el b/lisp/gnus/spam-report.el index e988199755d..ded68aba4ed 100644 --- a/lisp/gnus/spam-report.el +++ b/lisp/gnus/spam-report.el @@ -183,14 +183,14 @@ symbol `ask', query before flushing the queue file." the external program specified in `mm-url-program' to connect to server." (with-temp-buffer - (let ((url (concat "http://" host report))) + (let ((url (format "http://%s%s" host report))) (mm-url-insert url t)))) ;;;###autoload (defun spam-report-url-to-file (host report) "Collect spam report requests in `spam-report-requests-file'. Customize `spam-report-url-ping-function' to use this function." - (let ((url (concat "http://" host report)) + (let ((url (format "http://%s%s" host report)) (file spam-report-requests-file)) (gnus-make-directory (file-name-directory file)) (gnus-message 9 "Writing URL `%s' to file `%s'" url file) From 6dfa731f20bc5702c88f99297e60e41f1e27cbea Mon Sep 17 00:00:00 2001 From: Masatake YAMATO Date: Mon, 30 May 2005 18:06:02 +0000 Subject: [PATCH 175/294] * emacs-lisp/find-func.el (find-function-noselect): Handle subroutines. * help-fns.el (help-C-file-name): Added autoload mark for `find-function-noselect'. --- lisp/ChangeLog | 8 ++++++++ lisp/emacs-lisp/find-func.el | 4 ++-- lisp/help-fns.el | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1b67921f88b..f09d6f816b2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2005-05-31 Masatake YAMATO + + * emacs-lisp/find-func.el (find-function-noselect): Handle + subroutines. + + * help-fns.el (help-C-file-name): Added autoload mark for + `find-function-noselect'. + 2005-05-30 Glenn Morris * calendar/diary-lib.el (mark-included-diary-files): Only kill diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index eab957e5671..9a0a1606953 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -246,8 +246,6 @@ searched for in `find-function-source-path' if non nil, otherwise in `load-path'." (if (not function) (error "You didn't specify a function")) - (and (subrp (symbol-function function)) - (error "%s is a primitive function" function)) (let ((def (symbol-function function)) aliases) (while (symbolp def) @@ -265,6 +263,8 @@ in `load-path'." (let ((library (cond ((eq (car-safe def) 'autoload) (nth 1 def)) + ((subrp def) + (help-C-file-name def 'subr)) ((symbol-file function 'defun))))) (find-function-search-for-symbol function nil library)))) diff --git a/lisp/help-fns.el b/lisp/help-fns.el index c11aaf6da76..b5e22bf1855 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -224,7 +224,7 @@ ARGLIST can also be t or a string of the form \"(FUN ARG1 ARG2 ...)\"." ;;; (symbol-file (if (symbolp subr-or-var) subr-or-var ;;; (subr-name subr-or-var)) ;;; (if (eq kind 'var) 'defvar 'defun))) - +;;;###autoload (defun help-C-file-name (subr-or-var kind) "Return the name of the C file where SUBR-OR-VAR is defined. KIND should be `var' for a variable or `subr' for a subroutine." From d18fc930007bbce08ba32bd2b213fa3e92ab0cbf Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 30 May 2005 20:37:31 +0000 Subject: [PATCH 176/294] (tex-compile-commands, tex-compile, tex-start-tex): Undo all but the last part of the 2005-05-28 change. --- lisp/textmodes/tex-mode.el | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 1b91afeac8d..66dc7b83507 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -1633,11 +1633,11 @@ If NOT-ALL is non-nil, save the `.dvi' file." (defvar tex-compile-commands '(((concat "pdf" tex-command " " (if (< 0 (length tex-start-commands)) - tex-start-commands) " %f") + (shell-quote-argument tex-start-commands)) " %f") t "%r.pdf") ((concat tex-command " " (if (< 0 (length tex-start-commands)) - tex-start-commands) " %f") + (shell-quote-argument tex-start-commands)) " %f") t "%r.dvi") ("yap %r &" "%r.dvi") ("xdvi %r &" "%r.dvi") @@ -1900,8 +1900,8 @@ FILE is typically the output DVI or PDF file." (prog1 (file-name-directory (expand-file-name file)) (setq file (file-name-nondirectory file)))) (root (file-name-sans-extension file)) - (fspec (list (cons ?r root) - (cons ?f file))) + (fspec (list (cons ?r (shell-quote-argument root)) + (cons ?f (shell-quote-argument file)))) (default (tex-compile-default fspec))) (list default-directory (completing-read @@ -1922,13 +1922,14 @@ FILE is typically the output DVI or PDF file." (compile-command (if star (concat (substring command 0 star) - file + (shell-quote-argument file) (substring command (1+ star))) (concat command " " tex-start-options (if (< 0 (length tex-start-commands)) - (concat tex-start-commands " ")) - file)))) + (concat + (shell-quote-argument tex-start-commands) " ")) + (shell-quote-argument file))))) (tex-send-tex-command compile-command dir))) (defun tex-send-tex-command (cmd &optional dir) From 3c1ebc5af8b9fee8834a77ca6a37db6ccde6648f Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 30 May 2005 20:53:33 +0000 Subject: [PATCH 177/294] *** empty log message *** --- lisp/ChangeLog | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f09d6f816b2..a4145b545e8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,11 +1,15 @@ 2005-05-31 Masatake YAMATO - * emacs-lisp/find-func.el (find-function-noselect): Handle - subroutines. + * emacs-lisp/find-func.el (find-function-noselect): Handle subroutines. - * help-fns.el (help-C-file-name): Added autoload mark for + * help-fns.el (help-C-file-name): Add autoload mark for `find-function-noselect'. +2005-05-30 Stefan Monnier + + * textmodes/tex-mode.el (tex-compile-commands, tex-compile) + (tex-start-tex): Undo all but the last part of the 2005-05-28 change. + 2005-05-30 Glenn Morris * calendar/diary-lib.el (mark-included-diary-files): Only kill From ed65ed86e10f9a9a4112e510d46400069d44de19 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 30 May 2005 21:03:51 +0000 Subject: [PATCH 178/294] (calc-bug-address): Fix docstring. (calc-window-hook, calc-trail-window-hook): New variables. (calc-trail-display): Use calc-trail-window-hook if it is non-nil. (calc): Use calc-window-hook if it is non-nil. --- lisp/calc/calc.el | 54 ++++++++++++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 22 deletions(-) diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index dbc5e90b917..3a99291fdef 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -325,7 +325,7 @@ This is not required to be present for user-written mode annotations." :type '(choice (string) (sexp))) (defvar calc-bug-address "belanger@truman.edu" - "Address of the author of Calc, for use by `report-calc-bug'.") + "Address of the maintainer of Calc, for use by `report-calc-bug'.") (defvar calc-scan-for-dels t "If t, scan keymaps to find all DEL-like keys. @@ -720,6 +720,12 @@ If nil, selections displayed but ignored.") (defvar calc-load-hook nil "Hook run when calc.el is loaded.") +(defvar calc-window-hook nil + "Hook called to create the Calc window.") + +(defvar calc-trail-window-hook nil + "Hook called to create the Calc trail window.") + ;; Verify that Calc is running on the right kind of system. (defvar calc-emacs-type-lucid (not (not (string-match "Lucid" emacs-version)))) @@ -1205,18 +1211,20 @@ commands given here will actually operate on the *Calculator* stack." (switch-to-buffer (current-buffer) t) (if (get-buffer-window (current-buffer)) (select-window (get-buffer-window (current-buffer))) - (let ((w (get-largest-window))) - (if (and pop-up-windows - (> (window-height w) - (+ window-min-height calc-window-height 2))) - (progn - (setq w (split-window w - (- (window-height w) - calc-window-height 2) - nil)) - (set-window-buffer w (current-buffer)) - (select-window w)) - (pop-to-buffer (current-buffer)))))) + (if calc-window-hook + (run-hooks 'calc-window-hook) + (let ((w (get-largest-window))) + (if (and pop-up-windows + (> (window-height w) + (+ window-min-height calc-window-height 2))) + (progn + (setq w (split-window w + (- (window-height w) + calc-window-height 2) + nil)) + (set-window-buffer w (current-buffer)) + (select-window w)) + (pop-to-buffer (current-buffer))))))) (save-excursion (set-buffer (calc-trail-buffer)) (and calc-display-trail @@ -1823,15 +1831,17 @@ See calc-keypad for details." (not (if flag (memq flag '(nil 0)) win))) (if (null win) (progn - (let ((w (split-window nil (/ (* (window-width) 2) 3) t))) - (set-window-buffer w calc-trail-buffer)) - (calc-wrapper - (setq overlay-arrow-string calc-trail-overlay - overlay-arrow-position calc-trail-pointer) - (or no-refresh - (if interactive - (calc-do-refresh) - (calc-refresh)))))) + (if calc-trail-window-hook + (run-hooks 'calc-trail-window-hook) + (let ((w (split-window nil (/ (* (window-width) 2) 3) t))) + (set-window-buffer w calc-trail-buffer))) + (calc-wrapper + (setq overlay-arrow-string calc-trail-overlay + overlay-arrow-position calc-trail-pointer) + (or no-refresh + (if interactive + (calc-do-refresh) + (calc-refresh)))))) (if win (progn (delete-window win) From 651e237bbe17d60590a5a2a4394e42e06780cf6c Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 30 May 2005 21:04:46 +0000 Subject: [PATCH 179/294] (Hooks): Change description of calc-window-hook and calc-trail-window-hook to match usage. (Computational Functions): Add more constant-generating functions. (Customizable Variables): Use defvar. --- man/calc.texi | 84 +++++++++++++++++++++++++-------------------------- 1 file changed, 41 insertions(+), 43 deletions(-) diff --git a/man/calc.texi b/man/calc.texi index 9b89282aa3d..3e8feaf1437 100644 --- a/man/calc.texi +++ b/man/calc.texi @@ -33640,22 +33640,25 @@ example, for a rectangular complex number the result is the sum of the absolute values of the components. @end defun -@findex two-pi +@findex e +@findex gamma-const +@findex ln-2 +@findex ln-10 +@findex phi @findex pi-over-2 @findex pi-over-4 @findex pi-over-180 @findex sqrt-two-pi @findex sqrt-e -@findex e -@findex ln-2 -@findex ln-10 +@findex two-pi @defun pi The function @samp{(pi)} computes @samp{pi} to the current precision. Other related constant-generating functions are @code{two-pi}, @code{pi-over-2}, @code{pi-over-4}, @code{pi-over-180}, @code{sqrt-two-pi}, -@code{e}, @code{sqrt-e}, @code{ln-2}, and @code{ln-10}. Each function -returns a floating-point value in the current precision, and each uses -caching so that all calls after the first are essentially free. +@code{e}, @code{sqrt-e}, @code{ln-2}, @code{ln-10}, @code{phi} and +@code{gamma-const}. Each function returns a floating-point value in the +current precision, and each uses caching so that all calls after the +first are essentially free. @end defun @defmac math-defcache @var{func} @var{initial} @var{form} @@ -34704,7 +34707,7 @@ step, before the Calc window is destroyed. @end defvar @defvar calc-window-hook -If this hook exists, it is called to create the Calc window. +If this hook is non-@code{nil}, it is called to create the Calc window. Upon return, this new Calc window should be the current window. (The Calc buffer will already be the current buffer when the hook is called.) If the hook is not defined, Calc will @@ -34713,10 +34716,10 @@ and @code{select-window} to create the Calc window. @end defvar @defvar calc-trail-window-hook -If this hook exists, it is called to create the Calc Trail window. -The variable @code{calc-trail-buffer} will contain the buffer -which the window should use. Unlike @code{calc-window-hook}, -this hook must @emph{not} switch into the new window. +If this hook is non-@code{nil}, it is called to create the Calc Trail +window. The variable @code{calc-trail-buffer} will contain the buffer +which the window should use. Unlike @code{calc-window-hook}, this hook +must @emph{not} switch into the new window. @end defvar @defvar calc-edit-mode-hook @@ -34820,11 +34823,7 @@ expression is basically a pattern that Calc can search for. See @ref{Regexp Search,, Regular Expression Search, emacs, The GNU Emacs Manual} to see how regular expressions work. -@table @code - -@item calc-settings-file - -@vindex calc-settings-file +@defvar calc-settings-file The variable @code{calc-settings-file} holds the file name in which commands like @kbd{m m} and @kbd{Z P} store ``permanent'' definitions. @@ -34834,9 +34833,9 @@ If @code{calc-settings-file} is not your user init file (typically exists) the first time Calc is invoked. The default value for this variable is @code{"~/.calc.el"}. +@end defvar -@item calc-gnuplot-name - +@defvar calc-gnuplot-name See @ref{Graphics}.@* The variable @code{calc-gnuplot-name} should be the name of the GNUPLOT program (a string). If you have GNUPLOT installed on your @@ -34845,10 +34844,10 @@ variable. (@pxref{Customizable Variables}) You may also need to set some Lisp variables to show Calc how to run GNUPLOT on your system, see @ref{Devices, ,Graphical Devices} . The default value of @code{calc-gnuplot-name} is @code{"gnuplot"}. +@end defvar -@item calc-gnuplot-plot-command -@itemx calc-gnuplot-print-command - +@defvar calc-gnuplot-plot-command +@defvarx calc-gnuplot-print-command See @ref{Devices, ,Graphical Devices}.@* The variables @code{calc-gnuplot-plot-command} and @code{calc-gnuplot-print-command} represent system commands to @@ -34861,9 +34860,9 @@ to display or print the output. The default value of @code{calc-gnuplot-plot-command} is @code{nil}, and the default value of @code{calc-gnuplot-print-command} is @code{"lp %s"}. +@end defvar -@item calc-language-alist - +@defvar calc-language-alist See @ref{Basic Embedded Mode}.@* The variable @code{calc-language-alist} controls the languages that Calc will associate with major modes. When Calc embedded mode is @@ -34889,9 +34888,9 @@ The default value of @code{calc-language-alist} is (fortran-mode . fortran) (f90-mode . fortran)) @end example +@end defvar -@item calc-embedded-announce-formula - +@defvar calc-embedded-announce-formula See @ref{Customizing Embedded Mode}.@* The variable @code{calc-embedded-announce-formula} helps determine what formulas @kbd{M-# a} will activate in a buffer. It is a @@ -34903,10 +34902,10 @@ activated. (Calc also uses other patterns to find formulas, such as The default pattern is @code{"%Embed\n\\(% .*\n\\)*"}, which checks for @samp{%Embed} followed by any number of lines beginning with @samp{%} and a space. +@end defvar -@item calc-embedded-open-formula -@itemx calc-embedded-close-formula - +@defvar calc-embedded-open-formula +@defvarx calc-embedded-close-formula See @ref{Customizing Embedded Mode}.@* The variables @code{calc-embedded-open-formula} and @code{calc-embedded-open-formula} control the region that Calc will @@ -34931,10 +34930,10 @@ Lines beginning with @samp{.EQ} and @samp{.EN} (@dfn{eqn} delimiters); @item Lines containing a single @samp{%} or @samp{.\"} symbol and nothing else. @end enumerate +@end defvar -@item calc-embedded-open-word -@itemx calc-embedded-close-word - +@defvar calc-embedded-open-word +@defvarx calc-embedded-close-word See @ref{Customizing Embedded Mode}.@* The variables @code{calc-embedded-open-word} and @code{calc-embedded-close-word} control the region that Calc will @@ -34944,10 +34943,10 @@ regular expressions. The default values of @code{calc-embedded-open-word} and @code{calc-embedded-close-word} are @code{"^\\|[^-+0-9.eE]"} and @code{"$\\|[^-+0-9.eE]"} respectively. +@end defvar -@item calc-embedded-open-plain -@itemx calc-embedded-close-plain - +@defvar calc-embedded-open-plain +@defvarx calc-embedded-close-plain See @ref{Customizing Embedded Mode}.@* The variables @code{calc-embedded-open-plain} and @code{calc-embedded-open-plain} are used to delimit ``plain'' @@ -34960,10 +34959,10 @@ The default string for @code{calc-embedded-open-plain} is @code{calc-embedded-close-plain} is @code{" %%%\n"}, without the trailing newline here, the first line of a Big mode formula that followed might be shifted over with respect to the other lines. +@end defvar -@item calc-embedded-open-new-formula -@itemx calc-embedded-close-new-formula - +@defvar calc-embedded-open-new-formula +@defvarx calc-embedded-close-new-formula See @ref{Customizing Embedded Mode}.@* The variables @code{calc-embedded-open-new-formula} and @code{calc-embedded-close-new-formula} are strings which are @@ -34978,10 +34977,10 @@ also @code{"\n\n"}. The final newline is omitted by @w{@kbd{M-# f}} if typed at the end of a line. (It follows that if @kbd{M-# f} is typed on a blank line, both a leading opening newline and a trailing closing newline are omitted.) +@end defvar -@item calc-embedded-open-mode -@itemx calc-embedded-close-mode - +@defvar calc-embedded-open-mode +@defvarx calc-embedded-close-mode See @ref{Customizing Embedded Mode}.@* The variables @code{calc-embedded-open-mode} and @code{calc-embedded-close-mode} are strings which Calc will place before @@ -34995,8 +34994,7 @@ and the default value of @code{calc-embedded-close-mode} is If you change the value of @code{calc-embedded-close-mode}, it is a good idea still to end with a newline so that mode annotations will appear on lines by themselves. - -@end table +@end defvar @node Reporting Bugs, Summary, Customizable Variables, Top @appendix Reporting Bugs From e39f3cfe44291e205c8657318a0a59733ee660d6 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 30 May 2005 21:08:43 +0000 Subject: [PATCH 180/294] *** empty log message *** --- lisp/ChangeLog | 7 +++++++ man/ChangeLog | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a4145b545e8..91f967b01cd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2005-05-30 Jay Belanger + + * calc/calc.el (calc-bug-address): Fix docstring. + (calc-window-hook, calc-trail-window-hook): New variables. + (calc-trail-display): Restore use of calc-trail-window-hook. + (calc): Restore use of calc-window-hook. + 2005-05-31 Masatake YAMATO * emacs-lisp/find-func.el (find-function-noselect): Handle subroutines. diff --git a/man/ChangeLog b/man/ChangeLog index 61d765a3a30..f3f2afcec7e 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,10 @@ +2005-05-30 Jay Belanger + + * calc.texi (Hooks): Change description of calc-window-hook and + calc-trail-window-hook to match usage. + (Computational Functions): Add more constant-generating functions. + (Customizable Variables): Use defvar. + 2005-05-30 Noah Friedman * trouble.texi (After a Crash): Mention emacs-buffer.gdb as a From c7a4ce37e95f0ac17d80bdb7c2b1280b82b186fb Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 31 May 2005 00:13:51 +0000 Subject: [PATCH 181/294] *** empty log message *** --- lisp/ChangeLog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 91f967b01cd..93f7460fbce 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2005-05-30 John Wiegley + + * eshell/em-cmpl.el, eshell/em-dirs.el, eshell/em-glob.el, + eshell/em-unix.el, eshell/esh-ext.el, eshell/esh-io.el, + eshell/esh-util.el, eshell/esh-var.el: Changed all uses of + `directory-sep-char' to ?/, and all uses of `string-to-int' to + `string-to-number'. + 2005-05-30 Jay Belanger * calc/calc.el (calc-bug-address): Fix docstring. From 6b0e3e4df5deff8b5d1dcb5065c070abb8393e9d Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 31 May 2005 00:14:26 +0000 Subject: [PATCH 182/294] Changed all uses of `directory-sep-char' to ?/, and all uses of `string-to-int' to `string-to-number'. --- lisp/eshell/em-cmpl.el | 5 ++--- lisp/eshell/em-dirs.el | 11 ++++------- lisp/eshell/em-glob.el | 9 +++------ lisp/eshell/em-unix.el | 2 +- lisp/eshell/esh-ext.el | 2 +- lisp/eshell/esh-io.el | 2 +- lisp/eshell/esh-util.el | 17 +++++++---------- lisp/eshell/esh-var.el | 2 +- 8 files changed, 20 insertions(+), 30 deletions(-) diff --git a/lisp/eshell/em-cmpl.el b/lisp/eshell/em-cmpl.el index 5f529b07991..2b4dbc76ddc 100644 --- a/lisp/eshell/em-cmpl.el +++ b/lisp/eshell/em-cmpl.el @@ -136,8 +136,7 @@ to writing a completion function." :type (get 'pcomplete-file-ignore 'custom-type) :group 'eshell-cmpl) -(defcustom eshell-cmpl-dir-ignore - (format "\\`\\(\\.\\.?\\|CVS\\)%c\\'" directory-sep-char) +(defcustom eshell-cmpl-dir-ignore "\\`\\(\\.\\.?\\|CVS\\)/\\'" (documentation-property 'pcomplete-dir-ignore 'variable-documentation) :type (get 'pcomplete-dir-ignore 'custom-type) @@ -155,7 +154,7 @@ to writing a completion function." :type (get 'pcomplete-autolist 'custom-type) :group 'eshell-cmpl) -(defcustom eshell-cmpl-suffix-list (list directory-sep-char ?:) +(defcustom eshell-cmpl-suffix-list (list ?/ ?:) (documentation-property 'pcomplete-suffix-list 'variable-documentation) :type (get 'pcomplete-suffix-list 'custom-type) diff --git a/lisp/eshell/em-dirs.el b/lisp/eshell/em-dirs.el index 7b74069454b..6477a546eb8 100644 --- a/lisp/eshell/em-dirs.el +++ b/lisp/eshell/em-dirs.el @@ -276,8 +276,7 @@ Thus, this does not include the current directory.") (let* ((letter (match-string 1)) (regexp (concat "\\`" letter)) (path (eshell-find-previous-directory regexp))) - (concat (or path letter) - (char-to-string directory-sep-char))))) + (concat (or path letter) "/")))) (defun eshell-complete-user-reference () "If there is a user reference, complete it." @@ -300,7 +299,7 @@ Thus, this does not include the current directory.") (let* ((path default-directory) (len (length path))) (if (and (> len 1) - (eq (aref path (1- len)) directory-sep-char) + (eq (aref path (1- len)) ?/) (not (and (eshell-under-windows-p) (string-match "\\`[A-Za-z]:[\\\\/]\\'" path)))) (setq path (substring path 0 (1- (length path))))) @@ -324,9 +323,7 @@ in the minibuffer: (len (length extra-dots)) replace-text) (while (> len 0) - (setq replace-text - (concat replace-text - (char-to-string directory-sep-char) "..") + (setq replace-text (concat replace-text "/..") len (1- len))) (setq path (replace-match replace-text t t path 1)))) @@ -371,7 +368,7 @@ in the minibuffer: (setq path (ring-remove eshell-last-dir-ring (if index - (string-to-int index) + (string-to-number index) 0))))) ((and path (string-match "^=\\(.*\\)$" path)) (let ((oldpath (eshell-find-previous-directory diff --git a/lisp/eshell/em-glob.el b/lisp/eshell/em-glob.el index c84962e66b0..74614d78d9c 100644 --- a/lisp/eshell/em-glob.el +++ b/lisp/eshell/em-glob.el @@ -265,9 +265,6 @@ the form: (defvar matches) (defvar message-shown)) -;; jww (1999-11-18): this function assumes that directory-sep-char is -;; a forward slash (/) - (defun eshell-glob-entries (path globs &optional recurse-p) "Glob the entries in PATHS, possibly recursing if RECURSE-P is non-nil." (let* ((entries (ignore-errors @@ -303,11 +300,11 @@ the form: ;; can't use `directory-file-name' because it strips away text ;; properties in the string (let ((len (1- (length incl)))) - (if (eq (aref incl len) directory-sep-char) + (if (eq (aref incl len) ?/) (setq incl (substring incl 0 len))) (when excl (setq len (1- (length excl))) - (if (eq (aref excl len) directory-sep-char) + (if (eq (aref excl len) ?/) (setq excl (substring excl 0 len))))) (setq incl (eshell-glob-regexp incl) excl (and excl (eshell-glob-regexp excl))) @@ -329,7 +326,7 @@ the form: (while entries (setq name (car entries) len (length name) - isdir (eq (aref name (1- len)) directory-sep-char)) + isdir (eq (aref name (1- len)) ?/)) (if (let ((fname (directory-file-name name))) (and (not (and excl (string-match excl fname))) (string-match incl fname))) diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el index d932916d8c9..62296dde73c 100644 --- a/lisp/eshell/em-unix.el +++ b/lisp/eshell/em-unix.el @@ -877,7 +877,7 @@ Summarize disk usage of each FILE, recursively for directories.") (unless by-bytes (setq block-size (or block-size 1024))) (if (and max-depth (stringp max-depth)) - (setq max-depth (string-to-int max-depth))) + (setq max-depth (string-to-number max-depth))) ;; filesystem support means nothing under Windows (if (eshell-under-windows-p) (setq only-one-filesystem nil)) diff --git a/lisp/eshell/esh-ext.el b/lisp/eshell/esh-ext.el index c16b6113516..11fecee4de0 100644 --- a/lisp/eshell/esh-ext.el +++ b/lisp/eshell/esh-ext.el @@ -103,7 +103,7 @@ wholly ignored." "Invoke a .BAT or .CMD file on DOS/Windows systems." ;; since CMD.EXE can't handle forward slashes in the initial ;; argument... - (setcar args (subst-char-in-string directory-sep-char ?\\ (car args))) + (setcar args (subst-char-in-string ?/ ?\\ (car args))) (throw 'eshell-replace-command (eshell-parse-command eshell-windows-shell-file (cons "/c" args)))) diff --git a/lisp/eshell/esh-io.el b/lisp/eshell/esh-io.el index 1161013cf58..8f171760ea0 100644 --- a/lisp/eshell/esh-io.el +++ b/lisp/eshell/esh-io.el @@ -192,7 +192,7 @@ not be added to this variable." (eshell-finish-arg (prog1 (list 'eshell-set-output-handle - (or (and sh (string-to-int sh)) 1) + (or (and sh (string-to-number sh)) 1) (list 'quote (aref [overwrite append insert] (1- (length oper))))) diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el index a2fd0915cf4..91317300ca5 100644 --- a/lisp/eshell/esh-util.el +++ b/lisp/eshell/esh-util.el @@ -253,14 +253,13 @@ If N or M is nil, it means the end of the list." parts) (if (and (eshell-under-windows-p) (> len 2) - (eq (aref path 0) directory-sep-char) - (eq (aref path 1) directory-sep-char)) + (eq (aref path 0) ?/) + (eq (aref path 1) ?/)) (setq i 2)) (while (< i len) - (if (and (eq (aref path i) directory-sep-char) + (if (and (eq (aref path i) ?/) (not (get-text-property i 'escaped path))) - (setq parts (cons (if (= li i) - (char-to-string directory-sep-char) + (setq parts (cons (if (= li i) "/" (substring path li (1+ i))) parts) li (1+ i))) (setq i (1+ i))) @@ -268,9 +267,7 @@ If N or M is nil, it means the end of the list." (setq parts (cons (substring path li i) parts))) (if (and (eshell-under-windows-p) (string-match "\\`[A-Za-z]:\\'" (car (last parts)))) - (setcar (last parts) - (concat (car (last parts)) - (char-to-string directory-sep-char)))) + (setcar (last parts) (concat (car (last parts)) "/"))) (nreverse parts))) (defun eshell-to-flat-string (value) @@ -450,8 +447,8 @@ list." (point) (progn (end-of-line) (point))) ":"))) (if (and (and fields (nth 0 fields) (nth 2 fields)) - (not (assq (string-to-int (nth 2 fields)) names))) - (setq names (cons (cons (string-to-int (nth 2 fields)) + (not (assq (string-to-number (nth 2 fields)) names))) + (setq names (cons (cons (string-to-number (nth 2 fields)) (nth 0 fields)) names)))) (forward-line)))) diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el index 9ff9c1898a2..a0294273985 100644 --- a/lisp/eshell/esh-var.el +++ b/lisp/eshell/esh-var.el @@ -631,7 +631,7 @@ For example, to retrieve the second element of a user's record in (if (and value (stringp value) (file-directory-p value)) - (concat varname (char-to-string directory-sep-char)) + (concat varname "/") varname)))) (eshell-envvar-names (eshell-environment-variables))) (all-completions argname obarray 'boundp) From 1376845c3c3b97cab82eb501c285a4c5a66a6859 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 31 May 2005 04:19:10 +0000 Subject: [PATCH 183/294] Whitespace change. --- lisp/recentf.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/recentf.el b/lisp/recentf.el index cf61b688eb5..bb462bc71d7 100644 --- a/lisp/recentf.el +++ b/lisp/recentf.el @@ -76,7 +76,7 @@ See the command `recentf-save-list'." :type 'file) (defcustom recentf-exclude nil -"*List of regexps and predicates for filenames excluded from the recent list. + "*List of regexps and predicates for filenames excluded from the recent list. When a filename matches any of the regexps or satisfies any of the predicates it is excluded from the recent list. A predicate is a function that is passed a filename to check and that From f35aff821d533bbe2f2761a997800c198bfa9e8d Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 31 May 2005 04:23:29 +0000 Subject: [PATCH 184/294] (vhdl-fill-region): Test ARG, not INTERACTIVE. (vhdl-emacs-21): Doc fix. (vhdl-mode): Unconditionally set comment-padding. (vhdl-fixup-whitespace-region): Insert spaces only where there are none. (vhdl-statistics-buffer): Make the Emacs 21 behavior universal. --- lisp/ChangeLog | 10 ++++++++++ lisp/progmodes/vhdl-mode.el | 18 +++++++++++------- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 93f7460fbce..a519a937eb6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2005-05-31 Richard M. Stallman + + * progmodes/vhdl-mode.el (vhdl-fill-region): Test ARG, not + INTERACTIVE. + (vhdl-emacs-21): Doc fix. + (vhdl-mode): Unconditionally set comment-padding. + (vhdl-fixup-whitespace-region): Insert spaces only where + there are none. + (vhdl-statistics-buffer): Make the Emacs 21 behavior universal. + 2005-05-30 John Wiegley * eshell/em-cmpl.el, eshell/em-dirs.el, eshell/em-glob.el, diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index af05de75b34..ebccb1bf5bf 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -127,7 +127,7 @@ "Non-nil if XEmacs is used.") ;; Emacs 21 handling (defconst vhdl-emacs-21 (and (= emacs-major-version 21) (not vhdl-xemacs)) - "Non-nil if GNU Emacs 21 is used.") + "Non-nil if Emacs 21 is used.") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -4568,8 +4568,7 @@ Key bindings: (set (make-local-variable 'indent-line-function) 'vhdl-indent-line) (set (make-local-variable 'comment-start) "--") (set (make-local-variable 'comment-end) "") - (when vhdl-emacs-21 - (set (make-local-variable 'comment-padding) "")) + (set (make-local-variable 'comment-padding) "") (set (make-local-variable 'comment-column) vhdl-inline-comment-column) (set (make-local-variable 'end-comment-column) vhdl-end-comment-column) (set (make-local-variable 'comment-start-skip) "--+\\s-*") @@ -7484,7 +7483,13 @@ end of line, do nothing in comments and strings." (while (re-search-forward "\\(--.*\n\\|\"[^\"\n]*[\"\n]\\)\\|\\(\\([^/:<>=]\\)\\(:\\|=\\|<\\|>\\|:=\\|<=\\|>=\\|=>\\|/=\\)\\([^=>]\\|$\\)\\)" end t) (if (match-string 1) (goto-char (match-end 1)) - (replace-match "\\3 \\4 \\5") + (save-excursion + (goto-char (match-beginning 4)) + (unless (eq (preceding-char) ?\ ) + (insert " ")) + (goto-char (match-end 4)) + (unless (eq (following-char) ?\ ) + (insert " "))) (goto-char (match-end 4)))) ;; eliminate multiple spaces and spaces at end of line (goto-char beg) @@ -7540,7 +7545,7 @@ buffer." (interactive "r\np") (save-excursion (goto-char beg) - (let ((margin (if interactive (current-indentation) (current-column)))) + (let ((margin (if arg (current-indentation) (current-column)))) (goto-char end) (setq end (point-marker)) ;; remove inline comments, newlines and whitespace @@ -12055,8 +12060,7 @@ File statistics: \"%s\"\n\ # statements : %5d\n\ # code lines : %5d\n\ # total lines : %5d\n\ " - (buffer-file-name) no-stats no-code-lines no-lines) - (unless vhdl-emacs-21 (vhdl-show-messages)))) + (buffer-file-name) no-stats no-code-lines no-lines))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Help functions From 2cd16d74388dc0980422656d215648de83324a94 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 31 May 2005 09:32:35 +0000 Subject: [PATCH 185/294] (filter-buffer-substring): Fix typo in docstring. --- lisp/ChangeLog | 4 ++++ lisp/simple.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a519a937eb6..067ce954c44 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2005-05-31 Juanma Barranquero + + * simple.el (filter-buffer-substring): Fix typo in docstring. + 2005-05-31 Richard M. Stallman * progmodes/vhdl-mode.el (vhdl-fill-region): Test ARG, not diff --git a/lisp/simple.el b/lisp/simple.el index 2cb412e4882..b50707531d1 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2247,7 +2247,7 @@ is nil, the buffer substring is returned unaltered. If DELETE is non-nil, the text between BEG and END is deleted from the buffer. -Point is temporarily set to BEG before caling +Point is temporarily set to BEG before calling `buffer-substring-filters', in case the functions need to know where the text came from. From 881b07f982f000b5be01609238ee2daf08c93936 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 31 May 2005 09:45:17 +0000 Subject: [PATCH 186/294] *** empty log message *** --- lisp/ChangeLog | 52 +++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 067ce954c44..57abd9327bb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -14,9 +14,9 @@ 2005-05-30 John Wiegley - * eshell/em-cmpl.el, eshell/em-dirs.el, eshell/em-glob.el, - eshell/em-unix.el, eshell/esh-ext.el, eshell/esh-io.el, - eshell/esh-util.el, eshell/esh-var.el: Changed all uses of + * eshell/em-cmpl.el, eshell/em-dirs.el, eshell/em-glob.el + * eshell/em-unix.el, eshell/esh-ext.el, eshell/esh-io.el + * eshell/esh-util.el, eshell/esh-var.el: Change all uses of `directory-sep-char' to ?/, and all uses of `string-to-int' to `string-to-number'. @@ -3697,11 +3697,11 @@ * calendar/calendar.el: Replace `legal' with `valid'. * emacs-lisp/advice.el: Replace `legal' with `valid'. * mail/supercite.el: Replace `legal' with `valid'. - * progmodes/cperl-mode.el, progmodes/idlw-shell.el, - progmodes/idlwave.el, progmodes/vhdl-mode.el: Replace `legal' with - `valid'. - * textmodes/reftex-vars.el, textmodes/reftex.el: Replace `legal' - with `valid'. + * progmodes/cperl-mode.el, progmodes/idlw-shell.el + * progmodes/idlwave.el, progmodes/vhdl-mode.el: + Replace `legal' with `valid'. + * textmodes/reftex-vars.el, textmodes/reftex.el: + Replace `legal' with `valid'. 2005-03-25 Werner Lemberg @@ -3711,15 +3711,15 @@ * 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'. - * 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, - textmodes/reftex.el, textmodes/org.el: Replace `illegal' with `invalid'. + * 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 + * textmodes/reftex.el, textmodes/org.el: Replace `illegal' with `invalid'. 2005-03-24 Stefan Monnier @@ -6095,8 +6095,8 @@ 2005-01-11 Juri Linkov - * toolbar/back_arrow.xpm, toolbar/back_arrow.pbm, - * toolbar/lc-back_arrow.xpm, toolbar/lc-fwd_arrow.xpm, + * toolbar/back_arrow.xpm, toolbar/back_arrow.pbm + * toolbar/lc-back_arrow.xpm, toolbar/lc-fwd_arrow.xpm * toolbar/fwd_arrow.xpm, toolbar/fwd_arrow.pbm: New icons. * info.el (Info-history-forward): New variable. @@ -13764,9 +13764,9 @@ of 19 months of 19 days, with 4 intercalary days. Each year begins on March 21, with the calendar starting in 1844. - * calendar/cal-menu.el, calendar/calendar.el, - calendar/diary-lib.el, calendar/holidays.el: Added support for - using cal-bahai.el. + * calendar/cal-menu.el, calendar/calendar.el + * calendar/diary-lib.el, calendar/holidays.el: + Added support for using cal-bahai.el. * eshell/em-glob.el (eshell-glob-initialize): Move initialization of `eshell-glob-chars-regexp' into `eshell-glob-regexp', so that @@ -20052,10 +20052,10 @@ * calendar/cal-tex.el (cal-tex-day-name-format): Doc fix. (cal-tex-LaTeX-hourbox): Move definition before use. - * calendar/cal-china.el, cal-hebrew.el, cal-islam.el, - cal-julian.el, cal-menu.el, cal-move.el, holidays.el, - lunar.el, solar.el - (displayed-month, displayed-year): Define for compiler. + * calendar/cal-china.el, cal-hebrew.el, cal-islam.el + * cal-julian.el, cal-menu.el, cal-move.el, holidays.el + * lunar.el, solar.el (displayed-month, displayed-year): + Define for compiler. 2003-08-03 Martin Stjernholm From d0213ee17642d54c4779d3078e3188a226e41c08 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 31 May 2005 11:13:08 +0000 Subject: [PATCH 187/294] (list-faces-display): Signal error if passed a regexp that matches no face name. --- lisp/ChangeLog | 3 +++ lisp/faces.el | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 57abd9327bb..b99b13015e9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2005-05-31 Juanma Barranquero + * faces.el (list-faces-display): Signal error if passed a regexp + that matches no face name. + * simple.el (filter-buffer-substring): Fix typo in docstring. 2005-05-31 Richard M. Stallman diff --git a/lisp/faces.el b/lisp/faces.el index 27905af734c..c89001482ac 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -1163,7 +1163,9 @@ arg, prompt for a regular expression." (mapcar (lambda (f) (when (string-match regexp (symbol-name f)) f)) - faces)))) + faces))) + (unless faces + (error "No faces matching \"%s\"" regexp))) (with-output-to-temp-buffer "*Faces*" (save-excursion (set-buffer standard-output) From 8bab33ad3c636f8822ad22207e70898bc9f4882c Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 31 May 2005 12:09:41 +0000 Subject: [PATCH 188/294] Update maintainer. --- lisp/mail/supercite.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/mail/supercite.el b/lisp/mail/supercite.el index 7ed1c2d97b6..ba4aca881ef 100644 --- a/lisp/mail/supercite.el +++ b/lisp/mail/supercite.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1993, 1997, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: 1993 Barry A. Warsaw -;; Maintainer: FSF +;; Maintainer: Glenn Morris ;; Created: February 1993 ;; Last Modified: 1993/09/22 18:58:46 ;; Keywords: mail, news From b6061a8869e83588848b17d3f3fdaa265fe3a97b Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 31 May 2005 12:10:29 +0000 Subject: [PATCH 189/294] Comment change. --- lisp/calendar/diary-lib.el | 2 -- 1 file changed, 2 deletions(-) diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index c8e6843d4b2..6aec579c107 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -1054,8 +1054,6 @@ changing the variable `diary-include-string'." (match-string-no-properties 2))) (mark-diary-entries-hook 'mark-included-diary-files) (dbuff (find-buffer-visiting diary-file))) - ;; TODO if dbuff is non-nil, should we check for modifications - ;; and offer to save it first? (if (file-exists-p diary-file) (if (file-readable-p diary-file) (progn From f2430a0de4a9df92c161a7166ba50b48c381fa59 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 31 May 2005 13:26:21 +0000 Subject: [PATCH 190/294] (convert-standard-filename): Docstring fix. --- lisp/files.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/files.el b/lisp/files.el index 4602b4e1efa..a75b6b2fc89 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -514,6 +514,10 @@ Runs the usual ange-ftp hook, but only for completion operations." This means to guarantee valid names and perhaps to canonicalize certain patterns. +FILENAME should be an absolute file name since the conversion rules +sometimes vary depending on the position in the file name. E.g. c:/foo +is a valid DOS file name, but c:/bar/c:/foo is not. + This function's standard definition is trivial; it just returns the argument. However, on Windows and DOS, replace invalid characters. On DOS, make sure to obey the 8.3 limitations. On From abceae284ab1804290e67bd1d8ac1b09a8b8a315 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 31 May 2005 13:27:27 +0000 Subject: [PATCH 191/294] (thumbs-mode): Fix misuse of make-variable-buffer-local. --- lisp/thumbs.el | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lisp/thumbs.el b/lisp/thumbs.el index 03491873c9d..321fe7266cc 100644 --- a/lisp/thumbs.el +++ b/lisp/thumbs.el @@ -758,9 +758,8 @@ ACTION and ARG should be a valid convert command." (define-derived-mode thumbs-mode fundamental-mode "thumbs" "Preview images in a thumbnails buffer" - (make-variable-buffer-local 'thumbs-markedL) (setq buffer-read-only t) - (setq thumbs-markedL nil)) + (set (make-local-variable 'thumbs-markedL) nil)) (defvar thumbs-view-image-mode-map (let ((map (make-sparse-keymap))) @@ -797,7 +796,5 @@ ACTION and ARG should be a valid convert command." (provide 'thumbs) +;; arch-tag: f9ac1ef8-83fc-42c0-8069-1fae43fd2e5c ;;; thumbs.el ends here - - -;;; arch-tag: f9ac1ef8-83fc-42c0-8069-1fae43fd2e5c From 13cc7d614dd85382228c20b6e70ee8f9f1e28978 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 31 May 2005 15:00:23 +0000 Subject: [PATCH 192/294] *** empty log message *** --- src/ChangeLog | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index e40048b4c35..af24b539bed 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,30 @@ +2005-05-31 Kim F. Storm + + * xdisp.c (mode_line_noprop_buf, mode_line_noprop_buf_end) + (mode_line_noprop_ptr): Rename from frame_title_*. + (store_mode_line_noprop_char): Rename from store_frame_title_char. + (store_mode_line_noprop): Rename from store_frame_title. + (mode_line_target): New enum to specify current output target + for mode line formatting. + (display_mode_element): Test it rather than frame_title_ptr and + mode_line_string_list to determine where output should go. + (mode_line_proptrans_alist, mode_line_string_alist): Make static. + (Vmode_line_unwind_vector): New variable. + (format_mode_line_unwind_data, unwind_format_mode_line): New + functions for unwind protection in mode line formatting. + (x_consider_frame_title): Use them and new local var 'title_start' + to support nested calls to format-mode-line. Set mode_line_target + to MODE_LINE_TITLE. + (Fformat_mode_line): Use them and new local var 'string_start' to + support nested calls to format-mode-line. Set mode_line_target to + MODE_LINE_NOPROP or MODE_LINE_STRING. Don't trim trailing dashes. + (decode_mode_spec): Don't make infinite number of trailing dashes + for MODE_LINE_NOPROP and MODE_LINE_STRING targets. + (syms_of_xdisp): Initialize and staticpro mode_line_string_face, + mode_line_string_face_prop, and Vmode_line_unwind_vector. + (init_xdisp): Initialize mode_line_noprop_ptr to start of _buf. + Initialize mode_line_target to MODE_LINE_DISPLAY. + 2005-05-29 Richard M. Stallman * buffer.c (Fbuffer_local_value): Call indirect_variable. From 4c0e4b80fed124ec8324fb5a224a505c50daa3ef Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 31 May 2005 15:00:44 +0000 Subject: [PATCH 193/294] (mode_line_noprop_buf, mode_line_noprop_buf_end) (mode_line_noprop_ptr): Rename from frame_title_*. (store_mode_line_noprop_char): Rename from store_frame_title_char. (store_mode_line_noprop): Rename from store_frame_title. (mode_line_target): New enum to specify current output target for mode line formatting. (display_mode_element): Test it rather than frame_title_ptr and mode_line_string_list to determine where output should go. (mode_line_proptrans_alist, mode_line_string_alist): Make static. (Vmode_line_unwind_vector): New variable. (format_mode_line_unwind_data, unwind_format_mode_line): New functions for unwind protection in mode line formatting. (x_consider_frame_title): Use them and new local var 'title_start' to support nested calls to format-mode-line. Set mode_line_target to MODE_LINE_TITLE. (Fformat_mode_line): Use them and new local var 'string_start' to support nested calls to format-mode-line. Set mode_line_target to MODE_LINE_NOPROP or MODE_LINE_STRING. Don't trim trailing dashes. (decode_mode_spec): Don't make infinite number of trailing dashes for MODE_LINE_NOPROP and MODE_LINE_STRING targets. (syms_of_xdisp): Initialize and staticpro mode_line_string_face, mode_line_string_face_prop, and Vmode_line_unwind_vector. (init_xdisp): Initialize mode_line_noprop_ptr to start of _buf. Initialize mode_line_target to MODE_LINE_DISPLAY. --- src/xdisp.c | 424 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 259 insertions(+), 165 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index b20c4815abc..167b4afadaa 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -843,8 +843,8 @@ static struct text_pos run_window_scroll_functions P_ ((Lisp_Object, struct text_pos)); static void reconsider_clip_changes P_ ((struct window *, struct buffer *)); static int text_outside_line_unchanged_p P_ ((struct window *, int, int)); -static void store_frame_title_char P_ ((char)); -static int store_frame_title P_ ((const unsigned char *, int, int)); +static void store_mode_line_noprop_char P_ ((char)); +static int store_mode_line_noprop P_ ((const unsigned char *, int, int)); static void x_consider_frame_title P_ ((Lisp_Object)); static void handle_stop P_ ((struct it *)); static int tool_bar_lines_needed P_ ((struct frame *)); @@ -8159,52 +8159,123 @@ echo_area_display (update_frame_p) /*********************************************************************** - Frame Titles + Mode Lines and Frame Titles ***********************************************************************/ +/* A buffer for constructing non-propertized mode-line strings and + frame titles in it; allocated from the heap in init_xdisp and + resized as needed in store_mode_line_noprop_char. */ -/* The frame title buffering code is also used by Fformat_mode_line. - So it is not conditioned by HAVE_WINDOW_SYSTEM. */ - -/* A buffer for constructing frame titles in it; allocated from the - heap in init_xdisp and resized as needed in store_frame_title_char. */ - -static char *frame_title_buf; +static char *mode_line_noprop_buf; /* The buffer's end, and a current output position in it. */ -static char *frame_title_buf_end; -static char *frame_title_ptr; +static char *mode_line_noprop_buf_end; +static char *mode_line_noprop_ptr; + +static enum { + MODE_LINE_DISPLAY = 0, + MODE_LINE_TITLE, + MODE_LINE_NOPROP, + MODE_LINE_STRING +} mode_line_target; + +/* Alist that caches the results of :propertize. + Each element is (PROPERTIZED-STRING . PROPERTY-LIST). */ +static Lisp_Object mode_line_proptrans_alist; + +/* List of strings making up the mode-line. */ +static Lisp_Object mode_line_string_list; + +/* Base face property when building propertized mode line string. */ +static Lisp_Object mode_line_string_face; +static Lisp_Object mode_line_string_face_prop; -/* Store a single character C for the frame title in frame_title_buf. - Re-allocate frame_title_buf if necessary. */ +/* Unwind data for mode line strings */ + +static Lisp_Object Vmode_line_unwind_vector; + +static Lisp_Object +format_mode_line_unwind_data (obuf) + struct buffer *obuf; +{ + int i = 0; + Lisp_Object vector; + + /* Reduce consing by keeping one vector in + Vwith_echo_area_save_vector. */ + vector = Vmode_line_unwind_vector; + Vmode_line_unwind_vector = Qnil; + + if (NILP (vector)) + vector = Fmake_vector (make_number (7), Qnil); + + AREF (vector, 0) = make_number (mode_line_target); + AREF (vector, 1) = make_number (mode_line_noprop_ptr - mode_line_noprop_buf); + AREF (vector, 2) = mode_line_string_list; + AREF (vector, 3) = mode_line_proptrans_alist; + AREF (vector, 4) = mode_line_string_face; + AREF (vector, 5) = mode_line_string_face_prop; + + if (obuf) + XSETBUFFER (AREF (vector, 6), obuf); + else + AREF (vector, 6) = Qnil; + + return vector; +} + +static Lisp_Object +unwind_format_mode_line (vector) + Lisp_Object vector; +{ + mode_line_target = XINT (AREF (vector, 0)); + mode_line_noprop_ptr = mode_line_noprop_buf + XINT (AREF (vector, 1)); + mode_line_string_list = AREF (vector, 2); + mode_line_proptrans_alist = AREF (vector, 3); + mode_line_string_face = AREF (vector, 4); + mode_line_string_face_prop = AREF (vector, 5); + + if (!NILP (AREF (vector, 6))) + { + set_buffer_internal_1 (XBUFFER (AREF (vector, 6))); + AREF (vector, 6) = Qnil; + } + + Vmode_line_unwind_vector = vector; + return Qnil; +} + + +/* Store a single character C for the frame title in mode_line_noprop_buf. + Re-allocate mode_line_noprop_buf if necessary. */ static void #ifdef PROTOTYPES -store_frame_title_char (char c) +store_mode_line_noprop_char (char c) #else -store_frame_title_char (c) +store_mode_line_noprop_char (c) char c; #endif { /* If output position has reached the end of the allocated buffer, double the buffer's size. */ - if (frame_title_ptr == frame_title_buf_end) + if (mode_line_noprop_ptr == mode_line_noprop_buf_end) { - int len = frame_title_ptr - frame_title_buf; - int new_size = 2 * len * sizeof *frame_title_buf; - frame_title_buf = (char *) xrealloc (frame_title_buf, new_size); - frame_title_buf_end = frame_title_buf + new_size; - frame_title_ptr = frame_title_buf + len; + int len = mode_line_noprop_ptr - mode_line_noprop_buf; + int new_size = 2 * len * sizeof *mode_line_noprop_buf; + mode_line_noprop_buf = (char *) xrealloc (mode_line_noprop_buf, new_size); + mode_line_noprop_buf_end = mode_line_noprop_buf + new_size; + mode_line_noprop_ptr = mode_line_noprop_buf + len; } - *frame_title_ptr++ = c; + *mode_line_noprop_ptr++ = c; } -/* Store part of a frame title in frame_title_buf, beginning at - frame_title_ptr. STR is the string to store. Do not copy +/* Store part of a frame title in mode_line_noprop_buf, beginning at + mode_line_noprop_ptr. STR is the string to store. Do not copy characters that yield more columns than PRECISION; PRECISION <= 0 means copy the whole string. Pad with spaces until FIELD_WIDTH number of characters have been copied; FIELD_WIDTH <= 0 means don't @@ -8212,7 +8283,7 @@ store_frame_title_char (c) frame title. */ static int -store_frame_title (str, field_width, precision) +store_mode_line_noprop (str, field_width, precision) const unsigned char *str; int field_width, precision; { @@ -8223,19 +8294,23 @@ store_frame_title (str, field_width, precision) nbytes = strlen (str); n += c_string_width (str, nbytes, precision, &dummy, &nbytes); while (nbytes--) - store_frame_title_char (*str++); + store_mode_line_noprop_char (*str++); /* Fill up with spaces until FIELD_WIDTH reached. */ while (field_width > 0 && n < field_width) { - store_frame_title_char (' '); + store_mode_line_noprop_char (' '); ++n; } return n; } +/*********************************************************************** + Frame Titles + ***********************************************************************/ + #ifdef HAVE_WINDOW_SYSTEM /* Set the title of FRAME, if it has changed. The title format is @@ -8255,9 +8330,10 @@ x_consider_frame_title (frame) /* Do we have more than one visible frame on this X display? */ Lisp_Object tail; Lisp_Object fmt; - struct buffer *obuf; + char *title_start; int len; struct it it; + int count = SPECPDL_INDEX (); for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) { @@ -8276,18 +8352,22 @@ x_consider_frame_title (frame) multiple_frames = CONSP (tail); /* Switch to the buffer of selected window of the frame. Set up - frame_title_ptr so that display_mode_element will output into it; + mode_line_noprop_ptr so that display_mode_element will output into it; then display the title. */ - obuf = current_buffer; + record_unwind_protect (unwind_format_mode_line, + format_mode_line_unwind_data (current_buffer)); + set_buffer_internal_1 (XBUFFER (XWINDOW (f->selected_window)->buffer)); fmt = FRAME_ICONIFIED_P (f) ? Vicon_title_format : Vframe_title_format; - frame_title_ptr = frame_title_buf; + + mode_line_target = MODE_LINE_TITLE; + title_start = mode_line_noprop_ptr; init_iterator (&it, XWINDOW (f->selected_window), -1, -1, NULL, DEFAULT_FACE_ID); display_mode_element (&it, 0, -1, -1, fmt, Qnil, 0); - len = frame_title_ptr - frame_title_buf; - frame_title_ptr = NULL; - set_buffer_internal_1 (obuf); + len = mode_line_noprop_ptr - title_start; + + unbind_to (count, Qnil); /* Set the title only if it's changed. This avoids consing in the common case where it hasn't. (If it turns out that we've @@ -8296,8 +8376,8 @@ x_consider_frame_title (frame) higher level than this.) */ if (! STRINGP (f->name) || SBYTES (f->name) != len - || bcmp (frame_title_buf, SDATA (f->name), len) != 0) - x_implicitly_set_name (f, make_string (frame_title_buf, len), Qnil); + || bcmp (title_start, SDATA (f->name), len) != 0) + x_implicitly_set_name (f, make_string (title_start, len), Qnil); } } @@ -15631,18 +15711,6 @@ display_mode_line (w, face_id, format) return it.glyph_row->height; } -/* Alist that caches the results of :propertize. - Each element is (PROPERTIZED-STRING . PROPERTY-LIST). */ -Lisp_Object mode_line_proptrans_alist; - -/* List of strings making up the mode-line. */ -Lisp_Object mode_line_string_list; - -/* Base face property when building propertized mode line string. */ -static Lisp_Object mode_line_string_face; -static Lisp_Object mode_line_string_face_prop; - - /* Contribute ELT to the mode line for window IT->w. How it translates into text depends on its data type. @@ -15663,8 +15731,9 @@ static Lisp_Object mode_line_string_face_prop; If RISKY is nonzero, remove (disregard) any properties in any string we encounter, and ignore :eval and :propertize. - If the global variable `frame_title_ptr' is non-NULL, then the output - is passed to `store_frame_title' instead of `display_string'. */ + The global variable `mode_line_target' determines whether the + output is passed to `store_mode_line_noprop', + `store_mode_line_string', or `display_string'. */ static int display_mode_element (it, depth, field_width, precision, elt, props, risky) @@ -15753,21 +15822,27 @@ display_mode_element (it, depth, field_width, precision, elt, props, risky) if (literal) { prec = precision - n; - if (frame_title_ptr) - n += store_frame_title (SDATA (elt), -1, prec); - else if (!NILP (mode_line_string_list)) - n += store_mode_line_string (NULL, elt, 1, 0, prec, Qnil); - else - n += display_string (NULL, elt, Qnil, 0, 0, it, - 0, prec, 0, STRING_MULTIBYTE (elt)); + switch (mode_line_target) + { + case MODE_LINE_NOPROP: + case MODE_LINE_TITLE: + n += store_mode_line_noprop (SDATA (elt), -1, prec); + break; + case MODE_LINE_STRING: + n += store_mode_line_string (NULL, elt, 1, 0, prec, Qnil); + break; + case MODE_LINE_DISPLAY: + n += display_string (NULL, elt, Qnil, 0, 0, it, + 0, prec, 0, STRING_MULTIBYTE (elt)); + break; + } break; } while ((precision <= 0 || n < precision) && *this - && (frame_title_ptr - || !NILP (mode_line_string_list) + && (mode_line_target != MODE_LINE_DISPLAY || it->current_x < it->last_visible_x)) { const unsigned char *last = this; @@ -15788,29 +15863,36 @@ display_mode_element (it, depth, field_width, precision, elt, props, risky) prec = c_string_width (last, this - last, precision - n, &nchars, &nbytes); - if (frame_title_ptr) - n += store_frame_title (last, 0, prec); - else if (!NILP (mode_line_string_list)) + switch (mode_line_target) { - int bytepos = last - lisp_string; - int charpos = string_byte_to_char (elt, bytepos); - int endpos = (precision <= 0 - ? string_byte_to_char (elt, - this - lisp_string) - : charpos + nchars); + case MODE_LINE_NOPROP: + case MODE_LINE_TITLE: + n += store_mode_line_noprop (last, 0, prec); + break; + case MODE_LINE_STRING: + { + int bytepos = last - lisp_string; + int charpos = string_byte_to_char (elt, bytepos); + int endpos = (precision <= 0 + ? string_byte_to_char (elt, + this - lisp_string) + : charpos + nchars); - n += store_mode_line_string (NULL, - Fsubstring (elt, make_number (charpos), - make_number (endpos)), - 0, 0, 0, Qnil); - } - else - { - int bytepos = last - lisp_string; - int charpos = string_byte_to_char (elt, bytepos); - n += display_string (NULL, elt, Qnil, 0, charpos, - it, 0, prec, 0, - STRING_MULTIBYTE (elt)); + n += store_mode_line_string (NULL, + Fsubstring (elt, make_number (charpos), + make_number (endpos)), + 0, 0, 0, Qnil); + } + break; + case MODE_LINE_DISPLAY: + { + int bytepos = last - lisp_string; + int charpos = string_byte_to_char (elt, bytepos); + n += display_string (NULL, elt, Qnil, 0, charpos, + it, 0, prec, 0, + STRING_MULTIBYTE (elt)); + } + break; } } else /* c == '%' */ @@ -15848,44 +15930,51 @@ display_mode_element (it, depth, field_width, precision, elt, props, risky) spec = decode_mode_spec (it->w, c, field, prec, &multibyte); - if (frame_title_ptr) - n += store_frame_title (spec, field, prec); - else if (!NILP (mode_line_string_list)) + switch (mode_line_target) { - int len = strlen (spec); - Lisp_Object tem = make_string (spec, len); - props = Ftext_properties_at (make_number (charpos), elt); - /* Should only keep face property in props */ - n += store_mode_line_string (NULL, tem, 0, field, prec, props); - } - else - { - int nglyphs_before, nwritten; + case MODE_LINE_NOPROP: + case MODE_LINE_TITLE: + n += store_mode_line_noprop (spec, field, prec); + break; + case MODE_LINE_STRING: + { + int len = strlen (spec); + Lisp_Object tem = make_string (spec, len); + props = Ftext_properties_at (make_number (charpos), elt); + /* Should only keep face property in props */ + n += store_mode_line_string (NULL, tem, 0, field, prec, props); + } + break; + case MODE_LINE_DISPLAY: + { + int nglyphs_before, nwritten; - nglyphs_before = it->glyph_row->used[TEXT_AREA]; - nwritten = display_string (spec, Qnil, elt, - charpos, 0, it, - field, prec, 0, - multibyte); + nglyphs_before = it->glyph_row->used[TEXT_AREA]; + nwritten = display_string (spec, Qnil, elt, + charpos, 0, it, + field, prec, 0, + multibyte); - /* Assign to the glyphs written above the - string where the `%x' came from, position - of the `%'. */ - if (nwritten > 0) - { - struct glyph *glyph - = (it->glyph_row->glyphs[TEXT_AREA] - + nglyphs_before); - int i; + /* Assign to the glyphs written above the + string where the `%x' came from, position + of the `%'. */ + if (nwritten > 0) + { + struct glyph *glyph + = (it->glyph_row->glyphs[TEXT_AREA] + + nglyphs_before); + int i; - for (i = 0; i < nwritten; ++i) - { - glyph[i].object = elt; - glyph[i].charpos = charpos; - } + for (i = 0; i < nwritten; ++i) + { + glyph[i].object = elt; + glyph[i].charpos = charpos; + } - n += nwritten; - } + n += nwritten; + } + } + break; } } else /* c == 0 */ @@ -16056,13 +16145,20 @@ display_mode_element (it, depth, field_width, precision, elt, props, risky) /* Pad to FIELD_WIDTH. */ if (field_width > 0 && n < field_width) { - if (frame_title_ptr) - n += store_frame_title ("", field_width - n, 0); - else if (!NILP (mode_line_string_list)) - n += store_mode_line_string ("", Qnil, 0, field_width - n, 0, Qnil); - else - n += display_string ("", Qnil, Qnil, 0, 0, it, field_width - n, - 0, 0, 0); + switch (mode_line_target) + { + case MODE_LINE_NOPROP: + case MODE_LINE_TITLE: + n += store_mode_line_noprop ("", field_width - n, 0); + break; + case MODE_LINE_STRING: + n += store_mode_line_string ("", Qnil, 0, field_width - n, 0, Qnil); + break; + case MODE_LINE_DISPLAY: + n += display_string ("", Qnil, Qnil, 0, 0, it, field_width - n, + 0, 0, 0); + break; + } } return n; @@ -16194,6 +16290,9 @@ are the selected window and the window's buffer). */) struct buffer *old_buffer = NULL; int face_id = -1; int no_props = INTEGERP (face); + int count = SPECPDL_INDEX (); + Lisp_Object str; + char *string_start = NULL; if (NILP (window)) window = selected_window; @@ -16221,64 +16320,52 @@ are the selected window and the window's buffer). */) face_id = DEFAULT_FACE_ID; if (XBUFFER (buffer) != current_buffer) - { - old_buffer = current_buffer; - set_buffer_internal_1 (XBUFFER (buffer)); - } + old_buffer = current_buffer; + + record_unwind_protect (unwind_format_mode_line, + format_mode_line_unwind_data (old_buffer)); + + if (old_buffer) + set_buffer_internal_1 (XBUFFER (buffer)); init_iterator (&it, w, -1, -1, NULL, face_id); - if (!no_props) + if (no_props) { + mode_line_target = MODE_LINE_NOPROP; + mode_line_string_face_prop = Qnil; + mode_line_string_list = Qnil; + string_start = mode_line_noprop_ptr; + } + else + { + mode_line_target = MODE_LINE_STRING; + mode_line_string_list = Qnil; mode_line_string_face = face; mode_line_string_face_prop = (NILP (face) ? Qnil : Fcons (Qface, Fcons (face, Qnil))); - /* We need a dummy last element in mode_line_string_list to - indicate we are building the propertized mode-line string. - Using mode_line_string_face_prop here GC protects it. */ - mode_line_string_list - = Fcons (mode_line_string_face_prop, Qnil); - frame_title_ptr = NULL; - } - else - { - mode_line_string_face_prop = Qnil; - mode_line_string_list = Qnil; - frame_title_ptr = frame_title_buf; + string_start = NULL; } push_frame_kboard (it.f); display_mode_element (&it, 0, 0, 0, format, Qnil, 0); pop_frame_kboard (); - if (old_buffer) - set_buffer_internal_1 (old_buffer); - - if (!no_props) + if (no_props) + { + len = mode_line_noprop_ptr - string_start; + str = make_string (string_start, len); + } + else { - Lisp_Object str; mode_line_string_list = Fnreverse (mode_line_string_list); - str = Fmapconcat (intern ("identity"), XCDR (mode_line_string_list), + str = Fmapconcat (intern ("identity"), mode_line_string_list, make_string ("", 0)); - mode_line_string_face_prop = Qnil; - mode_line_string_list = Qnil; - return str; } - len = frame_title_ptr - frame_title_buf; - if (len > 0 && frame_title_ptr[-1] == '-') - { - /* Mode lines typically ends with numerous dashes; reduce to two dashes. */ - while (frame_title_ptr > frame_title_buf && *--frame_title_ptr == '-') - ; - frame_title_ptr += 3; /* restore last non-dash + two dashes */ - if (len > frame_title_ptr - frame_title_buf) - len = frame_title_ptr - frame_title_buf; - } - - frame_title_ptr = NULL; - return make_string (frame_title_buf, len); + unbind_to (count, Qnil); + return str; } /* Write a null-terminated, right justified decimal representation of @@ -16596,7 +16683,8 @@ decode_mode_spec (w, c, field_width, precision, multibyte) register int i; /* Let lots_of_dashes be a string of infinite length. */ - if (!NILP (mode_line_string_list)) + if (mode_line_target == MODE_LINE_NOPROP || + mode_line_target == MODE_LINE_STRING) return "--"; if (field_width <= 0 || field_width > sizeof (lots_of_dashes)) @@ -22689,9 +22777,14 @@ syms_of_xdisp () mode_line_proptrans_alist = Qnil; staticpro (&mode_line_proptrans_alist); - mode_line_string_list = Qnil; staticpro (&mode_line_string_list); + mode_line_string_face = Qnil; + staticpro (&mode_line_string_face); + mode_line_string_face_prop = Qnil; + staticpro (&mode_line_string_face_prop); + Vmode_line_unwind_vector = Qnil; + staticpro (&Vmode_line_unwind_vector); help_echo_string = Qnil; staticpro (&help_echo_string); @@ -23041,9 +23134,10 @@ init_xdisp () /* Allocate the buffer for frame titles. Also used for `format-mode-line'. */ int size = 100; - frame_title_buf = (char *) xmalloc (size); - frame_title_buf_end = frame_title_buf + size; - frame_title_ptr = NULL; + mode_line_noprop_buf = (char *) xmalloc (size); + mode_line_noprop_buf_end = mode_line_noprop_buf + size; + mode_line_noprop_ptr = mode_line_noprop_buf; + mode_line_target = MODE_LINE_DISPLAY; } help_echo_showing_p = 0; From d7059a75ebc1d8831d54917a700ed81f15bb7b75 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Tue, 31 May 2005 16:35:05 +0000 Subject: [PATCH 194/294] (Notations Used in This Manual): Use @kbd for key sequence. (Demonstration of Calc): Mention another way of starting Calc. (Starting Calc): Mention long name of M-#. (Embedded Mode Overview): Remove unnecessary instruction. (Other M-# commands): Rephrase `M-# 0' explanation. --- man/calc.texi | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/man/calc.texi b/man/calc.texi index 3e8feaf1437..51bfdd48189 100644 --- a/man/calc.texi +++ b/man/calc.texi @@ -583,6 +583,7 @@ and what are the various ways that it can be used. * What is Calc:: * About This Manual:: * Notations Used in This Manual:: +* Demonstration of Calc:: * Using Calc:: * Demonstration of Calc:: * History and Acknowledgements:: @@ -764,7 +765,7 @@ regularly using Emacs. (If you don't have the @key{LFD} or @key{TAB} keys on your keyboard, the @kbd{C-j} and @kbd{C-i} keys are equivalent to them, respectively. If you don't have a Meta key, look for Alt or Extend Char. You can -also press @key{ESC} or @key{C-[} first to get the same effect, so +also press @key{ESC} or @kbd{C-[} first to get the same effect, so that @kbd{M-x}, @kbd{@key{ESC} x}, and @kbd{C-[ x} are all equivalent.) Sometimes the @key{RET} key is not shown when it is ``obvious'' @@ -797,7 +798,8 @@ Tutorial. To begin, start Emacs if necessary (usually the command @code{emacs} does this), and type @kbd{M-# c} (or @kbd{@key{ESC} # c}) to start the -Calculator. (@xref{Starting Calc}, if this doesn't work for you.) +Calculator. (You can also use @kbd{M-x calc} if this doesn't work. +@xref{Starting Calc}, for various ways of starting the Calculator.) Be sure to type all the sample input exactly, especially noting the difference between lower-case and upper-case letters. Remember, @@ -987,11 +989,15 @@ don't even have an @key{ESC} key, you can fake it by holding down Control or @key{CTRL} while typing a left square bracket (that's @kbd{C-[} in Emacs notation). -@kbd{M-#} is a @dfn{prefix key}; when you press it, Emacs waits for -you to press a second key to complete the command. In this case, -you will follow @kbd{M-#} with a letter (upper- or lower-case, it -doesn't matter for @kbd{M-#}) that says which Calc interface you -want to use. +The key @kbd{M-#} is bound to the command @code{calc-dispatch}, +which can be rebound if convenient. +(@xref{Key Bindings,,Customizing Key Bindings,emacs, +The GNU Emacs Manual}.) + +When you press @kbd{M-#}, Emacs waits for you to press a second key to +complete the command. In this case, you will follow @kbd{M-#} with a +letter (upper- or lower-case, it doesn't matter for @kbd{M-#}) that says +which Calc interface you want to use. To get Calc's standard interface, type @kbd{M-# c}. To get Keypad mode, type @kbd{M-# k}. Type @kbd{M-# ?} to get a brief @@ -1335,9 +1341,7 @@ righthand label: Type @kbd{d @} (1) @key{RET}}. @end smallexample To leave Embedded mode, type @kbd{M-# e} again. The mode line -and keyboard will revert to the way they were before. (If you have -actually been trying this as you read along, you'll want to press -@kbd{M-# 0} [with the digit zero] now to reset the modes you changed.) +and keyboard will revert to the way they were before. The related command @kbd{M-# w} operates on a single word, which generally means a single number, inside text. It uses any @@ -1520,8 +1524,7 @@ and record them as the current keyboard macro. @item 0 (This is the ``zero'' digit key.) Reset the Calculator to -its default state: Empty stack, and default mode settings. -With any prefix argument, reset everything but the stack. +its initial state: Empty stack, and initial mode settings. @end table @node History and Acknowledgements, , Using Calc, Getting Started @@ -1589,7 +1592,7 @@ Many people have contributed to Calc by reporting bugs and suggesting features, large and small. A few deserve special mention: Tim Peters, who helped develop the ideas that led to the selection commands, rewrite rules, and many other algebra features; -@texline Fran\c cois +@texline Fran\c{c}ois @infoline Francois Pinard, who contributed an early prototype of the Calc Summary appendix as well as providing valuable suggestions in many other areas of Calc; From 31ac0c17e989025c9e0c73d4ea10573fcc0a9403 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Tue, 31 May 2005 17:05:22 +0000 Subject: [PATCH 195/294] *** empty log message *** --- man/ChangeLog | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/man/ChangeLog b/man/ChangeLog index f3f2afcec7e..e761fbac0b9 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,12 @@ +2005-05-31 Jay Belanger + + * calc.texi (Notations Used in This Manual): Use @kbd for key + sequence. + (Demonstration of Calc): Mention another way of starting Calc. + (Starting Calc): Mention long name of M-#. + (Embedded Mode Overview): Remove unnecessary instruction. + (Other M-# commands): Rephrase `M-# 0' explanation. + 2005-05-30 Jay Belanger * calc.texi (Hooks): Change description of calc-window-hook and From 1705c023908d4a4eecb0eb0c755a991bfc2a2e60 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Tue, 31 May 2005 19:24:27 +0000 Subject: [PATCH 196/294] (calc-embedded-word): Change argument passed to calc-embedded. (calc-embedded-make-info): Have plain prefix argument select entire line. --- lisp/calc/calc-embed.el | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/lisp/calc/calc-embed.el b/lisp/calc/calc-embed.el index e6e95cae0ac..c6e0e33e559 100644 --- a/lisp/calc/calc-embed.el +++ b/lisp/calc/calc-embed.el @@ -440,7 +440,7 @@ (defun calc-embedded-word () (interactive) - (calc-embedded '(4))) + (calc-embedded '(t))) (defun calc-embedded-mark-formula (&optional body-only) "Put point at the beginning of this Calc formula, mark at the end. @@ -807,20 +807,26 @@ The command \\[yank] can retrieve it from there." (aset info 1 (or cbuf (save-excursion (calc-create-buffer) (current-buffer))))) - (if (and (integerp calc-embed-top) (not calc-embed-bot)) + (if (and + (or (integerp calc-embed-top) (equal calc-embed-top '(4))) + (not calc-embed-bot)) ; started with a user-supplied argument (progn - (if (= (setq calc-embed-arg (prefix-numeric-value calc-embed-arg)) 0) - (progn - (aset info 2 (copy-marker (region-beginning))) - (aset info 3 (copy-marker (region-end)))) - (aset info (if (> calc-embed-arg 0) 2 3) (point-marker)) - (if (> calc-embed-arg 0) + (if (equal calc-embed-top '(4)) + (progn + (aset info 2 (copy-marker (line-beginning-position))) + (aset info 3 (copy-marker (line-end-position)))) + (if (= (setq calc-embed-arg (prefix-numeric-value calc-embed-arg)) 0) (progn - (forward-line (1- calc-embed-arg)) - (end-of-line)) - (forward-line (1+ calc-embed-arg))) - (aset info (if (> calc-embed-arg 0) 3 2) (point-marker))) + (aset info 2 (copy-marker (region-beginning))) + (aset info 3 (copy-marker (region-end)))) + (aset info (if (> calc-embed-arg 0) 2 3) (point-marker)) + (if (> calc-embed-arg 0) + (progn + (forward-line (1- calc-embed-arg)) + (end-of-line)) + (forward-line (1+ calc-embed-arg))) + (aset info (if (> calc-embed-arg 0) 3 2) (point-marker)))) (aset info 4 (copy-marker (aref info 2))) (aset info 5 (copy-marker (aref info 3)))) (if (aref info 4) From 2be7b183bfb4de89ed3fc2cd85a0ccc4fc556f84 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Tue, 31 May 2005 19:35:50 +0000 Subject: [PATCH 197/294] (Basic Embedded Mode): Rewrite discussion of prefix arguments to reflect current behavior. --- man/calc.texi | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/man/calc.texi b/man/calc.texi index 51bfdd48189..6e947050107 100644 --- a/man/calc.texi +++ b/man/calc.texi @@ -30120,16 +30120,17 @@ instead uses the current point as one end of the formula, and includes that many lines forward or backward (respectively, including the current line). Explicit delimiters are not necessary in this case. -With a prefix argument of zero, Calc uses the current region -(delimited by point and mark) instead of formula delimiters. +With a prefix argument of zero, Calc uses the current region (delimited +by point and mark) instead of formula delimiters. With a prefix +argument of @kbd{C-u} only, Calc uses the current line as the formula. @kindex M-# w @pindex calc-embedded-word -With a prefix argument of @kbd{C-u} only, Calc scans for the first -non-numeric character (i.e., the first character that is not a -digit, sign, decimal point, or upper- or lower-case @samp{e}) -forward and backward to delimit the formula. @kbd{M-# w} -(@code{calc-embedded-word}) is equivalent to @kbd{C-u M-# e}. +The @kbd{M-# w} (@code{calc-embedded-word}) command will start Embedded +mode on the current ``word''; in this case Calc will scan for the first +non-numeric character (i.e., the first character that is not a digit, +sign, decimal point, or upper- or lower-case @samp{e}) forward and +backward to delimit the formula. When you enable Embedded mode for a formula, Calc reads the text between the delimiters and tries to interpret it as a Calc formula. From ad83e1f43beea6cf1b881d08e1ad0127257f5b00 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Tue, 31 May 2005 19:39:18 +0000 Subject: [PATCH 198/294] *** empty log message *** --- lisp/ChangeLog | 7 +++++++ man/ChangeLog | 2 ++ 2 files changed, 9 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b99b13015e9..e1d3ea93796 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2005-05-31 Jay Belanger + + * calc/calc-embed.el (calc-embedded-word): Change argument passed + to calc-embedded. + (calc-embedded-make-info): Have plain prefix argument select + entire line. + 2005-05-31 Juanma Barranquero * faces.el (list-faces-display): Signal error if passed a regexp diff --git a/man/ChangeLog b/man/ChangeLog index e761fbac0b9..30aaac5833e 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -6,6 +6,8 @@ (Starting Calc): Mention long name of M-#. (Embedded Mode Overview): Remove unnecessary instruction. (Other M-# commands): Rephrase `M-# 0' explanation. + (Basic Embedded Mode): Rewrite discussion of prefix arguments to + reflect current behavior. 2005-05-30 Jay Belanger From 7653a3dc4256a359c25aa03ee5d899b3b1841356 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Tue, 31 May 2005 20:54:57 +0000 Subject: [PATCH 199/294] *** empty log message *** --- lisp/ChangeLog | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e1d3ea93796..0fac029d357 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2005-06-01 Nick Roberts + + * progmodes/gdb-ui.el (gdb-set-gud-minor-mode-1) + (gdb-info-breakpoints-custom, gdb-delete-breakpoint) + (gdb-goto-breakpoint, gdb-source-info, gdb-get-location) + (gdb-assembler-custom): Improve regexps. + (def-gdb-auto-update-handler): Use window point to ensure it + is preserved. + 2005-05-31 Jay Belanger * calc/calc-embed.el (calc-embedded-word): Change argument passed From 4cbf66013b4e8fa3f3129489a50e950132899325 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Tue, 31 May 2005 20:55:48 +0000 Subject: [PATCH 200/294] (gdb-set-gud-minor-mode-1) (gdb-info-breakpoints-custom, gdb-delete-breakpoint) (gdb-goto-breakpoint, gdb-source-info, gdb-get-location) (gdb-assembler-custom): Improve regexps. (def-gdb-auto-update-handler): Use window point to ensure it is preserved. --- lisp/progmodes/gdb-ui.el | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index c906e101339..a9274cfcae7 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -277,7 +277,7 @@ Also display the main routine in the disassembly buffer if present." (defun gdb-set-gud-minor-mode-1 (buffer) (goto-char (point-min)) (when (and (search-forward "Located in " nil t) - (looking-at "\\S-*") + (looking-at "\\S-+") (string-equal (buffer-file-name buffer) (match-string 0))) (with-current-buffer buffer @@ -1161,12 +1161,12 @@ happens to be appropriate." (let ((buf (gdb-get-buffer ',buf-key))) (and buf (with-current-buffer buf - (let ((p (point)) + (let ((p (window-point (get-buffer-window buf 0))) (buffer-read-only nil)) (erase-buffer) (insert-buffer-substring (gdb-get-create-buffer 'gdb-partial-output-buffer)) - (goto-char p))))) + (set-window-point (get-buffer-window buf 0) p))))) ;; put customisation here (,custom-defun))) @@ -1304,7 +1304,7 @@ static char *magick[] = { (goto-char (point-min)) (while (< (point) (- (point-max) 1)) (forward-line 1) - (if (looking-at "[^\t].*breakpoint") + (if (looking-at "[^\t].*?breakpoint") (progn (looking-at "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\(.\\)") (setq bptno (match-string 1)) @@ -1463,9 +1463,9 @@ static char *magick[] = { (interactive) (beginning-of-line 1) (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) - (looking-at "\\([0-9]+\\).*point\\s-*\\S-*\\s-*\\(.\\)") + (looking-at "\\([0-9]+\\).*?point\\s-+\\S-+\\s-+\\(.\\)") (looking-at - "\\([0-9]+\\)\\s-*\\S-*\\s-*\\S-*\\s-*.\\s-*\\S-*\\s-*\\S-*:[0-9]+")) + "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\s-+\\S-+\\s-+\\S-+:[0-9]+")) (gdb-enqueue-input (list (concat gdb-server-prefix "delete " (match-string 1) "\n") 'ignore)) @@ -1478,10 +1478,10 @@ static char *magick[] = { (save-excursion (beginning-of-line 1) (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) - (looking-at "\\([0-9]+\\) .* in .* at\\s-+\\(\\S-*\\):\\([0-9]+\\)") + (looking-at "\\([0-9]+\\) .+ in .+ at\\s-+\\(\\S-+\\):\\([0-9]+\\)") (looking-at - "\\([0-9]+\\)\\s-*\\S-*\\s-*\\S-*\\s-*.\\s-*\\S-*\\s-*\ -\\(\\S-*\\):\\([0-9]+\\)")) + "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+.\\s-+\\S-+\\s-+\ +\\(\\S-+\\):\\([0-9]+\\)")) (let ((bptno (match-string 1)) (file (match-string 2)) (line (match-string 3))) @@ -2301,7 +2301,7 @@ Kills the gdb buffers and resets the source buffers." buffers." (goto-char (point-min)) (if (and (search-forward "Located in " nil t) - (looking-at "\\S-*")) + (looking-at "\\S-+")) (setq gdb-main-file (match-string 0))) (goto-char (point-min)) (if (search-forward "Includes preprocessor macro info." nil t) @@ -2319,7 +2319,7 @@ Put in buffer and place breakpoint icon." (goto-char (point-min)) (catch 'file-not-found (if (search-forward "Located in " nil t) - (when (looking-at "\\S-*") + (when (looking-at "\\S-+") (delete (cons bptno "File not found") gdb-location-alist) (push (cons bptno (match-string 0)) gdb-location-alist)) (gdb-resync) @@ -2493,7 +2493,7 @@ BUFFER nil or omitted means use the current buffer." (goto-char (point-min)) (while (< (point) (- (point-max) 1)) (forward-line 1) - (if (looking-at "[^\t].*breakpoint") + (if (looking-at "[^\t].*?breakpoint") (progn (looking-at "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\(.\\)\\s-+0x0*\\(\\S-+\\)") From 490ee85358426111f2289db9912ac1404f76940d Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 31 May 2005 21:54:43 +0000 Subject: [PATCH 201/294] (Finsert_file_contents): Lisp_Object/int mixup. --- src/fileio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fileio.c b/src/fileio.c index 4dac185ac81..537b7f4d10d 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -3745,7 +3745,7 @@ actually used. */) int set_coding_system = 0; int coding_system_decided = 0; int read_quit = 0; - int old_Vdeactivate_mark = Vdeactivate_mark; + Lisp_Object old_Vdeactivate_mark = Vdeactivate_mark; int we_locked_file = 0; if (current_buffer->base_buffer && ! NILP (visit)) From 3c1b433ae1894049c5a16e3db12627e5ba3290fd Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 31 May 2005 21:54:59 +0000 Subject: [PATCH 202/294] (note_mode_line_or_margin_highlight): Lisp_Object/int mixup. --- src/ChangeLog | 34 ++++++++++++++++++---------------- src/xdisp.c | 4 ++-- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index af24b539bed..0a85a7f8cc4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,17 +1,22 @@ +2005-05-31 Stefan Monnier + + * fileio.c (Finsert_file_contents): + * xdisp.c (note_mode_line_or_margin_highlight): Lisp_Object/int mixup. + 2005-05-31 Kim F. Storm * xdisp.c (mode_line_noprop_buf, mode_line_noprop_buf_end) (mode_line_noprop_ptr): Rename from frame_title_*. (store_mode_line_noprop_char): Rename from store_frame_title_char. (store_mode_line_noprop): Rename from store_frame_title. - (mode_line_target): New enum to specify current output target + (mode_line_target): New enum to specify current output target for mode line formatting. (display_mode_element): Test it rather than frame_title_ptr and mode_line_string_list to determine where output should go. (mode_line_proptrans_alist, mode_line_string_alist): Make static. (Vmode_line_unwind_vector): New variable. - (format_mode_line_unwind_data, unwind_format_mode_line): New - functions for unwind protection in mode line formatting. + (format_mode_line_unwind_data, unwind_format_mode_line): + New functions for unwind protection in mode line formatting. (x_consider_frame_title): Use them and new local var 'title_start' to support nested calls to format-mode-line. Set mode_line_target to MODE_LINE_TITLE. @@ -40,10 +45,9 @@ * ccl.c: Now an element of Vccl_program_table is a vector of length 4, not 3. - (ccl_get_compiled_code): New arg idx. Caller changed. Adjusted - for the change of Vccl_program_table. - (setup_ccl_program): Adjusted for the change of - Vccl_program_table. + (ccl_get_compiled_code): New arg idx. Caller changed. + Adjust for the change of Vccl_program_table. + (setup_ccl_program): Adjust for the change of Vccl_program_table. (check_ccl_update): New function. (Fregister_ccl_program): Use ASET to set an element of a vector. Adjusted for the change of Vccl_program_table. @@ -53,7 +57,7 @@ 2005-05-27 Juanma Barranquero - * image.c (Vimage_library_alist): Moved from image.el. + * image.c (Vimage_library_alist): Move from image.el. (syms_of_image): Defvar it. (lookup_image_type): Use it. @@ -150,8 +154,7 @@ 2005-05-16 Andreas Schwab - * unexmacosx.c (unexec_realloc): Move declarations before - statements. + * unexmacosx.c (unexec_realloc): Move declarations before statements. 2005-05-14 Richard M. Stallman @@ -179,8 +182,8 @@ * emacs.c (main) [MAC_OS8]: Call init_atimer before mac_term_init. - * keyboard.c (readable_events) [USE_TOOLKIT_SCROLL_BARS]: Regard - toolkit scroll bar thumb drag events as squeezable and prevent + * keyboard.c (readable_events) [USE_TOOLKIT_SCROLL_BARS]: + Regard toolkit scroll bar thumb drag events as squeezable and prevent redisplay from being paused by them. * mac.c [!MAC_OSX]: Include keyboard.h and syssignal.h. @@ -188,12 +191,11 @@ [!MAC_OSX] (check_alarm, pause, index): Remove functions. [!MAC_OSX && __MRC__] (sys_strftime): Likewise. [!MAC_OSX] (select): If fd 0 is not set in rfds and some input - event occurs before timeout, behave as if the function were - interrupted. + event occurs before timeout, behave as if the function were interrupted. [!MAC_OSX] (sigblock, sigsetmask, alarm): Simulate SIGALRM handling using Time Manager routines. - [!MAC_OSX] (mac_atimer_task, mac_atimer_qlink, signal_mask): New - variables. + [!MAC_OSX] (mac_atimer_task, mac_atimer_qlink, signal_mask): + New variables. [!MAC_OSX] (mac_atimer_handler, set_mac_atimer, remove_mac_atimer) (setitimer): New functions. diff --git a/src/xdisp.c b/src/xdisp.c index 167b4afadaa..fcfc8090277 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -21488,7 +21488,7 @@ note_mode_line_or_margin_highlight (window, x, y, area) tmp_glyph->charpos >= XINT (b); tmp_glyph--, gpos++) { - if (tmp_glyph->object != glyph->object) + if (!EQ (tmp_glyph->object, glyph->object)) break; } @@ -21501,7 +21501,7 @@ note_mode_line_or_margin_highlight (window, x, y, area) tmp_glyph->charpos < XINT (e); tmp_glyph++, gseq_length++) { - if (tmp_glyph->object != glyph->object) + if (!EQ (tmp_glyph->object, glyph->object)) break; } From 95d4fad837329b0b9eaa30a6e68c01024f7e9f82 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 31 May 2005 22:44:52 +0000 Subject: [PATCH 203/294] *** empty log message *** --- src/ChangeLog | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0a85a7f8cc4..367665e7773 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-06-01 Kim F. Storm + + * xdisp.c (display_mode_line): Support nested calls to redisplay + and format-mode-line. Set mode_line_target to MODE_LINE_DISPLAY. + 2005-05-31 Stefan Monnier * fileio.c (Finsert_file_contents): @@ -18,11 +23,12 @@ (format_mode_line_unwind_data, unwind_format_mode_line): New functions for unwind protection in mode line formatting. (x_consider_frame_title): Use them and new local var 'title_start' - to support nested calls to format-mode-line. Set mode_line_target - to MODE_LINE_TITLE. + to support nested calls to format-mode-line and redisplay. Set + mode_line_target to MODE_LINE_TITLE. (Fformat_mode_line): Use them and new local var 'string_start' to - support nested calls to format-mode-line. Set mode_line_target to - MODE_LINE_NOPROP or MODE_LINE_STRING. Don't trim trailing dashes. + support nested calls to format-mode-line and redisplay. Set + mode_line_target to MODE_LINE_NOPROP or MODE_LINE_STRING. + Don't trim trailing dashes. (decode_mode_spec): Don't make infinite number of trailing dashes for MODE_LINE_NOPROP and MODE_LINE_STRING targets. (syms_of_xdisp): Initialize and staticpro mode_line_string_face, From 53088ce86c72caab017ddef59a5a6b9319fcc3d8 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 31 May 2005 22:46:22 +0000 Subject: [PATCH 204/294] (display_mode_line): Support nested calls to redisplay and format-mode-line. Set mode_line_target to MODE_LINE_DISPLAY. --- src/xdisp.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index fcfc8090277..29fdbab5d78 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -8352,8 +8352,8 @@ x_consider_frame_title (frame) multiple_frames = CONSP (tail); /* Switch to the buffer of selected window of the frame. Set up - mode_line_noprop_ptr so that display_mode_element will output into it; - then display the title. */ + mode_line_target so that display_mode_element will output into + mode_line_noprop_buf; then display the title. */ record_unwind_protect (unwind_format_mode_line, format_mode_line_unwind_data (current_buffer)); @@ -15672,6 +15672,7 @@ display_mode_line (w, face_id, format) { struct it it; struct face *face; + int count = SPECPDL_INDEX (); init_iterator (&it, w, -1, -1, NULL, face_id); prepare_desired_row (it.glyph_row); @@ -15682,6 +15683,11 @@ display_mode_line (w, face_id, format) /* Force the mode-line to be displayed in the default face. */ it.base_face_id = it.face_id = DEFAULT_FACE_ID; + record_unwind_protect (unwind_format_mode_line, + format_mode_line_unwind_data (NULL)); + + mode_line_target = MODE_LINE_DISPLAY; + /* Temporarily make frame's keyboard the current kboard so that kboard-local variables in the mode_line_format will get the right values. */ @@ -15689,6 +15695,8 @@ display_mode_line (w, face_id, format) display_mode_element (&it, 0, 0, 0, format, Qnil, 0); pop_frame_kboard (); + unbind_to (count, Qnil); + /* Fill up with spaces. */ display_string (" ", Qnil, Qnil, 0, 0, &it, 10000, -1, -1, 0); From 9ccee7d041a4e7f820572d7cc191abe0c3eb7181 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 31 May 2005 23:10:14 +0000 Subject: [PATCH 205/294] *** empty log message *** --- lisp/ChangeLog | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0fac029d357..36b86720bfc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -7,6 +7,10 @@ (def-gdb-auto-update-handler): Use window point to ensure it is preserved. +2005-05-31 Stefan Monnier + + * thumbs.el (thumbs-mode): Fix misuse of make-variable-buffer-local. + 2005-05-31 Jay Belanger * calc/calc-embed.el (calc-embedded-word): Change argument passed @@ -23,8 +27,7 @@ 2005-05-31 Richard M. Stallman - * progmodes/vhdl-mode.el (vhdl-fill-region): Test ARG, not - INTERACTIVE. + * progmodes/vhdl-mode.el (vhdl-fill-region): Test ARG, not INTERACTIVE. (vhdl-emacs-21): Doc fix. (vhdl-mode): Unconditionally set comment-padding. (vhdl-fixup-whitespace-region): Insert spaces only where From 4a43ee9b90f6b3c65affab1c1ebb158af5bc7141 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Wed, 1 Jun 2005 05:07:06 +0000 Subject: [PATCH 206/294] Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-345 Merge from gnus--rel--5.10 Patches applied: * gnus--rel--5.10 (patch 77-78) - Update from CVS 2005-05-31 Katsumi Yamaoka * lisp/gnus/gnus-art.el (article-display-x-face): Replace process-kill-without-query by gnus-set-process-query-on-exit-flag. * lisp/gnus/gnus-group.el: Bind gnus-cache-active-hashtb when compiling. * lisp/gnus/gnus-util.el (gnus-set-process-query-on-exit-flag): Alias to set-process-query-on-exit-flag or process-kill-without-query. * lisp/gnus/html2text.el (html2text-fix-paragraphs): Use `while - re-search' loop instead of replace-regexp. * lisp/gnus/imap.el (imap-ssl-open): Use set-process-query-on-exit-flag instead of process-kill-without-query if it is available. * lisp/gnus/mm-util.el (mm-insert-file-contents): Bind find-file-hook instead of find-file-hooks if it is available. * lisp/gnus/mml1991.el: Bind pgg-default-user-id when compiling. * lisp/gnus/mml2015.el: Bind pgg-default-user-id when compiling. * lisp/gnus/nndraft.el (nndraft-request-associate-buffer): Use write-contents-functions instead of write-contents-hooks if it is available. * lisp/gnus/nnheader.el (nnheader-find-file-noselect): Bind find-file-hook instead of find-file-hooks if it is available. * lisp/gnus/nntp.el (nntp-open-connection): Replace process-kill-without-query by gnus-set-process-query-on-exit-flag. (nntp-open-ssl-stream): Ditto. (nntp-open-tls-stream): Ditto. * lisp/gnus/pgg.el: Don't bind itimer vars; don't autoload itimer functions. (pgg-run-at-time-1): New macro. (pgg-run-at-time): Use it. * lisp/gnus/starttls.el (starttls-set-process-query-on-exit-flag): Alias to set-process-query-on-exit-flag or process-kill-without-query. (starttls-open-stream-gnutls): Use it instead of process-kill-without-query. (starttls-open-stream): Ditto. 2005-05-31 Simon Josefsson * lisp/gnus/imap.el (imap-ssl-open): Use imap-process-connection-type, instead of hard coding to nil. 2005-05-31 Kevin Greiner * lisp/gnus/gnus-group.el (): Require gnus-sum and autoload functions to resolve warnings when gnus-group.el compiled alone. --- lisp/gnus/ChangeLog | 55 ++++++++++++++++ lisp/gnus/gnus-art.el | 5 +- lisp/gnus/gnus-group.el | 6 +- lisp/gnus/gnus-util.el | 5 ++ lisp/gnus/html2text.el | 5 +- lisp/gnus/imap.el | 8 ++- lisp/gnus/mm-util.el | 38 ++++++----- lisp/gnus/mml1991.el | 9 ++- lisp/gnus/mml2015.el | 4 +- lisp/gnus/nndraft.el | 9 ++- lisp/gnus/nnheader.el | 26 +++++--- lisp/gnus/nntp.el | 6 +- lisp/gnus/pgg.el | 138 +++++++++++++++++++--------------------- lisp/gnus/starttls.el | 13 +++- 14 files changed, 209 insertions(+), 118 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 1f8f23bbf18..089261f108c 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,58 @@ +2005-05-31 Katsumi Yamaoka + + * gnus-art.el (article-display-x-face): Replace + process-kill-without-query by gnus-set-process-query-on-exit-flag. + + * gnus-group.el: Bind gnus-cache-active-hashtb when compiling. + + * gnus-util.el (gnus-set-process-query-on-exit-flag): Alias to + set-process-query-on-exit-flag or process-kill-without-query. + + * html2text.el (html2text-fix-paragraphs): Use `while - re-search' + loop instead of replace-regexp. + + * imap.el (imap-ssl-open): Use set-process-query-on-exit-flag + instead of process-kill-without-query if it is available. + + * mm-util.el (mm-insert-file-contents): Bind find-file-hook + instead of find-file-hooks if it is available. + + * mml1991.el: Bind pgg-default-user-id when compiling. + + * mml2015.el: Bind pgg-default-user-id when compiling. + + * nndraft.el (nndraft-request-associate-buffer): Use + write-contents-functions instead of write-contents-hooks if it is + available. + + * nnheader.el (nnheader-find-file-noselect): Bind find-file-hook + instead of find-file-hooks if it is available. + + * nntp.el (nntp-open-connection): Replace + process-kill-without-query by gnus-set-process-query-on-exit-flag. + (nntp-open-ssl-stream): Ditto. + (nntp-open-tls-stream): Ditto. + + * pgg.el: Don't bind itimer vars; don't autoload itimer functions. + (pgg-run-at-time-1): New macro. + (pgg-run-at-time): Use it. + + * starttls.el (starttls-set-process-query-on-exit-flag): Alias to + set-process-query-on-exit-flag or process-kill-without-query. + (starttls-open-stream-gnutls): Use it instead of + process-kill-without-query. + (starttls-open-stream): Ditto. + +2005-05-31 Simon Josefsson + + * imap.el (imap-ssl-open): Use imap-process-connection-type, + instead of hard coding to nil. + +2005-05-31 Kevin Greiner + + * gnus-group.el (): Require gnus-sum and autoload functions to + resolve warnings when gnus-group.el compiled alone. + 2005-05-30 Reiner Steib * gnus-agent.el (gnus-agent-regenerate-group) diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index c3076cbb22e..4af363c6b2e 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -2181,10 +2181,11 @@ unfolded." ;; The command is a string, so we interpret the command ;; as a, well, command, and fork it off. (let ((process-connection-type nil)) - (process-kill-without-query + (gnus-set-process-query-on-exit-flag (start-process "article-x-face" nil shell-file-name - shell-command-switch gnus-article-x-face-command)) + shell-command-switch gnus-article-x-face-command) + nil) (with-temp-buffer (insert face) (process-send-region "article-x-face" diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 578e74d2a0e..f1343d9dbd3 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -41,7 +41,11 @@ (require 'time-date) (require 'gnus-ems) -(eval-when-compile (require 'mm-url)) +(eval-when-compile + (require 'mm-url) + (let ((features (cons 'gnus-group features))) + (require 'gnus-sum)) + (defvar gnus-cache-active-hashtb)) (defcustom gnus-group-archive-directory "/ftp@ftp.hpc.uh.edu:/pub/emacs/ding-list/" diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 0f92c1fc189..6171d42834e 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -1571,6 +1571,11 @@ empty directories from OLD-PATH." (file-truename (concat old-dir ".."))))))))) +(if (fboundp 'set-process-query-on-exit-flag) + (defalias 'gnus-set-process-query-on-exit-flag + 'set-process-query-on-exit-flag) + (defalias 'gnus-set-process-query-on-exit-flag + 'process-kill-without-query)) (provide 'gnus-util) diff --git a/lisp/gnus/html2text.el b/lisp/gnus/html2text.el index ef05af9bae6..81d8f5d8cc3 100644 --- a/lisp/gnus/html2text.el +++ b/lisp/gnus/html2text.el @@ -1,5 +1,5 @@ ;;; html2text.el --- a simple html to plain text converter -;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Joakim Hove @@ -374,7 +374,8 @@ formatting, and then moved afterward.") fashion, quite close to pure guess-work. It does work in some cases though." (interactive) (goto-char (point-min)) - (replace-regexp "^
$" "") + (while (re-search-forward "^
$" nil t) + (delete-region (match-beginning 0) (match-end 0))) ;; Removing lonely
on a single line, if they are left intact we ;; dont have any paragraphs at all. (goto-char (point-min)) diff --git a/lisp/gnus/imap.el b/lisp/gnus/imap.el index c7f9d60339f..48d7c0f6eb6 100644 --- a/lisp/gnus/imap.el +++ b/lisp/gnus/imap.el @@ -640,7 +640,11 @@ sure of changing the value of `foo'." (let* ((port (or port imap-default-ssl-port)) (coding-system-for-read imap-coding-system-for-read) (coding-system-for-write imap-coding-system-for-write) - (process-connection-type nil) + (process-connection-type imap-process-connection-type) + (set-process-query-on-exit-flag + (if (fboundp 'set-process-query-on-exit-flag) + 'set-process-query-on-exit-flag + 'process-kill-without-query)) process) (when (progn (setq process (start-process @@ -650,7 +654,7 @@ sure of changing the value of `foo'." (format-spec-make ?s server ?p (number-to-string port))))) - (process-kill-without-query process) + (funcall set-process-query-on-exit-flag process nil) process) (with-current-buffer buffer (goto-char (point-min)) diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el index 6fe69f2edd5..069cdb7f70c 100644 --- a/lisp/gnus/mm-util.el +++ b/lisp/gnus/mm-util.el @@ -889,22 +889,28 @@ to advanced Emacs features, such as file-name-handlers, format decoding, `find-file-hooks', etc. If INHIBIT is non-nil, inhibit `mm-inhibit-file-name-handlers'. This function ensures that none of these modifications will take place." - (let ((format-alist nil) - (auto-mode-alist (if inhibit nil (mm-auto-mode-alist))) - (default-major-mode 'fundamental-mode) - (enable-local-variables nil) - (after-insert-file-functions nil) - (enable-local-eval nil) - (find-file-hooks nil) - (inhibit-file-name-operation (if inhibit - 'insert-file-contents - inhibit-file-name-operation)) - (inhibit-file-name-handlers - (if inhibit - (append mm-inhibit-file-name-handlers - inhibit-file-name-handlers) - inhibit-file-name-handlers))) - (insert-file-contents filename visit beg end replace))) + (let* ((format-alist nil) + (auto-mode-alist (if inhibit nil (mm-auto-mode-alist))) + (default-major-mode 'fundamental-mode) + (enable-local-variables nil) + (after-insert-file-functions nil) + (enable-local-eval nil) + (inhibit-file-name-operation (if inhibit + 'insert-file-contents + inhibit-file-name-operation)) + (inhibit-file-name-handlers + (if inhibit + (append mm-inhibit-file-name-handlers + inhibit-file-name-handlers) + inhibit-file-name-handlers)) + (ffh (if (boundp 'find-file-hook) + 'find-file-hook + 'find-file-hooks)) + (val (symbol-value ffh))) + (set ffh nil) + (unwind-protect + (insert-file-contents filename visit beg end replace) + (set ffh val)))) (defun mm-append-to-file (start end filename &optional codesys inhibit) "Append the contents of the region to the end of file FILENAME. diff --git a/lisp/gnus/mml1991.el b/lisp/gnus/mml1991.el index 14d52e45ce4..640348c1387 100644 --- a/lisp/gnus/mml1991.el +++ b/lisp/gnus/mml1991.el @@ -1,5 +1,6 @@ ;;; mml1991.el --- Old PGP message format (RFC 1991) support for MML -;; Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. +;; Copyright (C) 1998, 1999, 2000, 2001, 2003, 2005 +;; Free Software Foundation, Inc. ;; Author: Sascha Lüdecke , ;; Simon Josefsson (Mailcrypt interface, Gnus glue) @@ -219,8 +220,10 @@ ;; pgg wrapper -(defvar pgg-output-buffer) -(defvar pgg-errors-buffer) +(eval-when-compile + (defvar pgg-default-user-id) + (defvar pgg-errors-buffer) + (defvar pgg-output-buffer)) (defun mml1991-pgg-sign (cont) (let (headers cte) diff --git a/lisp/gnus/mml2015.el b/lisp/gnus/mml2015.el index a0e47dd2f2c..5f53d87bfef 100644 --- a/lisp/gnus/mml2015.el +++ b/lisp/gnus/mml2015.el @@ -1,5 +1,6 @@ ;;; mml2015.el --- MIME Security with Pretty Good Privacy (PGP) -;; Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 +;; Free Software Foundation, Inc. ;; Author: Shenghuo Zhu ;; Keywords: PGP MIME MML @@ -632,6 +633,7 @@ ;;; pgg wrapper (eval-when-compile + (defvar pgg-default-user-id) (defvar pgg-errors-buffer) (defvar pgg-output-buffer)) diff --git a/lisp/gnus/nndraft.el b/lisp/gnus/nndraft.el index a71376155c1..2fc65868b9c 100644 --- a/lisp/gnus/nndraft.el +++ b/lisp/gnus/nndraft.el @@ -1,6 +1,6 @@ ;;; nndraft.el --- draft article access for Gnus -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003 +;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2005 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -174,8 +174,11 @@ (setq buffer-file-name (expand-file-name file) buffer-auto-save-file-name (make-auto-save-file-name)) (clear-visited-file-modtime) - (make-local-variable 'write-contents-hooks) - (push 'nndraft-generate-headers write-contents-hooks) + (let ((hook (if (boundp 'write-contents-functions) + 'write-contents-functions + 'write-contents-hooks))) + (gnus-make-local-hook hook) + (add-hook hook 'nndraft-generate-headers nil t)) article)) (deffoo nndraft-request-group (group &optional server dont-check) diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el index c55252e5b64..952d936bd0d 100644 --- a/lisp/gnus/nnheader.el +++ b/lisp/gnus/nnheader.el @@ -1,7 +1,7 @@ ;;; nnheader.el --- header access macros for Gnus and its backends ;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994, 1995, 1996, -;; 1997, 1998, 2000, 2001, 2002, 2003, 2004 +;; 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005 ;; Free Software Foundation, Inc. ;; Author: Masanobu UMEDA @@ -953,15 +953,21 @@ find-file-hooks, etc. (defun nnheader-find-file-noselect (&rest args) "Open a file with some variables bound. See `find-file-noselect' for the arguments." - (let ((format-alist nil) - (auto-mode-alist (mm-auto-mode-alist)) - (default-major-mode 'fundamental-mode) - (enable-local-variables nil) - (after-insert-file-functions nil) - (enable-local-eval nil) - (find-file-hooks nil) - (coding-system-for-read nnheader-file-coding-system)) - (apply 'find-file-noselect args))) + (let* ((format-alist nil) + (auto-mode-alist (mm-auto-mode-alist)) + (default-major-mode 'fundamental-mode) + (enable-local-variables nil) + (after-insert-file-functions nil) + (enable-local-eval nil) + (coding-system-for-read nnheader-file-coding-system) + (ffh (if (boundp 'find-file-hook) + 'find-file-hook + 'find-file-hooks)) + (val (symbol-value ffh))) + (set ffh nil) + (unwind-protect + (apply 'find-file-noselect args) + (set ffh val)))) (defun nnheader-directory-regular-files (dir) "Return a list of all regular files in DIR." diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index 1c964a5706c..888a6edcfb1 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el @@ -1128,7 +1128,7 @@ password contained in '~/.nntp-authinfo'." (nntp-kill-buffer pbuffer)) (when (and (buffer-name pbuffer) process) - (process-kill-without-query process) + (gnus-set-process-query-on-exit-flag process nil) (if (and (nntp-wait-for process "^2.*\n" buffer nil t) (memq (process-status process) '(open run))) (prog1 @@ -1162,7 +1162,7 @@ password contained in '~/.nntp-authinfo'." (format-spec-make ?s nntp-address ?p nntp-port-number))))) - (process-kill-without-query proc) + (gnus-set-process-query-on-exit-flag proc nil) (save-excursion (set-buffer buffer) (let ((nntp-connection-alist (list proc buffer nil))) @@ -1173,7 +1173,7 @@ password contained in '~/.nntp-authinfo'." (defun nntp-open-tls-stream (buffer) (let ((proc (open-tls-stream "nntpd" buffer nntp-address nntp-port-number))) - (process-kill-without-query proc) + (gnus-set-process-query-on-exit-flag proc nil) (save-excursion (set-buffer buffer) (let ((nntp-connection-alist (list proc buffer nil))) diff --git a/lisp/gnus/pgg.el b/lisp/gnus/pgg.el index 888219a8c57..eff02a1c32a 100644 --- a/lisp/gnus/pgg.el +++ b/lisp/gnus/pgg.el @@ -1,6 +1,6 @@ ;;; pgg.el --- glue for the various PGP implementations. -;; Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2000, 2003, 2005 Free Software Foundation, Inc. ;; Author: Daiki Ueno ;; Created: 1999/10/28 @@ -97,82 +97,76 @@ (read-passwd prompt))) (eval-when-compile - (defvar itimer-process) - (defvar itimer-timer) - (autoload 'delete-itimer "itimer") - (autoload 'itimer-driver-start "itimer") - (autoload 'itimer-value "itimer") - (autoload 'set-itimer-function "itimer") - (autoload 'set-itimer-function-arguments "itimer") - (autoload 'set-itimer-restart "itimer") - (autoload 'start-itimer "itimer")) + (defmacro pgg-run-at-time-1 (time repeat function args) + (when (featurep 'xemacs) + (if (condition-case nil + (let ((delete-itimer 'delete-itimer) + (itimer-driver-start 'itimer-driver-start) + (itimer-value 'itimer-value) + (start-itimer 'start-itimer)) + (unless (or (symbol-value 'itimer-process) + (symbol-value 'itimer-timer)) + (funcall itimer-driver-start)) + ;; Check whether there is a bug to which the difference of + ;; the present time and the time when the itimer driver was + ;; woken up is subtracted from the initial itimer value. + (let* ((inhibit-quit t) + (ctime (current-time)) + (itimer-timer-last-wakeup + (prog1 + ctime + (setcar ctime (1- (car ctime))))) + (itimer-list nil) + (itimer (funcall start-itimer "pgg-run-at-time" + 'ignore 5))) + (sleep-for 0.1) ;; Accept the timeout interrupt. + (prog1 + (> (funcall itimer-value itimer) 0) + (funcall delete-itimer itimer)))) + (error nil)) + `(let ((time ,time)) + (apply #'start-itimer "pgg-run-at-time" + ,function (if time (max time 1e-9) 1e-9) + ,repeat nil t ,args))) + `(let ((time ,time) + (itimers (list nil))) + (setcar + itimers + (apply #'start-itimer "pgg-run-at-time" + (lambda (itimers repeat function &rest args) + (let ((itimer (car itimers))) + (if repeat + (progn + (set-itimer-function + itimer + (lambda (itimer repeat function &rest args) + (set-itimer-restart itimer repeat) + (set-itimer-function itimer function) + (set-itimer-function-arguments itimer args) + (apply function args))) + (set-itimer-function-arguments + itimer + (append (list itimer repeat function) args))) + (set-itimer-function + itimer + (lambda (itimer function &rest args) + (delete-itimer itimer) + (apply function args))) + (set-itimer-function-arguments + itimer + (append (list itimer function) args))))) + 1e-9 (if time (max time 1e-9) 1e-9) + nil t itimers ,repeat ,function ,args)))))) (eval-and-compile - (defalias - 'pgg-run-at-time - (if (featurep 'xemacs) - (if (condition-case nil - (progn - (unless (or itimer-process itimer-timer) - (itimer-driver-start)) - ;; Check whether there is a bug to which the difference of - ;; the present time and the time when the itimer driver was - ;; woken up is subtracted from the initial itimer value. - (let* ((inhibit-quit t) - (ctime (current-time)) - (itimer-timer-last-wakeup - (prog1 - ctime - (setcar ctime (1- (car ctime))))) - (itimer-list nil) - (itimer (start-itimer "pgg-run-at-time" 'ignore 5))) - (sleep-for 0.1) ;; Accept the timeout interrupt. - (prog1 - (> (itimer-value itimer) 0) - (delete-itimer itimer)))) - (error nil)) - (lambda (time repeat function &rest args) - "Emulating function run as `run-at-time'. + (if (featurep 'xemacs) + (defun pgg-run-at-time (time repeat function &rest args) + "Emulating function run as `run-at-time'. TIME should be nil meaning now, or a number of seconds from now. Return an itimer object which can be used in either `delete-itimer' or `cancel-timer'." - (apply #'start-itimer "pgg-run-at-time" - function (if time (max time 1e-9) 1e-9) - repeat nil t args)) - (lambda (time repeat function &rest args) - "Emulating function run as `run-at-time' in the right way. -TIME should be nil meaning now, or a number of seconds from now. -Return an itimer object which can be used in either `delete-itimer' -or `cancel-timer'." - (let ((itimers (list nil))) - (setcar - itimers - (apply #'start-itimer "pgg-run-at-time" - (lambda (itimers repeat function &rest args) - (let ((itimer (car itimers))) - (if repeat - (progn - (set-itimer-function - itimer - (lambda (itimer repeat function &rest args) - (set-itimer-restart itimer repeat) - (set-itimer-function itimer function) - (set-itimer-function-arguments itimer args) - (apply function args))) - (set-itimer-function-arguments - itimer - (append (list itimer repeat function) args))) - (set-itimer-function - itimer - (lambda (itimer function &rest args) - (delete-itimer itimer) - (apply function args))) - (set-itimer-function-arguments - itimer - (append (list itimer function) args))))) - 1e-9 (if time (max time 1e-9) 1e-9) - nil t itimers repeat function args))))) - 'run-at-time))) + (pgg-run-at-time-1 time repeat function args)) + (defalias 'pgg-run-at-time 'run-at-time))) (defun pgg-add-passphrase-cache (key passphrase) (setq key (pgg-truncate-key-identifier key)) diff --git a/lisp/gnus/starttls.el b/lisp/gnus/starttls.el index f2b72fbef1c..7faa3a933a7 100644 --- a/lisp/gnus/starttls.el +++ b/lisp/gnus/starttls.el @@ -1,6 +1,7 @@ ;;; starttls.el --- STARTTLS functions -;; Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2000, 2003, 2004, 2005 +;; Free Software Foundation, Inc. ;; Author: Daiki Ueno ;; Author: Simon Josefsson @@ -235,6 +236,12 @@ handshake, or NIL on failure." (starttls-negotiate-gnutls process) (signal-process (process-id process) 'SIGALRM))) +(if (fboundp 'set-process-query-on-exit-flag) + (defalias 'starttls-set-process-query-on-exit-flag + 'set-process-query-on-exit-flag) + (defalias 'starttls-set-process-query-on-exit-flag + 'process-kill-without-query)) + (defun starttls-open-stream-gnutls (name buffer host service) (message "Opening STARTTLS connection to `%s'..." host) (let* (done @@ -246,7 +253,7 @@ handshake, or NIL on failure." (int-to-string service) service) starttls-extra-arguments))) - (process-kill-without-query process) + (starttls-set-process-query-on-exit-flag process nil) (while (and (processp process) (eq (process-status process) 'run) (save-excursion @@ -286,7 +293,7 @@ specifying a port number to connect to." name buffer starttls-program host (format "%s" service) starttls-extra-args))) - (process-kill-without-query process) + (starttls-set-process-query-on-exit-flag process nil) process))) (provide 'starttls) From b0241f69c9683975a06cce950e603af201c4a5cb Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Wed, 1 Jun 2005 08:20:50 +0000 Subject: [PATCH 207/294] (mac_to_x_fontname, mac_do_list_fonts): Set XLFD resolution fields for scalable fonts to 0. --- src/macterm.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/macterm.c b/src/macterm.c index b94c3a1bbba..6ebaa39437b 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -6256,9 +6256,10 @@ mac_to_x_fontname (name, size, style, charset) strcpy(family, name); } - sprintf(xf, "-%s-%s-%s-%c-normal--%d-%d-75-75-m-%d-%s", + sprintf(xf, "-%s-%s-%s-%c-normal--%d-%d-%d-%d-m-%d-%s", foundry, family, style & bold ? "bold" : "medium", - style & italic ? 'i' : 'r', size, size * 10, size * 10, charset); + style & italic ? 'i' : 'r', size, size * 10, + size ? 75 : 0, size ? 75 : 0, size * 10, charset); result = (char *) xmalloc (strlen (xf) + 1); strcpy (result, xf); @@ -6714,7 +6715,7 @@ mac_do_list_fonts (pattern, maxnames) break; } else if (scl_val[XLFD_SCL_PIXEL_SIZE] > 0 - && (ptr = strstr (font_name_table[i], "-0-0-75-75-m-0-"))) + && (ptr = strstr (font_name_table[i], "-0-0-0-0-m-0-"))) { int former_len = ptr - font_name_table[i]; @@ -6724,7 +6725,7 @@ mac_do_list_fonts (pattern, maxnames) scl_val[XLFD_SCL_PIXEL_SIZE], scl_val[XLFD_SCL_POINT_SIZE], scl_val[XLFD_SCL_AVGWIDTH], - ptr + sizeof ("-0-0-75-75-m-0-") - 1); + ptr + sizeof ("-0-0-0-0-m-0-") - 1); fontname = mac_c_string_match (pattern_regex, scaled, nonspecial, exact); if (!NILP (fontname)) From 02a6375c0eb40fe699c7b7334e6bedb804fd87c9 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Wed, 1 Jun 2005 08:21:48 +0000 Subject: [PATCH 208/294] (build_scalable_font_name): Round pixel size to the nearest integer. --- src/ChangeLog | 12 ++++++++++-- src/xfaces.c | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 367665e7773..47ef8fb47f1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2005-06-01 YAMAMOTO Mitsuharu + + * macterm.c (mac_to_x_fontname, mac_do_list_fonts): Set XLFD + resolution fields for scalable fonts to 0. + + * xfaces.c (build_scalable_font_name): Round pixel size to the + nearest integer. + 2005-06-01 Kim F. Storm * xdisp.c (display_mode_line): Support nested calls to redisplay @@ -215,8 +223,8 @@ (x_scroll_bar_handle_click): Change type of second argument from int to ControlPartCode. (check_alarm): Remove declaration. - (XTread_Socket) [!TARGET_API_MAC_CARBON]: Don't call it. - (XTread_Socket): Use ControlPartCode instead of SInt16. + (XTread_socket) [!TARGET_API_MAC_CARBON]: Don't call it. + (XTread_socket): Use ControlPartCode instead of SInt16. 2005-05-13 Nozomu Ando diff --git a/src/xfaces.c b/src/xfaces.c index 0b0b2f97533..21bdb88c860 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -6435,12 +6435,12 @@ build_scalable_font_name (f, font, specified_pt) if (font->numeric[XLFD_RESY] != 0) { pt = resy / font->numeric[XLFD_RESY] * specified_pt + 0.5; - pixel_value = font->numeric[XLFD_RESY] / (PT_PER_INCH * 10.0) * pt; + pixel_value = font->numeric[XLFD_RESY] / (PT_PER_INCH * 10.0) * pt + 0.5; } else { pt = specified_pt; - pixel_value = resy / (PT_PER_INCH * 10.0) * pt; + pixel_value = resy / (PT_PER_INCH * 10.0) * pt + 0.5; } /* We may need a font of the different size. */ pixel_value *= font->rescale_ratio; From 011131fda8fd0f6c1d967e43fc38f1ceb31d96d3 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Wed, 1 Jun 2005 10:43:54 +0000 Subject: [PATCH 209/294] (list-faces-display): Improve the formatting by computing the maximum length required for any face-name (reworked patch of 1999-01-11, accidentally deleted on 1999-07-21). (internal-find-face): Remove redundant info in docstring. --- lisp/ChangeLog | 7 +++++++ lisp/faces.el | 35 +++++++++++++++++++---------------- 2 files changed, 26 insertions(+), 16 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 36b86720bfc..8312df06d6e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2005-06-01 Juanma Barranquero + + * faces.el (list-faces-display): Improve the formatting by + computing the maximum length required for any face-name (reworked + patch of 1999-01-11, accidentally deleted on 1999-07-21). + (internal-find-face): Remove redundant info in docstring. + 2005-06-01 Nick Roberts * progmodes/gdb-ui.el (gdb-set-gud-minor-mode-1) diff --git a/lisp/faces.el b/lisp/faces.el index c89001482ac..ccf427e6f12 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -183,10 +183,7 @@ Return nil if there is no such face. If the optional argument FRAME is given, this gets the face NAME for that frame; otherwise, it uses the selected frame. If FRAME is the symbol t, then the global, non-frame face is returned. -If NAME is already a face, it is simply returned. - -This function is defined for compatibility with Emacs 20.2. It -should not be used anymore." +If NAME is already a face, it is simply returned." (facep name)) (make-obsolete 'internal-find-face 'facep "21.1") @@ -1154,18 +1151,24 @@ this regular expression. When called interactively with a prefix arg, prompt for a regular expression." (interactive (list (and current-prefix-arg (read-string "List faces matching regexp: ")))) - (let ((faces (sort (face-list) #'string-lessp)) + (let ((all-faces (zerop (length regexp))) (frame (selected-frame)) + (max-length 0) + faces line-format disp-frame window face-name) - (when (> (length regexp) 0) - (setq faces - (delq nil - (mapcar (lambda (f) - (when (string-match regexp (symbol-name f)) - f)) - faces))) - (unless faces - (error "No faces matching \"%s\"" regexp))) + ;; We filter and take the max length in one pass + (setq faces + (delq nil + (mapcar (lambda (f) + (let ((s (symbol-name f))) + (when (or all-faces (string-match regexp s)) + (setq max-length (max (length s) max-length)) + f))) + (sort (face-list) #'string-lessp)))) + (unless faces + (error "No faces matching \"%s\"" regexp)) + (setq max-length (1+ max-length) + line-format (format "%%-%ds" max-length)) (with-output-to-temp-buffer "*Faces*" (save-excursion (set-buffer standard-output) @@ -1180,7 +1183,7 @@ arg, prompt for a regular expression." (setq help-xref-stack nil) (dolist (face faces) (setq face-name (symbol-name face)) - (insert (format "%25s " face-name)) + (insert (format line-format face-name)) ;; Hyperlink to a customization buffer for the face. Using ;; the help xref mechanism may not be the best way. (save-excursion @@ -1205,7 +1208,7 @@ arg, prompt for a regular expression." (goto-char beg) (forward-line 1) (while (not (eobp)) - (insert " ") + (insert-char ?\s max-length) (forward-line 1)))) (goto-char (point-min))) (print-help-return-message)) From 89fe657e114b167461e54cb1f4d0193514d4a850 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 1 Jun 2005 11:42:00 +0000 Subject: [PATCH 210/294] *** empty log message *** --- src/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 47ef8fb47f1..1561394928d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2005-06-01 Kim F. Storm + + * fns.c (mapcar1): Maybe exit loop if original sequence was modified. + 2005-06-01 YAMAMOTO Mitsuharu * macterm.c (mac_to_x_fontname, mac_do_list_fonts): Set XLFD From 859463640aab206bbead70e359e5e480c8b11750 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 1 Jun 2005 11:42:19 +0000 Subject: [PATCH 211/294] (mapcar1): Maybe exit loop if original sequence was modified. --- src/fns.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fns.c b/src/fns.c index bd3893f7538..e910c87375b 100644 --- a/src/fns.c +++ b/src/fns.c @@ -3132,9 +3132,9 @@ mapcar1 (leni, vals, fn, seq) else /* Must be a list, since Flength did not get an error */ { tail = seq; - for (i = 0; i < leni; i++) + for (i = 0; i < leni && CONSP (tail); i++) { - dummy = call1 (fn, Fcar (tail)); + dummy = call1 (fn, XCAR (tail)); if (vals) vals[i] = dummy; tail = XCDR (tail); @@ -3172,7 +3172,7 @@ SEQUENCE may be a list, a vector, a bool-vector, or a string. */) mapcar1 (leni, args, function, sequence); UNGCPRO; - for (i = leni - 1; i >= 0; i--) + for (i = leni - 1; i > 0; i--) args[i + i] = args[i]; for (i = 1; i < nargs; i += 2) From 358e4d6d1db0b101d2862f97475f6e5999f8bfa0 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Wed, 1 Jun 2005 15:33:50 +0000 Subject: [PATCH 212/294] (defsetf): Improve argument/docstring consistency. --- lisp/ChangeLog | 3 +++ lisp/emacs-lisp/cl-macs.el | 11 +++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8312df06d6e..4ea507543e6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2005-06-01 Juanma Barranquero + * emacs-lisp/cl-macs.el (defsetf): + Improve argument/docstring consistency. + * faces.el (list-faces-display): Improve the formatting by computing the maximum length required for any face-name (reworked patch of 1999-01-11, accidentally deleted on 1999-07-21). diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 4a01181e777..0301476afc2 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -1565,14 +1565,21 @@ form. See `defsetf' for a simpler way to define most setf-methods. This macro is an easy-to-use substitute for `define-setf-method' that works well for simple place forms. In the simple `defsetf' form, `setf's of the form (setf (NAME ARGS...) VAL) are transformed to function or macro -calls of the form (FUNC ARGS... VAL). Example: (defsetf aref aset). +calls of the form (FUNC ARGS... VAL). Example: + + (defsetf aref aset) + Alternate form: (defsetf NAME ARGLIST (STORE) BODY...). Here, the above `setf' call is expanded by binding the argument forms ARGS according to ARGLIST, binding the value form VAL to STORE, then executing BODY, which must return a Lisp form that does the necessary `setf' operation. Actually, ARGLIST and STORE may be bound to temporary variables which are introduced automatically to preserve proper execution order of the arguments. -Example: (defsetf nth (n x) (v) (list 'setcar (list 'nthcdr n x) v))." +Example: + + (defsetf nth (n x) (v) (list 'setcar (list 'nthcdr n x) v)) + +\(fn NAME [FUNC | ARGLIST (STORE) BODY...])" (if (listp arg1) (let* ((largs nil) (largsr nil) (temps nil) (tempsr nil) From 6cb9fac363905e93faae5304e1700bc3bfb65534 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 1 Jun 2005 16:22:00 +0000 Subject: [PATCH 213/294] (easy-menu-return-item): Find menu items with a nil command binding. --- lisp/ChangeLog | 5 +++++ lisp/emacs-lisp/easymenu.el | 13 ++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4ea507543e6..264c627ef54 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-06-01 Stefan Monnier + + * emacs-lisp/easymenu.el (easy-menu-return-item): Quick fix to find + menu items with a nil command binding. + 2005-06-01 Juanma Barranquero * emacs-lisp/cl-macs.el (defsetf): diff --git a/lisp/emacs-lisp/easymenu.el b/lisp/emacs-lisp/easymenu.el index b3160c9b752..3602e7412f1 100644 --- a/lisp/emacs-lisp/easymenu.el +++ b/lisp/emacs-lisp/easymenu.el @@ -1,6 +1,6 @@ ;;; easymenu.el --- support the easymenu interface for defining a menu -;; Copyright (C) 1994,96,98,1999,2000,2004 Free Software Foundation, Inc. +;; Copyright (C) 1994,96,98,1999,2000,2004,2005 Free Software Foundation, Inc. ;; Keywords: emulations ;; Author: Richard Stallman @@ -534,7 +534,7 @@ earlier by `easy-menu-define' or `easy-menu-create-menu'." (easy-menu-do-add-item map item before))) (defun easy-menu-item-present-p (map path name) - "In submenu of MAP with path PATH, return true iff item NAME is present. + "In submenu of MAP with path PATH, return non-nil iff item NAME is present. MAP and PATH are defined as in `easy-menu-add-item'. NAME should be a string, the name of the element to be looked for." (easy-menu-return-item (easy-menu-get-map map path) name)) @@ -552,7 +552,14 @@ NAME should be a string, the name of the element to be removed." "In menu MENU try to look for menu item with name NAME. If a menu item is found, return (NAME . item), otherwise return nil. If item is an old format item, a new format item is returned." - (let ((item (lookup-key menu (vector (easy-menu-intern name)))) + ;; The call to `lookup-key' also calls the C function `get_keyelt' which + ;; looks inside a menu-item to only return the actual command. This is + ;; not what we want here. We should either add an arg to lookup-key to be + ;; able to turn off this "feature", or else we could use map-keymap here. + ;; In the mean time, I just use `assq' which is an OK approximation since + ;; menus are rarely built from vectors or char-tables. + (let ((item (or (cdr (assq name menu)) + (lookup-key menu (vector (easy-menu-intern name))))) ret enable cache label) (cond ((stringp (car-safe item)) From 51a67d35dbbbe75a876ad796859165a4fef90e08 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 1 Jun 2005 16:22:43 +0000 Subject: [PATCH 214/294] 4-digit copyright years. --- lisp/emacs-lisp/easymenu.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/easymenu.el b/lisp/emacs-lisp/easymenu.el index 3602e7412f1..982570fb348 100644 --- a/lisp/emacs-lisp/easymenu.el +++ b/lisp/emacs-lisp/easymenu.el @@ -1,6 +1,7 @@ ;;; easymenu.el --- support the easymenu interface for defining a menu -;; Copyright (C) 1994,96,98,1999,2000,2004,2005 Free Software Foundation, Inc. +;; Copyright (C) 1994, 1996, 1998, 1999, 2000, 2004, 2005 +;; Free Software Foundation, Inc. ;; Keywords: emulations ;; Author: Richard Stallman From bfadb7ecfaf2b2daf18f7d694f05c6bb2080fa6a Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Wed, 1 Jun 2005 20:50:06 +0000 Subject: [PATCH 215/294] *** empty log message *** --- lisp/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 264c627ef54..6ed3d80282b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2005-06-01 Luc Teirlinck + + * autorevert.el (auto-revert-buffers): Use save-match-data. + 2005-06-01 Stefan Monnier * emacs-lisp/easymenu.el (easy-menu-return-item): Quick fix to find From 33512cbeb168764f83f5a740090ce40b4b948591 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Wed, 1 Jun 2005 20:51:03 +0000 Subject: [PATCH 216/294] (auto-revert-buffers): Use save-match-data. --- lisp/autorevert.el | 81 +++++++++++++++++++++++----------------------- 1 file changed, 41 insertions(+), 40 deletions(-) diff --git a/lisp/autorevert.el b/lisp/autorevert.el index 36b5a6f5a37..1769a992f7b 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el @@ -484,46 +484,47 @@ are checked first the next time this function is called. This function is also responsible for removing buffers no longer in Auto-Revert mode from `auto-revert-buffer-list', and for canceling the timer when no buffers need to be checked." - (let ((bufs (if global-auto-revert-mode - (buffer-list) - auto-revert-buffer-list)) - (remaining ()) - (new ())) - ;; Partition `bufs' into two halves depending on whether or not - ;; the buffers are in `auto-revert-remaining-buffers'. The two - ;; halves are then re-joined with the "remaining" buffers at the - ;; head of the list. - (dolist (buf auto-revert-remaining-buffers) - (if (memq buf bufs) - (push buf remaining))) - (dolist (buf bufs) - (if (not (memq buf remaining)) - (push buf new))) - (setq bufs (nreverse (nconc new remaining))) - (while (and bufs - (not (and auto-revert-stop-on-user-input - (input-pending-p)))) - (let ((buf (car bufs))) - (if (buffer-name buf) ; Buffer still alive? - (with-current-buffer buf - ;; Test if someone has turned off Auto-Revert Mode in a - ;; non-standard way, for example by changing major mode. - (if (and (not auto-revert-mode) - (not auto-revert-tail-mode) - (memq buf auto-revert-buffer-list)) - (setq auto-revert-buffer-list - (delq buf auto-revert-buffer-list))) - (when (auto-revert-active-p) (auto-revert-handler))) - ;; Remove dead buffer from `auto-revert-buffer-list'. - (setq auto-revert-buffer-list - (delq buf auto-revert-buffer-list)))) - (setq bufs (cdr bufs))) - (setq auto-revert-remaining-buffers bufs) - ;; Check if we should cancel the timer. - (when (and (not global-auto-revert-mode) - (null auto-revert-buffer-list)) - (cancel-timer auto-revert-timer) - (setq auto-revert-timer nil)))) + (save-match-data + (let ((bufs (if global-auto-revert-mode + (buffer-list) + auto-revert-buffer-list)) + (remaining ()) + (new ())) + ;; Partition `bufs' into two halves depending on whether or not + ;; the buffers are in `auto-revert-remaining-buffers'. The two + ;; halves are then re-joined with the "remaining" buffers at the + ;; head of the list. + (dolist (buf auto-revert-remaining-buffers) + (if (memq buf bufs) + (push buf remaining))) + (dolist (buf bufs) + (if (not (memq buf remaining)) + (push buf new))) + (setq bufs (nreverse (nconc new remaining))) + (while (and bufs + (not (and auto-revert-stop-on-user-input + (input-pending-p)))) + (let ((buf (car bufs))) + (if (buffer-name buf) ; Buffer still alive? + (with-current-buffer buf + ;; Test if someone has turned off Auto-Revert Mode in a + ;; non-standard way, for example by changing major mode. + (if (and (not auto-revert-mode) + (not auto-revert-tail-mode) + (memq buf auto-revert-buffer-list)) + (setq auto-revert-buffer-list + (delq buf auto-revert-buffer-list))) + (when (auto-revert-active-p) (auto-revert-handler))) + ;; Remove dead buffer from `auto-revert-buffer-list'. + (setq auto-revert-buffer-list + (delq buf auto-revert-buffer-list)))) + (setq bufs (cdr bufs))) + (setq auto-revert-remaining-buffers bufs) + ;; Check if we should cancel the timer. + (when (and (not global-auto-revert-mode) + (null auto-revert-buffer-list)) + (cancel-timer auto-revert-timer) + (setq auto-revert-timer nil))))) ;; The end: From 52eb0373913e6b085d6b3b69aff7b027f058ec3c Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Wed, 1 Jun 2005 23:49:36 +0000 Subject: [PATCH 217/294] Spacing and formatting fixes. --- lisp/ChangeLog | 126 ++++++++++++++++++++++++------------------------- src/ChangeLog | 48 +++++++++---------- 2 files changed, 87 insertions(+), 87 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6ed3d80282b..c9c4d26844b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -172,13 +172,13 @@ * progmodes/which-func.el (which-func-update-1): Turn the mode off in case of error by setting which-func-mode. -2005-05-29 Peter Heslin (tiny change) +2005-05-29 Peter Heslin (tiny change) * flyspell.el (flyspell-auto-correct-previous-word): Narrow down to what's on the screen, and recenter overlays at the end of the next word. -2005-05-29 Manuel Serrano +2005-05-29 Manuel Serrano * flyspell.el (flyspell-emacs, flyspell-use-local-map): Vars moved up. (flyspell-default-delayed-commands): Add backward-delete-char-untabify. @@ -683,7 +683,7 @@ * emacs-lisp/bytecomp.el: Remove make-obsolete-variable for already deleted variables: auto-fill-hook, blink-paren-hook, - lisp-indent-hook, inhibit-local-variables, unread-command-event + lisp-indent-hook, inhibit-local-variables, unread-command-event, suspend-hooks, comment-indent-hook, meta-flag, before-change-function, after-change-function, font-lock-doc-string-face. @@ -1195,8 +1195,8 @@ * progmodes/compile.el (compilation-setup): Set local value of overlay-arrow-string to "" always. - (compilation-set-window): Left fringe then don't scroll. No left - fringe then no arrow and scroll message to top. + (compilation-set-window): Left fringe then don't scroll. + No left fringe then no arrow and scroll message to top. (compilation-context-lines): Adjust doc string accordingly. 2005-05-16 Kim F. Storm @@ -1455,7 +1455,7 @@ 2005-05-11 Stefan Monnier - * files.el (executable-find): Move from executable.el. Use locate-file. + * files.el (executable-find): Move from executable.el. Use locate-file. * progmodes/executable.el (executable-find): Move to files.el. * font-lock.el (font-lock-fontify-keywords-region): Use a marker @@ -1505,10 +1505,10 @@ * progmodes/gdb-ui.el (gdb-macro-info): New variable. (gdb-source-info): Check for preprocessor info. - (gdb-tooltip-print-1): New function. Don't print tooltip if it is + (gdb-tooltip-print-1): New function. Don't print tooltip if it is a macro for a function. - found (user might have used GDB dir command). (gdb-info-breakpoints-custom): Try to find file again if not already + found (user might have used GDB dir command). (gdb-get-location): Update gdb-location-alist correctly for change to gdb-info-breakpoints-custom. @@ -1604,7 +1604,7 @@ * tooltip.el: Move code for GUD tooltips into gud.el. (require): CL no longer needed to compile case. (tooltip-mode): Do not toggle functions for GUD tooltips. - (tooltip-gud-tips-p): Remove. Replace with minor mode + (tooltip-gud-tips-p): Remove. Replace with minor mode gud-tooltip-mode in gud.el. (tooltip-gud-modes, tooltip-gud-display, tooltip-gud-echo-area) (tooltip-gud-toggle-dereference): Rename in gud.el by replacing @@ -1616,14 +1616,14 @@ (tooltip-gud-original-filter, tooltip-gud-dereference) (tooltip-gud-event, tooltip-toggle-gud-tips) (tooltip-gud-process-output, tooltip-gud-print-command) - (tooltip-gud-tips): GUD tooltip functions/variables. Rename in + (tooltip-gud-tips): GUD tooltip functions/variables. Rename in gud.el by replacing tooltip-gud prefix with gud-tooltip. (gdb-tooltip-print): Move to gdb-ui.el. * progmodes/gud.el: Move code for GUD tooltips from tooltip.el. (require): CL needed to compile case. (gud-tooltip-mode): Use to toggle GUD tooltips unstead of - tooltip-gud-tips-p. Make it a minor-mode. + tooltip-gud-tips-p. Make it a minor-mode. (gud-find-file): Only prepare GUD tooltips if gud-tooltip-mode is t. (gud-menu-map): GUD tooltips use gud-tooltip-mode now. (gud-tooltip-modes, gud-tooltip-display, gud-tooltip-echo-area) @@ -1719,7 +1719,7 @@ * ido.el (ido-setup-hook): New hook. (ido-define-mode-map-hook): Remove hook; use ido-setup-hook instead. (ido-input-stack): New var. - (ido-define-mode-map): Bind M-b to ido-push-dir. Move old + (ido-define-mode-map): Bind M-b to ido-push-dir. Move old ido-next-work-file binding to M-O. Bind M-f to ido-wide-find-file-or-pop-dir. (ido-define-mode-map): Don't run ido-define-mode-map-hook. @@ -1812,7 +1812,7 @@ (gdb-set-gud-minor-mode-1): Handle gdb-define-alist. (gdb-source, gdb-memory-set-repeat-count): Replace string-to-int with string-to-number. - (gdb-reset): Kill gdb-define-alist. Move assignments outside loop. + (gdb-reset): Kill gdb-define-alist. Move assignments outside loop. * progmodes/gud.el: Replace string-to-int with string-to-number. (gud-find-file): Handle gdb-define-alist. @@ -1858,7 +1858,7 @@ move to cc-vars.el. * progmodes/cc-vars.el (cc-define-list-program): - Change to "gcc -E -dM -". Make customizable. + Change to "gcc -E -dM -". Make customizable. 2005-05-02 Kim F. Storm @@ -1909,7 +1909,7 @@ * subr.el (dot, dot-marker, dot-min, dot-max, buffer-flush-undo) (compiled-function-p, focus-frame, unfocus-frame): Remove aliases and obsolete declarations. - Back out inadvertant changes from previous commit. + Back out inadvertent changes from previous commit. 2005-05-01 Luc Teirlinck @@ -1964,7 +1964,7 @@ 2005-04-30 Nick Roberts * progmodes/cc-mode.el (cc-create-define-alist): Check that file - exists. Initialise cc-define-alist. + exists. Initialise cc-define-alist. (c-mode): Add cc-create-define-alist locally to after-save-hook. If there is no file (Macroexpansion) don't create an alist. @@ -2054,7 +2054,7 @@ 2005-04-28 Nick Roberts - * progmodes/cc-mode.el: (cc-create-define-alist): New function. + * progmodes/cc-mode.el (cc-create-define-alist): New function. (cc-define-alist): New variable. (c-mode): Make it local and initialise it. @@ -2183,7 +2183,7 @@ 2005-04-25 Dan Nicolaescu * term.el (ansi-term-color-vector): Use the xterm colors. - (term-raw-map): Don't add mappings for \eO and \e[. Map deletechar. + (term-raw-map): Don't add mappings for \eO and \e[. Map deletechar. 2005-04-25 Lute Kamstra @@ -3205,13 +3205,13 @@ * add-log.el (change-log-font-lock-keywords): The manual describing a Change Log entry, says: (...) "Aside from these header lines, every line in the change log starts with a space or - a tab.". The font-lock was not highlighting lines started with + a tab.". The font-lock was not highlighting lines started with spaces, added support for it. 2005-04-03 Roland Winkler * textmodes/bibtex.el (bibtex-url): Use format to generate the url. - (bibtex-generate-url-list): Update docstring accordingly. Put the + (bibtex-generate-url-list): Update docstring accordingly. Put the complex example in the docstring. (bibtex-font-lock-url): Use pop. @@ -3244,7 +3244,7 @@ 2005-04-02 Sergey Poznyakoff (tiny change) - * mail/rmail.el (rmail-parse-url): Bugfix. Parse traditional + * mail/rmail.el (rmail-parse-url): Bugfix. Parse traditional mailbox specifications as well as URLs. (rmail-insert-inbox-text): Remove unused conditional branches. @@ -3346,7 +3346,7 @@ (fill-newline): Use fill-text-properties-at instead of text-properties-at. -2005-03-31 Olive Lin (tiny change) +2005-03-31 Olive Lin (tiny change) * textmodes/tex-mode.el (tex-start-tex) Use shell-quote-argument, not comint-quote-filename. @@ -3485,12 +3485,12 @@ (hs-special-modes-alist): Add a Fortran entry. (fortran-mode-map): Bind fortran-end-of-block, fortran-beginning-of-block to \M-\C-n, \M-\C-p. - (fortran-mode): Doc fix. Add fortran-font-lock-keywords-4. + (fortran-mode): Doc fix. Add fortran-font-lock-keywords-4. (fortran-looking-at-if-then, fortran-end-of-block) (fortran-beginning-of-block): New functions, for hideshow. - * progmodes/f90.el (f90-end-block-re, f90-start-block-re): Doc - fix. Tweak regexp. + * progmodes/f90.el (f90-end-block-re, f90-start-block-re): + Doc fix. Tweak regexp. (f90-beginning-of-block): Push mark first. 2005-03-29 Jay Belanger @@ -3508,7 +3508,7 @@ * vc.el (vc-do-command): Use a pipe for async processes, so password prompts don't show up at places where the user can't reply. -2005-03-29 Olive Lin (tiny change) +2005-03-29 Olive Lin (tiny change) * textmodes/tex-mode.el (tex-send-command): shell-quote-argument on the file name we pass to the inferior shell. @@ -3881,11 +3881,11 @@ (recentf-include-p): More robust. (recentf-keep-p): New function. (recentf-remove-if-non-kept): Rename from - `recentf-remove-if-non-readable'. Use `recentf-keep-p'. + `recentf-remove-if-non-readable'. Use `recentf-keep-p'. All callers updated. (recentf-menu-items-for-commands): Fix help string. - (recentf-track-closed-file): Update. Doc fix. - (recentf-cleanup): Update. Count removed files. Doc fix. + (recentf-track-closed-file): Update. Doc fix. + (recentf-cleanup): Update. Count removed files. Doc fix. 2005-03-23 Kim F. Storm @@ -4601,7 +4601,7 @@ * files.el (mode-require-final-newline): Doc fix. -2005-03-03 Stephan Stahl (tiny change) +2005-03-03 Stephan Stahl (tiny change) * progmodes/which-func.el (which-function): Specify NOERROR when calling imenu--make-index-alist. @@ -5196,7 +5196,7 @@ * progmodes/gdb-ui.el (gdb-find-file-unhook): New variable. (gdb-set-gud-minor-mode, gdb-set-gud-minor-mode-1) (gdb-set-gud-minor-mode-existing-buffers): New functions. - (gdb-find-file-hook): New hook. Add it to find-file-hook. + (gdb-find-file-hook): New hook. Add it to find-file-hook. (gdb-info-breakpoints-custom, gdb-source-info): Simplify. 2005-02-14 Luc Teirlinck @@ -5360,13 +5360,13 @@ 2005-02-05 Nick Roberts - * progmodes/gdb-ui.el: Update copyright. Put GDB-Frames before + * progmodes/gdb-ui.el: Update copyright. Put GDB-Frames before GDB-Windows on the menu-bar as this works better. 2005-02-04 Jay Belanger * calc/calc-embed.el (calc-embedded-update): Don't put in - unnecessary newlines. Adjust the end of formula marker. + unnecessary newlines. Adjust the end of formula marker. * calc/calc-lang.el (math-latex-parse-frac): Don't use arguments. (math-latex-parse-two-args): New function. @@ -5428,7 +5428,7 @@ 2005-02-02 Nick Roberts - * progmodes/gdb-ui.el: (gdb-goto-info): Delete. + * progmodes/gdb-ui.el (gdb-goto-info): Delete. * progmodes/gud.el (gud-goto-info): New function. (gud-tool-bar-map): Use correct icon. @@ -6861,7 +6861,7 @@ 2004-12-21 Eli Barzilay - * calculator.el: (calculator-radix-grouping-mode) + * calculator.el (calculator-radix-grouping-mode) (calculator-radix-grouping-digits) (calculator-radix-grouping-separator): New defcustoms for the new radix grouping mode functionality. @@ -7062,11 +7062,11 @@ (zone-replace-char): New defsubst. (zone-park/sit-for): Likewise. (zone-fret): Take window-start arg. - Update callers. Use `zone-park/sit-for'. + Update callers. Use `zone-park/sit-for'. (zone-fill-out-screen): Rewrite. - (zone-fall-through-ws): Likewise. Update callers. + (zone-fall-through-ws): Likewise. Update callers. (zone-pgm-drip): Use `zone-replace-char'. - Move var inits before while-loop. Use `zone-park/sit-for'. + Move var inits before while-loop. Use `zone-park/sit-for'. (zone-pgm-random-life): Handle empty initial field. Use `zone-replace-char' and `zone-park/sit-for'. @@ -7907,16 +7907,16 @@ (tramp-file-name-handler-alist): Delete file-directory-files, add directory-files-and-attributes. (tramp-perl-file-attributes): Surround uid and gid by double - quotes. Change parameter id-format from nonnumeric. + quotes. Change parameter id-format from nonnumeric. (tramp-convert-file-attributes): New function. (tramp-handle-file-attributes): Use it. (tramp-maybe-send-perl-script): New function. - (tramp-handle-file-attributes-with-perl): Use it. Don't convert - file mode. Change parameter id-format from nonnumeric. + (tramp-handle-file-attributes-with-perl): Use it. Don't convert + file mode. Change parameter id-format from nonnumeric. (tramp-handle-file-attributes-with-ls): Change parameter id-format from nonnumeric. (tramp-post-connection): Don't send tramp-perl-file-attributes - script. Reset connection property "perl-scripts". + script. Reset connection property "perl-scripts". (tramp-handle-insert-directory): Run real handler when ls-lisp is in use. @@ -7939,7 +7939,7 @@ (gdb-view-source-function, gdb-view-assembler): Delete functions. (menu): Delete menu bindings for viewing source/assembler. (gdb-setup-windows, gdb-restore-windows): - Don't dedicate GUD. No assembler now. + Don't dedicate GUD. No assembler now. (gdb-reset): No need to undedicate source buffers now. (gdb-source-info): No assembler now. @@ -8066,7 +8066,7 @@ (gdb-var-evaluate-expression-handler, gdb-put-string): Remove unused variable bindings. (gdb-setup-windows, gdb-display-buffer): - Simplify. Use pop-to-buffer. + Simplify. Use pop-to-buffer. (gdb-view-source-function): Simplify. (gdb-frame-breakpoints-buffer): Use pop-to-buffer, special-display-regexps. @@ -8150,8 +8150,8 @@ * progmodes/gdb-ui.el (dedicated-switch-to-buffer): New function. (gdb-ann3, gdb-setup-windows, gdb-restore-windows): Dedicate gdb-related windows. - (gdb-display-buffer): Dedicate gdb-related windows. Don't grab - other frames. + (gdb-display-buffer): Dedicate gdb-related windows. + Don't grab other frames. (gdb-reset): Remove dedicated property after debugging. 2004-11-24 Jay Belanger @@ -9017,8 +9017,8 @@ 2004-11-10 Nick Roberts - * tooltip.el: Don't require cl, comint, gud, gdb-ui for - compilation. The resulting compiler warnings appear to be harmless. + * tooltip.el: Don't require cl, comint, gud, gdb-ui for compilation. + The resulting compiler warnings appear to be harmless. 2004-11-10 Daniel Pfeiffer @@ -10246,7 +10246,7 @@ * kmacro.el (kmacro-insert-counter, kmacro-add-counter): Use and reset kmacro-initial-counter-value if set. (kmacro-set-counter): Only set kmacro-counter if defining or executing - macro. Set kmacro-initial-counter-value otherwise. Never set both. + macro. Set kmacro-initial-counter-value otherwise. Never set both. (kmacro-display): Show macro counter if non-zero. * subr.el (substitute-key-definition): Mention command remapping @@ -10433,8 +10433,8 @@ * term.el (term-adjust-current-row-cache): Don't allow the current row to become negative. - (term-emulate-terminal): Fix insert mode. Handle tab insertion at - the end of the line. Fix scroll down. Add comments. + (term-emulate-terminal): Fix insert mode. Handle tab insertion at + the end of the line. Fix scroll down. Add comments. (term-handle-ansi-escape): Don't exceed terminal width when moving right. (term-scroll-region): Move the cursor after setting the scroll region. @@ -10589,7 +10589,7 @@ * calendar/holidays.el (holiday-advent): Report on a specified day offset from advent, not just advent. (holiday-easter-etc): Report on one specified day offset from - easter, not all easter holidays. Various Easter holidays moved to + easter, not all easter holidays. Various Easter holidays moved to `christian-holidays' variable in calendar.el. * calendar/calendar.el (christian-holidays): Adapt for new behaviour of `holiday-advent' and `holiday-easter-etc' functions. @@ -10604,7 +10604,7 @@ (ido-read-internal): Handle new `list' context. Handle insert-buffer and insert-file ido-exit values. (ido-buffer-internal): New arg switch-cmd. Use it to setup - ido-context-switch-command. Handle insert-file ido-exit value. + ido-context-switch-command. Handle insert-file ido-exit value. (ido-read-buffer): Set ido-context-switch-command to 'ignore unless it is already bound by caller. (ido-file-internal): New arg switch-cmd. Use it to setup @@ -10934,7 +10934,7 @@ Do not call obsolete function compilation-parse-errors. (bibtex-remove-delimiters): Only remove delimiters if present. (bibtex-copy-entry-as-kill): Add docstring. - (bibtex-clean-entry): Use bibtex-string=. Handle empty keys. + (bibtex-clean-entry): Use bibtex-string=. Handle empty keys. Detect duplicate keys if bibtex-maintain-sorted-entries is nil. (bibtex-complete): Use bibtex-predefined-month-strings, bibtex-string=, and new function bibtex-complete-key-cleanup. @@ -11620,8 +11620,8 @@ when `c-opt-type-concat-key' is used (i.e. in Pike). * progmodes/cc-engine.el (c-looking-at-special-brace-list): - Fix bug when the inner char pair doesn't have paren syntax, i.e. "(< - >)". + Fix bug when the inner char pair doesn't have paren syntax, + i.e. "(<>)". * progmodes/cc-align.el (c-lineup-multi-inher): Made it syntactic whitespace safe. @@ -11701,7 +11701,7 @@ string. (2) Check that settings to `c-offsets-alist' are not spuriously quoted. - * progmodes/cc-cmds.el: (c-electric-brace): Don't delete a comment + * progmodes/cc-cmds.el (c-electric-brace): Don't delete a comment which precedes the newly inserted `{'. 2004-08-10 Michael Albinus @@ -12354,7 +12354,7 @@ 2004-06-23 Nick Roberts - * comint.el: (comint-insert-clicked-input, comint-copy-old-input): + * comint.el (comint-insert-clicked-input, comint-copy-old-input): Remove. (comint-insert-input, comint-mouse-insert-input): New functions based on comint-insert-clicked-input for two bindings but just @@ -12865,7 +12865,7 @@ 2004-06-04 Karl Fogel - * vc-svn.el (vc-svn-checkin): Use 'nconc' instead of 'list*', + * vc-svn.el (vc-svn-checkin): Use `nconc' instead of `list*', because the latter is a CL-ism. This fixes the bug reported by Shawn Boyette in http://lists.gnu.org/archive/html/emacs-devel/2004-05/msg00442.html. @@ -14631,7 +14631,7 @@ * emacs-lisp/rx.el (rx-syntax): Move sregex style syntax to code. (rx-bracket, rx-check-any, rx-any): Clean up name space. - * wdired.el: (wdired-mode-map): Move init into declaration. + * wdired.el (wdired-mode-map): Move init into declaration. Fix `return' binding. (wdired-change-to-wdired-mode, wdired-change-to-dired-mode): Use force-mode-line-update. @@ -16174,7 +16174,7 @@ 2004-03-15 David Ponce - * ruler-mode.el: (ruler-mode-left-fringe-cols) + * ruler-mode.el (ruler-mode-left-fringe-cols) (ruler-mode-right-fringe-cols, ruler-mode-left-scroll-bar-cols) (ruler-mode-right-scroll-bar-cols): Remove. (ruler-mode-window-col, ruler-mode-mouse-set-left-margin) @@ -16921,7 +16921,7 @@ 2004-02-16 Eli Tziperman - * rmail-spam-filter.el: (vm-use-spam-filter) + * rmail-spam-filter.el (vm-use-spam-filter) (rsf-min-region-length-added-to-spam-list): New variables. (rsf-bbdb-auto-delete-spam-bbdb-entries): Rename from rmail-bbdb-auto-delete-spam-entries. Add cc: to recipients for @@ -17579,7 +17579,7 @@ * mail/smtpmail.el (smtpmail-send-data): Don't append spurious newline. -2004-01-18 David Ponce (tiny change) +2004-01-18 David Ponce (tiny change) * progmodes/which-func.el (which-function-mode): Don't cancel which-func-update-timer if not set. diff --git a/src/ChangeLog b/src/ChangeLog index 1561394928d..80f0007670a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2032,7 +2032,7 @@ 2005-01-13 Kim F. Storm * xdisp.c (Fformat_mode_line): Fix last change. Remove NO_PROPS arg - (specify 0 for FACE instead). Reorder arg list. Doc fix. + (specify 0 for FACE instead). Reorder arg list. Doc fix. 2005-01-12 Richard M. Stallman @@ -2183,7 +2183,7 @@ fontp->space_width to FONT_WIDTH so they are valid. * w32fns.c (w32_load_system_font): Set FONT_WIDTH to maximum, not - average width. Set fontp->average_width and fontp->space_width to + average width. Set fontp->average_width and fontp->space_width to their appropriate values. * w32term.c (x_new_font): Set FRAME_COLUMN_WIDTH to @@ -2210,7 +2210,7 @@ * xdisp.c (setup_for_ellipsis, get_next_display_element): Set it->ellipsis_p to 1 or 0. (display_line): Record whether row ends in mid-ellipsis. - (set_cursor_from_row): If ends in ellipsis. find start of it. + (set_cursor_from_row): If ends in ellipsis, find start of it. (cursor_row_p): If PT's at the end of the ellipsis the row ends within, don't display cursor on this row. @@ -2913,7 +2913,7 @@ * fringe.c (update_window_fringes): Prefer truncation bitmaps over angle bitmaps at top/bottom line. - * xdisp.c: Undo recent changes for restoring saved_face_id. Instead, + * xdisp.c: Undo recent changes for restoring saved_face_id. Instead, set it when it->method is set to next_element_from_display_vector. (setup_for_ellipsis): Add LEN argument. Callers changed. Set it->saved_face_id. @@ -3109,7 +3109,7 @@ * xfns.c (Fx_file_dialog): Call popup_activated instead of x_menu_in_use. Call x_menu_set_in_use in Motif version also. - * xterm.h: (x_menu_in_use): Remove. + * xterm.h (x_menu_in_use): Remove. 2004-11-16 Richard M. Stallman @@ -3243,7 +3243,7 @@ (MR_PARTIALLY_VISIBLE_AT_BOTTOM): New helper macros. (MATRIX_ROW_PARTIALLY_VISIBLE_P): Fix to return false if invisible part of last line is only extra line spacing (so the text on the - line is fully visible). Use helper macros. + line is fully visible). Use helper macros. Add W arg (to use them). All callers changed. (MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P) (MATRIX_ROW_PARTIALLY_VISIBLE_AT_BOTTOM_P): Use helper macros. @@ -3929,7 +3929,7 @@ * keyboard.c (timer_resume_idle): New function to resume idle timer without resetting timers on the idle list. - (read_char): Use timer_resume_idle. Remove local var last_idle_start. + (read_char): Use timer_resume_idle. Remove local var last_idle_start. (timer_start_idle, timer_stop_idle): Declare static. (read_key_sequence): Use timer_resume_idle instead of timer_start_idle. @@ -6003,7 +6003,7 @@ elt_prefix combined with Fsingle_key_description. (describe_vector): Declare static. Replace arg `elt_prefix' with `prefix'. Add KEYMAP_P arg. Add local var `elt_prefix'; use it - if !KEYMAP_P. Use Fkey_description with prefix instead of + if !KEYMAP_P. Use Fkey_description with prefix instead of Fsingle_key_description. * keymap.h (Fkey_description): Fix prototype. @@ -6218,7 +6218,7 @@ (display_mode_line): Set mode_line_p before displaying line. (calc_pixel_width_or_height): Declare extern. Add separate :align-to handling. Remove complex cases for fringes and scroll-bars. - Add left, right, and center alignment positions. Add text (area) + Add left, right, and center alignment positions. Add text (area) width/height. Return width or height for image specs. (produce_stretch_glyph): Improve handling of :align-to. Is now relative to left of text area by default, but other base offsets @@ -10526,7 +10526,7 @@ * intervals.h (CHECK_TOTAL_LENGTH): New macro. * intervals.c: Add many calls to CHECK_TOTAL_LENGTH. - * alloc.c: (VALIDATE_LISP_STORAGE): Macro deleted. + * alloc.c (VALIDATE_LISP_STORAGE): Macro deleted. All calls deleted. (lisp_malloc): Do the work here directly. @@ -10685,7 +10685,7 @@ (syms_of_w32fns): Don't intern/staticpro removed vars. * w32term.c: Remove unnecessary extern declarations. - (x_fullscreen_adjust): Remove. Use generic instead. + (x_fullscreen_adjust): Remove. Use generic instead. (x_redisplay_interface): Add w32_frame_parm_handlers member. * w32reg.c (x_get_string_resource): Use XrmDatabase. @@ -11911,9 +11911,9 @@ 2003-01-21 David Ponce * w32term.c (w32_encode_char): For DIM=1 charset, set - ccl->reg[2] to -1 before calling ccl_driver. (Sync. with xterm.c - x_encode_char change by Kenichi Handa on - 2002-09-30.) + ccl->reg[2] to -1 before calling ccl_driver. + (Sync. with xterm.c x_encode_char change by Kenichi Handa + on 2002-09-30.) (w32_draw_relief_rect): Declare all args. (w32_define_cursor): New. @@ -14596,7 +14596,7 @@ 2002-06-27 Kim F. Storm - * xdisp.c: (mode_line_string_list, mode_line_string_face) + * xdisp.c (mode_line_string_list, mode_line_string_face) (mode_line_string_face_prop): New variables. (store_mode_line_string): New function. (display_mode_element): Use store_mode_line_string to @@ -14639,7 +14639,7 @@ 2002-06-24 Juanma Barranquero - * w32select.c: Include composite.h + * w32select.c: Include composite.h. * w16select.c: Likewise. @@ -15630,7 +15630,7 @@ * config.in: Add HAVE_SHARED_GAME_DIR. - * callproc.c: (Vgame_score_directory): New variable. + * callproc.c (Vgame_score_directory): New variable. (syms_of_callproc) : DEFVAR_LISP. 2002-04-10 Richard M. Stallman @@ -16178,7 +16178,7 @@ * xterm.h (x_session_check_input, x_session_initialize): Declare. - * xterm.c: (XTread_socket): Add call to x_session_check_input and + * xterm.c (XTread_socket): Add call to x_session_check_input and x_session_have_connection. (x_initialize): Add call to x_session_initialize. @@ -16595,10 +16595,10 @@ 2002-02-17 Kim F. Storm - * frame.c: (Vmouse_highlight): New variable. + * frame.c (Vmouse_highlight): New variable. (syms_of_frame): DEFVAR_LISP it. - * frame.h: (Vmouse_highlight): Declare extern. + * frame.h (Vmouse_highlight): Declare extern. * xterm.h (struct x_display_info): Add mouse_face_hidden. @@ -18123,7 +18123,7 @@ 2001-11-16 Eli Zaretskii - * syswait.h: (HAVE_SYS_WAIT_H): Undef for ISC 4.1. Reported by + * syswait.h (HAVE_SYS_WAIT_H): Undef for ISC 4.1. Reported by Andrew Wiseman . 2001-11-16 Kim F. Storm @@ -18811,7 +18811,7 @@ * xterm.c: Fix typo in a comment. - * lisp.h: (gdb_lisp_params): Remove code in #if 0 which is now in + * lisp.h (gdb_lisp_params): Remove code in #if 0 which is now in emacs.c. 2001-10-27 Gerd Moellmann @@ -18935,7 +18935,7 @@ 2001-10-24 Pavel Jan,Am(Bk - * xterm.c: (x_insert_glyphs): Remove unused variables `real_end' + * xterm.c (x_insert_glyphs): Remove unused variables `real_end' and `real_start'. (x_draw_image_foreground): Remove unused variables `mask' and `xgcv'. (glyph_rect): Remove unused variable `area'. @@ -18967,7 +18967,7 @@ (HAVE_BOXES): Fix typo in comment. (push_menu_pane): Fix typo in comment. - * xdisp.c: (display_prop_string_p): Remove unused local declaration + * xdisp.c (display_prop_string_p): Remove unused local declaration of `Qwhen'. (single_display_prop_string_p): Remove unused local declarations of `Qwhen' and `Qmargin'. From a2e6384d44559b23890969a21d579bf35cd85d88 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Thu, 2 Jun 2005 10:06:14 +0000 Subject: [PATCH 218/294] Document new argument of `list-faces-display'. --- etc/NEWS | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 3e5a12fde9a..1e88f1d1b41 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -349,6 +349,10 @@ understand two new boolean pseudo-frame-parameters `same-frame' and ** The default for the paper size (variable ps-paper-type) is taken from the locale. +** The command `list-faces-display' now accepts a prefix arg. +When passed, the function prompts for a regular expression and lists +only faces matching this regexp. + ** Mark command changes: +++ @@ -3137,6 +3141,10 @@ It returns nil if the given Lisp form can't possibly do anything dangerous; otherwise it returns a reason why the form might be unsafe (calls unknown function, alters global variable, etc). +*** `list-faces-display' takes an optional argument, REGEXP. + +If it is non-nil, the function lists only faces matching this regexp. + ** Lisp code indentation features: +++ From 0f69d598bc0b95891ee020f6ff2268e2ec981b5f Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Thu, 2 Jun 2005 11:34:00 +0000 Subject: [PATCH 219/294] Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-348 Merge from gnus--rel--5.10 Patches applied: * gnus--rel--5.10 (patch 79) - Update from CVS 2005-06-02 Katsumi Yamaoka * lisp/gnus/pop3.el (pop3-md5): Run md5 in the binary mode. (pop3-md5-program-args): New variable. * lisp/gnus/starttls.el (starttls-set-process-query-on-exit-flag): Use eval-and-compile. --- lisp/gnus/ChangeLog | 8 ++++++++ lisp/gnus/pop3.el | 44 +++++++++++++++++++++++++++++-------------- lisp/gnus/starttls.el | 9 +++++---- 3 files changed, 43 insertions(+), 18 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 089261f108c..83b5e3820e6 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,11 @@ +2005-06-02 Katsumi Yamaoka + + * pop3.el (pop3-md5): Run md5 in the binary mode. + (pop3-md5-program-args): New variable. + + * starttls.el (starttls-set-process-query-on-exit-flag): Use + eval-and-compile. + 2005-05-31 Katsumi Yamaoka * gnus-art.el (article-display-x-face): Replace diff --git a/lisp/gnus/pop3.el b/lisp/gnus/pop3.el index 75efaf4e512..637421c46d9 100644 --- a/lisp/gnus/pop3.el +++ b/lisp/gnus/pop3.el @@ -1,6 +1,7 @@ ;;; pop3.el --- Post Office Protocol (RFC 1460) interface -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +;; 2005 ;; Free Software Foundation, Inc. ;; Author: Richard L. Pieri @@ -348,21 +349,36 @@ If NOW, use that time instead." ;; AUTHORIZATION STATE -(eval-and-compile - (if (fboundp 'md5) - (defalias 'pop3-md5 'md5) - (defvar pop3-md5-program "md5" - "*Program to encode its input in MD5.") +(eval-when-compile + (if (not (fboundp 'md5)) ;; Emacs 20 + (defalias 'md5 'ignore))) +(eval-and-compile + (if (and (fboundp 'md5) + ;; There might be an incompatible implementation. + (condition-case nil + (md5 "Check whether the 4th argument is allowed" + nil nil 'binary) + (error nil))) + (defun pop3-md5 (string) + (md5 string nil nil 'binary)) + (defvar pop3-md5-program "md5" + "*Program to encode its input in MD5. +\"openssl\" is a popular alternative; set `pop3-md5-program-args' to +'(\"md5\") if you use it.") + (defvar pop3-md5-program-args nil + "*List of arguments passed to `pop3-md5-program'.") (defun pop3-md5 (string) - (with-temp-buffer - (insert string) - (call-process-region (point-min) (point-max) - pop3-md5-program - t (current-buffer) nil) - ;; The meaningful output is the first 32 characters. - ;; Don't return the newline that follows them! - (buffer-substring (point-min) (+ 32 (point-min))))))) + (let ((default-enable-multibyte-characters t) + (coding-system-for-write 'binary)) + (with-temp-buffer + (insert string) + (apply 'call-process-region (point-min) (point-max) + pop3-md5-program t (current-buffer) nil + pop3-md5-program-args) + ;; The meaningful output is the first 32 characters. + ;; Don't return the newline that follows them! + (buffer-substring (point-min) (+ 32 (point-min)))))))) (defun pop3-user (process user) "Send USER information to POP3 server." diff --git a/lisp/gnus/starttls.el b/lisp/gnus/starttls.el index 7faa3a933a7..ddc91d90d25 100644 --- a/lisp/gnus/starttls.el +++ b/lisp/gnus/starttls.el @@ -236,11 +236,12 @@ handshake, or NIL on failure." (starttls-negotiate-gnutls process) (signal-process (process-id process) 'SIGALRM))) -(if (fboundp 'set-process-query-on-exit-flag) +(eval-and-compile + (if (fboundp 'set-process-query-on-exit-flag) + (defalias 'starttls-set-process-query-on-exit-flag + 'set-process-query-on-exit-flag) (defalias 'starttls-set-process-query-on-exit-flag - 'set-process-query-on-exit-flag) - (defalias 'starttls-set-process-query-on-exit-flag - 'process-kill-without-query)) + 'process-kill-without-query))) (defun starttls-open-stream-gnutls (name buffer host service) (message "Opening STARTTLS connection to `%s'..." host) From 0493f7be8a656af1956aa8bd127f277e1ed9b0df Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Thu, 2 Jun 2005 12:25:57 +0000 Subject: [PATCH 220/294] *** empty log message *** --- src/ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 80f0007670a..dbcac952b51 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2005-06-02 Kim F. Storm + + * xdisp.c (MODE_LINE_NOPROP_LEN): New macro. + (x_consider_frame_title, Fformat_mode_line): Save offset into + mode_line_noprop_buf rather than pointer, in case buffer is relocated. + 2005-06-01 Kim F. Storm * fns.c (mapcar1): Maybe exit loop if original sequence was modified. From d06e384795d5ca4e82c88273847eeb9d01380046 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Thu, 2 Jun 2005 12:27:05 +0000 Subject: [PATCH 221/294] (MODE_LINE_NOPROP_LEN): New macro. (x_consider_frame_title, Fformat_mode_line): Save offset into mode_line_noprop_buf rather than pointer, in case buffer is relocated. --- src/xdisp.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index 29fdbab5d78..63af22d9112 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -8173,6 +8173,9 @@ static char *mode_line_noprop_buf; static char *mode_line_noprop_buf_end; static char *mode_line_noprop_ptr; +#define MODE_LINE_NOPROP_LEN(start) \ + ((mode_line_noprop_ptr - mode_line_noprop_buf) - start) + static enum { MODE_LINE_DISPLAY = 0, MODE_LINE_TITLE, @@ -8212,7 +8215,7 @@ format_mode_line_unwind_data (obuf) vector = Fmake_vector (make_number (7), Qnil); AREF (vector, 0) = make_number (mode_line_target); - AREF (vector, 1) = make_number (mode_line_noprop_ptr - mode_line_noprop_buf); + AREF (vector, 1) = make_number (MODE_LINE_NOPROP_LEN (0)); AREF (vector, 2) = mode_line_string_list; AREF (vector, 3) = mode_line_proptrans_alist; AREF (vector, 4) = mode_line_string_face; @@ -8263,7 +8266,7 @@ store_mode_line_noprop_char (c) double the buffer's size. */ if (mode_line_noprop_ptr == mode_line_noprop_buf_end) { - int len = mode_line_noprop_ptr - mode_line_noprop_buf; + int len = MODE_LINE_NOPROP_LEN (0); int new_size = 2 * len * sizeof *mode_line_noprop_buf; mode_line_noprop_buf = (char *) xrealloc (mode_line_noprop_buf, new_size); mode_line_noprop_buf_end = mode_line_noprop_buf + new_size; @@ -8330,7 +8333,8 @@ x_consider_frame_title (frame) /* Do we have more than one visible frame on this X display? */ Lisp_Object tail; Lisp_Object fmt; - char *title_start; + int title_start; + char *title; int len; struct it it; int count = SPECPDL_INDEX (); @@ -8361,12 +8365,12 @@ x_consider_frame_title (frame) fmt = FRAME_ICONIFIED_P (f) ? Vicon_title_format : Vframe_title_format; mode_line_target = MODE_LINE_TITLE; - title_start = mode_line_noprop_ptr; + title_start = MODE_LINE_NOPROP_LEN (0); init_iterator (&it, XWINDOW (f->selected_window), -1, -1, NULL, DEFAULT_FACE_ID); display_mode_element (&it, 0, -1, -1, fmt, Qnil, 0); - len = mode_line_noprop_ptr - title_start; - + len = MODE_LINE_NOPROP_LEN (title_start); + title = mode_line_noprop_buf + title_start; unbind_to (count, Qnil); /* Set the title only if it's changed. This avoids consing in @@ -8376,8 +8380,8 @@ x_consider_frame_title (frame) higher level than this.) */ if (! STRINGP (f->name) || SBYTES (f->name) != len - || bcmp (title_start, SDATA (f->name), len) != 0) - x_implicitly_set_name (f, make_string (title_start, len), Qnil); + || bcmp (title, SDATA (f->name), len) != 0) + x_implicitly_set_name (f, make_string (title, len), Qnil); } } @@ -16300,7 +16304,7 @@ are the selected window and the window's buffer). */) int no_props = INTEGERP (face); int count = SPECPDL_INDEX (); Lisp_Object str; - char *string_start = NULL; + int string_start = 0; if (NILP (window)) window = selected_window; @@ -16343,7 +16347,7 @@ are the selected window and the window's buffer). */) mode_line_target = MODE_LINE_NOPROP; mode_line_string_face_prop = Qnil; mode_line_string_list = Qnil; - string_start = mode_line_noprop_ptr; + string_start = MODE_LINE_NOPROP_LEN (0); } else { @@ -16352,8 +16356,6 @@ are the selected window and the window's buffer). */) mode_line_string_face = face; mode_line_string_face_prop = (NILP (face) ? Qnil : Fcons (Qface, Fcons (face, Qnil))); - - string_start = NULL; } push_frame_kboard (it.f); @@ -16362,8 +16364,8 @@ are the selected window and the window's buffer). */) if (no_props) { - len = mode_line_noprop_ptr - string_start; - str = make_string (string_start, len); + len = MODE_LINE_NOPROP_LEN (string_start); + str = make_string (mode_line_noprop_buf + string_start, len); } else { From 899a431bae4a7b48a266c5da56610a5ea44febad Mon Sep 17 00:00:00 2001 From: Michael Kifer Date: Fri, 3 Jun 2005 08:04:04 +0000 Subject: [PATCH 222/294] 2005-06-03 Michael Kifer * ediff-diff.el (ediff-same-contents) Eliminate CL-type functions. * ediff-mult.el (ediff-intersect-directories) Make sure that ".." and "." files are deleted from all file lists before comparison * viper-keym.el (viper-toggle-key,viper-quoted-insert-key,viper-ESC-key): Made them customizable. * viper.el (viper-non-hook-settings): fixed the names of defadvices. --- lisp/ChangeLog | 13 ++++++++ lisp/ediff-diff.el | 62 ++++++++++++++++++++++++------------ lisp/ediff-help.el | 2 +- lisp/ediff-mult.el | 10 ++++-- lisp/ediff-util.el | 2 +- lisp/ediff.el | 2 +- lisp/emulation/viper-keym.el | 19 ++++++++--- lisp/emulation/viper.el | 7 ++-- 8 files changed, 83 insertions(+), 34 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c9c4d26844b..df9f3993878 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,16 @@ +2005-06-03 Michael Kifer + + * ediff-diff.el (ediff-same-contents) Eliminate CL-type functions. + + * ediff-mult.el (ediff-intersect-directories) Make sure that ".." and + "." files are deleted from all file lists before comparison + + * viper-keym.el + (viper-toggle-key,viper-quoted-insert-key,viper-ESC-key): + Made them customizable. + + * viper.el (viper-non-hook-settings): fixed the names of defadvices. + 2005-06-01 Luc Teirlinck * autorevert.el (auto-revert-buffers): Use save-match-data. diff --git a/lisp/ediff-diff.el b/lisp/ediff-diff.el index 4c13e6fc0e1..ec496301405 100644 --- a/lisp/ediff-diff.el +++ b/lisp/ediff-diff.el @@ -1353,7 +1353,7 @@ Symlinks and the likes are not handled. If FILTER-RE is non-nil, recursive checking in directories affects only files whose names match the expression." ;; Normalize empty filter RE to nil. - (unless (length filter-re) (setq filter-re nil)) + (unless (> (length filter-re) 0) (setq filter-re nil)) ;; Indicate progress (message "Comparing '%s' and '%s' modulo '%s'" d1 d2 filter-re) (cond @@ -1367,27 +1367,11 @@ affects only files whose names match the expression." (if (eq ediff-recurse-to-subdirectories 'yes) (let* ((all-entries-1 (directory-files d1 t filter-re)) (all-entries-2 (directory-files d2 t filter-re)) - (entries-1 (remove-if (lambda (s) - (string-match "^\\.\\.?$" - (file-name-nondirectory s))) - all-entries-1)) - (entries-2 (remove-if (lambda (s) - (string-match "^\\.\\.?$" - (file-name-nondirectory s))) - all-entries-2)) + (entries-1 (ediff-delete-all-matches "^\\.\\.?$" all-entries-1)) + (entries-2 (ediff-delete-all-matches "^\\.\\.?$" all-entries-2)) ) - ;; First, check only the names (works quickly and ensures a - ;; precondition for subsequent code) - (if (and (= (length entries-1) (length entries-2)) - (every (lambda (a b) (equal (file-name-nondirectory a) - (file-name-nondirectory b))) - entries-1 entries-2)) - ;; With name equality established, compare the entries - ;; through recursion. - (every (lambda (a b) - (ediff-same-contents a b filter-re)) - entries-1 entries-2) - ) + + (ediff-same-file-contents-lists entries-1 entries-2 filter-re) )) ) ; end of the directories case ;; D1 & D2 are both files => compare directly @@ -1398,6 +1382,42 @@ affects only files whose names match the expression." ) ) +;; If lists have the same length and names of files are pairwise equal +;; (removing the directories) then compare contents pairwise. +;; True if all contents are the same; false otherwise +(defun ediff-same-file-contents-lists (entries-1 entries-2 filter-re) + ;; First, check only the names (works quickly and ensures a + ;; precondition for subsequent code) + (if (and (= (length entries-1) (length entries-2)) + (equal (mapcar 'file-name-nondirectory entries-1) + (mapcar 'file-name-nondirectory entries-2))) + ;; With name equality established, compare the entries + ;; through recursion. + (let ((continue t)) + (while (and entries-1 continue) + (if (ediff-same-contents + (car entries-1) (car entries-2) filter-re) + (setq entries-1 (cdr entries-1) + entries-2 (cdr entries-2)) + (setq continue nil)) + ) + ;; if reached the end then lists are equal + (null entries-1)) + ) + ) + + +;; ARG1 is a regexp, ARG2 is a list of full-filenames +;; Delete all entries that match the regexp +(defun ediff-delete-all-matches (regex file-list-list) + (let (result elt) + (while file-list-list + (setq elt (car file-list-list)) + (or (string-match regex (file-name-nondirectory elt)) + (setq result (cons elt result))) + (setq file-list-list (cdr file-list-list))) + (reverse result))) + ;;; Local Variables: ;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun) diff --git a/lisp/ediff-help.el b/lisp/ediff-help.el index bdd92f5c12d..69d170faedf 100644 --- a/lisp/ediff-help.el +++ b/lisp/ediff-help.el @@ -132,7 +132,7 @@ Normally, not a user option. See `ediff-help-message' for details.") "Normally, not a user option. See `ediff-help-message' for details.") (defconst ediff-brief-message-string - " ? -quick help " + " Type ? for help" "Contents of the brief help message.") ;; The actual brief help message (ediff-defvar-local ediff-brief-help-message "" diff --git a/lisp/ediff-mult.el b/lisp/ediff-mult.el index 41a7699cfdc..88ab31fe56a 100644 --- a/lisp/ediff-mult.el +++ b/lisp/ediff-mult.el @@ -560,17 +560,23 @@ behavior." (ediff-add-slash-if-directory auxdir1 elt)) lis1) auxdir2 (file-name-as-directory dir2) + lis2 (directory-files auxdir2 nil regexp) + lis2 (delete "." lis2) + lis2 (delete ".." lis2) lis2 (mapcar (lambda (elt) (ediff-add-slash-if-directory auxdir2 elt)) - (directory-files auxdir2 nil regexp))) + lis2)) (if (stringp dir3) (setq auxdir3 (file-name-as-directory dir3) + lis3 (directory-files auxdir3 nil regexp) + lis3 (delete "." lis3) + lis3 (delete ".." lis3) lis3 (mapcar (lambda (elt) (ediff-add-slash-if-directory auxdir3 elt)) - (directory-files auxdir3 nil regexp)))) + lis3))) (if (ediff-nonempty-string-p merge-autostore-dir) (setq merge-autostore-dir diff --git a/lisp/ediff-util.el b/lisp/ediff-util.el index b7b39f405e5..b952c2fb2bf 100644 --- a/lisp/ediff-util.el +++ b/lisp/ediff-util.el @@ -117,7 +117,7 @@ Commands: (kill-all-local-variables) (setq major-mode 'ediff-mode) (setq mode-name "Ediff") - (run-mode-hooks 'ediff-mode-hook)) + (run-hooks 'ediff-mode-hook)) diff --git a/lisp/ediff.el b/lisp/ediff.el index 2a2b481ec59..00a7e2f512a 100644 --- a/lisp/ediff.el +++ b/lisp/ediff.el @@ -7,7 +7,7 @@ ;; Keywords: comparing, merging, patching, tools, unix (defconst ediff-version "2.80" "The current version of Ediff") -(defconst ediff-date "February 19, 2005" "Date of last update") +(defconst ediff-date "June 3, 2005" "Date of last update") ;; This file is part of GNU Emacs. diff --git a/lisp/emulation/viper-keym.el b/lisp/emulation/viper-keym.el index a74ca05b3df..f14f67d94c8 100644 --- a/lisp/emulation/viper-keym.el +++ b/lisp/emulation/viper-keym.el @@ -50,16 +50,25 @@ ;;; Variables -(defvar viper-toggle-key "\C-z" +(defcustom viper-toggle-key "\C-z" "The key used to change states from emacs to Vi and back. In insert mode, this key also functions as Meta. Must be set in .viper file or prior to loading Viper. -This setting cannot be changed interactively.") +This setting cannot be changed interactively." + :type 'string + :group 'viper) -(defvar viper-ESC-key "\e" +(defcustom viper-quoted-insert-key "\C-v" + "The key used to quote special characters when inserting them in Insert state." + :type 'string + :group 'viper) + +(defcustom viper-ESC-key "\e" "Key used to ESC. Must be set in .viper file or prior to loading Viper. -This setting cannot be changed interactively.") +This setting cannot be changed interactively." + :type 'string + :group 'viper) ;;; Emacs keys in other states. @@ -242,7 +251,7 @@ viper-insert-basic-map. Not recommended, except for novice users.") (define-key viper-insert-basic-map "\C-t" 'viper-forward-indent) (define-key viper-insert-basic-map (if viper-xemacs-p [(shift tab)] [S-tab]) 'viper-insert-tab) -(define-key viper-insert-basic-map "\C-v" 'quoted-insert) +(define-key viper-insert-basic-map viper-quoted-insert-key 'quoted-insert) (define-key viper-insert-basic-map "\C-?" 'viper-del-backward-char-in-insert) (define-key viper-insert-basic-map [backspace] 'viper-del-backward-char-in-insert) (define-key viper-insert-basic-map "\C-\\" 'viper-alternate-Meta-key) diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el index e3582f2165a..3fdbccc2957 100644 --- a/lisp/emulation/viper.el +++ b/lisp/emulation/viper.el @@ -990,12 +990,13 @@ remains buffer-local." (setq global-mode-string (append '("" viper-mode-string) (cdr global-mode-string)))) - (defadvice describe-key (before viper-read-keyseq-ad protect activate) + (defadvice describe-key (before viper-describe-key-ad protect activate) "Force to read key via `viper-read-key-sequence'." - (interactive (list (viper-read-key-sequence "Describe key: ")))) + (interactive (list (viper-read-key-sequence "Describe key: ")) + )) (defadvice describe-key-briefly - (before viper-read-keyseq-ad protect activate) + (before viper-describe-key-briefly-ad protect activate) "Force to read key via `viper-read-key-sequence'." (interactive (list (viper-read-key-sequence "Describe key briefly: ")))) From 3b79dd208da3335459363db7cd6f2c5b04d71b48 Mon Sep 17 00:00:00 2001 From: Daniel Pfeiffer Date: Fri, 3 Jun 2005 08:41:20 +0000 Subject: [PATCH 223/294] (compilation-error-regexp-alist-alist): Allow (...) within `...' for makepp messages. --- lisp/progmodes/compile.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 0cb87a5b17a..a27a5282b42 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -231,9 +231,9 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) (makepp "^makepp: \\(?:\\(?:warning\\(:\\).*?\\|\\(Scanning\\|[LR]e?l?oading makefile\\) \\|.*?\\)\ -`\\(\\(\\S +?\\)\\(?::\\([0-9]+\\)\\)?\\)'\\)" +`\\(\\(\\S +?\\)\\(?::\\([0-9]+\\)\\)?\\)['(]\\)" 4 5 nil (1 . 2) 3 - ("`\\(\\(\\S +?\\)\\(?::\\([0-9]+\\)\\)?\\)'" nil nil + ("`\\(\\(\\S +?\\)\\(?::\\([0-9]+\\)\\)?\\)['(]" nil nil (2 compilation-info-face) (3 compilation-line-face nil t) (1 (compilation-error-properties 2 3 nil nil nil 0 nil) From 30edba6e09fcc1d64b46e79a3d49a053b92852ae Mon Sep 17 00:00:00 2001 From: Daniel Pfeiffer Date: Fri, 3 Jun 2005 08:47:25 +0000 Subject: [PATCH 224/294] (makefile-targets-face, makefile-shell-face, makefile-makepp-perl-face): Add :version. (makefile-bsdmake-dependency-regex, makefile-makepp-rule-action-regex, makefile-bsdmake-rule-action-regex): New constants. (makefile-makepp-mode, makefile-bsdmake-mode): Use them. --- lisp/ChangeLog | 22 +++++++++++++++++----- lisp/progmodes/make-mode.el | 35 +++++++++++++++++++++++++---------- 2 files changed, 42 insertions(+), 15 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index df9f3993878..338d6896c1e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,16 +1,28 @@ +2005-06-03 Daniel Pfeiffer + + * progmodes/make-mode.el (makefile-targets-face) + (makefile-shell-face, makefile-makepp-perl-face): Add :version. + (makefile-bsdmake-dependency-regex) + (makefile-makepp-rule-action-regex) + (makefile-bsdmake-rule-action-regex): New constants. + (makefile-makepp-mode, makefile-bsdmake-mode): Use them. + + * progmodes/compile.el (compilation-error-regexp-alist-alist): + Allow (...) within `...' for makepp messages. + 2005-06-03 Michael Kifer - + * ediff-diff.el (ediff-same-contents) Eliminate CL-type functions. - + * ediff-mult.el (ediff-intersect-directories) Make sure that ".." and "." files are deleted from all file lists before comparison - + * viper-keym.el (viper-toggle-key,viper-quoted-insert-key,viper-ESC-key): Made them customizable. - + * viper.el (viper-non-hook-settings): fixed the names of defadvices. - + 2005-06-01 Luc Teirlinck * autorevert.el (auto-revert-buffers): Use save-match-data. diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el index 055cdf7fc7d..7356583fb90 100644 --- a/lisp/progmodes/make-mode.el +++ b/lisp/progmodes/make-mode.el @@ -111,7 +111,8 @@ '((t (:underline t))) "Face to use for additionally highlighting rule targets in Font-Lock mode." :group 'faces - :group 'makefile) + :group 'makefile + :version "22.1") (defface makefile-shell-face '((((class color) (background light)) (:background "seashell1")) @@ -119,7 +120,8 @@ (t (:reverse-video t))) "Face to use for additionally highlighting Shell commands in Font-Lock mode." :group 'faces - :group 'makefile) + :group 'makefile + :version "22.1") (defface makefile-makepp-perl-face '((((class color) (background light)) (:background "LightBlue1")) ; Camel Book @@ -127,7 +129,8 @@ (t (:reverse-video t))) "Face to use for additionally highlighting Perl code in Font-Lock mode." :group 'faces - :group 'makefile) + :group 'makefile + :version "22.1") (defcustom makefile-browser-buffer-name "*Macros and Targets*" "*Name of the macro- and target browser buffer." @@ -262,6 +265,11 @@ not be enclosed in { } or ( )." "^ *\\(\\(?: *\\$\\(?:[({]\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[^({]\\|.[^\n$#})]+?[})]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\| *[^ \n$#:=]+\\)+?\\)[ \t]*\\(:\\)\\(?:[ \t]*$\\|[^=\n]\\(?:[^#\n]*?;[ \t]*\\(.+\\)\\)?\\)" "Regex used to find dependency lines in a makefile.") +(defconst makefile-bsdmake-dependency-regex + (progn (string-match (regexp-quote "\\(:\\)") makefile-dependency-regex) + (replace-match "\\([:!]\\)" t t makefile-dependency-regex)) + "Regex used to find dependency lines in a BSD makefile.") + (defvar makefile-dependency-skip "^:" "Characters to skip to find a line that might be a dependency.") @@ -269,6 +277,16 @@ not be enclosed in { } or ( )." "^\t[ \t]*\\([-@]*\\)[ \t]*\\(\\(?:.*\\\\\n\\)*.*\\)" "Regex used to highlight rule action lines in font lock mode.") +(defconst makefile-makepp-rule-action-regex + ;; Don't care about initial tab, but I don't know how to font-lock correctly without. + "^\t[ \t]*\\(\\(?:\\(?:noecho\\|ignore[-_]error\\|[-@]+\\)[ \t]*\\)*\\)\\(\\(&\\S +\\)?\\(?:.*\\\\\n\\)*.*\\)" + "Regex used to highlight makepp rule action lines in font lock mode.") + +(defconst makefile-bsdmake-rule-action-regex + (progn (string-match "-@" makefile-rule-action-regex) + (replace-match "-+@" t t makefile-rule-action-regex)) + "Regex used to highlight BSD rule action lines in font lock mode.") + ;; Note that the first and second subexpression is used by font lock. Note ;; that if you change this regexp you might have to fix the imenu index in ;; makefile-imenu-generic-expression. @@ -849,10 +867,8 @@ Makefile mode can be configured by modifying the following variables: ;;;###autoload (define-derived-mode makefile-makepp-mode makefile-mode "Makeppfile" "An adapted `makefile-mode' that knows about makepp." - (set (make-local-variable 'makefile-rule-action-regex) - ;; Don't care about initial tab, but I don't know how to font-lock correctly without. - "^\t[ \t]*\\(\\(?:\\(?:noecho\\|ignore[-_]error\\|[-@]+\\)[ \t]*\\)*\\)\\(\\(&\\S +\\)?\\(?:.*\\\\\n\\)*.*\\)") - + (set (make-local-variable 'makefile-rule-action-regex) + makefile-makepp-rule-action-regex) (setq font-lock-defaults `(makefile-makepp-font-lock-keywords ,@(cdr font-lock-defaults)) imenu-generic-expression @@ -863,11 +879,10 @@ Makefile mode can be configured by modifying the following variables: (define-derived-mode makefile-bsdmake-mode makefile-mode "BSDmakefile" "An adapted `makefile-mode' that knows about BSD make." (set (make-local-variable 'makefile-dependency-regex) - ;; Identical to default, except allows `!' instead of `:'. - "^ *\\(\\(?: *\\$\\(?:[({]\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[^({]\\|.[^\n$#})]+?[})]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\| *[^ \n$#:=]+\\)+?\\)[ \t]*\\([:!]\\)\\(?:[ \t]*$\\|[^=\n]\\(?:[^#\n]*?;[ \t]*\\(.+\\)\\)?\\)") + makefile-bsdmake-dependency-regex) (set (make-local-variable 'makefile-dependency-skip) "^:!") (set (make-local-variable 'makefile-rule-action-regex) - "^\t[ \t]*\\([-+@]*\\)[ \t]*\\(\\(?:.*\\\\\n\\)*.*\\)") + makefile-bsdmake-rule-action-regex) (setq font-lock-defaults `(makefile-bsdmake-font-lock-keywords ,@(cdr font-lock-defaults)))) From 85268d70f3ccd233c49d8ac14224616fe7fb2038 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 3 Jun 2005 09:04:04 +0000 Subject: [PATCH 225/294] *** empty log message *** --- lisp/ChangeLog | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 338d6896c1e..4da9ec38fdc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -12,16 +12,15 @@ 2005-06-03 Michael Kifer - * ediff-diff.el (ediff-same-contents) Eliminate CL-type functions. + * ediff-diff.el (ediff-same-contents): Eliminate CL-type functions. - * ediff-mult.el (ediff-intersect-directories) Make sure that ".." and - "." files are deleted from all file lists before comparison + * ediff-mult.el (ediff-intersect-directories): Make sure that ".." and + "." files are deleted from all file lists before comparison. - * viper-keym.el - (viper-toggle-key,viper-quoted-insert-key,viper-ESC-key): - Made them customizable. + * viper-keym.el (viper-toggle-key, viper-quoted-insert-key) + (viper-ESC-key): Made them customizable. - * viper.el (viper-non-hook-settings): fixed the names of defadvices. + * viper.el (viper-non-hook-settings): Fixed the names of defadvices. 2005-06-01 Luc Teirlinck From a09be93a894d713ade1c114c4d380c317992295e Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 3 Jun 2005 10:38:05 +0000 Subject: [PATCH 226/294] (face-equal): Improve argument/docstring consistency. --- lisp/faces.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/faces.el b/lisp/faces.el index ccf427e6f12..b821d66f72e 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -231,8 +231,8 @@ of a face name is the same for all frames." (defun face-equal (face1 face2 &optional frame) "Non-nil if faces FACE1 and FACE2 are equal. Faces are considered equal if all their attributes are equal. -If the optional argument FRAME is given, report on face FACE in that frame. -If FRAME is t, report on the defaults for face FACE (for new frames). +If the optional argument FRAME is given, report on FACE1 and FACE2 in that frame. +If FRAME is t, report on the defaults for FACE1 and FACE2 (for new frames). If FRAME is omitted or nil, use the selected frame." (internal-lisp-face-equal-p face1 face2 frame)) From 03f1132278dce5f86456f58418f608d6d0aa6e14 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 3 Jun 2005 10:39:29 +0000 Subject: [PATCH 227/294] (Finternal_lisp_face_equal_p): Really report on faces in a frame, if the argument FRAME is non-nil. Improve argument/docstring consistency. --- src/xfaces.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/xfaces.c b/src/xfaces.c index 21bdb88c860..606a854980a 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -5022,8 +5022,8 @@ lface_equal_p (v1, v2) DEFUN ("internal-lisp-face-equal-p", Finternal_lisp_face_equal_p, Sinternal_lisp_face_equal_p, 2, 3, 0, doc: /* True if FACE1 and FACE2 are equal. -If the optional argument FRAME is given, report on face FACE in that frame. -If FRAME is t, report on the defaults for face FACE (for new frames). +If the optional argument FRAME is given, report on FACE1 and FACE2 in that frame. +If FRAME is t, report on the defaults for FACE1 and FACE2 (for new frames). If FRAME is omitted or nil, use the selected frame. */) (face1, face2, frame) Lisp_Object face1, face2, frame; @@ -5041,8 +5041,8 @@ If FRAME is omitted or nil, use the selected frame. */) Emacs. That frame is not an X frame. */ f = frame_or_selected_frame (frame, 2); - lface1 = lface_from_face_name (NULL, face1, 1); - lface2 = lface_from_face_name (NULL, face2, 1); + lface1 = lface_from_face_name (f, face1, 1); + lface2 = lface_from_face_name (f, face2, 1); equal_p = lface_equal_p (XVECTOR (lface1)->contents, XVECTOR (lface2)->contents); return equal_p ? Qt : Qnil; From 6312e5f78c6904267e0bebff5b8e9b4138e1491b Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 3 Jun 2005 10:40:12 +0000 Subject: [PATCH 228/294] *** empty log message *** --- lisp/ChangeLog | 4 ++++ src/ChangeLog | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4da9ec38fdc..d5203229a93 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2005-06-03 Juanma Barranquero + + * faces.el (face-equal): Improve argument/docstring consistency. + 2005-06-03 Daniel Pfeiffer * progmodes/make-mode.el (makefile-targets-face) diff --git a/src/ChangeLog b/src/ChangeLog index dbcac952b51..1982a76162e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2005-06-03 Juanma Barranquero + + * xfaces.c (Finternal_lisp_face_equal_p): Really report + on faces in a frame, if the argument FRAME is non-nil. + Improve argument/docstring consistency. + 2005-06-02 Kim F. Storm * xdisp.c (MODE_LINE_NOPROP_LEN): New macro. From 76668788b504bdfce0521492a4da5d3cd4de2eeb Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Fri, 3 Jun 2005 11:23:08 +0000 Subject: [PATCH 229/294] *** empty log message *** --- lisp/ChangeLog | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d5203229a93..b098adbf548 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2005-06-03 Matt Hodges + + * tmm.el (tmm-inactive-face): New face. + (tmm-remove-inactive-mouse-face): New function. + (tmm-prompt, tmm-add-one-shortcut) + (tmm-add-prompt, tmm-get-keymap): Make active menu items visible + but not selectable. + 2005-06-03 Juanma Barranquero * faces.el (face-equal): Improve argument/docstring consistency. @@ -26,6 +34,7 @@ * viper.el (viper-non-hook-settings): Fixed the names of defadvices. +>>>>>>> 1.7661 2005-06-01 Luc Teirlinck * autorevert.el (auto-revert-buffers): Use save-match-data. From 04a5d30f456ea68f17c8fb593e85ef74c9893a81 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Fri, 3 Jun 2005 11:24:06 +0000 Subject: [PATCH 230/294] (tmm-inactive-face): New face. (tmm-remove-inactive-mouse-face): New function. (tmm-prompt, tmm-add-one-shortcut) (tmm-add-prompt, tmm-get-keymap): Make active menu items visible but not selectable. --- lisp/tmm.el | 110 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 73 insertions(+), 37 deletions(-) diff --git a/lisp/tmm.el b/lisp/tmm.el index 168dbdd14dc..51e04941730 100644 --- a/lisp/tmm.el +++ b/lisp/tmm.el @@ -133,6 +133,12 @@ specify nil for this variable." :type '(choice integer (const nil)) :group 'tmm) +(require 'font-lock) +(defface tmm-inactive-face + '((t :inherit font-lock-comment-face)) + "Face used for inactive menu items." + :group 'tmm) + ;;;###autoload (defun tmm-prompt (menu &optional in-popup default-item) "Text-mode emulation of calling the bindings in keymap. @@ -193,7 +199,14 @@ Its value should be an event that has a binding in MENU." (eq (car-safe (cdr (car tail))) 'menu-item))) (setq index-of-default (1+ index-of-default))) (setq tail (cdr tail))))) - (setq history (reverse (mapcar 'car tmm-km-list))) + (let ((prompt (concat "^." (regexp-quote tmm-mid-prompt)))) + (setq history + (reverse (delq nil + (mapcar + (lambda (elt) + (if (string-match prompt (car elt)) + (car elt))) + tmm-km-list))))) (setq history-len (length history)) (setq history (append history history history history)) (setq tmm-c-prompt (nth (- history-len 1 index-of-default) history)) @@ -259,37 +272,43 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'." (defsubst tmm-add-one-shortcut (elt) ;; uses the free vars tmm-next-shortcut-digit and tmm-short-cuts - (let* ((str (car elt)) - (paren (string-match "(" str)) - (pos 0) (word 0) char) - (catch 'done ; ??? is this slow? - (while (and (or (not tmm-shortcut-words) ; no limit on words - (< word tmm-shortcut-words)) ; try n words - (setq pos (string-match "\\w+" str pos)) ; get next word - (not (and paren (> pos paren)))) ; don't go past "(binding.." - (if (or (= pos 0) - (/= (aref str (1- pos)) ?.)) ; avoid file extensions - (let ((shortcut-style - (if (listp tmm-shortcut-style) ; convert to list - tmm-shortcut-style - (list tmm-shortcut-style)))) - (while shortcut-style ; try upcase and downcase variants - (setq char (funcall (car shortcut-style) (aref str pos))) - (if (not (memq char tmm-short-cuts)) (throw 'done char)) - (setq shortcut-style (cdr shortcut-style))))) - (setq word (1+ word)) - (setq pos (match-end 0))) - (while (<= tmm-next-shortcut-digit ?9) ; no letter shortcut, pick a digit - (setq char tmm-next-shortcut-digit) - (setq tmm-next-shortcut-digit (1+ tmm-next-shortcut-digit)) - (if (not (memq char tmm-short-cuts)) (throw 'done char))) - (setq char nil)) - (if char (setq tmm-short-cuts (cons char tmm-short-cuts))) - (cons (concat (if char (concat (char-to-string char) tmm-mid-prompt) - ;; keep them lined up in columns - (make-string (1+ (length tmm-mid-prompt)) ?\ )) - str) - (cdr elt)))) + (cond + ((eq (cddr elt) 'ignore) + (cons (concat " " (make-string (length tmm-mid-prompt) ?\-) + (car elt)) + (cdr elt))) + (t + (let* ((str (car elt)) + (paren (string-match "(" str)) + (pos 0) (word 0) char) + (catch 'done ; ??? is this slow? + (while (and (or (not tmm-shortcut-words) ; no limit on words + (< word tmm-shortcut-words)) ; try n words + (setq pos (string-match "\\w+" str pos)) ; get next word + (not (and paren (> pos paren)))) ; don't go past "(binding.." + (if (or (= pos 0) + (/= (aref str (1- pos)) ?.)) ; avoid file extensions + (let ((shortcut-style + (if (listp tmm-shortcut-style) ; convert to list + tmm-shortcut-style + (list tmm-shortcut-style)))) + (while shortcut-style ; try upcase and downcase variants + (setq char (funcall (car shortcut-style) (aref str pos))) + (if (not (memq char tmm-short-cuts)) (throw 'done char)) + (setq shortcut-style (cdr shortcut-style))))) + (setq word (1+ word)) + (setq pos (match-end 0))) + (while (<= tmm-next-shortcut-digit ?9) ; no letter shortcut, pick a digit + (setq char tmm-next-shortcut-digit) + (setq tmm-next-shortcut-digit (1+ tmm-next-shortcut-digit)) + (if (not (memq char tmm-short-cuts)) (throw 'done char))) + (setq char nil)) + (if char (setq tmm-short-cuts (cons char tmm-short-cuts))) + (cons (concat (if char (concat (char-to-string char) tmm-mid-prompt) + ;; keep them lined up in columns + (make-string (1+ (length tmm-mid-prompt)) ?\ )) + str) + (cdr elt)))))) ;; This returns the old map. (defun tmm-define-keys (minibuffer) @@ -319,9 +338,27 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'." (goto-char 1) (delete-region 1 (search-forward "Possible completions are:\n"))) +(defun tmm-remove-inactive-mouse-face () + "Remove the mouse-face property from inactive menu items." + (let ((inhibit-read-only t) + (inactive-string + (concat " " (make-string (length tmm-mid-prompt) ?\-))) + next) + (save-excursion + (goto-char (point-min)) + (while (not (eobp)) + (setq next (next-single-char-property-change (point) 'mouse-face)) + (when (looking-at inactive-string) + (remove-text-properties (point) next '(mouse-face)) + (add-text-properties (point) next '(face tmm-inactive-face))) + (goto-char next))) + (set-buffer-modified-p nil))) + (defun tmm-add-prompt () (remove-hook 'minibuffer-setup-hook 'tmm-add-prompt) (add-hook 'minibuffer-exit-hook 'tmm-delete-map nil t) + (unless tmm-c-prompt + (error "No active menu entries")) (let ((win (selected-window))) (setq tmm-old-mb-map (tmm-define-keys t)) ;; Get window and hide it for electric mode to get correct size @@ -334,8 +371,9 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'." (with-output-to-temp-buffer "*Completions*" (display-completion-list completions)) (remove-hook 'completion-setup-hook 'tmm-completion-delete-prompt)) + (set-buffer "*Completions*") + (tmm-remove-inactive-mouse-face) (when tmm-completion-prompt - (set-buffer "*Completions*") (let ((buffer-read-only nil)) (goto-char (point-min)) (insert tmm-completion-prompt)))) @@ -345,7 +383,6 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'." (Electric-pop-up-window "*Completions*") (with-current-buffer "*Completions*" (setq tmm-old-comp-map (tmm-define-keys nil)))) - (insert tmm-c-prompt))) (defun tmm-delete-map () @@ -438,7 +475,7 @@ It uses the free variable `tmm-table-undef' to keep undefined keys." (setq km (and (eval visible) km))) (setq enable (plist-get plist :enable)) (if enable - (setq km (and (eval enable) km))) + (setq km (if (eval enable) km 'ignore))) (and str (consp (nth 3 elt)) (stringp (cdr (nth 3 elt))) ; keyseq cache @@ -467,8 +504,7 @@ It uses the free variable `tmm-table-undef' to keep undefined keys." ;; Verify that the command is enabled; ;; if not, don't mention it. (when (and km (symbolp km) (get km 'menu-enable)) - (unless (eval (get km 'menu-enable)) - (setq km nil))) + (setq km (if (eval (get km 'menu-enable)) km 'ignore))) (and km str (or (assoc str tmm-km-list) (push (cons str (cons event km)) tmm-km-list)))))) From 774a1a1a82a8e8004ffa4b4d2e477432f8df8476 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 3 Jun 2005 14:18:31 +0000 Subject: [PATCH 231/294] Remove conflict marker. --- lisp/ChangeLog | 1 - 1 file changed, 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b098adbf548..bbb091c5cc7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -34,7 +34,6 @@ * viper.el (viper-non-hook-settings): Fixed the names of defadvices. ->>>>>>> 1.7661 2005-06-01 Luc Teirlinck * autorevert.el (auto-revert-buffers): Use save-match-data. From 14cb9d7b6a02943cb2ef6b904adb021a1b9578a3 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 3 Jun 2005 14:37:04 +0000 Subject: [PATCH 232/294] (latexenc-find-file-coding-system): Don't inherit the EOL part of the coding-system from the tex-main buffer. Fit within 80 columns. --- lisp/international/latexenc.el | 61 ++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 29 deletions(-) diff --git a/lisp/international/latexenc.el b/lisp/international/latexenc.el index 88da8ffed79..24f7ebc6000 100644 --- a/lisp/international/latexenc.el +++ b/lisp/international/latexenc.el @@ -130,46 +130,49 @@ coding system names is determined from `latex-inputenc-coding-alist'." (throw 'cs t) (goto-char (match-end 0)))))) (let* ((match (match-string 1)) - (sym (intern match))) - (when (latexenc-inputenc-to-coding-system match) - (setq sym (latexenc-inputenc-to-coding-system match))) - (when (coding-system-p sym) - sym - (if (and (require 'code-pages nil t) (coding-system-p sym)) - sym - 'undecided))) + (sym (or (latexenc-inputenc-to-coding-system match) + (intern match)))) + (cond + ((coding-system-p sym) sym) + ((and (require 'code-pages nil t) (coding-system-p sym)) sym) + (t 'undecided))) ;; else try to find it in the master/main file - (let (latexenc-main-file) - ;; is there a TeX-master or tex-main-file in the local variable section + (let ((default-directory (file-name-directory (nth 1 arg-list))) + latexenc-main-file) + ;; Is there a TeX-master or tex-main-file in the local variables + ;; section? (unless latexenc-dont-use-TeX-master-flag (goto-char (point-max)) - (search-backward "\n\^L" (max (- (point-max) 3000) (point-min)) 'move) + (search-backward "\n\^L" (max (- (point-max) 3000) (point-min)) + 'move) (search-forward "Local Variables:" nil t) - (when (re-search-forward "^%+ *\\(TeX-master\\|tex-main-file\\): *\"\\(.+\\)\"" nil t) - (let ((file (concat (file-name-directory (nth 1 arg-list)) (match-string 2)))) - (if (file-exists-p file) - (setq latexenc-main-file file) - (if (boundp 'TeX-default-extension) - (when (file-exists-p (concat file "." TeX-default-extension)) - (setq latexenc-main-file (concat file "." TeX-default-extension))) - (dolist (ext '("drv" "dtx" "ltx" "tex")) - (if (file-exists-p (concat file "." ext)) - (setq latexenc-main-file (concat file "." ext))))))))) + (when (re-search-forward + "^%+ *\\(TeX-master\\|tex-main-file\\): *\"\\(.+\\)\"" + nil t) + (let ((file (match-string 2))) + (dolist (ext `("" ,(if (boundp 'TeX-default-extension) + (concat "." TeX-default-extension) + "") + ".tex" ".ltx" ".dtx" ".drv")) + (if (and (null latexenc-main-file) ;Stop at first. + (file-exists-p (concat file ext))) + (setq latexenc-main-file (concat file ext))))))) ;; try tex-modes tex-guess-main-file (when (and (not latexenc-dont-use-tex-guess-main-file-flag) - (not latexenc-main-file)) - (when (fboundp 'tex-guess-main-file) - (let ((tex-start-of-header "\\\\document\\(style\\|class\\)") - (default-directory (file-name-directory (nth 1 arg-list)))) - (setq latexenc-main-file (tex-guess-main-file))))) + (not latexenc-main-file) + (fboundp 'tex-guess-main-file)) + (let ((tex-start-of-header "\\\\document\\(style\\|class\\)")) + (setq latexenc-main-file (tex-guess-main-file)))) ;; if we found a master/main file get the coding system from it (if (and latexenc-main-file (file-readable-p latexenc-main-file)) (let* ((latexenc-dont-use-tex-guess-main-file-flag t) (latexenc-dont-use-TeX-master-flag t) - (latexenc-main-buffer (find-file-noselect latexenc-main-file t))) - (or (buffer-local-value 'coding-system-for-write latexenc-main-buffer) - (buffer-local-value 'buffer-file-coding-system latexenc-main-buffer))) + (latexenc-main-buffer + (find-file-noselect latexenc-main-file t))) + (coding-system-base ;Disregard the EOL part of the CS. + (with-current-buffer latexenc-main-buffer + (or coding-system-for-write buffer-file-coding-system)))) 'undecided)))) 'undecided)) From 10b234c0f545ddfaebf85fd613267d946f68fb94 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 3 Jun 2005 14:58:02 +0000 Subject: [PATCH 233/294] *** empty log message *** --- lisp/ChangeLog | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bbb091c5cc7..5ba4f212472 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2005-06-03 Stefan Monnier + + * international/latexenc.el (latexenc-find-file-coding-system): + Don't inherit the EOL part of the coding-system from the + tex-main buffer. Fit within 80 columns. + 2005-06-03 Matt Hodges * tmm.el (tmm-inactive-face): New face. @@ -32,7 +38,7 @@ * viper-keym.el (viper-toggle-key, viper-quoted-insert-key) (viper-ESC-key): Made them customizable. - * viper.el (viper-non-hook-settings): Fixed the names of defadvices. + * viper.el (viper-non-hook-settings): Fix the names of defadvices. 2005-06-01 Luc Teirlinck From fab31ec395c7988f08c3a83303832b708a88077b Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 3 Jun 2005 15:03:02 +0000 Subject: [PATCH 234/294] (flyspell-check-word-p): Simplify silly compatibility code. --- lisp/ChangeLog | 3 +++ lisp/textmodes/flyspell.el | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5ba4f212472..fb5212c7fdb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2005-06-03 Stefan Monnier + * textmodes/flyspell.el (flyspell-check-word-p): Simplify silly + compatibility code. + * international/latexenc.el (latexenc-find-file-coding-system): Don't inherit the EOL part of the coding-system from the tex-main buffer. Fit within 80 columns. diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 0b65993df3c..500c9c4e113 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -830,9 +830,7 @@ Mostly we check word delimiters." ((get this-command 'flyspell-delayed) ;; the current command is not delayed, that ;; is that we must check the word now - (if (fboundp 'about-xemacs) - (sit-for flyspell-delay nil) - (sit-for flyspell-delay 0 nil))) + (sit-for flyspell-delay)) (t t))) (t t))) From 95f75c759fdf6b43e3c760f6d27fa95377db85d8 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 3 Jun 2005 22:03:47 +0000 Subject: [PATCH 235/294] (gnus-emphasis-alist): Disable the strikethru thingy. --- lisp/gnus/ChangeLog | 27 +++++++++++++++------------ lisp/gnus/gnus-art.el | 8 ++++++-- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 83b5e3820e6..36d17afab2d 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,10 +1,14 @@ +2005-06-03 Stefan Monnier + + * gnus-art.el (gnus-emphasis-alist): Disable the strikethru thingy. + 2005-06-02 Katsumi Yamaoka * pop3.el (pop3-md5): Run md5 in the binary mode. (pop3-md5-program-args): New variable. - * starttls.el (starttls-set-process-query-on-exit-flag): Use - eval-and-compile. + * starttls.el (starttls-set-process-query-on-exit-flag): + Use eval-and-compile. 2005-05-31 Katsumi Yamaoka @@ -29,8 +33,8 @@ * mml2015.el: Bind pgg-default-user-id when compiling. - * nndraft.el (nndraft-request-associate-buffer): Use - write-contents-functions instead of write-contents-hooks if it is + * nndraft.el (nndraft-request-associate-buffer): + Use write-contents-functions instead of write-contents-hooks if it is available. * nnheader.el (nnheader-find-file-noselect): Bind find-file-hook @@ -195,7 +199,7 @@ (gnus-summary-high-unread-face): Ditto. (gnus-summary-low-unread-face): Ditto. (gnus-summary-normal-unread-face): Ditto. - (gnus-summary-high-read-face, gnus-summary-low-read-face): Diito + (gnus-summary-high-read-face, gnus-summary-low-read-face): Ditto. (gnus-summary-normal-read-face, gnus-splash-face): Ditto. * message.el (message-minibuffer-local-map): Add :group. @@ -205,7 +209,7 @@ (sieve-manage-server-eol, sieve-manage-client-eol): Ditto. (sieve-manage-streams, sieve-manage-stream-alist): Ditto. (sieve-manage-authenticators): Ditto. - (sieve-manage-authenticator-alist): Ditto + (sieve-manage-authenticator-alist): Ditto. (sieve-manage-default-port): Ditto. * sieve-mode.el (sieve-control-commands-face): Add :group. @@ -438,11 +442,11 @@ * nnimap.el (nnimap-date-days-ago): Ditto. - * gnus-demon.el (parse-time-string): Added autoload. + * gnus-demon.el (parse-time-string): Add autoload. - * gnus-delay.el (parse-time-string): Added autoload. + * gnus-delay.el (parse-time-string): Add autoload. - * gnus-art.el (parse-time-string): Added autoload. + * gnus-art.el (parse-time-string): Add autoload. * nnultimate.el (parse-time): Require for `parse-time-string'. @@ -496,14 +500,13 @@ (rfc2047-encoded-word-regexp): Don't use shy group. (rfc2047-decode-region): Follow rfc2047-encoded-word-regexp change. (rfc2047-parse-and-decode): Ditto. - (rfc2047-decode): Treat the ascii coding-system as raw-text by - default. + (rfc2047-decode): Treat the ascii coding-system as raw-text by default. 2005-03-25 Lars Magne Ingebrigtsen * rfc2047.el (rfc2047-encode-encoded-words): New variable. (rfc2047-field-value): Strip props. - (rfc2047-encode-message-header): Disabled header folding -- not + (rfc2047-encode-message-header): Disable header folding -- not all headers can be folded, and this should be done by the message composition mode. Probably. I think. (rfc2047-encodable-p): Say that =? needs encoding. diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 4af363c6b2e..7bc2e938071 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -367,8 +367,12 @@ advertisements. For example: (or (nth 4 spec) 3) (intern (format "gnus-emphasis-%s" (nth 2 spec))))) types)) - '(("\\(\\s-\\|^\\)\\(-\\(\\(\\w\\|-[^-]\\)+\\)-\\)\\(\\s-\\|[?!.,;]\\)" - 2 3 gnus-emphasis-strikethru) + '(;; I've never seen anyone use this strikethru convention whereas I've + ;; several times seen it triggered by normal text. --Stef + ;; Miles suggests that this form is sometimes used but for italics, + ;; so maybe we should map it to `italic'. + ;; ("\\(\\s-\\|^\\)\\(-\\(\\(\\w\\|-[^-]\\)+\\)-\\)\\(\\s-\\|[?!.,;]\\)" + ;; 2 3 gnus-emphasis-strikethru) ("\\(\\s-\\|^\\)\\(_\\(\\(\\w\\|_[^_]\\)+\\)_\\)\\(\\s-\\|[?!.,;]\\)" 2 3 gnus-emphasis-underline)))) "*Alist that says how to fontify certain phrases. From 24aad44185871b6e1cd36265b10639bed9b97f1a Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 3 Jun 2005 23:02:03 +0000 Subject: [PATCH 236/294] (handle_one_xevent): Also ignore mouse motion just before a button release event. --- src/xterm.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index 4f9081425f3..8612d53fbee 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -6776,12 +6776,6 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) { dpyinfo->grabbed |= (1 << event.xbutton.button); last_mouse_frame = f; - /* Ignore any mouse motion that happened - before this event; any subsequent mouse-movement - Emacs events should reflect only motion after - the ButtonPress. */ - if (f != 0) - f->mouse_moved = 0; if (!tool_bar_p) last_tool_bar_item = -1; @@ -6789,6 +6783,12 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) else dpyinfo->grabbed &= ~(1 << event.xbutton.button); + /* Ignore any mouse motion that happened before this event; + any subsequent mouse-movement Emacs events should reflect + only motion after the ButtonPress/Release. */ + if (f != 0) + f->mouse_moved = 0; + #if defined (USE_X_TOOLKIT) || defined (USE_GTK) f = x_menubar_window_to_frame (dpyinfo, event.xbutton.window); /* For a down-event in the menu bar, From 5a073f50755944ae51a08f670d8acf192d69e036 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 3 Jun 2005 23:02:21 +0000 Subject: [PATCH 237/294] (unbind_to): Preserve value of Vquit_flag. --- src/eval.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/eval.c b/src/eval.c index 8bb201c5df5..0eb1482ee0b 100644 --- a/src/eval.c +++ b/src/eval.c @@ -3130,10 +3130,10 @@ unbind_to (count, value) int count; Lisp_Object value; { - int quitf = !NILP (Vquit_flag); - struct gcpro gcpro1; + Lisp_Object quitf = Vquit_flag; + struct gcpro gcpro1, gcpro2; - GCPRO1 (value); + GCPRO2 (value, quitf); Vquit_flag = Qnil; while (specpdl_ptr != specpdl + count) @@ -3182,8 +3182,8 @@ unbind_to (count, value) } } - if (NILP (Vquit_flag) && quitf) - Vquit_flag = Qt; + if (NILP (Vquit_flag) && !NILP (quitf)) + Vquit_flag = quitf; UNGCPRO; return value; From 731475e79a78cb7f0eb8a25c22a17513fea02738 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 3 Jun 2005 23:02:30 +0000 Subject: [PATCH 238/294] (BYTE_CODE_QUIT): Check Vthrow_on_input. --- src/bytecode.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bytecode.c b/src/bytecode.c index e8d006e67d1..6b05a3270d2 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -384,8 +384,11 @@ unmark_byte_stack () do { \ if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \ { \ + Lisp_Object flag = Vquit_flag; \ Vquit_flag = Qnil; \ BEFORE_POTENTIAL_GC (); \ + if (EQ (Vthrow_on_input, flag)) \ + Fthrow (Vthrow_on_input, Qnil); \ Fsignal (Qquit, Qnil); \ AFTER_POTENTIAL_GC (); \ } \ From 4da256b12405664071edb7183de9e94cce8ec210 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 3 Jun 2005 23:02:40 +0000 Subject: [PATCH 239/294] (Fcall_process): Don't use alloca to gradually increase size of buf, as it effectively uses twice the necessary space on the stack. Instead, pre-allocate buf of full size, and gradually increase the read size. --- src/callproc.c | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/src/callproc.c b/src/callproc.c index 6027ccdda9f..fe198b0770a 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -218,9 +218,10 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) int fd[2]; int filefd; register int pid; - char buf[16384]; - char *bufptr = buf; - int bufsize = sizeof buf; +#define CALLPROC_BUFFER_SIZE_MIN (16 * 1024) +#define CALLPROC_BUFFER_SIZE_MAX (4 * CALLPROC_BUFFER_SIZE_MIN) + char buf[CALLPROC_BUFFER_SIZE_MAX]; + int bufsize = CALLPROC_BUFFER_SIZE_MIN; int count = SPECPDL_INDEX (); register const unsigned char **new_argv @@ -765,7 +766,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) nread = carryover; while (nread < bufsize - 1024) { - int this_read = emacs_read (fd[0], bufptr + nread, + int this_read = emacs_read (fd[0], buf + nread, bufsize - nread); if (this_read < 0) @@ -790,7 +791,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) if (!NILP (buffer)) { if (! CODING_MAY_REQUIRE_DECODING (&process_coding)) - insert_1_both (bufptr, nread, nread, 0, 1, 0); + insert_1_both (buf, nread, nread, 0, 1, 0); else { /* We have to decode the input. */ int size; @@ -807,7 +808,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) requires text-encoding detection. */ if (process_coding.type == coding_type_undecided) { - detect_coding (&process_coding, bufptr, nread); + detect_coding (&process_coding, buf, nread); if (process_coding.composing != COMPOSITION_DISABLED) /* We have not yet allocated the composition data because the coding type was undecided. */ @@ -816,7 +817,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) if (process_coding.cmp_data) process_coding.cmp_data->char_offset = PT; - decode_coding (&process_coding, bufptr, decoding_buf, + decode_coding (&process_coding, buf, decoding_buf, nread, size); if (display_on_the_fly @@ -905,7 +906,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) if (carryover > 0) /* As CARRYOVER should not be that large, we had better avoid overhead of bcopy. */ - BCOPY_SHORT (bufptr + process_coding.consumed, bufptr, + BCOPY_SHORT (buf + process_coding.consumed, buf, carryover); if (process_coding.result == CODING_FINISH_INSUFFICIENT_CMP) { @@ -922,17 +923,13 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) if (process_coding.mode & CODING_MODE_LAST_BLOCK) break; +#if (CALLPROC_BUFFER_SIZE_MIN != CALLPROC_BUFFER_SIZE_MAX) /* Make the buffer bigger as we continue to read more data, - but not past 64k. */ - if (bufsize < 64 * 1024 && total_read > 32 * bufsize) - { - char *tempptr; - bufsize *= 2; - - tempptr = (char *) alloca (bufsize); - bcopy (bufptr, tempptr, bufsize / 2); - bufptr = tempptr; - } + but not past CALLPROC_BUFFER_SIZE_MAX. */ + if (bufsize < CALLPROC_BUFFER_SIZE_MAX && total_read > 32 * bufsize) + if ((bufsize *= 2) > CALLPROC_BUFFER_SIZE_MAX) + bufsize = CALLPROC_BUFFER_SIZE_MAX; +#endif if (display_p) { From c3912f23e3becd31ba3d7d86cbeac00f88046fee Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 3 Jun 2005 23:02:50 +0000 Subject: [PATCH 240/294] (decode_coding_string): Handle CODING_FINISH_INTERRUPT. --- src/coding.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/coding.c b/src/coding.c index a0e22184d3c..a7a78bbe2c0 100644 --- a/src/coding.c +++ b/src/coding.c @@ -6260,6 +6260,7 @@ decode_coding_string (str, coding, nocopy) produced += coding->produced; produced_char += coding->produced_char; if (result == CODING_FINISH_NORMAL + || result == CODING_FINISH_INTERRUPT || (result == CODING_FINISH_INSUFFICIENT_SRC && coding->consumed == 0)) break; From 61e40b6ddef45b4dbcaa9ae53c389b301f49eb3b Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 3 Jun 2005 23:21:17 +0000 Subject: [PATCH 241/294] *** empty log message *** --- lisp/ChangeLog | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fb5212c7fdb..af17cd24d4a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2005-06-04 Kim F. Storm + + * ido.el (ido-make-merged-file-list-1): New defun split from + ido-make-merged-file-list. + (ido-make-merged-file-list): Bind throw-on-input around call to + ido-make-merged-file-list-1. Return input-pending-p if + interrupted by more input available. + (ido-read-internal): Handle input-pending-p return value from + ido-make-merged-file-list. + 2005-06-03 Stefan Monnier * textmodes/flyspell.el (flyspell-check-word-p): Simplify silly From ec441ab58305939661aa9029b02a0a9efb933004 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 3 Jun 2005 23:21:58 +0000 Subject: [PATCH 242/294] (ido-make-merged-file-list-1): New defun split from ido-make-merged-file-list. (ido-make-merged-file-list): Bind throw-on-input around call to ido-make-merged-file-list-1. Return input-pending-p if interrupted by more input available. (ido-read-internal): Handle input-pending-p return value from ido-make-merged-file-list. --- lisp/ido.el | 179 ++++++++++++++++++++++++++++------------------------ 1 file changed, 98 insertions(+), 81 deletions(-) diff --git a/lisp/ido.el b/lisp/ido.el index 24b8ba34b75..b01e9e35c37 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -1646,6 +1646,7 @@ If INITIAL is non-nil, it specifies the initial input string." (l (ido-make-merged-file-list ido-text-init (eq ido-use-merged-list 'auto) (eq ido-try-merged-list 'wide)))) + (ido-trace "merged" l) (cond ((not l) (if (eq ido-try-merged-list 'wide) @@ -1665,6 +1666,9 @@ If INITIAL is non-nil, it specifies the initial input string." ido-use-merged-list nil))) ((eq l t) (setq ido-use-merged-list nil)) + ((eq l 'input-pending-p) + (setq ido-try-merged-list t + ido-use-merged-list nil)) (t (setq ido-pre-merge-state (list ido-text-init ido-current-directory olist oign omat)) @@ -2493,10 +2497,10 @@ If no buffer or file exactly matching the prompt exists, maybe create a new one. (file-directory-p dir) (or (not must-match) ;; TODO. check for nonreadable and too-big. - (ido-set-matches1 + (ido-set-matches-1 (if (eq ido-cur-item 'file) - (ido-make-file-list1 dir) - (ido-make-dir-list1 dir))))) + (ido-make-file-list-1 dir) + (ido-make-dir-list-1 dir))))) (setq j n) (setq dir nil))) (if dir @@ -2786,11 +2790,11 @@ for first matching file." (ido-directory-too-big nil)) (cond ((eq ido-cur-item 'file) - (ido-make-file-list1 ido-current-directory)) + (ido-make-file-list-1 ido-current-directory)) ((eq ido-cur-item 'dir) - (ido-make-dir-list1 ido-current-directory)) + (ido-make-dir-list-1 ido-current-directory)) ((eq ido-cur-item 'buffer) - (ido-make-buffer-list1)) + (ido-make-buffer-list-1)) ((eq ido-cur-item 'list) ido-choice-list) (t nil)))) @@ -2908,74 +2912,87 @@ for first matching file." (setq items (cdr items))) res)) + +(defun ido-make-merged-file-list-1 (text auto wide) + (let (res) + (if (and (ido-final-slash text) ido-dir-file-cache) + (if wide + (setq res (ido-wide-find-dirs-or-files + ido-current-directory (substring text 0 -1) ido-enable-prefix t)) + ;; Use list of cached directories + (let ((re (concat (regexp-quote (substring text 0 -1)) "[^/:]*/\\'")) + (dirs ido-dir-file-cache) + dir b d f) + (if nil ;; simple + (while dirs + (setq dir (car (car dirs)) + dirs (cdr dirs)) + (when (and (string-match re dir) + (not (ido-ignore-item-p dir ido-ignore-directories-merge)) + (file-directory-p dir)) + (setq b (substring dir 0 -1) + f (concat (file-name-nondirectory b) "/") + d (file-name-directory b) + res (cons (cons f d) res)))) + (while dirs + (setq dir (car dirs) + d (car dir) + dirs (cdr dirs)) + (when (not (ido-ignore-item-p d ido-ignore-directories-merge)) + (setq dir (cdr (cdr dir))) + (while dir + (setq f (car dir) + dir (cdr dir)) + (if (and (string-match re f) + (not (ido-ignore-item-p f ido-ignore-directories))) + (setq res (cons (cons f d) res))))) + (if (and auto (input-pending-p)) + (setq dirs nil + res t)))))) + (if wide + (setq res (ido-wide-find-dirs-or-files + ido-current-directory text ido-enable-prefix nil)) + (let ((ido-text text) + (dirs ido-work-directory-list) + (must-match (and text (> (length text) 0))) + dir fl) + (if (and auto (not (member ido-current-directory dirs))) + (setq dirs (cons ido-current-directory dirs))) + (while dirs + (setq dir (car dirs) + dirs (cdr dirs)) + (when (and dir (stringp dir) + (or ido-merge-ftp-work-directories + (not (ido-is-ftp-directory dir))) + (file-directory-p dir) + ;; TODO. check for nonreadable and too-big. + (setq fl (if (eq ido-cur-item 'file) + (ido-make-file-list-1 dir t) + (ido-make-dir-list-1 dir t)))) + (if must-match + (setq fl (ido-set-matches-1 fl))) + (if fl + (setq res (nconc fl res)))) + (if (and auto (input-pending-p)) + (setq dirs nil + res t)))))) + res)) + (defun ido-make-merged-file-list (text auto wide) (let (res) (message "Searching for `%s'...." text) (condition-case nil - (if (and (ido-final-slash text) ido-dir-file-cache) - (if wide - (setq res (ido-wide-find-dirs-or-files - ido-current-directory (substring text 0 -1) ido-enable-prefix t)) - ;; Use list of cached directories - (let ((re (concat (regexp-quote (substring text 0 -1)) "[^/:]*/\\'")) - (dirs ido-dir-file-cache) - dir b d f) - (if nil ;; simple - (while dirs - (setq dir (car (car dirs)) - dirs (cdr dirs)) - (when (and (string-match re dir) - (not (ido-ignore-item-p dir ido-ignore-directories-merge)) - (file-directory-p dir)) - (setq b (substring dir 0 -1) - f (concat (file-name-nondirectory b) "/") - d (file-name-directory b) - res (cons (cons f d) res)))) - (while dirs - (setq dir (car dirs) - d (car dir) - dirs (cdr dirs)) - (when (not (ido-ignore-item-p d ido-ignore-directories-merge)) - (setq dir (cdr (cdr dir))) - (while dir - (setq f (car dir) - dir (cdr dir)) - (if (and (string-match re f) - (not (ido-ignore-item-p f ido-ignore-directories))) - (setq res (cons (cons f d) res))))) - (if (and auto (input-pending-p)) - (setq dirs nil - res t)))))) - (if wide - (setq res (ido-wide-find-dirs-or-files - ido-current-directory text ido-enable-prefix nil)) - (let ((ido-text text) - (dirs ido-work-directory-list) - (must-match (and text (> (length text) 0))) - dir fl) - (if (and auto (not (member ido-current-directory dirs))) - (setq dirs (cons ido-current-directory dirs))) - (while dirs - (setq dir (car dirs) - dirs (cdr dirs)) - (when (and dir (stringp dir) - (or ido-merge-ftp-work-directories - (not (ido-is-ftp-directory dir))) - (file-directory-p dir) - ;; TODO. check for nonreadable and too-big. - (setq fl (if (eq ido-cur-item 'file) - (ido-make-file-list1 dir t) - (ido-make-dir-list1 dir t)))) - (if must-match - (setq fl (ido-set-matches1 fl))) - (if fl - (setq res (nconc fl res)))) - (if (and auto (input-pending-p)) - (setq dirs nil - res t)))))) - (quit (setq res t))) - (if (and res (not (eq res t))) - (setq res (ido-sort-merged-list res auto))) + (unless (catch 'input-pending-p + (let ((throw-on-input 'input-pending-p)) + (setq res (ido-make-merged-file-list-1 text auto wide)) + t)) + (setq res 'input-pending-p)) + (quit + (setq res t + ido-try-merged-list nil + ido-use-merged-list nil))) + (when (and res (listp res)) + (setq res (ido-sort-merged-list res auto))) (when (and (or ido-rotate-temp ido-rotate-file-list-default) (listp res) (> (length text) 0)) @@ -2986,7 +3003,7 @@ for first matching file." (message nil) res)) -(defun ido-make-buffer-list1 (&optional frame visible) +(defun ido-make-buffer-list-1 (&optional frame visible) ;; Return list of non-ignored buffer names (delq nil (mapcar @@ -3004,7 +3021,7 @@ for first matching file." ;; in this list. If DEFAULT is non-nil, and corresponds to an existing buffer, ;; it is put to the start of the list. (let* ((ido-current-buffers (ido-get-buffers-in-frames 'current)) - (ido-temp-list (ido-make-buffer-list1 (selected-frame) ido-current-buffers))) + (ido-temp-list (ido-make-buffer-list-1 (selected-frame) ido-current-buffers))) (if ido-temp-list (nconc ido-temp-list ido-current-buffers) (setq ido-temp-list ido-current-buffers)) @@ -3041,7 +3058,7 @@ for first matching file." (nconc ido-temp-list items) (setq ido-temp-list items))) -(defun ido-file-name-all-completions1 (dir) +(defun ido-file-name-all-completions-1 (dir) (cond ((ido-nonreadable-directory-p dir) '()) ;; do not check (ido-directory-too-big-p dir) here. @@ -3098,13 +3115,13 @@ for first matching file." (if (and ftp (file-readable-p dir)) (setq mtime (cons 'ftp (ido-time-stamp)))) (if mtime - (setq cached (cons dir (cons mtime (ido-file-name-all-completions1 dir))) + (setq cached (cons dir (cons mtime (ido-file-name-all-completions-1 dir))) ido-dir-file-cache (cons cached ido-dir-file-cache))) (if (> (length ido-dir-file-cache) ido-max-dir-file-cache) (setcdr (nthcdr (1- ido-max-dir-file-cache) ido-dir-file-cache) nil))) (and cached (cdr (cdr cached)))) - (ido-file-name-all-completions1 dir))) + (ido-file-name-all-completions-1 dir))) (defun ido-remove-cached-dir (dir) ;; Remove dir from ido-dir-file-cache @@ -3115,7 +3132,7 @@ for first matching file." (setq ido-dir-file-cache (delq cached ido-dir-file-cache)))))) -(defun ido-make-file-list1 (dir &optional merged) +(defun ido-make-file-list-1 (dir &optional merged) ;; Return list of non-ignored files in DIR ;; If MERGED is non-nil, each file is cons'ed with DIR (and (or (ido-is-tramp-root dir) (file-directory-p dir)) @@ -3132,7 +3149,7 @@ for first matching file." ;; The hook `ido-make-file-list-hook' is run after the list has been ;; created to allow the user to further modify the order of the file names ;; in this list. - (let ((ido-temp-list (ido-make-file-list1 ido-current-directory))) + (let ((ido-temp-list (ido-make-file-list-1 ido-current-directory))) (setq ido-temp-list (sort ido-temp-list (if ido-file-extensions-order #'ido-file-extension-lessp @@ -3168,7 +3185,7 @@ for first matching file." (run-hooks 'ido-make-file-list-hook) ido-temp-list)) -(defun ido-make-dir-list1 (dir &optional merged) +(defun ido-make-dir-list-1 (dir &optional merged) ;; Return list of non-ignored subdirs in DIR ;; If MERGED is non-nil, each subdir is cons'ed with DIR (and (or (ido-is-tramp-root dir) (file-directory-p dir)) @@ -3184,7 +3201,7 @@ for first matching file." ;; The hook `ido-make-dir-list-hook' is run after the list has been ;; created to allow the user to further modify the order of the ;; directory names in this list. - (let ((ido-temp-list (ido-make-dir-list1 ido-current-directory))) + (let ((ido-temp-list (ido-make-dir-list-1 ido-current-directory))) (setq ido-temp-list (sort ido-temp-list #'ido-file-lessp)) (ido-to-end ;; move . files to end (delq nil (mapcar @@ -3238,7 +3255,7 @@ for first matching file." ;;; FIND MATCHING ITEMS -(defun ido-set-matches1 (items &optional do-full) +(defun ido-set-matches-1 (items &optional do-full) ;; Return list of matches in items (let* ((case-fold-search ido-case-fold) (slash (and (not ido-enable-prefix) (ido-final-slash ido-text))) @@ -3296,7 +3313,7 @@ for first matching file." (defun ido-set-matches () ;; Set `ido-matches' to the list of items matching prompt (when ido-rescan - (setq ido-matches (ido-set-matches1 (reverse ido-cur-list) (not ido-rotate)) + (setq ido-matches (ido-set-matches-1 (reverse ido-cur-list) (not ido-rotate)) ido-rotate nil))) (defun ido-ignore-item-p (name re-list &optional ignore-ext) From 555228aa599a4132c51d7daae62377f1e1ae8921 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 3 Jun 2005 23:47:56 +0000 Subject: [PATCH 243/294] *** empty log message *** --- lisp/ChangeLog | 2 ++ src/ChangeLog | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index af17cd24d4a..eb2206642ef 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2005-06-04 Kim F. Storm + * simple.el (line-move): Only call sit-for when moving backwards. + * ido.el (ido-make-merged-file-list-1): New defun split from ido-make-merged-file-list. (ido-make-merged-file-list): Bind throw-on-input around call to diff --git a/src/ChangeLog b/src/ChangeLog index 1982a76162e..5f724fe8450 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,19 @@ +2005-06-04 Kim F. Storm + + * coding.c (decode_coding_string): Handle CODING_FINISH_INTERRUPT. + + * callproc.c (Fcall_process): Don't use alloca to gradually + increase size of buf, as it effectively uses twice the necessary + space on the stack. Instead, pre-allocate buf of full size, and + gradually increase the read size. + + * bytecode.c (BYTE_CODE_QUIT): Check Vthrow_on_input. + + * eval.c (unbind_to): Preserve value of Vquit_flag. + + * xterm.c (handle_one_xevent): Also ignore mouse motion just + before a button release event. + 2005-06-03 Juanma Barranquero * xfaces.c (Finternal_lisp_face_equal_p): Really report From 0fc367df131fab89a983198790c5437748d6f5cb Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 3 Jun 2005 23:48:21 +0000 Subject: [PATCH 244/294] (line-move): Only call sit-for when moving backwards. --- lisp/simple.el | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index b50707531d1..9a4ba9badcf 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3351,25 +3351,25 @@ Outline mode sets this." (let ((forward (> arg 0)) (part (nth 2 (pos-visible-in-window-p (point) nil t)))) (if (and (consp part) - (> (setq part (if forward (cdr part) (car part))) 0)) + (> (if forward (cdr part) (car part)) 0)) (set-window-vscroll nil (if forward (+ (window-vscroll nil t) - (min part + (min (cdr part) (* (frame-char-height) arg))) (max 0 (- (window-vscroll nil t) - (min part + (min (car part) (* (frame-char-height) (- arg)))))) t) (set-window-vscroll nil 0) (when (line-move-1 arg noerror to-end) - (sit-for 0) - (if (and (not forward) - (setq part (nth 2 (pos-visible-in-window-p - (line-beginning-position) nil t))) - (> (cdr part) 0)) - (set-window-vscroll nil (cdr part) t)) + (when (not forward) + (sit-for 0) + (if (and (setq part (nth 2 (pos-visible-in-window-p + (line-beginning-position) nil t))) + (> (cdr part) 0)) + (set-window-vscroll nil (cdr part) t))) t))) (line-move-1 arg noerror to-end))) From b89875707ce5b8e88097b7d4d365b480b17733a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Sat, 4 Jun 2005 08:06:57 +0000 Subject: [PATCH 245/294] * macmenu.c (cleanup_popup_menu): New function. (Fx_popup_menu): unwind protect cleanup_popup_menu in case mac_menu_show Quit:s. (mac_menu_show): Quit on cancel if not popped up on click (i.e. a dialog). --- src/ChangeLog | 8 ++++++++ src/macmenu.c | 16 ++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 5f724fe8450..36650215350 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2005-06-04 Jan Dj,Ad(Brv + + * macmenu.c (cleanup_popup_menu): New function. + (Fx_popup_menu): unwind protect cleanup_popup_menu in case + mac_menu_show Quit:s. + (mac_menu_show): Quit on cancel if not popped up on click (i.e. + a dialog). + 2005-06-04 Kim F. Storm * coding.c (decode_coding_string): Handle CODING_FINISH_INTERRUPT. diff --git a/src/macmenu.c b/src/macmenu.c index 54393bca594..e97a968d92d 100644 --- a/src/macmenu.c +++ b/src/macmenu.c @@ -602,6 +602,13 @@ list_of_items (pane) } } +static Lisp_Object +cleanup_popup_menu (arg) + Lisp_Object arg; +{ + discard_menu_items (); +} + DEFUN ("x-popup-menu", Fx_popup_menu, Sx_popup_menu, 2, 2, 0, doc: /* Pop up a deck-of-cards menu and return user's selection. POSITION is a position specification. This is either a mouse button @@ -647,6 +654,8 @@ cached information about equivalent key sequences. */) int keymaps = 0; int for_click = 0; struct gcpro gcpro1; + int specpdl_count = SPECPDL_INDEX (); + #ifdef HAVE_MENUS if (! NILP (position)) @@ -806,13 +815,13 @@ cached information about equivalent key sequences. */) #ifdef HAVE_MENUS /* Display them in a menu. */ + record_unwind_protect (cleanup_popup_menu, Qnil); BLOCK_INPUT; selection = mac_menu_show (f, xpos, ypos, for_click, keymaps, title, &error_name); UNBLOCK_INPUT; - - discard_menu_items (); + unbind_to (specpdl_count, Qnil); UNGCPRO; #endif /* HAVE_MENUS */ @@ -1931,6 +1940,9 @@ mac_menu_show (f, x, y, for_click, keymaps, title, error) } } } + else if (!for_click) + /* Make "Cancel" equivalent to C-g. */ + Fsignal (Qquit, Qnil); return Qnil; } From d4755e04910eac135f80e4b222146107e073553b Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Sat, 4 Jun 2005 09:49:25 +0000 Subject: [PATCH 246/294] (nnfolder-read-folder): Make sure that undo information is never recorded. --- lisp/gnus/ChangeLog | 5 +++++ lisp/gnus/nnfolder.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 36d17afab2d..492852eef68 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2005-06-04 Lute Kamstra + + * nnfolder.el (nnfolder-read-folder): Make sure that undo + information is never recorded. + 2005-06-03 Stefan Monnier * gnus-art.el (gnus-emphasis-alist): Disable the strikethru thingy. diff --git a/lisp/gnus/nnfolder.el b/lisp/gnus/nnfolder.el index 961f124a614..20cdb3da273 100644 --- a/lisp/gnus/nnfolder.el +++ b/lisp/gnus/nnfolder.el @@ -875,6 +875,7 @@ deleted. Point is left where the deleted region was." nnfolder-file-coding-system)) (nnheader-find-file-noselect file t))))) (mm-enable-multibyte) ;; Use multibyte buffer for future copying. + (buffer-disable-undo) (if (equal (cadr (assoc group nnfolder-scantime-alist)) (nth 5 (file-attributes file))) ;; This looks up-to-date, so we don't do any scanning. @@ -901,7 +902,6 @@ deleted. Point is left where the deleted region was." maxid start end newscantime novbuf articles newnum buffer-read-only) - (buffer-disable-undo) (setq maxid (cdr active)) (unless (or gnus-nov-is-evil nnfolder-nov-is-evil From 5cf98ab4b3a736ab2df3140f9bde2f66e8f241fb Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 4 Jun 2005 10:18:46 +0000 Subject: [PATCH 247/294] (After a Crash): Polish previous change. --- man/trouble.texi | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/man/trouble.texi b/man/trouble.texi index ff846821ff2..da14f25568f 100644 --- a/man/trouble.texi +++ b/man/trouble.texi @@ -351,7 +351,6 @@ visits the file but gets the text from the auto-save file. recover are present in Emacs buffers. You should then save them. Only this---saving them---updates the files themselves. - As a last resort, if you had buffers with content which were not associated with any files, or if the autosave was not recent enough to have recorded important changes, you can use the @@ -360,16 +359,16 @@ retrieve them from a core dump--provided that a core dump was saved, and that the Emacs executable was not stripped of its debugging symbols. - To use this script, run @code{gdb} with the file name of your -Emacs executable and the file name of the core dump, e.g. @samp{gdb + To use this script, run @code{gdb} with the file name of your Emacs +executable and the file name of the core dump, e.g. @samp{gdb /usr/bin/emacs core.emacs}. At the @code{(gdb)} prompt, load the recovery script: @samp{source /usr/src/emacs/etc/emacs-buffer.gdb}. -You can now use the commands @code{ybuffer-list} and -@code{ysave-buffer} to list and save buffers. The @code{ysave-buffer} -command takes a buffer number (as listed by @code{ybuffer-list}) and a -file name to which to write the buffer contents. You should use a -file name which does not already exist; no backups of the previous -contents of the file will be saved, if any. +Then type the command @code{ybuffer-list} to see which buffers are +available. For each buffer, it lists a buffer number. To save a +buffer, use @code{ysave-buffer}; you specify the buffer number, and +the file name to write that buffer into. You should use a file name +which does not already exist; if the file does exist, the script does +not make make a backup of its old contents. @node Emergency Escape @subsection Emergency Escape From 6f08f98003bea14b35fff12d59edce3e77506fd1 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 4 Jun 2005 10:23:55 +0000 Subject: [PATCH 248/294] Refer to etc/DEBUG instead of duplicating it. Other cleanups. --- admin/emacs-pretesters | 312 ++++++----------------------------------- 1 file changed, 45 insertions(+), 267 deletions(-) diff --git a/admin/emacs-pretesters b/admin/emacs-pretesters index 169c7ee466d..f7b17afd580 100644 --- a/admin/emacs-pretesters +++ b/admin/emacs-pretesters @@ -30,13 +30,13 @@ noise into long discussions or even arguments, and that can waste a lot of time. But when you have a reason to ask other pretesters for help, you can do it that way. -* It is absolutely vital that you tell me about even the smallest -change or departure from the standard sources and procedure. +* It is absolutely vital that you report even the smallest change or +departure from the standard sources and procedure. -Otherwise, you are not testing the same program that I asked you to +Otherwise, you are not testing the same program that we asked you to test. Testing a different program is usually of no use whatever. It -can even cause trouble if you fail to tell me that you tested some -other program instead of what I am about to release. I might think +can even cause trouble, if you fail to tell us that you tested some +other program instead of what we are about to release. We might think that Emacs works, when in fact it has not even been tried, and might have a glaring fault. @@ -46,8 +46,8 @@ site would use it. Actually, it does no harm to test Emacs with such customizations *as well as* testing it "out of the box". Anything you do that could find -a bug is useful, as long as you make sure I know exactly what you did. -The important point is that testing with local changes is no +a bug is useful, as long as you make sure we know exactly what you +did. The important point is that testing with local changes is no substitute for testing Emacs exactly as it is distributed. * Even changing the compilation options counts as a change in the @@ -71,10 +71,10 @@ this is effectively changing Emacs. Because the crucial fact about the planned release is that, without changes, it doesn't work on that machine. -To make Emacs work on that machine, I would need to install new +To make Emacs work on that machine, we would need to install new configuration files. That is not out of the question, since it is safe--it certainly won't break any other machines that already work. -But you will have to rush me the legal papers to give the FSF +But you will have to rush in the legal papers to give the FSF permission to use such a large piece of text. * Look in the etc/MACHINES file. @@ -92,25 +92,25 @@ recommendations also, for the same reason. * Send your problem reports to emacs-pretest-bug@gnu.org, not bug-gnu-emacs. -Sometimes I won't know what to do about a system-dependent issue, and -I may need people to tell me what happens if you try a certain thing -on a certain system. When this happens, I'll send out a query. +Sometimes we won't know what to do about a system-dependent issue, and +we may need people to say what happens if you try a certain thing on a +certain system. When this happens, we'll send out a query. * Don't delay sending information. -When you test on a system and encounter no problems, please tell me -about it right away. That way, I will know that someone has tested -Emacs on that kind of system. +When you test on a system and encounter no problems, please report it +right away. That way, we will know that someone has tested Emacs on +that kind of system. Please don't wait for several days "to see if it really works before -you say anything." Tell me right away that Emacs seems basically to -work; then, if you notice a problem a few days later, tell me +you say anything." Tell us right away that Emacs seems basically to +work; then, if you notice a problem a few days later, tell us immediately about that when you see it. It is okay if you double check things before reporting a problem, such as to see if you can easily fix it. But don't wait very long. A good -rule to use in pretesting is always to tell me about every problem on -the same day you encounter it, even if that means you can't find a +rule to use in pretesting is always to report every problem on the +same day you encounter it, even if that means you can't find a solution before you report the problem. I'd much rather hear about a problem today and a solution tomorrow @@ -123,20 +123,22 @@ else, then it will be necessary for anyone who wants to investigate the bug to find the other message. This may be difficult, it is probably time-consuming. -To help me save time, simply copy the relevant parts of any previous +To help save our time, simply copy the relevant parts of any previous messages into your own bug report. -In particular, if I ask you for more information because a bug report +In particular, if we ask you for more information because a bug report was incomplete, it is best to send me the *entire* collection of relevant information, all together. If you send just the additional -information, that makes me do extra work. There is even a risk that -I won't remember what question you are sending me the answer to. +information, that makes extra work for us. There is even a risk that +we won't remember what question you are sending the answer to. * When you encounter a bug that manifests itself as a Lisp error, try setting debug-on-error to t and making the bug happen again. Then you will get a Lisp backtrace. Including that in your bug report is very useful. +* For advice on debugging, see etc/DEBUG. + * Debugging optimized code is possible, if you compile with GCC, but in some cases the optimized code can be confusing. If you are not accustomed to that, recompile Emacs without -O. One way to do this is @@ -144,193 +146,6 @@ accustomed to that, recompile Emacs without -O. One way to do this is make clean make CFLAGS=-g -* If you use X windows, it is a good idea to run Emacs under GDB (or -some other suitable debugger) *all the time*, at least while -pretesting. - -Then, when Emacs crashes, you will be able to debug the live process, -not just a core dump. The `pr' command defined in src/.gdbinit is very -useful in this case for examining Lisp_Object values as they would -appear in Lisp. - -If you can't use `pr' because Emacs has got a fault already, or -because you have only a core dump, you can use `xtype' to look at the -type of a value, and then choose one of the other commands `xsymbol', -`xstring', `xcons', `xvector' and so on to examine the contents. - -I myself *always* run Emacs under GDB so that I can debug conveniently -if the occasion arises. - -* To get Lisp-level backtrace information within GDB, -look for stack frames that call Ffuncall. Select them one by one in GDB -and type this: - - p *args - pr - -This will print the name of the Lisp function called by that level -of function calling. - -By printing the remaining elements of args, you can see the argument -values. Here's how to print the first argument: - - p args[1] - pr - -If you do not have a live process, you can use xtype and the other -x... commands such as xsymbol to get such information, albeit less -conveniently. - -* Even with a live process, these x... commands are useful for -examining the fields in a buffer, window, process, frame or marker. -Here's an example using concepts explained in the node "Value History" -of the GDB manual to print the variable frame from this line in -xmenu.c: - - buf.frame_or_window = Fcons (frame, prefix); - -First, use these commands: - - cd src - gdb emacs - b xmenu.c:1209 - r -q - -Then type C-x 5 2 to create a new frame, and it hits the breakpoint: - - (gdb) p frame - $1 = 1077872640 - (gdb) xtype - Lisp_Vectorlike - PVEC_FRAME - (gdb) xframe - $2 = (struct frame *) 0x3f0800 - (gdb) p *$ - $3 = { - size = 536871989, - next = 0x366240, - name = 809661752, - [...] - } - (gdb) p $3->name - $4 = 809661752 - -Now we can use `pr' to print the name of the frame: - - (gdb) pr - "emacs@steenrod.math.nwu.edu" - -* The Emacs C code heavily uses macros defined in lisp.h. So suppose -we want the address of the l-value expression near the bottom of -`kbd_buffer_store_event' from keyboard.c: - - XVECTOR (kbd_buffer_frame_or_window)->contents[kbd_store_ptr - - kbd_buffer] - = event->frame_or_window); - -XVECTOR is a macro, and therefore GDB does not know about it. -GDB cannot evaluate p XVECTOR (kbd_buffer_frame_or_window). - -However, you can use the xvector command in GDB to get the same -result. Here is how: - - (gdb) p kbd_buffer_frame_or_window - $1 = 1078005760 - (gdb) xvector - $2 = (struct Lisp_Vector *) 0x411000 - 0 - (gdb) p $->contents[kbd_store_ptr - kbd_buffer] - $3 = 1077872640 - (gdb) p &$ - $4 = (int *) 0x411008 - -* Here's a related example of macros and the GDB `define' command. -There are many Lisp vectors such as `recent_keys', which contains the -last 100 keystrokes. We can print this Lisp vector - -p recent_keys -pr - -But this may be inconvenient, since `recent_keys' is much more verbose -than `C-h l'. We might want to print only the last 10 elements of -this vector. `recent_keys' is updated in keyboard.c by the command - - XVECTOR (recent_keys)->contents[recent_keys_index] = c; - -So we define a GDB command `xvector-elts', so the last 10 keystrokes -are printed by - - xvector-elts recent_keys recent_keys_index 10 - -where you can define xvector-elts as follows: - - define xvector-elts - set $i = 0 - p $arg0 - xvector - set $foo = $ - while $i < $arg2 - p $foo->contents[$arg1-($i++)] - pr - end - document xvector-elts - Prints a range of elements of a Lisp vector. - xvector-elts v n i - prints `i' elements of the vector `v' ending at the index `n'. - end - -* To debug what happens while preloading and dumping Emacs, -do `gdb temacs' and start it with `r -batch -l loadup dump'. - -If temacs actually succeeds when running under GDB in this way, do not -try to run the dumped Emacs, because it was dumped with the GDB -breakpoints in it. - -* If you encounter X protocol errors, try evaluating (x-synchronize t). -That puts Emacs into synchronous mode, where each Xlib call checks for -errors before it returns. This mode is much slower, but when you get -an error, you will see exactly which call really caused the error. - -* If the symptom of the bug is that Emacs fails to respond, don't -assume Emacs is `hung'--it may instead be in an infinite loop. To -find out which, make the problem happen under GDB and stop Emacs once -it is not responding. (If Emacs is using X Windows directly, you can -stop Emacs by typing C-z at the GDB job.) Then try stepping with -`step'. If Emacs is hung, the `step' command won't return. If it is -looping, `step' will return. - -If this shows Emacs is hung in a system call, stop it again and -examine the arguments of the call. In your bug report, state exactly -where in the source the system call is, and what the arguments are. - -If Emacs is in an infinite loop, please determine where the loop -starts and ends. The easiest way to do this is to use the GDB command -`finish'. Each time you use it, Emacs resumes execution until it -exits one stack frame. Keep typing `finish' until it doesn't -return--that means the infinite loop is in the stack frame which you -just tried to finish. - -Stop Emacs again, and use `finish' repeatedly again until you get back -to that frame. Then use `next' to step through that frame. By -stepping, you will see where the loop starts and ends. Also please -examine the data being used in the loop and try to determine why the -loop does not exit when it should. Include all of this information in -your bug report. - -* If certain operations in Emacs are slower than they used to be, here -is some advice for how to find out why. - -Stop Emacs repeatedly during the slow operation, and make a backtrace -each time. Compare the backtraces looking for a pattern--a specific -function that shows up more often than you'd expect. - -If you don't see a pattern in the C backtraces, get some Lisp -backtrace information by looking at Ffuncall frames (see above), and -again look for a pattern. - -When using X, you can stop Emacs at any time by typing C-z at GDB. -When not using X, you can do this with C-g. - * Configure tries to figure out what kind of system you have by compiling and linking programs which calls various functions and looks at whether that succeeds. The file config.log contains any messages @@ -344,6 +159,9 @@ or more simply, rm config.cache ./configure +* Don't try changing Emacs *in any way* during pretest unless it fails +to work unchanged. + * Always be precise when talking about changes you have made. Show things rather than describing them. Use exact filenames (relative to the main directory of the distribution), not partial ones. For @@ -352,27 +170,27 @@ makefile". Instead of saying "I defined the MUMBLE macro", send a diff. * Always use `diff -c' to make diffs. If you don't include context, it -may be hard for me to figure out where you propose to make the -changes. So I might have to ignore your patch. +may be hard for us to figure out where you propose to make the +changes. So we might ignore your patch. -* When you write a fix, keep in mind that I can't install a change +* When you write a fix, keep in mind that we can't install a change that *might* break other systems without the risk that it will fail to work and therefore require an additional cycle of pretesting. People often suggest fixing a problem by changing config.h or src/ymakefile or even src/Makefile to do something special that a particular system needs. Sometimes it is totally obvious that such -changes would break Emacs for almost all users. I can't possibly make -a change like that. All I can do is send it back to you and ask you -to find a fix that is safe to install. +changes would break Emacs for almost all users. We can't possibly +make a change like that. All we can do is ask you to find a fix that +is safe to install. Sometimes people send fixes that *might* be an improvement in general--but it is hard to be sure of this. I can install such changes some of the time, but not during pretest, when I am trying to get a new version to work reliably as quickly as possible. -The safest changes for me to install are changes to the s- and m- -files. At least I know those can't affect most systems. +The safest changes for us to install are changes to the s- and m- +files. At least those can't break other systems. Another safe kind of change is one that uses a conditional to make sure it will apply only to a particular kind of system. Ordinarily, @@ -380,60 +198,20 @@ that is a bad way to solve a problem, and I would want to find a cleaner alternative. But the virtue of safety can make it superior at pretest time. -* Don't try changing Emacs *in any way* unless it fails to work unchanged. - -* Don't even suggest changes to add features or make something -cleaner. Every change I install could introduce a bug, so I won't -install a change during pretest unless I see it is *necessary*. +* Don't suggest changes during pretest to add features or make +something cleaner. Every change risks introducing a bug, so I won't +install a change during pretest unless it is *necessary*. * If you would like to suggest changes for purposes other than fixing user-visible bugs, don't wait till pretest time. Instead, send them -after I have made a release that proves to be stable. Then I can give -your suggestions proper consideration. If you send them at pretest -time, I will have to defer them till later, and that might mean I -forget all about them. +after we have made a release that proves to be stable. That is the +easiest time to consider such suggestions. If you send them at +pretest time, we will have to defer them till later, and that might +mean we forget all about them. * In some cases, if you don't follow these guidelines, your -information might still be useful, but I might have to do more work to -make use of it. Unfortunately, I am so far behind in my work that I -just can't keep up unless you help me to do it efficiently. - -Some suggestions for debugging on MS Windows: - - Marc Fleischeuers, Geoff Voelker and Andrew Innes - -To debug emacs with Microsoft Visual C++, you either start emacs from -the debugger or attach the debugger to a running emacs process. To -start emacs from the debugger, you can use the file bin/debug.bat. The -Microsoft Developer studio will start and under Project, Settings, -Debug, General you can set the command-line arguments and emacs' -startup directory. Set breakpoints (Edit, Breakpoints) at Fsignal and -other functions that you want to examine. Run the program (Build, -Start debug). Emacs will start and the debugger will take control as -soon as a breakpoint is hit. - -You can also attach the debugger to an already running emacs process. -To do this, start up the Microsoft Developer studio and select Build, -Start debug, Attach to process. Choose the emacs process from the -list. Send a break to the running process (Debug, Break) and you will -find that execution is halted somewhere in user32.dll. Open the stack -trace window and go up the stack to w32_msg_pump. Now you can set -breakpoints in emacs (Edit, Breakpoints). Continue the running emacs -process (Debug, Step out) and control will return to emacs, until a -breakpoint is hit. - -To examine the contents of a lisp variable, you can use the function -'debug_print'. Right-click on a variable, select QuickWatch, and -place 'debug_print(' and ')' around the expression. Press -'Recalculate' and the output is sent to the 'Debug' pane in the Output -window. If emacs was started from the debugger, a console window was -opened at emacs' startup; this console window also shows the output of -'debug_print'. It is also possible to keep appropriately masked and -typecast lisp symbols in the Watch window, this is more convenient -when steeping though the code. For instance, on entering -apply_lambda, you can watch (struct Lisp_Symbol *) (0xfffffff & -args[0]). - +information might still be useful, but we would have to do more work +to make use of it. That might cause it to fall by the wayside. Local Variables: mode: text From a4e51a7a678a101cf7a6766e50ef6e5d3fe8d369 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 4 Jun 2005 10:24:11 +0000 Subject: [PATCH 249/294] *** empty log message *** --- admin/ChangeLog | 5 +++++ man/ChangeLog | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/admin/ChangeLog b/admin/ChangeLog index 03f5e0ed066..9f5b9462a5f 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog @@ -1,3 +1,8 @@ +2005-06-04 Richard M. Stallman + + * emacs-pretesters: Refer to etc/DEBUG instead of duplicating it. + Other cleanups. + 2005-04-19 Lute Kamstra * make-tarball.txt: Don't commit lisp/loaddefs.el. diff --git a/man/ChangeLog b/man/ChangeLog index 30aaac5833e..9fe0433aaff 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +2005-06-04 Richard M. Stallman + + * trouble.texi (After a Crash): Polish previous change. + 2005-05-31 Jay Belanger * calc.texi (Notations Used in This Manual): Use @kbd for key From 196ac78ce159aaeb675c57e8cabb5747cbba3713 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 4 Jun 2005 18:09:16 +0000 Subject: [PATCH 250/294] (popup_get_selection): Click not in menu deactivates menu. --- src/ChangeLog | 4 ++++ src/xmenu.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 36650215350..c0466275d4a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2005-06-04 Richard M. Stallman + + * xmenu.c (popup_get_selection): Click not in menu deactivates menu. + 2005-06-04 Jan Dj,Ad(Brv * macmenu.c (cleanup_popup_menu): New function. diff --git a/src/xmenu.c b/src/xmenu.c index 6f758d12fc7..6e3a21604c1 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1235,6 +1235,10 @@ popup_get_selection (initial_event, dpyinfo, id, do_timers) if (event.type == ButtonRelease && dpyinfo->display == event.xbutton.display) { + /* If the click is not on the menu, deactivate the menu. */ + if (x_any_window_to_frame (dpyinfo, event.xexpose.window)) + popup_activated_flag = 0; + dpyinfo->grabbed &= ~(1 << event.xbutton.button); #ifdef USE_MOTIF /* Pretending that the event came from a Btn1Down seems the only way to convince Motif to From 385a3b9e8437814659e5249edd4d33cefa5d1314 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Jun 2005 18:15:42 +0000 Subject: [PATCH 251/294] (distclean): Fix a typo (colon was after "clean"). (extraclean): New target, emulates Makefile.in. --- leim/makefile.w32-in | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/leim/makefile.w32-in b/leim/makefile.w32-in index 839d6129a31..8e0d8c3909c 100644 --- a/leim/makefile.w32-in +++ b/leim/makefile.w32-in @@ -1,6 +1,7 @@ # -*- Makefile -*- for leim subdirectory in GNU Emacs on the Microsoft W32 API. # Copyright (C) 1997, 2004 Electrotechnical Laboratory, JAPAN. -# Licensed to the Free Software Foundation. +# Licensed to the Free Software Foundation. +# Copyright (C) 2005, Free Software Foundation, Inc. # This file is part of GNU Emacs. @@ -197,9 +198,12 @@ clean mostlyclean: - $(FOREACH) $(MISC_DIC:.elc=.el) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR) - $(DEL) leim-list.el -distclean clean: +distclean: clean - $(DELTREE) $(SUBDIRS) - $(DEL) stamp-subdir maintainer-clean: distclean - $(FOREACH) $(WORLD) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR) + +extraclean: maintainer-clean + - $(FOREACH) *~ "#*" $(FORDO) $(DEL) $(FORVAR) $(ENDFOR) From 86b21ac359d97b255561ef36dc995f72a97d6915 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Jun 2005 18:30:54 +0000 Subject: [PATCH 252/294] (url-http-parse-headers): Pass redirected URL as a callback argument. --- lisp/ChangeLog | 5 +++++ lisp/url/url-http.el | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index eb2206642ef..e29f47b9ad9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-06-04 Thierry Emery (tiny change) + + * url-http.el (url-http-parse-headers): Pass redirected URL as a + callback argument. + 2005-06-04 Kim F. Storm * simple.el (line-move): Only call sit-for when moving backwards. diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 16d51a0258c..2c040e1c445 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -500,7 +500,9 @@ should be shown to the user." (url-request-data url-http-data) (url-request-extra-headers url-http-extra-headers)) (url-retrieve redirect-uri url-callback-function - url-callback-arguments) + (cons redirect-uri + (and url-callback-arguments + (cdr url-callback-arguments)))) (url-mark-buffer-as-dead (current-buffer)))))) (4 ; Client error ;; 400 Bad Request From b8e517587a71741d7985bf82393352a1220b9d3d Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Jun 2005 18:32:57 +0000 Subject: [PATCH 253/294] Simplify last change. --- lisp/url/url-http.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 2c040e1c445..2315c6c9415 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -501,8 +501,7 @@ should be shown to the user." (url-request-extra-headers url-http-extra-headers)) (url-retrieve redirect-uri url-callback-function (cons redirect-uri - (and url-callback-arguments - (cdr url-callback-arguments)))) + (cdr url-callback-arguments))) (url-mark-buffer-as-dead (current-buffer)))))) (4 ; Client error ;; 400 Bad Request From 63db9644669f2615430d8301dca7d1d436f1e81d Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Jun 2005 18:37:16 +0000 Subject: [PATCH 254/294] (url-http-chunked-encoding-after-change-function): Use `url-http-debug' instead of `message'. --- lisp/url/url-http.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 2315c6c9415..f5bbf4a7bf4 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -850,7 +850,7 @@ the end of the document." (url-display-percentage nil nil) (goto-char (match-end 1)) (if (re-search-forward "^\r*$" nil t) - (message "Saw end of trailers...")) + (url-http-debug "Saw end of trailers...")) (if (url-http-parse-headers) (url-http-activate-callback)))))))))) From 94d4bafbecabcc6e57c5ac7d2e368c082d9f5fb5 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Jun 2005 18:38:17 +0000 Subject: [PATCH 255/294] *** empty log message *** --- leim/ChangeLog | 6 ++++++ lisp/ChangeLog | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/leim/ChangeLog b/leim/ChangeLog index f0ef48c9701..551d7e1cfda 100644 --- a/leim/ChangeLog +++ b/leim/ChangeLog @@ -1,3 +1,9 @@ +2005-06-04 Eli Zaretskii + + * makefile.w32-in (distclean): Fix a typo (colon was after + "clean"). + (extraclean): New target, emulates Makefile.in. + 2005-04-06 Kenichi Handa * quail/sgml-input.el ("sgml"): Enable quail-completion by typing diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e29f47b9ad9..dbfdd995279 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-06-04 David Reitter (tiny change) + + * url-http.el (url-http-chunked-encoding-after-change-function): + Use `url-http-debug' instead of `message'. + 2005-06-04 Thierry Emery (tiny change) * url-http.el (url-http-parse-headers): Pass redirected URL as a From 2cf248ab2e66c567e0b4722bfc89bb1d64b0fe3c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Jun 2005 18:50:38 +0000 Subject: [PATCH 256/294] (iswitchb-get-matched-buffers): Handle invalid-regexp errors in post-command-hook. --- lisp/iswitchb.el | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/lisp/iswitchb.el b/lisp/iswitchb.el index 52915c46950..5c01e77aabb 100644 --- a/lisp/iswitchb.el +++ b/lisp/iswitchb.el @@ -889,22 +889,27 @@ BUFFER-LIST can be list of buffers or list of strings." (do-string (stringp (car list))) name ret) - (mapcar - (lambda (x) + (catch 'invalid-regexp + (mapcar + (lambda (x) - (if do-string - (setq name x) ;We already have the name - (setq name (buffer-name x))) + (if do-string + (setq name x) ;We already have the name + (setq name (buffer-name x))) - (cond - ((and (or (and string-format (string-match regexp name)) - (and (null string-format) - (string-match (regexp-quote regexp) name))) + (cond + ((and (or (and string-format + (condition-case error + (string-match regexp name) + (invalid-regexp + (throw 'invalid-regexp (setq ret (cdr error)))))) + (and (null string-format) + (string-match (regexp-quote regexp) name))) - (not (iswitchb-ignore-buffername-p name))) - (setq ret (cons name ret)) - ))) - list) + (not (iswitchb-ignore-buffername-p name))) + (setq ret (cons name ret)) + ))) + list)) ret)) (defun iswitchb-ignore-buffername-p (bufname) From c1d847015ea047e825b9283472da33e11762553e Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Jun 2005 18:55:02 +0000 Subject: [PATCH 257/294] Rename Hardcopy to Printing. Make PostScript and PostScript Variables subnodes of it. --- man/emacs.texi | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/man/emacs.texi b/man/emacs.texi index 345d54ce0c5..69081b2c02b 100644 --- a/man/emacs.texi +++ b/man/emacs.texi @@ -191,9 +191,7 @@ Advanced Features * Gnus:: How to read netnews with Emacs. * Shell:: Executing shell commands from Emacs. * Emacs Server:: Using Emacs as an editing server for @code{mail}, etc. -* Hardcopy:: Printing buffers or regions. -* PostScript:: Printing buffers or regions as PostScript. -* PostScript Variables::Customizing the PostScript printing commands. +* Printing:: Printing hardcopies of buffers or regions. * Sorting:: Sorting lines, paragraphs or pages within Emacs. * Narrowing:: Restricting display and editing to a portion of the buffer. From 66bb4d9a02bbf4c6c32b437f2aae0e138ee4f99b Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Jun 2005 18:55:50 +0000 Subject: [PATCH 258/294] (Printing): Rename node from Hardcopy. Mention menu bar options. Move PostScript and PostScript Variables to a submenu. (Printing package): New node. --- man/misc.texi | 55 +++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 45 insertions(+), 10 deletions(-) diff --git a/man/misc.texi b/man/misc.texi index 68dd7356479..cf2fa5ff28d 100644 --- a/man/misc.texi +++ b/man/misc.texi @@ -1214,7 +1214,7 @@ off directory tracking. @end ignore -@node Emacs Server, Hardcopy, Shell, Top +@node Emacs Server, Printing, Shell, Top @section Using Emacs as a Server @pindex emacsclient @cindex Emacs as a server @@ -1374,14 +1374,17 @@ code, using the option @samp{--eval}. When this option is given, the rest of the arguments is not taken as a list of files to visit but as a list of expressions to evaluate. -@node Hardcopy, PostScript, Emacs Server, Top -@section Hardcopy Output +@node Printing, Sorting, Emacs Server, Top +@section Printing Hard Copies @cindex hardcopy +@cindex printing - The Emacs commands for making hardcopy let you print either an entire -buffer or just part of one, either with or without page headers. -See also the hardcopy commands of Dired (@pxref{Misc File Ops}) -and the diary (@pxref{Displaying the Diary}). + Emacs provides commands for printing hard copies of either an entire +buffer or just part of one, with or without page headers. You can +invoke the printing commands directly, as detailed in the following +section, or using the @samp{File} menu on the menu bar. See also the +hardcopy commands of Dired (@pxref{Misc File Ops}) and the diary +(@pxref{Displaying the Diary}). @table @kbd @item M-x print-buffer @@ -1428,7 +1431,13 @@ whether to supply @samp{-T} and @samp{-J} options (suitable for @code{lpr-add-switches} should be @code{nil} if your printer program is not compatible with @code{lpr}. -@node PostScript, PostScript Variables, Hardcopy, Top +@menu +* PostScript:: Printing buffers or regions as PostScript. +* PostScript Variables:: Customizing the PostScript printing commands. +* Printing Package:: An optional advanced printing interface. +@end menu + +@node PostScript, PostScript Variables,, Printing @section PostScript Hardcopy These commands convert buffer contents to PostScript, @@ -1492,7 +1501,7 @@ supports ISO 8859-1 characters. The following section describes variables for customizing these commands. @end ifinfo -@node PostScript Variables, Sorting, PostScript, Top +@node PostScript Variables, Printing Package, PostScript, Printing @section Variables for PostScript Hardcopy @vindex ps-lpr-command @@ -1584,7 +1593,33 @@ includes a single directory @file{/usr/local/share/emacs/fonts/bdf}. Many other customization variables for these commands are defined and described in the Lisp files @file{ps-print.el} and @file{ps-mule.el}. -@node Sorting, Narrowing, PostScript Variables, Top +@node Printing Package,, PostScript Variables, Printing +@section Printing Package +@cindex Printing package + + The basic Emacs facilities for printing hardcopy can be extended +using the Printing package. This provides an easy-to-use interface +for choosing what to print, previewing PostScript files before +printing, and setting various printing options such as print headers, +landscape or portrait modes, duplex modes, and so forth. On GNU/Linux +or Unix systems, the Printing package relies on the @file{gs} and +@file{gv} utilities, which are distributed as part of the GhostScript +program. On MS-Windows, the @file{gstools} port of Ghostscript can be +used. + +@findex pr-interface + To use the Printing package, add @code{(require 'printing)} to your +init file (@pxref{Init File}). The usual printing options in the menu +bar will be replaced with a @samp{Printing} submenu, containing +various printing options. You can also type @kbd{M-x pr-interface +RET}; this creates a @samp{*Printing Interface*} buffer, similar to a +customization buffer , where you can set the printing options. After +selecting what and how to print, start the print job using the +@samp{Print} button (click @kbd{mouse-2} on it, or move point over it +and type @kbd{RET}). For further information on the various options, +use the @samp{Interface Help} button. + +@node Sorting, Narrowing, Printing, Top @section Sorting Text @cindex sorting From cb4a6fe1d86cc6767327e7bb3ed6d2e8cd42ff3c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Jun 2005 18:56:22 +0000 Subject: [PATCH 259/294] (Using Region): Change Hardcopy xref to Printing. --- man/mark.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/mark.texi b/man/mark.texi index f609472bca7..5f4c44de9e1 100644 --- a/man/mark.texi +++ b/man/mark.texi @@ -293,7 +293,7 @@ Indent it with @kbd{C-x @key{TAB}} or @kbd{C-M-\} (@pxref{Indentation}). @item Fill it as text with @kbd{M-x fill-region} (@pxref{Filling}). @item -Print hardcopy with @kbd{M-x print-region} (@pxref{Hardcopy}). +Print hardcopy with @kbd{M-x print-region} (@pxref{Printing}). @item Evaluate it as Lisp code with @kbd{M-x eval-region} (@pxref{Lisp Eval}). @end itemize From e159097a9cb8ce586665ab521629a41ee2500047 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Jun 2005 18:57:01 +0000 Subject: [PATCH 260/294] (Operating on Files): Change Hardcopy xref to Printing. --- man/dired.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/dired.texi b/man/dired.texi index f2699cfde07..8cb4646075e 100644 --- a/man/dired.texi +++ b/man/dired.texi @@ -616,7 +616,7 @@ Print the specified files (@code{dired-do-print}). You must specify the command to print them with, but the minibuffer starts out with a suitable guess made using the variables @code{lpr-command} and @code{lpr-switches} (the same variables that @code{lpr-buffer} uses; -@pxref{Hardcopy}). +@pxref{Printing}). @findex dired-do-compress @kindex Z @r{(Dired)} From d00819eaf43f0ae22ed5e5ecdd5a4eed6fd91619 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Jun 2005 18:57:44 +0000 Subject: [PATCH 261/294] (Displaying the Diary): Change Hardcopy xref to Printing. --- man/calendar.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/calendar.texi b/man/calendar.texi index cf02377f1d9..1ef4aef09d4 100644 --- a/man/calendar.texi +++ b/man/calendar.texi @@ -1046,7 +1046,7 @@ an illusion, so simply printing the buffer does not print what you see on your screen. There is a special command to print hard copy of the diary buffer @emph{as it appears}; this command is @kbd{M-x print-diary-entries}. It sends the data directly to the printer. You -can customize it like @code{lpr-region} (@pxref{Hardcopy}). +can customize it like @code{lpr-region} (@pxref{Printing}). @findex diary The command @kbd{M-x diary} displays the diary entries for the current From 2873a2d1ab441ac12c914c8c1a289c2a19740097 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Jun 2005 18:58:43 +0000 Subject: [PATCH 262/294] (MS-DOS Printing, MS-DOS Processes): Change Hardcopy xref to Printing. --- man/msdog.texi | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/man/msdog.texi b/man/msdog.texi index a1d7647a95d..a5aea27f161 100644 --- a/man/msdog.texi +++ b/man/msdog.texi @@ -419,13 +419,12 @@ EOL conversion is determined by @code{file-name-buffer-file-type-alist}. @node MS-DOS Printing @section Printing and MS-DOS - Printing commands, such as @code{lpr-buffer} (@pxref{Hardcopy}) and + Printing commands, such as @code{lpr-buffer} (@pxref{Printing}) and @code{ps-print-buffer} (@pxref{PostScript}) can work in MS-DOS and MS-Windows by sending the output to one of the printer ports, if a Posix-style @code{lpr} program is unavailable. The same Emacs -variables control printing on all systems (@pxref{Hardcopy}), but in -some cases they have different default values on MS-DOS and -MS-Windows. +variables control printing on all systems, but in some cases they have +different default values on MS-DOS and MS-Windows. @vindex printer-name @r{(MS-DOS)} If you want to use your local printer, printing on it in the usual DOS @@ -758,7 +757,7 @@ implements a Posix-like shell entirely in Emacs Lisp. Processes}. @cindex printing under MS-DOS - Printing commands, such as @code{lpr-buffer} (@pxref{Hardcopy}) and + Printing commands, such as @code{lpr-buffer} (@pxref{Printing}) and @code{ps-print-buffer} (@pxref{PostScript}), work in MS-DOS by sending the output to one of the printer ports. @xref{MS-DOS Printing}. From 7350d665892ede4f59c6a51dccaa400b61cb4444 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Jun 2005 18:59:18 +0000 Subject: [PATCH 263/294] (Glossary): Change Hardcopy xref to Printing. --- man/glossary.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/glossary.texi b/man/glossary.texi index f75ba725a18..78abbfb30b7 100644 --- a/man/glossary.texi +++ b/man/glossary.texi @@ -573,7 +573,7 @@ Search}). See also `font lock'. @item Hardcopy Hardcopy means printed output. Emacs has commands for making printed -listings of text in Emacs buffers. @xref{Hardcopy}. +listings of text in Emacs buffers. @xref{Printing}. @item @key{HELP} @key{HELP} is the Emacs name for @kbd{C-h} or @key{F1}. You can type From 0703917482a0d4c475cc64bd755bd53e84ee4bb7 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Jun 2005 18:59:54 +0000 Subject: [PATCH 264/294] (Mode Line Mouse): Mention mode-line-highlight effect. --- man/frames.texi | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/man/frames.texi b/man/frames.texi index 2b2c61af133..e5bada851ad 100644 --- a/man/frames.texi +++ b/man/frames.texi @@ -393,6 +393,14 @@ This menu is for specifying the frame's principal font. You can use mouse clicks on window mode lines to select and manipulate windows. + Some areas of the mode line, such as the buffer name and the major +mode name, have their own special mouse bindings. These areas are +highlighted when you hold the mouse over them, and information about +the special bindings will be displayed (@pxref{Tooltips}). + + You can also click on areas of the mode line that do not have +special mouse bindings of their own. This has the following effects: + @table @kbd @item Mouse-1 @kindex Mouse-1 @r{(mode line)} @@ -420,12 +428,6 @@ horizontally, above the place in the mode line where you click. @kbd{C-Mouse-2} on a scroll bar splits the corresponding window vertically. @xref{Split Window}. - The commands above apply to areas of the mode line which do not have -special mouse bindings of their own. Some areas, such as the buffer -name and the major mode name, have their own special mouse bindings. -Emacs displays information about these bindings when you hold the -mouse over such a place (@pxref{Tooltips}). - @node Creating Frames @section Creating Frames @cindex creating frames From a6b017c9a4802e1cebccb286f8b1f41d670287d7 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Jun 2005 19:03:06 +0000 Subject: [PATCH 265/294] Mark documented features. --- etc/NEWS | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 1e88f1d1b41..e74ba0fdea3 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -116,6 +116,7 @@ emacs crash. * Startup Changes in Emacs 22.1 ++++ ** New command line option -Q or --quick. This is like using -q --no-site-file, but in addition it also disables the fancy startup screen. @@ -710,6 +711,7 @@ gives the fraction of the window's width to scroll the window. The variable `automatic-hscrolling' was renamed to `auto-hscroll-mode'. The old name is still available as an alias. +--- *** Moving or scrolling through images (and other lines) taller that the window now works sensibly, by automatically adjusting the window's vscroll property. @@ -826,8 +828,10 @@ trouble with fontification and/or indentation. +++ *** New standard font-lock face `font-lock-preprocessor-face'. ++++ *** New standard font-lock face `font-lock-comment-delimiter-face'. ++++ *** Easy to overlook single character negation can now be font-locked. You can use the new variable `font-lock-negation-char-face' and the face of the same name to customize this. Currently the cc-modes, sh-script-mode, @@ -1247,6 +1251,7 @@ modes (shell-mode etc) inserts arguments from previous command lines, like bash's `ESC .' binding. It is bound by default to `C-c .', but otherwise behaves quite similarly to the bash version. ++++ *** `comint-use-prompt-regexp-instead-of-fields' has been renamed `comint-use-prompt-regexp'. The old name has been kept as an alias, but declared obsolete. @@ -1292,9 +1297,11 @@ buffer causes automatic display in another window of the corresponding matches, compilation errors, etc. This minor mode can be toggled with C-c C-f. ++++ *** When the left fringe is displayed, an arrow points to current message in the compilation buffer. ++++ *** The new variable `compilation-context-lines' controls lines of leading context before the current message. If nil and the left fringe is displayed, it doesn't scroll the compilation output window. If there is no left fringe, @@ -1621,6 +1628,7 @@ referred to as "soft word wrap" in other text editors. This is similar to Refill mode, but more reliable. To turn the word wrap feature off, set `longlines-auto-wrap' to nil. ++++ ** The printing package is now part of the Emacs distribution. If you enable the printing package by including (require 'printing) in @@ -1713,6 +1721,7 @@ This was actually done in Emacs-21.1, and was not documented. * Changes in Specialized Modes and Packages in Emacs 22.1: +--- ** Makefile mode has submodes for automake, gmake, makepp and BSD make. The former two couldn't be differentiated before, and the latter two @@ -2401,6 +2410,7 @@ old name remains available as alias, but has been marked obsolete. +++ *** Desktop saving is now a minor mode, `desktop-save-mode'. ++++ *** The variable `desktop-enable' is obsolete. Customize `desktop-save-mode' to enable desktop saving. @@ -2471,6 +2481,7 @@ currently highlighted regions in an inferior Ediff session. If you answer 'n' then it reverts to the old behavior and asks the user to select regions for comparison. ++++ *** The new command `ediff-backup' compares a file with its most recent backup using `ediff'. If you specify the name of a backup file, `ediff-backup' compares it with the file of which it is a backup. @@ -4784,6 +4795,7 @@ used to add text properties to mode-line elements. to display the size of the accessible part of the buffer on the mode line. ++++ *** Mouse-face on mode-line (and header-line) is now supported. `mode-line-highlight' is the standard face indicating mouse sensitive elements on mode-line (and header-line) like `highlight' face on text From b21688f0cadd5fdfd051a3197918c54b0c75bd9e Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Jun 2005 19:10:07 +0000 Subject: [PATCH 266/294] (iswitchb-single-match-face) (iswitchb-current-match-face, iswitchb-virtual-matches-face) (iswitchb-invalid-regexp-face): New faces. (iswitchb-completions): Use them. (iswitchb-use-faces): Renamed from iswitchb-use-fonts, which is now marked as an obsolete alias. (iswitchb-read-buffer): Remove check for bound font variables. (iswitchb-invalid-regexp): New free variable. (iswitchb-get-matched-buffers): Catch invalid-regexp errors and set iswitchb-invalid-regexp. (iswitchb, iswitchb-complete, iswitchb-completions): Deal with invalid regexps. (iswitchb-completions): Add check for complete match when entering a regexp. (iswitchb-completions): Remove require-match argument. (iswitchb-exhibit): Fix caller. (iswitchb-common-match-inserted): New variable. (iswitchb-complete, iswitchb-completion-help): Use it. --- lisp/iswitchb.el | 146 ++++++++++++++++++++++++++++++----------------- 1 file changed, 93 insertions(+), 53 deletions(-) diff --git a/lisp/iswitchb.el b/lisp/iswitchb.el index 5c01e77aabb..2943be851a0 100644 --- a/lisp/iswitchb.el +++ b/lisp/iswitchb.el @@ -1,6 +1,6 @@ ;;; iswitchb.el --- switch between buffers using substrings -;; Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. +;; Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 Free Software Foundation, Inc. ;; Author: Stephen Eglen ;; Maintainer: Stephen Eglen @@ -165,11 +165,10 @@ ;; Font-Lock -;; If you have font-lock loaded, the first matching buffer is -;; highlighted. To switch this off, set (setq iswitchb-use-fonts nil) -;; I don't use font-lock that much, so I've hardcoded the faces. If -;; this is too harsh, let me know. Colouring of the matching buffer -;; name was suggested by Carsten Dominik (dominik@strw.leidenuniv.nl) +;; font-lock is used to highlight the first matching buffer. To +;; switch this off, set (setq iswitchb-use-faces nil). Colouring of +;; the matching buffer name was suggested by Carsten Dominik +;; (dominik@strw.leidenuniv.nl) ;; Replacement for read-buffer @@ -230,16 +229,10 @@ ;; Regexp matching -;; There is limited provision for regexp matching within iswitchb, -;; enabled through `iswitchb-regexp'. This allows you to type `c$' -;; for example and see all buffer names ending in `c'. This facility -;; is quite limited though in two respects. First, you can't -;; currently type in expressions like `[0-9]' directly -- you have to -;; type them in when iswitchb-regexp is nil and then toggle on the -;; regexp functionality. Likewise, don't enter an expression -;; containing `\' in regexp mode. If you try, iswitchb gets confused, -;; so just hit C-g and try again. Secondly, no completion mechanism -;; is currently offered when regexp searching. +;; There is provision for regexp matching within iswitchb, enabled +;; through `iswitchb-regexp'. This allows you to type `c$' for +;; example and see all buffer names ending in `c'. No completion +;; mechanism is currently offered when regexp searching. ;;; TODO @@ -256,6 +249,8 @@ (fboundp 'last))) (require 'cl)) +(require 'font-lock) + ;; Set up the custom library. ;; taken from http://www.dina.kvl.dk/~abraham/custom/ (eval-and-compile @@ -377,10 +372,11 @@ See also `iswitchb-newbuffer'." :type 'boolean :group 'iswitchb) -(defcustom iswitchb-use-fonts t +(defcustom iswitchb-use-faces t "*Non-nil means use font-lock fonts for showing first match." :type 'boolean :group 'iswitchb) +(define-obsolete-variable-alias 'iswitchb-use-fonts 'iswitchb-use-faces "22.1") (defcustom iswitchb-use-frame-buffer-list nil "*Non-nil means use the currently selected frame's buffer list." @@ -408,6 +404,35 @@ iswitchb is running." :type 'hook :group 'iswitchb) +(defface iswitchb-single-match-face + '((t + (:inherit font-lock-comment-face))) + "Iswitchb face for single matching buffer name." + :version "22.1" + :group 'iswitchb) + +(defface iswitchb-current-match-face + '((t + (:inherit font-lock-function-name-face))) + "Iswitchb face for current matching buffer name." + :version "22.1" + :group 'iswitchb) + +(defface iswitchb-virtual-matches-face + '((t + (:inherit font-lock-builtin-face))) + "Iswitchb face for matching virtual buffer names. +See also `iswitchb-use-virtual-buffers'." + :version "22.1" + :group 'iswitchb) + +(defface iswitchb-invalid-regexp-face + '((t + (:inherit font-lock-warning-face))) + "Iswitchb face for indicating invalid regexp. " + :version "22.1" + :group 'iswitchb) + ;; Do we need the variable iswitchb-use-mycompletion? ;;; Internal Variables @@ -507,6 +532,11 @@ selected.") (defvar iswitchb-minibuf-depth nil "Value we expect to be returned by `minibuffer-depth' in the minibuffer.") +(defvar iswitchb-common-match-inserted nil + "Non-nil if we have just inserted a common match in the minibuffer.") + +(defvar iswitchb-invalid-regexp) + ;;; FUNCTIONS ;;; ISWITCHB KEYMAP @@ -564,6 +594,7 @@ in a separate window. ;;`iswitchb-buffer-ignore') (let* ((prompt "iswitch ") + iswitchb-invalid-regexp (buf (iswitchb-read-buffer prompt))) ;;(message "chosen text %s" iswitchb-final-text) @@ -572,7 +603,8 @@ in a separate window. (cond ( (eq iswitchb-exit 'findfile) (call-interactively 'find-file)) - + (iswitchb-invalid-regexp + (message "Won't make invalid regexp named buffer")) (t ;; View the buffer ;;(message "go to buf %s" buf) @@ -602,10 +634,7 @@ the selection process begins. Used by isearchb.el." buf-sel iswitchb-final-text (icomplete-mode nil) ;; prevent icomplete starting up - ;; can only use fonts if they have been bound. - (iswitchb-use-fonts (and iswitchb-use-fonts - (boundp 'font-lock-comment-face) - (boundp 'font-lock-function-name-face)))) + ) (iswitchb-define-mode-map) (setq iswitchb-exit nil) @@ -691,7 +720,9 @@ The result is stored in `iswitchb-common-match-string'." (let (res) (cond ((not iswitchb-matches) (run-hooks 'iswitchb-cannot-complete-hook)) - + (iswitchb-invalid-regexp + ;; Do nothing + ) ((= 1 (length iswitchb-matches)) ;; only one choice, so select it. (exit-minibuffer)) @@ -703,7 +734,8 @@ The result is stored in `iswitchb-common-match-string'." (not (equal res iswitchb-text))) ;; found something to complete, so put it in the minibuffer. (progn - (setq iswitchb-rescan nil) + (setq iswitchb-rescan nil + iswitchb-common-match-inserted t) (delete-region (minibuffer-prompt-end) (point)) (insert res)) ;; else nothing to complete @@ -889,6 +921,7 @@ BUFFER-LIST can be list of buffers or list of strings." (do-string (stringp (car list))) name ret) + (setq iswitchb-invalid-regexp nil) (catch 'invalid-regexp (mapcar (lambda (x) @@ -898,17 +931,15 @@ BUFFER-LIST can be list of buffers or list of strings." (setq name (buffer-name x))) (cond - ((and (or (and string-format - (condition-case error - (string-match regexp name) - (invalid-regexp - (throw 'invalid-regexp (setq ret (cdr error)))))) - (and (null string-format) - (string-match (regexp-quote regexp) name))) - + ((and (if (not string-format) + (string-match (regexp-quote regexp) name) + (condition-case error + (string-match regexp name) + (invalid-regexp + (setq iswitchb-invalid-regexp t) + (throw 'invalid-regexp (setq ret (cdr error)))))) (not (iswitchb-ignore-buffername-p name))) - (setq ret (cons name ret)) - ))) + (setq ret (cons name ret))))) list)) ret)) @@ -994,7 +1025,8 @@ Return the modified list with the last element prepended to it." (temp-buf "*Completions*") (win)) - (if (eq last-command this-command) + (if (and (eq last-command this-command) + (not iswitchb-common-match-inserted)) ;; scroll buffer (progn (set-buffer temp-buf) @@ -1021,8 +1053,8 @@ Return the modified list with the last element prepended to it." (fundamental-mode)) (display-completion-list (if iswitchb-matches iswitchb-matches - iswitchb-buflist)) - ))))) + iswitchb-buflist)))) + (setq iswitchb-common-match-inserted nil)))) ;;; KILL CURRENT BUFFER @@ -1232,8 +1264,7 @@ Copied from `icomplete-exhibit' with two changes: ;; Insert the match-status information: (insert (iswitchb-completions - contents - (not minibuffer-completion-confirm))))))) + contents)))))) (eval-when-compile (defvar most-len) @@ -1248,27 +1279,29 @@ Copied from `icomplete-exhibit' with two changes: (setq most-is-exact t)) (substring com most-len))) -(defun iswitchb-completions (name require-match) +(defun iswitchb-completions (name) "Return the string that is displayed after the user's text. Modified from `icomplete-completions'." (let ((comps iswitchb-matches) ; "-determined" - only one candidate - (open-bracket-determined (if require-match "(" "[")) - (close-bracket-determined (if require-match ")" "]")) + (open-bracket-determined "[") + (close-bracket-determined "]") ;"-prospects" - more than one candidate (open-bracket-prospects "{") (close-bracket-prospects "}") first) - (if (and iswitchb-use-fonts comps) + (if (and iswitchb-use-faces comps) (progn (setq first (car comps)) (setq first (format "%s" first)) (put-text-property 0 (length first) 'face (if (= (length comps) 1) - 'font-lock-comment-face - 'font-lock-function-name-face) + (if iswitchb-invalid-regexp + 'iswitchb-invalid-regexp-face + 'iswitchb-single-match-face) + 'iswitchb-current-match-face) first) (setq comps (cons first (cdr comps))))) @@ -1297,7 +1330,7 @@ Modified from `icomplete-completions'." (let ((comp comps)) (while comp (put-text-property 0 (length (car comp)) - 'face 'font-lock-builtin-face + 'face 'iswitchb-virtual-matches-face (car comp)) (setq comp (cdr comp)))))) @@ -1305,16 +1338,23 @@ Modified from `icomplete-completions'." open-bracket-determined close-bracket-determined)) - ((null (cdr comps)) ;one match - (concat (if (and (> (length (car comps)) - (length name))) - (concat open-bracket-determined + (iswitchb-invalid-regexp + (concat " " (car comps))) + ((null (cdr comps)) ;one match + (concat + (if (if (not iswitchb-regexp) + (= (length name) + (length (car comps))) + (string-match name (car comps)) + (string-equal (match-string 0 (car comps)) + (car comps))) + "" + (concat open-bracket-determined ;; when there is one match, show the ;; matching buffer name in full (car comps) - close-bracket-determined) - "") - (if (not iswitchb-use-fonts) " [Matched]"))) + close-bracket-determined)) + (if (not iswitchb-use-faces) " [Matched]"))) (t ;multiple matches (if (and iswitchb-max-to-show (> (length comps) iswitchb-max-to-show)) From 24af414ed1c4ac099b955728f8d4821952eaf123 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Jun 2005 19:38:23 +0000 Subject: [PATCH 267/294] (DOC): Define to point to the generated DOC-X. --- src/makefile.w32-in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/makefile.w32-in b/src/makefile.w32-in index 5a232e28362..b5890593cd8 100644 --- a/src/makefile.w32-in +++ b/src/makefile.w32-in @@ -42,6 +42,8 @@ TOBJ = $(BLD)/firstfile.$(O) TRES = $(BLD)/emacs.res TLASTLIB = $(BLD)/lastfile.$(A) +DOC = $(OBJDIR)/etc/DOC-X + FULL_LINK_FLAGS = $(LINK_FLAGS) $(TEMACS_EXTRA_LINK) # From 910182298af7f21498c03a2edfdf4331539de386 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Jun 2005 19:47:24 +0000 Subject: [PATCH 268/294] *** empty log message *** --- lisp/ChangeLog | 5 +++++ src/ChangeLog | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index dbfdd995279..7fcdef18f5e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-06-04 Matt Hodges + + * iswitchb.el (iswitchb-get-matched-buffers): Handle + invalid-regexp errors in post-command-hook. + 2005-06-04 David Reitter (tiny change) * url-http.el (url-http-chunked-encoding-after-change-function): diff --git a/src/ChangeLog b/src/ChangeLog index c0466275d4a..2264a791014 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2005-06-04 Eli Zaretskii + + * makefile.w32-in (DOC): Define to point to the generated DOC-X. + 2005-06-04 Richard M. Stallman * xmenu.c (popup_get_selection): Click not in menu deactivates menu. From c68a2829f2293dfca9edb98aae3426e5a3e6b8c3 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Jun 2005 19:59:30 +0000 Subject: [PATCH 269/294] Include w32heap.h, to avoid compiler warning about sbrk. --- src/emacs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/emacs.c b/src/emacs.c index 68720eecc27..fd38268386a 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -44,6 +44,7 @@ Boston, MA 02111-1307, USA. */ #include #include /* just for w32.h */ #include "w32.h" +#include "w32heap.h" /* for prototype of sbrk */ #endif #include "lisp.h" From d01a9710746df2584e6f24b1398cbe2d0e87728d Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Jun 2005 20:00:54 +0000 Subject: [PATCH 270/294] *** empty log message *** --- man/ChangeLog | 23 +++++++++++++++++++++++ src/ChangeLog | 3 +++ 2 files changed, 26 insertions(+) diff --git a/man/ChangeLog b/man/ChangeLog index 9fe0433aaff..74b6e19d0ed 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,26 @@ +2005-06-05 Chong Yidong + + * emacs.texi: Rename Hardcopy to Printing. + Make PostScript and PostScript Variables subnodes of it. + + * misc.texi (Printing): Rename node from Hardcopy. + Mention menu bar options. + Move PostScript and PostScript Variables to submenu. + (Printing package): New node. + + * mark.texi (Using Region): Change Hardcopy xref to Printing. + + * dired.texi (Operating on Files): Likewise. + + * calendar.texi (Displaying the Diary): Likewise. + + * msdog.texi (MS-DOS Printing, MS-DOS Processes): Likewise. + + * glossary.texi (Glossary): Likewise. + + * frames.texi (Mode Line Mouse): Mention mode-line-highlight + effect. + 2005-06-04 Richard M. Stallman * trouble.texi (After a Crash): Polish previous change. diff --git a/src/ChangeLog b/src/ChangeLog index 2264a791014..9d9062e2aa9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2005-06-04 Eli Zaretskii + * emacs.c: Include w32heap.h, to avoid compiler warning about + sbrk. + * makefile.w32-in (DOC): Define to point to the generated DOC-X. 2005-06-04 Richard M. Stallman From b6f0a39717ed4be8f35c059ab32d4b4bd9199129 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Jun 2005 20:09:13 +0000 Subject: [PATCH 271/294] *** empty log message *** --- lisp/ChangeLog | 20 ++++++++++++++++++-- src/ChangeLog | 2 ++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7fcdef18f5e..7b9058c6284 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,7 +1,23 @@ 2005-06-04 Matt Hodges - * iswitchb.el (iswitchb-get-matched-buffers): Handle - invalid-regexp errors in post-command-hook. + * iswitchb.el (iswitchb-single-match-face) + (iswitchb-current-match-face, iswitchb-virtual-matches-face) + (iswitchb-invalid-regexp-face): New faces. + (iswitchb-completions): Use them. + (iswitchb-use-faces): Renamed from iswitchb-use-fonts, which is + now marked as an obsolete alias. + (iswitchb-read-buffer): Remove check for bound font variables. + (iswitchb-invalid-regexp): New free variable. + (iswitchb-get-matched-buffers): Catch invalid-regexp errors and + set iswitchb-invalid-regexp. + (iswitchb, iswitchb-complete, iswitchb-completions): Deal with + invalid regexps. + (iswitchb-completions): Add check for complete match when entering + a regexp. + (iswitchb-completions): Remove require-match argument. + (iswitchb-exhibit): Fix caller. + (iswitchb-common-match-inserted): New variable. + (iswitchb-complete, iswitchb-completion-help): Use it. 2005-06-04 David Reitter (tiny change) diff --git a/src/ChangeLog b/src/ChangeLog index 9d9062e2aa9..f4f9b8d6537 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2005-06-04 Eli Zaretskii + * s/ms-w32.h (fileno): Don't define if already defined. + * emacs.c: Include w32heap.h, to avoid compiler warning about sbrk. From 23bf9efbaa448c04f1a25106c9e394143d902697 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Jun 2005 20:10:49 +0000 Subject: [PATCH 272/294] (fileno): Don't define if already defined. --- lib-src/ntlib.h | 2 ++ src/s/ms-w32.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib-src/ntlib.h b/lib-src/ntlib.h index 523e3d6fd49..4dd9cae9796 100644 --- a/lib-src/ntlib.h +++ b/lib-src/ntlib.h @@ -90,7 +90,9 @@ int fchown (int fd, int uid, int gid); #define fcloseall _fcloseall #define fdopen _fdopen #define fgetchar _fgetchar +#ifndef fileno #define fileno _fileno +#endif #define flushall _flushall #define fputchar _fputchar #define getcwd _getcwd diff --git a/src/s/ms-w32.h b/src/s/ms-w32.h index 709b32f1452..998c1f7cf05 100644 --- a/src/s/ms-w32.h +++ b/src/s/ms-w32.h @@ -354,7 +354,9 @@ Boston, MA 02111-1307, USA. */ #define fcloseall _fcloseall #define fdopen _fdopen #define fgetchar _fgetchar +#ifndef fileno #define fileno _fileno +#endif #define flushall _flushall #define fputchar _fputchar #define fsync _commit From cce55b8e955d0887b91ee077532388d891d41f10 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Jun 2005 20:25:50 +0000 Subject: [PATCH 273/294] (getpwnam, getpwuid): Add prototypes. --- nt/inc/pwd.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nt/inc/pwd.h b/nt/inc/pwd.h index 11f5669b0f0..31c0df7ec30 100644 --- a/nt/inc/pwd.h +++ b/nt/inc/pwd.h @@ -18,6 +18,10 @@ struct passwd { typedef int uid_t; typedef uid_t gid_t; +struct passwd * getpwnam (char *); +struct passwd * getpwuid (int); + + #endif /* _PWD_H_ */ /* arch-tag: 68308424-cb2b-49ed-bb52-b347fee416bf From 6e60256665d21eab02d22b9488d68cfc751f8eec Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Jun 2005 20:39:15 +0000 Subject: [PATCH 274/294] (gettimeofday): Use struct _timeb, not struct timeb. (open_unc_volume): Cast return value of map_w32_filename, to avoid compiler warnings. --- src/w32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/w32.c b/src/w32.c index cdc41a8c772..8707732fd6c 100644 --- a/src/w32.c +++ b/src/w32.c @@ -1273,7 +1273,7 @@ get_emacs_configuration_options (void) void gettimeofday (struct timeval *tv, struct timezone *tz) { - struct timeb tb; + struct _timeb tb; _ftime (&tb); tv->tv_sec = tb.time; @@ -1777,7 +1777,7 @@ open_unc_volume (const char *path) nr.dwDisplayType = RESOURCEDISPLAYTYPE_SERVER; nr.dwUsage = RESOURCEUSAGE_CONTAINER; nr.lpLocalName = NULL; - nr.lpRemoteName = map_w32_filename (path, NULL); + nr.lpRemoteName = (LPSTR)map_w32_filename (path, NULL); nr.lpComment = NULL; nr.lpProvider = NULL; From 1a8fb4262f0bfaa1244885834feb8963dd615d6a Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Jun 2005 20:40:00 +0000 Subject: [PATCH 275/294] *** empty log message *** --- lib-src/ChangeLog | 4 ++++ nt/ChangeLog | 4 ++++ src/ChangeLog | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index aa9d3fe7fc6..196d2fe70dc 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,7 @@ +2005-06-04 Eli Zaretskii + + * ntlib.h (fileno): Don't define if already defined. + 2005-05-25 Thien-Thi Nguyen * yow.c (setup_yow): Use EXIT_FAILURE in case no separators found. diff --git a/nt/ChangeLog b/nt/ChangeLog index 33507ef581d..5061cec0d8f 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,7 @@ +2005-06-04 Eli Zaretskii + + * inc/pwd.h (getpwnam, getpwuid): Add prototypes. + 2005-05-24 Juanma Barranquero * INSTALL: Add more pointers to ports of Unix tools to Windows, diff --git a/src/ChangeLog b/src/ChangeLog index f4f9b8d6537..3c72b4e7982 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2005-06-04 Eli Zaretskii + * w32.c (gettimeofday): Use struct _timeb, not struct timeb. + (open_unc_volume): Cast return value of map_w32_filename, to avoid + compiler warnings. + * s/ms-w32.h (fileno): Don't define if already defined. * emacs.c: Include w32heap.h, to avoid compiler warning about From 2f7e1f5aa99b55a8dcd0df4fe9c7e46964c44a9d Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sat, 4 Jun 2005 22:04:29 +0000 Subject: [PATCH 276/294] (eval-expression-print-level) (eval-expression-print-length, eval-expression-debug-on-error): Doc fixes. --- lisp/simple.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index 9a4ba9badcf..ddd2b752a37 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -920,21 +920,21 @@ in *Help* buffer. See also the command `describe-char'." (defvar read-expression-history nil) (defcustom eval-expression-print-level 4 - "*Value to use for `print-level' when printing value in `eval-expression'. + "Value for `print-level' while printing value in `eval-expression'. A value of nil means no limit." :group 'lisp :type '(choice (const :tag "No Limit" nil) integer) :version "21.1") (defcustom eval-expression-print-length 12 - "*Value to use for `print-length' when printing value in `eval-expression'. + "Value for `print-length' while printing value in `eval-expression'. A value of nil means no limit." :group 'lisp :type '(choice (const :tag "No Limit" nil) integer) :version "21.1") (defcustom eval-expression-debug-on-error t - "*Non-nil means set `debug-on-error' when evaluating in `eval-expression'. + "If non-nil set `debug-on-error' to t in `eval-expression'. If nil, don't change the value of `debug-on-error'." :group 'lisp :type 'boolean From 876daebc85940a3c6ff11c7077e1d74c87d87705 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sat, 4 Jun 2005 22:13:57 +0000 Subject: [PATCH 277/294] (define-global-minor-mode): Make it keep track of which major mode it enabled the minor mode for. Use find-file-hook again. Update docstring. --- lisp/emacs-lisp/easy-mmode.el | 66 +++++++++++++++++++++++++---------- 1 file changed, 47 insertions(+), 19 deletions(-) diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 188dc172e07..bb0fa666217 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -271,14 +271,26 @@ With zero or negative ARG turn mode off. TURN-ON is a function that will be called with no args in every buffer and that should try to turn MODE on if applicable for that buffer. KEYS is a list of CL-style keyword arguments: -:group to specify the custom group." +:group to specify the custom group. + +If MODE's set-up depends on the major mode in effect when it was +enabled, then disabling and reenabling MODE should make MODE work +correctly with the current major mode. This is important to +prevent problems with derived modes, that is, major modes that +call another major mode in their body." + (let* ((global-mode-name (symbol-name global-mode)) (pretty-name (easy-mmode-pretty-mode-name mode)) (pretty-global-name (easy-mmode-pretty-mode-name global-mode)) (group nil) (extra-args nil) - (buffers (intern (concat global-mode-name "-buffers"))) - (cmmh (intern (concat global-mode-name "-cmmh")))) + (MODE-buffers (intern (concat global-mode-name "-buffers"))) + (MODE-enable-in-buffers + (intern (concat global-mode-name "-enable-in-buffers"))) + (MODE-check-buffers + (intern (concat global-mode-name "-check-buffers"))) + (MODE-cmhh (intern (concat global-mode-name "-cmhh"))) + (MODE-major-mode (intern (concat (symbol-name mode) "-major-mode")))) ;; Check keys. (while (keywordp (car keys)) @@ -294,6 +306,8 @@ KEYS is a list of CL-style keyword arguments: "-mode\\'" "" (symbol-name mode)))))) `(progn + (defvar ,MODE-major-mode nil) + (make-variable-buffer-local ',MODE-major-mode) ;; The actual global minor-mode (define-minor-mode ,global-mode ,(format "Toggle %s in every buffer. @@ -306,10 +320,13 @@ in which `%s' turns it on." ;; Setup hook to handle future mode changes and new buffers. (if ,global-mode (progn - (add-hook 'after-change-major-mode-hook ',buffers) - (add-hook 'change-major-mode-hook ',cmmh)) - (remove-hook 'after-change-major-mode-hook ',buffers) - (remove-hook 'change-major-mode-hook ',cmmh)) + (add-hook 'after-change-major-mode-hook + ',MODE-enable-in-buffers) + (add-hook 'find-file-hook ',MODE-check-buffers) + (add-hook 'change-major-mode-hook ',MODE-cmhh)) + (remove-hook 'after-change-major-mode-hook ',MODE-enable-in-buffers) + (remove-hook 'find-file-hook ',MODE-check-buffers) + (remove-hook 'change-major-mode-hook ',MODE-cmhh)) ;; Go through existing buffers. (dolist (buf (buffer-list)) @@ -321,22 +338,33 @@ in which `%s' turns it on." :autoload-end ;; List of buffers left to process. - (defvar ,buffers nil) + (defvar ,MODE-buffers nil) ;; The function that calls TURN-ON in each buffer. - (defun ,buffers () - (remove-hook 'post-command-hook ',buffers) - (while ,buffers - (let ((buf (pop ,buffers))) - (when (buffer-live-p buf) - (with-current-buffer buf (,turn-on)))))) - (put ',buffers 'definition-name ',global-mode) + (defun ,MODE-enable-in-buffers () + (dolist (buf ,MODE-buffers) + (when (buffer-live-p buf) + (with-current-buffer buf + (if ,mode + (unless (eq ,MODE-major-mode major-mode) + (,mode -1) + (,turn-on) + (setq ,MODE-major-mode major-mode)) + (,turn-on) + (setq ,MODE-major-mode major-mode)))))) + (put ',MODE-enable-in-buffers 'definition-name ',global-mode) + + (defun ,MODE-check-buffers () + (,MODE-enable-in-buffers) + (setq ,MODE-buffers nil) + (remove-hook 'post-command-hook ',MODE-check-buffers)) + (put ',MODE-check-buffers 'definition-name ',global-mode) ;; The function that catches kill-all-local-variables. - (defun ,cmmh () - (add-to-list ',buffers (current-buffer)) - (add-hook 'post-command-hook ',buffers)) - (put ',cmmh 'definition-name ',global-mode)))) + (defun ,MODE-cmhh () + (add-to-list ',MODE-buffers (current-buffer)) + (add-hook 'post-command-hook ',MODE-check-buffers)) + (put ',MODE-cmhh 'definition-name ',global-mode)))) ;;; ;;; easy-mmode-defmap From 642b63e8b7b4af042904c1ade61e1e0ea647a8ee Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sat, 4 Jun 2005 22:18:53 +0000 Subject: [PATCH 278/294] (font-lock-mode-major-mode): Compiler defvar. (font-lock-mode): Update `font-lock-mode-major-mode'. (font-lock-set-defaults): Compiler defvar. (font-lock-default-function): Take `font-lock-mode-major-mode' into account. --- lisp/font-core.el | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/lisp/font-core.el b/lisp/font-core.el index 056c1b3515b..a78e21a762f 100644 --- a/lisp/font-core.el +++ b/lisp/font-core.el @@ -88,6 +88,8 @@ settings. See the variable `font-lock-defaults', which takes precedence.") It will be passed one argument, which is the current value of `font-lock-mode'.") +;; The mode for which font-lock was initialized, or nil if none. +(defvar font-lock-mode-major-mode) (define-minor-mode font-lock-mode "Toggle Font Lock mode. With arg, turn Font Lock mode off if and only if arg is a non-positive @@ -156,7 +158,9 @@ your own function which is called when `font-lock-mode' is toggled via ;; Arrange to unfontify this buffer if we change major mode later. (if font-lock-mode (add-hook 'change-major-mode-hook 'font-lock-change-mode nil t) - (remove-hook 'change-major-mode-hook 'font-lock-change-mode t))) + (remove-hook 'change-major-mode-hook 'font-lock-change-mode t)) + (when font-lock-mode + (setq font-lock-mode-major-mode major-mode))) ;; Get rid of fontification for the old major mode. ;; We do this when changing major modes. @@ -175,6 +179,7 @@ this function onto `change-major-mode-hook'." '(font-lock-face))) (restore-buffer-modified-p modp))) +(defvar font-lock-set-defaults) (defun font-lock-default-function (mode) ;; Turn on Font Lock mode. (when mode @@ -201,9 +206,14 @@ this function onto `change-major-mode-hook'." ;; Only do hard work if the mode has specified stuff in ;; `font-lock-defaults'. (when (or font-lock-defaults - (and (boundp 'font-lock-keywords) font-lock-keywords) + (if (boundp 'font-lock-keywords) font-lock-keywords) (with-no-warnings - (cdr (assq major-mode font-lock-defaults-alist)))) + (cdr (assq major-mode font-lock-defaults-alist))) + (and mode + (boundp 'font-lock-set-defaults) + font-lock-set-defaults + font-lock-mode-major-mode + (not (eq font-lock-mode-major-mode major-mode)))) (font-lock-mode-internal mode))) (defun turn-on-font-lock () From bed88438516314839b49b2dc2bf2c46522a59a24 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sat, 4 Jun 2005 22:23:44 +0000 Subject: [PATCH 279/294] (font-lock-add-keywords): Doc fix. Comment change. (font-lock-remove-keywords): Doc fix. (font-lock-mode-major-mode): Compiler defvar. (font-lock-set-defaults): Use `font-lock-mode-major-mode '. --- lisp/font-lock.el | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/lisp/font-lock.el b/lisp/font-lock.el index d2507474f12..691f617cfb0 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -683,9 +683,22 @@ For example: adds two fontification patterns for C mode, to fontify `FIXME:' words, even in comments, and to fontify `and', `or' and `not' words as keywords. -When used from a Lisp program (such as a minor mode), it is recommended to -use nil for MODE (and place the call on a hook) to avoid subtle problems -due to details of the implementation. +The above procedure will only add the keywords for C mode, not +for modes derived from C mode. To add them for derived modes too, +pass nil for MODE and add the call to c-mode-hook. + +For example: + + (add-hook 'c-mode-hook + (lambda () + (font-lock-add-keywords 'c-mode + '((\"\\\\\\=<\\\\(FIXME\\\\):\" 1 font-lock-warning-face prepend) + (\"\\\\\\=<\\\\(and\\\\|or\\\\|not\\\\)\\\\\\=>\" . + font-lock-keyword-face))))) + +The above procedure may fail to add keywords to derived modes if +some involved major mode does not follow the standard conventions. +File a bug report if this happens, so the major mode can be corrected. Note that some modes have specialized support for additional patterns, e.g., see the variables `c-font-lock-extra-types', `c++-font-lock-extra-types', @@ -704,7 +717,8 @@ see the variables `c-font-lock-extra-types', `c++-font-lock-extra-types', (font-lock-update-removed-keyword-alist mode keywords append)) (t ;; Otherwise set or add the keywords now. - ;; This is a no-op if it has been done already in this buffer. + ;; This is a no-op if it has been done already in this buffer + ;; for the correct major mode. (font-lock-set-defaults) (let ((was-compiled (eq (car font-lock-keywords) t))) ;; Bring back the user-level (uncompiled) keywords. @@ -774,9 +788,11 @@ see the variables `c-font-lock-extra-types', `c++-font-lock-extra-types', MODE should be a symbol, the major mode command name, such as `c-mode' or nil. If nil, highlighting keywords are removed for the current buffer. -When used from a Lisp program (such as a minor mode), it is recommended to -use nil for MODE (and place the call on a hook) to avoid subtle problems -due to details of the implementation." +To make the removal apply to modes derived from MODE as well, +pass nil for MODE and add the call to MODE-hook. This may fail +for some derived modes if some involved major mode does not +follow the standard conventions. File a bug report if this +happens, so the major mode can be corrected." (cond (mode ;; Remove one keyword at the time. (dolist (keyword keywords) @@ -1571,12 +1587,14 @@ A LEVEL of nil is equal to a LEVEL of 0, a LEVEL of t is equal to (defvar font-lock-set-defaults nil) ; Whether we have set up defaults. +(defvar font-lock-mode-major-mode) (defun font-lock-set-defaults () "Set fontification defaults appropriately for this mode. Sets various variables using `font-lock-defaults' (or, if nil, using `font-lock-defaults-alist') and `font-lock-maximum-decoration'." - ;; Set fontification defaults iff not previously set. - (unless font-lock-set-defaults + ;; Set fontification defaults iff not previously set for correct major mode. + (unless (and font-lock-set-defaults + (eq font-lock-mode-major-mode major-mode)) (set (make-local-variable 'font-lock-set-defaults) t) (make-local-variable 'font-lock-fontified) (make-local-variable 'font-lock-multiline) From e0a8aa091c57fd3435363550b615f54dba06aa41 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sat, 4 Jun 2005 22:27:57 +0000 Subject: [PATCH 280/294] (article-update-date-lapsed): Use `save-match-data'. --- lisp/gnus/gnus-art.el | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 7bc2e938071..498596dd63c 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -3038,20 +3038,21 @@ function and want to see what the date was before converting." (defun article-update-date-lapsed () "Function to be run from a timer to update the lapsed time line." - (let (deactivate-mark) - (save-excursion - (ignore-errors - (walk-windows - (lambda (w) - (set-buffer (window-buffer w)) - (when (eq major-mode 'gnus-article-mode) - (let ((mark (point-marker))) - (goto-char (point-min)) - (when (re-search-forward "^X-Sent:" nil t) - (article-date-lapsed t)) - (goto-char (marker-position mark)) - (move-marker mark nil)))) - nil 'visible))))) + (save-match-data + (let (deactivate-mark) + (save-excursion + (ignore-errors + (walk-windows + (lambda (w) + (set-buffer (window-buffer w)) + (when (eq major-mode 'gnus-article-mode) + (let ((mark (point-marker))) + (goto-char (point-min)) + (when (re-search-forward "^X-Sent:" nil t) + (article-date-lapsed t)) + (goto-char (marker-position mark)) + (move-marker mark nil)))) + nil 'visible)))))) (defun gnus-start-date-timer (&optional n) "Start a timer to update the X-Sent header in the article buffers. From bfe5418b470c16c386a95d2f91a1608d85600a13 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sat, 4 Jun 2005 22:33:53 +0000 Subject: [PATCH 281/294] *** empty log message *** --- lisp/ChangeLog | 23 ++++++++++++++++++++++- lisp/gnus/ChangeLog | 4 ++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7b9058c6284..6eb51bffa84 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,24 @@ +2005-06-04 Luc Teirlinck + + * font-lock.el (font-lock-add-keywords): Doc fix. Comment change. + (font-lock-remove-keywords): Doc fix. + (font-lock-mode-major-mode): Compiler defvar. + (font-lock-set-defaults): Use `font-lock-mode-major-mode'. + + * font-core.el (font-lock-mode-major-mode): Compiler defvar. + (font-lock-mode): Update `font-lock-mode-major-mode'. + (font-lock-set-defaults): Compiler defvar. + (font-lock-default-function): Take `font-lock-mode-major-mode' + into account. + + * emacs-lisp/easy-mmode.el (define-global-minor-mode): Make it + keep track of which major mode it enabled the minor mode for. + Use find-file-hook again. Update docstring. + + * simple.el (eval-expression-print-level) + (eval-expression-print-length, eval-expression-debug-on-error): + Doc fixes. + 2005-06-04 Matt Hodges * iswitchb.el (iswitchb-single-match-face) @@ -15,7 +36,7 @@ (iswitchb-completions): Add check for complete match when entering a regexp. (iswitchb-completions): Remove require-match argument. - (iswitchb-exhibit): Fix caller. + (iswitchb-exhibit): Fix caller. (iswitchb-common-match-inserted): New variable. (iswitchb-complete, iswitchb-completion-help): Use it. diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 492852eef68..3681f2fa750 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,7 @@ +2005-06-04 Luc Teirlinck + + * gnus-art.el (article-update-date-lapsed): Use `save-match-data'. + 2005-06-04 Lute Kamstra * nnfolder.el (nnfolder-read-folder): Make sure that undo From 122450096158517f3686d4f33e497b48fa2e88cf Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sun, 5 Jun 2005 03:37:59 +0000 Subject: [PATCH 282/294] (font-lock-set-defaults): Fix omission in last change. --- lisp/font-lock.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 691f617cfb0..1e4e0d188ad 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -1595,6 +1595,7 @@ Sets various variables using `font-lock-defaults' (or, if nil, using ;; Set fontification defaults iff not previously set for correct major mode. (unless (and font-lock-set-defaults (eq font-lock-mode-major-mode major-mode)) + (setq font-lock-mode-major-mode major-mode) (set (make-local-variable 'font-lock-set-defaults) t) (make-local-variable 'font-lock-fontified) (make-local-variable 'font-lock-multiline) From 6bfdb8f0e05b64319a870f4ab762ef08d8c2a0eb Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Sun, 5 Jun 2005 07:37:49 +0000 Subject: [PATCH 283/294] Make background transparent. --- lisp/toolbar/gud-break.xpm | 2 +- lisp/toolbar/gud-cont.xpm | 2 +- lisp/toolbar/gud-down.xpm | 2 +- lisp/toolbar/gud-finish.xpm | 2 +- lisp/toolbar/gud-n.xpm | 2 +- lisp/toolbar/gud-ni.xpm | 2 +- lisp/toolbar/gud-print.xpm | 2 +- lisp/toolbar/gud-remove.xpm | 2 +- lisp/toolbar/gud-run.xpm | 2 +- lisp/toolbar/gud-s.xpm | 2 +- lisp/toolbar/gud-si.xpm | 2 +- lisp/toolbar/gud-until.xpm | 2 +- lisp/toolbar/gud-up.xpm | 2 +- lisp/toolbar/gud-watch.xpm | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lisp/toolbar/gud-break.xpm b/lisp/toolbar/gud-break.xpm index 419955dd109..2ffc2748271 100644 --- a/lisp/toolbar/gud-break.xpm +++ b/lisp/toolbar/gud-break.xpm @@ -1,7 +1,7 @@ /* XPM */ static char * stop_xpm[] = { "24 24 3 1", -" c #C0C0C0C0C0C0", +" c None", ". c #F8F810104040", "X c #F8F8FCFCF8F8", " ", diff --git a/lisp/toolbar/gud-cont.xpm b/lisp/toolbar/gud-cont.xpm index 4863a955bec..9da91af994f 100644 --- a/lisp/toolbar/gud-cont.xpm +++ b/lisp/toolbar/gud-cont.xpm @@ -1,7 +1,7 @@ /* XPM */ static char * continue_xpm[] = { "24 24 6 1", -" c #c0c0c0", +" c None", ". c #cc0033", "X c #d99faa", "o c #616161", diff --git a/lisp/toolbar/gud-down.xpm b/lisp/toolbar/gud-down.xpm index 77e93fdfa19..30f3af89cce 100644 --- a/lisp/toolbar/gud-down.xpm +++ b/lisp/toolbar/gud-down.xpm @@ -1,7 +1,7 @@ /* XPM */ static char * down_xpm[] = { "24 24 14 1", -" c #C0C0C0C0C0C0", +" c None", ". c #000000000000", "X c #7F7F7F7F7F7F", "o c #2D2D2D2D2D2D", diff --git a/lisp/toolbar/gud-finish.xpm b/lisp/toolbar/gud-finish.xpm index 59066450ee3..0310f07e8da 100644 --- a/lisp/toolbar/gud-finish.xpm +++ b/lisp/toolbar/gud-finish.xpm @@ -1,7 +1,7 @@ /* XPM */ static char * finish_xpm[] = { "24 24 7 1", -" c #c0c0c0", +" c None", ". c #cc0033", "X c #616161", "o c #2a1f55", diff --git a/lisp/toolbar/gud-n.xpm b/lisp/toolbar/gud-n.xpm index 0e631de18e1..f0257da5cf0 100644 --- a/lisp/toolbar/gud-n.xpm +++ b/lisp/toolbar/gud-n.xpm @@ -1,7 +1,7 @@ /* XPM */ static char * next_xpm[] = { "24 24 7 1", -" c #c0c0c0", +" c None", ". c #cc0033", "X c #616161", "o c #2a1f55", diff --git a/lisp/toolbar/gud-ni.xpm b/lisp/toolbar/gud-ni.xpm index cdb8c38e8d4..bd4f02db12e 100644 --- a/lisp/toolbar/gud-ni.xpm +++ b/lisp/toolbar/gud-ni.xpm @@ -1,7 +1,7 @@ /* XPM */ static char * gud_nexti_xpm[] = { "24 24 6 1", -" c #C0C0C0C0C0C0", +" c None", ". c #CCCC00003333", "X c #616161616161", "o c #D4D400000000", diff --git a/lisp/toolbar/gud-print.xpm b/lisp/toolbar/gud-print.xpm index cab2b7d6109..e1e7c623355 100644 --- a/lisp/toolbar/gud-print.xpm +++ b/lisp/toolbar/gud-print.xpm @@ -1,7 +1,7 @@ /* XPM */ static char * print_xpm[] = { "24 24 2 1", -" c #C0C0C0C0C0C0", +" c None", ". c #000000000000", " ", " ", diff --git a/lisp/toolbar/gud-remove.xpm b/lisp/toolbar/gud-remove.xpm index c61b6b2b8f3..5f38bd416ed 100644 --- a/lisp/toolbar/gud-remove.xpm +++ b/lisp/toolbar/gud-remove.xpm @@ -1,7 +1,7 @@ /* XPM */ static char * go_xpm[] = { "24 24 4 1", -" c #C0C0C0C0C0C0", +" c None", ". c #000080800000", "X c #FFFFFFFFFFFF", "o c #F8F8FCFCF8F8", diff --git a/lisp/toolbar/gud-run.xpm b/lisp/toolbar/gud-run.xpm index 6e077a11659..ef29662ed24 100644 --- a/lisp/toolbar/gud-run.xpm +++ b/lisp/toolbar/gud-run.xpm @@ -1,7 +1,7 @@ /* XPM */ static char * run_xpm[] = { "24 24 9 1", -" c #c0c0c0", +" c None", ". c #000080", "X c #aa9faa", "o c #b5b9b5", diff --git a/lisp/toolbar/gud-s.xpm b/lisp/toolbar/gud-s.xpm index 7b4eb876235..4ee3eccaee2 100644 --- a/lisp/toolbar/gud-s.xpm +++ b/lisp/toolbar/gud-s.xpm @@ -1,7 +1,7 @@ /* XPM */ static char * step_xpm[] = { "24 24 6 1", -" c #c0c0c0", +" c None", ". c #d40000", "X c #616161", "o c #2a1f55", diff --git a/lisp/toolbar/gud-si.xpm b/lisp/toolbar/gud-si.xpm index d2667fc70b6..b20eb6243f7 100644 --- a/lisp/toolbar/gud-si.xpm +++ b/lisp/toolbar/gud-si.xpm @@ -1,7 +1,7 @@ /* XPM */ static char * gud_stepi_xpm[] = { "24 24 5 1", -" c #C0C0C0C0C0C0", +" c None", ". c #D4D400000000", "X c #616161616161", "o c #2A2A1F1F5555", diff --git a/lisp/toolbar/gud-until.xpm b/lisp/toolbar/gud-until.xpm index 8801320a2d1..f82da6700b2 100644 --- a/lisp/toolbar/gud-until.xpm +++ b/lisp/toolbar/gud-until.xpm @@ -1,7 +1,7 @@ /* XPM */ static char * goto_xpm[] = { "24 24 6 1", -" c #c0c0c0", +" c None", ". c #ff0000", "X c #616161", "o c #2a1f55", diff --git a/lisp/toolbar/gud-up.xpm b/lisp/toolbar/gud-up.xpm index 10d8c1278c9..c2e4c9f8ff4 100644 --- a/lisp/toolbar/gud-up.xpm +++ b/lisp/toolbar/gud-up.xpm @@ -1,7 +1,7 @@ /* XPM */ static char * up_xpm[] = { "24 24 14 1", -" c #C0C0C0C0C0C0", +" c None", ". c #000000000000", "X c #7F7F7F7F7F7F", "o c #2D2D2D2D2D2D", diff --git a/lisp/toolbar/gud-watch.xpm b/lisp/toolbar/gud-watch.xpm index 41361dc32b2..52052212390 100644 --- a/lisp/toolbar/gud-watch.xpm +++ b/lisp/toolbar/gud-watch.xpm @@ -1,7 +1,7 @@ /* XPM */ static char * watch_xpm[] = { "24 24 11 1", -" c #C0C0C0C0C0C0", +" c None", ". c #808080808080", "X c #000000000000", "o c #A5A59F9FA3A3", From c1205dadcd5094cdadc68e1e0eb90bc5d7f2f9c4 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Sun, 5 Jun 2005 07:50:04 +0000 Subject: [PATCH 284/294] *** empty log message *** --- lisp/ChangeLog | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6eb51bffa84..4f768fb526a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,22 @@ +2005-06-05 Nick Roberts + + * progmodes/gdb-ui.el (gdb-info-locals-handler): Use window point + to preserve point. + (gdb-find-file-hook): Add doc string. + + * progmodes/gud.el (gdb, gud-menu-map): Add command to evaluate + C dereferenced pointer expression. + (gud-tool-bar-map): Put it on the tool bar. + + * toolbar/gud-pstar.xpm, toolbar/gud-pstar.pbm: New files. + + * toolbar/gud-break.xpm, toolbar/gud-cont.xpm, toolbar/gud-down.xpm, + toolbar/gud-finish.xpm, toolbar/gud-ni.xpm, toolbar/gud-n.xpm, + toolbar/gud-print.xpm, toolbar/gud-remove.xpm, toolbar/gud-run.xpm, + toolbar/gud-si.xpm, toolbar/gud-s.xpm, toolbar/gud-until.xpm, + toolbar/gud-up.xpm, toolbar/gud-watch.xpm: + Make background transparent. + 2005-06-04 Luc Teirlinck * font-lock.el (font-lock-add-keywords): Doc fix. Comment change. @@ -132,8 +151,8 @@ (gdb-info-breakpoints-custom, gdb-delete-breakpoint) (gdb-goto-breakpoint, gdb-source-info, gdb-get-location) (gdb-assembler-custom): Improve regexps. - (def-gdb-auto-update-handler): Use window point to ensure it - is preserved. + (def-gdb-auto-update-handler): Use window point to preserve + point. 2005-05-31 Stefan Monnier From 32759db597d9c02f23e557a628ee76ad230c096f Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Sun, 5 Jun 2005 07:54:50 +0000 Subject: [PATCH 285/294] (gdb, gud-menu-map): Add command to evaluate C dereferenced pointer expression. (gud-tool-bar-map): Put it on the tool bar. --- lisp/ChangeLog | 2 +- lisp/progmodes/gud.el | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4f768fb526a..8e33fcfc3a6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -6,7 +6,7 @@ * progmodes/gud.el (gdb, gud-menu-map): Add command to evaluate C dereferenced pointer expression. - (gud-tool-bar-map): Put it on the tool bar. + (gud-tool-bar-map): Put it on the tool bar. Re-order icons. * toolbar/gud-pstar.xpm, toolbar/gud-pstar.pbm: New files. diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 31b9e7d7204..f3a95514c13 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -140,6 +140,9 @@ Used to grey out relevant togolbar icons.") :enable (and (not gud-running) (memq gud-minor-mode '(gdbmi gdba gdb dbx xdb jdb pdb bashdb)))) + ([print*] menu-item "Print Dereference" gud-pstar + :enable (and (not gud-running) + (memq gud-minor-mode '(gdbmi gdba gdb)))) ([print] menu-item "Print Expression" gud-print :enable (not gud-running)) ([watch] menu-item "Watch Expression" gud-watch @@ -183,18 +186,19 @@ Used to grey out relevant togolbar icons.") (dolist (x '((gud-break . "gud-break") (gud-remove . "gud-remove") (gud-print . "gud-print") + (gud-pstar . "gud-pstar") (gud-watch . "gud-watch") - (gud-run . "gud-run") - (gud-until . "gud-until") (gud-cont . "gud-cont") + (gud-until . "gud-until") + (gud-finish . "gud-finish") + (gud-run . "gud-run") ;; gud-s, gud-si etc. instead of gud-step, ;; gud-stepi, to avoid file-name clashes on DOS ;; 8+3 filesystems. - (gud-step . "gud-s") (gud-next . "gud-n") - (gud-finish . "gud-finish") - (gud-stepi . "gud-si") + (gud-step . "gud-s") (gud-nexti . "gud-ni") + (gud-stepi . "gud-si") (gud-up . "gud-up") (gud-down . "gud-down") (gud-goto-info . "info")) @@ -580,6 +584,8 @@ and source-file directory for your debugger." (gud-def gud-up "up %p" "<" "Up N stack frames (numeric arg).") (gud-def gud-down "down %p" ">" "Down N stack frames (numeric arg).") (gud-def gud-print "print %e" "\C-p" "Evaluate C expression at point.") + (gud-def gud-pstar "print* %e" nil + "Evaluate C dereferenced pointer expression at point.") (gud-def gud-until "until %l" "\C-u" "Continue to current line.") (gud-def gud-run "run" nil "Run the program.") From 2884ae6dc64517d00ed2f0156c18e8d306af81b3 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Sun, 5 Jun 2005 07:55:32 +0000 Subject: [PATCH 286/294] (gdb-info-locals-handler): Use window point to preserve point. (gdb-find-file-hook): Add doc string. --- lisp/progmodes/gdb-ui.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index a9274cfcae7..7e2022cc11c 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -2058,12 +2058,12 @@ corresponding to the mode line clicked." (replace-match " (array);\n" nil nil)))) (let ((buf (gdb-get-buffer 'gdb-locals-buffer))) (and buf (with-current-buffer buf - (let ((p (point)) + (let ((p (window-point (get-buffer-window buf 0))) (buffer-read-only nil)) - (delete-region (point-min) (point-max)) + (erase-buffer) (insert-buffer-substring (gdb-get-create-buffer 'gdb-partial-output-buffer)) - (goto-char p))))) + (set-window-point (get-buffer-window buf 0) p))))) (run-hooks 'gdb-info-locals-hook)) (defun gdb-info-locals-custom () @@ -2341,6 +2341,8 @@ Add directory to search path for source files using the GDB command, dir.")) (add-hook 'find-file-hook 'gdb-find-file-hook) (defun gdb-find-file-hook () +"Set up buffer for debugging if file is part of the source code +of the current session." (if (and (not gdb-find-file-unhook) ;; in case gud or gdb-ui is just loaded gud-comint-buffer From 02389254fab858a2cb119fc36dbbfb337dcdd1cb Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Sun, 5 Jun 2005 08:04:35 +0000 Subject: [PATCH 287/294] Icon for GUD to print dereferenced value --- lisp/toolbar/gud-pstar.pbm | Bin 0 -> 81 bytes lisp/toolbar/gud-pstar.xbm | 10 ++++++++++ lisp/toolbar/gud-pstar.xpm | 29 +++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 lisp/toolbar/gud-pstar.pbm create mode 100644 lisp/toolbar/gud-pstar.xbm create mode 100644 lisp/toolbar/gud-pstar.xpm diff --git a/lisp/toolbar/gud-pstar.pbm b/lisp/toolbar/gud-pstar.pbm new file mode 100644 index 0000000000000000000000000000000000000000..1f5967107a095e48924d593720d5bb877f581b74 GIT binary patch literal 81 wcmWGA;W9E&Ff!p{zy-<~7_1u@3_BPMS1}mQ0h1jJ)(i}03=9S^RDsY808DxaB>(^b literal 0 HcmV?d00001 diff --git a/lisp/toolbar/gud-pstar.xbm b/lisp/toolbar/gud-pstar.xbm new file mode 100644 index 00000000000..6e5bafddddd --- /dev/null +++ b/lisp/toolbar/gud-pstar.xbm @@ -0,0 +1,10 @@ +#define gud-pstar_width 24 +#define gud-pstar_height 24 +static unsigned char gud-pstar_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xee, 0x00, 0x00, 0xdc, 0x01, 0x00, 0x8c, 0x11, 0x00, 0x8c, 0x55, + 0x00, 0x8c, 0x39, 0x00, 0x8c, 0x55, 0x00, 0x8c, 0x11, 0x00, 0xdc, 0x00, + 0x00, 0x6c, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x0c, 0x00, + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }; diff --git a/lisp/toolbar/gud-pstar.xpm b/lisp/toolbar/gud-pstar.xpm new file mode 100644 index 00000000000..6edc603db14 --- /dev/null +++ b/lisp/toolbar/gud-pstar.xpm @@ -0,0 +1,29 @@ +/* XPM */ +static char * gud_pstar_xpm[] = { +"24 24 2 1", +" c #BDBDBEBEBDBD", +". c #000000000000", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ... ... ", +" ... ... ", +" .. .. . ", +" .. .. . . . ", +" .. .. ... ", +" .. .. . . . ", +" .. .. . ", +" ... .. ", +" .. .. ", +" .. ", +" .. ", +" .. ", +" .... ", +" ", +" ", +" "}; From bfa171a51621bce0045b6f182c8d34b9981da844 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Sun, 5 Jun 2005 08:06:55 +0000 Subject: [PATCH 288/294] Wrong format --- lisp/toolbar/gud-pstar.xbm | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 lisp/toolbar/gud-pstar.xbm diff --git a/lisp/toolbar/gud-pstar.xbm b/lisp/toolbar/gud-pstar.xbm deleted file mode 100644 index 6e5bafddddd..00000000000 --- a/lisp/toolbar/gud-pstar.xbm +++ /dev/null @@ -1,10 +0,0 @@ -#define gud-pstar_width 24 -#define gud-pstar_height 24 -static unsigned char gud-pstar_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xee, 0x00, 0x00, 0xdc, 0x01, 0x00, 0x8c, 0x11, 0x00, 0x8c, 0x55, - 0x00, 0x8c, 0x39, 0x00, 0x8c, 0x55, 0x00, 0x8c, 0x11, 0x00, 0xdc, 0x00, - 0x00, 0x6c, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x0c, 0x00, - 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - }; From 17a7c5c2b024a97106c865f76e2cbd3b90591615 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 5 Jun 2005 17:09:55 +0000 Subject: [PATCH 289/294] *** empty log message *** --- src/ChangeLog | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 3c72b4e7982..12fc70289aa 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -6,8 +6,7 @@ * s/ms-w32.h (fileno): Don't define if already defined. - * emacs.c: Include w32heap.h, to avoid compiler warning about - sbrk. + * emacs.c: Include w32heap.h, to avoid compiler warning about sbrk. * makefile.w32-in (DOC): Define to point to the generated DOC-X. From 98f4a29ed64ec93f04324919c0789b10925aa6d4 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 5 Jun 2005 17:19:55 +0000 Subject: [PATCH 290/294] Add comment to line-move re. sit-for. --- lisp/simple.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/simple.el b/lisp/simple.el index ddd2b752a37..6d6c3806889 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3365,6 +3365,8 @@ Outline mode sets this." (set-window-vscroll nil 0) (when (line-move-1 arg noerror to-end) (when (not forward) + ;; Update display before calling pos-visible-in-window-p, + ;; because it depends on window-start being up-to-date. (sit-for 0) (if (and (setq part (nth 2 (pos-visible-in-window-p (line-beginning-position) nil t))) From a5a389bb745fa63b3c4299ceb69c903e47de2d6d Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 5 Jun 2005 19:13:37 +0000 Subject: [PATCH 291/294] (sys_setsockopt): Change arg 4 to `const void *'. In the call to pfn_setsockopt, cast optval to `const char *'. --- src/w32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/w32.c b/src/w32.c index 8707732fd6c..1bb4a91ff03 100644 --- a/src/w32.c +++ b/src/w32.c @@ -3207,7 +3207,7 @@ sys_shutdown (int s, int how) } int -sys_setsockopt (int s, int level, int optname, const char * optval, int optlen) +sys_setsockopt (int s, int level, int optname, const void * optval, int optlen) { if (winsock_lib == NULL) { @@ -3219,7 +3219,7 @@ sys_setsockopt (int s, int level, int optname, const char * optval, int optlen) if (fd_info[s].flags & FILE_SOCKET) { int rc = pfn_setsockopt (SOCK_HANDLE (s), level, optname, - optval, optlen); + (const char *)optval, optlen); if (rc == SOCKET_ERROR) set_errno (); return rc; From 727dcb1cc3393c1a584d6c98269f5016c539a528 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 5 Jun 2005 19:16:03 +0000 Subject: [PATCH 292/294] Change arg 4 of sys_setsockopt to `const void *', for consistency with Posix. --- nt/inc/sys/socket.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nt/inc/sys/socket.h b/nt/inc/sys/socket.h index 422a27d1b52..d3936da2a4d 100644 --- a/nt/inc/sys/socket.h +++ b/nt/inc/sys/socket.h @@ -102,7 +102,7 @@ struct hostent * sys_gethostbyname (const char * name); struct servent * sys_getservbyname (const char * name, const char * proto); int sys_getpeername (int s, struct sockaddr *addr, int * namelen); int sys_shutdown (int socket, int how); -int sys_setsockopt (int s, int level, int oname, const char * oval, int olen); +int sys_setsockopt (int s, int level, int oname, const void * oval, int olen); int sys_listen (int s, int backlog); int sys_getsockname (int s, struct sockaddr * name, int * namelen); int sys_accept (int s, struct sockaddr *addr, int *addrlen); From a0c3832890dad9977f12eacd1beafb9c50dd7a12 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 5 Jun 2005 19:16:55 +0000 Subject: [PATCH 293/294] *** empty log message *** --- nt/ChangeLog | 5 +++++ src/ChangeLog | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/nt/ChangeLog b/nt/ChangeLog index 5061cec0d8f..cfc93422a69 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,8 @@ +2005-06-05 Eli Zaretskii + + * inc/sys/socket.h: Change arg 4 of sys_setsockopt to + `const void *', for consistency with Posix. + 2005-06-04 Eli Zaretskii * inc/pwd.h (getpwnam, getpwuid): Add prototypes. diff --git a/src/ChangeLog b/src/ChangeLog index 12fc70289aa..7ddc5911729 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-06-05 Eli Zaretskii + + * w32.c (sys_setsockopt): Change arg 4 to `const void *'. In the + call to pfn_setsockopt, cast optval to `const char *'. + 2005-06-04 Eli Zaretskii * w32.c (gettimeofday): Use struct _timeb, not struct timeb. From a9b4333620eb259e974445066a8e64cee0c21d69 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Mon, 6 Jun 2005 00:45:57 +0000 Subject: [PATCH 294/294] *** empty log message *** --- src/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 7ddc5911729..f5bbebbb760 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -5129,7 +5129,7 @@ 2004-06-11 Kenichi Handa - * coding.c (decode_coding_string): Check CODING_FINISH_INTERRUPT. + * coding.c (encode_coding_string): Check CODING_FINISH_INTERRUPT. 2004-06-11 Kim F. Storm