From 899a431bae4a7b48a266c5da56610a5ea44febad Mon Sep 17 00:00:00 2001 From: Michael Kifer Date: Fri, 3 Jun 2005 08:04:04 +0000 Subject: 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(-) (limited to 'lisp') 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) + +(defcustom viper-quoted-insert-key "\C-v" + "The key used to quote special characters when inserting them in Insert state." + :type 'string + :group 'viper) -(defvar viper-ESC-key "\e" +(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: ")))) -- cgit v1.2.1 From 3b79dd208da3335459363db7cd6f2c5b04d71b48 Mon Sep 17 00:00:00 2001 From: Daniel Pfeiffer Date: Fri, 3 Jun 2005 08:41:20 +0000 Subject: (compilation-error-regexp-alist-alist): Allow (...) within `...' for makepp messages. --- lisp/progmodes/compile.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp') 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) -- cgit v1.2.1 From 30edba6e09fcc1d64b46e79a3d49a053b92852ae Mon Sep 17 00:00:00 2001 From: Daniel Pfeiffer Date: Fri, 3 Jun 2005 08:47:25 +0000 Subject: (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(-) (limited to 'lisp') 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)))) -- cgit v1.2.1 From 85268d70f3ccd233c49d8ac14224616fe7fb2038 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 3 Jun 2005 09:04:04 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'lisp') 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 -- cgit v1.2.1 From a09be93a894d713ade1c114c4d380c317992295e Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 3 Jun 2005 10:38:05 +0000 Subject: (face-equal): Improve argument/docstring consistency. --- lisp/faces.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp') 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)) -- cgit v1.2.1 From 6312e5f78c6904267e0bebff5b8e9b4138e1491b Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 3 Jun 2005 10:40:12 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lisp') 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) -- cgit v1.2.1 From 76668788b504bdfce0521492a4da5d3cd4de2eeb Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Fri, 3 Jun 2005 11:23:08 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lisp') 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. -- cgit v1.2.1 From 04a5d30f456ea68f17c8fb593e85ef74c9893a81 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Fri, 3 Jun 2005 11:24:06 +0000 Subject: (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(-) (limited to 'lisp') 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)))))) -- cgit v1.2.1 From 774a1a1a82a8e8004ffa4b4d2e477432f8df8476 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 3 Jun 2005 14:18:31 +0000 Subject: Remove conflict marker. --- lisp/ChangeLog | 1 - 1 file changed, 1 deletion(-) (limited to 'lisp') 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. -- cgit v1.2.1 From 14cb9d7b6a02943cb2ef6b904adb021a1b9578a3 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 3 Jun 2005 14:37:04 +0000 Subject: (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(-) (limited to 'lisp') 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)) -- cgit v1.2.1 From 10b234c0f545ddfaebf85fd613267d946f68fb94 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 3 Jun 2005 14:58:02 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lisp') 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 -- cgit v1.2.1 From fab31ec395c7988f08c3a83303832b708a88077b Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 3 Jun 2005 15:03:02 +0000 Subject: (flyspell-check-word-p): Simplify silly compatibility code. --- lisp/ChangeLog | 3 +++ lisp/textmodes/flyspell.el | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'lisp') 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))) -- cgit v1.2.1 From 95f75c759fdf6b43e3c760f6d27fa95377db85d8 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 3 Jun 2005 22:03:47 +0000 Subject: (gnus-emphasis-alist): Disable the strikethru thingy. --- lisp/gnus/ChangeLog | 27 +++++++++++++++------------ lisp/gnus/gnus-art.el | 8 ++++++-- 2 files changed, 21 insertions(+), 14 deletions(-) (limited to 'lisp') 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. -- cgit v1.2.1 From 61e40b6ddef45b4dbcaa9ae53c389b301f49eb3b Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Fri, 3 Jun 2005 23:21:17 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lisp') 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 -- cgit v1.2.1 From ec441ab58305939661aa9029b02a0a9efb933004 Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Fri, 3 Jun 2005 23:21:58 +0000 Subject: (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 | 173 +++++++++++++++++++++++++++++++++--------------------------- 1 file changed, 95 insertions(+), 78 deletions(-) (limited to 'lisp') 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 (text auto wide) + +(defun ido-make-merged-file-list-1 (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))) + (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 (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)))) + (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)))))) - (quit (setq res t))) - (if (and res (not (eq res t))) - (setq res (ido-sort-merged-list res auto))) + (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 + (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) -- cgit v1.2.1 From 555228aa599a4132c51d7daae62377f1e1ae8921 Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Fri, 3 Jun 2005 23:47:56 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lisp') 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 -- cgit v1.2.1 From 0fc367df131fab89a983198790c5437748d6f5cb Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Fri, 3 Jun 2005 23:48:21 +0000 Subject: (line-move): Only call sit-for when moving backwards. --- lisp/simple.el | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'lisp') 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))) -- cgit v1.2.1 From d4755e04910eac135f80e4b222146107e073553b Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Sat, 4 Jun 2005 09:49:25 +0000 Subject: (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(-) (limited to 'lisp') 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 -- cgit v1.2.1 From 86b21ac359d97b255561ef36dc995f72a97d6915 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Jun 2005 18:30:54 +0000 Subject: (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(-) (limited to 'lisp') 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 -- cgit v1.2.1 From b8e517587a71741d7985bf82393352a1220b9d3d Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Jun 2005 18:32:57 +0000 Subject: Simplify last change. --- lisp/url/url-http.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lisp') 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 -- cgit v1.2.1 From 63db9644669f2615430d8301dca7d1d436f1e81d Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Jun 2005 18:37:16 +0000 Subject: (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(-) (limited to 'lisp') 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)))))))))) -- cgit v1.2.1 From 94d4bafbecabcc6e57c5ac7d2e368c082d9f5fb5 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Jun 2005 18:38:17 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lisp') 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 -- cgit v1.2.1 From 2cf248ab2e66c567e0b4722bfc89bb1d64b0fe3c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Jun 2005 18:50:38 +0000 Subject: (iswitchb-get-matched-buffers): Handle invalid-regexp errors in post-command-hook. --- lisp/iswitchb.el | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) (limited to 'lisp') 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) - - (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))) - - (not (iswitchb-ignore-buffername-p name))) - (setq ret (cons name ret)) - ))) - list) + (catch 'invalid-regexp + (mapcar + (lambda (x) + + (if do-string + (setq name x) ;We already have the name + (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))) + + (not (iswitchb-ignore-buffername-p name))) + (setq ret (cons name ret)) + ))) + list)) ret)) (defun iswitchb-ignore-buffername-p (bufname) -- cgit v1.2.1 From b21688f0cadd5fdfd051a3197918c54b0c75bd9e Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Jun 2005 19:10:07 +0000 Subject: (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(-) (limited to 'lisp') 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)) -- cgit v1.2.1 From 910182298af7f21498c03a2edfdf4331539de386 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Jun 2005 19:47:24 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lisp') 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): -- cgit v1.2.1 From b6f0a39717ed4be8f35c059ab32d4b4bd9199129 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 4 Jun 2005 20:09:13 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'lisp') 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) -- cgit v1.2.1 From 2f7e1f5aa99b55a8dcd0df4fe9c7e46964c44a9d Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sat, 4 Jun 2005 22:04:29 +0000 Subject: (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(-) (limited to 'lisp') 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 -- cgit v1.2.1 From 876daebc85940a3c6ff11c7077e1d74c87d87705 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sat, 4 Jun 2005 22:13:57 +0000 Subject: (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(-) (limited to 'lisp') 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 -- cgit v1.2.1 From 642b63e8b7b4af042904c1ade61e1e0ea647a8ee Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sat, 4 Jun 2005 22:18:53 +0000 Subject: (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(-) (limited to 'lisp') 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 () -- cgit v1.2.1 From bed88438516314839b49b2dc2bf2c46522a59a24 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sat, 4 Jun 2005 22:23:44 +0000 Subject: (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(-) (limited to 'lisp') 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) -- cgit v1.2.1 From e0a8aa091c57fd3435363550b615f54dba06aa41 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sat, 4 Jun 2005 22:27:57 +0000 Subject: (article-update-date-lapsed): Use `save-match-data'. --- lisp/gnus/gnus-art.el | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'lisp') 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. -- cgit v1.2.1 From bfe5418b470c16c386a95d2f91a1608d85600a13 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sat, 4 Jun 2005 22:33:53 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 23 ++++++++++++++++++++++- lisp/gnus/ChangeLog | 4 ++++ 2 files changed, 26 insertions(+), 1 deletion(-) (limited to 'lisp') 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 -- cgit v1.2.1 From 122450096158517f3686d4f33e497b48fa2e88cf Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sun, 5 Jun 2005 03:37:59 +0000 Subject: (font-lock-set-defaults): Fix omission in last change. --- lisp/font-lock.el | 1 + 1 file changed, 1 insertion(+) (limited to 'lisp') 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) -- cgit v1.2.1 From 6bfdb8f0e05b64319a870f4ab762ef08d8c2a0eb Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Sun, 5 Jun 2005 07:37:49 +0000 Subject: 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(-) (limited to 'lisp') 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", -- cgit v1.2.1 From c1205dadcd5094cdadc68e1e0eb90bc5d7f2f9c4 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Sun, 5 Jun 2005 07:50:04 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'lisp') 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 -- cgit v1.2.1 From 32759db597d9c02f23e557a628ee76ad230c096f Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Sun, 5 Jun 2005 07:54:50 +0000 Subject: (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(-) (limited to 'lisp') 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.") -- cgit v1.2.1 From 2884ae6dc64517d00ed2f0156c18e8d306af81b3 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Sun, 5 Jun 2005 07:55:32 +0000 Subject: (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(-) (limited to 'lisp') 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 -- cgit v1.2.1 From 02389254fab858a2cb119fc36dbbfb337dcdd1cb Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Sun, 5 Jun 2005 08:04:35 +0000 Subject: 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 (limited to 'lisp') diff --git a/lisp/toolbar/gud-pstar.pbm b/lisp/toolbar/gud-pstar.pbm new file mode 100644 index 00000000000..1f5967107a0 Binary files /dev/null and b/lisp/toolbar/gud-pstar.pbm differ 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", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ... ... ", +" ... ... ", +" .. .. . ", +" .. .. . . . ", +" .. .. ... ", +" .. .. . . . ", +" .. .. . ", +" ... .. ", +" .. .. ", +" .. ", +" .. ", +" .. ", +" .... ", +" ", +" ", +" "}; -- cgit v1.2.1 From bfa171a51621bce0045b6f182c8d34b9981da844 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Sun, 5 Jun 2005 08:06:55 +0000 Subject: Wrong format --- lisp/toolbar/gud-pstar.xbm | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 lisp/toolbar/gud-pstar.xbm (limited to 'lisp') 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, - }; -- cgit v1.2.1 From 98f4a29ed64ec93f04324919c0789b10925aa6d4 Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Sun, 5 Jun 2005 17:19:55 +0000 Subject: Add comment to line-move re. sit-for. --- lisp/simple.el | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lisp') 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))) -- cgit v1.2.1 From f7f1797562b18932d1abf7cf00676ce272fadceb Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 6 Jun 2005 06:16:05 +0000 Subject: (isearchb): Don't pass a spurious second argument to `iswitchb-completions'. --- lisp/ChangeLog | 5 +++++ lisp/isearchb.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8e33fcfc3a6..0bc9e4999fd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-06-06 Juanma Barranquero + + * isearchb.el (isearchb): Don't pass a spurious second argument to + `iswitchb-completions'. + 2005-06-05 Nick Roberts * progmodes/gdb-ui.el (gdb-info-locals-handler): Use window point diff --git a/lisp/isearchb.el b/lisp/isearchb.el index 9714701944f..5c70bd8fc00 100644 --- a/lisp/isearchb.el +++ b/lisp/isearchb.el @@ -151,7 +151,7 @@ It's purpose is to pass different call arguments to (switch-to-buffer buf) (if isearchb-show-completions (message "isearchb: %s%s" iswitchb-text - (iswitchb-completions iswitchb-text nil)) + (iswitchb-completions iswitchb-text)) (if (= 1 (length iswitchb-matches)) (message "isearchb: %s (only match)" iswitchb-text) (message "isearchb: %s" iswitchb-text)))))) -- cgit v1.2.1 From eb78dfb8dd75c2989d0a20c327b6ec4e6e78ce11 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 6 Jun 2005 06:19:52 +0000 Subject: Formatting fixes. --- lisp/ChangeLog | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0bc9e4999fd..b03d78af3cd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -10,16 +10,16 @@ (gdb-find-file-hook): Add doc string. * progmodes/gud.el (gdb, gud-menu-map): Add command to evaluate - C dereferenced pointer expression. + C dereferenced pointer expression. (gud-tool-bar-map): Put it on the tool bar. Re-order icons. * 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: + * 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 -- cgit v1.2.1 From c711faac0a1ef15f18c23e988167d3dbccca1448 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Mon, 6 Jun 2005 12:02:35 +0000 Subject: (font-lock-regexp-backslash) (font-lock-regexp-backslash-construct): New faces. (lisp-font-lock-keywords-2): Use new faces. Match `?:' only after `('. Add `while-no-input' to control structures. --- lisp/font-lock.el | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'lisp') diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 1e4e0d188ad..f75c08151e8 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -905,7 +905,7 @@ The value of this variable is used when Font Lock mode is turned on." 'font-lock-after-change-function t) (set (make-local-variable 'font-lock-fontify-buffer-function) 'jit-lock-refontify) - ;; Don't fontify eagerly (and don't abort is the buffer is large). + ;; Don't fontify eagerly (and don't abort if the buffer is large). (set (make-local-variable 'font-lock-fontified) t) ;; Use jit-lock. (jit-lock-register 'font-lock-fontify-region @@ -1826,6 +1826,17 @@ Sets various variables using `font-lock-defaults' (or, if nil, using "Font Lock mode face used to highlight preprocessor directives." :group 'font-lock-highlighting-faces) +(defface font-lock-regexp-backslash + '((((class color) (min-colors 16)) :inherit escape-glyph) + (t :inherit bold)) + "Font Lock mode face used to highlight a backslash in Lisp regexps." + :group 'font-lock-highlighting-faces) + +(defface font-lock-regexp-backslash-construct + '((t :inherit bold)) + "Font Lock mode face used to highlight `\' constructs in Lisp regexps." + :group 'font-lock-highlighting-faces) + ;;; End of Colour etc. support. ;;; Menu support. @@ -2019,7 +2030,7 @@ This function could be MATCHER in a MATCH-ANCHORED `font-lock-keywords' item." `(;; Control structures. Emacs Lisp forms. (,(concat "(" (regexp-opt - '("cond" "if" "while" "let" "let*" + '("cond" "if" "while" "while-no-input" "let" "let*" "prog" "progn" "progv" "prog1" "prog2" "prog*" "inline" "lambda" "save-restriction" "save-excursion" "save-window-excursion" "save-selected-window" @@ -2075,16 +2086,14 @@ This function could be MATCHER in a MATCH-ANCHORED `font-lock-keywords' item." ;; Make regexp grouping constructs bold, so they stand out, but only ;; in strings. ((lambda (bound) - (if (re-search-forward "\\(\\\\\\\\\\)\\([(|)]\\)\\(\\?:\\)?" bound t) + (if (re-search-forward "\\(\\\\\\\\\\)\\((\\(?:?:\\)?\\|[|)]\\)" bound t) (let ((face (get-text-property (1- (point)) 'face))) (if (listp face) (memq 'font-lock-string-face face) (eq 'font-lock-string-face face))))) - ;; Should we introduce a lowlight face for this? - ;; Ideally that would retain the color, dimmed. - (1 font-lock-comment-face prepend) - (2 'bold prepend) - (3 font-lock-type-face prepend t)) + (1 'font-lock-regexp-backslash prepend) + (2 'font-lock-regexp-backslash-construct prepend)) + ;; Underline innermost grouping, so that you can more easily see what ;; belongs together. 2005-05-12: Font-lock can go into an ;; unbreakable endless loop on this -- something's broken. -- cgit v1.2.1 From a59c277843e219ad178b1b1d84eaf839ab766761 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Mon, 6 Jun 2005 12:18:20 +0000 Subject: (no-break-space, shadow): New faces. (escape-glyph): Use less loud colors pink2 and red4. --- lisp/faces.el | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) (limited to 'lisp') diff --git a/lisp/faces.el b/lisp/faces.el index b821d66f72e..c02c91cde86 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -2084,13 +2084,29 @@ Note: Other faces cannot inherit from the cursor face." :group 'whitespace ; like `show-trailing-whitespace' :group 'basic-faces) -(defface escape-glyph '((((background dark)) :foreground "cyan") - ;; See the comment in minibuffer-prompt for - ;; the reason not to use blue on MS-DOS. - (((type pc)) :foreground "magenta") - (t :foreground "blue")) +(defface escape-glyph + '((((background dark)) :foreground "pink2") + ;; See the comment in minibuffer-prompt for + ;; the reason not to use blue on MS-DOS. + (((type pc)) :foreground "magenta") + (t :foreground "red4")) "Face for characters displayed as ^-sequences or \-sequences." - :group 'basic-faces) + :group 'basic-faces + :version "22.1") + +(defface no-break-space + '((t :inherit escape-glyph :underline t)) + "Face for non-breaking space." + :group 'basic-faces + :version "22.1") + +(defface shadow + '((((background dark)) :foreground "grey70") + (((background light)) :foreground "grey50")) + "Basic face for shadowed text." + :group 'basic-faces + :version "22.1") + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Manipulating font names. -- cgit v1.2.1 From c4cf1710436e5f03f60dc62c527004525c32acf7 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Mon, 6 Jun 2005 12:22:00 +0000 Subject: * diff-mode.el (diff-context-face): Inherit from `shadow' face. --- lisp/diff-mode.el | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'lisp') diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index aabd09e98ee..5deb7880bdf 100644 --- a/lisp/diff-mode.el +++ b/lisp/diff-mode.el @@ -243,10 +243,7 @@ when editing big diffs)." (defvar diff-function-face 'diff-function-face) (defface diff-context-face - '((((class color) (background light)) - :foreground "grey50") - (((class color) (background dark)) - :foreground "grey70")) + '((t :inherit shadow)) "`diff-mode' face used to highlight context and other side-information." :group 'diff-mode) (defvar diff-context-face 'diff-context-face) -- cgit v1.2.1 From cf78a467b95980ace9e8a25e664725fc1dd6acc9 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Mon, 6 Jun 2005 12:23:03 +0000 Subject: * dired.el (dired-ignored): Inherit from `shadow' face. --- lisp/dired.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/dired.el b/lisp/dired.el index b0d86297e71..61aca72db5b 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -356,7 +356,7 @@ Subexpression 2 must end right before the \\n or \\r.") "Face name used for symbolic links.") (defface dired-ignored - '((t (:inherit font-lock-string-face))) + '((t (:inherit shadow))) "Face used for files suffixed with `completion-ignored-extensions'." :group 'dired-faces :version "22.1") -- cgit v1.2.1 From c3423c97433a6995ab575fcb5b43110b6bc69eec Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Mon, 6 Jun 2005 12:23:49 +0000 Subject: * rfn-eshadow.el (file-name-shadow): Inherit from `shadow' face. --- lisp/rfn-eshadow.el | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'lisp') diff --git a/lisp/rfn-eshadow.el b/lisp/rfn-eshadow.el index 5fb31561c41..84731115d1a 100644 --- a/lisp/rfn-eshadow.el +++ b/lisp/rfn-eshadow.el @@ -113,10 +113,7 @@ system, `file-name-shadow-properties' is used instead." :group 'minibuffer) (defface file-name-shadow - '((((background dark)) - :foreground "grey50") - (t - :foreground "grey70")) + '((t :inherit shadow)) "Face used by `file-name-shadow-mode' for the shadow." :group 'minibuffer) -- cgit v1.2.1 From 1c8c1295328dcf0b819387ad803bfb938af9fce0 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Mon, 6 Jun 2005 12:24:51 +0000 Subject: * tmm.el (tmm-inactive-face): Inherit from `shadow' face. --- lisp/tmm.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/tmm.el b/lisp/tmm.el index 51e04941730..73eb404b14c 100644 --- a/lisp/tmm.el +++ b/lisp/tmm.el @@ -133,9 +133,8 @@ 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)) + '((t :inherit shadow)) "Face used for inactive menu items." :group 'tmm) -- cgit v1.2.1 From c04ed304e60e0347f2b08d9a93cc13f4f4166f18 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Mon, 6 Jun 2005 12:26:07 +0000 Subject: (Info-title-1-face): Use green instead of yellow because bold yellow is not readable on light backgrounds. --- lisp/info.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/info.el b/lisp/info.el index c36554e6a7a..774715aca5c 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -3483,7 +3483,7 @@ the variable `Info-file-list-for-emacs'." (Info-goto-emacs-command-node command))))) (defface Info-title-1-face - '((((type tty pc) (class color)) :foreground "yellow" :weight bold) + '((((type tty pc) (class color)) :foreground "green" :weight bold) (t :height 1.2 :inherit Info-title-2-face)) "Face for Info titles at level 1." :group 'info) -- cgit v1.2.1 From c4f7f786e93880d2e659bbb8f2ddb83192c921e4 Mon Sep 17 00:00:00 2001 From: Richard M. Stallman Date: Mon, 6 Jun 2005 12:27:26 +0000 Subject: (sc-mail-glom-frame): Mark as risky. --- lisp/mail/supercite.el | 1 + 1 file changed, 1 insertion(+) (limited to 'lisp') diff --git a/lisp/mail/supercite.el b/lisp/mail/supercite.el index ba4aca881ef..593f46cad40 100644 --- a/lisp/mail/supercite.el +++ b/lisp/mail/supercite.el @@ -720,6 +720,7 @@ the list should be unique." (sc-mail-warn-if-non-rfc822-p (sc-mail-error-in-mail-field)) (end (setq sc-mail-headers-end (point)))) "Regi frame for glomming mail header information.") +(put 'sc-mail-glom-frame 'risky-local-variable t) (defvar curline) ; dynamic bondage -- cgit v1.2.1 From abed526746f69a5524df703f362d12f348b236ad Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Mon, 6 Jun 2005 12:27:44 +0000 Subject: (compilation-start): Move `erase-buffer' up before selecting the desired mode to not spend time fontifying old contents. --- lisp/progmodes/compile.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index a27a5282b42..e0c8ded307a 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -935,6 +935,7 @@ Returns the compilation buffer created." (substitute-env-vars (match-string 1 command)) "~") default-directory)) + (erase-buffer) ;; Select the desired mode. (if (not (eq mode t)) (funcall mode) @@ -944,11 +945,11 @@ Returns the compilation buffer created." (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. (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. -- cgit v1.2.1 From 77932668c2ee5354465982e966cf9584cafc1d2c Mon Sep 17 00:00:00 2001 From: Richard M. Stallman Date: Mon, 6 Jun 2005 12:29:57 +0000 Subject: (debugger-window): New variable. (debug): Use debugger-window if it is set and still alive. Record debugger-window for next entry. --- lisp/emacs-lisp/debug.el | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 2149cba8720..7d7e066b4e8 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -97,6 +97,11 @@ This is to optimize `debugger-make-xrefs'.") This variable is used by `debugger-jump', `debugger-step-through', and `debugger-reenable' to temporarily disable debug-on-entry.") +(defvar debugger-window nil + "If non-nil, the last window used by the debugger for its buffer. +The next call to the debugger reuses the same window, if it is still live. +That case would normally occur when the window is in a separate frame.") + ;;;###autoload (setq debugger 'debug) ;;;###autoload @@ -178,7 +183,13 @@ first will be printed into the backtrace buffer." ;; Place an extra debug-on-exit for macro's. (when (eq 'lambda (car-safe (cadr (backtrace-frame 4)))) (backtrace-debug 5 t))) - (pop-to-buffer debugger-buffer) + (if (and debugger-window + (window-live-p debugger-window)) + (progn + (set-window-buffer debugger-window debugger-buffer) + (select-window debugger-window)) + (pop-to-buffer debugger-buffer)) + (setq debugger-window (selected-window)) (debugger-mode) (debugger-setup-buffer debugger-args) (when noninteractive -- cgit v1.2.1 From 14bc6e51deaabb774e7234875df5c56a7d1e173d Mon Sep 17 00:00:00 2001 From: Richard M. Stallman Date: Mon, 6 Jun 2005 12:30:35 +0000 Subject: Don't call pr-update-menus; user must do that. --- lisp/printing.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/printing.el b/lisp/printing.el index ddfe6fd5cc0..41ea0238c6b 100644 --- a/lisp/printing.el +++ b/lisp/printing.el @@ -6434,7 +6434,8 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order." ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(pr-update-menus t) +;;; Files are not supposed to change Emacs behavior when you merely load them. +;;; (pr-update-menus t) (provide 'printing) -- cgit v1.2.1 From e6ca43c89eb9793471f5fa020df7efb41836e584 Mon Sep 17 00:00:00 2001 From: Richard M. Stallman Date: Mon, 6 Jun 2005 12:31:48 +0000 Subject: (hack-local-variables-confirm): New arg FLAG-TO-CHECK. (hack-one-local-variable, hack-local-variables) (hack-local-variables-prop-line): Pass that arg. (locate-file-completion): Doc fix. --- lisp/files.el | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'lisp') diff --git a/lisp/files.el b/lisp/files.el index a75b6b2fc89..b8ec5bf1cd0 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -658,7 +658,7 @@ one or more of those symbols." (defun locate-file-completion (string path-and-suffixes action) "Do completion for file names passed to `locate-file'. -PATH-AND-SUFFIXES is a pair of lists (DIRECTORIES . SUFFIXES)." +PATH-AND-SUFFIXES is a pair of lists, (DIRECTORIES . SUFFIXES)." (if (file-name-absolute-p string) (read-file-name-internal string nil action) (let ((names nil) @@ -2159,9 +2159,9 @@ Otherwise, return nil; point may be changed." (goto-char beg) end)))) -(defun hack-local-variables-confirm (string) - (or (eq enable-local-variables t) - (and enable-local-variables +(defun hack-local-variables-confirm (string flag-to-check) + (or (eq flag-to-check t) + (and flag-to-check (save-window-excursion (condition-case nil (switch-to-buffer (current-buffer)) @@ -2236,7 +2236,8 @@ is specified, returning t if it is specified." (if (and result (or mode-only (hack-local-variables-confirm - "Set local variables as specified in -*- line of %s? "))) + "Set local variables as specified in -*- line of %s? " + enable-local-variables))) (let ((enable-local-eval enable-local-eval)) (while result (hack-one-local-variable (car (car result)) (cdr (car result))) @@ -2267,7 +2268,8 @@ is specified, returning t if it is specified." (and (search-forward "Local Variables:" nil t) (or mode-only (hack-local-variables-confirm - "Set local variables as specified at end of %s? ")))) + "Set local variables as specified at end of %s? " + enable-local-variables)))) (skip-chars-forward " \t") (let ((enable-local-eval enable-local-eval) ;; suffix is what comes after "local variables:" in its line. @@ -2489,7 +2491,8 @@ is considered risky." ;; Permit eval if not root and user says ok. (and (not (zerop (user-uid))) (hack-local-variables-confirm - "Process `eval' or hook local variables in %s? "))) + "Process `eval' or hook local variables in %s? " + enable-local-eval))) (if (eq var 'eval) (save-excursion (eval val)) (make-local-variable var) -- cgit v1.2.1 From c476bcb06c7fff47d9223555be774236e06462ce Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Mon, 6 Jun 2005 12:37:46 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b03d78af3cd..570b6a91a06 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,25 @@ +2005-06-06 Juri Linkov + + * font-lock.el (font-lock-regexp-backslash) + (font-lock-regexp-backslash-construct): New faces. + (lisp-font-lock-keywords-2): Use new faces. Match `?:' only + after `('. Add `while-no-input' to control structures. + + * faces.el (no-break-space, shadow): New faces. + (escape-glyph): Use less loud colors pink2 and red4. + + * diff-mode.el (diff-context-face) + * dired.el (dired-ignored) + * rfn-eshadow.el (file-name-shadow) + * tmm.el (tmm-inactive-face): Inherit from `shadow' face. + + * info.el (Info-title-1-face): Use green instead of yellow because + bold yellow is not readable on light backgrounds. + + * progmodes/compile.el (compilation-start): Move `erase-buffer' up + before selecting the desired mode to not spend time fontifying + old contents. + 2005-06-06 Juanma Barranquero * isearchb.el (isearchb): Don't pass a spurious second argument to -- cgit v1.2.1 From 77da210789914ef3f939c9b7fb77214a067ee787 Mon Sep 17 00:00:00 2001 From: Richard M. Stallman Date: Mon, 6 Jun 2005 12:40:36 +0000 Subject: (completion-setup-function): Look for completion-base-size-function property of minibuffer-completion-table. --- lisp/simple.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/simple.el b/lisp/simple.el index 6d6c3806889..097dde16d01 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -4833,7 +4833,11 @@ of the differing parts is, by contrast, slightly highlighted." (- (point) (minibuffer-prompt-end))))) ;; Otherwise, in minibuffer, the whole input is being completed. (if (minibufferp mainbuf) - (setq completion-base-size 0))) + (if (and (symbolp minibuffer-completion-table) + (get minibuffer-completion-table 'completion-base-size-function)) + (setq completion-base-size + (funcall (get minibuffer-completion-table 'completion-base-size-function))) + (setq completion-base-size 0)))) ;; Put faces on first uncommon characters and common parts. (when completion-base-size (let* ((common-string-length -- cgit v1.2.1 From 9c7f6bb3914b2a2e25c1ac568ff0c4e986b866aa Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Mon, 6 Jun 2005 12:47:19 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 570b6a91a06..c3a74cfbd28 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-06-06 Kim F. Storm + + * ido.el (ido-first-match, ido-only-match, ido-subdir) + (ido-indicator): Remove -face suffix from face names. + 2005-06-06 Juri Linkov * font-lock.el (font-lock-regexp-backslash) -- cgit v1.2.1 From a89da416f554e2df08968557abdefb339f493b95 Mon Sep 17 00:00:00 2001 From: Richard M. Stallman Date: Mon, 6 Jun 2005 12:47:51 +0000 Subject: (Info-read-node-name-2): New function. (Info-read-node-name-1): Use that. Add a completion-base-size-function property. --- lisp/info.el | 50 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 46 insertions(+), 4 deletions(-) (limited to 'lisp') diff --git a/lisp/info.el b/lisp/info.el index 774715aca5c..4c6a0ea027d 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -1379,6 +1379,43 @@ If FORK is a string, it is the name to use for the new buffer." (defvar Info-read-node-completion-table) +(defun Info-read-node-name-2 (string path-and-suffixes action) + "Virtual completion table for file names input in Info node names. +PATH-AND-SUFFIXES is a pair of lists, (DIRECTORIES . SUFFIXES)." + (let* ((names nil) + (suffixes (remove "" (cdr path-and-suffixes))) + (suffix (concat (regexp-opt suffixes t) "\\'")) + (string-dir (file-name-directory string)) + (dirs + (if (file-name-absolute-p string) + (list (file-name-directory string)) + (car path-and-suffixes)))) + (dolist (dir dirs) + (unless dir + (setq dir default-directory)) + (if string-dir (setq dir (expand-file-name string-dir dir))) + (when (file-directory-p dir) + (dolist (file (file-name-all-completions + (file-name-nondirectory string) dir)) + ;; If the file name has no suffix or a standard suffix, + ;; include it. + (and (or (null (file-name-extension file)) + (string-match suffix file)) + ;; But exclude subfiles of split info files. + (not (string-match "-[0-9]+\\'" file)) + ;; And exclude backup files. + (not (string-match "~\\'" file)) + (push (if string-dir (concat string-dir file) file) names)) + ;; If the file name ends in a standard suffix, + ;; add the unsuffixed name as a completion option. + (when (string-match suffix file) + (setq file (substring file 0 (match-beginning 0))) + (push (if string-dir (concat string-dir file) file) names))))) + (cond + ((eq action t) (all-completions string names)) + ((null action) (try-completion string names)) + (t (test-completion string names))))) + ;; This function is used as the "completion table" while reading a node name. ;; It does completion using the alist in Info-read-node-completion-table ;; unless STRING starts with an open-paren. @@ -1389,15 +1426,16 @@ If FORK is a string, it is the name to use for the new buffer." (let ((file (substring string 1))) (cond ((eq code nil) - (let ((comp (try-completion file 'locate-file-completion + (let ((comp (try-completion file 'Info-read-node-name-2 (cons Info-directory-list (mapcar 'car Info-suffix-list))))) (cond ((eq comp t) (concat string ")")) (comp (concat "(" comp))))) - ((eq code t) (all-completions file 'locate-file-completion - (cons Info-directory-list - (mapcar 'car Info-suffix-list)))) + ((eq code t) + (all-completions file 'Info-read-node-name-2 + (cons Info-directory-list + (mapcar 'car Info-suffix-list)))) (t nil)))) ;; If a file name was given, then any node is fair game. ((string-match "\\`(" string) @@ -1413,6 +1451,10 @@ If FORK is a string, it is the name to use for the new buffer." (t (test-completion string Info-read-node-completion-table predicate)))) +;; Arrange to highlight the proper letters in the completion list buffer. +(put 'Info-read-node-name-1 'completion-base-size-function + (lambda () 1)) + (defun Info-read-node-name (prompt &optional default) (let* ((completion-ignore-case t) (Info-read-node-completion-table (Info-build-node-completions)) -- cgit v1.2.1 From ccba8bb6e250c785266eacae4bbe103c9360a331 Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Mon, 6 Jun 2005 12:48:02 +0000 Subject: (ido-first-match, ido-only-match, ido-subdir) (ido-indicator): Remove -face suffix from face names. --- lisp/ido.el | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'lisp') diff --git a/lisp/ido.el b/lisp/ido.el index b01e9e35c37..47372afec52 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -299,8 +299,8 @@ ;; ------------ ;; The highlighting of matching items is controlled via ido-use-faces. -;; The faces used are ido-first-match-face, ido-only-match-face and -;; ido-subdir-face. +;; The faces used are ido-first-match, ido-only-match and +;; ido-subdir. ;; Colouring of the matching item was suggested by ;; Carsten Dominik (dominik@strw.leidenuniv.nl). @@ -740,17 +740,17 @@ subdirs in the alternatives." :type 'boolean :group 'ido) -(defface ido-first-match-face '((t (:bold t))) +(defface ido-first-match '((t (:bold t))) "*Font used by ido for highlighting first match." :group 'ido) -(defface ido-only-match-face '((((class color)) +(defface ido-only-match '((((class color)) (:foreground "ForestGreen")) (t (:italic t))) "*Font used by ido for highlighting only match." :group 'ido) -(defface ido-subdir-face '((((min-colors 88) (class color)) +(defface ido-subdir '((((min-colors 88) (class color)) (:foreground "red1")) (((class color)) (:foreground "red")) @@ -758,7 +758,7 @@ subdirs in the alternatives." "*Font used by ido for highlighting subdirs in the alternatives." :group 'ido) -(defface ido-indicator-face '((((min-colors 88) (class color)) +(defface ido-indicator '((((min-colors 88) (class color)) (:foreground "yellow1" :background "red1" :width condensed)) @@ -4039,7 +4039,7 @@ For details of keybindings, do `\\[describe-function] ido-find-file'." first) (if (and ind ido-use-faces) - (put-text-property 0 1 'face 'ido-indicator-face ind)) + (put-text-property 0 1 'face 'ido-indicator ind)) (if (and ido-use-faces comps) (let* ((fn (ido-name (car comps))) @@ -4047,8 +4047,8 @@ For details of keybindings, do `\\[describe-function] ido-find-file'." (setq first (format "%s" fn)) (put-text-property 0 ln 'face (if (= (length comps) 1) - 'ido-only-match-face - 'ido-first-match-face) + 'ido-only-match + 'ido-first-match) first) (if ind (setq first (concat first ind))) (setq comps (cons first (cdr comps))))) @@ -4091,7 +4091,7 @@ For details of keybindings, do `\\[describe-function] ido-find-file'." (if (and ido-use-faces (not (string= str first)) (ido-final-slash str)) - (put-text-property 0 (length str) 'face 'ido-subdir-face str)) + (put-text-property 0 (length str) 'face 'ido-subdir str)) str))))) comps)))))) -- cgit v1.2.1 From dce16363d3c65f0e2e5b8cd70e6b929687e69021 Mon Sep 17 00:00:00 2001 From: Richard M. Stallman Date: Mon, 6 Jun 2005 12:50:01 +0000 Subject: (makefile-dependency-regex): Handle whitespace just like other allowed characters. (makefile-match-dependency): Exclude leading and training whitespace from the range of regexp subexp 1. (makefile-macroassign-regex): Don't try to match the body, just the name of the macro being defined. --- lisp/progmodes/make-mode.el | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el index 7356583fb90..35fcc37a29c 100644 --- a/lisp/progmodes/make-mode.el +++ b/lisp/progmodes/make-mode.el @@ -262,7 +262,7 @@ not be enclosed in { } or ( )." ;; index in makefile-imenu-generic-expression. (defvar makefile-dependency-regex ;; Allow for two nested levels $(v1:$(v2:$(v3:a=b)=c)=d) - "^ *\\(\\(?: *\\$\\(?:[({]\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[^({]\\|.[^\n$#})]+?[})]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\| *[^ \n$#:=]+\\)+?\\)[ \t]*\\(:\\)\\(?:[ \t]*$\\|[^=\n]\\(?:[^#\n]*?;[ \t]*\\(.+\\)\\)?\\)" + "^\\(\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[^({]\\|.[^\n$#})]+?[})]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#:=]\\)+?\\)\\(:\\)\\(?:[ \t]*$\\|[^=\n]\\(?:[^#\n]*?;[ \t]*\\(bb.+\\)\\)?\\)" "Regex used to find dependency lines in a makefile.") (defconst makefile-bsdmake-dependency-regex @@ -291,7 +291,7 @@ not be enclosed in { } or ( )." ;; 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]*\\(?:!=\\|[*:+]?[:?]?=\\)" "Regex used to find macro assignment lines in a makefile.") (defconst makefile-var-use-regex @@ -1704,6 +1704,19 @@ matched in a rule action." (when (save-excursion (beginning-of-line) (looking-at makefile-dependency-regex)) + (save-excursion + (let ((deps-end (match-end 1)) + (match-data (match-data))) + (goto-char deps-end) + (skip-chars-backward " \t") + (setq deps-end (point)) + (beginning-of-line) + (skip-chars-forward " \t") + ;; Alter the bounds recorded for subexp 1, + ;; which is what is supposed to match the targets. + (setcar (nthcdr 2 match-data) (point)) + (setcar (nthcdr 3 match-data) deps-end) + (store-match-data match-data))) (end-of-line) (throw 'found (point))))) (goto-char pt)) -- cgit v1.2.1 From ce6e10af528e2caeee454097bde62bc65f2ea220 Mon Sep 17 00:00:00 2001 From: Richard M. Stallman Date: Mon, 6 Jun 2005 12:58:13 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c3a74cfbd28..874572c69b7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,36 @@ +2005-06-06 Richard M. Stallman + + * progmodes/make-mode.el (makefile-dependency-regex): Handle whitespace + just like other allowed characters. + (makefile-match-dependency): Exclude leading and training whitespace + from the range of regexp subexp 1. + (makefile-macroassign-regex): Don't try to match the body, + just the name of the macro being defined. + + * info.el (Info-read-node-name-2): New function. + (Info-read-node-name-1): Use that. + Add a completion-base-size-function property. + + * simple.el (completion-setup-function): Look for + completion-base-size-function property of + minibuffer-completion-table. + + * files.el (locate-file-completion): Doc fix. + + * printing.el: Don't call pr-update-menus; user must do that. + + * emacs-lisp/debug.el (debugger-window): New variable. + (debug): Use debugger-window if it is set and still alive. + Record debugger-window for next entry. + + * mail/supercite.el (sc-mail-glom-frame): Mark as risky. + +2005-06-05 Matthias F,Av(Brste + + * files.el (hack-local-variables-confirm): New arg FLAG-TO-CHECK. + (hack-one-local-variable, hack-local-variables) + (hack-local-variables-prop-line): Pass that arg. + 2005-06-06 Kim F. Storm * ido.el (ido-first-match, ido-only-match, ido-subdir) @@ -25,6 +58,7 @@ before selecting the desired mode to not spend time fontifying old contents. +>>>>>>> 1.7678 2005-06-06 Juanma Barranquero * isearchb.el (isearchb): Don't pass a spurious second argument to -- cgit v1.2.1 From c7b96d765214ce3b7176f513fc7fe4f8485945d7 Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Mon, 6 Jun 2005 13:18:36 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 874572c69b7..32d64fabb82 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2005-06-06 Kim F. Storm + + * emulation/cua-base.el (cua-rectangle, cua-rectangle-noselect) + (cua-global-mark): Remove -face suffix from face names. + + * emulation/cua-gmrk.el (cua--init-global-mark): Remove + cua-global-mark face setup. + 2005-06-06 Richard M. Stallman * progmodes/make-mode.el (makefile-dependency-regex): Handle whitespace @@ -22,10 +30,10 @@ * emacs-lisp/debug.el (debugger-window): New variable. (debug): Use debugger-window if it is set and still alive. Record debugger-window for next entry. - + * mail/supercite.el (sc-mail-glom-frame): Mark as risky. -2005-06-05 Matthias F,Av(Brste +2005-06-06 Matthias F,Av(Brste * files.el (hack-local-variables-confirm): New arg FLAG-TO-CHECK. (hack-one-local-variable, hack-local-variables) @@ -58,7 +66,6 @@ before selecting the desired mode to not spend time fontifying old contents. ->>>>>>> 1.7678 2005-06-06 Juanma Barranquero * isearchb.el (isearchb): Don't pass a spurious second argument to -- cgit v1.2.1 From 1e98d199cc4865bd1a508214f5d15007f85b254f Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Mon, 6 Jun 2005 13:19:15 +0000 Subject: * emulation/cua-base.el (cua-rectangle, cua-rectangle-noselect) (cua-global-mark): Remove -face suffix from face names. * emulation/cua-gmrk.el (cua--init-global-mark): Remove cua-global-mark face setup. --- lisp/emulation/cua-base.el | 6 +++--- lisp/emulation/cua-gmrk.el | 9 ++------- lisp/emulation/cua-rect.el | 2 +- 3 files changed, 6 insertions(+), 11 deletions(-) (limited to 'lisp') diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index 6ea6bfb7f3d..fe2b0a892a8 100644 --- a/lisp/emulation/cua-base.el +++ b/lisp/emulation/cua-base.el @@ -384,13 +384,13 @@ and after the region marked by the rectangle to search." :type 'boolean :group 'cua) -(defface cua-rectangle-face +(defface cua-rectangle '((default :inherit region) (((class color)) :foreground "white" :background "maroon")) "*Font used by CUA for highlighting the rectangle." :group 'cua) -(defface cua-rectangle-noselect-face +(defface cua-rectangle-noselect '((default :inherit region) (((class color)) :foreground "white" :background "dimgray")) "*Font used by CUA for highlighting the non-selected rectangle lines." @@ -404,7 +404,7 @@ and after the region marked by the rectangle to search." :type 'boolean :group 'cua) -(defface cua-global-mark-face +(defface cua-global-mark '((((min-colors 88)(class color)) :foreground "black" :background "yellow1") (((class color)) :foreground "black" :background "yellow") (t :bold t)) diff --git a/lisp/emulation/cua-gmrk.el b/lisp/emulation/cua-gmrk.el index 8280691ae18..b8874df0f34 100644 --- a/lisp/emulation/cua-gmrk.el +++ b/lisp/emulation/cua-gmrk.el @@ -74,7 +74,7 @@ (move-overlay cua--global-mark-overlay (point) (1+ (point))) (setq cua--global-mark-overlay (make-overlay (point) (1+ (point)))) - (overlay-put cua--global-mark-overlay 'face 'cua-global-mark-face)) + (overlay-put cua--global-mark-overlay 'face 'cua-global-mark)) (if (and cua-global-mark-blink-cursor-interval (not cua--orig-blink-cursor-interval)) (setq cua--orig-blink-cursor-interval blink-cursor-interval @@ -218,7 +218,7 @@ With prefix argument, don't jump to global mark when cancelling it." (let ((olist (overlays-at (marker-position cua--global-mark-marker))) in-rect) (while olist - (if (eq (overlay-get (car olist) 'face) 'cua-rectangle-face) + (if (eq (overlay-get (car olist) 'face) 'cua-rectangle) (setq in-rect t olist nil) (setq olist (cdr olist)))) (if in-rect @@ -358,11 +358,6 @@ With prefix argument, don't jump to global mark when cancelling it." ;;; Initialization (defun cua--init-global-mark () - (unless (face-background 'cua-global-mark-face) - (copy-face 'region 'cua-global-mark-face) - (set-face-foreground 'cua-global-mark-face "black") - (set-face-background 'cua-global-mark-face "cyan")) - (define-key cua--global-mark-keymap [remap copy-region-as-kill] 'cua-copy-to-global-mark) (define-key cua--global-mark-keymap [remap kill-ring-save] 'cua-copy-to-global-mark) (define-key cua--global-mark-keymap [remap kill-region] 'cua-cut-to-global-mark) diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el index 932448079dd..72fd9195850 100644 --- a/lisp/emulation/cua-rect.el +++ b/lisp/emulation/cua-rect.el @@ -755,7 +755,7 @@ If command is repeated at same position, delete the rectangle." (sit-for 0) ; make window top/bottom reliable (cua--rectangle-operation nil t nil nil nil ; do not tabify '(lambda (s e l r v) - (let ((rface (if v 'cua-rectangle-face 'cua-rectangle-noselect-face)) + (let ((rface (if v 'cua-rectangle 'cua-rectangle-noselect)) overlay bs ms as) (when (cua--rectangle-virtual-edges) (let ((lb (line-beginning-position)) -- cgit v1.2.1 From 4bad17c2ec3c62b31942c7c51ddeacd0a96f680f Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Mon, 6 Jun 2005 14:20:55 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 32d64fabb82..e5ec8f35819 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2005-06-06 Matt Hodges + + * iswitchb.el: Rename faces. + 2005-06-06 Kim F. Storm * emulation/cua-base.el (cua-rectangle, cua-rectangle-noselect) -- cgit v1.2.1 From 54907cdc9ddbff70bf70a1e33fee95a3826229e4 Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Mon, 6 Jun 2005 14:21:14 +0000 Subject: 2005-06-06 Matt Hodges * iswitchb.el: Rename faces. --- lisp/iswitchb.el | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lisp') diff --git a/lisp/iswitchb.el b/lisp/iswitchb.el index 2943be851a0..0cb12d391ff 100644 --- a/lisp/iswitchb.el +++ b/lisp/iswitchb.el @@ -404,21 +404,21 @@ iswitchb is running." :type 'hook :group 'iswitchb) -(defface iswitchb-single-match-face +(defface iswitchb-single-match '((t (:inherit font-lock-comment-face))) "Iswitchb face for single matching buffer name." :version "22.1" :group 'iswitchb) -(defface iswitchb-current-match-face +(defface iswitchb-current-match '((t (:inherit font-lock-function-name-face))) "Iswitchb face for current matching buffer name." :version "22.1" :group 'iswitchb) -(defface iswitchb-virtual-matches-face +(defface iswitchb-virtual-matches '((t (:inherit font-lock-builtin-face))) "Iswitchb face for matching virtual buffer names. @@ -426,7 +426,7 @@ See also `iswitchb-use-virtual-buffers'." :version "22.1" :group 'iswitchb) -(defface iswitchb-invalid-regexp-face +(defface iswitchb-invalid-regexp '((t (:inherit font-lock-warning-face))) "Iswitchb face for indicating invalid regexp. " @@ -1299,9 +1299,9 @@ Modified from `icomplete-completions'." (put-text-property 0 (length first) 'face (if (= (length comps) 1) (if iswitchb-invalid-regexp - 'iswitchb-invalid-regexp-face - 'iswitchb-single-match-face) - 'iswitchb-current-match-face) + 'iswitchb-invalid-regexp + 'iswitchb-single-match) + 'iswitchb-current-match) first) (setq comps (cons first (cdr comps))))) @@ -1330,7 +1330,7 @@ Modified from `icomplete-completions'." (let ((comp comps)) (while comp (put-text-property 0 (length (car comp)) - 'face 'iswitchb-virtual-matches-face + 'face 'iswitchb-virtual-matches (car comp)) (setq comp (cdr comp)))))) -- cgit v1.2.1 From 640477ee0f1eb0f16e1a1b3660287143b53a7753 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 6 Jun 2005 15:17:32 +0000 Subject: (ps-default-fg, ps-default-bg): Fix typos in docstrings. --- lisp/ps-print.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lisp') diff --git a/lisp/ps-print.el b/lisp/ps-print.el index b47ea3d4f89..2868ae7d97b 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el @@ -3019,7 +3019,7 @@ Valid values are: NUMBER It's a real value between 0.0 (black) and 1.0 (white) that indicate the gray color. - COLOR-NAME It's a string wich contains the color name. For example: + COLOR-NAME It's a string which contains the color name. For example: \"yellow\". LIST It's a list of RGB values, that is a list of three real values @@ -3059,7 +3059,7 @@ Valid values are: NUMBER It's a real value between 0.0 (black) and 1.0 (white) that indicate the gray color. - COLOR-NAME It's a string wich contains the color name. For example: + COLOR-NAME It's a string which contains the color name. For example: \"yellow\". LIST It's a list of RGB values, that is a list of three real values @@ -6155,7 +6155,7 @@ XSTART YSTART are the relative position for the first page in a sheet.") (if (and (boundp 'ucs-mule-8859-to-mule-unicode) (char-table-p ucs-mule-8859-to-mule-unicode)) (map-char-table - #'(lambda (k v) + #'(lambda (k v) (if (and v (eq (char-charset v) 'latin-iso8859-1) (/= k v)) (aset tbl k v))) ucs-mule-8859-to-mule-unicode)) -- cgit v1.2.1 From 01f438b9127dfff6f951f1b1574ac46a98635d72 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 6 Jun 2005 15:22:33 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e5ec8f35819..50a49774795 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -72,6 +72,9 @@ 2005-06-06 Juanma Barranquero + * ps-print.el (ps-default-fg, ps-default-bg): + Fix typos in docstrings. + * isearchb.el (isearchb): Don't pass a spurious second argument to `iswitchb-completions'. -- cgit v1.2.1 From b3c70578e71987952f44540aa718efdc2b4427ea Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 6 Jun 2005 15:45:11 +0000 Subject: (thumbs-thumbsdir-max-size, thumbs-image-resizing-step, thumbs-thumbsdir-auto-clean): Fix typos in docstrings. --- lisp/ChangeLog | 3 +++ lisp/thumbs.el | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 50a49774795..6b778e51742 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -72,6 +72,9 @@ 2005-06-06 Juanma Barranquero + * thumbs.el (thumbs-thumbsdir-max-size, thumbs-image-resizing-step) + (thumbs-thumbsdir-auto-clean): Fix typos in docstrings. + * ps-print.el (ps-default-fg, ps-default-bg): Fix typos in docstrings. diff --git a/lisp/thumbs.el b/lisp/thumbs.el index 321fe7266cc..c335b259c35 100644 --- a/lisp/thumbs.el +++ b/lisp/thumbs.el @@ -83,7 +83,7 @@ (defcustom thumbs-thumbsdir-max-size 50000000 "Max size for thumbnails directory. -When it reachs that size (in bytes), a warning is sent." +When it reaches that size (in bytes), a warning is sent." :type 'string :group 'thumbs) @@ -117,12 +117,12 @@ This is where you see the cursor." (defcustom thumbs-thumbsdir-auto-clean t "If set, delete older file in the thumbnails directory. Deletion is done at load time when the directory size is bigger -than 'thumbs-thumbsdir-max-size'." +than `thumbs-thumbsdir-max-size'." :type 'boolean :group 'thumbs) (defcustom thumbs-image-resizing-step 10 - "Step by wich to resize image." + "Step by which to resize image." :type 'string :group 'thumbs) -- cgit v1.2.1 From e43cbeae69c62d0fd1de362cdf154623322ad059 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Mon, 6 Jun 2005 16:28:26 +0000 Subject: (tmm-inactive, tmm-remove-inactive-mouse-face): Rename `tmm-inactive-face' to `tmm-inactive'. --- lisp/ChangeLog | 5 +++++ lisp/tmm.el | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6b778e51742..6d6996b2f54 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-06-06 Juri Linkov + + * tmm.el (tmm-inactive, tmm-remove-inactive-mouse-face): + Rename `tmm-inactive-face' to `tmm-inactive'. + 2005-06-06 Matt Hodges * iswitchb.el: Rename faces. diff --git a/lisp/tmm.el b/lisp/tmm.el index 73eb404b14c..aa47012c642 100644 --- a/lisp/tmm.el +++ b/lisp/tmm.el @@ -133,7 +133,7 @@ specify nil for this variable." :type '(choice integer (const nil)) :group 'tmm) -(defface tmm-inactive-face +(defface tmm-inactive '((t :inherit shadow)) "Face used for inactive menu items." :group 'tmm) @@ -349,7 +349,7 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'." (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))) + (add-text-properties (point) next '(face tmm-inactive))) (goto-char next))) (set-buffer-modified-p nil))) -- cgit v1.2.1 From ed975fa61af284173b5490cdc119484c6a200ce3 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 6 Jun 2005 18:13:21 +0000 Subject: (latexenc-find-file-coding-system): Undo part of last patch, to turn off a compiler warning. --- lisp/ChangeLog | 14 +++++++++----- lisp/international/latexenc.el | 9 +++++---- 2 files changed, 14 insertions(+), 9 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6d6996b2f54..8c0c26c09fe 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-06-06 Stefan Monnier + + * international/latexenc.el (latexenc-find-file-coding-system): + Undo part of last patch, to turn off a compiler warning. + 2005-06-06 Juri Linkov * tmm.el (tmm-inactive, tmm-remove-inactive-mouse-face): @@ -12,8 +17,8 @@ * emulation/cua-base.el (cua-rectangle, cua-rectangle-noselect) (cua-global-mark): Remove -face suffix from face names. - * emulation/cua-gmrk.el (cua--init-global-mark): Remove - cua-global-mark face setup. + * emulation/cua-gmrk.el (cua--init-global-mark): + Remove cua-global-mark face setup. 2005-06-06 Richard M. Stallman @@ -132,7 +137,7 @@ (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 + (iswitchb-use-faces): Rename 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. @@ -239,8 +244,7 @@ (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 preserve - point. + (def-gdb-auto-update-handler): Use window point to preserve point. 2005-05-31 Stefan Monnier diff --git a/lisp/international/latexenc.el b/lisp/international/latexenc.el index 24f7ebc6000..7568c4aa39a 100644 --- a/lisp/international/latexenc.el +++ b/lisp/international/latexenc.el @@ -159,10 +159,11 @@ coding system names is determined from `latex-inputenc-coding-alist'." (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) - (fboundp 'tex-guess-main-file)) - (let ((tex-start-of-header "\\\\document\\(style\\|class\\)")) - (setq latexenc-main-file (tex-guess-main-file)))) + (not latexenc-main-file)) + ;; Use a separate `when' so the byte-compiler sees the fboundp. + (when (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)) -- cgit v1.2.1 From a15d6d35fad31a5956d77664bd05b8e3d1330fe8 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 6 Jun 2005 19:42:25 +0000 Subject: Doc fix. --- lisp/international/latexenc.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/international/latexenc.el b/lisp/international/latexenc.el index 7568c4aa39a..6ce21a5328a 100644 --- a/lisp/international/latexenc.el +++ b/lisp/international/latexenc.el @@ -47,7 +47,7 @@ ;; like this ;; (add-to-list 'file-coding-system-alist -;; '("\\.tex\\|\\.ltx\\|\\.dtx\\|\\.drv\\'" . latexenc-find-file-coding-system)) +;; '("\\.\\(tex\\|ltx\\|dtx\\|drv\\)\\'" . latexenc-find-file-coding-system)) ;;; Code: -- cgit v1.2.1 From 532c188a19153c4517be3bde16890ffb2f4b0441 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 6 Jun 2005 19:47:05 +0000 Subject: (debug): Don't bury the buffer unless it's in a dedicated window. --- lisp/ChangeLog | 3 +++ lisp/emacs-lisp/debug.el | 10 ++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8c0c26c09fe..d6cfeab3d08 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2005-06-06 Stefan Monnier + * emacs-lisp/debug.el (debug): Don't bury the buffer unless it's in + a dedicated window. + * international/latexenc.el (latexenc-find-file-coding-system): Undo part of last patch, to turn off a compiler warning. diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 7d7e066b4e8..30e6f3480cc 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -221,12 +221,18 @@ first will be printed into the backtrace buffer." ;; Still visible despite the save-window-excursion? Maybe it ;; it's in a pop-up frame. It would be annoying to delete and ;; recreate it every time the debugger stops, so instead we'll - ;; erase it and hide it but keep it alive. + ;; erase it (and maybe hide it) but keep it alive. (with-current-buffer debugger-buffer (erase-buffer) (fundamental-mode) (with-selected-window (get-buffer-window debugger-buffer 0) - (bury-buffer))) + (when (window-dedicated-p (selected-window)) + ;; If the window is not dedicated, burying the buffer + ;; will mean that the frame created for it is left + ;; around showing smoe random buffer, and next time we + ;; pop to the debugger buffer we'll create yet + ;; another frame. + (bury-buffer)))) (kill-buffer debugger-buffer)) (set-match-data debugger-outer-match-data))) ;; Put into effect the modified values of these variables -- cgit v1.2.1 From 7ad046405db028a9012aeacb8da7b32dc471c905 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 6 Jun 2005 21:06:19 +0000 Subject: (flyspell-auto-correct-binding, flyspell-incorrect-face) (flyspell-duplicate-face): Use (X)Emacs-agnostic code. (flyspell-mode-map): Don't overwrite at each load. Remove code redundant with the subsequent add-minor-mode. Merge Emacs and XEmacs code. (flyspell-word): Minor simplification. (flyspell-math-tex-command-p): Quieten the byte-compiler. (flyspell-external-point-words): Remove unused vars `size' and `start'. (flyspell-do-correct): Rename from flyspell-xemacs-correct. Merge the corresponding Emacs code. (flyspell-correct-word, flyspell-xemacs-popup): Use flyspell-do-correct. --- lisp/ChangeLog | 13 +++ lisp/textmodes/flyspell.el | 194 ++++++++++++++++++--------------------------- 2 files changed, 88 insertions(+), 119 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d6cfeab3d08..e18366bb692 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,18 @@ 2005-06-06 Stefan Monnier + * textmodes/flyspell.el (flyspell-auto-correct-binding) + (flyspell-incorrect-face, flyspell-duplicate-face): + Use (X)Emacs-agnostic code. + (flyspell-mode-map): Don't overwrite at each load. Remove code + redundant with the subsequent add-minor-mode. Merge Emacs and + XEmacs code. + (flyspell-word): Minor simplification. + (flyspell-math-tex-command-p): Quieten the byte-compiler. + (flyspell-external-point-words): Remove unused vars `size' and `start'. + (flyspell-do-correct): Rename from flyspell-xemacs-correct. + Merge the corresponding Emacs code. + (flyspell-correct-word, flyspell-xemacs-popup): Use flyspell-do-correct. + * emacs-lisp/debug.el (debug): Don't bury the buffer unless it's in a dedicated window. diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 500c9c4e113..8bd6c731e3c 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -268,11 +268,7 @@ If `flyspell-large-region' is nil, all regions are treated as small." :type 'boolean) (defcustom flyspell-auto-correct-binding - (cond - ((eq flyspell-emacs 'xemacs) - [(control \;)]) - (t - [?\C-\;])) + [(control ?\;)] "The key binding for flyspell auto correction." :group 'flyspell) @@ -425,26 +421,18 @@ property of the major mode name.") (define-key map [(control \.)] 'flyspell-auto-correct-word) map)) -;;;###autoload -(defvar flyspell-mode-map (make-sparse-keymap)) - -;; mouse, keyboard bindings and misc definition -(when (or (assoc 'flyspell-mode minor-mode-map-alist) - (setq minor-mode-map-alist - (cons (cons 'flyspell-mode flyspell-mode-map) - minor-mode-map-alist))) - (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)))) - +(defvar flyspell-mode-map + (let ((map (make-sparse-keymap))) + ;; mouse, keyboard bindings and misc definition + (if flyspell-use-meta-tab + (define-key map "\M-\t" 'flyspell-auto-correct-word)) + (cond + ;; I don't understand this test, so I left it as is. --Stef + ((or (featurep 'xemacs) flyspell-use-local-map) + (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)) ;; the name of the overlay property that defines the keymap (defvar flyspell-overlay-keymap-property-name 'keymap) @@ -462,20 +450,14 @@ property of the major mode name.") ;* Highlighting */ ;*---------------------------------------------------------------------*/ (defface flyspell-incorrect-face - (if (eq flyspell-emacs 'xemacs) - '((((class color)) (:foreground "OrangeRed" :bold t :underline t)) - (t (:bold t))) - '((((class color)) (:foreground "OrangeRed" :weight bold :underline t)) - (t (:weight bold)))) + '((((class color)) (:foreground "OrangeRed" :bold t :underline t)) + (t (:bold t))) "Face used for marking a misspelled word in Flyspell." :group 'flyspell) (defface flyspell-duplicate-face - (if (eq flyspell-emacs 'xemacs) - '((((class color)) (:foreground "Gold3" :bold t :underline t)) - (t (:bold t))) - '((((class color)) (:foreground "Gold3" :weight bold :underline t)) - (t (:weight bold)))) + '((((class color)) (:foreground "Gold3" :bold t :underline t)) + (t (:bold t))) "Face used for marking a misspelled word that appears twice in the buffer. See also `flyspell-duplicate-distance'." :group 'flyspell) @@ -1057,8 +1039,7 @@ Mostly we check word delimiters." (cond ((and (or (not (eq ispell-parser 'tex)) (and (> start (point-min)) - (not (eq (char-after (1- start)) ?})) - (not (eq (char-after (1- start)) ?\\)))) + (not (memq (char-after (1- start)) '(?\} ?\\))))) flyspell-mark-duplications-flag (save-excursion (goto-char (1- start)) @@ -1181,20 +1162,21 @@ Mostly we check word delimiters." ;* time that function is called. */ ;*---------------------------------------------------------------------*/ (defun flyspell-math-tex-command-p () - (cond - (flyspell-check-tex-math-command - nil) - ((eq flyspell-tex-math-initialized t) - (texmathp)) - ((eq flyspell-tex-math-initialized 'error) - nil) - (t - (setq flyspell-tex-math-initialized t) - (condition-case nil - (texmathp) - (error (progn - (setq flyspell-tex-math-initialized 'error) - nil)))))) + (when (fboundp 'texmathp) + (cond + (flyspell-check-tex-math-command + nil) + ((eq flyspell-tex-math-initialized t) + (texmathp)) + ((eq flyspell-tex-math-initialized 'error) + nil) + (t + (setq flyspell-tex-math-initialized t) + (condition-case nil + (texmathp) + (error (progn + (setq flyspell-tex-math-initialized 'error) + nil))))))) ;*---------------------------------------------------------------------*/ ;* flyspell-tex-command-p ... */ @@ -1381,9 +1363,7 @@ Word syntax described by `flyspell-dictionary-alist' (which see)." (let ((buffer flyspell-external-ispell-buffer)) (set-buffer buffer) (goto-char (point-min)) - (let ((size (- flyspell-large-region-end flyspell-large-region-beg)) - (start flyspell-large-region-beg) - (pword "") + (let ((pword "") (pcount 1)) ;; now we are done with ispell, we have to find the word in ;; the initial buffer @@ -1954,7 +1934,7 @@ The word checked is the word at the mouse position." (let ((start (car (cdr word))) (end (car (cdr (cdr word)))) (word (car word)) - poss replace) + poss) ;; now check spelling of word. (process-send-string ispell-process "%\n") ;put in verbose mode (process-send-string ispell-process (concat "^" word "\n")) @@ -1972,89 +1952,65 @@ The word checked is the word at the mouse position." ((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) + ((featurep 'xemacs) (flyspell-xemacs-popup - event poss word cursor-location start end save) - (goto-char save))) + event poss word cursor-location start end save)) + (t + ;; The word is incorrect, we have to propose a replacement. + (flyspell-do-correct (flyspell-emacs-popup event poss word) + poss word cursor-location start end save))) (ispell-pdict-save t)))))) ;*---------------------------------------------------------------------*/ -;* flyspell-xemacs-correct ... */ +;* flyspell-do-correct ... */ ;*---------------------------------------------------------------------*/ -(defun flyspell-xemacs-correct (replace poss word cursor-location start end save) - "The xemacs popup menu callback." +(defun flyspell-do-correct (replace poss word cursor-location start end save) + "The popup menu callback." + ;; Originally, the XEmacs code didn't do the (goto-char save) here and did + ;; it instead right after calling the function. (cond ((eq replace 'ignore) + (goto-char save) nil) ((eq replace 'save) - (process-send-string ispell-process (concat "*" word "\n")) - (process-send-string ispell-process "#\n") + (goto-char save) + (ispell-send-string (concat "*" word "\n")) + ;; This was added only to the XEmacs side in revision 1.18 of + ;; flyspell. I assume its absence on the Emacs side was an + ;; oversight. --Stef + (ispell-send-string "#\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")) + (ispell-send-string (concat "@" word "\n")) (flyspell-unhighlight-at cursor-location) (if (null ispell-pdict-modified-p) (setq ispell-pdict-modified-p (list ispell-pdict-modified-p))) + (goto-char save) (if (eq replace 'buffer) (ispell-add-per-file-word-list word))) (replace + ;; This was added only to the Emacs side. I assume its absence on + ;; the XEmacs side was an oversight. --Stef + (flyspell-unhighlight-at cursor-location) (let ((old-max (point-max)) (new-word (if (atom replace) replace (car replace))) (cursor-location (+ (- (length word) (- end start)) cursor-location))) - (if (not (equal new-word (car poss))) - (progn - (delete-region start end) - (goto-char start) - (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))))) + (unless (equal new-word (car poss)) + (delete-region start end) + (goto-char start) + (funcall flyspell-insert-function new-word) + (if flyspell-abbrev-p + (flyspell-define-abbrev word new-word))) + ;; In the original Emacs code, this was only called in the body + ;; of the if. I arbitrarily kept the XEmacs behavior instead. + (flyspell-ajust-cursor-point save cursor-location old-max))) + (t + (goto-char save) + nil))) ;*---------------------------------------------------------------------*/ ;* flyspell-ajust-cursor-point ... */ @@ -2123,7 +2079,7 @@ The word checked is the word at the mouse position." (cor-menu (if (consp corrects) (mapcar (lambda (correct) (vector correct - (list 'flyspell-xemacs-correct + (list 'flyspell-do-correct correct (list 'quote poss) word @@ -2138,7 +2094,7 @@ The word checked is the word at the mouse position." (menu (let ((save (if (consp affix) (vector (concat "Save affix: " (car affix)) - (list 'flyspell-xemacs-correct + (list 'flyspell-do-correct ''save (list 'quote poss) word @@ -2149,7 +2105,7 @@ The word checked is the word at the mouse position." t) (vector "Save word" - (list 'flyspell-xemacs-correct + (list 'flyspell-do-correct ''save (list 'quote poss) word @@ -2159,7 +2115,7 @@ The word checked is the word at the mouse position." save) t))) (session (vector "Accept (session)" - (list 'flyspell-xemacs-correct + (list 'flyspell-do-correct ''session (list 'quote poss) word @@ -2169,7 +2125,7 @@ The word checked is the word at the mouse position." save) t)) (buffer (vector "Accept (buffer)" - (list 'flyspell-xemacs-correct + (list 'flyspell-do-correct ''buffer (list 'quote poss) word -- cgit v1.2.1 From 29a47b89ace7745fab5ca91e487fe32565ba0e2f Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 6 Jun 2005 21:15:03 +0000 Subject: (tex-guess-mode): Add RequirePackage. (tex-compile-default): In the absence of any history, use the order in tex-compile-alist to choose the preferred command. (tex-compile-commands): Reorder a bit. --- lisp/ChangeLog | 5 +++++ lisp/textmodes/tex-mode.el | 17 ++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e18366bb692..c6e5323109d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2005-06-06 Stefan Monnier + * textmodes/tex-mode.el (tex-guess-mode): Add RequirePackage. + (tex-compile-default): In the absence of any history, use the order in + tex-compile-alist to choose the preferred command. + (tex-compile-commands): Reorder a bit. + * textmodes/flyspell.el (flyspell-auto-correct-binding) (flyspell-incorrect-face, flyspell-duplicate-face): Use (X)Emacs-agnostic code. diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 66dc7b83507..a715900b604 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -795,7 +795,7 @@ Inherits `shell-mode-map' with a few additions.") (regexp-opt '("documentstyle" "documentclass" "begin" "subsection" "section" "part" "chapter" "newcommand" - "renewcommand") 'words) + "renewcommand" "RequirePackage") 'words) "\\|NeedsTeXFormat{LaTeX"))) (if (and (looking-at "document\\(style\\|class\\)\\(\\[.*\\]\\)?{slides}") @@ -1639,9 +1639,12 @@ If NOT-ALL is non-nil, save the `.dvi' file." " " (if (< 0 (length tex-start-commands)) (shell-quote-argument tex-start-commands)) " %f") t "%r.dvi") - ("yap %r &" "%r.dvi") ("xdvi %r &" "%r.dvi") + ("xpdf %r.pdf &" "%r.pdf") + ("gv %r.ps &" "%r.ps") + ("yap %r &" "%r.dvi") ("advi %r &" "%r.dvi") + ("gv %r.pdf &" "%r.pdf") ("bibtex %r" "%r.aux" "%r.bbl") ("makeindex %r" "%r.idx" "%r.ind") ("texindex %r.??") @@ -1649,9 +1652,6 @@ If NOT-ALL is non-nil, save the `.dvi' file." ("dvipdf %r" "%r.dvi" "%r.pdf") ("dvips -o %r.ps %r" "%r.dvi" "%r.ps") ("ps2pdf %r.ps" "%r.ps" "%r.pdf") - ("gv %r.ps &" "%r.ps") - ("gv %r.pdf &" "%r.pdf") - ("xpdf %r.pdf &" "%r.pdf") ("lpr %r.ps" "%r.ps")) "List of commands for `tex-compile'. Each element should be of the form (FORMAT IN OUT) where @@ -1830,8 +1830,7 @@ FILE is typically the output DVI or PDF file." (push cmd cmds) (push (nth 1 cmd) unchanged-in)))) ;; If no command seems to be applicable, arbitrarily pick the first one. - (unless cmds - (setq cmds (list (car tex-compile-commands)))) + (setq cmds (if cmds (nreverse cmds) (list (car tex-compile-commands)))) ;; Remove those commands whose input was considered stable for ;; some other command (typically if (t . "%.pdf") is inactive ;; then we're using pdflatex and the fact that the dvi file @@ -1841,7 +1840,7 @@ FILE is typically the output DVI or PDF file." (unless (member (nth 1 cmd) unchanged-in) (push cmd tmp))) ;; Only remove if there's something left. - (if tmp (setq cmds tmp))) + (if tmp (setq cmds (nreverse tmp)))) ;; Remove commands whose input is not uptodate either. (let ((outs (delq nil (mapcar (lambda (x) (nth 2 x)) cmds))) (tmp nil)) @@ -1849,7 +1848,7 @@ FILE is typically the output DVI or PDF file." (unless (member (nth 1 cmd) outs) (push cmd tmp))) ;; Only remove if there's something left. - (if tmp (setq cmds tmp))) + (if tmp (setq cmds (nreverse tmp)))) ;; Select which file we're going to operate on (the latest). (let ((latest (nth 1 (car cmds)))) (dolist (cmd (prog1 (cdr cmds) (setq cmds (list (car cmds))))) -- cgit v1.2.1 From afde5d4e25e32108ff26cdf5a975416abc3441c3 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 6 Jun 2005 21:25:48 +0000 Subject: (iso-sgml2iso-trans-tab): Add NBSP. --- lisp/international/iso-cvt.el | 1 + 1 file changed, 1 insertion(+) (limited to 'lisp') diff --git a/lisp/international/iso-cvt.el b/lisp/international/iso-cvt.el index f7e325b0ca3..f896773e53c 100644 --- a/lisp/international/iso-cvt.el +++ b/lisp/international/iso-cvt.el @@ -791,6 +791,7 @@ Optional arg BUFFER is ignored (for use in `format-alist')." ("ï" "ï") ("ð" "ð") ("ñ" "ñ") + (" " " ") ("ò" "ò") ("ó" "ó") ("ô" "ô") -- cgit v1.2.1 From a54aae9e655da5bf33d5e70ebc36be9498d0f18c Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Mon, 6 Jun 2005 21:31:22 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c6e5323109d..0ae3efa38e8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2005-06-06 Luc Teirlinck + + * font-lock.el (font-lock-add-keywords): Doc fix. + 2005-06-06 Stefan Monnier * textmodes/tex-mode.el (tex-guess-mode): Add RequirePackage. -- cgit v1.2.1 From dd314c0fc3adeec23b1e71f61ef0806fbac4b10e Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Mon, 6 Jun 2005 21:32:57 +0000 Subject: (font-lock-add-keywords): Doc fix. --- lisp/font-lock.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/font-lock.el b/lisp/font-lock.el index f75c08151e8..07e3970119e 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -691,7 +691,7 @@ For example: (add-hook 'c-mode-hook (lambda () - (font-lock-add-keywords 'c-mode + (font-lock-add-keywords nil '((\"\\\\\\=<\\\\(FIXME\\\\):\" 1 font-lock-warning-face prepend) (\"\\\\\\=<\\\\(and\\\\|or\\\\|not\\\\)\\\\\\=>\" . font-lock-keyword-face))))) -- cgit v1.2.1 From 3d031334d8861fbb143b40a777da75bee8295660 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 6 Jun 2005 21:33:29 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0ae3efa38e8..d3f7c9e175c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2005-06-06 Stefan Monnier + + * international/iso-cvt.el (iso-sgml2iso-trans-tab): Add NBSP. + 2005-06-06 Luc Teirlinck * font-lock.el (font-lock-add-keywords): Doc fix. -- cgit v1.2.1 From 590bc48b85b79f29dde2d9e0a0881e2fd8e77529 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 7 Jun 2005 10:52:08 +0000 Subject: (defstruct): Set 'doc-string-elt property. --- lisp/ChangeLog | 4 ++++ lisp/emacs-lisp/lisp-mode.el | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d3f7c9e175c..120457322ef 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2005-06-07 David McCabe (tiny change) + + * emacs-lisp/lisp-mode.el (defstruct): Set 'doc-string-elt property. + 2005-06-06 Stefan Monnier * international/iso-cvt.el (iso-sgml2iso-trans-tab): Add NBSP. diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index bb815481bf0..72924417109 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -129,6 +129,7 @@ (put 'defmacro 'doc-string-elt 3) (put 'defmacro* 'doc-string-elt 3) (put 'defsubst 'doc-string-elt 3) +(put 'defstruct 'doc-string-elt 2) (put 'define-skeleton 'doc-string-elt 2) (put 'define-derived-mode 'doc-string-elt 4) (put 'define-compilation-mode 'doc-string-elt 3) @@ -194,7 +195,7 @@ (setq comment-start-skip "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *") (make-local-variable 'font-lock-comment-start-skip) ;; Font lock mode uses this only when it KNOWS a comment is starting. - (setq font-lock-comment-start-skip ";+ *") + (setq font-lock-comment-start-skip ";+ *") (make-local-variable 'comment-add) (setq comment-add 1) ;default to `;;' in comment-region (make-local-variable 'comment-column) -- cgit v1.2.1 From 6d64c19123a4facc0e1189fe14b2ba330f7992f7 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Tue, 7 Jun 2005 12:56:00 +0000 Subject: (org-run-mode-hooks): New function. (org-agenda-mode): Use it. --- lisp/ChangeLog | 5 +++++ lisp/textmodes/org.el | 10 +++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 120457322ef..368d5139978 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-06-07 Lute Kamstra + + * textmodes/org.el (org-run-mode-hooks): New function. + (org-agenda-mode): Use it. + 2005-06-07 David McCabe (tiny change) * emacs-lisp/lisp-mode.el (defstruct): Set 'doc-string-elt property. diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el index bbc59768aaf..d13a7514c16 100644 --- a/lisp/textmodes/org.el +++ b/lisp/textmodes/org.el @@ -154,8 +154,6 @@ (require 'outline) (require 'time-date) (require 'easymenu) -(or (fboundp 'run-mode-hooks) - (defalias 'run-mode-hooks 'run-hooks)) ;;; Customization variables @@ -384,6 +382,12 @@ or contain a special line If the file does not specify a category, then file's base name is used instead.") +(defun org-run-mode-hooks (&rest hooks) + "Call `run-mode-hooks' if it is available; otherwise call `run-hooks'." + (if (fboundp 'run-mode-hooks) + (apply 'run-mode-hooks hooks) + (apply 'run-hooks hooks))) + (defun org-set-regexps-and-options () "Precompute regular expressions for current buffer." (when (eq major-mode 'org-mode) @@ -3118,7 +3122,7 @@ The following commands are available: "--") (mapcar 'org-file-menu-entry org-agenda-files))) (org-agenda-set-mode-name) - (run-mode-hooks 'org-agenda-mode-hook)) + (org-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) -- cgit v1.2.1 From b978659cce9315dc255565c5488817aa4cc401ff Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Wed, 8 Jun 2005 08:14:32 +0000 Subject: (flyspell-mode): Use define-minor-mode. --- lisp/ChangeLog | 4 ++++ lisp/textmodes/flyspell.el | 30 +++++++----------------------- 2 files changed, 11 insertions(+), 23 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 368d5139978..9d1e57f0261 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2005-06-08 Lute Kamstra + + * textmodes/flyspell.el (flyspell-mode): Use define-minor-mode. + 2005-06-07 Lute Kamstra * textmodes/org.el (org-run-mode-hooks): New function. diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 8bd6c731e3c..f66f81a195b 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -468,7 +468,7 @@ See also `flyspell-duplicate-distance'." ;* flyspell-mode ... */ ;*---------------------------------------------------------------------*/ ;;;###autoload -(defun flyspell-mode (&optional arg) +(define-minor-mode flyspell-mode "Minor mode performing on-the-fly spelling checking. This spawns a single Ispell process and checks each word. The default flyspell behavior is to highlight incorrect words. @@ -496,28 +496,12 @@ in your .emacs file. \\[flyspell-region] checks all words inside a region. \\[flyspell-buffer] checks the whole buffer." - (interactive "P") - (let ((old-flyspell-mode flyspell-mode)) - ;; Mark the mode as on or off. - (setq flyspell-mode (not (or (and (null arg) flyspell-mode) - (<= (prefix-numeric-value arg) 0)))) - ;; Do the real work. - (unless (eq flyspell-mode old-flyspell-mode) - (if flyspell-mode - (flyspell-mode-on) - (flyspell-mode-off)) - ;; Force modeline redisplay. - (set-buffer-modified-p (buffer-modified-p))))) - -;*---------------------------------------------------------------------*/ -;* Autoloading */ -;*---------------------------------------------------------------------*/ -;;;###autoload -(add-minor-mode 'flyspell-mode - 'flyspell-mode-line-string - flyspell-mode-map - nil - 'flyspell-mode) + :lighter flyspell-mode-line-string + :keymap flyspell-mode-map + :group 'flyspell + (if flyspell-mode + (flyspell-mode-on) + (flyspell-mode-off))) ;*---------------------------------------------------------------------*/ ;* flyspell-buffers ... */ -- cgit v1.2.1 From f8820a55245f544b181acb5eb4af520b6bfbcc27 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Wed, 8 Jun 2005 09:49:58 +0000 Subject: (flyspell-mode-line-string): Remove autoload cookie. (flyspell-mode): Remove defvar. --- lisp/ChangeLog | 2 ++ lisp/textmodes/flyspell.el | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9d1e57f0261..35e334a4a8a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,8 @@ 2005-06-08 Lute Kamstra * textmodes/flyspell.el (flyspell-mode): Use define-minor-mode. + (flyspell-mode-line-string): Remove autoload cookie. + (flyspell-mode): Remove defvar. 2005-06-07 Lute Kamstra diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index f66f81a195b..0326510f75f 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -228,7 +228,6 @@ http://strw.leidenuniv.nl/~dominik/Tools" :version "21.1" :type 'boolean) -;;;###autoload (defcustom flyspell-mode-line-string " Fly" "*String displayed on the modeline when flyspell is active. Set this to nil if you don't want a modeline indicator." @@ -406,10 +405,6 @@ property of the major mode name.") ;*---------------------------------------------------------------------*/ (eval-when-compile (defvar flyspell-local-mouse-map)) -;;;###autoload -(defvar flyspell-mode nil) -(make-variable-buffer-local 'flyspell-mode) - (defvar flyspell-mouse-map (let ((map (make-sparse-keymap))) (if flyspell-use-meta-tab -- cgit v1.2.1 From 89a28f0b2430ca690bb2ef9395cc4dea35a2dc87 Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Wed, 8 Jun 2005 12:00:46 +0000 Subject: (ido-read-file-name): Fallback to read-file-name on C-f also when reading directory name. --- lisp/ido.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/ido.el b/lisp/ido.el index 47372afec52..4ac9546de64 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -4193,7 +4193,9 @@ See `read-file-name' for additional parameters." (eq (get this-command 'ido) 'dir) (memq this-command ido-read-file-name-as-directory-commands)) (setq filename - (ido-read-directory-name prompt dir default-filename mustmatch initial))) + (ido-read-directory-name prompt dir default-filename mustmatch initial)) + (if (eq ido-exit 'fallback) + (setq filename 'fallback))) ((and (not (eq (get this-command 'ido) 'ignore)) (not (memq this-command ido-read-file-name-non-ido)) (or (null predicate) (eq predicate 'file-exists-p))) -- cgit v1.2.1 From 4a29de231e2358984c07e3b371f80b768f0b1dda Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Wed, 8 Jun 2005 12:13:21 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 35e334a4a8a..87452a66f50 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-06-08 Kim F. Storm + + * ido.el (ido-read-file-name): Fallback to read-file-name on C-f + also when reading directory name. + 2005-06-08 Lute Kamstra * textmodes/flyspell.el (flyspell-mode): Use define-minor-mode. @@ -11,7 +16,7 @@ 2005-06-07 David McCabe (tiny change) - * emacs-lisp/lisp-mode.el (defstruct): Set 'doc-string-elt property. + * emacs-lisp/lisp-mode.el (defstruct): Set doc-string-elt property. 2005-06-06 Stefan Monnier -- cgit v1.2.1 From 03ceda9edd34ce05068a118bc8fd49913725fa09 Mon Sep 17 00:00:00 2001 From: Richard M. Stallman Date: Wed, 8 Jun 2005 15:35:05 +0000 Subject: Comment changes. --- lisp/simple.el | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/simple.el b/lisp/simple.el index 097dde16d01..ba661e54a19 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3342,10 +3342,15 @@ Outline mode sets this." (or (memq prop buffer-invisibility-spec) (assq prop buffer-invisibility-spec))))) -;; Perform vertical scrolling of tall images if necessary. -;; Don't vscroll in a keyboard macro. +;; This is like line-move-1 except that it also performs +;; vertical scrolling of tall images if appropriate. +;; That is not really a clean thing to do, since it mixes +;; scrolling with cursor motion. But so far we don't have +;; a cleaner solution to the problem of making C-n do something +;; useful given a tall image. (defun line-move (arg &optional noerror to-end try-vscroll) (if (and auto-window-vscroll try-vscroll + ;; But don't vscroll in a keyboard macro. (not defining-kbd-macro) (not executing-kbd-macro)) (let ((forward (> arg 0)) @@ -3368,6 +3373,8 @@ Outline mode sets this." ;; Update display before calling pos-visible-in-window-p, ;; because it depends on window-start being up-to-date. (sit-for 0) + ;; If the current line is partly hidden at the bottom, + ;; scroll it partially up so as to unhide the bottom. (if (and (setq part (nth 2 (pos-visible-in-window-p (line-beginning-position) nil t))) (> (cdr part) 0)) -- cgit v1.2.1 From 676873ff4452ce29142ad174c808c8b0993b1881 Mon Sep 17 00:00:00 2001 From: Richard M. Stallman Date: Wed, 8 Jun 2005 15:41:36 +0000 Subject: (escape-glyph): Use blue once again in last case. (no-break-space): Redefined so that it isn't invisible on a tty. --- lisp/faces.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/faces.el b/lisp/faces.el index c02c91cde86..9db2cc9ce97 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -2089,13 +2089,16 @@ Note: Other faces cannot inherit from the cursor face." ;; See the comment in minibuffer-prompt for ;; the reason not to use blue on MS-DOS. (((type pc)) :foreground "magenta") - (t :foreground "red4")) + ;; red4 is too light -- rms. + (t :foreground "blue")) "Face for characters displayed as ^-sequences or \-sequences." :group 'basic-faces :version "22.1") (defface no-break-space - '((t :inherit escape-glyph :underline t)) + '((((min-colors 88)) :inherit escape-glyph :underline t) + (((min-colors 8)) :background "magenta" :foreground ) + (t :inverse-video t)) "Face for non-breaking space." :group 'basic-faces :version "22.1") -- cgit v1.2.1 From 9391790a10e3c876cea26819b8b923de0d73ff66 Mon Sep 17 00:00:00 2001 From: Richard M. Stallman Date: Wed, 8 Jun 2005 15:43:59 +0000 Subject: (makefile-shell-face): Make this a no-op except on terminals with enough colors to really display it. (makefile-dependency-regex): Delete spurious `bb'. --- lisp/progmodes/make-mode.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lisp') diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el index 35fcc37a29c..d2d2dc6263a 100644 --- a/lisp/progmodes/make-mode.el +++ b/lisp/progmodes/make-mode.el @@ -115,9 +115,8 @@ :version "22.1") (defface makefile-shell-face - '((((class color) (background light)) (:background "seashell1")) - (((class color) (background dark)) (:background "seashell4")) - (t (:reverse-video t))) + '((((class color) (min-colors 88) (background light)) (:background "seashell1")) + (((class color) (min-colors 88) (background dark)) (:background "seashell4"))) "Face to use for additionally highlighting Shell commands in Font-Lock mode." :group 'faces :group 'makefile @@ -262,7 +261,7 @@ not be enclosed in { } or ( )." ;; index in makefile-imenu-generic-expression. (defvar makefile-dependency-regex ;; Allow for two nested levels $(v1:$(v2:$(v3:a=b)=c)=d) - "^\\(\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[^({]\\|.[^\n$#})]+?[})]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#:=]\\)+?\\)\\(:\\)\\(?:[ \t]*$\\|[^=\n]\\(?:[^#\n]*?;[ \t]*\\(bb.+\\)\\)?\\)" + "^\\(\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[^({]\\|.[^\n$#})]+?[})]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#:=]\\)+?\\)\\(:\\)\\(?:[ \t]*$\\|[^=\n]\\(?:[^#\n]*?;[ \t]*\\(.+\\)\\)?\\)" "Regex used to find dependency lines in a makefile.") (defconst makefile-bsdmake-dependency-regex -- cgit v1.2.1 From 8177179364072d9ca1c9ffe68d497cb9547c5219 Mon Sep 17 00:00:00 2001 From: Richard M. Stallman Date: Wed, 8 Jun 2005 15:45:34 +0000 Subject: (ispell-check-version): Use match-string-no-properties. (ispell-region, ispell-buffer-local-parsing, ispell-buffer-local-dict) (ispell-buffer-local-words): Likewise. --- lisp/textmodes/ispell.el | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) (limited to 'lisp') diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 1de27265b08..067ee42f868 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -796,19 +796,16 @@ Otherwise returns the library directory name, if that is defined." nil t) case-fold-search case-fold-search-val) (if (or (not status) ; major version mismatch - (< (car (read-from-string (buffer-substring-no-properties - (match-beginning 2) (match-end 2)))) + (< (car (read-from-string (match-string-no-properties 2))) (car (cdr ispell-required-version)))) ; minor version mismatch (error "%s version 3 release %d.%d.%d or greater is required" ispell-program-name (car ispell-required-version) (car (cdr ispell-required-version)) (car (cdr (cdr ispell-required-version)))) ;; check that it is the correct version. - (if (and (= (car (read-from-string (buffer-substring-no-properties - (match-beginning 2)(match-end 2)))) + (if (and (= (car (read-from-string (match-string-no-properties 2))) (car (cdr ispell-required-version))) - (< (car (read-from-string (buffer-substring-no-properties - (match-beginning 3)(match-end 3)))) + (< (car (read-from-string (match-string-no-properties 3))) (car (cdr (cdr ispell-required-version))))) (setq ispell-offset 0)) ;; Check to see if it's really aspell. @@ -2567,9 +2564,7 @@ Return nil if spell session is quit, (ispell-begin-skip-region-regexp) ispell-region-end t)) (progn - (setq key (buffer-substring-no-properties - (car (match-data)) - (car (cdr (match-data))))) + (setq key (match-string-no-properties 0)) (set-marker skip-region-start (- (point) (length key))) (goto-char rstart)) @@ -3510,8 +3505,7 @@ Includes Latex/Nroff modes and extended character mode." (search-forward ispell-parsing-keyword) (while (re-search-forward " *\\([^ \"]+\\)" end t) ;; space separated definitions. - (setq string (downcase (buffer-substring-no-properties - (match-beginning 1) (match-end 1)))) + (setq string (downcase (match-string-no-properties 1))) (cond ((and (string-match "latex-mode" string) (not (eq 'exclusive ispell-check-comments))) (ispell-send-string "+\n~tex\n")) @@ -3544,8 +3538,7 @@ Both should not be used to define a buffer-local dictionary." (setq end (save-excursion (end-of-line) (point))) (if (re-search-forward " *\\([^ \"]+\\)" end t) (setq ispell-local-dictionary - (buffer-substring-no-properties (match-beginning 1) - (match-end 1))))))) + (match-string-no-properties 1)))))) (goto-char (point-max)) (if (search-backward ispell-pdict-keyword nil t) (progn @@ -3553,8 +3546,7 @@ Both should not be used to define a buffer-local dictionary." (setq end (save-excursion (end-of-line) (point))) (if (re-search-forward " *\\([^ \"]+\\)" end t) (setq ispell-local-pdict - (buffer-substring-no-properties (match-beginning 1) - (match-end 1)))))))) + (match-string-no-properties 1))))))) ;; Reload if new personal dictionary defined. (if (and ispell-local-pdict (not (equal ispell-local-pdict ispell-personal-dictionary))) @@ -3584,8 +3576,7 @@ Both should not be used to define a buffer-local dictionary." ;; buffer-local words separated by a space, and can contain ;; any character other than a space. Not rigorous enough. (while (re-search-forward " *\\([^ ]+\\)" end t) - (setq string (buffer-substring-no-properties (match-beginning 1) - (match-end 1))) + (setq string (match-string-no-properties 1)) ;; This can fail when string contains a word with illegal chars. ;; Error handling needs to be added between ispell and emacs. (if (and (< 1 (length string)) -- cgit v1.2.1 From 96a017e43c9def35c67385759d769a064b6bf5c8 Mon Sep 17 00:00:00 2001 From: Richard M. Stallman Date: Wed, 8 Jun 2005 15:53:51 +0000 Subject: (no-break-space): Test `class' before `min-colors' --- lisp/faces.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/faces.el b/lisp/faces.el index 9db2cc9ce97..f278546154c 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -2096,8 +2096,8 @@ Note: Other faces cannot inherit from the cursor face." :version "22.1") (defface no-break-space - '((((min-colors 88)) :inherit escape-glyph :underline t) - (((min-colors 8)) :background "magenta" :foreground ) + '((((class color) (min-colors 88)) :inherit escape-glyph :underline t) + (((class color) (min-colors 8)) :background "magenta" :foreground ) (t :inverse-video t)) "Face for non-breaking space." :group 'basic-faces -- cgit v1.2.1 From a566ce8e096a523858948d3f4a565a2a57ff644c Mon Sep 17 00:00:00 2001 From: Richard M. Stallman Date: Wed, 8 Jun 2005 15:54:43 +0000 Subject: (define-minor-mode): If BODY is empty, give the variable a doc string that doesn't say don't set it directly. --- lisp/emacs-lisp/easy-mmode.el | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'lisp') diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index bb0fa666217..a342f8a5530 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -183,13 +183,18 @@ Use the command `%s' to change this variable." pretty-name mode)) (let ((curfile (or (and (boundp 'byte-compile-current-file) byte-compile-current-file) - load-file-name))) - `(defcustom ,mode ,init-value - ,(format "Non-nil if %s is enabled. + load-file-name)) + base-doc-string) + (setq base-doc-string "Non-nil if %s is enabled. See the command `%s' for a description of this minor-mode. Setting this variable directly does not take effect; -use either \\[customize] or the function `%s'." - pretty-name mode mode) +use either \\[customize] or the function `%s'.") + (if (null body) + (setq base-doc-string "Non-nil if %s is enabled. +See the command `%s' for a description of this minor-mode.")) + + `(defcustom ,mode ,init-value + ,(format base-doc-string pretty-name mode mode) :set 'custom-set-minor-mode :initialize 'custom-initialize-default ,@group -- cgit v1.2.1 From 995987378d97aed8094f27262f37aefcf6b7f2cc Mon Sep 17 00:00:00 2001 From: Richard M. Stallman Date: Wed, 8 Jun 2005 15:55:18 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 87452a66f50..d3363bf4138 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,25 @@ +2005-06-08 Richard M. Stallman + + * emacs-lisp/easy-mmode.el (define-minor-mode): If BODY is empty, + give the variable a doc string that doesn't say don't set it directly. + + * textmodes/ispell.el (ispell-check-version): + Use match-string-no-properties. + (ispell-region, ispell-buffer-local-parsing, ispell-buffer-local-dict) + (ispell-buffer-local-words): Likewise. + + * progmodes/make-mode.el (makefile-shell-face): Make this a no-op + except on terminals with enough colors to really display it. + (makefile-dependency-regex): Delete spurious `bb'. + + * faces.el (escape-glyph): Use blue once again in last case. + (no-break-space): Redefined so that it isn't invisible on a tty. + +2005-06-07 Richard M. Stallman + + * progmodes/make-mode.el (makefile-dependency-regex): + Remove `bb' inserted by mistake. + 2005-06-08 Kim F. Storm * ido.el (ido-read-file-name): Fallback to read-file-name on C-f @@ -16,7 +38,7 @@ 2005-06-07 David McCabe (tiny change) - * emacs-lisp/lisp-mode.el (defstruct): Set doc-string-elt property. + * emacs-lisp/lisp-mode.el (defstruct): Set `doc-string-elt' property. 2005-06-06 Stefan Monnier -- cgit v1.2.1 From d48f0f00da73bff143ce17b6fff3e3800e092e72 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 8 Jun 2005 19:35:54 +0000 Subject: (debug): Don't iconify if we know we'll re-enter the debugger immediately anyway. Undo the 2005-06-06 change, rendered unnecessary now. --- lisp/emacs-lisp/debug.el | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'lisp') diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 30e6f3480cc..f3eaad0ce25 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -97,10 +97,7 @@ This is to optimize `debugger-make-xrefs'.") This variable is used by `debugger-jump', `debugger-step-through', and `debugger-reenable' to temporarily disable debug-on-entry.") -(defvar debugger-window nil - "If non-nil, the last window used by the debugger for its buffer. -The next call to the debugger reuses the same window, if it is still live. -That case would normally occur when the window is in a separate frame.") +(defvar inhibit-trace) ;Not yet implemented. ;;;###autoload (setq debugger 'debug) @@ -183,13 +180,7 @@ first will be printed into the backtrace buffer." ;; Place an extra debug-on-exit for macro's. (when (eq 'lambda (car-safe (cadr (backtrace-frame 4)))) (backtrace-debug 5 t))) - (if (and debugger-window - (window-live-p debugger-window)) - (progn - (set-window-buffer debugger-window debugger-buffer) - (select-window debugger-window)) - (pop-to-buffer debugger-buffer)) - (setq debugger-window (selected-window)) + (pop-to-buffer debugger-buffer) (debugger-mode) (debugger-setup-buffer debugger-args) (when noninteractive @@ -226,12 +217,17 @@ first will be printed into the backtrace buffer." (erase-buffer) (fundamental-mode) (with-selected-window (get-buffer-window debugger-buffer 0) - (when (window-dedicated-p (selected-window)) + (when (and (window-dedicated-p (selected-window)) + (not debugger-step-after-exit)) ;; If the window is not dedicated, burying the buffer ;; will mean that the frame created for it is left - ;; around showing smoe random buffer, and next time we + ;; around showing some random buffer, and next time we ;; pop to the debugger buffer we'll create yet ;; another frame. + ;; If debugger-step-after-exit is non-nil, the frame + ;; would need to be de-iconified anyway immediately + ;; after when we re-enter the debugger, so iconifying it + ;; here would cause flashing. (bury-buffer)))) (kill-buffer debugger-buffer)) (set-match-data debugger-outer-match-data))) -- cgit v1.2.1 From 72f23b85ef2b057446b92375d176ff503932a60b Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 8 Jun 2005 19:41:19 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d3363bf4138..82055d3e613 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2005-06-08 Stefan Monnier + + * emacs-lisp/debug.el (debug): Don't iconify if we know we'll re-enter + the debugger immediately anyway. Undo the 2005-06-06 change, rendered + unnecessary now. + 2005-06-08 Richard M. Stallman * emacs-lisp/easy-mmode.el (define-minor-mode): If BODY is empty, @@ -13,12 +19,7 @@ (makefile-dependency-regex): Delete spurious `bb'. * faces.el (escape-glyph): Use blue once again in last case. - (no-break-space): Redefined so that it isn't invisible on a tty. - -2005-06-07 Richard M. Stallman - - * progmodes/make-mode.el (makefile-dependency-regex): - Remove `bb' inserted by mistake. + (no-break-space): Redefine so that it isn't invisible on a tty. 2005-06-08 Kim F. Storm -- cgit v1.2.1 From 10ddc30eee98ce9af97d0b78021dd5bcf9192413 Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Wed, 8 Jun 2005 22:37:13 +0000 Subject: (replace-match-data): Pass RESEAT arg `t' to match-data to unchain markers in match-data. --- lisp/replace.el | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'lisp') diff --git a/lisp/replace.el b/lisp/replace.el index ba3d5fcfbf4..d5ccd8723c2 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -217,7 +217,7 @@ Fourth and fifth arg START and END specify the region to operate on. To customize possible responses, change the \"bindings\" in `query-replace-map'." (interactive (let ((common - (query-replace-read-args + (query-replace-read-args (if (and transient-mark-mode mark-active) "Query replace in region" "Query replace") @@ -281,7 +281,7 @@ text, TO-STRING is actually made a list instead of a string. Use \\[repeat-complex-command] after this command for details." (interactive (let ((common - (query-replace-read-args + (query-replace-read-args (if (and transient-mark-mode mark-active) "Query replace regexp in region" "Query replace regexp") @@ -431,7 +431,7 @@ which will run faster and will not set the mark or print anything. and TO-STRING is also null.)" (interactive (let ((common - (query-replace-read-args + (query-replace-read-args (if (and transient-mark-mode mark-active) "Replace string in region" "Replace string") @@ -489,10 +489,10 @@ What you probably want is a loop like this: which will run faster and will not set the mark or print anything." (interactive (let ((common - (query-replace-read-args + (query-replace-read-args (if (and transient-mark-mode mark-active) - "Replace regexp in region" - "Replace regexp") + "Replace regexp in region" + "Replace regexp") t))) (list (nth 0 common) (nth 1 common) (nth 2 common) (if (and transient-mark-mode mark-active) @@ -1268,12 +1268,7 @@ but coerced to the correct value of INTEGERS." (and (eq new reuse) (eq (null integers) (markerp (car reuse))) new))) - (match-data integers - (prog1 reuse - (while reuse - (if (markerp (car reuse)) - (set-marker (car reuse) nil)) - (setq reuse (cdr reuse))))))) + (match-data integers reuse t))) (defun replace-match-maybe-edit (newtext fixedcase literal noedit match-data) "Make a replacement with `replace-match', editing `\\?'. -- cgit v1.2.1 From a0ef72dfd7802827b20f1ff1c844c5832073300a Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Wed, 8 Jun 2005 22:37:23 +0000 Subject: (save-match-data): Add RESEAT arg `evaporate' to set-match-data to free markers in match-data. --- lisp/subr.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/subr.el b/lisp/subr.el index 45bcccbb6e5..585ec920458 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1970,7 +1970,7 @@ The value returned is the value of the last form in BODY." '((save-match-data-internal (match-data))) (list 'unwind-protect (cons 'progn body) - '(set-match-data save-match-data-internal)))) + '(set-match-data save-match-data-internal 'evaporate)))) (defun match-string (num &optional string) "Return string of text matched by last search. -- cgit v1.2.1 From b7aae902ed6d45976a249e44e296df9a97737c16 Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Wed, 8 Jun 2005 23:04:27 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 82055d3e613..a0a5c227413 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2005-06-09 Kim F. Storm + + * subr.el (save-match-data): Add RESEAT arg `evaporate' to + set-match-data to free markers in match-data. + + * replace.el (replace-match-data): Pass RESEAT arg `t' to + match-data to unchain markers in match-data. + 2005-06-08 Stefan Monnier * emacs-lisp/debug.el (debug): Don't iconify if we know we'll re-enter -- cgit v1.2.1 From f271d3c7bd8c99f1ca5544ec5b7dc97cab1e7d79 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Thu, 9 Jun 2005 01:41:23 +0000 Subject: Don't set `auto-image-file-mode'. Do not create the thumbnails directory on loading. (thumbs-conversion-program): Use `eq' to check the system type, not `equal'. (thumbs-temp-dir): Set to `temporary-file-directory', not "/tmp". Fix docstring. (thumbs-thumbsdir): New function to return the thumbnails directory, creating it if needed. (thumbs-cleanup-thumbsdir, thumbs-thumbname): Use it. (thumbs-temp-file): Delete variable and make it into a function. (thumbs-resize-image, thumbs-modify-image): Use it. (thumbs-kill-buffer): Simplify. (thumbs-gensym): Defalias or duplicate CL `gensym'. (thumbs-resize-image, thumbs-resize-interactive): Fix typos in docstrings. --- lisp/ChangeLog | 18 ++++++++++++ lisp/thumbs.el | 88 ++++++++++++++++++++++++++++------------------------------ 2 files changed, 61 insertions(+), 45 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a0a5c227413..9fad13c8bcb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,21 @@ +2005-06-09 Juanma Barranquero + + * thumbs.el: Don't set `auto-image-file-mode'. Do not create the + thumbnails directory on loading. + (thumbs-conversion-program): Use `eq' to check the system type, + not `equal'. + (thumbs-temp-dir): Initialize to `temporary-file-directory', + not "/tmp". Fix docstring. + (thumbs-thumbsdir): New function to return the thumbnails + directory, creating it if needed. + (thumbs-cleanup-thumbsdir, thumbs-thumbname): Use it. + (thumbs-temp-file): Delete variable and make it into a function. + (thumbs-resize-image, thumbs-modify-image): Use it. + (thumbs-kill-buffer): Simplify. + (thumbs-gensym): Defalias or duplicate CL `gensym'. + (thumbs-resize-image, thumbs-resize-interactive): Fix typos in + docstrings. + 2005-06-09 Kim F. Storm * subr.el (save-match-data): Add RESEAT arg `evaporate' to diff --git a/lisp/thumbs.el b/lisp/thumbs.el index c335b259c35..0fa44a3b8ee 100644 --- a/lisp/thumbs.el +++ b/lisp/thumbs.el @@ -65,8 +65,7 @@ :version "22.1" :group 'multimedia) -(defcustom thumbs-thumbsdir - (expand-file-name "~/.emacs-thumbs") +(defcustom thumbs-thumbsdir "~/.emacs-thumbs" "*Directory to store thumbnails." :type 'directory :group 'thumbs) @@ -88,7 +87,7 @@ When it reaches that size (in bytes), a warning is sent." :group 'thumbs) (defcustom thumbs-conversion-program - (if (equal 'windows-nt system-type) + (if (eq system-type 'windows-nt) "convert.exe" (or (executable-find "convert") "/usr/X11R6/bin/convert")) @@ -126,11 +125,10 @@ than `thumbs-thumbsdir-max-size'." :type 'string :group 'thumbs) -(defcustom thumbs-temp-dir - "/tmp/" +(defcustom thumbs-temp-dir temporary-file-directory "Temporary directory to use. -Leaving it to default '/tmp/' can let another user -see some of your images." +Defaults to `temporary-file-directory'. Leaving it to +this value can let another user see some of your images." :type 'directory :group 'thumbs) @@ -140,10 +138,6 @@ see some of your images." :group 'thumbs) ;; Initialize some variable, for later use. -(defvar thumbs-temp-file - (concat thumbs-temp-dir thumbs-temp-prefix) - "Temporary filename for images.") - (defvar thumbs-current-tmp-filename nil "Temporary filename of current image.") @@ -163,28 +157,36 @@ see some of your images." nil "List of marked files.") -;; Make sure auto-image-file-mode is ON. -(auto-image-file-mode t) - -;; Create the thumbs directory if it does not exists. -(setq thumbs-thumbsdir (expand-file-name thumbs-thumbsdir)) - -(when (not (file-directory-p thumbs-thumbsdir)) - (progn - (make-directory thumbs-thumbsdir) - (message "Creating thumbnails directory"))) - -(defvar thumbs-gensym-counter 0) - -(defun thumbs-gensym (&optional arg) - "Generate a new uninterned symbol. -The name is made by appending a number to PREFIX, default \"Thumbs\"." - (let ((prefix (if (stringp arg) arg "Thumbs")) - (num (if (integerp arg) arg - (prog1 - thumbs-gensym-counter - (setq thumbs-gensym-counter (1+ thumbs-gensym-counter)))))) - (make-symbol (format "%s%d" prefix num)))) +(defalias 'thumbs-gensym + (if (fboundp 'gensym) + 'gensym + ;; Copied from cl-macs.el + (defvar thumbs-gensym-counter 0) + (lambda (&optional prefix) + "Generate a new uninterned symbol. +The name is made by appending a number to PREFIX, default \"G\"." + (let ((pfix (if (stringp prefix) prefix "G")) + (num (if (integerp prefix) prefix + (prog1 thumbs-gensym-counter + (setq thumbs-gensym-counter + (1+ thumbs-gensym-counter)))))) + (make-symbol (format "%s%d" pfix num)))))) + +(defun thumbs-temp-file () + "Return a unique temporary filename for an image." + (format "%s%s-%s.jpg" + (expand-file-name thumbs-temp-dir) + thumbs-temp-prefix + (thumbs-gensym "T"))) + +(defun thumbs-thumbsdir () + "Return the current thumbnails directory (from `thumbs-thumbsdir'). +Create the thumbnails directory if it does not exist." + (let ((thumbs-thumbsdir (expand-file-name thumbs-thumbsdir))) + (unless (file-directory-p thumbs-thumbsdir) + (make-directory thumbs-thumbsdir) + (message "Creating thumbnails directory")) + thumbs-thumbsdir)) (defun thumbs-cleanup-thumbsdir () "Clean the thumbnails directory. @@ -197,8 +199,8 @@ reached." (lambda (f) (let ((fattribsL (file-attributes f))) `(,(nth 4 fattribsL) ,(nth 7 fattribsL) ,f))) - (directory-files thumbs-thumbsdir t (image-file-name-regexp))) - '(lambda (l1 l2) (time-less-p (car l1)(car l2))))) + (directory-files (thumbs-thumbsdir) t (image-file-name-regexp))) + '(lambda (l1 l2) (time-less-p (car l1) (car l2))))) (dirsize (apply '+ (mapcar (lambda (x) (cadr x)) filesL)))) (while (> dirsize thumbs-thumbsdir-max-size) (progn @@ -258,7 +260,7 @@ ACTION-PREFIX is the symbol to place before the ACTION command (defun thumbs-resize-image (&optional increment size) "Resize image in current buffer. -if INCREMENT is set, make the image bigger, else smaller. +If INCREMENT is set, make the image bigger, else smaller. Or, alternatively, a SIZE may be specified." (interactive) ;; cleaning of old temp file @@ -276,7 +278,7 @@ Or, alternatively, a SIZE may be specified." thumbs-current-image-size) (thumbs-decrement-image-size thumbs-current-image-size)))) - (tmp (format "%s%s.jpg" thumbs-temp-file (thumbs-gensym)))) + (tmp (thumbs-temp-file))) (erase-buffer) (thumbs-call-convert thumbs-current-image-filename tmp "sample" @@ -286,7 +288,7 @@ Or, alternatively, a SIZE may be specified." (setq thumbs-current-tmp-filename tmp))) (defun thumbs-resize-interactive (width height) - "Resize Image interactively to specified WIDTH and HEIGHT." + "Resize image interactively to specified WIDTH and HEIGHT." (interactive "nWidth: \nnHeight: ") (thumbs-resize-image nil (cons width height))) @@ -305,7 +307,7 @@ Or, alternatively, a SIZE may be specified." (convert-standard-filename (let ((filename (expand-file-name img))) (format "%s/%08x-%s.jpg" - thumbs-thumbsdir + (thumbs-thumbsdir) (sxhash filename) (subst-char-in-string ?\s ?\_ @@ -562,11 +564,7 @@ Open another window." (defun thumbs-kill-buffer () "Kill the current buffer." (interactive) - (let ((buffer (current-buffer))) - (condition-case nil - (delete-window (selected-window)) - (error nil)) - (kill-buffer buffer))) + (quit-window t (selected-window))) (defun thumbs-show-image-num (num) "Show the image with number NUM." @@ -643,7 +641,7 @@ ACTION and ARG should be a valid convert command." t thumbs-temp-prefix)) (let ((buffer-read-only nil) - (tmp (format "%s%s.jpg" thumbs-temp-file (thumbs-gensym)))) + (tmp (thumbs-temp-file))) (erase-buffer) (thumbs-call-convert thumbs-current-image-filename tmp -- cgit v1.2.1 From 9b530428ea5ce44dc6760f9243e363b2fa4dded1 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 9 Jun 2005 03:09:30 +0000 Subject: (debugger-will-be-back): New var. (debug): Use it. (debugger-step-through, debugger-continue, debugger-jump) (debugger-return-value): Set it when needed. (debugger-make-xrefs, debugger-frame, debugger-frame-clear): Use inhibit-read-only. --- lisp/emacs-lisp/debug.el | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'lisp') diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index f3eaad0ce25..f1ff37551d7 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -88,6 +88,8 @@ This is to optimize `debugger-make-xrefs'.") (defvar debugger-outer-standard-output) (defvar debugger-outer-inhibit-redisplay) (defvar debugger-outer-cursor-in-echo-area) +(defvar debugger-will-be-back nil + "Non-nil if we expect to get back in the debugger soon.") (defvar inhibit-debug-on-entry nil "Non-nil means that debug-on-entry is disabled.") @@ -123,6 +125,7 @@ first will be printed into the backtrace buffer." (get-buffer-create "*Backtrace*"))) (debugger-old-buffer (current-buffer)) (debugger-step-after-exit nil) + (debugger-will-be-back nil) ;; Don't keep reading from an executing kbd macro! (executing-kbd-macro nil) ;; Save the outer values of these vars for the `e' command @@ -218,13 +221,13 @@ first will be printed into the backtrace buffer." (fundamental-mode) (with-selected-window (get-buffer-window debugger-buffer 0) (when (and (window-dedicated-p (selected-window)) - (not debugger-step-after-exit)) + (not debugger-will-be-back)) ;; If the window is not dedicated, burying the buffer ;; will mean that the frame created for it is left ;; around showing some random buffer, and next time we ;; pop to the debugger buffer we'll create yet ;; another frame. - ;; If debugger-step-after-exit is non-nil, the frame + ;; If debugger-will-be-back is non-nil, the frame ;; would need to be de-iconified anyway immediately ;; after when we re-enter the debugger, so iconifying it ;; here would cause flashing. @@ -320,7 +323,7 @@ That buffer should be current already." (save-excursion (set-buffer (or buffer (current-buffer))) (setq buffer (current-buffer)) - (let ((buffer-read-only nil) + (let ((inhibit-read-only t) (old-end (point-min)) (new-end (point-min))) ;; If we saved an old backtrace, find the common part ;; between the new and the old. @@ -390,6 +393,7 @@ Enter another debugger on next entry to eval, apply or funcall." (interactive) (setq debugger-step-after-exit t) (setq debugger-jumping-flag t) + (setq debugger-will-be-back t) (add-hook 'post-command-hook 'debugger-reenable) (message "Proceeding, will debug on next eval or call.") (exit-recursive-edit)) @@ -400,6 +404,12 @@ Enter another debugger on next entry to eval, apply or funcall." (unless debugger-may-continue (error "Cannot continue")) (message "Continuing.") + (save-excursion + ;; Check to see if we've flagged some frame for debug-on-exit, in which + ;; case we'll probably come back to the debugger soon. + (goto-char (point-min)) + (if (re-search-forward "^\\* " nil t) + (setq debugger-will-be-back t))) (exit-recursive-edit)) (defun debugger-return-value (val) @@ -410,6 +420,12 @@ will be used, such as in a debug on exit from a frame." (setq debugger-value val) (princ "Returning " t) (prin1 debugger-value) + (save-excursion + ;; Check to see if we've flagged some frame for debug-on-exit, in which + ;; case we'll probably come back to the debugger soon. + (goto-char (point-min)) + (if (re-search-forward "^\\* " nil t) + (setq debugger-will-be-back t))) (exit-recursive-edit)) (defun debugger-jump () @@ -419,6 +435,7 @@ will be used, such as in a debug on exit from a frame." (setq debugger-jumping-flag t) (add-hook 'post-command-hook 'debugger-reenable) (message "Continuing through this frame") + (setq debugger-will-be-back t) (exit-recursive-edit)) (defun debugger-reenable () @@ -467,7 +484,7 @@ Applies to the frame whose line point is on in the backtrace." (beginning-of-line) (backtrace-debug (debugger-frame-number) t) (if (= (following-char) ? ) - (let ((buffer-read-only nil)) + (let ((inhibit-read-only t)) (delete-char 1) (insert ?*))) (beginning-of-line)) @@ -483,7 +500,7 @@ Applies to the frame whose line point is on in the backtrace." (beginning-of-line) (backtrace-debug (debugger-frame-number) nil) (if (= (following-char) ?*) - (let ((buffer-read-only nil)) + (let ((inhibit-read-only t)) (delete-char 1) (insert ? ))) (beginning-of-line)) -- cgit v1.2.1 From 6c06bd88d56bf5b8b856aba8bb4e2c45cd4f0a18 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 9 Jun 2005 03:15:05 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9fad13c8bcb..545f6debb31 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2005-06-09 Stefan Monnier + + * emacs-lisp/debug.el (debugger-will-be-back): New var. + (debug): Use it. + (debugger-step-through, debugger-continue, debugger-jump) + (debugger-return-value): Set it when needed. + (debugger-make-xrefs, debugger-frame, debugger-frame-clear): + Use inhibit-read-only. + 2005-06-09 Juanma Barranquero * thumbs.el: Don't set `auto-image-file-mode'. Do not create the -- cgit v1.2.1 From 9fa87e0dbcd5de07285151df20f10fd21bd5383f Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Thu, 9 Jun 2005 09:17:17 +0000 Subject: (window-size-fixed): Fix typo in docstring. --- lisp/ChangeLog | 2 ++ lisp/window.el | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 545f6debb31..d542fa1a15b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -9,6 +9,8 @@ 2005-06-09 Juanma Barranquero + * window.el (window-size-fixed): Fix typo in docstring. + * thumbs.el: Don't set `auto-image-file-mode'. Do not create the thumbnails directory on loading. (thumbs-conversion-program): Use `eq' to check the system type, diff --git a/lisp/window.el b/lisp/window.el index c797111f111..13fa2d0349c 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -31,7 +31,7 @@ (defvar window-size-fixed nil "*Non-nil in a buffer means windows displaying the buffer are fixed-size. -If the value is`height', then only the window's height is fixed. +If the value is `height', then only the window's height is fixed. If the value is `width', then only the window's width is fixed. Any other non-nil value fixes both the width and the height. Emacs won't change the size of any window displaying that buffer, -- cgit v1.2.1 From 420adcc60773aae22fad42234d3f4152629dfd0e Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 9 Jun 2005 12:14:26 +0000 Subject: (ispell-menu-map-needed): flyspell-mode could be void. --- lisp/ChangeLog | 5 +++++ lisp/textmodes/ispell.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d542fa1a15b..b2224e49321 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-06-09 Lute Kamstra + + * textmodes/ispell.el (ispell-menu-map-needed): flyspell-mode + could be void. + 2005-06-09 Stefan Monnier * emacs-lisp/debug.el (debugger-will-be-back): New var. diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 067ee42f868..afdfc951b96 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -942,7 +942,7 @@ The variable `ispell-library-directory' defines the library location." '(menu-item "Automatic spell checking (Flyspell)" flyspell-mode :help "Check spelling while you edit the text" - :button (:toggle . flyspell-mode))) + :button (:toggle . (bound-and-true-p flyspell-mode)))) (define-key ispell-menu-map [ispell-complete-word] '(menu-item "Complete Word" ispell-complete-word :help "Complete word at cursor using dictionary")) -- cgit v1.2.1 From fd8529d0a1e651aa096def7978cf323514abee91 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Thu, 9 Jun 2005 14:04:18 +0000 Subject: (shrink-window-if-larger-than-buffer): Fix typo in docstring. --- lisp/ChangeLog | 3 ++- lisp/window.el | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b2224e49321..5630cc1a82d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -14,7 +14,8 @@ 2005-06-09 Juanma Barranquero - * window.el (window-size-fixed): Fix typo in docstring. + * window.el (shrink-window-if-larger-than-buffer) + (window-size-fixed): Fix typo in docstring. * thumbs.el: Don't set `auto-image-file-mode'. Do not create the thumbnails directory on loading. diff --git a/lisp/window.el b/lisp/window.el index 13fa2d0349c..6717b5bb50f 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -542,7 +542,7 @@ If WINDOW is omitted or nil, it defaults to the selected window. Do not shrink to less than `window-min-height' lines. Do nothing if the buffer contains more lines than the present window height, or if some of the window's contents are scrolled out of view, -or if shrinking this window would also shrink another window. +or if shrinking this window would also shrink another window, or if the window is the only window of its frame." (interactive) (when (null window) -- cgit v1.2.1 From 754dc10d38308ef9c1fa9e7b766da5efe675307c Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Thu, 9 Jun 2005 21:08:13 +0000 Subject: (comint-send-input): Bind `inhibit-read-only' around call to `delete-region'. --- lisp/comint.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/comint.el b/lisp/comint.el index 37550b7b6d9..0158aa5a2df 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1547,8 +1547,12 @@ Similarly for Soar, Scheme, etc." nil comint-last-input-start comint-last-input-end nil comint-last-input-end (+ comint-last-input-end echo-len)))) - (delete-region comint-last-input-end - (+ comint-last-input-end echo-len))))) + ;; Certain parts of the text to be deleted may have + ;; been mistaken for prompts. We have to prevent + ;; problems when `comint-prompt-read-only' is non-nil. + (let ((inhibit-read-only t)) + (delete-region comint-last-input-end + (+ comint-last-input-end echo-len)))))) ;; This used to call comint-output-filter-functions, ;; but that scrolled the buffer in undesirable ways. -- cgit v1.2.1 From 3c28ffec7c52b80cb5975079a33099ed470fb12c Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Thu, 9 Jun 2005 21:15:02 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5630cc1a82d..28302d576ff 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2005-06-09 Luc Teirlinck + + * comint.el (comint-send-input): Bind `inhibit-read-only' around + call to `delete-region'. + (comint-mode-hook): Do not enable Font Lock by default. + 2005-06-09 Lute Kamstra * textmodes/ispell.el (ispell-menu-map-needed): flyspell-mode -- cgit v1.2.1 From 6c649b5f4fdb87747f6c870b37c2dda83e75f892 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Thu, 9 Jun 2005 21:16:40 +0000 Subject: (comint-mode-hook): Do not enable Font Lock by default. --- lisp/comint.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/comint.el b/lisp/comint.el index 0158aa5a2df..c3bdd5581bc 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -423,7 +423,7 @@ field boundaries in a natural way)." (make-obsolete-variable 'comint-use-prompt-regexp-instead-of-fields 'comint-use-prompt-regexp "22.1") -(defcustom comint-mode-hook '(turn-on-font-lock) +(defcustom comint-mode-hook nil "Hook run upon entry to `comint-mode'. This is run before the process is cranked up." :type 'hook -- cgit v1.2.1 From 54fc2b6add0885be49b29c8b3ac6e8620d282cce Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 00:17:49 +0000 Subject: (comint-check-proc, make-comint-in-buffer, comint-source-default): Doc fixes. (comint-mode, comint-snapshot-last-prompt): Fix typos in docstring. --- lisp/comint.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lisp') diff --git a/lisp/comint.el b/lisp/comint.el index c3bdd5581bc..14913c7ef11 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -583,7 +583,7 @@ Return not at end copies rest of line to end and sends it. Setting variable `comint-eol-on-send' means jump to the end of the line before submitting new input. -This mode is customised to create major modes such as Inferior Lisp +This mode is customized to create major modes such as Inferior Lisp mode, Shell mode, etc. This can be done by setting the hooks `comint-input-filter-functions', `comint-input-filter', `comint-input-sender' and `comint-get-old-input' to appropriate functions, and the variable @@ -654,7 +654,7 @@ Entry to this mode runs the hooks on `comint-mode-hook'." (set (make-local-variable 'next-line-add-newlines) nil)) (defun comint-check-proc (buffer) - "Return t if there is a living process associated w/buffer BUFFER. + "Return non-nil if there is a living process associated w/buffer BUFFER. Living means the status is `open', `run', or `stop'. BUFFER can be either a buffer or the name of one." (let ((proc (get-buffer-process buffer))) @@ -667,7 +667,7 @@ If BUFFER is nil, it defaults to NAME surrounded by `*'s. PROGRAM should be either a string denoting an executable program to create via `start-process', or a cons pair of the form (HOST . SERVICE) denoting a TCP connection to be opened via `open-network-stream'. If there is already a -running process in that buffer, it is not restarted. Optional third arg +running process in that buffer, it is not restarted. Optional fourth arg STARTFILE is the name of a file to send the contents of to the process. If PROGRAM is a string, any more args are arguments to PROGRAM." @@ -1583,7 +1583,7 @@ See `comint-carriage-motion' for details.") (defun comint-snapshot-last-prompt () "`snapshot' any current `comint-last-prompt-overlay'. -freeze its attributes in place, even when more input comes a long +Freeze its attributes in place, even when more input comes along and moves the prompt overlay." (when comint-last-prompt-overlay (let ((inhibit-read-only t) @@ -2389,7 +2389,7 @@ updated using `comint-update-fence', if necessary." "Compute the defaults for `load-file' and `compile-file' commands. PREVIOUS-DIR/FILE is a pair (directory . filename) from the last -source-file processing command. nil if there hasn't been one yet. +source-file processing command, or nil if there hasn't been one yet. SOURCE-MODES is a list used to determine what buffers contain source files: if the major mode of the buffer is in SOURCE-MODES, it's source. Typically, (lisp-mode) or (scheme-mode). -- cgit v1.2.1 From 14629f1501ea4866d4deab191179ec14cf4ae393 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 00:43:13 +0000 Subject: (term-mode, term-check-proc, term-input-sender, term-simple-send, term-extract-string, term-word, term-match-partial-filename): Fix typos in docstrings. (term-send-string): Improve argument/docstring consistency. --- lisp/term.el | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'lisp') diff --git a/lisp/term.el b/lisp/term.el index 47411b5099a..00c1083892e 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -597,7 +597,7 @@ This variable is buffer-local.") "Function to actually send to PROCESS the STRING submitted by user. Usually this is just 'term-simple-send, but if your mode needs to massage the input string, this is your hook. This is called from -the user command term-send-input. term-simple-send just sends +the user command term-send-input. `term-simple-send' just sends the string plus a newline.") (defcustom term-eol-on-send t @@ -888,7 +888,7 @@ is buffer-local.") (while (< i 128) (define-key map (make-string 1 i) 'term-send-raw) ;; Avoid O and [. They are used in escape sequences for various keys. - (unless (or (eq i ?O) (eq i 91)) + (unless (or (eq i ?O) (eq i 91)) (define-key esc-map (make-string 1 i) 'term-send-raw-meta)) (setq i (1+ i))) (dolist (elm (generic-character-list)) @@ -941,11 +941,11 @@ is buffer-local.") (make-display-table))) i) ;; avoid changing the display table for ^J - (setq i 0) + (setq i 0) (while (< i 10) (aset dt i (vector i)) (setq i (1+ i))) - (setq i 11) + (setq i 11) (while (< i 32) (aset dt i (vector i)) (setq i (1+ i))) @@ -983,7 +983,7 @@ and `term-scroll-to-bottom-on-output'. If you accidentally suspend your process, use \\[term-continue-subjob] to continue it. -This mode can be customised to create specific modes for running +This mode can be customized to create specific modes for running particular subprocesses. This can be done by setting the hooks `term-input-filter-functions', `term-input-filter', `term-input-sender' and `term-get-old-input' to appropriate functions, @@ -1273,7 +1273,7 @@ you type \\[term-send-input] which sends the current line to the inferior." (defun term-check-proc (buffer) "True if there is a process associated w/buffer BUFFER, and it is alive (status RUN or STOP). BUFFER can be either a buffer or the -name of one" +name of one." (let ((proc (get-buffer-process buffer))) (and proc (memq (process-status proc) '(run stop))))) @@ -2088,7 +2088,7 @@ If this takes us past the end of the current line, don't skip at all." (defun term-simple-send (proc string) "Default function for sending to PROC input STRING. This just sends STRING plus a newline. To override this, -set the hook TERM-INPUT-SENDER." +set the hook `term-input-sender'." (term-send-string proc string) (term-send-string proc "\n")) @@ -2180,7 +2180,7 @@ Security bug: your string can still be temporarily recovered with If your process is choking on big inputs, try lowering the value.") (defun term-send-string (proc str) - "Send PROCESS the contents of STRING as input. + "Send to PROC the contents of STR as input. This is equivalent to process-send-string, except that long input strings are broken up into chunks of size term-input-chunk-size. Processes are given a chance to output between chunks. This can help prevent processes @@ -2195,9 +2195,9 @@ from hanging when you send them long inputs on some OS's." (setq i next-i))))) (defun term-send-region (proc start end) - "Sends to PROC the region delimited by START and END. + "Send to PROC the region delimited by START and END. This is a replacement for process-send-region that tries to keep -your process from hanging on long inputs. See term-send-string." +your process from hanging on long inputs. See `term-send-string'." (term-send-string proc (buffer-substring start end))) @@ -2427,7 +2427,7 @@ See `term-prompt-regexp'." ;;; This is pretty stupid about strings. It decides we're in a string ;;; if there's a quote on both sides of point on the current line. (defun term-extract-string () - "Returns string around POINT that starts the current line or nil." + "Return string around `point' that starts the current line or nil." (save-excursion (let* ((point (point)) (bol (progn (beginning-of-line) (point))) @@ -2601,7 +2601,7 @@ See `term-prompt-regexp'." (defun term-adjust-current-row-cache (delta) (when term-current-row - (setq term-current-row + (setq term-current-row (max 0 (+ term-current-row delta))))) (defun term-terminal-pos () @@ -2781,11 +2781,11 @@ See `term-prompt-regexp'." ;; In insert if the if the current line ;; has become too long it needs to be ;; chopped off. - (when term-insert-mode + (when term-insert-mode (setq pos (point)) (end-of-line) (when (> (current-column) term-width) - (delete-region (- (point) (- (current-column) term-width)) + (delete-region (- (point) (- (current-column) term-width)) (point))) (goto-char pos))) (setq term-current-column nil) @@ -2804,15 +2804,15 @@ See `term-prompt-regexp'." (setq count (term-current-column)) ;; The line cannot exceed term-width. TAB at ;; the end of a line should not cause wrapping. - (setq count (min term-width + (setq count (min term-width (+ count 8 (- (mod count 8))))) (if (> term-width count) (progn - (term-move-columns + (term-move-columns (- count (term-current-column))) (setq term-current-column count)) (when (> term-width (term-current-column)) - (term-move-columns + (term-move-columns (1- (- term-width (term-current-column))))) (when (= term-width (term-current-column)) (term-move-columns -1)))) @@ -2903,7 +2903,7 @@ See `term-prompt-regexp'." (term-goto (car term-saved-cursor) (cdr term-saved-cursor))) (setq term-terminal-state 0)) - ((eq char ?c) ;; \Ec - Reset (terminfo: rs1) + ((eq char ?c) ;; \Ec - Reset (terminfo: rs1) ;; This is used by the "clear" program. (setq term-terminal-state 0) (term-reset-terminal)) @@ -3035,7 +3035,7 @@ See `term-prompt-regexp'." (setq term-current-row (1- term-height)))))) ;;; Reset the terminal, delete all the content and set the face to the -;;; default one. +;;; default one. (defun term-reset-terminal () (erase-buffer) (setq term-current-row 0) @@ -3189,7 +3189,7 @@ See `term-prompt-regexp'." ((or (eq char ?H) ; cursor motion (terminfo: cup) ;; (eq char ?f) ; xterm seems to handle this sequence too, not ;; needed for now - ) + ) (if (<= term-terminal-parameter 0) (setq term-terminal-parameter 1)) (if (<= term-terminal-previous-parameter 0) @@ -3210,8 +3210,8 @@ See `term-prompt-regexp'." (term-down (max 1 term-terminal-parameter) t)) ;; \E[C - cursor right (terminfo: cuf) ((eq char ?C) - (term-move-columns - (max 1 + (term-move-columns + (max 1 (if (>= (+ term-terminal-parameter (term-current-column)) term-width) (- term-width (term-current-column) 1) term-terminal-parameter)))) @@ -3252,7 +3252,7 @@ See `term-prompt-regexp'." )) ;;; Modified to allow ansi coloring -mm - ;; \E[m - Set/reset modes, set bg/fg + ;; \E[m - Set/reset modes, set bg/fg ;;(terminfo: smso,rmso,smul,rmul,rev,bold,sgr0,invis,op,setab,setaf) ((eq char ?m) (when (= term-terminal-more-parameters 1) @@ -3297,7 +3297,7 @@ The top-most line is line 0." (not (and (= term-scroll-start 0) (= term-scroll-end term-height))))) (term-move-columns (- (term-current-column))) - (term-goto + (term-goto term-scroll-start (term-current-column))) ;; (defun term-switch-to-alternate-sub-buffer (set) @@ -3846,7 +3846,7 @@ directory tracking functions.") (defun term-word (word-chars) - "Return the word of WORD-CHARS at point, or nil if non is found. + "Return the word of WORD-CHARS at point, or nil if none is found. Word constituents are considered to be those in WORD-CHARS, which is like the inside of a \"[...]\" (see `skip-chars-forward')." (save-excursion @@ -3863,7 +3863,7 @@ inside of a \"[...]\" (see `skip-chars-forward')." (defun term-match-partial-filename () - "Return the filename at point, or nil if non is found. + "Return the filename at point, or nil if none is found. Environment variables are substituted. See `term-word'." (let ((filename (term-word "~/A-Za-z0-9+@:_.$#,={}-"))) (and filename (substitute-in-file-name filename)))) -- cgit v1.2.1 From 1acb4c265ee89fce50bbe614cfd746a82cfcb37e Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 00:44:05 +0000 Subject: (rmail-forward-separator-regex): Fix typo in docstring. --- lisp/mail/undigest.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/mail/undigest.el b/lisp/mail/undigest.el index 2c447065643..f8856243194 100644 --- a/lisp/mail/undigest.el +++ b/lisp/mail/undigest.el @@ -40,7 +40,7 @@ "^----.*\\([Ff]orwarded\\|[Oo]riginal\\).*[Mm]essage" "*Regexp to match the string that introduces forwarded messages. This is not a header, but a string contained in the body of the message. -You may need to customise it for local needs." +You may need to customize it for local needs." :type 'regexp :group 'rmail-headers) -- cgit v1.2.1 From 1cecf04d9afd7fbe5c0694cfbd5726efaf282755 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 00:56:04 +0000 Subject: (frame-current-scroll-bars): Fix typos in docstring. --- lisp/frame.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/frame.el b/lisp/frame.el index 3693295e819..6b69dead414 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -969,9 +969,9 @@ one frame, otherwise the name is displayed on the frame's caption bar." (defun frame-current-scroll-bars (&optional frame) "Return the current scroll-bar settings in frame FRAME. -Value is a cons (VERTICAL . HORISONTAL) where VERTICAL specifies the +Value is a cons (VERTICAL . HORIZ0NTAL) where VERTICAL specifies the current location of the vertical scroll-bars (left, right, or nil), -and HORISONTAL specifies the current location of the horisontal scroll +and HORIZONTAL specifies the current location of the horizontal scroll bars (top, bottom, or nil)." (let ((vert (frame-parameter frame 'vertical-scroll-bars)) (hor nil)) -- cgit v1.2.1 From c62195fa74d9f195508cba3e9624717d6e2e56bb Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 00:57:02 +0000 Subject: (window-current-scroll-bars): Fix typos in docstring. --- lisp/window.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/window.el b/lisp/window.el index 6717b5bb50f..09fac6c520f 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -92,9 +92,9 @@ If ALL-FRAMES is anything else, count only the selected frame." (defun window-current-scroll-bars (&optional window) "Return the current scroll-bar settings in window WINDOW. -Value is a cons (VERTICAL . HORISONTAL) where VERTICAL specifies the +Value is a cons (VERTICAL . HORIZONTAL) where VERTICAL specifies the current location of the vertical scroll-bars (left, right, or nil), -and HORISONTAL specifies the current location of the horisontal scroll +and HORIZONTAL specifies the current location of the horizontal scroll bars (top, bottom, or nil)." (let ((vert (nth 2 (window-scroll-bars window))) (hor nil)) -- cgit v1.2.1 From 63baed9942f0dfc4d8a5b58febc26bab3f0b88d4 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 01:00:55 +0000 Subject: (cua-normal-cursor-color, cua-read-only-cursor-color, cua-overwrite-cursor-color, cua-global-mark-cursor-color): Fix typos in docstrings. --- lisp/ChangeLog | 22 +++++++++++++++++++++- lisp/emulation/cua-base.el | 16 ++++++++-------- 2 files changed, 29 insertions(+), 9 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 28302d576ff..8f24016c348 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,23 @@ +2005-06-10 Juanma Barranquero + + * comint.el (comint-mode, comint-snapshot-last-prompt): + * frame.el (frame-current-scroll-bars): + * term.el (term-mode, term-check-proc, term-input-sender) + (term-simple-send, term-extract-string, term-word) + (term-match-partial-filename): + * window.el (window-current-scroll-bars): + * emulation/cua-base.el (cua-normal-cursor-color) + (cua-read-only-cursor-color, cua-overwrite-cursor-color) + (cua-global-mark-cursor-color): + * mail/undigest.el (rmail-forward-separator-regex): + Fix typos in docstrings. + + * comint.el (comint-check-proc, make-comint-in-buffer) + (comint-source-default): Doc fixes. + + * term.el (term-send-string): Improve argument/docstring + consistency. + 2005-06-09 Luc Teirlinck * comint.el (comint-send-input): Bind `inhibit-read-only' around @@ -9733,7 +9753,7 @@ * toolbar/tool-bar.el (tool-bar-setup): Tool bar item dired uses icon diropen. New tool bar item find-file-existing uses icon open. - * dired.el (dired-read-dir-and-switches): Call read-driectory-name + * dired.el (dired-read-dir-and-switches): Call read-directory-name instead of read-file-name. 2004-11-02 Ulf Jasper diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index fe2b0a892a8..ecd75773648 100644 --- a/lisp/emulation/cua-base.el +++ b/lisp/emulation/cua-base.el @@ -447,13 +447,13 @@ a cons (TYPE . COLOR), then both properties are affected." (choice :tag "Type" (const :tag "Filled box" box) (const :tag "Vertical bar" bar) - (const :tag "Horisontal bar" hbar) + (const :tag "Horizontal bar" hbar) (const :tag "Hollow box" hollow)) (cons :tag "Color and Type" (choice :tag "Type" (const :tag "Filled box" box) (const :tag "Vertical bar" bar) - (const :tag "Horisontal bar" hbar) + (const :tag "Horizontal bar" hbar) (const :tag "Hollow box" hollow)) (color :tag "Color"))) :group 'cua) @@ -471,13 +471,13 @@ a cons (TYPE . COLOR), then both properties are affected." (choice :tag "Type" (const :tag "Filled box" box) (const :tag "Vertical bar" bar) - (const :tag "Horisontal bar" hbar) + (const :tag "Horizontal bar" hbar) (const :tag "Hollow box" hollow)) (cons :tag "Color and Type" (choice :tag "Type" (const :tag "Filled box" box) (const :tag "Vertical bar" bar) - (const :tag "Horisontal bar" hbar) + (const :tag "Horizontal bar" hbar) (const :tag "Hollow box" hollow)) (color :tag "Color"))) :group 'cua) @@ -495,13 +495,13 @@ a cons (TYPE . COLOR), then both properties are affected." (choice :tag "Type" (const :tag "Filled box" box) (const :tag "Vertical bar" bar) - (const :tag "Horisontal bar" hbar) + (const :tag "Horizontal bar" hbar) (const :tag "Hollow box" hollow)) (cons :tag "Color and Type" (choice :tag "Type" (const :tag "Filled box" box) (const :tag "Vertical bar" bar) - (const :tag "Horisontal bar" hbar) + (const :tag "Horizontal bar" hbar) (const :tag "Hollow box" hollow)) (color :tag "Color"))) :group 'cua) @@ -520,13 +520,13 @@ a cons (TYPE . COLOR), then both properties are affected." (choice :tag "Type" (const :tag "Filled box" box) (const :tag "Vertical bar" bar) - (const :tag "Horisontal bar" hbar) + (const :tag "Horizontal bar" hbar) (const :tag "Hollow box" hollow)) (cons :tag "Color and Type" (choice :tag "Type" (const :tag "Filled box" box) (const :tag "Vertical bar" bar) - (const :tag "Horisontal bar" hbar) + (const :tag "Horizontal bar" hbar) (const :tag "Hollow box" hollow)) (color :tag "Color"))) :group 'cua) -- cgit v1.2.1 From 63e88db35a9388d7f74266a72187ad3bf22656cc Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 10 Jun 2005 01:52:13 +0000 Subject: (x-clipboard-yank): Use x-selection-value instead of x-get-selection. --- lisp/ChangeLog | 5 +++++ lisp/term/x-win.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8f24016c348..e3d6cdc98d6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-06-10 Zhang Wei (tiny change) + + * term/x-win.el (x-clipboard-yank): Use x-selection-value instead + of x-get-selection. + 2005-06-10 Juanma Barranquero * comint.el (comint-mode, comint-snapshot-last-prompt): diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index 5b4ff6d2f7c..a4118029eaa 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el @@ -2467,7 +2467,7 @@ order until succeed.") (interactive) (let ((clipboard-text (condition-case nil - (x-get-selection 'CLIPBOARD) + (x-selection-value 'CLIPBOARD) (error nil))) (x-select-enable-clipboard t)) (if (and clipboard-text (> (length clipboard-text) 0)) -- cgit v1.2.1 From d8338794e7ced36f47e50a5877b4e716ccbf1060 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 10 Jun 2005 05:41:46 +0000 Subject: (x-clipboard-yank): Remove condition-case wrapping. --- lisp/ChangeLog | 10 ++++++++++ lisp/term/x-win.el | 10 ++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e3d6cdc98d6..a6f7849346b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2005-06-10 Kenichi Handa + + * term/x-win.el (x-clipboard-yank): Remove condition-case + wrapping. + +2005-06-11 Kenichi Handa + + * add-log.el (change-log-font-lock-keywords): Make the regexp for + date lines stricter. + 2005-06-10 Zhang Wei (tiny change) * term/x-win.el (x-clipboard-yank): Use x-selection-value instead diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index a4118029eaa..458cff0ae6d 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el @@ -2183,6 +2183,11 @@ order until succeed.") ctext utf8))))) +;; Get a selection value of type TYPE by calling x-get-selection with +;; an appropiate DATA-TYPE argument decidd by `x-select-request-type'. +;; The return value is already decoded. If x-get-selection causes an +;; error, this function return nil. + (defun x-selection-value (type) (let (text) (cond ((null x-select-request-type) @@ -2465,10 +2470,7 @@ order until succeed.") (defun x-clipboard-yank () "Insert the clipboard contents, or the last stretch of killed text." (interactive) - (let ((clipboard-text - (condition-case nil - (x-selection-value 'CLIPBOARD) - (error nil))) + (let ((clipboard-text (x-selection-value 'CLIPBOARD)) (x-select-enable-clipboard t)) (if (and clipboard-text (> (length clipboard-text) 0)) (kill-new clipboard-text)) -- cgit v1.2.1 From 0efefc5296d1cdd0371b3faeafbccf382e5811c7 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 10 Jun 2005 07:16:40 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-364 Remove "-face" suffix from widget faces 2005-06-10 Miles Bader * lisp/wid-edit.el (widget-documentation, widget-button) (widget-field, widget-single-line-field, widget-inactive) (widget-button-pressed): "-face" suffix removed from face names. (widget-documentation-face, widget-button-face) (widget-field-face, widget-single-line-field-face) (widget-inactive-face, widget-button-pressed-face): New backward-compatibility aliases for renamed faces. (widget-documentation-face, widget-button-face) (widget-button-pressed-face, widget-specify-field) (widget-specify-inactive): Use renamed widget faces. --- lisp/ChangeLog | 13 +++++++ lisp/wid-edit.el | 108 ++++++++++++++++++++++++++++++------------------------- 2 files changed, 73 insertions(+), 48 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a6f7849346b..d74aa9d564a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,16 @@ +2005-06-10 Miles Bader + + * wid-edit.el (widget-documentation, widget-button) + (widget-field, widget-single-line-field, widget-inactive) + (widget-button-pressed): "-face" suffix removed from face names. + (widget-documentation-face, widget-button-face) + (widget-field-face, widget-single-line-field-face) + (widget-inactive-face, widget-button-pressed-face): + New backward-compatibility aliases for renamed faces. + (widget-documentation-face, widget-button-face) + (widget-button-pressed-face, widget-specify-field) + (widget-specify-inactive): Use renamed widget faces. + 2005-06-10 Kenichi Handa * term/x-win.el (x-clipboard-yank): Remove condition-case diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index d1ea8197fec..fbd76c6931a 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -89,28 +89,32 @@ :group 'widgets :group 'faces) -(defvar widget-documentation-face 'widget-documentation-face +(defvar widget-documentation-face 'widget-documentation "Face used for documentation strings in widgets. This exists as a variable so it can be set locally in certain buffers.") -(defface widget-documentation-face '((((class color) - (background dark)) - (:foreground "lime green")) - (((class color) - (background light)) - (:foreground "dark green")) - (t nil)) +(defface widget-documentation '((((class color) + (background dark)) + (:foreground "lime green")) + (((class color) + (background light)) + (:foreground "dark green")) + (t nil)) "Face used for documentation text." :group 'widget-documentation :group 'widget-faces) +;; backward compatibility alias +(put 'widget-documentation-face 'face-alias 'widget-documentation) -(defvar widget-button-face 'widget-button-face +(defvar widget-button-face 'widget-button "Face used for buttons in widgets. This exists as a variable so it can be set locally in certain buffers.") -(defface widget-button-face '((t (:weight bold))) +(defface widget-button '((t (:weight bold))) "Face used for widget buttons." :group 'widget-faces) +;; backward compatibility alias +(put 'widget-button-face 'face-alias 'widget-button) (defcustom widget-mouse-face 'highlight "Face used for widget buttons when the mouse is above them." @@ -120,33 +124,37 @@ This exists as a variable so it can be set locally in certain buffers.") ;; TTY gets special definitions here and in the next defface, because ;; the gray colors defined for other displays cause black text on a black ;; background, at least on light-background TTYs. -(defface widget-field-face '((((type tty)) - :background "yellow3" - :foreground "black") - (((class grayscale color) - (background light)) - :background "gray85") - (((class grayscale color) - (background dark)) - :background "dim gray") - (t - :slant italic)) +(defface widget-field '((((type tty)) + :background "yellow3" + :foreground "black") + (((class grayscale color) + (background light)) + :background "gray85") + (((class grayscale color) + (background dark)) + :background "dim gray") + (t + :slant italic)) "Face used for editable fields." :group 'widget-faces) - -(defface widget-single-line-field-face '((((type tty)) - :background "green3" - :foreground "black") - (((class grayscale color) - (background light)) - :background "gray85") - (((class grayscale color) - (background dark)) - :background "dim gray") - (t - :slant italic)) +;; backward-compatibility alias +(put 'widget-field-face 'face-alias 'widget-field) + +(defface widget-single-line-field '((((type tty)) + :background "green3" + :foreground "black") + (((class grayscale color) + (background light)) + :background "gray85") + (((class grayscale color) + (background dark)) + :background "dim gray") + (t + :slant italic)) "Face used for editable fields spanning only a single line." :group 'widget-faces) +;; backward-compatibility alias +(put 'widget-single-line-field-face 'face-alias 'widget-single-line-field) ;;; This causes display-table to be loaded, and not usefully. ;;;(defvar widget-single-line-display-table @@ -325,7 +333,7 @@ new value.") (insert-and-inherit " "))) (setq to (point))) (let ((keymap (widget-get widget :keymap)) - (face (or (widget-get widget :value-face) 'widget-field-face)) + (face (or (widget-get widget :value-face) 'widget-field)) (help-echo (widget-get widget :help-echo)) (follow-link (widget-get widget :follow-link)) (rear-sticky @@ -433,24 +441,26 @@ new value.") (prog1 (progn ,@form) (goto-char (point-max)))))) -(defface widget-inactive-face '((((class grayscale color) - (background dark)) - (:foreground "light gray")) - (((class grayscale color) - (background light)) - (:foreground "dim gray")) - (t - (:slant italic))) +(defface widget-inactive '((((class grayscale color) + (background dark)) + (:foreground "light gray")) + (((class grayscale color) + (background light)) + (:foreground "dim gray")) + (t + (:slant italic))) "Face used for inactive widgets." :group 'widget-faces) +;; backward-compatibility alias +(put 'widget-inactive-face 'face-alias 'widget-inactive) (defun widget-specify-inactive (widget from to) "Make WIDGET inactive for user modifications." (unless (widget-get widget :inactive) (let ((overlay (make-overlay from to nil t nil))) - (overlay-put overlay 'face 'widget-inactive-face) + (overlay-put overlay 'face 'widget-inactive) ;; This is disabled, as it makes the mouse cursor change shape. - ;; (overlay-put overlay 'mouse-face 'widget-inactive-face) + ;; (overlay-put overlay 'mouse-face 'widget-inactive) (overlay-put overlay 'evaporate t) (overlay-put overlay 'priority 100) (overlay-put overlay 'modification-hooks '(widget-overlay-inactive)) @@ -633,7 +643,7 @@ extension (xpm, xbm, gif, jpg, or png) located in ;; Oh well. nil))) -(defvar widget-button-pressed-face 'widget-button-pressed-face +(defvar widget-button-pressed-face 'widget-button-pressed "Face used for pressed buttons in widgets. This exists as a variable so it can be set locally in certain buffers.") @@ -882,7 +892,7 @@ Recommended as a parent keymap for modes using widgets.") (call-interactively (lookup-key widget-global-map (this-command-keys)))))) -(defface widget-button-pressed-face +(defface widget-button-pressed '((((min-colors 88) (class color)) (:foreground "red1")) (((class color)) @@ -891,6 +901,8 @@ Recommended as a parent keymap for modes using widgets.") (:weight bold :underline t))) "Face used for pressed buttons." :group 'widget-faces) +;; backward-compatibility alias +(put 'widget-button-pressed-face 'face-alias 'widget-button-pressed) (defun widget-button-click (event) "Invoke the button that the mouse is pointing at." @@ -2953,7 +2965,7 @@ as the value." :match 'widget-regexp-match :validate 'widget-regexp-validate ;; Doesn't work well with terminating newline. - ;; :value-face 'widget-single-line-field-face + ;; :value-face 'widget-single-line-field :tag "Regexp") (defun widget-regexp-match (widget value) @@ -2979,7 +2991,7 @@ It will read a file name from the minibuffer when invoked." :prompt-value 'widget-file-prompt-value :format "%{%t%}: %v" ;; Doesn't work well with terminating newline. - ;; :value-face 'widget-single-line-field-face + ;; :value-face 'widget-single-line-field :tag "File") (defun widget-file-complete () -- cgit v1.2.1 From d478e69d60ec85cb5881bee646fd02bf7c9eb76f Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 10 Jun 2005 07:16:58 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-365 Remove "-face" suffix from custom faces 2005-06-10 Miles Bader * lisp/cus-edit.el (custom-invalid, custom-rogue, custom-modified) (custom-set, custom-changed, custom-saved, custom-button) (custom-button-pressed, custom-documentation, custom-state) (custom-comment, custom-comment-tag, custom-variable-tag) (custom-variable-button, custom-face-tag, custom-group-tag-1) (custom-group-tag): Remove "-face" suffix from face names. (custom-magic-alist, custom-magic-value-create) (custom-group-sample-face-get, custom-mode): Use renamed custom faces. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): New backward-compatibility aliases for renamed faces. --- lisp/ChangeLog | 18 ++++++ lisp/cus-edit.el | 170 +++++++++++++++++++++++++++++++++---------------------- 2 files changed, 119 insertions(+), 69 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d74aa9d564a..693a1f897a6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,23 @@ 2005-06-10 Miles Bader + * cus-edit.el (custom-invalid, custom-rogue, custom-modified) + (custom-set, custom-changed, custom-saved, custom-button) + (custom-button-pressed, custom-documentation, custom-state) + (custom-comment, custom-comment-tag, custom-variable-tag) + (custom-variable-button, custom-face-tag, custom-group-tag-1) + (custom-group-tag): Remove "-face" suffix from face names. + (custom-magic-alist, custom-magic-value-create) + (custom-group-sample-face-get, custom-mode): Use renamed custom faces. + (custom-invalid-face, custom-rogue-face, custom-modified-face) + (custom-set-face, custom-changed-face, custom-saved-face) + (custom-button-face, custom-button-pressed-face) + (custom-documentation-face, custom-state-face) + (custom-comment-face, custom-comment-tag-face) + (custom-variable-tag-face, custom-variable-button-face) + (custom-face-tag-face, custom-group-tag-face-1) + (custom-group-tag-face): + New backward-compatibility aliases for renamed faces. + * wid-edit.el (widget-documentation, widget-button) (widget-field, widget-single-line-field, widget-inactive) (widget-button-pressed): "-face" suffix removed from face names. diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 82a5e887bed..6f5afa9bacd 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -1636,50 +1636,62 @@ item in another window.\n\n")) :group 'custom-faces :group 'custom-buffer) -(defface custom-invalid-face '((((class color)) - (:foreground "yellow1" :background "red1")) - (t - (:weight bold :slant italic :underline t))) +(defface custom-invalid '((((class color)) + (:foreground "yellow1" :background "red1")) + (t + (:weight bold :slant italic :underline t))) "Face used when the customize item is invalid." :group 'custom-magic-faces) +;; backward-compatibility alias +(put 'custom-invalid-face 'face-alias 'custom-invalid) -(defface custom-rogue-face '((((class color)) - (:foreground "pink" :background "black")) - (t - (:underline t))) +(defface custom-rogue '((((class color)) + (:foreground "pink" :background "black")) + (t + (:underline t))) "Face used when the customize item is not defined for customization." :group 'custom-magic-faces) +;; backward-compatibility alias +(put 'custom-rogue-face 'face-alias 'custom-rogue) -(defface custom-modified-face '((((min-colors 88) (class color)) - (:foreground "white" :background "blue1")) - (((class color)) - (:foreground "white" :background "blue")) - (t - (:slant italic :bold))) - "Face used when the customize item has been modified." - :group 'custom-magic-faces) - -(defface custom-set-face '((((min-colors 88) (class color)) - (:foreground "blue1" :background "white")) +(defface custom-modified '((((min-colors 88) (class color)) + (:foreground "white" :background "blue1")) (((class color)) - (:foreground "blue" :background "white")) + (:foreground "white" :background "blue")) (t - (:slant italic))) + (:slant italic :bold))) + "Face used when the customize item has been modified." + :group 'custom-magic-faces) +;; backward-compatibility alias +(put 'custom-modified-face 'face-alias 'custom-modified) + +(defface custom-set '((((min-colors 88) (class color)) + (:foreground "blue1" :background "white")) + (((class color)) + (:foreground "blue" :background "white")) + (t + (:slant italic))) "Face used when the customize item has been set." :group 'custom-magic-faces) - -(defface custom-changed-face '((((min-colors 88) (class color)) - (:foreground "white" :background "blue1")) - (((class color)) - (:foreground "white" :background "blue")) - (t - (:slant italic))) +;; backward-compatibility alias +(put 'custom-set-face 'face-alias 'custom-set) + +(defface custom-changed '((((min-colors 88) (class color)) + (:foreground "white" :background "blue1")) + (((class color)) + (:foreground "white" :background "blue")) + (t + (:slant italic))) "Face used when the customize item has been changed." :group 'custom-magic-faces) +;; backward-compatibility alias +(put 'custom-changed-face 'face-alias 'custom-changed) -(defface custom-saved-face '((t (:underline t))) +(defface custom-saved '((t (:underline t))) "Face used when the customize item has been saved." :group 'custom-magic-faces) +;; backward-compatibility alias +(put 'custom-saved-face 'face-alias 'custom-saved) (defconst custom-magic-alist '((nil "#" underline "\ @@ -1689,21 +1701,21 @@ UNKNOWN, you should not see this.") (hidden "-" default "\ HIDDEN, invoke \"Show\" in the previous line to show." "\ group now hidden, invoke \"Show\", above, to show contents.") - (invalid "x" custom-invalid-face "\ + (invalid "x" custom-invalid "\ INVALID, the displayed value cannot be set.") - (modified "*" custom-modified-face "\ + (modified "*" custom-modified "\ EDITED, shown value does not take effect until you set or save it." "\ something in this group has been edited but not set.") - (set "+" custom-set-face "\ + (set "+" custom-set "\ SET for current session only." "\ something in this group has been set but not saved.") - (changed ":" custom-changed-face "\ + (changed ":" custom-changed "\ CHANGED outside Customize; operating on it here may be unreliable." "\ something in this group has been changed outside customize.") - (saved "!" custom-saved-face "\ + (saved "!" custom-saved "\ SAVED and set." "\ something in this group has been set and saved.") - (rogue "@" custom-rogue-face "\ + (rogue "@" custom-rogue "\ NO CUSTOMIZATION DATA; you should not see this." "\ something in this group is not prepared for customization.") (standard " " nil "\ @@ -1830,7 +1842,7 @@ and `face'." (insert " (lisp)")) ((eq form 'mismatch) (insert " (mismatch)"))) - (put-text-property start (point) 'face 'custom-state-face)) + (put-text-property start (point) 'face 'custom-state)) (insert "\n")) (when (and (eq category 'group) (not (and (eq custom-buffer-style 'links) @@ -1864,7 +1876,7 @@ and `face'." ;;; The `custom' Widget. -(defface custom-button-face +(defface custom-button '((((type x w32 mac) (class color)) ; Like default modeline (:box (:line-width 2 :style released-button) :background "lightgrey" :foreground "black")) @@ -1873,8 +1885,10 @@ and `face'." "Face used for buttons in customization buffers." :version "21.1" :group 'custom-faces) +;; backward-compatibility alias +(put 'custom-button-face 'face-alias 'custom-button) -(defface custom-button-pressed-face +(defface custom-button-pressed '((((type x w32 mac) (class color)) (:box (:line-width 2 :style pressed-button) :background "lightgrey" :foreground "black")) @@ -1883,20 +1897,26 @@ and `face'." "Face used for buttons in customization buffers." :version "21.1" :group 'custom-faces) +;; backward-compatibility alias +(put 'custom-button-pressed-face 'face-alias 'custom-button-pressed) -(defface custom-documentation-face nil +(defface custom-documentation nil "Face used for documentation strings in customization buffers." :group 'custom-faces) - -(defface custom-state-face '((((class color) - (background dark)) - (:foreground "lime green")) - (((class color) - (background light)) - (:foreground "dark green")) - (t nil)) +;; backward-compatibility alias +(put 'custom-documentation-face 'face-alias 'custom-documentation) + +(defface custom-state '((((class color) + (background dark)) + (:foreground "lime green")) + (((class color) + (background light)) + (:foreground "dark green")) + (t nil)) "Face used for State descriptions in the customize buffer." :group 'custom-faces) +;; backward-compatibility alias +(put 'custom-state-face 'face-alias 'custom-state) (define-widget 'custom 'default "Customize a user option." @@ -2092,20 +2112,22 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"." ;;; The `custom-comment' Widget. ;; like the editable field -(defface custom-comment-face '((((class grayscale color) - (background light)) - (:background "gray85")) - (((class grayscale color) - (background dark)) - (:background "dim gray")) - (t - (:slant italic))) +(defface custom-comment '((((class grayscale color) + (background light)) + (:background "gray85")) + (((class grayscale color) + (background dark)) + (:background "dim gray")) + (t + (:slant italic))) "Face used for comments on variables or faces" :version "21.1" :group 'custom-faces) +;; backward-compatibility alias +(put 'custom-comment-face 'face-alias 'custom-comment) ;; like font-lock-comment-face -(defface custom-comment-tag-face +(defface custom-comment-tag '((((class color) (background dark)) (:foreground "gray80")) (((class color) (background light)) (:foreground "blue4")) (((class grayscale) (background light)) @@ -2115,6 +2137,8 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"." (t (:weight bold))) "Face used for variables or faces comment tags" :group 'custom-faces) +;; backward-compatibility alias +(put 'custom-comment-tag-face 'face-alias 'custom-comment-tag) (define-widget 'custom-comment 'string "User comment." @@ -2154,7 +2178,7 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"." ;; When this was underlined blue, users confused it with a ;; Mosaic-style hyperlink... -(defface custom-variable-tag-face +(defface custom-variable-tag `((((class color) (background dark)) (:foreground "light blue" :weight bold :height 1.2 :inherit variable-pitch)) @@ -2167,10 +2191,14 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"." (t (:weight bold))) "Face used for unpushable variable tags." :group 'custom-faces) +;; backward-compatibility alias +(put 'custom-variable-tag-face 'face-alias 'custom-variable-tag) -(defface custom-variable-button-face '((t (:underline t :weight bold))) +(defface custom-variable-button '((t (:underline t :weight bold))) "Face used for pushable variable tags." :group 'custom-faces) +;; backward-compatibility alias +(put 'custom-variable-button-face 'face-alias 'custom-variable-button) (defcustom custom-variable-default-form 'edit "Default form of displaying variable values." @@ -2874,10 +2902,12 @@ Only match frames that support the specified face attributes.") ;;; The `custom-face' Widget. -(defface custom-face-tag-face +(defface custom-face-tag `((t (:weight bold :height 1.2 :inherit variable-pitch))) "Face used for face tags." :group 'custom-faces) +;; backward-compatibility alias +(put 'custom-face-tag-face 'face-alias 'custom-face-tag) (defcustom custom-face-default-form 'selected "Default form of displaying face definition." @@ -3396,12 +3426,11 @@ restoring it to the state of a face that has never been customized." ;; Fixme: make it do so in Emacs. "Face used for group tags. The first member is used for level 1 groups, the second for level 2, -and so forth. The remaining group tags are shown with -`custom-group-tag-face'." +and so forth. The remaining group tags are shown with `custom-group-tag'." :type '(repeat face) :group 'custom-faces) -(defface custom-group-tag-face-1 +(defface custom-group-tag-1 `((((class color) (background dark)) (:foreground "pink" :weight bold :height 1.2 :inherit variable-pitch)) @@ -3414,8 +3443,10 @@ and so forth. The remaining group tags are shown with (t (:weight bold))) "Face used for group tags." :group 'custom-faces) +;; backward-compatibility alias +(put 'custom-group-tag-face-1 'face-alias 'custom-group-tag-1) -(defface custom-group-tag-face +(defface custom-group-tag `((((class color) (background dark)) (:foreground "light blue" :weight bold :height 1.2)) @@ -3428,6 +3459,8 @@ and so forth. The remaining group tags are shown with (t (:weight bold))) "Face used for low level group tags." :group 'custom-faces) +;; backward-compatibility alias +(put 'custom-group-tag-face 'face-alias 'custom-group-tag) (define-widget 'custom-group 'custom "Customize group." @@ -3448,7 +3481,7 @@ and so forth. The remaining group tags are shown with (defun custom-group-sample-face-get (widget) ;; Use :sample-face. (or (nth (1- (widget-get widget :custom-level)) custom-group-tag-faces) - 'custom-group-tag-face)) + 'custom-group-tag)) (define-widget 'custom-group-visibility 'visibility "An indicator and manipulator for hidden group contents." @@ -4261,13 +4294,12 @@ if that value is non-nil." (make-local-variable 'custom-options) (make-local-variable 'custom-local-buffer) (make-local-variable 'widget-documentation-face) - (setq widget-documentation-face 'custom-documentation-face) + (setq widget-documentation-face 'custom-documentation) (make-local-variable 'widget-button-face) - (setq widget-button-face 'custom-button-face) - (set (make-local-variable 'widget-button-pressed-face) - 'custom-button-pressed-face) + (setq widget-button-face 'custom-button) + (set (make-local-variable 'widget-button-pressed-face) 'custom-button-pressed) (set (make-local-variable 'widget-mouse-face) - 'custom-button-pressed-face) ; buttons `depress' when moused + 'custom-button-pressed) ; buttons `depress' when moused ;; When possible, use relief for buttons, not bracketing. This test ;; may not be optimal. (when custom-raised-buttons -- cgit v1.2.1 From fe735a8d8e3dbe65c79e7ea80034d2dbcc359028 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 10 Jun 2005 07:26:14 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-366 Remove "-face" suffix from change-log faces 2005-06-10 Miles Bader * lisp/add-log.el (change-log-date, change-log-name) (change-log-email, change-log-file, change-log-list) (change-log-conditionals, change-log-function) (change-log-acknowledgement): Remove "-face" suffix from face names. (change-log-date-face, change-log-name-face) (change-log-email-face, change-log-file-face) (change-log-list-face, change-log-conditionals-face) (change-log-function-face, change-log-acknowledgement-face): New backward-compatibility aliases for renamed faces. (change-log-font-lock-keywords): Use renamed change-log faces. --- lisp/ChangeLog | 11 +++++++++++ lisp/add-log.el | 56 ++++++++++++++++++++++++++++++++++++-------------------- 2 files changed, 47 insertions(+), 20 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 693a1f897a6..7c95351e74e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,16 @@ 2005-06-10 Miles Bader + * add-log.el (change-log-date, change-log-name) + (change-log-email, change-log-file, change-log-list) + (change-log-conditionals, change-log-function) + (change-log-acknowledgement): Remove "-face" suffix from face names. + (change-log-date-face, change-log-name-face) + (change-log-email-face, change-log-file-face) + (change-log-list-face, change-log-conditionals-face) + (change-log-function-face, change-log-acknowledgement-face): + New backward-compatibility aliases for renamed faces. + (change-log-font-lock-keywords): Use renamed change-log faces. + * cus-edit.el (custom-invalid, custom-rogue, custom-modified) (custom-set, custom-changed, custom-saved, custom-button) (custom-button-pressed, custom-documentation, custom-state) diff --git a/lisp/add-log.el b/lisp/add-log.el index 4131b237e5c..bde75db8ec7 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el @@ -166,86 +166,102 @@ Note: The search is conducted only within 10%, at the beginning of the file." :type '(repeat regexp) :group 'change-log) -(defface change-log-date-face +(defface change-log-date '((t (:inherit font-lock-string-face))) "Face used to highlight dates in date lines." :version "21.1" :group 'change-log) +;; backward-compatibility alias +(put 'change-log-date-face 'face-alias 'change-log-date) -(defface change-log-name-face +(defface change-log-name '((t (:inherit font-lock-constant-face))) "Face for highlighting author names." :version "21.1" :group 'change-log) +;; backward-compatibility alias +(put 'change-log-name-face 'face-alias 'change-log-name) -(defface change-log-email-face +(defface change-log-email '((t (:inherit font-lock-variable-name-face))) "Face for highlighting author email addresses." :version "21.1" :group 'change-log) +;; backward-compatibility alias +(put 'change-log-email-face 'face-alias 'change-log-email) -(defface change-log-file-face +(defface change-log-file '((t (:inherit font-lock-function-name-face))) "Face for highlighting file names." :version "21.1" :group 'change-log) +;; backward-compatibility alias +(put 'change-log-file-face 'face-alias 'change-log-file) -(defface change-log-list-face +(defface change-log-list '((t (:inherit font-lock-keyword-face))) "Face for highlighting parenthesized lists of functions or variables." :version "21.1" :group 'change-log) +;; backward-compatibility alias +(put 'change-log-list-face 'face-alias 'change-log-list) -(defface change-log-conditionals-face +(defface change-log-conditionals '((t (:inherit font-lock-variable-name-face))) "Face for highlighting conditionals of the form `[...]'." :version "21.1" :group 'change-log) +;; backward-compatibility alias +(put 'change-log-conditionals-face 'face-alias 'change-log-conditionals) -(defface change-log-function-face +(defface change-log-function '((t (:inherit font-lock-variable-name-face))) "Face for highlighting items of the form `<....>'." :version "21.1" :group 'change-log) +;; backward-compatibility alias +(put 'change-log-function-face 'face-alias 'change-log-function) -(defface change-log-acknowledgement-face +(defface change-log-acknowledgement '((t (:inherit font-lock-comment-face))) "Face for highlighting acknowledgments." :version "21.1" :group 'change-log) +;; backward-compatibility alias +(put 'change-log-acknowledgement-face 'face-alias 'change-log-acknowledgement) (defvar change-log-font-lock-keywords '(;; ;; Date lines, new and old styles. ("^\\sw.........[0-9:+ ]*" - (0 'change-log-date-face) + (0 'change-log-date) ;; Name and e-mail; some people put e-mail in parens, not angles. ("\\([^<(]+?\\)[ \t]*[(<]\\([A-Za-z0-9_.+-]+@[A-Za-z0-9_.-]+\\)[>)]" nil nil - (1 'change-log-name-face) - (2 'change-log-email-face))) + (1 'change-log-name) + (2 'change-log-email))) ;; ;; File names. ("^\\( +\\|\t\\)\\* \\([^ ,:([\n]+\\)" - (2 'change-log-file-face) + (2 'change-log-file) ;; Possibly further names in a list: - ("\\=, \\([^ ,:([\n]+\\)" nil nil (1 'change-log-file-face)) + ("\\=, \\([^ ,:([\n]+\\)" nil nil (1 'change-log-file)) ;; Possibly a parenthesized list of names: ("\\= (\\([^(),\n]+\\|(\\(setf\\|SETF\\) [^() ,\n]+)\\)" - nil nil (1 'change-log-list-face)) + nil nil (1 'change-log-list)) ("\\=, *\\([^(),\n]+\\|(\\(setf\\|SETF\\) [^() ,\n]+)\\)" - nil nil (1 'change-log-list-face))) + nil nil (1 'change-log-list))) ;; ;; Function or variable names. ("^\\( +\\|\t\\)(\\([^(),\n]+\\|(\\(setf\\|SETF\\) [^() ,\n]+)\\)" - (2 'change-log-list-face) + (2 'change-log-list) ("\\=, *\\([^(),\n]+\\|(\\(setf\\|SETF\\) [^() ,\n]+)\\)" nil nil - (1 'change-log-list-face))) + (1 'change-log-list))) ;; ;; Conditionals. - ("\\[!?\\([^]\n]+\\)\\]\\(:\\| (\\)" (1 'change-log-conditionals-face)) + ("\\[!?\\([^]\n]+\\)\\]\\(:\\| (\\)" (1 'change-log-conditionals)) ;; ;; Function of change. - ("<\\([^>\n]+\\)>\\(:\\| (\\)" (1 'change-log-function-face)) + ("<\\([^>\n]+\\)>\\(:\\| (\\)" (1 'change-log-function)) ;; ;; Acknowledgements. ;; Don't include plain "From" because that is vague; @@ -254,7 +270,7 @@ Note: The search is conducted only within 10%, at the beginning of the file." ;; is to put the name of the author of the changes at the top ;; of the change log entry. ("\\(^\\( +\\|\t\\)\\| \\)\\(Patch\\(es\\)? by\\|Report\\(ed by\\| from\\)\\|Suggest\\(ed by\\|ion from\\)\\)" - 3 'change-log-acknowledgement-face)) + 3 'change-log-acknowledgement)) "Additional expressions to highlight in Change Log mode.") (defvar change-log-mode-map -- cgit v1.2.1 From 541a6d0de2860e20b7e18d8df0d1f5f33b4a1495 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 10 Jun 2005 07:34:16 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-367 Remove "-face" suffix from compilation faces 2005-06-10 Miles Bader * lisp/progmodes/compile.el (compilation-warning-face) (compilation-info-face): Remove "-face" suffix from face names. (compilation-warning-face, compilation-info-face): New backward-compatibility aliases for renamed faces. (compilation-warning-face, compilation-info-face): Use renamed compilation faces. --- lisp/ChangeLog | 7 +++++++ lisp/progmodes/compile.el | 12 ++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7c95351e74e..ab88f6429be 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,12 @@ 2005-06-10 Miles Bader + * progmodes/compile.el (compilation-warning-face) + (compilation-info-face): Remove "-face" suffix from face names. + (compilation-warning-face, compilation-info-face): + New backward-compatibility aliases for renamed faces. + (compilation-warning-face, compilation-info-face): + Use renamed compilation faces. + * add-log.el (change-log-date, change-log-name) (change-log-email, change-log-file, change-log-list) (change-log-conditionals, change-log-function) diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index e0c8ded307a..e1b63e54b17 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -468,15 +468,17 @@ starting the compilation process.") ;; History of compile commands. (defvar compile-history nil) -(defface compilation-warning-face +(defface compilation-warning '((((class color) (min-colors 16)) (:foreground "Orange" :weight bold)) (((class color)) (:foreground "cyan" :weight bold)) (t (:weight bold))) "Face used to highlight compiler warnings." :group 'font-lock-highlighting-faces :version "22.1") +;; backward-compatibility alias +(put 'compilation-warning-face 'face-alias 'compilation-warning) -(defface compilation-info-face +(defface compilation-info '((((class color) (min-colors 16) (background light)) (:foreground "Green3" :weight bold)) (((class color) (min-colors 88) (background dark)) @@ -488,6 +490,8 @@ starting the compilation process.") "Face used to highlight compiler warnings." :group 'font-lock-highlighting-faces :version "22.1") +;; backward-compatibility alias +(put 'compilation-info-face 'face-alias 'compilation-info) (defvar compilation-message-face nil "Face name to use for whole messages. @@ -498,10 +502,10 @@ Faces `compilation-error-face', `compilation-warning-face', (defvar compilation-error-face 'font-lock-warning-face "Face name to use for file name in error messages.") -(defvar compilation-warning-face 'compilation-warning-face +(defvar compilation-warning-face 'compilation-warning "Face name to use for file name in warning messages.") -(defvar compilation-info-face 'compilation-info-face +(defvar compilation-info-face 'compilation-info "Face name to use for file name in informational messages.") (defvar compilation-line-face 'font-lock-variable-name-face -- cgit v1.2.1 From 221711eb2335203b863267f915053b5d24dea68e Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 10 Jun 2005 07:43:31 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-368 Remove "-face" suffix from diff-mode faces 2005-06-10 Miles Bader * lisp/diff-mode.el (diff-header, diff-file-header, diff-index) (diff-hunk-header, diff-removed, diff-added, diff-changed) (diff-function, diff-context, diff-nonexistent): Remove "-face" suffix from face names. (diff-header-face, diff-file-header-face, diff-index-face) (diff-hunk-header-face, diff-removed-face, diff-added-face) (diff-changed-face, diff-function-face, diff-context-face) (diff-nonexistent-face): New backward-compatibility aliases for renamed faces. (diff-header-face, diff-file-header-face) (diff-index, diff-index-face, diff-hunk-header) (diff-hunk-header-face, diff-removed, diff-removed-face) (diff-added, diff-added-face, diff-changed-face, diff-function) (diff-function-face, diff-context-face, diff-nonexistent) (diff-nonexistent-face): Use renamed diff-mode faces. --- lisp/ChangeLog | 17 +++++++++++++ lisp/diff-mode.el | 72 +++++++++++++++++++++++++++++++++++-------------------- 2 files changed, 63 insertions(+), 26 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ab88f6429be..ff79ba52ba5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,22 @@ 2005-06-10 Miles Bader + + * diff-mode.el (diff-header, diff-file-header, diff-index) + (diff-hunk-header, diff-removed, diff-added, diff-changed) + (diff-function, diff-context, diff-nonexistent): Remove "-face" + suffix from face names. + (diff-header-face, diff-file-header-face, diff-index-face) + (diff-hunk-header-face, diff-removed-face, diff-added-face) + (diff-changed-face, diff-function-face, diff-context-face) + (diff-nonexistent-face): New backward-compatibility aliases for + renamed faces. + (diff-header-face, diff-file-header-face) + (diff-index, diff-index-face, diff-hunk-header) + (diff-hunk-header-face, diff-removed, diff-removed-face) + (diff-added, diff-added-face, diff-changed-face, diff-function) + (diff-function-face, diff-context-face, diff-nonexistent) + (diff-nonexistent-face): Use renamed diff-mode faces. + * progmodes/compile.el (compilation-warning-face) (compilation-info-face): Remove "-face" suffix from face names. (compilation-warning-face, compilation-info-face): diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index 5deb7880bdf..fa8ef2e1565 100644 --- a/lisp/diff-mode.el +++ b/lisp/diff-mode.el @@ -175,7 +175,7 @@ when editing big diffs)." ;;;; font-lock support ;;;; -(defface diff-header-face +(defface diff-header '((((class color) (min-colors 88) (background light)) :background "grey85") (((class color) (min-colors 88) (background dark)) @@ -187,9 +187,11 @@ when editing big diffs)." (t :weight bold)) "`diff-mode' face inherited by hunk and index header faces." :group 'diff-mode) -(defvar diff-header-face 'diff-header-face) +;; backward-compatibility alias +(put 'diff-header-face 'face-alias 'diff-header) +(defvar diff-header-face 'diff-header) -(defface diff-file-header-face +(defface diff-file-header '((((class color) (min-colors 88) (background light)) :background "grey70" :weight bold) (((class color) (min-colors 88) (background dark)) @@ -201,58 +203,76 @@ when editing big diffs)." (t :weight bold)) ; :height 1.3 "`diff-mode' face used to highlight file header lines." :group 'diff-mode) -(defvar diff-file-header-face 'diff-file-header-face) +;; backward-compatibility alias +(put 'diff-file-header-face 'face-alias 'diff-file-header) +(defvar diff-file-header-face 'diff-file-header) -(defface diff-index-face - '((t :inherit diff-file-header-face)) +(defface diff-index + '((t :inherit diff-file-header)) "`diff-mode' face used to highlight index header lines." :group 'diff-mode) -(defvar diff-index-face 'diff-index-face) +;; backward-compatibility alias +(put 'diff-index-face 'face-alias 'diff-index) +(defvar diff-index-face 'diff-index) -(defface diff-hunk-header-face - '((t :inherit diff-header-face)) +(defface diff-hunk-header + '((t :inherit diff-header)) "`diff-mode' face used to highlight hunk header lines." :group 'diff-mode) -(defvar diff-hunk-header-face 'diff-hunk-header-face) +;; backward-compatibility alias +(put 'diff-hunk-header-face 'face-alias 'diff-hunk-header) +(defvar diff-hunk-header-face 'diff-hunk-header) -(defface diff-removed-face - '((t :inherit diff-changed-face)) +(defface diff-removed + '((t :inherit diff-changed)) "`diff-mode' face used to highlight removed lines." :group 'diff-mode) -(defvar diff-removed-face 'diff-removed-face) +;; backward-compatibility alias +(put 'diff-removed-face 'face-alias 'diff-removed) +(defvar diff-removed-face 'diff-removed) -(defface diff-added-face - '((t :inherit diff-changed-face)) +(defface diff-added + '((t :inherit diff-changed)) "`diff-mode' face used to highlight added lines." :group 'diff-mode) -(defvar diff-added-face 'diff-added-face) +;; backward-compatibility alias +(put 'diff-added-face 'face-alias 'diff-added) +(defvar diff-added-face 'diff-added) -(defface diff-changed-face +(defface diff-changed '((((type tty pc) (class color) (background light)) :foreground "magenta" :weight bold :slant italic) (((type tty pc) (class color) (background dark)) :foreground "yellow" :weight bold :slant italic)) "`diff-mode' face used to highlight changed lines." :group 'diff-mode) -(defvar diff-changed-face 'diff-changed-face) +;; backward-compatibility alias +(put 'diff-changed-face 'face-alias 'diff-changed) +(defvar diff-changed-face 'diff-changed) -(defface diff-function-face - '((t :inherit diff-context-face)) +(defface diff-function + '((t :inherit diff-context)) "`diff-mode' face used to highlight function names produced by \"diff -p\"." :group 'diff-mode) -(defvar diff-function-face 'diff-function-face) +;; backward-compatibility alias +(put 'diff-function-face 'face-alias 'diff-function) +(defvar diff-function-face 'diff-function) -(defface diff-context-face +(defface diff-context '((t :inherit shadow)) "`diff-mode' face used to highlight context and other side-information." :group 'diff-mode) -(defvar diff-context-face 'diff-context-face) +;; backward-compatibility alias +(put 'diff-context-face 'face-alias 'diff-context) +(defvar diff-context-face 'diff-context) -(defface diff-nonexistent-face - '((t :inherit diff-file-header-face)) +(defface diff-nonexistent + '((t :inherit diff-file-header)) "`diff-mode' face used to highlight nonexistent files in recursive diffs." :group 'diff-mode) -(defvar diff-nonexistent-face 'diff-nonexistent-face) +;; backward-compatibility alias +(put 'diff-nonexistent-face 'face-alias 'diff-nonexistent) +(defvar diff-nonexistent-face 'diff-nonexistent) (defconst diff-yank-handler '(diff-yank-function)) (defun diff-yank-function (text) -- cgit v1.2.1 From 041a6e47576ec27f40f10954ca5ed73853865eae Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 10 Jun 2005 08:07:08 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-369 lisp/longlines.el (longlines-visible-face): Face removed --- lisp/ChangeLog | 7 ++++--- lisp/longlines.el | 5 ----- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ff79ba52ba5..d03d522b15c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,14 +1,15 @@ 2005-06-10 Miles Bader - + * longlines.el (longlines-visible-face): Face removed. + * diff-mode.el (diff-header, diff-file-header, diff-index) (diff-hunk-header, diff-removed, diff-added, diff-changed) - (diff-function, diff-context, diff-nonexistent): Remove "-face" + (diff-function, diff-context, diff-nonexistent): Remove "-face" suffix from face names. (diff-header-face, diff-file-header-face, diff-index-face) (diff-hunk-header-face, diff-removed-face, diff-added-face) (diff-changed-face, diff-function-face, diff-context-face) - (diff-nonexistent-face): New backward-compatibility aliases for + (diff-nonexistent-face): New backward-compatibility aliases for renamed faces. (diff-header-face, diff-file-header-face) (diff-index, diff-index-face, diff-hunk-header) diff --git a/lisp/longlines.el b/lisp/longlines.el index e9c300fdbec..7583e03b4b0 100644 --- a/lisp/longlines.el +++ b/lisp/longlines.el @@ -153,11 +153,6 @@ major mode changes." ;; Showing the effect of hard newlines in the buffer -(defface longlines-visible-face - '((t (:background "red"))) - "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. With optional argument ARG, make the hard newlines invisible again." -- cgit v1.2.1 From b66e857532c79def84bb1f1327be3d05ccc6e466 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 10 Jun 2005 08:07:29 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-370 Remove "-face" suffix from woman faces 2005-06-10 Miles Bader * lisp/woman.el (woman-italic, woman-bold, woman-unknown) (woman-addition, woman-symbol-face): Remove "-face" suffix from face names. (woman-italic-face, woman-bold-face, woman-unknown-face) (woman-addition-face): New backward-compatibility aliases for renamed faces. (woman-default-faces, woman-monochrome-faces, woman-man-buffer) (woman-decode-region, woman-replace-match) (woman-display-extended-fonts, woman-special-characters) (woman-font-alist, woman-change-fonts, woman2-TH, woman2-SH): Use renamed woman faces. --- lisp/ChangeLog | 12 +++++++++++ lisp/woman.el | 67 +++++++++++++++++++++++++++++++--------------------------- 2 files changed, 48 insertions(+), 31 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d03d522b15c..f61d747a7c8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,17 @@ 2005-06-10 Miles Bader + * woman.el (woman-italic, woman-bold, woman-unknown) + (woman-addition, woman-symbol-face): + Remove "-face" suffix from face names. + (woman-italic-face, woman-bold-face, woman-unknown-face) + (woman-addition-face): + New backward-compatibility aliases for renamed faces. + (woman-default-faces, woman-monochrome-faces, woman-man-buffer) + (woman-decode-region, woman-replace-match) + (woman-display-extended-fonts, woman-special-characters) + (woman-font-alist, woman-change-fonts, woman2-TH, woman2-SH): + Use renamed woman faces. + * longlines.el (longlines-visible-face): Face removed. * diff-mode.el (diff-header, diff-file-header, diff-index) diff --git a/lisp/woman.el b/lisp/woman.el index 4d92c9ee0c7..6d0d0336001 100644 --- a/lisp/woman.el +++ b/lisp/woman.el @@ -875,49 +875,56 @@ or different fonts." ;; This is overkill! Troff uses just italic; Nroff uses just underline. ;; You should probably select either italic or underline as you prefer, but ;; not both, although italic and underline work together perfectly well! -(defface woman-italic-face +(defface woman-italic `((((min-colors 88) (background light)) (:slant italic :underline t :foreground "red1")) (((background light)) (:slant italic :underline t :foreground "red")) (((background dark)) (:slant italic :underline t))) "Face for italic font in man pages." :group 'woman-faces) +;; backward-compatibility alias +(put 'woman-italic-face 'face-alias 'woman-italic) -(defface woman-bold-face +(defface woman-bold '((((min-colors 88) (background light)) (:weight bold :foreground "blue1")) (((background light)) (:weight bold :foreground "blue")) (((background dark)) (:weight bold :foreground "green2"))) "Face for bold font in man pages." :group 'woman-faces) +;; backward-compatibility alias +(put 'woman-bold-face 'face-alias 'woman-bold) ;; Brown is a good compromise: it is distinguishable from the default ;; but not enough so to make font errors look terrible. (Files that use ;; non-standard fonts seem to do so badly or in idiosyncratic ways!) -(defface woman-unknown-face +(defface woman-unknown '((((background light)) (:foreground "brown")) (((min-colors 88) (background dark)) (:foreground "cyan1")) (((background dark)) (:foreground "cyan"))) "Face for all unknown fonts in man pages." :group 'woman-faces) +;; backward-compatibility alias +(put 'woman-unknown-face 'face-alias 'woman-unknown) -(defface woman-addition-face +(defface woman-addition '((t (:foreground "orange"))) "Face for all WoMan additions to man pages." :group 'woman-faces) +;; backward-compatibility alias +(put 'woman-addition-face 'face-alias 'woman-addition) (defun woman-default-faces () "Set foreground colours of italic and bold faces to their default values." (interactive) - (face-spec-set 'woman-italic-face - (face-user-default-spec 'woman-italic-face)) - (face-spec-set 'woman-bold-face (face-user-default-spec 'woman-bold-face))) + (face-spec-set 'woman-italic (face-user-default-spec 'woman-italic)) + (face-spec-set 'woman-bold (face-user-default-spec 'woman-bold))) (defun woman-monochrome-faces () "Set foreground colours of italic and bold faces to that of the default face. This is usually either black or white." (interactive) - (set-face-foreground 'woman-italic-face 'unspecified) - (set-face-foreground 'woman-bold-face 'unspecified)) + (set-face-foreground 'woman-italic 'unspecified) + (set-face-foreground 'woman-bold 'unspecified)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Experimental font support, initially only for MS-Windows. @@ -938,7 +945,7 @@ This is usually either black or white." symbol-fonts)) (when woman-font-support - (make-face 'woman-symbol-face) + (make-face 'woman-symbol) ;; Set the symbol font only if `woman-use-symbol-font' is true, to ;; avoid unnecessarily upsetting the line spacing in NTEmacs 20.5! @@ -1673,24 +1680,24 @@ Do not call directly!" (goto-char (point-min)) (while (search-forward "__\b\b" nil t) (backward-delete-char 4) - (woman-set-face (point) (1+ (point)) 'woman-italic-face)) + (woman-set-face (point) (1+ (point)) 'woman-italic)) (goto-char (point-min)) (while (search-forward "\b\b__" nil t) (backward-delete-char 4) - (woman-set-face (1- (point)) (point) 'woman-italic-face)))) + (woman-set-face (1- (point)) (point) 'woman-italic)))) ;; Interpret overprinting to indicate bold face: (goto-char (point-min)) (while (re-search-forward "\\(.\\)\\(\\(+\\1\\)+\\)" nil t) (woman-delete-match 2) - (woman-set-face (1- (point)) (point) 'woman-bold-face)) + (woman-set-face (1- (point)) (point) 'woman-bold)) ;; Interpret underlining to indicate italic face: ;; (Must be AFTER emboldening to interpret bold _ correctly!) (goto-char (point-min)) (while (search-forward "_" nil t) (delete-char -2) - (woman-set-face (point) (1+ (point)) 'woman-italic-face)) + (woman-set-face (point) (1+ (point)) 'woman-italic)) ;; Leave any other uninterpreted ^H's in the buffer for now! (They ;; might indicate composite special characters, which could be @@ -1703,7 +1710,7 @@ Do not call directly!" (goto-char (point-min)) (forward-line) (while (re-search-forward "^\\( \\)?\\([A-Z].*\\)" nil t) - (woman-set-face (match-beginning 2) (match-end 2) 'woman-bold-face)))) + (woman-set-face (match-beginning 2) (match-end 2) 'woman-bold)))) ) (defun woman-insert-file-contents (filename compressed) @@ -2204,11 +2211,11 @@ Currently set only from '\" t in the first line of the source file.") ;; Prepare non-underlined versions of underlined faces: (woman-non-underline-faces) - ;; Set font of `woman-symbol-face' to `woman-symbol-font' if + ;; Set font of `woman-symbol' face to `woman-symbol-font' if ;; `woman-symbol-font' is well defined. (and woman-use-symbol-font (stringp woman-symbol-font) - (set-face-font 'woman-symbol-face woman-symbol-font + (set-face-font 'woman-symbol woman-symbol-font (and (frame-live-p woman-frame) woman-frame))) ;; Set syntax and display tables: @@ -2293,8 +2300,7 @@ Currently set only from '\" t in the first line of the source file.") "^" "_"))) (cond (first (replace-match repl nil t) - (put-text-property (1- (point)) (point) - 'face 'woman-addition-face) + (put-text-property (1- (point)) (point) 'face 'woman-addition) (WoMan-warn "Initial vertical motion escape \\%s simulated" esc) (WoMan-log @@ -2919,8 +2925,7 @@ map accessory to help construct this alist.") Set NEWTEXT in face FACE if specified." (woman-delete-match 0) (insert-before-markers newtext) - (if face (put-text-property (1- (point)) (point) - 'face 'woman-symbol-face)) + (if face (put-text-property (1- (point)) (point) 'face 'woman-symbol)) t) (defun woman-special-characters (to) @@ -2938,7 +2943,7 @@ Set NEWTEXT in face FACE if specified." ;; Need symbol font: (if woman-use-symbol-font (woman-replace-match (nth 2 replacement) - 'woman-symbol-face)) + 'woman-symbol)) ;; Need extended font: (if woman-use-extended-font (woman-replace-match (nth 2 replacement)))))) @@ -2963,7 +2968,7 @@ Useful for constructing the alist variable `woman-special-characters'." (while (< i 256) (insert (format "\\%03o " i) (string i) " " (string i)) (put-text-property (1- (point)) (point) - 'face 'woman-symbol-face) + 'face 'woman-symbol) (insert " ") (setq i (1+ i)) (when (= i 128) (setq i 160) (insert "\n")) @@ -3231,12 +3236,12 @@ If optional arg CONCAT is non-nil then join arguments." (defconst woman-font-alist '(("R" . default) - ("I" . woman-italic-face) - ("B" . woman-bold-face) + ("I" . woman-italic) + ("B" . woman-bold) ("P" . previous) ("1" . default) - ("2" . woman-italic-face) - ("3" . woman-bold-face) ; used in bash.1 + ("2" . woman-italic) + ("3" . woman-bold) ; used in bash.1 ) "Alist of ?roff font indicators and woman font variables and names.") @@ -3284,9 +3289,9 @@ If optional arg CONCAT is non-nil then join arguments." (WoMan-warn "Unknown font %s." fontstring) ;; Output this message once only per call ... (setq font-alist - (cons (cons fontstring 'woman-unknown-face) + (cons (cons fontstring 'woman-unknown) font-alist)) - 'woman-unknown-face) + 'woman-unknown) ))) ;; Delete font control line or escape sequence: (cond (beg (delete-region beg (point)) @@ -3747,7 +3752,7 @@ v alters page foot left; m alters page head center. )) ;; Embolden heading (point is at end of heading): (woman-set-face - (save-excursion (beginning-of-line) (point)) (point) 'woman-bold-face) + (save-excursion (beginning-of-line) (point)) (point) 'woman-bold) (forward-line) (delete-blank-lines) (setq woman-left-margin woman-default-indent) @@ -3767,7 +3772,7 @@ Format paragraphs upto TO. Set prevailing indent to 5." ;; Optionally embolden heading (point is at beginning of heading): (if woman-bold-headings (woman-set-face - (point) (save-excursion (end-of-line) (point)) 'woman-bold-face)) + (point) (save-excursion (end-of-line) (point)) 'woman-bold)) (forward-line) (setq woman-left-margin woman-default-indent woman-nofill nil) ; fill output lines -- cgit v1.2.1 From ee01ad0e038cbbceb64c8477bd918ff232585337 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 10 Jun 2005 08:13:51 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-371 Remove "-face" suffix from whitespace-highlight face 2005-06-10 Miles Bader * lisp/whitespace.el (whitespace-highlight): Remove "-face" suffix from face name. (whitespace-highlight-the-space): Use renamed face. (whitespace-highlight-face): New backward-compatibility aliases for renamed face. --- lisp/ChangeLog | 6 ++++++ lisp/whitespace.el | 28 +++++++++++++++------------- 2 files changed, 21 insertions(+), 13 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f61d747a7c8..e766a148e90 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,11 @@ 2005-06-10 Miles Bader + * whitespace.el (whitespace-highlight): Remove "-face" suffix from + face name. + (whitespace-highlight-the-space): Use renamed face. + (whitespace-highlight-face): New backward-compatibility aliases + for renamed face. + * woman.el (woman-italic, woman-bold, woman-unknown) (woman-addition, woman-symbol-face): Remove "-face" suffix from face names. diff --git a/lisp/whitespace.el b/lisp/whitespace.el index c0d9280a441..a119793c3a9 100644 --- a/lisp/whitespace.el +++ b/lisp/whitespace.el @@ -307,8 +307,8 @@ To disable timer scans, set this to zero." :group 'whitespace) (defcustom whitespace-display-spaces-in-color t - "Display the bogus whitespaces by coloring them with -`whitespace-highlight-face'." + "Display the bogus whitespaces by coloring them with the face +`whitespace-highlight'." :type 'boolean :group 'whitespace) @@ -318,18 +318,20 @@ To disable timer scans, set this to zero." :group 'whitespace :group 'faces) -(defface whitespace-highlight-face '((((class color) (background light)) - (:background "green1")) - (((class color) (background dark)) - (:background "sea green")) - (((class grayscale mono) - (background light)) - (:background "black")) - (((class grayscale mono) - (background dark)) - (:background "white"))) +(defface whitespace-highlight '((((class color) (background light)) + (:background "green1")) + (((class color) (background dark)) + (:background "sea green")) + (((class grayscale mono) + (background light)) + (:background "black")) + (((class grayscale mono) + (background dark)) + (:background "white"))) "Face used for highlighting the bogus whitespaces that exist in the buffer." :group 'whitespace-faces) +;; backward-compatibility alias +(put 'whitespace-highlight-face 'face-alias 'whitespace-highlight) (if (not (assoc 'whitespace-mode minor-mode-alist)) (setq minor-mode-alist (cons '(whitespace-mode whitespace-mode-line) @@ -734,7 +736,7 @@ Also with whitespaces whose testing has been turned off." (if whitespace-display-spaces-in-color (let ((ol (whitespace-make-overlay b e))) (push ol whitespace-highlighted-space) - (whitespace-overlay-put ol 'face 'whitespace-highlight-face)))) + (whitespace-overlay-put ol 'face 'whitespace-highlight)))) ;; (add-hook 'pre-command-hook 'whitespace-unhighlight-the-space)) (defun whitespace-unhighlight-the-space() -- cgit v1.2.1 From 42e648789a905b789a72a8952eedafac46d3ce97 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 10 Jun 2005 08:20:44 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-372 Remove "-face" suffix from ruler-mode faces 2005-06-10 Miles Bader * lisp/ruler-mode.el (ruler-mode-default, ruler-mode-pad) (ruler-mode-margins, ruler-mode-fringes) (ruler-mode-column-number, ruler-mode-fill-column) (ruler-mode-comment-column, ruler-mode-goal-column) (ruler-mode-tab-stop, ruler-mode-current-column): Remove "-face" suffix from face names. (ruler-mode-default-face, ruler-mode-pad-face) (ruler-mode-margins-face, ruler-mode-fringes-face) (ruler-mode-column-number-face, ruler-mode-fill-column-face) (ruler-mode-comment-column-face, ruler-mode-goal-column-face) (ruler-mode-tab-stop-face, ruler-mode-current-column-face): New backward-compatibility aliases for renamed faces. (ruler-mode-pad, ruler-mode-margins, ruler-mode-fringes) (ruler-mode-column-number, ruler-mode-fill-column) (ruler-mode-comment-column, ruler-mode-goal-column) (ruler-mode-tab-stop, ruler-mode-current-column) (ruler-mode-mouse-grab-any-column, ruler-mode-ruler): Use renamed faces. --- lisp/ChangeLog | 18 +++++++++ lisp/ruler-mode.el | 110 +++++++++++++++++++++++++++++++---------------------- 2 files changed, 83 insertions(+), 45 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e766a148e90..a76b24efebf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,23 @@ 2005-06-10 Miles Bader + * ruler-mode.el (ruler-mode-default, ruler-mode-pad) + (ruler-mode-margins, ruler-mode-fringes) + (ruler-mode-column-number, ruler-mode-fill-column) + (ruler-mode-comment-column, ruler-mode-goal-column) + (ruler-mode-tab-stop, ruler-mode-current-column): + Remove "-face" suffix from face names. + (ruler-mode-default-face, ruler-mode-pad-face) + (ruler-mode-margins-face, ruler-mode-fringes-face) + (ruler-mode-column-number-face, ruler-mode-fill-column-face) + (ruler-mode-comment-column-face, ruler-mode-goal-column-face) + (ruler-mode-tab-stop-face, ruler-mode-current-column-face): + New backward-compatibility aliases for renamed faces. + (ruler-mode-pad, ruler-mode-margins, ruler-mode-fringes) + (ruler-mode-column-number, ruler-mode-fill-column) + (ruler-mode-comment-column, ruler-mode-goal-column) + (ruler-mode-tab-stop, ruler-mode-current-column) + (ruler-mode-mouse-grab-any-column, ruler-mode-ruler): Use renamed faces. + * whitespace.el (whitespace-highlight): Remove "-face" suffix from face name. (whitespace-highlight-the-space): Use renamed face. diff --git a/lisp/ruler-mode.el b/lisp/ruler-mode.el index 46a28ce5069..9e85b7846ca 100644 --- a/lisp/ruler-mode.el +++ b/lisp/ruler-mode.el @@ -1,6 +1,6 @@ ;;; ruler-mode.el --- display a ruler in the header line -;; Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +;; Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: David Ponce ;; Maintainer: David Ponce @@ -70,26 +70,26 @@ ;; ;; The following faces are customizable: ;; -;; - `ruler-mode-default-face' the ruler default face. -;; - `ruler-mode-fill-column-face' the face used to highlight the +;; - `ruler-mode-default' the ruler default face. +;; - `ruler-mode-fill-column' the face used to highlight the ;; `fill-column' character. -;; - `ruler-mode-comment-column-face' the face used to highlight the +;; - `ruler-mode-comment-column' the face used to highlight the ;; `comment-column' character. -;; - `ruler-mode-goal-column-face' the face used to highlight the +;; - `ruler-mode-goal-column' the face used to highlight the ;; `goal-column' character. -;; - `ruler-mode-current-column-face' the face used to highlight the +;; - `ruler-mode-current-column' the face used to highlight the ;; `current-column' character. -;; - `ruler-mode-tab-stop-face' the face used to highlight tab stop +;; - `ruler-mode-tab-stop' the face used to highlight tab stop ;; characters. -;; - `ruler-mode-margins-face' the face used to highlight graduations +;; - `ruler-mode-margins' the face used to highlight graduations ;; in the `window-margins' areas. -;; - `ruler-mode-fringes-face' the face used to highlight graduations +;; - `ruler-mode-fringes' the face used to highlight graduations ;; in the `window-fringes' areas. -;; - `ruler-mode-column-number-face' the face used to highlight the +;; - `ruler-mode-column-number' the face used to highlight the ;; numbered graduations. ;; -;; `ruler-mode-default-face' inherits from the built-in `default' face. -;; All `ruler-mode' faces inherit from `ruler-mode-default-face'. +;; `ruler-mode-default' inherits from the built-in `default' face. +;; All `ruler-mode' faces inherit from `ruler-mode-default'. ;; ;; WARNING: To keep ruler graduations aligned on text columns it is ;; important to use the same font family and size for ruler and text @@ -205,7 +205,7 @@ or remove a tab stop. \\[ruler-mode-toggle-show-tab-stops] or :group 'ruler-mode :type 'boolean) -(defface ruler-mode-default-face +(defface ruler-mode-default '((((type tty)) (:inherit default :background "grey64" @@ -221,83 +221,103 @@ or remove a tab stop. \\[ruler-mode-toggle-show-tab-stops] or ))) "Default face used by the ruler." :group 'ruler-mode) +;; backward-compatibility alias +(put 'ruler-mode-default-face 'face-alias 'ruler-mode-default) -(defface ruler-mode-pad-face +(defface ruler-mode-pad '((((type tty)) - (:inherit ruler-mode-default-face + (:inherit ruler-mode-default :background "grey50" )) (t - (:inherit ruler-mode-default-face + (:inherit ruler-mode-default :background "grey64" ))) "Face used to pad inactive ruler areas." :group 'ruler-mode) +;; backward-compatibility alias +(put 'ruler-mode-pad-face 'face-alias 'ruler-mode-pad) -(defface ruler-mode-margins-face +(defface ruler-mode-margins '((t - (:inherit ruler-mode-default-face + (:inherit ruler-mode-default :foreground "white" ))) "Face used to highlight margin areas." :group 'ruler-mode) +;; backward-compatibility alias +(put 'ruler-mode-margins-face 'face-alias 'ruler-mode-margins) -(defface ruler-mode-fringes-face +(defface ruler-mode-fringes '((t - (:inherit ruler-mode-default-face + (:inherit ruler-mode-default :foreground "green" ))) "Face used to highlight fringes areas." :group 'ruler-mode) +;; backward-compatibility alias +(put 'ruler-mode-fringes-face 'face-alias 'ruler-mode-fringes) -(defface ruler-mode-column-number-face +(defface ruler-mode-column-number '((t - (:inherit ruler-mode-default-face + (:inherit ruler-mode-default :foreground "black" ))) "Face used to highlight number graduations." :group 'ruler-mode) +;; backward-compatibility alias +(put 'ruler-mode-column-number-face 'face-alias 'ruler-mode-column-number) -(defface ruler-mode-fill-column-face +(defface ruler-mode-fill-column '((t - (:inherit ruler-mode-default-face + (:inherit ruler-mode-default :foreground "red" ))) "Face used to highlight the fill column character." :group 'ruler-mode) +;; backward-compatibility alias +(put 'ruler-mode-fill-column-face 'face-alias 'ruler-mode-fill-column) -(defface ruler-mode-comment-column-face +(defface ruler-mode-comment-column '((t - (:inherit ruler-mode-default-face + (:inherit ruler-mode-default :foreground "red" ))) "Face used to highlight the comment column character." :group 'ruler-mode) +;; backward-compatibility alias +(put 'ruler-mode-comment-column-face 'face-alias 'ruler-mode-comment-column) -(defface ruler-mode-goal-column-face +(defface ruler-mode-goal-column '((t - (:inherit ruler-mode-default-face + (:inherit ruler-mode-default :foreground "red" ))) "Face used to highlight the goal column character." :group 'ruler-mode) +;; backward-compatibility alias +(put 'ruler-mode-goal-column-face 'face-alias 'ruler-mode-goal-column) -(defface ruler-mode-tab-stop-face +(defface ruler-mode-tab-stop '((t - (:inherit ruler-mode-default-face + (:inherit ruler-mode-default :foreground "steelblue" ))) "Face used to highlight tab stop characters." :group 'ruler-mode) +;; backward-compatibility alias +(put 'ruler-mode-tab-stop-face 'face-alias 'ruler-mode-tab-stop) -(defface ruler-mode-current-column-face +(defface ruler-mode-current-column '((t - (:inherit ruler-mode-default-face + (:inherit ruler-mode-default :weight bold :foreground "yellow" ))) "Face used to highlight the `current-column' character." :group 'ruler-mode) +;; backward-compatibility alias +(put 'ruler-mode-current-column-face 'face-alias 'ruler-mode-current-column) (defsubst ruler-mode-full-window-width () @@ -419,7 +439,7 @@ dragging. See also the variable `ruler-mode-dragged-symbol'." (message "Goal column set to %d (click on %s again to unset it)" newc (propertize (char-to-string ruler-mode-goal-column-char) - 'face 'ruler-mode-goal-column-face)) + 'face 'ruler-mode-goal-column)) nil) ;; Don't start dragging. ) (if (eq 'click (ruler-mode-mouse-drag-any-column-iteration @@ -629,34 +649,34 @@ Optional argument PROPS specifies other text properties to apply." ;; Setup the scrollbar, fringes, and margins areas. (lf (ruler-mode-space 'left-fringe - 'face 'ruler-mode-fringes-face + 'face 'ruler-mode-fringes 'help-echo (format ruler-mode-fringe-help-echo "Left" (or (car f) 0)))) (rf (ruler-mode-space 'right-fringe - 'face 'ruler-mode-fringes-face + 'face 'ruler-mode-fringes 'help-echo (format ruler-mode-fringe-help-echo "Right" (or (cadr f) 0)))) (lm (ruler-mode-space 'left-margin - 'face 'ruler-mode-margins-face + 'face 'ruler-mode-margins 'help-echo (format ruler-mode-margin-help-echo "Left" (or (car m) 0)))) (rm (ruler-mode-space 'right-margin - 'face 'ruler-mode-margins-face + 'face 'ruler-mode-margins 'help-echo (format ruler-mode-margin-help-echo "Right" (or (cdr m) 0)))) (sb (ruler-mode-space 'scroll-bar - 'face 'ruler-mode-pad-face)) + 'face 'ruler-mode-pad)) ;; Remember the scrollbar vertical type. (sbvt (car (window-current-scroll-bars))) ;; Create an "clean" ruler. (ruler (propertize (make-string w ruler-mode-basic-graduation-char) - 'face 'ruler-mode-default-face + 'face 'ruler-mode-default 'local-map ruler-mode-map 'help-echo (cond (ruler-mode-show-tab-stops @@ -675,7 +695,7 @@ Optional argument PROPS specifies other text properties to apply." m (length c) k i) (put-text-property - i (1+ i) 'face 'ruler-mode-column-number-face + i (1+ i) 'face 'ruler-mode-column-number ruler) (while (and (> m 0) (>= k 0)) (aset ruler k (aref c (setq m (1- m)))) @@ -689,13 +709,13 @@ Optional argument PROPS specifies other text properties to apply." ((= j (current-column)) (aset ruler i ruler-mode-current-column-char) (put-text-property - i (1+ i) 'face 'ruler-mode-current-column-face + i (1+ i) 'face 'ruler-mode-current-column ruler)) ;; Show the `goal-column' marker. ((and goal-column (= j goal-column)) (aset ruler i ruler-mode-goal-column-char) (put-text-property - i (1+ i) 'face 'ruler-mode-goal-column-face + i (1+ i) 'face 'ruler-mode-goal-column ruler) (put-text-property i (1+ i) 'mouse-face 'mode-line-highlight @@ -707,7 +727,7 @@ Optional argument PROPS specifies other text properties to apply." ((= j comment-column) (aset ruler i ruler-mode-comment-column-char) (put-text-property - i (1+ i) 'face 'ruler-mode-comment-column-face + i (1+ i) 'face 'ruler-mode-comment-column ruler) (put-text-property i (1+ i) 'mouse-face 'mode-line-highlight @@ -719,7 +739,7 @@ Optional argument PROPS specifies other text properties to apply." ((= j fill-column) (aset ruler i ruler-mode-fill-column-char) (put-text-property - i (1+ i) 'face 'ruler-mode-fill-column-face + i (1+ i) 'face 'ruler-mode-fill-column ruler) (put-text-property i (1+ i) 'mouse-face 'mode-line-highlight @@ -731,7 +751,7 @@ Optional argument PROPS specifies other text properties to apply." ((and ruler-mode-show-tab-stops (member j tab-stop-list)) (aset ruler i ruler-mode-tab-stop-char) (put-text-property - i (1+ i) 'face 'ruler-mode-tab-stop-face + i (1+ i) 'face 'ruler-mode-tab-stop ruler))) (setq i (1+ i) j (1+ j))) -- cgit v1.2.1 From 2ec46551a385ecfa4a3a018a124ae727ec9c6ab8 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 10 Jun 2005 08:25:35 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-373 Remove "-face" suffix from show-paren faces 2005-06-10 Miles Bader * lisp/paren.el (show-paren-match, show-paren-mismatch): Remove "-face" suffix from face names. (show-paren-match-face, show-paren-mismatch-face): New backward-compatibility aliases for renamed faces. (show-paren-function): Use renamed show-paren faces. --- lisp/ChangeLog | 6 ++++++ lisp/paren.el | 12 ++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a76b24efebf..53b40436f91 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,11 @@ 2005-06-10 Miles Bader + * paren.el (show-paren-match, show-paren-mismatch): + Remove "-face" suffix from face names. + (show-paren-match-face, show-paren-mismatch-face): + New backward-compatibility aliases for renamed faces. + (show-paren-function): Use renamed show-paren faces. + * ruler-mode.el (ruler-mode-default, ruler-mode-pad) (ruler-mode-margins, ruler-mode-fringes) (ruler-mode-column-number, ruler-mode-fill-column) diff --git a/lisp/paren.el b/lisp/paren.el index fe2beae4edd..7c6abe087b9 100644 --- a/lisp/paren.el +++ b/lisp/paren.el @@ -71,7 +71,7 @@ otherwise)." :group 'paren-showing :version "20.3") -(defface show-paren-match-face +(defface show-paren-match '((((class color) (background light)) :background "turquoise") ; looks OK on tty (becomes cyan) (((class color) (background dark)) @@ -83,13 +83,17 @@ otherwise)." "Show Paren mode face used for a matching paren." :group 'faces :group 'paren-showing) +;; backward-compatibility alias +(put 'show-paren-match-face 'face-alias 'show-paren-match) -(defface show-paren-mismatch-face +(defface show-paren-mismatch '((((class color)) (:foreground "white" :background "purple")) (t (:inverse-video t))) "Show Paren mode face used for a mismatching paren." :group 'faces :group 'paren-showing) +;; backward-compatibility alias +(put 'show-paren-mismatch-face 'face-alias 'show-paren-mismatch) (defvar show-paren-highlight-openparen t "*Non-nil turns on openparen highlighting when matching forward.") @@ -193,8 +197,8 @@ in `show-paren-style' after `show-paren-delay' seconds of Emacs idle time." (progn (if show-paren-ring-bell-on-mismatch (beep)) - (setq face 'show-paren-mismatch-face)) - (setq face 'show-paren-match-face)) + (setq face 'show-paren-mismatch)) + (setq face 'show-paren-match)) ;; ;; If matching backwards, highlight the closeparen ;; before point as well as its matching open. -- cgit v1.2.1 From d842de85b30f892dc6baf682d008bb5ed3c0b492 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 10 Jun 2005 08:29:58 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-374 Remove "-face" suffix from log-view faces 2005-06-10 Miles Bader * lisp/log-view.el (log-view-file, log-view-message): Remove "-face" suffix from face names. (log-view-file-face, log-view-message-face): New backward-compatibility aliases for renamed faces. (log-view-file-face, log-view-message-face): Use renamed log-view faces. --- lisp/ChangeLog | 6 ++++++ lisp/log-view.el | 12 ++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 53b40436f91..9c599badd40 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,11 @@ 2005-06-10 Miles Bader + * log-view.el (log-view-file, log-view-message): + Remove "-face" suffix from face names. + (log-view-file-face, log-view-message-face): + New backward-compatibility aliases for renamed faces. + (log-view-file-face, log-view-message-face): Use renamed log-view faces. + * paren.el (show-paren-match, show-paren-mismatch): Remove "-face" suffix from face names. (show-paren-match-face, show-paren-mismatch-face): diff --git a/lisp/log-view.el b/lisp/log-view.el index c153cbdbb60..302246e2f4c 100644 --- a/lisp/log-view.el +++ b/lisp/log-view.el @@ -63,21 +63,25 @@ (defvar log-view-mode-hook nil "Hook run at the end of `log-view-mode'.") -(defface log-view-file-face +(defface log-view-file '((((class color) (background light)) (:background "grey70" :weight bold)) (t (:weight bold))) "Face for the file header line in `log-view-mode'." :group 'log-view) -(defvar log-view-file-face 'log-view-file-face) +;; backward-compatibility alias +(put 'log-view-file-face 'face-alias 'log-view-file) +(defvar log-view-file-face 'log-view-file) -(defface log-view-message-face +(defface log-view-message '((((class color) (background light)) (:background "grey85")) (t (:weight bold))) "Face for the message header line in `log-view-mode'." :group 'log-view) -(defvar log-view-message-face 'log-view-message-face) +;; backward-compatibility alias +(put 'log-view-message-face 'face-alias 'log-view-message) +(defvar log-view-message-face 'log-view-message) (defconst log-view-file-re (concat "^\\(" -- cgit v1.2.1 From e8bfdf824f2741384e9ce2220fc84f2375b76abe Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 10 Jun 2005 08:48:08 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-375 Remove "-face" suffix from smerge faces 2005-06-10 Miles Bader * lisp/smerge-mode.el (smerge-mine, smerge-other, smerge-base) (smerge-markers): Remove "-face" suffix from face names. (smerge-mine-face, smerge-other-face, smerge-base-face) (smerge-markers-face): New backward-compatibility aliases for renamed faces. (smerge-mine-face, smerge-other-face, smerge-base-face) (smerge-markers-face): Use renamed smerge faces. --- lisp/ChangeLog | 8 ++++++++ lisp/smerge-mode.el | 24 ++++++++++++++++-------- 2 files changed, 24 insertions(+), 8 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9c599badd40..f6053212898 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,13 @@ 2005-06-10 Miles Bader + * smerge-mode.el (smerge-mine, smerge-other, smerge-base) + (smerge-markers): Remove "-face" suffix from face names. + (smerge-mine-face, smerge-other-face, smerge-base-face) + (smerge-markers-face): + New backward-compatibility aliases for renamed faces. + (smerge-mine-face, smerge-other-face, smerge-base-face) + (smerge-markers-face): Use renamed smerge faces. + * log-view.el (log-view-file, log-view-message): Remove "-face" suffix from face names. (log-view-file-face, log-view-message-face): diff --git a/lisp/smerge-mode.el b/lisp/smerge-mode.el index 0cab4b31404..cf93ad12cd9 100644 --- a/lisp/smerge-mode.el +++ b/lisp/smerge-mode.el @@ -75,7 +75,7 @@ Used in `smerge-diff-base-mine' and related functions." :group 'smerge :type 'boolean) -(defface smerge-mine-face +(defface smerge-mine '((((min-colors 88) (background light)) (:foreground "blue1")) (((background light)) @@ -86,18 +86,22 @@ Used in `smerge-diff-base-mine' and related functions." (:foreground "cyan"))) "Face for your code." :group 'smerge) -(defvar smerge-mine-face 'smerge-mine-face) +;; backward-compatibility alias +(put 'smerge-mine-face 'face-alias 'smerge-mine) +(defvar smerge-mine-face 'smerge-mine) -(defface smerge-other-face +(defface smerge-other '((((background light)) (:foreground "darkgreen")) (((background dark)) (:foreground "lightgreen"))) "Face for the other code." :group 'smerge) -(defvar smerge-other-face 'smerge-other-face) +;; backward-compatibility alias +(put 'smerge-other-face 'face-alias 'smerge-other) +(defvar smerge-other-face 'smerge-other) -(defface smerge-base-face +(defface smerge-base '((((min-colors 88) (background light)) (:foreground "red1")) (((background light)) @@ -106,16 +110,20 @@ Used in `smerge-diff-base-mine' and related functions." (:foreground "orange"))) "Face for the base code." :group 'smerge) -(defvar smerge-base-face 'smerge-base-face) +;; backward-compatibility alias +(put 'smerge-base-face 'face-alias 'smerge-base) +(defvar smerge-base-face 'smerge-base) -(defface smerge-markers-face +(defface smerge-markers '((((background light)) (:background "grey85")) (((background dark)) (:background "grey30"))) "Face for the conflict markers." :group 'smerge) -(defvar smerge-markers-face 'smerge-markers-face) +;; backward-compatibility alias +(put 'smerge-markers-face 'face-alias 'smerge-markers) +(defvar smerge-markers-face 'smerge-markers) (easy-mmode-defmap smerge-basic-map `(("n" . smerge-next) -- cgit v1.2.1 From f0b3dcbfb1bec0db039c4c1b276c278f97ad695b Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 10 Jun 2005 08:48:28 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-376 Remove "-face" suffix from show-tabs faces 2005-06-10 Miles Bader * lisp/generic-x.el (show-tabs-tab, show-tabs-space): Remove "-face" suffix from face names. (show-tabs-tab-face, show-tabs-space-face): New backward-compatibility aliases for renamed faces. (show-tabs-generic-mode-font-lock-defaults-1) (show-tabs-generic-mode-font-lock-defaults-2): Use renamed show-tabs faces. --- lisp/ChangeLog | 8 ++++++++ lisp/generic-x.el | 16 ++++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f6053212898..5b142fc4677 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,13 @@ 2005-06-10 Miles Bader + * generic-x.el (show-tabs-tab, show-tabs-space): + Remove "-face" suffix from face names. + (show-tabs-tab-face, show-tabs-space-face): + New backward-compatibility aliases for renamed faces. + (show-tabs-generic-mode-font-lock-defaults-1) + (show-tabs-generic-mode-font-lock-defaults-2): + Use renamed show-tabs faces. + * smerge-mode.el (smerge-mine, smerge-other, smerge-base) (smerge-markers): Remove "-face" suffix from face names. (smerge-mine-face, smerge-other-face, smerge-base-face) diff --git a/lisp/generic-x.el b/lisp/generic-x.el index 9ba06d42397..fcf5b6c0e1d 100644 --- a/lisp/generic-x.el +++ b/lisp/generic-x.el @@ -1733,17 +1733,17 @@ like an INI file. You can add this hook to `find-file-hook'." (defconst show-tabs-generic-mode-font-lock-defaults-1 '(;; trailing spaces must come before... - ("[ \t]+$" . 'show-tabs-space-face) + ("[ \t]+$" . 'show-tabs-space) ;; ...embedded tabs - ("[^\n\t]\\(\t+\\)" (1 'show-tabs-tab-face)))) + ("[^\n\t]\\(\t+\\)" (1 'show-tabs-tab)))) (defconst show-tabs-generic-mode-font-lock-defaults-2 '(;; trailing spaces must come before... - ("[ \t]+$" . 'show-tabs-space-face) + ("[ \t]+$" . 'show-tabs-space) ;; ...tabs - ("\t+" . 'show-tabs-tab-face)))) + ("\t+" . 'show-tabs-tab)))) -(defface show-tabs-tab-face +(defface show-tabs-tab '((((class grayscale) (background light)) (:background "DimGray" :weight bold)) (((class grayscale) (background dark)) (:background "LightGray" :weight bold)) (((class color) (min-colors 88)) (:background "red1")) @@ -1751,8 +1751,10 @@ like an INI file. You can add this hook to `find-file-hook'." (t (:weight bold))) "Font Lock mode face used to highlight TABs." :group 'generic-x) +;; backward-compatibility alias +(put 'show-tabs-tab-face 'face-alias 'show-tabs-tab) -(defface show-tabs-space-face +(defface show-tabs-space '((((class grayscale) (background light)) (:background "DimGray" :weight bold)) (((class grayscale) (background dark)) (:background "LightGray" :weight bold)) (((class color) (min-colors 88)) (:background "yellow1")) @@ -1760,6 +1762,8 @@ like an INI file. You can add this hook to `find-file-hook'." (t (:weight bold))) "Font Lock mode face used to highlight spaces." :group 'generic-x) +;; backward-compatibility alias +(put 'show-tabs-space-face 'face-alias 'show-tabs-space) (define-generic-mode show-tabs-generic-mode nil ;; no comment char -- cgit v1.2.1 From a01853d708e066ebed3557f3fcd005b265e164a8 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 10 Jun 2005 08:48:45 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-377 Remove "-face" suffix from highlight-changes faces 2005-06-10 Miles Bader * lisp/hilit-chg.el (highlight-changes, highlight-changes-delete): Remove "-face" suffix from face names. (highlight-changes-face, highlight-changes-delete-face): New backward-compatibility aliases for renamed faces. (hilit-chg-cust-fix-changes-face-list, hilit-chg-make-ov) (hilit-chg-make-list): Use renamed highlight-changes faces. --- lisp/ChangeLog | 7 +++++++ lisp/hilit-chg.el | 34 +++++++++++++++++++--------------- 2 files changed, 26 insertions(+), 15 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5b142fc4677..e1034b4bfc3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,12 @@ 2005-06-10 Miles Bader + * hilit-chg.el (highlight-changes, highlight-changes-delete): + Remove "-face" suffix from face names. + (highlight-changes-face, highlight-changes-delete-face): + New backward-compatibility aliases for renamed faces. + (hilit-chg-cust-fix-changes-face-list, hilit-chg-make-ov) + (hilit-chg-make-list): Use renamed highlight-changes faces. + * generic-x.el (show-tabs-tab, show-tabs-space): Remove "-face" suffix from face names. (show-tabs-tab-face, show-tabs-space-face): diff --git a/lisp/hilit-chg.el b/lisp/hilit-chg.el index a6db060ce0f..4e9fbeb53f6 100644 --- a/lisp/hilit-chg.el +++ b/lisp/hilit-chg.el @@ -37,9 +37,9 @@ ;; it on to active mode to see them, then toggle it back off to avoid ;; distraction. ;; -;; When active, changes are displayed in `highlight-changes-face'. When -;; text is deleted, the following character is displayed in -;; `highlight-changes-delete-face' face. +;; When active, changes are displayed in the `highlight-changes' face. +;; When text is deleted, the following character is displayed in the +;; `highlight-changes-delete' face. ;; ;; ;; You can "age" different sets of changes by using @@ -48,7 +48,7 @@ ;; changes. You can customize these "rotated" faces in two ways. You can ;; either explicitly define each face by customizing ;; `highlight-changes-face-list'. If, however, the faces differ from -;; `highlight-changes-face' only in the foreground color, you can simply set +;; the `highlight-changes' face only in the foreground color, you can simply set ;; `highlight-changes-colours'. If `highlight-changes-face-list' is nil when ;; the faces are required they will be constructed from ;; `highlight-changes-colours'. @@ -212,20 +212,24 @@ ;; However, having it set for non-delete changes can be annoying because all ;; indentation on inserts gets underlined (which can look pretty ugly!). -(defface highlight-changes-face +(defface highlight-changes '((((min-colors 88) (class color)) (:foreground "red1" )) (((class color)) (:foreground "red" )) (t (:inverse-video t))) "Face used for highlighting changes." :group 'highlight-changes) +;; backward-compatibility alias +(put 'highlight-changes-face 'face-alias 'highlight-changes) ;; This looks pretty ugly, actually. Maybe the underline should be removed. -(defface highlight-changes-delete-face +(defface highlight-changes-delete '((((min-colors 88) (class color)) (:foreground "red1" :underline t)) (((class color)) (:foreground "red" :underline t)) (t (:inverse-video t))) "Face used for highlighting deletions." :group 'highlight-changes) +;; backward-compatibility alias +(put 'highlight-changes-delete-face 'face-alias 'highlight-changes-delete) @@ -347,15 +351,15 @@ remove it from existing buffers." ) (while p (setq old-name (car p)) - (setq new-name (intern (format "highlight-changes-face-%d" n))) + (setq new-name (intern (format "highlight-changes-%d" n))) (if (eq old-name new-name) nil ;; A new face has been inserted: we don't want to modify the ;; default face so copy it. Better, though, (I think) is to ;; make a new face have the same attributes as - ;; highlight-changes-face . + ;; the `highlight-changes' face. (if (eq old-name 'default) - (copy-face 'highlight-changes-face new-name) + (copy-face 'highlight-changes new-name) (copy-face old-name new-name) )) (setq new-list (append (list new-name) new-list)) @@ -379,7 +383,7 @@ remove it from existing buffers." Normally the variable is initialized to nil and the list is created from `highlight-changes-colours' when needed. However, you can set this variable to any list of faces. You will have to do this if you want faces which -don't just differ from `highlight-changes-face' by the foreground colour. +don't just differ from the `highlight-changes' face by the foreground colour. Otherwise, this list will be constructed when needed from `highlight-changes-colours'." :type '(choice @@ -445,7 +449,7 @@ This is the opposite of `hilit-chg-hide-changes'." (let ((ov (make-overlay start end)) face) (if (eq prop 'hilit-chg-delete) - (setq face 'highlight-changes-delete-face) + (setq face 'highlight-changes-delete) (setq face (nth 1 (member prop hilit-chg-list)))) (if face (progn @@ -731,20 +735,20 @@ Hook variables: (n 1) name) (setq highlight-changes-face-list nil) (while p - (setq name (intern (format "highlight-changes-face-%d" n))) - (copy-face 'highlight-changes-face name) + (setq name (intern (format "highlight-changes-%d" n))) + (copy-face 'highlight-changes name) (set-face-foreground name (car p)) (setq highlight-changes-face-list (append highlight-changes-face-list (list name))) (setq p (cdr p)) (setq n (1+ n))))) - (setq hilit-chg-list (list 'hilit-chg 'highlight-changes-face)) + (setq hilit-chg-list (list 'hilit-chg 'highlight-changes)) (let ((p highlight-changes-face-list) (n 1) last-category last-face) (while p (setq last-category (intern (format "change-%d" n))) - ;; (setq last-face (intern (format "highlight-changes-face-%d" n))) + ;; (setq last-face (intern (format "highlight-changes-%d" n))) (setq last-face (car p)) (setq hilit-chg-list (append hilit-chg-list -- cgit v1.2.1 From a335c06e06a305a5abeac1eb3a89f9ec53aa3021 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 10 Jun 2005 08:58:53 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-378 Remove "-face" suffix from and downcase info faces 2005-06-10 Miles Bader * lisp/info.el (info-title-1, info-title-2, info-title-3) (info-title-4): Remove "-face" suffix from and downcase face names. (Info-title-1-face, Info-title-2-face, Info-title-3-face) (Info-title-4-face): New backward-compatibility aliases for renamed faces. (Info-fontify-node): Use renamed info faces. --- lisp/ChangeLog | 7 +++++++ lisp/info.el | 38 +++++++++++++++++++++++--------------- 2 files changed, 30 insertions(+), 15 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e1034b4bfc3..f9868fd85ff 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,12 @@ 2005-06-10 Miles Bader + * info.el (info-title-1, info-title-2, info-title-3) + (info-title-4): Remove "-face" suffix from and downcase face names. + (Info-title-1-face, Info-title-2-face, Info-title-3-face) + (Info-title-4-face): + New backward-compatibility aliases for renamed faces. + (Info-fontify-node): Use renamed info faces. + * hilit-chg.el (highlight-changes, highlight-changes-delete): Remove "-face" suffix from face names. (highlight-changes-face, highlight-changes-delete-face): diff --git a/lisp/info.el b/lisp/info.el index 4c6a0ea027d..b34fd013df3 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -3524,29 +3524,37 @@ the variable `Info-file-list-for-emacs'." (t (Info-goto-emacs-command-node command))))) -(defface Info-title-1-face +(defface info-title-1 '((((type tty pc) (class color)) :foreground "green" :weight bold) - (t :height 1.2 :inherit Info-title-2-face)) - "Face for Info titles at level 1." + (t :height 1.2 :inherit info-title-2)) + "Face for info titles at level 1." :group 'info) +;; backward-compatibility alias +(put 'Info-title-1-face 'face-alias 'info-title-1) -(defface Info-title-2-face +(defface info-title-2 '((((type tty pc) (class color)) :foreground "lightblue" :weight bold) - (t :height 1.2 :inherit Info-title-3-face)) - "Face for Info titles at level 2." + (t :height 1.2 :inherit info-title-3)) + "Face for info titles at level 2." :group 'info) +;; backward-compatibility alias +(put 'Info-title-2-face 'face-alias 'info-title-2) -(defface Info-title-3-face +(defface info-title-3 '((((type tty pc) (class color)) :weight bold) - (t :height 1.2 :inherit Info-title-4-face)) - "Face for Info titles at level 3." + (t :height 1.2 :inherit info-title-4)) + "Face for info titles at level 3." :group 'info) +;; backward-compatibility alias +(put 'Info-title-3-face 'face-alias 'info-title-3) -(defface Info-title-4-face +(defface info-title-4 '((((type tty pc) (class color)) :weight bold) (t :weight bold :inherit variable-pitch)) - "Face for Info titles at level 4." + "Face for info titles at level 4." :group 'info) +;; backward-compatibility alias +(put 'Info-title-4-face 'face-alias 'info-title-4) (defface info-menu-header '((((type tty pc)) @@ -3686,10 +3694,10 @@ Preserve text properties." nil t) (let* ((c (preceding-char)) (face - (cond ((= c ?*) 'Info-title-1-face) - ((= c ?=) 'Info-title-2-face) - ((= c ?-) 'Info-title-3-face) - (t 'Info-title-4-face)))) + (cond ((= c ?*) 'info-title-1) + ((= c ?=) 'info-title-2) + ((= c ?-) 'info-title-3) + (t 'info-title-4)))) (put-text-property (match-beginning 1) (match-end 1) 'font-lock-face face)) ;; This is a serious problem for trying to handle multiple -- cgit v1.2.1 From 2058218eac7b3f04b402a876e63b3edd2f2cdd2f Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 10 Jun 2005 09:06:16 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-379 Remove "-face" suffix from pcvs faces 2005-06-10 Miles Bader * lisp/pcvs-info.el (cvs-header, cvs-filename, cvs-unknown) (cvs-handled, cvs-need-action, cvs-marked, cvs-msg): Remove "-face" suffix from face names. (cvs-header-face, cvs-filename-face, cvs-unknown-face) (cvs-handled-face, cvs-need-action-face, cvs-marked-face) (cvs-msg-face): New backward-compatibility aliases for renamed faces. (cvs-fi-up-to-date-face, cvs-fi-unknown-face, cvs-fileinfo-pp): Use renamed pcvs faces. --- lisp/ChangeLog | 9 +++++++++ lisp/pcvs-info.el | 44 ++++++++++++++++++++++++++++---------------- 2 files changed, 37 insertions(+), 16 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f9868fd85ff..6ec845adcf3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,14 @@ 2005-06-10 Miles Bader + * pcvs-info.el (cvs-header, cvs-filename, cvs-unknown) + (cvs-handled, cvs-need-action, cvs-marked, cvs-msg): + Remove "-face" suffix from face names. + (cvs-header-face, cvs-filename-face, cvs-unknown-face) + (cvs-handled-face, cvs-need-action-face, cvs-marked-face) + (cvs-msg-face): New backward-compatibility aliases for renamed faces. + (cvs-fi-up-to-date-face, cvs-fi-unknown-face, cvs-fileinfo-pp): + Use renamed pcvs faces. + * info.el (info-title-1, info-title-2, info-title-3) (info-title-4): Remove "-face" suffix from and downcase face names. (Info-title-1-face, Info-title-2-face, Info-title-3-face) diff --git a/lisp/pcvs-info.el b/lisp/pcvs-info.el index cf367072838..d56fa19fd32 100644 --- a/lisp/pcvs-info.el +++ b/lisp/pcvs-info.el @@ -61,7 +61,7 @@ to confuse some users sometimes." ;;;; Faces for fontification ;;;; -(defface cvs-header-face +(defface cvs-header '((((class color) (background dark)) (:foreground "lightyellow" :weight bold)) (((class color) (background light)) @@ -69,8 +69,10 @@ to confuse some users sometimes." (t (:weight bold))) "PCL-CVS face used to highlight directory changes." :group 'pcl-cvs) +;; backward-compatibility alias +(put 'cvs-header-face 'face-alias 'cvs-header) -(defface cvs-filename-face +(defface cvs-filename '((((class color) (background dark)) (:foreground "lightblue")) (((class color) (background light)) @@ -78,8 +80,10 @@ to confuse some users sometimes." (t ())) "PCL-CVS face used to highlight file names." :group 'pcl-cvs) +;; backward-compatibility alias +(put 'cvs-filename-face 'face-alias 'cvs-filename) -(defface cvs-unknown-face +(defface cvs-unknown '((((class color) (background dark)) (:foreground "red")) (((class color) (background light)) @@ -87,8 +91,10 @@ to confuse some users sometimes." (t (:slant italic))) "PCL-CVS face used to highlight unknown file status." :group 'pcl-cvs) +;; backward-compatibility alias +(put 'cvs-unknown-face 'face-alias 'cvs-unknown) -(defface cvs-handled-face +(defface cvs-handled '((((class color) (background dark)) (:foreground "pink")) (((class color) (background light)) @@ -96,8 +102,10 @@ to confuse some users sometimes." (t ())) "PCL-CVS face used to highlight handled file status." :group 'pcl-cvs) +;; backward-compatibility alias +(put 'cvs-handled-face 'face-alias 'cvs-handled) -(defface cvs-need-action-face +(defface cvs-need-action '((((class color) (background dark)) (:foreground "orange")) (((class color) (background light)) @@ -105,8 +113,10 @@ to confuse some users sometimes." (t (:slant italic))) "PCL-CVS face used to highlight status of files needing action." :group 'pcl-cvs) +;; backward-compatibility alias +(put 'cvs-need-action-face 'face-alias 'cvs-need-action) -(defface cvs-marked-face +(defface cvs-marked '((((min-colors 88) (class color) (background dark)) (:foreground "green1" :weight bold)) (((class color) (background dark)) @@ -116,14 +126,18 @@ to confuse some users sometimes." (t (:weight bold))) "PCL-CVS face used to highlight marked file indicator." :group 'pcl-cvs) +;; backward-compatibility alias +(put 'cvs-marked-face 'face-alias 'cvs-marked) -(defface cvs-msg-face +(defface cvs-msg '((t (:slant italic))) "PCL-CVS face used to highlight CVS messages." :group 'pcl-cvs) +;; backward-compatibility alias +(put 'cvs-msg-face 'face-alias 'cvs-msg) -(defvar cvs-fi-up-to-date-face 'cvs-handled-face) -(defvar cvs-fi-unknown-face 'cvs-unknown-face) +(defvar cvs-fi-up-to-date-face 'cvs-handled) +(defvar cvs-fi-unknown-face 'cvs-unknown) (defvar cvs-fi-conflict-face 'font-lock-warning-face) ;; There is normally no need to alter the following variable, but if @@ -332,19 +346,17 @@ For use by the cookie package." (case type (DIRCHANGE (concat "In directory " (cvs-add-face (cvs-fileinfo->full-name fileinfo) - 'cvs-header-face t - 'cvs-goal-column t) + 'cvs-header t 'cvs-goal-column t) ":")) (MESSAGE (cvs-add-face (format "Message: %s" (cvs-fileinfo->full-log fileinfo)) - 'cvs-msg-face)) + 'cvs-msg)) (t (let* ((status (if (cvs-fileinfo->marked fileinfo) - (cvs-add-face "*" 'cvs-marked-face) + (cvs-add-face "*" 'cvs-marked) " ")) (file (cvs-add-face (cvs-fileinfo->pp-name fileinfo) - 'cvs-filename-face t - 'cvs-goal-column t)) + 'cvs-filename t 'cvs-goal-column t)) (base (or (cvs-fileinfo->base-rev fileinfo) "")) (head (cvs-fileinfo->head-rev fileinfo)) (type @@ -357,7 +369,7 @@ For use by the cookie package." (downcase (symbol-name type)) "-face")))) (or (and (boundp sym) (symbol-value sym)) - 'cvs-need-action-face)))) + 'cvs-need-action)))) (cvs-add-face str face cvs-status-map))) (side (or ;; maybe a subtype -- cgit v1.2.1 From 94d5c8765b8bb2f38f95f59456040a8ab732d909 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 10 Jun 2005 09:13:25 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-380 Update uses of renamed pcvs faces 2005-06-10 Miles Bader * lisp/pcvs.el (cvs-mode-find-file): Use renamed pcvs faces. * lisp/pcvs-defs.el (cvs-mode-map): Likewise. * lisp/cvs-status.el (cvs-status-font-lock-keywords): Likewise. --- lisp/ChangeLog | 4 ++++ lisp/cvs-status.el | 6 +++--- lisp/pcvs-defs.el | 4 ++-- lisp/pcvs.el | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6ec845adcf3..269d89ef376 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2005-06-10 Miles Bader + * pcvs.el (cvs-mode-find-file): Use renamed pcvs faces. + * pcvs-defs.el (cvs-mode-map): Likewise. + * cvs-status.el (cvs-status-font-lock-keywords): Likewise. + * pcvs-info.el (cvs-header, cvs-filename, cvs-unknown) (cvs-handled, cvs-need-action, cvs-marked, cvs-msg): Remove "-face" suffix from face names. diff --git a/lisp/cvs-status.el b/lisp/cvs-status.el index 324da8d3ce1..c8bd1e7e905 100644 --- a/lisp/cvs-status.el +++ b/lisp/cvs-status.el @@ -1,6 +1,6 @@ ;;; cvs-status.el --- major mode for browsing `cvs status' output -*- coding: utf-8 -*- -;; Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Stefan Monnier ;; Keywords: pcl-cvs cvs status tree tools @@ -73,8 +73,8 @@ (defconst cvs-status-font-lock-keywords `((,cvs-status-entry-leader-re - (1 'cvs-filename-face) - (2 'cvs-need-action-face)) + (1 'cvs-filename) + (2 'cvs-need-action)) (,cvs-status-tags-leader-re (,cvs-status-rev-re (save-excursion (re-search-forward "^\n" nil 'move) (point)) diff --git a/lisp/pcvs-defs.el b/lisp/pcvs-defs.el index 27629c5ddc6..62c0d62d161 100644 --- a/lisp/pcvs-defs.el +++ b/lisp/pcvs-defs.el @@ -1,7 +1,7 @@ ;;; pcvs-defs.el --- variable definitions for PCL-CVS ;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -;; 2000, 2003, 2004 Free Software Foundation, Inc. +;; 2000, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Stefan Monnier ;; Keywords: pcl-cvs @@ -381,7 +381,7 @@ This variable is buffer local and only used in the *cvs* buffer.") ;; mouse bindings ([mouse-2] . cvs-mode-find-file) ([follow-link] . (lambda (pos) - (if (eq (get-char-property pos 'face) 'cvs-filename-face) t))) + (if (eq (get-char-property pos 'face) 'cvs-filename) t))) ([(down-mouse-3)] . cvs-menu) ;; dired-like bindings ("\C-o" . cvs-mode-display-file) diff --git a/lisp/pcvs.el b/lisp/pcvs.el index 7c96a080c54..adcbba2792b 100644 --- a/lisp/pcvs.el +++ b/lisp/pcvs.el @@ -1980,7 +1980,7 @@ With a prefix, opens the buffer in an OTHER window." (when (and (/= (point) (progn (posn-set-point (event-end e)) (point))) (not (memq (get-text-property (1- (line-end-position)) 'font-lock-face) - '(cvs-header-face cvs-filename-face)))) + '(cvs-header cvs-filename)))) (error "Not a file name")) (cvs-mode! (lambda (&optional rev) -- cgit v1.2.1 From 4a9ad3c685705f84510ce6d610a619f99fa35789 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 10 Jun 2005 09:13:38 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-381 Tweak ChangeLog --- lisp/ChangeLog | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 269d89ef376..4b10762b872 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,9 +1,5 @@ 2005-06-10 Miles Bader - * pcvs.el (cvs-mode-find-file): Use renamed pcvs faces. - * pcvs-defs.el (cvs-mode-map): Likewise. - * cvs-status.el (cvs-status-font-lock-keywords): Likewise. - * pcvs-info.el (cvs-header, cvs-filename, cvs-unknown) (cvs-handled, cvs-need-action, cvs-marked, cvs-msg): Remove "-face" suffix from face names. @@ -12,6 +8,9 @@ (cvs-msg-face): New backward-compatibility aliases for renamed faces. (cvs-fi-up-to-date-face, cvs-fi-unknown-face, cvs-fileinfo-pp): Use renamed pcvs faces. + * pcvs.el (cvs-mode-find-file): Use renamed pcvs faces. + * pcvs-defs.el (cvs-mode-map): Likewise. + * cvs-status.el (cvs-status-font-lock-keywords): Likewise. * info.el (info-title-1, info-title-2, info-title-3) (info-title-4): Remove "-face" suffix from and downcase face names. -- cgit v1.2.1 From 10853fc39e93be98900110bfa2634375279b08d4 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 10 Jun 2005 10:43:04 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-383 Remove "-face" suffix from strokes-char face 2005-06-10 Miles Bader * lisp/strokes.el (strokes-char): Remove "-face" suffix from face name. (strokes-char-face): New backward-compatibility alias for renamed face. (strokes-encode-buffer): Use renamed strokes-char face. --- lisp/ChangeLog | 8 ++++++-- lisp/strokes.el | 8 +++++--- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4b10762b872..8feae6eb7e1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2005-06-10 Miles Bader + * strokes.el (strokes-char): Remove "-face" suffix from face name. + (strokes-char-face): New backward-compatibility alias for renamed face. + (strokes-encode-buffer): Use renamed strokes-char face. + * pcvs-info.el (cvs-header, cvs-filename, cvs-unknown) (cvs-handled, cvs-need-action, cvs-marked, cvs-msg): Remove "-face" suffix from face names. @@ -75,8 +79,8 @@ * whitespace.el (whitespace-highlight): Remove "-face" suffix from face name. (whitespace-highlight-the-space): Use renamed face. - (whitespace-highlight-face): New backward-compatibility aliases - for renamed face. + (whitespace-highlight-face): New backward-compatibility alias for + renamed face. * woman.el (woman-italic, woman-bold, woman-unknown) (woman-addition, woman-symbol-face): diff --git a/lisp/strokes.el b/lisp/strokes.el index f1121d1fee5..644ec2c4f62 100644 --- a/lisp/strokes.el +++ b/lisp/strokes.el @@ -1,6 +1,6 @@ ;;; strokes.el --- control Emacs through mouse strokes -;; Copyright (C) 1997, 2000, 2002 Free Software Foundation, Inc. +;; Copyright (C) 1997, 2000, 2002, 2005 Free Software Foundation, Inc. ;; Author: David Bakhash ;; Maintainer: FSF @@ -1418,10 +1418,12 @@ Encode/decode your strokes with \\[strokes-encode-buffer], ;; This is the stuff that will eventually be used for composing letters in ;; any language, compression, decompression, graphics, editing, etc. -(defface strokes-char-face '((t (:background "lightgray"))) +(defface strokes-char '((t (:background "lightgray"))) "Face for strokes characters." :version "21.1" :group 'strokes) +;; backward-compatibility alias +(put 'strokes-char-face 'face-alias 'strokes-char) (put 'strokes 'char-table-extra-slots 0) (defconst strokes-char-table (make-char-table 'strokes) ; @@ -1695,7 +1697,7 @@ Optional FORCE non-nil will ignore the buffer's read-only status." (delete-char 1) (add-text-properties start (point) (list 'type 'stroke-string - 'face 'strokes-char-face + 'face 'strokes-char 'stroke-glyph glyph 'display nil)))) (message "Encoding strokes in %s...done" buffer))))) -- cgit v1.2.1 From 37af2dd341d91ce2bce3880ee7f3fb2bfad0fa4a Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 10 Jun 2005 10:43:24 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-384 Remove "-face" suffix from compare-windows face 2005-06-10 Miles Bader * lisp/compare-w.el (compare-windows): Remove "-face" suffix from face name. (compare-windows-face): New backward-compatibility alias for renamed face. (compare-windows-highlight): Use renamed compare-windows face. --- lisp/ChangeLog | 5 +++++ lisp/compare-w.el | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8feae6eb7e1..7b1223f6762 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2005-06-10 Miles Bader + * compare-w.el (compare-windows): Remove "-face" suffix from face name. + (compare-windows-face): New backward-compatibility alias for + renamed face. + (compare-windows-highlight): Use renamed compare-windows face. + * strokes.el (strokes-char): Remove "-face" suffix from face name. (strokes-char-face): New backward-compatibility alias for renamed face. (strokes-encode-buffer): Use renamed strokes-char face. diff --git a/lisp/compare-w.el b/lisp/compare-w.el index c9b26a6eb5b..353c015c8af 100644 --- a/lisp/compare-w.el +++ b/lisp/compare-w.el @@ -1,6 +1,6 @@ ;;; compare-w.el --- compare text between windows for Emacs -;; Copyright (C) 1986,1989,1993,1997,2003,2004 Free Software Foundation, Inc. +;; Copyright (C) 1986,1989,1993,1997,2003,2004,2005 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: convenience files @@ -116,7 +116,7 @@ and the value `((4) (4))' for horizontally split windows." :type 'boolean :group 'compare-w) -(defface compare-windows-face +(defface compare-windows '((((class color) (min-colors 88) (background light)) (:background "paleturquoise")) (((class color) (min-colors 88) (background dark)) @@ -126,6 +126,8 @@ and the value `((4) (4))' for horizontally split windows." (t (:underline t))) "Face for highlighting of compare-windows difference regions." :group 'compare-w) +;; backward-compatibility alias +(put 'compare-windows-face 'face-alias 'compare-windows) (defvar compare-windows-overlay1 nil) (defvar compare-windows-overlay2 nil) @@ -341,13 +343,13 @@ on third call it again advances points to the next difference and so on." (if compare-windows-overlay1 (move-overlay compare-windows-overlay1 beg1 end1 b1) (setq compare-windows-overlay1 (make-overlay beg1 end1 b1)) - (overlay-put compare-windows-overlay1 'face 'compare-windows-face) + (overlay-put compare-windows-overlay1 'face 'compare-windows) (overlay-put compare-windows-overlay1 'priority 1)) (overlay-put compare-windows-overlay1 'window w1) (if compare-windows-overlay2 (move-overlay compare-windows-overlay2 beg2 end2 b2) (setq compare-windows-overlay2 (make-overlay beg2 end2 b2)) - (overlay-put compare-windows-overlay2 'face 'compare-windows-face) + (overlay-put compare-windows-overlay2 'face 'compare-windows) (overlay-put compare-windows-overlay2 'priority 1)) (overlay-put compare-windows-overlay2 'window w2) ;; Remove highlighting before next command is executed -- cgit v1.2.1 From 75eb05f6458f324e100ac5eaaca73257e0455bb5 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 10 Jun 2005 10:43:42 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-385 Remove "-face" suffix from calendar faces 2005-06-10 Miles Bader * lisp/calendar/calendar.el (diary, calendar-today, holiday) (mark-visible-calendar-date): Remove "-face" suffix from face names. (diary-face, calendar-today-face, holiday-face): New backward-compatibility aliases for renamed faces. (eval-after-load "facemenu", diary-entry-marker) (calendar-today-marker, calendar-holiday-marker, diary-face): Use renamed calendar faces. --- lisp/ChangeLog | 8 ++++++++ lisp/calendar/calendar.el | 28 +++++++++++++++++----------- 2 files changed, 25 insertions(+), 11 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7b1223f6762..b69d45d6e4f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,13 @@ 2005-06-10 Miles Bader + * calendar/calendar.el (diary, calendar-today, holiday) + (mark-visible-calendar-date): Remove "-face" suffix from face names. + (diary-face, calendar-today-face, holiday-face): + New backward-compatibility aliases for renamed faces. + (eval-after-load "facemenu", diary-entry-marker) + (calendar-today-marker, calendar-holiday-marker, diary-face): + Use renamed calendar faces. + * compare-w.el (compare-windows): Remove "-face" suffix from face name. (compare-windows-face): New backward-compatibility alias for renamed face. diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index fdf565c7923..9731d535447 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -206,9 +206,9 @@ If nil, make an icon of the frame. If non-nil, delete the frame." :type 'boolean :group 'view) -(defvar diary-face 'diary-face +(defvar diary-face 'diary "Face name to use for diary entries.") -(defface diary-face +(defface diary '((((min-colors 88) (class color) (background light)) :foreground "red1") (((class color) (background light)) @@ -221,13 +221,17 @@ If nil, make an icon of the frame. If non-nil, delete the frame." :weight bold)) "Face for highlighting diary entries." :group 'diary) +;; backward-compatibility alias +(put 'diary-face 'face-alias 'diary) -(defface calendar-today-face +(defface calendar-today '((t (:underline t))) "Face for indicating today's date." :group 'diary) +;; backward-compatibility alias +(put 'calendar-today-face 'face-alias 'calendar-today) -(defface holiday-face +(defface holiday '((((class color) (background light)) :background "pink") (((class color) (background dark)) @@ -236,17 +240,19 @@ If nil, make an icon of the frame. If non-nil, delete the frame." :inverse-video t)) "Face for indicating dates that have holidays." :group 'diary) +;; backward-compatibility alias +(put 'holiday-face 'face-alias 'holiday) (eval-after-load "facemenu" '(progn - (add-to-list 'facemenu-unlisted-faces 'diary-face) - (add-to-list 'facemenu-unlisted-faces 'calendar-today-face) - (add-to-list 'facemenu-unlisted-faces 'holiday-face))) + (add-to-list 'facemenu-unlisted-faces 'diary) + (add-to-list 'facemenu-unlisted-faces 'calendar-today) + (add-to-list 'facemenu-unlisted-faces 'holiday))) (defcustom diary-entry-marker (if (not (display-color-p)) "+" - 'diary-face) + 'diary) "*How to mark dates that have diary entries. The value can be either a single-character string or a face." :type '(choice string face) @@ -255,7 +261,7 @@ The value can be either a single-character string or a face." (defcustom calendar-today-marker (if (not (display-color-p)) "=" - 'calendar-today-face) + 'calendar-today) "*How to mark today's date in the calendar. The value can be either a single-character string or a face. Marking today's date is done only if you set up `today-visible-calendar-hook' @@ -266,7 +272,7 @@ to request that." (defcustom calendar-holiday-marker (if (not (display-color-p)) "*" - 'holiday-face) + 'holiday) "*How to mark notable dates in the calendar. The value can be either a single-character string or a face." :type '(choice string face) @@ -2943,7 +2949,7 @@ MARK defaults to `diary-entry-marker'." (forward-char -2)) (let ; attr list ((temp-face - (make-symbol (apply 'concat "temp-face-" + (make-symbol (apply 'concat "temp-" (mapcar '(lambda (sym) (cond ((symbolp sym) (symbol-name sym)) ((numberp sym) (int-to-string sym)) -- cgit v1.2.1 From ccacbcecfe27fb15f987627cc128816bc94ebd41 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 10 Jun 2005 10:44:01 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-386 Remove "-face" suffix from diary-button face 2005-06-10 Miles Bader * lisp/calendar/diary-lib.el (diary-button): Remove "-face" suffix from face name. (diary-button-face): New backward-compatibility alias for renamed face. (diary-entry): Use renamed diary-button face. --- lisp/ChangeLog | 5 +++++ lisp/calendar/diary-lib.el | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b69d45d6e4f..2167a636680 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2005-06-10 Miles Bader + * calendar/diary-lib.el (diary-button): Remove "-face" suffix from + face name. + (diary-button-face): New backward-compatibility alias for renamed face. + (diary-entry): Use renamed diary-button face. + * calendar/calendar.el (diary, calendar-today, holiday) (mark-visible-calendar-date): Remove "-face" suffix from face names. (diary-face, calendar-today-face, holiday-face): diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 6aec579c107..a0e9d1f90b7 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -543,15 +543,17 @@ changing the variable `diary-include-string'." (set-window-start window (point-min)))) (message "Preparing diary...done")))) -(defface diary-button-face '((((type pc) (class color)) - (:foreground "lightblue"))) +(defface diary-button '((((type pc) (class color)) + (:foreground "lightblue"))) "Default face used for buttons." :version "22.1" :group 'diary) +;; backward-compatibility alias +(put 'diary-button-face 'face-alias 'diary-button) (define-button-type 'diary-entry 'action #'diary-goto-entry - 'face #'diary-button-face) + 'face 'diary-button) (defun diary-goto-entry (button) (let ((marker (button-get button 'marker))) -- cgit v1.2.1 From 4719d18424c13d40836010cd2f54f873900b3b7b Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 10 Jun 2005 10:44:18 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-387 Remove "-face" suffix from testcover faces 2005-06-10 Miles Bader * lisp/emacs-lisp/testcover.el (testcover-nohits, testcover-1value): Remove "-face" suffix from face names. (testcover-nohits-face, testcover-1value-face): New backward-compatibility aliases for renamed faces. (testcover-mark): Use renamed testcover faces. --- lisp/ChangeLog | 6 ++++++ lisp/emacs-lisp/testcover.el | 18 +++++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2167a636680..28fcd4349d9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,11 @@ 2005-06-10 Miles Bader + * emacs-lisp/testcover.el (testcover-nohits, testcover-1value): + Remove "-face" suffix from face names. + (testcover-nohits-face, testcover-1value-face): + New backward-compatibility aliases for renamed faces. + (testcover-mark): Use renamed testcover faces. + * calendar/diary-lib.el (diary-button): Remove "-face" suffix from face name. (diary-button-face): New backward-compatibility alias for renamed face. diff --git a/lisp/emacs-lisp/testcover.el b/lisp/emacs-lisp/testcover.el index f77b1a00e2c..6b87d06cb0e 100644 --- a/lisp/emacs-lisp/testcover.el +++ b/lisp/emacs-lisp/testcover.el @@ -1,6 +1,6 @@ ;;;; testcover.el -- Visual code-coverage tool -;; Copyright (C) 2002 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2005 Free Software Foundation, Inc. ;; Author: Jonathan Yavner ;; Maintainer: Jonathan Yavner @@ -150,15 +150,19 @@ call to one of the `testcover-1value-functions'." 1-valued, no error if actually multi-valued." :group 'testcover) -(defface testcover-nohits-face +(defface testcover-nohits '((t (:background "DeepPink2"))) "Face for forms that had no hits during coverage test" :group 'testcover) +;; backward-compatibility alias +(put 'testcover-nohits-face 'face-alias 'testcover-nohits) -(defface testcover-1value-face +(defface testcover-1value '((t (:background "Wheat2"))) "Face for forms that always produced the same value during coverage test" :group 'testcover) +;; backward-compatibility alias +(put 'testcover-1value-face 'face-alias 'testcover-1value) ;;;========================================================================= @@ -477,8 +481,8 @@ same value during coverage testing." (defun testcover-mark (def) "Marks one DEF (a function or macro symbol) to highlight its contained forms that did not get completely tested during coverage tests. - A marking of testcover-nohits-face (default = red) indicates that the -form was never evaluated. A marking of testcover-1value-face + A marking with the face `testcover-nohits' (default = red) indicates that the +form was never evaluated. A marking using the `testcover-1value' face \(default = tan) indicates that the form always evaluated to the same value. The forms throw, error, and signal are not marked. They do not return and would always get a red mark. Some forms that always return the same @@ -506,8 +510,8 @@ eliminated by adding more test cases." (setq ov (make-overlay (1- j) j)) (overlay-put ov 'face (if (memq data '(unknown 1value)) - 'testcover-nohits-face - 'testcover-1value-face)))) + 'testcover-nohits + 'testcover-1value)))) (set-buffer-modified-p changed)))) (defun testcover-mark-all (&optional buffer) -- cgit v1.2.1 From 25c066491cdea8f3f388461d37d1d1edd0876622 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 10 Jun 2005 10:44:34 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-388 Remove "-face" suffix from viper faces 2005-06-10 Miles Bader * lisp/emulation/viper-init.el (viper-search, viper-replace-overlay) (viper-minibuffer-emacs, viper-minibuffer-insert) (viper-minibuffer-vi): Remove "-face" suffix from face names. (viper-search-face, viper-replace-overlay-face) (viper-minibuffer-emacs-face, viper-minibuffer-insert-face) (viper-minibuffer-vi-face): New backward-compatibility aliases for renamed faces. (viper-search-face, viper-replace-overlay-face) (viper-minibuffer-emacs-face, viper-minibuffer-insert-face) (viper-minibuffer-vi-face): Use renamed viper faces. --- lisp/ChangeLog | 11 +++++++++++ lisp/emulation/viper-init.el | 42 ++++++++++++++++++++++++++---------------- 2 files changed, 37 insertions(+), 16 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 28fcd4349d9..7b37c9e5bb3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,16 @@ 2005-06-10 Miles Bader + * emulation/viper-init.el (viper-search, viper-replace-overlay) + (viper-minibuffer-emacs, viper-minibuffer-insert) + (viper-minibuffer-vi): Remove "-face" suffix from face names. + (viper-search-face, viper-replace-overlay-face) + (viper-minibuffer-emacs-face, viper-minibuffer-insert-face) + (viper-minibuffer-vi-face): + New backward-compatibility aliases for renamed faces. + (viper-search-face, viper-replace-overlay-face) + (viper-minibuffer-emacs-face, viper-minibuffer-insert-face) + (viper-minibuffer-vi-face): Use renamed viper faces. + * emacs-lisp/testcover.el (testcover-nohits, testcover-1value): Remove "-face" suffix from face names. (testcover-nohits-face, testcover-1value-face): diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el index 4f08f1b6cc1..ab9212cb95f 100644 --- a/lisp/emulation/viper-init.el +++ b/lisp/emulation/viper-init.el @@ -1,6 +1,6 @@ ;;; viper-init.el --- some common definitions for Viper -;; Copyright (C) 1997, 98, 99, 2000, 01, 02 Free Software Foundation, Inc. +;; Copyright (C) 1997, 98, 99, 2000, 01, 02, 05 Free Software Foundation, Inc. ;; Author: Michael Kifer @@ -850,74 +850,84 @@ Related buffers can be cycled through via :R and :P commands." :group 'viper) -(defface viper-search-face +(defface viper-search '((((class color)) (:foreground "Black" :background "khaki")) (t (:underline t :stipple "gray3"))) "*Face used to flash out the search pattern." :group 'viper-highlighting) +;; backward-compatibility alias +(put 'viper-search-face 'face-alias 'viper-search) ;; An internal variable. Viper takes the face from here. -(defvar viper-search-face 'viper-search-face +(defvar viper-search-face 'viper-search "Face used to flash out the search pattern. DO NOT CHANGE this variable. Instead, use the customization widget to customize the actual face object `viper-search-face' this variable represents.") -(viper-hide-face 'viper-search-face) +(viper-hide-face 'viper-search) -(defface viper-replace-overlay-face +(defface viper-replace-overlay '((((class color)) (:foreground "Black" :background "darkseagreen2")) (t (:underline t :stipple "gray3"))) "*Face for highlighting replace regions on a window display." :group 'viper-highlighting) +;; backward-compatibility alias +(put 'viper-replace-overlay-face 'face-alias 'viper-replace-overlay) ;; An internal variable. Viper takes the face from here. -(defvar viper-replace-overlay-face 'viper-replace-overlay-face +(defvar viper-replace-overlay-face 'viper-replace-overlay "Face for highlighting replace regions on a window display. DO NOT CHANGE this variable. Instead, use the customization widget to customize the actual face object `viper-replace-overlay-face' this variable represents.") -(viper-hide-face 'viper-replace-overlay-face) +(viper-hide-face 'viper-replace-overlay) -(defface viper-minibuffer-emacs-face +(defface viper-minibuffer-emacs '((((class color)) (:foreground "Black" :background "darkseagreen2")) (t (:weight bold))) "Face used in the Minibuffer when it is in Emacs state." :group 'viper-highlighting) +;; backward-compatibility alias +(put 'viper-minibuffer-emacs-face 'face-alias 'viper-minibuffer-emacs) ;; An internal variable. Viper takes the face from here. -(defvar viper-minibuffer-emacs-face 'viper-minibuffer-emacs-face +(defvar viper-minibuffer-emacs-face 'viper-minibuffer-emacs "Face used in the Minibuffer when it is in Emacs state. DO NOT CHANGE this variable. Instead, use the customization widget to customize the actual face object `viper-minibuffer-emacs-face' this variable represents.") -(viper-hide-face 'viper-minibuffer-emacs-face) +(viper-hide-face 'viper-minibuffer-emacs) -(defface viper-minibuffer-insert-face +(defface viper-minibuffer-insert '((((class color)) (:foreground "Black" :background "pink")) (t (:slant italic))) "Face used in the Minibuffer when it is in Insert state." :group 'viper-highlighting) +;; backward-compatibility alias +(put 'viper-minibuffer-insert-face 'face-alias 'viper-minibuffer-insert) ;; An internal variable. Viper takes the face from here. -(defvar viper-minibuffer-insert-face 'viper-minibuffer-insert-face +(defvar viper-minibuffer-insert-face 'viper-minibuffer-insert "Face used in the Minibuffer when it is in Insert state. DO NOT CHANGE this variable. Instead, use the customization widget to customize the actual face object `viper-minibuffer-insert-face' this variable represents.") -(viper-hide-face 'viper-minibuffer-insert-face) +(viper-hide-face 'viper-minibuffer-insert) -(defface viper-minibuffer-vi-face +(defface viper-minibuffer-vi '((((class color)) (:foreground "DarkGreen" :background "grey")) (t (:inverse-video t))) "Face used in the Minibuffer when it is in Vi state." :group 'viper-highlighting) +;; backward-compatibility alias +(put 'viper-minibuffer-vi-face 'face-alias 'viper-minibuffer-vi) ;; An internal variable. Viper takes the face from here. -(defvar viper-minibuffer-vi-face 'viper-minibuffer-vi-face +(defvar viper-minibuffer-vi-face 'viper-minibuffer-vi "Face used in the Minibuffer when it is in Vi state. DO NOT CHANGE this variable. Instead, use the customization widget to customize the actual face object `viper-minibuffer-vi-face' this variable represents.") -(viper-hide-face 'viper-minibuffer-vi-face) +(viper-hide-face 'viper-minibuffer-vi) ;; the current face to be used in the minibuffer (viper-deflocalvar -- cgit v1.2.1 From 8e49668e158c821282803531670ee84138787635 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 10 Jun 2005 10:44:55 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-389 Remove "-face" suffix from org faces 2005-06-10 Miles Bader * lisp/textmodes/org.el (org-level-1, org-level-2, org-level-3) (org-level-4, org-level-5, org-level-6, org-level-7) (org-level-8, org-warning, org-headline-done) (org-deadline-announce, org-scheduled-today) (org-scheduled-previously, org-link, org-done, org-table) (org-time-grid): Remove "-face" suffix from face names. (org-level-1-face, org-level-2-face, org-level-3-face) (org-level-4-face, org-level-5-face, org-level-6-face) (org-level-7-face, org-level-8-face, org-warning-face) (org-headline-done-face, org-deadline-announce-face) (org-scheduled-today-face, org-scheduled-previously-face) (org-link-face, org-done-face, org-table-face) (org-time-grid-face): New backward-compatibility aliases for renamed faces. (org-level-faces, org-set-font-lock-defaults, org-timeline) (org-agenda, org-agenda-get-todos, org-agenda-get-deadlines) (org-agenda-get-timestamps, org-agenda-get-scheduled) (org-agenda-add-time-grid-maybe, org-table-p): Use renamed org faces. --- lisp/ChangeLog | 19 +++++++ lisp/textmodes/org.el | 153 ++++++++++++++++++++++++++++++-------------------- 2 files changed, 111 insertions(+), 61 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7b37c9e5bb3..5fe427d299f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,24 @@ 2005-06-10 Miles Bader + * textmodes/org.el (org-level-1, org-level-2, org-level-3) + (org-level-4, org-level-5, org-level-6, org-level-7) + (org-level-8, org-warning, org-headline-done) + (org-deadline-announce, org-scheduled-today) + (org-scheduled-previously, org-link, org-done, org-table) + (org-time-grid): Remove "-face" suffix from face names. + (org-level-1-face, org-level-2-face, org-level-3-face) + (org-level-4-face, org-level-5-face, org-level-6-face) + (org-level-7-face, org-level-8-face, org-warning-face) + (org-headline-done-face, org-deadline-announce-face) + (org-scheduled-today-face, org-scheduled-previously-face) + (org-link-face, org-done-face, org-table-face) + (org-time-grid-face): + New backward-compatibility aliases for renamed faces. + (org-level-faces, org-set-font-lock-defaults, org-timeline) + (org-agenda, org-agenda-get-todos, org-agenda-get-deadlines) + (org-agenda-get-timestamps, org-agenda-get-scheduled) + (org-agenda-add-time-grid-maybe, org-table-p): Use renamed org faces. + * emulation/viper-init.el (viper-search, viper-replace-overlay) (viper-minibuffer-emacs, viper-minibuffer-insert) (viper-minibuffer-vi): Remove "-face" suffix from face names. diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el index d13a7514c16..1a9e97dd0b9 100644 --- a/lisp/textmodes/org.el +++ b/lisp/textmodes/org.el @@ -1314,31 +1314,37 @@ Otherwise, the buffer will just be saved to a file and stay hidden." :tag "Org Faces" :group 'org) -(defface org-level-1-face ;; font-lock-function-name-face +(defface org-level-1 ;; font-lock-function-name-face '((((type tty) (class color)) (:foreground "blue" :weight bold)) (((class color) (background light)) (:foreground "Blue")) (((class color) (background dark)) (:foreground "LightSkyBlue")) (t (:inverse-video t :bold t))) "Face used for level 1 headlines." :group 'org-faces) +;; backward-compatibility alias +(put 'org-level-1-face 'face-alias 'org-level-1) -(defface org-level-2-face ;; font-lock-variable-name-face +(defface org-level-2 ;; font-lock-variable-name-face '((((type tty) (class color)) (:foreground "yellow" :weight light)) (((class color) (background light)) (:foreground "DarkGoldenrod")) (((class color) (background dark)) (:foreground "LightGoldenrod")) (t (:bold t :italic t))) "Face used for level 2 headlines." :group 'org-faces) +;; backward-compatibility alias +(put 'org-level-2-face 'face-alias 'org-level-2) -(defface org-level-3-face ;; font-lock-keyword-face +(defface org-level-3 ;; font-lock-keyword-face '((((type tty) (class color)) (:foreground "cyan" :weight bold)) (((class color) (background light)) (:foreground "Purple")) (((class color) (background dark)) (:foreground "Cyan")) (t (:bold t))) "Face used for level 3 headlines." :group 'org-faces) +;; backward-compatibility alias +(put 'org-level-3-face 'face-alias 'org-level-3) -(defface org-level-4-face ;; font-lock-comment-face +(defface org-level-4 ;; font-lock-comment-face '((((type tty pc) (class color) (background light)) (:foreground "red")) (((type tty pc) (class color) (background dark)) (:foreground "red1")) (((class color) (background light)) (:foreground "Firebrick")) @@ -1346,40 +1352,50 @@ Otherwise, the buffer will just be saved to a file and stay hidden." (t (:bold t :italic t))) "Face used for level 4 headlines." :group 'org-faces) +;; backward-compatibility alias +(put 'org-level-4-face 'face-alias 'org-level-4) -(defface org-level-5-face ;; font-lock-type-face +(defface org-level-5 ;; font-lock-type-face '((((type tty) (class color)) (:foreground "green")) (((class color) (background light)) (:foreground "ForestGreen")) (((class color) (background dark)) (:foreground "PaleGreen")) (t (:bold t :underline t))) "Face used for level 5 headlines." :group 'org-faces) +;; backward-compatibility alias +(put 'org-level-5-face 'face-alias 'org-level-5) -(defface org-level-6-face ;; font-lock-constant-face +(defface org-level-6 ;; font-lock-constant-face '((((type tty) (class color)) (:foreground "magenta")) (((class color) (background light)) (:foreground "CadetBlue")) (((class color) (background dark)) (:foreground "Aquamarine")) (t (:bold t :underline t))) "Face used for level 6 headlines." :group 'org-faces) +;; backward-compatibility alias +(put 'org-level-6-face 'face-alias 'org-level-6) -(defface org-level-7-face ;; font-lock-builtin-face +(defface org-level-7 ;; font-lock-builtin-face '((((type tty) (class color)) (:foreground "blue" :weight light)) (((class color) (background light)) (:foreground "Orchid")) (((class color) (background dark)) (:foreground "LightSteelBlue")) (t (:bold t))) "Face used for level 7 headlines." :group 'org-faces) +;; backward-compatibility alias +(put 'org-level-7-face 'face-alias 'org-level-7) -(defface org-level-8-face ;; font-lock-string-face +(defface org-level-8 ;; font-lock-string-face '((((type tty) (class color)) (:foreground "green")) (((class color) (background light)) (:foreground "RosyBrown")) (((class color) (background dark)) (:foreground "LightSalmon")) (t (:italic t))) "Face used for level 8 headlines." :group 'org-faces) +;; backward-compatibility alias +(put 'org-level-8-face 'face-alias 'org-level-8) -(defface org-warning-face ;; font-lock-warning-face +(defface org-warning ;; font-lock-warning-face '((((type tty) (class color)) (:foreground "red")) (((class color) (background light)) (:foreground "Red" :bold t)) (((class color) (background dark)) (:foreground "Red1" :bold t)) @@ -1387,6 +1403,8 @@ Otherwise, the buffer will just be saved to a file and stay hidden." (t (:inverse-video t :bold t))) "Face for deadlines and TODO keywords." :group 'org-faces) +;; backward-compatibility alias +(put 'org-warning-face 'face-alias 'org-warning) (defcustom org-fontify-done-headline nil "Non-nil means, change the face of a headline if it is marked DONE. @@ -1396,7 +1414,7 @@ When this is non-nil, the headline after the keyword is set to the :group 'org-faces :type 'boolean) -(defface org-headline-done-face ;; font-lock-string-face +(defface org-headline-done ;; font-lock-string-face '((((type tty) (class color)) (:foreground "green")) (((class color) (background light)) (:foreground "RosyBrown")) (((class color) (background dark)) (:foreground "LightSalmon")) @@ -1404,26 +1422,32 @@ When this is non-nil, the headline after the keyword is set to the "Face used to indicate that a headline is DONE. See also the variable `org-fontify-done-headline'." :group 'org-faces) +;; backward-compatibility alias +(put 'org-headline-done-face 'face-alias 'org-headline-done) ;; Inheritance does not yet work for xemacs. So we just copy... -(defface org-deadline-announce-face +(defface org-deadline-announce '((((type tty) (class color)) (:foreground "blue" :weight bold)) (((class color) (background light)) (:foreground "Blue")) (((class color) (background dark)) (:foreground "LightSkyBlue")) (t (:inverse-video t :bold t))) "Face for upcoming deadlines." :group 'org-faces) +;; backward-compatibility alias +(put 'org-deadline-announce-face 'face-alias 'org-deadline-announce) -(defface org-scheduled-today-face +(defface org-scheduled-today '((((type tty) (class color)) (:foreground "green")) (((class color) (background light)) (:foreground "DarkGreen")) (((class color) (background dark)) (:foreground "PaleGreen")) (t (:bold t :underline t))) "Face for items scheduled for a certain day." :group 'org-faces) +;; backward-compatibility alias +(put 'org-scheduled-today-face 'face-alias 'org-scheduled-today) -(defface org-scheduled-previously-face +(defface org-scheduled-previously '((((type tty pc) (class color) (background light)) (:foreground "red")) (((type tty pc) (class color) (background dark)) (:foreground "red1")) (((class color) (background light)) (:foreground "Firebrick")) @@ -1431,49 +1455,59 @@ When this is non-nil, the headline after the keyword is set to the (t (:bold t :italic t))) "Face for items scheduled previously, and not yet done." :group 'org-faces) +;; backward-compatibility alias +(put 'org-scheduled-previously-face 'face-alias 'org-scheduled-previously) -(defface org-link-face +(defface org-link '((((type tty) (class color)) (:foreground "cyan" :weight bold)) (((class color) (background light)) (:foreground "Purple")) (((class color) (background dark)) (:foreground "Cyan")) (t (:bold t))) "Face for links." :group 'org-faces) +;; backward-compatibility alias +(put 'org-link-face 'face-alias 'org-link) -(defface org-done-face ;; font-lock-type-face +(defface org-done ;; font-lock-type-face '((((type tty) (class color)) (:foreground "green")) (((class color) (background light)) (:foreground "ForestGreen" :bold t)) (((class color) (background dark)) (:foreground "PaleGreen" :bold t)) (t (:bold t :underline t))) "Face used for DONE." :group 'org-faces) +;; backward-compatibility alias +(put 'org-done-face 'face-alias 'org-done) -(defface org-table-face ;; font-lock-function-name-face +(defface org-table ;; font-lock-function-name-face '((((type tty) (class color)) (:foreground "blue" :weight bold)) (((class color) (background light)) (:foreground "Blue")) (((class color) (background dark)) (:foreground "LightSkyBlue")) (t (:inverse-video t :bold t))) "Face used for tables." :group 'org-faces) +;; backward-compatibility alias +(put 'org-table-face 'face-alias 'org-table) -(defface org-time-grid-face ;; font-lock-variable-name-face +(defface org-time-grid ;; font-lock-variable-name-face '((((type tty) (class color)) (:foreground "yellow" :weight light)) (((class color) (background light)) (:foreground "DarkGoldenrod")) (((class color) (background dark)) (:foreground "LightGoldenrod")) (t (:bold t :italic t))) "Face used for level 2 headlines." :group 'org-faces) +;; backward-compatibility alias +(put 'org-time-grid-face 'face-alias 'org-time-grid) (defvar org-level-faces '( - org-level-1-face - org-level-2-face - org-level-3-face - org-level-4-face - org-level-5-face - org-level-6-face - org-level-7-face - org-level-8-face + org-level-1 + org-level-2 + org-level-3 + org-level-4 + org-level-5 + org-level-6 + org-level-7 + org-level-8 )) (defvar org-n-levels (length org-level-faces)) @@ -1654,31 +1688,31 @@ The following commands are available: (defun org-set-font-lock-defaults () (let ((org-font-lock-extra-keywords (list - '(org-activate-links (0 'org-link-face)) - '(org-activate-dates (0 'org-link-face)) + '(org-activate-links (0 'org-link)) + '(org-activate-dates (0 'org-link)) (list (concat "^\\*+[ \t]*" org-not-done-regexp) - '(1 'org-warning-face t)) - (list (concat "\\[#[A-Z]\\]") '(0 'org-warning-face t)) - (list (concat "\\<" org-deadline-string) '(0 'org-warning-face t)) - (list (concat "\\<" org-scheduled-string) '(0 'org-warning-face t)) + '(1 'org-warning t)) + (list (concat "\\[#[A-Z]\\]") '(0 'org-warning t)) + (list (concat "\\<" org-deadline-string) '(0 'org-warning t)) + (list (concat "\\<" org-scheduled-string) '(0 'org-warning t)) ;; '("\\(\\s-\\|^\\)\\(\\*\\([a-zA-Z]+\\)\\*\\)\\([^a-zA-Z*]\\|$\\)" ;; (3 'bold)) ;; '("\\(\\s-\\|^\\)\\(/\\([a-zA-Z]+\\)/\\)\\([^a-zA-Z*]\\|$\\)" ;; (3 'italic)) ;; '("\\(\\s-\\|^\\)\\(_\\([a-zA-Z]+\\)_\\)\\([^a-zA-Z*]\\|$\\)" ;; (3 'underline)) - '("\\" (0 'org-warning-face t)) + '("\\" (0 'org-warning t)) (list (concat "^\\*+[ \t]*\\<\\(" org-comment-string "\\)\\>") - '(1 'org-warning-face t)) - '("^#.*" (0 'font-lock-comment-face t)) + '(1 'org-warning t)) + '("^#.*" (0 font-lock-comment-face t)) (if org-fontify-done-headline (list (concat "^[*]+ +\\<\\(" org-done-string "\\)\\(.*\\)\\>") - '(1 'org-done-face t) '(2 'org-headline-done-face t)) + '(1 'org-done t) '(2 'org-headline-done t)) (list (concat "^[*]+ +\\<\\(" org-done-string "\\)\\>") - '(1 'org-done-face t))) + '(1 'org-done t))) '("^[ \t]*\\(\\(|\\|\\+-[-+]\\).*\\S-\\)" - (1 'org-table-face t)) - '("^[ \t]*\\(:.*\\)" (1 'org-table-face t))))) + (1 'org-table t)) + '("^[ \t]*\\(:.*\\)" (1 'org-table t))))) (set (make-local-variable 'org-font-lock-keywords) (append (if org-noutline-p ; FIXME: I am not sure if eval will work @@ -3339,8 +3373,7 @@ dates." (number-to-string (extract-calendar-day date)) " " (calendar-month-name (extract-calendar-month date)) " " (number-to-string (extract-calendar-year date)) "\n") - (put-text-property s (1- (point)) 'face - 'org-link-face) + (put-text-property s (1- (point)) 'face 'org-link) (if (equal d today) (put-text-property s (1- (point)) 'org-today t)) (insert (org-finalize-agenda-entries rtn) "\n") @@ -3419,7 +3452,7 @@ NDAYS defaults to `org-agenda-ndays'." (when rtnall (insert "ALL CURRENTLY OPEN TODO ITEMS:\n") (add-text-properties (point-min) (1- (point)) - (list 'face 'org-link-face)) + (list 'face 'org-link)) (insert (org-finalize-agenda-entries rtnall) "\n"))) (while (setq d (pop day-numbers)) (setq date (calendar-gregorian-from-absolute d) @@ -3448,8 +3481,7 @@ NDAYS defaults to `org-agenda-ndays'." (extract-calendar-day date) (calendar-month-name (extract-calendar-month date)) (extract-calendar-year date))) - (put-text-property s (1- (point)) 'face - 'org-link-face) + (put-text-property s (1- (point)) 'face 'org-link) (if rtnall (insert (org-finalize-agenda-entries ;; FIXME: condition needed (org-agenda-add-time-grid-maybe @@ -3936,7 +3968,7 @@ the documentation of `org-diary'." (defun org-agenda-get-todos () "Return the TODO information for agenda display." (let* ((props (list 'face nil - 'done-face 'org-done-face + 'done-face 'org-done 'mouse-face 'highlight 'keymap org-agenda-keymap 'help-echo @@ -4023,18 +4055,17 @@ the documentation of `org-diary'." (if deadlinep (add-text-properties 0 (length txt) - (list 'face - (if donep 'org-done-face 'org-warning-face) - 'undone-face 'org-warning-face - 'done-face 'org-done-face + (list 'face (if donep 'org-done 'org-warning) + 'undone-face 'org-warning + 'done-face 'org-done 'priority (+ 100 priority)) txt) (if scheduledp (add-text-properties 0 (length txt) - (list 'face 'org-scheduled-today-face - 'undone-face 'org-scheduled-today-face - 'done-face 'org-done-face + (list 'face 'org-scheduled-today + 'undone-face 'org-scheduled-today + 'done-face 'org-done priority (+ 99 priority)) txt) (add-text-properties @@ -4088,14 +4119,14 @@ the documentation of `org-diary'." (list 'org-marker (org-agenda-new-marker pos) 'org-hd-marker (org-agenda-new-marker pos1) 'priority (+ (- 10 diff) (org-get-priority txt)) - 'face (cond ((<= diff 0) 'org-warning-face) - ((<= diff 5) 'org-scheduled-previously-face) + 'face (cond ((<= diff 0) 'org-warning) + ((<= diff 5) 'org-scheduled-previously) (t nil)) 'undone-face (cond - ((<= diff 0) 'org-warning-face) - ((<= diff 5) 'org-scheduled-previously-face) + ((<= diff 0) 'org-warning) + ((<= diff 5) 'org-scheduled-previously) (t nil)) - 'done-face 'org-done-face) + 'done-face 'org-done) props) txt) (push txt ee))))) @@ -4103,9 +4134,9 @@ the documentation of `org-diary'." (defun org-agenda-get-scheduled () "Return the scheduled information for agenda display." - (let* ((props (list 'face 'org-scheduled-previously-face - 'undone-face 'org-scheduled-previously-face - 'done-face 'org-done-face + (let* ((props (list 'face 'org-scheduled-previously + 'undone-face 'org-scheduled-previously + 'done-face 'org-done 'mouse-face 'highlight 'keymap org-agenda-keymap 'help-echo @@ -4319,7 +4350,7 @@ only the correctly processes TXT should be returned - this is used by (concat (substring time 0 -2) ":" (substring time -2))) new) (put-text-property - 1 (length (car new)) 'face 'org-time-grid-face (car new)))) + 1 (length (car new)) 'face 'org-time-grid (car new)))) (if (member 'time-up org-agenda-sorting-strategy) (append new list) (append list new))))) @@ -8210,7 +8241,7 @@ When LEVEL is non-nil, increase section numbers on that level." (defsubst org-table-p () (if (and (eq major-mode 'org-mode) font-lock-mode) - (eq (get-text-property (point) 'face) 'org-table-face) + (eq (get-text-property (point) 'face) 'org-table) (save-match-data (org-at-table-p)))) (defun org-self-insert-command (N) -- cgit v1.2.1 From b390eb09fc4c6af8d36eede409ac5b5e6ec7593d Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 10 Jun 2005 10:45:17 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-390 Remove "-face" suffix from sgml-namespace face 2005-06-10 Miles Bader * lisp/textmodes/sgml-mode.el (sgml-namespace): Remove "-face" suffix from face name. (sgml-namespace-face): New backward-compatibility alias for renamed face. (sgml-namespace-face): Use renamed sgml-namespace face. --- lisp/ChangeLog | 6 ++++++ lisp/textmodes/sgml-mode.el | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5fe427d299f..0b7338f31fd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,11 @@ 2005-06-10 Miles Bader + * textmodes/sgml-mode.el (sgml-namespace): Remove "-face" suffix + from face name. + (sgml-namespace-face): New backward-compatibility alias for + renamed face. + (sgml-namespace-face): Use renamed sgml-namespace face. + * textmodes/org.el (org-level-1, org-level-2, org-level-3) (org-level-4, org-level-5, org-level-6, org-level-7) (org-level-8, org-warning, org-headline-done) diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index cdc2916e799..7e1167a9396 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el @@ -248,11 +248,13 @@ separated by a space." "Regular expression that matches a non-empty start tag. Any terminating `>' or `/' is not matched.") -(defface sgml-namespace-face +(defface sgml-namespace '((t (:inherit font-lock-builtin-face))) "`sgml-mode' face used to highlight the namespace part of identifiers." :group 'sgml) -(defvar sgml-namespace-face 'sgml-namespace-face) +;; backward-compatibility alias +(put 'sgml-namespace-face 'face-alias 'sgml-namespace) +(defvar sgml-namespace-face 'sgml-namespace) ;; internal (defconst sgml-font-lock-keywords-1 -- cgit v1.2.1 From b4c925d8e57082786c4f7dc5d209888fb8af0f82 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 10 Jun 2005 10:45:37 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-391 Remove "-face" suffix from table-cell face 2005-06-10 Miles Bader * lisp/textmodes/table.el (table-cell): Remove "-face" suffix from face name. (table-cell-face): New backward-compatibility alias for renamed face. (table--put-cell-face-property, table--update-cell-face): Use renamed table-cell face. --- lisp/ChangeLog | 6 ++++++ lisp/textmodes/table.el | 10 ++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0b7338f31fd..84cc6c6ee22 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,11 @@ 2005-06-10 Miles Bader + * textmodes/table.el (table-cell): Remove "-face" suffix from face + name. + (table-cell-face): New backward-compatibility alias for renamed face. + (table--put-cell-face-property, table--update-cell-face): + Use renamed table-cell face. + * textmodes/sgml-mode.el (sgml-namespace): Remove "-face" suffix from face name. (sgml-namespace-face): New backward-compatibility alias for diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el index 430a196166f..af13c2fe61c 100644 --- a/lisp/textmodes/table.el +++ b/lisp/textmodes/table.el @@ -682,7 +682,7 @@ height." :tag "Table Command Prefix" :group 'table) -(defface table-cell-face +(defface table-cell '((((min-colors 88) (class color)) (:foreground "gray90" :background "blue1")) (((class color)) @@ -691,6 +691,8 @@ height." "*Face used for table cell contents." :tag "Cell Face" :group 'table) +;; backward-compatibility alias +(put 'table-cell-face 'face-alias 'table-cell) (defcustom table-cell-horizontal-chars "-=" "*Characters that may be used for table cell's horizontal border line." @@ -5264,7 +5266,7 @@ and the right cell border character." (defun table--put-cell-face-property (beg end &optional object) "Put cell face property." - (put-text-property beg end 'face 'table-cell-face object)) + (put-text-property beg end 'face 'table-cell object)) (defun table--put-cell-keymap-property (beg end &optional object) "Put cell keymap property." @@ -5303,8 +5305,8 @@ instead of the current buffer and returns the OBJECT." (defun table--update-cell-face () "Update cell face according to the current mode." (if (featurep 'xemacs) - (set-face-property 'table-cell-face 'underline table-fixed-width-mode) - (set-face-inverse-video-p 'table-cell-face table-fixed-width-mode))) + (set-face-property 'table-cell 'underline table-fixed-width-mode) + (set-face-inverse-video-p 'table-cell table-fixed-width-mode))) (table--update-cell-face) -- cgit v1.2.1 From ad49d9d6ecd1884cd9567cc25fcb91354fe43a46 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 10 Jun 2005 10:45:56 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-392 Remove "-face" suffix from tex-mode faces 2005-06-10 Miles Bader * lisp/textmodes/tex-mode.el (tex-math, tex-verbatim): Remove "-face" suffix from face names. (tex-math-face, tex-verbatim-face): New backward-compatibility aliases for renamed faces. (tex-math-face, tex-verbatim-face): Use renamed tex-mode faces. (tex-insert-quote): Use `tex-verbatim-face' variable instead of literal face name. --- lisp/ChangeLog | 8 ++++++++ lisp/textmodes/tex-mode.el | 15 ++++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 84cc6c6ee22..0b13139e0ae 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,13 @@ 2005-06-10 Miles Bader + * textmodes/tex-mode.el (tex-math, tex-verbatim): Remove "-face" + suffix from face names. + (tex-math-face, tex-verbatim-face): + New backward-compatibility aliases for renamed faces. + (tex-math-face, tex-verbatim-face): Use renamed tex-mode faces. + (tex-insert-quote): Use `tex-verbatim-face' variable instead of + literal face name. + * textmodes/table.el (table-cell): Remove "-face" suffix from face name. (table-cell-face): New backward-compatibility alias for renamed face. diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index a715900b604..7d04464346a 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -650,17 +650,22 @@ An alternative value is \" . \", if you use a font with a narrow period." "Face used for subscripts." :group 'tex) -(defface tex-math-face +(defface tex-math '((t :inherit font-lock-string-face)) "Face used to highlight TeX math expressions." :group 'tex) -(defvar tex-math-face 'tex-math-face) -(defface tex-verbatim-face +;; backward-compatibility alias +(put 'tex-math-face 'face-alias 'tex-math) +(defvar tex-math-face 'tex-math) + +(defface tex-verbatim ;; '((t :inherit font-lock-string-face)) '((t :family "courier")) "Face used to highlight TeX verbatim environments." :group 'tex) -(defvar tex-verbatim-face 'tex-verbatim-face) +;; backward-compatibility alias +(put 'tex-verbatim-face 'face-alias 'tex-verbatim) +(defvar tex-verbatim-face 'tex-verbatim) ;; Use string syntax but math face for $...$. (defun tex-font-lock-syntactic-face-function (state) @@ -1101,7 +1106,7 @@ Inserts the value of `tex-open-quote' (normally ``) or `tex-close-quote' inserts \" characters." (interactive "*P") (if (or arg (memq (char-syntax (preceding-char)) '(?/ ?\\)) - (eq (get-text-property (point) 'face) 'tex-verbatim-face) + (eq (get-text-property (point) 'face) tex-verbatim-face) (save-excursion (backward-char (length tex-open-quote)) (when (or (looking-at (regexp-quote tex-open-quote)) -- cgit v1.2.1 From e639491a87bb04b6959b50a254ac450f9bf7b566 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 10 Jun 2005 10:46:19 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-393 Remove "-face" suffix from texinfo-heading face 2005-06-10 Miles Bader * lisp/textmodes/texinfo.el (texinfo-heading): Remove "-face" suffix from face name. (texinfo-heading-face): New backward-compatibility alias for renamed face. (texinfo-heading-face): Use renamed texinfo-heading face. --- lisp/ChangeLog | 6 ++++++ lisp/textmodes/texinfo.el | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0b13139e0ae..9845f5a13d8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,11 @@ 2005-06-10 Miles Bader + * textmodes/texinfo.el (texinfo-heading): Remove "-face" suffix + from face name. + (texinfo-heading-face): New backward-compatibility alias for + renamed face. + (texinfo-heading-face): Use renamed texinfo-heading face. + * textmodes/tex-mode.el (tex-math, tex-verbatim): Remove "-face" suffix from face names. (tex-math-face, tex-verbatim-face): diff --git a/lisp/textmodes/texinfo.el b/lisp/textmodes/texinfo.el index bd14c658379..2be01d630f9 100644 --- a/lisp/textmodes/texinfo.el +++ b/lisp/textmodes/texinfo.el @@ -1,7 +1,7 @@ ;;; texinfo.el --- major mode for editing Texinfo files ;; Copyright (C) 1985, 1988, 1989, 1990, 1991, 1992, 1993, 1996, 1997, -;; 2000, 2001, 2003, 2004 Free Software Foundation, Inc. +;; 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Robert J. Chassell ;; Date: [See date below for texinfo-version] @@ -343,11 +343,13 @@ chapter." "Regexp for environment-like Texinfo list commands. Subexpression 1 is what goes into the corresponding `@end' statement.") -(defface texinfo-heading-face +(defface texinfo-heading '((t (:inherit font-lock-function-name-face))) "Face used for section headings in `texinfo-mode'." :group 'texinfo) -(defvar texinfo-heading-face 'texinfo-heading-face) +;; backward-compatibility alias +(put 'texinfo-heading-face 'face-alias 'texinfo-heading) +(defvar texinfo-heading-face 'texinfo-heading) (defvar texinfo-font-lock-keywords `(;; All but the first had an OVERRIDE of t. -- cgit v1.2.1 From c43aed5aeb6fdd8f44027db021c65113a75df470 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 10 Jun 2005 10:46:38 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-394 Remove "-face" suffix from flyspell faces 2005-06-10 Miles Bader * lisp/textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Remove "-face" suffix from face names. (flyspell-incorrect-face, flyspell-duplicate-face): New backward-compatibility aliases for renamed faces. (flyspell-mode-on, make-flyspell-overlay) (flyspell-highlight-incorrect-region) (flyspell-highlight-duplicate-region) (flyspell-display-next-corrections) (flyspell-auto-correct-previous-word): Use renamed flyspell faces. --- lisp/ChangeLog | 10 ++++++++++ lisp/textmodes/flyspell.el | 23 +++++++++++++---------- 2 files changed, 23 insertions(+), 10 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9845f5a13d8..e64df8797c4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,15 @@ 2005-06-10 Miles Bader + * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): + Remove "-face" suffix from face names. + (flyspell-incorrect-face, flyspell-duplicate-face): + New backward-compatibility aliases for renamed faces. + (flyspell-mode-on, make-flyspell-overlay) + (flyspell-highlight-incorrect-region) + (flyspell-highlight-duplicate-region) + (flyspell-display-next-corrections) + (flyspell-auto-correct-previous-word): Use renamed flyspell faces. + * textmodes/texinfo.el (texinfo-heading): Remove "-face" suffix from face name. (texinfo-heading-face): New backward-compatibility alias for diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 0326510f75f..118e490112f 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -94,7 +94,7 @@ Non-nil means use highlight, nil means use minibuffer messages." "*The maximum distance for finding duplicates of unrecognized words. This applies to the feature that when a word is not found in the dictionary, if the same spelling occurs elsewhere in the buffer, -Flyspell uses a different face (`flyspell-duplicate-face') to highlight it. +Flyspell uses a different face (`flyspell-duplicate') to highlight it. This variable specifies how far to search to find such a duplicate. -1 means no limit (search the whole buffer). 0 means do not search for duplicate unrecognized spellings." @@ -444,18 +444,22 @@ property of the major mode name.") ;*---------------------------------------------------------------------*/ ;* Highlighting */ ;*---------------------------------------------------------------------*/ -(defface flyspell-incorrect-face +(defface flyspell-incorrect '((((class color)) (:foreground "OrangeRed" :bold t :underline t)) (t (:bold t))) "Face used for marking a misspelled word in Flyspell." :group 'flyspell) +;; backward-compatibility alias +(put 'flyspell-incorrect-face 'face-alias 'flyspell-incorrect) -(defface flyspell-duplicate-face +(defface flyspell-duplicate '((((class color)) (:foreground "Gold3" :bold t :underline t)) (t (:bold t))) "Face used for marking a misspelled word that appears twice in the buffer. See also `flyspell-duplicate-distance'." :group 'flyspell) +;; backward-compatibility alias +(put 'flyspell-duplicate-face 'face-alias 'flyspell-duplicate) (defvar flyspell-overlay nil) @@ -540,7 +544,7 @@ in your .emacs file. ;*---------------------------------------------------------------------*/ (defun flyspell-mode-on () "Turn Flyspell mode on. Do not use this; use `flyspell-mode' instead." - (setq ispell-highlight-face 'flyspell-incorrect-face) + (setq ispell-highlight-face 'flyspell-incorrect) ;; local dictionaries setup (or ispell-local-dictionary ispell-dictionary (if flyspell-default-dictionary @@ -1570,7 +1574,7 @@ for the overlay." (overlay-put flyspell-overlay flyspell-overlay-keymap-property-name flyspell-mouse-map)) - (when (eq face 'flyspell-incorrect-face) + (when (eq face 'flyspell-incorrect) (and (stringp flyspell-before-incorrect-word-string) (overlay-put flyspell-overlay 'before-string flyspell-before-incorrect-word-string)) @@ -1610,7 +1614,7 @@ for the overlay." ;; now we can use a new overlay (setq flyspell-overlay (make-flyspell-overlay - beg end 'flyspell-incorrect-face 'highlight))))))) + beg end 'flyspell-incorrect 'highlight))))))) ;*---------------------------------------------------------------------*/ ;* flyspell-highlight-duplicate-region ... */ @@ -1636,7 +1640,7 @@ for the overlay." ;; now we can use a new overlay (setq flyspell-overlay (make-flyspell-overlay beg end - 'flyspell-duplicate-face + 'flyspell-duplicate 'highlight))))))) ;*---------------------------------------------------------------------*/ @@ -1698,8 +1702,7 @@ misspelled words backwards." (let ((num (car pos))) (put-text-property num (+ num (length flyspell-auto-correct-word)) - 'face - 'flyspell-incorrect-face + 'face 'flyspell-incorrect string)) (setq pos (cdr pos))) (if (fboundp 'display-message) @@ -1876,7 +1879,7 @@ But don't look beyond what's visible on the screen." ;; check if its face has changed (not (eq (get-char-property (overlay-start new-overlay) 'face) - 'flyspell-incorrect-face)))) + 'flyspell-incorrect)))) (setq new-overlay (car-safe overlay-list)) (setq overlay-list (cdr-safe overlay-list))) -- cgit v1.2.1 From 313cdfa4ca0841ae303a2732ad159487408fc605 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Fri, 10 Jun 2005 10:58:59 +0000 Subject: (dun-mode): Use define-derived-mode. (dungeon-mode-map): Rename to dun-mode-map. Keep old name as an obsolete alias. --- lisp/play/dunnet.el | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'lisp') diff --git a/lisp/play/dunnet.el b/lisp/play/dunnet.el index 50b8bce5f74..290ee6ebf5d 100644 --- a/lisp/play/dunnet.el +++ b/lisp/play/dunnet.el @@ -53,15 +53,10 @@ ;;;; Mode definitions for interactive mode -(defun dun-mode () +(define-derived-mode dun-mode text-mode "Dungeon" "Major mode for running dunnet." - (interactive) - (text-mode) (make-local-variable 'scroll-step) - (setq scroll-step 2) - (use-local-map dungeon-mode-map) - (setq major-mode 'dun-mode) - (setq mode-name "Dungeon")) + (setq scroll-step 2)) (defun dun-parse (arg) "Function called when return is pressed in interactive mode to parse line." @@ -1366,9 +1361,8 @@ for a moment, then straighten yourself up. (setq dun-current-room 1) (setq dun-exitf nil) (setq dun-badcd nil) -(defvar dungeon-mode-map nil) -(setq dungeon-mode-map (make-sparse-keymap)) -(define-key dungeon-mode-map "\r" 'dun-parse) +(define-obsolete-variable-alias 'dungeon-mode-map 'dun-mode-map "22.1") +(define-key dun-mode-map "\r" 'dun-parse) (defvar dungeon-batch-map (make-keymap)) (if (string= (substring emacs-version 0 2) "18") (let (n) @@ -2594,7 +2588,7 @@ treasures for points?" "4" "four") (if dun-logged-in (progn (setq dungeon-mode 'unix) - (define-key dungeon-mode-map "\r" 'dun-unix-parse) + (define-key dun-mode-map "\r" 'dun-unix-parse) (dun-mprinc "$ ")))) (defun dun-login () @@ -2860,7 +2854,7 @@ drwxr-xr-x 3 root staff 2048 Jan 1 1970 ..") (defun dun-uexit (args) (setq dungeon-mode 'dungeon) (dun-mprincl "\nYou step back from the console.") - (define-key dungeon-mode-map "\r" 'dun-parse) + (define-key dun-mode-map "\r" 'dun-parse) (if (not dun-batch-mode) (dun-messages))) @@ -3059,7 +3053,7 @@ drwxr-xr-x 3 root staff 2048 Jan 1 1970 ..") (defun dun-dos-interface () (dun-dos-boot-msg) (setq dungeon-mode 'dos) - (define-key dungeon-mode-map "\r" 'dun-dos-parse) + (define-key dun-mode-map "\r" 'dun-dos-parse) (dun-dos-prompt)) (defun dun-dos-type (args) @@ -3117,7 +3111,7 @@ File not found"))) (defun dun-dos-exit (args) (setq dungeon-mode 'dungeon) (dun-mprincl "\nYou power down the machine and step back.") - (define-key dungeon-mode-map "\r" 'dun-parse) + (define-key dun-mode-map "\r" 'dun-parse) (if (not dun-batch-mode) (dun-messages))) -- cgit v1.2.1 From 257914aaabe89bb14c22b9430a21fbc8b5b05657 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Fri, 10 Jun 2005 11:00:43 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e64df8797c4..af8eab7fa12 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2005-06-10 Lute Kamstra + + * play/dunnet.el (dun-mode): Use define-derived-mode. + (dungeon-mode-map): Rename to dun-mode-map. Keep old name as an + obsolete alias. + 2005-06-10 Miles Bader * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): -- cgit v1.2.1 From 616e8e5f5e21ba5024a38621f42f8d3467a24785 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 11:05:52 +0000 Subject: (ido-mode, ido-file-extensions-order, ido-default-file-method, ido-default-buffer-method, ido-max-prospects, ido-slow-ftp-hosts, ido-setup-hook, ido-decorations, ido-read-file-name-as-directory-commands, ido-read-file-name-non-ido, ido-work-directory-list, ido-ignore-item-temp-list, ido-current-directory, ido-magic-forward-char, ido-enter-find-file, ido-enter-switch-buffer, ido-visit-buffer, ido-switch-buffer, ido-find-file, ido-read-buffer): Fix typos in docstrings. --- lisp/ido.el | 60 ++++++++++++++++++++++++++++++------------------------------ 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'lisp') diff --git a/lisp/ido.el b/lisp/ido.el index 4ac9546de64..012be3da37f 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -345,7 +345,7 @@ ;;;###autoload (defcustom ido-mode nil "Determines for which functional group \(buffer and files) ido behavior -should be enabled. The following values are possible: +should be enabled. The following values are possible: - `buffer': Turn only on ido buffer behavior \(switching, killing, displaying...) - `file': Turn only on ido file behavior \(finding, writing, inserting...) @@ -414,7 +414,7 @@ This allows the current directory to be opened immediate with `dired'." "*List of file extensions specifying preferred order of file selections. Each element is either a string with `.' as the first char, an empty string matching files without extension, or t which is the default order -of for files with an unlisted file extension." +for files with an unlisted file extension." :type '(repeat (choice string (const :tag "Default order" t))) :group 'ido) @@ -453,9 +453,9 @@ Possible values: `otherframe' Show new file in another frame `maybe-frame' If a file is visible in another frame, prompt to ask if you you want to see the file in the same window of the current - frame or in the other frame. + frame or in the other frame `always-frame' If a file is visible in another frame, raise that - frame. Otherwise, visit the file in the same window." + frame; otherwise, visit the file in the same window" :type '(choice (const samewindow) (const otherwindow) (const display) @@ -466,7 +466,7 @@ Possible values: (defcustom ido-default-buffer-method 'always-frame "*How to switch to new buffer when using `ido-switch-buffer'. -See ido-default-file-method for details." +See `ido-default-file-method' for details." :type '(choice (const samewindow) (const otherwindow) (const display) @@ -530,7 +530,7 @@ Note that the non-ido equivalent command is recorded." (defcustom ido-max-prospects 12 "*Non-zero means that the prospect list will be limited to than number of items. For a long list of prospects, building the full list for the minibuffer can take a -non-negletable amount of time; setting this variable reduces that time." +non-negligible amount of time; setting this variable reduces that time." :type 'integer :group 'ido) @@ -615,7 +615,7 @@ If zero, ftp directories are not cached." (defcustom ido-slow-ftp-hosts nil "*List of slow ftp hosts where ido prompting should not be used. If an ftp host is on this list, ido automatically switches to the non-ido -equivalent function, e.g. find-file rather than ido-find-file." +equivalent function, e.g. `find-file' rather than `ido-find-file'." :type '(repeat string) :group 'ido) @@ -706,7 +706,7 @@ ask user whether to create buffer, or 'never to never create new buffer." :group 'ido) (defcustom ido-setup-hook nil - "*Hook run after the ido variables and keymap has been setup. + "*Hook run after the ido variables and keymap have been setup. The dynamic variable `ido-cur-item' contains the current type of item that is read by ido, possible values are file, dir, buffer, and list. Additional keys can be defined in `ido-mode-map'." @@ -727,9 +727,9 @@ There are 10 elements in this list: 4th element is the string inserted at the end of a truncated list of prospects, 5th and 6th elements are used as brackets around the common match string which can be completed using TAB, -7th element is the string displayed when there are a no matches, and -8th element is displayed if there is a single match (and faces are not used). -9th element is displayed when the current directory is non-readable. +7th element is the string displayed when there are no matches, and +8th element is displayed if there is a single match (and faces are not used), +9th element is displayed when the current directory is non-readable, 10th element is displayed when directory exceeds `ido-max-directory-size'." :type '(repeat string) :group 'ido) @@ -864,14 +864,14 @@ Must be set before enabling ido mode." (defcustom ido-read-file-name-as-directory-commands '() "List of commands which uses read-file-name to read a directory name. When `ido-everywhere' is non-nil, the commands in this list will read -the directory using ido-read-directory-name." +the directory using `ido-read-directory-name'." :type '(repeat symbol) :group 'ido) (defcustom ido-read-file-name-non-ido '() "List of commands which shall not read file names the ido way. When `ido-everywhere' is non-nil, the commands in this list will read -the file name using normal read-file-name style." +the file name using normal `read-file-name' style." :type '(repeat symbol) :group 'ido) @@ -895,7 +895,7 @@ See `ido-enable-last-directory-history' for details.") (defvar ido-work-directory-list nil "List of actual working directory names. The current directory is inserted at the front of this list whenever a -file is opened with ido-find-file and family.") +file is opened with `ido-find-file' and family.") (defvar ido-work-file-list nil "List of actual work file names. @@ -909,7 +909,7 @@ Each element in the list is of the form (DIR (MTIME) FILE...).") (defvar ido-ignore-item-temp-list nil "List of items to ignore in current ido invocation. -Intended to be let-bound by functions which calls ido repeatedly. +Intended to be let-bound by functions which call ido repeatedly. Should never be set permanently.") ;; Temporary storage @@ -949,7 +949,7 @@ If equal to `takeprompt', we use the prompt as the file name to be selected.") (defvar ido-current-directory nil - "Current directory for ido-find-file.") + "Current directory for `ido-find-file'.") (defvar ido-auto-merge-timer nil "Delay timer for auto merge.") @@ -2271,7 +2271,7 @@ If no merge has yet taken place, toggle automatic merging option." (defun ido-magic-forward-char () "Move forward in user input or perform magic action. -If no user input is present or at end of input, perform magic actions: +If no user input is present, or at end of input, perform magic actions: C-x C-b ... C-f switch to ido-find-file. C-x C-f ... C-f fallback to non-ido find-file. C-x C-d ... C-f fallback to non-ido brief dired. @@ -2414,13 +2414,13 @@ If no buffer or file exactly matching the prompt exists, maybe create a new one. (exit-minibuffer)) (defun ido-enter-find-file () - "Drop into find-file from buffer switching." + "Drop into `find-file' from buffer switching." (interactive) (setq ido-exit 'find-file) (exit-minibuffer)) (defun ido-enter-switch-buffer () - "Drop into ido-switch-buffer from file switching." + "Drop into `ido-switch-buffer' from file switching." (interactive) (setq ido-exit 'switch-to-buffer) (exit-minibuffer)) @@ -3016,7 +3016,7 @@ for first matching file." (defun ido-make-buffer-list (default) ;; Return the current list of buffers. ;; Currently visible buffers are put at the end of the list. - ;; The hook `ido-make-buflist-hook' is run after the list has been + ;; The hook `ido-make-buffer-list-hook' is run after the list has been ;; created to allow the user to further modify the order of the buffer names ;; in this list. If DEFAULT is non-nil, and corresponds to an existing buffer, ;; it is put to the start of the list. @@ -3496,7 +3496,7 @@ for first matching file." ;;; VISIT CHOSEN BUFFER (defun ido-visit-buffer (buffer method &optional record) "Visit file named FILE according to METHOD. -Record command in command-history if optional RECORD is non-nil." +Record command in `command-history' if optional RECORD is non-nil." (let (win newframe) (cond @@ -3569,9 +3569,9 @@ in another frame. As you type in a string, all of the buffers matching the string are displayed if substring-matching is used \(default). Look at -`ido-enable-prefix' and `ido-toggle-prefix'. When you have found the -buffer you want, it can then be selected. As you type, most keys have their -normal keybindings, except for the following: \\ +`ido-enable-prefix' and `ido-toggle-prefix'. When you have found the +buffer you want, it can then be selected. As you type, most keys have +their normal keybindings, except for the following: \\ RET Select the buffer at the front of the list of matches. If the list is empty, possibly prompt to create new buffer. @@ -3654,11 +3654,11 @@ The file is displayed according to `ido-default-file-method' -- the default is to show it in the same window, unless it is already visible in another frame. -The file name is selected interactively by typing a substring. As you type -in a string, all of the filenames matching the string are displayed if -substring-matching is used \(default). Look at `ido-enable-prefix' and -`ido-toggle-prefix'. When you have found the filename you want, it can -then be selected. As you type, most keys have their normal keybindings, +The file name is selected interactively by typing a substring. As you +type in a string, all of the filenames matching the string are displayed +if substring-matching is used \(default). Look at `ido-enable-prefix' and +`ido-toggle-prefix'. When you have found the filename you want, it can +then be selected. As you type, most keys have their normal keybindings, except for the following: \\ RET Select the file at the front of the list of matches. If the @@ -4171,7 +4171,7 @@ For details of keybindings, do `\\[describe-function] ido-find-file'." Return the name of a buffer selected. PROMPT is the prompt to give to the user. DEFAULT if given is the default buffer to be selected, which will go to the front of the list. -If REQUIRE-MATCH is non-nil, an existing-buffer must be selected." +If REQUIRE-MATCH is non-nil, an existing buffer must be selected." (let* ((ido-current-directory nil) (ido-directory-nonreadable nil) (ido-directory-too-big nil) -- cgit v1.2.1 From 83acf23151bb3d0f878425bb7ee1245cc2802d2d Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 11:20:55 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index af8eab7fa12..bed4c9873d5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,15 @@ +2005-06-10 Juanma Barranquero + + * ido.el (ido-mode, ido-file-extensions-order) + (ido-default-file-method, ido-default-buffer-method) + (ido-max-prospects, ido-slow-ftp-hosts, ido-setup-hook) + (ido-decorations, ido-read-file-name-as-directory-commands) + (ido-read-file-name-non-ido, ido-work-directory-list) + (ido-ignore-item-temp-list, ido-current-directory) + (ido-magic-forward-char, ido-enter-find-file) + (ido-enter-switch-buffer, ido-visit-buffer, ido-switch-buffer) + (ido-find-file, ido-read-buffer): Fix typos in docstrings. + 2005-06-10 Lute Kamstra * play/dunnet.el (dun-mode): Use define-derived-mode. @@ -24,7 +36,7 @@ * textmodes/tex-mode.el (tex-math, tex-verbatim): Remove "-face" suffix from face names. - (tex-math-face, tex-verbatim-face): + (tex-math-face, tex-verbatim-face): New backward-compatibility aliases for renamed faces. (tex-math-face, tex-verbatim-face): Use renamed tex-mode faces. (tex-insert-quote): Use `tex-verbatim-face' variable instead of @@ -106,7 +118,7 @@ (cvs-header-face, cvs-filename-face, cvs-unknown-face) (cvs-handled-face, cvs-need-action-face, cvs-marked-face) (cvs-msg-face): New backward-compatibility aliases for renamed faces. - (cvs-fi-up-to-date-face, cvs-fi-unknown-face, cvs-fileinfo-pp): + (cvs-fi-up-to-date-face, cvs-fi-unknown-face, cvs-fileinfo-pp): Use renamed pcvs faces. * pcvs.el (cvs-mode-find-file): Use renamed pcvs faces. * pcvs-defs.el (cvs-mode-map): Likewise. @@ -137,20 +149,20 @@ * smerge-mode.el (smerge-mine, smerge-other, smerge-base) (smerge-markers): Remove "-face" suffix from face names. (smerge-mine-face, smerge-other-face, smerge-base-face) - (smerge-markers-face): + (smerge-markers-face): New backward-compatibility aliases for renamed faces. (smerge-mine-face, smerge-other-face, smerge-base-face) (smerge-markers-face): Use renamed smerge faces. - * log-view.el (log-view-file, log-view-message): + * log-view.el (log-view-file, log-view-message): Remove "-face" suffix from face names. - (log-view-file-face, log-view-message-face): + (log-view-file-face, log-view-message-face): New backward-compatibility aliases for renamed faces. (log-view-file-face, log-view-message-face): Use renamed log-view faces. - * paren.el (show-paren-match, show-paren-mismatch): + * paren.el (show-paren-match, show-paren-mismatch): Remove "-face" suffix from face names. - (show-paren-match-face, show-paren-mismatch-face): + (show-paren-match-face, show-paren-mismatch-face): New backward-compatibility aliases for renamed faces. (show-paren-function): Use renamed show-paren faces. @@ -158,13 +170,13 @@ (ruler-mode-margins, ruler-mode-fringes) (ruler-mode-column-number, ruler-mode-fill-column) (ruler-mode-comment-column, ruler-mode-goal-column) - (ruler-mode-tab-stop, ruler-mode-current-column): + (ruler-mode-tab-stop, ruler-mode-current-column): Remove "-face" suffix from face names. (ruler-mode-default-face, ruler-mode-pad-face) (ruler-mode-margins-face, ruler-mode-fringes-face) (ruler-mode-column-number-face, ruler-mode-fill-column-face) (ruler-mode-comment-column-face, ruler-mode-goal-column-face) - (ruler-mode-tab-stop-face, ruler-mode-current-column-face): + (ruler-mode-tab-stop-face, ruler-mode-current-column-face): New backward-compatibility aliases for renamed faces. (ruler-mode-pad, ruler-mode-margins, ruler-mode-fringes) (ruler-mode-column-number, ruler-mode-fill-column) @@ -210,7 +222,7 @@ * progmodes/compile.el (compilation-warning-face) (compilation-info-face): Remove "-face" suffix from face names. - (compilation-warning-face, compilation-info-face): + (compilation-warning-face, compilation-info-face): New backward-compatibility aliases for renamed faces. (compilation-warning-face, compilation-info-face): Use renamed compilation faces. @@ -222,7 +234,7 @@ (change-log-date-face, change-log-name-face) (change-log-email-face, change-log-file-face) (change-log-list-face, change-log-conditionals-face) - (change-log-function-face, change-log-acknowledgement-face): + (change-log-function-face, change-log-acknowledgement-face): New backward-compatibility aliases for renamed faces. (change-log-font-lock-keywords): Use renamed change-log faces. @@ -241,7 +253,7 @@ (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) - (custom-group-tag-face): + (custom-group-tag-face): New backward-compatibility aliases for renamed faces. * wid-edit.el (widget-documentation, widget-button) -- cgit v1.2.1 From 62d39a4265652ceaa0829bae8f49d63d00607264 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 10 Jun 2005 11:38:11 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-397 Remove "-face" suffix from gomoku faces 2005-06-10 Miles Bader * lisp/play/gomoku.el (gomoku-O, gomoku-X): Remove "-face" suffix from face names. (gomoku-font-lock-O-face, gomoku-font-lock-X-face): New backward-compatibility aliases for renamed faces. (gomoku-font-lock-keywords): Use renamed gomoku faces. --- lisp/ChangeLog | 8 ++++++++ lisp/play/gomoku.el | 18 ++++++++++-------- 2 files changed, 18 insertions(+), 8 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bed4c9873d5..a49107c8802 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2005-06-10 Miles Bader + + * play/gomoku.el (gomoku-O, gomoku-X): + Remove "-face" suffix from face names. + (gomoku-font-lock-O-face, gomoku-font-lock-X-face): + New backward-compatibility aliases for renamed faces. + (gomoku-font-lock-keywords): Use renamed gomoku faces. + 2005-06-10 Juanma Barranquero * ido.el (ido-mode, ido-file-extensions-order) diff --git a/lisp/play/gomoku.el b/lisp/play/gomoku.el index 69ec07496d5..611c095fbd1 100644 --- a/lisp/play/gomoku.el +++ b/lisp/play/gomoku.el @@ -1,6 +1,6 @@ ;;; gomoku.el --- Gomoku game between you and Emacs -;; Copyright (C) 1988, 1994, 1996, 2001, 2003 Free Software Foundation, Inc. +;; Copyright (C) 1988, 1994, 1996, 2001, 2003, 2005 Free Software Foundation, Inc. ;; Author: Philippe Schnoebelen ;; Maintainer: FSF @@ -160,22 +160,24 @@ One useful value to include is `turn-on-font-lock' to highlight the pieces." (defvar gomoku-emacs-won () "For making font-lock use the winner's face for the line.") -(defface gomoku-font-lock-O-face +(defface gomoku-O '((((class color)) (:foreground "red" :weight bold))) "Face to use for Emacs' O." :group 'gomoku) +;; backward-compatibility alias +(put 'gomoku-font-lock-O-face 'face-alias 'gomoku-O) -(defface gomoku-font-lock-X-face +(defface gomoku-X '((((class color)) (:foreground "green" :weight bold))) "Face to use for your X." :group 'gomoku) +;; backward-compatibility alias +(put 'gomoku-font-lock-X-face 'face-alias 'gomoku-X) (defvar gomoku-font-lock-keywords - '(("O" . 'gomoku-font-lock-O-face) - ("X" . 'gomoku-font-lock-X-face) - ("[-|/\\]" 0 (if gomoku-emacs-won - 'gomoku-font-lock-O-face - 'gomoku-font-lock-X-face))) + '(("O" . 'gomoku-O) + ("X" . 'gomoku-X) + ("[-|/\\]" 0 (if gomoku-emacs-won 'gomoku-O 'gomoku-X))) "*Font lock rules for Gomoku.") (put 'gomoku-mode 'front-sticky -- cgit v1.2.1 From 530b0472e7bf440ac24be3758e975764be851b04 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 10 Jun 2005 11:38:27 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-398 Remove "-face" suffix from mpuz faces 2005-06-10 Miles Bader * lisp/play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): Remove "-face" suffix from face names. (mpuz-unsolved-face, mpuz-solved-face, mpuz-trivial-face) (mpuz-text-face): New backward-compatibility aliases for renamed faces. (mpuz-create-buffer, mpuz-paint-digit): Use renamed mpuz faces. --- lisp/ChangeLog | 6 ++++++ lisp/play/mpuz.el | 24 ++++++++++++++++-------- 2 files changed, 22 insertions(+), 8 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a49107c8802..46a830238a5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,11 @@ 2005-06-10 Miles Bader + * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) + (mpuz-text): Remove "-face" suffix from face names. + (mpuz-unsolved-face, mpuz-solved-face, mpuz-trivial-face) + (mpuz-text-face): New backward-compatibility aliases for renamed faces. + (mpuz-create-buffer, mpuz-paint-digit): Use renamed mpuz faces. + * play/gomoku.el (gomoku-O, gomoku-X): Remove "-face" suffix from face names. (gomoku-font-lock-O-face, gomoku-font-lock-X-face): diff --git a/lisp/play/mpuz.el b/lisp/play/mpuz.el index 849e87a28b0..e354da6a04b 100644 --- a/lisp/play/mpuz.el +++ b/lisp/play/mpuz.el @@ -57,28 +57,36 @@ t means never ding, and `error' means only ding on wrong input." :type 'boolean :group 'mpuz) -(defface mpuz-unsolved-face +(defface mpuz-unsolved '((((class color)) (:foreground "red1" :bold t)) (t (:bold t))) "*Face to use for letters to be solved." :group 'mpuz) +;; backward-compatibility alias +(put 'mpuz-unsolved-face 'face-alias 'mpuz-unsolved) -(defface mpuz-solved-face +(defface mpuz-solved '((((class color)) (:foreground "green1" :bold t)) (t (:bold t))) "*Face to use for solved digits." :group 'mpuz) +;; backward-compatibility alias +(put 'mpuz-solved-face 'face-alias 'mpuz-solved) -(defface mpuz-trivial-face +(defface mpuz-trivial '((((class color)) (:foreground "blue" :bold t)) (t (:bold t))) "*Face to use for trivial digits solved for you." :group 'mpuz) +;; backward-compatibility alias +(put 'mpuz-trivial-face 'face-alias 'mpuz-trivial) -(defface mpuz-text-face +(defface mpuz-text '((t (:inherit variable-pitch))) "*Face to use for text on right." :group 'mpuz) +;; backward-compatibility alias +(put 'mpuz-text-face 'face-alias 'mpuz-text) ;; Mpuz mode and keymaps @@ -296,7 +304,7 @@ You may abort a game by typing \\\\[mpuz-offer-abort]." (defun mpuz-create-buffer () "Create (or recreate) the puzzle buffer. Return it." (let ((buf (get-buffer-create "*Mult Puzzle*")) - (face '(face mpuz-text-face)) + (face '(face mpuz-text)) buffer-read-only) (save-excursion (set-buffer buf) @@ -347,9 +355,9 @@ You may abort a game by typing \\\\[mpuz-offer-abort]." (+ digit ?0) (+ (mpuz-to-letter digit) ?A))) (face `(face - ,(cond ((aref mpuz-trivial-digits digit) 'mpuz-trivial-face) - ((aref mpuz-found-digits digit) 'mpuz-solved-face) - ('mpuz-unsolved-face)))) + ,(cond ((aref mpuz-trivial-digits digit) 'mpuz-trivial) + ((aref mpuz-found-digits digit) 'mpuz-solved) + ('mpuz-unsolved)))) buffer-read-only) (mapc (lambda (square) (goto-line (car square)) ; line before column! -- cgit v1.2.1 From 09e9987080371fbab84d6fdca5e5c38ef1b590ba Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Fri, 10 Jun 2005 12:03:06 +0000 Subject: (blackbox-mode): Use run-mode-hooks. --- lisp/play/blackbox.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lisp') diff --git a/lisp/play/blackbox.el b/lisp/play/blackbox.el index 6fad15b8155..02f8cb5eeb0 100644 --- a/lisp/play/blackbox.el +++ b/lisp/play/blackbox.el @@ -117,14 +117,14 @@ The usual mnemonic keys move the cursor around the box. \\\\[bb-bol] and \\[bb-eol] move to the beginning and end of line, respectively. \\[bb-romp] -- send in a ray from point, or toggle a ball at point -\\[bb-done] -- end game and get score -" +\\[bb-done] -- end game and get score" (interactive) (kill-all-local-variables) (use-local-map blackbox-mode-map) (setq truncate-lines t) (setq major-mode 'blackbox-mode) - (setq mode-name "Blackbox")) + (setq mode-name "Blackbox") + (run-mode-hooks 'blackbox-mode-hook)) ;;;###autoload (defun blackbox (num) -- cgit v1.2.1 From 2aa8e74af09da63f7e702bc342d4350ba81ff0ab Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Fri, 10 Jun 2005 12:06:05 +0000 Subject: (doctor-mode-map): Remove defvar. (doctor-mode): Use define-derived-mode. --- lisp/ChangeLog | 5 +++++ lisp/play/doctor.el | 17 ++++------------- 2 files changed, 9 insertions(+), 13 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 46a830238a5..689c3c4e936 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -30,6 +30,11 @@ (dungeon-mode-map): Rename to dun-mode-map. Keep old name as an obsolete alias. + * play/doctor.el (doctor-mode-map): Remove defvar. + (doctor-mode): Use define-derived-mode. + + * play/blackbox.el (blackbox-mode): Use run-mode-hooks. + 2005-06-10 Miles Bader * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): diff --git a/lisp/play/doctor.el b/lisp/play/doctor.el index 798abbc790a..7b81daa7782 100644 --- a/lisp/play/doctor.el +++ b/lisp/play/doctor.el @@ -59,30 +59,21 @@ (set what ww) first)) -(defvar doctor-mode-map nil) -(if doctor-mode-map - nil - (setq doctor-mode-map (make-sparse-keymap)) - (define-key doctor-mode-map "\n" 'doctor-read-print) - (define-key doctor-mode-map "\r" 'doctor-ret-or-read)) - -(defun doctor-mode () +(define-derived-mode doctor-mode text-mode "Doctor" "Major mode for running the Doctor (Eliza) program. Like Text mode with Auto Fill mode except that RET when point is after a newline, or LFD at any time, reads the sentence before point, and prints the Doctor's answer." - (interactive) - (text-mode) (make-doctor-variables) - (use-local-map doctor-mode-map) - (setq major-mode 'doctor-mode) - (setq mode-name "Doctor") (turn-on-auto-fill) (doctor-type '(i am the psychotherapist \. (doc$ please) (doc$ describe) your (doc$ problems) \. each time you are finished talking, type \R\E\T twice \.)) (insert "\n")) +(define-key doctor-mode-map "\n" 'doctor-read-print) +(define-key doctor-mode-map "\r" 'doctor-ret-or-read) + (defun make-doctor-variables () (make-local-variable 'typos) (setq typos -- cgit v1.2.1 From a946a4b472227ff52c4c77e479a3301b1e6969eb Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Fri, 10 Jun 2005 12:43:58 +0000 Subject: (mspools-mode): Use run-mode-hooks. --- lisp/mail/mspools.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/mail/mspools.el b/lisp/mail/mspools.el index 8dc165dcc5e..fc60a3a56eb 100644 --- a/lisp/mail/mspools.el +++ b/lisp/mail/mspools.el @@ -357,7 +357,7 @@ nil." (use-local-map mspools-mode-map) (setq major-mode 'mspools-mode) (setq mode-name "MSpools") - ) + (run-mode-hooks 'mspools-mode-hook)) (defun mspools-get-spool-files () "Find the list of spool files and display them in *spools* buffer." -- cgit v1.2.1 From 7bdd8beba6ae2debc950d824b55db09bd2325a56 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Fri, 10 Jun 2005 12:47:38 +0000 Subject: (eudc-hotlist-mode): Use run-mode-hooks. --- lisp/ChangeLog | 2 ++ lisp/net/eudc-hotlist.el | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 689c3c4e936..e2745296ca4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -33,6 +33,8 @@ * play/doctor.el (doctor-mode-map): Remove defvar. (doctor-mode): Use define-derived-mode. + * mail/mspools.el (mspools-mode): + * net/eudc-hotlist.el (eudc-hotlist-mode): * play/blackbox.el (blackbox-mode): Use run-mode-hooks. 2005-06-10 Miles Bader diff --git a/lisp/net/eudc-hotlist.el b/lisp/net/eudc-hotlist.el index 9dc81ce2bc9..bede338b364 100644 --- a/lisp/net/eudc-hotlist.el +++ b/lisp/net/eudc-hotlist.el @@ -56,7 +56,8 @@ These are the special commands of this mode: (featurep 'menubar)) (set-buffer-menubar current-menubar) (add-submenu nil (cons "EUDC-Hotlist" (cdr (cdr eudc-hotlist-menu))))) - (setq buffer-read-only t)) + (setq buffer-read-only t) + (run-mode-hooks 'eudc-hotlist-mode-hook)) ;;;###autoload (defun eudc-edit-hotlist () -- cgit v1.2.1 From eb88139e25d8dc0828937567e6dca9b832b81f9f Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 13:19:09 +0000 Subject: (url-cookie-multiple-line): Fix spelling in docstring. --- lisp/url/url-cookie.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el index 328e60b63bc..7cee222c373 100644 --- a/lisp/url/url-cookie.el +++ b/lisp/url/url-cookie.el @@ -73,7 +73,7 @@ (defvar url-cookie-storage nil "Where cookies are stored.") (defvar url-cookie-secure-storage nil "Where secure cookies are stored.") -(defcustom url-cookie-file nil "*Where cookies are stored on disk." +(defcustom url-cookie-file nil "*Where cookies are stored on disk." :type '(choice (const :tag "Default" :value nil) file) :group 'url-file :group 'url-cookie) @@ -86,7 +86,7 @@ (defcustom url-cookie-multiple-line nil "*If nil, HTTP requests put all cookies for the server on one line. Some web servers, such as http://www.hotmail.com/, only accept cookies -when they are on one line. This is broken behaviour, but just try +when they are on one line. This is broken behavior, but just try telling Microsoft that." :type 'boolean :group 'url-cookie) -- cgit v1.2.1 From 29a82d4c3e91a5027dd695dbb101579c7c086e77 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 14:01:47 +0000 Subject: (minibuffer): Fix spellings in docstrings. --- lisp/cus-edit.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 6f5afa9bacd..d2f89efb7f5 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -417,7 +417,7 @@ :group 'development) (defgroup minibuffer nil - "Controling the behaviour of the minibuffer." + "Controling the behavior of the minibuffer." :link '(custom-manual "(emacs)Minibuffer") :group 'environment) @@ -2187,7 +2187,7 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"." (:foreground "blue1" :weight bold :height 1.2 :inherit variable-pitch)) (((class color) (background light)) - (:foreground "blue" :weight bold :height 1.2 :inherit variable-pitch)) + (:foreground "blue" :weight bold :height 1.2 :inherit variable-pitch)) (t (:weight bold))) "Face used for unpushable variable tags." :group 'custom-faces) -- cgit v1.2.1 From 643c985df4d3f099ce547bbf10b91cd19391edf4 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 14:02:21 +0000 Subject: (make-backup-file-name-function): Fix spellings in docstrings. --- lisp/files.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/files.el b/lisp/files.el index b8ec5bf1cd0..d3764c47a80 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2854,7 +2854,7 @@ the value is \"\"." (defcustom make-backup-file-name-function nil "A function to use instead of the default `make-backup-file-name'. -A value of nil gives the default `make-backup-file-name' behaviour. +A value of nil gives the default `make-backup-file-name' behavior. This could be buffer-local to do something special for specific files. If you define it, you may need to change `backup-file-name-p' -- cgit v1.2.1 From 4f955a15c5870ce75f14e7152fb3db052120a944 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 14:02:49 +0000 Subject: (filesets-external-viewers): Fix spellings in docstrings. --- lisp/filesets.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/filesets.el b/lisp/filesets.el index 7bbf55d9823..569207e27c5 100644 --- a/lisp/filesets.el +++ b/lisp/filesets.el @@ -650,8 +650,8 @@ the filename." Has the form ((FILE-PATTERN VIEWER PROPERTIES) ...), VIEWER being either a function or a command name as string. -Properties is an association list determining filesets' behaviour in -several conditions. Choose one from this list: +Properties is an association list determining filesets' behavior in +several conditions. Choose one from this list: :ignore-on-open-all ... Don't open files of this type automatically -- i.e. on open-all-files-events or when running commands -- cgit v1.2.1 From 85fcb67105916af00f2bf3c8aed6aceb005767ab Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 14:03:52 +0000 Subject: (highlight-changes-colours highlight-changes-face-list, highlight-changes-rotate-faces): Fix spellings in docstrings. --- lisp/hilit-chg.el | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'lisp') diff --git a/lisp/hilit-chg.el b/lisp/hilit-chg.el index 4e9fbeb53f6..11898c13f00 100644 --- a/lisp/hilit-chg.el +++ b/lisp/hilit-chg.el @@ -241,13 +241,13 @@ '( "magenta" "blue" "darkgreen" "chocolate" "sienna4" "NavyBlue") ;; defaults for dark background: '("yellow" "magenta" "blue" "maroon" "firebrick" "green4" "DarkOrchid")) - "*Colours used by `highlight-changes-rotate-faces'. + "*Colors used by `highlight-changes-rotate-faces'. The newest rotated change will be displayed in the first element of this list, the next older will be in the second element etc. This list is used if `highlight-changes-face-list' is nil, otherwise that variable overrides this list. If you only care about foreground -colours then use this, if you want fancier faces then set +colors then use this, if you want fancier faces then set `highlight-changes-face-list'." :type '(repeat color) :group 'highlight-changes) @@ -383,7 +383,7 @@ remove it from existing buffers." Normally the variable is initialized to nil and the list is created from `highlight-changes-colours' when needed. However, you can set this variable to any list of faces. You will have to do this if you want faces which -don't just differ from the `highlight-changes' face by the foreground colour. +don't just differ from the `highlight-changes' face by the foreground color. Otherwise, this list will be constructed when needed from `highlight-changes-colours'." :type '(choice @@ -778,7 +778,7 @@ of `highlight-changes-face-list', one level older changes are shown in face described by the second element, and so on. Very old changes remain shown in the last face in the list. -You can automatically rotate colours when the buffer is saved +You can automatically rotate colors when the buffer is saved by adding the following to `local-write-file-hooks', by evaling it in the buffer to be saved): @@ -846,7 +846,7 @@ is non-nil." (setq change-a (car change-info)) (setq change-b (car (cdr change-info))) - + (hilit-chg-make-list) (while change-a (setq a-start (nth 0 (car change-a))) @@ -890,11 +890,11 @@ If a buffer is read-only, differences will be highlighted but no property changes are made, so \\[highlight-changes-next-change] and \\[highlight-changes-previous-change] will not work." (interactive - (list + (list (get-buffer (read-buffer "buffer-a " (current-buffer) t)) (get-buffer (read-buffer "buffer-b " - (window-buffer (next-window (selected-window))) t)))) + (window-buffer (next-window (selected-window))) t)))) (let ((file-a (buffer-file-name buf-a)) (file-b (buffer-file-name buf-b))) (highlight-markup-buffers buf-a file-a buf-b file-b) @@ -921,10 +921,10 @@ changes are made, so \\[highlight-changes-next-change] and nil ;; default 'yes ;; must exist (let ((f (buffer-file-name (current-buffer)))) - (if f + (if f (progn (setq f (make-backup-file-name f)) - (or (file-exists-p f) + (or (file-exists-p f) (setq f nil))) ) f)))) -- cgit v1.2.1 From 291cfc0c5accf8587be4591f1e910de063607916 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 14:04:24 +0000 Subject: (ielm-dynamic-return, inferior-emacs-lisp-mode): Fix spellings in docstrings. --- lisp/ielm.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/ielm.el b/lisp/ielm.el index 5a91361f2d2..727face3695 100644 --- a/lisp/ielm.el +++ b/lisp/ielm.el @@ -102,7 +102,7 @@ prevent a running IELM process from being messed up when the user customizes `ielm-prompt'.") (defcustom ielm-dynamic-return t - "*Controls whether \\\\[ielm-return] has intelligent behaviour in IELM. + "*Controls whether \\\\[ielm-return] has intelligent behavior in IELM. If non-nil, \\[ielm-return] evaluates input for complete sexps, or inserts a newline and indents for incomplete sexps. If nil, always inserts newlines." :type 'boolean @@ -468,7 +468,7 @@ buffer, then the values in the working buffer are used. The variables Expressions evaluated by IELM are not subject to `debug-on-quit' or `debug-on-error'. -The behaviour of IELM may be customized with the following variables: +The behavior of IELM may be customized with the following variables: * To stop beeping on error, set `ielm-noisy' to nil. * If you don't like the prompt, you can change it by setting `ielm-prompt'. * If you do not like that the prompt is (by default) read-only, set -- cgit v1.2.1 From 480ef9bbde9e50e5623bcc05079bf51173df2dbb Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 14:04:52 +0000 Subject: (kmacro-call-macro): Fix spellings in docstrings. --- lisp/kmacro.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/kmacro.el b/lisp/kmacro.el index 7224786c50d..6aaa8c8f224 100644 --- a/lisp/kmacro.el +++ b/lisp/kmacro.el @@ -631,7 +631,7 @@ A prefix argument serves as a repeat count. Zero means repeat until error. When you call the macro, you can call the macro again by repeating just the last key in the key sequence that you used to call this command. See `kmacro-call-repeat-key' and `kmacro-call-repeat-with-arg' -for details on how to adjust or disable this behaviour. +for details on how to adjust or disable this behavior. To make a macro permanent so you can call it even after defining others, use \\[kmacro-name-last-macro]." -- cgit v1.2.1 From 5ab405e407ba80312512f15972700463bb9fb3b5 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 14:05:27 +0000 Subject: (log-edit-changelog-full-paragraphs): Fix spellings in docstrings. --- lisp/log-edit.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/log-edit.el b/lisp/log-edit.el index 09116e0584f..0d84ecd0504 100644 --- a/lisp/log-edit.el +++ b/lisp/log-edit.el @@ -154,12 +154,12 @@ different paragraphs are unrelated. You could argue that the log entry for a file should contain the full ChangeLog paragraph mentioning the change to the file, even though it may mention other files, because that gives you the full context you -need to understand the change. This is the behaviour you get when this +need to understand the change. This is the behavior you get when this variable is set to t. On the other hand, you could argue that the log entry for a change should contain only the text for the changes which occurred in that -file, because the log is per-file. This is the behaviour you get +file, because the log is per-file. This is the behavior you get when this variable is set to nil.") ;;;; Internal global or buffer-local vars -- cgit v1.2.1 From 1d68acd3a9b80f414bb09d08fa3a2983eaba56bd Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 14:05:55 +0000 Subject: (mouse-1-click-follows-link): Fix spellings in docstrings. --- lisp/mouse.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/mouse.el b/lisp/mouse.el index f4f531959b7..07e593a70c1 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -64,7 +64,7 @@ or perform the normal Mouse-1 action (typically set point). The absolute numeric value specifices the maximum duration of a \"short click\" in milliseconds. A positive value means that a short click follows the link, and a longer click performs the -normal action. A negative value gives the opposite behaviour. +normal action. A negative value gives the opposite behavior. If value is `double', a double click follows the link. -- cgit v1.2.1 From fb607ff1815c06381cd7190220c7f4ef91386ab0 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 14:06:22 +0000 Subject: (skeleton-autowrap): Fix spellings in docstrings. --- lisp/skeleton.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/skeleton.el b/lisp/skeleton.el index d4caca3ca42..5f25e881218 100644 --- a/lisp/skeleton.el +++ b/lisp/skeleton.el @@ -50,7 +50,7 @@ Typical examples might be `upcase' or `capitalize'.") (defvar skeleton-autowrap t - "Controls wrapping behaviour of functions created with `define-skeleton'. + "Controls wrapping behavior of functions created with `define-skeleton'. When the region is visible (due to `transient-mark-mode' or marking a region with the mouse) and this is non-nil and the function was called without an explicit ARG, then the ARG defaults to -1, i.e. wrapping around the visible -- cgit v1.2.1 From cc295a82c26de70ecc8467530efe0633fd7199da Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 14:06:47 +0000 Subject: (insert-for-yank-1): Fix spellings in docstrings. --- lisp/subr.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/subr.el b/lisp/subr.el index 585ec920458..ca1d47fede8 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1561,7 +1561,7 @@ Strip text properties from the inserted text according to `yank-excluded-properties'. Otherwise just like (insert STRING). If STRING has a non-nil `yank-handler' property on the first character, -the normal insert behaviour is modified in various ways. The value of +the normal insert behavior is modified in various ways. The value of the yank-handler property must be a list with one to five elements with the following format: (FUNCTION PARAM NOEXCLUDE UNDO). When FUNCTION is present and non-nil, it is called instead of `insert' -- cgit v1.2.1 From 5f94d2d0095427ef7ae58305d2ce177553ff6b48 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 14:07:27 +0000 Subject: (tempo-insert-region): Fix spellings in docstrings. --- lisp/tempo.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/tempo.el b/lisp/tempo.el index 43f90b64766..49a73ef1098 100644 --- a/lisp/tempo.el +++ b/lisp/tempo.el @@ -125,7 +125,7 @@ user for text to insert in the templates" "*Automatically insert current region when there is a `r' in the template If this variable is nil, `r' elements will be treated just like `p' elements, unless the template function is given a prefix (or a non-nil -argument). If this variable is non-nil, the behaviour is reversed. +argument). If this variable is non-nil, the behavior is reversed. In Transient Mark mode, this option is unused." :type 'boolean -- cgit v1.2.1 From e5e4c6a171b83e6478992ef35a1dee4d9a6be33a Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 14:07:55 +0000 Subject: (terminal-emulator): Fix spellings in docstrings. --- lisp/terminal.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/terminal.el b/lisp/terminal.el index 6b055200359..afce6f51287 100644 --- a/lisp/terminal.el +++ b/lisp/terminal.el @@ -1089,7 +1089,7 @@ This escape character may be changed using the variable `terminal-escape-char'. `Meta' characters may not currently be sent through the terminal emulator. -Here is a list of some of the variables which control the behaviour +Here is a list of some of the variables which control the behavior of the emulator -- see their documentation for more information: terminal-escape-char, terminal-scrolling, terminal-more-processing, terminal-redisplay-interval. -- cgit v1.2.1 From 6bd47b393dc9a5ed2c3167a4af9a58586197efe2 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 14:08:19 +0000 Subject: (display-time-mail-face): Fix spellings in docstrings. --- lisp/time.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/time.el b/lisp/time.el index 180d7c44cf3..f6ddced4d38 100644 --- a/lisp/time.el +++ b/lisp/time.el @@ -127,8 +127,8 @@ This runs the normal hook `display-time-hook' after each update." (defcustom display-time-mail-face nil "Face to use for `display-time-mail-string'. If `display-time-use-mail-icon' is non-nil, the image's -background colour is the background of this face. Set this to -make the mail indicator stand out on a colour display." +background color is the background of this face. Set this to +make the mail indicator stand out on a color display." :group 'faces :group 'display-time :version "22.1" -- cgit v1.2.1 From aa40646530a80f7ccaba81e22ba8a43ea38b1eb3 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 14:08:47 +0000 Subject: (vc-annotate): Fix spellings in docstrings. --- lisp/vc.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lisp') diff --git a/lisp/vc.el b/lisp/vc.el index 24fae514ea5..b89298604eb 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -3043,12 +3043,12 @@ use; you may override this using the second optional arg MODE." ;;;###autoload (defun vc-annotate (prefix &optional revision display-mode) - "Display the edit history of the current file using colours. + "Display the edit history of the current file using colors. This command creates a buffer that shows, for each line of the current -file, when it was last edited and by whom. Additionally, colours are +file, when it was last edited and by whom. Additionally, colors are used to show the age of each line--blue means oldest, red means -youngest, and intermediate colours indicate intermediate ages. By +youngest, and intermediate colors indicate intermediate ages. By default, the time scale stretches back one year into the past; everything that is older than that is shown in blue. -- cgit v1.2.1 From 491a5bba5e5b09ef873100ad3106d692d5c6929b Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 14:09:18 +0000 Subject: (vcursor-copy-line): Fix spellings in docstrings. --- lisp/vcursor.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/vcursor.el b/lisp/vcursor.el index 4de92f02f0b..ac04603dbf8 100644 --- a/lisp/vcursor.el +++ b/lisp/vcursor.el @@ -1116,7 +1116,7 @@ is called interactively, so prefix argument etc. are usable." "Copy up to ARGth line after virtual cursor position. With no argument, copy to the end of the current line. -Behaviour with regard to newlines is similar (but not identical) to +Behavior with regard to newlines is similar (but not identical) to `kill-line'; the main difference is that whitespace at the end of the line is treated like ordinary characters." -- cgit v1.2.1 From c35dcd7e229a535cc88b018912557e7e57e542d3 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 14:09:51 +0000 Subject: (woman-bold-headings, woman-ignore, woman-default-faces, woman-monochrome-faces): Fix spellings in docstrings. --- lisp/woman.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lisp') diff --git a/lisp/woman.el b/lisp/woman.el index 6d0d0336001..cb0bbfd7c12 100644 --- a/lisp/woman.el +++ b/lisp/woman.el @@ -823,13 +823,13 @@ Set this variable to 7 to emulate GNU man formatting." (defcustom woman-bold-headings t "*If non-nil then embolden section and subsection headings. Default is t. -Heading emboldening is NOT standard `man' behaviour." +Heading emboldening is NOT standard `man' behavior." :type 'boolean :group 'woman-formatting) (defcustom woman-ignore t "*If non-nil then unrecognised requests etc. are ignored. Default is t. -This gives the standard ?roff behaviour. If nil then they are left in +This gives the standard ?roff behavior. If nil then they are left in the buffer, which may aid debugging." :type 'boolean :group 'woman-formatting) @@ -876,7 +876,7 @@ or different fonts." ;; You should probably select either italic or underline as you prefer, but ;; not both, although italic and underline work together perfectly well! (defface woman-italic - `((((min-colors 88) (background light)) + `((((min-colors 88) (background light)) (:slant italic :underline t :foreground "red1")) (((background light)) (:slant italic :underline t :foreground "red")) (((background dark)) (:slant italic :underline t))) @@ -914,13 +914,13 @@ or different fonts." (put 'woman-addition-face 'face-alias 'woman-addition) (defun woman-default-faces () - "Set foreground colours of italic and bold faces to their default values." + "Set foreground colors of italic and bold faces to their default values." (interactive) (face-spec-set 'woman-italic (face-user-default-spec 'woman-italic)) (face-spec-set 'woman-bold (face-user-default-spec 'woman-bold))) (defun woman-monochrome-faces () - "Set foreground colours of italic and bold faces to that of the default face. + "Set foreground colors of italic and bold faces to that of the default face. This is usually either black or white." (interactive) (set-face-foreground 'woman-italic 'unspecified) -- cgit v1.2.1 From 77602fc76fb66f4b162c4474874d301a1403f16c Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 14:10:21 +0000 Subject: (todo-insert-threshold): Fix spellings in docstrings. --- lisp/calendar/todo-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el index 132f42369c6..85d49ba38f7 100644 --- a/lisp/calendar/todo-mode.el +++ b/lisp/calendar/todo-mode.el @@ -311,7 +311,7 @@ which it will stop. If you set the threshhold to zero, the upper and lower bound will coincide at the end of the loop and you will insert your item just before that point. If you set the threshhold to, e.g. 8, it will stop as soon as the window size drops below that -amount and will insert the item in the approximate centre of that +amount and will insert the item in the approximate center of that window." :type 'integer :group 'todo) -- cgit v1.2.1 From ca088b04376178d1305ff9d0866c20263f4a79bf Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 14:10:52 +0000 Subject: (pc-select-selection-keys-only, pc-selection-mode): Fix spellings in docstrings. --- lisp/emulation/pc-select.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lisp') diff --git a/lisp/emulation/pc-select.el b/lisp/emulation/pc-select.el index 1221fca5199..5231abb588a 100644 --- a/lisp/emulation/pc-select.el +++ b/lisp/emulation/pc-select.el @@ -99,7 +99,7 @@ errors are suppressed." (defcustom pc-select-selection-keys-only nil "*Non-nil means only bind the basic selection keys when started. Other keys that emulate pc-behavior will be untouched. -This gives mostly Emacs-like behaviour with only the selection keys enabled." +This gives mostly Emacs-like behavior with only the selection keys enabled." :type 'boolean :group 'pc-select) @@ -825,7 +825,7 @@ If the value is non-nil, call the function MODE with an argument of ;;;###autoload (define-minor-mode pc-selection-mode - "Change mark behaviour to emulate Motif, MAC or MS-Windows cut and paste style. + "Change mark behavior to emulate Motif, MAC or MS-Windows cut and paste style. This mode enables Delete Selection mode and Transient Mark mode. @@ -971,7 +971,7 @@ but before calling PC Selection mode): ;;;###autoload (defcustom pc-selection-mode nil "Toggle PC Selection mode. -Change mark behaviour to emulate Motif, MAC or MS-Windows cut and paste style, +Change mark behavior to emulate Motif, MAC or MS-Windows cut and paste style, and cursor movement commands. This mode enables Delete Selection mode and Transient Mark mode. Setting this variable directly does not take effect; -- cgit v1.2.1 From 1c7e8dfbd1767a6de5802db089c38b0d1e5cf85c Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 14:11:18 +0000 Subject: (vip-find-char-forward): Fix spellings in docstrings. --- lisp/emulation/vip.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/emulation/vip.el b/lisp/emulation/vip.el index 19f08d54989..dace12d4c8f 100644 --- a/lisp/emulation/vip.el +++ b/lisp/emulation/vip.el @@ -1342,7 +1342,7 @@ after search." (defun vip-find-char-forward (arg) "Find char on the line. If called interactively read the char to find from the terminal, and if called from vip-repeat, the char last used is -used. This behaviour is controlled by the sign of prefix numeric value." +used. This behavior is controlled by the sign of prefix numeric value." (interactive "P") (let ((val (vip-p-val arg)) (com (vip-getcom arg))) (if (> val 0) -- cgit v1.2.1 From 3bf04f2fadfbe037ecd110788d68416a12c9946d Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 14:11:45 +0000 Subject: (viper-find-char-forward): Fix spellings in docstrings. --- lisp/emulation/viper-cmd.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lisp') diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index 4593d84c6fc..3f9a425987e 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el @@ -3131,7 +3131,7 @@ On reaching beginning of line, stop and signal error." (defun viper-find-char-forward (arg) "Find char on the line. If called interactively read the char to find from the terminal, and if -called from viper-repeat, the char last used is used. This behaviour is +called from viper-repeat, the char last used is used. This behavior is controlled by the sign of prefix numeric value." (interactive "P") (let ((val (viper-p-val arg)) @@ -3672,8 +3672,8 @@ If MAJOR-MODE is set, set the macros only in that major mode." (sit-for 2) (viper-unrecord-kbd-macro "///" 'vi-state))) )) - - + + (defun viper-set-parsing-style-toggling-macro (unset) "Set `%%%' to be a macro that toggles whether comment fields should be parsed for matching parentheses. This is used in conjunction with the `%' command. -- cgit v1.2.1 From fea6b73606311da892df894905847418b91f0152 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 14:12:17 +0000 Subject: (select-safe-coding-system-accept-default-p, input-method-exit-on-invalid-key): Fix spellings in docstrings. --- lisp/international/mule-cmds.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lisp') diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 72bc84762a1..f52e0e85b59 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -624,7 +624,7 @@ then call `write-region', then afterward this variable will be non-nil only if the user was explicitly asked and specified a coding system.") (defvar select-safe-coding-system-accept-default-p nil - "If non-nil, a function to control the behaviour of coding system selection. + "If non-nil, a function to control the behavior of coding system selection. The meaning is the same as the argument ACCEPT-DEFAULT-P of the function `select-safe-coding-system' (which see). This variable overrides that argument.") @@ -1569,7 +1569,7 @@ at point in the current buffer. But, if this flag is non-nil, it displays them in echo area instead.") (defvar input-method-exit-on-invalid-key nil - "This flag controls the behaviour of an input method on invalid key input. + "This flag controls the behavior of an input method on invalid key input. Usually, when a user types a key which doesn't start any character handled by the input method, the key is handled by turning off the input method temporarily. After that key, the input method is re-enabled. @@ -1846,7 +1846,7 @@ specifies the character set for the major languages of Western Europe." ;; Don't invoke fontset-related functions if fontsets aren't ;; supported in this build of Emacs. (when (fboundp 'fontset-list) - (let ((overriding-fontspec (get-language-info language-name + (let ((overriding-fontspec (get-language-info language-name 'overriding-fontspec))) (if overriding-fontspec (set-overriding-fontspec-internal overriding-fontspec)))) -- cgit v1.2.1 From 11896c0ba59e843e74166222ef2aebbde41d77db Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 14:12:40 +0000 Subject: (describe-coding-system): Fix spellings in docstrings. --- lisp/international/mule-diag.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/international/mule-diag.el b/lisp/international/mule-diag.el index 0dc8b3d8ca8..65d79076acb 100644 --- a/lisp/international/mule-diag.el +++ b/lisp/international/mule-diag.el @@ -64,7 +64,7 @@ 'help-echo "mouse-2, RET: show table of characters for this character set") ;;;###autoload -(defvar non-iso-charset-alist +(defvar non-iso-charset-alist `((mac-roman (ascii latin-iso8859-1 mule-unicode-2500-33ff mule-unicode-0100-24ff mule-unicode-e000-ffff) @@ -609,7 +609,7 @@ PC `codepages' and other coded character sets. See `non-iso-charset-alist'." (let ((vars (coding-system-get coding-system 'dependency))) (when vars (princ "See also the documentation of these customizable variables -which alter the behaviour of this coding system.\n") +which alter the behavior of this coding system.\n") (dolist (v vars) (princ " `") (princ v) -- cgit v1.2.1 From 2ae78c4d428fd10ae7ee5cf7222e0390cdb4f65b Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 14:13:10 +0000 Subject: (unify-8859-on-encoding-mode): Fix spellings in docstrings. --- lisp/international/ucs-tables.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/international/ucs-tables.el b/lisp/international/ucs-tables.el index f952b7817a4..417304a5c76 100644 --- a/lisp/international/ucs-tables.el +++ b/lisp/international/ucs-tables.el @@ -2439,7 +2439,7 @@ Interactively, prompts for a hex string giving the code." The ISO 8859 characters sets overlap, e.g. 8859-1 (Latin-1) and 8859-15 (Latin-9) differ only in a few characters. Emacs normally distinguishes equivalent characters from those ISO-8859 character sets -which are built in to Emacs. This behaviour is essentially inherited +which are built in to Emacs. This behavior is essentially inherited from the European-originated international standards. Treating them equivalently, by translating to and from a single representation is called `unification'. (The `utf-8' coding system treats the -- cgit v1.2.1 From 028f45d230a788158b9e97e6371291a99913df8a Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 14:13:42 +0000 Subject: (browse-url-xterm-program): Fix spellings in docstrings. --- lisp/net/browse-url.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 5cd8701d1a5..d846234133d 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -487,7 +487,7 @@ enabled. The port number should be set in `browse-url-CCI-port'." (defcustom browse-url-xterm-program "xterm" "*The name of the terminal emulator used by `browse-url-lynx-xterm'. -This might, for instance, be a separate colour version of xterm." +This might, for instance, be a separate color version of xterm." :type 'string :group 'browse-url) -- cgit v1.2.1 From 2d0bbf5d1ff48f2b254cd75de36007a54d259354 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 14:14:07 +0000 Subject: (lazy-lock-mode): Fix spellings in docstrings. --- lisp/obsolete/lazy-lock.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/obsolete/lazy-lock.el b/lisp/obsolete/lazy-lock.el index 3547674bf36..f618037c753 100644 --- a/lisp/obsolete/lazy-lock.el +++ b/lisp/obsolete/lazy-lock.el @@ -506,7 +506,7 @@ When Lazy Lock mode is enabled, fontification can be lazy in a number of ways: been idle for `lazy-lock-stealth-time' seconds, while Emacs remains idle. This is useful if any buffer has any deferred fontification. -Basic Font Lock mode on-the-fly fontification behaviour fontifies modified +Basic Font Lock mode on-the-fly fontification behavior fontifies modified lines only. Thus, if `lazy-lock-defer-contextually' is non-nil, Lazy Lock mode on-the-fly fontification may fontify differently, albeit correctly. In any event, to refontify some lines you can use \\[font-lock-fontify-block]. -- cgit v1.2.1 From 6292d528a73b956cd40e57c18c20c393293b78c2 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 14:14:37 +0000 Subject: (cperl-info-on-command-no-prompt, cperl-mode): Fix spellings in docstrings. --- lisp/progmodes/cperl-mode.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lisp') diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 4abd8123e6a..85c86bfb6f3 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -343,7 +343,7 @@ Affects: `cperl-font-lock', `cperl-electric-lbrace-space', :group 'cperl-indentation-details) (defvar cperl-vc-header-alist nil) -(make-obsolete-variable +(make-obsolete-variable 'cperl-vc-header-alist "use cperl-vc-rcs-header or cperl-vc-sccs-header instead.") @@ -369,7 +369,7 @@ Affects: `cperl-font-lock', `cperl-electric-lbrace-space', (defcustom cperl-info-on-command-no-prompt nil "*Not-nil (and non-null) means not to prompt on C-h f. -The opposite behaviour is always available if prefixed with C-c. +The opposite behavior is always available if prefixed with C-c. Can be overwritten by `cperl-hairy' if nil." :type '(choice (const null) boolean) :group 'cperl-affected-by-hairy) @@ -1303,7 +1303,7 @@ you type it inside the inline block of control construct, like and you are on a boundary of a statement inside braces, it will transform the construct into a multiline and will place you into an appropriately indented blank line. If you need a usual -`newline-and-indent' behaviour, it is on \\[newline-and-indent], +`newline-and-indent' behavior, it is on \\[newline-and-indent], see documentation on `cperl-electric-linefeed'. Use \\[cperl-invert-if-unless] to change a construction of the form -- cgit v1.2.1 From bb27ac6f32e47e76793b8219d28646bf59a892da Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 14:15:10 +0000 Subject: (cpp-face-light-name-list, cpp-face-dark-name-list): Fix spellings in docstrings. --- lisp/progmodes/cpp.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/progmodes/cpp.el b/lisp/progmodes/cpp.el index 0d9a9f62a60..9910f1f548f 100644 --- a/lisp/progmodes/cpp.el +++ b/lisp/progmodes/cpp.el @@ -144,7 +144,7 @@ or a cons cell (background-color . COLOR)." '("light gray" "light blue" "light cyan" "light yellow" "light pink" "pale green" "beige" "orange" "magenta" "violet" "medium purple" "turquoise") - "Background colours useful with dark foreground colors." + "Background colors useful with dark foreground colors." :type '(repeat string) :group 'cpp) @@ -152,7 +152,7 @@ or a cons cell (background-color . COLOR)." '("dim gray" "blue" "cyan" "yellow" "red" "dark green" "brown" "dark orange" "dark khaki" "dark violet" "purple" "dark turquoise") - "Background colours useful with light foreground colors." + "Background colors useful with light foreground colors." :type '(repeat string) :group 'cpp) -- cgit v1.2.1 From 644efc09c48de7f15afdf808d0bb3d5dd4ed930b Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 14:15:47 +0000 Subject: (delphi-newline-always-indents): Fix spellings in docstrings. --- lisp/progmodes/delphi.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/progmodes/delphi.el b/lisp/progmodes/delphi.el index 3d86f15c175..166e5b8984e 100644 --- a/lisp/progmodes/delphi.el +++ b/lisp/progmodes/delphi.el @@ -152,8 +152,8 @@ regardless of where in the line point is when the TAB command is used." (defcustom delphi-newline-always-indents t "*Non-nil means NEWLINE in Delphi mode should always reindent the current line, insert a blank line and move to the default indent column of the blank -line. If nil, then no indentation occurs, and NEWLINE does the usual -behaviour. This is useful when one needs to do customized indentation that +line. If nil, then no indentation occurs, and NEWLINE does the usual +behavior. This is useful when one needs to do customized indentation that differs from the default." :type 'boolean :group 'delphi) -- cgit v1.2.1 From 466c78c08fd8872290a7553c1d17d9f03d5ad6f8 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 14:16:23 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 36 ++++++++++++++++++++++++++++++++++++ lisp/url/ChangeLog | 5 +++++ 2 files changed, 41 insertions(+) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e2745296ca4..14f2191fdce 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -14,6 +14,42 @@ 2005-06-10 Juanma Barranquero + * cus-edit.el (minibuffer): + * files.el (make-backup-file-name-function): + * filesets.el (filesets-external-viewers): + * hilit-chg.el (highlight-changes-colours) + (highlight-changes-face-list, highlight-changes-rotate-faces): + * ielm.el (ielm-dynamic-return, inferior-emacs-lisp-mode): + * kmacro.el (kmacro-call-macro): + * log-edit.el (log-edit-changelog-full-paragraphs): + * mouse.el (mouse-1-click-follows-link): + * skeleton.el (skeleton-autowrap): + * subr.el (insert-for-yank-1): + * tempo.el (tempo-insert-region): + * terminal.el (terminal-emulator): + * time.el (display-time-mail-face): + * vc.el (vc-annotate): + * vcursor.el (vcursor-copy-line): + * woman.el (woman-bold-headings, woman-ignore) + (woman-default-faces, woman-monochrome-faces): + * calendar/todo-mode.el (todo-insert-threshold): + * emulation/pc-select.el (pc-select-selection-keys-only) + (pc-selection-mode): + * emulation/vip.el (vip-find-char-forward): + * emulation/viper-cmd.el (viper-find-char-forward): + * international/mule-cmds.el (select-safe-coding-system-accept-default-p) + (input-method-exit-on-invalid-key): + * international/mule-diag.el (describe-coding-system): + * international/ucs-tables.el (unify-8859-on-encoding-mode): + * net/browse-url.el (browse-url-xterm-program): + * obsolete/lazy-lock.el (lazy-lock-mode): + * progmodes/cperl-mode.el (cperl-info-on-command-no-prompt) + (cperl-mode): + * progmodes/cpp.el (cpp-face-light-name-list) + (cpp-face-dark-name-list): + * progmodes/delphi.el (delphi-newline-always-indents): + Fix spellings in docstrings. + * ido.el (ido-mode, ido-file-extensions-order) (ido-default-file-method, ido-default-buffer-method) (ido-max-prospects, ido-slow-ftp-hosts, ido-setup-hook) diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 546af477106..a8149c2f659 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,8 @@ +2005-06-10 Juanma Barranquero + + * url-cookie.el (url-cookie-multiple-line): Fix spelling in + docstring. + 2005-05-19 Juanma Barranquero * url-cookie.el (url-cookie-multiple-line): -- cgit v1.2.1 From 6cae5f240fedafade79e31e06b73ca1bcb82cf5e Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 14:59:59 +0000 Subject: Fixes for changes of 2005-06-09. (thumbs-thumbsdir): Force `thumbs-thumbsdir' to be interpretable as a directory. (thumbs-thumbname): Remove directory separator from format string; `thumbs-thumbsdir' now returns a valid directory name. (thumbs-temp-dir): New defsubst. (thumbs-temp-file, thumbs-resize-image, thumbs-modify-image): Use it. --- lisp/thumbs.el | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'lisp') diff --git a/lisp/thumbs.el b/lisp/thumbs.el index 0fa44a3b8ee..0eb58206916 100644 --- a/lisp/thumbs.el +++ b/lisp/thumbs.el @@ -172,17 +172,21 @@ The name is made by appending a number to PREFIX, default \"G\"." (1+ thumbs-gensym-counter)))))) (make-symbol (format "%s%d" pfix num)))))) +(defsubst thumbs-temp-dir () + (file-name-as-directory (expand-file-name thumbs-temp-dir))) + (defun thumbs-temp-file () "Return a unique temporary filename for an image." (format "%s%s-%s.jpg" - (expand-file-name thumbs-temp-dir) + (thumbs-temp-dir) thumbs-temp-prefix (thumbs-gensym "T"))) (defun thumbs-thumbsdir () "Return the current thumbnails directory (from `thumbs-thumbsdir'). Create the thumbnails directory if it does not exist." - (let ((thumbs-thumbsdir (expand-file-name thumbs-thumbsdir))) + (let ((thumbs-thumbsdir (file-name-as-directory + (expand-file-name thumbs-thumbsdir)))) (unless (file-directory-p thumbs-thumbsdir) (make-directory thumbs-thumbsdir) (message "Creating thumbnails directory")) @@ -267,7 +271,7 @@ Or, alternatively, a SIZE may be specified." (condition-case nil (apply 'delete-file (directory-files - thumbs-temp-dir t + (thumbs-temp-dir) t thumbs-temp-prefix)) (error nil)) (let ((buffer-read-only nil) @@ -306,7 +310,7 @@ Or, alternatively, a SIZE may be specified." "Return a thumbnail name for the image IMG." (convert-standard-filename (let ((filename (expand-file-name img))) - (format "%s/%08x-%s.jpg" + (format "%s%08x-%s.jpg" (thumbs-thumbsdir) (sxhash filename) (subst-char-in-string @@ -637,7 +641,7 @@ ACTION and ARG should be a valid convert command." ;; cleaning of old temp file (mapc 'delete-file (directory-files - thumbs-temp-dir + (thumbs-temp-dir) t thumbs-temp-prefix)) (let ((buffer-read-only nil) -- cgit v1.2.1 From 578c1340ea0f4d6a6aa9d86ff5d89bdf690e8fbb Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 10 Jun 2005 15:00:48 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 14f2191fdce..09ce2a4e50a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -14,6 +14,15 @@ 2005-06-10 Juanma Barranquero + * thumbs.el: Fixes for changes of 2005-06-09. + (thumbs-thumbsdir): Force `thumbs-thumbsdir' to be interpretable + as a directory. + (thumbs-thumbname): Remove directory separator from format string; + `thumbs-thumbsdir' now returns a valid directory name. + (thumbs-temp-dir): New defsubst. + (thumbs-temp-file, thumbs-resize-image, thumbs-modify-image): + Use it. + * cus-edit.el (minibuffer): * files.el (make-backup-file-name-function): * filesets.el (filesets-external-viewers): -- cgit v1.2.1 From 23d519e49c597f10b0a778cc340e233d74127c3d Mon Sep 17 00:00:00 2001 From: Mark A. Hershberger Date: Fri, 10 Jun 2005 15:37:37 +0000 Subject: eliminate use of inefficient match-data --- lisp/ChangeLog | 6 ++++++ lisp/xml.el | 60 ++++++++++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 54 insertions(+), 12 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 09ce2a4e50a..724d86a95b6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2005-06-10 Mark A. Hershberger + + * xml.el (start-chars, xml-parse-dtd): Add the ability to skip + ATTLIST portions of included DTDs. + (xml-parse-dtd): Eliminate use of inefficient match-data. + 2005-06-10 Miles Bader * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) diff --git a/lisp/xml.el b/lisp/xml.el index f9527a276b1..f4300817836 100644 --- a/lisp/xml.el +++ b/lisp/xml.el @@ -211,6 +211,35 @@ If PARSE-NS is non-nil, then QNAMES are expanded." (defvar xml-pe-reference-re (concat "%" xml-name-re ";")) ;;[67] Reference ::= EntityRef | CharRef (defvar xml-reference-re (concat "\\(?:" xml-entity-ref "\\|" xml-char-ref-re "\\)")) +;;[10] AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'" + (defvar xml-att-value-re (concat "\\(?:\"\\(?:[^&\"]\\|" xml-reference-re "\\)*\"\\|" + "'\\(?:[^&']\\|" xml-reference-re "\\)*'\\)")) +;;[56] TokenizedType ::= 'ID' [VC: ID] [VC: One ID per Element Type] [VC: ID Attribute Default] +;; | 'IDREF' [VC: IDREF] +;; | 'IDREFS' [VC: IDREF] +;; | 'ENTITY' [VC: Entity Name] +;; | 'ENTITIES' [VC: Entity Name] +;; | 'NMTOKEN' [VC: Name Token] +;; | 'NMTOKENS' [VC: Name Token] + (defvar xml-tokenized-type-re "\\(?:ID\\|IDREF\\|IDREFS\\|ENTITY\\|ENTITIES\\|NMTOKEN\\|NMTOKENS\\)") +;;[58] NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')' + (defvar xml-notation-type-re (concat "\\(?:NOTATION" whitespace "(" whitespace "*" xml-name-re + "\\(?:" whitespace "*|" whitespace "*" xml-name-re "\\)*" whitespace "*)\\)")) +;;[59] Enumeration ::= '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')' [VC: Enumeration] [VC: No Duplicate Tokens] + (defvar xml-enumeration-re (concat "\\(?:(" whitespace "*" xml-nmtoken-re + "\\(?:" whitespace "*|" whitespace "*" xml-nmtoken-re "\\)*" + whitespace ")\\)")) +;;[57] EnumeratedType ::= NotationType | Enumeration + (defvar xml-enumerated-type-re (concat "\\(?:" xml-notation-type-re "\\|" xml-enumeration-re "\\)")) +;;[54] AttType ::= StringType | TokenizedType | EnumeratedType +;;[55] StringType ::= 'CDATA' + (defvar xml-att-type-re (concat "\\(?:CDATA\\|" xml-tokenized-type-re "\\|" xml-notation-type-re"\\|" xml-enumerated-type-re "\\)")) +;;[60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue) + (defvar xml-default-decl-re (concat "\\(?:#REQUIRED\\|#IMPLIED\\|\\(?:#FIXED" whitespace "\\)*" xml-att-value-re "\\)")) +;;[53] AttDef ::= S Name S AttType S DefaultDecl + (defvar xml-att-def-re (concat "\\(?:" whitespace "*" xml-name-re + whitespace "*" xml-att-type-re + whitespace "*" xml-default-decl-re "\\)")) ;;[9] EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"' ;; | "'" ([^%&'] | PEReference | Reference)* "'" (defvar xml-entity-value-re (concat "\\(?:\"\\(?:[^%&\"]\\|" xml-pe-reference-re @@ -580,7 +609,7 @@ This follows the rule [28] in the XML specifications." (error "XML: Bad DTD") (forward-char) ;; Parse the rest of the DTD - ;; Fixme: Deal with ATTLIST, NOTATION, PIs. + ;; Fixme: Deal with NOTATION, PIs. (while (not (looking-at "\\s-*\\]")) (skip-syntax-forward " ") (cond @@ -616,16 +645,24 @@ This follows the rule [28] in the XML specifications." ;; Store the element in the DTD (push (list element type) dtd) (goto-char end-pos)) + + ;; Translation of rule [52] of XML specifications + ((looking-at (concat "")) + + ;; We don't do anything with ATTLIST currently + (goto-char (match-end 0))) + ((looking-at "")) ((looking-at (concat "")) - (let ((name (buffer-substring (nth 2 (match-data)) - (nth 3 (match-data)))) - (value (buffer-substring (+ (nth 4 (match-data)) 1) - (- (nth 5 (match-data)) 1)))) - (goto-char (nth 1 (match-data))) + (let ((name (match-string 1)) + (value (substring (match-string 2) 1 + (- (length (match-string 2)) 1)))) + (goto-char (match-end 0)) (setq xml-entity-alist (append xml-entity-alist (list (cons name @@ -644,11 +681,10 @@ This follows the rule [28] in the XML specifications." "\\|'[- \r\na-zA-Z0-9()+,./:=?;!*#@$_%]*'" "[ \t\n\r]+\\(\"[^\"]*\"\\|'[^']*'\\)" "[ \t\n\r]*>"))) - (let ((name (buffer-substring (nth 2 (match-data)) - (nth 3 (match-data)))) - (file (buffer-substring (+ (nth 4 (match-data)) 1) - (- (nth 5 (match-data)) 1)))) - (goto-char (nth 1 (match-data))) + (let ((name (match-string 1)) + (file (substring (match-string 2) 1 + (- (length (match-string 2)) 1)))) + (goto-char (match-end 0)) (setq xml-entity-alist (append xml-entity-alist (list (cons name (with-temp-buffer @@ -677,7 +713,7 @@ This follows the rule [28] in the XML specifications." (when xml-validating-parser (error "XML: (Validity) Invalid DTD item")))))) (if (looking-at "\\s-*]>") - (goto-char (nth 1 (match-data))))) + (goto-char (match-end 0)))) (nreverse dtd))) (defun xml-parse-elem-type (string) -- cgit v1.2.1 From f1b587064a41ef495ef7a87b992dbdd711d557da Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 10 Jun 2005 21:14:10 +0000 Subject: (vc-registered): Explicitly disable VC for URL files. --- lisp/url/url-handlers.el | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lisp') diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el index 68bf0ec7ab5..12db63aade8 100644 --- a/lisp/url/url-handlers.el +++ b/lisp/url/url-handlers.el @@ -155,6 +155,9 @@ the arguments that would have been passed to OPERATION." ;; These are operations that we do not support yet (DAV!!!) (put 'file-writable-p 'url-file-handlers 'ignore) (put 'file-symlink-p 'url-file-handlers 'ignore) +;; Just like for ange-ftp: let's not waste time trying to look for RCS/foo,v +;; files and such since we can't do anything clever with them anyway. +(put 'vc-registered 'url-file-handlers 'ignore) (defun url-handler-expand-file-name (file &optional base) (if (file-name-absolute-p file) -- cgit v1.2.1 From 7f95457178a15c411cc91d94ddefab6d1e5fa77a Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 10 Jun 2005 21:14:34 +0000 Subject: (url-retrieve-synchronously): Don't exit precipitously when fetching a file via ange-ftp. --- lisp/url/ChangeLog | 10 ++++++++-- lisp/url/url.el | 31 ++++++++++++++++++++----------- 2 files changed, 28 insertions(+), 13 deletions(-) (limited to 'lisp') diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index a8149c2f659..8ec7293a458 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,7 +1,13 @@ +2005-06-10 Stefan Monnier + + * url-handlers.el (vc-registered): Explicitly disable VC for URL files. + + * url.el (url-retrieve-synchronously): Don't exit precipitously when + fetching a file via ange-ftp. + 2005-06-10 Juanma Barranquero - * url-cookie.el (url-cookie-multiple-line): Fix spelling in - docstring. + * url-cookie.el (url-cookie-multiple-line): Fix spelling in docstring. 2005-05-19 Juanma Barranquero diff --git a/lisp/url/url.el b/lisp/url/url.el index 05ef85c9300..8b57d885949 100644 --- a/lisp/url/url.el +++ b/lisp/url/url.el @@ -170,17 +170,26 @@ no further processing). URL is either a string or a parsed URL." (url-debug 'retrieval "Synchronous fetching done (%S)" (current-buffer)) (setq retrieval-done t asynch-buffer (current-buffer))))) - (let ((proc (and asynch-buffer (get-buffer-process asynch-buffer)))) - (if (null proc) - ;; We do not need to do anything, it was a mailto or something - ;; similar that takes processing completely outside of the URL - ;; package. - nil + (if (null asynch-buffer) + ;; We do not need to do anything, it was a mailto or something + ;; similar that takes processing completely outside of the URL + ;; package. + nil + (let ((proc (get-buffer-process asynch-buffer))) + ;; If the access method was synchronous, `retrieval-done' should + ;; hopefully already be set to t. If it is nil, and `proc' is also + ;; nil, it implies that the async process is not running in + ;; asynch-buffer. This happens e.g. for FTP files. In such a case + ;; url-file.el should probably set something like a `url-process' + ;; buffer-local variable so we can find the exact process that we + ;; should be waiting for. In the mean time, we'll just wait for any + ;; process output. (while (not retrieval-done) (url-debug 'retrieval "Spinning in url-retrieve-synchronously: %S (%S)" retrieval-done asynch-buffer) - (if (memq (process-status proc) '(closed exit signal failed)) + (if (and proc (memq (process-status proc) + '(closed exit signal failed))) ;; FIXME: It's not clear whether url-retrieve's callback is ;; guaranteed to be called or not. It seems that url-http ;; decides sometimes consciously not to call it, so it's not @@ -193,7 +202,7 @@ no further processing). URL is either a string or a parsed URL." ;; interrupt it before it got a chance to handle process input. ;; `sleep-for' was tried but it lead to other forms of ;; hanging. --Stef - (unless (accept-process-output proc) + (unless (or (accept-process-output proc) (null proc)) ;; accept-process-output returned nil, maybe because the process ;; exited (and may have been replaced with another). (setq proc (get-buffer-process asynch-buffer)))))) @@ -201,9 +210,9 @@ no further processing). URL is either a string or a parsed URL." (defun url-mm-callback (&rest ignored) (let ((handle (mm-dissect-buffer t))) - (save-excursion - (url-mark-buffer-as-dead (current-buffer)) - (set-buffer (generate-new-buffer (url-recreate-url url-current-object))) + (url-mark-buffer-as-dead (current-buffer)) + (with-current-buffer + (generate-new-buffer (url-recreate-url url-current-object)) (if (eq (mm-display-part handle) 'external) (progn (set-process-sentinel -- cgit v1.2.1 From 0090e0483c1aaa5b43dd521de0a52d64c4bc0603 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 10 Jun 2005 22:02:23 +0000 Subject: Remove most autoload cookies. Don't hook into the url-file-handler since it currently breaks all non-HTTP URLs. --- lisp/url/ChangeLog | 4 ++++ lisp/url/url-dav.el | 35 ++++++++++++----------------------- 2 files changed, 16 insertions(+), 23 deletions(-) (limited to 'lisp') diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 8ec7293a458..27981553e83 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,5 +1,9 @@ 2005-06-10 Stefan Monnier + * url-dav.el: Remove most autoload cookies. + Don't hook into the url-file-handler since it currently breaks all + non-HTTP URLs. + * url-handlers.el (vc-registered): Explicitly disable VC for URL files. * url.el (url-retrieve-synchronously): Don't exit precipitously when diff --git a/lisp/url/url-dav.el b/lisp/url/url-dav.el index a0f1ae1ebe7..a3320f88e96 100644 --- a/lisp/url/url-dav.el +++ b/lisp/url/url-dav.el @@ -457,7 +457,6 @@ added to this list, so most requests can just pass in nil." "\n")))) (url-dav-process-response (url-retrieve-synchronously url) url))) -;;;###autoload (defun url-dav-get-properties (url &optional attributes depth namespaces) "Return properties for URL, up to DEPTH levels deep. @@ -487,7 +486,6 @@ identify the owner of a LOCK when requesting it. This will be shown to other users when the DAV:lockdiscovery property is requested, so make sure you are comfortable with it leaking to the outside world.") -;;;###autoload (defun url-dav-lock-resource (url exclusive &optional depth) "Request a lock on URL. If EXCLUSIVE is non-nil, get an exclusive lock. Optional 3rd argument DEPTH says how deep the lock should go, default is 0 @@ -528,7 +526,6 @@ FAILURE-RESULTS is a list of (URL STATUS)." (push (list url child-status) failures))) (cons successes failures))) -;;;###autoload (defun url-dav-active-locks (url &optional depth) "Return an assoc list of all active locks on URL." (let ((response (url-dav-get-properties url '(DAV:lockdiscovery) depth)) @@ -563,7 +560,6 @@ FAILURE-RESULTS is a list of (URL STATUS)." results))) results)) -;;;###autoload (defun url-dav-unlock-resource (url lock-token) "Release the lock on URL represented by LOCK-TOKEN. Returns t iff the lock was successfully released." @@ -624,7 +620,6 @@ Returns t iff the lock was successfully released." (autoload 'url-http-head-file-attributes "url-http") -;;;###autoload (defun url-dav-file-attributes (url &optional id-format) (let ((properties (cdar (url-dav-get-properties url))) (attributes nil)) @@ -680,7 +675,6 @@ Returns t iff the lock was successfully released." (setq attributes (url-http-head-file-attributes url id-format))) attributes)) -;;;###autoload (defun url-dav-save-resource (url obj &optional content-type lock-token) "Save OBJ as URL using WebDAV. URL must be a fully qualified URL. @@ -736,7 +730,6 @@ Use with care, and even then think three times. (concat "(<" ,lock-token ">)")))))))) -;;;###autoload (defun url-dav-delete-directory (url &optional recursive lock-token) "Delete the WebDAV collection URL. If optional second argument RECURSIVE is non-nil, then delete all @@ -761,7 +754,6 @@ files in the collection as well." props)) nil) -;;;###autoload (defun url-dav-delete-file (url &optional lock-token) "Delete file named URL." (let ((props nil) @@ -781,7 +773,6 @@ files in the collection as well." props)) nil) -;;;###autoload (defun url-dav-directory-files (url &optional full match nosort files-only) "Return a list of names of files in DIRECTORY. There are three optional arguments: @@ -828,13 +819,11 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable. files (sort files 'string-lessp)))) -;;;###autoload (defun url-dav-file-directory-p (url) "Return t if URL names an existing DAV collection." (let ((properties (cdar (url-dav-get-properties url '(DAV:resourcetype))))) (eq (plist-get properties 'DAV:resourcetype) 'DAV:collection))) -;;;###autoload (defun url-dav-make-directory (url &optional parents) "Create the directory DIR and any nonexistent parent dirs." (declare (special url-http-response-status)) @@ -864,7 +853,6 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable. (kill-buffer buffer))) result)) -;;;###autoload (defun url-dav-rename-file (oldname newname &optional overwrite) (if (not (and (string-match url-handler-regexp oldname) (string-match url-handler-regexp newname))) @@ -905,13 +893,11 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable. props) t)) -;;;###autoload (defun url-dav-file-name-all-completions (file url) "Return a list of all completions of file name FILE in directory DIRECTORY. These are all file names in directory DIRECTORY which begin with FILE." (url-dav-directory-files url nil (concat "^" file ".*"))) -;;;###autoload (defun url-dav-file-name-completion (file url) "Complete file name FILE in directory DIRECTORY. Returns the longest string @@ -951,15 +937,18 @@ Returns nil if DIR contains no name starting with FILE." (put op 'url-file-handlers (intern-soft (format "url-dav-%s" op)))) (mapcar 'url-dav-register-handler - '(file-name-all-completions - file-name-completion - rename-file - make-directory - file-directory-p - directory-files - delete-file - delete-directory - file-attributes)) + ;; These handlers are disabled because they incorrectly presume that + ;; the URL specifies an HTTP location and thus break FTP URLs. + '(;; file-name-all-completions + ;; file-name-completion + ;; rename-file + ;; make-directory + ;; file-directory-p + ;; directory-files + ;; delete-file + ;; delete-directory + ;; file-attributes + )) ;;; Version Control backend cruft -- cgit v1.2.1 From 2a516a73dd431f743bbcd239cbdc7dc68b71d4ba Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Fri, 10 Jun 2005 22:54:06 +0000 Subject: 2005-06-10 Michael Hotchin (tiny change) * progmodes/compile.el (compilation-error-regexp-alist-alist) [msft]: update regexp for newer msft compilers. --- lisp/progmodes/compile.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index e1b63e54b17..f923d5a5963 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -246,8 +246,8 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) " in \\([^()\n ]+\\)(\\([0-9]+\\))$" 1 2) (msft - "^\\(\\(?:[a-zA-Z]:\\)?[^:(\t\n]+\\)(\\([0-9]+\\)) \ -: \\(?:error\\|warnin\\(g\\)\\) C[0-9]+:" 1 2 nil (3)) + "^\\([0-9]+>\\)\\(\\(?:[a-zA-Z]:\\)?[^:(\t\n]+\\)(\\([0-9]+\\)) \ +: \\(?:error\\|warnin\\(g\\)\\) C[0-9]+:" 2 3 nil (4)) (oracle "^\\(?:Semantic error\\|Error\\|PCC-[0-9]+:\\).* line \\([0-9]+\\)\ -- cgit v1.2.1 From d11f8e1ab9bd57d2c9346520858a328e9bc6d0d5 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Fri, 10 Jun 2005 23:04:18 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 724d86a95b6..3d75c4cfd7b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-06-10 Michael Hotchin (tiny change) + + * progmodes/compile.el (compilation-error-regexp-alist-alist) + [msft]: update regexp for newer msft compilers. + 2005-06-10 Mark A. Hershberger * xml.el (start-chars, xml-parse-dtd): Add the ability to skip -- cgit v1.2.1 From 28547c1fa971f443f2e709ed21306c1f139a3ac6 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sat, 11 Jun 2005 00:09:39 +0000 Subject: Fix last change --- lisp/progmodes/compile.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index f923d5a5963..3f3b385c5ed 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -246,7 +246,7 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) " in \\([^()\n ]+\\)(\\([0-9]+\\))$" 1 2) (msft - "^\\([0-9]+>\\)\\(\\(?:[a-zA-Z]:\\)?[^:(\t\n]+\\)(\\([0-9]+\\)) \ + "^\\([0-9]+>\\)?\\(\\(?:[a-zA-Z]:\\)?[^:(\t\n]+\\)(\\([0-9]+\\)) \ : \\(?:error\\|warnin\\(g\\)\\) C[0-9]+:" 2 3 nil (4)) (oracle -- cgit v1.2.1 From 75fb9fde10ab29c162eb84ce5f3662a6aa2bc0d4 Mon Sep 17 00:00:00 2001 From: Jan Djärv Date: Sat, 11 Jun 2005 05:40:16 +0000 Subject: Update item for 2004-01-21 with function items. --- lisp/ChangeLog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3d75c4cfd7b..401e8b5bdb4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -18238,8 +18238,8 @@ 2004-01-21 Jan Dj,Ad(Brv - * term/x-win.el: Call menu-bar-enable-clipboard and make Paste - use clipboard first. + * term/x-win.el (x-clipboard-yank, menu-bar-edit-menu): Call + menu-bar-enable-clipboard and make Paste use clipboard first. 2004-01-20 Stefan Monnier -- cgit v1.2.1 From 480c8cd32a866173eb847a7af9372ea9dd9d35e7 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 11 Jun 2005 07:14:38 +0000 Subject: Add binding of `ESC functionkey' for every `M-functionkey'. --- lisp/ChangeLog | 6 ++++++ lisp/bindings.el | 25 +++++++++++++++++++------ lisp/hexl.el | 2 ++ 3 files changed, 27 insertions(+), 6 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 401e8b5bdb4..35f1ab21a13 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2005-06-11 Andreas Schwab + + * bindings.el: Add binding of `ESC functionkey' for every + `M-functionkey'. + * hexl.el (hexl-mode-map): Likewise. + 2005-06-10 Michael Hotchin (tiny change) * progmodes/compile.el (compilation-error-regexp-alist-alist) diff --git a/lisp/bindings.el b/lisp/bindings.el index 4781f8dfa59..f9ca0f02b3f 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el @@ -751,6 +751,7 @@ language you are using." (define-key global-map [home] 'beginning-of-line) (define-key global-map [C-home] 'beginning-of-buffer) (define-key global-map [M-home] 'beginning-of-buffer-other-window) +(define-key esc-map [home] 'beginning-of-buffer-other-window) (define-key global-map [left] 'backward-char) (define-key global-map [up] 'previous-line) (define-key global-map [right] 'forward-char) @@ -763,13 +764,17 @@ language you are using." (put 'scroll-left 'disabled t) (define-key global-map [C-next] 'scroll-left) (define-key global-map [M-next] 'scroll-other-window) +(define-key esc-map [next] 'scroll-other-window) (define-key global-map [M-prior] 'scroll-other-window-down) +(define-key esc-map [prior] 'scroll-other-window-down) (define-key esc-map [?\C-\S-v] 'scroll-other-window-down) (define-key global-map [end] 'end-of-line) (define-key global-map [C-end] 'end-of-buffer) (define-key global-map [M-end] 'end-of-buffer-other-window) +(define-key esc-map [end] 'end-of-buffer-other-window) (define-key global-map [begin] 'beginning-of-buffer) (define-key global-map [M-begin] 'beginning-of-buffer-other-window) +(define-key esc-map [begin] 'beginning-of-buffer-other-window) ;; (define-key global-map [select] 'function-key-error) ;; (define-key global-map [print] 'function-key-error) (define-key global-map [execute] 'execute-extended-command) @@ -933,7 +938,9 @@ language you are using." (define-key global-map "\C-c" 'mode-specific-command-prefix) (global-set-key [M-right] 'forward-word) +(define-key esc-map [right] 'forward-word) (global-set-key [M-left] 'backward-word) +(define-key esc-map [left] 'backward-word) ;; ilya@math.ohio-state.edu says these bindings are standard on PC editors. (global-set-key [C-right] 'forward-word) (global-set-key [C-left] 'backward-word) @@ -943,12 +950,18 @@ language you are using." ;; This is "move to the clipboard", or as close as we come. (global-set-key [S-delete] 'kill-region) -(global-set-key [C-M-left] 'backward-sexp) -(global-set-key [C-M-right] 'forward-sexp) -(global-set-key [C-M-up] 'backward-up-list) -(global-set-key [C-M-down] 'down-list) -(global-set-key [C-M-home] 'beginning-of-defun) -(global-set-key [C-M-end] 'end-of-defun) +(global-set-key [C-M-left] 'backward-sexp) +(define-key esc-map [C-left] 'backward-sexp) +(global-set-key [C-M-right] 'forward-sexp) +(define-key esc-map [C-right] 'forward-sexp) +(global-set-key [C-M-up] 'backward-up-list) +(define-key esc-map [C-up] 'backward-up-list) +(global-set-key [C-M-down] 'down-list) +(define-key esc-map [C-down] 'down-list) +(global-set-key [C-M-home] 'beginning-of-defun) +(define-key esc-map [C-home] 'beginning-of-defun) +(global-set-key [C-M-end] 'end-of-defun) +(define-key esc-map [C-end] 'end-of-defun) (define-key esc-map "\C-f" 'forward-sexp) (define-key esc-map "\C-b" 'backward-sexp) diff --git a/lisp/hexl.el b/lisp/hexl.el index b67ab7876b4..e24f6b7f72b 100644 --- a/lisp/hexl.el +++ b/lisp/hexl.el @@ -988,7 +988,9 @@ This function is assumed to be used as call back function for `hl-line-mode'." (define-key hexl-mode-map [up] 'hexl-previous-line) (define-key hexl-mode-map [down] 'hexl-next-line) (define-key hexl-mode-map [M-left] 'hexl-backward-short) + (define-key hexl-mode-map [?\e left] 'hexl-backward-short) (define-key hexl-mode-map [M-right] 'hexl-forward-short) + (define-key hexl-mode-map [?\e right] 'hexl-forward-short) (define-key hexl-mode-map [next] 'hexl-scroll-up) (define-key hexl-mode-map [prior] 'hexl-scroll-down) (define-key hexl-mode-map [home] 'hexl-beginning-of-line) -- cgit v1.2.1 From e5d79aa59c3650647f742246a9a094c984bb45b1 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Sat, 11 Jun 2005 08:40:47 +0000 Subject: (edebug-eval-mode-map): Don't copy lisp-interaction-mode-map but make it the parent. (edebug-eval-mode): Use define-derived-mode. --- lisp/ChangeLog | 6 ++++++ lisp/emacs-lisp/edebug.el | 18 ++++++------------ 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 35f1ab21a13..94c41ec141a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2005-06-11 Lute Kamstra + + * emacs-lisp/edebug.el (edebug-eval-mode-map): Don't copy + lisp-interaction-mode-map but make it the parent. + (edebug-eval-mode): Use define-derived-mode. + 2005-06-11 Andreas Schwab * bindings.el: Add binding of `ESC functionkey' for every diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 91ebda57001..89cfd66e339 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -4014,20 +4014,19 @@ May only be called from within edebug-recursive-edit." (defvar edebug-eval-mode-map nil "Keymap for Edebug Eval mode. Superset of Lisp Interaction mode.") -(if edebug-eval-mode-map - nil - (setq edebug-eval-mode-map (copy-keymap lisp-interaction-mode-map)) +(unless edebug-eval-mode-map + (setq edebug-eval-mode-map (make-sparse-keymap)) + (set-keymap-parent edebug-eval-mode-map lisp-interaction-mode-map) (define-key edebug-eval-mode-map "\C-c\C-w" 'edebug-where) (define-key edebug-eval-mode-map "\C-c\C-d" 'edebug-delete-eval-item) (define-key edebug-eval-mode-map "\C-c\C-u" 'edebug-update-eval-list) (define-key edebug-eval-mode-map "\C-x\C-e" 'edebug-eval-last-sexp) - (define-key edebug-eval-mode-map "\C-j" 'edebug-eval-print-last-sexp) - ) + (define-key edebug-eval-mode-map "\C-j" 'edebug-eval-print-last-sexp)) (put 'edebug-eval-mode 'mode-class 'special) -(defun edebug-eval-mode () +(define-derived-mode edebug-eval-mode lisp-interaction-mode "Edebug Eval" "Mode for evaluation list buffer while in Edebug. In addition to all Interactive Emacs Lisp commands there are local and @@ -4039,12 +4038,7 @@ Eval list buffer commands: \\{edebug-eval-mode-map} Global commands prefixed by global-edebug-prefix: -\\{global-edebug-map} -" - (lisp-interaction-mode) - (setq major-mode 'edebug-eval-mode) - (setq mode-name "Edebug Eval") - (use-local-map edebug-eval-mode-map)) +\\{global-edebug-map}") ;;; Interface with standard debugger. -- cgit v1.2.1 From e0dcaa3feec553efba8a2e1306b08c6220fddeff Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 11 Jun 2005 13:10:11 +0000 Subject: (modeline-highlight): Rename from (the erroneous) `modeline-higilight'. --- lisp/ChangeLog | 5 +++++ lisp/faces.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 94c41ec141a..f55c9f4b6cf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-06-11 Frederik Fouvry + + * faces.el (modeline-highlight): Rename from (the erroneous) + `modeline-higilight'. + 2005-06-11 Lute Kamstra * emacs-lisp/edebug.el (edebug-eval-mode-map): Don't copy diff --git a/lisp/faces.el b/lisp/faces.el index f278546154c..866f739a13d 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -1863,7 +1863,7 @@ created." ;; Make `modeline' an alias for `mode-line', for compatibility. (put 'modeline 'face-alias 'mode-line) (put 'modeline-inactive 'face-alias 'mode-line-inactive) -(put 'modeline-higilight 'face-alias 'mode-line-highlight) +(put 'modeline-highlight 'face-alias 'mode-line-highlight) (defface header-line '((default -- cgit v1.2.1 From 67ed6461a6d446c25bfcb362c8678ba8926c9934 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 11 Jun 2005 13:25:16 +0000 Subject: (thumbs-per-line, thumbs-thumbsdir-max-size) (thumbs-relief, thumbs-margin, thumbs-image-resizing-step): Fix :type--it is `integer', not `string'. --- lisp/ChangeLog | 4 ++++ lisp/thumbs.el | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f55c9f4b6cf..4b513b46ba6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2005-06-11 Frederik Fouvry + * thumbs.el (thumbs-per-line, thumbs-thumbsdir-max-size) + (thumbs-relief, thumbs-margin, thumbs-image-resizing-step): Fix + :type--it is `integer', not `string'. + * faces.el (modeline-highlight): Rename from (the erroneous) `modeline-higilight'. diff --git a/lisp/thumbs.el b/lisp/thumbs.el index 0eb58206916..09fe77cf352 100644 --- a/lisp/thumbs.el +++ b/lisp/thumbs.el @@ -77,13 +77,13 @@ (defcustom thumbs-per-line 5 "*Number of thumbnails per line to show in directory." - :type 'string + :type 'integer :group 'thumbs) (defcustom thumbs-thumbsdir-max-size 50000000 "Max size for thumbnails directory. When it reaches that size (in bytes), a warning is sent." - :type 'string + :type 'integer :group 'thumbs) (defcustom thumbs-conversion-program @@ -104,13 +104,13 @@ It must be 'convert'." (defcustom thumbs-relief 5 "*Size of button-like border around thumbnails." - :type 'string + :type 'integer :group 'thumbs) (defcustom thumbs-margin 2 "*Size of the margin around thumbnails. This is where you see the cursor." - :type 'string + :type 'integer :group 'thumbs) (defcustom thumbs-thumbsdir-auto-clean t @@ -122,7 +122,7 @@ than `thumbs-thumbsdir-max-size'." (defcustom thumbs-image-resizing-step 10 "Step by which to resize image." - :type 'string + :type 'integer :group 'thumbs) (defcustom thumbs-temp-dir temporary-file-directory -- cgit v1.2.1 From b48e52066f205b23ada938d9e8d83e0e9cebfdce Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 11 Jun 2005 13:49:56 +0000 Subject: (fill-context-prefix): Try `adaptive-fill-function' BEFORE `adaptive-fill-regexp' when determining a fill prefix. (adaptive-file-function): Minor amendment to doc-string. --- lisp/textmodes/fill.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lisp') diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 1615da60910..048090bfdc4 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -115,7 +115,7 @@ if it would act as a paragraph-starter on the second line." (defcustom adaptive-fill-function nil "*Function to call to choose a fill prefix for a paragraph, or nil. -This function is used when `adaptive-fill-regexp' does not match." +nil means the function has not determined the fill prefix." :type '(choice (const nil) function) :group 'fill) @@ -230,9 +230,9 @@ act as a paragraph-separator." ;; Also setting first-line-prefix to nil prevents ;; second-line-prefix from being used. (cond ;; ((looking-at paragraph-start) nil) + ((and adaptive-fill-function (funcall adaptive-fill-function))) ((and adaptive-fill-regexp (looking-at adaptive-fill-regexp)) - (match-string-no-properties 0)) - (adaptive-fill-function (funcall adaptive-fill-function)))) + (match-string-no-properties 0)))) (forward-line 1) (if (< (point) to) (progn @@ -240,11 +240,11 @@ act as a paragraph-separator." (setq start (point)) (setq second-line-prefix (cond ((looking-at paragraph-start) nil) ;Can it happen ? -stef + ((and adaptive-fill-function + (funcall adaptive-fill-function))) ((and adaptive-fill-regexp (looking-at adaptive-fill-regexp)) - (buffer-substring-no-properties start (match-end 0))) - (adaptive-fill-function - (funcall adaptive-fill-function)))) + (buffer-substring-no-properties start (match-end 0))))) ;; If we get a fill prefix from the second line, ;; make sure it or something compatible is on the first line too. (when second-line-prefix -- cgit v1.2.1 From 98d1a1cf4c4f14b1d8e17416ddca18c3579e9a9c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 11 Jun 2005 13:54:09 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4b513b46ba6..663b3ff3d4b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2005-06-11 Alan Mackenzie + + * fill.el (fill-context-prefix): Try `adaptive-fill-function' + BEFORE `adaptive-fill-regexp' when determining a fill prefix. + (adaptive-file-function): Minor amendment to doc-string. + 2005-06-11 Frederik Fouvry * thumbs.el (thumbs-per-line, thumbs-thumbsdir-max-size) -- cgit v1.2.1 From d4ddf7839cf2c4a7d58f294880dd556a683ec0ed Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Sat, 11 Jun 2005 20:33:28 +0000 Subject: Doc fixes for public funcs: "Returns" to "return", document useful return values, etc. --- lisp/ChangeLog | 5 +++++ lisp/emacs-lisp/ewoc.el | 36 +++++++++++++++++++----------------- 2 files changed, 24 insertions(+), 17 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 663b3ff3d4b..530a589dd8a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-06-11 Thien-Thi Nguyen + + * emacs-lisp/ewoc.el: Doc fixes for public funcs: + "Returns" to "return", document useful return values, etc. + 2005-06-11 Alan Mackenzie * fill.el (fill-context-prefix): Try `adaptive-fill-function' diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el index a2cb4e9fe46..9f91dbab0e9 100644 --- a/lisp/emacs-lisp/ewoc.el +++ b/lisp/emacs-lisp/ewoc.el @@ -264,7 +264,7 @@ start position and the element DATA." (defun ewoc--delete-node-internal (ewoc node) "Delete a data string from EWOC. -Can not be used on the footer. Returns the wrapper that is deleted. +Can not be used on the footer. Return the wrapper that is deleted. The start-marker in the wrapper is set to nil, so that it doesn't consume any more resources." (let ((dll (ewoc--dll ewoc)) @@ -334,25 +334,27 @@ be inserted at the bottom of the ewoc." (defalias 'ewoc-data 'ewoc--node-data) (defun ewoc-enter-first (ewoc data) - "Enter DATA first in EWOC." + "Enter DATA first in EWOC. +Return the new node." (ewoc--set-buffer-bind-dll ewoc (ewoc-enter-after ewoc (ewoc--node-nth dll 0) data))) (defun ewoc-enter-last (ewoc data) - "Enter DATA last in EWOC." + "Enter DATA last in EWOC. +Return the new node." (ewoc--set-buffer-bind-dll ewoc (ewoc-enter-before ewoc (ewoc--node-nth dll -1) data))) (defun ewoc-enter-after (ewoc node data) "Enter a new element DATA after NODE in EWOC. -Returns the new NODE." +Return the new node." (ewoc--set-buffer-bind-dll ewoc (ewoc-enter-before ewoc (ewoc--node-next dll node) data))) (defun ewoc-enter-before (ewoc node data) "Enter a new element DATA before NODE in EWOC. -Returns the new NODE." +Return the new node." (ewoc--set-buffer-bind-dll ewoc (ewoc--node-enter-before node @@ -362,15 +364,15 @@ Returns the new NODE." (ewoc--node-start-marker node))))) (defun ewoc-next (ewoc node) - "Get the next node. -Returns nil if NODE is nil or the last element." + "Return the node in EWOC that follows NODE. +Return nil if NODE is nil or the last element." (when node (ewoc--filter-hf-nodes ewoc (ewoc--node-next (ewoc--dll ewoc) node)))) (defun ewoc-prev (ewoc node) - "Get the previous node. -Returns nil if NODE is nil or the first element." + "Return the node in EWOC that precedes NODE. +Return nil if NODE is nil or the first element." (when node (ewoc--filter-hf-nodes ewoc @@ -497,16 +499,16 @@ If the EWOC is empty, nil is returned." best-guess))))))) (defun ewoc-invalidate (ewoc &rest nodes) - "Refresh some elements. -The pretty-printer set for EWOC will be called for all NODES." + "Call EWOC's pretty-printer for each element in NODES. +Delete current text first, thus effecting a \"refresh\"." (ewoc--set-buffer-bind-dll ewoc (dolist (node nodes) (ewoc--refresh-node (ewoc--pretty-printer ewoc) node)))) (defun ewoc-goto-prev (ewoc arg) - "Move point to the ARGth previous element. + "Move point to the ARGth previous element in EWOC. Don't move if we are at the first element, or if EWOC is empty. -Returns the node we moved to." +Return the node we moved to." (ewoc--set-buffer-bind-dll-let* ewoc ((node (ewoc-locate ewoc (point)))) (when node @@ -522,8 +524,8 @@ Returns the node we moved to." (ewoc-goto-node ewoc node)))) (defun ewoc-goto-next (ewoc arg) - "Move point to the ARGth next element. -Returns the node (or nil if we just passed the last node)." + "Move point to the ARGth next element in EWOC. +Return the node (or nil if we just passed the last node)." (ewoc--set-buffer-bind-dll-let* ewoc ((node (ewoc-locate ewoc (point)))) (while (and node (> arg 0)) @@ -535,7 +537,7 @@ Returns the node (or nil if we just passed the last node)." (ewoc-goto-node ewoc node))) (defun ewoc-goto-node (ewoc node) - "Move point to NODE." + "Move point to NODE in EWOC." (ewoc--set-buffer-bind-dll ewoc (goto-char (ewoc--node-start-marker node)) (if goal-column (move-to-column goal-column)) @@ -586,7 +588,7 @@ remaining arguments will be passed to PREDICATE." (defun ewoc-buffer (ewoc) "Return the buffer that is associated with EWOC. -Returns nil if the buffer has been deleted." +Return nil if the buffer has been deleted." (let ((buf (ewoc--buffer ewoc))) (when (buffer-name buf) buf))) -- cgit v1.2.1 From ac9abffebceff4b26e84b2031db1ca4eb2b76b73 Mon Sep 17 00:00:00 2001 From: Vinicius Jose Latorre Date: Sat, 11 Jun 2005 23:18:57 +0000 Subject: printing v6.8.4 --- lisp/ChangeLog | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 530a589dd8a..ee08bf0c53e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,16 @@ +2005-06-11 Vinicius Jose Latorre + + * printing.el: Doc fix. The menubar is no more changed when printing + is loaded, it only changes when pr-menu-bind or pr-update-menus is + called. + (pr-version): New version number (6.8.4). + (pr-menu-bind): New command. + (pr-update-menus): Docstring and code fix. + (pr-menu-print-item): Now is a global var in Emacs and XEmacs. + Docstring fix. + (pr-txt-printer-alist, pr-ps-printer-alist, pr-gv-command) + (pr-gs-command, pr-gs-switches, pr-ps-utility-alist): Docstring fix. + 2005-06-11 Thien-Thi Nguyen * emacs-lisp/ewoc.el: Doc fixes for public funcs: -- cgit v1.2.1 From b2c9cbd3810d0285d476634020302799049f9670 Mon Sep 17 00:00:00 2001 From: Vinicius Jose Latorre Date: Sat, 11 Jun 2005 23:25:06 +0000 Subject: printing v6.8.4 --- lisp/ChangeLog | 2 +- lisp/printing.el | 364 +++++++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 303 insertions(+), 63 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ee08bf0c53e..dfb5352928e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -2,7 +2,7 @@ * printing.el: Doc fix. The menubar is no more changed when printing is loaded, it only changes when pr-menu-bind or pr-update-menus is - called. + called. Now, the menubar changing will work in Emacs 20, 21 and 22. (pr-version): New version number (6.8.4). (pr-menu-bind): New command. (pr-update-menus): Docstring and code fix. diff --git a/lisp/printing.el b/lisp/printing.el index 41ea0238c6b..868ea3fddf3 100644 --- a/lisp/printing.el +++ b/lisp/printing.el @@ -1,17 +1,17 @@ ;;; printing.el --- printing utilities -;; Copyright (C) 2000, 2001, 2002, 2003, 2004 +;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 ;; Free Software Foundation, Inc. ;; Author: Vinicius Jose Latorre ;; Maintainer: Vinicius Jose Latorre -;; Time-stamp: <2004/11/21 20:56:53 vinicius> +;; Time-stamp: <2005/06/11 19:51:32 vinicius> ;; Keywords: wp, print, PostScript -;; Version: 6.8.3 +;; Version: 6.8.4 ;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/ -(defconst pr-version "6.8.3" - "printing.el, v 6.8.3 <2004/11/17 vinicius> +(defconst pr-version "6.8.4" + "printing.el, v 6.8.4 <2005/06/11 vinicius> Please send all bug fixes and enhancements to Vinicius Jose Latorre @@ -143,7 +143,7 @@ Please send all bug fixes and enhancements to ;; One way to set variables is by calling `pr-customize', customize all ;; variables and save the customization by future sessions (see Options ;; section). Other way is by coding your settings on Emacs init file (that is, -;; .emacs file), see below for a first setting template that it should be +;; ~/.emacs file), see below for a first setting template that it should be ;; inserted on your ~/.emacs file (or c:/_emacs, if you're using Windows 9x/NT ;; or MS-DOS): ;; @@ -259,9 +259,9 @@ Please send all bug fixes and enhancements to ;; PostScript printer. So, please, don't include this printer in ;; `pr-txt-printer-alist' (which see). ;; -;; 5. Use gsprint instead of ghostscript to print monochrome PostScript files -;; in Windows. The gsprint utility is faster than ghostscript to print -;; monochrome PostScript. +;; 5. You can use gsprint instead of ghostscript to print monochrome PostScript +;; files in Windows. The gsprint utility documentation says that it is more +;; efficient than ghostscript to print monochrome PostScript. ;; ;; To print non-monochrome PostScript file, the efficiency of ghostscript ;; is similar to gsprint. @@ -271,6 +271,31 @@ Please send all bug fixes and enhancements to ;; For more information about gsprint see ;; `http://www.cs.wisc.edu/~ghost/gsview/gsprint.htm'. ;; +;; As an example of gsprint declaration: +;; +;; (setq pr-ps-printer-alist +;; '((A "gsprint" ("-all" "-twoup") "-printer " "my-b/w-printer-name") +;; (B "gsprint" ("-all" "-twoup") nil "-printer my-b/w-printer-name") +;; ;; some other printer declaration +;; )) +;; +;; The example above declares that printer A prints all pages (-all) and two +;; pages per sheet (-twoup). The printer B declaration does the same as the +;; printer A declaration, the only difference is the printer name selection. +;; +;; There are other command line options like: +;; +;; -mono Render in monochrome as 1bit/pixel (only black and white). +;; -grey Render in greyscale as 8bits/pixel. +;; -color Render in color as 24bits/pixel. +;; +;; The default is `-mono'. So, printer A and B in the example above are +;; using implicitly the `-mono' option. Note that in `-mono' no gray tone +;; or color is printed, this includes the zebra stripes, that is, in `-mono' +;; the zebra stripes are not printed. +;; +;; See also documentation for `pr-ps-printer-alist'. +;; ;; ;; Using `printing' ;; ---------------- @@ -279,8 +304,10 @@ Please send all bug fixes and enhancements to ;; using Windows 9x/NT or MS-DOS): ;; ;; (require 'printing) +;; ;; ...some user settings... +;; (pr-update-menus t) ;; -;; When `printing' is loaded: +;; During `pr-update-menus' evaluation: ;; * On Emacs 20: ;; it replaces the Tools/Print menu by Tools/Printing menu. ;; * On Emacs 21: @@ -885,6 +912,7 @@ Please send all bug fixes and enhancements to ;; (lps_06b "print" nil nil "\\\\printers\\lps_06b") ;; (lps_07c "print" nil "" "/D:\\\\printers\\lps_07c") ;; (lps_08c nil nil nil "\\\\printers\\lps_08c") +;; (b/w "gsprint" ("-all" "-twoup") "-printer " "b/w-pr-name") ;; (LPT1 "" nil "" "LPT1:") ;; (PRN "" nil "" "PRN") ;; (standard "redpr.exe" nil "" "") @@ -923,6 +951,9 @@ Please send all bug fixes and enhancements to ;; ;; `pr-update-menus' Update utility, PostScript and text printer menus. ;; +;; `pr-menu-bind' Install `printing' menu in the menubar. +;; +;; ;; Below are some URL where you can find good utilities. ;; ;; * For `printing' package: @@ -934,7 +965,7 @@ Please send all bug fixes and enhancements to ;; ;; gs, gv `http://www.gnu.org/software/ghostscript/ghostscript.html' ;; enscript `http://people.ssh.fi/mtr/genscript/' -;; psnup `http://www.dcs.ed.ac.uk/home/ajcd/psutils/index.html' +;; psnup `http://www.knackered.org/angus/psutils/' ;; mpage `http://www.mesa.nl/pub/mpage/' ;; ;; * For Windows system: @@ -943,7 +974,7 @@ Please send all bug fixes and enhancements to ;; `http://www.gnu.org/software/ghostscript/ghostscript.html' ;; gsprint `http://www.cs.wisc.edu/~ghost/gsview/gsprint.htm'. ;; enscript `http://people.ssh.fi/mtr/genscript/' -;; psnup `http://www.dcs.ed.ac.uk/home/ajcd/psutils/index.html' +;; psnup `http://gnuwin32.sourceforge.net/packages/psutils.htm' ;; redmon `http://www.cs.wisc.edu/~ghost/redmon/' ;; ;; @@ -1400,7 +1431,27 @@ Examples: (prt_07c nil nil \"/D:\\\\\\\\printers\\\\prt_07c\") (PRN \"\" nil \"PRN\") (standard \"redpr.exe\" nil \"\") - )" + ) + +Useful links: + +* Information about the print command (print.exe) + `http://www.computerhope.com/printhlp.htm' + +* RedMon - Redirection Port Monitor (redpr.exe) + `http://www.cs.wisc.edu/~ghost/redmon/index.htm' + +* Redirection Port Monitor (redpr.exe on-line help) + `http://www.cs.wisc.edu/~ghost/redmon/en/redmon.htm' + +* UNIX man pages: lpr (or type `man lpr') + `http://bama.ua.edu/cgi-bin/man-cgi?lpr' + `http://www.mediacollege.com/cgi-bin/man/page.cgi?section=all&topic=lpr' + +* UNIX man pages: lp (or type `man lp') + `http://bama.ua.edu/cgi-bin/man-cgi?lp' + `http://www.mediacollege.com/cgi-bin/man/page.cgi?section=all&topic=lp' +" :type '(repeat (list :tag "Text Printer" (symbol :tag "Printer Symbol Name") @@ -1448,6 +1499,7 @@ function (see it for documentation) to update PostScript printer menu." ;; (lps_06b "print" nil nil "\\\\printers\\lps_06b") ;; (lps_07c "print" nil "" "/D:\\\\printers\\lps_07c") ;; (lps_08c nil nil nil "\\\\printers\\lps_08c") + ;; (b/w "gsprint" ("-all" "-twoup") "-printer " "b/w-pr-name") ;; (LPT1 "" nil "" "LPT1:") ;; (PRN "" nil "" "PRN") ;; (standard "redpr.exe" nil "" "") @@ -1486,6 +1538,7 @@ COMMAND Name of the program for printing a PostScript file. On MS-DOS \"lpr\" \"lp\" \"cp\" + \"gsprint\" SWITCHES List of sexp's to pass as extra options for PostScript printer program. It is recommended to set NAME (see text below) @@ -1495,6 +1548,9 @@ SWITCHES List of sexp's to pass as extra options for PostScript printer '(\"-#3\" \"-l\") nil + . for gsprint.exe + '(\"-all\" \"-twoup\") + PRINTER-SWITCH A string that specifies PostScript printer name switch. If it's necessary to have a space between PRINTER-SWITCH and NAME, it should be inserted at the end of PRINTER-SWITCH string. @@ -1511,6 +1567,9 @@ PRINTER-SWITCH A string that specifies PostScript printer name switch. If . for print.exe \"/D:\" + . for gsprint.exe + \"-printer \" + NAME A string that specifies a PostScript printer name. On Unix-like systems, a string value should be a name understood by lpr's -P option (or lp's -d option). @@ -1526,7 +1585,7 @@ NAME A string that specifies a PostScript printer name. . for cp.exe \"\\\\\\\\host\\\\share-name\" - . for print.exe + . for print.exe or gsprint.exe \"/D:\\\\\\\\host\\\\share-name\" \"\\\\\\\\host\\\\share-name\" \"LPT1:\" @@ -1575,10 +1634,80 @@ Examples: (lps_06b \"print\" nil nil \"\\\\\\\\printers\\\\lps_06b\") (lps_07c \"print\" nil \"\" \"/D:\\\\\\\\printers\\\\lps_07c\") (lps_08c nil nil nil \"\\\\\\\\printers\\\\lps_08c\") + (b/w1 \"gsprint\" (\"-all\" \"-twoup\") \"-printer \" \"b/w-pr-name\") + (b/w2 \"gsprint\" (\"-all\" \"-twoup\") nil \"-printer \\\\\\\\printers\\\\lps_06a\") (LPT1 \"\" nil \"\" \"LPT1:\") (PRN \"\" nil \"\" \"PRN\") (standard \"redpr.exe\" nil \"\" \"\") - )" + ) + + +gsprint: + +You can use gsprint instead of ghostscript to print monochrome PostScript files +in Windows. The gsprint utility documentation says that it is more efficient +than ghostscript to print monochrome PostScript. + +To print non-monochrome PostScript file, the efficiency of ghostscript is +similar to gsprint. + +Also the gsprint utility comes together with gsview distribution. + +As an example of gsprint declaration: + + (setq pr-ps-printer-alist + '((A \"gsprint\" (\"-all\" \"-twoup\") \"-printer \" \"lps_015\") + (B \"gsprint\" (\"-all\" \"-twoup\") nil \"-printer lps_015\") + ;; some other printer declaration + )) + +The example above declares that printer A prints all pages (-all) and two pages +per sheet (-twoup). The printer B declaration does the same as the printer A +declaration, the only difference is the printer name selection. + +There are other command line options like: + + -mono Render in monochrome as 1bit/pixel (only black and white). + -grey Render in greyscale as 8bits/pixel. + -color Render in color as 24bits/pixel. + +The default is `-mono'. So, printer A and B in the example above are using +implicitly the `-mono' option. Note that in `-mono' no gray tone or color is +printed, this includes the zebra stripes, that is, in `-mono' the zebra stripes +are not printed. + + +Useful links: + +* GSPRINT - Ghostscript print to Windows printer + `http://www.cs.wisc.edu/~ghost/gsview/gsprint.htm' + +* Introduction to Ghostscript + `http://www.cs.wisc.edu/~ghost/doc/intro.htm' + +* How to use Ghostscript + `http://www.cs.wisc.edu/~ghost/doc/cvs/Use.htm' + +* Information about the print command (print.exe) + `http://www.computerhope.com/printhlp.htm' + +* RedMon - Redirection Port Monitor (redpr.exe) + `http://www.cs.wisc.edu/~ghost/redmon/index.htm' + +* Redirection Port Monitor (redpr.exe on-line help) + `http://www.cs.wisc.edu/~ghost/redmon/en/redmon.htm' + +* UNIX man pages: lpr (or type `man lpr') + `http://bama.ua.edu/cgi-bin/man-cgi?lpr' + `http://www.mediacollege.com/cgi-bin/man/page.cgi?section=all&topic=lpr' + +* UNIX man pages: lp (or type `man lp') + `http://bama.ua.edu/cgi-bin/man-cgi?lp' + `http://www.mediacollege.com/cgi-bin/man/page.cgi?section=all&topic=lp' + +* GNU utilities for Win32 (cp.exe) + `http://unxutils.sourceforge.net/' +" :type '(repeat (list :tag "PostScript Printer" @@ -1674,7 +1803,37 @@ See also `pr-temp-dir' and `pr-ps-temp-file'." "gv") "*Specify path and name of the gsview/gv utility. -See also `pr-path-alist'." +See also `pr-path-alist'. + +Useful links: + +* GNU gv manual + `http://www.gnu.org/software/gv/manual/gv.html' + +* GSview Help + `http://www.cs.wisc.edu/~ghost/gsview/gsviewen.htm' + +* GSview Help - Common Problems + `http://www.cs.wisc.edu/~ghost/gsview/gsviewen.htm#Common_Problems' + +* GSview Readme (compilation & installation) + `http://www.cs.wisc.edu/~ghost/gsview/Readme.htm' + +* GSview (main site) + `http://www.cs.wisc.edu/~ghost/gsview/index.htm' + +* Ghostscript, Ghostview and GSview + `http://www.cs.wisc.edu/~ghost/' + +* Ghostview + `http://www.cs.wisc.edu/~ghost/gv/index.htm' + +* gv 3.5, June 1997 + `http://www.cs.wisc.edu/~ghost/gv/gv_doc/gv.html' + +* MacGSView (MacOS) + `http://www.cs.wisc.edu/~ghost/macos/index.htm' +" :type '(string :tag "Ghostview Utility") :version "20" :group 'printing) @@ -1686,7 +1845,22 @@ See also `pr-path-alist'." "gs") "*Specify path and name of the ghostscript utility. -See also `pr-path-alist'." +See also `pr-path-alist'. + +Useful links: + +* Ghostscript, Ghostview and GSview + `http://www.cs.wisc.edu/~ghost/' + +* Introduction to Ghostscript + `http://www.cs.wisc.edu/~ghost/doc/intro.htm' + +* How to use Ghostscript + `http://www.cs.wisc.edu/~ghost/doc/cvs/Use.htm' + +* Printer compatibility + `http://www.cs.wisc.edu/~ghost/doc/printer.htm' +" :type '(string :tag "Ghostscript Utility") :version "20" :group 'printing) @@ -1717,7 +1891,19 @@ To see ghostscript documentation for more information: - for full documentation, see in a browser the file c:/gstools/gs5.50/index.html, that is, the file index.html which is located in the same directory as gswin32.exe. - - for brief documentation, type: gswin32.exe -h" + - for brief documentation, type: gswin32.exe -h + +Useful links: + +* Introduction to Ghostscript + `http://www.cs.wisc.edu/~ghost/doc/intro.htm' + +* How to use Ghostscript + `http://www.cs.wisc.edu/~ghost/doc/cvs/Use.htm' + +* Printer compatibility + `http://www.cs.wisc.edu/~ghost/doc/printer.htm' +" :type '(repeat (string :tag "Ghostscript Switch")) :version "20" :group 'printing) @@ -2184,7 +2370,35 @@ Examples: '((psnup \"c:/psutils/psnup\" (\"-q\") \"-P%s\" \"-%d\" \"-l\" nil nil \" \" nil (pr-file-duplex . nil) (pr-file-tumble . nil)) - )" + ) + +Useful links: + +* mpage download (GNU or Unix) + `http://www.mesa.nl/pub/mpage/' + +* mpage documentation (GNU or Unix - or type `man mpage') + `http://www.cs.umd.edu/faq/guides/manual_unix/node48.html' + `http://www.rt.com/man/mpage.1.html' + +* psnup (Windows, GNU or Unix) + `http://www.knackered.org/angus/psutils/' + `http://gershwin.ens.fr/vdaniel/Doc-Locale/Outils-Gnu-Linux/PsUtils/' + +* psnup (PsUtils for Windows) + `http://gnuwin32.sourceforge.net/packages/psutils.htm' + +* psnup documentation (GNU or Unix - or type `man psnup') + `http://linux.about.com/library/cmd/blcmdl1_psnup.htm' + `http://amath.colorado.edu/computing/software/man/psnup.html' + +* GNU Enscript (Windows, GNU or Unix) + `http://people.ssh.com/mtr/genscript/' + +* GNU Enscript documentation (Windows, GNU or Unix) + `http://people.ssh.com/mtr/genscript/enscript.man.html' + (on GNU or Unix, type `man enscript') +" :type '(repeat (list :tag "PS File Utility" (symbol :tag "Utility Symbol") @@ -2845,43 +3059,65 @@ See `pr-ps-printer-alist'.") ))) -(cond - ((featurep 'xemacs) ; XEmacs - ;; Menu binding - (pr-xemacs-global-menubar - (pr-x-add-submenu nil (cons "Printing" pr-menu-spec) "Apps"))) +(defvar pr-menu-print-item "print" + "Non-nil means that menu binding was not done. +Used by `pr-menu-bind' and `pr-update-menus'.") - (t ; GNU Emacs - ;; Menu binding - (require 'easymenu) - ;; Replace existing "print" item by "Printing" item. - ;; If you're changing this file, you'll load it a second, - ;; third... time, but "print" item exists only in the first load. - (defvar pr-menu-print-item "print") + +(defun pr-menu-bind () + "Install `printing' menu in the menubar. + +On Emacs 20, it replaces the Tools/Print menu by Tools/Printing menu. + +On Emacs 21 and 22, it replaces the File/Print* menu entries by File/Print +menu. + +Calls `pr-update-menus' to adjust menus." + (interactive) (cond - ;; Emacs 20 - ((string< emacs-version "21.") - (easy-menu-change '("tools") "Printing" pr-menu-spec pr-menu-print-item) - (when pr-menu-print-item - (easy-menu-remove-item nil '("tools") pr-menu-print-item) - (setq pr-menu-print-item nil - pr-menu-bar (vector 'menu-bar 'tools - (pr-get-symbol "Printing"))))) - ;; Emacs 21 - (pr-menu-print-item - (easy-menu-change '("file") "Print" pr-menu-spec "print-buffer") - (let ((items '("print-buffer" "print-region" - "ps-print-buffer-faces" "ps-print-region-faces" - "ps-print-buffer" "ps-print-region"))) - (while items - (easy-menu-remove-item nil '("file") (car items)) - (setq items (cdr items))) - (setq pr-menu-print-item nil - pr-menu-bar (vector 'menu-bar 'file - (pr-get-symbol "Print"))))) - (t - (easy-menu-change '("file") "Print" pr-menu-spec))))) + ((featurep 'xemacs) ; XEmacs + ;; Menu binding + (pr-xemacs-global-menubar + (pr-x-add-submenu nil (cons "Printing" pr-menu-spec) "Apps")) + (setq pr-menu-print-item nil)) + + + (t ; GNU Emacs + ;; Menu binding + (require 'easymenu) + ;; Replace existing "print" item by "Printing" item. + ;; If you're changing this file, you'll load it a second, + ;; third... time, but "print" item exists only in the first load. + (cond + ;; Emacs 20 + ((string< emacs-version "21.") + (easy-menu-change '("tools") "Printing" pr-menu-spec pr-menu-print-item) + (when pr-menu-print-item + (easy-menu-remove-item nil '("tools") pr-menu-print-item) + (setq pr-menu-print-item nil + pr-menu-bar (vector 'menu-bar 'tools + (pr-get-symbol "Printing"))))) + ;; Emacs 21 & 22 + (t + (let* ((has-file (lookup-key global-map (vector 'menu-bar 'file))) + (item-file (if has-file '("file") '("files")))) + (cond + (pr-menu-print-item + (easy-menu-change item-file "Print" pr-menu-spec "print-buffer") + (let ((items '("print-buffer" "print-region" + "ps-print-buffer-faces" "ps-print-region-faces" + "ps-print-buffer" "ps-print-region"))) + (while items + (easy-menu-remove-item nil item-file (car items)) + (setq items (cdr items))) + (setq pr-menu-print-item nil + pr-menu-bar (vector 'menu-bar + (if has-file 'file 'files) + (pr-get-symbol "Print"))))) + (t + (easy-menu-change item-file "Print" pr-menu-spec)))))))) + (pr-update-menus t)) ;; Key binding @@ -4712,12 +4948,20 @@ If FORCE is non-nil, update menus doesn't matter if `pr-ps-printer-alist', otherwise, update PostScript printer menu iff `pr-ps-printer-menu-modified' is non-nil, update text printer menu iff `pr-txt-printer-menu-modified' is non-nil, and update PostScript File menus iff `pr-ps-utility-menu-modified' is -non-nil." +non-nil. + +If menu binding was not done, calls `pr-menu-bind'." (interactive "P") - (pr-update-var 'pr-ps-name pr-ps-printer-alist) - (pr-update-var 'pr-txt-name pr-txt-printer-alist) - (pr-update-var 'pr-ps-utility pr-ps-utility-alist) - (pr-do-update-menus force)) + (if pr-menu-print-item ; since v6.8.4 + ;; There was no menu binding yet, so do it now! + ;; This is a hack to be compatible with old versions of printing. + ;; So, user does not need to change printing calling in init files. + (pr-menu-bind) + ;; Here menu binding is ok. + (pr-update-var 'pr-ps-name pr-ps-printer-alist) + (pr-update-var 'pr-txt-name pr-txt-printer-alist) + (pr-update-var 'pr-ps-utility pr-ps-utility-alist) + (pr-do-update-menus force))) (defvar pr-ps-printer-menu-modified t @@ -6434,10 +6678,6 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order." ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Files are not supposed to change Emacs behavior when you merely load them. -;;; (pr-update-menus t) - - (provide 'printing) -- cgit v1.2.1 From 8e71c318da60b6bc1a02e0c14b859a3c0bb00b23 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sat, 11 Jun 2005 23:52:51 +0000 Subject: (debug-on-entry, cancel-debug-on-entry): Doc fixes. --- lisp/emacs-lisp/debug.el | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'lisp') diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index f1ff37551d7..83e07f6d199 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -614,7 +614,7 @@ Applies to the frame whose line point is on in the backtrace." (terpri)) (with-current-buffer (get-buffer debugger-record-buffer) - (message "%s" + (message "%s" (buffer-substring (line-beginning-position 0) (line-end-position 0))))) @@ -656,22 +656,23 @@ functions to break on entry." ;;;###autoload (defun debug-on-entry (function) "Request FUNCTION to invoke debugger each time it is called. +When called interactively, prompt for FUNCTION in the minibuffer. If you tell the debugger to continue, FUNCTION's execution proceeds. This works by modifying the definition of FUNCTION, which must be written in Lisp, not predefined. Use \\[cancel-debug-on-entry] to cancel the effect of this command. Redefining FUNCTION also cancels it." (interactive "aDebug on entry (to function): ") - (when (and (subrp (symbol-function function)) + (when (and (subrp (symbol-function function)) (eq (cdr (subr-arity (symbol-function function))) 'unevalled)) (error "Function %s is a special form" function)) - (if (or (symbolp (symbol-function function)) + (if (or (symbolp (symbol-function function)) (subrp (symbol-function function))) ;; The function is built-in or aliased to another function. ;; Create a wrapper in which we can add the debug call. (fset function `(lambda (&rest debug-on-entry-args) ,(interactive-form (symbol-function function)) - (apply ',(symbol-function function) + (apply ',(symbol-function function) debug-on-entry-args))) (when (eq (car-safe (symbol-function function)) 'autoload) ;; The function is autoloaded. Load its real definition. @@ -692,7 +693,9 @@ Redefining FUNCTION also cancels it." ;;;###autoload (defun cancel-debug-on-entry (&optional function) "Undo effect of \\[debug-on-entry] on FUNCTION. -If argument is nil or an empty string, cancel for all functions." +If argument is nil or an empty string, cancel for all functions. +When called interactively, prompt for FUNCTION in the minibuffer. +To specify a nil argument interactively, exit with an empty minibuffer." (interactive (list (let ((name (completing-read "Cancel debug on entry (to function): " @@ -739,7 +742,7 @@ If argument is nil or an empty string, cancel for all functions." (defun debug-on-entry-1 (function flag) (let* ((defn (symbol-function function)) (tail defn)) - (when (eq (car-safe tail) 'macro) + (when (eq (car-safe tail) 'macro) (setq tail (cdr tail))) (if (not (eq (car-safe tail) 'lambda)) ;; Only signal an error when we try to set debug-on-entry. -- cgit v1.2.1 From 8b09abe105f3bc293f4f73b320d6a8c102a70ae1 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Sat, 11 Jun 2005 23:56:33 +0000 Subject: Fix `repeat' BNF and `bits 2' example in Commentary. --- lisp/emacs-lisp/bindat.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lisp') diff --git a/lisp/emacs-lisp/bindat.el b/lisp/emacs-lisp/bindat.el index d8b4b4f6c19..7ed01e4bdea 100644 --- a/lisp/emacs-lisp/bindat.el +++ b/lisp/emacs-lisp/bindat.el @@ -85,7 +85,7 @@ ;; (items u8) ;; (fill 3) ;; (item repeat (items) -;; ((struct data-spec))))) +;; (struct data-spec)))) ;; ;; ;; A binary data representation may look like @@ -131,7 +131,7 @@ ;; | ( [FIELD] align LEN ) -- skip to next multiple of LEN bytes ;; | ( [FIELD] struct SPEC_NAME ) ;; | ( [FIELD] union TAG_VAL (TAG SPEC)... [(t SPEC)] ) -;; | ( [FIELD] repeat COUNT SPEC ) +;; | ( [FIELD] repeat COUNT ITEM... ) ;; -- In (eval EXPR), the value of the last field is available in ;; the dynamically bound variable `last'. @@ -151,7 +151,8 @@ ;; -- Note: 32 bit values may be limited by emacs' INTEGER ;; implementation limits. ;; -;; -- Example: bits 2 will map bytes 0x1c 0x28 to list (2 3 7 11 13) +;; -- Example: `bits 2' will unpack 0x28 0x1c to (2 3 4 11 13) +;; and 0x1c 0x28 to (3 5 10 11 12). ;; FIELD ::= ( eval EXPR ) -- use result as NAME ;; | NAME -- cgit v1.2.1 From 32cc0b00092810d3821cb3c4096d4922342a9444 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sun, 12 Jun 2005 00:03:20 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index dfb5352928e..aaa8115921c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2005-06-11 Luc Teirlinck + + * menu-bar.el (menu-bar-make-toggle): Remove stray backslash. + A newline is needed in the docstring there. + + * emacs-lisp/debug.el (debug-on-entry, cancel-debug-on-entry): + Doc fixes. + 2005-06-11 Vinicius Jose Latorre * printing.el: Doc fix. The menubar is no more changed when printing -- cgit v1.2.1 From d02c57d351f178485d0ac225618d30f7450ea739 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sun, 12 Jun 2005 00:04:44 +0000 Subject: (menu-bar-make-toggle): Remove stray backslash. A newline is needed in the docstring there. --- lisp/menu-bar.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index ee51e8c349a..a4552d8f771 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -606,7 +606,7 @@ PROPS are additional properties." `(progn (defun ,name (&optional interactively) ,(concat "Toggle whether to " (downcase (substring help 0 1)) - (substring help 1) ".\ + (substring help 1) ". In an interactive call, record this option as a candidate for saving by \"Save Options\" in Custom buffers.") (interactive "p") -- cgit v1.2.1 From ca0113b85aa9400056fd45296cd97a6e298e11ee Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Sun, 12 Jun 2005 09:00:57 +0000 Subject: (calendar-mode): Use run-mode-hooks. --- lisp/ChangeLog | 4 ++++ lisp/calendar/calendar.el | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index aaa8115921c..10d61e8b747 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2005-06-12 Lute Kamstra + + * calendar/calendar.el (calendar-mode): Use run-mode-hooks. + 2005-06-11 Luc Teirlinck * menu-bar.el (menu-bar-make-toggle): Remove stray backslash. diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 9731d535447..0dee0da67f8 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -2447,7 +2447,6 @@ For a complete description, type \ \\\\[calendar-goto-info-node] from within the calendar. \\\\{calendar-mode-map}" - (kill-all-local-variables) (setq major-mode 'calendar-mode) (setq mode-name "Calendar") @@ -2460,7 +2459,8 @@ For a complete description, type \ (make-local-variable 'displayed-month);; Month in middle of window. (make-local-variable 'displayed-year) ;; Year in middle of window. (set (make-local-variable 'font-lock-defaults) - '(calendar-font-lock-keywords t))) + '(calendar-font-lock-keywords t)) + (run-mode-hooks 'calendar-mode-hook)) (defun calendar-string-spread (strings char length) "Concatenate list of STRINGS separated with copies of CHAR to fill LENGTH. -- cgit v1.2.1 From 3a1524ed89e5be268a53459883fcad95538c4475 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Sun, 12 Jun 2005 10:11:00 +0000 Subject: (Man-mode-map): Initialize it properly. (Man-mode): Set mode-class property to special. --- lisp/ChangeLog | 3 +++ lisp/man.el | 12 +++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 10d61e8b747..f56a50c5441 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2005-06-12 Lute Kamstra + * man.el (Man-mode-map): Initialize it properly. + (Man-mode): Set mode-class property to special. + * calendar/calendar.el (calendar-mode): Use run-mode-hooks. 2005-06-11 Luc Teirlinck diff --git a/lisp/man.el b/lisp/man.el index d7344ed2f7a..0037d132624 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -391,10 +391,11 @@ Otherwise, the value is whatever the function table) "Syntax table used in Man mode buffers.") -(if Man-mode-map - nil - (setq Man-mode-map (copy-keymap button-buffer-map)) +(unless Man-mode-map + (setq Man-mode-map (make-sparse-keymap)) (suppress-keymap Man-mode-map) + (set-keymap-parent Man-mode-map button-buffer-map) + (define-key Man-mode-map " " 'scroll-up) (define-key Man-mode-map "\177" 'scroll-down) (define-key Man-mode-map "n" 'Man-next-section) @@ -410,8 +411,7 @@ Otherwise, the value is whatever the function (define-key Man-mode-map "k" 'Man-kill) (define-key Man-mode-map "q" 'Man-quit) (define-key Man-mode-map "m" 'man) - (define-key Man-mode-map "?" 'describe-mode) - ) + (define-key Man-mode-map "?" 'describe-mode)) ;; buttons (define-button-type 'Man-xref-man-page @@ -1023,6 +1023,8 @@ manpage command." ;; ====================================================================== ;; set up manual mode in buffer and build alists +(put 'Man-mode 'mode-class 'special) + (defun Man-mode () "A mode for browsing Un*x manual pages. -- cgit v1.2.1 From f586d18e58c09c56635747d85adb6a104753cb87 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Sun, 12 Jun 2005 10:26:22 +0000 Subject: (bootstrap-prepare): Don't use an old loaddefs.el. --- lisp/ChangeLog | 2 ++ lisp/Makefile.in | 18 ++++++++---------- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f56a50c5441..7fd8b519dd4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2005-06-12 Lute Kamstra + * Makefile.in (bootstrap-prepare): Don't use an old loaddefs.el. + * man.el (Man-mode-map): Initialize it properly. (Man-mode): Set mode-class property to special. diff --git a/lisp/Makefile.in b/lisp/Makefile.in index 01dbc563bc0..593dcc7fc3f 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -215,21 +215,19 @@ $(lisp)/progmodes/cc-mode.elc: \ # Prepare a bootstrap in the lisp subdirectory. # -# Build loaddefs.el, because it's not sure it's up-to-date, and if it's not, -# that might lead to errors during the bootstrap because something fails to -# autoload as expected. However, if there is no emacs binary, then we can't -# build autoloads yet, so just make sure there's some loaddefs.el file, as -# it's necessary for generating the binary (because loaddefs.el is an -# automatically generated file, we don't want to store it in the source -# repository). +# Build loaddefs.el to make sure it's up-to-date. If it's not, that +# might lead to errors during the bootstrap because something fails to +# autoload as expected. If there is no emacs binary, then we can't +# build autoloads yet. In that case we have to use ldefs-boot.el; +# bootstrap should always work with ldefs-boot.el. (Because +# loaddefs.el is an automatically generated file, we don't want to +# store it in the source repository). bootstrap-prepare: if test -x $(EMACS); then \ $(MAKE) $(MFLAGS) autoloads; \ else \ - if test ! -r $(lisp)/loaddefs.el; then \ - cp $(lisp)/ldefs-boot.el $(lisp)/loaddefs.el; \ - fi \ + cp $(lisp)/ldefs-boot.el $(lisp)/loaddefs.el; \ fi maintainer-clean: distclean -- cgit v1.2.1 From e8dbbf6f02cfdfb571cd5799a0f4364817d49206 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 12 Jun 2005 11:27:31 +0000 Subject: (bootstrap-clean-CMD, bootstrap-clean-SH): Don't use an old loaddefs.el, as in Makefile.in. --- lisp/makefile.w32-in | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'lisp') diff --git a/lisp/makefile.w32-in b/lisp/makefile.w32-in index 54be26a1675..b4569c26140 100644 --- a/lisp/makefile.w32-in +++ b/lisp/makefile.w32-in @@ -286,13 +286,13 @@ recompile: doit # Prepare a bootstrap in the lisp subdirectory. # -# Build loaddefs.el, because it's not sure it's up-to-date, and if it's not, -# that might lead to errors during the bootstrap because something fails to -# autoload as expected. However, if there is no emacs binary, then we can't -# build autoloads yet, so just make sure there's some loaddefs.el file, as -# it's necessary for generating the binary (because loaddefs.el is an -# automatically generated file, we don't want to store it in the source -# repository). +# Build loaddefs.el to make sure it's up-to-date. If it's not, that +# might lead to errors during the bootstrap because something fails to +# autoload as expected. If there is no emacs binary, then we can't +# build autoloads yet. In that case we have to use ldefs-boot.el; +# bootstrap should always work with ldefs-boot.el. (Because +# loaddefs.el is an automatically generated file, we don't want to +# store it in the source repository). # # Remove compiled Lisp files so that bootstrap-emacs will be built from # sources only. @@ -302,15 +302,13 @@ bootstrap-clean: bootstrap-clean-$(SHELLTYPE) loaddefs.el bootstrap-clean-CMD: # if exist $(EMACS) $(MAKE) $(MFLAGS) autoloads - if not exist $(lisp)\loaddefs.el cp $(lisp)/ldefs-boot.el $(lisp)/loaddefs.el + cp $(lisp)/ldefs-boot.el $(lisp)/loaddefs.el -for %%f in (. $(WINS)) do for %%g in (%%f\*.elc) do @$(DEL) %%g bootstrap-clean-SH: # if test -f $(EMACS); then $(MAKE) $(MFLAGS) autoloads; fi # -rm -f $(lisp)/*.elc $(lisp)/*/*.elc - if ! test -r $(lisp)/loaddefs.el; then \ - cp $(lisp)/ldefs-boot.el $(lisp)/loaddefs.el; \ - fi + cp $(lisp)/ldefs-boot.el $(lisp)/loaddefs.el -for dir in . $(WINS); do rm -f $$dir/*.elc; done # Generate/update files for the bootstrap process. -- cgit v1.2.1 From a1e8cad6ea6d8281cdbf7b70d20f5241329da14c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 12 Jun 2005 11:28:55 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7fd8b519dd4..40127c8510a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-06-12 Eli Zaretskii + + * makefile.w32-in (bootstrap-clean-CMD, bootstrap-clean-SH): Don't + use an old loaddefs.el, as in Makefile.in. + 2005-06-12 Lute Kamstra * Makefile.in (bootstrap-prepare): Don't use an old loaddefs.el. -- cgit v1.2.1 From 0e659f576a0f6ee276a979b1fa382b2f1cfd580c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 12 Jun 2005 12:49:00 +0000 Subject: Don't say we are dumping under 2 names on windows-nt and cygwin. --- lisp/ChangeLog | 3 +++ lisp/loadup.el | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 40127c8510a..089682cb588 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2005-06-12 Eli Zaretskii + * loadup.el: Don't say we are dumping under 2 names on windows-nt + and cygwin. + * makefile.w32-in (bootstrap-clean-CMD, bootstrap-clean-SH): Don't use an old loaddefs.el, as in Makefile.in. diff --git a/lisp/loadup.el b/lisp/loadup.el index 53d82323feb..f3a793b252c 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -320,7 +320,7 @@ (setq name (concat (downcase (substring name 0 (match-beginning 0))) "-" (substring name (match-end 0))))) - (if (eq system-type 'ms-dos) + (if (memq system-type '(ms-dos windows-nt cygwin)) (message "Dumping under the name emacs") (message "Dumping under names emacs and %s" name))) (condition-case () -- cgit v1.2.1 From 84ae4908754ec6fbbca63c04f0e48bddace14a81 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 12 Jun 2005 16:57:08 +0000 Subject: Add comment. --- lisp/emacs-lisp/derived.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el index 5ba9c094355..943f052fc6d 100644 --- a/lisp/emacs-lisp/derived.el +++ b/lisp/emacs-lisp/derived.el @@ -1,5 +1,5 @@ ;;; derived.el --- allow inheritance of major modes -;;; (formerly mode-clone.el) +;; (formerly mode-clone.el) ;; Copyright (C) 1993, 1994, 1999, 2003 Free Software Foundation, Inc. @@ -221,6 +221,12 @@ See Info node `(elisp)Derived Modes' for more details." (get (quote ,parent) 'mode-class))) ; Set up maps and tables. (unless (keymap-parent ,map) + ;; It would probably be better to set the keymap's parent + ;; at the toplevel rather than inside the mode function, + ;; but this is not easy for at least the following reasons: + ;; - the parent (and its keymap) may not yet be loaded. + ;; - the parent's keymap name may be called something else + ;; than -mode-map. (set-keymap-parent ,map (current-local-map))) ,(when declare-syntax `(let ((parent (char-table-parent ,syntax))) @@ -440,5 +446,5 @@ Where the new table already has an entry, nothing is copied from the old one." (provide 'derived) -;;; arch-tag: 630be248-47d1-4f02-afa0-8207de0ebea0 +;; arch-tag: 630be248-47d1-4f02-afa0-8207de0ebea0 ;;; derived.el ends here -- cgit v1.2.1 From defa8e19a1824a1dda823acbe67d1bba972d31c0 Mon Sep 17 00:00:00 2001 From: Mark A. Hershberger Date: Sun, 12 Jun 2005 23:04:41 +0000 Subject: Remove stray paren in defun-prompt-regexp for cperl-mode --- lisp/ChangeLog | 5 +++++ lisp/progmodes/cperl-mode.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 089682cb588..4f2cf271fe2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-06-12 Mark A. Hershberger + + * progmodes/cperl-mode.el (cperl-mode): Remove stray paren in + defun-prompt-regexp. + 2005-06-12 Eli Zaretskii * loadup.el: Don't say we are dumping under 2 names on windows-nt diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 85c86bfb6f3..355b9694189 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -1481,7 +1481,7 @@ or as help on variables `cperl-tips', `cperl-problems', (make-local-variable 'comment-start-skip) (setq comment-start-skip "#+ *") (make-local-variable 'defun-prompt-regexp) - (setq defun-prompt-regexp "^[ \t]*sub[ \t\n]+\\([^ \t\n{(;]+\\)\\([ \t\n]*([^()]*)[ \t\n]*\\)?[ \t\n]*)") + (setq defun-prompt-regexp "^[ \t]*sub[ \t\n]+\\([^ \t\n{(;]+\\)\\([ \t\n]*([^()]*)[ \t\n]*\\)?[ \t\n]*") (make-local-variable 'comment-indent-function) (setq comment-indent-function 'cperl-comment-indent) (make-local-variable 'parse-sexp-ignore-comments) -- cgit v1.2.1 From b1412131a8404248be5ef4389c30c10476408159 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Sun, 12 Jun 2005 23:08:51 +0000 Subject: (highlight-changes-colors): Rename from `highlight-changes-colours'. (highlight-changes-colours): Keep as obsolete alias. (highlight-changes-face-list): Doc fix. (hilit-chg-make-list): Use `highlight-changes-colors'. --- lisp/ChangeLog | 8 ++++++++ lisp/hilit-chg.el | 19 +++++++++++-------- 2 files changed, 19 insertions(+), 8 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4f2cf271fe2..e56f7a924ea 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2005-06-13 Juanma Barranquero + + * hilit-chg.el (highlight-changes-colors): Rename from + `highlight-changes-colours'. + (highlight-changes-colours): Keep as obsolete alias. + (highlight-changes-face-list): Doc fix. + (hilit-chg-make-list): Use `highlight-changes-colors'. + 2005-06-12 Mark A. Hershberger * progmodes/cperl-mode.el (cperl-mode): Remove stray paren in diff --git a/lisp/hilit-chg.el b/lisp/hilit-chg.el index 11898c13f00..b6bfb297313 100644 --- a/lisp/hilit-chg.el +++ b/lisp/hilit-chg.el @@ -49,9 +49,9 @@ ;; either explicitly define each face by customizing ;; `highlight-changes-face-list'. If, however, the faces differ from ;; the `highlight-changes' face only in the foreground color, you can simply set -;; `highlight-changes-colours'. If `highlight-changes-face-list' is nil when +;; `highlight-changes-colors'. If `highlight-changes-face-list' is nil when ;; the faces are required they will be constructed from -;; `highlight-changes-colours'. +;; `highlight-changes-colors'. ;; ;; ;; When a Highlight Changes mode is on (either active or passive) you can go @@ -233,9 +233,9 @@ -;; A (not very good) default list of colours to rotate through. +;; A (not very good) default list of colors to rotate through. ;; -(defcustom highlight-changes-colours +(defcustom highlight-changes-colors (if (eq (frame-parameter nil 'background-mode) 'light) ;; defaults for light background: '( "magenta" "blue" "darkgreen" "chocolate" "sienna4" "NavyBlue") @@ -252,6 +252,9 @@ colors then use this, if you want fancier faces then set :type '(repeat color) :group 'highlight-changes) +(define-obsolete-variable-alias 'highlight-changes-colours + 'highlight-changes-colors "22.1") + ;; If you invoke highlight-changes-mode with no argument, should it start in ;; active or passive mode? @@ -381,16 +384,16 @@ remove it from existing buffers." (defcustom highlight-changes-face-list nil "*A list of faces used when rotating changes. Normally the variable is initialized to nil and the list is created from -`highlight-changes-colours' when needed. However, you can set this variable +`highlight-changes-colors' when needed. However, you can set this variable to any list of faces. You will have to do this if you want faces which don't just differ from the `highlight-changes' face by the foreground color. Otherwise, this list will be constructed when needed from -`highlight-changes-colours'." +`highlight-changes-colors'." :type '(choice (repeat :notify hilit-chg-cust-fix-changes-face-list face ) - (const :tag "Derive from highlight-changes-colours" nil) + (const :tag "Derive from highlight-changes-colors" nil) ) :group 'highlight-changes) @@ -731,7 +734,7 @@ Hook variables: ;; so we pick up any changes? (if (or (null highlight-changes-face-list) ; Don't do it if it force) ; already exists unless FORCE non-nil. - (let ((p highlight-changes-colours) + (let ((p highlight-changes-colors) (n 1) name) (setq highlight-changes-face-list nil) (while p -- cgit v1.2.1 From 3fd355d44e10b5ac2c291d6c1b60b50b3554ee60 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Mon, 13 Jun 2005 05:59:58 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e56f7a924ea..379fb41cbba 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2005-06-13 Nick Roberts + + * progmodes/gdb-ui.el (gdb-registers-mode): Let gdbmi use + MI command -data-list-register-values. + (gdb-post-prompt): Indent properly. + 2005-06-13 Juanma Barranquero * hilit-chg.el (highlight-changes-colors): Rename from -- cgit v1.2.1 From 1e539d255bef9e76a8eaa781f69db71f57b636f5 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Mon, 13 Jun 2005 06:01:12 +0000 Subject: (gdb-registers-mode): Let gdbmi use MI command -data-list-register-values. (gdb-post-prompt): Indent properly. --- lisp/progmodes/gdb-ui.el | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) (limited to 'lisp') diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 7e2022cc11c..f61ce717bc7 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -994,24 +994,24 @@ 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-selected-frame) - (gdb-invalidate-frames) - (gdb-invalidate-breakpoints) - ;; 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) - (gdb-invalidate-threads) - (unless (eq system-type 'darwin) ;Breaks on Darwin's GDB-5.3. - ;; FIXME: with GDB-6 on Darwin, this might very well work. - ;; only needed/used with speedbar/watch expressions - (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) - (setq gdb-var-changed t) ; force update - (dolist (var gdb-var-list) - (setcar (nthcdr 5 var) nil)) - (gdb-var-update)))) + (gdb-get-selected-frame) + (gdb-invalidate-frames) + (gdb-invalidate-breakpoints) + ;; 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) + (gdb-invalidate-threads) + (unless (eq system-type 'darwin) ;Breaks on Darwin's GDB-5.3. + ;; FIXME: with GDB-6 on Darwin, this might very well work. + ;; only needed/used with speedbar/watch expressions + (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) + (setq gdb-var-changed t) ; force update + (dolist (var gdb-var-list) + (setcar (nthcdr 5 var) nil)) + (gdb-var-update)))) (let ((sink gdb-output-sink)) (cond ((eq sink 'user) t) @@ -1695,7 +1695,9 @@ static char *magick[] = { (setq buffer-read-only t) (use-local-map gdb-registers-mode-map) (run-mode-hooks 'gdb-registers-mode-hook) - 'gdb-invalidate-registers) + (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) + 'gdb-invalidate-registers + 'gdbmi-invalidate-registers)) (defun gdb-registers-buffer-name () (with-current-buffer gud-comint-buffer -- cgit v1.2.1 From 30313b908d672bd3949df266e8d8a4fd527fa80c Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Mon, 13 Jun 2005 06:42:53 +0000 Subject: (org-CUA-compatible): New option. (org-disputed-keys): New variable. (org-key): New function. (orgtbl-make-binding): Add docstring to the created function. (org-mode): Set paragraph start/separate regexps. (orgtbl-mode): Don't start `orgtbl-mode' in `org-mode' buffers. (org-archive-location, org-archive-mark-done) (org-archive-stamp-time): New options. (org-archive-subtree): New command. (org-fill-paragraph): New function. (org-mode): Set `fill-paragraph-function' to `org-fill-paragraph'. (org-fake-empty-table-line): Function removed. (org-format-org-table-html): Do not create empty table lines at separator lines. Improved table header treatment. (org-link-format): New option. (org-make-link): New function. (org-insert-link, org-store-link): Use org-make-link. (org-open-file): Quote file name for shell command, to allow spaces in file names. (org-link-regexp): Fixed bug with mailto link. (org-link-maybe-angles-regexp, org-protected-link-regexp): New constant. (org-export-as-html): Deal with the optional angles around a link. Better treatment of file: links. (org-open-at-point): Replace @{ and @} with < and >. (org-run-mode-hooks): Function removed. (org-agenda-mode): No longer use `org-run-mode-hooks'. --- lisp/ChangeLog | 30 +++ lisp/textmodes/org.el | 671 ++++++++++++++++++++++++++++++++++---------------- 2 files changed, 492 insertions(+), 209 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 379fb41cbba..ee10a5f787e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,33 @@ +2005-06-13 Carsten Dominik + + * textmodes/org.el: (org-CUA-compatible): New option. + (org-disputed-keys): New variable. + (org-key): New function. + (orgtbl-make-binding): Add docstring to the created function. + (org-mode): Set paragraph start/separate regexps. + (orgtbl-mode): Don't start `orgtbl-mode' in `org-mode' buffers. + (org-archive-location, org-archive-mark-done) + (org-archive-stamp-time): New options. + (org-archive-subtree): New command. + (org-fill-paragraph): New function. + (org-mode): Set `fill-paragraph-function' to `org-fill-paragraph'. + (org-fake-empty-table-line): Function removed. + (org-format-org-table-html): Do not create empty table lines at + separator lines. Improved table header treatment. + (org-link-format): New option. + (org-make-link): New function. + (org-insert-link, org-store-link): Use org-make-link. + (org-open-file): Quote file name for shell command, to allow + spaces in file names. + (org-link-regexp): Fixed bug with mailto link. + (org-link-maybe-angles-regexp, org-protected-link-regexp): New + constant. + (org-export-as-html): Deal with the optional angles around a link. + Better treatment of file: links. + (org-open-at-point): Replace @{ and @} with < and >. + (org-run-mode-hooks): Function removed. + (org-agenda-mode): No longer use `org-run-mode-hooks'. + 2005-06-13 Nick Roberts * progmodes/gdb-ui.el (gdb-registers-mode): Let gdbmi use diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el index 1a9e97dd0b9..bfb2a81294e 100644 --- a/lisp/textmodes/org.el +++ b/lisp/textmodes/org.el @@ -1,11 +1,11 @@ -;; org.el --- Outline-based notes management and organizer +;;; org.el --- Outline-based notes management and organizer ;; Carstens outline-mode for keeping track of everything. ;; Copyright (c) 2004, 2005 Free Software Foundation ;; ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar ;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/ -;; Version: 3.10 +;; Version: 3.11 ;; ;; This file is part of GNU Emacs. ;; @@ -80,6 +80,17 @@ ;; ;; Changes: ;; ------- +;; Version 3.11 +;; - Links inserted with C-c C-l are now by default enclosed in angle +;; brackets. See the new variable `org-link-format'. +;; - ">" terminates a link, this is a way to have several links in a line. +;; - Archiving of finished tasks. +;; - C-/ bindings removed, to allow access to paragraph commands. +;; - Compatibility with CUA-mode (see variable `org-CUA-compatible'). +;; - Compatibility problems with viper-mode fixed. +;; - Improved html export of tables. +;; - Various clean-up changes. +;; ;; Version 3.10 ;; - Using `define-derived-mode' to derive `org-mode' from `outline-mode'. ;; @@ -157,7 +168,7 @@ ;;; Customization variables -(defvar org-version "3.10" +(defvar org-version "3.11" "The version number of the file org.el.") (defun org-version () (interactive) @@ -183,6 +194,44 @@ :tag "Org Startup" :group 'org) +(defcustom org-CUA-compatible nil + "Non-nil means use alternative key bindings for S-. +Org-mode used S- for changing timestamps and priorities. +S- is also used for example by `CUA-mode' to select text. +If you want to use Org-mode together with `CUA-mode', Org-mode needs to use +alternative bindings. Setting this variable to t will replace the following +keys both in Org-mode and in the Org-agenda buffer. + +S-RET -> C-S-RET +S-up -> M-p +S-down -> M-n +S-left -> M-- +S-right -> M-+ + +If you do not like the alternative keys, take a look at the variable +`org-disputed-keys'. + +This option is only relevant at load-time of Org-mode. Changing it requires +a restart of Emacs to become effective." + :group 'org-startup + :type 'boolean) + +(defvar org-disputed-keys + '((S-up [(shift up)] [(meta ?p)]) + (S-down [(shift down)] [(meta ?n)]) + (S-left [(shift left)] [(meta ?-)]) + (S-right [(shift right)] [(meta ?+)]) + (S-return [(shift return)] [(control shift return)])) + "Keys for which Org-mode and other modes compete. +This is an alist, cars are symbols for lookup, 1st element is the default key, +second element will be used when `org-CUA-compatible' is t.") + +(defun org-key (key) + "Select a key according to `org-CUA-compatible'." + (nth (if org-CUA-compatible 2 1) + (or (assq key org-disputed-keys) + (error "Invalid Key %s in `org-key'" key)))) + (defcustom org-startup-folded t "Non-nil means, entering Org-mode will switch to OVERVIEW. This can also be configured on a per-file basis by adding one of @@ -382,19 +431,14 @@ or contain a special line If the file does not specify a category, then file's base name is used instead.") -(defun org-run-mode-hooks (&rest hooks) - "Call `run-mode-hooks' if it is available; otherwise call `run-hooks'." - (if (fboundp 'run-mode-hooks) - (apply 'run-mode-hooks hooks) - (apply 'run-hooks hooks))) - (defun org-set-regexps-and-options () "Precompute regular expressions for current buffer." (when (eq major-mode 'org-mode) (let ((re (org-make-options-regexp - '("CATEGORY" "SEQ_TODO" "PRI_TODO" "TYP_TODO" "STARTUP"))) + '("CATEGORY" "SEQ_TODO" "PRI_TODO" "TYP_TODO" + "STARTUP" "ARCHIVE"))) (splitre "[ \t]+") - kwds int key value cat) + kwds int key value cat arch) (save-excursion (save-restriction (widen) @@ -425,10 +469,16 @@ is used instead.") l var val) (while (setq l (assoc (pop opts) set)) (setq var (nth 1 l) val (nth 2 l)) - (set (make-local-variable var) val))))) + (set (make-local-variable var) val)))) + ((equal key "ARCHIVE") + (string-match " *$" value) + (setq arch (replace-match "" t t value)) + (remove-text-properties 0 (length arch) + '(face t fontified t) arch))) ))) (and cat (set (make-local-variable 'org-category) cat)) (and kwds (set (make-local-variable 'org-todo-keywords) kwds)) + (and arch (set (make-local-variable 'org-archive-location) arch)) (and int (set (make-local-variable 'org-todo-interpretation) int))) ;; Compute the regular expressions and other local variables (setq org-todo-kwd-priority-p (equal org-todo-interpretation 'priority) @@ -469,6 +519,11 @@ is used instead.") :tag "Org Time" :group 'org) +(defconst org-time-stamp-formats '("<%Y-%m-%d %a>" . "<%Y-%m-%d %a %H:%M>") + "Formats for `format-time-string' which are used for time stamps. +It is not recommended to change this constant.") + + (defcustom org-deadline-warning-days 30 "No. of days before expiration during which a deadline becomes active. This variable governs the display in the org file." @@ -672,7 +727,19 @@ the variable `org-agenda-time-grid'." "----------------" (800 1000 1200 1400 1600 1800 2000)) - "FIXME: document" + "The settings for time grid for agenda display. +This is a list of three items. The first item is again a list. It contains +symbols specifying conditions when the grid should be displayed: + + daily if the agenda shows a single day + weekly if the agenda shows an entire week + today show grid on current date, independent of daily/weekly display + require-timed show grid only if at least on item has a time specification + +The second item is a string which will be places behing the grid time. + +The third item is a list of integers, indicating the times that should have +a grid line." :group 'org-agenda :type '(list @@ -756,10 +823,6 @@ t Everywhere except in headlines" (const :tag "Everywhere except in headlines" t) )) -(defconst org-time-stamp-formats '("<%Y-%m-%d %a>" . "<%Y-%m-%d %a %H:%M>") - "Formats for `format-time-string' which are used for time stamps. -It is not recommended to change this constant.") - (defcustom org-show-following-heading t "Non-nil means, show heading following match in `org-occur'. When doing an `org-occur' it is useful to show the headline which @@ -770,12 +833,73 @@ unnecessary clutter." :group 'org-structure :type 'boolean) +(defcustom org-archive-location "%s_archive::" + "The location where subtrees should be archived. +This string consists of two parts, separated by a double-colon. + +The first part is a file name - when omitted, archiving happens in the same +file. %s will be replaced by the current file name (without directory part). +Archiving to a different file is useful to keep archived entries from +contributing to the Org-mode Agenda. + +The part after the double colon is a headline. The archived entries will be +filed under that headline. When omitted, the subtrees are simply filed away +at the end of the file, as top-level entries. + +Here are a few examples: +\"%s_archive::\" + If the current file is Projects.org, archive in file + Projects.org_archive, as top-level trees. This is the default. + +\"::* Archived Tasks\" + Archive in the current file, under the top-level headline + \"* Archived Tasks\". + +\"~/org/archive.org::\" + Archive in file ~/org/archive.org (absolute path), as top-level trees. + +\"basement::** Finished Tasks\" + Archive in file ./basement (relative path), as level 3 trees + below the level 2 heading \"** Finished Tasks\". + +You may set this option on a per-file basis by adding to the buffer a +line like + +#+ARCHIVE: basement::** Finished Tasks" + :group 'org-structure + :type 'string) + +(defcustom org-archive-mark-done t + "Non-nil means, mark archived entries as DONE." + :group 'org-structure + :type 'boolean) + +(defcustom org-archive-stamp-time t + "Non-nil means, add a time stamp to archived entries. +The time stamp will be added directly after the TODO state keyword in the +first line, so it is probably best to use this in combinations with +`org-archive-mark-done'." + :group 'org-structure + :type 'boolean) (defgroup org-link nil "Options concerning links in Org-mode." :tag "Org Link" :group 'org) +(defcustom org-link-format "<%s>" + "Default format for linkes in the buffer. +This is a format string for printf, %s will be replaced by the link text. +If you want to make sure that your link is always properly terminated, +include angle brackets into this format, like \"<%s>\". Some people also +recommend an additional URL: prefix, so the format would be \"\"." + :group 'org-link + :type '(choice + (const :tag "\"%s\" (e.g. http://www.there.com)" "%s") + (const :tag "\"<%s>\" (e.g. )" "<%s>") + (const :tag "\"\" (e.g. )" "") + (string :tag "Other" :value "<%s>"))) + (defcustom org-allow-space-in-links t "Non-nil means, file names in links may contain space characters. When nil, it becomes possible to put several links into a line. @@ -1321,8 +1445,6 @@ Otherwise, the buffer will just be saved to a file and stay hidden." (t (:inverse-video t :bold t))) "Face used for level 1 headlines." :group 'org-faces) -;; backward-compatibility alias -(put 'org-level-1-face 'face-alias 'org-level-1) (defface org-level-2 ;; font-lock-variable-name-face '((((type tty) (class color)) (:foreground "yellow" :weight light)) @@ -1331,8 +1453,6 @@ Otherwise, the buffer will just be saved to a file and stay hidden." (t (:bold t :italic t))) "Face used for level 2 headlines." :group 'org-faces) -;; backward-compatibility alias -(put 'org-level-2-face 'face-alias 'org-level-2) (defface org-level-3 ;; font-lock-keyword-face '((((type tty) (class color)) (:foreground "cyan" :weight bold)) @@ -1341,10 +1461,8 @@ Otherwise, the buffer will just be saved to a file and stay hidden." (t (:bold t))) "Face used for level 3 headlines." :group 'org-faces) -;; backward-compatibility alias -(put 'org-level-3-face 'face-alias 'org-level-3) -(defface org-level-4 ;; font-lock-comment-face +(defface org-level-4 ;; font-lock-comment-face '((((type tty pc) (class color) (background light)) (:foreground "red")) (((type tty pc) (class color) (background dark)) (:foreground "red1")) (((class color) (background light)) (:foreground "Firebrick")) @@ -1352,8 +1470,6 @@ Otherwise, the buffer will just be saved to a file and stay hidden." (t (:bold t :italic t))) "Face used for level 4 headlines." :group 'org-faces) -;; backward-compatibility alias -(put 'org-level-4-face 'face-alias 'org-level-4) (defface org-level-5 ;; font-lock-type-face '((((type tty) (class color)) (:foreground "green")) @@ -1362,8 +1478,6 @@ Otherwise, the buffer will just be saved to a file and stay hidden." (t (:bold t :underline t))) "Face used for level 5 headlines." :group 'org-faces) -;; backward-compatibility alias -(put 'org-level-5-face 'face-alias 'org-level-5) (defface org-level-6 ;; font-lock-constant-face '((((type tty) (class color)) (:foreground "magenta")) @@ -1372,8 +1486,6 @@ Otherwise, the buffer will just be saved to a file and stay hidden." (t (:bold t :underline t))) "Face used for level 6 headlines." :group 'org-faces) -;; backward-compatibility alias -(put 'org-level-6-face 'face-alias 'org-level-6) (defface org-level-7 ;; font-lock-builtin-face '((((type tty) (class color)) (:foreground "blue" :weight light)) @@ -1382,8 +1494,6 @@ Otherwise, the buffer will just be saved to a file and stay hidden." (t (:bold t))) "Face used for level 7 headlines." :group 'org-faces) -;; backward-compatibility alias -(put 'org-level-7-face 'face-alias 'org-level-7) (defface org-level-8 ;; font-lock-string-face '((((type tty) (class color)) (:foreground "green")) @@ -1392,8 +1502,6 @@ Otherwise, the buffer will just be saved to a file and stay hidden." (t (:italic t))) "Face used for level 8 headlines." :group 'org-faces) -;; backward-compatibility alias -(put 'org-level-8-face 'face-alias 'org-level-8) (defface org-warning ;; font-lock-warning-face '((((type tty) (class color)) (:foreground "red")) @@ -1403,14 +1511,12 @@ Otherwise, the buffer will just be saved to a file and stay hidden." (t (:inverse-video t :bold t))) "Face for deadlines and TODO keywords." :group 'org-faces) -;; backward-compatibility alias -(put 'org-warning-face 'face-alias 'org-warning) (defcustom org-fontify-done-headline nil "Non-nil means, change the face of a headline if it is marked DONE. Normally, only the TODO/DONE keyword indicates the state of a headline. When this is non-nil, the headline after the keyword is set to the -`org-headline-done-face' as an additional indication." +`org-headline-done' as an additional indication." :group 'org-faces :type 'boolean) @@ -1422,8 +1528,6 @@ When this is non-nil, the headline after the keyword is set to the "Face used to indicate that a headline is DONE. See also the variable `org-fontify-done-headline'." :group 'org-faces) -;; backward-compatibility alias -(put 'org-headline-done-face 'face-alias 'org-headline-done) ;; Inheritance does not yet work for xemacs. So we just copy... @@ -1434,8 +1538,6 @@ When this is non-nil, the headline after the keyword is set to the (t (:inverse-video t :bold t))) "Face for upcoming deadlines." :group 'org-faces) -;; backward-compatibility alias -(put 'org-deadline-announce-face 'face-alias 'org-deadline-announce) (defface org-scheduled-today '((((type tty) (class color)) (:foreground "green")) @@ -1444,8 +1546,6 @@ When this is non-nil, the headline after the keyword is set to the (t (:bold t :underline t))) "Face for items scheduled for a certain day." :group 'org-faces) -;; backward-compatibility alias -(put 'org-scheduled-today-face 'face-alias 'org-scheduled-today) (defface org-scheduled-previously '((((type tty pc) (class color) (background light)) (:foreground "red")) @@ -1455,8 +1555,6 @@ When this is non-nil, the headline after the keyword is set to the (t (:bold t :italic t))) "Face for items scheduled previously, and not yet done." :group 'org-faces) -;; backward-compatibility alias -(put 'org-scheduled-previously-face 'face-alias 'org-scheduled-previously) (defface org-link '((((type tty) (class color)) (:foreground "cyan" :weight bold)) @@ -1465,8 +1563,6 @@ When this is non-nil, the headline after the keyword is set to the (t (:bold t))) "Face for links." :group 'org-faces) -;; backward-compatibility alias -(put 'org-link-face 'face-alias 'org-link) (defface org-done ;; font-lock-type-face '((((type tty) (class color)) (:foreground "green")) @@ -1475,8 +1571,6 @@ When this is non-nil, the headline after the keyword is set to the (t (:bold t :underline t))) "Face used for DONE." :group 'org-faces) -;; backward-compatibility alias -(put 'org-done-face 'face-alias 'org-done) (defface org-table ;; font-lock-function-name-face '((((type tty) (class color)) (:foreground "blue" :weight bold)) @@ -1485,8 +1579,6 @@ When this is non-nil, the headline after the keyword is set to the (t (:inverse-video t :bold t))) "Face used for tables." :group 'org-faces) -;; backward-compatibility alias -(put 'org-table-face 'face-alias 'org-table) (defface org-time-grid ;; font-lock-variable-name-face '((((type tty) (class color)) (:foreground "yellow" :weight light)) @@ -1495,8 +1587,6 @@ When this is non-nil, the headline after the keyword is set to the (t (:bold t :italic t))) "Face used for level 2 headlines." :group 'org-faces) -;; backward-compatibility alias -(put 'org-time-grid-face 'face-alias 'org-time-grid) (defvar org-level-faces '( @@ -1602,6 +1692,9 @@ The following commands are available: (make-local-hook 'before-change-functions) ;; needed for XEmacs (add-hook 'before-change-functions 'org-before-change-function nil 'local) + ;; Paragraph regular expressions + (set (make-local-variable 'paragraph-separate) "\f\\|[ ]*$") + (set (make-local-variable 'paragraph-start) "\f\\|[ ]*$\\|\\([*\f]+\\)") ;; Inhibit auto-fill for headers, tables and fixed-width lines. (set (make-local-variable 'auto-fill-inhibit-regexp) (concat "\\*" @@ -1611,6 +1704,7 @@ The following commands are available: (if org-enable-table-editor "|" "") (if org-enable-fixed-width-editor ":" "") "]")))) + (set (make-local-variable 'fill-paragraph-function) 'org-fill-paragraph) (if (and org-insert-mode-line-in-empty-file (interactive-p) (= (point-min) (point-max))) @@ -1625,6 +1719,12 @@ The following commands are available: (let ((this-command 'org-cycle) (last-command 'org-cycle)) (org-cycle '(4)) (org-cycle '(4)))))))) +(defun org-fill-paragraph (&optional justify) + "Re-align a table, pass through to fill-paragraph if no table." + (save-excursion + (beginning-of-line 1) + (looking-at "\\s-*\\(|\\|\\+-+\\)"))) + ;;; Font-Lock stuff (defvar org-mouse-map (make-sparse-keymap)) @@ -1635,15 +1735,22 @@ The following commands are available: (require 'font-lock) -(defconst org-non-link-chars "\t\n\r|") +(defconst org-non-link-chars "\t\n\r|<>\000") (defconst org-link-regexp (if org-allow-space-in-links (concat - "\\(https?\\|ftp\\|mailto|\\|file\\|news\\|bbdb\\|vm\\|wl\\|rmail\\|gnus\\|shell\\):\\([^" org-non-link-chars "]+[^ " org-non-link-chars "]\\)") + "\\(https?\\|ftp\\|mailto\\|file\\|news\\|bbdb\\|vm\\|wl\\|rmail\\|gnus\\|shell\\):\\([^" org-non-link-chars "]+[^ " org-non-link-chars "]\\)") (concat "\\(https?\\|ftp\\|mailto\\|file\\|news\\|bbdb\\|vm\\|wl\\|rmail\\|gnus\\|shell\\):\\([^ " org-non-link-chars "]+\\)") ) "Regular expression for matching links.") +(defconst org-link-maybe-angles-regexp + (concat "?") + "Matches a link and optionally surrounding angle brackets.") +(defconst org-protected-link-regexp + (concat "\000" org-link-regexp "\000") + "Matches a link and optionally surrounding angle brackets.") + (defconst org-ts-lengths (cons (length (format-time-string (car org-time-stamp-formats))) (length (format-time-string (cdr org-time-stamp-formats)))) @@ -1704,7 +1811,7 @@ The following commands are available: '("\\" (0 'org-warning t)) (list (concat "^\\*+[ \t]*\\<\\(" org-comment-string "\\)\\>") '(1 'org-warning t)) - '("^#.*" (0 font-lock-comment-face t)) + '("^#.*" (0 'font-lock-comment-face t)) (if org-fontify-done-headline (list (concat "^[*]+ +\\<\\(" org-done-string "\\)\\(.*\\)\\>") '(1 'org-done t) '(2 'org-headline-done t)) @@ -1923,12 +2030,12 @@ Optional argument N means, put the headline into the Nth line of the window." (let ((cmds '(isearch-forward isearch-backward)) cmd) (while (setq cmd (pop cmds)) (substitute-key-definition cmd cmd org-goto-map global-map))) -(define-key org-goto-map [(return)] 'org-goto-ret) +(define-key org-goto-map "\C-m" 'org-goto-ret) (define-key org-goto-map [(left)] 'org-goto-left) (define-key org-goto-map [(right)] 'org-goto-right) (define-key org-goto-map [(?q)] 'org-goto-quit) (define-key org-goto-map [(control ?g)] 'org-goto-quit) -(define-key org-goto-map [(tab)] 'org-cycle) +(define-key org-goto-map "\C-i" 'org-cycle) (define-key org-goto-map [(down)] 'outline-next-visible-heading) (define-key org-goto-map [(up)] 'outline-previous-visible-heading) (define-key org-goto-map "n" 'outline-next-visible-heading) @@ -2313,15 +2420,21 @@ If optional TREE is given, use this text instead of the kill ring." (- (match-end 0) (match-beginning 0))) (t nil))) (previous-level (save-excursion - (outline-previous-visible-heading 1) - (if (looking-at re) - (- (match-end 0) (match-beginning 0)) - 1))) + (condition-case nil + (progn + (outline-previous-visible-heading 1) + (if (looking-at re) + (- (match-end 0) (match-beginning 0)) + 1)) + (error 1)))) (next-level (save-excursion - (outline-next-visible-heading 1) - (if (looking-at re) - (- (match-end 0) (match-beginning 0)) - 1))) + (condition-case nil + (progn + (outline-next-visible-heading 1) + (if (looking-at re) + (- (match-end 0) (match-beginning 0)) + 1)) + (error 1)))) (new-level (or force-level (max previous-level next-level))) (shift (if (or (= old-level -1) (= new-level -1) @@ -2380,6 +2493,102 @@ If optional TXT is given, check this string instead of the current kill." (throw 'exit nil))) t)))) +(defun org-archive-subtree () + "Move the current subtree to the archive. +The archive can be a certain top-level heading in the current file, or in +a different file. The tree will be moved to that location, the subtree +heading be marked DONE, and the current time will be added." + (interactive) + ;; Save all relevant TODO keyword-relatex variables + (let ((tr-org-todo-line-regexp org-todo-line-regexp) ; keep despite compiler + (tr-org-todo-keywords org-todo-keywords) + (tr-org-todo-interpretation org-todo-interpretation) + (tr-org-done-string org-done-string) + (tr-org-todo-regexp org-todo-regexp) + (tr-org-todo-line-regexp org-todo-line-regexp) + (this-buffer (current-buffer)) + file heading buffer level newfile-p) + (if (string-match "\\(.*\\)::\\(.*\\)" org-archive-location) + (progn + (setq file (format (match-string 1 org-archive-location) + (file-name-nondirectory (buffer-file-name))) + heading (match-string 2 org-archive-location))) + (error "Invalid `org-archive-location'")) + (if (> (length file) 0) + (setq newfile-p (not (file-exists-p file)) + buffer (find-file-noselect file)) + (setq buffer (current-buffer))) + (unless buffer + (error "Cannot access file \"%s\"" file)) + (if (and (> (length heading) 0) + (string-match "^\\*+" heading)) + (setq level (match-end 0)) + (setq heading nil level 0)) + (save-excursion + (org-copy-subtree) ; We first only copy, in case something goes wrong + (set-buffer buffer) + ;; Enforce org-mode for the archive buffer + (if (not (eq major-mode 'org-mode)) + ;; Force the mode for future visits. + (let ((org-insert-mode-line-in-empty-file t)) + (call-interactively 'org-mode))) + (when newfile-p + (goto-char (point-max)) + (insert (format "\nArchived entries from file %s\n\n" + (buffer-file-name this-buffer)))) + ;; Force the TODO keywords of the original buffer + (let ((org-todo-line-regexp tr-org-todo-line-regexp) + (org-todo-keywords tr-org-todo-keywords) + (org-todo-interpretation tr-org-todo-interpretation) + (org-done-string tr-org-done-string) + (org-todo-regexp tr-org-todo-regexp) + (org-todo-line-regexp tr-org-todo-line-regexp)) + (goto-char (point-min)) + (if heading + (progn + (if (re-search-forward + (concat "\\(^\\|\r\\)" + (regexp-quote heading) "[ \t]*\\($\\|\r\\)") + nil t) + (goto-char (match-end 0)) + ;; Heading not found, just insert it at the end + (goto-char (point-max)) + (or (bolp) (insert "\n")) + (insert "\n" heading "\n") + (end-of-line 0)) + ;; Make the heading visible, and the following as well + (let ((org-show-following-heading t)) (org-show-hierarchy-above)) + (if (re-search-forward + (concat "^" (regexp-quote (make-string level ?*)) "[ \t]") + nil t) + (progn (goto-char (match-beginning 0)) (insert "\n") + (beginning-of-line 0)) + (goto-char (point-max)) (insert "\n"))) + (goto-char (point-max)) (insert "\n")) + ;; Paste + (org-paste-subtree (1+ level)) + ;; Mark the entry as done, i.e. set to last work in org-todo-keywords + (if org-archive-mark-done + (org-todo (length org-todo-keywords))) + ;; Move cursor to right after the TODO keyword + (when org-archive-stamp-time + (beginning-of-line 1) + (looking-at org-todo-line-regexp) + (goto-char (or (match-end 2) (match-beginning 3))) + (insert "(" (format-time-string (cdr org-time-stamp-formats) + (current-time)) + ")")) + ;; Save the buffer, if it is not the same buffer. + (if (not (eq this-buffer buffer)) (save-buffer)))) + ;; Here we are back in the original buffer. Everything seems to have + ;; worked. So now cut the tree and finish up. + (org-cut-subtree) + (if (looking-at "[ \t]*$") (kill-line)) + (message "Subtree archived %s" + (if (eq this-buffer buffer) + (concat "under heading: " heading) + (concat "in file: " (abbreviate-file-name file)))))) + ;;; Completion (defun org-complete (&optional arg) @@ -3130,6 +3339,7 @@ If there is already a time stamp at the cursor position, update it." (defvar org-agenda-follow-mode nil) (defvar org-agenda-buffer-name "*Org Agenda*") (defvar org-agenda-redo-command nil) +(defvar org-agenda-mode-hook nil) ;;;###autoload (defun org-agenda-mode () @@ -3156,19 +3366,21 @@ The following commands are available: "--") (mapcar 'org-file-menu-entry org-agenda-files))) (org-agenda-set-mode-name) - (org-run-mode-hooks 'org-agenda-mode-hook)) + (apply + (if (fboundp 'run-mode-hooks) 'run-mode-hooks 'run-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) -(define-key org-agenda-mode-map " " 'org-agenda-show) +(define-key org-agenda-mode-map "\C-i" 'org-agenda-goto) +(define-key org-agenda-mode-map "\C-m" 'org-agenda-switch-to) +(define-key org-agenda-mode-map " " 'org-agenda-show) (define-key org-agenda-mode-map "\C-c\C-t" 'org-agenda-todo) -(define-key org-agenda-mode-map "o" 'delete-other-windows) -(define-key org-agenda-mode-map "l" 'org-agenda-recenter) -(define-key org-agenda-mode-map "t" 'org-agenda-todo) -(define-key org-agenda-mode-map "." 'org-agenda-goto-today) -(define-key org-agenda-mode-map "w" 'org-agenda-toggle-week-view) -(define-key org-agenda-mode-map [(shift right)] 'org-agenda-date-later) -(define-key org-agenda-mode-map [(shift left)] 'org-agenda-date-earlier) +(define-key org-agenda-mode-map "o" 'delete-other-windows) +(define-key org-agenda-mode-map "l" 'org-agenda-recenter) +(define-key org-agenda-mode-map "t" 'org-agenda-todo) +(define-key org-agenda-mode-map "." 'org-agenda-goto-today) +(define-key org-agenda-mode-map "w" 'org-agenda-toggle-week-view) +(define-key org-agenda-mode-map (org-key 'S-right) 'org-agenda-date-later) +(define-key org-agenda-mode-map (org-key 'S-left) 'org-agenda-date-earlier) (define-key org-agenda-mode-map ">" 'org-agenda-date-prompt) (let ((l '(1 2 3 4 5 6 7 8 9 0))) @@ -3202,8 +3414,8 @@ The following commands are available: (define-key org-agenda-mode-map "H" 'org-agenda-holidays) (define-key org-agenda-mode-map "+" 'org-agenda-priority-up) (define-key org-agenda-mode-map "-" 'org-agenda-priority-down) -(define-key org-agenda-mode-map [(shift up)] 'org-agenda-priority-up) -(define-key org-agenda-mode-map [(shift down)] 'org-agenda-priority-down) +(define-key org-agenda-mode-map (org-key 'S-up) 'org-agenda-priority-up) +(define-key org-agenda-mode-map (org-key 'S-down) 'org-agenda-priority-down) (define-key org-agenda-mode-map [(right)] 'org-agenda-later) (define-key org-agenda-mode-map [(left)] 'org-agenda-earlier) @@ -3373,7 +3585,8 @@ dates." (number-to-string (extract-calendar-day date)) " " (calendar-month-name (extract-calendar-month date)) " " (number-to-string (extract-calendar-year date)) "\n") - (put-text-property s (1- (point)) 'face 'org-link) + (put-text-property s (1- (point)) 'face + 'org-link) (if (equal d today) (put-text-property s (1- (point)) 'org-today t)) (insert (org-finalize-agenda-entries rtn) "\n") @@ -3452,7 +3665,7 @@ NDAYS defaults to `org-agenda-ndays'." (when rtnall (insert "ALL CURRENTLY OPEN TODO ITEMS:\n") (add-text-properties (point-min) (1- (point)) - (list 'face 'org-link)) + (list 'face 'org-link)) (insert (org-finalize-agenda-entries rtnall) "\n"))) (while (setq d (pop day-numbers)) (setq date (calendar-gregorian-from-absolute d) @@ -3481,7 +3694,8 @@ NDAYS defaults to `org-agenda-ndays'." (extract-calendar-day date) (calendar-month-name (extract-calendar-month date)) (extract-calendar-year date))) - (put-text-property s (1- (point)) 'face 'org-link) + (put-text-property s (1- (point)) 'face + 'org-link) (if rtnall (insert (org-finalize-agenda-entries ;; FIXME: condition needed (org-agenda-add-time-grid-maybe @@ -4055,7 +4269,8 @@ the documentation of `org-diary'." (if deadlinep (add-text-properties 0 (length txt) - (list 'face (if donep 'org-done 'org-warning) + (list 'face + (if donep 'org-done 'org-warning) 'undone-face 'org-warning 'done-face 'org-done 'priority (+ 100 priority)) @@ -4436,6 +4651,7 @@ HH:MM." (defun org-entries-lessp (a b) "Predicate for sorting agenda entries." + ;; The following variables will be used when the form is evaluated. (let* ((time-up (org-cmp-time a b)) (time-down (if time-up (- time-up) nil)) (priority-up (org-cmp-priority a b)) @@ -4836,7 +5052,8 @@ optional argument IN-EMACS is non-nil, Emacs will visit the file." (let (type path line (pos (point))) (save-excursion (skip-chars-backward - (if org-allow-space-in-links "^\t\n\r" "^ \t\n\r")) + (concat (if org-allow-space-in-links "^" "^ ") + org-non-link-chars)) (if (re-search-forward org-link-regexp (save-excursion @@ -4901,6 +5118,10 @@ optional argument IN-EMACS is non-nil, Emacs will visit the file." ((string= type "shell") (let ((cmd path)) + (while (string-match "@{" cmd) + (setq cmd (replace-match "<" t t cmd))) + (while (string-match "@}" cmd) + (setq cmd (replace-match ">" t t cmd))) (if (or (not org-confirm-shell-links) (yes-or-no-p (format "Execute \"%s\" in the shell? " cmd))) (shell-command cmd) @@ -5032,7 +5253,7 @@ If the file does not exist, an error is thrown." (cdr (assoc t apps))))) (cond ((and (stringp cmd) (not (string-match "^\\s-*$" cmd))) - (setq cmd (format cmd file)) + (setq cmd (format cmd (concat "\"" file "\""))) (save-window-excursion (shell-command (concat cmd " & &")))) ((or (stringp cmd) @@ -5078,9 +5299,11 @@ For file links, arg negates `org-line-numbers-in-file-links'." (cond ((eq major-mode 'bbdb-mode) - (setq link (concat "bbdb:" - (or (bbdb-record-name (bbdb-current-record)) - (bbdb-record-company (bbdb-current-record)))))) + (setq cpltxt (concat + "bbdb:" + (or (bbdb-record-name (bbdb-current-record)) + (bbdb-record-company (bbdb-current-record)))) + link (org-make-link cpltxt))) ((eq major-mode 'calendar-mode) (let ((cd (calendar-cursor-to-date))) @@ -5107,8 +5330,9 @@ For file links, arg negates `org-line-numbers-in-file-links'." folder) (setq folder (replace-match "" t t folder))) (setq cpltxt (concat author " on: " subject)) - (setq link (concat cpltxt "\n " "vm:" folder - "#" message-id))))) + (setq link (concat cpltxt "\n " + (org-make-link + "vm:" folder "#" message-id)))))) ((eq major-mode 'wl-summary-mode) (let* ((msgnum (wl-summary-message-number)) @@ -5119,8 +5343,10 @@ For file links, arg negates `org-line-numbers-in-file-links'." (author (wl-summary-line-from)) ; FIXME: how to get author name? (subject "???")) ; FIXME: How to get subject of email? (setq cpltxt (concat author " on: " subject)) - (setq link (concat cpltxt "\n " "wl:" wl-summary-buffer-folder-name - "#" message-id)))) + (setq link (concat cpltxt "\n " + (org-make-link + "wl:" wl-summary-buffer-folder-name + "#" message-id))))) ((eq major-mode 'rmail-mode) (save-excursion @@ -5131,8 +5357,9 @@ For file links, arg negates `org-line-numbers-in-file-links'." (author (mail-fetch-field "from")) (subject (mail-fetch-field "subject"))) (setq cpltxt (concat author " on: " subject)) - (setq link (concat cpltxt "\n " "rmail:" folder - "#" message-id)))))) + (setq link (concat cpltxt "\n " + (org-make-link + "rmail:" folder "#" message-id))))))) ((eq major-mode 'gnus-group-mode) (let ((group (cond ((fboundp 'gnus-group-group-name) ; depending on Gnus @@ -5140,11 +5367,12 @@ For file links, arg negates `org-line-numbers-in-file-links'." ((fboundp 'gnus-group-name) (gnus-group-name)) (t "???")))) - (setq link (concat - (if (org-xor arg org-usenet-links-prefer-google) - "http://groups.google.com/groups?group=" - "gnus:") - group)))) + (setq cpltxt (concat + (if (org-xor arg org-usenet-links-prefer-google) + "http://groups.google.com/groups?group=" + "gnus:") + group) + link (org-make-link cpltxt)))) ((memq major-mode '(gnus-summary-mode gnus-article-mode)) (and (eq major-mode 'gnus-article-mode) (gnus-article-show-summary)) @@ -5163,27 +5391,34 @@ For file links, arg negates `org-line-numbers-in-file-links'." cpltxt "\n " (format "http://groups.google.com/groups?as_umsgid=%s" (org-fixup-message-id-for-http message-id)))) - (setq link (concat cpltxt "\n" "gnus:" group - "#" (number-to-string article)))))) + (setq link (concat cpltxt "\n" + (org-make-link + "gnus:" group + "#" (number-to-string article))))))) ((eq major-mode 'w3-mode) - (setq link (url-view-url t))) + (setq cpltxt (url-view-url t) + link (org-make-link cpltxt))) ((eq major-mode 'w3m-mode) - (setq link w3m-current-url)) + (setq cpltxt w3m-current-url + link (org-make-link cpltxt))) ((buffer-file-name) ;; Just link to this file here. - (setq link (concat "file:" - (abbreviate-file-name (buffer-file-name)))) + (setq cpltxt (concat "file:" + (abbreviate-file-name (buffer-file-name)))) ;; Add the line number? (if (org-xor org-line-numbers-in-file-links arg) - (setq link - (concat link + (setq cpltxt + (concat cpltxt ":" (int-to-string (+ (if (bolp) 1 0) (count-lines - (point-min) (point)))))))) + (point-min) (point))))))) + (setq link (org-make-link cpltxt))) + ((interactive-p) (error "Cannot link to a buffer which is not visiting a file")) + (t (setq link nil))) (if (and (interactive-p) link) @@ -5193,6 +5428,10 @@ For file links, arg negates `org-line-numbers-in-file-links'." (message "Stored: %s" (or cpltxt link))) link))) +(defun org-make-link (&rest strings) + "Concatenate STRINGS, format resulting string with `org-link-format'." + (format org-link-format (apply 'concat strings))) + (defun org-xor (a b) "Exclusive or." (if a (not b) b)) @@ -5237,7 +5476,8 @@ For file links, arg negates `org-line-numbers-in-file-links'." Completion can be used to select a link previously stored with `org-store-link'. When the empty string is entered (i.e. if you just press RET at the prompt), the link defaults to the most recently -stored link. +stored link. As SPC triggers completion in the minibuffer, you need to +use M-SPC or C-q SPC to force the insertion of a space character. With a \\[universal-argument] prefix, prompts for a file to link to. The file name can be selected using completion. The path to the file will be relative to @@ -5261,15 +5501,20 @@ is in the current directory or below." (let ((pwd (file-name-as-directory (expand-file-name ".")))) (cond ((equal complete-file '(16)) - (insert "file:" (abbreviate-file-name (expand-file-name link)))) + (insert + (org-make-link + "file:" (abbreviate-file-name (expand-file-name link))))) ((string-match (concat "^" (regexp-quote pwd) "\\(.+\\)") (expand-file-name link)) - (insert "file:" (match-string 1 (expand-file-name link)))) - (t (insert "file:" link)))) + (insert + (org-make-link + "file:" (match-string 1 (expand-file-name link))))) + (t (insert (org-make-link "file:" link))))) (setq linktxt (cdr (assoc link org-stored-links))) (if (not org-keep-stored-link-after-insertion) (setq org-stored-links (delq (assoc link org-stored-links) org-stored-links))) + (if (not linktxt) (setq link (org-make-link link))) (let ((lines (org-split-string (or linktxt link) "\n"))) (insert (car lines)) (setq matched (string-match org-link-regexp (car lines))) @@ -5937,7 +6182,8 @@ However, when FORCE is non-nil, create new columns if necessary." (if (looking-at " ") (forward-char 1)))))) (defun org-at-table-p (&optional table-type) - "Return t if the cursor is inside an org-type table." + "Return t if the cursor is inside an org-type table. +If TABLE-TYPE is non-nil, also chack for table.el-type tables." (if org-enable-table-editor (save-excursion (beginning-of-line 1) @@ -6717,27 +6963,31 @@ table editor in arbitrary modes.") ;;;###autoload (defun orgtbl-mode (&optional arg) "The `org-mode' table editor as a minor mode for use in other modes." - (interactive) - (setq orgtbl-mode - (if arg (> (prefix-numeric-value arg) 0) (not orgtbl-mode))) - (if orgtbl-mode - (progn - (set (make-local-variable (quote org-table-may-need-update)) t) - (make-local-hook (quote before-change-functions)) - (add-hook 'before-change-functions 'org-before-change-function - nil 'local) - (set (make-local-variable 'org-old-auto-fill-inhibit-regexp) - auto-fill-inhibit-regexp) - (set (make-local-variable 'auto-fill-inhibit-regexp) - (if auto-fill-inhibit-regexp - (concat "\\([ \t]*|\\|" auto-fill-inhibit-regexp) - "[ \t]*|")) - (easy-menu-add orgtbl-mode-menu) - (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) - (force-mode-line-update 'all))) + (interactive) + (if (eq major-mode 'org-mode) + ;; Exit without error, in case some hook functions calls this + ;; by accident in org-mode. + (message "Orgtbl-mode is not useful in org-mode, command ignored") + (setq orgtbl-mode + (if arg (> (prefix-numeric-value arg) 0) (not orgtbl-mode))) + (if orgtbl-mode + (progn + (set (make-local-variable (quote org-table-may-need-update)) t) + (make-local-hook (quote before-change-functions)) + (add-hook 'before-change-functions 'org-before-change-function + nil 'local) + (set (make-local-variable 'org-old-auto-fill-inhibit-regexp) + auto-fill-inhibit-regexp) + (set (make-local-variable 'auto-fill-inhibit-regexp) + (if auto-fill-inhibit-regexp + (concat "\\([ \t]*|\\|" auto-fill-inhibit-regexp) + "[ \t]*|")) + (easy-menu-add orgtbl-mode-menu) + (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) + (force-mode-line-update 'all)))) ;; Install it as a minor mode. (put 'orgtbl-mode :included t) @@ -6746,7 +6996,9 @@ table editor in arbitrary modes.") (defun orgtbl-make-binding (fun &rest keys) "Create a function for binding in the table minor mode." - (list 'lambda '(arg) '(interactive "p") + (list 'lambda '(arg) + (concat "Run `" (symbol-name fun) "' or the default binding.") + '(interactive "p") (list 'if '(org-at-table-p) (list 'call-interactively (list 'quote fun)) @@ -6765,29 +7017,30 @@ table editor in arbitrary modes.") ;; Keybindings for the minor mode (let ((bindings - '(([(meta shift left)] org-table-delete-column) - ([(meta left)] org-table-move-column-left) - ([(meta right)] org-table-move-column-right) - ([(meta shift right)] org-table-insert-column) - ([(meta shift up)] org-table-kill-row) - ([(meta shift down)] org-table-insert-row) - ([(meta up)] org-table-move-row-up) - ([(meta down)] org-table-move-row-down) - ("\C-c\C-w" org-table-cut-region) - ("\C-c\M-w" org-table-copy-region) - ("\C-c\C-y" org-table-paste-rectangle) - ("\C-c-" org-table-insert-hline) - ([(shift tab)] org-table-previous-field) - ("\C-c\C-c" org-table-align) - ([(return)] org-table-next-row) - ([(shift return)] org-table-copy-down) - ([(meta return)] org-table-wrap-region) - ("\C-c\C-q" org-table-wrap-region) - ("\C-c?" org-table-current-column) - ("\C-c " org-table-blank-field) - ("\C-c+" org-table-sum) - ("\C-c|" org-table-toggle-vline-visibility) - ("\C-c=" org-table-eval-formula))) + (list + '([(meta shift left)] org-table-delete-column) + '([(meta left)] org-table-move-column-left) + '([(meta right)] org-table-move-column-right) + '([(meta shift right)] org-table-insert-column) + '([(meta shift up)] org-table-kill-row) + '([(meta shift down)] org-table-insert-row) + '([(meta up)] org-table-move-row-up) + '([(meta down)] org-table-move-row-down) + '("\C-c\C-w" org-table-cut-region) + '("\C-c\M-w" org-table-copy-region) + '("\C-c\C-y" org-table-paste-rectangle) + '("\C-c-" org-table-insert-hline) + '([(shift tab)] org-table-previous-field) + '("\C-c\C-c" org-table-align) + '("\C-m" org-table-next-row) + (list (org-key 'S-return) 'org-table-copy-down) + '([(meta return)] org-table-wrap-region) + '("\C-c\C-q" org-table-wrap-region) + '("\C-c?" org-table-current-column) + '("\C-c " org-table-blank-field) + '("\C-c+" org-table-sum) + '("\C-c|" org-table-toggle-vline-visibility) + '("\C-c=" org-table-eval-formula))) elt key fun cmd) (while (setq elt (pop bindings)) (setq key (car elt) @@ -6796,14 +7049,6 @@ table editor in arbitrary modes.") (define-key orgtbl-mode-map key cmd))) ;; Special treatment needed for TAB and RET -;(define-key orgtbl-mode-map [(return)] -; (orgtbl-make-binding 'org-table-next-row [(return)] "\C-m")) -;(define-key orgtbl-mode-map "\C-m" -; (orgtbl-make-binding 'org-table-next-row "\C-m" [(return)])) -;(define-key orgtbl-mode-map [(tab)] -; (orgtbl-make-binding 'org-table-next-field [(tab)] "\C-i")) -;(define-key orgtbl-mode-map "\C-i" -; (orgtbl-make-binding 'org-table-next-field "\C-i" [(tab)])) (define-key orgtbl-mode-map [(return)] (orgtbl-make-binding 'orgtbl-ret [(return)] "\C-m")) @@ -7433,7 +7678,8 @@ and all options lines." (buffer (find-file-noselect filename)) (ore (concat (org-make-options-regexp - '("CATEGORY" "SEQ_TODO" "PRI_TODO" "TYP_TODO" "STARTUP" + '("CATEGORY" "SEQ_TODO" "PRI_TODO" "TYP_TODO" + "STARTUP" "ARCHIVE" "TITLE" "AUTHOR" "EMAIL" "TEXT" "OPTIONS" "LANGUAGE")) (if org-noutline-p "\\(\n\\|$\\)" ""))) s e) @@ -7488,6 +7734,7 @@ Does include HTML export options as well as TODO and CATEGORY stuff." #+SEQ_TODO: %s #+TYP_TODO: %s #+STARTUP: %s %s +#+ARCHIVE: %s " (buffer-name) (user-full-name) user-mail-address org-export-default-language org-export-headline-levels @@ -7510,6 +7757,7 @@ Does include HTML export options as well as TODO and CATEGORY stuff." (cdr (assoc org-startup-folded '((nil . "nofold")(t . "fold")(content . "content")))) (if org-startup-with-deadline-check "dlcheck" "nodlcheck") + org-archive-location )) (defun org-insert-export-options-template () @@ -7606,6 +7854,7 @@ headlines. The default is 3. Lower levels will become bulleted lists." (text nil) (lang-words nil) (head-count 0) cnt + (start 0) table-open type table-buffer table-orig-buffer ) @@ -7703,8 +7952,15 @@ headlines. The default is 3. Lower levels will become bulleted lists." )) (setq head-count 0) (org-init-section-numbers) - (while (setq line (pop lines) origline line) + ;; Protect the links + (setq start 0) + (while (string-match org-link-maybe-angles-regexp line start) + (setq start (match-end 0)) + (setq line (replace-match + (concat "\000" (match-string 1 line) "\000") + t t line))) + ;; replace "<" and ">" by "<" and ">" ;; handle @<..> HTML tags (replace "@>..<" by "<..>") (setq line (org-html-expand line)) @@ -7722,27 +7978,34 @@ headlines. The default is 3. Lower levels will become bulleted lists." (not (string-match "^[ \t]+\\(:.*\\)" (car lines)))) "
\n" "\n")))) - - (when (string-match org-link-regexp line) + (setq start 0) + (while (string-match org-protected-link-regexp line start) + (setq start (- (match-end 0) 2)) (setq type (match-string 1 line)) (cond ((member type '("http" "https" "ftp" "mailto" "news")) ;; standard URL (setq line (replace-match - "<\\1:\\2>" +; "<\\1:\\2>" + "\\1:\\2" nil nil line))) ((string= type "file") ;; FILE link - (let* ((filename (match-string 2 line)) + (abs-p (file-name-absolute-p filename)) + (thefile (if abs-p (expand-file-name filename) filename)) + (thefile (save-match-data + (if (string-match ":[0-9]+$" thefile) + (replace-match "" t t thefile) + thefile))) (file-is-image-p (save-match-data - (string-match (org-image-file-name-regexp) filename)))) + (string-match (org-image-file-name-regexp) thefile)))) (setq line (replace-match (if (and org-export-html-inline-images file-is-image-p) - "" - "\\1:\\2") + (concat "") + (concat "\\1:\\2")) nil nil line)))) ((member type '("bbdb" "vm" "wl" "rmail" "gnus" "shell")) @@ -7840,20 +8103,15 @@ headlines. The default is 3. Lower levels will become bulleted lists." (let ((head (and org-export-highlight-first-table-line (delq nil (mapcar (lambda (x) (string-match "^[ \t]*|-" x)) - lines)))) - lastline line fields html empty) + (cdr lines))))) + line fields html) (setq html (concat org-export-html-table-tag "\n")) - (while (setq lastline line - line (pop lines)) - (setq empty " ") + (while (setq line (pop lines)) (catch 'next-line (if (string-match "^[ \t]*|-" line) - (if lastline - ;; A hline: simulate an empty table row instead. - (setq line (org-fake-empty-table-line lastline) - head nil - empty "") - ;; Ignore this line + (progn + (setq head nil) ;; head ends here, first time around + ;; ignore this line (throw 'next-line t))) ;; Break the line into fields (setq fields (org-split-string line "[ \t]*|[ \t]*")) @@ -7861,7 +8119,6 @@ headlines. The default is 3. Lower levels will become bulleted lists." html "" (mapconcat (lambda (x) - (if (equal x "") (setq x empty)) (if head (concat "" x "") (concat "" x ""))) @@ -7950,9 +8207,9 @@ But it has the disadvantage, that Org-mode's HTML conversions cannot be used." (r (if m (substring string m) ""))) ;; convert < to < and > to > (while (string-match "<" s) - (setq s (replace-match "<" nil nil s))) + (setq s (replace-match "<" t t s))) (while (string-match ">" s) - (setq s (replace-match ">" nil nil s))) + (setq s (replace-match ">" t t s))) (if org-export-html-expand (while (string-match "@<\\([^&]*\\)>" s) (setq s (replace-match "<\\1>" nil nil s)))) @@ -8161,7 +8418,6 @@ When LEVEL is non-nil, increase section numbers on that level." ;; i k @ expendable from outline-mode ;; 0123456789 ! $%^& * ()_{} " ~`' free -(define-key org-mode-map [(tab)] 'org-cycle) (define-key org-mode-map "\C-i" 'org-cycle) (define-key org-mode-map [(meta tab)] 'org-complete) (define-key org-mode-map "\M-\C-i" 'org-complete) @@ -8179,6 +8435,7 @@ When LEVEL is non-nil, increase section numbers on that level." (define-key org-mode-map "\C-c\C-h\C-w" 'org-cut-special) (define-key org-mode-map "\C-c\C-h\M-w" 'org-copy-special) (define-key org-mode-map "\C-c\C-h\C-y" 'org-paste-special) +(define-key org-mode-map "\C-c$" 'org-archive-subtree) (define-key org-mode-map "\C-c\C-j" 'org-goto) (define-key org-mode-map "\C-c\C-t" 'org-todo) (define-key org-mode-map "\C-c\C-s" 'org-schedule) @@ -8201,21 +8458,19 @@ When LEVEL is non-nil, increase section numbers on that level." (define-key org-mode-map "\C-c[" 'org-add-file) (define-key org-mode-map "\C-c]" 'org-remove-file) (define-key org-mode-map "\C-c\C-r" 'org-timeline) -(define-key org-mode-map [(shift up)] 'org-shiftup) -(define-key org-mode-map [(shift down)] 'org-shiftdown) -(define-key org-mode-map [(shift left)] 'org-timestamp-down-day) -(define-key org-mode-map [(shift right)] 'org-timestamp-up-day) +(define-key org-mode-map (org-key 'S-up) 'org-shiftup) +(define-key org-mode-map (org-key 'S-down) 'org-shiftdown) +(define-key org-mode-map (org-key 'S-left) 'org-timestamp-down-day) +(define-key org-mode-map (org-key 'S-right) 'org-timestamp-up-day) (define-key org-mode-map "\C-c-" 'org-table-insert-hline) ;; The following line is e.g. necessary for German keyboards under Suse Linux (unless org-xemacs-p (define-key org-mode-map [S-iso-lefttab] 'org-shifttab)) (define-key org-mode-map [(shift tab)] 'org-shifttab) (define-key org-mode-map "\C-c\C-c" 'org-ctrl-c-ctrl-c) -(define-key org-mode-map [(return)] 'org-return) -(define-key org-mode-map [(shift return)] 'org-table-copy-down) +(define-key org-mode-map "\C-m" 'org-return) +(define-key org-mode-map (org-key 'S-return) 'org-table-copy-down) (define-key org-mode-map [(meta return)] 'org-meta-return) -(define-key org-mode-map [(control up)] 'org-move-line-up) -(define-key org-mode-map [(control down)] 'org-move-line-down) (define-key org-mode-map "\C-c?" 'org-table-current-column) (define-key org-mode-map "\C-c " 'org-table-blank-field) (define-key org-mode-map "\C-c+" 'org-table-sum) @@ -8234,15 +8489,12 @@ When LEVEL is non-nil, increase section numbers on that level." (define-key org-mode-map "\C-c\C-xh" 'org-export-as-html) (define-key org-mode-map "\C-c\C-x\C-h" 'org-export-as-html-and-open) - -;; FIXME: Do we really need to save match data in these commands? -;; I would like to remove it in order to minimize impact. -;; Self-insert already does not preserve it. How much resources used by this??? - (defsubst org-table-p () (if (and (eq major-mode 'org-mode) font-lock-mode) (eq (get-text-property (point) 'face) 'org-table) - (save-match-data (org-at-table-p)))) + ;; (save-match-data (org-at-table-p)))) ; FIXME: OK to not use this? + (org-at-table-p))) + (defun org-self-insert-command (N) "Like `self-insert-command', use overwrite-mode for whitespace in tables. @@ -8504,7 +8756,9 @@ the automatic table editor has been turned off." ["Promote Heading" org-metaleft (not (org-at-table-p))] ["Promote Subtree" org-shiftmetaleft (not (org-at-table-p))] ["Demote Heading" org-metaright (not (org-at-table-p))] - ["Demote Subtree" org-shiftmetaright (not (org-at-table-p))]) + ["Demote Subtree" org-shiftmetaright (not (org-at-table-p))] + "--" + ["Archive Subtree" org-archive-subtree t]) "--" ("TODO Lists" ["TODO/DONE/-" org-todo t] @@ -8769,11 +9023,11 @@ Only visible heading lines are considered, unless INVISIBLE-OK is non-nil." (outline-back-to-heading invisible-ok) (if (looking-at outline-regexp) t - (if (re-search-backward (concat (if invisible-ok "[\r\n]" "^") + (if (re-search-backward (concat (if invisible-ok "\\([\r\n]\\|^\\)" "^") outline-regexp) nil t) (if invisible-ok - (progn (forward-char 1) + (progn (goto-char (match-end 1)) (looking-at outline-regexp))) (error "Before first heading"))))) @@ -8894,7 +9148,6 @@ Show the heading too, if it is currently invisible." (run-hooks 'org-load-hook) -;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd - +;;; arch-tag: e3a97958-3c2c-487f-9557-fafc3c98452a ;;; org.el ends here -- cgit v1.2.1 From dd72a03ac28d34e970c073949f4819999fef1360 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Mon, 13 Jun 2005 08:14:06 +0000 Subject: (cancel-debug-on-entry): Make the empty string argument obsolete. --- lisp/ChangeLog | 5 +++++ lisp/emacs-lisp/debug.el | 11 +++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ee10a5f787e..0dd7b735ee6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-06-13 Lute Kamstra + + * emacs-lisp/debug.el (cancel-debug-on-entry): Make the empty + string argument obsolete. + 2005-06-13 Carsten Dominik * textmodes/org.el: (org-CUA-compatible): New option. diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 83e07f6d199..795c6418e5a 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -693,16 +693,19 @@ Redefining FUNCTION also cancels it." ;;;###autoload (defun cancel-debug-on-entry (&optional function) "Undo effect of \\[debug-on-entry] on FUNCTION. -If argument is nil or an empty string, cancel for all functions. +If FUNCTION is nil, cancel debug-on-entry for all functions. When called interactively, prompt for FUNCTION in the minibuffer. To specify a nil argument interactively, exit with an empty minibuffer." (interactive (list (let ((name (completing-read "Cancel debug on entry (to function): " (mapcar 'symbol-name debug-function-list) - nil t nil))) - (if name (intern name))))) - (if (and function (not (string= function ""))) + nil t))) + (when name + (unless (string= name "") + (intern name)))))) + (if (and function + (not (string= function ""))) ; Pre 22.1 compatibility test. (progn (let ((defn (debug-on-entry-1 function nil))) (condition-case nil -- cgit v1.2.1 From 63e9aa8ee8daa065664f97a03b93387b3f39c9f5 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Mon, 13 Jun 2005 08:22:34 +0000 Subject: (woman-mode-line-format): Delete constant. (woman-mode-map): Initialize it properly. (woman-mode): Set mode-class property to special. Use delay-mode-hooks and run-mode-hooks. Use the right keymap. Set major-mode and mode-name. Don't set mode-line-format directly. (Man-getpage-in-background): Don't reference woman-mode-line-format. --- lisp/ChangeLog | 8 +++++++ lisp/woman.el | 74 +++++++++++++++++++++++----------------------------------- 2 files changed, 37 insertions(+), 45 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0dd7b735ee6..f9ec346596c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,13 @@ 2005-06-13 Lute Kamstra + * woman.el (woman-mode-line-format): Delete constant. + (woman-mode-map): Initialize it properly. + (woman-mode): Set mode-class property to special. Use + delay-mode-hooks and run-mode-hooks. Use the right keymap. Set + major-mode and mode-name. Don't set mode-line-format directly. + (Man-getpage-in-background): Don't reference + woman-mode-line-format. + * emacs-lisp/debug.el (cancel-debug-on-entry): Make the empty string argument obsolete. diff --git a/lisp/woman.el b/lisp/woman.el index cb0bbfd7c12..de7d557f856 100644 --- a/lisp/woman.el +++ b/lisp/woman.el @@ -1035,18 +1035,6 @@ Set by `.ns' request; reset by any output or `.rs' request") "Set `woman-nospace' to nil." (setq woman-nospace nil)) -(defconst woman-mode-line-format - ;; This is essentially the Man-mode format with page numbers removed - ;; and line numbers added. (Online documents do not have pages, but - ;; they do have lines!) - '("-" mode-line-mule-info mode-line-modified - mode-line-frame-identification mode-line-buffer-identification - " " global-mode-string - " %[(WoMan" mode-line-process minor-mode-alist ")%]--" - (line-number-mode "L%l--") - (-3 . "%p") "-%-") - "Mode line format for WoMan buffer.") - (defconst woman-request-regexp "^[.'][ \t]*\\(\\S +\\) *" ;; Was "^\\.[ \t]*\\([a-z0-9]+\\) *" but cvs.1 uses a macro named ;; "`" and CGI.man uses a macro named "''"! @@ -1745,15 +1733,10 @@ Leave point at end of new text. Return length of inserted text." (defvar woman-mode-map nil "Keymap for woman mode.") -(if woman-mode-map - () - ;; Set up the keymap, mostly inherited from Man-mode-map. Normally - ;; button-buffer-map is used as a parent keymap, but we can't have two - ;; parents, so we just copy it. - (setq woman-mode-map (copy-keymap button-buffer-map)) +(unless woman-mode-map + (setq woman-mode-map (make-sparse-keymap)) (set-keymap-parent woman-mode-map Man-mode-map) - ;; Above two lines were - ;; (setq woman-mode-map (cons 'keymap Man-mode-map)) + (define-key woman-mode-map "R" 'woman-reformat-last-file) (define-key woman-mode-map "w" 'woman) (define-key woman-mode-map "\en" 'WoMan-next-manpage) @@ -1841,6 +1824,8 @@ Argument EVENT is the invoking mouse event." (setq woman-emulation value) (woman-reformat-last-file)) +(put 'woman-mode 'mode-class 'special) + (defun woman-mode () "Turn on (most of) Man mode to browse a buffer formatted by WoMan. WoMan is an ELisp emulation of much of the functionality of the Emacs @@ -1858,34 +1843,33 @@ See `Man-mode' for additional details." (fset 'Man-unindent 'ignore) (fset 'Man-goto-page 'ignore) (unwind-protect - (progn - (set (make-local-variable 'Man-mode-map) woman-mode-map) - ;; Install Man mode: - (Man-mode) - ;; Reset inappropriate definitions: - (setq mode-line-format woman-mode-line-format) - (put 'Man-mode 'mode-class 'special)) + (delay-mode-hooks (Man-mode)) ;; Restore the status quo: (fset 'Man-build-page-list Man-build-page-list) (fset 'Man-strip-page-headers Man-strip-page-headers) (fset 'Man-unindent Man-unindent) - (fset 'Man-goto-page Man-goto-page) - ) - ;; Imenu support: - (set (make-local-variable 'imenu-generic-expression) - ;; `make-local-variable' in case imenu not yet loaded! - woman-imenu-generic-expression) - (set (make-local-variable 'imenu-space-replacement) " ") - ;; For reformat ... - ;; necessary when reformatting a file in its old buffer: - (setq imenu--last-menubar-index-alist nil) - ;; necessary to avoid re-installing the same imenu: - (setq woman-imenu-done nil) - (if woman-imenu (woman-imenu)) - (setq buffer-read-only nil) - (Man-highlight-references) - (setq buffer-read-only t) - (set-buffer-modified-p nil))) + (fset 'Man-goto-page Man-goto-page))) + (setq major-mode 'woman-mode + mode-name "WoMan") + ;; Don't show page numbers like Man-mode does. (Online documents do + ;; not have pages) + (kill-local-variable 'mode-line-buffer-identification) + (use-local-map woman-mode-map) + ;; Imenu support: + (set (make-local-variable 'imenu-generic-expression) + ;; `make-local-variable' in case imenu not yet loaded! + woman-imenu-generic-expression) + (set (make-local-variable 'imenu-space-replacement) " ") + ;; For reformat ... + ;; necessary when reformatting a file in its old buffer: + (setq imenu--last-menubar-index-alist nil) + ;; necessary to avoid re-installing the same imenu: + (setq woman-imenu-done nil) + (if woman-imenu (woman-imenu)) + (let (buffer-read-only) + (Man-highlight-references)) + (set-buffer-modified-p nil) + (run-mode-hooks 'woman-mode-hook)) (defun woman-imenu (&optional redraw) "Add a \"Contents\" menu to the menubar. @@ -1962,7 +1946,7 @@ Optional argument REDRAW, if non-nil, forces mode line to be updated." (around Man-getpage-in-background-advice (topic) activate) "Use WoMan unless invoked outside a WoMan buffer or invoked explicitly. Otherwise use Man and record start of formatting time." - (if (and (eq mode-line-format woman-mode-line-format) + (if (and (eq major-mode 'woman-mode) (not (eq (caar command-history) 'man))) (WoMan-getpage-in-background topic) ;; Initiates man processing -- cgit v1.2.1 From 69008bcff4efd4190e3628299580313875a74080 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Mon, 13 Jun 2005 09:49:47 +0000 Subject: Revert arch-tagline change --- lisp/textmodes/org.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el index bfb2a81294e..c88f288a242 100644 --- a/lisp/textmodes/org.el +++ b/lisp/textmodes/org.el @@ -9148,6 +9148,5 @@ Show the heading too, if it is currently invisible." (run-hooks 'org-load-hook) -;;; arch-tag: e3a97958-3c2c-487f-9557-fafc3c98452a +;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd ;;; org.el ends here - -- cgit v1.2.1 From 2702394e7cc558300e8ba74d0b3882f6f1897cc7 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 13 Jun 2005 11:54:48 +0000 Subject: (all): Don't complain about missing GTK-related variables, unless either `gtk' is boundp or this isn't a `windows-nt' build. --- lisp/ChangeLog | 6 ++++++ lisp/cus-start.el | 2 ++ 2 files changed, 8 insertions(+) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f9ec346596c..80a86d8afbd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2005-06-13 Eli Zaretskii + + * cus-start.el (all): Don't complain about missing GTK-related + variables, unless either `gtk' is boundp or this isn't a + `windows-nt' build. + 2005-06-13 Lute Kamstra * woman.el (woman-mode-line-format): Delete constant. diff --git a/lisp/cus-start.el b/lisp/cus-start.el index 36bebf68871..db14975a480 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el @@ -322,6 +322,8 @@ since it could result in memory overflow and make Emacs crash." (eq system-type 'ms-dos)) ((string-match "\\`w32-" (symbol-name symbol)) (eq system-type 'windows-nt)) + ((string-match "\\`x-.*gtk" (symbol-name symbol)) + (or (boundp 'gtk) (not (eq system-type 'windows-nt)))) ((string-match "\\`x-" (symbol-name symbol)) (fboundp 'x-create-frame)) (t t)))) -- cgit v1.2.1 From 1a96d1f37a91c0f85f5f91e71025fa35488f2927 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Mon, 13 Jun 2005 11:56:12 +0000 Subject: (edit-abbrevs-mode): Use kill-all-local-variables and run-mode-hooks. --- lisp/abbrev.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/abbrev.el b/lisp/abbrev.el index 711e8e2ebe9..0a40768af31 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el @@ -134,9 +134,11 @@ Otherwise display all abbrevs." "Major mode for editing the list of abbrev definitions. \\{edit-abbrevs-map}" (interactive) + (kill-all-local-variables) (setq major-mode 'edit-abbrevs-mode) (setq mode-name "Edit-Abbrevs") - (use-local-map edit-abbrevs-map)) + (use-local-map edit-abbrevs-map) + (run-mode-hooks 'edit-abbrevs-mode-hook)) (defun edit-abbrevs () "Alter abbrev definitions by editing a list of them. -- cgit v1.2.1 From 6f73217ed6b4fff65d5932b9d6256e066ba148da Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Mon, 13 Jun 2005 11:58:35 +0000 Subject: (ediff-meta-mode): Use run-mode-hooks. --- lisp/ediff-mult.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/ediff-mult.el b/lisp/ediff-mult.el index 88ab31fe56a..d3710258d24 100644 --- a/lisp/ediff-mult.el +++ b/lisp/ediff-mult.el @@ -410,7 +410,8 @@ Commands: \\{ediff-meta-buffer-map}" (kill-all-local-variables) (setq major-mode 'ediff-meta-mode) - (setq mode-name "MetaEdiff")) + (setq mode-name "MetaEdiff") + (run-mode-hooks 'ediff-meta-mode-hook)) ;; the keymap for the buffer showing directory differences -- cgit v1.2.1 From d7899a4ee311620c49f8c43db9f85b1a2ef6aac7 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Mon, 13 Jun 2005 12:00:59 +0000 Subject: (ediff-mode): Use run-mode-hooks. --- lisp/ediff-util.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/ediff-util.el b/lisp/ediff-util.el index b952c2fb2bf..b7b39f405e5 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-hooks 'ediff-mode-hook)) + (run-mode-hooks 'ediff-mode-hook)) -- cgit v1.2.1 From 16e8b162565202f416f2141d75a3c8bd6f45b96f Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Mon, 13 Jun 2005 12:01:43 +0000 Subject: (ledit-mode): Use delay-mode-hooks. --- lisp/ledit.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/ledit.el b/lisp/ledit.el index 38e03ca60cc..565550efe47 100644 --- a/lisp/ledit.el +++ b/lisp/ledit.el @@ -144,7 +144,7 @@ Like Lisp mode, plus these special commands: To make Lisp mode automatically change to Ledit mode, do (setq lisp-mode-hook 'ledit-from-lisp-mode)" (interactive) - (lisp-mode) + (delay-mode-hooks (lisp-mode)) (ledit-from-lisp-mode)) ;;;###autoload -- cgit v1.2.1 From 4da76c6afd2949be8f9852110b24dbff3a646c69 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Mon, 13 Jun 2005 12:08:25 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 80a86d8afbd..9a8e5adc897 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -6,6 +6,14 @@ 2005-06-13 Lute Kamstra + * abbrev.el (edit-abbrevs-mode): Use kill-all-local-variables and + run-mode-hooks. + + * ediff-mult.el (ediff-meta-mode): + * ediff-util.el (ediff-mode): Use run-mode-hooks. + + * ledit.el (ledit-mode): Use delay-mode-hooks. + * woman.el (woman-mode-line-format): Delete constant. (woman-mode-map): Initialize it properly. (woman-mode): Set mode-class property to special. Use -- cgit v1.2.1 From 175384d1eef1917a21d73384b8da2de81e1d68ef Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 13 Jun 2005 14:32:42 +0000 Subject: (url-file, url-file-asynch-callback): Use with-current-buffer. --- lisp/url/ChangeLog | 4 ++++ lisp/url/url-file.el | 8 +++----- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'lisp') diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 27981553e83..dc129c0c1fd 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,7 @@ +2005-06-13 Stefan Monnier + + * url-file.el (url-file, url-file-asynch-callback): with-current-buffer. + 2005-06-10 Stefan Monnier * url-dav.el: Remove most autoload cookies. diff --git a/lisp/url/url-file.el b/lisp/url/url-file.el index 0aa23acc0ec..c39d255304b 100644 --- a/lisp/url/url-file.el +++ b/lisp/url/url-file.el @@ -73,8 +73,7 @@ to them." func args args efs)) (let ((size (nth 7 (file-attributes name)))) - (save-excursion - (set-buffer buff) + (with-current-buffer buff (goto-char (point-max)) (if (/= -1 size) (insert (format "Content-length: %d\n" size))) @@ -177,9 +176,8 @@ to them." (if (file-directory-p filename) ;; A directory is done the same whether we are local or remote (url-find-file-dired filename) - (save-excursion - (setq buffer (generate-new-buffer " *url-file*")) - (set-buffer buffer) + (with-current-buffer + (setq buffer (generate-new-buffer " *url-file*")) (mm-disable-multibyte) (setq url-current-object url) (insert "Content-type: " (or content-type "application/octet-stream") "\n") -- cgit v1.2.1 From d95da8d3b21026a6ed276288495fbd5b81df3c8c Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 13 Jun 2005 19:33:21 +0000 Subject: (fill-match-adaptive-prefix): New function. (fill-context-prefix): Use it to avoid guessing absurdly long prefixes. Remove unused vars `start' and `firstline'. (fill-nobreak-p): Fix line-move-invisible -> line-move-invisible-p. (justify-current-line, fill-individual-paragraphs): Remove unused vars. --- lisp/textmodes/fill.el | 94 ++++++++++++++++++++++++-------------------------- 1 file changed, 46 insertions(+), 48 deletions(-) (limited to 'lisp') diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 048090bfdc4..7d4ee6ec00d 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -1,7 +1,7 @@ ;;; fill.el --- fill commands for Emacs -*- coding: iso-2022-7bit -*- -;; Copyright (C) 1985,86,92,94,95,96,97,1999,2001,02,03,2004 -;; Free Software Foundation, Inc. +;; Copyright (C) 1985, 1986, 1992, 1994, 1995, 1996, 1997, 1999, 2001, 2002, +;; 2003, 2004, 2005 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: wp @@ -205,6 +205,16 @@ Remove indentation from each line." (unless (zerop cmp) (substring s1 0 cmp))))) +(defun fill-match-adaptive-prefix () + (let ((str (or + (and adaptive-fill-function (funcall adaptive-fill-function)) + (and adaptive-fill-regexp (looking-at adaptive-fill-regexp) + (match-string-no-properties 0))))) + (if (>= (+ (current-left-margin) (length str)) (current-fill-column)) + ;; Death to insanely long prefixes. + nil + str))) + (defun fill-context-prefix (from to &optional first-line-regexp) "Compute a fill prefix from the text between FROM and TO. This uses the variables `adaptive-fill-regexp' and `adaptive-fill-function' @@ -218,55 +228,45 @@ act as a paragraph-separator." (if (eolp) (forward-line 1)) ;; Move to the second line unless there is just one. (move-to-left-margin) - (let ((firstline (point)) - first-line-prefix + (let (first-line-prefix ;; Non-nil if we are on the second line. - second-line-prefix - start) - (setq start (point)) + second-line-prefix) (setq first-line-prefix ;; We don't need to consider `paragraph-start' here since it ;; will be explicitly checked later on. ;; Also setting first-line-prefix to nil prevents ;; second-line-prefix from being used. - (cond ;; ((looking-at paragraph-start) nil) - ((and adaptive-fill-function (funcall adaptive-fill-function))) - ((and adaptive-fill-regexp (looking-at adaptive-fill-regexp)) - (match-string-no-properties 0)))) + ;; ((looking-at paragraph-start) nil) + (fill-match-adaptive-prefix)) (forward-line 1) (if (< (point) to) - (progn - (move-to-left-margin) - (setq start (point)) - (setq second-line-prefix - (cond ((looking-at paragraph-start) nil) ;Can it happen ? -stef - ((and adaptive-fill-function - (funcall adaptive-fill-function))) - ((and adaptive-fill-regexp - (looking-at adaptive-fill-regexp)) - (buffer-substring-no-properties start (match-end 0))))) - ;; If we get a fill prefix from the second line, - ;; make sure it or something compatible is on the first line too. - (when second-line-prefix - (unless first-line-prefix (setq first-line-prefix "")) - ;; If the non-whitespace chars match the first line, - ;; just use it (this subsumes the 2 checks used previously). - ;; Used when first line is `/* ...' and second-line is - ;; ` * ...'. - (let ((tmp second-line-prefix) - (re "\\`")) - (while (string-match "\\`[ \t]*\\([^ \t]+\\)" tmp) - (setq re (concat re ".*" (regexp-quote (match-string 1 tmp)))) - (setq tmp (substring tmp (match-end 0)))) - ;; (assert (string-match "\\`[ \t]*\\'" tmp)) - - (if (string-match re first-line-prefix) - second-line-prefix - - ;; Use the longest common substring of both prefixes, - ;; if there is one. - (fill-common-string-prefix first-line-prefix - second-line-prefix))))) + (progn + (move-to-left-margin) + (setq second-line-prefix + (cond ((looking-at paragraph-start) nil) ;Can it happen? -Stef + (t (fill-match-adaptive-prefix)))) + ;; If we get a fill prefix from the second line, + ;; make sure it or something compatible is on the first line too. + (when second-line-prefix + (unless first-line-prefix (setq first-line-prefix "")) + ;; If the non-whitespace chars match the first line, + ;; just use it (this subsumes the 2 checks used previously). + ;; Used when first line is `/* ...' and second-line is + ;; ` * ...'. + (let ((tmp second-line-prefix) + (re "\\`")) + (while (string-match "\\`[ \t]*\\([^ \t]+\\)" tmp) + (setq re (concat re ".*" (regexp-quote (match-string 1 tmp)))) + (setq tmp (substring tmp (match-end 0)))) + ;; (assert (string-match "\\`[ \t]*\\'" tmp)) + + (if (string-match re first-line-prefix) + second-line-prefix + + ;; Use the longest common substring of both prefixes, + ;; if there is one. + (fill-common-string-prefix first-line-prefix + second-line-prefix))))) ;; If we get a fill prefix from a one-line paragraph, ;; maybe change it to whitespace, ;; and check that it isn't a paragraph starter. @@ -333,7 +333,7 @@ be tested. If it returns t, fill commands do not break the line there." Can be customized with the variables `fill-nobreak-predicate' and `fill-nobreak-invisible'." (or - (and fill-nobreak-invisible (line-move-invisible (point))) + (and fill-nobreak-invisible (line-move-invisible-p (point))) (unless (bolp) (or ;; Don't break after a period followed by just one space. @@ -1128,8 +1128,6 @@ otherwise it is made canonical." ncols ; new indent point or offset (nspaces 0) ; number of spaces between words ; in line (not space characters) - fracspace ; fractional amount of space to be - ; added between each words (curr-fracspace 0) ; current fractional space amount count) (end-of-line) @@ -1338,7 +1336,7 @@ Also, if CITATION-REGEXP is non-nil, don't fill header lines." (forward-line 1)))) (narrow-to-region (point) max) ;; Loop over paragraphs. - (while (let ((here (point))) + (while (progn ;; Skip over all paragraph-separating lines ;; so as to not include them in any paragraph. (while (and (not (eobp)) @@ -1446,5 +1444,5 @@ Also, if CITATION-REGEXP is non-nil, don't fill header lines." "") string)) -;;; arch-tag: 727ad455-1161-4fa9-8df5-0f74b179216d +;; arch-tag: 727ad455-1161-4fa9-8df5-0f74b179216d ;;; fill.el ends here -- cgit v1.2.1 From 9ed49065194cae011a97dfa49b08e3b60eb241d7 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 13 Jun 2005 20:45:50 +0000 Subject: (complete-in-turn): New macro. (dynamic-completion-table, lazy-completion-table): Add debug info. --- lisp/subr.el | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/subr.el b/lisp/subr.el index ca1d47fede8..9371df1a794 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1923,6 +1923,7 @@ entered. The result of the `dynamic-completion-table' form is a function that can be used as the ALIST argument to `try-completion' and `all-completion'. See Info node `(elisp)Programmed Completion'." + (declare (debug (lambda-expr))) (let ((win (make-symbol "window")) (string (make-symbol "string")) (predicate (make-symbol "predicate")) @@ -1944,12 +1945,29 @@ ARGS. FUN must return the completion table that will be stored in VAR. If completion is requested in the minibuffer, FUN will be called in the buffer from which the minibuffer was entered. The return value of `lazy-completion-table' must be used to initialize the value of VAR." + (declare (debug (symbol lambda-expr def-body))) (let ((str (make-symbol "string"))) `(dynamic-completion-table (lambda (,str) (unless (listp ,var) - (setq ,var (funcall ',fun ,@args))) + (setq ,var (,fun ,@args))) ,var)))) + +(defmacro complete-in-turn (a b) + "Create a completion table that first tries completion in A and then in B. +A and B should not be costly (or side-effecting) expressions." + (declare (debug (def-form def-form))) + `(lambda (string predicate mode) + (cond + ((eq mode t) + (or (all-completions string ,a predicate) + (all-completions string ,b predicate))) + ((eq mode nil) + (or (try-completion string ,a predicate) + (try-completion string ,b predicate))) + (t + (or (test-completion string ,a predicate) + (test-completion string ,b predicate)))))) ;;; Matching and substitution -- cgit v1.2.1 From e3b5b35b9a9247979d6147f5cac56208cd626cc6 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 13 Jun 2005 20:47:08 +0000 Subject: (read-face-name): Use complete-in-turn complete non-aliases in preference to face aliases. --- lisp/faces.el | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'lisp') diff --git a/lisp/faces.el b/lisp/faces.el index 866f739a13d..fcac684b3a1 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -1,6 +1,6 @@ ;;; faces.el --- Lisp faces -;; Copyright (C) 1992,1993,1994,1995,1996,1998,1999,2000,2001,2002,2004 +;; Copyright (C) 1992,1993,1994,1995,1996,1998,1999,2000,2001,2002,2004,2005 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -854,6 +854,8 @@ If MULTIPLE is non-nil, return a list of faces (possibly only one). Otherwise, return a single face." (let ((faceprop (or (get-char-property (point) 'read-face-name) (get-char-property (point) 'face))) + (aliasfaces nil) + (nonaliasfaces nil) faces) ;; Make a list of the named faces that the `face' property uses. (if (and (listp faceprop) @@ -870,6 +872,13 @@ Otherwise, return a single face." (memq (intern-soft (thing-at-point 'symbol)) (face-list))) (setq faces (list (intern-soft (thing-at-point 'symbol))))) + ;; Build up the completion tables. + (mapatoms (lambda (s) + (if (custom-facep s) + (if (get s 'face-alias) + (push (symbol-name s) aliasfaces) + (push (symbol-name s) nonaliasfaces))))) + ;; If we only want one, and the default is more than one, ;; discard the unwanted ones now. (unless multiple @@ -883,7 +892,7 @@ Otherwise, return a single face." (if faces (mapconcat 'symbol-name faces ", ") string-describing-default)) (format "%s: " prompt)) - obarray 'custom-facep t)) + (complete-in-turn nonaliasfaces aliasfaces) nil t)) ;; Canonicalize the output. (output (if (equal input "") @@ -2289,5 +2298,5 @@ If that can't be done, return nil." (provide 'faces) -;;; arch-tag: 19a4759f-2963-445f-b004-425b9aadd7d6 +;; arch-tag: 19a4759f-2963-445f-b004-425b9aadd7d6 ;;; faces.el ends here -- cgit v1.2.1 From 5aa6db5755dd0a5c1f855ba7e98044945b368b1a Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 13 Jun 2005 20:50:25 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9a8e5adc897..08191493111 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,17 @@ +2005-06-13 Stefan Monnier + + * subr.el (complete-in-turn): New macro. + (dynamic-completion-table, lazy-completion-table): Add debug info. + + * faces.el (read-face-name): Use complete-in-turn complete non-aliases + in preference to face aliases. + + * textmodes/fill.el (fill-match-adaptive-prefix): New function. + (fill-context-prefix): Use it to avoid guessing absurdly long prefixes. + Remove unused vars `start' and `firstline'. + (fill-nobreak-p): Fix line-move-invisible -> line-move-invisible-p. + (justify-current-line, fill-individual-paragraphs): Remove unused vars. + 2005-06-13 Eli Zaretskii * cus-start.el (all): Don't complain about missing GTK-related @@ -16,11 +30,10 @@ * woman.el (woman-mode-line-format): Delete constant. (woman-mode-map): Initialize it properly. - (woman-mode): Set mode-class property to special. Use - delay-mode-hooks and run-mode-hooks. Use the right keymap. Set - major-mode and mode-name. Don't set mode-line-format directly. - (Man-getpage-in-background): Don't reference - woman-mode-line-format. + (woman-mode): Set mode-class property to special. + Use delay-mode-hooks and run-mode-hooks. Use the right keymap. + Set major-mode and mode-name. Don't set mode-line-format directly. + (Man-getpage-in-background): Don't reference woman-mode-line-format. * emacs-lisp/debug.el (cancel-debug-on-entry): Make the empty string argument obsolete. @@ -46,9 +59,9 @@ (org-insert-link, org-store-link): Use org-make-link. (org-open-file): Quote file name for shell command, to allow spaces in file names. - (org-link-regexp): Fixed bug with mailto link. - (org-link-maybe-angles-regexp, org-protected-link-regexp): New - constant. + (org-link-regexp): Fix bug with mailto link. + (org-link-maybe-angles-regexp, org-protected-link-regexp): + New constants. (org-export-as-html): Deal with the optional angles around a link. Better treatment of file: links. (org-open-at-point): Replace @{ and @} with < and >. @@ -79,8 +92,8 @@ * loadup.el: Don't say we are dumping under 2 names on windows-nt and cygwin. - * makefile.w32-in (bootstrap-clean-CMD, bootstrap-clean-SH): Don't - use an old loaddefs.el, as in Makefile.in. + * makefile.w32-in (bootstrap-clean-CMD, bootstrap-clean-SH): + Don't use an old loaddefs.el, as in Makefile.in. 2005-06-12 Lute Kamstra @@ -126,8 +139,8 @@ 2005-06-11 Frederik Fouvry * thumbs.el (thumbs-per-line, thumbs-thumbsdir-max-size) - (thumbs-relief, thumbs-margin, thumbs-image-resizing-step): Fix - :type--it is `integer', not `string'. + (thumbs-relief, thumbs-margin, thumbs-image-resizing-step): + Fix :type--it is `integer', not `string'. * faces.el (modeline-highlight): Rename from (the erroneous) `modeline-higilight'. -- cgit v1.2.1 From 929129fff15b719bba929c2f0ded074c1b6f231c Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Mon, 13 Jun 2005 21:29:25 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 08191493111..26ce3f78dee 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2005-06-13 Kim F. Storm + + * subr.el (add-to-ordered-list): New defun. + + * emulation/cua-base.el (cua-mode): Use add-to-ordered-list to + add cua--keymap-alist to emulation-mode-map-alists. + 2005-06-13 Stefan Monnier * subr.el (complete-in-turn): New macro. -- cgit v1.2.1 From cbbd0b5a94d8b76f353a188490db6afe62e82538 Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Mon, 13 Jun 2005 21:29:52 +0000 Subject: (add-to-ordered-list): New defun. --- lisp/subr.el | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'lisp') diff --git a/lisp/subr.el b/lisp/subr.el index 9371df1a794..fb48e578157 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -957,6 +957,32 @@ other hooks, such as major mode hooks, can do the job." (append (symbol-value list-var) (list element)) (cons element (symbol-value list-var)))))) + +(defun add-to-ordered-list (list-var element &optional order) + "Add to the value of LIST-VAR the element ELEMENT if it isn't there yet. +The test for presence of ELEMENT is done with `equal'. + +The resulting list is reordered so that the elements are in the +order given by each element's `list-order' property (a number). +Elements which are not symbols, and symbol elements without a +numeric `lisp-order' property are placed at the end of the list. + +If the third optional argument ORDER is non-nil and ELEMENT is +a symbol, set the symbol's `list-order' property to the given value. + +The return value is the new value of LIST-VAR." + (when (and order (symbolp element)) + (put element 'list-order (and (numberp order) order))) + (add-to-list list-var element) + (set list-var (sort (symbol-value list-var) + (lambda (a b) + (let ((oa (and (symbolp a) (get a 'list-order))) + (ob (and (symbolp b) (get b 'list-order)))) + (cond + ((not oa) nil) + ((not ob) t) + (t (< oa ob)))))))) + ;;; Load history -- cgit v1.2.1 From 1a2f4b9fc01e480fb3c1d6cfb5258880e9eb5c9d Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Mon, 13 Jun 2005 21:31:37 +0000 Subject: (cua-mode): Use add-to-ordered-list to add cua--keymap-alist to emulation-mode-map-alists. --- lisp/emulation/cua-base.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index ecd75773648..c6d479b173f 100644 --- a/lisp/emulation/cua-base.el +++ b/lisp/emulation/cua-base.el @@ -1360,7 +1360,7 @@ paste (in addition to the normal emacs bindings)." (if (not cua-mode) (setq emulation-mode-map-alists (delq 'cua--keymap-alist emulation-mode-map-alists)) - (add-to-list 'emulation-mode-map-alists 'cua--keymap-alist) + (add-to-ordered-list 'emulation-mode-map-alists 'cua--keymap-alist 400) (cua--select-keymaps)) (cond -- cgit v1.2.1 From 7efb41ae95a6d36405d519e0f958ffea44fdc816 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Mon, 13 Jun 2005 23:38:30 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 26ce3f78dee..d8bb1c1bb1a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-06-13 Luc Teirlinck + + * emacs-lisp/debug.el (cancel-debug-on-entry): Mention default in + minibuffer prompt. + 2005-06-13 Kim F. Storm * subr.el (add-to-ordered-list): New defun. -- cgit v1.2.1 From 922a9de3065637bdc2627fb4a5f19ef57a8cc0d5 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Mon, 13 Jun 2005 23:40:05 +0000 Subject: (cancel-debug-on-entry): Mention default in minibuffer prompt. --- lisp/emacs-lisp/debug.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lisp') diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 795c6418e5a..0745508b64b 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -698,9 +698,9 @@ When called interactively, prompt for FUNCTION in the minibuffer. To specify a nil argument interactively, exit with an empty minibuffer." (interactive (list (let ((name - (completing-read "Cancel debug on entry (to function): " - (mapcar 'symbol-name debug-function-list) - nil t))) + (completing-read + "Cancel debug on entry to function (default: all functions): " + (mapcar 'symbol-name debug-function-list) nil t))) (when name (unless (string= name "") (intern name)))))) -- cgit v1.2.1 From a21fb88e7fefce83fa8ae40114cfbd0249019abe Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Tue, 14 Jun 2005 02:49:36 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-406 Merge from gnus--rel--5.10 Patches applied: * gnus--rel--5.10 (patch 80-82) - Merge from emacs--cvs-trunk--0 - Update from CVS 2005-06-14 Katsumi Yamaoka * lisp/gnus/mm-view.el (mm-inline-text): Withdraw the last change. 2005-06-09 Katsumi Yamaoka * lisp/gnus/mm-view.el (mm-inline-text): Turn off adaptive-fill-mode while executing enriched-decode. --- lisp/gnus/ChangeLog | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lisp') diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 3681f2fa750..841357e28ae 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,12 @@ +2005-06-14 Katsumi Yamaoka + + * mm-view.el (mm-inline-text): Withdraw the last change. + +2005-06-09 Katsumi Yamaoka + + * mm-view.el (mm-inline-text): Turn off adaptive-fill-mode while + executing enriched-decode. + 2005-06-04 Luc Teirlinck * gnus-art.el (article-update-date-lapsed): Use `save-match-data'. -- cgit v1.2.1 From 47d4e709887e5f7f9fdaf1e9961b2f806dfb827c Mon Sep 17 00:00:00 2001 From: Daniel Pfeiffer Date: Tue, 14 Jun 2005 07:33:01 +0000 Subject: Switch [Mm]akefile to gmake mode. --- lisp/files.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/files.el b/lisp/files.el index d3764c47a80..2504dd2d129 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1766,12 +1766,12 @@ in that case, this function acts as if `enable-local-variables' were t." ("\\.ad[abs]\\'" . ada-mode) ("\\.ad[bs].dg\\'" . ada-mode) ("\\.\\([pP]\\([Llm]\\|erl\\|od\\)\\|al\\)\\'" . perl-mode) - ("GNUmakefile\\'" . makefile-gmake-mode) ,@(if (memq system-type '(berkeley-unix next-mach darwin)) '(("\\.mk\\'" . makefile-bsdmake-mode) + ("GNUmakefile\\'" . makefile-gmake-mode) ("[Mm]akefile\\'" . makefile-bsdmake-mode)) '(("\\.mk\\'" . makefile-gmake-mode) ; Might be any make, give Gnu the host advantage - ("[Mm]akefile\\'" . makefile-mode))) + ("[Mm]akefile\\'" . makefile-gmake-mode))) ("Makeppfile\\'" . makefile-makepp-mode) ("\\.am\\'" . makefile-automake-mode) ;; Less common extensions come here -- cgit v1.2.1 From 8da6c2f88823000244c6f8d2c5eb6d199bccbae6 Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Tue, 14 Jun 2005 08:14:06 +0000 Subject: (add-to-ordered-list): Rework to use list-order property of list-var. --- lisp/subr.el | 41 ++++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 15 deletions(-) (limited to 'lisp') diff --git a/lisp/subr.el b/lisp/subr.el index fb48e578157..b67fc14a010 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -963,25 +963,36 @@ other hooks, such as major mode hooks, can do the job." The test for presence of ELEMENT is done with `equal'. The resulting list is reordered so that the elements are in the -order given by each element's `list-order' property (a number). -Elements which are not symbols, and symbol elements without a -numeric `lisp-order' property are placed at the end of the list. +order given by each element's numeric list order. Elements which +are not symbols, and symbol elements without a numeric list order +are placed at the end of the list. If the third optional argument ORDER is non-nil and ELEMENT is -a symbol, set the symbol's `list-order' property to the given value. +a symbol, set the symbol's list order to the given value. + +The list order for each symbol is stored in LIST-VAR's +`list-order' property. The return value is the new value of LIST-VAR." - (when (and order (symbolp element)) - (put element 'list-order (and (numberp order) order))) - (add-to-list list-var element) - (set list-var (sort (symbol-value list-var) - (lambda (a b) - (let ((oa (and (symbolp a) (get a 'list-order))) - (ob (and (symbolp b) (get b 'list-order)))) - (cond - ((not oa) nil) - ((not ob) t) - (t (< oa ob)))))))) + (let* ((ordering (get list-var 'list-order)) + (cur (and (symbolp element) (assq element ordering)))) + (when order + (unless (symbolp element) + (error "cannot specify order for non-symbols")) + (if cur + (setcdr cur order) + (setq cur (cons element order)) + (setq ordering (cons cur ordering)) + (put list-var 'list-order ordering))) + (add-to-list list-var element) + (set list-var (sort (symbol-value list-var) + (lambda (a b) + (let ((oa (and (symbolp a) (assq a ordering))) + (ob (and (symbolp b) (assq b ordering)))) + (cond + ((not oa) nil) + ((not ob) t) + (t (< (cdr oa) (cdr ob)))))))))) ;;; Load history -- cgit v1.2.1 From 768e2c65acb182fa9312d97c0c999ec61747e823 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 14 Jun 2005 11:23:09 +0000 Subject: (message-is-yours-p): Fix quoting. --- lisp/gnus/message.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index eaac4e390a9..b65eec7ec12 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -5912,9 +5912,9 @@ want to get rid of this query permanently.")) (defun message-is-yours-p () "Non-nil means current article is yours. -If you have added 'cancel-messages to 'message-shoot-gnksa-feet', all articles +If you have added 'cancel-messages to `message-shoot-gnksa-feet', all articles are yours except those that have Cancel-Lock header not belonging to you. -Instead of shooting GNKSA feet, you should modify 'message-alternative-emails' +Instead of shooting GNKSA feet, you should modify `message-alternative-emails' regexp to match all of yours addresses." ;; Canlock-logic as suggested by Per Abrahamsen ;; -- cgit v1.2.1 From 99b5aab79cc5a4c9ef98714d2081d963c2ee7119 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 14 Jun 2005 11:24:08 +0000 Subject: (gnus-auto-select-subject): Fix quoting in docstring. --- lisp/gnus/gnus-sum.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 8d4c536229b..5447da73fde 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -320,7 +320,7 @@ This variable can either be the symbols `first' (place point on the first subject), `unread' (place point on the subject line of the first unread article), `best' (place point on the subject line of the higest-scored article), `unseen' (place point on the subject line of -the first unseen article), 'unseen-or-unread' (place point on the subject +the first unseen article), `unseen-or-unread' (place point on the subject line of the first unseen article or, if all article have been seen, on the subject line of the first unread article), or a function to be called to place point on some subject line." -- cgit v1.2.1 From 841edf8d67d3f0c81975ee7d9b83885dd0af434f Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 14 Jun 2005 11:30:22 +0000 Subject: (forms--intuit-from-file): Fix reference to `forms-number-of-fields' in error message. (forms-print): Fix quoting in error message. (forms-mode): Fix quoting in docstring. --- lisp/forms.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lisp') diff --git a/lisp/forms.el b/lisp/forms.el index 57985a7297f..d1c5b0c5fd9 100644 --- a/lisp/forms.el +++ b/lisp/forms.el @@ -550,7 +550,7 @@ Commands: Equivalent keys in read-only mode: (eq (length forms-multi-line) 1)) (if (string= forms-multi-line forms-field-sep) (error (concat "Forms control file error: " - "`forms-multi-line' is equal to 'forms-field-sep'"))) + "`forms-multi-line' is equal to `forms-field-sep'"))) (error (concat "Forms control file error: " "`forms-multi-line' must be nil or a one-character string")))) (or (fboundp 'set-text-properties) @@ -1207,7 +1207,7 @@ Commands: Equivalent keys in read-only mode: ;; Need a file to do this. (if (not (file-exists-p forms-file)) - (error "Need existing file or explicit 'forms-number-of-records'") + (error "Need existing file or explicit `forms-number-of-fields'") ;; Visit the file and extract the first record. (setq forms--file-buffer (find-file-noselect forms-file)) @@ -1983,7 +1983,7 @@ after writing out the data." (goto-char (aref forms--markers (1- (length forms--markers))))))) (defun forms-print () - "Send the records to the printer with 'print-buffer', one record per page." + "Send the records to the printer with `print-buffer', one record per page." (interactive) (let ((inhibit-read-only t) (save-record forms--current-record) -- cgit v1.2.1 From 4790f3a4382babb958faf0ee7b2b3a780e7b98e8 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 14 Jun 2005 11:31:43 +0000 Subject: (vi-goto-insert-state): Fix quoting in docstring. --- lisp/emulation/vi.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/emulation/vi.el b/lisp/emulation/vi.el index cd0092e5e87..d6b7c2728b2 100644 --- a/lisp/emulation/vi.el +++ b/lisp/emulation/vi.el @@ -520,7 +520,7 @@ set sw=n M-x set-variable vi-shift-width n " "Go into insert state, the text entered will be repeated if REPETITION > 1. If PREFIX-CODE is given, do it before insertion begins if DO-IT-NOW-P is T. In any case, the prefix-code will be done before each 'redo-insert'. -This function expects 'overwrite-mode' being set properly beforehand." +This function expects `overwrite-mode' being set properly beforehand." (if do-it-now-p (apply (car prefix-code) (cdr prefix-code))) (setq vi-ins-point (point)) (setq vi-ins-repetition repetition) -- cgit v1.2.1 From 69df8d97d8788e15dce1a1573294e201ca85f3ee Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 14 Jun 2005 11:32:58 +0000 Subject: (flymake-new-err-info, flymake-start-syntax-check-for-current-buffer, flymake-simple-cleanup): Fix quoting in docstring. --- lisp/progmodes/flymake.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lisp') diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 28a6aae2435..7b1ba8d033f 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -704,7 +704,7 @@ It's flymake process filter." (nth 1 err-info)) (defvar flymake-new-err-info nil - "Same as 'flymake-err-info', effective when a syntax check is in progress.") + "Same as `flymake-err-info', effective when a syntax check is in progress.") (make-variable-buffer-local 'flymake-new-err-info) @@ -1312,7 +1312,7 @@ Return first 'INCLUDE-DIRS/REL-FILE-NAME' that exists, or just REL-FILE-NAME if (flymake-start-syntax-check buffer))))) (defun flymake-start-syntax-check-for-current-buffer () - "Run 'flymake-start-syntax-check' for current buffer if it isn't already running." + "Run `flymake-start-syntax-check' for current buffer if it isn't already running." (interactive) (flymake-start-syntax-check (current-buffer))) @@ -1655,7 +1655,7 @@ With arg, turn Flymake mode on if and only if arg is positive." temp-source-file-name)) (defun flymake-simple-cleanup (buffer) - "Do cleanup after 'flymake-init-create-temp-buffer-copy'. + "Do cleanup after `flymake-init-create-temp-buffer-copy'. Delete temp file." (let* ((temp-source-file-name (flymake-get-buffer-value buffer "temp-source-file-name"))) (flymake-safe-delete-file temp-source-file-name) -- cgit v1.2.1 From a4fd4556b5186a13fc5109255aa3e8c5798f1b5b Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 14 Jun 2005 11:33:54 +0000 Subject: (eshell/export): Fix quoting in docstring. --- lisp/eshell/esh-var.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el index a0294273985..f1bd94baabf 100644 --- a/lisp/eshell/esh-var.el +++ b/lisp/eshell/esh-var.el @@ -297,7 +297,7 @@ This function is explicit for adding to `eshell-parse-argument-hook'." nil) (defun eshell/export (&rest sets) - "This alias allows the 'export' command to act as bash users expect." + "This alias allows the `export' command to act as bash users expect." (while sets (if (and (stringp (car sets)) (string-match "^\\([^=]+\\)=\\(.*\\)" (car sets))) -- cgit v1.2.1 From 490f67f86e288e21043a5649b959e2601214fd70 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 14 Jun 2005 11:34:43 +0000 Subject: (xdb): Fix quoting in docstring. --- lisp/progmodes/gud.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index f3a95514c13..0737d1aed62 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -1220,7 +1220,7 @@ containing the executable being debugged." The directory containing FILE becomes the initial working directory and source-file directory for your debugger. -You can set the variable 'gud-xdb-directories' to a list of program source +You can set the variable `gud-xdb-directories' to a list of program source directories if your program contains sources from more than one directory." (interactive (list (gud-query-cmdline 'xdb))) -- cgit v1.2.1 From ebb7de8462af1636e625e756c780d48034b65882 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 14 Jun 2005 11:36:04 +0000 Subject: (flyspell-incorrect-hook, flyspell-maybe-correct-transposition, flyspell-maybe-correct-doubling): Fix quoting in docstring. --- lisp/textmodes/flyspell.el | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'lisp') diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 118e490112f..8c2d0937a5a 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -172,7 +172,7 @@ command was not the very same command." "*List of functions to be called when incorrect words are encountered. Each function is given three arguments: the beginning and the end of the incorrect region. The third is either the symbol 'doublon' or the list -of possible corrections as returned by 'ispell-parse-output'. +of possible corrections as returned by `ispell-parse-output'. If any of the functions return non-Nil, the word is not highlighted as incorrect." @@ -982,7 +982,7 @@ Mostly we check word delimiters." (setq r p) (goto-char p)))) r))) - + ;*---------------------------------------------------------------------*/ ;* flyspell-word-search-forward ... */ ;*---------------------------------------------------------------------*/ @@ -996,7 +996,7 @@ Mostly we check word delimiters." (setq r p) (goto-char (1+ p))))) r))) - + ;*---------------------------------------------------------------------*/ ;* flyspell-word ... */ ;*---------------------------------------------------------------------*/ @@ -1026,7 +1026,7 @@ Mostly we check word delimiters." flyspell-mark-duplications-flag (save-excursion (goto-char (1- start)) - (let ((p (flyspell-word-search-backward + (let ((p (flyspell-word-search-backward word (- start (1+ (- end start)))))) (and p (/= p (1- start)))))) @@ -1126,7 +1126,7 @@ Mostly we check word delimiters." (flyspell-notify-misspell start end word poss)) nil)))) ;; return to original location - (goto-char cursor-location) + (goto-char cursor-location) (if ispell-quit (setq ispell-quit nil)) res)))))))) @@ -1839,7 +1839,7 @@ 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) + (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))) @@ -1847,7 +1847,7 @@ Sets `flyspell-auto-correct-previous-pos' to nil" ;*---------------------------------------------------------------------*/ ;* flyspell-auto-correct-previous-word ... */ ;*---------------------------------------------------------------------*/ -(defun flyspell-auto-correct-previous-word (position) +(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") @@ -1863,29 +1863,29 @@ But don't look beyond what's visible on the screen." (narrow-to-region top bot) (overlay-recenter (point)) - (add-hook 'pre-command-hook + (add-hook 'pre-command-hook (function flyspell-auto-correct-previous-hook) t t) (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) + (not (eq (get-char-property + (overlay-start new-overlay) 'face) 'flyspell-incorrect)))) (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 + (setq flyspell-auto-correct-previous-pos (overlay-start new-overlay))))) (when flyspell-auto-correct-previous-pos @@ -2134,9 +2134,9 @@ Ispell, after transposing two adjacent characters, correct the text, and return t. The third arg POSS is either the symbol 'doublon' or a list of -possible corrections as returned by 'ispell-parse-output'. +possible corrections as returned by `ispell-parse-output'. -This function is meant to be added to 'flyspell-incorrect-hook'." +This function is meant to be added to `flyspell-incorrect-hook'." (when (consp poss) (catch 'done (let ((str (buffer-substring beg end)) @@ -2164,9 +2164,9 @@ Ispell, after removing a pair of doubled characters, correct the text, and return t. The third arg POSS is either the symbol 'doublon' or a list of -possible corrections as returned by 'ispell-parse-output'. +possible corrections as returned by `ispell-parse-output'. -This function is meant to be added to 'flyspell-incorrect-hook'." +This function is meant to be added to `flyspell-incorrect-hook'." (when (consp poss) (catch 'done (let ((str (buffer-substring beg end)) -- cgit v1.2.1 From ca0a690049b390729fd6f85f590a57a3a48ba748 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 14 Jun 2005 11:37:49 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 17 +++++++++++++++++ lisp/gnus/ChangeLog | 8 +++++++- 2 files changed, 24 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d8bb1c1bb1a..39cfc619cff 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,20 @@ +2005-06-14 Juanma Barranquero + + * forms.el (forms--intuit-from-file): Fix reference to + `forms-number-of-fields' in error message. + (forms-print): Fix quoting in error message. + + * forms.el (forms-mode): + * emulation/vi.el (vi-goto-insert-state): + * progmodes/flymake.el (flymake-new-err-info) + (flymake-start-syntax-check-for-current-buffer) + (flymake-simple-cleanup): + * eshell/esh-var.el (eshell/export): + * progmodes/gud.el (xdb): + * textmodes/flyspell.el (flyspell-incorrect-hook) + (flyspell-maybe-correct-transposition) + (flyspell-maybe-correct-doubling): Fix quoting in docstring. + 2005-06-13 Luc Teirlinck * emacs-lisp/debug.el (cancel-debug-on-entry): Mention default in diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 841357e28ae..161e966922b 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,9 @@ +2005-06-14 Juanma Barranquero + + * message.el (message-is-yours-p): Fix quoting in docstring. + + * gnus-sum.el (gnus-auto-select-subject): Likewise. + 2005-06-14 Katsumi Yamaoka * mm-view.el (mm-inline-text): Withdraw the last change. @@ -80,7 +86,7 @@ 2005-05-31 Kevin Greiner - * gnus-group.el (): Require gnus-sum and autoload functions to + * gnus-group.el: Require gnus-sum and autoload functions to resolve warnings when gnus-group.el compiled alone. 2005-05-30 Reiner Steib -- cgit v1.2.1 From 8ac3941d044540b246c150fe0b167bdd4bd973b1 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Tue, 14 Jun 2005 12:00:50 +0000 Subject: (debug-on-entry): Fix docstring. --- lisp/emacs-lisp/debug.el | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'lisp') diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 0745508b64b..0ee67355bf4 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -656,10 +656,16 @@ functions to break on entry." ;;;###autoload (defun debug-on-entry (function) "Request FUNCTION to invoke debugger each time it is called. + When called interactively, prompt for FUNCTION in the minibuffer. -If you tell the debugger to continue, FUNCTION's execution proceeds. -This works by modifying the definition of FUNCTION, -which must be written in Lisp, not predefined. + +This works by modifying the definition of FUNCTION. If you tell the +debugger to continue, FUNCTION's execution proceeds. If FUNCTION is a +normal function or a macro written in Lisp, you can also step through +its execution. FUNCTION can also be a primitive that is not a special +form, in which case stepping is not possible. Break-on-entry for +primitive functions only works when that function is called from Lisp. + Use \\[cancel-debug-on-entry] to cancel the effect of this command. Redefining FUNCTION also cancels it." (interactive "aDebug on entry (to function): ") -- cgit v1.2.1 From cdda556dbf2279e65c61e5fca6e1d19efd33f315 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Tue, 14 Jun 2005 12:02:42 +0000 Subject: (recentf-dialog-mode): Use kill-all-local-variables and run-mode-hooks. (recentf-edit-list, recentf-open-files): Don't call kill-all-local-variables directly. --- lisp/recentf.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lisp') diff --git a/lisp/recentf.el b/lisp/recentf.el index bb462bc71d7..1ea3ae6ecb2 100644 --- a/lisp/recentf.el +++ b/lisp/recentf.el @@ -923,9 +923,11 @@ IGNORE arguments." \\{recentf-dialog-mode-map}" (interactive) + (kill-all-local-variables) (setq major-mode 'recentf-dialog-mode) (setq mode-name "recentf-dialog") - (use-local-map recentf-dialog-mode-map)) + (use-local-map recentf-dialog-mode-map) + (run-mode-hooks 'recentf-dialog-mode-hook)) ;;; Hooks ;; @@ -1002,13 +1004,13 @@ That is to select files to be deleted from the recent list." (get-buffer-create (format "*%s - Edit list*" recentf-menu-title)) (switch-to-buffer (current-buffer)) ;; Cleanup buffer - (kill-all-local-variables) (let ((inhibit-read-only t) (ol (overlay-lists))) (erase-buffer) ;; Delete all the overlays. (mapc 'delete-overlay (car ol)) (mapc 'delete-overlay (cdr ol))) + (recentf-dialog-mode) (setq recentf-edit-selected-items nil) ;; Insert the dialog header (widget-insert @@ -1045,7 +1047,6 @@ Click on Cancel or type \"q\" to quit.\n") 'push-button :notify 'recentf-cancel-dialog "Cancel") - (recentf-dialog-mode) (widget-setup) (goto-char (point-min)))) @@ -1101,13 +1102,13 @@ default." (with-current-buffer (get-buffer-create buffer-name) (switch-to-buffer (current-buffer)) ;; Cleanup buffer - (kill-all-local-variables) (let ((inhibit-read-only t) (ol (overlay-lists))) (erase-buffer) ;; Delete all the overlays. (mapc 'delete-overlay (car ol)) (mapc 'delete-overlay (cdr ol))) + (recentf-dialog-mode) ;; Insert the dialog header (widget-insert "Click on a file to open it. ") (widget-insert "Click on Cancel or type \"q\" to quit.\n\n" ) @@ -1123,7 +1124,6 @@ default." 'push-button :notify 'recentf-cancel-dialog "Cancel") - (recentf-dialog-mode) (widget-setup) (goto-char (point-min)))) -- cgit v1.2.1 From 03789b211df7591ae7b194eba072cd39b699fa51 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Tue, 14 Jun 2005 12:03:52 +0000 Subject: (sql-interactive-mode): Use delay-mode-hooks. --- lisp/progmodes/sql.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index add4493e5f8..9b819ceae00 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -2328,7 +2328,7 @@ you entered, right above the output it created. \(setq comint-output-filter-functions \(function (lambda (STR) (comint-show-output))))" - (comint-mode) + (delay-mode-hooks (comint-mode)) ;; Get the `sql-product' for this interactive session. (set (make-local-variable 'sql-product) (or sql-interactive-product -- cgit v1.2.1 From cb1b44b04b69fe1afbaf97934954112da9896737 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Tue, 14 Jun 2005 12:07:24 +0000 Subject: (inferior-octave-mode): Use delay-mode-hooks. --- lisp/progmodes/octave-inf.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/progmodes/octave-inf.el b/lisp/progmodes/octave-inf.el index 250d00171f2..a45976eef32 100644 --- a/lisp/progmodes/octave-inf.el +++ b/lisp/progmodes/octave-inf.el @@ -129,7 +129,7 @@ buffer. Entry to this mode successively runs the hooks `comint-mode-hook' and `inferior-octave-mode-hook'." (interactive) - (comint-mode) + (delay-mode-hooks (comint-mode)) (setq comint-prompt-regexp inferior-octave-prompt major-mode 'inferior-octave-mode mode-name "Inferior Octave" -- cgit v1.2.1 From fb33e15372d02bfe3ee9b26f4d234726246746e3 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Tue, 14 Jun 2005 12:08:43 +0000 Subject: (rmail-edit-mode): Use delay-mode-hooks. --- lisp/mail/rmailedit.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/mail/rmailedit.el b/lisp/mail/rmailedit.el index ceea389cea1..2fbc9290635 100644 --- a/lisp/mail/rmailedit.el +++ b/lisp/mail/rmailedit.el @@ -57,7 +57,7 @@ to return to regular RMAIL: * \\[rmail-cease-edit] makes them permanent. This functions runs the normal hook `rmail-edit-mode-hook'. \\{rmail-edit-map}" - (text-mode) + (delay-mode-hooks (text-mode)) (use-local-map rmail-edit-map) (setq major-mode 'rmail-edit-mode) (setq mode-name "RMAIL Edit") -- cgit v1.2.1 From ccedb10b8baec10dfaf0d1a513c1fbe6a7c47823 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Tue, 14 Jun 2005 12:10:55 +0000 Subject: (internal-ange-ftp-mode): Use delay-mode-hooks and run-mode-hooks. Simplify. --- lisp/net/ange-ftp.el | 53 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 27 deletions(-) (limited to 'lisp') diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index 7fd07ebccfb..277da044c44 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -1964,35 +1964,34 @@ on the gateway machine to do the ftp instead." \\{comint-mode-map}" (interactive) - (comint-mode) + (delay-mode-hooks (comint-mode)) (setq major-mode 'internal-ange-ftp-mode) (setq mode-name "Internal Ange-ftp") - (let ((proc (get-buffer-process (current-buffer)))) - (make-local-variable 'ange-ftp-process-string) - (setq ange-ftp-process-string "") - (make-local-variable 'ange-ftp-process-busy) - (make-local-variable 'ange-ftp-process-result) - (make-local-variable 'ange-ftp-process-msg) - (make-local-variable 'ange-ftp-process-multi-skip) - (make-local-variable 'ange-ftp-process-result-line) - (make-local-variable 'ange-ftp-process-continue) - (make-local-variable 'ange-ftp-hash-mark-count) - (make-local-variable 'ange-ftp-binary-hash-mark-size) - (make-local-variable 'ange-ftp-ascii-hash-mark-size) - (make-local-variable 'ange-ftp-hash-mark-unit) - (make-local-variable 'ange-ftp-xfer-size) - (make-local-variable 'ange-ftp-last-percent) - (setq ange-ftp-hash-mark-count 0) - (setq ange-ftp-xfer-size 0) - (setq ange-ftp-process-result-line "") - - (setq comint-prompt-regexp "^ftp> ") - (make-local-variable 'comint-password-prompt-regexp) - ;; This is a regexp that can't match anything. - ;; ange-ftp has its own ways of handling passwords. - (setq comint-password-prompt-regexp "^a\\'z") - (make-local-variable 'paragraph-start) - (setq paragraph-start comint-prompt-regexp))) + (make-local-variable 'ange-ftp-process-string) + (setq ange-ftp-process-string "") + (make-local-variable 'ange-ftp-process-busy) + (make-local-variable 'ange-ftp-process-result) + (make-local-variable 'ange-ftp-process-msg) + (make-local-variable 'ange-ftp-process-multi-skip) + (make-local-variable 'ange-ftp-process-result-line) + (make-local-variable 'ange-ftp-process-continue) + (make-local-variable 'ange-ftp-hash-mark-count) + (make-local-variable 'ange-ftp-binary-hash-mark-size) + (make-local-variable 'ange-ftp-ascii-hash-mark-size) + (make-local-variable 'ange-ftp-hash-mark-unit) + (make-local-variable 'ange-ftp-xfer-size) + (make-local-variable 'ange-ftp-last-percent) + (setq ange-ftp-hash-mark-count 0) + (setq ange-ftp-xfer-size 0) + (setq ange-ftp-process-result-line "") + (setq comint-prompt-regexp "^ftp> ") + (make-local-variable 'comint-password-prompt-regexp) + ;; This is a regexp that can't match anything. + ;; ange-ftp has its own ways of handling passwords. + (setq comint-password-prompt-regexp "^a\\'z") + (make-local-variable 'paragraph-start) + (setq paragraph-start comint-prompt-regexp) + (run-mode-hooks 'internal-ange-ftp-mode-hook)) (defcustom ange-ftp-raw-login nil "*Use raw ftp commands for login, if account password is not nil. -- cgit v1.2.1 From b59f605b06d8ab6eac60de0744a5ae8c63ec6b40 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Tue, 14 Jun 2005 12:11:54 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 39cfc619cff..459ddcdaa62 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,19 @@ +2005-06-14 Lute Kamstra + + * net/ange-ftp.el (internal-ange-ftp-mode): Use delay-mode-hooks + and run-mode-hooks. Simplify. + + * mail/rmailedit.el (rmail-edit-mode): + * progmodes/octave-inf.el (inferior-octave-mode): + * progmodes/sql.el (sql-interactive-mode): Use delay-mode-hooks. + + * recentf.el (recentf-dialog-mode): Use kill-all-local-variables + and run-mode-hooks. + (recentf-edit-list, recentf-open-files): Don't call + kill-all-local-variables directly. + + * emacs-lisp/debug.el (debug-on-entry): Fix docstring. + 2005-06-14 Juanma Barranquero * forms.el (forms--intuit-from-file): Fix reference to -- cgit v1.2.1 From 3b696504cd460dcf4b4f1655d946e2ad4c148fd2 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 14 Jun 2005 14:34:40 +0000 Subject: (diff-mode): Fix typo in docstring. --- lisp/diff-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index fa8ef2e1565..1cb5111dcfb 100644 --- a/lisp/diff-mode.el +++ b/lisp/diff-mode.el @@ -935,7 +935,7 @@ See `after-change-functions' for the meaning of BEG, END and LEN." Supports unified and context diffs as well as (to a lesser extent) normal diffs. When the buffer is read-only, the ESC prefix is not necessary. -IF you edit the buffer manually, diff-mode will try to update the hunk +If you edit the buffer manually, diff-mode will try to update the hunk headers for you on-the-fly. You can also switch between context diff and unified diff with \\[diff-context->unified], -- cgit v1.2.1 From e2a0329adaca6395909ff0e1eda97474907b23c3 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 14 Jun 2005 15:07:56 +0000 Subject: (url-completion-function): Follow error conventions. --- lisp/url/url-history.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/url/url-history.el b/lisp/url/url-history.el index e2bc9b17f69..3f9a82b9afd 100644 --- a/lisp/url/url-history.el +++ b/lisp/url/url-history.el @@ -84,7 +84,7 @@ to run the `url-history-setup-save-timer' function manually." (defun url-history-setup-save-timer () "Reset the history list timer." (interactive) - (ignore-errors + (ignore-errors (cond ((fboundp 'cancel-timer) (cancel-timer url-history-timer)) ((fboundp 'delete-itimer) (delete-itimer url-history-timer)))) (setq url-history-timer nil) @@ -192,7 +192,7 @@ user for what type to save as." (gethash string url-history-hash-table) t)) (t - (error "url-completion-function very confused.")))) + (error "url-completion-function very confused")))) (provide 'url-history) -- cgit v1.2.1 From 7f3a834027e2a5e0b39c61d59496de9d8123df45 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 14 Jun 2005 15:14:01 +0000 Subject: (gnus-sieve-article-add-rule): Follow error conventions. --- lisp/gnus/gnus-sieve.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/gnus/gnus-sieve.el b/lisp/gnus/gnus-sieve.el index e7409c39df0..db9c8c91f5d 100644 --- a/lisp/gnus/gnus-sieve.el +++ b/lisp/gnus/gnus-sieve.el @@ -129,7 +129,7 @@ Return nil if no rule could be guessed." (let ((rule (gnus-sieve-guess-rule-for-article)) (info (gnus-get-info gnus-newsgroup-name))) (if (null rule) - (error "Could not guess rule for article.") + (error "Could not guess rule for article") (gnus-info-set-params info (cons rule (gnus-info-params info))) (message "Added rule in group %s for article: %s" gnus-newsgroup-name rule))))) -- cgit v1.2.1 From 401d9d1a51ca2606440aebb5d4030cf90dbedd1a Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 14 Jun 2005 15:15:23 +0000 Subject: (gnus-agent-unlist-expire-days): Follow error conventions. --- lisp/gnus/legacy-gnus-agent.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lisp') diff --git a/lisp/gnus/legacy-gnus-agent.el b/lisp/gnus/legacy-gnus-agent.el index 16b0cf6c89f..50675b0ba27 100644 --- a/lisp/gnus/legacy-gnus-agent.el +++ b/lisp/gnus/legacy-gnus-agent.el @@ -25,7 +25,7 @@ converted to the compressed format." ((file-directory-p member) (push member search-in)) ((equal (file-name-nondirectory member) ".agentview") - (setq converted-something + (setq converted-something (or (gnus-agent-convert-agentview member) converted-something)))))) @@ -175,7 +175,7 @@ converted to the compressed format." (t t)))))) (kill-buffer buffer)) - (error "Change gnus-agent-expire-days to an integer for gnus to start.")))) + (error "Change gnus-agent-expire-days to an integer for gnus to start")))) ;; The gnus-agent-unlist-expire-days has its own conversion prompt. ;; Therefore, hide the default prompt. @@ -198,8 +198,8 @@ possible that the hook was persistently saved." (when (cond ((eq (type-of func) 'compiled-function) ;; Search def. of compiled function for gnus-agent-do-once string - (let* (definition - print-level + (let* (definition + print-level print-length (standard-output (lambda (char) -- cgit v1.2.1 From 9afac171a5b627b95b9a70b1832d66b6600900bb Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 14 Jun 2005 15:17:00 +0000 Subject: (spam-stat-buffer-change-to-spam, spam-stat-buffer-change-to-non-spam): Follow error conventions. --- lisp/gnus/spam-stat.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/gnus/spam-stat.el b/lisp/gnus/spam-stat.el index ca1cdc6ce60..6af9b2e2b3f 100644 --- a/lisp/gnus/spam-stat.el +++ b/lisp/gnus/spam-stat.el @@ -370,7 +370,7 @@ Use `spam-stat-ngood', `spam-stat-nbad', `spam-stat-good', (lambda (word count) (let ((entry (gethash word spam-stat))) (if (not entry) - (error "This buffer has unknown words in it.") + (error "This buffer has unknown words in it") (spam-stat-set-good entry (- (spam-stat-good entry) count)) (spam-stat-set-bad entry (+ (spam-stat-bad entry) count)) (spam-stat-set-score entry (spam-stat-compute-score entry)) @@ -386,7 +386,7 @@ Use `spam-stat-ngood', `spam-stat-nbad', `spam-stat-good', (lambda (word count) (let ((entry (gethash word spam-stat))) (if (not entry) - (error "This buffer has unknown words in it.") + (error "This buffer has unknown words in it") (spam-stat-set-good entry (+ (spam-stat-good entry) count)) (spam-stat-set-bad entry (- (spam-stat-bad entry) count)) (spam-stat-set-score entry (spam-stat-compute-score entry)) -- cgit v1.2.1 From 90d7908eb77b22c40c0038b6ceb1d563a8cb2766 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 14 Jun 2005 15:19:08 +0000 Subject: (isearchb-activate): Follow error conventions. --- lisp/isearchb.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/isearchb.el b/lisp/isearchb.el index 5c70bd8fc00..dbcbb1b7af2 100644 --- a/lisp/isearchb.el +++ b/lisp/isearchb.el @@ -213,7 +213,7 @@ accessed via isearchb." ((eq last-command 'isearchb-activate) (if isearchb-last-buffer (switch-to-buffer isearchb-last-buffer) - (error "isearchb: There is no previous buffer to toggle to.")) + (error "isearchb: There is no previous buffer to toggle to")) (isearchb-stop nil t)) (t (message "isearchb: ") -- cgit v1.2.1 From e248903c199b4d2f93029f743119c054c5565ac3 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 14 Jun 2005 15:20:05 +0000 Subject: (cvs-mode): Follow error conventions. --- lisp/pcvs.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lisp') diff --git a/lisp/pcvs.el b/lisp/pcvs.el index adcbba2792b..be93104a33f 100644 --- a/lisp/pcvs.el +++ b/lisp/pcvs.el @@ -944,9 +944,9 @@ With a prefix argument, prompt for cvs FLAGS to use." (defun-cvs-mode (cvs-mode-checkout . NOARGS) (dir) "Run cvs checkout against the current branch. The files are stored to DIR." - (interactive + (interactive (let* ((branch (cvs-prefix-get 'cvs-branch-prefix)) - (prompt (format "CVS Checkout Directory for `%s%s': " + (prompt (format "CVS Checkout Directory for `%s%s': " (cvs-get-module) (if branch (format " (branch: %s)" branch) "")))) @@ -1123,7 +1123,7 @@ Full documentation is in the Texinfo file." ("->" cvs-secondary-branch-prefix)))) " " cvs-mode-line-process)) (if buffer-file-name - (error "Use M-x cvs-quickdir to get a *cvs* buffer.")) + (error "Use M-x cvs-quickdir to get a *cvs* buffer")) (buffer-disable-undo) ;;(set (make-local-variable 'goal-column) cvs-cursor-column) (set (make-local-variable 'revert-buffer-function) 'cvs-mode-revert-buffer) -- cgit v1.2.1 From e20bb6294d0581eeb98aa827300d1e382f413e2c Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 14 Jun 2005 15:20:47 +0000 Subject: (ses-load): Follow error conventions. --- lisp/ses.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/ses.el b/lisp/ses.el index d01a8307ffd..1107f21d510 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -1361,7 +1361,7 @@ execute cell formulas or print functions." (ses-set-parameter 'ses--file-format 2) (message "Upgrading from SES-1 file format"))) (or (= ses--file-format 2) - (error "This file needs a newer version of the SES library code.")) + (error "This file needs a newer version of the SES library code")) (ses-create-cell-variable-range 0 (1- ses--numrows) 0 (1- ses--numcols)) ;;Initialize cell array (setq ses--cells (make-vector ses--numrows nil)) -- cgit v1.2.1 From ef5c2ecae7fef13c20a14fdf3f23928f88cfcf47 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 14 Jun 2005 15:21:33 +0000 Subject: (vc-arch-checkin, vc-arch-diff): Follow error conventions. --- lisp/vc-arch.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lisp') diff --git a/lisp/vc-arch.el b/lisp/vc-arch.el index b821928c539..569f864c0ea 100644 --- a/lisp/vc-arch.el +++ b/lisp/vc-arch.el @@ -178,7 +178,7 @@ Only the value `maybe' can be trusted :-(." (defun vc-arch-root (file) "Return the root directory of a Arch project, if any." (or (vc-file-getprop file 'arch-root) - (vc-file-setprop + (vc-file-setprop ;; Check the =tagging-method, in case someone naively manually ;; creates a {arch} directory somewhere. file 'arch-root (vc-find-root file "{arch}/=tagging-method")))) @@ -357,7 +357,7 @@ Return non-nil if FILE is unchanged." (defun vc-arch-checkout-model (file) 'implicit) (defun vc-arch-checkin (file rev comment) - (if rev (error "Committing to a specific revision is unsupported.")) + (if rev (error "Committing to a specific revision is unsupported")) (let ((summary (file-relative-name file (vc-arch-root file)))) ;; Extract a summary from the comment. (when (or (string-match "\\`Summary:[ \t]*\\(.*[^ \t\n]\\)\\([ \t]*\n\\)*" comment) @@ -376,7 +376,7 @@ Return non-nil if FILE is unchanged." ;; so we can diff with the current file. (setq newvers nil)) (if newvers - (error "Diffing specific revisions not implemented.") + (error "Diffing specific revisions not implemented") (let* ((async (and (not vc-disable-async-diff) (fboundp 'start-process))) ;; Run the command from the root dir. (default-directory (vc-arch-root file)) -- cgit v1.2.1 From ff12e78d4ba17cb8e643a1e0c792f6d7c9a31e05 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 14 Jun 2005 15:22:35 +0000 Subject: (tramp-find-file-exists-command, tramp-find-shell): Follow error conventions. --- lisp/net/tramp.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index a5ee3c9bc04..5873efcb98a 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -5095,7 +5095,7 @@ file exists and nonzero exit status otherwise." (and (setq tramp-file-exists-command "ls -d %s") (file-exists-p existing) (not (file-exists-p nonexisting)))) - (error "Couldn't find command to check if file exists.")))) + (error "Couldn't find command to check if file exists")))) ;; CCC test ksh or bash found for tilde expansion? @@ -5131,7 +5131,7 @@ file exists and nonzero exit status otherwise." 60 (format "\\(\\(%s\\)\\|\\(%s\\)\\)\\'" tramp-shell-prompt-pattern shell-prompt-pattern)) (pop-to-buffer (buffer-name)) - (error "Couldn't find remote `%s' prompt." shell)) + (error "Couldn't find remote `%s' prompt" shell)) (tramp-message 9 "Setting remote shell prompt...") ;; Douglas Gray Stephens says that we -- cgit v1.2.1 From eb4ed27f9a3c5ea3a827f199ca3d0726fec81ea2 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 14 Jun 2005 15:23:26 +0000 Subject: (ada-create-case-exception, ada-create-case-exception-substring, ada-make-subprogram-body): Follow error conventions. --- lisp/progmodes/ada-mode.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lisp') diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el index bc0edb1f047..ba4702d90a4 100644 --- a/lisp/progmodes/ada-mode.el +++ b/lisp/progmodes/ada-mode.el @@ -1462,7 +1462,7 @@ The standard casing rules will no longer apply to this word." (setq file-name (car ada-case-exception-file))) (t (error (concat "No exception file specified. " - "See variable ada-case-exception-file.")))) + "See variable ada-case-exception-file")))) (set-syntax-table ada-mode-symbol-syntax-table) (unless word @@ -1501,7 +1501,7 @@ word itself has a special casing." (car ada-case-exception-file)) (t (error (concat "No exception file specified. " - "See variable ada-case-exception-file.")))))) + "See variable ada-case-exception-file")))))) ;; Find the substring to define as an exception. Order is: the parameter, ;; if any, or the selected region, or the word under the cursor @@ -5398,7 +5398,7 @@ This function typically is to be hooked into `ff-file-created-hooks'." (setq body-file (ada-get-body-name)) (if body-file (find-file body-file) - (error "No body found for the package. Create it first.")) + (error "No body found for the package. Create it first")) (save-restriction (widen) -- cgit v1.2.1 From 750362889e759038e844e1c11ce7ed9da4cb9b4e Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 14 Jun 2005 15:24:13 +0000 Subject: (idlwave-shell-move-to-bp): Follow error conventions. --- lisp/progmodes/idlw-shell.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el index e804b9f8d50..19656238764 100644 --- a/lisp/progmodes/idlw-shell.el +++ b/lisp/progmodes/idlw-shell.el @@ -2734,7 +2734,7 @@ Runs to the last statement and then steps 1 statement. Use the .out command." (funcall orig-func cur-line orig-bp-line) (or (not bp-line) (funcall closer-func cur-line bp-line))) (setq bp-line cur-line)))) - (unless bp-line (error "No further breakpoints.")) + (unless bp-line (error "No further breakpoints")) (goto-line bp-line))) ;; Examine Commands ------------------------------------------------------ -- cgit v1.2.1 From ff689efdb451432e0abdc3e46f0a84956b1dd386 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 14 Jun 2005 15:29:27 +0000 Subject: idlwave-complete-class-structure-tag-help): Follow error conventions. --- lisp/progmodes/idlwave.el | 826 +++++++++++++++++++++++----------------------- 1 file changed, 413 insertions(+), 413 deletions(-) (limited to 'lisp') diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index 6bd7e0eaced..820e619f331 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el @@ -70,7 +70,7 @@ ;; of the documentation is available from the maintainers webpage (see ;; SOURCE). ;; -;; +;; ;; ACKNOWLEDGMENTS ;; =============== ;; @@ -120,7 +120,7 @@ ;; up inserting the character that expanded the abbrev after moving ;; point backward, e.g., "\cl" expanded with a space becomes ;; "LONG( )" with point before the close paren. This is solved by -;; using a temporary function in `post-command-hook' - not pretty, +;; using a temporary function in `post-command-hook' - not pretty, ;; but it works. ;; ;; Tabs and spaces are treated equally as whitespace when filling a @@ -166,13 +166,13 @@ nil ;; We've got what we needed ;; We have the old or no custom-library, hack around it! (defmacro defgroup (&rest args) nil) - (defmacro defcustom (var value doc &rest args) + (defmacro defcustom (var value doc &rest args) `(defvar ,var ,value ,doc)))) (defgroup idlwave nil "Major mode for editing IDL .pro files" :tag "IDLWAVE" - :link '(url-link :tag "Home Page" + :link '(url-link :tag "Home Page" "http://idlwave.org") :link '(emacs-commentary-link :tag "Commentary in idlw-shell.el" "idlw-shell.el") @@ -286,8 +286,8 @@ extends to the end of the match for the regular expression." (defcustom idlwave-auto-fill-split-string t "*If non-nil then auto fill will split strings with the IDL `+' operator. -When the line end falls within a string, string concatenation with the -'+' operator will be used to distribute a long string over lines. +When the line end falls within a string, string concatenation with the +'+' operator will be used to distribute a long string over lines. If nil and a string is split then a terminal beep and warning are issued. This variable is ignored when `idlwave-fill-comment-line-only' is @@ -351,7 +351,7 @@ usually a good idea.." Initializing the routine info can take long, in particular if a large library catalog is involved. When Emacs is idle for more than the number of seconds specified by this variable, it starts the initialization. -The process is split into five steps, in order to keep possible work +The process is split into five steps, in order to keep possible work interruption as short as possible. If one of the steps finishes, and no user input has arrived in the mean time, initialization proceeds immediately to the next step. @@ -403,7 +403,7 @@ t All available (const :tag "When saving a buffer" save-buffer) (const :tag "After a buffer was killed" kill-buffer) (const :tag "After a buffer was compiled successfully, update shell info" compile-buffer)))) - + (defcustom idlwave-rinfo-max-source-lines 5 "*Maximum number of source files displayed in the Routine Info window. When an integer, it is the maximum number of source files displayed. @@ -436,7 +436,7 @@ value of `!DIR'. See also `idlwave-library-path'." :group 'idlwave-routine-info :type 'directory) -(defcustom idlwave-config-directory +(defcustom idlwave-config-directory (convert-standard-filename "~/.idlwave") "*Directory for configuration files and user-library catalog." :group 'idlwave-routine-info @@ -451,7 +451,7 @@ value of `!DIR'. See also `idlwave-library-path'." (defcustom idlwave-special-lib-alist nil "Alist of regular expressions matching special library directories. When listing routine source locations, IDLWAVE gives a short hint where -the file defining the routine is located. By default it lists `SystemLib' +the file defining the routine is located. By default it lists `SystemLib' for routines in the system library `!DIR/lib' and `Library' for anything else. This variable can define additional types. The car of each entry is a regular expression matching the file name (they normally will match @@ -462,7 +462,7 @@ chars are allowed." (cons regexp string))) (defcustom idlwave-auto-write-paths t - "Write out path (!PATH) and system directory (!DIR) info automatically. + "Write out path (!PATH) and system directory (!DIR) info automatically. Path info is needed to locate library catalog files. If non-nil, whenever the path-list changes as a result of shell-query, etc., it is written to file. Otherwise, the menu option \"Write Paths\" can be @@ -493,7 +493,7 @@ used to force a write." This variable determines the case (UPPER/lower/Capitalized...) of words inserted into the buffer by completion. The preferred case can be specified separately for routine names, keywords, classes and -methods. +methods. This alist should therefore have entries for `routine' (normal functions and procedures, i.e. non-methods), `keyword', `class', and `method'. Plausible values are @@ -580,7 +580,7 @@ certain methods this assumption is almost always true. The methods for which to assume this can be set here." :group 'idlwave-routine-info :type '(repeat (regexp :tag "Match method:"))) - + (defcustom idlwave-completion-show-classes 1 "*Number of classes to show when completing object methods and keywords. @@ -645,7 +645,7 @@ should contain at least two elements: (method-default . VALUE) and specify if the class should be found during method and keyword completion, respectively. -The alist may have additional entries specifying exceptions from the +The alist may have additional entries specifying exceptions from the keyword completion rule for specific methods, like INIT or GETPROPERTY. In order to turn on class specification for the INIT method, add an entry (\"INIT\" . t). The method name must be ALL-CAPS." @@ -669,7 +669,7 @@ particular object method call. This happens during the commands value of the variable `idlwave-query-class'. When you specify a class, this information can be stored as a text -property on the `->' arrow in the source code, so that during the same +property on the `->' arrow in the source code, so that during the same editing session, IDLWAVE will not have to ask again. When this variable is non-nil, IDLWAVE will store and reuse the class information. The class stored can be checked and removed with `\\[idlwave-routine-info]' @@ -1049,7 +1049,7 @@ IDL process is made." :group 'idlwave-misc :type 'boolean) -(defcustom idlwave-default-font-lock-items +(defcustom idlwave-default-font-lock-items '(pros-and-functions batch-files idlwave-idl-keywords label goto common-blocks class-arrows) "Items which should be fontified on the default fontification level 2. @@ -1111,25 +1111,25 @@ As a user, you should not set this to t.") ;;; and Carsten Dominik... ;; The following are the reserved words in IDL. Maybe we should -;; highlight some more stuff as well? +;; highlight some more stuff as well? ;; Procedure declarations. Fontify keyword plus procedure name. (defvar idlwave-idl-keywords - ;; To update this regexp, update the list of keywords and + ;; To update this regexp, update the list of keywords and ;; evaluate the form. - ;; (insert + ;; (insert ;; (prin1-to-string - ;; (concat + ;; (concat ;; "\\<\\(" - ;; (regexp-opt + ;; (regexp-opt ;; '("||" "&&" "and" "or" "xor" "not" - ;; "eq" "ge" "gt" "le" "lt" "ne" + ;; "eq" "ge" "gt" "le" "lt" "ne" ;; "for" "do" "endfor" - ;; "if" "then" "endif" "else" "endelse" + ;; "if" "then" "endif" "else" "endelse" ;; "case" "of" "endcase" ;; "switch" "break" "continue" "endswitch" ;; "begin" "end" ;; "repeat" "until" "endrep" - ;; "while" "endwhile" + ;; "while" "endwhile" ;; "goto" "return" ;; "inherits" "mod" ;; "compile_opt" "forward_function" @@ -1152,7 +1152,7 @@ As a user, you should not set this to t.") (2 font-lock-reference-face nil t) ; block name (font-lock-match-c++-style-declaration-item-and-skip-to-next ;; Start with point after block name and comma - (goto-char (match-end 0)) ; needed for XEmacs, could be nil + (goto-char (match-end 0)) ; needed for XEmacs, could be nil nil (1 font-lock-variable-name-face) ; variable names ))) @@ -1207,7 +1207,7 @@ As a user, you should not set this to t.") ;; All operators (not used because too noisy) (all-operators '("[-*^#+<>/]" (0 font-lock-keyword-face))) - + ;; Arrows with text property `idlwave-class' (class-arrows '(idlwave-match-class-arrows (0 idlwave-class-arrow-face)))) @@ -1244,14 +1244,14 @@ As a user, you should not set this to t.") (defvar idlwave-font-lock-defaults '((idlwave-font-lock-keywords - idlwave-font-lock-keywords-1 + idlwave-font-lock-keywords-1 idlwave-font-lock-keywords-2 idlwave-font-lock-keywords-3) - nil t - ((?$ . "w") (?_ . "w") (?. . "w") (?| . "w") (?& . "w")) + nil t + ((?$ . "w") (?_ . "w") (?. . "w") (?| . "w") (?& . "w")) beginning-of-line)) -(put 'idlwave-mode 'font-lock-defaults +(put 'idlwave-mode 'font-lock-defaults idlwave-font-lock-defaults) ; XEmacs (defconst idlwave-comment-line-start-skip "^[ \t]*;" @@ -1259,7 +1259,7 @@ As a user, you should not set this to t.") That is the _beginning_ of a line containing a comment delimiter `;' preceded only by whitespace.") -(defconst idlwave-begin-block-reg +(defconst idlwave-begin-block-reg "\\<\\(pro\\|function\\|begin\\|case\\|switch\\)\\>" "Regular expression to find the beginning of a block. The case does not matter. The search skips matches in comments.") @@ -1336,17 +1336,17 @@ blocks starting with a BEGIN statement. The matches must have associations '(goto . ("goto\\>" nil)) '(case . ("case\\>" nil)) '(switch . ("switch\\>" nil)) - (cons 'call (list (concat "\\(" idlwave-variable "\\) *= *" + (cons 'call (list (concat "\\(" idlwave-variable "\\) *= *" "\\(" idlwave-method-call "\\s *\\)?" idlwave-identifier "\\s *(") nil)) - (cons 'call (list (concat + (cons 'call (list (concat "\\(" idlwave-method-call "\\s *\\)?" - idlwave-identifier + idlwave-identifier "\\( *\\($\\|\\$\\)\\|\\s *,\\)") nil)) - (cons 'assign (list (concat + (cons 'assign (list (concat "\\(" idlwave-variable "\\) *=") nil))) - + "Associated list of statement matching regular expressions. Each regular expression matches the start of an IDL statement. The first element of each association is a symbol giving the statement @@ -1540,15 +1540,15 @@ Capitalize system variables - action only (not (equal idlwave-shell-debug-modifiers '()))) ;; Bind the debug commands also with the special modifiers. (let ((shift (memq 'shift idlwave-shell-debug-modifiers)) - (mods-noshift (delq 'shift + (mods-noshift (delq 'shift (copy-sequence idlwave-shell-debug-modifiers)))) - (define-key idlwave-mode-map + (define-key idlwave-mode-map (vector (append mods-noshift (list (if shift ?C ?c)))) 'idlwave-shell-save-and-run) - (define-key idlwave-mode-map + (define-key idlwave-mode-map (vector (append mods-noshift (list (if shift ?B ?b)))) 'idlwave-shell-break-here) - (define-key idlwave-mode-map + (define-key idlwave-mode-map (vector (append mods-noshift (list (if shift ?E ?e)))) 'idlwave-shell-run-region))) (define-key idlwave-mode-map "\C-c\C-d\C-c" 'idlwave-shell-save-and-run) @@ -1584,7 +1584,7 @@ Capitalize system variables - action only (define-key idlwave-mode-map "\M-\C-i" 'idlwave-complete) (define-key idlwave-mode-map "\C-c\C-i" 'idlwave-update-routine-info) (define-key idlwave-mode-map "\C-c=" 'idlwave-resolve) -(define-key idlwave-mode-map +(define-key idlwave-mode-map (if (featurep 'xemacs) [(shift button3)] [(shift mouse-3)]) 'idlwave-mouse-context-help) @@ -1595,7 +1595,7 @@ Capitalize system variables - action only ; (lambda (char) 0))) (idlwave-action-and-binding "<" '(idlwave-surround -1 -1)) ;; Binding works for both > and ->, by changing the length of the token. -(idlwave-action-and-binding ">" '(idlwave-surround -1 -1 '(?-) 1 +(idlwave-action-and-binding ">" '(idlwave-surround -1 -1 '(?-) 1 'idlwave-gtr-pad-hook)) (idlwave-action-and-binding "->" '(idlwave-surround -1 -1 nil 2) t) (idlwave-action-and-binding "," '(idlwave-surround 0 -1)) @@ -1629,7 +1629,7 @@ idlwave-mode-abbrev-table unless TABLE is non-nil." (error (apply 'define-abbrev args))))) (condition-case nil - (modify-syntax-entry (string-to-char idlwave-abbrev-start-char) + (modify-syntax-entry (string-to-char idlwave-abbrev-start-char) "w" idlwave-mode-syntax-table) (error nil)) @@ -1702,7 +1702,7 @@ idlwave-mode-abbrev-table unless TABLE is non-nil." (idlwave-define-abbrev "s" "size()" (idlwave-keyword-abbrev 1)) (idlwave-define-abbrev "wi" "widget_info()" (idlwave-keyword-abbrev 1)) (idlwave-define-abbrev "wc" "widget_control," (idlwave-keyword-abbrev 0)) - + ;; This section is reserved words only. (From IDL user manual) ;; (idlwave-define-abbrev "and" "and" (idlwave-keyword-abbrev 0 t) t) @@ -1751,7 +1751,7 @@ idlwave-mode-abbrev-table unless TABLE is non-nil." (defvar imenu-extract-index-name-function) (defvar imenu-prev-index-position-function) ;; defined later - so just make the compiler hush -(defvar idlwave-mode-menu) +(defvar idlwave-mode-menu) (defvar idlwave-mode-debug-menu) ;;;###autoload @@ -1836,7 +1836,7 @@ The main features of this mode are \\i IF statement template \\elif IF-ELSE statement template \\b BEGIN - + For a full list, use \\[idlwave-list-abbrevs]. Some templates also have direct keybindings - see the list of keybindings below. @@ -1878,26 +1878,26 @@ The main features of this mode are (interactive) (kill-all-local-variables) - + (if idlwave-startup-message (message "Emacs IDLWAVE mode version %s." idlwave-mode-version)) (setq idlwave-startup-message nil) - + (setq local-abbrev-table idlwave-mode-abbrev-table) (set-syntax-table idlwave-mode-syntax-table) - + (set (make-local-variable 'indent-line-function) 'idlwave-indent-and-action) - + (make-local-variable idlwave-comment-indent-function) (set idlwave-comment-indent-function 'idlwave-comment-hook) - + (set (make-local-variable 'comment-start-skip) ";+[ \t]*") (set (make-local-variable 'comment-start) ";") (set (make-local-variable 'require-final-newline) mode-require-final-newline) (set (make-local-variable 'abbrev-all-caps) t) (set (make-local-variable 'indent-tabs-mode) nil) (set (make-local-variable 'completion-ignore-case) t) - + (use-local-map idlwave-mode-map) (when (featurep 'easymenu) @@ -1907,11 +1907,11 @@ The main features of this mode are (setq mode-name "IDLWAVE") (setq major-mode 'idlwave-mode) (setq abbrev-mode t) - + (set (make-local-variable idlwave-fill-function) 'idlwave-auto-fill) (setq comment-end "") (set (make-local-variable 'comment-multi-line) nil) - (set (make-local-variable 'paragraph-separate) + (set (make-local-variable 'paragraph-separate) "[ \t\f]*$\\|[ \t]*;+[ \t]*$\\|;+[+=-_*]+$") (set (make-local-variable 'paragraph-start) "[ \t\f]\\|[ \t]*;+[ \t]") (set (make-local-variable 'paragraph-ignore-fill-prefix) nil) @@ -1920,7 +1920,7 @@ The main features of this mode are ;; Set tag table list to use IDLTAGS as file name. (if (boundp 'tag-table-alist) (add-to-list 'tag-table-alist '("\\.pro$" . "IDLTAGS"))) - + ;; Font-lock additions - originally Phil Williams, then Ulrik Dickow ;; Following line is for Emacs - XEmacs uses the corresponding property ;; on the `idlwave-mode' symbol. @@ -1961,18 +1961,18 @@ The main features of this mode are (unless idlwave-setup-done (if (not (file-directory-p idlwave-config-directory)) (make-directory idlwave-config-directory)) - (setq idlwave-user-catalog-file (expand-file-name - idlwave-user-catalog-file + (setq idlwave-user-catalog-file (expand-file-name + idlwave-user-catalog-file idlwave-config-directory) - idlwave-path-file (expand-file-name - idlwave-path-file + idlwave-path-file (expand-file-name + idlwave-path-file idlwave-config-directory)) (idlwave-read-paths) ; we may need these early (setq idlwave-setup-done t))) ;; ;; Code Formatting ---------------------------------------------------- -;; +;; (defun idlwave-push-mark (&rest rest) "Push mark for compatibility with Emacs 18/19." @@ -2121,7 +2121,7 @@ Also checks if the correct end statement has been used." (if (> end-pos eol-pos) (setq end-pos pos)) (goto-char end-pos) - (setq end (buffer-substring + (setq end (buffer-substring (progn (skip-chars-backward "a-zA-Z") (point)) @@ -2143,7 +2143,7 @@ Also checks if the correct end statement has been used." (sit-for 1)) (t (beep) - (message "Warning: Shouldn't this be \"%s\" instead of \"%s\"?" + (message "Warning: Shouldn't this be \"%s\" instead of \"%s\"?" end1 end) (sit-for 1)))))))) ;;(delete-char 1)) @@ -2155,8 +2155,8 @@ Also checks if the correct end statement has been used." ((looking-at "pro\\|case\\|switch\\|function\\>") (assoc (downcase (match-string 0)) idlwave-block-matches)) ((looking-at "begin\\>") - (let ((limit (save-excursion - (idlwave-beginning-of-statement) + (let ((limit (save-excursion + (idlwave-beginning-of-statement) (point)))) (cond ((re-search-backward ":[ \t]*\\=" limit t) @@ -2184,9 +2184,9 @@ Also checks if the correct end statement has been used." (insert "end") (idlwave-show-begin))) -(defun idlwave-gtr-pad-hook (char) +(defun idlwave-gtr-pad-hook (char) "Let the > symbol expand around -> if present. The new token length -is returned." +is returned." 2) (defun idlwave-surround (&optional before after escape-chars length ec-hook) @@ -2216,8 +2216,8 @@ return value." (let* ((length (or length 1)) ; establish a default for LENGTH (prev-char (char-after (- (point) (1+ length))))) (when (or (not (memq prev-char escape-chars)) - (and (fboundp ec-hook) - (setq length + (and (fboundp ec-hook) + (setq length (save-excursion (funcall ec-hook prev-char))))) (backward-char length) (save-restriction @@ -2439,7 +2439,7 @@ Returns non-nil if successfull." (let ((eos (save-excursion (idlwave-block-jump-out -1 'nomark) (point)))) - (if (setq status (idlwave-find-key + (if (setq status (idlwave-find-key idlwave-end-block-reg -1 'nomark eos)) (idlwave-beginning-of-statement) (message "No nested block before beginning of containing block."))) @@ -2447,7 +2447,7 @@ Returns non-nil if successfull." (let ((eos (save-excursion (idlwave-block-jump-out 1 'nomark) (point)))) - (if (setq status (idlwave-find-key + (if (setq status (idlwave-find-key idlwave-begin-block-reg 1 'nomark eos)) (idlwave-end-of-statement) (message "No nested block before end of containing block.")))) @@ -2461,7 +2461,7 @@ The marks are pushed." (here (point))) (goto-char (point-max)) (if (re-search-backward idlwave-doclib-start nil t) - (progn + (progn (setq beg (progn (beginning-of-line) (point))) (if (re-search-forward idlwave-doclib-end nil t) (progn @@ -2495,7 +2495,7 @@ actual statement." ((eq major-mode 'idlwave-shell-mode) (if (re-search-backward idlwave-shell-prompt-pattern nil t) (goto-char (match-end 0)))) - (t + (t (if (save-excursion (forward-line -1) (idlwave-is-continuation-line)) (idlwave-previous-statement) (beginning-of-line))))) @@ -2572,7 +2572,7 @@ If not in a statement just moves to end of line. Returns position." (let ((save-point (point))) (when (re-search-forward ".*&" lim t) (goto-char (match-end 0)) - (if (idlwave-quoted) + (if (idlwave-quoted) (goto-char save-point) (if (eq (char-after (- (point) 2)) ?&) (goto-char save-point)))) (point))) @@ -2589,7 +2589,7 @@ If there is no label point is not moved and nil is returned." ;; - not in parenthesis (like a[0:3]) ;; - not followed by another ":" in explicit class, ala a->b::c ;; As many in this mode, this function is heuristic and not an exact - ;; parser. + ;; parser. (let* ((start (point)) (eos (save-excursion (idlwave-end-of-statement) (point))) (end (idlwave-find-key ":" 1 'nomark eos))) @@ -2666,7 +2666,7 @@ equal sign will be surrounded by BEFORE and AFTER blanks. If `idlwave-pad-keyword' is t then keyword assignment is treated just like assignment statements. When nil, spaces are removed for keyword assignment. Any other value keeps the current space around the `='. -Limits in for loops are treated as keyword assignment. +Limits in for loops are treated as keyword assignment. Starting with IDL 6.0, a number of op= assignments are available. Since ambiguities of the form: @@ -2681,25 +2681,25 @@ operators, such as ##=, ^=, etc., will be pre-padded. See `idlwave-surround'." (if idlwave-surround-by-blank - (let + (let ((non-an-ops "\\(##\\|\\*\\|\\+\\|-\\|/\\|<\\|>\\|\\^\\)\\=") - (an-ops + (an-ops "\\s-\\(AND\\|EQ\\|GE\\|GT\\|LE\\|LT\\|MOD\\|NE\\|OR\\|XOR\\)\\=") (len 1)) - - (save-excursion + + (save-excursion (let ((case-fold-search t)) (backward-char) - (if (or + (if (or (re-search-backward non-an-ops nil t) ;; Why doesn't ##? work for both? - (re-search-backward "\\(#\\)\\=" nil t)) + (re-search-backward "\\(#\\)\\=" nil t)) (setq len (1+ (length (match-string 1)))) (when (re-search-backward an-ops nil t) (setq begin nil) ; won't modify begin (setq len (1+ (length (match-string 1)))))))) - - (if (eq t idlwave-pad-keyword) + + (if (eq t idlwave-pad-keyword) ;; Everything gets padded equally (idlwave-surround before after nil len) ;; Treating keywords/for variables specially... @@ -2710,22 +2710,22 @@ See `idlwave-surround'." (skip-chars-backward "= \t") (nth 2 (idlwave-where))))) (cond ((or (memq what '(function-keyword procedure-keyword)) - (memq (caar st) '(for pdef))) - (cond + (memq (caar st) '(for pdef))) + (cond ((null idlwave-pad-keyword) (idlwave-surround 0 0) ) ; remove space (t))) ; leave any spaces alone (t (idlwave-surround before after nil len)))))))) - + (defun idlwave-indent-and-action (&optional arg) "Call `idlwave-indent-line' and do expand actions. With prefix ARG non-nil, indent the entire sub-statement." (interactive "p") (save-excursion - (if (and idlwave-expand-generic-end - (re-search-backward "\\<\\(end\\)\\s-*\\=" + (if (and idlwave-expand-generic-end + (re-search-backward "\\<\\(end\\)\\s-*\\=" (max 0 (- (point) 10)) t) (looking-at "\\(end\\)\\([ \n\t]\\|\\'\\)")) (progn (goto-char (match-end 1)) @@ -2735,7 +2735,7 @@ With prefix ARG non-nil, indent the entire sub-statement." (when (and (not arg) current-prefix-arg) (setq arg current-prefix-arg) (setq current-prefix-arg nil)) - (if arg + (if arg (idlwave-indent-statement) (idlwave-indent-line t))) @@ -2868,7 +2868,7 @@ Inserts spaces before markers at point." (save-excursion (cond ;; Beginning of file - ((prog1 + ((prog1 (idlwave-previous-statement) (setq beg-prev-pos (point))) 0) @@ -2878,7 +2878,7 @@ Inserts spaces before markers at point." idlwave-main-block-indent)) ;; Begin block ((idlwave-look-at idlwave-begin-block-reg t) - (+ (idlwave-min-current-statement-indent) + (+ (idlwave-min-current-statement-indent) idlwave-block-indent)) ;; End Block ((idlwave-look-at idlwave-end-block-reg t) @@ -2889,7 +2889,7 @@ Inserts spaces before markers at point." (idlwave-min-current-statement-indent))) ;; idlwave-end-offset ;; idlwave-block-indent)) - + ;; Default to current indent ((idlwave-current-statement-indent)))))) ;; adjust the indentation based on the current statement @@ -2905,7 +2905,7 @@ Inserts spaces before markers at point." (defun idlwave-calculate-paren-indent (beg-reg end-reg close-exp) "Calculate the continuation indent inside a paren group. -Returns a cons-cell with (open . indent), where open is the +Returns a cons-cell with (open . indent), where open is the location of the open paren" (let ((open (nth 1 (parse-partial-sexp beg-reg end-reg)))) ;; Found an innermost open paren. @@ -2946,24 +2946,24 @@ groupings, are treated separately." (end-reg (progn (beginning-of-line) (point))) (beg-last-statement (save-excursion (idlwave-previous-statement) (point))) - (beg-reg (progn (idlwave-start-of-substatement 'pre) + (beg-reg (progn (idlwave-start-of-substatement 'pre) (if (eq (line-beginning-position) end-reg) (goto-char beg-last-statement) (point)))) (basic-indent (+ (idlwave-min-current-statement-indent end-reg) idlwave-continuation-indent)) fancy-nonparen-indent fancy-paren-indent) - (cond + (cond ;; Align then with its matching if, etc. ((let ((matchers '(("\\" . "[ \t]*then") ("\\<\\(if\\|end\\(if\\)?\\)\\>" . "[ \t]*else") ("\\<\\(for\\|while\\)\\>" . "[ \t]*do") - ("\\<\\(repeat\\|end\\(rep\\)?\\)\\>" . + ("\\<\\(repeat\\|end\\(rep\\)?\\)\\>" . "[ \t]*until") ("\\" . "[ \t]*of"))) match cont-re) (goto-char end-reg) - (and + (and (setq cont-re (catch 'exit (while (setq match (car matchers)) @@ -2972,7 +2972,7 @@ groupings, are treated separately." (setq matchers (cdr matchers))))) (idlwave-find-key cont-re -1 'nomark beg-last-statement))) (if (looking-at "end") ;; that one's special - (- (idlwave-current-indent) + (- (idlwave-current-indent) (+ idlwave-block-indent idlwave-end-offset)) (idlwave-current-indent))) @@ -2998,7 +2998,7 @@ groupings, are treated separately." (let* ((end-reg end-reg) (close-exp (progn (goto-char end-reg) - (skip-chars-forward " \t") + (skip-chars-forward " \t") (looking-at "\\s)"))) indent-cons) (catch 'loop @@ -3032,12 +3032,12 @@ groupings, are treated separately." (if (save-match-data (looking-at "[ \t$]*\\(;.*\\)?$")) nil (current-column))) - + ;; Continued assignment (with =): ((catch 'assign ; (while (looking-at "[^=\n\r]*\\(=\\)[ \t]*") (goto-char (match-end 0)) - (if (null (idlwave-what-function beg-reg)) + (if (null (idlwave-what-function beg-reg)) (throw 'assign t)))) (unless (or (idlwave-in-quote) @@ -3099,7 +3099,7 @@ possibility of unbalanced blocks." (let* ((here (point)) (case-fold-search t) (limit (if (>= dir 0) (point-max) (point-min))) - (block-limit (if (>= dir 0) + (block-limit (if (>= dir 0) idlwave-begin-block-reg idlwave-end-block-reg)) found @@ -3110,7 +3110,7 @@ possibility of unbalanced blocks." (idlwave-find-key idlwave-begin-unit-reg dir t limit) (end-of-line) - (idlwave-find-key + (idlwave-find-key idlwave-end-unit-reg dir t limit))) limit))) (if (>= dir 0) (end-of-line)) ;Make sure we are in current block @@ -3135,7 +3135,7 @@ possibility of unbalanced blocks." (or (null end-reg) (< (point) end-reg))) (unless comm-or-empty (setq min (min min (idlwave-current-indent))))) (if (or comm-or-empty (and end-reg (>= (point) end-reg))) - min + min (min min (idlwave-current-indent)))))) (defun idlwave-current-statement-indent (&optional last-line) @@ -3161,10 +3161,10 @@ Skips any whitespace. Returns 0 if the end-of-line follows the whitespace." Blank or comment-only lines following regular continuation lines (with `$') count as continuations too." (save-excursion - (or + (or (idlwave-look-at "\\<\\$") (catch 'loop - (while (and (looking-at "^[ \t]*\\(;.*\\)?$") + (while (and (looking-at "^[ \t]*\\(;.*\\)?$") (eq (forward-line -1) 0)) (if (idlwave-look-at "\\<\\$") (throw 'loop t))))))) @@ -3262,7 +3262,7 @@ ignored." (beginning-of-line) (point)) (point)))) "[^;]")) - + ;; Mark the beginning and end of the paragraph (goto-char bcl) (while (and (looking-at fill-prefix-reg) @@ -3326,7 +3326,7 @@ ignored." (insert (make-string diff ?\ )))) (forward-line -1)) ) - + ;; No hang. Instead find minimum indentation of paragraph ;; after first line. ;; For the following while statement, since START is at the @@ -3358,7 +3358,7 @@ ignored." t) (current-column)) indent)) - + ;; try to keep point at its original place (goto-char here) @@ -3407,7 +3407,7 @@ If not found returns nil." (current-column))))) (defun idlwave-auto-fill () - "Called to break lines in auto fill mode. + "Called to break lines in auto fill mode. Only fills non-comment lines if `idlwave-fill-comment-line-only' is non-nil. Places a continuation character at the end of the line if not in a comment. Splits strings with IDL concatenation operator `+' @@ -3558,7 +3558,7 @@ is non-nil." (insert (current-time-string)) (insert ", " (user-full-name)) (if (boundp 'user-mail-address) - (insert " <" user-mail-address ">") + (insert " <" user-mail-address ">") (insert " <" (user-login-name) "@" (system-name) ">")) ;; Remove extra spaces from line (idlwave-fill-paragraph) @@ -3584,7 +3584,7 @@ location on mark ring so that the user can return to previous point." (setq end (match-end 0))) (progn (goto-char beg) - (if (re-search-forward + (if (re-search-forward (concat idlwave-doc-modifications-keyword ":") end t) (end-of-line) @@ -3682,7 +3682,7 @@ constants - a double quote followed by an octal digit." (not (idlwave-in-quote)) (save-excursion (forward-char) - (re-search-backward (concat "\\(" idlwave-idl-keywords + (re-search-backward (concat "\\(" idlwave-idl-keywords "\\|[[(*+-/=,^><]\\)\\s-*\\*") limit t))))) @@ -3728,7 +3728,7 @@ unless the optional second argument NOINDENT is non-nil." (indent-region beg end nil)) (if (stringp prompt) (message prompt))))) - + (defun idlwave-rw-case (string) "Make STRING have the case required by `idlwave-reserved-word-upcase'." (if idlwave-reserved-word-upcase @@ -3746,7 +3746,7 @@ unless the optional second argument NOINDENT is non-nil." (defun idlwave-case () "Build skeleton IDL case statement." (interactive) - (idlwave-template + (idlwave-template (idlwave-rw-case "case") (idlwave-rw-case " of\n\nendcase") "Selector expression")) @@ -3754,7 +3754,7 @@ unless the optional second argument NOINDENT is non-nil." (defun idlwave-switch () "Build skeleton IDL switch statement." (interactive) - (idlwave-template + (idlwave-template (idlwave-rw-case "switch") (idlwave-rw-case " of\n\nendswitch") "Selector expression")) @@ -3762,7 +3762,7 @@ unless the optional second argument NOINDENT is non-nil." (defun idlwave-for () "Build skeleton for loop statment." (interactive) - (idlwave-template + (idlwave-template (idlwave-rw-case "for") (idlwave-rw-case " do begin\n\nendfor") "Loop expression")) @@ -3777,14 +3777,14 @@ unless the optional second argument NOINDENT is non-nil." (defun idlwave-procedure () (interactive) - (idlwave-template + (idlwave-template (idlwave-rw-case "pro") (idlwave-rw-case "\n\nreturn\nend") "Procedure name")) (defun idlwave-function () (interactive) - (idlwave-template + (idlwave-template (idlwave-rw-case "function") (idlwave-rw-case "\n\nreturn\nend") "Function name")) @@ -3798,7 +3798,7 @@ unless the optional second argument NOINDENT is non-nil." (defun idlwave-while () (interactive) - (idlwave-template + (idlwave-template (idlwave-rw-case "while") (idlwave-rw-case " do begin\n\nendwhile") "Entry condition")) @@ -3877,8 +3877,8 @@ Buffer containing unsaved changes require confirmation before they are killed." (defun idlwave-count-outlawed-buffers (tag) "How many outlawed buffers have tag TAG?" (length (delq nil - (mapcar - (lambda (x) (eq (cdr x) tag)) + (mapcar + (lambda (x) (eq (cdr x) tag)) idlwave-outlawed-buffers)))) (defun idlwave-do-kill-autoloaded-buffers (&rest reasons) @@ -3892,9 +3892,9 @@ Buffer containing unsaved changes require confirmation before they are killed." (memq (cdr entry) reasons)) (kill-buffer (car entry)) (incf cnt) - (setq idlwave-outlawed-buffers + (setq idlwave-outlawed-buffers (delq entry idlwave-outlawed-buffers))) - (setq idlwave-outlawed-buffers + (setq idlwave-outlawed-buffers (delq entry idlwave-outlawed-buffers)))) (message "%d buffer%s killed" cnt (if (= cnt 1) "" "s")))) @@ -3906,7 +3906,7 @@ Intended for `after-save-hook'." (entry (assq buf idlwave-outlawed-buffers))) ;; Revoke license (if entry - (setq idlwave-outlawed-buffers + (setq idlwave-outlawed-buffers (delq entry idlwave-outlawed-buffers))) ;; Remove this function from the hook. (remove-hook 'after-save-hook 'idlwave-revoke-license-to-kill 'local))) @@ -3925,7 +3925,7 @@ Intended for `after-save-hook'." (defun idlwave-expand-lib-file-name (file) ;; Find FILE on the scanned lib path and return a buffer visiting it ;; This is for, e.g., finding source with no user catalog - (cond + (cond ((null file) nil) ((file-name-absolute-p file) file) (t (idlwave-locate-lib-file file)))) @@ -3940,7 +3940,7 @@ you specify /." (interactive) (let (directory directories cmd append status numdirs dir getsubdirs buffer save_buffer files numfiles item errbuf) - + ;; ;; Read list of directories (setq directory (read-string "Tag Directories: " ".")) @@ -3992,7 +3992,7 @@ you specify /." (message (concat "Tagging " item "...")) (setq errbuf (get-buffer-create "*idltags-error*")) (setq status (+ status - (if (eq 0 (call-process + (if (eq 0 (call-process "sh" nil errbuf nil "-c" (concat cmd append item))) 0 @@ -4006,13 +4006,13 @@ you specify /." (setq numfiles (1+ numfiles)) (setq item (nth numfiles files)) ))) - + (setq numdirs (1+ numdirs)) (setq dir (nth numdirs directories))) (progn (setq numdirs (1+ numdirs)) (setq dir (nth numdirs directories))))) - + (setq errbuf (get-buffer-create "*idltags-error*")) (if (= status 0) (kill-buffer errbuf)) @@ -4088,7 +4088,7 @@ blank lines." ;; Make sure the hash functions are accessible. (if (or (not (fboundp 'gethash)) (not (fboundp 'puthash))) - (progn + (progn (require 'cl) (or (fboundp 'puthash) (defalias 'puthash 'cl-puthash)))) @@ -4107,7 +4107,7 @@ blank lines." ;; Reset the system & library hash (loop for entry in entries for var = (car entry) for size = (nth 1 entry) - do (setcdr (symbol-value var) + do (setcdr (symbol-value var) (make-hash-table ':size size ':test 'equal))) (setq idlwave-sint-dirs nil idlwave-sint-libnames nil)) @@ -4117,7 +4117,7 @@ blank lines." ;; Reset the buffer & shell hash (loop for entry in entries for var = (car entry) for size = (nth 1 entry) - do (setcar (symbol-value var) + do (setcar (symbol-value var) (make-hash-table ':size size ':test 'equal)))))) (defun idlwave-sintern-routine-or-method (name &optional class set) @@ -4204,11 +4204,11 @@ If DEFAULT-DIR is passed, it is used as the base of the directory" (setq class (idlwave-sintern-class class set)) (setq name (idlwave-sintern-method name set))) (setq name (idlwave-sintern-routine name set))) - + ;; The source (let ((source-type (car source)) (source-file (nth 1 source)) - (source-dir (if default-dir + (source-dir (if default-dir (file-name-as-directory default-dir) (nth 2 source))) (source-lib (nth 3 source))) @@ -4217,7 +4217,7 @@ If DEFAULT-DIR is passed, it is used as the base of the directory" (if (stringp source-lib) (setq source-lib (idlwave-sintern-libname source-lib set))) (setq source (list source-type source-file source-dir source-lib))) - + ;; The keywords (setq kwds (mapcar (lambda (x) (idlwave-sintern-keyword-list x set)) @@ -4355,10 +4355,10 @@ will re-read the catalog." "-l" (expand-file-name "~/.emacs") "-l" "idlwave" "-f" "idlwave-rescan-catalog-directories")) - (process (apply 'start-process "idlcat" + (process (apply 'start-process "idlcat" nil emacs args))) (setq idlwave-catalog-process process) - (set-process-sentinel + (set-process-sentinel process (lambda (pro why) (when (string-match "finished" why) @@ -4431,7 +4431,7 @@ information updated immediately, leave NO-CONCATENATE nil." ;; The override-idle means, even if the idle timer has done some ;; preparing work, load and renormalize everything anyway. (override-idle (or arg idlwave-buffer-case-takes-precedence))) - + (setq idlwave-buffer-routines nil idlwave-compiled-routines nil idlwave-unresolved-routines nil) @@ -4442,7 +4442,7 @@ information updated immediately, leave NO-CONCATENATE nil." (idlwave-reset-sintern (cond (load t) ((null idlwave-system-routines) t) (t 'bufsh)))) - + (if idlwave-buffer-case-takes-precedence ;; We can safely scan the buffer stuff first (progn @@ -4457,9 +4457,9 @@ information updated immediately, leave NO-CONCATENATE nil." (idlwave-shell-is-running))) (ask-shell (and shell-is-running idlwave-query-shell-for-routine-info))) - + ;; Load the library catalogs again, first re-scanning the path - (when arg + (when arg (if shell-is-running (idlwave-shell-send-command idlwave-shell-path-query '(progn @@ -4479,7 +4479,7 @@ information updated immediately, leave NO-CONCATENATE nil." ;; Therefore, we do a concatenation now, even though ;; the shell might do it again. (idlwave-concatenate-rinfo-lists nil 'run-hooks)) - + (when ask-shell ;; Ask the shell about the routines it knows of. (message "Querying the shell") @@ -4541,7 +4541,7 @@ information updated immediately, leave NO-CONCATENATE nil." (progn (setq idlwave-library-routines nil) (ding) - (message "Outdated user catalog: %s... recreate" + (message "Outdated user catalog: %s... recreate" idlwave-user-catalog-file)) (message "Loading user catalog in idle time...done")) (aset arr 2 t) @@ -4549,15 +4549,15 @@ information updated immediately, leave NO-CONCATENATE nil." (when (not (aref arr 3)) (when idlwave-user-catalog-routines (message "Normalizing user catalog routines in idle time...") - (setq idlwave-user-catalog-routines + (setq idlwave-user-catalog-routines (idlwave-sintern-rinfo-list idlwave-user-catalog-routines 'sys)) - (message + (message "Normalizing user catalog routines in idle time...done")) (aset arr 3 t) (throw 'exit t)) (when (not (aref arr 4)) - (idlwave-scan-library-catalogs + (idlwave-scan-library-catalogs "Loading and normalizing library catalogs in idle time...") (aset arr 4 t) (throw 'exit t)) @@ -4598,8 +4598,8 @@ information updated immediately, leave NO-CONCATENATE nil." (setq idlwave-true-path-alist nil) (when (or force (not (aref idlwave-load-rinfo-steps-done 3))) (message "Normalizing user catalog routines...") - (setq idlwave-user-catalog-routines - (idlwave-sintern-rinfo-list + (setq idlwave-user-catalog-routines + (idlwave-sintern-rinfo-list idlwave-user-catalog-routines 'sys)) (message "Normalizing user catalog routines...done"))) (when (or force (not (aref idlwave-load-rinfo-steps-done 4))) @@ -4610,11 +4610,11 @@ information updated immediately, leave NO-CONCATENATE nil." (defun idlwave-update-buffer-routine-info () (let (res) - (cond + (cond ((eq idlwave-scan-all-buffers-for-routine-info t) ;; Scan all buffers, current buffer last (message "Scanning all buffers...") - (setq res (idlwave-get-routine-info-from-buffers + (setq res (idlwave-get-routine-info-from-buffers (reverse (buffer-list))))) ((null idlwave-scan-all-buffers-for-routine-info) ;; Don't scan any buffers @@ -4627,12 +4627,12 @@ information updated immediately, leave NO-CONCATENATE nil." (setq res (idlwave-get-routine-info-from-buffers (list (current-buffer)))))))) ;; Put the result into the correct variable - (setq idlwave-buffer-routines + (setq idlwave-buffer-routines (idlwave-sintern-rinfo-list res 'set)))) (defun idlwave-concatenate-rinfo-lists (&optional quiet run-hook) "Put the different sources for routine information together." - ;; The sequence here is important because earlier definitions shadow + ;; The sequence here is important because earlier definitions shadow ;; later ones. We assume that if things in the buffers are newer ;; then in the shell of the system, they are meant to be different. (setcdr idlwave-last-system-routine-info-cons-cell @@ -4644,7 +4644,7 @@ information updated immediately, leave NO-CONCATENATE nil." ;; Give a message with information about the number of routines we have. (unless quiet - (message + (message "Routines Found: buffer(%d) compiled(%d) library(%d) user(%d) system(%d)" (length idlwave-buffer-routines) (length idlwave-compiled-routines) @@ -4662,7 +4662,7 @@ information updated immediately, leave NO-CONCATENATE nil." (when (and (setq class (nth 2 x)) (not (assq class idlwave-class-alist))) (push (list class) idlwave-class-alist))) - idlwave-class-alist))) + idlwave-class-alist))) ;; Three functions for the hooks (defun idlwave-save-buffer-update () @@ -4695,7 +4695,7 @@ information updated immediately, leave NO-CONCATENATE nil." (defun idlwave-replace-buffer-routine-info (file new) "Cut the part from FILE out of `idlwave-buffer-routines' and add NEW." - (let ((list idlwave-buffer-routines) + (let ((list idlwave-buffer-routines) found) (while list ;; The following test uses eq to make sure it works correctly @@ -4706,7 +4706,7 @@ information updated immediately, leave NO-CONCATENATE nil." (setcar list nil) (setq found t)) (if found - ;; End of that section reached. Jump. + ;; End of that section reached. Jump. (setq list nil))) (setq list (cdr list))) (setq idlwave-buffer-routines @@ -4738,11 +4738,11 @@ information updated immediately, leave NO-CONCATENATE nil." (save-restriction (widen) (goto-char (point-min)) - (while (re-search-forward + (while (re-search-forward "^[ \t]*\\(pro\\|function\\)[ \t]" nil t) (setq string (buffer-substring-no-properties (match-beginning 0) - (progn + (progn (idlwave-end-of-statement) (point)))) (setq entry (idlwave-parse-definition string)) @@ -4780,7 +4780,7 @@ information updated immediately, leave NO-CONCATENATE nil." (push (match-string 1 string) args))) ;; Normalize and sort. (setq args (nreverse args)) - (setq keywords (sort keywords (lambda (a b) + (setq keywords (sort keywords (lambda (a b) (string< (downcase a) (downcase b))))) ;; Make and return the entry ;; We don't know which argument are optional, so this information @@ -4790,7 +4790,7 @@ information updated immediately, leave NO-CONCATENATE nil." class (cond ((not (boundp 'idlwave-scanning-lib)) (list 'buffer (buffer-file-name))) -; ((string= (downcase +; ((string= (downcase ; (file-name-sans-extension ; (file-name-nondirectory (buffer-file-name)))) ; (downcase name)) @@ -4798,7 +4798,7 @@ information updated immediately, leave NO-CONCATENATE nil." ; (t (cons 'lib (file-name-nondirectory (buffer-file-name)))) (t (list 'user (file-name-nondirectory (buffer-file-name)) idlwave-scanning-lib-dir "UserLib"))) - (concat + (concat (if (string= type "function") "Result = " "") (if class "Obj ->[%s::]" "") "%s" @@ -4842,10 +4842,10 @@ time - so no widget will pop up." (> (length idlwave-user-catalog-file) 0) (file-accessible-directory-p (file-name-directory idlwave-user-catalog-file)) - (not (string= "" (file-name-nondirectory + (not (string= "" (file-name-nondirectory idlwave-user-catalog-file)))) (error "`idlwave-user-catalog-file' does not point to a file in an accessible directory")) - + (cond ;; Rescan the known directories ((and arg idlwave-path-alist @@ -4855,13 +4855,13 @@ time - so no widget will pop up." ;; Expand the directories from library-path and run the widget (idlwave-library-path (idlwave-display-user-catalog-widget - (if idlwave-true-path-alist + (if idlwave-true-path-alist ;; Propagate any flags on the existing path-alist (mapcar (lambda (x) (let ((path-entry (assoc (file-truename x) idlwave-true-path-alist))) (if path-entry - (cons x (cdr path-entry)) + (cons x (cdr path-entry)) (list x)))) (idlwave-expand-path idlwave-library-path)) (mapcar 'list (idlwave-expand-path idlwave-library-path))))) @@ -4886,7 +4886,7 @@ time - so no widget will pop up." (idlwave-scan-library-catalogs "Locating library catalogs..." 'no-load) (idlwave-display-user-catalog-widget idlwave-path-alist))) -(defconst idlwave-user-catalog-widget-help-string +(defconst idlwave-user-catalog-widget-help-string "This is the front-end to the creation of the IDLWAVE user catalog. Please select the directories on IDL's search path from which you would like to extract routine information, to be stored in the file: @@ -4921,7 +4921,7 @@ directories and save the routine info. (make-local-variable 'idlwave-widget) (widget-insert (format idlwave-user-catalog-widget-help-string idlwave-user-catalog-file)) - + (widget-create 'push-button :notify 'idlwave-widget-scan-user-lib-files "Scan & Save") @@ -4931,7 +4931,7 @@ directories and save the routine info. "Delete File") (widget-insert " ") (widget-create 'push-button - :notify + :notify '(lambda (&rest ignore) (let ((path-list (widget-get idlwave-widget :path-dirs))) (mapcar (lambda (x) @@ -4942,7 +4942,7 @@ directories and save the routine info. "Select All Non-Lib") (widget-insert " ") (widget-create 'push-button - :notify + :notify '(lambda (&rest ignore) (let ((path-list (widget-get idlwave-widget :path-dirs))) (mapcar (lambda (x) @@ -4958,18 +4958,18 @@ directories and save the routine info. (widget-insert "\n\n") (widget-insert "Select Directories: \n") - + (setq idlwave-widget (apply 'widget-create 'checklist - :value (delq nil (mapcar (lambda (x) - (if (memq 'user (cdr x)) + :value (delq nil (mapcar (lambda (x) + (if (memq 'user (cdr x)) (car x))) dirs-list)) :greedy t :tag "List of directories" - (mapcar (lambda (x) - (list 'item + (mapcar (lambda (x) + (list 'item (if (memq 'lib (cdr x)) (concat "[LIB] " (car x) ) (car x)))) dirs-list))) @@ -4979,7 +4979,7 @@ directories and save the routine info. (widget-setup) (goto-char (point-min)) (delete-other-windows)) - + (defun idlwave-delete-user-catalog-file (&rest ignore) (if (yes-or-no-p (format "Delete file %s " idlwave-user-catalog-file)) @@ -4995,7 +4995,7 @@ directories and save the routine info. (this-path-alist path-alist) dir-entry) (while (setq dir-entry (pop this-path-alist)) - (if (member + (if (member (if (memq 'lib (cdr dir-entry)) (concat "[LIB] " (car dir-entry)) (car dir-entry)) @@ -5092,7 +5092,7 @@ directories and save the routine info. ;; Define the variable which knows the value of "!DIR" (insert (format "\n(setq idlwave-system-directory \"%s\")\n" idlwave-system-directory)) - + ;; Define the variable which contains a list of all scanned directories (insert "\n(setq idlwave-path-alist\n '(") (let ((standard-output (current-buffer))) @@ -5132,7 +5132,7 @@ directories and save the routine info. (when (file-directory-p dir) (setq files (nreverse (directory-files dir t "[^.]"))) (while (setq file (pop files)) - (if (file-directory-p file) + (if (file-directory-p file) (push (file-name-as-directory file) path))) (push dir path1))) path1)) @@ -5141,7 +5141,7 @@ directories and save the routine info. ;;----- Scanning the library catalogs ------------------ (defun idlwave-scan-library-catalogs (&optional message-base no-load) - "Scan for library catalog files (.idlwave_catalog) and ingest. + "Scan for library catalog files (.idlwave_catalog) and ingest. All directories on `idlwave-path-alist' (or `idlwave-library-path' instead, if present) are searched. Print MESSAGE-BASE along with the @@ -5149,7 +5149,7 @@ libraries being loaded, if passed, and skip loading/normalizing if NO-LOAD is non-nil. The variable `idlwave-use-library-catalogs' can be set to nil to disable library catalog scanning." (when idlwave-use-library-catalogs - (let ((dirs + (let ((dirs (if idlwave-library-path (idlwave-expand-path idlwave-library-path) (mapcar 'car idlwave-path-alist))) @@ -5158,7 +5158,7 @@ be set to nil to disable library catalog scanning." (if message-base (message message-base)) (while (setq dir (pop dirs)) (catch 'continue - (when (file-readable-p + (when (file-readable-p (setq catalog (expand-file-name ".idlwave_catalog" dir))) (unless no-load (setq idlwave-library-catalog-routines nil) @@ -5166,20 +5166,20 @@ be set to nil to disable library catalog scanning." (condition-case nil (load catalog t t t) (error (throw 'continue t))) - (when (and - message-base - (not (string= idlwave-library-catalog-libname + (when (and + message-base + (not (string= idlwave-library-catalog-libname old-libname))) - (message (concat message-base + (message (concat message-base idlwave-library-catalog-libname)) (setq old-libname idlwave-library-catalog-libname)) (when idlwave-library-catalog-routines (setq all-routines - (append + (append (idlwave-sintern-rinfo-list idlwave-library-catalog-routines 'sys dir) all-routines)))) - + ;; Add a 'lib flag if on path-alist (when (and idlwave-path-alist (setq dir-entry (assoc dir idlwave-path-alist))) @@ -5190,17 +5190,17 @@ be set to nil to disable library catalog scanning." ;;----- Communicating with the Shell ------------------- ;; First, here is the idl program which can be used to query IDL for -;; defined routines. +;; defined routines. (defconst idlwave-routine-info.pro " ;; START OF IDLWAVE SUPPORT ROUTINES pro idlwave_print_info_entry,name,func=func,separator=sep ;; See if it's an object method if name eq '' then return - func = keyword_set(func) + func = keyword_set(func) methsep = strpos(name,'::') meth = methsep ne -1 - + ;; Get routine info pars = routine_info(name,/parameters,functions=func) source = routine_info(name,/source,functions=func) @@ -5208,12 +5208,12 @@ pro idlwave_print_info_entry,name,func=func,separator=sep nkw = pars.num_kw_args if nargs gt 0 then args = pars.args if nkw gt 0 then kwargs = pars.kw_args - + ;; Trim the class, and make the name - if meth then begin + if meth then begin class = strmid(name,0,methsep) name = strmid(name,methsep+2,strlen(name)-1) - if nargs gt 0 then begin + if nargs gt 0 then begin ;; remove the self argument wh = where(args ne 'SELF',nargs) if nargs gt 0 then args = args[wh] @@ -5222,7 +5222,7 @@ pro idlwave_print_info_entry,name,func=func,separator=sep ;; No class, just a normal routine. class = \"\" endelse - + ;; Calling sequence cs = \"\" if func then cs = 'Result = ' @@ -5243,9 +5243,9 @@ pro idlwave_print_info_entry,name,func=func,separator=sep kwstring = kwstring + ' ' + kwargs[j] endfor endif - + ret=(['IDLWAVE-PRO','IDLWAVE-FUN'])[func] - + print,ret + ': ' + name + sep + class + sep + source[0].path $ + sep + cs + sep + kwstring end @@ -5285,7 +5285,7 @@ pro idlwave_get_class_tags, class if res then print,'IDLWAVE-CLASS-TAGS: '+class+' '+strjoin(tags,' ',/single) end ;; END OF IDLWAVE SUPPORT ROUTINES -" +" "The idl programs to get info from the shell.") (defvar idlwave-idlwave_routine_info-compiled nil @@ -5308,12 +5308,12 @@ end (erase-buffer) (insert idlwave-routine-info.pro) (save-buffer 0)) - (idlwave-shell-send-command + (idlwave-shell-send-command (concat ".run " idlwave-shell-temp-pro-file) nil 'hide wait) ; (message "SENDING SAVE") ; ???????????????????????? (idlwave-shell-send-command - (format "save,'idlwave_routine_info','idlwave_print_info_entry','idlwave_get_class_tags','idlwave_get_sysvars',FILE='%s',/ROUTINES" + (format "save,'idlwave_routine_info','idlwave_print_info_entry','idlwave_get_class_tags','idlwave_get_sysvars',FILE='%s',/ROUTINES" (idlwave-shell-temp-file 'rinfo)) nil 'hide wait)) @@ -5396,7 +5396,7 @@ When we force a method or a method keyword, CLASS can specify the class." (completion-regexp-list (if (equal arg '(16)) (list (read-string (concat "Completion Regexp: ")))))) - + (if (and module (string-match "::" module)) (setq class (substring module 0 (match-beginning 0)) module (substring module (match-end 0)))) @@ -5417,7 +5417,7 @@ When we force a method or a method keyword, CLASS can specify the class." ;; Check for any special completion functions ((and idlwave-complete-special (idlwave-call-special idlwave-complete-special))) - + ((null what) (error "Nothing to complete here")) @@ -5434,7 +5434,7 @@ When we force a method or a method keyword, CLASS can specify the class." (idlwave-all-class-inherits class-selector))) (isa (concat "procedure" (if class-selector "-method" ""))) (type-selector 'pro)) - (setq idlwave-completion-help-info + (setq idlwave-completion-help-info (list 'routine nil type-selector class-selector nil super-classes)) (idlwave-complete-in-buffer 'procedure (if class-selector 'method 'routine) @@ -5442,8 +5442,8 @@ When we force a method or a method keyword, CLASS can specify the class." (format "Select a %s name%s" isa (if class-selector - (format " (class is %s)" - (if (eq class-selector t) + (format " (class is %s)" + (if (eq class-selector t) "unknown" class-selector)) "")) isa @@ -5457,7 +5457,7 @@ When we force a method or a method keyword, CLASS can specify the class." (idlwave-all-class-inherits class-selector))) (isa (concat "function" (if class-selector "-method" ""))) (type-selector 'fun)) - (setq idlwave-completion-help-info + (setq idlwave-completion-help-info (list 'routine nil type-selector class-selector nil super-classes)) (idlwave-complete-in-buffer 'function (if class-selector 'method 'routine) @@ -5465,7 +5465,7 @@ When we force a method or a method keyword, CLASS can specify the class." (format "Select a %s name%s" isa (if class-selector - (format " (class is %s)" + (format " (class is %s)" (if (eq class-selector t) "unknown" class-selector)) "")) @@ -5495,14 +5495,14 @@ When we force a method or a method keyword, CLASS can specify the class." (setq list (idlwave-fix-keywords name 'pro class list super-classes)) (unless list (error (format "No keywords available for procedure %s" (idlwave-make-full-name class name)))) - (setq idlwave-completion-help-info + (setq idlwave-completion-help-info (list 'keyword name type-selector class-selector entry super-classes)) (idlwave-complete-in-buffer 'keyword 'keyword list nil (format "Select keyword for procedure %s%s" (idlwave-make-full-name class name) (if (or (member '("_EXTRA") list) - (member '("_REF_EXTRA") list)) + (member '("_REF_EXTRA") list)) " (note _EXTRA)" "")) isa 'idlwave-attach-keyword-classes))) @@ -5533,13 +5533,13 @@ When we force a method or a method keyword, CLASS can specify the class." (idlwave-make-full-name class name))) (unless list (error (format "No keywords available for function %s" msg-name))) - (setq idlwave-completion-help-info + (setq idlwave-completion-help-info (list 'keyword name type-selector class-selector nil super-classes)) (idlwave-complete-in-buffer 'keyword 'keyword list nil (format "Select keyword for function %s%s" msg-name (if (or (member '("_EXTRA") list) - (member '("_REF_EXTRA") list)) + (member '("_REF_EXTRA") list)) " (note _EXTRA)" "")) isa 'idlwave-attach-keyword-classes))) @@ -5577,10 +5577,10 @@ other completions will be tried.") ("class"))) (module (idlwave-sintern-routine-or-method module class)) (class (idlwave-sintern-class class)) - (what (cond + (what (cond ((equal what 0) (setq what - (intern (completing-read + (intern (completing-read "Complete what? " what-list nil t)))) ((integerp what) (setq what (intern (car (nth (1- what) what-list))))) @@ -5602,7 +5602,7 @@ other completions will be tried.") (super-classes nil) (type-selector 'pro) (pro (or module - (idlwave-completing-read + (idlwave-completing-read "Procedure: " (idlwave-routines) 'idlwave-selector)))) (setq pro (idlwave-sintern-routine pro)) (list nil-list nil-list 'procedure-keyword @@ -5616,7 +5616,7 @@ other completions will be tried.") (super-classes nil) (type-selector 'fun) (func (or module - (idlwave-completing-read + (idlwave-completing-read "Function: " (idlwave-routines) 'idlwave-selector)))) (setq func (idlwave-sintern-routine func)) (list nil-list nil-list 'function-keyword @@ -5656,7 +5656,7 @@ other completions will be tried.") ((eq what 'class) (list nil-list nil-list 'class nil-list nil)) - + (t (error "Invalid value for WHAT"))))) (defun idlwave-completing-read (&rest args) @@ -5679,7 +5679,7 @@ other completions will be tried.") (stringp idlwave-shell-default-directory) (file-directory-p idlwave-shell-default-directory)) idlwave-shell-default-directory - default-directory))) + default-directory))) (comint-dynamic-complete-filename))) (defun idlwave-make-full-name (class name) @@ -5688,7 +5688,7 @@ other completions will be tried.") (defun idlwave-rinfo-assoc (name type class list) "Like `idlwave-rinfo-assq', but sintern strings first." - (idlwave-rinfo-assq + (idlwave-rinfo-assq (idlwave-sintern-routine-or-method name class) type (idlwave-sintern-class class) list)) @@ -5712,7 +5712,7 @@ other completions will be tried.") (setq classes nil))) rtn)) -(defun idlwave-best-rinfo-assq (name type class list &optional with-file +(defun idlwave-best-rinfo-assq (name type class list &optional with-file keep-system) "Like `idlwave-rinfo-assq', but get all twins and sort, then return first. If WITH-FILE is passed, find the best rinfo entry with a file @@ -5737,7 +5737,7 @@ syslib files." twins))))) (car twins))) -(defun idlwave-best-rinfo-assoc (name type class list &optional with-file +(defun idlwave-best-rinfo-assoc (name type class list &optional with-file keep-system) "Like `idlwave-best-rinfo-assq', but sintern strings first." (idlwave-best-rinfo-assq @@ -5828,7 +5828,7 @@ INFO is as returned by idlwave-what-function or -procedure." Must accept two arguments: `apos' and `info'") (defun idlwave-determine-class (info type) - ;; Determine the class of a routine call. + ;; Determine the class of a routine call. ;; INFO is the `cw-list' structure as returned by idlwave-where. ;; The second element in this structure is the class. When nil, we ;; return nil. When t, try to get the class from text properties at @@ -5848,7 +5848,7 @@ Must accept two arguments: `apos' and `info'") (dassoc (cdr dassoc)) (t t))) (arrow (and apos (string= (buffer-substring apos (+ 2 apos)) "->"))) - (is-self + (is-self (and arrow (save-excursion (goto-char apos) (forward-word -1) @@ -5869,19 +5869,19 @@ Must accept two arguments: `apos' and `info'") (setq class (or (nth 2 (idlwave-current-routine)) class))) ;; Before prompting, try any special class determination routines - (when (and (eq t class) + (when (and (eq t class) idlwave-determine-class-special (not force-query)) - (setq special-class + (setq special-class (idlwave-call-special idlwave-determine-class-special apos)) - (if special-class + (if special-class (setq class (idlwave-sintern-class special-class) store idlwave-store-inquired-class))) - + ;; Prompt for a class, if we need to (when (and (eq class t) (or force-query query)) - (setq class-alist + (setq class-alist (mapcar 'list (idlwave-all-method-classes (car info) type))) (setq class (idlwave-sintern-class @@ -5890,9 +5890,9 @@ Must accept two arguments: `apos' and `info'") (error "No classes available with method %s" (car info))) ((and (= (length class-alist) 1) (not force-query)) (car (car class-alist))) - (t + (t (setq store idlwave-store-inquired-class) - (idlwave-completing-read + (idlwave-completing-read (format "Class%s: " (if (stringp (car info)) (format " for %s method %s" type (car info)) @@ -5904,9 +5904,9 @@ Must accept two arguments: `apos' and `info'") ;; We have a real class here (when (and store arrow) (condition-case () - (add-text-properties - apos (+ apos 2) - `(idlwave-class ,class face ,idlwave-class-arrow-face + (add-text-properties + apos (+ apos 2) + `(idlwave-class ,class face ,idlwave-class-arrow-face rear-nonsticky t)) (error nil))) (setf (nth 2 info) class)) @@ -5934,14 +5934,14 @@ Must accept two arguments: `apos' and `info'") (defun idlwave-where () - "Find out where we are. + "Find out where we are. The return value is a list with the following stuff: \(PRO-LIST FUNC-LIST COMPLETE-WHAT CW-LIST LAST-CHAR) PRO-LIST (PRO POINT CLASS ARROW) FUNC-LIST (FUNC POINT CLASS ARROW) COMPLETE-WHAT a symbol indicating what kind of completion makes sense here -CW-LIST (PRO-OR-FUNC POINT CLASS ARROW) Like PRO-LIST, for what can +CW-LIST (PRO-OR-FUNC POINT CLASS ARROW) Like PRO-LIST, for what can be completed here. LAST-CHAR last relevant character before point (non-white non-comment, not part of current identifier or leading slash). @@ -5953,7 +5953,7 @@ POINT: Where is this CLASS: What class has the routine (nil=no, t=is method, but class unknown) ARROW: Location of the arrow" (idlwave-routines) - (let* (;(bos (save-excursion (idlwave-beginning-of-statement) (point))) + (let* (;(bos (save-excursion (idlwave-beginning-of-statement) (point))) (bos (save-excursion (idlwave-start-of-substatement 'pre) (point))) (func-entry (idlwave-what-function bos)) (func (car func-entry)) @@ -5975,8 +5975,8 @@ ARROW: Location of the arrow" ((string-match "\\`[ \t]*\\(pro\\|function\\)[ \t]+[a-zA-Z0-9_]*\\'" match-string) (setq cw 'class)) - ((string-match - "\\`[ \t]*\\([a-zA-Z][a-zA-Z0-9$_]*\\)?\\'" + ((string-match + "\\`[ \t]*\\([a-zA-Z][a-zA-Z0-9$_]*\\)?\\'" (if (> pro-point 0) (buffer-substring pro-point (point)) match-string)) @@ -5987,11 +5987,11 @@ ARROW: Location of the arrow" nil) ((string-match "OBJ_NEW([ \t]*['\"]\\([a-zA-Z0-9$_]*\\)?\\'" match-string) - (setq cw 'class)) + (setq cw 'class)) ((string-match "\\ func-point pro-point) (= func-level 1) (memq last-char '(?\( ?,))) @@ -6037,7 +6037,7 @@ ARROW: Location of the arrow" ;; searches to this point. (catch 'exit - (let (pos + (let (pos func-point (cnt 0) func arrow-start class) @@ -6052,18 +6052,18 @@ ARROW: Location of the arrow" (setq pos (point)) (incf cnt) (when (and (= (following-char) ?\() - (re-search-backward + (re-search-backward "\\(::\\|\\<\\)\\([a-zA-Z][a-zA-Z0-9$_]*\\)[ \t]*\\=" bound t)) (setq func (match-string 2) func-point (goto-char (match-beginning 2)) pos func-point) - (if (re-search-backward + (if (re-search-backward "->[ \t]*\\(\\([a-zA-Z][a-zA-Z0-9$_]*\\)::\\)?\\=" bound t) (setq arrow-start (copy-marker (match-beginning 0)) class (or (match-string 2) t))) - (throw - 'exit + (throw + 'exit (list (idlwave-sintern-routine-or-method func class) (idlwave-sintern-class class) @@ -6079,18 +6079,18 @@ ARROW: Location of the arrow" ;; searches to this point. (let ((pos (point)) pro-point pro class arrow-start string) - (save-excursion + (save-excursion ;;(idlwave-beginning-of-statement) (idlwave-start-of-substatement 'pre) (setq string (buffer-substring (point) pos)) - (if (string-match + (if (string-match "\\`[ \t]*\\([a-zA-Z][a-zA-Z0-9$_]*\\)[ \t]*\\(,\\|\\'\\)" string) (setq pro (match-string 1 string) pro-point (+ (point) (match-beginning 1))) (if (and (idlwave-skip-object) (setq string (buffer-substring (point) pos)) - (string-match - "\\`[ \t]*\\(->\\)[ \t]*\\(\\([a-zA-Z][a-zA-Z0-9$_]*\\)::\\)?\\([a-zA-Z][a-zA-Z0-9$_]*\\)?[ \t]*\\(,\\|\\(\\$\\s *\\(;.*\\)?\\)?$\\)" + (string-match + "\\`[ \t]*\\(->\\)[ \t]*\\(\\([a-zA-Z][a-zA-Z0-9$_]*\\)::\\)?\\([a-zA-Z][a-zA-Z0-9$_]*\\)?[ \t]*\\(,\\|\\(\\$\\s *\\(;.*\\)?\\)?$\\)" string)) (setq pro (if (match-beginning 4) (match-string 4 string)) @@ -6134,7 +6134,7 @@ ARROW: Location of the arrow" (throw 'exit nil)))) (goto-char pos) nil))) - + (defun idlwave-last-valid-char () "Return the last character before point which is not white or a comment and also not part of the current identifier. Since we do this in @@ -6224,23 +6224,23 @@ accumulate information on matching completions." ((or (eq completion t) (and (= 1 (length (setq all-completions (idlwave-uniquify - (all-completions part list - (or special-selector + (all-completions part list + (or special-selector selector)))))) (equal dpart dcompletion))) ;; This is already complete (idlwave-after-successful-completion type slash beg) (message "%s is already the complete %s" part isa) nil) - (t + (t ;; We cannot add something - offer a list. (message "Making completion list...") - + (unless idlwave-completion-help-links ; already set somewhere? (mapcar (lambda (x) ; Pass link prop through to highlight-linked (let ((link (get-text-property 0 'link (car x)))) (if link - (push (cons (car x) link) + (push (cons (car x) link) idlwave-completion-help-links)))) list)) (let* ((list all-completions) @@ -6250,7 +6250,7 @@ accumulate information on matching completions." ; (completion-fixup-function ; Emacs ; (lambda () (and (eq (preceding-char) ?>) ; (re-search-backward " <" beg t))))) - + (setq list (sort list (lambda (a b) (string< (downcase a) (downcase b))))) (if prepare-display-function @@ -6260,7 +6260,7 @@ accumulate information on matching completions." idlwave-complete-empty-string-as-lower-case) (not idlwave-completion-force-default-case)) (setq list (mapcar (lambda (x) - (if (listp x) + (if (listp x) (setcar x (downcase (car x))) (setq x (downcase x))) x) @@ -6280,19 +6280,19 @@ accumulate information on matching completions." (re-search-backward "\\<\\(pro\\|function\\)[ \t]+\\=" (- (point) 15) t) (goto-char (point-min)) - (re-search-forward + (re-search-forward "^[ \t]*\\(pro\\|function\\)[ \t]+\\([a-zA-Z0-9_]+::\\)" nil t)))) ;; Yank the full class specification (insert (match-string 2)) ;; Do the completion, using list gathered from `idlwave-routines' - (idlwave-complete-in-buffer - 'class 'class (idlwave-class-alist) nil + (idlwave-complete-in-buffer + 'class 'class (idlwave-class-alist) nil "Select a class" "class" '(lambda (list) ;; Push it to help-links if system help available (mapcar (lambda (x) (let* ((entry (idlwave-class-info x)) (link (nth 1 (assq 'link entry)))) - (if link (push (cons x link) + (if link (push (cons x link) idlwave-completion-help-links)) x)) list))))) @@ -6304,7 +6304,7 @@ accumulate information on matching completions." ;; SHOW-CLASSES is the value of `idlwave-completion-show-classes'. (if (or (null show-classes) ; don't want to see classes (null class-selector) ; not a method call - (and + (and (stringp class-selector) ; the class is already known (not super-classes))) ; no possibilities for inheritance ;; In these cases, we do not have to do anything @@ -6319,13 +6319,13 @@ accumulate information on matching completions." (max (abs show-classes)) (lmax (if do-dots (apply 'max (mapcar 'length list)))) classes nclasses class-info space) - (mapcar + (mapcar (lambda (x) ;; get the classes (if (eq type 'class-tag) ;; Just one class for tags (setq classes - (list + (list (idlwave-class-or-superclass-with-tag class-selector x))) ;; Multiple classes for method or method-keyword (setq classes @@ -6334,7 +6334,7 @@ accumulate information on matching completions." method-selector x type-selector) (idlwave-all-method-classes x type-selector))) (if inherit - (setq classes + (setq classes (delq nil (mapcar (lambda (x) (if (memq x inherit) x nil)) classes))))) @@ -6371,7 +6371,7 @@ accumulate information on matching completions." (defun idlwave-attach-class-tag-classes (list) ;; Call idlwave-attach-classes with class structure tags (idlwave-attach-classes list 'class-tag idlwave-completion-show-classes)) - + ;;---------------------------------------------------------------------- ;;---------------------------------------------------------------------- @@ -6392,7 +6392,7 @@ sort the list before displaying" ((= 1 (length list)) (setq rtn (car list))) ((featurep 'xemacs) - (if sort (setq list (sort list (lambda (a b) + (if sort (setq list (sort list (lambda (a b) (string< (upcase a) (upcase b)))))) (setq menu (append (list title) @@ -6403,7 +6403,7 @@ sort the list before displaying" (setq resp (get-popup-menu-response menu)) (funcall (event-function resp) (event-object resp))) (t - (if sort (setq list (sort list (lambda (a b) + (if sort (setq list (sort list (lambda (a b) (string< (upcase a) (upcase b)))))) (setq menu (cons title (list @@ -6494,7 +6494,7 @@ sort the list before displaying" (setq idlwave-before-completion-wconf (current-window-configuration))) (if (featurep 'xemacs) - (idlwave-display-completion-list-xemacs + (idlwave-display-completion-list-xemacs list) (idlwave-display-completion-list-emacs list)) @@ -6575,7 +6575,7 @@ If these don't exist, a letter in the string is automatically selected." (mapcar (lambda(x) (princ (nth 1 x)) (princ "\n")) - keys-alist)) + keys-alist)) (setq char (read-char))) (setq char (read-char))) (message nil) @@ -6695,7 +6695,7 @@ If these don't exist, a letter in the string is automatically selected." (defun idlwave-make-modified-completion-map-emacs (old-map) "Replace `choose-completion' and `mouse-choose-completion' in OLD-MAP." (let ((new-map (copy-keymap old-map))) - (substitute-key-definition + (substitute-key-definition 'choose-completion 'idlwave-choose-completion new-map) (substitute-key-definition 'mouse-choose-completion 'idlwave-mouse-choose-completion new-map) @@ -6721,8 +6721,8 @@ If these don't exist, a letter in the string is automatically selected." ;; ;; - Go again over the documentation how to write a completion ;; plugin. It is in self.el, but currently still very bad. -;; This could be in a separate file in the distribution, or -;; in an appendix for the manual. +;; This could be in a separate file in the distribution, or +;; in an appendix for the manual. (defvar idlwave-struct-skip "[ \t]*\\(\\$.*\n\\(^[ \t]*\\(\\$[ \t]*\\)?\\(;.*\\)?\n\\)*\\)?[ \t]*" @@ -6761,7 +6761,7 @@ Point is expected just before the opening `{' of the struct definition." (beg (car borders)) (end (cdr borders)) (case-fold-search t)) - (re-search-forward (concat "\\(^[ \t]*\\|[,{][ \t]*\\)" tag "[ \t]*:") + (re-search-forward (concat "\\(^[ \t]*\\|[,{][ \t]*\\)" tag "[ \t]*:") end t))) (defun idlwave-struct-inherits () @@ -6776,7 +6776,7 @@ Point is expected just before the opening `{' of the struct definition." (goto-char beg) (save-restriction (narrow-to-region beg end) - (while (re-search-forward + (while (re-search-forward (concat "[{,]" ;leading comma/brace idlwave-struct-skip ; 4 groups "inherits" ; The INHERITS tag @@ -6826,9 +6826,9 @@ backward." (concat "\\<" (regexp-quote (downcase var)) "\\>" ws) "\\(\\)") "=" ws "\\({\\)" - (if name + (if name (if (stringp name) - (concat ws "\\(\\<" (downcase name) "\\)[^a-zA-Z0-9_$]") + (concat ws "\\(\\<" (downcase name) "\\)[^a-zA-Z0-9_$]") ;; Just a generic name (concat ws "\\<\\([a-zA-Z_0-9$]+\\)" ws ",")) "")))) @@ -6839,7 +6839,7 @@ backward." (goto-char (match-beginning 3)) (match-string-no-properties 5))))) -(defvar idlwave-class-info nil) +(defvar idlwave-class-info nil) (defvar idlwave-system-class-info nil) ; Gathered from idlw-rinfo (defvar idlwave-class-reset nil) ; to reset buffer-local classes @@ -6852,13 +6852,13 @@ backward." (let (list entry) (if idlwave-class-info (if idlwave-class-reset - (setq + (setq idlwave-class-reset nil idlwave-class-info ; Remove any visited in a buffer - (delq nil (mapcar - (lambda (x) - (let ((filebuf - (idlwave-class-file-or-buffer + (delq nil (mapcar + (lambda (x) + (let ((filebuf + (idlwave-class-file-or-buffer (or (cdr (assq 'found-in x)) (car x))))) (if (cdr filebuf) nil @@ -6896,7 +6896,7 @@ class/struct definition" (progn ;; For everything there (setq end-lim (save-excursion (idlwave-end-of-subprogram) (point))) - (while (setq name + (while (setq name (idlwave-find-structure-definition nil t end-lim)) (funcall all-hook name))) (idlwave-find-structure-definition nil (or alt-class class)))))) @@ -6934,11 +6934,11 @@ class/struct definition" (insert-file-contents file)) (save-excursion (goto-char 1) - (idlwave-find-class-definition class + (idlwave-find-class-definition class ;; Scan all of the structures found there (lambda (name) (let* ((this-class (idlwave-sintern-class name)) - (entry + (entry (list this-class (cons 'tags (idlwave-struct-tags)) (cons 'inherits (idlwave-struct-inherits))))) @@ -6963,7 +6963,7 @@ class/struct definition" (condition-case err (apply 'append (mapcar 'idlwave-class-tags (cons class (idlwave-all-class-inherits class)))) - (error + (error (idlwave-class-tag-reset) (error "%s" (error-message-string err))))) @@ -7000,24 +7000,24 @@ The list is cached in `idlwave-class-info' for faster access." all-inherits)))))) (defun idlwave-entry-keywords (entry &optional record-link) - "Return the flat entry keywords alist from routine-info entry. + "Return the flat entry keywords alist from routine-info entry. If RECORD-LINK is non-nil, the keyword text is copied and a text property indicating the link is added." (let (kwds) (mapcar - (lambda (key-list) + (lambda (key-list) (let ((file (car key-list))) (mapcar (lambda (key-cons) (let ((key (car key-cons)) (link (cdr key-cons))) (when (and record-link file) (setq key (copy-sequence key)) - (put-text-property + (put-text-property 0 (length key) - 'link - (concat - file - (if link + 'link + (concat + file + (if link (concat idlwave-html-link-sep (number-to-string link)))) key)) @@ -7030,13 +7030,13 @@ property indicating the link is added." "Find keyword KEYWORD in entry ENTRY, and return (with link) if set" (catch 'exit (mapc - (lambda (key-list) + (lambda (key-list) (let ((file (car key-list)) (kwd (assoc keyword (cdr key-list)))) (when kwd - (setq kwd (cons (car kwd) + (setq kwd (cons (car kwd) (if (and file (cdr kwd)) - (concat file + (concat file idlwave-html-link-sep (number-to-string (cdr kwd))) (cdr kwd)))) @@ -7074,14 +7074,14 @@ property indicating the link is added." ;; Check if we need to update the "current" class (if (not (equal class-selector idlwave-current-tags-class)) (idlwave-prepare-class-tag-completion class-selector)) - (setq idlwave-completion-help-info + (setq idlwave-completion-help-info (list 'idlwave-complete-class-structure-tag-help - (idlwave-sintern-routine + (idlwave-sintern-routine (concat class-selector "__define")) nil)) (let ((idlwave-cpl-bold idlwave-current-native-class-tags)) (idlwave-complete-in-buffer - 'class-tag 'class-tag + 'class-tag 'class-tag idlwave-current-class-tags nil (format "Select a tag of class %s" class-selector) "class tag" @@ -7133,7 +7133,7 @@ Gets set in `idlw-rinfo.el'.") (skip-chars-backward "[a-zA-Z0-9_$]") (equal (char-before) ?!)) (setq idlwave-completion-help-info '(idlwave-complete-sysvar-help)) - (idlwave-complete-in-buffer 'sysvar 'sysvar + (idlwave-complete-in-buffer 'sysvar 'sysvar idlwave-system-variables-alist nil "Select a system variable" "system variable") @@ -7152,7 +7152,7 @@ Gets set in `idlw-rinfo.el'.") (or tags (error "System variable !%s is not a structure" var)) (setq idlwave-completion-help-info (list 'idlwave-complete-sysvar-tag-help var)) - (idlwave-complete-in-buffer 'sysvartag 'sysvartag + (idlwave-complete-in-buffer 'sysvartag 'sysvartag tags nil "Select a system variable tag" "system variable tag") @@ -7179,8 +7179,8 @@ Gets set in `idlw-rinfo.el'.") ((eq mode 'test) ; we can at least link the main (and (stringp word) entry main)) ((eq mode 'set) - (if entry - (setq link + (if entry + (setq link (if (setq target (cdr (assoc word tags))) (idlwave-substitute-link-target main target) main)))) ;; setting dynamic!!! @@ -7198,7 +7198,7 @@ Gets set in `idlw-rinfo.el'.") ;; Fake help in the source buffer for class structure tags. ;; KWD AND NAME ARE GLOBAL-VARIABLES HERE. -(defvar name) +(defvar name) (defvar kwd) (defvar idlwave-help-do-class-struct-tag nil) (defun idlwave-complete-class-structure-tag-help (mode word) @@ -7207,13 +7207,13 @@ Gets set in `idlw-rinfo.el'.") nil) ((eq mode 'set) (let (class-with found-in) - (when (setq class-with - (idlwave-class-or-superclass-with-tag + (when (setq class-with + (idlwave-class-or-superclass-with-tag idlwave-current-tags-class word)) - (if (assq (idlwave-sintern-class class-with) + (if (assq (idlwave-sintern-class class-with) idlwave-system-class-info) - (error "No help available for system class tags.")) + (error "No help available for system class tags")) (if (setq found-in (idlwave-class-found-in class-with)) (setq name (cons (concat found-in "__define") class-with)) (setq name (concat class-with "__define"))))) @@ -7224,7 +7224,7 @@ Gets set in `idlw-rinfo.el'.") (defun idlwave-class-or-superclass-with-tag (class tag) "Find and return the CLASS or one of its superclass with the associated TAG, if any." - (let ((sclasses (cons class (cdr (assq 'all-inherits + (let ((sclasses (cons class (cdr (assq 'all-inherits (idlwave-class-info class))))) cl) (catch 'exit @@ -7233,7 +7233,7 @@ associated TAG, if any." (let ((tags (idlwave-class-tags cl))) (while tags (if (eq t (compare-strings tag 0 nil (car tags) 0 nil t)) - (throw 'exit cl)) + (throw 'exit cl)) (setq tags (cdr tags)))))))) @@ -7256,8 +7256,8 @@ associated TAG, if any." (setcar entry (idlwave-sintern-sysvar (car entry) 'set)) (setq tags (assq 'tags entry)) (if tags - (setcdr tags - (mapcar (lambda (x) + (setcdr tags + (mapcar (lambda (x) (cons (idlwave-sintern-sysvartag (car x) 'set) (cdr x))) (cdr tags))))))) @@ -7274,19 +7274,19 @@ associated TAG, if any." text start) (setq start (match-end 0) var (match-string 1 text) - tags (if (match-end 3) + tags (if (match-end 3) (idlwave-split-string (match-string 3 text)))) ;; Maintain old links, if present (setq old-entry (assq (idlwave-sintern-sysvar var) old)) (setq link (assq 'link old-entry)) (setq idlwave-system-variables-alist - (cons (list var - (cons - 'tags - (mapcar (lambda (x) - (cons x - (cdr (assq - (idlwave-sintern-sysvartag x) + (cons (list var + (cons + 'tags + (mapcar (lambda (x) + (cons x + (cdr (assq + (idlwave-sintern-sysvartag x) (cdr (assq 'tags old-entry)))))) tags)) link) idlwave-system-variables-alist))) @@ -7308,9 +7308,9 @@ associated TAG, if any." (defun idlwave-uniquify (list) (let ((ht (make-hash-table :size (length list) :test 'equal))) - (delq nil + (delq nil (mapcar (lambda (x) - (unless (gethash x ht) + (unless (gethash x ht) (puthash x t ht) x)) list)))) @@ -7338,11 +7338,11 @@ Restore the pre-completion window configuration if possible." nil))) ;; Restore the pre-completion window configuration if this is safe. - - (if (or (eq verify 'force) ; force - (and + + (if (or (eq verify 'force) ; force + (and (get-buffer-window "*Completions*") ; visible - (idlwave-local-value 'idlwave-completion-p + (idlwave-local-value 'idlwave-completion-p "*Completions*") ; cib-buffer (eq (marker-buffer idlwave-completion-mark) (current-buffer)) ; buffer OK @@ -7440,7 +7440,7 @@ With ARG, enforce query for the class of object methods." (if (string-match "\\(pro\\|function\\)[ \t]+\\(\\(.*\\)::\\)?\\(.*\\)" resolve) (setq type (match-string 1 resolve) - class (if (match-beginning 2) + class (if (match-beginning 2) (match-string 3 resolve) nil) name (match-string 4 resolve))) @@ -7449,15 +7449,15 @@ With ARG, enforce query for the class of object methods." (cond ((null class) - (idlwave-shell-send-command + (idlwave-shell-send-command (format "resolve_routine,'%s'%s" (downcase name) kwd) 'idlwave-update-routine-info nil t)) (t - (idlwave-shell-send-command + (idlwave-shell-send-command (format "resolve_routine,'%s__define'%s" (downcase class) kwd) - (list 'idlwave-shell-send-command - (format "resolve_routine,'%s__%s'%s" + (list 'idlwave-shell-send-command + (format "resolve_routine,'%s__%s'%s" (downcase class) (downcase name) kwd) '(idlwave-update-routine-info) nil t)))))) @@ -7474,19 +7474,19 @@ force class query for object methods." (this-buffer (equal arg '(4))) (module (idlwave-fix-module-if-obj_new (idlwave-what-module))) (default (if module - (concat (idlwave-make-full-name + (concat (idlwave-make-full-name (nth 2 module) (car module)) (if (eq (nth 1 module) 'pro) "

" "")) "none")) - (list + (list (idlwave-uniquify (delq nil - (mapcar (lambda (x) + (mapcar (lambda (x) (if (eq 'system (car-safe (nth 3 x))) ;; Take out system routines with no source. nil (list - (concat (idlwave-make-full-name + (concat (idlwave-make-full-name (nth 2 x) (car x)) (if (eq (nth 1 x) 'pro) "

" ""))))) (if this-buffer @@ -7515,10 +7515,10 @@ force class query for object methods." (t t))) (idlwave-do-find-module name type class nil this-buffer))) -(defun idlwave-do-find-module (name type class +(defun idlwave-do-find-module (name type class &optional force-source this-buffer) (let ((name1 (idlwave-make-full-name class name)) - source buf1 entry + source buf1 entry (buf (current-buffer)) (pos (point)) file name2) @@ -7528,11 +7528,11 @@ force class query for object methods." name2 (if (nth 2 entry) (idlwave-make-full-name (nth 2 entry) name) name1)) - (if source + (if source (setq file (idlwave-routine-source-file source))) (unless file ; Try to find it on the path. - (setq file - (idlwave-expand-lib-file-name + (setq file + (idlwave-expand-lib-file-name (if class (format "%s__define.pro" (downcase class)) (format "%s.pro" (downcase name)))))) @@ -7540,14 +7540,14 @@ force class query for object methods." ((or (null name) (equal name "")) (error "Abort")) ((eq (car source) 'system) - (error "Source code for system routine %s is not available" + (error "Source code for system routine %s is not available" name2)) ((or (not file) (not (file-regular-p file))) (error "Source code for routine %s is not available" name2)) (t (when (not this-buffer) - (setq buf1 + (setq buf1 (idlwave-find-file-noselect file 'find)) (pop-to-buffer buf1 t)) (goto-char (point-max)) @@ -7557,7 +7557,7 @@ force class query for object methods." (cond ((eq type 'fun) "function") ((eq type 'pro) "pro") (t "\\(pro\\|function\\)")) - "\\>[ \t]+" + "\\>[ \t]+" (regexp-quote (downcase name2)) "[^a-zA-Z0-9_$]") nil t) @@ -7594,17 +7594,17 @@ Used by `idlwave-routine-info' and `idlwave-find-module'." (cond ((and (eq cw 'procedure) (not (equal this-word ""))) - (setq this-word (idlwave-sintern-routine-or-method + (setq this-word (idlwave-sintern-routine-or-method this-word (nth 2 (nth 3 where)))) (list this-word 'pro - (idlwave-determine-class + (idlwave-determine-class (cons this-word (cdr (nth 3 where))) 'pro))) - ((and (eq cw 'function) + ((and (eq cw 'function) (not (equal this-word "")) (or (eq next-char ?\() ; exclude arrays, vars. (looking-at "[a-zA-Z0-9_]*[ \t]*("))) - (setq this-word (idlwave-sintern-routine-or-method + (setq this-word (idlwave-sintern-routine-or-method this-word (nth 2 (nth 3 where)))) (list this-word 'fun (idlwave-determine-class @@ -7641,7 +7641,7 @@ Used by `idlwave-routine-info' and `idlwave-find-module'." class))) (defun idlwave-fix-module-if-obj_new (module) - "Check if MODULE points to obj_new. + "Check if MODULE points to obj_new. If yes, and if the cursor is in the keyword region, change to the appropriate Init method." (let* ((name (car module)) @@ -7681,30 +7681,30 @@ from all classes if class equals t." string) (setq class (idlwave-sintern-class (match-string 1 string))) (setq idlwave-current-obj_new-class class) - (setq keywords - (append keywords + (setq keywords + (append keywords (idlwave-entry-keywords (idlwave-rinfo-assq (idlwave-sintern-method "INIT") 'fun class (idlwave-routines)) 'do-link)))))) - + ;; If the class is `t', combine all keywords of all methods NAME (when (eq class t) (mapc (lambda (entry) (and (nth 2 entry) ; non-nil class (eq (nth 1 entry) type) ; correct type - (setq keywords - (append keywords + (setq keywords + (append keywords (idlwave-entry-keywords entry 'do-link))))) (idlwave-all-assq name (idlwave-routines))) (setq keywords (idlwave-uniquify keywords))) - + ;; If we have inheritance, add all keywords from superclasses, if ;; the user indicated that method in `idlwave-keyword-class-inheritance' - (when (and + (when (and super-classes idlwave-keyword-class-inheritance (stringp class) @@ -7724,7 +7724,7 @@ from all classes if class equals t." (mapcar (lambda (k) (add-to-list 'keywords k)) (idlwave-entry-keywords entry 'do-link)))) (setq keywords (idlwave-uniquify keywords))) - + ;; Return the final list keywords)) @@ -7749,14 +7749,14 @@ If we do not know about MODULE, just return KEYWORD literally." (assq (idlwave-sintern-keyword "_REF_EXTRA") kwd-alist))) (completion-ignore-case t) candidates) - (cond ((assq kwd kwd-alist) + (cond ((assq kwd kwd-alist) kwd) ((setq candidates (all-completions kwd kwd-alist)) (if (= (length candidates) 1) (car candidates) candidates)) ((and entry extra) - ;; Inheritance may cause this keyword to be correct + ;; Inheritance may cause this keyword to be correct keyword) (entry ;; We do know the function, which does not have the keyword. @@ -7768,13 +7768,13 @@ If we do not know about MODULE, just return KEYWORD literally." (defvar idlwave-rinfo-mouse-map (make-sparse-keymap)) (defvar idlwave-rinfo-map (make-sparse-keymap)) -(define-key idlwave-rinfo-mouse-map +(define-key idlwave-rinfo-mouse-map (if (featurep 'xemacs) [button2] [mouse-2]) 'idlwave-mouse-active-rinfo) -(define-key idlwave-rinfo-mouse-map +(define-key idlwave-rinfo-mouse-map (if (featurep 'xemacs) [(shift button2)] [(shift mouse-2)]) 'idlwave-mouse-active-rinfo-shift) -(define-key idlwave-rinfo-mouse-map +(define-key idlwave-rinfo-mouse-map (if (featurep 'xemacs) [button3] [mouse-3]) 'idlwave-mouse-active-rinfo-right) (define-key idlwave-rinfo-mouse-map " " 'idlwave-active-rinfo-space) @@ -7800,7 +7800,7 @@ If we do not know about MODULE, just return KEYWORD literally." (let* ((initial-class (or initial-class class)) (entry (or (idlwave-best-rinfo-assq name type class (idlwave-routines)) - (idlwave-rinfo-assq name type class + (idlwave-rinfo-assq name type class idlwave-unresolved-routines))) (name (or (car entry) name)) (class (or (nth 2 entry) class)) @@ -7825,7 +7825,7 @@ If we do not know about MODULE, just return KEYWORD literally." (km-prop (if (featurep 'xemacs) 'keymap 'local-map)) (face 'idlwave-help-link-face) beg props win cnt total) - ;; Fix keywords, but don't add chained super-classes, since these + ;; Fix keywords, but don't add chained super-classes, since these ;; are shown separately for that super-class (setq keywords (idlwave-fix-keywords name type class keywords)) (cond @@ -7867,7 +7867,7 @@ If we do not know about MODULE, just return KEYWORD literally." km-prop idlwave-rinfo-mouse-map 'help-echo help-echo-use 'data (cons 'usage data))) - (if html-file (setq props (append (list 'face face 'link html-file) + (if html-file (setq props (append (list 'face face 'link html-file) props))) (insert "Usage: ") (setq beg (point)) @@ -7876,14 +7876,14 @@ If we do not know about MODULE, just return KEYWORD literally." (format calling-seq name name name name)) "\n") (add-text-properties beg (point) props) - + (insert "Keywords:") (if (null keywords) (insert " No keywords accepted.") (setq col 9) (mapcar (lambda (x) - (if (>= (+ col 1 (length (car x))) + (if (>= (+ col 1 (length (car x))) (window-width)) (progn (insert "\n ") @@ -7901,7 +7901,7 @@ If we do not know about MODULE, just return KEYWORD literally." (add-text-properties beg (point) props) (setq col (+ col 1 (length (car x))))) keywords)) - + (setq cnt 1 total (length all)) ;; Here entry is (key file (list of type-conses)) (while (setq entry (pop all)) @@ -7914,7 +7914,7 @@ If we do not know about MODULE, just return KEYWORD literally." (cdr (car (nth 2 entry)))) 'data (cons 'source data))) (idlwave-insert-source-location - (format "\n%-8s %s" + (format "\n%-8s %s" (if (equal cnt 1) (if (> total 1) "Sources:" "Source:") "") @@ -7923,7 +7923,7 @@ If we do not know about MODULE, just return KEYWORD literally." (incf cnt) (when (and all (> cnt idlwave-rinfo-max-source-lines)) ;; No more source lines, please - (insert (format + (insert (format "\n Source information truncated to %d entries." idlwave-rinfo-max-source-lines)) (setq all nil))) @@ -7937,7 +7937,7 @@ If we do not know about MODULE, just return KEYWORD literally." (unwind-protect (progn (select-window win) - (enlarge-window (- (/ (frame-height) 2) + (enlarge-window (- (/ (frame-height) 2) (window-height))) (shrink-window-if-larger-than-buffer)) (select-window ww))))))))) @@ -7974,9 +7974,9 @@ it." ((and (not file) shell-flag) (insert "Unresolved")) - ((null file) + ((null file) (insert "ERROR")) - + ((idlwave-syslib-p file) (if (string-match "obsolete" (file-name-directory file)) (insert "Obsolete ") @@ -7990,7 +7990,7 @@ it." ;; Old special syntax: a matching regexp ((setq special (idlwave-special-lib-test file)) (insert (format "%-10s" special))) - + ;; Catch-all with file ((idlwave-lib-p file) (insert "Library ")) @@ -8005,7 +8005,7 @@ it." (if shell-flag "S" "-") (if buffer-flag "B" "-") "] "))) - (when (> ndupl 1) + (when (> ndupl 1) (setq beg (point)) (insert (format "(%dx) " ndupl)) (add-text-properties beg (point) (list 'face 'bold))) @@ -8029,7 +8029,7 @@ Return the name of the special lib if there is a match." alist nil))) rtn) (t nil)))) - + (defun idlwave-mouse-active-rinfo-right (ev) (interactive "e") (idlwave-mouse-active-rinfo ev 'right)) @@ -8062,9 +8062,9 @@ was pressed." (cond ((eq id 'class) ; Switch class being displayed (if (window-live-p bufwin) (select-window bufwin)) - (idlwave-display-calling-sequence + (idlwave-display-calling-sequence (idlwave-sintern-method name) - type (idlwave-sintern-class word) + type (idlwave-sintern-class word) initial-class)) ((eq id 'usage) ; Online help on this routine (idlwave-online-help link name type class)) @@ -8105,9 +8105,9 @@ was pressed." (setq bwin (get-buffer-window buffer))) (if (eq (preceding-char) ?/) (insert keyword) - (unless (save-excursion + (unless (save-excursion (re-search-backward - "[(,][ \t]*\\(\\$[ \t]*\\(;.*\\)?\n\\)?[ \t]*\\=" + "[(,][ \t]*\\(\\$[ \t]*\\(;.*\\)?\n\\)?[ \t]*\\=" (min (- (point) 100) (point-min)) t)) (insert ", ")) (if shift (insert "/")) @@ -8159,7 +8159,7 @@ the load path in order to find a definition. The output of this command can be used to detect possible name clashes during this process." (idlwave-routines) ; Make sure everything is loaded. (unless (or idlwave-user-catalog-routines idlwave-library-catalog-routines) - (or (y-or-n-p + (or (y-or-n-p "You don't have any user or library catalogs. Continue anyway? ") (error "Abort"))) (let* ((routines (append idlwave-system-routines @@ -8172,7 +8172,7 @@ command can be used to detect possible name clashes during this process." (keymap (make-sparse-keymap)) (props (list 'mouse-face 'highlight km-prop keymap - 'help-echo "Mouse2: Find source")) + 'help-echo "Mouse2: Find source")) (nroutines (length (or special-routines routines))) (step (/ nroutines 99)) (n 0) @@ -8196,13 +8196,13 @@ command can be used to detect possible name clashes during this process." (message "Sorting routines...done") (define-key keymap (if (featurep 'xemacs) [(button2)] [(mouse-2)]) - (lambda (ev) + (lambda (ev) (interactive "e") (mouse-set-point ev) (apply 'idlwave-do-find-module (get-text-property (point) 'find-args)))) (define-key keymap [(return)] - (lambda () + (lambda () (interactive) (apply 'idlwave-do-find-module (get-text-property (point) 'find-args)))) @@ -8230,13 +8230,13 @@ command can be used to detect possible name clashes during this process." (> (idlwave-count-memq 'buffer (nth 2 (car dtwins))) 1)) (incf cnt) (insert (format "\n%s%s" - (idlwave-make-full-name (nth 2 routine) + (idlwave-make-full-name (nth 2 routine) (car routine)) (if (eq (nth 1 routine) 'fun) "()" ""))) (while (setq twin (pop dtwins)) (setq props1 (append (list 'find-args - (list (nth 0 routine) - (nth 1 routine) + (list (nth 0 routine) + (nth 1 routine) (nth 2 routine))) props)) (idlwave-insert-source-location "\n - " twin props1)))) @@ -8259,7 +8259,7 @@ command can be used to detect possible name clashes during this process." (or (not (stringp sfile)) (not (string-match "\\S-" sfile)))) (setq stype 'unresolved)) - (princ (format " %-10s %s\n" + (princ (format " %-10s %s\n" stype (if sfile sfile "No source code available"))))) @@ -8278,20 +8278,20 @@ ENTRY will also be returned, as the first item of this list." (eq type (nth 1 candidate)) (eq class (nth 2 candidate))) (push candidate twins))) - (if (setq candidate (idlwave-rinfo-assq name type class + (if (setq candidate (idlwave-rinfo-assq name type class idlwave-unresolved-routines)) (push candidate twins)) (cons entry (nreverse twins)))) (defun idlwave-study-twins (entries) - "Return dangerous twins of first entry in ENTRIES. + "Return dangerous twins of first entry in ENTRIES. Dangerous twins are routines with same name, but in different files on the load path. If a file is in the system library and has an entry in the `idlwave-system-routines' list, we omit the latter as non-dangerous because many IDL routines are implemented as library routines, and may have been scanned." (let* ((entry (car entries)) - (name (car entry)) ; + (name (car entry)) ; (type (nth 1 entry)) ; Must be bound for (class (nth 2 entry)) ; idlwave-routine-twin-compare (cnt 0) @@ -8309,23 +8309,23 @@ routines, and may have been scanned." (t 'unresolved))) ;; Check for an entry in the system library - (if (and file + (if (and file (not syslibp) (idlwave-syslib-p file)) (setq syslibp t)) - + ;; If there's more than one matching entry for the same file, just ;; append the type-cons to the type list. (if (setq entry (assoc key alist)) (push type-cons (nth 2 entry)) (push (list key file (list type-cons)) alist))) - + (setq alist (nreverse alist)) - + (when syslibp ;; File is in system *library* - remove any 'system entry (setq alist (delq (assq 'system alist) alist))) - + ;; If 'system remains and we've scanned the syslib, it's a builtin ;; (rather than a !DIR/lib/.pro file bundled as source). (when (and (idlwave-syslib-scanned-p) @@ -8362,7 +8362,7 @@ compares twins on the basis of their file names and path locations." ((not (eq type (nth 1 b))) ;; Type decides (< (if (eq type 'fun) 1 0) (if (eq (nth 1 b) 'fun) 1 0))) - (t + (t ;; A and B are twins - so the decision is more complicated. ;; Call twin-compare with the proper arguments. (idlwave-routine-entry-compare-twins a b))))) @@ -8414,7 +8414,7 @@ This expects NAME TYPE CLASS to be bound to the right values." (tpath-alist (idlwave-true-path-alist)) (apathp (and (stringp akey) (assoc (file-name-directory akey) tpath-alist))) - (bpathp (and (stringp bkey) + (bpathp (and (stringp bkey) (assoc (file-name-directory bkey) tpath-alist))) ;; How early on search path? High number means early since we ;; measure the tail of the path list @@ -8450,7 +8450,7 @@ This expects NAME TYPE CLASS to be bound to the right values." (t nil)))) ; Default (defun idlwave-routine-source-file (source) - (if (nth 2 source) + (if (nth 2 source) (expand-file-name (nth 1 source) (nth 2 source)) (nth 1 source))) @@ -8540,7 +8540,7 @@ Assumes that point is at the beginning of the unit as found by (forward-sexp 2) (forward-sexp -1) (let ((begin (point))) - (re-search-forward + (re-search-forward "[a-zA-Z_][a-zA-Z0-9$_]+\\(::[a-zA-Z_][a-zA-Z0-9$_]+\\)?") (if (fboundp 'buffer-substring-no-properties) (buffer-substring-no-properties begin (point)) @@ -8580,12 +8580,12 @@ Assumes that point is at the beginning of the unit as found by (start-process "idldeclient" nil idlwave-shell-explicit-file-name "-c" "-e" (buffer-file-name) "&")) - + (defun idlwave-launch-idlhelp () "Start the IDLhelp application." (interactive) (start-process "idlhelp" nil idlwave-help-application)) - + ;; Menus - using easymenu.el (defvar idlwave-mode-menu-def `("IDLWAVE" @@ -8672,7 +8672,7 @@ Assumes that point is at the beginning of the unit as found by ("Customize" ["Browse IDLWAVE Group" idlwave-customize t] "--" - ["Build Full Customize Menu" idlwave-create-customize-menu + ["Build Full Customize Menu" idlwave-create-customize-menu (fboundp 'customize-menu-create)]) ("Documentation" ["Describe Mode" describe-mode t] @@ -8689,22 +8689,22 @@ Assumes that point is at the beginning of the unit as found by '("Debug" ["Start IDL shell" idlwave-shell t] ["Save and .RUN buffer" idlwave-shell-save-and-run - (and (boundp 'idlwave-shell-automatic-start) + (and (boundp 'idlwave-shell-automatic-start) idlwave-shell-automatic-start)])) (if (or (featurep 'easymenu) (load "easymenu" t)) (progn - (easy-menu-define idlwave-mode-menu idlwave-mode-map - "IDL and WAVE CL editing menu" + (easy-menu-define idlwave-mode-menu idlwave-mode-map + "IDL and WAVE CL editing menu" idlwave-mode-menu-def) - (easy-menu-define idlwave-mode-debug-menu idlwave-mode-map - "IDL and WAVE CL editing menu" + (easy-menu-define idlwave-mode-debug-menu idlwave-mode-map + "IDL and WAVE CL editing menu" idlwave-mode-debug-menu-def))) (defun idlwave-customize () "Call the customize function with idlwave as argument." (interactive) - ;; Try to load the code for the shell, so that we can customize it + ;; Try to load the code for the shell, so that we can customize it ;; as well. (or (featurep 'idlw-shell) (load "idlw-shell" t)) @@ -8715,11 +8715,11 @@ Assumes that point is at the beginning of the unit as found by (interactive) (if (fboundp 'customize-menu-create) (progn - ;; Try to load the code for the shell, so that we can customize it + ;; Try to load the code for the shell, so that we can customize it ;; as well. (or (featurep 'idlw-shell) (load "idlw-shell" t)) - (easy-menu-change + (easy-menu-change '("IDLWAVE") "Customize" `(["Browse IDLWAVE group" idlwave-customize t] "--" @@ -8767,7 +8767,7 @@ This function was written since `list-abbrevs' looks terrible for IDLWAVE mode." (let ((table (symbol-value 'idlwave-mode-abbrev-table)) abbrevs str rpl func fmt (len-str 0) (len-rpl 0)) - (mapatoms + (mapatoms (lambda (sym) (if (symbol-value sym) (progn @@ -8793,7 +8793,7 @@ This function was written since `list-abbrevs' looks terrible for IDLWAVE mode." (with-output-to-temp-buffer "*Help*" (if arg (progn - (princ "Abbreviations and Actions in IDLWAVE-Mode\n") + (princ "Abbreviations and Actions in IDLWAVE-Mode\n") (princ "=========================================\n\n") (princ (format fmt "KEY" "REPLACE" "HOOK")) (princ (format fmt "---" "-------" "----"))) -- cgit v1.2.1 From 5bb5087f3cfecc123842ee4f26155c621289e6cd Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 14 Jun 2005 15:31:10 +0000 Subject: (vhdl-speedbar-place-component): Follow error conventions. --- lisp/progmodes/vhdl-mode.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lisp') diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index ebccb1bf5bf..d30b3a565a0 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -12600,7 +12600,7 @@ This does background highlighting of translate-off regions.") 'vhdl-highlight-faces 'font-lock-variable-name-face 'custom-face) (defface vhdl-font-lock-prompt-face - '((((min-colors 88) (class color) (background light)) + '((((min-colors 88) (class color) (background light)) (:foreground "Red1" :bold t)) (((class color) (background light)) (:foreground "Red" :bold t)) (((class color) (background dark)) (:foreground "Pink" :bold t)) @@ -12643,7 +12643,7 @@ This does background highlighting of translate-off regions.") (defface vhdl-font-lock-reserved-words-face '((((class color) (background light)) (:foreground "Orange" :bold t)) - (((min-colors 88) (class color) (background dark)) + (((min-colors 88) (class color) (background dark)) (:foreground "Yellow1" :bold t)) (((class color) (background dark)) (:foreground "Yellow" :bold t)) (t ())) @@ -14924,7 +14924,7 @@ is already shown in a buffer." "Place the entity/component under the cursor as component." (interactive) (if (not (vhdl-speedbar-check-unit 'entity)) - (error "ERROR: No entity/component under cursor.") + (error "ERROR: No entity/component under cursor") (vhdl-speedbar-port-copy) (if (fboundp 'speedbar-select-attached-frame) (speedbar-select-attached-frame) -- cgit v1.2.1 From 6de5b135fc3a7095cdf1afee034d71c883277055 Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Tue, 14 Jun 2005 15:32:27 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 459ddcdaa62..4844aa1d1c5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-06-14 Kim F. Storm + + * ido.el (ido-mode): Make a new keymap every time we enable ido, + as the coverage buffer/file/both may change. + 2005-06-14 Lute Kamstra * net/ange-ftp.el (internal-ange-ftp-mode): Use delay-mode-hooks -- cgit v1.2.1 From 1939ac922fbae817e08ca325b6c56964b26cdc36 Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Tue, 14 Jun 2005 15:32:41 +0000 Subject: (ido-mode): Make a new keymap every time we enable ido, as the coverage buffer/file/both may change. --- lisp/ido.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/ido.el b/lisp/ido.el index 012be3da37f..2d9313bb0ea 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -1320,7 +1320,8 @@ This function also adds a hook to the minibuffer." (add-hook 'kill-emacs-hook 'ido-kill-emacs-hook) - (unless ido-minor-mode-map-entry + (if ido-minor-mode-map-entry + (setcdr ido-minor-mode-map-entry (make-sparse-keymap)) (setq ido-minor-mode-map-entry (cons 'ido-mode (make-sparse-keymap))) (add-to-list 'minor-mode-map-alist ido-minor-mode-map-entry)) -- cgit v1.2.1 From 4b9e737811fbf253db0418f2f78be43ee9a5cbf2 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 14 Jun 2005 15:33:45 +0000 Subject: (org-promote, org-evaluate-time-range, org-agenda-next-date-line, org-agenda-previous-date-line, org-agenda-error, org-open-at-point, org-table-move-row, org-format-table-table-html-using-table-generate-source, org-shiftcursor-error, org-ctrl-c-ctrl-c): Follow error conventions. --- lisp/textmodes/org.el | 228 +++++++++++++++++++++++++------------------------- 1 file changed, 114 insertions(+), 114 deletions(-) (limited to 'lisp') diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el index c88f288a242..635bb6b5a98 100644 --- a/lisp/textmodes/org.el +++ b/lisp/textmodes/org.el @@ -1,4 +1,4 @@ -;;; org.el --- Outline-based notes management and organizer +;;; org.el --- Outline-based notes management and organizer ;; Carstens outline-mode for keeping track of everything. ;; Copyright (c) 2004, 2005 Free Software Foundation ;; @@ -445,7 +445,7 @@ is used instead.") (goto-char (point-min)) (while (re-search-forward re nil t) (setq key (match-string 1) value (match-string 2)) - (cond + (cond ((equal key "CATEGORY") (if (string-match "[ \t]+$" value) (setq value (replace-match "" t t value))) @@ -485,7 +485,7 @@ is used instead.") org-todo-kwd-max-priority (1- (length org-todo-keywords)) org-ds-keyword-length (+ 2 (max (length org-deadline-string) (length org-scheduled-string))) - org-done-string + org-done-string (nth (1- (length org-todo-keywords)) org-todo-keywords) org-todo-regexp (concat "\\<\\(" (mapconcat 'regexp-quote org-todo-keywords @@ -565,7 +565,7 @@ When nil, cursor will remain in the current window." (defcustom org-select-agenda-window t "Non-nil means, after creating an agenda, move cursor into Agenda window. -When nil, cursor will remain in the current window." +When nil, cursor will remain in the current window." :group 'org-agenda :type 'boolean) @@ -601,7 +601,7 @@ When nil, always start on the current day." When nil, date-less entries will only be shown if `org-agenda' is called with a prefix argument. When non-nil, the TODO entries will be listed at the top of the agenda, before -the entries for specific days." +the entries for specific days." :group 'org-agenda :type 'boolean) @@ -646,7 +646,7 @@ priority. Leaving out `category-keep' would mean that items will be sorted across categories by priority." :group 'org-agenda - :type '(repeat + :type '(repeat (choice (const time-up) (const time-down) @@ -722,7 +722,7 @@ the variable `org-agenda-time-grid'." :group 'org-agenda :type 'boolean) -(defcustom org-agenda-time-grid +(defcustom org-agenda-time-grid '((daily today require-timed) "----------------" (800 1000 1200 1400 1600 1800 2000)) @@ -741,7 +741,7 @@ The second item is a string which will be places behing the grid time. The third item is a list of integers, indicating the times that should have a grid line." :group 'org-agenda - :type + :type '(list (set :greedy t :tag "Grid Display Options" (const :tag "Show grid in single day agenda display" daily) @@ -835,7 +835,7 @@ unnecessary clutter." (defcustom org-archive-location "%s_archive::" "The location where subtrees should be archived. -This string consists of two parts, separated by a double-colon. +This string consists of two parts, separated by a double-colon. The first part is a file name - when omitted, archiving happens in the same file. %s will be replaced by the current file name (without directory part). @@ -864,7 +864,7 @@ Here are a few examples: You may set this option on a per-file basis by adding to the buffer a line like - + #+ARCHIVE: basement::** Finished Tasks" :group 'org-structure :type 'string) @@ -1556,7 +1556,7 @@ When this is non-nil, the headline after the keyword is set to the "Face for items scheduled previously, and not yet done." :group 'org-faces) -(defface org-link +(defface org-link '((((type tty) (class color)) (:foreground "cyan" :weight bold)) (((class color) (background light)) (:foreground "Purple")) (((class color) (background dark)) (:foreground "Cyan")) @@ -1663,7 +1663,7 @@ sets it back to nil.") ;;;###autoload (define-derived-mode org-mode outline-mode "Org" - "Outline-based notes management and organizer, alias + "Outline-based notes management and organizer, alias \"Carstens outline-mode for keeping track of everything.\" Org-mode develops organizational tasks around a NOTES file which @@ -1728,7 +1728,7 @@ The following commands are available: ;;; Font-Lock stuff (defvar org-mouse-map (make-sparse-keymap)) -(define-key org-mouse-map +(define-key org-mouse-map (if org-xemacs-p [button2] [mouse-2]) 'org-open-at-mouse) (define-key org-mouse-map (if org-xemacs-p [button3] [mouse-3]) 'org-find-file-at-mouse) @@ -1804,9 +1804,9 @@ The following commands are available: (list (concat "\\<" org-scheduled-string) '(0 'org-warning t)) ;; '("\\(\\s-\\|^\\)\\(\\*\\([a-zA-Z]+\\)\\*\\)\\([^a-zA-Z*]\\|$\\)" ;; (3 'bold)) - ;; '("\\(\\s-\\|^\\)\\(/\\([a-zA-Z]+\\)/\\)\\([^a-zA-Z*]\\|$\\)" + ;; '("\\(\\s-\\|^\\)\\(/\\([a-zA-Z]+\\)/\\)\\([^a-zA-Z*]\\|$\\)" ;; (3 'italic)) - ;; '("\\(\\s-\\|^\\)\\(_\\([a-zA-Z]+\\)_\\)\\([^a-zA-Z*]\\|$\\)" + ;; '("\\(\\s-\\|^\\)\\(_\\([a-zA-Z]+\\)_\\)\\([^a-zA-Z*]\\|$\\)" ;; (3 'underline)) '("\\" (0 'org-warning t)) (list (concat "^\\*+[ \t]*\\<\\(" org-comment-string "\\)\\>") @@ -1825,7 +1825,7 @@ The following commands are available: (if org-noutline-p ; FIXME: I am not sure if eval will work ; on XEmacs if noutline is ever ported '((eval . (list "^\\(\\*+\\).*" - 0 '(nth + 0 '(nth (% (- (match-end 1) (match-beginning 1) 1) org-n-levels) org-level-faces) @@ -1839,7 +1839,7 @@ The following commands are available: (set (make-local-variable 'font-lock-defaults) '(org-font-lock-keywords t nil nil backward-paragraph)) (kill-local-variable 'font-lock-keywords) nil)) - + (defun org-unfontify-region (beg end &optional maybe_loudly) "Remove fontification and activation overlays from links." (font-lock-default-unfontify-region beg end) @@ -2239,7 +2239,7 @@ in the region." (org-back-to-heading t) (let* ((level (save-match-data (funcall outline-level))) (up-head (make-string (1- level) ?*))) - (if (= level 1) (error "Cannot promote to level 0. UNDO to recover.")) + (if (= level 1) (error "Cannot promote to level 0. UNDO to recover")) (replace-match up-head nil t) (if org-adapt-indentation (org-fixup-indentation "^ " "" "^ ?\\S-")))) @@ -2558,7 +2558,7 @@ heading be marked DONE, and the current time will be added." (end-of-line 0)) ;; Make the heading visible, and the following as well (let ((org-show-following-heading t)) (org-show-hierarchy-above)) - (if (re-search-forward + (if (re-search-forward (concat "^" (regexp-quote (make-string level ?*)) "[ \t]") nil t) (progn (goto-char (match-beginning 0)) (insert "\n") @@ -2617,11 +2617,11 @@ At all other locations, this simply calls `ispell-complete-word'." (table (cond (opt (setq type :opt) - (mapcar (lambda (x) + (mapcar (lambda (x) (string-match "^#\\+\\(\\([A-Z_]+:?\\).*\\)" x) (cons (match-string 2 x) (match-string 1 x))) (org-split-string (org-get-current-options) "\n"))) - (texp + (texp (setq type :tex) org-html-entities) ((string-match "\\`\\*+[ \t]*\\'" @@ -2631,7 +2631,7 @@ At all other locations, this simply calls `ispell-complete-word'." (t (progn (ispell-complete-word arg) (throw 'exit nil))))) (completion (try-completion pattern table))) (cond ((eq completion t) - (if (equal type :opt) + (if (equal type :opt) (insert (substring (cdr (assoc (upcase pattern) table)) (length pattern))))) ((null completion) @@ -2639,7 +2639,7 @@ At all other locations, this simply calls `ispell-complete-word'." (ding)) ((not (string= pattern completion)) (delete-region beg end) - (if (string-match " +$" completion) + (if (string-match " +$" completion) (setq completion (replace-match "" t t completion))) (insert completion) (if (get-buffer-window "*Completions*") @@ -2876,9 +2876,9 @@ ACTION can be set, up, or down." (save-match-data (if (not (string-match org-priority-regexp s)) (* 1000 (- org-lowest-priority org-default-priority)) - (* 1000 (- org-lowest-priority + (* 1000 (- org-lowest-priority (string-to-char (match-string 2 s))))))) - + ;;; Timestamps (defvar org-last-changed-timestamp nil) @@ -2910,7 +2910,7 @@ at the cursor, it will be modified." (setq time (let ((this-command this-command)) (org-read-date arg 'totime))) (and (org-at-timestamp-p) (replace-match - (setq org-last-changed-timestamp + (setq org-last-changed-timestamp (format-time-string fmt time)) t t)) (message "Timestamp updated")) @@ -2940,8 +2940,8 @@ but this can be configured with the variables `parse-time-months' and While prompting, a calendar is popped up - you can also select the date with the mouse (button 1). The calendar shows a period of three -month. To scroll it to other months, use the keys `>' and `<'. -If you don't like the calendar, turn it off with +month. To scroll it to other months, use the keys `>' and `<'. +If you don't like the calendar, turn it off with \(setq org-popup-calendar-for-date-prompt nil). With optional argument TO-TIME, the date will immediately be converted @@ -2955,7 +2955,7 @@ used to insert the time stamp into the buffer to include the time." ;; Default time is either today, or, when entering a range, ;; the range start. (if (save-excursion - (re-search-backward + (re-search-backward (concat org-ts-regexp "--\\=") (- (point) 20) t)) (apply @@ -3066,7 +3066,7 @@ This is used by `org-read-date' in a temporary keymap for the calendar buffer." (time (encode-time 0 0 0 (nth 1 date) (nth 0 date) (nth 2 date)))) (setq ans1 (format-time-string "%Y-%m-%d" time))) (if (active-minibuffer-window) (exit-minibuffer)))) - + (defun org-check-deadlines (ndays) "Check if there are any deadlines due or past due. A deadline is considered due if it happens within `org-deadline-warning-days' @@ -3106,7 +3106,7 @@ days in order to avoid rounding problems." (goto-char (point-at-bol)) (re-search-forward org-tr-regexp (point-at-eol) t)) (if (not (org-at-date-range-p)) - (error "Not at a time-stamp range, and none found in current line."))) + (error "Not at a time-stamp range, and none found in current line"))) (let* ((ts1 (match-string 1)) (ts2 (match-string 2)) (havetime (or (> (length ts1) 15) (> (length ts2) 15))) @@ -3358,10 +3358,10 @@ The following commands are available: (add-hook 'post-command-hook 'org-agenda-post-command-hook nil 'local) (add-hook 'pre-command-hook 'org-unhighlight nil 'local) (setq org-agenda-follow-mode nil) - (easy-menu-change + (easy-menu-change '("Agenda") "Agenda Files" (append - (list + (list ["Edit File List" (customize-variable 'org-agenda-files) t] "--") (mapcar 'org-file-menu-entry org-agenda-files))) @@ -3422,7 +3422,7 @@ The following commands are available: (defvar org-agenda-keymap (copy-keymap org-agenda-mode-map) "Local keymap for agenda entries from Org-mode.") -(define-key org-agenda-keymap +(define-key org-agenda-keymap (if org-xemacs-p [(button2)] [(mouse-2)]) 'org-agenda-goto-mouse) (define-key org-agenda-keymap (if org-xemacs-p [(button3)] [(mouse-3)]) 'org-agenda-show-mouse) @@ -3434,7 +3434,7 @@ The following commands are available: ["Show" org-agenda-show t] ["Go To (other window)" org-agenda-goto t] ["Go To (one window)" org-agenda-switch-to t] - ["Follow Mode" org-agenda-follow-mode + ["Follow Mode" org-agenda-follow-mode :style toggle :selected org-agenda-follow-mode :active t] "--" ["Cycle TODO" org-agenda-todo t] @@ -3552,7 +3552,7 @@ dates." (org-respect-restriction t) (past t) s e rtn d) - (setq org-agenda-redo-command + (setq org-agenda-redo-command (list 'progn (list 'switch-to-buffer-other-window (current-buffer)) (list 'org-timeline include-all))) @@ -3561,7 +3561,7 @@ dates." (setq day-numbers (delq nil (mapcar (lambda(x) (if (>= x today) x nil)) day-numbers)))) - (switch-to-buffer-other-window + (switch-to-buffer-other-window (get-buffer-create org-agenda-buffer-name)) (setq buffer-read-only nil) (erase-buffer) @@ -3576,7 +3576,7 @@ dates." (setq date (calendar-gregorian-from-absolute d)) (setq s (point)) (if dotodo - (setq rtn (org-agenda-get-day-entries + (setq rtn (org-agenda-get-day-entries entry date :todo :timestamp)) (setq rtn (org-agenda-get-day-entries entry date :timestamp))) (if (or rtn (equal d today)) @@ -3632,7 +3632,7 @@ NDAYS defaults to `org-agenda-ndays'." (day-numbers (list start)) (inhibit-redisplay t) s e rtn rtnall file date d start-pos end-pos todayp nd) - (setq org-agenda-redo-command + (setq org-agenda-redo-command (list 'org-agenda include-all start-day ndays)) ;; Make the list of days (setq ndays (or ndays org-agenda-ndays) @@ -3644,7 +3644,7 @@ NDAYS defaults to `org-agenda-ndays'." (if (not (equal (current-buffer) (get-buffer org-agenda-buffer-name))) (progn (delete-other-windows) - (switch-to-buffer-other-window + (switch-to-buffer-other-window (get-buffer-create org-agenda-buffer-name)))) (setq buffer-read-only nil) (erase-buffer) @@ -3662,7 +3662,7 @@ NDAYS defaults to `org-agenda-ndays'." rtn (org-agenda-get-day-entries file date :todo)) (setq rtnall (append rtnall rtn)))) - (when rtnall + (when rtnall (insert "ALL CURRENTLY OPEN TODO ITEMS:\n") (add-text-properties (point-min) (1- (point)) (list 'face 'org-link)) @@ -3696,12 +3696,12 @@ NDAYS defaults to `org-agenda-ndays'." (extract-calendar-year date))) (put-text-property s (1- (point)) 'face 'org-link) - (if rtnall (insert + (if rtnall (insert (org-finalize-agenda-entries ;; FIXME: condition needed (org-agenda-add-time-grid-maybe rtnall nd todayp)) "\n")) - (put-text-property s (1- (point)) 'day d)))) + (put-text-property s (1- (point)) 'day d)))) (goto-char (point-min)) (setq buffer-read-only t) (if org-fit-agenda-window @@ -3791,7 +3791,7 @@ With prefix ARG, go back that many times `org-agenda-ndays'." (error "Not allowed")) (setq org-agenda-ndays (if (equal org-agenda-ndays 1) 7 1)) - (org-agenda include-all-loc + (org-agenda include-all-loc (or (get-text-property (point) 'day) starting-day)) (org-agenda-set-mode-name) @@ -3806,7 +3806,7 @@ With prefix ARG, go back that many times `org-agenda-ndays'." (if (not (re-search-forward "^\\S-" nil t arg)) (progn (backward-char 1) - (error "No next date after this line in this buffer."))) + (error "No next date after this line in this buffer"))) (goto-char (match-beginning 0))) (defun org-agenda-previous-date-line (&optional arg) @@ -3814,7 +3814,7 @@ With prefix ARG, go back that many times `org-agenda-ndays'." (interactive "p") (beginning-of-line 1) (if (not (re-search-backward "^\\S-" nil t arg)) - (error "No previous date before this line in this buffer."))) + (error "No previous date before this line in this buffer"))) ;; Initialize the highlight (defvar org-hl (funcall (if org-xemacs-p 'make-extent 'make-overlay) 1 1)) @@ -3880,7 +3880,7 @@ With prefix ARG, go back that many times `org-agenda-ndays'." "Get the (Emacs Calendar) diary entries for DATE." (let* ((fancy-diary-buffer "*temporary-fancy-diary-buffer*") (diary-display-hook '(fancy-diary-display)) - (list-diary-entries-hook + (list-diary-entries-hook (cons 'org-diary-default-entry list-diary-entries-hook)) entries (org-disable-diary t)) @@ -3904,12 +3904,12 @@ With prefix ARG, go back that many times `org-agenda-ndays'." (kill-buffer fancy-diary-buffer))) (when entries (setq entries (org-split-string entries "\n")) - (setq entries - (mapcar + (setq entries + (mapcar (lambda (x) (setq x (org-format-agenda-item "" x "Diary" 'time)) ;; Extend the text properties to the beginning of the line - (add-text-properties + (add-text-properties 0 (length x) (text-properties-at (1- (length x)) x) x) @@ -3950,7 +3950,7 @@ date. Itt also removes lines that contain only whitespace." 0 (length string) (list 'mouse-face 'highlight 'keymap org-agenda-keymap - 'help-echo + 'help-echo (format "mouse-2 or RET jump to diary file %s" (abbreviate-file-name (buffer-file-name))) @@ -3972,7 +3972,7 @@ Needed to avoid empty dates which mess up holiday display." These are the files which are being checked for agenda entries. Optional argument FILE means, use this file instead of the current. It is possible (but not recommended) to add this function to the -`org-mode-hook'." +`org-mode-hook'." (interactive) (catch 'exit (let* ((file (or file (buffer-file-name) @@ -3987,7 +3987,7 @@ It is possible (but not recommended) to add this function to the org-agenda-files)))) (if (not present) (progn - (setq org-agenda-files + (setq org-agenda-files (cons afile org-agenda-files)) ;; Make sure custom.el does not end up with Org-mode (let ((org-mode-hook nil) (default-major-mode 'fundamental-mode)) @@ -4004,7 +4004,7 @@ Optional argument FILE means, use this file instead of the current." (let* ((file (or file (buffer-file-name))) (true-file (file-truename file)) (afile (abbreviate-file-name file)) - (files (delq nil (mapcar + (files (delq nil (mapcar (lambda (x) (if (equal true-file (file-truename x)) @@ -4089,7 +4089,7 @@ also be written as The function expects the lisp variables `entry' and `date' to be provided by the caller, because this is how the calendar works. Don't use this -function from a program - use `org-agenda-get-day-entries' instead." +function from a program - use `org-agenda-get-day-entries' instead." (org-agenda-maybe-reset-markers) (org-compile-agenda-prefix-format org-agenda-prefix-format) (setq args (or args '(:deadline :scheduled :timestamp))) @@ -4131,7 +4131,7 @@ the documentation of `org-diary'." (if (org-region-active-p) ;; Respect a region to restrict search (narrow-to-region (region-beginning) (region-end))) - ;; If we work for the calendar or many files, + ;; If we work for the calendar or many files, ;; get rid of any restriction (widen)) ;; The way we repeatedly append to `results' makes it O(n^2) :-( @@ -4197,7 +4197,7 @@ the documentation of `org-diary'." (goto-char (match-beginning 1)) (setq marker (org-agenda-new-marker (point-at-bol)) txt (org-format-agenda-item "" (match-string 1)) - priority + priority (+ (org-get-priority txt) (if org-todo-kwd-priority-p (- org-todo-kwd-max-priority -2 @@ -4269,7 +4269,7 @@ the documentation of `org-diary'." (if deadlinep (add-text-properties 0 (length txt) - (list 'face + (list 'face (if donep 'org-done 'org-warning) 'undone-face 'org-warning 'done-face 'org-done @@ -4329,8 +4329,8 @@ the documentation of `org-diary'." (setq txt org-agenda-no-heading-message)) (when txt (add-text-properties - 0 (length txt) - (append + 0 (length txt) + (append (list 'org-marker (org-agenda-new-marker pos) 'org-hd-marker (org-agenda-new-marker pos1) 'priority (+ (- 10 diff) (org-get-priority txt)) @@ -4422,7 +4422,7 @@ the documentation of `org-diary'." (setq hdmarker (org-agenda-new-marker (match-end 1))) (goto-char (match-end 1)) (looking-at "\\*+[ \t]*\\([^\r\n]+\\)") - (setq txt (org-format-agenda-item + (setq txt (org-format-agenda-item (format (if (= d1 d2) "" "(%d/%d): ") (1+ (- d0 d1)) (1+ (- d2 d1))) (match-string 1) nil (if (= d0 d1) timestr)))) @@ -4504,7 +4504,7 @@ only the correctly processes TXT should be returned - this is used by (setq s0 (match-string 0 ts) s1 (match-string (if plain 1 2) ts) s2 (match-string (if plain 8 4) ts)) - + ;; If the times are in TXT (not in DOTIMES), and the prefix will list ;; them, we might want to remove them there to avoid duplication. ;; The user can turn this off with a variable. @@ -4517,7 +4517,7 @@ only the correctly processes TXT should be returned - this is used by ;; Normalize the time(s) to 24 hour (if s1 (setq s1 (org-get-time-of-day s1 'string))) (if s2 (setq s2 (org-get-time-of-day s2 'string)))) - + ;; Create the final string (if noprefix (setq rtn txt) @@ -4529,7 +4529,7 @@ only the correctly processes TXT should be returned - this is used by category (if (symbolp category) (symbol-name category) category)) ;; Evaluate the compiled format (setq rtn (concat (eval org-prefix-format-compiled) txt))) - + ;; And finally add the text properties (add-text-properties 0 (length rtn) (list 'category (downcase category) @@ -4560,11 +4560,11 @@ only the correctly processes TXT should be returned - this is used by (while (setq time (pop gridtimes)) (unless (and remove (member time have)) (setq time (int-to-string time)) - (push (org-format-agenda-item + (push (org-format-agenda-item nil string "" ;; FIXME: put a category? (concat (substring time 0 -2) ":" (substring time -2))) new) - (put-text-property + (put-text-property 1 (length (car new)) 'face 'org-time-grid (car new)))) (if (member 'time-up org-agenda-sorting-strategy) (append new list) @@ -4603,7 +4603,7 @@ If not found, return nil. The optional STRING argument forces conversion into a 5 character wide string HH:MM." (save-match-data - (when + (when (or (string-match "\\<\\([012]?[0-9]\\)\\(:\\([0-5][0-9]\\)\\)\\([AaPp][Mm]\\)?\\> *" s) @@ -4659,7 +4659,7 @@ HH:MM." (category-up (org-cmp-category a b)) (category-down (if category-up (- category-up) nil)) (category-keep (if category-up +1 nil))) ; FIXME +1 or -1? - (cdr (assoc + (cdr (assoc (eval (cons 'or org-agenda-sorting-strategy)) '((-1 . t) (1 . nil) (nil . nil)))))) @@ -4674,7 +4674,7 @@ and by additional input from the age of a schedules or deadline entry." (defun org-agenda-goto (&optional highlight) "Go to the Org-mode file which contains the item at point." (interactive) - (let* ((marker (or (get-text-property (point) 'org-marker) + (let* ((marker (or (get-text-property (point) 'org-marker) (org-agenda-error))) (buffer (marker-buffer marker)) (pos (marker-position marker))) @@ -4691,7 +4691,7 @@ and by additional input from the age of a schedules or deadline entry." (defun org-agenda-switch-to () "Go to the Org-mode file which contains the item at point." (interactive) - (let* ((marker (or (get-text-property (point) 'org-marker) + (let* ((marker (or (get-text-property (point) 'org-marker) (org-agenda-error))) (buffer (marker-buffer marker)) (pos (marker-position marker))) @@ -4738,7 +4738,7 @@ and by additional input from the age of a schedules or deadline entry." (org-agenda-error))) (defun org-agenda-error () - (error "Command not allowed in this line.")) + (error "Command not allowed in this line")) (defvar org-last-heading-marker (make-marker) "Marker pointing to the headline that last changed its TODO state @@ -4805,7 +4805,7 @@ the new TODO state." (beginning-of-line 1) (add-text-properties (point-at-bol) (point-at-eol) props) (if fixface - (add-text-properties + (add-text-properties (point-at-bol) (point-at-eol) (list 'face (if org-last-todo-state-is-todo @@ -4902,7 +4902,7 @@ be used to request time specification in the time stamp." All the standard commands work: block, weekly etc" (interactive) (require 'diary-lib) - (let* ((char (progn + (let* ((char (progn (message "Diary entry: [d]ay [w]eekly [m]onthly [y]early [a]nniversary [b]lock [c]yclic") (read-char-exclusive))) (cmd (cdr (assoc char @@ -4932,7 +4932,7 @@ All the standard commands work: block, weekly etc" (progn (fset 'calendar-cursor-to-date (lambda (&optional error) - (calendar-gregorian-from-absolute + (calendar-gregorian-from-absolute (get-text-property point 'day)))) (call-interactively cmd)) (fset 'calendar-cursor-to-date oldf))))) @@ -4955,7 +4955,7 @@ the cursor position." (progn (fset 'calendar-cursor-to-date (lambda (&optional error) - (calendar-gregorian-from-absolute + (calendar-gregorian-from-absolute (get-text-property point 'day)))) (call-interactively cmd)) (fset 'calendar-cursor-to-date oldf)))) @@ -5005,7 +5005,7 @@ This is a command that has to be installed in `calendar-mode-map'." (unless day (error "Don't know which date to convert")) (setq date (calendar-gregorian-from-absolute day)) - (setq s (concat + (setq s (concat "Gregorian: " (calendar-date-string date) "\n" "ISO: " (calendar-iso-date-string date) "\n" "Day of Yr: " (calendar-day-of-year-string date) "\n" @@ -5064,7 +5064,7 @@ optional argument IN-EMACS is non-nil, Emacs will visit the file." (setq type (match-string 1) path (match-string 2))) (unless path - (error "No link found.")) + (error "No link found")) ;; Remove any trailing spaces in path (if (string-match " +\\'" path) (setq path (replace-match "" t t path))) @@ -5118,9 +5118,9 @@ optional argument IN-EMACS is non-nil, Emacs will visit the file." ((string= type "shell") (let ((cmd path)) - (while (string-match "@{" cmd) + (while (string-match "@{" cmd) (setq cmd (replace-match "<" t t cmd))) - (while (string-match "@}" cmd) + (while (string-match "@}" cmd) (setq cmd (replace-match ">" t t cmd))) (if (or (not org-confirm-shell-links) (yes-or-no-p (format "Execute \"%s\" in the shell? " cmd))) @@ -5217,7 +5217,7 @@ optional argument IN-EMACS is non-nil, Emacs will visit the file." (widen) (goto-char (point-max)) (if (re-search-backward - (concat "^Message-ID:\\s-+" (regexp-quote + (concat "^Message-ID:\\s-+" (regexp-quote (or article ""))) nil t) (rmail-what-message)))))) @@ -5304,7 +5304,7 @@ For file links, arg negates `org-line-numbers-in-file-links'." (or (bbdb-record-name (bbdb-current-record)) (bbdb-record-company (bbdb-current-record)))) link (org-make-link cpltxt))) - + ((eq major-mode 'calendar-mode) (let ((cd (calendar-cursor-to-date))) (setq link @@ -5330,8 +5330,8 @@ For file links, arg negates `org-line-numbers-in-file-links'." folder) (setq folder (replace-match "" t t folder))) (setq cpltxt (concat author " on: " subject)) - (setq link (concat cpltxt "\n " - (org-make-link + (setq link (concat cpltxt "\n " + (org-make-link "vm:" folder "#" message-id)))))) ((eq major-mode 'wl-summary-mode) @@ -5343,7 +5343,7 @@ For file links, arg negates `org-line-numbers-in-file-links'." (author (wl-summary-line-from)) ; FIXME: how to get author name? (subject "???")) ; FIXME: How to get subject of email? (setq cpltxt (concat author " on: " subject)) - (setq link (concat cpltxt "\n " + (setq link (concat cpltxt "\n " (org-make-link "wl:" wl-summary-buffer-folder-name "#" message-id))))) @@ -5357,7 +5357,7 @@ For file links, arg negates `org-line-numbers-in-file-links'." (author (mail-fetch-field "from")) (subject (mail-fetch-field "subject"))) (setq cpltxt (concat author " on: " subject)) - (setq link (concat cpltxt "\n " + (setq link (concat cpltxt "\n " (org-make-link "rmail:" folder "#" message-id))))))) @@ -5411,7 +5411,7 @@ For file links, arg negates `org-line-numbers-in-file-links'." (if (org-xor org-line-numbers-in-file-links arg) (setq cpltxt (concat cpltxt - ":" (int-to-string + ":" (int-to-string (+ (if (bolp) 1 0) (count-lines (point-min) (point))))))) (setq link (org-make-link cpltxt))) @@ -5581,7 +5581,7 @@ If the variable `org-adapt-indentation' is non-nil, the entire text is also indented so that it starts in the same column as the headline \(i.e. after the stars). -See also the variable `org-reverse-note-order'." +See also the variable `org-reverse-note-order'." (catch 'quit (let* ((txt (buffer-substring (point-min) (point-max))) (fastp current-prefix-arg) @@ -6071,7 +6071,7 @@ If the field at the cursor is empty, copy into it the content of the nearest non-empty field above. With argument N, use the Nth non-empty field. If the current field is not empty, it is copied down to the next row, and the cursor is moved with it. Therefore, repeating this command causes the -column to be filled row-by-row. +column to be filled row-by-row. If the variable `org-table-copy-increment' is non-nil and the field is an integer, it will be incremented while copying." (interactive "p") @@ -6162,7 +6162,7 @@ When called interactively, column is also displayed in echo area." (defun org-table-goto-column (n &optional on-delim force) "Move the cursor to the Nth column in the current table line. With optional argument ON-DELIM, stop with point before the left delimiter -of the field. +of the field. If there are less than N fields, just go to after the last delimiter. However, when FORCE is non-nil, create new columns if necessary." (let ((pos (point-at-eol))) @@ -6363,7 +6363,7 @@ If TABLE-TYPE is non-nil, also chack for table.el-type tables." (if (not (org-at-table-p)) (progn (goto-char pos) - (error "Cannot move row further."))) + (error "Cannot move row further"))) (goto-char pos) (beginning-of-line 1) (setq pos (point)) @@ -6450,7 +6450,7 @@ with `org-table-paste-rectangle'" (goto-char beg) (org-table-check-inside-data-field) (setq l01 (count-lines (point-min) (point)) - c01 (org-table-current-column)) + c01 (org-table-current-column)) (goto-char end) (org-table-check-inside-data-field) (setq l02 (count-lines (point-min) (point)) @@ -6471,7 +6471,7 @@ with `org-table-paste-rectangle'" (setq l1 (1+ l1))))) (setq org-table-clip (nreverse region)) (if cut (org-table-align)))) - + (defun org-table-paste-rectangle () "Paste a rectangular region into a table. The upper right corner ends up in the current field. All involved fields @@ -6582,7 +6582,7 @@ blank, and the content is appended to the field above." (+ (length org-table-clip) arg) arg) (length org-table-clip))) - (setq org-table-clip + (setq org-table-clip (mapcar 'list (org-wrap (mapconcat 'car org-table-clip " ") nil nlines))) (goto-char beg) @@ -6637,7 +6637,7 @@ The return value is a list of lines, without newlines at the end." (setq ll (org-do-wrap words w))) ll)) (t (error "Cannot wrap this"))))) - + (defun org-do-wrap (words width) "Create lines of maximum width WIDTH (in characters) from word list WORDS." @@ -6962,7 +6962,7 @@ table editor in arbitrary modes.") ;;;###autoload (defun orgtbl-mode (&optional arg) - "The `org-mode' table editor as a minor mode for use in other modes." + "The `org-mode' table editor as a minor mode for use in other modes." (interactive) (if (eq major-mode 'org-mode) ;; Exit without error, in case some hook functions calls this @@ -6971,7 +6971,7 @@ table editor in arbitrary modes.") (setq orgtbl-mode (if arg (> (prefix-numeric-value arg) 0) (not orgtbl-mode))) (if orgtbl-mode - (progn + (progn (set (make-local-variable (quote org-table-may-need-update)) t) (make-local-hook (quote before-change-functions)) (add-hook 'before-change-functions 'org-before-change-function @@ -6979,7 +6979,7 @@ table editor in arbitrary modes.") (set (make-local-variable 'org-old-auto-fill-inhibit-regexp) auto-fill-inhibit-regexp) (set (make-local-variable 'auto-fill-inhibit-regexp) - (if auto-fill-inhibit-regexp + (if auto-fill-inhibit-regexp (concat "\\([ \t]*|\\|" auto-fill-inhibit-regexp) "[ \t]*|")) (easy-menu-add orgtbl-mode-menu) @@ -7050,11 +7050,11 @@ table editor in arbitrary modes.") ;; Special treatment needed for TAB and RET -(define-key orgtbl-mode-map [(return)] +(define-key orgtbl-mode-map [(return)] (orgtbl-make-binding 'orgtbl-ret [(return)] "\C-m")) -(define-key orgtbl-mode-map "\C-m" +(define-key orgtbl-mode-map "\C-m" (orgtbl-make-binding 'orgtbl-ret "\C-m" [(return)])) -(define-key orgtbl-mode-map [(tab)] +(define-key orgtbl-mode-map [(tab)] (orgtbl-make-binding 'orgtbl-tab [(tab)] "\C-i")) (define-key orgtbl-mode-map "\C-i" (orgtbl-make-binding 'orgtbl-tab "\C-i" [(tab)])) @@ -7164,7 +7164,7 @@ a reduced column width." ["Fill Rectangle" org-table-wrap-region :active (org-at-table-p) :keys "C-c C-q"]) "--" ["Which Column?" org-table-current-column :active (org-at-table-p) :keys "C-c ?"] - ["Sum Column/Rectangle" org-table-sum + ["Sum Column/Rectangle" org-table-sum :active (or (org-at-table-p) (org-region-active-p)) :keys "C-c +"] ["Eval Formula" org-table-eval-formula :active (org-at-table-p) :keys "C-c ="] )) @@ -7676,7 +7676,7 @@ and all options lines." (let* ((filename (concat (file-name-sans-extension (buffer-file-name)) ".txt")) (buffer (find-file-noselect filename)) - (ore (concat + (ore (concat (org-make-options-regexp '("CATEGORY" "SEQ_TODO" "PRI_TODO" "TYP_TODO" "STARTUP" "ARCHIVE" @@ -7908,7 +7908,7 @@ headlines. The default is 3. Lower levels will become bulleted lists." ;; This is a headline (progn (setq level (- (match-end 1) (match-beginning 1)) - txt (save-match-data + txt (save-match-data (org-html-expand (match-string 3 line))) todo @@ -8191,7 +8191,7 @@ But it has the disadvantage, that Org-mode's HTML conversions cannot be used." (insert (mapconcat 'identity lines "\n")) (goto-char (point-min)) (if (not (re-search-forward "|[^+]" nil t)) - (error "Error processing table.")) + (error "Error processing table")) (table-recognize-table) (with-current-buffer (get-buffer-create " org-tmp2 ") (erase-buffer)) (table-generate-source 'html " org-tmp2 ") @@ -8566,7 +8566,7 @@ a reduced column width." (defun org-shiftcursor-error () "Throw an error because Shift-Cursor command was applied in wrong context." - (error "This command is only active in tables and on headlines.")) + (error "This command is only active in tables and on headlines")) (defun org-shifttab () "Call `(org-cycle t)' or `org-table-previous-field'." @@ -8697,7 +8697,7 @@ the automatic table editor has been turned off." (if (y-or-n-p "Convert inactive region to table? ") (org-table-convert-region (region-beginning) (region-end) arg) (error "Abort"))) - (t (error "No table at point, and no region to make one."))))) + (t (error "No table at point, and no region to make one"))))) (defun org-return () "Call `org-table-next-row' or `newline'." @@ -8822,7 +8822,7 @@ the automatic table editor has been turned off." ["Fill Rectangle" org-table-wrap-region (org-at-table-p)]) "--" ["Which Column?" org-table-current-column (org-at-table-p)] - ["Sum Column/Rectangle" org-table-sum + ["Sum Column/Rectangle" org-table-sum (or (org-at-table-p) (org-region-active-p))] ["Eval Formula" org-table-eval-formula (org-at-table-p)] "--" @@ -8865,10 +8865,10 @@ With optional NODE, go directly to that node." (Info-goto-node (format "(org)%s" (or node "")))) (defun org-install-agenda-files-menu () - (easy-menu-change + (easy-menu-change '("Org") "File List for Agenda" (append - (list + (list ["Edit File List" (customize-variable 'org-agenda-files) t] ["Add Current File to List" org-add-file t] ["Remove Current File from List" org-remove-file t] @@ -8983,7 +8983,7 @@ that can be added." ;; Functions needed for compatibility with old outline.el ;; The following functions capture almost the entire compatibility code -;; between the different versions of outline-mode. The only other place +;; between the different versions of outline-mode. The only other place ;; where this is important are the font-lock-keywords. Search for ;; `org-noutline-p' to find it. @@ -9048,7 +9048,7 @@ If INVISIBLE-OK is non-nil, an invisible heading line is ok too." This function considers both visible and invisible heading lines. With argument, move up ARG levels." (if org-noutline-p - (if (fboundp 'outline-up-heading-all) + (if (fboundp 'outline-up-heading-all) (outline-up-heading-all arg) ; emacs 21 version of outline.el (outline-up-heading arg t)) ; emacs 22 version of outline.el (org-back-to-heading t) @@ -9104,8 +9104,8 @@ When ENTRY is non-nil, show the entire entry." (defun org-show-subtree () "Show everything after this heading at deeper levels." - (outline-flag-region - (point) + (outline-flag-region + (point) (save-excursion (outline-end-of-subtree) (outline-next-heading) (point)) (if org-noutline-p nil ?\n))) @@ -9116,7 +9116,7 @@ Show the heading too, if it is currently invisible." (interactive) (save-excursion (org-back-to-heading t) - (outline-flag-region + (outline-flag-region (1- (point)) (save-excursion (re-search-forward (concat "[\r\n]\\(" outline-regexp "\\)") nil 'move) -- cgit v1.2.1 From 88c31d68c43e8273aa330d2f28535dfa0ccb63de Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 14 Jun 2005 15:35:03 +0000 Subject: (reftex-access-scan-info): Follow error conventions. --- lisp/textmodes/reftex.el | 178 +++++++++++++++++++++++------------------------ 1 file changed, 89 insertions(+), 89 deletions(-) (limited to 'lisp') diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index f8b4cba65ae..574c17a07f9 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el @@ -26,7 +26,7 @@ ;;--------------------------------------------------------------------------- ;; ;;; Commentary: -;; +;; ;; RefTeX is a minor mode with distinct support for \ref, \label, \cite, ;; and \index commands in (multi-file) LaTeX documents. ;; - A table of contents provides easy access to any part of a document. @@ -71,7 +71,7 @@ ;; ;; Introduction ;; ************ -;; +;; ;; RefTeX is a specialized package for support of labels, references, ;; citations, and the index in LaTeX. RefTeX wraps itself round 4 LaTeX ;; macros: `\label', `\ref', `\cite', and `\index'. Using these macros @@ -80,13 +80,13 @@ ;; time-consuming tasks almost entirely. It also provides functions to ;; display the structure of a document and to move around in this ;; structure quickly. -;; +;; ;; *Note Imprint::, for information about who to contact for help, bug ;; reports or suggestions. -;; +;; ;; Environment ;; =========== -;; +;; ;; RefTeX needs to access all files which are part of a multifile ;; document, and the BibTeX database files requested by the ;; `\bibliography' command. To find these files, RefTeX will require a @@ -95,26 +95,26 @@ ;; which are also used by RefTeX. However, on some systems these ;; variables do not contain the full search path. If RefTeX does not work ;; for you because it cannot find some files, read *Note Finding Files::. -;; +;; ;; Entering RefTeX Mode ;; ==================== -;; +;; ;; To turn RefTeX Mode on and off in a particular buffer, use `M-x ;; reftex-mode'. To turn on RefTeX Mode for all LaTeX files, add the ;; following lines to your `.emacs' file: -;; +;; ;; (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode ;; (add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode -;; +;; ;; RefTeX in a Nutshell ;; ==================== -;; +;; ;; 1. Table of Contents ;; Typing `C-c =' (`reftex-toc') will show a table of contents of the ;; document. This buffer can display sections, labels and index ;; entries defined in the document. From the buffer, you can jump ;; quickly to every part of your document. Press `?' to get help. -;; +;; ;; 2. Labels and References ;; RefTeX helps to create unique labels and to find the correct key ;; for references quickly. It distinguishes labels for different @@ -122,7 +122,7 @@ ;; others), and can be configured to recognize any additional labeled ;; environments you have defined yourself (variable ;; `reftex-label-alist'). -;; +;; ;; * Creating Labels ;; Type `C-c (' (`reftex-label') to insert a label at point. ;; RefTeX will either @@ -131,17 +131,17 @@ ;; tables) or ;; - insert a simple label made of a prefix and a number (all ;; other environments) -;; +;; ;; Which labels are created how is configurable with the variable ;; `reftex-insert-label-flags'. -;; +;; ;; * Referencing Labels ;; To make a reference, type `C-c )' (`reftex-reference'). This ;; shows an outline of the document with all labels of a certain ;; type (figure, equation,...) and some label context. ;; Selecting a label inserts a `\ref{LABEL}' macro into the ;; original buffer. -;; +;; ;; 3. Citations ;; Typing `C-c [' (`reftex-citation') will let you specify a regular ;; expression to search in current BibTeX database files (as @@ -150,7 +150,7 @@ ;; sorted. The selected article is referenced as `\cite{KEY}' (see ;; the variable `reftex-cite-format' if you want to insert different ;; macros). -;; +;; ;; 4. Index Support ;; RefTeX helps to enter index entries. It also compiles all entries ;; into an alphabetically sorted `*Index*' buffer which you can use @@ -158,25 +158,25 @@ ;; index macros and can be configured to recognize any additional ;; macros you have defined (`reftex-index-macros'). Multiple indices ;; are supported. -;; +;; ;; * Creating Index Entries ;; To index the current selection or the word at point, type ;; `C-c /' (`reftex-index-selection-or-word'). The default macro ;; `reftex-index-default-macro' will be used. For a more ;; complex entry type `C-c <' (`reftex-index'), select any of ;; the index macros and enter the arguments with completion. -;; +;; ;; * The Index Phrases File (Delayed Indexing) ;; Type `C-c \' (`reftex-index-phrase-selection-or-word') to add ;; the current word or selection to a special _index phrase ;; file_. RefTeX can later search the document for occurrences ;; of these phrases and let you interactively index the matches. -;; +;; ;; * Displaying and Editing the Index ;; To display the compiled index in a special buffer, type `C-c ;; >' (`reftex-display-index'). From that buffer you can check ;; and edit all entries. -;; +;; ;; 5. Viewing Cross-References ;; When point is on the KEY argument of a cross-referencing macro ;; (`\label', `\ref', `\cite', `\bibitem', `\index', and variations) @@ -186,14 +186,14 @@ ;; When the enclosing macro is `\cite' or `\ref' and no other message ;; occupies the echo area, information about the citation or label ;; will automatically be displayed in the echo area. -;; +;; ;; 6. Multifile Documents ;; Multifile Documents are fully supported. The included files must ;; have a file variable `TeX-master' or `tex-main-file' pointing to ;; the master file. RefTeX provides cross-referencing information ;; from all parts of the document, and across document borders ;; (`xr.sty'). -;; +;; ;; 7. Document Parsing ;; RefTeX needs to parse the document in order to find labels and ;; other information. It does it automatically once and updates its @@ -202,23 +202,23 @@ ;; with a raw `C-u' prefix, or press the `r' key in the label ;; selection buffer, the table of contents buffer, or the index ;; buffer. -;; +;; ;; 8. AUCTeX ;; If your major LaTeX mode is AUCTeX, RefTeX can cooperate with it ;; (see variable `reftex-plug-into-AUCTeX'). AUCTeX contains style ;; files which trigger appropriate settings in RefTeX, so that for ;; many of the popular LaTeX packages no additional customizations ;; will be necessary. -;; +;; ;; 9. Useful Settings ;; To make RefTeX faster for large documents, try these: ;; (setq reftex-enable-partial-scans t) ;; (setq reftex-save-parse-info t) ;; (setq reftex-use-multiple-selection-buffers t) -;; +;; ;; To integrate with AUCTeX, use ;; (setq reftex-plug-into-AUCTeX t) -;; +;; ;; To make your own LaTeX macro definitions known to RefTeX, ;; customize the variables ;; `reftex-label-alist' (for label macros/environments) @@ -228,7 +228,7 @@ ;; `reftex-index-default-macro' (to set the default macro) ;; If you have a large number of macros defined, you may want to write ;; an AUCTeX style file to support them with both AUCTeX and RefTeX. -;; +;; ;; 10. Where Next? ;; Go ahead and use RefTeX. Use its menus until you have picked up ;; the key bindings. For an overview of what you can do in each of @@ -237,7 +237,7 @@ ;; The first part of the manual explains in a tutorial way how to use ;; and customize RefTeX. The second part is a command and variable ;; reference. -;; +;; ;;--------------------------------------------------------------------------- ;; ;; AUTHOR @@ -319,7 +319,7 @@ (setq reftex-syntax-table (copy-syntax-table)) (modify-syntax-entry ?\( "." reftex-syntax-table) (modify-syntax-entry ?\) "." reftex-syntax-table)) - + (unless reftex-syntax-table-for-bib (setq reftex-syntax-table-for-bib (copy-syntax-table reftex-syntax-table)) @@ -395,7 +395,7 @@ on the menu bar. (setq reftex-syntax-table (copy-syntax-table (syntax-table))) (modify-syntax-entry ?\( "." reftex-syntax-table) (modify-syntax-entry ?\) "." reftex-syntax-table) - + (setq reftex-syntax-table-for-bib (copy-syntax-table reftex-syntax-table)) (modify-syntax-entry ?\' "." reftex-syntax-table-for-bib) @@ -536,7 +536,7 @@ on the menu bar. ((master (cond ((fboundp 'TeX-master-file) ; AUCTeX is loaded. Use its mechanism. - (condition-case nil + (condition-case nil (TeX-master-file t) (error (buffer-file-name)))) ((fboundp 'tex-main-file) (tex-main-file)) ; Emacs LaTeX mode @@ -737,14 +737,14 @@ the label information is recompiled on next use." ;; A list of all variables in the cache. ;; The cache is used to save the compiled versions of some variables. -(defconst reftex-cache-variables +(defconst reftex-cache-variables '(reftex-memory ;; This MUST ALWAYS be the first! - + ;; Outline reftex-section-levels-all ;; Labels - reftex-env-or-mac-alist + reftex-env-or-mac-alist reftex-special-env-parsers reftex-macros-with-labels reftex-label-mac-list @@ -761,7 +761,7 @@ the label information is recompiled on next use." reftex-index-macro-alist reftex-macros-with-index reftex-query-index-macro-prompt - reftex-query-index-macro-help + reftex-query-index-macro-help reftex-key-to-index-macro-alist ;; Regular expressions @@ -806,7 +806,7 @@ the label information is recompiled on next use." (t (reftex-compile-variables))))) (defun reftex-reset-mode () - "Reset RefTeX Mode. + "Reset RefTeX Mode. This will re-compile the configuration information and remove all current scanning information and the parse file to enforce a rescan on next use." @@ -857,12 +857,12 @@ This enforces rescanning the buffer on next use." (defun reftex-erase-all-selection-and-index-buffers () ;; Remove all selection buffers associated with current document. - (mapcar + (mapcar (lambda (type) (reftex-erase-buffer (reftex-make-selection-buffer-name type))) reftex-typekey-list) ;; Kill all index buffers - (mapcar + (mapcar (lambda (tag) (reftex-kill-buffer (reftex-make-index-buffer-name tag))) (cdr (assoc 'index-tags (symbol-value reftex-docstruct-symbol))))) @@ -878,7 +878,7 @@ This enforces rescanning the buffer on next use." ;; Record that we have done this, and what we have used. (setq reftex-tables-dirty nil) - (setq reftex-memory + (setq reftex-memory (list reftex-label-alist (get reftex-docstruct-symbol 'reftex-section-levels) (get reftex-docstruct-symbol 'reftex-label-alist-style) @@ -897,7 +897,7 @@ This enforces rescanning the buffer on next use." '(nil))) (all-index (reftex-uniquify-by-car (reftex-splice-symbols-into-list - (append reftex-index-macros + (append reftex-index-macros (get reftex-docstruct-symbol 'reftex-index-macros-style) '(default)) @@ -908,7 +908,7 @@ This enforces rescanning the buffer on next use." macro verify repeat nindex tag key toc-level toc-levels) (setq reftex-words-to-typekey-alist nil - reftex-prefix-to-typekey-alist + reftex-prefix-to-typekey-alist '(("sec:" . "s") ("cha:" . "s") ("chap:" . "s")) reftex-typekey-list nil reftex-typekey-to-format-alist nil @@ -964,7 +964,7 @@ This enforces rescanning the buffer on next use." ((symbolp env-or-mac) ;; A special parser function (unless (fboundp env-or-mac) - (message "Warning: %s does not seem to be a valid function" + (message "Warning: %s does not seem to be a valid function" env-or-mac)) (setq nargs nil nlabel nil opt-args nil) (add-to-list 'reftex-special-env-parsers env-or-mac) @@ -992,8 +992,8 @@ This enforces rescanning the buffer on next use." (push (cons string toc-level) toc-levels)))))))) ;; Translate some special context cases (when (assq context reftex-default-context-regexps) - (setq context - (format + (setq context + (format (cdr (assq context reftex-default-context-regexps)) (regexp-quote env-or-mac)))) ;; See if this is the first format for this typekey @@ -1026,7 +1026,7 @@ This enforces rescanning the buffer on next use." (nreverse reftex-typekey-to-prefix-alist)) ;; Prepare the typekey query prompt and help string. - (setq qh-list + (setq qh-list (sort qh-list (lambda (x1 x2) (string< (downcase (car x1)) (downcase (car x2)))))) @@ -1037,7 +1037,7 @@ This enforces rescanning the buffer on next use." "]")) ;; In the help string, we need to wrap lines... (setq reftex-type-query-help - (concat + (concat "SELECT A LABEL TYPE:\n--------------------\n" (mapconcat (lambda(x) @@ -1057,7 +1057,7 @@ This enforces rescanning the buffer on next use." ;; which allow for some chars from the ref format to be in the buffer. ;; These characters will be seen and removed. (setq reftex-words-to-typekey-alist - (mapcar + (mapcar (lambda (x) (setq word (car x) typekey (cdr x) @@ -1110,18 +1110,18 @@ This enforces rescanning the buffer on next use." (setq reftex-key-to-index-macro-alist (sort reftex-key-to-index-macro-alist (lambda (a b) (< (downcase (car a)) (downcase (car b)))))) - (setq reftex-query-index-macro-prompt + (setq reftex-query-index-macro-prompt (concat "Index macro: [" (mapconcat (lambda (x) (char-to-string (car x))) reftex-key-to-index-macro-alist "") "]")) (setq i 0 reftex-query-index-macro-help - (concat + (concat "SELECT A MACRO:\n---------------\n" (mapconcat (lambda(x) - (format "[%c] %-20.20s%s" (car x) (nth 1 x) + (format "[%c] %-20.20s%s" (car x) (nth 1 x) (if (= 0 (mod (incf i) 3)) "\n" ""))) reftex-key-to-index-macro-alist ""))) @@ -1135,11 +1135,11 @@ This enforces rescanning the buffer on next use." (let* ( ; (wbol "\\(\\`\\|[\n\r]\\)[ \t]*") (wbol "\\(^\\)[ \t]*") ; Need to keep the empty group because - ;;; because match number are hard coded + ;;; because match number are hard coded (label-re "\\\\label{\\([^}]*\\)}") - (include-re (concat wbol + (include-re (concat wbol "\\\\\\(" - (mapconcat 'identity + (mapconcat 'identity reftex-include-file-commands "\\|") "\\)[{ \t]+\\([^} \t\n\r]+\\)")) (section-re @@ -1193,7 +1193,7 @@ This enforces rescanning the buffer on next use." reftex-macros-with-labels macros-with-labels reftex-find-index-entry-regexp-format find-index-re-format reftex-find-label-regexp-format find-label-re-format - reftex-find-label-regexp-format2 + reftex-find-label-regexp-format2 "\\([]} \t\n\r]\\)\\([[{]\\)\\(%s\\)[]}]") (message "Compiling label environment definitions...done"))) (put reftex-docstruct-symbol 'reftex-cache @@ -1232,7 +1232,7 @@ This enforces rescanning the buffer on next use." ;; Error out in a buffer without a file. (if (and reftex-mode (not (buffer-file-name))) - (error "RefTeX works only in buffers visiting a file.")) + (error "RefTeX works only in buffers visiting a file")) ;; Make sure we have the symbols tied (if (eq reftex-docstruct-symbol nil) @@ -1270,7 +1270,7 @@ This enforces rescanning the buffer on next use." (and (symbolp reftex-docstruct-symbol) (symbol-value reftex-docstruct-symbol) t)) - + (defun reftex-silence-toc-markers (list n) ;; Set all toc markers in the first N entries in list to nil (while (and list (> (decf n) -1)) @@ -1287,7 +1287,7 @@ Valid actions are: readable, restore, read, kill, write." (master (reftex-TeX-master-file)) (enable-local-variables nil) (file (if (string-match "\\.[a-zA-Z]+\\'" master) - (concat (substring master 0 (match-beginning 0)) + (concat (substring master 0 (match-beginning 0)) reftex-parse-file-extension) (concat master reftex-parse-file-extension)))) (cond @@ -1366,7 +1366,7 @@ Valid actions are: readable, restore, read, kill, write." ;; Check if the master is the same: when moving a document, this will see it. (let* ((real-master (reftex-TeX-master-file)) - (parsed-master + (parsed-master (nth 1 (assq 'bof (symbol-value reftex-docstruct-symbol))))) (unless (string= (file-truename real-master) (file-truename parsed-master)) (message "Master file name in load file is different: %s versus %s" @@ -1386,7 +1386,7 @@ Valid actions are: readable, restore, read, kill, write." (defun reftex-select-external-document (xr-alist xr-index) ;; Return index of an external document. (let* ((len (length xr-alist)) (highest (1- (+ ?0 len))) - (prompt (format "[%c-%c] Select TAB: Read prefix with completion" + (prompt (format "[%c-%c] Select TAB: Read prefix with completion" ?0 highest)) key prefix) (cond @@ -1397,7 +1397,7 @@ Valid actions are: readable, restore, read, kill, write." (- 1 xr-index)) (t (save-excursion - (let* ((length (apply 'max (mapcar + (let* ((length (apply 'max (mapcar (lambda(x) (length (car x))) xr-alist))) (fmt (format " [%%c] %%-%ds %%s\n" length)) (n (1- ?0))) @@ -1407,7 +1407,7 @@ Valid actions are: readable, restore, read, kill, write." (concat "SELECT EXTERNAL DOCUMENT\n------------------------\n" (mapconcat - (lambda (x) + (lambda (x) (format fmt (incf n) (or (car x) "") (abbreviate-file-name (cdr x)))) xr-alist "")) @@ -1431,7 +1431,7 @@ When DIE is non-nil, throw an error if file not found." (let* ((rec-values (if reftex-search-unrecursed-path-first '(nil t) '(t))) (extensions (cdr (assoc type reftex-file-extensions))) (def-ext (car extensions)) - (ext-re (concat "\\(" + (ext-re (concat "\\(" (mapconcat 'regexp-quote extensions "\\|") "\\)\\'")) (files (if (string-match ext-re file) @@ -1440,8 +1440,8 @@ When DIE is non-nil, throw an error if file not found." path old-path file1) (cond ((file-name-absolute-p file) - (setq file1 - (or + (setq file1 + (or (and (car files) (file-regular-p (car files)) (car files)) (and (cdr files) (file-regular-p (cdr files)) (cdr files))))) ((and reftex-use-external-file-finders @@ -1456,10 +1456,10 @@ When DIE is non-nil, throw an error if file not found." (setq old-path path path (cons master-dir path) file1 (or (and (car files) - (reftex-find-file-on-path + (reftex-find-file-on-path (car files) path master-dir)) (and (cdr files) - (reftex-find-file-on-path + (reftex-find-file-on-path (cdr files) path master-dir)))))))) (cond (file1 file1) (die (error "No such file: %s" file) nil) @@ -1504,7 +1504,7 @@ When DIE is non-nil, throw an error if file not found." (reftex-uniquify (reftex-parse-colon-path (mapconcat - (lambda(x) + (lambda(x) (if (string-match "^!" x) (apply 'reftex-process-string (split-string (substring x 1))) @@ -1513,7 +1513,7 @@ When DIE is non-nil, throw an error if file not found." ;; (cdr (assoc type reftex-path-environment)) ;; However, historically we have separate options for the ;; environment variables, so we have to do this: - (symbol-value (intern (concat "reftex-" type + (symbol-value (intern (concat "reftex-" type "path-environment-variables"))) path-separator)))) (put pathvar 'status 'split) @@ -1539,11 +1539,11 @@ When DIE is non-nil, throw an error if file not found." ;; or: Relative recursive path elements need to be expanded ;; relative to new default directory (message "Expanding search path to find %s file: %s ..." type file) - (put pathvar 'recursive-path + (put pathvar 'recursive-path (reftex-expand-path (symbol-value pathvar) master-dir)) (put pathvar 'master-dir master-dir) (get pathvar 'recursive-path)) - (t + (t ;; Recursive path computed earlier is still OK. (get pathvar 'recursive-path))) ;; The simple path was requested @@ -1572,7 +1572,7 @@ When DIE is non-nil, throw an error if file not found." ;; Trailing ! or !! will be converted into `//' (emTeX convention) (mapcar (lambda (dir) - (if (string-match "\\(//+\\|/*!+\\)\\'" dir) + (if (string-match "\\(//+\\|/*!+\\)\\'" dir) (setq dir (replace-match "//" t t dir))) (file-name-as-directory dir)) (delete "" (split-string path (concat path-separator "+"))))) @@ -1601,7 +1601,7 @@ When DIE is non-nil, throw an error if file not found." (when (file-directory-p dir) (setq files (nreverse (directory-files dir t "[^.]"))) (while (setq file (pop files)) - (if (file-directory-p file) + (if (file-directory-p file) (push (file-name-as-directory file) path))) (push dir path1))) path1)) @@ -1664,7 +1664,7 @@ When DIE is non-nil, throw an error if file not found." "Show the table of contents for the current document." t) (autoload 'reftex-toc-recenter "reftex-toc" "Display the TOC window and highlight line corresponding to current position." t) -(autoload 'reftex-toggle-auto-toc-recenter "reftex-toc" +(autoload 'reftex-toggle-auto-toc-recenter "reftex-toc" "Toggle automatic recentering of TOC window." t) ;;; ========================================================================= @@ -1883,7 +1883,7 @@ Works on both Emacs and XEmacs." (while list (if (funcall predicate (car list)) (push (if completion - (list (nth nth (car list))) + (list (nth nth (car list))) (nth nth (car list))) rtn)) (setq list (cdr list))) @@ -1919,7 +1919,7 @@ Works on both Emacs and XEmacs." ;; If POS is given, calculate distances relative to it. ;; Return nil if there is no match. (let ((pos (point)) - (dist (or max-length (length regexp))) + (dist (or max-length (length regexp))) match1 match2 match) (goto-char (min (+ pos dist) (point-max))) (when (re-search-backward regexp nil t) @@ -2005,10 +2005,10 @@ Works on both Emacs and XEmacs." ((and scroll (equal char ?\C-? )) (condition-case nil (scroll-down) (error nil)) (message prompt)) - (t (message "") + (t (message "") (throw 'exit char))) (setq char (read-char-exclusive))))))) - + (defun reftex-make-regexp-allow-for-ctrl-m (string) ;; convert STRING into a regexp, allowing ^M for \n and vice versa @@ -2206,10 +2206,10 @@ IGNORE-WORDS List of words which should be removed from the string." ;; Restrict number of words (if (> (length words) nwords) (setcdr (nthcdr (1- nwords) words) nil)) - + ;; First, try to use all words (setq string (mapconcat 'identity words sep)) - + ;; Abbreviate words if enforced by user settings or string length (if (or (eq t abbrev) (and abbrev @@ -2301,7 +2301,7 @@ IGNORE-WORDS List of words which should be removed from the string." (font-lock-set-defaults-1) (reftex-select-font-lock-fontify-region (point-min) (point-max)))) (t - ;; Oops? + ;; Oops? (message "Sorry: cannot refontify RefTeX Select buffer.")))) (rename-buffer oldname)))) @@ -2350,7 +2350,7 @@ IGNORE-WORDS List of words which should be removed from the string." ;; Initialize the overlays (aset reftex-highlight-overlays 0 (reftex-make-overlay 1 1)) -(reftex-overlay-put (aref reftex-highlight-overlays 0) +(reftex-overlay-put (aref reftex-highlight-overlays 0) 'face 'highlight) (aset reftex-highlight-overlays 1 (reftex-make-overlay 1 1)) (reftex-overlay-put (aref reftex-highlight-overlays 1) @@ -2375,7 +2375,7 @@ IGNORE-WORDS List of words which should be removed from the string." ;;; ========================================================================= ;;; -;;; Keybindings +;;; Keybindings ;; The default bindings in the mode map. (loop for x in @@ -2395,10 +2395,10 @@ IGNORE-WORDS List of words which should be removed from the string." ;; Bind `reftex-mouse-view-crossref' only when the key is still free (if (featurep 'xemacs) (unless (key-binding [(shift button2)]) - (define-key reftex-mode-map [(shift button2)] + (define-key reftex-mode-map [(shift button2)] 'reftex-mouse-view-crossref)) (unless (key-binding [(shift mouse-2)]) - (define-key reftex-mode-map [(shift mouse-2)] + (define-key reftex-mode-map [(shift mouse-2)] 'reftex-mouse-view-crossref))) ;; Bind `reftex-view-crossref-from-bibtex' in BibTeX mode map @@ -2502,7 +2502,7 @@ IGNORE-WORDS List of words which should be removed from the string." ("Reference Style" ["Default" (setq reftex-vref-is-default nil reftex-fref-is-default nil) - :style radio :selected (not (or reftex-vref-is-default + :style radio :selected (not (or reftex-vref-is-default reftex-fref-is-default))] ["Varioref" (setq reftex-vref-is-default t reftex-fref-is-default nil) @@ -2537,7 +2537,7 @@ IGNORE-WORDS List of words which should be removed from the string." (list 'reftex-add-index-macros (list 'list (list 'quote (car x)))) :style 'radio :selected (list 'memq (list 'quote (car x)) - (list 'get 'reftex-docstruct-symbol + (list 'get 'reftex-docstruct-symbol (list 'quote 'reftex-index-macros-style))))) reftex-index-macros-builtin)) "--" @@ -2546,7 +2546,7 @@ IGNORE-WORDS List of words which should be removed from the string." ("Customize" ["Browse RefTeX Group" reftex-customize t] "--" - ["Build Full Customize Menu" reftex-create-customize-menu + ["Build Full Customize Menu" reftex-create-customize-menu (fboundp 'customize-menu-create)]) ("Documentation" ["Info" reftex-info t] @@ -2562,7 +2562,7 @@ IGNORE-WORDS List of words which should be removed from the string." (interactive) (if (fboundp 'customize-menu-create) (progn - (easy-menu-change + (easy-menu-change '("Ref") "Customize" `(["Browse RefTeX group" reftex-customize t] "--" @@ -2600,7 +2600,7 @@ With optional NODE, go directly to that node." ;;; That's it! ---------------------------------------------------------------- (setq reftex-tables-dirty t) ; in case this file is evaluated by hand -(provide 'reftex) +(provide 'reftex) ;;;============================================================================ -- cgit v1.2.1 From 52ebd91d1bbeedf4cfdd572c0b8a447c07c33cf7 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 14 Jun 2005 15:36:08 +0000 Subject: (reftex-toc-dframe-p, reftex-toc-promote-prepare): Follow error conventions. --- lisp/textmodes/reftex-toc.el | 50 ++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'lisp') diff --git a/lisp/textmodes/reftex-toc.el b/lisp/textmodes/reftex-toc.el index b5edba97f4b..e2c58882d2a 100644 --- a/lisp/textmodes/reftex-toc.el +++ b/lisp/textmodes/reftex-toc.el @@ -149,7 +149,7 @@ When called with a raw C-u prefix, rescan the document first." (frame-parameter (selected-frame) 'unsplittable))) offset toc-window) - (if (setq toc-window (get-buffer-window + (if (setq toc-window (get-buffer-window "*toc*" (if reuse 'visible))) (select-window toc-window) @@ -165,7 +165,7 @@ When called with a raw C-u prefix, rescan the document first." (split-window-horizontally (floor (* (window-width) reftex-toc-split-windows-fraction))) - (split-window-vertically + (split-window-vertically (floor (* (window-height) reftex-toc-split-windows-fraction))))) @@ -210,11 +210,11 @@ SPC=view TAB=goto RET=goto+hide [q]uit [r]escan [l]abels [f]ollow [x]r [?]Help reftex-toc-include-context nil ; counter nil ; commented - here-I-am + here-I-am "" ; xr-prefix t ; a toc buffer )) - + (run-hooks 'reftex-display-copied-context-hook) (message "Building *toc* buffer...done.") (setq buffer-read-only t)) @@ -226,7 +226,7 @@ SPC=view TAB=goto RET=goto+hide [q]uit [r]escan [l]abels [f]ollow [x]r [?]Help t reftex-toc-include-index-entries reftex-toc-include-file-boundaries) - (reftex-last-assoc-before-elt + (reftex-last-assoc-before-elt 'toc here-I-am (symbol-value reftex-docstruct-symbol)))) (put 'reftex-toc :reftex-line 3) @@ -251,7 +251,7 @@ SPC=view TAB=goto RET=goto+hide [q]uit [r]escan [l]abels [f]ollow [x]r [?]Help (not (get-text-property (point) 'intangible)) (memq reftex-highlight-selection '(cursor both)) (reftex-highlight 2 - (or (previous-single-property-change + (or (previous-single-property-change (min (point-max) (1+ (point))) :data) (point-min)) (or (next-single-property-change (point) :data) @@ -298,16 +298,16 @@ SPC=view TAB=goto RET=goto+hide [q]uit [r]escan [l]abels [f]ollow [x]r [?]Help (window-height)))))) (defun reftex-toc-dframe-p (&optional frame error) - ;; Check if FRAME is the dedicated TOC frame. + ;; Check if FRAME is the dedicated TOC frame. ;; If yes, and ERROR is non-nil, throw an error. (setq frame (or frame (selected-frame))) - (let ((res (equal + (let ((res (equal (if (fboundp 'frame-property) (frame-property frame 'name) (frame-parameter frame 'name)) "RefTeX TOC Frame"))) (if (and res error) - (error "This frame is view-only. Use `C-c =' to create toc window for commands.")) + (error "This frame is view-only. Use `C-c =' to create toc window for commands")) res)) (defun reftex-toc-show-help () @@ -327,7 +327,7 @@ SPC=view TAB=goto RET=goto+hide [q]uit [r]escan [l]abels [f]ollow [x]r [?]Help (if (boundp 'zmacs-region-stays) (setq zmacs-region-stays t)) (setq reftex-callback-fwd t) (or (eobp) (forward-char 1)) - (goto-char (or (next-single-property-change (point) :data) + (goto-char (or (next-single-property-change (point) :data) (point)))) (defun reftex-toc-previous (&optional arg) "Move to previous selectable item." @@ -364,7 +364,7 @@ SPC=view TAB=goto RET=goto+hide [q]uit [r]escan [l]abels [f]ollow [x]r [?]Help With prefix ARG, prompt for a label type and include only labels of that specific type." (interactive "P") - (setq reftex-toc-include-labels + (setq reftex-toc-include-labels (if arg (reftex-query-label-type) (not reftex-toc-include-labels))) (reftex-toc-revert)) @@ -468,7 +468,7 @@ With prefix arg 1, restrict index to the section at point." (defun reftex-toc-rescan (&rest ignore) "Regenerate the *toc* buffer by reparsing file of section at point." (interactive) - (if (and reftex-enable-partial-scans + (if (and reftex-enable-partial-scans (null current-prefix-arg)) (let* ((data (get-text-property (point) :data)) (what (car data)) @@ -502,7 +502,7 @@ With prefix arg 1, restrict index to the section at point." (defun reftex-toc-revert (&rest ignore) "Regenerate the *toc* from the internal lists." (interactive) - (let ((unsplittable + (let ((unsplittable (if (fboundp 'frame-property) (frame-property (selected-frame) 'unsplittable) (frame-parameter (selected-frame) 'unsplittable))) @@ -589,7 +589,7 @@ point." (goto-char start-pos) (setq sections (reftex-toc-extract-section-number (car entries))) (if (> (setq nsec (length entries)) 1) - (setq sections + (setq sections (concat sections "-" (reftex-toc-extract-section-number (nth (1- nsec) entries))))) @@ -614,7 +614,7 @@ point." (save-window-excursion (reftex-toc-Rescan)) (reftex-toc-restore-region start-line mark-line) - (message "%d section%s %smoted" + (message "%d section%s %smoted" nsec (if (= 1 nsec) "" "s") pro-or-de) nil)) (if msg (progn (ding) (message msg))))) @@ -667,7 +667,7 @@ promotion/demotion later." (beginning-of-line 1) (if (looking-at reftex-section-regexp) (setq name (reftex-match-string 2)) - (error "Something is wrong! Contact maintainer!"))) + (error "Something is wrong! Contact maintainer!"))) ;; Section has changed, request scan and loading ;; We use a variable to delay until after the safe-exc. ;; because otherwise we loose the region. @@ -776,7 +776,7 @@ label prefix determines the wording of a reference." (error "This is not a label entry.")) (setq newlabel (read-string (format "Rename label \"%s\" to:" label))) (if (assoc newlabel (symbol-value reftex-docstruct-symbol)) - (if (not (y-or-n-p + (if (not (y-or-n-p (format "Label '%s' exists. Use anyway? " label))) (error "Abort"))) (save-excursion @@ -786,7 +786,7 @@ label prefix determines the wording of a reference." (reftex-query-replace-document (concat "{" (regexp-quote label) "}") (format "{%s}" newlabel)) - (error t)))) + (error t)))) (reftex-toc-rescan))) @@ -805,9 +805,9 @@ label prefix determines the wording of a reference." show-window show-buffer match) (unless toc (error "Don't know which toc line to visit")) - + (cond - + ((eq (car toc) 'toc) ;; a toc entry (setq match (reftex-toc-find-section toc no-revisit))) @@ -823,7 +823,7 @@ label prefix determines the wording of a reference." (file (nth 1 toc))) (if (or (not no-revisit) (reftex-get-buffer-visiting file)) (progn - (switch-to-buffer-other-window + (switch-to-buffer-other-window (reftex-get-file-buffer-force file nil)) (goto-char (if (eq where 'bof) (point-min) (point-max)))) (message reftex-no-follow-message) nil)))) @@ -876,8 +876,8 @@ label prefix determines the wording of a reference." (looking-at (reftex-make-desperate-section-regexp literal)) (looking-at (concat "\\\\" (regexp-quote - (car - (rassq level + (car + (rassq level reftex-section-levels-all))) "[[{]?")))) ((or (not no-revisit) @@ -1047,7 +1047,7 @@ always show the current section in connection with the option (define-key reftex-toc-map (vector (list key)) 'digit-argument)) (define-key reftex-toc-map "-" 'negative-argument) -(easy-menu-define +(easy-menu-define reftex-toc-menu reftex-toc-map "Menu for Table of Contents buffer" '("TOC" @@ -1080,7 +1080,7 @@ always show the current section in connection with the option ["Context" reftex-toc-toggle-context :style toggle :selected reftex-toc-include-context] "--" - ["Follow Mode" reftex-toc-toggle-follow :style toggle + ["Follow Mode" reftex-toc-toggle-follow :style toggle :selected reftex-toc-follow-mode] ["Auto Recenter" reftex-toggle-auto-toc-recenter :style toggle :selected reftex-toc-auto-recenter-timer] -- cgit v1.2.1 From 8ab2275f108d8c1988f504813e294d37b64c2715 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 14 Jun 2005 15:37:18 +0000 Subject: (mh-secure-message): Follow error conventions. --- lisp/mh-e/mh-mime.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el index dcd8f67a0f3..9bc8f7d74a9 100644 --- a/lisp/mh-e/mh-mime.el +++ b/lisp/mh-e/mh-mime.el @@ -597,7 +597,7 @@ IDENTITY is optionally the default-user-id to use." (let ((valid-methods (list "pgpmime" "pgp" "smime")) (valid-modes (list "sign" "encrypt" "signencrypt" "none"))) (if (not (member method valid-methods)) - (error (format "Sorry. METHOD \"%s\" is invalid." method))) + (error (format "Sorry. METHOD \"%s\" is invalid" method))) (if (not (member mode valid-modes)) (error (format "Sorry. MODE \"%s\" is invalid" mode))) (mml-unsecure-message) -- cgit v1.2.1 From fbb70c539bbc905a9bad90ad2c6540f8008f3138 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 14 Jun 2005 15:50:22 +0000 Subject: (make-obsolete, define-obsolete-function-alias): Rename arguments FUNCTION and NEW to OBSOLETE-NAME and CURRENT-NAME respectively. (make-obsolete-variable, define-obsolete-variable-alias): Rename arguments VARIABLE and NEW to OBSOLETE-NAME and CURRENT-NAME respectively. --- lisp/emacs-lisp/byte-run.el | 46 ++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'lisp') diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el index 7fc01901cfe..d3def79c8fb 100644 --- a/lisp/emacs-lisp/byte-run.el +++ b/lisp/emacs-lisp/byte-run.el @@ -100,23 +100,23 @@ The return value of this function is not used." (eval-and-compile (put ',name 'byte-optimizer 'byte-compile-inline-expand)))) -(defun make-obsolete (function new &optional when) - "Make the byte-compiler warn that FUNCTION is obsolete. -The warning will say that NEW should be used instead. -If NEW is a string, that is the `use instead' message. +(defun make-obsolete (obsolete-name current-name &optional when) + "Make the byte-compiler warn that OBSOLETE-NAME is obsolete. +The warning will say that CURRENT-NAME should be used instead. +If CURRENT-NAME is a string, that is the `use instead' message. If provided, WHEN should be a string indicating when the function was first made obsolete, for example a date or a release number." (interactive "aMake function obsolete: \nxObsoletion replacement: ") - (let ((handler (get function 'byte-compile))) + (let ((handler (get obsolete-name 'byte-compile))) (if (eq 'byte-compile-obsolete handler) - (setq handler (nth 1 (get function 'byte-obsolete-info))) - (put function 'byte-compile 'byte-compile-obsolete)) - (put function 'byte-obsolete-info (list new handler when))) - function) + (setq handler (nth 1 (get obsolete-name 'byte-obsolete-info))) + (put obsolete-name 'byte-compile 'byte-compile-obsolete)) + (put obsolete-name 'byte-obsolete-info (list current-name handler when))) + obsolete-name) -(defmacro define-obsolete-function-alias (function new +(defmacro define-obsolete-function-alias (obsolete-name current-name &optional when docstring) - "Set FUNCTION's function definition to NEW and mark it obsolete. + "Set OBSOLETE-NAME's function definition to CURRENT-NAME and mark it obsolete. \(define-obsolete-function-alias 'old-fun 'new-fun \"22.1\" \"old-fun's doc.\") @@ -127,13 +127,13 @@ is equivalent to the following two lines of code: See the docstrings of `defalias' and `make-obsolete' for more details." `(progn - (defalias ,function ,new ,docstring) - (make-obsolete ,function ,new ,when))) + (defalias ,obsolete-name ,current-name ,docstring) + (make-obsolete ,obsolete-name ,current-name ,when))) -(defun make-obsolete-variable (variable new &optional when) - "Make the byte-compiler warn that VARIABLE is obsolete. -The warning will say that NEW should be used instead. -If NEW is a string, that is the `use instead' message. +(defun make-obsolete-variable (obsolete-name current-name &optional when) + "Make the byte-compiler warn that OBSOLETE-NAME is obsolete. +The warning will say that CURRENT-NAME should be used instead. +If CURRENT-NAME is a string, that is the `use instead' message. If provided, WHEN should be a string indicating when the variable was first made obsolete, for example a date or a release number." (interactive @@ -142,12 +142,12 @@ was first made obsolete, for example a date or a release number." (if (equal str "") (error "")) (intern str)) (car (read-from-string (read-string "Obsoletion replacement: "))))) - (put variable 'byte-obsolete-variable (cons new when)) - variable) + (put obsolete-name 'byte-obsolete-variable (cons current-name when)) + obsolete-name) -(defmacro define-obsolete-variable-alias (variable new +(defmacro define-obsolete-variable-alias (obsolete-name current-name &optional when docstring) - "Make VARIABLE a variable alias for NEW and mark it obsolete. + "Make OBSOLETE-NAME a variable alias for CURRENT-NAME and mark it obsolete. \(define-obsolete-variable-alias 'old-var 'new-var \"22.1\" \"old-var's doc.\") @@ -159,8 +159,8 @@ is equivalent to the following two lines of code: See the docstrings of `defvaralias' and `make-obsolete-variable' or Info node `(elisp)Variable Aliases' for more details." `(progn - (defvaralias ,variable ,new ,docstring) - (make-obsolete-variable ,variable ,new ,when))) + (defvaralias ,obsolete-name ,current-name ,docstring) + (make-obsolete-variable ,obsolete-name ,current-name ,when))) (defmacro dont-compile (&rest body) "Like `progn', but the body always runs interpreted (not compiled). -- cgit v1.2.1 From 561ec2254c1a0c6eacf7d84a635dfaeed61d316b Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 14 Jun 2005 15:51:11 +0000 Subject: (iswitchb-to-end): Replace mapcar with dolist. (iswitchb-get-matched-buffers): Likewise. Simplify. --- lisp/iswitchb.el | 49 +++++++++++++++++-------------------------------- 1 file changed, 17 insertions(+), 32 deletions(-) (limited to 'lisp') diff --git a/lisp/iswitchb.el b/lisp/iswitchb.el index 0cb12d391ff..d705faf9708 100644 --- a/lisp/iswitchb.el +++ b/lisp/iswitchb.el @@ -1,6 +1,7 @@ ;;; iswitchb.el --- switch between buffers using substrings -;; Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 Free Software Foundation, Inc. +;; Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +;; Free Software Foundation, Inc. ;; Author: Stephen Eglen ;; Maintainer: Stephen Eglen @@ -871,10 +872,8 @@ it is put to the start of the list." (defun iswitchb-to-end (lst) "Move the elements from LST to the end of `iswitchb-temp-buflist'." - (mapcar - (lambda (elem) - (setq iswitchb-temp-buflist (delq elem iswitchb-temp-buflist))) - lst) + (dolist (elem lst) + (setq iswitchb-temp-buflist (delq elem iswitchb-temp-buflist))) (setq iswitchb-temp-buflist (nconc iswitchb-temp-buflist lst))) (defun iswitchb-get-buffers-in-frames (&optional current) @@ -915,33 +914,19 @@ current frame, rather than all frames, regardless of value of "Return buffers matching REGEXP. If STRING-FORMAT is nil, consider REGEXP as just a string. BUFFER-LIST can be list of buffers or list of strings." - (let* ((case-fold-search (iswitchb-case)) - ;; need reverse since we are building up list backwards - (list (reverse buffer-list)) - (do-string (stringp (car list))) - name - ret) + (let* ((case-fold-search (iswitchb-case)) + name ret) + (if (null string-format) (setq regexp (regexp-quote regexp))) (setq iswitchb-invalid-regexp nil) - (catch 'invalid-regexp - (mapcar - (lambda (x) - - (if do-string - (setq name x) ;We already have the name - (setq name (buffer-name x))) - - (cond - ((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))))) - list)) - ret)) + (condition-case error + (dolist (x buffer-list (nreverse ret)) + (setq name (if (stringp x) x (buffer-name x))) + (when (and (string-match regexp name) + (not (iswitchb-ignore-buffername-p name))) + (push name ret))) + (invalid-regexp + (setq iswitchb-invalid-regexp t) + (cdr error))))) (defun iswitchb-ignore-buffername-p (bufname) "Return t if the buffer BUFNAME should be ignored." @@ -1476,5 +1461,5 @@ This mode enables switching between buffers using substrings. See (provide 'iswitchb) -;;; arch-tag: d74198ae-753f-44f2-b34f-0c515398d90a +;; arch-tag: d74198ae-753f-44f2-b34f-0c515398d90a ;;; iswitchb.el ends here -- cgit v1.2.1 From 0b46b379eafa54de9e42c2f2ac4d52d234e699e4 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 14 Jun 2005 15:52:56 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 31 ++++++++++++++++++++++++++++++- lisp/gnus/ChangeLog | 8 ++++++-- lisp/mh-e/ChangeLog | 4 ++++ lisp/url/ChangeLog | 5 +++++ 4 files changed, 45 insertions(+), 3 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4844aa1d1c5..75d5e6fd875 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -21,6 +21,35 @@ 2005-06-14 Juanma Barranquero + * emacs-lisp/byte-run.el (make-obsolete) + (define-obsolete-function-alias): Rename arguments FUNCTION and + NEW to OBSOLETE-NAME and CURRENT-NAME respectively. + (make-obsolete-variable, define-obsolete-variable-alias): Rename + arguments VARIABLE and NEW to OBSOLETE-NAME and CURRENT-NAME + respectively. + + * isearchb.el (isearchb-activate): + * pcvs.el (cvs-mode): + * ses.el (ses-load): + * vc-arch.el (vc-arch-checkin, vc-arch-diff): + * net/tramp.el (tramp-find-file-exists-command) + (tramp-find-shell): + * progmodes/ada-mode.el (ada-create-case-exception) + (ada-create-case-exception-substring, ada-make-subprogram-body): + * progmodes/idlw-shell.el (idlwave-shell-move-to-bp): + * progmodes/idlwave.el (idlwave-complete-class-structure-tag-help): + * progmodes/vhdl-mode.el (vhdl-speedbar-place-component): + * textmodes/org.el (org-promote, org-evaluate-time-range) + (org-agenda-next-date-line, org-agenda-previous-date-line) + (org-agenda-error, org-open-at-point, org-table-move-row) + (org-format-table-table-html-using-table-generate-source) + (org-shiftcursor-error, org-ctrl-c-ctrl-c): + * textmodes/reftex.el (reftex-access-scan-info): + * textmodes/reftex-toc.el (reftex-toc-dframe-p) + (reftex-toc-promote-prepare): Follow error conventions. + + * diff-mode.el (diff-mode): Fix typo in docstring. + * forms.el (forms--intuit-from-file): Fix reference to `forms-number-of-fields' in error message. (forms-print): Fix quoting in error message. @@ -90,7 +119,7 @@ 2005-06-13 Carsten Dominik - * textmodes/org.el: (org-CUA-compatible): New option. + * textmodes/org.el (org-CUA-compatible): New option. (org-disputed-keys): New variable. (org-key): New function. (orgtbl-make-binding): Add docstring to the created function. diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 161e966922b..e210b4def7c 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,8 +1,12 @@ 2005-06-14 Juanma Barranquero - * message.el (message-is-yours-p): Fix quoting in docstring. + * gnus-sieve.el (gnus-sieve-article-add-rule): + * legacy-gnus-agent.el (gnus-agent-unlist-expire-days): + * spam-stat.el (spam-stat-buffer-change-to-spam) + (spam-stat-buffer-change-to-non-spam): Follow error conventions. - * gnus-sum.el (gnus-auto-select-subject): Likewise. + * message.el (message-is-yours-p): + * gnus-sum.el (gnus-auto-select-subject): Fix quoting in docstring. 2005-06-14 Katsumi Yamaoka diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index 23e7c6d44cb..f37202a159d 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog @@ -1,3 +1,7 @@ +2005-06-14 Juanma Barranquero + + * mh-mime.el (mh-secure-message): Follow error conventions. + 2005-05-28 Bill Wohler Released MH-E version 7.84. diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index dc129c0c1fd..5718346b89b 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,8 @@ +2005-06-14 Juanma Barranquero + + * url-history.el (url-completion-function): Follow error + conventions. + 2005-06-13 Stefan Monnier * url-file.el (url-file, url-file-asynch-callback): with-current-buffer. -- cgit v1.2.1 From 197a7aaa5076e5fb00d7d0fc93c98ab5255c0c6e Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Tue, 14 Jun 2005 20:34:19 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 75d5e6fd875..49bc213995d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2005-06-14 Luc Teirlinck + + * emacs-lisp/edebug.el (edebug-all-defs, edebug-initial-mode) + (edebug-print-length, edebug-print-level, edebug-print-circle) + (edebug-modify-breakpoint, edebug-eval-last-sexp) + (edebug-eval-print-last-sexp): Doc fixes. + 2005-06-14 Kim F. Storm * ido.el (ido-mode): Make a new keymap every time we enable ido, -- cgit v1.2.1 From b6386e635430f1d49a521bbb494e5ad42b5a1c14 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Tue, 14 Jun 2005 20:39:04 +0000 Subject: (edebug-all-defs, edebug-initial-mode, edebug-print-length) (edebug-print-level, edebug-print-circle, edebug-modify-breakpoint) (edebug-eval-last-sexp, edebug-eval-print-last-sexp): Doc fixes. --- lisp/emacs-lisp/edebug.el | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'lisp') diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 89cfd66e339..54325c87b6d 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -80,7 +80,7 @@ using but only when you also use Edebug." ;;;###autoload (defcustom edebug-all-defs nil - "*If non-nil, evaluation of any defining forms will instrument for Edebug. + "*If non-nil, evaluating defining forms instruments for Edebug. This applies to `eval-defun', `eval-region', `eval-buffer', and `eval-current-buffer'. `eval-region' is also called by `eval-last-sexp', and `eval-print-last-sexp'. @@ -141,10 +141,10 @@ it." :group 'edebug) (defcustom edebug-initial-mode 'step - "*Initial execution mode for Edebug, if non-nil. If this variable -is non-@code{nil}, it specifies the initial execution mode for Edebug -when it is first activated. Possible values are step, next, go, -Go-nonstop, trace, Trace-fast, continue, and Continue-fast." + "*Initial execution mode for Edebug, if non-nil. +If this variable is non-nil, it specifies the initial execution mode +for Edebug when it is first activated. Possible values are step, next, +go, Go-nonstop, trace, Trace-fast, continue, and Continue-fast." :type '(choice (const step) (const next) (const go) (const Go-nonstop) (const trace) (const Trace-fast) (const continue) @@ -180,15 +180,15 @@ Use this with caution since it is not debugged." (defcustom edebug-print-length 50 - "*Default value of `print-length' to use while printing results in Edebug." + "*Default value of `print-length' for printing results in Edebug." :type 'integer :group 'edebug) (defcustom edebug-print-level 50 - "*Default value of `print-level' to use while printing results in Edebug." + "*Default value of `print-level' for printing results in Edebug." :type 'integer :group 'edebug) (defcustom edebug-print-circle t - "*Default value of `print-circle' to use while printing results in Edebug." + "*Default value of `print-circle' for printing results in Edebug." :type 'boolean :group 'edebug) @@ -3189,8 +3189,8 @@ The default is one second." (defun edebug-modify-breakpoint (flag &optional condition temporary) - "Modify the breakpoint for the form at point or after it according -to FLAG: set if t, clear if nil. Then move to that point. + "Modify the breakpoint for the form at point or after it. +Set it if FLAG is non-nil, clear it otherwise. Then move to that point. If CONDITION or TEMPORARY are non-nil, add those attributes to the breakpoint. " (let ((edebug-stop-point (edebug-find-stop-point))) @@ -3729,12 +3729,13 @@ Print result in minibuffer." (eval-expression-print-format (car values)))))) (defun edebug-eval-last-sexp () - "Evaluate sexp before point in the outside environment; value in minibuffer." + "Evaluate sexp before point in the outside environment. +Print value in minibuffer." (interactive) (edebug-eval-expression (edebug-last-sexp))) (defun edebug-eval-print-last-sexp () - "Evaluate sexp before point in the outside environment; insert the value. + "Evaluate sexp before point in outside environment; insert value. This prints the value into current buffer." (interactive) (let* ((edebug-form (edebug-last-sexp)) -- cgit v1.2.1 From 3da629bdb6bed0988acef6899fa1b3ad023baf18 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Tue, 14 Jun 2005 21:12:41 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 49bc213995d..61b0657d4c5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,22 @@ +2005-06-15 Nick Roberts + + * progmodes/gdb-ui.el (gdb-tooltip-print): Respect + tooltip-use-echo-area. + (menu): Re-order menu items. + + * progmodes/gud.el (tooltip-use-echo-area): Remove alias. + Define in tooltip.el. + (gud-tooltip-process-output): Respect tooltip-use-echo-area. + (gud-tooltip-tips): Respect tooltip-use-echo-area and + gud-tooltip-echo-area. + + * tooltip.el (tooltip-use-echo-area): Restore from gud.el for + backward compatibility and make obsolete. + (tooltip-help-tips): Use tooltip-use-echo-area. + (tooltip-show-help-function): Rename to... + (tooltip-show-help): ...this, because it is a function. + (tooltip-mode, tooltip-help-message): Call tooltip-show-help. + 2005-06-14 Luc Teirlinck * emacs-lisp/edebug.el (edebug-all-defs, edebug-initial-mode) -- cgit v1.2.1 From 90aff7c61e0237008eba184ef01e06c8026cecfe Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Tue, 14 Jun 2005 21:13:28 +0000 Subject: * tooltip.el (tooltip-use-echo-area): Restore from gud.el for backward compatibility and make obsolete. (tooltip-help-tips): Use tooltip-use-echo-area. (tooltip-show-help-function): Rename to... (tooltip-show-help): ...this, because it is a function. (tooltip-mode, tooltip-help-message): Call tooltip-show-help. --- lisp/tooltip.el | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'lisp') diff --git a/lisp/tooltip.el b/lisp/tooltip.el index 7a2865b9dfa..904f2bf8770 100644 --- a/lisp/tooltip.el +++ b/lisp/tooltip.el @@ -113,6 +113,17 @@ position to pop up the tooltip." "Face for tooltips." :group 'tooltip) +(defcustom tooltip-use-echo-area nil + "Use the echo area instead of tooltip frames for help and GUD tooltips." + :type 'boolean + :tag "Use echo area" + :group 'tooltip) + +(make-obsolete-variable 'tooltip-use-echo-area +"To display help tooltips in the echo area turn tooltip-mode off. +To display GUD tooltips in the echo area turn gud-tooltip-mode on and set +gud-tooltip-echo-area to t." "22.1") + ;;; Variables that are not customizable. @@ -169,7 +180,7 @@ With ARG, turn tooltip mode on if and only if ARG is positive." (remove-hook 'pre-command-hook 'tooltip-hide)) (remove-hook 'tooltip-hook 'tooltip-help-tips)) (setq show-help-function - (if tooltip-mode 'tooltip-show-help-function nil))) + (if tooltip-mode 'tooltip-show-help nil))) ;;; Timeout for tooltip display @@ -314,9 +325,9 @@ of PROCESS." ;;; Tooltip help. (defvar tooltip-help-message nil - "The last help message received via `tooltip-show-help-function'.") + "The last help message received via `tooltip-show-help'.") -(defun tooltip-show-help-function (msg) +(defun tooltip-show-help (msg) "Function installed as `show-help-function'. MSG is either a help string to display, or nil to cancel the display." (let ((previous-help tooltip-help-message)) @@ -341,7 +352,7 @@ This is installed on the hook `tooltip-hook', which is run when the timer with ID `tooltip-timeout-id' fires. Value is non-nil if this function handled the tip." (when (stringp tooltip-help-message) - (tooltip-show tooltip-help-message) + (tooltip-show tooltip-help-message tooltip-use-echo-area) t)) (provide 'tooltip) -- cgit v1.2.1 From dce4ed29ce717896f40f521858706a0ce3b006ae Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Tue, 14 Jun 2005 21:14:12 +0000 Subject: * progmodes/gud.el (tooltip-use-echo-area): Remove alias. Define in tooltip.el. (gud-tooltip-process-output): Respect tooltip-use-echo-area. (gud-tooltip-tips): Respect tooltip-use-echo-area and gud-tooltip-echo-area. --- lisp/progmodes/gud.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lisp') diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 0737d1aed62..7d4fc00cd56 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -3139,8 +3139,6 @@ only tooltips in the buffer containing the overlay arrow." 'gud-tooltip-modes "22.1") (define-obsolete-variable-alias 'tooltip-gud-display 'gud-tooltip-display "22.1") -(define-obsolete-variable-alias 'tooltip-use-echo-area - 'gud-tooltip-echo-area "22.1") ;;; Reacting on mouse movements @@ -3242,7 +3240,7 @@ This event can be examined by forms in GUD-TOOLTIP-DISPLAY.") ; This will only display data that comes in one chunk. ; Larger arrays (say 400 elements) are displayed in -; the tootip incompletely and spill over into the gud buffer. +; the tooltip incompletely and spill over into the gud buffer. ; Switching the process-filter creates timing problems and ; it may be difficult to do better. Using annotations as in ; gdb-ui.el gets round this problem. @@ -3250,7 +3248,7 @@ This event can be examined by forms in GUD-TOOLTIP-DISPLAY.") "Process debugger output and show it in a tooltip window." (set-process-filter process gud-tooltip-original-filter) (tooltip-show (tooltip-strip-prompt process output) - gud-tooltip-echo-area)) + (or gud-tooltip-echo-area tooltip-use-echo-area))) (defun gud-tooltip-print-command (expr) "Return a suitable command to print the expression EXPR. @@ -3295,7 +3293,9 @@ This function must return nil if it doesn't handle EVENT." (cddr mouse)))) (let ((define-elt (assoc expr gdb-define-alist))) (unless (null define-elt) - (tooltip-show (cdr define-elt)) + (tooltip-show + (cdr define-elt) + (or gud-tooltip-echo-area tooltip-use-echo-area)) expr)))) (let ((cmd (gud-tooltip-print-command expr))) (when (and gud-tooltip-mode (eq gud-minor-mode 'gdb)) -- cgit v1.2.1 From b636352442bdc181b27718f62929a0e4508c673d Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Tue, 14 Jun 2005 21:14:48 +0000 Subject: (gdb-tooltip-print): Respect tooltip-use-echo-area. (menu): Re-order menu items. --- lisp/progmodes/gdb-ui.el | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'lisp') diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index f61ce717bc7..3a34a621fc6 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -250,7 +250,7 @@ Also display the main routine in the disassembly buffer if present." (let ((string (buffer-string))) ;; remove newline for gud-tooltip-echo-area (substring string 0 (- (length string) 1)))) - gud-tooltip-echo-area)) + (or gud-tooltip-echo-area tooltip-use-echo-area))) ;; If expr is a macro for a function don't print because of possible dangerous ;; side-effects. Also printing a function within a tooltip generates an @@ -2174,18 +2174,18 @@ corresponding to the mode line clicked." (let ((menu (make-sparse-keymap "GDB-UI"))) (define-key gud-menu-map [ui] `(menu-item "GDB-UI" ,menu :visible (eq gud-minor-mode 'gdba))) - (define-key menu [gdb-restore-windows] - '(menu-item "Restore Window Layout" gdb-restore-windows - :help "Restore standard layout for debug session.")) - (define-key menu [gdb-many-windows] - '(menu-item "Display Other Windows" gdb-many-windows - :help "Toggle display of locals, stack and breakpoint information" - :button (:toggle . gdb-many-windows))) (define-key menu [gdb-use-inferior-io] (menu-bar-make-toggle toggle-gdb-use-inferior-io-buffer gdb-use-inferior-io-buffer "Separate inferior IO" "Use separate IO %s" - "Toggle separate IO for inferior."))) + "Toggle separate IO for inferior.")) + (define-key menu [gdb-many-windows] + '(menu-item "Display Other Windows" gdb-many-windows + :help "Toggle display of locals, stack and breakpoint information" + :button (:toggle . gdb-many-windows))) + (define-key menu [gdb-restore-windows] + '(menu-item "Restore Window Layout" gdb-restore-windows + :help "Restore standard layout for debug session."))) (defadvice toggle-gdb-use-inferior-io-buffer (after gdb-kill-io-buffer activate) (unless gdb-use-inferior-io-buffer -- cgit v1.2.1 From 602dc0daa02e8e71cc9d33c405882f84f0316959 Mon Sep 17 00:00:00 2001 From: Daniel Pfeiffer Date: Tue, 14 Jun 2005 22:33:56 +0000 Subject: (makefile-space, makefile-makepp-perl): Eliminate "-face" suffix. (makefile-targets): Inherit from font-lock-function-name-face and eliminate "-face" suffix. (makefile-shell): Remove attributes and eliminate "-face" suffix. (makefile-*-font-lock-keywords): Append makefile-targets in rule actions, instead of prepending, to make it less visible. (makefile-previous-dependency, makefile-match-dependency): Don't match a target on a continuation line. --- lisp/progmodes/make-mode.el | 65 ++++++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 30 deletions(-) (limited to 'lisp') diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el index d2d2dc6263a..d9c38349b49 100644 --- a/lisp/progmodes/make-mode.el +++ b/lisp/progmodes/make-mode.el @@ -99,30 +99,31 @@ :group 'tools :prefix "makefile-") -(defface makefile-space-face +(defface makefile-space '((((class color)) (:background "hotpink")) (t (:reverse-video t))) "Face to use for highlighting leading spaces in Font-Lock mode." :group 'faces :group 'makefile) -(defface makefile-targets-face +(defface makefile-targets ;; This needs to go along both with foreground and background colors (i.e. shell) - '((t (:underline t))) + '((t (:inherit font-lock-function-name-face))) "Face to use for additionally highlighting rule targets in Font-Lock mode." :group 'faces :group 'makefile :version "22.1") -(defface makefile-shell-face - '((((class color) (min-colors 88) (background light)) (:background "seashell1")) - (((class color) (min-colors 88) (background dark)) (:background "seashell4"))) +(defface makefile-shell + () + ;;'((((class color) (min-colors 88) (background light)) (:background "seashell1")) + ;; (((class color) (min-colors 88) (background dark)) (:background "seashell4"))) "Face to use for additionally highlighting Shell commands in Font-Lock mode." :group 'faces :group 'makefile :version "22.1") -(defface makefile-makepp-perl-face +(defface makefile-makepp-perl '((((class color) (background light)) (:background "LightBlue1")) ; Camel Book (((class color) (background dark)) (:background "DarkBlue")) (t (:reverse-video t))) @@ -302,8 +303,8 @@ not be enclosed in { } or ( )." "Regex for filenames that will NOT be included in the target list.") (if (fboundp 'facemenu-unlisted-faces) - (add-to-list 'facemenu-unlisted-faces 'makefile-space-face)) -(defvar makefile-space-face 'makefile-space-face + (add-to-list 'facemenu-unlisted-faces 'makefile-space)) +(defvar makefile-space 'makefile-space "Face to use for highlighting leading spaces in Font-Lock mode.") ;; These lists were inspired by the old solution. But they are silly, because @@ -348,14 +349,14 @@ not be enclosed in { } or ( )." (,makefile-macroassign-regex (1 font-lock-variable-name-face) ;; This is for after != - (2 'makefile-shell-face prepend t) + (2 'makefile-shell prepend t) ;; This is for after normal assignment (3 'font-lock-string-face prepend t)) ;; Rule actions. (makefile-match-action (1 font-lock-type-face) - (2 'makefile-shell-face prepend) + (2 'makefile-shell prepend) ;; Only makepp has builtin commands. (3 font-lock-builtin-face prepend t)) @@ -367,7 +368,7 @@ not be enclosed in { } or ( )." ("[^$]\\$\\([@%\\)" 1 font-lock-constant-face prepend) ("[^$]\\(\\$[@%*]\\)" - 1 'makefile-targets-face prepend) + 1 'makefile-targets append) ;; Fontify conditionals and includes. (,(concat "^\\(?: [ \t]*\\)?" @@ -382,22 +383,22 @@ not be enclosed in { } or ( )." ,@(if space '(;; Highlight lines that contain just whitespace. ;; They can cause trouble, especially if they start with a tab. - ("^[ \t]+$" . makefile-space-face) + ("^[ \t]+$" . makefile-space) ;; Highlight shell comments that Make treats as commands, ;; since these can fool people. - ("^\t+#" 0 makefile-space-face t) + ("^\t+#" 0 makefile-space t) ;; Highlight spaces that precede tabs. ;; They can make a tab fail to be effective. - ("^\\( +\\)\t" 1 makefile-space-face))) + ("^\\( +\\)\t" 1 makefile-space))) ,@font-lock-keywords ;; Do dependencies. (makefile-match-dependency - (1 'makefile-targets-face prepend) - (3 'makefile-shell-face prepend t)))) + (1 'makefile-targets prepend) + (3 'makefile-shell prepend t)))) (defconst makefile-font-lock-keywords (makefile-make-font-lock-keywords @@ -419,7 +420,7 @@ not be enclosed in { } or ( )." "^\\(?: [ \t]*\\)?if\\(n\\)\\(?:def\\|eq\\)\\>" '("[^$]\\(\\$[({][@%*][DF][})]\\)" - 1 'makefile-targets-face prepend) + 1 'makefile-targets append) ;; $(function ...) ${function ...} '("[^$]\\$[({]\\([-a-zA-Z0-9_.]+\\s \\)" @@ -428,7 +429,7 @@ not be enclosed in { } or ( )." ;; $(shell ...) ${shell ...} '("[^$]\\$\\([({]\\)shell[ \t]+" makefile-match-function-end nil nil - (1 'makefile-shell-face prepend t)))) + (1 'makefile-shell prepend t)))) (defconst makefile-makepp-font-lock-keywords (makefile-make-font-lock-keywords @@ -438,7 +439,7 @@ not be enclosed in { } or ( )." "^\\(?: [ \t]*\\)?\\(?:and[ \t]+\\|else[ \t]+\\|or[ \t]+\\)?if\\(n\\)\\(?:def\\|eq\\|sys\\)\\>" '("[^$]\\(\\$[({]\\(?:output\\|stem\\|target\\)s?\\_>.*?[})]\\)" - 1 'makefile-targets-face prepend) + 1 'makefile-targets append) ;; Colon modifier keywords. '("\\(:\\s *\\)\\(build_c\\(?:ache\\|heck\\)\\|env\\(?:ironment\\)?\\|foreach\\|signature\\|scanner\\|quickscan\\|smartscan\\)\\>\\([^:\n]*\\)" @@ -453,32 +454,32 @@ not be enclosed in { } or ( )." ;; $(shell ...) $((shell ...)) ${shell ...} ${{shell ...}} '("[^$]\\$\\(((?\\|{{?\\)shell\\(?:[-_]\\(?:global[-_]\\)?once\\)?[ \t]+" makefile-match-function-end nil nil - (1 'makefile-shell-face prepend t)) + (1 'makefile-shell prepend t)) ;; $(perl ...) $((perl ...)) ${perl ...} ${{perl ...}} '("[^$]\\$\\(((?\\|{{?\\)makeperl[ \t]+" makefile-match-function-end nil nil - (1 'makefile-makepp-perl-face prepend t)) + (1 'makefile-makepp-perl prepend t)) '("[^$]\\$\\(((?\\|{{?\\)perl[ \t]+" makefile-match-function-end nil nil - (1 'makefile-makepp-perl-face t t)) + (1 'makefile-makepp-perl t t)) ;; Can we unify these with (if (match-end 1) 'prepend t)? - '("ifmakeperl\\s +\\(.*\\)" 1 'makefile-makepp-perl-face prepend) - '("ifperl\\s +\\(.*\\)" 1 'makefile-makepp-perl-face t) + '("ifmakeperl\\s +\\(.*\\)" 1 'makefile-makepp-perl prepend) + '("ifperl\\s +\\(.*\\)" 1 'makefile-makepp-perl t) ;; Perl block single- or multiline, as statement or rule action. ;; Don't know why the initial newline in 2nd variant of group 2 doesn't get skipped. '("\\" - 1 'makefile-makepp-perl-face t))) + 1 'makefile-makepp-perl t))) (defconst makefile-bsdmake-font-lock-keywords (makefile-make-font-lock-keywords @@ -911,6 +912,8 @@ Makefile mode can be configured by modifying the following variables: (backward-char)) (get-text-property (point) 'face) (beginning-of-line) + (if (> (point) (+ (point-min) 2)) + (eq (char-before (1- (point))) ?\\)) (if (looking-at makefile-dependency-regex) (throw 'found t)))) (goto-char pt) @@ -1700,6 +1703,8 @@ matched in a rule action." (forward-char) (or (eq (char-after) ?=) (get-text-property (1- (point)) 'face) + (if (> (line-beginning-position) (+ (point-min) 2)) + (eq (char-before (line-end-position 0)) ?\\)) (when (save-excursion (beginning-of-line) (looking-at makefile-dependency-regex)) -- cgit v1.2.1 From 149012657f2ad1417d76b5904f7f3bfaa288e4ef Mon Sep 17 00:00:00 2001 From: Daniel Pfeiffer Date: Tue, 14 Jun 2005 22:40:09 +0000 Subject: *** empty log message *** --- lisp/ChangeLog | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 61b0657d4c5..f1cb38a45e1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,17 @@ +2005-06-15 Daniel Pfeiffer + + * progmodes/make-mode.el (makefile-space, makefile-makepp-perl): + Eliminate "-face" suffix. + (makefile-targets): Inherit font-lock-variable-name-face and + eliminate "-face" suffix. + (makefile-shell): Remove attributes and eliminate "-face" suffix. + (makefile-*-font-lock-keywords): Append makefile-targets in rule + actions, instead of prepending, to make it less visible. + (makefile-previous-dependency, makefile-match-dependency): Don't + match a target on a continuation line. + + * files.el (auto-mode-alist): Put Makefile in gmake mode. + 2005-06-15 Nick Roberts * progmodes/gdb-ui.el (gdb-tooltip-print): Respect -- cgit v1.2.1 From b6116bd2567b686d591306f5b31e3c8e35952f75 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Tue, 14 Jun 2005 22:49:09 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-408 Remove "-face" suffix from Buffer-menu-buffer face 2005-06-14 Miles Bader * lisp/buff-menu.el (Buffer-menu-buffer): Remove "-face" suffix from face name. (Buffer-menu-buffer-face): New backward-compatibility alias for renamed face. (list-buffers-noselect): Use renamed Buffer-menu-buffer face. --- lisp/ChangeLog | 8 ++++++++ lisp/buff-menu.el | 6 ++++-- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f1cb38a45e1..0a491e0d93e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2005-06-14 Miles Bader + + * buff-menu.el (Buffer-menu-buffer): Remove "-face" suffix from + face name. + (Buffer-menu-buffer-face): New backward-compatibility alias for + renamed face. + (list-buffers-noselect): Use renamed Buffer-menu-buffer face. + 2005-06-15 Daniel Pfeiffer * progmodes/make-mode.el (makefile-space, makefile-makepp-perl): diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el index 7e9115a79dc..79247ad30df 100644 --- a/lisp/buff-menu.el +++ b/lisp/buff-menu.el @@ -74,11 +74,13 @@ :type 'boolean :group 'Buffer-menu) -(defface Buffer-menu-buffer-face +(defface Buffer-menu-buffer '((t (:weight bold))) "Face used to highlight buffer name." :group 'Buffer-menu :group 'font-lock-highlighting-faces) +;; backward-compatibility alias +(put 'Buffer-menu-buffer-face 'face-alias 'Buffer-menu-buffer) (defcustom Buffer-menu-buffer+size-width 26 "*How wide to jointly make the buffer name and size columns." @@ -773,7 +775,7 @@ For more information, see the function `buffer-menu'." (int-to-string (nth 3 buffer)) `(buffer-name ,(nth 2 buffer) buffer ,(car buffer) - font-lock-face Buffer-menu-buffer-face + font-lock-face Buffer-menu-buffer mouse-face highlight help-echo "mouse-2: select this buffer")) " " -- cgit v1.2.1 From 7a3dfaeead479cd4e0dd8bfeea0421a646af760f Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Tue, 14 Jun 2005 22:49:30 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-409 Remove "-face" suffix from antlr-mode faces 2005-06-14 Miles Bader * lisp/progmodes/antlr-mode.el (antlr-default, antlr-keyword, antlr-syntax) (antlr-ruledef, antlr-tokendef, antlr-ruleref, antlr-tokenref) (antlr-literal): Remove "-face" suffix and "font-lock-" from face names. (antlr-font-lock-default-face, antlr-font-lock-keyword-face) (antlr-font-lock-syntax-face, antlr-font-lock-ruledef-face) (antlr-font-lock-tokendef-face, antlr-font-lock-ruleref-face) (antlr-font-lock-tokenref-face, antlr-font-lock-literal-face): New backward-compatibility aliases for renamed faces. (antlr-default-face, antlr-keyword-face, antlr-syntax-face) (antlr-ruledef-face, antlr-tokendef-face, antlr-ruleref-face) (antlr-tokenref-face, antlr-literal-face): Variables renamed to remove "font-lock-". Use renamed antlr-mode faces. (antlr-font-lock-additional-keywords): Use renamed faces. Replace literal face-names with face variable references. --- lisp/ChangeLog | 16 ++++++++ lisp/progmodes/antlr-mode.el | 94 ++++++++++++++++++++++++++------------------ 2 files changed, 71 insertions(+), 39 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0a491e0d93e..5dce703c7dd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,21 @@ 2005-06-14 Miles Bader + * progmodes/antlr-mode.el (antlr-default, antlr-keyword, antlr-syntax) + (antlr-ruledef, antlr-tokendef, antlr-ruleref, antlr-tokenref) + (antlr-literal): Remove "-face" suffix and "font-lock-" from face + names. + (antlr-font-lock-default-face, antlr-font-lock-keyword-face) + (antlr-font-lock-syntax-face, antlr-font-lock-ruledef-face) + (antlr-font-lock-tokendef-face, antlr-font-lock-ruleref-face) + (antlr-font-lock-tokenref-face, antlr-font-lock-literal-face): + New backward-compatibility aliases for renamed faces. + (antlr-default-face, antlr-keyword-face, antlr-syntax-face) + (antlr-ruledef-face, antlr-tokendef-face, antlr-ruleref-face) + (antlr-tokenref-face, antlr-literal-face): Variables renamed to remove + "font-lock-". Use renamed antlr-mode faces. + (antlr-font-lock-additional-keywords): Use renamed faces. + Replace literal face-names with face variable references. + * buff-menu.el (Buffer-menu-buffer): Remove "-face" suffix from face name. (Buffer-menu-buffer-face): New backward-compatibility alias for diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el index bdf376bfab7..89d167de25d 100644 --- a/lisp/progmodes/antlr-mode.el +++ b/lisp/progmodes/antlr-mode.el @@ -1,6 +1,6 @@ ;;; antlr-mode.el --- major mode for ANTLR grammar files -;; Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc. ;; ;; Author: Christoph.Wedler@sap.com ;; Keywords: languages, ANTLR, code generator @@ -827,58 +827,72 @@ font-lock keywords according to `font-lock-defaults' used for the code in the grammar's actions and semantic predicates, see `antlr-font-lock-maximum-decoration'.") -(defvar antlr-font-lock-default-face 'antlr-font-lock-default-face) -(defface antlr-font-lock-default-face nil +(defvar antlr-default-face 'antlr-default) +(defface antlr-default "Face to prevent strings from language dependent highlighting. Do not change." :group 'antlr) +;; backward-compatibility alias +(put 'antlr-font-lock-default-face 'face-alias 'antlr-default) -(defvar antlr-font-lock-keyword-face 'antlr-font-lock-keyword-face) -(defface antlr-font-lock-keyword-face +(defvar antlr-keyword-face 'antlr-keyword) +(defface antlr-keyword (cond-emacs-xemacs '((((class color) (background light)) (:foreground "black" :EMACS :weight bold :XEMACS :bold t)))) "ANTLR keywords." :group 'antlr) +;; backward-compatibility alias +(put 'antlr-font-lock-keyword-face 'face-alias 'antlr-keyword) -(defvar antlr-font-lock-syntax-face 'antlr-font-lock-keyword-face) -(defface antlr-font-lock-syntax-face +(defvar antlr-syntax-face 'antlr-keyword) +(defface antlr-syntax (cond-emacs-xemacs '((((class color) (background light)) (:foreground "black" :EMACS :weight bold :XEMACS :bold t)))) "ANTLR syntax symbols like :, |, (, ), ...." :group 'antlr) +;; backward-compatibility alias +(put 'antlr-font-lock-syntax-face 'face-alias 'antlr-syntax) -(defvar antlr-font-lock-ruledef-face 'antlr-font-lock-ruledef-face) -(defface antlr-font-lock-ruledef-face +(defvar antlr-ruledef-face 'antlr-ruledef) +(defface antlr-ruledef (cond-emacs-xemacs '((((class color) (background light)) (:foreground "blue" :EMACS :weight bold :XEMACS :bold t)))) "ANTLR rule references (definition)." :group 'antlr) +;; backward-compatibility alias +(put 'antlr-font-lock-ruledef-face 'face-alias 'antlr-ruledef) -(defvar antlr-font-lock-tokendef-face 'antlr-font-lock-tokendef-face) -(defface antlr-font-lock-tokendef-face +(defvar antlr-tokendef-face 'antlr-tokendef) +(defface antlr-tokendef (cond-emacs-xemacs '((((class color) (background light)) (:foreground "blue" :EMACS :weight bold :XEMACS :bold t)))) "ANTLR token references (definition)." :group 'antlr) +;; backward-compatibility alias +(put 'antlr-font-lock-tokendef-face 'face-alias 'antlr-tokendef) -(defvar antlr-font-lock-ruleref-face 'antlr-font-lock-ruleref-face) -(defface antlr-font-lock-ruleref-face +(defvar antlr-ruleref-face 'antlr-ruleref) +(defface antlr-ruleref '((((class color) (background light)) (:foreground "blue4"))) "ANTLR rule references (usage)." :group 'antlr) +;; backward-compatibility alias +(put 'antlr-font-lock-ruleref-face 'face-alias 'antlr-ruleref) -(defvar antlr-font-lock-tokenref-face 'antlr-font-lock-tokenref-face) -(defface antlr-font-lock-tokenref-face +(defvar antlr-tokenref-face 'antlr-tokenref) +(defface antlr-tokenref '((((class color) (background light)) (:foreground "orange4"))) "ANTLR token references (usage)." :group 'antlr) +;; backward-compatibility alias +(put 'antlr-font-lock-tokenref-face 'face-alias 'antlr-tokenref) -(defvar antlr-font-lock-literal-face 'antlr-font-lock-literal-face) -(defface antlr-font-lock-literal-face +(defvar antlr-literal-face 'antlr-literal) +(defface antlr-literal (cond-emacs-xemacs '((((class color) (background light)) (:foreground "brown4" :EMACS :weight bold :XEMACS :bold t)))) @@ -886,6 +900,8 @@ Do not change." It is used to highlight strings matched by the first regexp group of `antlr-font-lock-literal-regexp'." :group 'antlr) +;; backward-compatibility alias +(put 'antlr-font-lock-literal-face 'face-alias 'antlr-literal) (defcustom antlr-font-lock-literal-regexp "\"\\(\\sw\\(\\sw\\|-\\)*\\)\"" "Regexp matching literals with special syntax highlighting, or nil. @@ -904,56 +920,56 @@ group. The string matched by the first group is highlighted with (cond-emacs-xemacs `((antlr-invalidate-context-cache) ("\\$setType[ \t]*(\\([A-Za-z\300-\326\330-\337]\\sw*\\))" - (1 antlr-font-lock-tokendef-face)) - ("\\$\\sw+" (0 font-lock-keyword-face)) + (1 antlr-tokendef-face)) + ("\\$\\sw+" (0 keyword-face)) ;; the tokens are already fontified as string/docstrings: (,(lambda (limit) - (if antlr-font-lock-literal-regexp + (if antlr-literal-regexp (antlr-re-search-forward antlr-font-lock-literal-regexp limit))) - (1 antlr-font-lock-literal-face t) + (1 antlr-literal-face t) :XEMACS (0 nil)) ; XEmacs bug workaround (,(lambda (limit) (antlr-re-search-forward antlr-class-header-regexp limit)) - (1 antlr-font-lock-keyword-face) - (2 antlr-font-lock-ruledef-face) - (3 antlr-font-lock-keyword-face) + (1 antlr-keyword-face) + (2 antlr-ruledef-face) + (3 antlr-keyword-face) (4 (if (member (match-string 4) '("Lexer" "Parser" "TreeParser")) - 'antlr-font-lock-keyword-face - 'font-lock-type-face))) + antlr-keyword-face + type-face))) (,(lambda (limit) (antlr-re-search-forward "\\<\\(header\\|options\\|tokens\\|exception\\|catch\\|returns\\)\\>" limit)) - (1 antlr-font-lock-keyword-face)) + (1 antlr-keyword-face)) (,(lambda (limit) (antlr-re-search-forward "^\\(private\\|public\\|protected\\)\\>[ \t]*\\(\\(\\sw+[ \t]*\\(:\\)?\\)\\)?" limit)) (1 font-lock-type-face) ; not XEmacs' java level-3 fruit salad (3 (if (antlr-upcase-p (char-after (match-beginning 3))) - 'antlr-font-lock-tokendef-face - 'antlr-font-lock-ruledef-face) nil t) - (4 antlr-font-lock-syntax-face nil t)) + antlr-tokendef-face + antlr-ruledef-face) nil t) + (4 antlr-syntax-face nil t)) (,(lambda (limit) (antlr-re-search-forward "^\\(\\sw+\\)[ \t]*\\(:\\)?" limit)) (1 (if (antlr-upcase-p (char-after (match-beginning 0))) - 'antlr-font-lock-tokendef-face - 'antlr-font-lock-ruledef-face) nil t) - (2 antlr-font-lock-syntax-face nil t)) + antlr-tokendef-face + antlr-ruledef-face) nil t) + (2 antlr-syntax-face nil t)) (,(lambda (limit) ;; v:ruleref and v:"literal" is allowed... (antlr-re-search-forward "\\(\\sw+\\)[ \t]*\\([=:]\\)?" limit)) (1 (if (match-beginning 2) (if (eq (char-after (match-beginning 2)) ?=) - 'antlr-font-lock-default-face - 'font-lock-variable-name-face) + antlr-default-face + font-lock-variable-name-face) (if (antlr-upcase-p (char-after (match-beginning 1))) - 'antlr-font-lock-tokenref-face - 'antlr-font-lock-ruleref-face))) - (2 antlr-font-lock-default-face nil t)) + antlr-tokenref-face + antlr-ruleref-face))) + (2 antlr-default-face nil t)) (,(lambda (limit) (antlr-re-search-forward "[|&:;(~]\\|)\\([*+?]\\|=>\\)?" limit)) - (0 'antlr-font-lock-syntax-face)))) + (0 antlr-syntax-face)))) "Font-lock keywords for ANTLR's normal grammar code. See `antlr-font-lock-keywords-alist' for the keywords of actions.") -- cgit v1.2.1 From 4f2d55da497a6a998403f991fb24cee3723b3684 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Tue, 14 Jun 2005 22:49:47 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-410 Remove "-face" suffix from ebrowse faces 2005-06-14 Miles Bader * lisp/progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-file-name, ebrowse-default, ebrowse-member-attribute) (ebrowse-member-class, ebrowse-progress): Remove "-face" suffix from face names. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): New backward-compatibility aliases for renamed faces. (ebrowse-show-progress, ebrowse-show-file-name-at-point) (ebrowse-set-mark-props, ebrowse-draw-tree-fn) (ebrowse-draw-member-buffer-class-line, ebrowse-draw-member-long-fn) (ebrowse-draw-member-short-fn): Use renamed ebrowse faces. --- lisp/ChangeLog | 14 ++++++++++++++ lisp/progmodes/ebrowse.el | 46 ++++++++++++++++++++++++++++++---------------- 2 files changed, 44 insertions(+), 16 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5dce703c7dd..71ccda0f487 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,19 @@ 2005-06-14 Miles Bader + * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) + (ebrowse-file-name, ebrowse-default, ebrowse-member-attribute) + (ebrowse-member-class, ebrowse-progress): + Remove "-face" suffix from face names. + (ebrowse-tree-mark-face, ebrowse-root-class-face) + (ebrowse-file-name-face, ebrowse-default-face) + (ebrowse-member-attribute-face, ebrowse-member-class-face) + (ebrowse-progress-face): + New backward-compatibility aliases for renamed faces. + (ebrowse-show-progress, ebrowse-show-file-name-at-point) + (ebrowse-set-mark-props, ebrowse-draw-tree-fn) + (ebrowse-draw-member-buffer-class-line, ebrowse-draw-member-long-fn) + (ebrowse-draw-member-short-fn): Use renamed ebrowse faces. + * progmodes/antlr-mode.el (antlr-default, antlr-keyword, antlr-syntax) (antlr-ruledef, antlr-tokendef, antlr-ruleref, antlr-tokenref) (antlr-literal): Remove "-face" suffix and "font-lock-" from face diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el index 953ecd79f7f..5f8ea5ae70a 100644 --- a/lisp/progmodes/ebrowse.el +++ b/lisp/progmodes/ebrowse.el @@ -157,50 +157,64 @@ This space is used to display markers." :group 'ebrowse) -(defface ebrowse-tree-mark-face +(defface ebrowse-tree-mark '((((min-colors 88)) (:foreground "red1")) (t (:foreground "red"))) "*The face used for the mark character in the tree." :group 'ebrowse-faces) +;; backward-compatibility alias +(put 'ebrowse-tree-mark-face 'face-alias 'ebrowse-tree-mark) -(defface ebrowse-root-class-face +(defface ebrowse-root-class '((((min-colors 88)) (:weight bold :foreground "blue1")) (t (:weight bold :foreground "blue"))) "*The face used for root classes in the tree." :group 'ebrowse-faces) +;; backward-compatibility alias +(put 'ebrowse-root-class-face 'face-alias 'ebrowse-root-class) -(defface ebrowse-file-name-face +(defface ebrowse-file-name '((t (:italic t))) "*The face for filenames displayed in the tree." :group 'ebrowse-faces) +;; backward-compatibility alias +(put 'ebrowse-file-name-face 'face-alias 'ebrowse-file-name) -(defface ebrowse-default-face +(defface ebrowse-default '((t nil)) "*Face for everything else in the tree not having other faces." :group 'ebrowse-faces) +;; backward-compatibility alias +(put 'ebrowse-default-face 'face-alias 'ebrowse-default) -(defface ebrowse-member-attribute-face +(defface ebrowse-member-attribute '((((min-colors 88)) (:foreground "red1")) (t (:foreground "red"))) "*Face used to display member attributes." :group 'ebrowse-faces) +;; backward-compatibility alias +(put 'ebrowse-member-attribute-face 'face-alias 'ebrowse-member-attribute) -(defface ebrowse-member-class-face +(defface ebrowse-member-class '((t (:foreground "purple"))) "*Face used to display the class title in member buffers." :group 'ebrowse-faces) +;; backward-compatibility alias +(put 'ebrowse-member-class-face 'face-alias 'ebrowse-member-class) -(defface ebrowse-progress-face +(defface ebrowse-progress '((((min-colors 88)) (:background "blue1")) (t (:background "blue"))) "*Face for progress indicator." :group 'ebrowse-faces) +;; backward-compatibility alias +(put 'ebrowse-progress-face 'face-alias 'ebrowse-progress) @@ -883,7 +897,7 @@ this is the first progress message displayed." (message (concat title ": " (propertize (make-string ebrowse-n-boxes (if (display-color-p) ?\ ?+)) - 'face 'ebrowse-progress-face))))) + 'face 'ebrowse-progress))))) ;;; Reading a tree from disk @@ -1310,7 +1324,7 @@ With PREFIX, insert that many filenames." (ebrowse-ts-class tree)) "unknown") ")")) - (ebrowse-set-face start (point) 'ebrowse-file-name-face) + (ebrowse-set-face start (point) 'ebrowse-file-name) (beginning-of-line) (forward-line 1)))))) @@ -1828,7 +1842,7 @@ TREE denotes the class shown." start end `(mouse-face highlight ebrowse-what mark ebrowse-tree ,tree help-echo "double-mouse-1: mark/unmark")) - (ebrowse-set-face start end 'ebrowse-tree-mark-face)) + (ebrowse-set-face start end 'ebrowse-tree-mark)) (defun* ebrowse-draw-tree-fn (&aux stack1 stack2 start) @@ -1855,8 +1869,8 @@ This function may look weird, but this is faster than recursion." (when (ebrowse-template-p class) (insert "<>")) (ebrowse-set-face start (point) (if (zerop level) - 'ebrowse-root-class-face - 'ebrowse-default-face)) + 'ebrowse-root-class + 'ebrowse-default)) (setf start-of-class-name start end-of-class-name (point)) ;; If filenames are to be displayed... @@ -1867,7 +1881,7 @@ This function may look weird, but this is faster than recursion." (or (ebrowse-cs-file class) "unknown") ")") - (ebrowse-set-face start (point) 'ebrowse-file-name-face)) + (ebrowse-set-face start (point) 'ebrowse-file-name)) (ebrowse-set-mark-props start-of-line (1+ start-of-line) tree) (add-text-properties start-of-class-name end-of-class-name @@ -2694,7 +2708,7 @@ the class cursor is on." (insert "<>")) (setq class-name-end (point)) (insert ":\n\n") - (ebrowse-set-face start (point) 'ebrowse-member-class-face) + (ebrowse-set-face start (point) 'ebrowse-member-class) (add-text-properties class-name-start class-name-end '(ebrowse-what class-name @@ -2810,7 +2824,7 @@ TREE is the class tree of MEMBER-LIST." (ebrowse-draw-member-attributes member-struc) (insert ">") (ebrowse-set-face start (point) - 'ebrowse-member-attribute-face))) + 'ebrowse-member-attribute))) (insert " ") (ebrowse-draw-member-regexp member-struc)))) (insert "\n") @@ -2841,7 +2855,7 @@ TREE is the class tree in which the members are found." (ebrowse-draw-member-attributes member) (insert "> ") (ebrowse-set-face start-of-entry (point) - 'ebrowse-member-attribute-face)) + 'ebrowse-member-attribute)) ;; insert member name truncated to column width (setq start-of-name (point)) (insert (substring name 0 -- cgit v1.2.1 From ded09abd8d271f642d52d373b7ff726cfaefdb4e Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Tue, 14 Jun 2005 23:20:37 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-412 Remove "-face" suffix from flymake faces 2005-06-14 Miles Bader * lisp/progmodes/flymake.el (flymake-errline, flymake-warnline): Remove "-face" suffix from face names. (flymake-errline-face, flymake-warnline-face): New backward-compatibility aliases for renamed faces. (flymake-highlight-line): Use renamed flymake faces. --- lisp/ChangeLog | 6 ++++++ lisp/progmodes/flymake.el | 12 ++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 71ccda0f487..c9e4d6ff8de 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,11 @@ 2005-06-14 Miles Bader + * progmodes/flymake.el (flymake-errline, flymake-warnline): + Remove "-face" suffix from face names. + (flymake-errline-face, flymake-warnline-face): + New backward-compatibility aliases for renamed faces. + (flymake-highlight-line): Use renamed flymake faces. + * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-file-name, ebrowse-default, ebrowse-member-attribute) (ebrowse-member-class, ebrowse-progress): diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 7b1ba8d033f..c47f2e34cd2 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -839,19 +839,23 @@ Return t if it has at least one flymake overlay, nil if no overlay." (setq ov (cdr ov))) has-flymake-overlays)) -(defface flymake-errline-face +(defface flymake-errline ;;+ '((((class color)) (:foreground "OrangeRed" :bold t :underline t)) ;;+ '((((class color)) (:underline "OrangeRed")) '((((class color)) (:background "LightPink")) (t (:bold t))) "Face used for marking error lines." :group 'flymake) +;; backward-compatibility alias +(put 'flymake-errline-face 'face-alias 'flymake-errline) -(defface flymake-warnline-face +(defface flymake-warnline '((((class color)) (:background "LightBlue2")) (t (:bold t))) "Face used for marking warning lines." :group 'flymake) +;; backward-compatibility alias +(put 'flymake-warnline-face 'face-alias 'flymake-warnline) (defun flymake-highlight-line (line-no line-err-info-list) "Highlight line LINE-NO in current buffer. @@ -886,8 +890,8 @@ Perhaps use text from LINE-ERR-INFO-ILST to enhance highlighting." (setq end (point))) (if (> (flymake-get-line-err-count line-err-info-list "e") 0) - (setq face 'flymake-errline-face) - (setq face 'flymake-warnline-face)) + (setq face 'flymake-errline) + (setq face 'flymake-warnline)) (flymake-make-overlay beg end tooltip-text face nil))) -- cgit v1.2.1 From 57267a95653775cd08890841b0e110405ccb6d41 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Tue, 14 Jun 2005 23:20:55 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-413 Remove "-face" suffix from idlwave faces 2005-06-14 Miles Bader * lisp/progmodes/idlw-help.el (idlwave-help-link): Remove "-face" suffix from face name. (idlwave-help-link-face): New backward-compatibility alias for renamed face. (idlwave-highlight-linked-completions): Use renamed idlwave-help faces. * lisp/progmodes/idlw-shell.el (idlwave-shell-bp-face) (idlwave-shell-disabled-bp): Remove "-face" suffix from face names. (idlwave-shell-bp-face, idlwave-shell-disabled-bp): New backward-compatibility aliases for renamed faces. (idlwave-shell-disabled-breakpoint-face) (idlwave-shell-breakpoint-face): Use renamed idlwave-shell faces. --- lisp/ChangeLog | 13 +++++++++++++ lisp/progmodes/idlw-help.el | 8 +++++--- lisp/progmodes/idlw-shell.el | 44 ++++++++++++++++++++++++-------------------- 3 files changed, 42 insertions(+), 23 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c9e4d6ff8de..a510cb88590 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,18 @@ 2005-06-14 Miles Bader + * progmodes/idlw-help.el (idlwave-help-link): + Remove "-face" suffix from face name. + (idlwave-help-link-face): + New backward-compatibility alias for renamed face. + (idlwave-highlight-linked-completions): Use renamed idlwave-help faces. + + * progmodes/idlw-shell.el (idlwave-shell-bp-face) + (idlwave-shell-disabled-bp): Remove "-face" suffix from face names. + (idlwave-shell-bp-face, idlwave-shell-disabled-bp): + New backward-compatibility aliases for renamed faces. + (idlwave-shell-disabled-breakpoint-face) + (idlwave-shell-breakpoint-face): Use renamed idlwave-shell faces. + * progmodes/flymake.el (flymake-errline, flymake-warnline): Remove "-face" suffix from face names. (flymake-errline-face, flymake-warnline-face): diff --git a/lisp/progmodes/idlw-help.el b/lisp/progmodes/idlw-help.el index 6c2cb00bbde..ba31e6e0ef8 100644 --- a/lisp/progmodes/idlw-help.el +++ b/lisp/progmodes/idlw-help.el @@ -182,12 +182,14 @@ support." :group 'idlwave-online-help :type 'string) -(defface idlwave-help-link-face +(defface idlwave-help-link '((((min-colors 88) (class color)) (:foreground "Blue1")) (((class color)) (:foreground "Blue")) (t (:weight bold))) "Face for highlighting links into IDLWAVE online help." :group 'idlwave-online-help) +;; backward-compatibility alias +(put 'idlwave-help-link-face 'face-alias 'idlwave-help-link) (defvar idlwave-help-activate-links-aggressively nil "Obsolete variable.") @@ -586,12 +588,12 @@ Needs additional info stored in global `idlwave-completion-help-info'." (defun idlwave-highlight-linked-completions () "Highlight all completions for which help is available and attach link. Those words in `idlwave-completion-help-links' have links. The -`idlwave-help-link-face' face is used for this." +`idlwave-help-link' face is used for this." (if idlwave-highlight-help-links-in-completion (with-current-buffer (get-buffer "*Completions*") (save-excursion (let* ((case-fold-search t) - (props (list 'face 'idlwave-help-link-face)) + (props (list 'face 'idlwave-help-link)) (info idlwave-completion-help-info) ; global passed in (what (nth 0 info)) ; what was completed, or a func (class (nth 3 info)) ; any class diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el index 19656238764..04e6a28ee40 100644 --- a/lisp/progmodes/idlw-shell.el +++ b/lisp/progmodes/idlw-shell.el @@ -510,40 +510,44 @@ t Glyph when possible, otherwise face (same effect as 'glyph)." (defvar idlwave-shell-use-breakpoint-glyph t "Obsolete variable. See `idlwave-shell-mark-breakpoints.") -(defcustom idlwave-shell-breakpoint-face 'idlwave-shell-bp-face +(defcustom idlwave-shell-breakpoint-face 'idlwave-shell-bp "*The face for breakpoint lines in the source code. Allows you to choose the font, color and other properties for lines which have a breakpoint. See also `idlwave-shell-mark-breakpoints'." :group 'idlwave-shell-highlighting-and-faces :type 'symbol) -(if idlwave-shell-have-new-custom - ;; We have the new customize - use it to define a customizable face - (defface idlwave-shell-bp-face - '((((class color)) (:foreground "Black" :background "Pink")) - (t (:underline t))) - "Face for highlighting lines with breakpoints." - :group 'idlwave-shell-highlighting-and-faces) - ;; Just copy the underline face to be on the safe side. - (copy-face 'underline 'idlwave-shell-bp-face)) +(if (not idlwave-shell-have-new-custom) + ;; Just copy the underline face to be on the safe side. + (copy-face 'underline 'idlwave-shell-bp) + ;; We have the new customize - use it to define a customizable face + (defface idlwave-shell-bp + '((((class color)) (:foreground "Black" :background "Pink")) + (t (:underline t))) + "Face for highlighting lines with breakpoints." + :group 'idlwave-shell-highlighting-and-faces) + ;; backward-compatibility alias + (put 'idlwave-shell-bp-face 'face-alias 'idlwave-shell-bp)) (defcustom idlwave-shell-disabled-breakpoint-face - 'idlwave-shell-disabled-bp-face + 'idlwave-shell-disabled-bp "*The face for disabled breakpoint lines in the source code. Allows you to choose the font, color and other properties for lines which have a breakpoint. See also `idlwave-shell-mark-breakpoints'." :group 'idlwave-shell-highlighting-and-faces :type 'symbol) -(if idlwave-shell-have-new-custom - ;; We have the new customize - use it to define a customizable face - (defface idlwave-shell-disabled-bp-face - '((((class color)) (:foreground "Black" :background "gray")) - (t (:underline t))) - "Face for highlighting lines with breakpoints." - :group 'idlwave-shell-highlighting-and-faces) - ;; Just copy the underline face to be on the safe side. - (copy-face 'underline 'idlwave-shell-disabled-bp-face)) +(if (not idlwave-shell-have-new-custom) + ;; Just copy the underline face to be on the safe side. + (copy-face 'underline 'idlwave-shell-disabled-bp) + ;; We have the new customize - use it to define a customizable face + (defface idlwave-shell-disabled-bp + '((((class color)) (:foreground "Black" :background "gray")) + (t (:underline t))) + "Face for highlighting lines with breakpoints." + :group 'idlwave-shell-highlighting-and-faces) + ;; backward-compatibility alias + (put 'idlwave-shell-disabled-bp-face 'face-alias 'idlwave-shell-disabled-bp)) (defcustom idlwave-shell-expression-face 'secondary-selection -- cgit v1.2.1 From 33595ec6bea2d29f19b78bc7ecc830b27b6b4efb Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Tue, 14 Jun 2005 23:56:03 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-414 Remove "-face" suffix from sh-script faces 2005-06-14 Miles Bader * lisp/progmodes/sh-script.el (sh-heredoc): Remove "-face" suffix from face name. (sh-heredoc-face): New backward-compatibility alias for renamed face. (sh-heredoc-face): Use renamed sh-heredoc face. --- lisp/ChangeLog | 5 +++++ lisp/progmodes/sh-script.el | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a510cb88590..b4cebfd0565 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2005-06-14 Miles Bader + * progmodes/sh-script.el (sh-heredoc): Remove "-face" suffix from + face name. + (sh-heredoc-face): New backward-compatibility alias for renamed face. + (sh-heredoc-face): Use renamed sh-heredoc face. + * progmodes/idlw-help.el (idlwave-help-link): Remove "-face" suffix from face name. (idlwave-help-link-face): diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 604ff8c1e78..23d8374818e 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -792,7 +792,7 @@ See `sh-feature'.") ;; Font-Lock support -(defface sh-heredoc-face +(defface sh-heredoc '((((min-colors 88) (class color) (background dark)) (:foreground "yellow1" :weight bold)) @@ -806,7 +806,9 @@ See `sh-feature'.") (:weight bold))) "Face to show a here-document" :group 'sh-indentation) -(defvar sh-heredoc-face 'sh-heredoc-face) +;; backward-compatibility alias +(put 'sh-heredoc-face 'face-alias 'sh-heredoc) +(defvar sh-heredoc-face 'sh-heredoc) (defface sh-escaped-newline '((t :inherit font-lock-string-face)) "Face used for (non-escaped) backslash at end of a line in Shell-script mode." -- cgit v1.2.1 From 63a5fd63030a0ca98c1a1ab3410cdb7721e77924 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Tue, 14 Jun 2005 23:56:26 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-415 Remove "-face" suffix from vhdl-mode faces 2005-06-14 Miles Bader * lisp/progmodes/vhdl-mode.el (vhdl-prompt, vhdl-attribute, vhdl-enumvalue) (vhdl-function, vhdl-directive, vhdl-reserved-word) (vhdl-translate-off): Remove "-face" suffix and "font-lock-" from face names. (vhdl-speedbar-entity, vhdl-speedbar-architecture) (vhdl-speedbar-configuration, vhdl-speedbar-package) (vhdl-speedbar-library, vhdl-speedbar-instantiation) (vhdl-speedbar-subprogram, vhdl-speedbar-entity-selected) (vhdl-speedbar-architecture-selected) (vhdl-speedbar-configuration-selected) (vhdl-speedbar-package-selected) (vhdl-speedbar-instantiation-selected): Remove "-face" suffix from face names. (vhdl-font-lock-keywords-2, vhdl-font-lock-keywords-5): Use renamed faces. (vhdl-prompt-face, vhdl-attribute-face, vhdl-enumvalue-face) (vhdl-function-face, vhdl-directive-face, vhdl-reserved-words-face) (vhdl-translate-off-face): Variables renamed to remove "font-lock-". Use renamed faces. (syntax-alist): Don't use "font-lock-" or "-face" in generated face names. (vhdl-font-lock-init, vhdl-ps-print-settings): Use renamed faces. (vhdl-speedbar-insert-hierarchy, vhdl-speedbar-expand-entity) (vhdl-speedbar-expand-package, vhdl-speedbar-update-current-unit) (vhdl-speedbar-make-inst-line, vhdl-speedbar-make-pack-line) (vhdl-speedbar-make-subpack-line, vhdl-speedbar-make-subprogram-line) (vhdl-speedbar-item-info, vhdl-speedbar-check-unit): Use renamed faces. --- lisp/ChangeLog | 28 ++++++ lisp/progmodes/vhdl-mode.el | 234 +++++++++++++++++++++++++------------------- 2 files changed, 159 insertions(+), 103 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b4cebfd0565..e24311ca65f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,33 @@ 2005-06-14 Miles Bader + * progmodes/vhdl-mode.el (vhdl-prompt, vhdl-attribute, vhdl-enumvalue) + (vhdl-function, vhdl-directive, vhdl-reserved-word) + (vhdl-translate-off): Remove "-face" suffix and "font-lock-" from face + names. + (vhdl-speedbar-entity, vhdl-speedbar-architecture) + (vhdl-speedbar-configuration, vhdl-speedbar-package) + (vhdl-speedbar-library, vhdl-speedbar-instantiation) + (vhdl-speedbar-subprogram, vhdl-speedbar-entity-selected) + (vhdl-speedbar-architecture-selected) + (vhdl-speedbar-configuration-selected) + (vhdl-speedbar-package-selected) + (vhdl-speedbar-instantiation-selected): Remove "-face" suffix from face + names. + (vhdl-font-lock-keywords-2, vhdl-font-lock-keywords-5): + Use renamed faces. + (vhdl-prompt-face, vhdl-attribute-face, vhdl-enumvalue-face) + (vhdl-function-face, vhdl-directive-face, vhdl-reserved-words-face) + (vhdl-translate-off-face): Variables renamed to remove "font-lock-". + Use renamed faces. + (syntax-alist): Don't use "font-lock-" or "-face" in generated face + names. + (vhdl-font-lock-init, vhdl-ps-print-settings): Use renamed faces. + (vhdl-speedbar-insert-hierarchy, vhdl-speedbar-expand-entity) + (vhdl-speedbar-expand-package, vhdl-speedbar-update-current-unit) + (vhdl-speedbar-make-inst-line, vhdl-speedbar-make-pack-line) + (vhdl-speedbar-make-subpack-line, vhdl-speedbar-make-subprogram-line) + (vhdl-speedbar-item-info, vhdl-speedbar-check-unit): Use renamed faces. + * progmodes/sh-script.el (sh-heredoc): Remove "-face" suffix from face name. (sh-heredoc-face): New backward-compatibility alias for renamed face. diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index d30b3a565a0..9885e9ae039 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -1379,11 +1379,11 @@ Option `vhdl-align-groups' still applies within these blocks." (defcustom vhdl-highlight-keywords t "*Non-nil means highlight VHDL keywords and other standardized words. The following faces are used: - `font-lock-keyword-face' : keywords - `font-lock-type-face' : standardized types - `vhdl-font-lock-attribute-face': standardized attributes - `vhdl-font-lock-enumvalue-face': standardized enumeration values - `vhdl-font-lock-function-face' : standardized function and package names + `font-lock-keyword-face' : keywords + `font-lock-type' : standardized types + `vhdl-attribute' : standardized attributes + `vhdl-enumvalue' : standardized enumeration values + `vhdl-function' : standardized function and package names NOTE: Activate the new setting in a VHDL buffer by re-fontifying it (menu entry \"Fontify Buffer\")." @@ -1398,7 +1398,7 @@ The following faces are used: `font-lock-function-name-face' : names in declarations of units, subprograms, components, as well as labels of VHDL constructs `font-lock-type-face' : names in type/nature declarations - `vhdl-font-lock-attribute-face': names in attribute declarations + `vhdl-attribute' : names in attribute declarations `font-lock-variable-name-face' : names in declarations of signals, variables, constants, subprogram parameters, generics, and ports @@ -1426,7 +1426,7 @@ NOTE: Activate the new setting in a VHDL buffer by re-fontifying it (menu "*Non-nil means highlight forbidden words. The reserved words specified in option `vhdl-forbidden-words' or having the syntax specified in option `vhdl-forbidden-syntax' are highlighted in a -warning color (face `vhdl-font-lock-reserved-words-face') to indicate not to +warning color (face `vhdl-reserved-word') to indicate not to use them. NOTE: Activate the new setting in a VHDL buffer by re-fontifying it (menu @@ -1440,7 +1440,7 @@ NOTE: Activate the new setting in a VHDL buffer by re-fontifying it (menu (defcustom vhdl-highlight-verilog-keywords nil "*Non-nil means highlight Verilog keywords as reserved words. Verilog keywords are highlighted in a warning color (face -`vhdl-font-lock-reserved-words-face') to indicate not to use them. +`vhdl-reserved-word') to indicate not to use them. NOTE: Activate the new setting in a VHDL buffer by re-fontifying it (menu entry \"Fontify Buffer\")." @@ -1454,7 +1454,7 @@ NOTE: Activate the new setting in a VHDL buffer by re-fontifying it (menu "*Non-nil means background-highlight code excluded from translation. That is, all code between \"-- pragma translate_off\" and \"-- pragma translate_on\" is highlighted using a different background color -\(face `vhdl-font-lock-translate-off-face'). +\(face `vhdl-translate-off'). Note: this might slow down on-the-fly fontification (and thus editing). NOTE: Activate the new setting in a VHDL buffer by re-fontifying it (menu @@ -1501,7 +1501,7 @@ different kinds of signals (e.g. \"Clk50\", \"Rst_n\") or objects (e.g. \"Signal_s\", \"Variable_v\", \"Constant_c\") by distinguishing them using common substrings or name suffices. For each entry, a new face is generated with the specified colors and name -\"vhdl-font-lock-\" + name + \"-face\". +\"vhdl-\" + name. NOTE: Activate a changed regexp in a VHDL buffer by re-fontifying it (menu entry \"Fontify Buffer\"). All other changes require restarting Emacs." @@ -12484,7 +12484,7 @@ This does highlighting of keywords and standard identifiers.") (list (concat "^\\s-*attribute\\s-+\\(\\w+\\)") - 1 'vhdl-font-lock-attribute-face) + 1 'vhdl-attribute) ;; highlight type/nature name in (sub)type/(sub)nature declarations (list @@ -12542,40 +12542,39 @@ This does highlighting of additional reserved words.") (defconst vhdl-font-lock-keywords-5 ;; background highlight translate-off regions - '((vhdl-match-translate-off (0 vhdl-font-lock-translate-off-face append))) + '((vhdl-match-translate-off (0 vhdl-translate-off-face append))) "For consideration as a value of `vhdl-font-lock-keywords'. This does background highlighting of translate-off regions.") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Font and color definitions -(defvar vhdl-font-lock-prompt-face 'vhdl-font-lock-prompt-face +(defvar vhdl-prompt-face 'vhdl-prompt "Face name to use for prompts.") -(defvar vhdl-font-lock-attribute-face 'vhdl-font-lock-attribute-face +(defvar vhdl-attribute-face 'vhdl-attribute "Face name to use for standardized attributes.") -(defvar vhdl-font-lock-enumvalue-face 'vhdl-font-lock-enumvalue-face +(defvar vhdl-enumvalue-face 'vhdl-enumvalue "Face name to use for standardized enumeration values.") -(defvar vhdl-font-lock-function-face 'vhdl-font-lock-function-face +(defvar vhdl-function-face 'vhdl-function "Face name to use for standardized functions and packages.") -(defvar vhdl-font-lock-directive-face 'vhdl-font-lock-directive-face +(defvar vhdl-directive-face 'vhdl-directive "Face name to use for directives.") -(defvar vhdl-font-lock-reserved-words-face 'vhdl-font-lock-reserved-words-face +(defvar vhdl-reserved-words-face 'vhdl-reserved-words "Face name to use for additional reserved words.") -(defvar vhdl-font-lock-translate-off-face 'vhdl-font-lock-translate-off-face +(defvar vhdl-translate-off-face 'vhdl-translate-off "Face name to use for translate-off regions.") ;; face names to use for words with special syntax. (let ((syntax-alist vhdl-special-syntax-alist) name) (while syntax-alist - (setq name (vhdl-function-name - "vhdl-font-lock" (nth 0 (car syntax-alist)) "face")) + (setq name (vhdl-function-name "vhdl" (nth 0 (car syntax-alist)))) (eval `(defvar ,name ',name ,(concat "Face name to use for " (nth 0 (car syntax-alist)) "."))) @@ -12599,7 +12598,7 @@ This does background highlighting of translate-off regions.") (custom-add-to-group 'vhdl-highlight-faces 'font-lock-variable-name-face 'custom-face) -(defface vhdl-font-lock-prompt-face +(defface vhdl-prompt '((((min-colors 88) (class color) (background light)) (:foreground "Red1" :bold t)) (((class color) (background light)) (:foreground "Red" :bold t)) @@ -12608,40 +12607,50 @@ This does background highlighting of translate-off regions.") "Font lock mode face used to highlight prompts." :group 'vhdl-highlight-faces :group 'font-lock-highlighting-faces) +;; backward-compatibility alias +(put 'vhdl-font-lock-prompt-face 'face-alias 'vhdl-prompt) -(defface vhdl-font-lock-attribute-face +(defface vhdl-attribute '((((class color) (background light)) (:foreground "Orchid")) (((class color) (background dark)) (:foreground "LightSteelBlue")) (t (:italic t :bold t))) "Font lock mode face used to highlight standardized attributes." :group 'vhdl-highlight-faces :group 'font-lock-highlighting-faces) +;; backward-compatibility alias +(put 'vhdl-font-lock-attribute-face 'face-alias 'vhdl-attribute) -(defface vhdl-font-lock-enumvalue-face +(defface vhdl-enumvalue '((((class color) (background light)) (:foreground "SaddleBrown")) (((class color) (background dark)) (:foreground "BurlyWood")) (t (:italic t :bold t))) "Font lock mode face used to highlight standardized enumeration values." :group 'vhdl-highlight-faces :group 'font-lock-highlighting-faces) +;; backward-compatibility alias +(put 'vhdl-font-lock-enumvalue-face 'face-alias 'vhdl-enumvalue) -(defface vhdl-font-lock-function-face +(defface vhdl-function '((((class color) (background light)) (:foreground "Cyan4")) (((class color) (background dark)) (:foreground "Orchid1")) (t (:italic t :bold t))) "Font lock mode face used to highlight standardized functions and packages." :group 'vhdl-highlight-faces :group 'font-lock-highlighting-faces) +;; backward-compatibility alias +(put 'vhdl-font-lock-function-face 'face-alias 'vhdl-function) -(defface vhdl-font-lock-directive-face +(defface vhdl-directive '((((class color) (background light)) (:foreground "CadetBlue")) (((class color) (background dark)) (:foreground "Aquamarine")) (t (:italic t :bold t))) "Font lock mode face used to highlight directives." :group 'vhdl-highlight-faces :group 'font-lock-highlighting-faces) +;; backward-compatibility alias +(put 'vhdl-font-lock-directive-face 'face-alias 'vhdl-directive) -(defface vhdl-font-lock-reserved-words-face +(defface vhdl-reserved-word '((((class color) (background light)) (:foreground "Orange" :bold t)) (((min-colors 88) (class color) (background dark)) (:foreground "Yellow1" :bold t)) @@ -12650,20 +12659,23 @@ This does background highlighting of translate-off regions.") "Font lock mode face used to highlight additional reserved words." :group 'vhdl-highlight-faces :group 'font-lock-highlighting-faces) +;; backward-compatibility alias +(put 'vhdl-font-lock-reserved-words-face 'face-alias 'vhdl-reserved-word) -(defface vhdl-font-lock-translate-off-face +(defface vhdl-translate-off '((((class color) (background light)) (:background "LightGray")) (((class color) (background dark)) (:background "DimGray")) (t ())) "Font lock mode face used to background highlight translate-off regions." :group 'vhdl-highlight-faces :group 'font-lock-highlighting-faces) +;; backward-compatibility alias +(put 'vhdl-font-lock-translate-off-face 'face-alias 'vhdl-translate-off) ;; font lock mode faces used to highlight words with special syntax. (let ((syntax-alist vhdl-special-syntax-alist)) (while syntax-alist - (eval `(defface ,(vhdl-function-name - "vhdl-font-lock" (caar syntax-alist) "face") + (eval `(defface ,(vhdl-function-name "vhdl" (caar syntax-alist)) '((((class color) (background light)) (:foreground ,(nth 2 (car syntax-alist)))) (((class color) (background dark)) @@ -12684,20 +12696,19 @@ This does background highlighting of translate-off regions.") (setq vhdl-font-lock-keywords-0 (list (list (concat "\\(^\\|[ \t(.']\\)\\(<" vhdl-template-prompt-syntax ">\\)") - 2 'vhdl-font-lock-prompt-face t) + 2 'vhdl-prompt t) (list (concat "--\\s-*" vhdl-directive-keywords-regexp "\\s-+\\(.*\\)$") - 2 'vhdl-font-lock-directive-face t))) + 2 'vhdl-directive t))) ;; highlight keywords and standardized types, attributes, enumeration ;; values, and subprograms (setq vhdl-font-lock-keywords-1 (list - (list (concat "'" vhdl-attributes-regexp) - 1 'vhdl-font-lock-attribute-face) + (list (concat "'" vhdl-attributes-regexp) 1 'vhdl-attribute) (list vhdl-types-regexp 1 'font-lock-type-face) - (list vhdl-functions-regexp 1 'vhdl-font-lock-function-face) - (list vhdl-packages-regexp 1 'vhdl-font-lock-function-face) - (list vhdl-enum-values-regexp 1 'vhdl-font-lock-enumvalue-face) + (list vhdl-functions-regexp 1 'vhdl-function) + (list vhdl-packages-regexp 1 'vhdl-function) + (list vhdl-enum-values-regexp 1 'vhdl-enumvalue) (list vhdl-keywords-regexp 1 'font-lock-keyword-face))) ;; highlight words with special syntax. (setq vhdl-font-lock-keywords-3 @@ -12708,14 +12719,13 @@ This does background highlighting of translate-off regions.") (cons (cons (concat "\\<\\(" (nth 1 (car syntax-alist)) "\\)\\>") (vhdl-function-name - "vhdl-font-lock" (nth 0 (car syntax-alist)) "face")) + "vhdl" (nth 0 (car syntax-alist)))) keywords)) (setq syntax-alist (cdr syntax-alist))) keywords)) ;; highlight additional reserved words (setq vhdl-font-lock-keywords-4 - (list (list vhdl-reserved-words-regexp 1 - 'vhdl-font-lock-reserved-words-face))) + (list (list vhdl-reserved-words-regexp 1 'vhdl-reserved-word))) ;; highlight everything together (setq vhdl-font-lock-keywords (append @@ -12753,18 +12763,12 @@ This does background highlighting of translate-off regions.") (unless (or (not vhdl-print-customize-faces) ps-print-color-p) (set (make-local-variable 'ps-bold-faces) - '(font-lock-keyword-face - font-lock-type-face - vhdl-font-lock-attribute-face - vhdl-font-lock-enumvalue-face - vhdl-font-lock-directive-face)) + '(font-lock-keyword-face font-lock-type-face + vhdl-attribute vhdl-enumvalue vhdl-directive)) (set (make-local-variable 'ps-italic-faces) '(font-lock-comment-face - font-lock-function-name-face - font-lock-type-face - vhdl-font-lock-attribute-face - vhdl-font-lock-enumvalue-face - vhdl-font-lock-directive-face)) + font-lock-function-name-face font-lock-type-face + vhdl-attribute vhdl-enumvalue vhdl-directive)) (set (make-local-variable 'ps-underlined-faces) '(font-lock-string-face)) (setq ps-always-build-face-reference t)) @@ -13973,7 +13977,7 @@ otherwise use cached data." 'bracket ?+ 'vhdl-speedbar-expand-entity (nth 0 ent-entry) (nth 1 ent-entry) 'vhdl-speedbar-find-file (cons (nth 2 ent-entry) (nth 3 ent-entry)) - 'vhdl-speedbar-entity-face depth) + 'vhdl-speedbar-entity depth) (unless (nth 2 ent-entry) (end-of-line 0) (insert "!") (forward-char 1)) (unless (member (nth 0 ent-entry) ent-inst-list) @@ -13987,7 +13991,7 @@ otherwise use cached data." 'bracket ?+ 'vhdl-speedbar-expand-config (nth 0 conf-entry) (nth 1 conf-entry) 'vhdl-speedbar-find-file (cons (nth 2 conf-entry) (nth 3 conf-entry)) - 'vhdl-speedbar-configuration-face depth) + 'vhdl-speedbar-configuration depth) (setq conf-alist (cdr conf-alist))) ;; insert packages (when pack-alist (vhdl-speedbar-make-title-line "Packages:" depth)) @@ -14178,7 +14182,7 @@ otherwise use cached data." (cons token (nth 0 arch-entry)) (nth 1 arch-entry) 'vhdl-speedbar-find-file (cons (nth 2 arch-entry) (nth 3 arch-entry)) - 'vhdl-speedbar-architecture-face (1+ indent)) + 'vhdl-speedbar-architecture (1+ indent)) (setq arch-alist (cdr arch-alist))) ;; insert instantiations (when inst-alist @@ -14361,7 +14365,7 @@ otherwise use cached data." (cons token (nth 0 comp-entry)) (nth 1 comp-entry) 'vhdl-speedbar-find-file (cons (nth 2 comp-entry) (nth 3 comp-entry)) - 'vhdl-speedbar-entity-face (1+ indent)) + 'vhdl-speedbar-entity (1+ indent)) (setq comp-alist (cdr comp-alist))) ;; insert subprograms (when func-alist @@ -14477,43 +14481,43 @@ NO-POSITION non-nil means do not re-position cursor." (let* ((file-entry (aget file-alist speedbar-last-selected-file t))) (vhdl-speedbar-update-units "\\[.\\] " (nth 0 file-entry) - speedbar-last-selected-file 'vhdl-speedbar-entity-face) + speedbar-last-selected-file 'vhdl-speedbar-entity) (vhdl-speedbar-update-units "{.} " (nth 1 file-entry) - speedbar-last-selected-file 'vhdl-speedbar-architecture-face) + speedbar-last-selected-file 'vhdl-speedbar-architecture) (vhdl-speedbar-update-units "\\[.\\] " (nth 3 file-entry) - speedbar-last-selected-file 'vhdl-speedbar-configuration-face) + speedbar-last-selected-file 'vhdl-speedbar-configuration) (vhdl-speedbar-update-units "[]>] " (nth 4 file-entry) - speedbar-last-selected-file 'vhdl-speedbar-package-face) + speedbar-last-selected-file 'vhdl-speedbar-package) (vhdl-speedbar-update-units "\\[.\\].+(" '("body") - speedbar-last-selected-file 'vhdl-speedbar-package-face) + speedbar-last-selected-file 'vhdl-speedbar-package) (vhdl-speedbar-update-units "> " (nth 6 file-entry) - speedbar-last-selected-file 'vhdl-speedbar-instantiation-face)) + speedbar-last-selected-file 'vhdl-speedbar-instantiation)) ;; highlight current units (let* ((file-entry (aget file-alist file-name t))) (setq pos (vhdl-speedbar-update-units "\\[.\\] " (nth 0 file-entry) - file-name 'vhdl-speedbar-entity-selected-face pos) + file-name 'vhdl-speedbar-entity-selected pos) pos (vhdl-speedbar-update-units "{.} " (nth 1 file-entry) - file-name 'vhdl-speedbar-architecture-selected-face pos) + file-name 'vhdl-speedbar-architecture-selected pos) pos (vhdl-speedbar-update-units "\\[.\\] " (nth 3 file-entry) - file-name 'vhdl-speedbar-configuration-selected-face pos) + file-name 'vhdl-speedbar-configuration-selected pos) pos (vhdl-speedbar-update-units "[]>] " (nth 4 file-entry) - file-name 'vhdl-speedbar-package-selected-face pos) + file-name 'vhdl-speedbar-package-selected pos) pos (vhdl-speedbar-update-units "\\[.\\].+(" '("body") - file-name 'vhdl-speedbar-package-selected-face pos) + file-name 'vhdl-speedbar-package-selected pos) pos (vhdl-speedbar-update-units "> " (nth 6 file-entry) - file-name 'vhdl-speedbar-instantiation-selected-face pos)))))) + file-name 'vhdl-speedbar-instantiation-selected pos)))))) ;; move speedbar so the first highlighted unit is visible (when (and pos (not no-position)) (goto-char pos) @@ -14564,21 +14568,21 @@ NO-POSITION non-nil means do not re-position cursor." (insert "(top)") (insert inst-name) (speedbar-make-button - start (point) 'vhdl-speedbar-instantiation-face 'speedbar-highlight-face + start (point) 'vhdl-speedbar-instantiation 'speedbar-highlight-face 'vhdl-speedbar-find-file inst-file-marker)) (insert delimiter) (when ent-name (setq start (point)) (insert ent-name) (speedbar-make-button - start (point) 'vhdl-speedbar-entity-face 'speedbar-highlight-face + start (point) 'vhdl-speedbar-entity 'speedbar-highlight-face 'vhdl-speedbar-find-file ent-file-marker) (when arch-name (insert " (") (setq start (point)) (insert arch-name) (speedbar-make-button - start (point) 'vhdl-speedbar-architecture-face 'speedbar-highlight-face + start (point) 'vhdl-speedbar-architecture 'speedbar-highlight-face 'vhdl-speedbar-find-file arch-file-marker) (insert ")")) (when conf-name @@ -14586,14 +14590,14 @@ NO-POSITION non-nil means do not re-position cursor." (setq start (point)) (insert conf-name) (speedbar-make-button - start (point) 'vhdl-speedbar-configuration-face 'speedbar-highlight-face + start (point) 'vhdl-speedbar-configuration 'speedbar-highlight-face 'vhdl-speedbar-find-file conf-file-marker) (insert ")"))) (when (and lib-name (not (equal lib-name (downcase (vhdl-work-library))))) (setq start (point)) (insert " (" lib-name ")") (put-text-property (+ 2 start) (1- (point)) 'face - 'vhdl-speedbar-library-face)) + 'vhdl-speedbar-library)) (insert-char ?\n 1) (put-text-property visible-start (point) 'invisible nil))) @@ -14617,7 +14621,7 @@ NO-POSITION non-nil means do not re-position cursor." (setq start (point)) (insert pack-name) (speedbar-make-button - start (point) 'vhdl-speedbar-package-face 'speedbar-highlight-face + start (point) 'vhdl-speedbar-package 'speedbar-highlight-face 'vhdl-speedbar-find-file pack-file-marker) (unless (car pack-file-marker) (insert "!")) @@ -14626,7 +14630,7 @@ NO-POSITION non-nil means do not re-position cursor." (setq start (point)) (insert "body") (speedbar-make-button - start (point) 'vhdl-speedbar-package-face 'speedbar-highlight-face + start (point) 'vhdl-speedbar-package 'speedbar-highlight-face 'vhdl-speedbar-find-file body-file-marker) (insert ")")) (insert-char ?\n 1) @@ -14650,12 +14654,12 @@ NO-POSITION non-nil means do not re-position cursor." (setq start (point)) (insert pack-name) (speedbar-make-button - start (point) 'vhdl-speedbar-package-face 'speedbar-highlight-face + start (point) 'vhdl-speedbar-package 'speedbar-highlight-face 'vhdl-speedbar-find-file pack-file-marker) (setq start (point)) (insert " (" lib-name ")") (put-text-property (+ 2 start) (1- (point)) 'face - 'vhdl-speedbar-library-face) + 'vhdl-speedbar-library) (insert-char ?\n 1) (put-text-property visible-start (point) 'invisible nil))) @@ -14678,14 +14682,14 @@ NO-POSITION non-nil means do not re-position cursor." (setq start (point)) (insert func-name) (speedbar-make-button - start (point) 'vhdl-speedbar-subprogram-face 'speedbar-highlight-face + start (point) 'vhdl-speedbar-subprogram 'speedbar-highlight-face 'vhdl-speedbar-find-file func-file-marker) (when (car func-body-file-marker) (insert " (") (setq start (point)) (insert "body") (speedbar-make-button - start (point) 'vhdl-speedbar-subprogram-face 'speedbar-highlight-face + start (point) 'vhdl-speedbar-subprogram 'speedbar-highlight-face 'vhdl-speedbar-find-file func-body-file-marker) (insert ")")) (insert-char ?\n 1) @@ -14773,22 +14777,22 @@ NO-POSITION non-nil means do not re-position cursor." (message "%s \"%s\" in \"%s\"" ;; design unit kind - (cond ((or (eq face 'vhdl-speedbar-entity-face) - (eq face 'vhdl-speedbar-entity-selected-face)) + (cond ((or (eq face 'vhdl-speedbar-entity) + (eq face 'vhdl-speedbar-entity-selected)) (if (equal (match-string 2) ">") "Component" "Entity")) - ((or (eq face 'vhdl-speedbar-architecture-face) - (eq face 'vhdl-speedbar-architecture-selected-face)) + ((or (eq face 'vhdl-speedbar-architecture) + (eq face 'vhdl-speedbar-architecture-selected)) "Architecture") - ((or (eq face 'vhdl-speedbar-configuration-face) - (eq face 'vhdl-speedbar-configuration-selected-face)) + ((or (eq face 'vhdl-speedbar-configuration) + (eq face 'vhdl-speedbar-configuration-selected)) "Configuration") - ((or (eq face 'vhdl-speedbar-package-face) - (eq face 'vhdl-speedbar-package-selected-face)) + ((or (eq face 'vhdl-speedbar-package) + (eq face 'vhdl-speedbar-package-selected)) "Package") - ((or (eq face 'vhdl-speedbar-instantiation-face) - (eq face 'vhdl-speedbar-instantiation-selected-face)) + ((or (eq face 'vhdl-speedbar-instantiation) + (eq face 'vhdl-speedbar-instantiation-selected)) "Instantiation") - ((eq face 'vhdl-speedbar-subprogram-face) + ((eq face 'vhdl-speedbar-subprogram) "Subprogram") (t "")) ;; design unit name @@ -14964,11 +14968,11 @@ expansion function)." (speedbar-position-cursor-on-line) (cond ((eq design-unit 'entity) (memq (get-text-property (match-end 0) 'face) - '(vhdl-speedbar-entity-face - vhdl-speedbar-entity-selected-face))) + '(vhdl-speedbar-entity + vhdl-speedbar-entity-selected))) ((eq design-unit 'subprogram) (eq (get-text-property (match-end 0) 'face) - 'vhdl-speedbar-subprogram-face)) + 'vhdl-speedbar-subprogram)) (t nil)))) (defun vhdl-speedbar-set-depth (depth) @@ -14979,82 +14983,106 @@ expansion function)." ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Fontification -(defface vhdl-speedbar-entity-face +(defface vhdl-speedbar-entity '((((class color) (background light)) (:foreground "ForestGreen")) (((class color) (background dark)) (:foreground "PaleGreen"))) "Face used for displaying entity names." :group 'speedbar-faces) +;; backward-compatibility alias +(put 'vhdl-speedbar-entity-face 'face-alias 'vhdl-speedbar-entity) -(defface vhdl-speedbar-architecture-face +(defface vhdl-speedbar-architecture '((((min-colors 88) (class color) (background light)) (:foreground "Blue1")) (((class color) (background light)) (:foreground "Blue")) (((class color) (background dark)) (:foreground "LightSkyBlue"))) "Face used for displaying architecture names." :group 'speedbar-faces) +;; backward-compatibility alias +(put 'vhdl-speedbar-architecture-face 'face-alias 'vhdl-speedbar-architecture) -(defface vhdl-speedbar-configuration-face +(defface vhdl-speedbar-configuration '((((class color) (background light)) (:foreground "DarkGoldenrod")) (((class color) (background dark)) (:foreground "Salmon"))) "Face used for displaying configuration names." :group 'speedbar-faces) +;; backward-compatibility alias +(put 'vhdl-speedbar-configuration-face 'face-alias 'vhdl-speedbar-configuration) -(defface vhdl-speedbar-package-face +(defface vhdl-speedbar-package '((((class color) (background light)) (:foreground "Grey50")) (((class color) (background dark)) (:foreground "Grey80"))) "Face used for displaying package names." :group 'speedbar-faces) +;; backward-compatibility alias +(put 'vhdl-speedbar-package-face 'face-alias 'vhdl-speedbar-package) -(defface vhdl-speedbar-library-face +(defface vhdl-speedbar-library '((((class color) (background light)) (:foreground "Purple")) (((class color) (background dark)) (:foreground "Orchid1"))) "Face used for displaying library names." :group 'speedbar-faces) +;; backward-compatibility alias +(put 'vhdl-speedbar-library-face 'face-alias 'vhdl-speedbar-library) -(defface vhdl-speedbar-instantiation-face +(defface vhdl-speedbar-instantiation '((((class color) (background light)) (:foreground "Brown")) (((min-colors 88) (class color) (background dark)) (:foreground "Yellow1")) (((class color) (background dark)) (:foreground "Yellow"))) "Face used for displaying instantiation names." :group 'speedbar-faces) +;; backward-compatibility alias +(put 'vhdl-speedbar-instantiation-face 'face-alias 'vhdl-speedbar-instantiation) -(defface vhdl-speedbar-subprogram-face +(defface vhdl-speedbar-subprogram '((((class color) (background light)) (:foreground "Orchid4")) (((class color) (background dark)) (:foreground "BurlyWood2"))) "Face used for displaying subprogram names." :group 'speedbar-faces) +;; backward-compatibility alias +(put 'vhdl-speedbar-subprogram-face 'face-alias 'vhdl-speedbar-subprogram) -(defface vhdl-speedbar-entity-selected-face +(defface vhdl-speedbar-entity-selected '((((class color) (background light)) (:foreground "ForestGreen" :underline t)) (((class color) (background dark)) (:foreground "PaleGreen" :underline t))) "Face used for displaying entity names." :group 'speedbar-faces) +;; backward-compatibility alias +(put 'vhdl-speedbar-entity-selected-face 'face-alias 'vhdl-speedbar-entity-selected) -(defface vhdl-speedbar-architecture-selected-face +(defface vhdl-speedbar-architecture-selected '((((min-colors 88) (class color) (background light)) (:foreground "Blue1" :underline t)) (((min-colors 88) (class color) (background light)) (:foreground "Blue1" :underline t)) (((class color) (background light)) (:foreground "Blue" :underline t)) (((class color) (background dark)) (:foreground "LightSkyBlue" :underline t))) "Face used for displaying architecture names." :group 'speedbar-faces) +;; backward-compatibility alias +(put 'vhdl-speedbar-architecture-selected-face 'face-alias 'vhdl-speedbar-architecture-selected) -(defface vhdl-speedbar-configuration-selected-face +(defface vhdl-speedbar-configuration-selected '((((class color) (background light)) (:foreground "DarkGoldenrod" :underline t)) (((class color) (background dark)) (:foreground "Salmon" :underline t))) "Face used for displaying configuration names." :group 'speedbar-faces) +;; backward-compatibility alias +(put 'vhdl-speedbar-configuration-selected-face 'face-alias 'vhdl-speedbar-configuration-selected) -(defface vhdl-speedbar-package-selected-face +(defface vhdl-speedbar-package-selected '((((class color) (background light)) (:foreground "Grey50" :underline t)) (((class color) (background dark)) (:foreground "Grey80" :underline t))) "Face used for displaying package names." :group 'speedbar-faces) +;; backward-compatibility alias +(put 'vhdl-speedbar-package-selected-face 'face-alias 'vhdl-speedbar-package-selected) -(defface vhdl-speedbar-instantiation-selected-face +(defface vhdl-speedbar-instantiation-selected '((((class color) (background light)) (:foreground "Brown" :underline t)) (((min-colors 88) (class color) (background dark)) (:foreground "Yellow1" :underline t)) (((class color) (background dark)) (:foreground "Yellow" :underline t))) "Face used for displaying instantiation names." :group 'speedbar-faces) +;; backward-compatibility alias +(put 'vhdl-speedbar-instantiation-selected-face 'face-alias 'vhdl-speedbar-instantiation-selected) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Initialization -- cgit v1.2.1 From 9ce2eb5ebbfda09baafdc5b1cb8f807192f96bfe Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Wed, 15 Jun 2005 00:14:41 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-417 Remove "-face" suffix from which-func face 2005-06-14 Miles Bader * lisp/progmodes/which-func.el (which-func): Remove "-face" suffix from face name. (which-func-face): New backward-compatibility alias for renamed face. (which-func-format): Use renamed which-func face. --- lisp/ChangeLog | 5 +++++ lisp/progmodes/which-func.el | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e24311ca65f..d932c49995c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2005-06-14 Miles Bader + * progmodes/which-func.el (which-func): Remove "-face" suffix from face + name. + (which-func-face): New backward-compatibility alias for renamed face. + (which-func-format): Use renamed which-func face. + * progmodes/vhdl-mode.el (vhdl-prompt, vhdl-attribute, vhdl-enumvalue) (vhdl-function, vhdl-directive, vhdl-reserved-word) (vhdl-translate-off): Remove "-face" suffix and "font-lock-" from face diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el index 1fa37532ab0..960eec2208c 100644 --- a/lisp/progmodes/which-func.el +++ b/lisp/progmodes/which-func.el @@ -113,17 +113,19 @@ Zero means compute the Imenu menu regardless of size." map) "Keymap to display on mode line which-func.") -(defface which-func-face +(defface which-func '((t (:inherit font-lock-function-name-face))) "Face used to highlight mode line function names. Defaults to `font-lock-function-name-face' if font-lock is loaded." :group 'which-func) +;; backward-compatibility alias +(put 'which-func-face 'face-alias 'which-func) (defcustom which-func-format `("[" (:propertize which-func-current local-map ,which-func-keymap - face which-func-face + face which-func ;;mouse-face highlight ; currently not evaluated :-( help-echo "mouse-1: go to beginning, mouse-2: toggle rest visibility, mouse-3: go to end") "]") -- cgit v1.2.1 From e4c067b5d5d0f373d7f5796e7ceb5bf06f1ddca3 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Wed, 15 Jun 2005 00:14:58 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-418 Remove "-face" suffix from cperl-mode faces 2005-06-14 Miles Bader * lisp/progmodes/cperl-mode.el (cperl-nonoverridable, cperl-array) (cperl-hash): Remove "-face" suffix from face names. (cperl-nonoverridable-face, cperl-array-face, cperl-hash-face): New backward-compatibility alias for renamed faces. (cperl-find-pods-heres, cperl-init-faces, cperl-ps-print-init) (cperl-ps-print-face-properties): Use renamed cperl-mode faces. --- lisp/ChangeLog | 7 ++++ lisp/progmodes/cperl-mode.el | 97 ++++++++++++++++++++++---------------------- 2 files changed, 55 insertions(+), 49 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d932c49995c..7cae0df4661 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,12 @@ 2005-06-14 Miles Bader + * progmodes/cperl-mode.el (cperl-nonoverridable, cperl-array) + (cperl-hash): Remove "-face" suffix from face names. + (cperl-nonoverridable-face, cperl-array-face, cperl-hash-face): + New backward-compatibility alias for renamed faces. + (cperl-find-pods-heres, cperl-init-faces, cperl-ps-print-init) + (cperl-ps-print-face-properties): Use renamed cperl-mode faces. + * progmodes/which-func.el (which-func): Remove "-face" suffix from face name. (which-func-face): New backward-compatibility alias for renamed face. diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 355b9694189..d81ee1ad5c2 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -564,11 +564,11 @@ when syntaxifying a chunk of buffer." (font-lock-variable-name-face nil nil bold) (font-lock-function-name-face nil nil bold italic box) (font-lock-constant-face nil "LightGray" bold) - (cperl-array-face nil "LightGray" bold underline) - (cperl-hash-face nil "LightGray" bold italic underline) + (cperl-array nil "LightGray" bold underline) + (cperl-hash nil "LightGray" bold italic underline) (font-lock-comment-face nil "LightGray" italic) (font-lock-string-face nil nil italic underline) - (cperl-nonoverridable-face nil nil italic underline) + (cperl-nonoverridable nil nil italic underline) (font-lock-type-face nil nil underline) (underline nil "LightGray" strikeout)) "List given as an argument to `ps-extend-face-list' in `cperl-ps-print'." @@ -583,7 +583,7 @@ when syntaxifying a chunk of buffer." (defvar cperl-dark-foreground (cperl-choose-color "orchid1" "orange")) -(defface cperl-nonoverridable-face +(defface cperl-nonoverridable `((((class grayscale) (background light)) (:background "Gray90" :slant italic :underline t)) (((class grayscale) (background dark)) @@ -595,8 +595,10 @@ when syntaxifying a chunk of buffer." (t (:weight bold :underline t))) "Font Lock mode face used non-overridable keywords and modifiers of regexps." :group 'cperl-faces) +;; backward-compatibility alias +(put 'cperl-nonoverridable-face 'face-alias 'cperl-nonoverridable) -(defface cperl-array-face +(defface cperl-array `((((class grayscale) (background light)) (:background "Gray90" :weight bold)) (((class grayscale) (background dark)) @@ -608,8 +610,10 @@ when syntaxifying a chunk of buffer." (t (:weight bold))) "Font Lock mode face used to highlight array names." :group 'cperl-faces) +;; backward-compatibility alias +(put 'cperl-array-face 'face-alias 'cperl-array) -(defface cperl-hash-face +(defface cperl-hash `((((class grayscale) (background light)) (:background "Gray90" :weight bold :slant italic)) (((class grayscale) (background dark)) @@ -621,6 +625,8 @@ when syntaxifying a chunk of buffer." (t (:weight bold :slant italic))) "Font Lock mode face used to highlight hash names." :group 'cperl-faces) +;; backward-compatibility alias +(put 'cperl-hash-face 'face-alias 'cperl-hash) @@ -867,8 +873,8 @@ B) Speed of editing operations. (defvar cperl-tips-faces 'please-ignore-this-line "CPerl mode uses following faces for highlighting: - `cperl-array-face' Array names - `cperl-hash-face' Hash names + `cperl-array' Array names + `cperl-hash' Hash names `font-lock-comment-face' Comments, PODs and whatever is considered syntaxically to be not code `font-lock-constant-face' HERE-doc delimiters, labels, delimiters of @@ -879,7 +885,7 @@ B) Speed of editing operations. (except those conflicting with Perl operators), package names (when recognized), format names `font-lock-keyword-face' Control flow switch constructs, declarators - `cperl-nonoverridable-face' Non-overridable keywords, modifiers of RExen + `cperl-nonoverridable' Non-overridable keywords, modifiers of RExen `font-lock-string-face' Strings, qw() constructs, RExen, POD sections, literal parts and the terminator of formats and whatever is syntaxically considered @@ -887,7 +893,7 @@ B) Speed of editing operations. `font-lock-type-face' Overridable keywords `font-lock-variable-name-face' Variable declarations, indirect array and hash names, POD headers/item names - `cperl-invalid-face' Trailing whitespace + `cperl-invalid' Trailing whitespace Note that in several situations the highlighting tries to inform about possible confusion, such as different colors for function names in @@ -3167,7 +3173,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', (cperl-nonoverridable-face (if (boundp 'cperl-nonoverridable-face) cperl-nonoverridable-face - 'cperl-nonoverridable-face)) + 'cperl-nonoverridable)) (stop-point (if ignore-max (point-max) max)) @@ -3661,7 +3667,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', (forward-word 1) ; skip modifiers s///s (if tail (cperl-commentify tail (point) t)) (cperl-postpone-fontification - e1 (point) 'face 'cperl-nonoverridable-face))) + e1 (point) 'face 'cperl-nonoverridable))) ;; Check whether it is m// which means "previous match" ;; and highlight differently (setq is-REx @@ -4710,7 +4716,7 @@ indentation and initial hashes. Behaves usually outside of comment." "u\\(se\\|n\\(shift\\|ti\\(l\\|e\\)\\|def\\|less\\)\\)\\|" "while\\|y\\|__\\(END\\|DATA\\)__" ;__DATA__ added manually "\\|[sm]" ; Added manually - "\\)\\>") 2 'cperl-nonoverridable-face) + "\\)\\>") 2 'cperl-nonoverridable) ;; (mapconcat 'identity ;; '("#endif" "#else" "#ifdef" "#ifndef" "#if" ;; "#include" "#define" "#undef") @@ -4854,21 +4860,21 @@ indentation and initial hashes. Behaves usually outside of comment." [nil nil t t t] nil [nil nil t t t]) - (list 'cperl-nonoverridable-face + (list 'cperl-nonoverridable ["chartreuse3" ("orchid1" "orange") nil "Gray80"] [nil nil "gray90"] [nil nil nil t t] [nil nil t t] [nil nil t t t]) - (list 'cperl-array-face + (list 'cperl-array ["blue" "yellow" nil "Gray80"] ["lightyellow2" ("navy" "os2blue" "darkgreen") "gray90"] t nil nil) - (list 'cperl-hash-face + (list 'cperl-hash ["red" "red" nil "Gray80"] ["lightyellow2" ("navy" "os2blue" "darkgreen") "gray90"] @@ -4891,15 +4897,15 @@ indentation and initial hashes. Behaves usually outside of comment." "Face for variable names") (cperl-force-face font-lock-type-face "Face for data types") - (cperl-force-face cperl-nonoverridable-face + (cperl-force-face cperl-nonoverridable "Face for data types from another group") (cperl-force-face font-lock-comment-face "Face for comments") (cperl-force-face font-lock-function-name-face "Face for function names") - (cperl-force-face cperl-hash-face + (cperl-force-face cperl-hash "Face for hashes") - (cperl-force-face cperl-array-face + (cperl-force-face cperl-array "Face for arrays") ;;(defvar font-lock-constant-face 'font-lock-constant-face) ;;(defvar font-lock-variable-name-face 'font-lock-variable-name-face) @@ -4909,7 +4915,7 @@ indentation and initial hashes. Behaves usually outside of comment." ;; "Face to use for data types.")) ;;(or (boundp 'cperl-nonoverridable-face) ;; (defconst cperl-nonoverridable-face - ;; 'cperl-nonoverridable-face + ;; 'cperl-nonoverridable ;; "Face to use for data types from another group.")) ;;(if (not cperl-xemacs-p) nil ;; (or (boundp 'font-lock-comment-face) @@ -4925,26 +4931,24 @@ indentation and initial hashes. Behaves usually outside of comment." ;; 'font-lock-function-name-face ;; "Face to use for function names."))) (if (and - (not (cperl-is-face 'cperl-array-face)) + (not (cperl-is-face 'cperl-array)) (cperl-is-face 'font-lock-emphasized-face)) - (copy-face 'font-lock-emphasized-face 'cperl-array-face)) + (copy-face 'font-lock-emphasized-face 'cperl-array)) (if (and - (not (cperl-is-face 'cperl-hash-face)) + (not (cperl-is-face 'cperl-hash)) (cperl-is-face 'font-lock-other-emphasized-face)) - (copy-face 'font-lock-other-emphasized-face - 'cperl-hash-face)) + (copy-face 'font-lock-other-emphasized-face 'cperl-hash)) (if (and - (not (cperl-is-face 'cperl-nonoverridable-face)) + (not (cperl-is-face 'cperl-nonoverridable)) (cperl-is-face 'font-lock-other-type-face)) - (copy-face 'font-lock-other-type-face - 'cperl-nonoverridable-face)) + (copy-face 'font-lock-other-type-face 'cperl-nonoverridable)) ;;(or (boundp 'cperl-hash-face) ;; (defconst cperl-hash-face - ;; 'cperl-hash-face + ;; 'cperl-hash ;; "Face to use for hashes.")) ;;(or (boundp 'cperl-array-face) ;; (defconst cperl-array-face - ;; 'cperl-array-face + ;; 'cperl-array ;; "Face to use for arrays.")) ;; Here we try to guess background (let ((background @@ -4983,17 +4987,17 @@ indentation and initial hashes. Behaves usually outside of comment." "pink"))) (t (set-face-background 'font-lock-type-face "gray90")))) - (if (cperl-is-face 'cperl-nonoverridable-face) + (if (cperl-is-face 'cperl-nonoverridable) nil - (copy-face 'font-lock-type-face 'cperl-nonoverridable-face) + (copy-face 'font-lock-type-face 'cperl-nonoverridable) (cond ((eq background 'light) - (set-face-foreground 'cperl-nonoverridable-face + (set-face-foreground 'cperl-nonoverridable (if (x-color-defined-p "chartreuse3") "chartreuse3" "chartreuse"))) ((eq background 'dark) - (set-face-foreground 'cperl-nonoverridable-face + (set-face-foreground 'cperl-nonoverridable (if (x-color-defined-p "orchid1") "orchid1" "orange"))))) @@ -5045,20 +5049,15 @@ indentation and initial hashes. Behaves usually outside of comment." '(setq ps-bold-faces ;; font-lock-variable-name-face ;; font-lock-constant-face - (append '(cperl-array-face - cperl-hash-face) + (append '(cperl-array cperl-hash) ps-bold-faces) ps-italic-faces ;; font-lock-constant-face - (append '(cperl-nonoverridable-face - cperl-hash-face) + (append '(cperl-nonoverridable cperl-hash) ps-italic-faces) ps-underlined-faces ;; font-lock-type-face - (append '(cperl-array-face - cperl-hash-face - underline - cperl-nonoverridable-face) + (append '(cperl-array cperl-hash underline cperl-nonoverridable) ps-underlined-faces)))) (defvar ps-print-face-extension-alist) @@ -5091,27 +5090,27 @@ Style of printout regulated by the variable `cperl-ps-print-face-properties'." ;;; (defvar ps-italic-faces nil) ;;; (setq ps-bold-faces ;;; (append '(font-lock-emphasized-face -;;; cperl-array-face +;;; cperl-array ;;; font-lock-keyword-face ;;; font-lock-variable-name-face ;;; font-lock-constant-face ;;; font-lock-reference-face ;;; font-lock-other-emphasized-face -;;; cperl-hash-face) +;;; cperl-hash) ;;; ps-bold-faces)) ;;; (setq ps-italic-faces -;;; (append '(cperl-nonoverridable-face +;;; (append '(cperl-nonoverridable ;;; font-lock-constant-face ;;; font-lock-reference-face ;;; font-lock-other-emphasized-face -;;; cperl-hash-face) +;;; cperl-hash) ;;; ps-italic-faces)) ;;; (setq ps-underlined-faces ;;; (append '(font-lock-emphasized-face -;;; cperl-array-face +;;; cperl-array ;;; font-lock-other-emphasized-face -;;; cperl-hash-face -;;; cperl-nonoverridable-face font-lock-type-face) +;;; cperl-hash +;;; cperl-nonoverridable font-lock-type-face) ;;; ps-underlined-faces)) ;;; (cons 'font-lock-type-face ps-underlined-faces)) -- cgit v1.2.1 From a5d370313684626a2ec1f0f24e54db6499b1c651 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Wed, 15 Jun 2005 00:17:41 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-419 Remove "-face" suffix from ld-script faces 2005-06-14 Miles Bader * lisp/progmodes/ld-script.el (ld-script-location-counter): Remove "-face" suffix from face name. (ld-script-location-counter-face): New backward-compatibility alias for renamed face. (ld-script-location-counter-face): Use renamed face. --- lisp/ChangeLog | 8 +++++++- lisp/progmodes/ld-script.el | 8 +++++--- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7cae0df4661..884b9e0023a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,9 +1,15 @@ 2005-06-14 Miles Bader + * progmodes/ld-script.el (ld-script-location-counter): + Remove "-face" suffix from face name. + (ld-script-location-counter-face): + New backward-compatibility alias for renamed face. + (ld-script-location-counter-face): Use renamed face. + * progmodes/cperl-mode.el (cperl-nonoverridable, cperl-array) (cperl-hash): Remove "-face" suffix from face names. (cperl-nonoverridable-face, cperl-array-face, cperl-hash-face): - New backward-compatibility alias for renamed faces. + New backward-compatibility aliases for renamed faces. (cperl-find-pods-heres, cperl-init-faces, cperl-ps-print-init) (cperl-ps-print-face-properties): Use renamed cperl-mode faces. diff --git a/lisp/progmodes/ld-script.el b/lisp/progmodes/ld-script.el index 120cae538d5..ef24604ba7b 100644 --- a/lisp/progmodes/ld-script.el +++ b/lisp/progmodes/ld-script.el @@ -1,6 +1,6 @@ ;;; ld-script.el --- GNU linker script editing mode for Emacs -;; Copyright (C) 2003 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2005 Free Software Foundation, Inc. ;; Author: Masatake YAMATO ;; Keywords: languages, faces @@ -34,11 +34,13 @@ :prefix "ld-script-" :group 'languages) -(defvar ld-script-location-counter-face 'ld-script-location-counter-face) -(defface ld-script-location-counter-face +(defvar ld-script-location-counter-face 'ld-script-location-counter) +(defface ld-script-location-counter '((t (:weight bold :inherit font-lock-builtin-face))) "Face for location counter in GNU ld script." :group 'ld-script) +;; backward-compatibility alias +(put 'ld-script-location-counter-face 'face-alias 'ld-script-location-counter) ;; Syntax rules (defvar ld-script-mode-syntax-table -- cgit v1.2.1 From e6572f79e39619f87dd8ab1257865924e80bae73 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Wed, 15 Jun 2005 02:27:55 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-420 Fix cperl-mode font-lock problem 2005-06-15 Miles Bader * lisp/progmodes/cperl-mode.el (cperl-init-faces): Use literal cperl faces instead of (non-existent) variables. --- lisp/ChangeLog | 5 +++++ lisp/progmodes/cperl-mode.el | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 884b9e0023a..83e92a71907 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-06-15 Miles Bader + + * progmodes/cperl-mode.el (cperl-init-faces): Use literal cperl + faces instead of (non-existent) variables. + 2005-06-14 Miles Bader * progmodes/ld-script.el (ld-script-location-counter): diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index d81ee1ad5c2..9826c995b97 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -4779,15 +4779,15 @@ indentation and initial hashes. Behaves usually outside of comment." '( ("\\(\\([@%]\\|\$#\\)[a-zA-Z_:][a-zA-Z0-9_:]*\\)" 1 (if (eq (char-after (match-beginning 2)) ?%) - cperl-hash-face - cperl-array-face) + 'cperl-hash + 'cperl-array) t) ; arrays and hashes ("\\(\\([$@]+\\)[a-zA-Z_:][a-zA-Z0-9_:]*\\)[ \t]*\\([[{]\\)" 1 (if (= (- (match-end 2) (match-beginning 2)) 1) (if (eq (char-after (match-beginning 3)) ?{) - cperl-hash-face - cperl-array-face) ; arrays and hashes + 'cperl-hash + 'cperl-array) ; arrays and hashes font-lock-variable-name-face) ; Just to put something t) ;;("\\([smy]\\|tr\\)\\([^a-z_A-Z0-9]\\)\\(\\([^\n\\]*||\\)\\)\\2") -- cgit v1.2.1 From ef88a9999004e6c26148c8d280d6a41f623d7249 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Wed, 15 Jun 2005 04:35:23 +0000 Subject: Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-421 Tweak which-func face 2005-06-15 Miles Bader * lisp/progmodes/which-func.el (which-func): Only inherit `font-lock-function-name-face' when that makes sense against the default mode-line face, otherwise set the face color explicitly. --- lisp/ChangeLog | 4 ++++ lisp/progmodes/which-func.el | 27 ++++++++++++++++++++++++--- 2 files changed, 28 insertions(+), 3 deletions(-) (limited to 'lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 83e92a71907..13d14707284 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2005-06-15 Miles Bader + * progmodes/which-func.el (which-func): Only inherit + `font-lock-function-name-face' when that makes sense against the + default mode-line face, otherwise set the face color explicitly. + * progmodes/cperl-mode.el (cperl-init-faces): Use literal cperl faces instead of (non-existent) variables. diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el index 960eec2208c..a96bd076e12 100644 --- a/lisp/progmodes/which-func.el +++ b/lisp/progmodes/which-func.el @@ -114,9 +114,30 @@ Zero means compute the Imenu menu regardless of size." "Keymap to display on mode line which-func.") (defface which-func - '((t (:inherit font-lock-function-name-face))) - "Face used to highlight mode line function names. -Defaults to `font-lock-function-name-face' if font-lock is loaded." + ;; Whether `font-lock-function-name-face' is an appropriate face to + ;; inherit depends on the mode-line face; define several variants based + ;; on the default mode-line face. + '(;; The default mode-line face on a high-color display is a relatively + ;; light color ("grey75"), and only the light-background variant of + ;; `font-lock-function-name-face' is visible against it. + (((class color) (min-colors 88) (background light)) + :inherit font-lock-function-name-face) + ;; The default mode-line face on other display types is inverse-video; + ;; it seems that only in the dark-background case is + ;; `font-lock-function-name-face' visible against it. + (((class grayscale mono) (background dark)) + :inherit font-lock-function-name-face) + (((class color) (background light)) + :inherit font-lock-function-name-face) + ;; If none of the above cases, use an explicit color chosen to contrast + ;; well with the default mode-line face. + (((class color) (min-colors 88) (background dark)) + :foreground "Blue1") + (((background dark)) + :foreground "Blue1") + (t + :foreground "LightSkyBlue")) + "Face used to highlight mode line function names." :group 'which-func) ;; backward-compatibility alias (put 'which-func-face 'face-alias 'which-func) -- cgit v1.2.1