drkm-lib-cvs Mailing List for Emacs Configuration Project
Brought to you by:
florentgeorges
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(16) |
Jun
|
Jul
(9) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: drkm <flo...@us...> - 2007-01-22 11:32:26
|
Update of /cvsroot/drkm-lib/nxml-mode In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv2419 Modified Files: nxml-mode.el Log Message: nxml-indent-line: Don't modify buffer if line already indented (Lennart Borgman) Index: nxml-mode.el =================================================================== RCS file: /cvsroot/drkm-lib/nxml-mode/nxml-mode.el,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** nxml-mode.el 22 Jan 2007 11:20:47 -0000 1.1.1.1 --- nxml-mode.el 22 Jan 2007 11:32:22 -0000 1.2 *************** *** 1369,1374 **** (let ((bol (point))) (skip-chars-forward " \t") ! (delete-region bol (point))) ! (indent-to indent) (when (> (- (point-max) from-end) (point)) (goto-char (- (point-max) from-end)))))) --- 1369,1375 ---- (let ((bol (point))) (skip-chars-forward " \t") ! (unless (= (current-column) indent) ! (delete-region bol (point)) ! (indent-to indent))) (when (> (- (point-max) from-end) (point)) (goto-char (- (point-max) from-end)))))) |
From: drkm <flo...@us...> - 2005-07-17 00:23:06
|
Update of /cvsroot/drkm-lib/drkm-lib/drkm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6991/drkm Added Files: loaddefs.el Log Message: Initial revision. --- NEW FILE: loaddefs.el --- ;;; loaddefs.el --- Auto-generated CEDET autoloads ;; ;;; Code: ;;;### (autoloads (drkm-face:display-all-faces drkm-face:display-face) ;;;;;; "drkm-face" "drkm-face.el" (17094 29911)) ;;; Generated autoloads from drkm-face.el (put (quote drkm-face:defface) (quote lisp-indent-function) (quote defun)) (drkm-fl:add-defvar-like-keywords (quote (drkm-face:defface))) (put (quote drkm-face:copy-face-attributes) (quote lisp-indent-function) (quote defun)) (autoload (quote drkm-face:display-face) "drkm-face" "\ Affiche les faces employées pour le caractère sous le point. Appelée non-interactivement, utilise le caractère sous le `POINT'. \(fn &optional (POINT (point)))" t nil) (autoload (quote drkm-face:display-all-faces) "drkm-face" "\ Display all faces used in OBJECT (or defined in Emacs if nil). Interactivelly, OBJECT is current buffer if no prefix arg, nil if one universal arg (C-u), or current window if two universal arg \(C-u C-u). \(fn &optional OBJECT)" t nil) (drkm-fl:add-defun-like-keywords (quote (drkm-face:config-define-copy-face))) ;;;*** ;;;### (autoloads (drkm-mml:insert-file-part drkm-mml:insert-part ;;;;;; drkm-mml:decode-parts) "drkm-mml" "drkm-mml.el" (17113 39105)) ;;; Generated autoloads from drkm-mml.el (autoload (quote drkm-mml:decode-parts) "drkm-mml" "\ Decode the parts in the article, and font lock them. To enable 'drkm MML' automatically in Message Mode buffers \(i.e. while composing messages in Gnus), add this in your ~/.gnus.el: (add-hook 'gnus-part-display-hook 'drkm-mml:decode-parts) Take a look at `drkm-mml:part-types-mode-alist' too. You can add default types to Gnus groups by using Gnus group parameters. By example: (push `(\"emacs\" (drkm-mml:default-type . \"application/emacs-lisp\")) gnus-parameters) Note that this uses regexps (here \"emacs\"). \(fn)" nil nil) (autoload (quote drkm-mml:insert-part) "drkm-mml" "\ Insert part markup for MIME-TYPE, leaving the point at the right place. The right place is when the insertion will come, with indentation. \(fn MIME-TYPE)" t nil) (autoload (quote drkm-mml:insert-file-part) "drkm-mml" "\ Insert part markup for MIME-TYPE, as well as the FILE. \(fn FILE &optional MIME-TYPE)" t nil) ;;;*** ;;;### (autoloads nil nil ("drkm-TMP.el" "drkm-TMP.el" "drkm-TMP.el" ;;;;;; "drkm-assert.el" "drkm-assert.el" "drkm-assert.el" "drkm-cl.el" ;;;;;; "drkm-cl.el" "drkm-cl.el" "drkm-comments.el" "drkm-comments.el" ;;;;;; "drkm-comments.el" "drkm-compat.el" "drkm-compat.el" "drkm-compat.el" ;;;;;; "drkm-config.el" "drkm-config.el" "drkm-config.el" "drkm-custom.el" ;;;;;; "drkm-custom.el" "drkm-custom.el" "drkm-el.el" "drkm-el.el" ;;;;;; "drkm-el.el" "drkm-elisp-doc.el" "drkm-elisp-doc.el" "drkm-elisp-doc.el" ;;;;;; "drkm-errors.el" "drkm-errors.el" "drkm-errors.el" "drkm-file.el" ;;;;;; "drkm-file.el" "drkm-file.el" "drkm-font-lock.el" "drkm-font-lock.el" ;;;;;; "drkm-font-lock.el" "drkm-fstyle-drkm.el" "drkm-fstyle-drkm.el" ;;;;;; "drkm-fstyle-drkm.el" "drkm-fstyle.el" "drkm-fstyle.el" "drkm-fstyle.el" ;;;;;; "drkm-ical.el" "drkm-ical.el" "drkm-ical.el" "drkm-key.el" ;;;;;; "drkm-key.el" "drkm-key.el" "drkm-log.el" "drkm-log.el" "drkm-log.el" ;;;;;; "drkm-occur.el" "drkm-occur.el" "drkm-occur.el" "drkm-test.el" ;;;;;; "drkm-test.el" "drkm-test.el" "drkm-time.el" "drkm-time.el" ;;;;;; "drkm-time.el" "drkm-tprop.el" "drkm-tprop.el" "drkm-tprop.el" ;;;;;; "drkm-vcard-mode.el" "drkm-vcard-mode.el" "drkm-vcard-mode.el" ;;;;;; "drkm-vcard-test.el" "drkm-vcard-test.el" "drkm-vcard-test.el" ;;;;;; "drkm-vcard.el" "drkm-vcard.el" "drkm-vcard.el" "drkm-version-is.el" ;;;;;; "drkm-version-is.el" "drkm-version-is.el" "drkm.el" "drkm.el" ;;;;;; "drkm.el" "subdirs.el" "subdirs.el" "subdirs.el") (17113 ;;;;;; 40221 109000)) ;;;*** ;; Local Variables: ;; version-control: never ;; no-byte-compile: t ;; no-update-autoloads: t ;; End: ;;; loaddefs.el ends here |
From: drkm <flo...@us...> - 2005-07-17 00:16:45
|
Update of /cvsroot/drkm-lib/drkm-lib/drkm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5839/drkm-lib/drkm Modified Files: drkm-compat.el drkm-config.el drkm-mml.el Log Message: First real version of drkm-mml + minor changes. Index: drkm-config.el =================================================================== RCS file: /cvsroot/drkm-lib/drkm-lib/drkm/drkm-config.el,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** drkm-config.el 27 May 2005 02:14:49 -0000 1.9 --- drkm-config.el 17 Jul 2005 00:16:33 -0000 1.10 *************** *** 351,355 **** Si l'on désire ne pas charger le fichier `custom-file', on peut ajouter la ligne suivante, avant celles ci-dessus (avant de ! requérir `drkm-conf') : (setq drkm-conf:use-custom-flag nil) --- 351,355 ---- Si l'on désire ne pas charger le fichier `custom-file', on peut ajouter la ligne suivante, avant celles ci-dessus (avant de ! requérir `drkm-config') : (setq drkm-conf:use-custom-flag nil) *************** *** 654,657 **** --- 654,666 ---- ;; TODO: Penser également à l'opportunité de configurer des faces ;; (en les surchargeant ou en en modifiant certains attributs). + ;; + ;; TODO: Cfr. un échange d'email avec zedek, sur ma boîte Gmail, + ;; aux alentours du 7 juillet 2005, de même qu'un file sur + ;; f.c.a.emacs avec zedek toujours, vers la même date. + ;; + ;; Sur Usenet, j'y explique notamment que les keywords :font-lock + ;; et :hooks n'ont pas leur place ici (servent à configurer, donc + ;; dans le config-....el, et pas à configurer le chargement, dans + ;; le top-config-....el). ;; --------------------------------------------------------------------------- (defmacro* drkm-conf:configure (mode &key config config-if-available Index: drkm-compat.el =================================================================== RCS file: /cvsroot/drkm-lib/drkm-lib/drkm/drkm-compat.el,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** drkm-compat.el 22 Oct 2004 00:19:57 -0000 1.1.1.1 --- drkm-compat.el 17 Jul 2005 00:16:33 -0000 1.2 *************** *** 23,49 **** ;; --------------------------------------------------------------------------- ! (when (condition-case nil ! (progn (split-string "" nil t) nil) ! (wrong-number-of-arguments t)) ! ! (defvar split-string-default-separators "[ \f\t\n\r\v]+" ! "FIXME<docstring>: ...") ! (defadvice split-string (around drkm-comp:split-string first ! (string &optional separators omit-nulls) activate) ! "FIXME<docstring>: ... ! Ajoute l'argument OMIT-NULLS et utilise `split-string-default-separators'." ! (let ((really-omit (or (not separators) omit-nulls))) ! (ad-set-args 0 (list string (if separators ! separators ! split-string-default-separators))) ad-do-it ! (when really-omit ! (let ((result '())) ! (dolist (elem ad-return-value) ! (when (not (string= "" elem)) ! (push elem result))) ! (setq ad-return-value (nreverse result))))))) --- 23,42 ---- ;; --------------------------------------------------------------------------- ! (eval-when-compile ! (when (condition-case nil ! (progn (split-string "" nil t) nil) ! (wrong-number-of-arguments t)) ! (defvar split-string-default-separators "[ \f\t\n\r\v]+" ! "Default separators for `split-string'.") ! (defadvice split-string (around drkm-compat:split-string first ! (string &optional separators omit-nulls) activate) ! "Add the OMIT-NULLS argument and use `split-string-default-separators'." ! (ad-set-args 0 (list string (or separators ! split-string-default-separators))) ad-do-it ! (when (and separators (not omit-nulls)) ! (setq ad-return-value (delete "" ad-return-value)))))) *************** *** 60,64 **** (defadvice eval-after-load ! (around drkm-comp:eval-after-load first nil activate) "FIXME<docstring>: ..." (let ((file (ad-get-arg 0))) --- 53,57 ---- (defadvice eval-after-load ! (around drkm-compat:eval-after-load first nil activate) "FIXME<docstring>: ..." (let ((file (ad-get-arg 0))) Index: drkm-mml.el =================================================================== RCS file: /cvsroot/drkm-lib/drkm-lib/drkm/drkm-mml.el,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** drkm-mml.el 31 Dec 2004 07:37:16 -0000 1.1 --- drkm-mml.el 17 Jul 2005 00:16:33 -0000 1.2 *************** *** 5,85 **** ;; Tags: ;; ;; Attrs: ;; ! ;; Copyright (c) 2004 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; ! ;; TODO: Configurer les modes Message, MML, etc. Cfr. par ! ;; exemple `mml-insert-part()', `C-c <RET> p'. ;; ! ;; TODO: Cfr. <wkz...@fg...> à propos du multipart ! ;; sur Usenet. ;; ! ;; TODO: Beaucoup de choses ... Vérifier l'utilisation de MMM ! ;; Mode. Affiner (et documenter) l'identification des limites de ! ;; la région : lignes blanches, indentation, etc. Dans un ! ;; premier temps, favoriser l'utilisation : ;; ! ;; <!#part type="..."> ;; ! ;; ... ;; ! ;; <!#/part> ;; ! ;; Donc : le bloc entier est indenté de 4 espaces, et séparé en ! ;; haut et en bas par une ligne vide, les tags étant eux-mêmes ! ;; séparés du corps par une ligne vide. ;; ! ;; Et ajouter un support à la saisie, c'est à dire en Message ! ;; Mode. Et gérer les parties de texte quotées. Notamment ! ;; lorsque l'on coupe en plein milieu d'une part. Peut-être ! ;; utiliser un autre caractère d'échapement, afin de se ! ;; différencier effectivement du MML de Gnus, et éviter les ! ;; interférences. ;; --------------------------------------------------------------------------- (defgroup drkm-mml nil ! "FIXME<docstring>: ..." :group 'drkm-lib) (defcustom drkm-mml:part-types-mode-alist '(("application/emacs-lisp" . emacs-lisp-mode)) ! "FIXME<docstring>: ... ! TODO: Sans doute une telle liste est-elle déjà disponible dans ! Gnus (association types MIME -> modes Emacs)." :type '(repeat (cons string symbol)) :group 'drkm-mml) ! ;; TODO: Pourquoi est-ce que je m'acharne à utiliser MMM Mode ? MML ! ;; contient déjà tout ce qu'il faut, non ? Humm. ÀMHA, il s'agit ! ;; plutôt de MIME que de MML ... Mais cela ne change rien. Regarder ! ;; comment Gnus active le mode approprié dans ce cas. (defun drkm-mml:decode-parts () ! "FIXME<docstring>: ..." ! (require 'mmm-mode) (save-excursion (goto-char (point-min)) ! (while (search-forward-regexp ! "<!#part[[:space:]]+type=\"\\(.+\\)\"[[:space:]]*>" nil t) (let ((open-beg (match-beginning 0)) ! (open-end (1+ (match-end 0))) (type-mode (cdr (assoc (match-string 1) ! drkm-mml-:part-types-mode-alist)))) (unless type-mode (error "Unknown part type \"%s\"!" (match-string 1))) ! (unless (search-forward "<!#/part>") (error "Bad part format!")) (let ((close-beg (match-beginning 0)) (close-end (1+ (match-end 0)))) ! (put-text-property open-beg open-end 'invisible t) ! (put-text-property open-beg open-end 'intangible t) ! (put-text-property close-beg close-end 'invisible t) ! (put-text-property close-beg close-end 'intangible t) ! (mmm-make-region type-mode open-end close-beg) ! (message "MMMize %S -> %S: %S" open-end clos-beg type-mode)))))) ! (defun drkm-mml:article-mode-hook-func () ! "FIXME<docstring>: ..." ! (set (make-local-variable 'mmm-submode-decoration-level) 0) ! (drkm-mml:decode-parts)) (provide 'drkm-mml) --- 5,296 ---- ;; Tags: ;; ;; Attrs: ;; ! ;; Copyright (c) 2004, 2005 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; ! ;; * Installation: ;; ! ;; You should have the Loaddefs File associated with this file ! ;; (loaddefs.el). Just `load-file' it and put this file ! ;; somewhere Emacs will find it (see the `load-path'). ;; ! ;; To know what to add in you ~/.gnus.el, see the docstring of ! ;; the `drkm-mml:decode-parts' command. ;; ! ;; If you don't have the Loaddefs File for this file, please ! ;; generate it the as usual, or use `(require 'drkm-mml)'. For ! ;; example, if you have CEDET, you can use the following to ! ;; generate the Loaddefs File: ;; ! ;; emacs -batch -l <CEDET>/common/cedet-augen.el \ ! ;; -f cedet-batch-update-autoloads loaddefs.el ;; ! ;; * Using: ;; ! ;; To view the part font locked in Gnus, just read the news :-) ! ;; (if you added the hook as said in the docstring of the command ! ;; `drkm-mml:decode-parts'). ;; ! ;; To add markup while writing an article in Message Mode, you ! ;; can use `C-c d p' to insert markup. You will be prompted for ! ;; the MIME type to use. Default is deduced from the current ! ;; opened Gnus group (with its `drkm-mml:default-type' group ! ;; parameter). ! ;; ! ;; You can use `C-c d f' to insert markup as well as a file. You ! ;; will be prompted for a file name, and for the MIME type. The ! ;; default type will be deduced, if possible, from the file name ! ;; extension. ! ;; ! ;; * Miscellaneous ! ;; ! ;; TODO: Cfr. `mm-display-elisp-inline()' (par exemple) et ! ;; `mm-display-inline-fontify()'. ;; --------------------------------------------------------------------------- + (require 'mailcap) + (defgroup drkm-mml nil ! "'drkm MML', a language for embedding code in articles, w/o MIME multi-part." :group 'drkm-lib) + (defcustom drkm-mml:markup-indent 4 + "Indentation level of the 'drkm MML' markup." + :group 'drkm-mml) + (defcustom drkm-mml:part-indent 4 + "Indentation level of the content of a 'drkm MML' part." + :group 'drkm-mml) + (defcustom drkm-mml:blank-line t + "Inserting a blank line between the markup and the content of a part?" + :group 'drkm-mml) + (defcustom drkm-mml:open-markup "<!#part" + "The head of the opening markup." + :group 'drkm-mml) + (defcustom drkm-mml:open-markup-end ">" + "The tail of the opening markup." + :group 'drkm-mml) + (defcustom drkm-mml:close-markup "<!#/part>" + "The closing markup." + :group 'drkm-mml) + + (defcustom drkm-mml:default-type "application/octet-stream" + "Default MIME type for 'drkm MML'.") (defcustom drkm-mml:part-types-mode-alist '(("application/emacs-lisp" . emacs-lisp-mode)) ! "Alist between MIME types and Emacs modes. ! TODO: I guess such a list is already available in Gnus. Maybe ! `mm-inline-media-tests' in mm-decode.el?" :type '(repeat (cons string symbol)) :group 'drkm-mml) ! (defvar drkm-mml:map ! (let ((map (make-sparse-keymap))) ! (define-key map "p" 'drkm-mml:insert-part) ! (define-key map "f" 'drkm-mml:insert-file-part) ! map) ! "'drkm MML' map.") ! (eval-after-load "message" ! '(define-key message-mode-map (kbd "C-c d") drkm-mml:map)) ! ! (defvar drkm-mml::markup-open-re ! (concat drkm-mml:open-markup ! "[[:space:]]+type=[\"']?\\([-_/a-zA-Z0-9]+\\)[\"']?[[:space:]]*" ! drkm-mml:open-markup-end)) ! ! ;;;###autoload (defun drkm-mml:decode-parts () ! "Decode the parts in the article, and font lock them. ! To enable 'drkm MML' automatically in Message Mode buffers ! \(i.e. while composing messages in Gnus), add this in your ! ~/.gnus.el: ! ! \(add-hook 'gnus-part-display-hook 'drkm-mml:decode-parts) ! ! Take a look at `drkm-mml:part-types-mode-alist' too. You can add ! default types to Gnus groups by using Gnus group parameters. By ! example: ! ! \(push `\(\"emacs\" \(drkm-mml:default-type . \"application/emacs-lisp\")) ! gnus-parameters) ! ! Note that this uses regexps \(here \"emacs\")." (save-excursion (goto-char (point-min)) ! (while (search-forward-regexp drkm-mml::markup-open-re nil t) (let ((open-beg (match-beginning 0)) ! (open-end (match-end 0)) (type-mode (cdr (assoc (match-string 1) ! drkm-mml:part-types-mode-alist)))) (unless type-mode (error "Unknown part type \"%s\"!" (match-string 1))) ! (unless (search-forward drkm-mml:close-markup) (error "Bad part format!")) (let ((close-beg (match-beginning 0)) (close-end (1+ (match-end 0)))) ! (drkm-mml:display-region ! type-mode open-beg open-end close-beg close-end)))))) ! (defun drkm-mml:display-region (mode open-beg open-end close-beg close-end) ! "Display a part, by font locking the content and deleting the markup. ! The opening markup is between OPEN-BEG and OPEN-END, and the ! closing markup is between CLOSE-BEG and CLOSE-END. The content ! is indeed between the opening and the closing markups. First and ! last blank lines of the content are deleted." ! (let ((buf (current-buffer)) ! text) ! (setq open-beg (progn (goto-char open-beg) ! (beginning-of-line) ! (point)) ! open-end (progn (goto-char open-end) ! (while (and (not (eobp)) ! (looking-at "[[:space:]]*$")) ! (beginning-of-line 2)) ! (point)) ! close-beg (progn (goto-char close-beg) ! (beginning-of-line) ! (if (string-match ! "^[[:space:]]*$" (buffer-substring ! (point) close-beg)) ! (progn (while (progn ! (beginning-of-line 0) ! (looking-at "[[:space:]]*$"))) ! (beginning-of-line 2) ! (point)) ! close-beg)) ! close-end (progn (goto-char close-end) ! (end-of-line) ! (point))) ! (setq text (buffer-substring-no-properties open-end close-beg)) ! (delete-region open-beg close-end) ! (with-temp-buffer ! (insert text) ! ;; From Gnus 'mm-view.el'. ! (require 'font-lock) ! ;; Inhibit font-lock this time (*-mode-hook might run ! ;; `turn-on-font-lock') so that jit-lock may not turn off ! ;; font-lock immediately after this. ! (let ((font-lock-mode t)) ! (funcall mode)) ! (let ((font-lock-verbose nil)) ! ;; I find font-lock a bit too verbose. ! (font-lock-fontify-buffer)) ! (setq text (buffer-string))) ! (goto-char open-beg) ! (insert text))) ! ! ;;;###autoload ! (defun drkm-mml:insert-part (mime-type) ! "Insert part markup for MIME-TYPE, leaving the point at the right place. ! The right place is when the insertion will come, with indentation." ! (interactive (list (drkm-mml:minibuffer-read-type-from-group))) ! (drkm-mml::insert-part-1 mime-type) ! (insert (make-string drkm-mml:part-indent ?\ ))) ! ! ;;;###autoload ! (defun drkm-mml:insert-file-part (file &optional mime-type) ! "Insert part markup for MIME-TYPE, as well as the FILE." ! (interactive (let ((file (read-file-name "Insert file: "))) ! (list file (drkm-mml:minibuffer-read-type-from-file file)))) ! (unless mime-type ! (setq mime-type (drkm-mml:default-file-type file))) ! (drkm-mml::insert-part-1 mime-type) ! (let ((length (car (cdr (insert-file-contents file))))) ! (save-excursion ! (goto-char (1- (+ (point) length))) ! (when (eq ?\n (char-after)) ! (delete-char 1))) ! (indent-rigidly (point) (+ (point) length) drkm-mml:part-indent))) + (defun drkm-mml::insert-part-1 (mime-type) + "Insert part markup for MIME-TYPE, leaving the point at the right place. + The right place is when the insertion will come, without any + indentation. Look at the commands `drkm-mml:insert-part' and + `drkm-mml:insert-file-part'." + (when (save-excursion + (string-match "^[[:space:]]*$" + (buffer-substring (progn (beginning-of-line) (point)) + (progn (end-of-line) (point))))) + (delete-region (progn (beginning-of-line) (point)) + (progn (end-of-line) (point)))) + (unless (eq ?\n (char-before)) + (insert "\n")) + (unless (eq ?\n (char-before (1- (point)))) + (insert "\n")) + (insert (make-string drkm-mml:markup-indent ?\ ) + drkm-mml:open-markup + " type=" + mime-type + drkm-mml:open-markup-end + "\n") + (when drkm-mml:blank-line + (insert "\n")) + (save-excursion + (when drkm-mml:blank-line + (insert "\n")) + (insert "\n" + (make-string drkm-mml:markup-indent ?\ ) + drkm-mml:close-markup + "\n\n"))) + + (defvar drkm-mml:completing-read-mime-types nil + "Private cache for the `drkm-mml:completing-read-mime-types' function.") + + (defun drkm-mml:completing-read-mime-types () + "Return a list of MIME types suitable for `completing-read'." + (unless drkm-mml:completing-read-mime-types + (mailcap-parse-mimetypes) + (setq drkm-mml:completing-read-mime-types + (mapcar 'list (mailcap-mime-types)))) + drkm-mml:completing-read-mime-types) + + (defun drkm-mml:minibuffer-read-type (&optional default) + "Read a type from the minibuffer, to be used in `interactive' forms. + DEFAULT is the default value to return if the user press just + <RET>. It defaults to `drkm-mml:default-type'." + (unless default + (setq default drkm-mml:default-type)) + (let ((string (completing-read + (format "Content type (default %s): " default) + (drkm-mml:completing-read-mime-types)))) + (if (equal string "") + default + string))) + + (defun drkm-mml:minibuffer-read-type-from-file (file &optional default) + "Read a type for FILE from the minibuffer, to be used in `interactive'. + FILE is the name of the file to read the mime type for. + DEFAULT is the default value to return if the user press just + <RET>. It defaults to a value deduced from the FILE extension, + or to `drkm-mml:default-type' if the extension doesn't help." + (drkm-mml:minibuffer-read-type (or default + (drkm-mml:default-file-type file)))) + + (defun drkm-mml:minibuffer-read-type-from-group (&optional group default) + "Read a type for GROUP from the minibuffer, to be used in `interactive'. + GROUP is the name of the Gnus group in which the part we read the + type for will be inserted. It defaults to the group currently + opened. + DEFAULT is the default value to return if the user press just + <RET>. It defaults to the `drkm-mml:default-type' GROUP + parameter, or to `drkm-mml:default-type' if the GROUP parameters + don't help." + (unless default + (let ((group (or group (drkm-mml:current-group-name)))) + (when group + (setq default + (gnus-group-find-parameter group 'drkm-mml:default-type))))) + (drkm-mml:minibuffer-read-type default)) + + (defun drkm-mml:current-group-name () + "Return the name of the Gnus group currently opened." + (let ((buf (get-buffer gnus-summary-buffer))) + (when buf + (with-current-buffer buf + gnus-newsgroup-name)))) + + (defun drkm-mml:default-file-type (file) + "Return a default mime type for FILE, deduced from its extension." + (if (not (string-match "\\.[^.]+$" file)) + "application/octet-stream" + (mailcap-extension-to-mime (match-string 0 file)))) (provide 'drkm-mml) |
From: drkm <flo...@us...> - 2005-07-17 00:16:43
|
Update of /cvsroot/drkm-lib/drkm-lib/file-style In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5839/drkm-lib/file-style Modified Files: file-style.el Log Message: First real version of drkm-mml + minor changes. Index: file-style.el =================================================================== RCS file: /cvsroot/drkm-lib/drkm-lib/file-style/file-style.el,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** file-style.el 27 May 2005 02:14:50 -0000 1.3 --- file-style.el 17 Jul 2005 00:16:33 -0000 1.4 *************** *** 217,223 **** '((authors . fstyle:get-finfo-authors-default))) ! ;; FIXME: ... ! (load "~/.emacs.d/BUG-eieio-defclass.el" nil nil t) ! (load "~/.emacs.d/BUG-eieio-generic-call.el" nil nil t) ;; (setq-default fstyle:current (fstyle:style nil)) --- 217,226 ---- '((authors . fstyle:get-finfo-authors-default))) ! ;; FIXME: ... Résolu, normalement. La prochaine fois que je vois ce ! ;; commentaire, si tout va bien alors que j'ai utilisé les File ! ;; Styles, je peux le supprimer. ! ;; ! ;; (load "~/.emacs.d/BUG-eieio-defclass.el" nil nil t) ! ;; (load "~/.emacs.d/BUG-eieio-generic-call.el" nil nil t) ;; (setq-default fstyle:current (fstyle:style nil)) |
From: drkm <flo...@us...> - 2005-07-17 00:08:51
|
Update of /cvsroot/drkm-lib/home/drkm/.emacs.d/configs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4072/home/drkm/.emacs.d/configs Modified Files: config-TMP.el config-psgml.el top-config-misc.el top-config-pim.el top-config-web.el Log Message: Minor changes. Index: config-psgml.el =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs.d/configs/config-psgml.el,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** config-psgml.el 27 May 2005 02:03:07 -0000 1.4 --- config-psgml.el 17 Jul 2005 00:08:40 -0000 1.5 *************** *** 223,236 **** sgml-shorttag nil)) - ;; CSS-Mode - ;; TODO: Configurer réellement (cfr. le fichier source, il n'est pas - ;; bien grand, et plutôt simple, et limité en configuration). - (autoload 'css-mode "css-mode") - (add-to-list 'auto-mode-alist '("\\.css\\'" . css-mode)) - (add-hook 'css-mode-hook 'turn-on-font-lock) - (setq css-indent-function #'css-c-style-indenter) - (setq css-indent-level 4) - (setq css-mirror-mode nil) - ;; MMM-Mode (require 'mmm-auto) --- 223,226 ---- Index: top-config-web.el =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs.d/configs/top-config-web.el,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** top-config-web.el 27 May 2005 02:03:08 -0000 1.6 --- top-config-web.el 17 Jul 2005 00:08:40 -0000 1.7 *************** *** 74,77 **** --- 74,101 ---- ;; =========================================================================== + ;;; CSS Mode: + ;; ========= + ;; + ;; TODO: Configurer réellement (cfr. le fichier source, il n'est + ;; pas bien grand, et plutôt simple, et limité en configuration). + ;; --------------------------------------------------------------------------- + + (autoload 'css-mode "css-mode" "Major mode for editing CSS style sheets." t) + (push '("\\.css\\'" . css-mode) auto-mode-alist) + ;; (add-hook 'css-mode-hook 'turn-on-font-lock) + (setq cssm-indent-function 'cssm-c-style-indenter + cssm-indent-level 4 + cssm-mirror-mode nil) + + ;; TODO: Ces réglages viennent de la version que j'avais modifié, sur + ;; mon ancien PC. Essayer de récupérer ce HD ! + ;; + ;; (add-hook 'css-mode-hook 'turn-on-font-lock) + ;; (setq css-indent-function 'css-c-style-indenter + ;; css-indent-level 4 + ;; css-mirror-mode nil) + + + ;; =========================================================================== ;;; PSGML Mode: ;; =========== Index: top-config-misc.el =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs.d/configs/top-config-misc.el,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** top-config-misc.el 2 Jul 2005 09:58:32 -0000 1.11 --- top-config-misc.el 17 Jul 2005 00:08:40 -0000 1.12 *************** *** 385,389 **** (t nil))))) ! (setq fill-nobreak-predicate 'drkm-moy:fill-nobreak-predicate) ;; (defvar drkm-insert-insec-space-before-list '("?" "!" ";" ":") --- 385,389 ---- (t nil))))) ! (push 'drkm-moy:fill-nobreak-predicate fill-nobreak-predicate) ;; (defvar drkm-insert-insec-space-before-list '("?" "!" ";" ":") Index: config-TMP.el =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs.d/configs/config-TMP.el,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** config-TMP.el 27 May 2005 02:03:06 -0000 1.4 --- config-TMP.el 17 Jul 2005 00:08:40 -0000 1.5 *************** *** 63,71 **** (drkm-conf:load-init-file "BUG-insert-directory")) ! (dolist (file '("BUG-eieio-defclass" "BUG-eieio-generic-call")) (when (file-exists-p file) (drkm-conf:load-init-file file))) - ;; (drkm-conf:load-init-file "BUG-eieio-defclass") - ;; (drkm-conf:load-init-file "BUG-eieio-generic-call") --- 63,69 ---- (drkm-conf:load-init-file "BUG-insert-directory")) ! (dolist (file '("BUG-eieio-defclass")) (when (file-exists-p file) (drkm-conf:load-init-file file))) Index: top-config-pim.el =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs.d/configs/top-config-pim.el,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** top-config-pim.el 29 May 2005 03:55:32 -0000 1.5 --- top-config-pim.el 17 Jul 2005 00:08:40 -0000 1.6 *************** *** 12,15 **** --- 12,16 ---- ;; - Calendar and Diary ;; - BBDB + ;; - Planner ;; --------------------------------------------------------------------------- *************** *** 106,109 **** --- 107,182 ---- + ;; =========================================================================== + ;;; Planner: + ;; ======== + ;; + ;; Xavier m'a donné envie de tester Planner. Comme d'hab', je + ;; vais ici centraliser mes notes pendant ma découverte de la + ;; bête. Je ne le réquière pas encore au démarrage, mais ce + ;; pourrait être le cas (éventuellement conditionné sur + ;; `drkm-conf:light-loading'). + ;; --------------------------------------------------------------------------- + + (setq planner-directory (drkm-file:file-in-dir "plans" + drkm-conf:emacs-dir) + planner-publishing-directory (drkm-file:file-in-dir "plans-wiki" + drkm-conf:emacs-dir) + planner-project "WikiPlanner" + planner-default-page "TaskPool") + + (global-set-key (kbd "<f8> t") 'planner-create-task-from-buffer) + + ;; (require 'remember-planner) + ;; (setq remember-handler-functions '(remember-planner-append)) + ;; (setq remember-annotation-functions planner-annotation-functions) + + (eval-after-load 'muse-mode + '(define-key muse-mode-map (kbd "S-<tab>") 'muse-previous-reference)) + + (if drkm-site-lisp-use-PlannerMuse + (eval-after-load 'planner + '(add-hook + 'planner-mode-hook + (lambda (&rest args) + "Add the relevant hooks for `planner-calendar' to work, Muse version." + (require 'planner-calendar) + (add-hook 'muse-publish-markup-regexps + 'planner-calendar-insert-calendar-maybe nil t) + ;; (add-hook 'museafter-publish-hook + ;; 'planner-calendar-create-today-link nil t) + ;; (add-hook 'emacs-wiki-after-markup-hook + ;; 'planner-calendar-move-calendar-to-top-of-page-maybe + ;; nil t)))) + ))) + (eval-after-load 'planner + '(add-hook + 'planner-mode-hook + (lambda () + "Add the relevant hooks for `planner-calendar' to work." + (require 'planner-calendar) + (add-hook 'emacs-wiki-before-markup-hook + 'planner-calendar-insert-calendar-maybe nil t) + ;; (add-hook 'emacs-wiki-after-file-publish-hook + ;; 'planner-calendar-create-today-link nil t) + (add-hook 'emacs-wiki-after-markup-hook + 'planner-calendar-move-calendar-to-top-of-page-maybe + nil t))))) + + (setq muse-project-alist + `((,planner-project (,planner-directory + :default ,planner-default-page + :major-mode planner-mode + :visit-link planner-visit-link) + (:base "xhtml" + :path ,planner-publishing-directory)))) + + ;; (setq muse-url-regexp "\\<\\(pos\\|info\\|man\\|google\\|http\\|https\\|ftp\\|gopher\\|telnet\\|wais\\|file\\|news\\|snews\\|mailto\\|USENET\\):[^][[:space:]\"'()<>^`{}]*[^][[:space:]\"'()<>^`{}.,;]+") + + (setq muse-html-style-sheet "<link rel='stylesheet' href='site.css' />") + + (setq ledger-binary-path + "c:/Program Files/ledger/ledger-2.1-win32/ledger.exe") + + ;; --------------------------------------------------------------------------- ;; $Id$ |
From: drkm <flo...@us...> - 2005-07-17 00:08:50
|
Update of /cvsroot/drkm-lib/home/drkm/.emacs.d In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4072/home/drkm/.emacs.d Modified Files: init.local.el Log Message: Minor changes. Index: init.local.el =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs.d/init.local.el,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** init.local.el 2 Jul 2005 09:58:32 -0000 1.9 --- init.local.el 17 Jul 2005 00:08:40 -0000 1.10 *************** *** 50,54 **** ssl-program-name "c:/cygwin/usr/bin/openssl.exe" archive-zip-extract '("c:/cygwin/bin/unzip.exe" "-qq" "-c") ! w3m-command "c:/cygwin/usr/local/bin/w3m.exe") (eval-after-load 'woman --- 50,54 ---- ssl-program-name "c:/cygwin/usr/bin/openssl.exe" archive-zip-extract '("c:/cygwin/bin/unzip.exe" "-qq" "-c") ! w3m-command "c:/cygwin/bin/w3m.exe") (eval-after-load 'woman |
From: drkm <flo...@us...> - 2005-07-17 00:07:41
|
Update of /cvsroot/drkm-lib/home/drkm/.emacs.d In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3893/home/drkm/.emacs.d Removed Files: BUG-eieio-generic-call.el Log Message: Removing BUG-eieio-generic-call.el --- BUG-eieio-generic-call.el DELETED --- |
From: drkm <flo...@us...> - 2005-07-02 09:58:52
|
Update of /cvsroot/drkm-lib/home/drkm/.emacs.d In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26184/drkm/.emacs.d Modified Files: init.local.el Log Message: Minor config changes. Index: init.local.el =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs.d/init.local.el,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** init.local.el 29 May 2005 03:55:32 -0000 1.8 --- init.local.el 2 Jul 2005 09:58:32 -0000 1.9 *************** *** 62,68 **** (unless (and path (let ((case-fold-search t)) (string-match "cygwin" path))) ! (setenv "PATH" (concat path (if (or (null path) (equal "" path)) "" ";") ! (mapconcat 'identity to-add ";"))))) (unless (getenv "CVS_RSH") (setenv "CVS_RSH" "c:/cygwin/bin/ssh.exe")) --- 62,68 ---- (unless (and path (let ((case-fold-search t)) (string-match "cygwin" path))) ! (setenv "PATH" (concat (mapconcat 'identity to-add ";") (if (or (null path) (equal "" path)) "" ";") ! path)))) (unless (getenv "CVS_RSH") (setenv "CVS_RSH" "c:/cygwin/bin/ssh.exe")) |
From: drkm <flo...@us...> - 2005-07-02 09:58:52
|
Update of /cvsroot/drkm-lib/home/drkm/.emacs.d/configs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26184/drkm/.emacs.d/configs Modified Files: top-config-display.el top-config-misc.el top-config-text.el Log Message: Minor config changes. Index: top-config-display.el =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs.d/configs/top-config-display.el,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** top-config-display.el 29 May 2005 03:55:32 -0000 1.2 --- top-config-display.el 2 Jul 2005 09:58:32 -0000 1.3 *************** *** 9,19 **** ! (when drkm-conf:use-font-lock-p ! (condition-case nil ! (set-face-attribute 'default nil ! :font "-Misc-Fixed-Medium-R-Normal--10-100-75-75-C-60-ISO8859-1") ! ;; Une erreur "X windows are not in use or not initialized" est ! ;; signalee sur Lxplus ... ! (error))) --- 9,21 ---- ! ;; TODO: ! ;; ! ;; (when drkm-conf:use-font-lock-p ! ;; (condition-case nil ! ;; (set-face-attribute 'default nil ! ;; :font "-Misc-Fixed-Medium-R-Normal--10-100-75-75-C-60-ISO8859-1") ! ;; ;; Une erreur "X windows are not in use or not initialized" est ! ;; ;; signalee sur Lxplus ... ! ;; (error))) Index: top-config-misc.el =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs.d/configs/top-config-misc.el,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** top-config-misc.el 29 May 2005 03:55:32 -0000 1.10 --- top-config-misc.el 2 Jul 2005 09:58:32 -0000 1.11 *************** *** 131,135 **** (defun drkm-misc:display-tprops () ! "Affiche les text properties (et d'overlay) du caractère sous le point." (interactive) (let ((msg (format "%S" (text-properties-at (point))))) --- 131,136 ---- (defun drkm-misc:display-tprops () ! "Affiche les text properties (et d'overlay) du caractère sous le point. ! Print text properties (incl. overlays) of the character under the point." (interactive) (let ((msg (format "%S" (text-properties-at (point))))) *************** *** 227,233 **** ;; Ediff Mode: - ;; - ;; Configure la version que j'ai modifiée dans <FILE:overloads/>. ;; --------------------------------------------------------------------------- (setq ediff-filter-out-names-data '(".~" "CVS") ediff-dir-contents-filters '(ediff-filter-out-names --- 228,234 ---- ;; Ediff Mode: ;; --------------------------------------------------------------------------- + (setq ediff-keep-variants nil) + ;; Configure la version que j'ai modifiée dans <FILE:overloads/>. (setq ediff-filter-out-names-data '(".~" "CVS") ediff-dir-contents-filters '(ediff-filter-out-names *************** *** 492,502 **** ;; --------------------------------------------------------------------------- ! ;; TODO: Pousser plus loin ... ;; ! (ido-mode 1) ! ;; IDO Mode en test (en remplacement) ... ! ;; ! (when nil (unless noninteractive --- 493,502 ---- ;; --------------------------------------------------------------------------- ! ;; IDO Mode en test (en remplacement de ISwitchB) ... ;; ! (if nil ! ;; TODO: Pousser plus loin ... ! (ido-mode 1) (unless noninteractive Index: top-config-text.el =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs.d/configs/top-config-text.el,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** top-config-text.el 29 May 2005 03:55:32 -0000 1.5 --- top-config-text.el 2 Jul 2005 09:58:32 -0000 1.6 *************** *** 158,164 **** --- 158,174 ---- (require 'tex-site) + (setq TeX-auto-save t + TeX-parse-self t) + + (drkm-conf:configure tex-mode + :font-lock '(dev-tags)) + (drkm-conf:configure latex-mode :font-lock '(dev-tags)) + (eval-after-load 'font-latex + '(set-face-attribute 'font-latex-sedate-face nil + :foreground "light sea green")) + ;; FIXME: Il y a un problème au chargement de <FILE:tex-mode.el>, ;; sur la définition de cette face. Je ne comprend pas |
From: drkm <flo...@us...> - 2005-07-02 09:52:49
|
Update of /cvsroot/drkm-lib/drkm-lib/drkm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22517/drkm Added Files: drkm-fstyle.el Log Message: drkm-fstyle.el added. --- NEW FILE: drkm-fstyle.el --- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; File: drkm-fstyle.el ;; ;; Author: F. Georges ;; ;; Date: 2004-09-26 ;; ;; Tags: ;; ;; Attrs: ;; ;; Copyright (c) 2004 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; (require 'file-style) (defclass drkm-fstyle:style (fstyle:style) () ;; FIXME: "FIXME<dostring>: ...") (defmethod get-style-name :STATIC ((class fstyle:style)) "FIXME<docstring>: ..." "drkm style") (defmethod provide-finfo-handlers :STATIC ((class fstyle:style)) "FIXME<docstring>: ..." '((authors . drkm-fstyle:get-finfo-authors))) (defmethod get-finfo ((this drkm-fstyle:style) finfo) "FIXME<docstring>: ..." (let ((fun (assq finfo '((authors . drkm-fstyle:get-finfo-authors))))) (if fun (fstyle:make-results 'drkm (funcall (cdr fun))) (error "Unknow finfo %S [drkm style]" finfo)))) ;; Le principe de l'en-tête "drkm" [*] est d'utiliser des marques ;; de commentaires à gauche et à droite, même lorsque le langage ;; fournit des marques de commentaires jusqu'à la fin de la ;; ligne. ;; ;; [*] D'ailleurs, il faudrait se décider à le documenter une ;; fois pour toutes de manière plus formelle. ;; ;; Il « suffit » donc de trouver la bonne ligne, et pour en ;; calculer la fin, d'aller en fin de ligne et de reculer vers ;; les permiers espaces (puisque le style "drkm" n'utilise pas de ;; tabs, mais ce n'est pas un problème). ;; ;; TODO: Il faut gérer les champs multi-lignes. Un moyen de ;; faire est de prendre les colonnes de début et de fin du tag ;; "Author:". Si à la ligne suivante il n'y a que des espaces ;; entre ces deux colonnes, alors c'est la suite du même champ. ;; ;; TODO: Il faut également mieux repérer les erreurs. Le style ;; "drkm" est assez stricte que pour lever des erreurs lorsqu'on ;; en rencontre. Dans le cas ci-dessus, avec des espaces entre ;; les deux colonnes définies par "Authors: ", on peut avoir un ;; nom de champ, commençant à la *même* colonne, même chose pour ;; la valeur, ou n'avoir que des espaces. Et encore, les ;; colonnes doivent être des multiples de 4. Etc. C'est ;; également une raison pour formaliser exactement le style ;; "drkm". Pour pouvoir repérer les erreurs le plus tôt (le plus ;; sûrement) possible lorsqu'il y en a. ;; --------------------------------------------------------------------------- ;; FIXME: ... (defun drkm-fstyle:get-finfo-authors () "FIXME<docstring>: ..." (save-excursion (let* ((beg (progn (goto-char 0) ;; Je pense qu'il ne faut pas ;; utiliser `point-min()' ici. ;; Attention à la limite *magique* de 500. (search-forward-regexp "Authors?:[ \t]+" 500) (point))) (end (progn (end-of-line) (search-backward-regexp "[ \t]+") (skip-chars-backward " \t") (point))) (authors (buffer-substring-no-properties beg end)) (start 0) (stop 0) (result '())) (while (setq stop (string-match ", *" authors start)) (when (< start stop) (push (substring authors start stop) result)) (setq start (match-end 0))) (when (< start (length authors)) (push (substring authors start) result)) (nreverse result)))) (fstyle:provide 'drkm 'drkm-fstyle:style) ;; --------------------------------------------------------------------------- ;; $Id: drkm-fstyle.el,v 1.1 2005/07/02 09:52:35 florentgeorges Exp $ ;; --------------------------------------------------------------------------- ;; Local Variables: ;; mode: emacs-lisp ;; indent-tabs-mode: nil ;; drkm-style: drkm ;; End: ;; --------------------------------------------------------------------------- |
From: drkm <flo...@us...> - 2005-05-29 03:55:42
|
Update of /cvsroot/drkm-lib/home/drkm/.emacs.d/configs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15724/drkm/.emacs.d/configs Modified Files: top-config-display.el top-config-misc.el top-config-pim.el top-config-prog.el top-config-text.el Log Message: Changes from WINE @ cern.ch. Index: top-config-misc.el =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs.d/configs/top-config-misc.el,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** top-config-misc.el 27 May 2005 02:03:07 -0000 1.9 --- top-config-misc.el 29 May 2005 03:55:32 -0000 1.10 *************** *** 81,85 **** (menu-bar-mode 0)) ;; turn off the menu bar under the console (tool-bar-mode 0) ;; turn off the tool bar ! (drkm-key:define-key-alias (kbd "<C-tab>") (kbd "M-TAB")) ;; TODO: Utiliser plutôt `substitute-key-definition()' ? (global-set-key (kbd "C-x C-b") 'electric-buffer-list) --- 81,85 ---- (menu-bar-mode 0)) ;; turn off the menu bar under the console (tool-bar-mode 0) ;; turn off the tool bar ! (drkm-key:define-key-alias (kbd "C-TAB") (kbd "M-TAB")) ;; TODO: Utiliser plutôt `substitute-key-definition()' ? (global-set-key (kbd "C-x C-b") 'electric-buffer-list) *************** *** 93,96 **** --- 93,113 ---- ;; 'kill-buffer-and-window)) + ;; TODO: Cfr. Message-ID: <m27...@se...>. Juger de + ;; l'utilité de ceci. + ;; + ;; (setq hippie-expand-try-functions-list + ;; '(try-expand-dabbrev + ;; try-expand-dabbrev-all-buffers + ;; try-expand-dabbrev-from-kill + ;; try-complete-file-name-partially + ;; try-complete-file-name + ;; try-complete-lisp-symbol-partially + ;; try-complete-lisp-symbol + ;; try-expand-whole-kill)) + ;; + ;; (defconst dabbrev-always-check-other-buffers t) + ;; (defconst dabbrev-abbrev-char-regexp "\\sw\\|\\s_") + ;; + (global-set-key (kbd "M-/") 'hippie-expand) (defcustom drkm-misc:magic-modes-to-delete '(html-mode sgml-mode xml-mode) *************** *** 475,478 **** --- 492,503 ---- ;; --------------------------------------------------------------------------- + ;; TODO: Pousser plus loin ... + ;; + (ido-mode 1) + + ;; IDO Mode en test (en remplacement) ... + ;; + (when nil + (unless noninteractive (require 'iswitchb) *************** *** 488,491 **** --- 513,518 ---- ad-do-it)) + ) + ;; =========================================================================== Index: top-config-pim.el =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs.d/configs/top-config-pim.el,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** top-config-pim.el 27 May 2005 02:03:07 -0000 1.4 --- top-config-pim.el 29 May 2005 03:55:32 -0000 1.5 *************** *** 52,55 **** --- 52,71 ---- (setq cal-tex-diary t) + ;; TODO: Mettre de l'ordre ... + ;; + (eval-after-load 'diary-lib + '(let ((cell '("^[ \t]*[0-9]?[0-9]\\([:.]?[0-9][0-9]\\)?\\(am\\|pm\\|AM\\|PM\\)?\\(-[0-9]?[0-9]\\([:.]?[0-9][0-9]\\)?\\(am\\|pm\\|AM\\|PM\\)?\\)?" + . font-lock-variable-name-face))) + (when (member cell fancy-diary-font-lock-keywords) + (setq fancy-diary-font-lock-keywords + (delete cell fancy-diary-font-lock-keywords)) + (let* ((am-pm "\\(?:am\\|pm\\|AM\\|PM\\)?") + (hour (concat "[0-9]?[0-9]\\(?:[:.][0-9][0-9]\\)?" am-pm)) + (re (concat "^[ \t]*" hour "\\(-" hour "\\)?\\b"))) + ;; RE is like the original, but "\\b" added at the end, and "?" + ;; deleted after "[:.]". + (push (cons re font-lock-variable-name-face) + fancy-diary-font-lock-keywords))))) + ;; =========================================================================== Index: top-config-prog.el =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs.d/configs/top-config-prog.el,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** top-config-prog.el 27 May 2005 02:03:07 -0000 1.5 --- top-config-prog.el 29 May 2005 03:55:32 -0000 1.6 *************** *** 312,316 **** "\\.itcc\\'" "\\.ticc\\'" ! "\\.\\(CC?\\|HH?\\)\\'")) (drkm-conf:configure objc-mode --- 312,317 ---- "\\.itcc\\'" "\\.ticc\\'" ! "\\.\\(CC?\\|HH?\\)\\'")) ;; TODO: Seulement si le FS est ! ;; case-sensitive (pas sous Win) (drkm-conf:configure objc-mode *************** *** 362,366 **** ;; (search-forward "#include <libxml/" ;; (min (+ (point) 5000) (point-max)) ! ;; t))) ;; ;; (let ((hook (lambda() --- 363,367 ---- ;; (search-forward "#include <libxml/" ;; (min (+ (point) 5000) (point-max)) ! ;; t nil))) ;; ;; (let ((hook (lambda() Index: top-config-display.el =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs.d/configs/top-config-display.el,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** top-config-display.el 27 May 2005 02:03:07 -0000 1.1 --- top-config-display.el 29 May 2005 03:55:32 -0000 1.2 *************** *** 67,71 **** ;; FIXME: Impossible d'utiliser `C-x 5 2' avec cette ligne. Essai ;; de décommentage ... ! (icon-type . t) (visibility . t) (menu-bar-lines . 0)) --- 67,71 ---- ;; FIXME: Impossible d'utiliser `C-x 5 2' avec cette ligne. Essai ;; de décommentage ... ! ;; (icon-type . t) (visibility . t) (menu-bar-lines . 0)) Index: top-config-text.el =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs.d/configs/top-config-text.el,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** top-config-text.el 27 May 2005 02:03:07 -0000 1.4 --- top-config-text.el 29 May 2005 03:55:32 -0000 1.5 *************** *** 151,156 **** --- 151,161 ---- ;; requérant la configuration. Cfr. ce qui a été mis en place ;; pour nXML, PSGML et CC Mode. + ;; + ;; Je l'essaie, ci-dessous. Les autoloads et autres auto-mode + ;; sont dans 'tex-site.el'. ;; --------------------------------------------------------------------------- + (require 'tex-site) + (drkm-conf:configure latex-mode :font-lock '(dev-tags)) |
From: drkm <flo...@us...> - 2005-05-29 03:55:41
|
Update of /cvsroot/drkm-lib/home/drkm/.emacs.d In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15724/drkm/.emacs.d Modified Files: init.local.el Log Message: Changes from WINE @ cern.ch. Index: init.local.el =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs.d/init.local.el,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** init.local.el 27 May 2005 02:03:06 -0000 1.7 --- init.local.el 29 May 2005 03:55:32 -0000 1.8 *************** *** 52,55 **** --- 52,59 ---- w3m-command "c:/cygwin/usr/local/bin/w3m.exe") + (eval-after-load 'woman + '(setq woman-manpath (mapcar (lambda (dir) (concat "c:/cygwin" dir)) + woman-manpath))) + (let ((path (getenv "PATH")) (to-add '("c:/cygwin/usr/local/bin" *************** *** 73,80 **** ;; (interactive) ;; (command-execute (key-binding "\e\t")))) ! (global-set-key [(control tab)] (lambda () (interactive) ! (command-execute (key-binding [(meta tab)])))) --- 77,84 ---- ;; (interactive) ;; (command-execute (key-binding "\e\t")))) ! (global-set-key (kbd "C-TAB") (lambda () (interactive) ! (command-execute (key-binding (kbd "M-TAB"))))) |
From: drkm <flo...@us...> - 2005-05-29 03:55:10
|
Update of /cvsroot/drkm-lib/drkm-lib/drkm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15355/drkm Modified Files: drkm-key.el drkm.el Log Message: Changes from WINE @ cern.ch. Index: drkm.el =================================================================== RCS file: /cvsroot/drkm-lib/drkm-lib/drkm/drkm.el,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** drkm.el 26 May 2005 23:09:01 -0000 1.5 --- drkm.el 29 May 2005 03:55:01 -0000 1.6 *************** *** 826,829 **** --- 826,852 ---- ;; =========================================================================== + ;; `assoc-regexp-key()', `assoc-regexp-value()': + ;; ============================================= + ;; + ;; --------------------------------------------------------------------------- + + (defun assoc-regexp-key (key list) + "FIXME<docstring>: ..." + (let ((cell (car list))) + (while (and cell (not (string-match (car cell) key))) + (setq list (cdr list) + cell (car list))) + cell)) + + (defun assoc-regexp-value (key list) + "FIXME<docstring>: ..." + (let ((cell (car list))) + (while (and cell (not (string-match key (car cell)))) + (setq list (cdr list) + cell (car list))) + cell)) + + + ;; =========================================================================== ;; `drkm-string-transform()', `drkm-string-transform-exact()', ;; `drkm-string-transform-by-key()': Index: drkm-key.el =================================================================== RCS file: /cvsroot/drkm-lib/drkm-lib/drkm/drkm-key.el,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** drkm-key.el 27 May 2005 02:14:49 -0000 1.2 --- drkm-key.el 29 May 2005 03:55:01 -0000 1.3 *************** *** 80,83 **** --- 80,90 ---- ;; standard way to do that. ;; + ;; FIXME: Et tout simplement donner l'aliased sous forme de vecteur + ;; (par exemple le retour de 'kbd') ? Par exemple : + ;; + ;; (global-set-key (kbd "new") (kbd "original")) + ;; + ;; Ce qui supprimerait l'utilité de cette fonction ... + ;; (defmacro drkm-key:define-key-alias (new-key aliased) "FIXME<docstring>: ..." |
From: drkm <flo...@us...> - 2005-05-27 02:14:59
|
Update of /cvsroot/drkm-lib/drkm-lib/drkm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22972/drkm Modified Files: drkm-config.el drkm-key.el drkm-tprop.el Log Message: Changes from lxplus.cern.ch. Index: drkm-config.el =================================================================== RCS file: /cvsroot/drkm-lib/drkm-lib/drkm/drkm-config.el,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** drkm-config.el 26 May 2005 23:09:00 -0000 1.8 --- drkm-config.el 27 May 2005 02:14:49 -0000 1.9 *************** *** 93,97 **** ;; TODO: Cfr. également la variable `system-configuration' (les ! ;; fameux « triplets », par exemple "i586-pc-linux-gnu"). ;; (defconst drkm-conf:gnu-flag (string-match "^GNU Emacs" (emacs-version)) --- 93,97 ---- ;; TODO: Cfr. également la variable `system-configuration' (les ! ;; fameux « triplets », par exemple "i586-pc-linux-gnu"). ;; (defconst drkm-conf:gnu-flag (string-match "^GNU Emacs" (emacs-version)) *************** *** 246,250 **** (drkm-file:file-in-dir "site-lisp" drkm-conf:share-directory) "*Répertoire standard Emacs Lisp du site (\"site-lisp/\"). ! FIXME: J'obtiens le site-lisp « versionné ». Il me faudrait l'autre, ou plutôt les deux." :tag "Répertoire Emacs Lisp du site" --- 246,250 ---- (drkm-file:file-in-dir "site-lisp" drkm-conf:share-directory) "*Répertoire standard Emacs Lisp du site (\"site-lisp/\"). ! FIXME: J'obtiens le site-lisp « versionné ». Il me faudrait l'autre, ou plutôt les deux." :tag "Répertoire Emacs Lisp du site" *************** *** 304,307 **** --- 304,325 ---- :type '(file)) + (defvar drkm-conf:light-loading nil + "Renseigne si un chargement rapide a été demandé (un booléen). + + Est faux par défaut, et fixé dans `drkm-conf:init()' à vrai si + l'option `--drkm-light' a été renseignée. + + Si l'on est en mode batch, cette option est vrai par défaut, et + n'est fausse que si l'option `--drkm-no-light' est présente sur + la ligne de commande. + + Ce module ne garantit rien quant à son utilisation. Si vous + pensez qu'une fonctionalité que vous ajoutez devrait être + désactivée dans ce cas, il est de votre responsabilité de + vérifier cette variable et agir en conséquence.") + + (defvar drkm-conf:use-font-lock-p t + "FIXME:") + ;; =========================================================================== *************** *** 361,367 **** --- 379,398 ---- puis `drkm-conf:overloads-lisp-dir'. + Si l'option `--drkm-light' est présente sur la ligne de commande, + fixe `drkm-conf:light-loading' à vrai. En mode batch, fixe cette + variable à vrai, sauf si l'option `--drkm-no-light' est présente. + FIXME: Documenter l'utilisation de `after-init-hook' ? Et l'argument `DRKM-LIB-DIR'. Parler des loaddefs.el. Et renvoyer vers la doc Info, ça commence à faire long." + + (if noninteractive + (if (member "--drkm-no-light" command-line-args) + (setq command-line-args (delete "--drkm-no-light" command-line-args)) + (setq drkm-conf:light-loading t)) + (when (member "--drkm-light" command-line-args) + (setq command-line-args (delete "--drkm-light" command-line-args) + drkm-conf:light-loading t))) + (let ((drkm-conf:subdirs-file-name drkm-conf:subdirs-in-std-dirs-file-name) *************** *** 406,409 **** --- 437,452 ---- drkm-conf:overloads-lisp-dir)))) + (defun drkm-conf:require-if-available (feature) + "FIXME<docstring>: ..." + (let ((loaded nil)) + (catch 'drkm-conf:not-available + ;; TODO: Use a function `drkm-conf:require()', that push + ;; `feature' in a history list, to provide a way to know which + ;; config files was evaled. + (require feature) + (setq loaded t)) + (unless loaded + (message "%S was *NOT* be loaded!" feature)))) + ;; TODO: Le mécanisme d'erreur dans un load et dans la ;; configuration en général doit être revu. *************** *** 536,540 **** ;; bibliothèque dont on connait le nom (ou le nom de la feature) ;; mais qu'aucune fonction n'est définie (même pas ! ;; d'autoload) [*]. ;; ;; [*] Cfr. le TODO<EMERG> précédant la fonction --- 579,583 ---- ;; bibliothèque dont on connait le nom (ou le nom de la feature) ;; mais qu'aucune fonction n'est définie (même pas ! ;; d'autoload) [*]. ;; ;; [*] Cfr. le TODO<EMERG> précédant la fonction *************** *** 566,570 **** ;; ;; On peut même imaginer assez facilement la possibilité ! ;; d'ajouter de tels « types ». On définit les quelques ;; fonctions gérant ce type (comme pour l'instant les ;; `drkm-conf::configure-...()'), et on les renseigne dans une --- 609,613 ---- ;; ;; On peut même imaginer assez facilement la possibilité ! ;; d'ajouter de tels « types ». On définit les quelques ;; fonctions gérant ce type (comme pour l'instant les ;; `drkm-conf::configure-...()'), et on les renseigne dans une *************** *** 579,583 **** ;; ...) ;; ! ;; permet d'ajouter des « paramètres » à un type : ;; ;; (drkm-conf:configure (type a-thing a-param) --- 622,626 ---- ;; ...) ;; ! ;; permet d'ajouter des « paramètres » à un type : ;; ;; (drkm-conf:configure (type a-thing a-param) *************** *** 588,597 **** ;; On pourrait également fournir une telle flexibilité dans les ;; arguments keywords (:config, :auto-mode, :hooks, etc.). On ! ;; change la liste d'arguments en « (mode &rest args) », où ;; `ARGS' est interprété comme une plist. Chaque clef serait ;; alors définie comme un paramètre permis, grâce à une alist ou ;; la plist du symbole. ;; ! ;; Ou les paramètres seraient dépendants du « type » définit ;; ci-dessus. Pourquoi pas ? ;; --- 631,640 ---- ;; On pourrait également fournir une telle flexibilité dans les ;; arguments keywords (:config, :auto-mode, :hooks, etc.). On ! ;; change la liste d'arguments en « (mode &rest args) », où ;; `ARGS' est interprété comme une plist. Chaque clef serait ;; alors définie comme un paramètre permis, grâce à une alist ou ;; la plist du symbole. ;; ! ;; Ou les paramètres seraient dépendants du « type » définit ;; ci-dessus. Pourquoi pas ? ;; *************** *** 608,615 **** ;; On y teste s'il faut configurer. Si oui, on charge la config, ;; sinon, on charge le module (ou la feature). ;; --------------------------------------------------------------------------- ! (defmacro* drkm-conf:configure (mode &key config auto-mode interpreters ! magic-mode autoloads autoload-files ! font-lock hooks info-dirs) "Configure le mode `MODE'. --- 651,662 ---- ;; On y teste s'il faut configurer. Si oui, on charge la config, ;; sinon, on charge le module (ou la feature). + ;; + ;; TODO: Penser également à l'opportunité de configurer des faces + ;; (en les surchargeant ou en en modifiant certains attributs). ;; --------------------------------------------------------------------------- ! (defmacro* drkm-conf:configure (mode &key config config-if-available ! auto-mode interpreters magic-mode ! autoloads autoload-files font-lock ! hooks info-dirs) "Configure le mode `MODE'. *************** *** 668,672 **** ,auto-mode ,interpreters ,magic-mode ,autoloads ,autoload-files) ,(when config ! `(drkm-conf::configure-config ',mode ,config)) ,(when font-lock `(drkm-conf::configure-font-lock ,mode ,font-lock)) --- 715,722 ---- ,auto-mode ,interpreters ,magic-mode ,autoloads ,autoload-files) ,(when config ! `(drkm-conf::configure-config ',mode ,config 'require)) ! ,(when config-if-available ! `(drkm-conf::configure-config ',mode ,config-if-available ! 'drkm-conf:require-if-available)) ,(when font-lock `(drkm-conf::configure-font-lock ,mode ,font-lock)) *************** *** 695,699 **** (lambda () (save-excursion ! (when (search-forward-regexp "\\`<\\?xml") (nxml-mode))))))) ;; TODO<emerg>: Mais, nondidj'ôss, ne faufrait-il employer pour les --- 745,749 ---- (lambda () (save-excursion ! (when (search-forward-regexp "\\`<\\?xml" nil t) (nxml-mode))))))) ;; TODO<emerg>: Mais, nondidj'ôss, ne faufrait-il employer pour les *************** *** 760,767 **** ;; (require feature))) ;; ! (defun drkm-conf::configure-config (function feature) "FIXME<docstring>: ..." (if (null function) ! (require feature) (let* ((kind (cond ((or (not (fboundp function)) (not (symbol-function function))) --- 810,818 ---- ;; (require feature))) ;; ! (defun drkm-conf::configure-config (function feature require-fun) "FIXME<docstring>: ..." (if (null function) ! ;; (require feature) ! (funcall require-fun feature) (let* ((kind (cond ((or (not (fboundp function)) (not (symbol-function function))) *************** *** 777,781 **** ',(symbol-function function))) (default `(ad-remove-advice ! ',function before drkm-config:configure)))) (inter-f (if (eq kind 'autoload) (when (nth 3 (symbol-function function)) --- 828,832 ---- ',(symbol-function function))) (default `(ad-remove-advice ! ',function 'before 'drkm-config:configure)))) (inter-f (if (eq kind 'autoload) (when (nth 3 (symbol-function function)) *************** *** 791,795 **** ,inter-f ,remove-f ! (require ',feature) ,apply-f nil))) --- 842,848 ---- ,inter-f ,remove-f ! ;; (require ',feature) ! ;; ,(list require-fun feature) ! (,require-fun ',feature) ,apply-f nil))) *************** *** 931,936 **** ;; pendant le chargement. Si le fichier peut lui attribuer une ;; certaine valeur pour indiquer de ne pas l'ajouter à cette ! ;; liste. Cela fournit un moyen à ces fichiers de dire « Hé, ! ;; moi, je veux être chargé plusieurs fois le cas échéant ». (defun drkm-conf:subdirs-load-subdirs-file (&optional dir) (let* ((default-directory dir) --- 984,989 ---- ;; pendant le chargement. Si le fichier peut lui attribuer une ;; certaine valeur pour indiquer de ne pas l'ajouter à cette ! ;; liste. Cela fournit un moyen à ces fichiers de dire « Hé, ! ;; moi, je veux être chargé plusieurs fois le cas échéant ». (defun drkm-conf:subdirs-load-subdirs-file (&optional dir) (let* ((default-directory dir) Index: drkm-key.el =================================================================== RCS file: /cvsroot/drkm-lib/drkm-lib/drkm/drkm-key.el,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** drkm-key.el 22 Oct 2004 00:19:59 -0000 1.1.1.1 --- drkm-key.el 27 May 2005 02:14:49 -0000 1.2 *************** *** 69,72 **** --- 69,97 ---- (put 'drkm-key:make-if-prefix-arg-command 'lisp-indent-function 1) + ;; <INFO:elisp/Key Lookup> explains a way to specify an key alias to + ;; another key. But it allows lookup only in a specified keymap. + ;; Instead, I will to specify a real alias. That is, when you resolve + ;; it, you will have to perform again a complete key lookup, exactly + ;; as if the aliased key were pressed in the same context. + ;; + ;; TODO: See on EmacsWiki if something like this already exists. + ;; Else, see furthemore on f.c.a.emacs, then on c.e.help and g.e.help + ;; (proposing my solution). And propose to emacs-devel to add a + ;; standard way to do that. + ;; + (defmacro drkm-key:define-key-alias (new-key aliased) + "FIXME<docstring>: ..." + ;; Make it interactive, with a way to read both keys interactivelly. + ;; + ;; (interactive) + + ;; Do I have to use the `global-map' or the `(current-global-map)' + ;; (via `global-set-key()')? + (setq aliased (eval aliased)) + `(global-set-key ,new-key + (lambda (&rest args) + (interactive) + (command-execute (key-binding ,aliased t))))) + (provide 'drkm-key) Index: drkm-tprop.el =================================================================== RCS file: /cvsroot/drkm-lib/drkm-lib/drkm/drkm-tprop.el,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** drkm-tprop.el 26 May 2005 23:10:24 -0000 1.1 --- drkm-tprop.el 27 May 2005 02:14:49 -0000 1.2 *************** *** 1,128 **** ! ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ! ;; File: drkm-tprop.el ;; ! ;; Author: F. Georges ;; ! ;; Date: 2005-01-07 ;; ! ;; Tags: ;; ! ;; Attrs: ;; ! ;; Copyright (c) 2005 Florent Georges ;; ! ;; ------------------------------------------------------------------------ ;; ! ;; Routines relatives aux text properties (tprops) et aux ! ;; overlays. ! ;; --------------------------------------------------------------------------- ! ! ! ;; =========================================================================== ! ;; Property changes: ! ;; ================= ! ;; ! ;; GNU Emacs fournit le moyen de trouver le prochain endroit où ! ;; l'un quelconque tprop change, ou où une tprop précise change. ! ;; Il lui manque le moyen de trouver le prochain endroit où une ! ;; tprop parmis une liste change. ! ;; --------------------------------------------------------------------------- ! ! ;; FIXME,TODO: À modifier. Ne me semble pas très propre ... ! ;; ! ;; Et surtout, je l'ai modifiée dans le but d'être efficace. Ce n'est ! ;; certainement pas le cas. À améliorer, donc. ! ;; ! (defun drkm-tprop::properties-change (direction with-ovl pos props ! &optional object limit) ! (flet ((next-change () (if with-ovl ! (let ((res ! (if (eq 'forward direction) ! (cons (point-max) ! (next-char-property-change ! pos limit)) ! (cons (point-min) ! (previous-char-property-change ! pos limit))))) ! (if (eq (car res) (cdr res)) nil (cdr res))) ! (if (eq 'forward direction) ! (next-property-change pos object limit) ! (previous-property-change po object limit)))) ! (get-values () (if with-ovl ! (mapcar (lambda (x) ! (get-char-property pos x object)) ! props) ! (mapcar (lambda (x) ! (get-text-property pos x object)) ! props))) ! (compare (old new) (let ((same t)) ! (while (and old new same) ! (unless (eq (car old) (car new)) ! (setq same nil)) ! (setq old (cdr old) new (cdr new))) ! same))) ! (let* ((old-values (get-values)) ! (len (length props)) ! values) ! (while (and (setq pos (next-change)) ! (compare old-values (setq values (get-values))))) ! (when pos ! (let (changes) ! (setq changes (cond ((null old-values) ! (delq nil values)) ! ((null values) ! (delq nil old-values)) ! (t ! (while (and props old-values values) ! (unless (eq (car old-values) (car values)) ! (push (car props) changes)) ! (setq props (cdr props) ! old-values (cdr old-values) ! values (cdr values))) ! changes))) ! (when changes ! (cons pos changes))))))) ! ! ;; (defun drkm-tprop::properties-change (function direction pos props ! ;; &optional object limit) ! ;; (let ((pos (delq nil (mapcar (lambda (x) ! ;; (let ((pos (funcall function ! ;; pos x object limit))) ! ;; (when pos ! ;; (cons x pos)))) ! ;; props)))) ! ;; (cond ((null pos) ! ;; nil) ! ;; ((null (cdr pos)) ! ;; pos) ! ;; ((eq 'forward direction) ! ;; (let ((mins (list (car pos)))) ! ;; (dolist (p (cdr pos) (nreverse mins)) ! ;; (when (< (cdr p) (cdr (car mins))) (push p mins))))) ! ;; ((eq 'backward direction) ! ;; (let ((maxs (list (car pos)))) ! ;; (dolist (p (cdr pos) (nreverse maxs)) ! ;; (when (< (cdr p) (cdr (car maxs))) (push p maxs))))) ! ;; (t ! ;; (error "DIRECTION must be 'forward or 'backward"))))) ! ! (defun drkm-tprop:next-properties-change (pos props &optional object limit) ! "FIXME<docstring>: ... Retourne \(POS TPROPS...\)." ! (drkm-tprop::properties-change 'forward nil pos props object limit)) ! ! (defun drkm-tprop:previous-properties-change (pos props &optional object limit) ! "FIXME<docstring>: ... Retourne \(POS TPROPS...\)." ! (drkm-tprop::properties-change 'backward nil pos props object limit)) ! ! (defun drkm-tprop:next-char-properties-change (pos props &optional object limit) ! "FIXME<docstring>: ... Retourne \(POS TPROPS)...\)." ! (drkm-tprop::properties-change 'forward t pos props object limit)) ! ! (defun drkm-tprop:previous-char-properties-change (pos props ! &optional object limit) ! "FIXME<docstring>: ... Retourne \(POS TPROPS...\)." ! (drkm-tprop::properties-change 'backward t pos props object limit)) ! ! ! ;; --------------------------------------------------------------------------- ! ;; $Id$ ! ;; --------------------------------------------------------------------------- ! ;; Local Variables: ! ;; mode: emacs-lisp ! ;; indent-tabs-mode: nil ! ;; drkm-style: drkm ! ;; End: ! ;; --------------------------------------------------------------------------- --- 1,128 ---- ! ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ! ;; File: drkm-tprop.el ;; ! ;; Author: F. Georges ;; ! ;; Date: 2005-01-07 ;; ! ;; Tags: ;; ! ;; Attrs: ;; ! ;; Copyright (c) 2005 Florent Georges ;; ! ;; ------------------------------------------------------------------------ ;; ! ;; Routines relatives aux text properties (tprops) et aux ! ;; overlays. ! ;; --------------------------------------------------------------------------- ! ! ! ;; =========================================================================== ! ;; Property changes: ! ;; ================= ! ;; ! ;; GNU Emacs fournit le moyen de trouver le prochain endroit où ! ;; l'un quelconque tprop change, ou où une tprop précise change. ! ;; Il lui manque le moyen de trouver le prochain endroit où une ! ;; tprop parmis une liste change. ! ;; --------------------------------------------------------------------------- ! ! ;; FIXME,TODO: À modifier. Ne me semble pas très propre ... ! ;; ! ;; Et surtout, je l'ai modifiée dans le but d'être efficace. Ce n'est ! ;; certainement pas le cas. À améliorer, donc. ! ;; ! (defun drkm-tprop::properties-change (direction with-ovl pos props ! &optional object limit) ! (flet ((next-change () (if with-ovl ! (let ((res ! (if (eq 'forward direction) ! (cons (point-max) ! (next-char-property-change ! pos limit)) ! (cons (point-min) ! (previous-char-property-change ! pos limit))))) ! (if (eq (car res) (cdr res)) nil (cdr res))) ! (if (eq 'forward direction) ! (next-property-change pos object limit) ! (previous-property-change po object limit)))) ! (get-values () (if with-ovl ! (mapcar (lambda (x) ! (get-char-property pos x object)) ! props) ! (mapcar (lambda (x) ! (get-text-property pos x object)) ! props))) ! (compare (old new) (let ((same t)) ! (while (and old new same) ! (unless (eq (car old) (car new)) ! (setq same nil)) ! (setq old (cdr old) new (cdr new))) ! same))) ! (let* ((old-values (get-values)) ! (len (length props)) ! values) ! (while (and (setq pos (next-change)) ! (compare old-values (setq values (get-values))))) ! (when pos ! (let (changes) ! (setq changes (cond ((null old-values) ! (delq nil values)) ! ((null values) ! (delq nil old-values)) ! (t ! (while (and props old-values values) ! (unless (eq (car old-values) (car values)) ! (push (car props) changes)) ! (setq props (cdr props) ! old-values (cdr old-values) ! values (cdr values))) ! changes))) ! (when changes ! (cons pos changes))))))) ! ! ;; (defun drkm-tprop::properties-change (function direction pos props ! ;; &optional object limit) ! ;; (let ((pos (delq nil (mapcar (lambda (x) ! ;; (let ((pos (funcall function ! ;; pos x object limit))) ! ;; (when pos ! ;; (cons x pos)))) ! ;; props)))) ! ;; (cond ((null pos) ! ;; nil) ! ;; ((null (cdr pos)) ! ;; pos) ! ;; ((eq 'forward direction) ! ;; (let ((mins (list (car pos)))) ! ;; (dolist (p (cdr pos) (nreverse mins)) ! ;; (when (< (cdr p) (cdr (car mins))) (push p mins))))) ! ;; ((eq 'backward direction) ! ;; (let ((maxs (list (car pos)))) ! ;; (dolist (p (cdr pos) (nreverse maxs)) ! ;; (when (< (cdr p) (cdr (car maxs))) (push p maxs))))) ! ;; (t ! ;; (error "DIRECTION must be 'forward or 'backward"))))) ! ! (defun drkm-tprop:next-properties-change (pos props &optional object limit) ! "FIXME<docstring>: ... Retourne \(POS TPROPS...\)." ! (drkm-tprop::properties-change 'forward nil pos props object limit)) ! ! (defun drkm-tprop:previous-properties-change (pos props &optional object limit) ! "FIXME<docstring>: ... Retourne \(POS TPROPS...\)." ! (drkm-tprop::properties-change 'backward nil pos props object limit)) ! ! (defun drkm-tprop:next-char-properties-change (pos props &optional object limit) ! "FIXME<docstring>: ... Retourne \(POS TPROPS)...\)." ! (drkm-tprop::properties-change 'forward t pos props object limit)) ! ! (defun drkm-tprop:previous-char-properties-change (pos props ! &optional object limit) ! "FIXME<docstring>: ... Retourne \(POS TPROPS...\)." ! (drkm-tprop::properties-change 'backward t pos props object limit)) ! ! ! ;; --------------------------------------------------------------------------- ! ;; $Id$ ! ;; --------------------------------------------------------------------------- ! ;; Local Variables: ! ;; mode: emacs-lisp ! ;; indent-tabs-mode: nil ! ;; drkm-style: drkm ! ;; End: ! ;; --------------------------------------------------------------------------- |
From: drkm <flo...@us...> - 2005-05-27 02:14:58
|
Update of /cvsroot/drkm-lib/drkm-lib/file-style In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22972/file-style Modified Files: file-style.el subdirs.el Log Message: Changes from lxplus.cern.ch. Index: subdirs.el =================================================================== RCS file: /cvsroot/drkm-lib/drkm-lib/file-style/subdirs.el,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** subdirs.el 4 Jan 2005 23:45:25 -0000 1.2 --- subdirs.el 27 May 2005 02:14:50 -0000 1.3 *************** *** 25,59 **** ! (add-hook 'hack-local-variables-hook ! ;; FIXME: Temporaire. Remplacer par une fonction qui ! ;; analyse certaines infos. Ou ne pas faire cette ! ;; analyse inconditionnellement ? Seulement dans une ! ;; fonction englobant l'accès à ces infos, la première ! ;; fois qu'on tente de les accéder ? Ce qui implique, au ! ;; lieu de consulter une variable, d'appeler une ! ;; fonction ... ! ;; ! ;; `drkm-style' est destinée à contenir les définitions ! ;; de style. Si à la fin de `hack-local-variables()' sa ! ;; valeur est un symbole, on l'interprète comme un nom de ! ;; style, servant de clef dans `drkm-styles-alist' pour ! ;; retrouver la définition de style : ! ;; ! ;; (when (and drkm-style (symbolp drkm-style)) ! ;; (setq drkm-style (assq drkm-style drkm-styles-alist)) ! ;; (unless drkm-style ! ;; (error "Style inconnu : %S" drkm-style))) ! ;; ! ;; TODO: Si `drkm-style' est nil ici, on peut essayer de ! ;; déterminer sa valeur. Par exemple en fonction du nom, ! ;; ou du répertoire, ou des premières lignes du buffer, ! ;; ou ... ! ;; ----------------------------------------------------------------- ! (lambda () ! (when drkm-style ! (if (fstyle:install drkm-style nil t) ! (message "\"%s\" style installed." drkm-style) ! (message "\"%s\" style unknown. Style didn't change!" ! drkm-style))))) --- 25,66 ---- ! (add-hook ! 'hack-local-variables-hook ! ;; FIXME: Temporaire. Remplacer par une fonction qui ! ;; analyse certaines infos. Ou ne pas faire cette ! ;; analyse inconditionnellement ? Seulement dans une ! ;; fonction englobant l'accès à ces infos, la première ! ;; fois qu'on tente de les accéder ? Ce qui implique, au ! ;; lieu de consulter une variable, d'appeler une ! ;; fonction ... ! ;; ! ;; `drkm-style' est destinée à contenir les définitions ! ;; de style. Si à la fin de `hack-local-variables()' sa ! ;; valeur est un symbole, on l'interprète comme un nom de ! ;; style, servant de clef dans `drkm-styles-alist' pour ! ;; retrouver la définition de style : ! ;; ! ;; (when (and drkm-style (symbolp drkm-style)) ! ;; (setq drkm-style (assq drkm-style drkm-styles-alist)) ! ;; (unless drkm-style ! ;; (error "Style inconnu : %S" drkm-style))) ! ;; ! ;; TODO: Si `drkm-style' est nil ici, on peut essayer de ! ;; déterminer sa valeur. Par exemple en fonction du nom, ! ;; ou du répertoire, ou des premières lignes du buffer, ! ;; ou ... ! ;; ----------------------------------------------------------------- ! (lambda () ! (when drkm-style ! (condition-case nil ! (progn ! (require 'file-style) ! (if (fstyle:install drkm-style nil t) ! (message "\"%s\" style installed." drkm-style) ! (message "\"%s\" style unknown. Style didn't change!" ! drkm-style))) ! (file-error ! (message "\"%s\" style provided, but fstyle lib not found!" ! drkm-style)))))) Index: file-style.el =================================================================== RCS file: /cvsroot/drkm-lib/drkm-lib/file-style/file-style.el,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** file-style.el 4 Jan 2005 23:45:24 -0000 1.2 --- file-style.el 27 May 2005 02:14:50 -0000 1.3 *************** *** 99,103 **** (defun fstyle:style-to-feature (style) "FIXME<docstring>: ..." ! (intern (concat "fstyle-" (symbol-name style)))) (defun fstyle:provide (style factory &optional substyles) --- 99,103 ---- (defun fstyle:style-to-feature (style) "FIXME<docstring>: ..." ! (intern (concat (symbol-name style) "-fstyle"))) (defun fstyle:provide (style factory &optional substyles) *************** *** 333,337 **** ;; FIXME: ! (defun font-lock-fontify-syntactically-region (start end &optional loudly ppss) "Put proper face on each string and comment between START and END. START should be at the beginning of a line." --- 333,337 ---- ;; FIXME: ! (defun font-lock-fontify-syntactically-region--FIXME (start end &optional loudly ppss) "Put proper face on each string and comment between START and END. START should be at the beginning of a line." |
Update of /cvsroot/drkm-lib/home/drkm/.emacs.d/configs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21353/drkm/.emacs.d/configs Modified Files: config-TMP.el config-apropos.el config-cc-mode.el config-cedet.el config-drkm-lib.el config-ediff.el config-font-lock.el config-make.el config-nxml.el config-perl.el config-ps-print.el config-psgml.el config-sql.el top-config-misc.el top-config-other-edit.el top-config-pim.el top-config-prog.el top-config-text.el top-config-various-dev.el top-config-web.el Added Files: top-config-display.el Log Message: Changes from lxplus.cern.ch. Index: config-cc-mode.el =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs.d/configs/config-cc-mode.el,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** config-cc-mode.el 22 Oct 2004 01:04:55 -0000 1.2 --- config-cc-mode.el 27 May 2005 02:03:07 -0000 1.3 *************** *** 5,9 **** ;; Tags: ;; ;; Attrs: ;; ! ;; Copyright (c) 2004 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; --- 5,9 ---- ;; Tags: ;; ;; Attrs: ;; ! ;; Copyright (c) 2004, 2005 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; *************** *** 39,47 **** (setq c-report-syntactic-errors t) - ;; TODO: Cfr. `#Filladapt' dans <FILE:~/.emacs>. - ;; --------------------------------------------------------------------------- - ;; (add-hook 'c-mode-common-hook '(lambda () - ;; (c-setup-filladapt))) - (setq-default c-backslash-column 78) --- 39,42 ---- *************** *** 154,161 **** (defun drkm-cc:common-hook () ! ;; Cfr. `#Filladapt' dans <FILE:~/.emacs>. ! ;; ------------------------------------------------------------------------- ;; (c-setup-filladapt) ! ) ;; FIXME: Concernant les trois fonctions suivantes, --- 149,188 ---- (defun drkm-cc:common-hook () ! ;; Cfr. `#Filladapt' dans <FILE:~/.emacs>. ;; (c-setup-filladapt) ! ;; ! ;; Ne devrait être ajouté que lorsque l'on travaille en OOC. TODO: ! ;; S'occuper de cette séparation (style ?). ! ;; ! ;; Ne devrait surtout s'appliquer que en C. ! (make-local-variable 'c-font-lock-extra-types) ! (push "CLASS" c-font-lock-extra-types) ! (push "TYPE" c-font-lock-extra-types) ! (push "bool" c-font-lock-extra-types) ! (push "\\(class\\|super\\)[A-Z][a-zA-Z0-9]+" c-font-lock-extra-types) ! (let ((case-fold-search nil) ! ;; [1] #include <ooc/(protocol/|ex/)?\(...\).h> ! ;; [2] #include "\([A-Z]...\).h" ! ;; [3] TYPEDEF(\(...\)) ! (include-re "^#[ \t]*include[ \t]*\\(?:<ooc/\\(?:protocol/\\|ex/\\|type/\\)?\\(e?[A-Z][a-zA-Z0-9]+\\)\\.h>\\)\\|\\(?:\"\\(?:lib/\\)?\\([A-Z][a-zA-Z0-9]+\\).h\"\\)\\|TYPEDEF([ \t]*\\([a-zA-Z0-9]+\\)[ \t]*)")) ! (save-excursion ! (goto-char (point-min)) ! (while (search-forward-regexp include-re 5000 t) ! (push (concat "\\(const\\)?" (or (match-string 1) ! (match-string 2) ! (match-string 3))) ! c-font-lock-extra-types))) ! (save-excursion ! (goto-char (point-min)) ! (when (search-forward-regexp "^#[ \t]*include[ \t]*<ooc/stdExcept.h>" ! 5000 t) ! ;; Regexp générée par : ! ;; ! ;; (ooc:gen-exception-regexp-from-stdExcept ! ;; "~/OOC/ooc-2.0/ooc/stdExcept.h") ! (push "Exception\\|e\\(?:Assert\\|Bad\\(?:A\\(?:ccess\\|lloc\\|rgument\\)\\|C\\(?:ast\\|lass\\)\\|Domain\\|Exception\\|Format\\|I\\(?:O\\|nput\\)\\|Operation\\|Range\\|Si\\(?:gnal\\|ze\\)\\|Type\\)\\|Not\\(?:\\(?:Foun\\|\\(?:Implemen\\|Suppor\\)te\\)d\\)\\|Sys\\(?:IO\\|tem\\)\\|TestAssert\\|Unexpected\\)" ! c-font-lock-extra-types))))) ! ! (add-hook 'c-mode-common-hook 'drkm-cc:common-hook) ;; FIXME: Concernant les trois fonctions suivantes, *************** *** 361,364 **** --- 388,393 ---- (set-default 'drkm-cc:style nil) + ;; TODO<EMERG>: Ceci est un travail pour ... `file-style' ! + ;; (defun drkm-cc:set-file-local-style () (when drkm-cc:style *************** *** 368,371 **** --- 397,465 ---- + (setq-default c-offsets-alist + '((arglist-intro . drkm-cc:lineup-arglist-intro-under-func-name) + (arglist-close . drkm-cc:lineup-arglist-close-under-func-name))) + + ;; Basée sur `c-lineup-arglist-intro-after-paren()'. + ;; + (defun drkm-cc:lineup-arglist-intro-under-func-name (langelem) + "Line up a line to ++ under the name of the called function. + + If we are in a function *definition*, the ++ line up is relative + to the namespace level (for example the column 0). + + Examples (assuming c-basic-offset is 2): + + void function( + type arg + ) ; + + void function( + type arg + ) + { + } + + void + function( + type arg + ) + { + } + + Works with: TODO: ..." + ;; DEV: Je saute ici à l'identifiant de fonction, puis le saute en + ;; arrière. Cela existe peut-être déjà dans CC Mode ? Et plus + ;; proprement. + (if (/= ?\; (save-excursion + (up-list) + (skip-chars-forward " \t" (c-point 'eol)) + (char-after))) + ;; Function definition. + '++ + ;; Function declaration. + (save-excursion + (beginning-of-line) + (backward-up-list 1) + (skip-chars-backward " \t" (c-point 'bol)) + ;; TODO: Utiliser les syntax tables au lieu d'une regexp pour + ;; déterminer les caractères constituant un identifiant. + (skip-chars-backward "a-zA-Z0-9_" (c-point 'bol)) + (vector (+ (* 2 c-basic-offset) (current-column)))))) + + (defun drkm-cc:lineup-arglist-close-under-func-name (langelem) + "Line up a line to + under the name of the called function. + + Actualy, it line up to - from the last argument, presumed on the + previous line (and ++ under the name of the called function). + + Works with: TODO: ..." + (save-excursion + (beginning-of-line) + (previous-line 1) + (skip-chars-forward " \t" (c-point 'eol)) + (vector (- (current-column) c-basic-offset)))) + + (provide 'config-cc-mode) Index: top-config-various-dev.el =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs.d/configs/top-config-various-dev.el,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** top-config-various-dev.el 22 Oct 2004 01:04:56 -0000 1.2 --- top-config-various-dev.el 27 May 2005 02:03:07 -0000 1.3 *************** *** 5,9 **** ;; Tags: ;; ;; Attrs: ;; ! ;; Copyright (c) 2004 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; ;; Table of Contents: --- 5,9 ---- ;; Tags: ;; ;; Attrs: ;; ! ;; Copyright (c) 2004, 2005 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; ;; Table of Contents: *************** *** 23,28 **** ;; --------------------------------------------------------------------------- ! (drkm-conf:configure nil ! :config 'config-drkm-lib) --- 23,29 ---- ;; --------------------------------------------------------------------------- ! (unless drkm-conf:light-loading ! (drkm-conf:configure nil ! :config 'config-drkm-lib)) *************** *** 46,52 **** ;; --------------------------------------------------------------------------- ! (drkm-conf:configure nil ! :config 'config-cedet ! :autoload-files '("cedet")) --- 47,54 ---- ;; --------------------------------------------------------------------------- ! (unless drkm-conf:light-loading ! (drkm-conf:configure nil ! :config-if-available 'config-cedet ! :autoload-files '("cedet"))) *************** *** 63,68 **** ;; --------------------------------------------------------------------------- ! (drkm-conf:configure font-lock-mode ! :config 'config-font-lock) --- 65,71 ---- ;; --------------------------------------------------------------------------- ! (unless drkm-conf:light-loading ! (drkm-conf:configure font-lock-mode ! :config 'config-font-lock)) Index: config-perl.el =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs.d/configs/config-perl.el,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** config-perl.el 22 Oct 2004 01:04:55 -0000 1.2 --- config-perl.el 27 May 2005 02:03:07 -0000 1.3 *************** *** 5,9 **** ;; Tags: ;; ;; Attrs: ;; ! ;; Copyright (c) 2004 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; ;; TODO: J'ai installé un mode Perl amélioré sur `darkstar' (le --- 5,9 ---- ;; Tags: ;; ;; Attrs: ;; ! ;; Copyright (c) 2004, 2005 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; ;; TODO: J'ai installé un mode Perl amélioré sur `darkstar' (le *************** *** 35,39 **** ;; Je pense qu'il s'agit bien de la méthode correcte pour ! ;; « annuler » un attribut de face. Le but est de ne pas ;; spécifier de background, d'utiliser le background de ;; `default'. --- 35,39 ---- ;; Je pense qu'il s'agit bien de la méthode correcte pour ! ;; « annuler » un attribut de face. Le but est de ne pas ;; spécifier de background, d'utiliser le background de ;; `default'. *************** *** 47,51 **** ;; --------------------------------------------------------------------------- (set-face-attribute cperl-array-face nil :background 'unspecified) ! (set-face-attribute cperl-hash-face nil :background 'unspecified) --- 47,53 ---- ;; --------------------------------------------------------------------------- (set-face-attribute cperl-array-face nil :background 'unspecified) ! (set-face-attribute cperl-array-face nil :weight 'unspecified) ! (set-face-attribute cperl-hash-face nil :background 'unspecified) ! (set-face-attribute cperl-hash-face nil :weight 'unspecified) Index: top-config-prog.el =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs.d/configs/top-config-prog.el,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** top-config-prog.el 26 May 2005 22:43:03 -0000 1.4 --- top-config-prog.el 27 May 2005 02:03:07 -0000 1.5 *************** *** 5,9 **** ;; Tags: ;; ;; Attrs: ;; ! ;; Copyright (c) 2004 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; ;; Table of Contents: --- 5,9 ---- ;; Tags: ;; ;; Attrs: ;; ! ;; Copyright (c) 2004, 2005 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; ;; Table of Contents: *************** *** 15,18 **** --- 15,19 ---- ;; - Perl Modes ;; - SQL Mode + ;; - drkm's EBNF Mode ;; - CC Mode ;; · <FILE:libxml-doc.el> *************** *** 57,62 **** "Hook par défaut pour tous les modes Lisp. ! Ceux-ci incluent pour l'instant « Lisp Mode », « Emacs Lisp ! Mode » et « Lisp Interaction Mode ». TODO: Voir également `elim()' et les modes Common Lisp." --- 58,63 ---- "Hook par défaut pour tous les modes Lisp. ! Ceux-ci incluent pour l'instant « Lisp Mode », « Emacs Lisp ! Mode » et « Lisp Interaction Mode ». TODO: Voir également `elim()' et les modes Common Lisp." *************** *** 66,73 **** "Hook par défaut pour tous les modes Emacs Lisp. ! Ceux-ci incluent pour l'instant « Emacs Lisp Mode » et « Lisp ! Interaction Mode ». ! TODO: Voir également `elim()' (et « Lisp Mode » ?)." (drkm-conf:all-lisp-modes-hook-value) (turn-on-eldoc-mode)) --- 67,74 ---- "Hook par défaut pour tous les modes Emacs Lisp. ! Ceux-ci incluent pour l'instant « Emacs Lisp Mode » et « Lisp ! Interaction Mode ». ! TODO: Voir également `elim()' (et « Lisp Mode » ?)." (drkm-conf:all-lisp-modes-hook-value) (turn-on-eldoc-mode)) *************** *** 110,119 **** ;; ;; Note. Commencer par regarder du côté de `mmm-classes'. ! ;; Cela « impose » de définir une classe pour chaque ;; combinaison de mode/sous-mode que l'on utilise, ce ;; qui n'est pas très restrictif, puisque de tels ;; usages sont tout de même en nombre limité et bien ;; identifiés. Dans un permier temps, c'est bien le ! ;; plus simple, et AMHA assez « souple » (dans le sens ;; où l'on a pas réellement besoin de souplesse ici) ;; pour un usage normal. --- 111,120 ---- ;; ;; Note. Commencer par regarder du côté de `mmm-classes'. ! ;; Cela « impose » de définir une classe pour chaque ;; combinaison de mode/sous-mode que l'on utilise, ce ;; qui n'est pas très restrictif, puisque de tels ;; usages sont tout de même en nombre limité et bien ;; identifiés. Dans un permier temps, c'est bien le ! ;; plus simple, et AMHA assez « souple » (dans le sens ;; où l'on a pas réellement besoin de souplesse ici) ;; pour un usage normal. *************** *** 142,146 **** ;; Il reste alors à configurer quelques petites choses. Ces ;; choses peuvent appartiennent à la configuration du mode HTML ! ;; ou des sous-modes. C'est la manière d'« installer » un ;; sous-mode par MMM. Il peut y avoir plusieurs sous-modes en ;; même temps. On donne donc tous les renseignements utiles à --- 143,147 ---- ;; Il reste alors à configurer quelques petites choses. Ces ;; choses peuvent appartiennent à la configuration du mode HTML ! ;; ou des sous-modes. C'est la manière d'« installer » un ;; sous-mode par MMM. Il peut y avoir plusieurs sous-modes en ;; même temps. On donne donc tous les renseignements utiles à *************** *** 179,183 **** ;; inconnu, sera installé dans les éléments et attributs pouvant ;; accepter des scripts (ça, on sais les identifier) et qui ne ! ;; correspondent pas au JavaScript. Une sorte de « par défaut ». ;; On peut même imaginer avoir deux sous-modes par défaut. La ;; règle par défaut dans le mode HTML, pour les sous-modes de --- 180,184 ---- ;; inconnu, sera installé dans les éléments et attributs pouvant ;; accepter des scripts (ça, on sais les identifier) et qui ne ! ;; correspondent pas au JavaScript. Une sorte de « par défaut ». ;; On peut même imaginer avoir deux sous-modes par défaut. La ;; règle par défaut dans le mode HTML, pour les sous-modes de *************** *** 185,190 **** ;; contient comme sous-chaîne le nom du sous-mode (par exemple, ;; ici, "text/x-unknown" conviendrait). Avec des règles de ! ;; résolution des collisions (la plus simple étant « Collision ? ! ;; Erreur ! ». ;; --------------------------------------------------------------------------- --- 186,191 ---- ;; contient comme sous-chaîne le nom du sous-mode (par exemple, ;; ici, "text/x-unknown" conviendrait). Avec des règles de ! ;; résolution des collisions (la plus simple étant « Collision ? ! ;; Erreur ! ». ;; --------------------------------------------------------------------------- *************** *** 207,211 **** (defalias 'perl-mode 'cperl-mode) (drkm-conf:configure cperl-mode ! :config 'config-perl) --- 208,213 ---- (defalias 'perl-mode 'cperl-mode) (drkm-conf:configure cperl-mode ! :config 'config-perl ! :font-lock '(dev-tags)) *************** *** 217,221 **** (drkm-conf:configure sql-mode ! :config 'config-sql) --- 219,284 ---- (drkm-conf:configure sql-mode ! :config 'config-sql ! :font-lock '(dev-tags)) ! ! ! ;; =========================================================================== ! ;;; drkm's EBNF Mode: ! ;; ================= ! ;; ! ;; Mode minimaliste, mais pouvant rendre des services, notamment ! ;; pour l'impression (en effet, le seul intérêt est pour ! ;; l'instant l'aspect visuel). ! ;; ! ;; TODO: Développer. Ajouter des commandes de déplacement, ! ;; développement de règles, TAB électrique, indentation, etc. ! ;; ! ;; En fait non. Ceci est trop spécifique au format utilisé dans ! ;; la norme SQL. Il devrait être possible de diviser le code des ! ;; différents <FILE:lisp/progmodes/ebnf*.el> de Vinicius. ! ;; Ceux-ci font la traduction en EPS. Ils ont donc tout le code ! ;; de parssage. Un tronc commun, éventuellement agrémenté par ! ;; Semantic, s'occupe du parssage. Au dessus sont bâtis les ! ;; modes d'édition, les modules d'export (comme celui de Vinicius ! ;; en EPS), etc. ! ;; --------------------------------------------------------------------------- ! ! (defvar drkm-ebnf:rule-def-face 'font-lock-keyword-face ! "FIXME<docstring>: ...") ! (defvar drkm-ebnf:rule-face 'font-lock-function-name-face ! "FIXME<docstring>: ...") ! (defvar drkm-ebnf:rule-delim-face 'font-lock-variable-name-face ! "FIXME<docstring>: ...") ! (defvar drkm-ebnf:punctuation-face 'bold ! "FIXME<docstring>: ...") ! (defvar drkm-ebnf:literate-face 'font-lock-string-face ! "FIXME<docstring>: ...") ! ! (define-generic-mode 'drkm-ebnf-generic-mode ! (list ?\;) ! nil ! '(("^<\\([-a-zA-Z0-9 _]+\\)>" 1 drkm-ebnf:rule-def-face) ! ("<\\([-a-zA-Z0-9 _]+\\)>" 1 drkm-ebnf:rule-face) ! ("[<>]\\|::=" . drkm-ebnf:rule-delim-face) ! ("[][{}|+*]" . drkm-ebnf:punctuation-face) ! ("!!\\(.+\\)$" 1 drkm-ebnf:literate-face) ! ("!!" . drkm-ebnf:punctuation-face)) ! (list "\\.ebnf\\'") ! nil ! "Generic mode for drkm's EBNF files.") ! ! (drkm-conf:configure drkm-ebnf-generic-mode ! :font-lock '(dev-tags)) ! ! ! ;; (defun yo (chapter section) ! ;; (interactive "sChapter: \nsSection: ") ! ;; (let ((target 68)) ! ;; (save-excursion ! ;; (end-of-line) ! ;; (when (> (current-column) target) ! ;; (insert "\n")) ! ;; (insert (make-string (- target (current-column)) ?\ )) ! ;; (insert (format " ; %s.%s" chapter section))))) *************** *** 299,303 **** ;; (search-forward "#include <libxml/" ;; (min (+ (point) 5000) (point-max)) ! ;; t nil))) ;; ;; (let ((hook (lambda() --- 362,366 ---- ;; (search-forward "#include <libxml/" ;; (min (+ (point) 5000) (point-max)) ! ;; t))) ;; ;; (let ((hook (lambda() *************** *** 310,313 **** --- 373,422 ---- ;; (setq libxmldoc-filter-regexp "^html\\|^$") + (defvar drkm-cc:use-oci-lib-p nil + "FIXME<docstring>: ... Peut etre utilise dans les File Local Vars.") + + (defun drkm-cc:use-oci-lib-p () + "FIXME<docstring>: ..." + (or drkm-cc:use-oci-lib-p + (save-excursion + (beginning-of-buffer) + (search-forward-regexp "#[ \t]*include[ \t]+[<\"]oci.h" + (min (+ (point) 5000) (point-max)) + t)))) + + (defvar drkm-cc:oci-types + '("dvoid" "sword" "text" + "sb1" "sb2" "sb4" "ub1" "ub2" "ub4" + "OCIDefine" "OCIParam" "OCIStmt" "OCITypeCode") + "FIXME<docstring>: ...") + + (defvar drkm-cc:oci-types-re (regexp-opt drkm-cc:oci-types) + "FIXME<docstring>: ...") + + (defun drkm-cc:add-oci-types-to-font-lock () + "FIXME<docstring>: ..." + (push drkm-cc:oci-types-re c-font-lock-extra-types)) + + (defun drkm-cc:config-if-using-oci () + "FIXME<docstring>: ..." + (when (drkm-cc:use-oci-lib-p) + (drkm-cc:add-oci-types-to-font-lock))) + + (add-hook 'c-mode-hook 'drkm-cc:config-if-using-oci) + + (defvar drkm-c-extra-types nil + "FIXME<docstring>: ...") + + (defun drkm-cc:add-file-extra-types-to-font-lock () + "FIXME<docstring>: ..." + (when (and drkm-c-extra-types (eq 'c-mode major-mode)) + (unless (listp drkm-c-extra-types) + (setq drkm-c-extra-types (list drkm-c-extra-types))) + (dolist (type drkm-c-extra-types) + (push (symbol-name type) c-font-lock-extra-types)))) + + (add-hook 'hack-local-variables-hook + 'drkm-cc:add-file-extra-types-to-font-lock) + ;; --------------------------------------------------------------------------- Index: config-nxml.el =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs.d/configs/config-nxml.el,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** config-nxml.el 31 Dec 2004 07:41:26 -0000 1.4 --- config-nxml.el 27 May 2005 02:03:07 -0000 1.5 *************** *** 5,9 **** ;; Tags: ;; ;; Attrs: ;; ! ;; Copyright (c) 2004 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; ;; ToC: --- 5,9 ---- ;; Tags: ;; ;; Attrs: ;; ! ;; Copyright (c) 2004, 2005 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; ;; ToC: Index: config-drkm-lib.el =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs.d/configs/config-drkm-lib.el,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** config-drkm-lib.el 22 Oct 2004 01:04:55 -0000 1.2 --- config-drkm-lib.el 27 May 2005 02:03:07 -0000 1.3 *************** *** 5,9 **** ;; Tags: ;; ;; Attrs: ;; ! ;; Copyright (c) 2004 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; ;; FIXME: Je n'utilise pas la plupart du code ici présent. Il --- 5,9 ---- ;; Tags: ;; ;; Attrs: ;; ! ;; Copyright (c) 2004, 2005 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; ;; FIXME: Je n'utilise pas la plupart du code ici présent. Il *************** *** 121,129 **** ;; alternative à l'utilisation que j'imagine de tels arguments. ;; --------------------------------------------------------------------------- ! (global-set-key "\"" '(lambda (prefix) ! (interactive "*P") ! (if prefix ! (drkm-insert-french-quotes) ! (self-insert-command 1)))) ;; TODO: Faire en sorte que le code suivant soit en accord avec --- 121,129 ---- ;; alternative à l'utilisation que j'imagine de tels arguments. ;; --------------------------------------------------------------------------- ! ;; (global-set-key "\"" '(lambda (prefix) ! ;; (interactive "*P") ! ;; (if prefix ! ;; (drkm-insert-french-quotes) ! ;; (self-insert-command 1)))) ;; TODO: Faire en sorte que le code suivant soit en accord avec Index: config-TMP.el =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs.d/configs/config-TMP.el,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** config-TMP.el 26 May 2005 22:43:03 -0000 1.3 --- config-TMP.el 27 May 2005 02:03:06 -0000 1.4 *************** *** 5,9 **** ;; Tags: ;; ;; Attrs: ;; ! ;; Copyright (c) 2004 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; ;; Code de configuration temporaire. --- 5,9 ---- ;; Tags: ;; ;; Attrs: ;; ! ;; Copyright (c) 2004, 2005 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; ;; Code de configuration temporaire. *************** *** 63,68 **** (drkm-conf:load-init-file "BUG-insert-directory")) ! (drkm-conf:load-init-file "BUG-eieio-defclass") ! (drkm-conf:load-init-file "BUG-eieio-generic-call") --- 63,71 ---- (drkm-conf:load-init-file "BUG-insert-directory")) ! (dolist (file '("BUG-eieio-defclass" "BUG-eieio-generic-call")) ! (when (file-exists-p file) ! (drkm-conf:load-init-file file))) ! ;; (drkm-conf:load-init-file "BUG-eieio-defclass") ! ;; (drkm-conf:load-init-file "BUG-eieio-generic-call") Index: config-sql.el =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs.d/configs/config-sql.el,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** config-sql.el 22 Oct 2004 01:04:55 -0000 1.2 --- config-sql.el 27 May 2005 02:03:07 -0000 1.3 *************** *** 5,9 **** ;; Tags: ;; ;; Attrs: ;; ! ;; Copyright (c) 2004 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; ;; Si je dois refaire de l'Embedded SQL, définir un mode dérivé --- 5,9 ---- ;; Tags: ;; ;; Attrs: ;; ! ;; Copyright (c) 2004, 2005 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; ;; Si je dois refaire de l'Embedded SQL, définir un mode dérivé Index: config-cedet.el =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs.d/configs/config-cedet.el,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** config-cedet.el 28 Dec 2004 17:38:31 -0000 1.5 --- config-cedet.el 27 May 2005 02:03:07 -0000 1.6 *************** *** 5,9 **** ;; Tags: BUG FIXME TODO ;; ;; Attrs: docstring EMERG ;; ! ;; Copyright (c) 2004 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; ;; Table of Contents: --- 5,9 ---- ;; Tags: BUG FIXME TODO ;; ;; Attrs: docstring EMERG ;; ! ;; Copyright (c) 2004, 2005 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; ;; Table of Contents: *************** *** 57,61 **** (require 'drkm-config) ! (require 'cedet-load) ;; Really ? --- 57,62 ---- (require 'drkm-config) ! (unless (require 'cedet-load nil t) ;; Really ? ! (throw 'drkm-conf:not-available "CEDET seems not to be properly installed!")) Index: config-make.el =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs.d/configs/config-make.el,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** config-make.el 27 Dec 2004 05:49:56 -0000 1.1 --- config-make.el 27 May 2005 02:03:07 -0000 1.2 *************** *** 5,9 **** ;; Tags: ;; ;; Attrs: ;; ! ;; Copyright (c) 2004 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; --- 5,9 ---- ;; Tags: ;; ;; Attrs: ;; ! ;; Copyright (c) 2004, 2005 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; Index: top-config-other-edit.el =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs.d/configs/top-config-other-edit.el,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** top-config-other-edit.el 4 Jan 2005 23:43:16 -0000 1.4 --- top-config-other-edit.el 27 May 2005 02:03:07 -0000 1.5 *************** *** 5,9 **** ;; Tags: ;; ;; Attrs: ;; ! ;; Copyright (c) 2004 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; ;; Table of Contents: --- 5,9 ---- ;; Tags: ;; ;; Attrs: ;; ! ;; Copyright (c) 2004, 2005 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; ;; Table of Contents: Index: top-config-misc.el =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs.d/configs/top-config-misc.el,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** top-config-misc.el 26 May 2005 22:43:03 -0000 1.8 --- top-config-misc.el 27 May 2005 02:03:07 -0000 1.9 *************** *** 5,9 **** ;; Tags: ;; ;; Attrs: ;; ! ;; Copyright (c) 2004 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; ;; Table of Contents: --- 5,9 ---- ;; Tags: ;; ;; Attrs: ;; ! ;; Copyright (c) 2004, 2005 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; ;; Table of Contents: *************** *** 29,33 **** ;; que le mieux à utiliser pour le français est le Latin-9 (c'est ;; à dire ISO-8859-15). Se rencarder, voir comment utiliser `C-x ! ;; 8' avec LAtin-9 (principalement le « oe » ligaturé), lire ;; <INFO:elisp/Input Methods>, etc. Cfr. le début du fichier ;; <FILE:~/.emacs> pour d'autres références ... --- 29,33 ---- ;; que le mieux à utiliser pour le français est le Latin-9 (c'est ;; à dire ISO-8859-15). Se rencarder, voir comment utiliser `C-x ! ;; 8' avec LAtin-9 (principalement le « oe » ligaturé), lire ;; <INFO:elisp/Input Methods>, etc. Cfr. le début du fichier ;; <FILE:~/.emacs> pour d'autres références ... *************** *** 81,84 **** --- 81,85 ---- (menu-bar-mode 0)) ;; turn off the menu bar under the console (tool-bar-mode 0) ;; turn off the tool bar + (drkm-key:define-key-alias (kbd "<C-tab>") (kbd "M-TAB")) ;; TODO: Utiliser plutôt `substitute-key-definition()' ? (global-set-key (kbd "C-x C-b") 'electric-buffer-list) *************** *** 131,134 **** --- 132,137 ---- (setq backup-by-copying-when-linked t) + (auto-compression-mode 1) + ;; FIXME: (global-set-key "\M-!" *************** *** 167,172 **** (setq ps-paper-type 'a4) ! ;; Fait en sorte que le « Lisp printer » sorte des listes ! ;; circulaires suivant une « hash notation », comme ceci, par ;; exemple, pour une liste dont le premier élément est le symbole ;; `a', et le second la liste elle-même : --- 170,175 ---- (setq ps-paper-type 'a4) ! ;; Fait en sorte que le « Lisp printer » sorte des listes ! ;; circulaires suivant une « hash notation », comme ceci, par ;; exemple, pour une liste dont le premier élément est le symbole ;; `a', et le second la liste elle-même : *************** *** 193,197 **** (setq browse-url-browser-function 'browse-url-lynx-emacs) ! ;; FIXME: My personal « rmail primary file ». A réviser ... ;; --------------------------------------------------------------------------- (setq rmail-file-name "~/.rmail") --- 196,200 ---- (setq browse-url-browser-function 'browse-url-lynx-emacs) ! ;; FIXME: My personal « rmail primary file ». A réviser ... ;; --------------------------------------------------------------------------- (setq rmail-file-name "~/.rmail") *************** *** 206,209 **** --- 209,220 ---- (set-face-attribute 'diff-removed-face nil :weight 'normal))) + ;; Ediff Mode: + ;; + ;; Configure la version que j'ai modifiée dans <FILE:overloads/>. + ;; --------------------------------------------------------------------------- + (setq ediff-filter-out-names-data '(".~" "CVS") + ediff-dir-contents-filters '(ediff-filter-out-names + ediff-filter-out-cvsignore)) + ;; =========================================================================== *************** *** 256,260 **** ;; plusieurs visites d'un même fichier. ;; ! ;; TODO: Implémenter le support de « Shared MIME-info Database » ;; <URL:http://www.freedesktop.org/Standards/shared-mime-info-spec> ;; de freedesktop.org (qui contient d'ailleurs sans doute --- 267,271 ---- ;; plusieurs visites d'un même fichier. ;; ! ;; TODO: Implémenter le support de « Shared MIME-info Database » ;; <URL:http://www.freedesktop.org/Standards/shared-mime-info-spec> ;; de freedesktop.org (qui contient d'ailleurs sans doute *************** *** 266,270 **** desktop-path (list drkm-conf:emacs-dir)) ! (desktop-save-mode 1) (defcustom drkm-misc:recentf-file-in-emacs-dir "recentf" --- 277,282 ---- desktop-path (list drkm-conf:emacs-dir)) ! (when (fboundp 'desktop-save-mode) ! (desktop-save-mode 1)) (defcustom drkm-misc:recentf-file-in-emacs-dir "recentf" *************** *** 286,290 **** ;; --------------------------------------------------------------------------- ! (defvar drkm-misc:completion-ignored-extensions '("RCS/" ".gz" ".tgz" ".exe") "Extensions to add to `completion-ignored-extensios'.") --- 298,306 ---- ;; --------------------------------------------------------------------------- ! ;; Je viens de retirer l'extension ".gz" de cette liste (mais pas ! ;; ".tgz"), puisque j'ai ajouté le support des fichiers compressés ! ;; (auto-compression-mode). Voir si cela tient la route, à ! ;; l'utilisation ... ! (defvar drkm-misc:completion-ignored-extensions '("RCS/" ".tgz" ".exe") "Extensions to add to `completion-ignored-extensios'.") Index: config-psgml.el =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs.d/configs/config-psgml.el,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** config-psgml.el 25 Oct 2004 00:52:09 -0000 1.3 --- config-psgml.el 27 May 2005 02:03:07 -0000 1.4 *************** *** 5,9 **** ;; Tags: ;; ;; Attrs: ;; ! ;; Copyright (c) 2004 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; ;; ToC: --- 5,9 ---- ;; Tags: ;; ;; Attrs: ;; ! ;; Copyright (c) 2004, 2005 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; ;; ToC: Index: top-config-web.el =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs.d/configs/top-config-web.el,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** top-config-web.el 26 May 2005 22:43:03 -0000 1.5 --- top-config-web.el 27 May 2005 02:03:08 -0000 1.6 *************** *** 5,9 **** ;; Tags: ;; ;; Attrs: ;; ! ;; Copyright (c) 2004 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; ;; Table of Contents: --- 5,9 ---- ;; Tags: ;; ;; Attrs: ;; ! ;; Copyright (c) 2004, 2005 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; ;; Table of Contents: Index: config-ediff.el =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs.d/configs/config-ediff.el,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** config-ediff.el 26 May 2005 22:43:03 -0000 1.1 --- config-ediff.el 27 May 2005 02:03:07 -0000 1.2 *************** *** 1,227 **** ! ! ! ;; TODO<EMERG>: !!! ;; ! ;; Les présentes modifs ont été copiées (et remodifiées) dans les ! ;; fichiers <FILE:overloads/ediff-diff.el> et ! ;; <FILE:overloads/ediff-mult.el>. Générer un patch et proposer sur ! ;; le ML emacs-devel. Mais d'abord sur f.c.a.emacs. - ;; TODO: Ce fichier n'est pas encore inséré dans l'évaluation au - ;; lancement. ! ;; TODO: Créer un wrapper autour de `edirs()' pour des cas comme mes ! ;; répertoires d'ELisp (sf.net). À la rigueur, au début, se contenter ! ;; d'un wrapper contenant le nom des répertoires ... - (require 'drkm-file) ! (require 'ediff) ! (require 'ediff-mult) ! (defun drkm-ediff:same-file-content-3 (file1 file2 &optional file3) ! "FIXME<docstring>: ..." ! (and (ediff-same-file-contents file1 file2) ! (or (null file3) ! (and (ediff-same-file-contents file1 file3) ! (ediff-same-file-contents file2 file3))))) ! (defalias 'intersect-directories-overload ! 'drkm-ediff:intersect-directories-overload) ! (defvar drkm-ediff:dir-content-filter nil ! "FIXME<docstring>: ...") ! (defun drkm-ediff:get-dir-content (dir1 dir2 dir3 regexp) ! "FIXME<docstring>: ..." ! (setq dir1 (file-name-as-directory dir1) ! dir2 (file-name-as-directory dir2) ! dir3 (and (stringp dir3) (file-name-as-directory dir3))) ! (if (stringp dir3) ! (list (cons dir1 (drkm-ediff:get-dir-content-1 dir1 dir2 dir3 regexp)) ! (cons dir2 (drkm-ediff:get-dir-content-1 dir2 dir1 dir3 regexp)) ! (cons dir3 (drkm-ediff:get-dir-content-1 dir3 dir1 dir2 regexp))) ! (list (cons dir1 (drkm-ediff:get-dir-content-1 dir1 dir2 dir3 regexp)) ! (cons dir2 (drkm-ediff:get-dir-content-1 dir2 dir1 dir3 regexp))))) ! (defun drkm-ediff:get-dir-content-1 (dir1 dir2 dir3 regexp) ! "FIXME<docstring>: ..." ! (mapcar (lambda (f) ! (ediff-add-slash-if-directory dir1 f)) ! (let* ((default-directory (expand-file-name dir1)) ! (res (directory-files dir1 nil regexp))) ! (setq res (delete "." (delete ".." res))) ! (cond ((consp drkm-ediff:dir-content-filter) ! (dolist (filter drkm-ediff:dir-content-filter) ! (setq res (funcall filter res dir1 dir2 dir3))) ! res) ! (drkm-ediff:dir-content-filter ! (funcall drkm-ediff:dir-content-filter res dir1 dir2 dir3)) ! (t ! res))))) ! (defvar drkm-ediff:filter-out-names-data nil ! "FIXME<docstring>: ...") ! (defun drkm-ediff:filter-out-names (content dir1 dir2 dir3) ! "FIXME<docstring>: ..." ! (dolist (name drkm-ediff:filter-out-names-data) ! (setq content (delete name content))) ! content) ! (defvar drkm-ediff:filter-out-regexps-data nil ! "FIXME<docstring>: ...") ! (defun drkm-ediff:filter-out-regexps (content dir1 dir2 dir3) ! "FIXME<docstring>: ..." ! (dolist (name drkm-ediff:filter-out-regexps-data) ! (setq content (delete* name content :test 'string-match))) ! content) ! (defvar drkm-ediff:filter-out-wildcards-data nil ! "FIXME<docstring>: ...") ! (defun drkm-ediff:filter-out-wildcards (content dir1 dir2 dir3) ! "FIXME<docstring>: ..." ! (mapc (lambda (match) (setq content (delete match content))) ! (apply 'nconc (mapcar 'file-expand-wildcards ! drkm-ediff:filter-out-wildcards-data))) ! content) ! (defun drkm-ediff:get-cvsignore-wildcards (dir1 dir2 &optional dir3) ! "FIXME<docstring>: ..." ! (let ((files ! (delq nil (mapcar (lambda (d) ! (let ((f (drkm-file:file-in-dir ".cvsignore" d))) ! (when (file-exists-p f) ! f))) ! (if (stringp dir3) ! (list dir1 dir2 dir3) ! (list dir1 dir2)))))) ! (when (and (> (length files) 1) ! (not (apply 'drkm-ediff:same-file-content-3 files))) ! (error ".cvsignore files are differents! %S" files)) ! (when files ! (split-string (drkm-file:get-contents (car files)) "[ \n]+" t)))) ! (defun drkm-ediff:filter-out-cvsignore (content dir1 dir2 &optional dir3) ! "FIXME<docstring>: ..." ! (let ((drkm-ediff:filter-out-wildcards-data ! (drkm-ediff:get-cvsignore-wildcards dir1 dir2 dir3))) ! (drkm-ediff:filter-out-wildcards content dir1 dir2 dir3))) ! (defun drkm-ediff:intersect-directories-overload (jobname regexp dir1 dir2 ! &optional dir3 ! merge-autostore-dir ! comparison-func) ! "FIXME<docstring>: ..." ! (setq comparison-func (or comparison-func 'string=)) ! (let (lis1 lis2 lis3 common auxdir1 auxdir2 auxdir3 common-part difflist) ! (let ((res (drkm-ediff:get-dir-content dir1 dir2 dir3 regexp))) ! (setq auxdir1 (car (nth 0 res)) lis1 (cdr (nth 0 res)) ! auxdir2 (car (nth 1 res)) lis2 (cdr (nth 1 res)) ! auxdir3 (car (nth 2 res)) lis3 (cdr (nth 2 res)))) ! (if (ediff-nonempty-string-p merge-autostore-dir) ! (setq merge-autostore-dir ! (file-name-as-directory merge-autostore-dir))) ! (setq common (ediff-intersection lis1 lis2 comparison-func)) ! ;; In merge with ancestor jobs, we don't intersect with lis3. ! ;; If there is no ancestor, we'll offer to merge without the ancestor. ! ;; So, we intersect with lis3 only when we are doing 3-way file comparison ! (if (and lis3 (ediff-comparison-metajob3 jobname)) ! (setq common (ediff-intersection common lis3 comparison-func))) ! ;; copying is needed because sort sorts via side effects ! (setq common (sort (ediff-copy-list common) 'string-lessp)) ! ;; compute difference list ! (setq difflist (ediff-set-difference ! (ediff-union (ediff-union lis1 lis2 comparison-func) ! lis3 ! comparison-func) ! common ! comparison-func) ! difflist (delete "." difflist) ! ;; copying is needed because sort sorts via side effects ! difflist (sort (ediff-copy-list (delete ".." difflist)) ! 'string-lessp)) ! (setq difflist (mapcar (lambda (elt) (cons elt 1)) difflist)) - ;; check for files belonging to lis1/2/3 - ;; Each elt is of the norm (file . number) - ;; Number encodes the directories to which file belongs. - ;; It is a product of a subset of ediff-membership-code1=2, - ;; ediff-membership-code2=3, and ediff-membership-code3=5. - ;; If file belongs to dir 1 only, the membership code is 2. - ;; If it is in dir1 and dir3, then the membership code is 2*5=10; - ;; if it is in dir1 and dir2, then the membership code is 2*3=6, etc. - (mapcar (lambda (elt) - (if (member (car elt) lis1) - (setcdr elt (* (cdr elt) ediff-membership-code1))) - (if (member (car elt) lis2) - (setcdr elt (* (cdr elt) ediff-membership-code2))) - (if (member (car elt) lis3) - (setcdr elt (* (cdr elt) ediff-membership-code3))) - ) - difflist) - (setq difflist (cons - ;; diff metalist header - (ediff-make-new-meta-list-header regexp - auxdir1 auxdir2 auxdir3 - merge-autostore-dir - comparison-func) - difflist)) ! (setq common-part ! (cons ! ;; metalist header ! (ediff-make-new-meta-list-header regexp ! auxdir1 auxdir2 auxdir3 ! merge-autostore-dir ! comparison-func) ! (mapcar ! (lambda (elt) ! (ediff-make-new-meta-list-element ! (concat auxdir1 elt) ! (concat auxdir2 elt) ! (if lis3 ! (progn ! ;; The following is done because: In merging with ! ;; ancestor, we don't intersect with lis3. So, it is ! ;; possible that elt is a file in auxdir1/2 but a ! ;; directory in auxdir3 Or elt may not exist in auxdir3 at ! ;; all. In the first case, we add a slash at the end. In ! ;; the second case, we insert nil. ! (setq elt (ediff-add-slash-if-directory auxdir3 elt)) ! (if (file-exists-p (concat auxdir3 elt)) ! (concat auxdir3 elt)))))) ! common))) ! ;; return result ! (cons common-part difflist) ! )) ! ;;; Tests ! (setq ediff-filter-out-names-data '(".~") ! ediff-dir-contents-filters '(ediff-filter-out-names ! ediff-filter-out-cvsignore)) ! (setq drkm-ediff:filter-out-names-data '(".~" "CVS") ! drkm-ediff:dir-content-filter '(drkm-ediff:filter-out-names ! drkm-ediff:filter-out-cvsignore)) - (setq drkm-ediff:filter-out-regexps-data '("~") - drkm-ediff:dir-content-filter '(drkm-ediff:filter-out-regexps - drkm-ediff:filter-out-cvsignore)) ! (let ((dir1 "~/.emacs.d/home-lisp/drkm-lib/") ! (dir2 "~/.emacs.working/drkm-lib/")) ! ; (drkm-ediff:get-cvsignore-content dir1 dir2) ! (drkm-ediff:get-dir-content dir1 dir2 nil nil)) --- 1,238 ---- ! ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ! ;; File: config-ediff.el ;; ! ;; Author: F. Georges ;; ! ;; Date: 2004-12-22 ;; ! ;; Tags: ;; ! ;; Attrs: ;; ! ;; Copyright (c) 2004, 2005 Florent Georges ;; ! ;; ------------------------------------------------------------------------ ;; ! ;; TODO<EMERG>: !!! ;; ! ;; Les présentes modifs ont été copiées (et *remodifiées*) dans ! ;; les fichiers <FILE:overloads/ediff-diff.el> et ! ;; <FILE:overloads/ediff-mult.el>. Générer un patch et proposer ! ;; sur la ML emacs-devel. Mais d'abord sur f.c.a.emacs. ! ;; --------------------------------------------------------------------------- ! ;; (require 'drkm-file) + ;; (require 'ediff) + ;; (require 'ediff-mult) ! ;; (defun drkm-ediff:same-file-content-3 (file1 file2 &optional file3) ! ;; "FIXME<docstring>: ..." ! ;; (and (ediff-same-file-contents file1 file2) ! ;; (or (null file3) ! ;; (and (ediff-same-file-contents file1 file3) ! ;; (ediff-same-file-contents file2 file3))))) + ;; (defalias 'intersect-directories-overload + ;; 'drkm-ediff:intersect-directories-overload) ! ;; (defvar drkm-ediff:dir-content-filter nil ! ;; "FIXME<docstring>: ...") ! ;; (defun drkm-ediff:get-dir-content (dir1 dir2 dir3 regexp) ! ;; "FIXME<docstring>: ..." ! ;; (setq dir1 (file-name-as-directory dir1) ! ;; dir2 (file-name-as-directory dir2) ! ;; dir3 (and (stringp dir3) (file-name-as-directory dir3))) ! ;; (if (stringp dir3) ! ;; (list (cons dir1 (drkm-ediff:get-dir-content-1 dir1 dir2 dir3 regexp)) ! ;; (cons dir2 (drkm-ediff:get-dir-content-1 dir2 dir1 dir3 regexp)) ! ;; (cons dir3 (drkm-ediff:get-dir-content-1 dir3 dir1 dir2 regexp))) ! ;; (list (cons dir1 (drkm-ediff:get-dir-content-1 dir1 dir2 dir3 regexp)) ! ;; (cons dir2 (drkm-ediff:get-dir-content-1 dir2 dir1 dir3 regexp))))) ! ;; (defun drkm-ediff:get-dir-content-1 (dir1 dir2 dir3 regexp) ! ;; "FIXME<docstring>: ..." ! ;; (mapcar (lambda (f) ! ;; (ediff-add-slash-if-directory dir1 f)) ! ;; (let* ((default-directory (expand-file-name dir1)) ! ;; (res (directory-files dir1 nil regexp))) ! ;; (setq res (delete "." (delete ".." res))) ! ;; (cond ((consp drkm-ediff:dir-content-filter) ! ;; (dolist (filter drkm-ediff:dir-content-filter) ! ;; (setq res (funcall filter res dir1 dir2 dir3))) ! ;; res) ! ;; (drkm-ediff:dir-content-filter ! ;; (funcall drkm-ediff:dir-content-filter res dir1 dir2 dir3)) ! ;; (t ! ;; res))))) ! ;; (defvar drkm-ediff:filter-out-names-data nil ! ;; "FIXME<docstring>: ...") ! ;; (defun drkm-ediff:filter-out-names (content dir1 dir2 dir3) ! ;; "FIXME<docstring>: ..." ! ;; (dolist (name drkm-ediff:filter-out-names-data) ! ;; (setq content (delete name content))) ! ;; content) ! ;; (defvar drkm-ediff:filter-out-regexps-data nil ! ;; "FIXME<docstring>: ...") ! ;; (defun drkm-ediff:filter-out-regexps (content dir1 dir2 dir3) ! ;; "FIXME<docstring>: ..." ! ;; (dolist (name drkm-ediff:filter-out-regexps-data) ! ;; (setq content (delete* name content :test 'string-match))) ! ;; content) ! ;; (defvar drkm-ediff:filter-out-wildcards-data nil ! ;; "FIXME<docstring>: ...") ! ;; (defun drkm-ediff:filter-out-wildcards (content dir1 dir2 dir3) ! ;; "FIXME<docstring>: ..." ! ;; (mapc (lambda (match) (setq content (delete match content))) ! ;; (apply 'nconc (mapcar 'file-expand-wildcards ! ;; drkm-ediff:filter-out-wildcards-data))) ! ;; content) ! ;; (defun drkm-ediff:get-cvsignore-wildcards (dir1 dir2 &optional dir3) ! ;; "FIXME<docstring>: ..." ! ;; (let ((files ! ;; (delq nil (mapcar (lambda (d) ! ;; (let ((f (drkm-file:file-in-dir ".cvsignore" d))) ! ;; (when (file-exists-p f) ! ;; f))) ! ;; (if (stringp dir3) ! ;; (list dir1 dir2 dir3) ! ;; (list dir1 dir2)))))) ! ;; (when (and (> (length files) 1) ! ;; (not (apply 'drkm-ediff:same-file-content-3 files))) ! ;; (error ".cvsignore files are differents! %S" files)) ! ;; (when files ! ;; (split-string (drkm-file:get-contents (car files)) "[ \n]+" t)))) ! ;; (defun drkm-ediff:filter-out-cvsignore (content dir1 dir2 &optional dir3) ! ;; "FIXME<docstring>: ..." ! ;; (let ((drkm-ediff:filter-out-wildcards-data ! ;; (drkm-ediff:get-cvsignore-wildcards dir1 dir2 dir3))) ! ;; (drkm-ediff:filter-out-wildcards content dir1 dir2 dir3))) ! ;; (defun drkm-ediff:intersect-directories-overload (jobname regexp dir1 dir2 ! ;; &optional dir3 ! ;; merge-autostore-dir ! ;; comparison-func) ! ;; "FIXME<docstring>: ..." ! ;; (setq comparison-func (or comparison-func 'string=)) ! ;; (let (lis1 lis2 lis3 common auxdir1 auxdir2 auxdir3 common-part difflist) ! ;; (let ((res (drkm-ediff:get-dir-content dir1 dir2 dir3 regexp))) ! ;; (setq auxdir1 (car (nth 0 res)) lis1 (cdr (nth 0 res)) ! ;; auxdir2 (car (nth 1 res)) lis2 (cdr (nth 1 res)) ! ;; auxdir3 (car (nth 2 res)) lis3 (cdr (nth 2 res)))) ! ;; (if (ediff-nonempty-string-p merge-autostore-dir) ! ;; (setq merge-autostore-dir ! ;; (file-name-as-directory merge-autostore-dir))) ! ;; (setq common (ediff-intersection lis1 lis2 comparison-func)) ! ;; ;; In merge with ancestor jobs, we don't intersect with lis3. ! ;; ;; If there is no ancestor, we'll offer to merge without the ancestor. ! ;; ;; So, we intersect with lis3 only when we are doing 3-way file comparison ! ;; (if (and lis3 (ediff-comparison-metajob3 jobname)) ! ;; (setq common (ediff-intersection common lis3 comparison-func))) ! ;; ;; copying is needed because sort sorts via side effects ! ;; (setq common (sort (ediff-copy-list common) 'string-lessp)) ! ;; ;; compute difference list ! ;; (setq difflist (ediff-set-difference ! ;; (ediff-union (ediff-union lis1 lis2 comparison-func) ! ;; lis3 ! ;; comparison-func) ! ;; common ! ;; comparison-func) ! ;; difflist (delete "." difflist) ! ;; ;; copying is needed because sort sorts via side effects ! ;; difflist (sort (ediff-copy-list (delete ".." difflist)) ! ;; 'string-lessp)) ! ;; (setq difflist (mapcar (lambda (elt) (cons elt 1)) difflist)) ! ;; ;; check for files belonging to lis1/2/3 ! ;; ;; Each elt is of the norm (file . number) ! ;; ;; Number encodes the directories to which file belongs. ! ;; ;; It is a product of a subset of ediff-membership-code1=2, ! ;; ;; ediff-membership-code2=3, and ediff-membership-code3=5. ! ;; ;; If file belongs to dir 1 only, the membership code is 2. ! ;; ;; If it is in dir1 and dir3, then the membership code is 2*5=10; ! ;; ;; if it is in dir1 and dir2, then the membership code is 2*3=6, etc. ! ;; (mapcar (lambda (elt) ! ;; (if (member (car elt) lis1) ! ;; (setcdr elt (* (cdr elt) ediff-membership-code1))) ! ;; (if (member (car elt) lis2) ! ;; (setcdr elt (* (cdr elt) ediff-membership-code2))) ! ;; (if (member (car elt) lis3) ! ;; (setcdr elt (* (cdr elt) ediff-membership-code3))) ! ;; ) ! ;; difflist) ! ;; (setq difflist (cons ! ;; ;; diff metalist header ! ;; (ediff-make-new-meta-list-header regexp ! ;; auxdir1 auxdir2 auxdir3 ! ;; merge-autostore-dir ! ;; comparison-func) ! ;; difflist)) ! ;; (setq common-part ! ;; (cons ! ;; ;; metalist header ! ;; (ediff-make-new-meta-list-header regexp ! ;; auxdir1 auxdir2 auxdir3 ! ;; merge-autostore-dir ! ;; comparison-func) ! ;; (mapcar ! ;; (lambda (elt) ! ;; (ediff-make-new-meta-list-element ! ;; (concat auxdir1 elt) ! ;; (concat auxdir2 elt) ! ;; (if lis3 ! ;; (progn ! ;; ;; The following is done because: In merging with ! ;; ;; ancestor, we don't intersect with lis3. So, it is ! ;; ;; possible that elt is a file in auxdir1/2 but a ! ;; ;; directory in auxdir3 Or elt may not exist in auxdir3 at ! ;; ;; all. In the first case, we add a slash at the end. In ! ;; ;; the second case, we insert nil. ! ;; (setq elt (ediff-add-slash-if-directory auxdir3 elt)) ! ;; (if (file-exists-p (concat auxdir3 elt)) ! ;; (concat auxdir3 elt)))))) ! ;; common))) ! ;; ;; return result ! ;; (cons common-part difflist) ! ;; )) ! ;;; Tests + ;; (setq ediff-filter-out-names-data '(".~" "CVS") + ;; ediff-dir-contents-filters '(ediff-filter-out-names + ;; ediff-filter-out-cvsignore)) ! ;; (setq drkm-ediff:filter-o... [truncated message content] |
From: drkm <flo...@us...> - 2005-05-27 02:03:16
|
Update of /cvsroot/drkm-lib/home/drkm/.emacs.d/fstyles In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21353/drkm/.emacs.d/fstyles Added Files: cern-fstyle.el ipl-fstyle.el Log Message: Changes from lxplus.cern.ch. --- NEW FILE: ipl-fstyle.el --- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; File: ipl-fstyle.el ;; ;; Author: F. Georges ;; ;; Date: 2005-02-24 ;; ;; Tags: ;; ;; Attrs: ;; ;; Copyright (c) 2005 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; (require 'file-style) (require 'drkm-fstyle) (defclass ipl-fstyle:style (drkm-fstyle:style) () ;; FIXME: "FIXME<dostring>: ...") (defmethod fstyle-ps:get-headers ((style ipl-fstyle:style)) "FIXME<docstring>: ..." (let ((author (or (ipl-fstyle::get-authors) "(F. Georges)"))) `((ps-get-buffer-name drkm-ps:header-dirpart ,author) ("/pagenumberstring load" (lambda () (format-time-string "%Y-%m-%dT%H:%M:%S%z"))) 3))) ;; FIXME: Devrait se trouver dans `drkm-fstyle:style' ... (defun ipl-fstyle::get-authors () "FIXME<docstring>: ..." (save-excursion (goto-char (point-min)) (when (search-forward-regexp " Authors?: +" 500 t) (let ((start (point))) (search-forward " ") (buffer-substring-no-properties start (- (point) 2)))))) (fstyle:provide 'ipl 'ipl-fstyle:style) ;; --------------------------------------------------------------------------- ;; $Id: ipl-fstyle.el,v 1.1 2005/05/27 02:03:08 florentgeorges Exp $ ;; --------------------------------------------------------------------------- ;; Local Variables: ;; mode: emacs-lisp ;; indent-tabs-mode: nil ;; drkm-style: drkm ;; End: ;; --------------------------------------------------------------------------- --- NEW FILE: cern-fstyle.el --- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; File: cern-fstyle.el ;; ;; Author: F. Georges ;; ;; Date: 2005-02-24 ;; ;; Tags: ;; ;; Attrs: ;; ;; Copyright (c) 2005 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; (require 'file-style) (defclass cern-fstyle:style (fstyle:style) () ;; FIXME: "FIXME<dostring>: ...") (defmethod fstyle-ps:get-headers ((style cern-fstyle:style)) "FIXME<docstring>: ..." '((ps-get-buffer-name drkm-ps:header-dirpart "(F. Georges <fge...@ce...>)") ("/pagenumberstring load" (lambda () (format-time-string "%Y-%m-%dT%H:%M:%S%z"))) 3)) (fstyle:provide 'cern 'cern-fstyle:style) ;; --------------------------------------------------------------------------- ;; $Id: cern-fstyle.el,v 1.1 2005/05/27 02:03:08 florentgeorges Exp $ ;; --------------------------------------------------------------------------- ;; Local Variables: ;; mode: emacs-lisp ;; indent-tabs-mode: nil ;; drkm-style: drkm ;; End: ;; --------------------------------------------------------------------------- |
From: drkm <flo...@us...> - 2005-05-27 02:03:16
|
Update of /cvsroot/drkm-lib/home/drkm/.emacs.d In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21353/drkm/.emacs.d Modified Files: init.local.el subdirs.el Log Message: Changes from lxplus.cern.ch. Index: subdirs.el =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs.d/subdirs.el,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** subdirs.el 4 Jan 2005 23:43:05 -0000 1.3 --- subdirs.el 27 May 2005 02:03:06 -0000 1.4 *************** *** 3,5 **** (require 'drkm-config) ! (drkm-conf:subdirs-init-dirs '("configs" "home-lisp" "overloads")) --- 3,5 ---- (require 'drkm-config) ! (drkm-conf:subdirs-init-dirs '("configs" "fstyles" "home-lisp" "overloads")) Index: init.local.el =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs.d/init.local.el,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** init.local.el 26 May 2005 22:52:20 -0000 1.6 --- init.local.el 27 May 2005 02:03:06 -0000 1.7 *************** *** 5,13 **** ;; Tags: ;; ;; Attrs: ;; ! ;; Copyright (c) 2004 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; (require 'drkm-config) ;; FIXME,TODO: --- 5,17 ---- ;; Tags: ;; ;; Attrs: ;; ! ;; Copyright (c) 2004, 2005 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; + (setq drkm-conf:use-font-lock-p t) + + (require 'drkm-config) + (require 'config-font-lock) ;; FIXME,TODO: *************** *** 17,21 **** pouvoir utiliser Emacs normalement. TODO: Investiguer.") ! (setq default-directory "~/" drkm-conf:init-gnu-file nil drkm-conf:init-xemacs-file nil --- 21,44 ---- pouvoir utiliser Emacs normalement. TODO: Investiguer.") ! ;; FIXME: En fait, cela doit aller dans top-config-pim ... De plus, ! ;; le copy-face n'est au'un hack pour l'instant. Org Mode utilise ! ;; cette face pour les lignes de code (commençant par ':'), ce qui est ! ;; un détournement de la face. ! ;; ! ;; De plus, le copy-face directement sur drkm-fl:comment-face ne ! ;; fonctionne pas. La valeur de cette dernière change, alors que j'ai ! ;; requis config-font-lock et qu'il requière top-config-display. ! ;; C'est pour moi un mystère qui demande plus d'investigation. ! ;; J'utilise pour l'instant drkm-fl:nil-face et hérite ensuite de ! ;; drkm-fl:comment-face. ! ;; ! (copy-face 'drkm-fl:nil-face 'org-table-face) ! (set-face-attribute 'org-table-face nil :inherit 'drkm-fl:comment-face) ! (eval-after-load 'org ! '(set-face-attribute 'org-link-face nil :underline t)) ! ! (setq drkm-conf:init-gnu-file nil ! drkm-conf:init-xemacs-file nil ! default-directory "~/" drkm-conf:init-gnu-file nil drkm-conf:init-xemacs-file nil |
From: drkm <flo...@us...> - 2005-05-27 02:03:16
|
Update of /cvsroot/drkm-lib/home/drkm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21353/drkm Modified Files: .emacs Log Message: Changes from lxplus.cern.ch. Index: .emacs =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** .emacs 26 May 2005 22:52:20 -0000 1.4 --- .emacs 27 May 2005 02:03:06 -0000 1.5 *************** *** 69,72 **** --- 69,73 ---- (require 'config-TMP) + (require 'top-config-display) (require 'top-config-misc) (require 'top-config-various-dev) |
From: drkm <flo...@us...> - 2005-05-27 02:01:11
|
Update of /cvsroot/drkm-lib/home/drkm/.emacs.d/fstyles In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21099/fstyles Log Message: Directory /cvsroot/drkm-lib/home/drkm/.emacs.d/fstyles added to the repository |
From: drkm <flo...@us...> - 2005-05-27 00:18:48
|
Update of /cvsroot/drkm-lib/drkm-lib/drkm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3444/drkm Modified Files: drkm-face.el drkm-font-lock.el Log Message: Some changes. Index: drkm-font-lock.el =================================================================== RCS file: /cvsroot/drkm-lib/drkm-lib/drkm/drkm-font-lock.el,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** drkm-font-lock.el 28 Dec 2004 17:37:40 -0000 1.3 --- drkm-font-lock.el 27 May 2005 00:18:38 -0000 1.4 *************** *** 33,36 **** --- 33,38 ---- ;; peut-être refactoriser. Et peut-être coupler avec des choses comme ;; `lisp-indent-function', etc. + ;; + ;; TODO: Juste pour `emacs-lisp-mode' ? Et `lisp-interaction-mode' ? (defun drkm-fl:add-defun-like-keywords (symbols) Index: drkm-face.el =================================================================== RCS file: /cvsroot/drkm-lib/drkm-lib/drkm/drkm-face.el,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** drkm-face.el 26 May 2005 23:09:01 -0000 1.5 --- drkm-face.el 27 May 2005 00:18:37 -0000 1.6 *************** *** 25,28 **** --- 25,30 ---- ;; tels fonctions, d'aide à l'Emacs Lisp. Et une configuration ;; de cela. + ;; + ;; Penser aux autoloads. Ce qui oblige à le réquérir aussi ... (require 'drkm-font-lock) (require 'drkm-el) *************** *** 47,52 **** --- 49,61 ---- ,@args))) + ;;;###autoload (put 'drkm-face:defface 'lisp-indent-function 'defun) + ;; FIXME: Régler le problème de l'autoload. Je ne pense pas que cela + ;; fonctionne en l'état. + ;; + ;;;###autoload + (drkm-fl:add-defvar-like-keywords '(drkm-face:defface)) + ;; =========================================================================== *************** *** 61,64 **** --- 70,74 ---- (set-face-attribute to nil attr (face-attribute from attr)))) + ;;;###autoload (put 'drkm-face:copy-face-attributes 'lisp-indent-function 'defun) *************** *** 250,253 **** --- 260,264 ---- ,target-prefix ,target-suffix))) + ;;;###autoload (drkm-fl:add-defun-like-keywords '(drkm-face:config-define-copy-face)) |
From: drkm <flo...@us...> - 2005-05-26 23:10:34
|
Update of /cvsroot/drkm-lib/drkm-lib/drkm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21759/drkm Added Files: drkm-tprop.el Log Message: drkm/drkm-tprop.el added. --- NEW FILE: drkm-tprop.el --- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; File: drkm-tprop.el ;; ;; Author: F. Georges ;; ;; Date: 2005-01-07 ;; ;; Tags: ;; ;; Attrs: ;; ;; Copyright (c) 2005 Florent Georges ;; ;; ------------------------------------------------------------------------ ;; ;; Routines relatives aux text properties (tprops) et aux ;; overlays. ;; --------------------------------------------------------------------------- ;; =========================================================================== ;; Property changes: ;; ================= ;; ;; GNU Emacs fournit le moyen de trouver le prochain endroit où ;; l'un quelconque tprop change, ou où une tprop précise change. ;; Il lui manque le moyen de trouver le prochain endroit où une ;; tprop parmis une liste change. ;; --------------------------------------------------------------------------- ;; FIXME,TODO: À modifier. Ne me semble pas très propre ... ;; ;; Et surtout, je l'ai modifiée dans le but d'être efficace. Ce n'est ;; certainement pas le cas. À améliorer, donc. ;; (defun drkm-tprop::properties-change (direction with-ovl pos props &optional object limit) (flet ((next-change () (if with-ovl (let ((res (if (eq 'forward direction) (cons (point-max) (next-char-property-change pos limit)) (cons (point-min) (previous-char-property-change pos limit))))) (if (eq (car res) (cdr res)) nil (cdr res))) (if (eq 'forward direction) (next-property-change pos object limit) (previous-property-change po object limit)))) (get-values () (if with-ovl (mapcar (lambda (x) (get-char-property pos x object)) props) (mapcar (lambda (x) (get-text-property pos x object)) props))) (compare (old new) (let ((same t)) (while (and old new same) (unless (eq (car old) (car new)) (setq same nil)) (setq old (cdr old) new (cdr new))) same))) (let* ((old-values (get-values)) (len (length props)) values) (while (and (setq pos (next-change)) (compare old-values (setq values (get-values))))) (when pos (let (changes) (setq changes (cond ((null old-values) (delq nil values)) ((null values) (delq nil old-values)) (t (while (and props old-values values) (unless (eq (car old-values) (car values)) (push (car props) changes)) (setq props (cdr props) old-values (cdr old-values) values (cdr values))) changes))) (when changes (cons pos changes))))))) ;; (defun drkm-tprop::properties-change (function direction pos props ;; &optional object limit) ;; (let ((pos (delq nil (mapcar (lambda (x) ;; (let ((pos (funcall function ;; pos x object limit))) ;; (when pos ;; (cons x pos)))) ;; props)))) ;; (cond ((null pos) ;; nil) ;; ((null (cdr pos)) ;; pos) ;; ((eq 'forward direction) ;; (let ((mins (list (car pos)))) ;; (dolist (p (cdr pos) (nreverse mins)) ;; (when (< (cdr p) (cdr (car mins))) (push p mins))))) ;; ((eq 'backward direction) ;; (let ((maxs (list (car pos)))) ;; (dolist (p (cdr pos) (nreverse maxs)) ;; (when (< (cdr p) (cdr (car maxs))) (push p maxs))))) ;; (t ;; (error "DIRECTION must be 'forward or 'backward"))))) (defun drkm-tprop:next-properties-change (pos props &optional object limit) "FIXME<docstring>: ... Retourne \(POS TPROPS...\)." (drkm-tprop::properties-change 'forward nil pos props object limit)) (defun drkm-tprop:previous-properties-change (pos props &optional object limit) "FIXME<docstring>: ... Retourne \(POS TPROPS...\)." (drkm-tprop::properties-change 'backward nil pos props object limit)) (defun drkm-tprop:next-char-properties-change (pos props &optional object limit) "FIXME<docstring>: ... Retourne \(POS TPROPS)...\)." (drkm-tprop::properties-change 'forward t pos props object limit)) (defun drkm-tprop:previous-char-properties-change (pos props &optional object limit) "FIXME<docstring>: ... Retourne \(POS TPROPS...\)." (drkm-tprop::properties-change 'backward t pos props object limit)) ;; --------------------------------------------------------------------------- ;; $Id: drkm-tprop.el,v 1.1 2005/05/26 23:10:24 florentgeorges Exp $ ;; --------------------------------------------------------------------------- ;; Local Variables: ;; mode: emacs-lisp ;; indent-tabs-mode: nil ;; drkm-style: drkm ;; End: ;; --------------------------------------------------------------------------- |
From: drkm <flo...@us...> - 2005-05-26 23:09:14
|
Update of /cvsroot/drkm-lib/drkm-lib/drkm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21518/drkm Modified Files: drkm-config.el drkm-face.el drkm.el Log Message: Some changes. Index: drkm-config.el =================================================================== RCS file: /cvsroot/drkm-lib/drkm-lib/drkm/drkm-config.el,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** drkm-config.el 4 Jan 2005 23:45:08 -0000 1.7 --- drkm-config.el 26 May 2005 23:09:00 -0000 1.8 *************** *** 245,249 **** (defcustom drkm-conf:site-lisp-dir (drkm-file:file-in-dir "site-lisp" drkm-conf:share-directory) ! "*Répertoire standard Emacs Lisp du site (\"site-lisp/\")." :tag "Répertoire Emacs Lisp du site" :group 'drkm-conf --- 245,251 ---- (defcustom drkm-conf:site-lisp-dir (drkm-file:file-in-dir "site-lisp" drkm-conf:share-directory) ! "*Répertoire standard Emacs Lisp du site (\"site-lisp/\"). ! FIXME: J'obtiens le site-lisp « versionné ». Il me faudrait ! l'autre, ou plutôt les deux." :tag "Répertoire Emacs Lisp du site" :group 'drkm-conf *************** *** 483,508 **** ;; --------------------------------------------------------------------------- ! (defun* drkm-conf:add-info-path (info-dir &optional default-directory ! &key if-dir) ! "Adds directories in `Info-directory-list'. ! `ÌNFO-DIRS' is a list of directory names. Each of these is added ! to the Info Mode directory list, `Info-directory-list'. ! `DEFAULT-DIR' is the current directory, for those in `INFO-DIRS' ! which are relative. If `:IF-DIR' is non-nil, only directories containing a file named ! \"dir\" will be added." ! (unless (listp info-dir) ! (setq info-dir (list info-dir))) (eval-after-load 'info `(progn (info-initialize) ! ,@(mapcar (lambda (d) ! (when (or (not if-dir) ! (file-exists-p (drkm-file:file-in-dir "dir" d))) ! `(push d Info-directory-list))) ! (mapcar 'expand-file-name info-dir))))) ;; TODO<EMERG>: Le fait de ne permettre qu'un symbole de fonction --- 485,525 ---- ;; --------------------------------------------------------------------------- ! ;; TODO: Pour le moment, si `:IF-DIR' est une chaîne, on regarde s'il ! ;; existe un fichier dont le nom est égal à cette chaîne. Implémenter ! ;; le support d'une regexp pour cet argument. ! ;; ! ;; En fait, peut-être serait-il plus simple, et tout aussi intuitif ! ;; pour être utilisé dans les Subdirs Files, de lui donner une ! ;; sémantique, non pas de regexp, mais de wildcards. ! ;; Cfr. `file-expand-wildcards()', et éventuellement ! ;; <FILE:configs/config-ediff.el>. ! (defun* drkm-conf:add-info-path (info-dirs &key if-dir) ! "Adds directories the Info search path. ! `INFO-DIRS' is a list of directory names. Each of these is added ! to the Info Mode directory list, `Info-directory-list'. If ! `INFO-DIRS' is a string, its semantic is the same that if it were ! a list with this string as unique member. If `:IF-DIR' is non-nil, only directories containing a file named ! \"dir\" will be added. If it is a string, it must be a valid ! regexp. In that case, look for a file whose the name matches ! that regexp. ! ! This function is sensible to `DEFAULT-DIRECTORY'." ! (unless (listp info-dirs) ! (setq info-dirs (list info-dirs))) ! (when (and if-dir (not (stringp if-dir))) ! (setq if-dir "dir")) (eval-after-load 'info `(progn (info-initialize) ! ,@(delq nil (mapcar (lambda (d) ! (when (or (not if-dir) ! (file-exists-p ! (drkm-file:file-in-dir if-dir d))) ! `(push ,d Info-directory-list))) ! (mapcar 'expand-file-name info-dirs)))))) ;; TODO<EMERG>: Le fait de ne permettre qu'un symbole de fonction *************** *** 584,587 **** --- 601,611 ---- ;; dissocier l'utile du superflux ... Et identifier les ;; opportunités d'amélioration. + ;; + ;; TODO: Pour ce qui est d'accepter des noms de module ou des + ;; features en tant qu'entités à configurer, il faudrait + ;; maintenir un mécanisme comme pour `eval-after-load()'. On + ;; maintient une alist, et on surcharge `load()' et `require()'. + ;; On y teste s'il faut configurer. Si oui, on charge la config, + ;; sinon, on charge le module (ou la feature). ;; --------------------------------------------------------------------------- (defmacro* drkm-conf:configure (mode &key config auto-mode interpreters Index: drkm-face.el =================================================================== RCS file: /cvsroot/drkm-lib/drkm-lib/drkm/drkm-face.el,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** drkm-face.el 31 Dec 2004 07:37:16 -0000 1.4 --- drkm-face.el 26 May 2005 23:09:01 -0000 1.5 *************** *** 10,13 **** --- 10,14 ---- ;; ==== ;; + ;; · Face definition ;; · Miscellaneous Routines ;; · User-Level Commands *************** *** 16,34 **** ;; ;; Outils relatifs aux faces. - ;; - ;; TODO: Reprendre mon idée de wrapper de `defface()'. Le but - ;; principal est de générer automatiquement un `defcustom()' de - ;; même nom. J'ai quelques notes là-dessus, je pense (sur ce que - ;; pourrait faire un tel wrapper). Cfr. un article que j'ai - ;; posté sur f.c.a.emacs : <USENET:wkh...@fg...>. - ;; - ;; TODO: Adviser `describe-face()' pour qu'elle fournisse un - ;; « defined in file ... ». C'est un point où le wrapper décrit - ;; ci-dessus pourrait être utile. En fait, pour ce point, on - ;; pourrait même adviser `defface()', voire `make-face()' (pour - ;; enregistrer en plus le fichier de définition). ;; --------------------------------------------------------------------------- ;; Pour `drkm-fl:add-defun-like-keywords()'. Mais c'est ridicule ;; de requérir cela ici. Il faudrait faire un fichier avec de --- 17,24 ---- ;; ;; Outils relatifs aux faces. ;; --------------------------------------------------------------------------- + (require 'drkm) ;; Pour `drkm-fl:add-defun-like-keywords()'. Mais c'est ridicule ;; de requérir cela ici. Il faudrait faire un fichier avec de *************** *** 36,43 **** --- 26,54 ---- ;; de cela. (require 'drkm-font-lock) + (require 'drkm-el) (require 'cl) ;; =========================================================================== + ;; Face definition: + ;; ================ + ;; + ;; --------------------------------------------------------------------------- + + (defmacro drkm-face:defface (face spec doc &rest args) + "A `defface()' automatically defining a custom named FACE with value 'FACE." + `(progn + (defface ,face + ,spec + ,doc + ,@args) + (defcustom ,face ',face + ,doc + ,@args))) + + (put 'drkm-face:defface 'lisp-indent-function 'defun) + + + ;; =========================================================================== ;; Miscellaneous Routines: ;; ======================= *************** *** 46,50 **** (defun drkm-face:copy-face-attributes (to from &rest attributes) ! "FIXME<docstring>: ..." (dolist (attr attributes) (set-face-attribute to nil attr (face-attribute from attr)))) --- 57,61 ---- (defun drkm-face:copy-face-attributes (to from &rest attributes) ! "Copy each ATTRIBUTES from face FROM to face TO." (dolist (attr attributes) (set-face-attribute to nil attr (face-attribute from attr)))) *************** *** 52,69 **** (put 'drkm-face:copy-face-attributes 'lisp-indent-function 'defun) ! (defun* drkm-face:get-faces (&optional (point (point))) ! "Retourne la liste des faces employées pour le caractère sous le `POINT'. ! Appelée non-interactivement, utilise le caractère sous le `POINT'." ! (let ((faces (plist-get (text-properties-at point) 'face)) ! (fl-f (plist-get (text-properties-at point) 'font-lock-face))) ! (append (if (listp faces) faces (list faces)) ! (if (listp fl-f) fl-f (list fl-f))))) (defun drkm-face:make-faced-string-name (face) "Retourne le nom de la face, une chaîne à laquelle a été appliquée la face." (let ((name (copy-sequence (symbol-name face)))) (put-text-property 0 (length name) 'face face name) name)) ;; =========================================================================== --- 63,110 ---- (put 'drkm-face:copy-face-attributes 'lisp-indent-function 'defun) ! (defun* drkm-face:get-face (&optional (point (point))) ! "Retourne la liste des faces employées pour le caractère sous le `POINT'." ! (let ((faces (get-char-property point 'face)) ! (fl-f (get-char-property point 'font-lock-face))) ! (cond ((null faces) fl-f) ! ((null fl-f) faces) ! (t (append (if (listp faces) faces (list faces)) ! (if (listp fl-f) fl-f (list fl-f))))))) (defun drkm-face:make-faced-string-name (face) "Retourne le nom de la face, une chaîne à laquelle a été appliquée la face." + (if (consp face) + (drkm-el:mapconcat 'drkm-face:make-faced-string-name-1 face " " "(" ")") + (drkm-face:make-faced-string-name-1 face))) + + (defun drkm-face:make-faced-string-name-1 (face) (let ((name (copy-sequence (symbol-name face)))) (put-text-property 0 (length name) 'face face name) name)) + (defun drkm-face:get-all-faces (&optional start end object) + "Value is all faces used in the OBJECT between START and END. + If nil, OBJECT defaults to the current buffer. + For default value of START and END, see `drkm:default-min-pos()' + and `drkm:default-max-pos()'." + (unless start + (setq start (drkm:default-min-pos object))) + (unless end + (setq end (drkm:default-max-pos object))) + (let ((props '(face font-lock-face)) + (faces '()) + res f) + (dolist (p props) + (when (setq f (get-char-property start p object)) + (add-to-list 'faces f))) + (while (and (< start end) + (setq res (drkm-tprop:next-char-properties-change + start '(face font-lock-face) object end))) + (setq start (car res)) + (dolist (r (cdr res)) + (when (setq f (get-char-property start r object)) + (add-to-list 'faces f)))) + faces)) + ;; =========================================================================== *************** *** 74,96 **** ;;;###autoload - (defun drkm-face:display-all-defined-faces () - "Affiche la liste des noms de face connus d'Emacs à ce moment. - Se sert du buffer *the faces*." - (interactive) - (switch-to-buffer "*the faces*") - (erase-buffer) - (mapc (lambda (face) - (insert (drkm-face:make-faced-string-name face) "\n")) - (sort (face-list) 'string<)) - (goto-char (point-min))) - - ;;;###autoload (defun* drkm-face:display-face (&optional (point (point))) "Affiche les faces employées pour le caractère sous le point. Appelée non-interactivement, utilise le caractère sous le `POINT'." (interactive "d") ! (message "Face: %s" (mapconcat 'drkm-face:make-faced-string-name ! (drkm-face:get-faces point) ! " "))) --- 115,191 ---- ;;;###autoload (defun* drkm-face:display-face (&optional (point (point))) "Affiche les faces employées pour le caractère sous le point. Appelée non-interactivement, utilise le caractère sous le `POINT'." (interactive "d") ! (message "Face: %s" ! (drkm-face:make-faced-string-name (drkm-face:get-face point)))) ! ! (defcustom drkm-face:display-composite-string "Composite" ! "*String to display when face composed. Displayed in composed face. ! nil say dont display such a string." ! :type '(choice string nil) ;; FIXME: Or just string? ! :group 'drkm-face) ! ! ;; TODO: Ajouter la possibilité de tapper <RET> pour appeler ! ;; `describe-face()' avec la face sur laquelle le point se trouve. ! ;; Par exemple en créant un bouton ... D'ailleurs, ce serait ! ;; peut-être plus simple de créer un nouveau widget (ou button-type) ! ;; qui affiche une face dans sa couleur et est cliquable ... ! ;; ! ;; En partie double emploit avec `list-faces-display()' ... ! ;; Cfr. faces.el. ! ;; ! ;;;###autoload ! (defun drkm-face:display-all-faces (&optional object) ! "Display all faces used in OBJECT (or defined in Emacs if nil). ! Interactivelly, OBJECT is current buffer if no prefix arg, nil if ! one universal arg \(C-u\), or current window if two universal arg ! \(C-u C-u\)." ! (interactive `(,(cond ((null current-prefix-arg) ! (current-buffer)) ! ((and (consp current-prefix-arg) ! (eq 4 (car current-prefix-arg))) ! nil) ! ((and (consp current-prefix-arg) ! (eq 16 (car current-prefix-arg))) ! (selected-window)) ! (t ! (error "Prefix arg must be none, C-u or C-u C-u"))))) ! (let ((comp-len (and drkm-face:display-composite-string ! (length drkm-face:display-composite-string))) ! ;; Must be before `set-buffer'! ! (face-list (sort (if (null object) ! (face-list) ! (drkm-face:get-all-faces nil nil object)) ! (lambda (a b) ! (while (and (consp a) (consp b)) ! (setq a (car a) b (car b))) ! (cond ((consp a) nil) ! ((consp b) t) ! (t (string< a b))))))) ! (with-output-to-temp-buffer "*Faces*" ! (set-buffer standard-output) ! (dolist (face face-list) ! (if (facep face) ! (let ((beg (point))) ! (insert (drkm-face:make-faced-string-name face)) ! (make-text-button beg (point) 'type 'help-face ! 'help-args (list face))) ! (when drkm-face:display-composite-string ! (insert drkm-face:display-composite-string ": ") ! (put-text-property (- (point) comp-len 2) (- (point) 2) ! 'face face)) ! (insert "(") ! (let ((beg (point))) ! (while face ! (setq beg (point)) ! (insert (drkm-face:make-faced-string-name (car face))) ! (make-text-button beg (point) 'type 'help-face ! 'help-args (list (car face))) ! (when (setq face (cdr face)) ! (insert " ")))) ! (insert ")")) ! (terpri))))) *************** *** 127,130 **** --- 222,242 ---- ;; ;; Pour un exemple d'utilisation : <FILE:config-nxml.el>. + ;; + ;; TODO: Deux points importants : la compilation et la localité + ;; de la définition du copieur : + ;; + ;; - pour le premier point, il faut que les actions dans le + ;; copieur soient déroulées à la compilation (mais exécutées + ;; au chargement). Dans le cas ci-dessous, il ne faudrait + ;; pas générer une fonction, mais une macro, et à la + ;; compilation. Et config-copy-face serait elle-même une + ;; macro ; + ;; + ;; - il ne faudrait pas définir une fonction (ou macro) + ;; copieur, mais plutôt utiliser un « environnement » : + ;; + ;; (drkm-face:with-config-face-copier "nxml-" "-face" + ;; "drkm-nxml:" "-face" + ;; (drkm-face:config-copy ...)) ;; --------------------------------------------------------------------------- *************** *** 155,194 **** - ;; =========================================================================== - ;; Temporaire: - ;; =========== - ;; - ;; Copié depuis <FILE:config-ps-print.el>. TODO: ... - ;; --------------------------------------------------------------------------- - - (defun drkm-face:go-to-next-constant-face () - "FIXME<docstring>: ... À supprimer (ne sert pas à grand-chose)." - (interactive) - (let ((pos (next-single-property-change (point) 'face))) - (while pos - (let ((face (get-text-property pos 'face))) - (if (memq 'font-lock-constant-face - (if (listp face) face (list face))) - (progn (goto-char pos) - (message "%S" face) - (setq pos nil)) - (setq pos (next-single-property-change pos 'face))))))) - - (defun drkm-face:list-all-faces () - "FIXME<docstring>: ..." - (interactive) - (let* ((pos (point-min)) - (face (format "%S" (get-text-property pos 'face))) - (faces (if face (list face) '()))) - (while (and pos (< pos (point-max))) - (and (setq pos (next-single-property-change pos 'face)) - (setq face (get-text-property pos 'face)) - (add-to-list 'faces (format "%S" face)))) - (message "\nText properties:\n----------------") - (dolist (f (sort faces 'string<)) - (message "%s" f)) - (message "\n"))) - - (provide 'drkm-face) --- 267,270 ---- Index: drkm.el =================================================================== RCS file: /cvsroot/drkm-lib/drkm-lib/drkm/drkm.el,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** drkm.el 31 Dec 2004 07:37:16 -0000 1.4 --- drkm.el 26 May 2005 23:09:01 -0000 1.5 *************** *** 240,243 **** --- 240,275 ---- + (defun drkm:default-min-pos (&optional object) + "Value is the default minimum position in OBJECT. + If OBJECT is a buffer or a window, it is the \(point-min\) in + this buffer \(or this window's buffer\). Else, it is 0." + (cond ((null object) + (point-min)) + ((bufferp object) + (with-current-buffer object + (point-min))) + ((windowp object) + (with-current-buffer (window-buffer object) + (point-min))) + (t + 0))) + + (defun drkm:default-max-pos (&optional object) + "Value is the default maximum position in OBJECT. + If OBJECT is a buffer or a window, it is the \(point-max\) in + this buffer \(or this window's buffer\). Else, it is \(length + OBJECT\)." + (cond ((null object) + (point-max)) + ((bufferp object) + (with-current-buffer object + (point-max))) + ((windowp object) + (with-current-buffer (window-buffer object) + (point-max))) + (t + (length object)))) + + ;; =========================================================================== ;; `drkm-with-buffer-unmodified()': *************** *** 262,265 **** --- 294,300 ---- ;; ;; Cfr. également `inhibit-read-only'. + ;; + ;; Cfr. la macro `blank-save-buffer-state()' de Blank Mode + ;; <URL:http://www.cpqd.com.br/~vinicius/emacs/blank-mode.el.gz>. ;; --------------------------------------------------------------------------- |
From: drkm <flo...@us...> - 2005-05-26 22:53:02
|
Update of /cvsroot/drkm-lib/home/drkm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17929/drkm Modified Files: .emacs Log Message: Some modifs. Index: .emacs =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** .emacs 27 Dec 2004 05:49:56 -0000 1.3 --- .emacs 26 May 2005 22:52:20 -0000 1.4 *************** *** 60,64 **** ! (let ((drkm-lib-dir "~/.elisp/drkm-lib")) (push (expand-file-name "drkm" drkm-lib-dir) load-path) (setq drkm-conf:use-custom-flag nil) --- 60,64 ---- ! (let ((drkm-lib-dir "~/.emacs.d/home-lisp/drkm-lib")) (push (expand-file-name "drkm" drkm-lib-dir) load-path) (setq drkm-conf:use-custom-flag nil) |
From: drkm <flo...@us...> - 2005-05-26 22:52:29
|
Update of /cvsroot/drkm-lib/home/drkm/.emacs.d In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17929/drkm/.emacs.d Modified Files: init.local.el Log Message: Some modifs. Index: init.local.el =================================================================== RCS file: /cvsroot/drkm-lib/home/drkm/.emacs.d/init.local.el,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** init.local.el 31 Dec 2004 07:41:25 -0000 1.5 --- init.local.el 26 May 2005 22:52:20 -0000 1.6 *************** *** 29,42 **** w3m-command "c:/cygwin/usr/local/bin/w3m.exe") ! (let ((path (getenv "PATH"))) (unless (and path (let ((case-fold-search t)) (string-match "cygwin" path))) (setenv "PATH" (concat path (if (or (null path) (equal "" path)) "" ";") ! (mapconcat 'identity ! '("c:/cygwin/usr/local/bin" ! "c:/cygwin/usr/bin" ! "c:/cygwin/bin") ! ";"))))) (unless (getenv "CVS_RSH") (setenv "CVS_RSH" "c:/cygwin/bin/ssh.exe")) --- 29,41 ---- w3m-command "c:/cygwin/usr/local/bin/w3m.exe") ! (let ((path (getenv "PATH")) ! (to-add '("c:/cygwin/usr/local/bin" ! "c:/cygwin/usr/bin" ! "c:/cygwin/bin"))) (unless (and path (let ((case-fold-search t)) (string-match "cygwin" path))) (setenv "PATH" (concat path (if (or (null path) (equal "" path)) "" ";") ! (mapconcat 'identity to-add ";"))))) (unless (getenv "CVS_RSH") (setenv "CVS_RSH" "c:/cygwin/bin/ssh.exe")) |