;ELC ;;; compiled by cthomp@willow on Thu Aug 12 00:36:41 1993 ;;; from file /era/era-0.80/editor/lisp/modes/c-comment.el ;;; emacs version 19.8 (beta8) Lucid. ;;; bytecomp version 2.15; 14-jul-93. ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19"))) (error "This file was compiled for Emacs 19.")) (provide 'c-comment-edit) (defvar c-comment-leader " *" "\ *Leader used when rebuilding edited C comments. The value of this variable should be a two-character string. Values of " ", " * " and " ** " produce the\ncomment styles:\n /* /* /*\n ... * ... ** ...\n ... * ... ** ...\n */ */ */\nrespectively.") (defconst c-comment-leader-regexp "^[ ]*\\(\\*\\*\\|\\*\\)?[ ]?" "\ Regexp used to match C comment leaders.") (defvar c-comment-edit-mode 'text-mode "\ *Major mode used by `c-comment-edit' when editing C comments.") (defvar c-comment-edit-hook nil "\ *Function to call whenever `c-comment-edit' is used. The function is called just before the `c-comment-edit' function allows you to begin editing the comment.") (defvar c-comment-edit-buffer-alist nil "\ Assoc list of C buffers and their associated comment buffers. Elements are of the form (C-BUFFER COMMENT-BUFFER COMMENT-START COMMENT-END) COMMENT-START and COMMENT-END are markers in the C-BUFFER.") (fset 'save-point '(macro . #[(&rest body) " BEE" [let ((save-point (point))) unwind-protect progn body (goto-char (min (point-max) save-point))] 5 "\ Save value of point, evalutes FORMS and restore value of point. If the saved value of point is no longer valid go to (point-max). The variable `save-point' is lambda-bound to the value of point for the duration of this call."])) (fset 'marker '(macro . #[(pos &optional buffer) "\n F" [set-marker (make-marker) pos buffer] 4])) (fset 'c-comment-edit #[(search-prefix) "p \n˚ \n͚ \nК \nҚeb\n  @ Aُ  * bi)Z P!p FB \\ Z#\n` W ` ZZ\\  !ebm$##yj' eb!!eb!.-- !!" [nil t inhibit-quit c-comment-end c-comment-start c-comment-buffer c-comment-fill-column tem marker c-buffer search-prefix (4) backward-paragraph (16) end-of-defun beginning-of-defun (64) backward-page (256) within-c-comment-p make-marker end start error-data (byte-code "`!`Z!`*‡" [save-point ((byte-code "d^b" [save-point] 2)) search-forward "/*" 2 start "*/" end] 2) ((search-failed (error "No C comment found."))) fill-column generate-new-buffer buffer-name " *C Comment Edit*" c-comment-edit-buffer-alist copy-to-buffer 2 1 switch-to-buffer re-search-forward c-comment-leader-regexp replace-match "" c-comment-edit-mode fundamental-mode looking-at "[ \n ]" delete-char set-buffer-modified-p c-comment-edit-hook message substitute-command-keys "Type \\[c-comment-edit-end] to end edit, \\[c-comment-edit-abort] to abort with no change."] 8 "\ Edit multi-line C comments. This command allows the easy editing of a multi-line C comment like this: /* * ... * ... */ The comment may be indented or flush with the left margin. If point is within a comment, that comment is used. Otherwise the comment to be edited is found by searching forward from point. With one \\[universal-argument] searching starts after moving back one paragraph. With two \\[universal-argument]'s searching starts at the beginning of the current or proceeding C function. With three \\[universal-argument]'s searching starts at the beginning of the current page. With four \\[universal-argument]'s searching starts at the beginning of the current buffer (clipping restrictions apply). Once located, the comment is copied into a temporary buffer, the comment leaders and delimiters are stripped away and the resulting buffer is selected for editing. The major mode of this buffer is controlled by the variable `c-comment-edit-mode'. Use \\[c-comment-edit-end] when you have finished editing the comment. The comment will be inserted into the original buffer with the appropriate delimiters and indention, replacing the old version of the comment. If you don't want your edited version of the comment to replace the original, use \\[c-comment-edit-abort]." "*P"]) (fset 'c-comment-edit-end #[nil " ! @ A@ 8 8 \n ebcϘmlбyomlҪбylh\"c֘תc\nqbi)ebUymjyt)\nq`܎|b q\ned#,!\n!\n!!\n! ! !! %\"% q! !)щщ." [find-c-comment-buffer tuple error "Not a c-comment-edit buffer." t 2 3 c-comment-end c-comment-start c-comment-buffer c-comment-c-buffer inhibit-quit buffer-modified-p "/*\n" c-comment-leader " " " " nil "" char-equal 10 "\n" " *" " */" "*/" indention 0 save-point ((byte-code "d^b" [save-point] 2)) append-to-buffer message "No change." get-buffer-window select-window switch-to-buffer delete-window delq c-comment-edit-buffer-alist set-buffer-modified-p kill-buffer] 7 "\ End c-comment-edit. C comment is replaced by its edited counterpart in the appropriate C buffer. Indentation will be the same as the original." nil]) (fset 'c-comment-edit-abort #[nil " @ A@ 8 8 !\n!\n!!\n! q! !) \" ЉЉ!." [find-c-comment-buffer tuple c-comment-c-buffer c-comment-buffer 2 c-comment-start 3 c-comment-end error "Not a c-comment-edit buffer." get-buffer-window select-window switch-to-buffer t inhibit-quit set-buffer-modified-p nil kill-buffer delq c-comment-edit-buffer-alist message "Aborted with no change."] 4 "\ Abort a c-comment-edit with no change." nil]) (byte-code "MMM##" [within-c-comment-p #[nil "" [error-data (byte-code "`Ď!`!`*` W\n B*" [nil end start save-point ((byte-code "d^b" [save-point] 2)) search-backward "/*" search-forward "*/"] 2) ((search-failed))] 3] find-c-comment-buffer #[(&optional buffer) "p č)" [buffer c-comment-edit-buffer-alist list return-value (byte-code "@A@ =@\"mAjć" [list buffer throw return-value nil] 4)] 2] find-c-comment-c-buffer #[(&optional buffer) "p č)" [buffer c-comment-edit-buffer-alist list return-value (byte-code "@@ =@\"nAkć" [list buffer throw return-value nil] 4)] 2] define-key mode-specific-map "" c-comment-edit-end "" c-comment-edit-abort] 4)