diff options
author | Juanma Barranquero <lekktu@gmail.com> | 2003-02-04 13:24:35 +0000 |
---|---|---|
committer | Juanma Barranquero <lekktu@gmail.com> | 2003-02-04 13:24:35 +0000 |
commit | a1506d2977a8c2eb982ad0b59416009cdfaa6f51 (patch) | |
tree | 3cbb868ad6eb3b188d5064389538c490c124d8be /lisp/progmodes | |
parent | f1180544bb5ff44cdb45b8734734294b0a2fa7a4 (diff) | |
download | emacs-a1506d2977a8c2eb982ad0b59416009cdfaa6f51.tar.gz |
Trailing whitepace deleted.
Diffstat (limited to 'lisp/progmodes')
30 files changed, 589 insertions, 589 deletions
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el index 3e4d5baa9ba..d5bd539b421 100644 --- a/lisp/progmodes/ada-mode.el +++ b/lisp/progmodes/ada-mode.el @@ -303,7 +303,7 @@ type A is Value_1, Value_2);" :type 'boolean :group 'ada) - + (defcustom ada-indent-is-separate t "*Non-nil means indent 'is separate' or 'is abstract' if on a single line." :type 'boolean :group 'ada) @@ -1322,7 +1322,7 @@ If you use ada-xref.el: (modes . '(ada-mode)))) (setq ada-align-modes nil) - + (add-to-list 'ada-align-modes '(ada-declaration-assign (regexp . "[^:]\\(\\s-*\\):[^:]") @@ -1348,10 +1348,10 @@ If you use ada-xref.el: (regexp . "\\(\\s-+\\)at\\>") (modes . '(ada-mode)))) - + (setq align-mode-rules-list ada-align-modes) )) - + ;; Set up the contextual menu (if ada-popup-key (define-key ada-mode-map ada-popup-key 'ada-popup-menu)) @@ -1366,11 +1366,11 @@ If you use ada-xref.el: ;; beginning of subprograms, not the end. ;; Fix is: redefine a new function ada-which-function, and call it when the ;; major-mode is ada-mode. - + (unless ada-xemacs ;; This function do not require that we load which-func now. ;; This can be done by the user if he decides to use which-func-mode - + (defadvice which-function (around ada-which-function activate) "In Ada buffers, should work with overloaded subprograms, and does not use imenu." @@ -1412,7 +1412,7 @@ use imenu." (if ada-fill-comment-prefix (set 'comment-start ada-fill-comment-prefix) (set 'comment-start "-- ")) - + ;; Run this after the hook to give the users a chance to activate ;; font-lock-mode @@ -1461,7 +1461,7 @@ use imenu." (defun ada-save-exceptions-to-file (file-name) "Save the exception lists `ada-case-exception' and `ada-case-exception-substring' to the file FILE-NAME." - + ;; Save the list in the file (find-file (expand-file-name file-name)) (erase-buffer) @@ -1474,7 +1474,7 @@ use imenu." (save-buffer) (kill-buffer nil) ) - + (defun ada-create-case-exception (&optional word) "Defines WORD as an exception for the casing system. If WORD is not given, then the current word in the buffer is used instead. @@ -1625,14 +1625,14 @@ word itself has a special casing." (save-excursion (forward-word -1) - + (unwind-protect (progn (modify-syntax-entry ?_ "." (syntax-table)) - + (while substrings (setq re (concat "\\b" (regexp-quote (caar substrings)) "\\b")) - + (save-excursion (while (re-search-forward re max t) (replace-match (caar substrings)))) @@ -2359,7 +2359,7 @@ offset." (goto-char column) (skip-chars-backward " \t") (list (1- (point)) 0)) - + (if (and (skip-chars-backward " \t") (= (char-before) ?\n) (not (forward-comment -10000)) @@ -2378,10 +2378,10 @@ offset." ;; or else D) -- indenting this line. ;; ??? This is really a hack, we should have a proper way to go to ;; ??? the beginning of the statement - + (if (= (char-before) ?\)) (backward-sexp)) - + (if (memq (char-before) '(?, ?\; ?\( ?\))) (list column 0) (list column 'ada-continuation-indent) @@ -2431,7 +2431,7 @@ offset." (beginning-of-line) (if (looking-at ada-named-block-re) (setq label (- ada-label-indent)))))))) - + ;; found 'record' => ;; if the keyword is found at the beginning of a line (or just ;; after limited, we indent on it, otherwise we indent on the @@ -2469,7 +2469,7 @@ offset." (list (progn (back-to-indentation) (point)) 0)))) ;; elsif - + ((looking-at "elsif\\>") (save-excursion (ada-goto-matching-start 1 nil t) @@ -2480,7 +2480,7 @@ offset." ;;--------------------------- ;; starting with w (when) ;;--------------------------- - + ((and (= (downcase (char-after)) ?w) (looking-at "when\\>")) (save-excursion @@ -2507,7 +2507,7 @@ offset." ;;--------------------------- ;; starting with l (loop) ;;--------------------------- - + ((and (= (downcase (char-after)) ?l) (looking-at "loop\\>")) (setq pos (point)) @@ -2526,7 +2526,7 @@ offset." ;;---------------------------- ;; starting with l (limited) or r (record) ;;---------------------------- - + ((or (and (= (downcase (char-after)) ?l) (looking-at "limited\\>")) (and (= (downcase (char-after)) ?r) @@ -2580,7 +2580,7 @@ offset." ((and (= (downcase (char-after)) ?r) (looking-at "re\\(turn\\|names\\)\\>")) - + (save-excursion (let ((var 'ada-indent-return)) ;; If looking at a renames, skip the 'return' statement too @@ -2592,12 +2592,12 @@ offset." (= (downcase (char-after (car pos))) ?r)) (goto-char (car pos))) (set 'var 'ada-indent-renames))) - + (forward-comment -1000) (if (= (char-before) ?\)) (forward-sexp -1) (forward-word -1)) - + ;; If there is a parameter list, and we have a function declaration ;; or a access to subprogram declaration (let ((num-back 1)) @@ -2610,13 +2610,13 @@ offset." (backward-word 1) (set 'num-back 2) (looking-at "\\(function\\|procedure\\)\\>"))))) - + ;; The indentation depends of the value of ada-indent-return (if (<= (eval var) 0) (list (point) (list '- var)) (list (progn (backward-word num-back) (point)) var)) - + ;; Else there is no parameter list, but we have a function ;; Only do something special if the user want to indent ;; relative to the "function" keyword @@ -2624,10 +2624,10 @@ offset." (save-excursion (forward-word -1) (looking-at "function\\>"))) (list (progn (forward-word -1) (point)) var) - + ;; Else... (ada-indent-on-previous-lines nil orgpoint orgpoint))))))) - + ;;-------------------------------- ;; starting with 'o' or 'p' ;; 'or' as statement-start @@ -2817,7 +2817,7 @@ if INITIAL-POS is non-nil, moves point to INITIAL-POS before calculation." ((looking-at "<<") (list (+ (save-excursion (back-to-indentation) (point)) (- ada-label-indent)))) - + ;; ((looking-at "with\\>\\|use\\>") ;; Are we still in that statement, or are we in fact looking at @@ -3432,7 +3432,7 @@ match." (goto-char (car match-dat)) (unless (ada-in-open-paren-p) (cond - + ((and (looking-at "\\<\\(record\\|loop\\|select\\|else\\|then\\)\\>") (save-excursion @@ -3445,7 +3445,7 @@ match." (and (save-excursion (ada-goto-previous-word) (ada-goto-previous-word) (not (looking-at "subtype"))) - + (save-excursion (goto-char (cdr match-dat)) (ada-goto-next-non-ws) ;; words that can go after an 'is' @@ -3456,7 +3456,7 @@ match." '("separate" "access" "array" "abstract" "new") t) "\\>\\|(")))))))) - + (t (setq found t)) ))) @@ -3779,7 +3779,7 @@ If GOTOTHEN is non-nil, point moves to the 'then' following 'if'." ;; it ends a block => increase nest depth (setq nest-count (1+ nest-count) pos (point)) - + ;; it starts a block => decrease nest depth (setq nest-count (1- nest-count)))) (goto-char pos)) @@ -3869,7 +3869,7 @@ If GOTOTHEN is non-nil, point moves to the 'then' following 'if'." (back-to-indentation) (looking-at "\\<then\\>"))) (goto-char (match-beginning 0))) - + ;; ;; found 'do' => skip back to 'accept' ;; @@ -3879,7 +3879,7 @@ If GOTOTHEN is non-nil, point moves to the 'then' following 'if'." 'word-search-backward) (error "missing 'accept' in front of 'do'")))) (point)) - + (if noerror nil (error "no matching start")))))) @@ -3936,7 +3936,7 @@ If NOERROR is non-nil, it only returns nil if found no matching start." ;; handling. ;; Nothing should be done if we have only the specs or a ;; generic instantion. - + ((and (looking-at "\\<procedure\\|function\\>")) (if first (forward-word 1) @@ -3944,7 +3944,7 @@ If NOERROR is non-nil, it only returns nil if found no matching start." (ada-goto-next-non-ws) (unless (looking-at "\\<new\\>") (ada-goto-matching-end 0 t)))) - + ;; found block end => decrease nest depth ((looking-at "\\<end\\>") (setq nest-count (1- nest-count) @@ -3955,7 +3955,7 @@ If NOERROR is non-nil, it only returns nil if found no matching start." (ada-goto-next-non-ws) (looking-at "\\<\\(loop\\|select\\|record\\|case\\|if\\)\\>")) (forward-word 1))) - + ;; found package start => check if it really starts a block, and is not ;; in fact a generic instantiation for instance ((looking-at "\\<package\\>") @@ -3967,7 +3967,7 @@ If NOERROR is non-nil, it only returns nil if found no matching start." (goto-char (match-end 0)) (setq nest-count (1+ nest-count) found (<= nest-count 0)))) - + ;; all the other block starts (t (setq nest-count (1+ nest-count) @@ -4188,7 +4188,7 @@ parenthesis, or nil." ;; Value_1); ;; type B is ( -- comment ;; Value_2); - + (if (or (not ada-indent-handle-comment-special) (not (looking-at "[ \t]+--"))) (skip-chars-forward " \t")) @@ -4279,7 +4279,7 @@ of the region. Otherwise, operates only on the current line." (replace-match "-- \\1") (forward-line 1) (beginning-of-line)) - + (goto-char (point-min)) (while (re-search-forward "\\>(" nil t) (if (not (ada-in-string-or-comment-p)) @@ -4405,7 +4405,7 @@ Moves to 'begin' if in a declarative part." (skip-syntax-backward "w") (looking-at "\\<begin\\>")) (ada-goto-matching-end 1)) - + ;; on first line of subprogram body ;; Do nothing for specs or generic instantion, since these are ;; handled as the general case (find the enclosing block) @@ -4418,7 +4418,7 @@ Moves to 'begin' if in a declarative part." )) (skip-syntax-backward "w") (ada-goto-matching-end 0 t)) - + ;; on first line of task declaration ((save-excursion (and (ada-goto-stmt-start) @@ -4444,12 +4444,12 @@ Moves to 'begin' if in a declarative part." (skip-syntax-backward "w") (looking-at "\\<declare\\>")) (ada-goto-matching-end 0 t)) - + ;; inside a 'begin' ... 'end' block (decl-start (goto-char decl-start) (ada-goto-matching-end 0 t)) - + ;; (hopefully ;-) everything else (t (ada-goto-matching-end 1))) @@ -4831,7 +4831,7 @@ otherwise." ;; If we are using project file, search for the other file in all ;; the possible src directories. - + (if (functionp 'ada-find-src-file-in-dir) (let ((other (ada-find-src-file-in-dir @@ -4888,7 +4888,7 @@ Since the search can be long, the results are cached." ;; Are we looking at "function Foo\n (paramlist)" (skip-chars-forward " \t\n(") - + (condition-case nil (up-list 1) (error nil)) @@ -4899,7 +4899,7 @@ Since the search can be long, the results are cached." (forward-word 1) (skip-chars-forward " \t\n") (skip-chars-forward "a-zA-Z0-9_'"))) - + ;; Can't simply do forward-word, in case the "is" is not on the ;; same line as the closing parenthesis (skip-chars-forward "is \t\n") @@ -5088,7 +5088,7 @@ Returns nil if no body was found." ;; Ada unnamed numerical constants (list "\\W\\([-+]?[0-9._]+\\)\\>" '(1 font-lock-constant-face)) - + )) "Default expressions to highlight in Ada mode.") diff --git a/lisp/progmodes/ada-prj.el b/lisp/progmodes/ada-prj.el index 09ec600486e..ce96f43f4ed 100644 --- a/lisp/progmodes/ada-prj.el +++ b/lisp/progmodes/ada-prj.el @@ -75,7 +75,7 @@ prj))) (if (not (string= (file-name-extension filename t) ".adp")) (error "File name extension for project files must be .adp")) - + (ada-customize nil filename))) (defun ada-prj-edit () @@ -105,19 +105,19 @@ project file is found, returns the default values." ;; Else use the active one (set 'prj ada-prj-default-project-file)) - + (if (and prj (not (string= prj "")) (assoc prj ada-xref-project-files)) (set symbol (copy-sequence (cdr (assoc prj ada-xref-project-files)))) - + ;; Set default values (except for the file name if this was given ;; in the buffer (ada-xref-set-default-prj-values symbol ada-buffer) (if (and prj (not (string= prj ""))) (set symbol (plist-put (eval symbol) 'filename prj))) ))) - + (defun ada-prj-save-specific-option (field) "Returns the string to print in the project file to save FIELD. @@ -138,7 +138,7 @@ If the current value of FIELD is the default value, returns an empty string." ;; Save the fields that do not depend on the current buffer ;; only if they are different from the default value - + (ada-prj-save-specific-option 'comp_opt) (ada-prj-save-specific-option 'bind_opt) (ada-prj-save-specific-option 'link_opt) @@ -173,7 +173,7 @@ If the current value of FIELD is the default value, returns an empty string." (plist-get ada-prj-current-values 'debug_post_cmd)) "\n" )) - + (find-file file-name) (erase-buffer) (insert output) @@ -264,9 +264,9 @@ The current buffer must be the project editing buffer." widget-field-list nil) (mapcar (lambda (x) (delete-overlay x)) (car (overlay-lists))) (mapcar (lambda (x) (delete-overlay x)) (cdr (overlay-lists))))) - + ;; Display the tabs - + (widget-insert "\n Project and Editor configuration.\n ___________ ____________ ____________ ____________ ____________\n / ") (widget-create 'push-button :notify @@ -286,9 +286,9 @@ The current buffer must be the project editing buffer." (widget-insert " \\\n") ;; Display the currently selected page - + (cond - + ;; ;; First page (General) ;; @@ -335,7 +335,7 @@ vxworks, you would enter 'powerpc-wrs-vxworks-'. To use JGNAT, enter 'j'.") ) - + ;; ;; Second page (Paths) ;; @@ -347,7 +347,7 @@ To use JGNAT, enter 'j'.") (plist-get ada-prj-current-values 'cross_prefix)) (ada-initialize-runtime-library ada-old-cross-prefix))) - + (widget-insert "/_____________\\/ \\/______________\\/______________\\/______________\\\n") (ada-prj-field 'src_dir "Source directories" "Enter the list of directories where your Ada @@ -363,7 +363,7 @@ and the standard runtime." "\n") ) (widget-insert "\n\n") - + (ada-prj-field 'obj_dir "Object directories" "Enter the list of directories where the GNAT library files (ALI files) can be found. These @@ -397,7 +397,7 @@ command and are passed to the binder") command and are passed to the linker") (ada-prj-field 'gnatmake_opt "Switches for gnatmake" "These switches are used in the default gnatmake -command.") +command.") (ada-prj-field 'gnatfind_opt "Switches for gnatfind" "The command gnatfind is run every time the Ada/Goto/List_References menu. You should for instance add -a if you are working in an environment @@ -455,7 +455,7 @@ command will be executed on the remote host." t) debugger" "The following commands are executed one after the other before starting the debugger. These can be used to set up your environment." t) - + (ada-prj-field 'debug_cmd "Debugging the application" "Specifies how to debug the application, possibly remotely if remote_machine has been set. We @@ -469,7 +469,7 @@ recommend the following debuggers: started. These can be used to initialize the debugger, for instance to connect to the target when working with cross-environments" t) ) - + ) @@ -505,7 +505,7 @@ If FILENAME is given, edit that file." ;; We can only edit interactively the standard ada-mode project files. If ;; the user is using other formats for the project file (through hooks in ;; `ada-load-project-hook', we simply edit the file - + (if (and (not new-file) (or ada-prj-default-project-file filename) (string= (file-name-extension @@ -519,22 +519,22 @@ If FILENAME is given, edit that file." ;; Else start the interactive editor (switch-to-buffer "*Customize Ada Mode*") (kill-all-local-variables) - + (ada-xref-set-default-prj-values 'ada-prj-default-values ada-buffer) (ada-prj-initialize-values 'ada-prj-current-values ada-buffer filename) - + (set (make-local-variable 'ada-prj-ada-buffer) ada-buffer) - + (use-local-map (copy-keymap custom-mode-map)) (local-set-key "\C-x\C-s" 'ada-prj-save) - + (make-local-variable 'widget-keymap) (define-key widget-keymap "\C-x\C-s" 'ada-prj-save) - + (set (make-local-variable 'ada-old-cross-prefix) (ada-xref-get-project-field 'cross-prefix)) - + (ada-prj-display-page 1) ))) diff --git a/lisp/progmodes/ada-stmt.el b/lisp/progmodes/ada-stmt.el index cb9e1dcf934..ebc658f5622 100644 --- a/lisp/progmodes/ada-stmt.el +++ b/lisp/progmodes/ada-stmt.el @@ -29,7 +29,7 @@ ;; Nov 1993. Rolf Ebert <ebert@enpc.fr> (RE) Moved the ;; skeleton generation into this separate file. The code still is ;; essentially written by DP -;; +;; ;; Adapted Jun 1994. Markus Heritsch ;; <Markus.Heritsch@studbox.uni-stuttgart.de> (MH) ;; added menu bar support for templates @@ -432,7 +432,7 @@ Invoke right after `ada-function-spec' or `ada-procedure-spec'." ; "Inserts a use clause, prompting for the list of packages used." ; "[list of packages used]: " ; "use " str ?\;) - + (define-skeleton ada-record "Insert a skeleton record type declaration." @@ -475,7 +475,7 @@ Invoke right after `ada-function-spec' or `ada-procedure-spec'." " (" ("[discriminant]: " str "; ") ") is\n" > "entry " _ \n <"end " str ";" ) - + (define-skeleton ada-get-param1 "Prompt for arguments and if any enclose them in brackets." @@ -556,7 +556,7 @@ Invoke right after `ada-function-spec' or `ada-procedure-spec'." "[delay value]: " < "or\n" > "delay " str ";") - + (define-skeleton ada-or-terminate "Insert a terminate statement." diff --git a/lisp/progmodes/ada-xref.el b/lisp/progmodes/ada-xref.el index 0390ac04854..369119208f9 100644 --- a/lisp/progmodes/ada-xref.el +++ b/lisp/progmodes/ada-xref.el @@ -225,7 +225,7 @@ CROSS-PREFIX is the prefix to use for the gnatls command" (goto-char (point-min)) ;; Source path - + (search-forward "Source Search Path:") (forward-line 1) (while (not (looking-at "^$")) @@ -238,7 +238,7 @@ CROSS-PREFIX is the prefix to use for the gnatls command" (forward-line 1)) ;; Object path - + (search-forward "Object Search Path:") (forward-line 1) (while (not (looking-at "^$")) @@ -282,7 +282,7 @@ replaced by the name including the extension." (if (null value) (if (not (setq value (getenv name))) (message (concat "No environment variable " name " found")))) - + (cond ((null value) (setq cmd-string (replace-match "" t t cmd-string))) @@ -303,7 +303,7 @@ replaced by the name including the extension." plist) (save-excursion (set-buffer ada-buffer) - + (set 'plist ;; Try hard to find a default value for filename, so that the user ;; can edit his project file even if the current buffer is not an @@ -357,7 +357,7 @@ replaced by the name including the extension." 'debug_post_cmd (list nil))) ) (set symbol plist))) - + (defun ada-xref-get-project-field (field) "Extract the value of FIELD from the current project file. The project file must have been loaded first. @@ -373,7 +373,7 @@ addition return the default paths." ;; Get the project file (either the current one, or a default one) (setq file (or (assoc file-name ada-xref-project-files) (assoc nil ada-xref-project-files))) - + ;; If the file was not found, use the default values (if file ;; Get the value from the file @@ -409,10 +409,10 @@ All the directories are returned as absolute directories." (append ;; Add ${build_dir} in front of the path (list build-dir) - + (ada-get-absolute-dir-list (ada-xref-get-project-field 'src_dir) build-dir) - + ;; Add the standard runtime at the end ada-xref-runtime-library-specs-path))) @@ -424,10 +424,10 @@ All the directories are returned as absolute directories." (append ;; Add ${build_dir} in front of the path (list build-dir) - + (ada-get-absolute-dir-list (ada-xref-get-project-field 'obj_dir) build-dir) - + ;; Add the standard runtime at the end ada-xref-runtime-library-ali-path))) @@ -442,7 +442,7 @@ All the directories are returned as absolute directories." (cons 'New (cons "New..." 'ada-prj-new)) (cons 'Edit (cons "Edit..." 'ada-prj-edit)) (cons 'sep (cons "---" nil)))) - + ;; Add the new items (mapcar (lambda (x) @@ -469,7 +469,7 @@ All the directories are returned as absolute directories." (equal ada-prj-default-project-file (car x)) )))))))) - + ;; Parses all the known project files, and insert at least the default ;; one (in case ada-xref-project-files is nil) (or ada-xref-project-files '(nil))) @@ -650,7 +650,7 @@ name as was passed to `ada-create-menu'." (not ada-tight-gvd-integration)) :style toggle :selected ada-tight-gvd-integration])) ) - + ;; for Emacs (let* ((menu (or (lookup-key ada-mode-map [menu-bar Ada]) ;; Emacs-21.4's easymenu.el downcases the events. @@ -699,7 +699,7 @@ name as was passed to `ada-create-menu'." '("Goto Declaration Other Frame" . ada-goto-declaration-other-frame)) (define-key goto-menu [Decl] '("Goto Declaration/Body" . ada-goto-declaration)) - + (define-key edit-menu [rem] '("----" . nil)) (define-key edit-menu [Complete] '("Complete Identifier" . ada-complete-identifier)) @@ -745,7 +745,7 @@ name as was passed to `ada-create-menu'." (not ada-xref-project-files) (string= ada-prj-default-project-file "")) (ada-reread-prj-file))) - + (defun ada-xref-push-pos (filename position) "Push (FILENAME, POSITION) on the position ring for cross-references." (setq ada-xref-pos-ring (cons (list position filename) ada-xref-pos-ring)) @@ -787,21 +787,21 @@ file. If none is set, return nil." ;; Use the active project file if there is one. ;; This is also valid if we don't currently have an Ada buffer, or if ;; the current buffer is not a real file (for instance an emerge buffer) - + (if (or (not (string= mode-name "Ada")) (not (buffer-file-name)) (and ada-prj-default-project-file (not (string= ada-prj-default-project-file "")))) (set 'selected ada-prj-default-project-file) - + ;; other cases: use a more complex algorithm - + (let* ((current-file (buffer-file-name)) (first-choice (concat (file-name-sans-extension current-file) ada-project-file-extension)) (dir (file-name-directory current-file)) - + ;; on Emacs 20.2, directory-files does not work if ;; parse-sexp-lookup-properties is set (parse-sexp-lookup-properties nil) @@ -810,18 +810,18 @@ file. If none is set, return nil." (concat ".*" (regexp-quote ada-project-file-extension) "$"))) (choice nil)) - + (cond - + ;; Else if there is a project file with the same name as the Ada ;; file, but not the same extension. ((file-exists-p first-choice) (set 'selected first-choice)) - + ;; Else if only one project file was found in the current directory ((= (length prj-files) 1) (set 'selected (car prj-files))) - + ;; Else if there are multiple files, ask the user ((and (> (length prj-files) 1) (not no-user-question)) (save-window-excursion @@ -846,7 +846,7 @@ file. If none is set, return nil." (setq choice (string-to-int (read-from-minibuffer "Enter No. of your choice: ")))) (set 'selected (nth (1- choice) prj-files)))) - + ;; Else if no project file was found in the directory, ask a name ;; to the user, using as a default value the last one entered by ;; the user @@ -921,7 +921,7 @@ The current buffer should be the ada-file buffer." (set 'project (plist-put project (intern (match-string 1)) (match-string 2)))))) (forward-line 1)) - + (if src_dir (set 'project (plist-put project 'src_dir (reverse src_dir)))) (if obj_dir (set 'project (plist-put project 'obj_dir @@ -946,7 +946,7 @@ The current buffer should be the ada-file buffer." ;; the list (if (assoc nil ada-xref-project-files) (setq ada-xref-project-files nil)) - + ;; Memorize the newly read project file (if (assoc prj-file ada-xref-project-files) (setcdr (assoc prj-file ada-xref-project-files) project) @@ -954,7 +954,7 @@ The current buffer should be the ada-file buffer." ;; Set the project file as the active one. (setq ada-prj-default-project-file prj-file) - + ;; Sets up the compilation-search-path so that Emacs is able to ;; go to the source of the errors in a compilation buffer (setq compilation-search-path (ada-xref-get-src-dir-field)) @@ -964,13 +964,13 @@ The current buffer should be the ada-file buffer." (progn (setq ada-case-exception-file (reverse casing)) (ada-case-read-exceptions))) - + ;; Add the directories to the search path for ff-find-other-file ;; Do not add the '/' or '\' at the end (setq ada-search-directories (append (mapcar 'directory-file-name compilation-search-path) ada-search-directories)) - + ;; Kill the project buffer (kill-buffer nil) (set-buffer ada-buffer) @@ -985,8 +985,8 @@ The current buffer should be the ada-file buffer." ;; directory. (setq compilation-search-path (list nil default-directory)) )) - - + + (defun ada-find-references (&optional pos arg local-only) "Find all references to the entity under POS. Calls gnatfind to find the references. @@ -1061,7 +1061,7 @@ buffer *gnatfind* if it exists." (save-excursion (set-buffer "*gnatfind*") (setq old-contents (buffer-string)))) - + (compile-internal command "No more references" "gnatfind") ;; Hide the "Compilation" menu @@ -1251,7 +1251,7 @@ If ARG is not nil, ask for user confirmation." ;; Make a single command from the list of commands, including the ;; commands to run it on a remote machine. (setq cmd (ada-remote (mapconcat 'identity cmd ada-command-separator))) - + (if (or ada-xref-confirm-compile arg) (setq cmd (read-from-minibuffer "enter command to compile: " cmd))) @@ -1260,7 +1260,7 @@ If ARG is not nil, ask for user confirmation." ;; which gets confused by newline characters. (if (not (string-match "cmdproxy.exe" shell-file-name)) (setq cmd (concat cmd "\n\n"))) - + (compile (ada-quote-cmd cmd)))) (defun ada-compile-current (&optional arg prj-field) @@ -1274,16 +1274,16 @@ command, and should be either comp_cmd (default) or check_cmd." (cmd (ada-xref-get-project-field field)) (process-environment (ada-set-environment)) (compilation-scroll-output t)) - + (setq compilation-search-path (ada-xref-get-src-dir-field)) (unless cmd (setq cmd '("") arg t)) - + ;; Make a single command from the list of commands, including the ;; commands to run it on a remote machine. (setq cmd (ada-remote (mapconcat 'identity cmd ada-command-separator))) - + ;; If no project file was found, ask the user (if (or ada-xref-confirm-compile arg) (setq cmd (read-from-minibuffer "enter command to compile: " cmd))) @@ -1293,7 +1293,7 @@ command, and should be either comp_cmd (default) or check_cmd." ;; which gets confused by newline characters. (if (not (string-match "cmdproxy.exe" shell-file-name)) (setq cmd (concat cmd "\n\n"))) - + (compile (ada-quote-cmd cmd)))) (defun ada-check-current (&optional arg) @@ -1321,7 +1321,7 @@ if ARG is not-nil, asks for user confirmation." ;; Modify the command to run remotely (setq command (ada-remote (mapconcat 'identity command ada-command-separator))) - + ;; Ask for the arguments to the command if required (if (or ada-xref-confirm-compile arg) (setq command (read-from-minibuffer "Enter command to execute: " @@ -1412,7 +1412,7 @@ If ARG is non-nil, ask the user to confirm the command." ;; Temporarily replaces the definition of `comint-exec' so that we ;; can execute commands before running gdb. - (fset 'comint-exec + (fset 'comint-exec `(lambda (buffer name command startfile switches) (let (compilation-buffer-name-function) (save-excursion @@ -1429,7 +1429,7 @@ If ARG is non-nil, ask the user to confirm the command." ada-tight-gvd-integration (not (string-match "--tty" cmd))) (setq cmd (concat cmd "--tty"))) - + (if (and (string-match "jdb" (comint-arguments cmd 0 0)) (boundp 'jdb)) (funcall (symbol-function 'jdb) cmd) @@ -1480,7 +1480,7 @@ replacing the file extension with .ali" (if (and ali-file-name (get-file-buffer ali-file-name)) (kill-buffer (get-file-buffer ali-file-name))) - + (let* ((name (ada-convert-file-name file)) (body-name (or (ada-get-body-name name) name))) @@ -1516,7 +1516,7 @@ replacing the file extension with .ali" (while (and (not found) dir-list) (set 'found (concat (file-name-as-directory (car dir-list)) (file-name-nondirectory file))) - + (unless (file-exists-p found) (set 'found nil)) (set 'dir-list (cdr dir-list))) @@ -1587,14 +1587,14 @@ the project file." (file-name-nondirectory (ada-other-file-name))) ".ali")))) - + (setq ali-file-name (or ali-file-name - + ;; Else we take the .ali file associated with the unit (ada-find-ali-file-in-dir short-ali-file-name) - + ;; else we did not find the .ali file Second chance: in case ;; the files do not have standard names (such as for instance @@ -1605,35 +1605,35 @@ the project file." (file-name-nondirectory (ada-other-file-name))) ".ali")) - + ;; If we still don't have an ali file, try to get the one ;; from the parent unit, in case we have a separate entity. (let ((parent-name (file-name-sans-extension (file-name-nondirectory file)))) - + (while (and (not ali-file-name) (string-match "^\\(.*\\)[.-][^.-]*" parent-name)) - + (set 'parent-name (match-string 1 parent-name)) (set 'ali-file-name (ada-find-ali-file-in-dir (concat parent-name ".ali"))) ) ali-file-name))) - + ;; If still not found, try to recompile the file (if (not ali-file-name) ;; recompile only if the user asked for this. and search the ali ;; filename again. We avoid a possible infinite recursion by ;; temporarily disabling the automatic compilation. - + (if ada-xref-create-ali (setq ali-file-name (concat (file-name-sans-extension (ada-xref-current file)) ".ali")) (error "Ali file not found. Recompile your file")) - - + + ;; same if the .ali file is too old and we must recompile it (if (and (file-newer-than-file-p file ali-file-name) ada-xref-create-ali) @@ -1657,7 +1657,7 @@ file for possible paths." (set-buffer buffer) (find-file original-file) (ada-require-project-file))) - + ;; we choose the first possible completion and we ;; return the absolute file name (let ((filename (ada-find-src-file-in-dir file))) @@ -1687,7 +1687,7 @@ macros `ada-name-of', `ada-line-of', `ada-column-of', `ada-file-of',..." ;; If at end of buffer (e.g the buffer is empty), error (if (>= (point) (point-max)) (error "No identifier on point")) - + ;; goto first character of the identifier/operator (skip backward < and > ;; since they are part of multiple character operators (goto-char pos) @@ -1724,7 +1724,7 @@ macros `ada-name-of', `ada-line-of', `ada-column-of', `ada-file-of',..." (if (looking-at "[a-zA-Z0-9_]+") (set 'identifier (match-string 0)) (error "No identifier around"))) - + ;; Build the identlist (set 'identlist (ada-make-identlist)) (ada-set-name identlist (downcase identifier)) @@ -1739,7 +1739,7 @@ macros `ada-name-of', `ada-line-of', `ada-column-of', `ada-file-of',..." (defun ada-get-all-references (identlist) "Completes and returns IDENTLIST with the information extracted from the ali file (definition file and places where it is referenced)." - + (let ((ali-buffer (ada-get-ali-buffer (ada-file-of identlist))) declaration-found) (set-buffer ali-buffer) @@ -1749,7 +1749,7 @@ from the ali file (definition file and places where it is referenced)." ;; First attempt: we might already be on the declaration of the identifier ;; We want to look for the declaration only in a definite interval (after ;; the "^X ..." line for the current file, and before the next "^X" line - + (if (re-search-forward (concat "^X [0-9]+ " (file-name-nondirectory (ada-file-of identlist))) nil t) @@ -1768,7 +1768,7 @@ from the ali file (definition file and places where it is referenced)." ;; have to fall back on other algorithms (unless declaration-found - + ;; Since we alread know the number of the file, search for a direct ;; reference to it (goto-char (point-min)) @@ -1796,7 +1796,7 @@ from the ali file (definition file and places where it is referenced)." "[^0-9]" (ada-column-of identlist) "\\>") nil t) - + ;; If still not found, then either the declaration is unknown ;; or the source file has been modified since the ali file was ;; created @@ -1831,7 +1831,7 @@ from the ali file (definition file and places where it is referenced)." ))) ) - + ;; Now that we have found a suitable line in the .ali file, get the ;; information available (beginning-of-line) @@ -1854,13 +1854,13 @@ from the ali file (definition file and places where it is referenced)." identlist (ada-get-ada-file-name (match-string 1) (ada-file-of identlist))) - + ;; Else clean up the ali file (error (kill-buffer ali-buffer) (error (error-message-string err))) )) - + (ada-set-references identlist current-line) )) )) @@ -1913,16 +1913,16 @@ This function is disabled for operators, and only works for identifiers." (error (concat "No declaration of " (ada-name-of identlist) " recorded in .ali file"))) - + ;; one => should be the right one ((= len 1) (goto-line (caar declist))) - + ;; more than one => display choice list (t (save-window-excursion (with-output-to-temp-buffer "*choice list*" - + (princ "Identifier is overloaded and Xref information is not up to date.\n") (princ "Possible declarations are:\n\n") (princ " no. in file at line col\n") @@ -1994,7 +1994,7 @@ opens a new window to show the declaration." ) ;; Else get the nearest file (set 'file (ada-declare-file-of identlist))) - + (set 'locations (append locations (list (list line col file))))) ;; Add the specs at the end again, so that from the last body we go to @@ -2007,7 +2007,7 @@ opens a new window to show the declaration." (setq line (caar locations) col (nth 1 (car locations)) file (nth 2 (car locations))) - + (while locations (if (and (string= (caar locations) (ada-line-of identlist)) (string= (nth 1 (car locations)) (ada-column-of identlist)) @@ -2046,27 +2046,27 @@ This command requires the external `egrep' program to be available. This works well when one is using an external librarie and wants to find the declaration and documentation of the subprograms one is is using." - + (let (list (dirs (ada-xref-get-obj-dir-field)) (regexp (concat "[ *]" (ada-name-of identlist))) line column choice file) - + (save-excursion - + ;; Do the grep in all the directories. We do multiple shell ;; commands instead of one in case there is no .ali file in one ;; of the directory and the shell stops because of that. - + (set-buffer (get-buffer-create "*grep*")) (while dirs (insert (shell-command-to-string (concat "egrep -i -h '^X|" regexp "( |$)' " (file-name-as-directory (car dirs)) "*.ali"))) (set 'dirs (cdr dirs))) - + ;; Now parse the output (set 'case-fold-search t) (goto-char (point-min)) @@ -2080,23 +2080,23 @@ is using." column (match-string 2)) (re-search-backward "^X [0-9]+ \\(.*\\)$") (set 'file (list (match-string 1) line column)) - + ;; There could be duplicate choices, because of the structure ;; of the .ali files (unless (member file list) (set 'list (append list (list file)))))))) - + ;; Current buffer is still "*grep*" (kill-buffer "*grep*") ) - + ;; Now display the list of possible matches (cond - + ;; No choice found => Error ((null list) (error "No cross-reference found, please recompile your file")) - + ;; Only one choice => Do the cross-reference ((= (length list) 1) (set 'file (ada-find-src-file-in-dir (caar list))) @@ -2109,12 +2109,12 @@ is using." (error (concat (caar list) " not found in src_dir"))) (message "This is only a (good) guess at the cross-reference.") ) - + ;; Else, ask the user (t (save-window-excursion (with-output-to-temp-buffer "*choice list*" - + (princ "Identifier is overloaded and Xref information is not up to date.\n") (princ "Possible declarations are:\n\n") (princ " no. in file at line col\n") @@ -2315,7 +2315,7 @@ This function typically is to be hooked into `ff-file-created-hooks'." (progn (set-buffer-modified-p nil) (kill-buffer (current-buffer)))) - + ;; Make sure the current buffer is the spec (this might not be the case ;; if for instance the user was asked for a project file) diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el index 1d1fbfab252..1bdc86260a5 100644 --- a/lisp/progmodes/antlr-mode.el +++ b/lisp/progmodes/antlr-mode.el @@ -88,7 +88,7 @@ (eval-when-compile (require 'cl) (defmacro cond-emacs-xemacs (&rest args) - (cond-emacs-xemacs-macfn + (cond-emacs-xemacs-macfn args "`cond-emacs-xemacs' must return exactly one element")) (defun cond-emacs-xemacs-macfn (args &optional msg) (if (atom args) args @@ -1627,7 +1627,7 @@ Use prefix argument ARG to return \(LEVEL OPTION LOCATION)." :active active)) (sort (mapcar 'car (elt antlr-options-alists (1- level))) 'string-lessp)))) - + ;;;=========================================================================== ;;; Insert option: determine section-kind @@ -1904,7 +1904,7 @@ For OLD, see `antlr-insert-option-do'." ;; stuff (no =, {, } or /) at point is not followed by ";" (insert ";") (backward-char))) - + (defun antlr-insert-option-space (area old) "Find appropriate place to insert option, insert newlines/spaces. For AREA and OLD, see `antlr-insert-option-do'." @@ -1924,7 +1924,7 @@ For AREA and OLD, see `antlr-insert-option-do'." (setq orig (point)) (goto-char orig))) (skip-chars-forward " \t") - + (if (looking-at "$\\|//") ;; just comment after point => skip (+ lines w/ same col comment) (let ((same (if (> (match-end 0) (match-beginning 0)) diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index b23b7657996..97cac196aa8 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el @@ -1811,7 +1811,7 @@ stops at them when going backward, but not when going forward." (interactive "p") (c-forward-conditional (- count) -1) (c-keep-region-active)) - + (defun c-up-conditional-with-else (count) "Move back to the containing preprocessor conditional, including `#else'. Just like `c-up-conditional', except it also stops at `#else' diff --git a/lisp/progmodes/cc-compat.el b/lisp/progmodes/cc-compat.el index 967c1165c18..c0b167faaba 100644 --- a/lisp/progmodes/cc-compat.el +++ b/lisp/progmodes/cc-compat.el @@ -106,7 +106,7 @@ This is in addition to c-continued-statement-offset.") (if (eq (char-before) ?{) (forward-char -1) (goto-char (cdr langelem))) - (let* ((curcol (save-excursion + (let* ((curcol (save-excursion (goto-char (cdr langelem)) (current-column))) (bocm-lossage @@ -138,7 +138,7 @@ This is in addition to c-continued-statement-offset.") (defun cc-block-close-offset (langelem) (save-excursion (let* ((here (point)) - bracep + bracep (curcol (progn (goto-char (cdr langelem)) (current-column))) @@ -154,7 +154,7 @@ This is in addition to c-continued-statement-offset.") (current-column)))) (- bocm-lossage curcol (if bracep 0 c-indent-level))))) - + (defun cc-substatement-open-offset (langelem) (+ c-continued-statement-offset c-continued-brace-offset)) diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el index 0e6ba8f4191..25f31a0ec8c 100644 --- a/lisp/progmodes/cc-defs.el +++ b/lisp/progmodes/cc-defs.el @@ -79,7 +79,7 @@ ;; Returns the value of certain commonly referenced POSITIONs ;; relative to POINT. The current point is used if POINT isn't ;; specified. POSITION can be one of the following symbols: - ;; + ;; ;; bol -- beginning of line ;; eol -- end of line ;; bod -- beginning of defun @@ -91,7 +91,7 @@ ;; eonl -- end of next line ;; bopl -- beginning of previous line ;; eopl -- end of previous line - ;; + ;; ;; If the referenced position doesn't exist, the closest accessible ;; point to it is returned. This function does not modify point or ;; mark. diff --git a/lisp/progmodes/cc-menus.el b/lisp/progmodes/cc-menus.el index 3a630567a48..fe33b2f755d 100644 --- a/lisp/progmodes/cc-menus.el +++ b/lisp/progmodes/cc-menus.el @@ -125,7 +125,7 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.") "[ \t]*([^)]*)[ \t]*)[ \t]*[^ \t;]" ; see above ) 1))) ;; Class definitions - ("Class" + ("Class" ,(concat "^" ; beginning of line is required "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a `template <...>' @@ -137,7 +137,7 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.") "\\([ \t\n]\\|\\\\\n\\)*[:{]" ) 3)) "Imenu generic expression for C++ mode. See `imenu-generic-expression'.") - + (defvar cc-imenu-c-generic-expression cc-imenu-c++-generic-expression "Imenu generic expression for C mode. See `imenu-generic-expression'.") @@ -155,11 +155,11 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.") "[][a-zA-Z,_1-9\n \t]*" ; arguments ")[ \t]*" ; "[^;(]" - "[,a-zA-Z_1-9\n \t]*{" + "[,a-zA-Z_1-9\n \t]*{" ) 6)) "Imenu generic expression for Java mode. See `imenu-generic-expression'.") -;; *Warning for cc-mode developers* +;; *Warning for cc-mode developers* ;; ;; `cc-imenu-objc-generic-expression' elements depend on ;; `cc-imenu-c++-generic-expression'. So if you change this @@ -169,8 +169,8 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.") ;; order to know where the each regexp *group \\(foobar\\)* elements ;; are started. ;; -;; *-index variables are initialized during `cc-imenu-objc-generic-expression' -;; being initialized. +;; *-index variables are initialized during `cc-imenu-objc-generic-expression' +;; being initialized. ;; ;; Internal variables @@ -179,10 +179,10 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.") (defvar cc-imenu-objc-generic-expression-proto-index nil) (defvar cc-imenu-objc-generic-expression-objc-base-index nil) -(defvar cc-imenu-objc-generic-expression - (concat +(defvar cc-imenu-objc-generic-expression + (concat ;; - ;; For C + ;; For C ;; ;; > Special case to match a line like `main() {}' ;; > e.g. no return type, not even on the previous line. @@ -198,7 +198,7 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.") ;; > `int main _PROTO( (int argc,char *argv[]) )'. ;; Pick a token by (match-string 5) (if cc-imenu-c-prototype-macro-regexp - (concat + (concat "\\|" (car (cdr (nth 3 cc-imenu-c++-generic-expression))) ; -> index += 1 (prog2 (setq cc-imenu-objc-generic-expression-objc-base-index 6) "") @@ -210,20 +210,20 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.") ;; For Objective-C ;; Pick a token by (match-string 5 or 6) ;; - "\\|\\(" + "\\|\\(" "^[-+][:a-zA-Z0-9()*_<>\n\t ]*[;{]" ; Methods - "\\|" - "^@interface[\t ]+[a-zA-Z0-9_]+[\t ]*:" - "\\|" + "\\|" + "^@interface[\t ]+[a-zA-Z0-9_]+[\t ]*:" + "\\|" "^@interface[\t ]+[a-zA-Z0-9_]+[\t ]*([a-zA-Z0-9_]+)" - "\\|" + "\\|" ;; For NSObject, NSProxy and Object... They don't have super class. "^@interface[\t ]+[a-zA-Z0-9_]+[\t ]*.*$" - "\\|" + "\\|" "^@implementation[\t ]+[a-zA-Z0-9_]+[\t ]*([a-zA-Z0-9_]+)" - "\\|" + "\\|" "^@implementation[\t ]+[a-zA-Z0-9_]+" - "\\|" + "\\|" "^@protocol[\t ]+[a-zA-Z0-9_]+" "\\)") "Imenu generic expression for ObjC mode. See `imenu-generic-expression'.") @@ -231,13 +231,13 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.") ;; Imenu support for objective-c uses functions. (defsubst cc-imenu-objc-method-to-selector (method) "Return the objc selector style string of METHOD. -Example: +Example: - perform: (SEL)aSelector withObject: object1 withObject: object2; /* METHOD */ => -perform:withObject:withObject:withObject: /* selector */" (let ((return "") ; String to be returned - (p 0) ; Current scanning position in METHOD - (pmax (length method)) ; + (p 0) ; Current scanning position in METHOD + (pmax (length method)) ; char ; Current scanning target (betweenparen 0) ; CHAR is in parentheses. argreq ; An argument is required. @@ -253,17 +253,17 @@ Example: (and (<= ?A char) (<= char ?Z)) (and (<= ?0 char) (<= char ?9)) (= ?_ char))) - (if argreq + (if argreq (setq inargvar t argreq nil) (setq return (concat return (char-to-string char))))) ;; Or a white space? - ((and inargvar (or (eq ?\ char) (eq ?\n char)) + ((and inargvar (or (eq ?\ char) (eq ?\n char)) (setq inargvar nil))) ;; Or a method separator? ;; If a method separator, the next token will be an argument variable. - ((eq ?: char) - (setq argreq t + ((eq ?: char) + (setq argreq t return (concat return (char-to-string char)))) ;; Or an open parentheses? ((eq ?\( char) @@ -277,7 +277,7 @@ Example: "Remove all spaces and tabs from STR." (let ((return "") (p 0) - (max (length str)) + (max (length str)) char) (while (< p max) (setq char (aref str p)) @@ -294,7 +294,7 @@ Example: ;; ;; OBJC, Cnoreturn, Cgeneralfunc, Cproto are constants. ;; - ;; *Warning for developers* + ;; *Warning for developers* ;; These constants depend on `cc-imenu-c++-generic-expression'. ;; (OBJC cc-imenu-objc-generic-expression-objc-base-index) @@ -310,13 +310,13 @@ Example: toplist stupid str - str2 + str2 (intflen (length "@interface")) (implen (length "@implementation")) (prtlen (length "@protocol")) (func ;; - ;; Does this emacs has buffer-substring-no-properties? + ;; Does this emacs has buffer-substring-no-properties? ;; (if (fboundp 'buffer-substring-no-properties) 'buffer-substring-no-properties @@ -326,7 +326,7 @@ Example: ;; (while (re-search-backward cc-imenu-objc-generic-expression nil t) (imenu-progress-message stupid) - (setq langnum (if (match-beginning OBJC) + (setq langnum (if (match-beginning OBJC) OBJC (cond ((match-beginning Cproto) Cproto) @@ -334,7 +334,7 @@ Example: ((match-beginning Cnoreturn) Cnoreturn)))) (setq str (funcall func (match-beginning langnum) (match-end langnum))) ;; - (cond + (cond ;; ;; C ;; @@ -342,7 +342,7 @@ Example: (setq clist (cons (cons str (match-beginning langnum)) clist))) ;; ;; ObjC - ;; + ;; ;; An instance Method ((eq (aref str 0) ?-) (setq str (concat "-" (cc-imenu-objc-method-to-selector str))) @@ -355,10 +355,10 @@ Example: (setq methodlist (cons (cons str (match-beginning langnum)) methodlist))) - ;; Interface or implementation or protocol + ;; Interface or implementation or protocol ((eq (aref str 0) ?@) (setq classcount (1+ classcount)) - (cond + (cond ((and (> (length str) implen) (string= (substring str 0 implen) "@implementation")) (setq str (substring str implen) @@ -376,7 +376,7 @@ Example: (setq toplist (cons nil (cons (cons str methodlist) toplist)) methodlist nil)))) - ;; + ;; (imenu-progress-message stupid 100) (if (eq (car toplist) nil) (setq toplist (cdr toplist))) diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 3e363220058..a7c17720126 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -511,8 +511,8 @@ One should tune up `cperl-close-paren-offset' as well." :type 'boolean :group 'cperl-indentation-details) -(defcustom cperl-syntaxify-by-font-lock - (and window-system +(defcustom cperl-syntaxify-by-font-lock + (and window-system (boundp 'parse-sexp-lookup-properties)) "*Non-nil means that CPerl uses `font-lock's routines for syntaxification." :type '(choice (const message) boolean) @@ -620,7 +620,7 @@ want it to: put the following into your .emacs file: (defalias 'perl-mode 'cperl-mode) -Get perl5-info from +Get perl5-info from $CPAN/doc/manual/info/perl-info.tar.gz older version was on http://www.metronet.com:70/9/perlinfo/perl5/manual/perl5-info.tar.gz @@ -840,7 +840,7 @@ B) Speed of editing operations. syntaxically to be not code `font-lock-constant-face' HERE-doc delimiters, labels, delimiters of 2-arg operators s/y/tr/ or of RExen, - `font-lock-function-name-face' Special-cased m// and s//foo/, _ as + `font-lock-function-name-face' Special-cased m// and s//foo/, _ as a target of a file tests, file tests, subroutine names at the moment of definition (except those conflicting with Perl operators), @@ -1910,7 +1910,7 @@ to nil." head1 notlast name p really-delete over) (and (save-excursion (forward-word -1) - (and + (and (eq (preceding-char) ?=) (progn (setq head1 (looking-at "head1\\>[ \t]*$")) @@ -1922,8 +1922,8 @@ to nil." (get-text-property (point) 'in-pod) (cperl-after-expr-p nil "{;:") (and (re-search-backward - ;; "\\(\\`\n?\\|\n\n\\)=\\sw+" - "\\(\\`\n?\\|^\n\\)=\\sw+" + ;; "\\(\\`\n?\\|\n\n\\)=\\sw+" + "\\(\\`\n?\\|^\n\\)=\\sw+" (point-min) t) (not (or (looking-at "=cut") @@ -1938,13 +1938,13 @@ to nil." (insert "\n\n=cut") (cperl-ensure-newlines 2) (forward-word -2) - (if (and head1 - (not + (if (and head1 + (not (save-excursion (forward-char -1) (re-search-backward "\\(\\`\n?\\|\n\n\\)=head1\\>" nil t)))) ; Only one - (progn + (progn (forward-word 1) (setq name (file-name-sans-extension (file-name-nondirectory (buffer-file-name))) @@ -2466,7 +2466,7 @@ and closing parentheses and brackets." (list pre-indent-point))) 0) cperl-continued-statement-offset)))) - ((not + ((not (or (setq is-block (and (setq delim (= (char-after containing-sexp) ?{)) (save-excursion ; Is it a hash? @@ -2517,7 +2517,7 @@ and closing parentheses and brackets." ;;; (skip-chars-forward " \t")) ;;; (+ (current-column) ; Correct indentation of trailing ?\} ;;; (if (eq char-after ?\}) (+ cperl-indent-level -;;; cperl-close-paren-offset) +;;; cperl-close-paren-offset) ;;; 0))) (t ;; Statement level. Is it a continuation or a new statement? @@ -2544,7 +2544,7 @@ and closing parentheses and brackets." (memq (preceding-char) (append (if is-block " ;{" " ,;{") '(nil))) (and (eq (preceding-char) ?\}) - (cperl-after-block-and-statement-beg + (cperl-after-block-and-statement-beg containing-sexp)))) ;; This line is continuation of preceding line's statement; ;; indent `cperl-continued-statement-offset' more than the @@ -2557,7 +2557,7 @@ and closing parentheses and brackets." (+ (if (memq char-after (append "}])" nil)) 0 ; Closing parenth cperl-continued-statement-offset) - (if (or is-block + (if (or is-block (not delim) (not (eq char-after ?\}))) 0 @@ -2618,7 +2618,7 @@ and closing parentheses and brackets." (+ (if (and (bolp) (zerop cperl-indent-level)) (+ cperl-brace-offset cperl-continued-statement-offset) cperl-indent-level) - (if (or is-block + (if (or is-block (not delim) (not (eq char-after ?\}))) 0 @@ -3097,7 +3097,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', (or max (setq max (point-max))) (let* (face head-face here-face b e bb tag qtag b1 e1 argument i c tail tb is-REx is-x-REx REx-comment-start REx-comment-end was-comment i2 - (cperl-pod-here-fontify (eval cperl-pod-here-fontify)) go tmpend + (cperl-pod-here-fontify (eval cperl-pod-here-fontify)) go tmpend (case-fold-search nil) (inhibit-read-only t) (buffer-undo-list t) (modified (buffer-modified-p)) (after-change-functions nil) @@ -3121,11 +3121,11 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', (if (boundp 'font-lock-function-name-face) font-lock-function-name-face 'font-lock-function-name-face)) - (font-lock-comment-face + (font-lock-comment-face (if (boundp 'font-lock-comment-face) font-lock-comment-face 'font-lock-comment-face)) - (cperl-nonoverridable-face + (cperl-nonoverridable-face (if (boundp 'cperl-nonoverridable-face) cperl-nonoverridable-face 'cperl-nonoverridable-face)) @@ -3134,7 +3134,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', max)) (search (concat - "\\(\\`\n?\\|^\n\\)=" + "\\(\\`\n?\\|^\n\\)=" "\\|" ;; One extra () before this: "<<" @@ -3208,7 +3208,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', (setq tmpend nil) ; Valid for most cases (cond ((match-beginning 1) ; POD section - ;; "\\(\\`\n?\\|^\n\\)=" + ;; "\\(\\`\n?\\|^\n\\)=" (if (looking-at "cut\\>") (if ignore-max nil ; Doing a chunk only @@ -3234,7 +3234,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', (setq e (point)) (and (> e max) (progn - (remove-text-properties + (remove-text-properties max e '(syntax-type t in-pod t syntax-table t cperl-postpone t syntax-subtype t @@ -3250,22 +3250,22 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', (put-text-property (cperl-1- b) (point) 'syntax-type 'pod) (cperl-put-do-not-fontify b (point) t) ;; mark the non-literal parts as PODs - (if cperl-pod-here-fontify + (if cperl-pod-here-fontify (cperl-postpone-fontification b (point) 'face face t)) (re-search-forward "\n\n[^ \t\f\n]" e 'toend) (beginning-of-line) (setq b (point))) (put-text-property (cperl-1- (point)) e 'syntax-type 'pod) (cperl-put-do-not-fontify (point) e t) - (if cperl-pod-here-fontify - (progn + (if cperl-pod-here-fontify + (progn ;; mark the non-literal parts as PODs (cperl-postpone-fontification (point) e 'face face t) (goto-char bb) - (if (looking-at + (if (looking-at "=[a-zA-Z0-9_]+\\>[ \t]*\\(\\(\n?[^\n]\\)+\\)$") ;; mark the headers - (cperl-postpone-fontification + (cperl-postpone-fontification (match-beginning 1) (match-end 1) 'face head-face)) (while (re-search-forward @@ -3273,7 +3273,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', "^\n=[a-zA-Z0-9_]+\\>[ \t]*\\(\\(\n?[^\n]\\)+\\)$" e 'toend) ;; mark the headers - (cperl-postpone-fontification + (cperl-postpone-fontification (match-beginning 1) (match-end 1) 'face head-face)))) (cperl-commentify bb e nil) @@ -3558,15 +3558,15 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', (progn (forward-word 1) ; skip modifiers s///s (if tail (cperl-commentify tail (point) t)) - (cperl-postpone-fontification + (cperl-postpone-fontification e1 (point) 'face 'cperl-nonoverridable-face))) ;; Check whether it is m// which means "previous match" ;; and highlight differently - (setq is-REx + (setq is-REx (and (string-match "^\\([sm]?\\|qr\\)$" argument) (or (not (= (length argument) 0)) (not (eq c ?\<))))) - (if (and is-REx + (if (and is-REx (eq e (+ 2 b)) ;; split // *is* using zero-pattern (save-excursion @@ -3616,7 +3616,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', (progn (setq was-comment nil) (forward-char 1)) (if (match-beginning 2) - (progn + (progn (beginning-of-line 2) (if (> (point) e) (goto-char (1- e)))) @@ -3632,11 +3632,11 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', (setq REx-comment-end (point)) (cperl-commentify REx-comment-start REx-comment-end nil) - (cperl-postpone-fontification + (cperl-postpone-fontification REx-comment-start REx-comment-end 'face font-lock-comment-face)))))) (if (and is-REx is-x-REx) - (put-text-property (1+ b) (1- e) + (put-text-property (1+ b) (1- e) 'syntax-subtype 'x-REx))) (if i2 (progn @@ -3708,7 +3708,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', (goto-char b) (skip-chars-backward "\\\\") ;;;(setq i2 (= (% (skip-chars-backward "\\\\") 2) -1)) - (setq state (parse-partial-sexp + (setq state (parse-partial-sexp state-point b nil nil state) state-point b) (if (or (nth 3 state) (nth 4 state) ) @@ -3919,7 +3919,7 @@ Returns some position at the last line." (beginning-of-line))) ;; Looking at: ;; foreach my $var - (if (looking-at + (if (looking-at "[ \t]*\\<for\\(each\\)?[ \t]+\\(my\\|local\\|our\\)\\(\t*\\|[ \t][ \t]+\\)[^ \t\n]") (progn (forward-word 2) @@ -3928,7 +3928,7 @@ Returns some position at the last line." (beginning-of-line))) ;; Looking at: ;; foreach my $var ( - (if (looking-at + (if (looking-at "[ \t]*\\<for\\(each\\)?[ \t]+\\(my\\|local\\|our\\)[ \t]*\\$[_a-zA-Z0-9]+\\(\t*\\|[ \t][ \t]+\\)[^ \t\n#]") (progn (forward-word 3) @@ -3938,7 +3938,7 @@ Returns some position at the last line." (beginning-of-line))) ;; Looking at: ;; } foreach my $var () { - (if (looking-at + (if (looking-at "[ \t]*\\(}[ \t]*\\)?\\<\\(\\els\\(e\\|if\\)\\|continue\\|if\\|unless\\|while\\|for\\(each\\)?\\(\\([ \t]+\\(my\\|local\\|our\\)\\)?[ \t]*\\$[_a-zA-Z0-9]+\\)?\\|until\\)\\>\\([ \t]*(\\|[ \t\n]*{\\)\\|[ \t]*{") (progn (setq ml (match-beginning 8)) @@ -4332,7 +4332,7 @@ indentation and initial hashes. Behaves usually outside of comment." marker (make-marker)) (set-text-properties 0 (length name) nil name) (set-marker marker (match-end 3)) - (if (eq fchar ?p) + (if (eq fchar ?p) (setq name (concat "package " name)) (cond ((string-match "[:']" name) (setq meth t)) @@ -4340,7 +4340,7 @@ indentation and initial hashes. Behaves usually outside of comment." (t (setq name (concat package name) meth t)))) (setq index (cons name marker)) - (if (eq fchar ?p) + (if (eq fchar ?p) (push index index-pack-alist) (push index index-alist)) (if meth (push index index-meth-alist)) @@ -4429,7 +4429,7 @@ indentation and initial hashes. Behaves usually outside of comment." (t 3))) ; should not happen -(defvar cperl-compilation-error-regexp-alist +(defvar cperl-compilation-error-regexp-alist ;; This look like a paranoiac regexp: could anybody find a better one? (which WORK). '(("^[^\n]* \\(file\\|at\\) \\([^ \t\n]+\\) [^\n]*line \\([0-9]+\\)[\\., \n]" 2 3)) @@ -4658,7 +4658,7 @@ indentation and initial hashes. Behaves usually outside of comment." 3 font-lock-variable-name-face))) '("\\<for\\(each\\)?\\([ \t]+\\(my\\|local\\|our\\)\\)?[ \t]*\\(\\$[a-zA-Z_][a-zA-Z_0-9]*\\)[ \t]*(" 4 font-lock-variable-name-face))) - (setq + (setq t-font-lock-keywords-1 (and (fboundp 'turn-on-font-lock) ; Check for newer font-lock (not cperl-xemacs-p) ; not yet as of XEmacs 19.12 @@ -4689,7 +4689,7 @@ indentation and initial hashes. Behaves usually outside of comment." (append t-font-lock-keywords-1 (list '("[$*]{?\\(\\sw+\\)" 1 font-lock-variable-name-face))))) - (setq cperl-font-lock-keywords-1 + (setq cperl-font-lock-keywords-1 (if cperl-syntaxify-by-font-lock (cons 'cperl-fontify-update t-font-lock-keywords) @@ -5504,7 +5504,7 @@ See `cperl-lazy-help-time' too." (format "File %s unreadable. Continue? " ifile)) (setq cperl-unreadable-ok t) (error "Aborting: unreadable file %s" ifile))))) - (if (not file) + (if (not file) (message "Unreadable file %s" ifile) (message "Scanning file %s ..." file) (if (and cperl-use-syntax-table-text-property-for-tags @@ -5614,16 +5614,16 @@ Use as (erase (erase-buffer) (setq erase 'ignore))) - (let ((files + (let ((files (condition-case err - (directory-files file t + (directory-files file t (if recurse nil cperl-scan-files-regexp) t) (error (if cperl-unreadable-ok nil (if (y-or-n-p (format "Directory %s unreadable. Continue? " file)) - (setq cperl-unreadable-ok t + (setq cperl-unreadable-ok t tm nil) ; Return empty list (error "Aborting: unreadable directory %s" file))))))) (mapcar (function (lambda (file) @@ -6681,7 +6681,7 @@ prototype \&SUB Returns prototype of the function given a reference. (set-marker m1 (point)) (if (= level 1) (if (progn ; indent rigidly if multiline - ;; In fact does not make a lot of sense, since + ;; In fact does not make a lot of sense, since ;; the starting position can be already lost due ;; to insertion of "\n" and " " (goto-char tmp) @@ -6831,7 +6831,7 @@ We suppose that the regexp is scanned already." (set-marker e (1- (point))) (goto-char b) (while (re-search-forward "\\(#\\)\\|\n" e 'to-end) - (cond + (cond ((match-beginning 1) ; #-comment (or c (setq c (current-indentation))) (beginning-of-line 2) ; Skip @@ -6858,7 +6858,7 @@ We suppose that the regexp is scanned already." (set-marker e (1- (point))) (goto-char (1+ b)) (while (re-search-forward "\\(\\\\\\\\\\)\\|(" e t) - (cond + (cond ((match-beginning 1) ; Skip nil) (t ; Group @@ -7091,7 +7091,7 @@ We suppose that the regexp is scanned already." (defun cperl-fontify-syntaxically (end) ;; Some vars for debugging only ;; (message "Syntaxifying...") - (let (start (dbg (point)) (iend end) + (let (start (dbg (point)) (iend end) (istate (car cperl-syntax-state))) (and cperl-syntaxify-unwind (setq end (cperl-unwind-to-safe t end))) diff --git a/lisp/progmodes/cpp.el b/lisp/progmodes/cpp.el index 6e4c8d1f457..310c789bb13 100644 --- a/lisp/progmodes/cpp.el +++ b/lisp/progmodes/cpp.el @@ -32,7 +32,7 @@ ;;; Todo: ;; Should parse "#if" and "#elif" expressions and merge the faces -;; somehow. +;; somehow. ;; Somehow it is sometimes possible to make changes near a read only ;; area which you can't undo. Their are other strange effects in that @@ -67,7 +67,7 @@ :type 'face :group 'cpp) -(defcustom cpp-face-type 'light +(defcustom cpp-face-type 'light "*Indicate what background face type you prefer. Can be either light or dark for color screens, mono for monochrome screens, and none if you don't use a window system and don't have @@ -368,7 +368,7 @@ A prefix arg suppresses display of that buffer." (cond ((eq cpp-unknown-face 'invisible) (cpp-make-overlay-hidden overlay)) ((eq cpp-unknown-face 'default)) - (t + (t (overlay-put overlay 'face cpp-unknown-face))) (if cpp-unknown-writable () @@ -461,7 +461,7 @@ A prefix arg suppresses display of that buffer." (defun cpp-edit-mode () "Major mode for editing the criteria for highlighting cpp conditionals. -Click on objects to change them. +Click on objects to change them. You can also use the keyboard accelerators indicated like this: [K]ey." (kill-all-local-variables) (buffer-disable-undo) @@ -535,7 +535,7 @@ You can also use the keyboard accelerators indicated like this: [K]ey." (eq write 'both)) (setq cpp-edit-list (delq entry cpp-edit-list) entry nil)) - + (if (> (length symbol) 39) (insert (substring symbol 0 39) ": ") (insert (format "%39s: " symbol))) @@ -649,7 +649,7 @@ With optional argument ARG, make them writable iff ARG is positive." (interactive (let ((symbol (cpp-choose-symbol))) (list symbol - (cpp-choose-face "False face" + (cpp-choose-face "False face" (nth 2 (assoc symbol cpp-edit-list)))))) (setcar (nthcdr 2 (cpp-edit-list-entry-get-or-create symbol)) face) (cpp-edit-reset)) diff --git a/lisp/progmodes/dcl-mode.el b/lisp/progmodes/dcl-mode.el index 6f39a4840ff..b975b089360 100644 --- a/lisp/progmodes/dcl-mode.el +++ b/lisp/progmodes/dcl-mode.el @@ -31,10 +31,10 @@ ;; ;; Type `C-h m' when you are editing a .COM file to get more ;; information about this mode. -;; +;; ;; To use templates you will need a version of tempo.el that is at ;; least later than the buggy 1.1.1, which was included with my versions of -;; Emacs. I used version 1.2.4. +;; Emacs. I used version 1.2.4. ;; The latest tempo.el distribution can be fetched from ;; ftp.lysator.liu.se in the directory /pub/emacs. ;; I recommend setting (setq tempo-interactive t). This will make @@ -47,8 +47,8 @@ ;; ;; Any feedback will be welcomed. If you write functions for ;; dcl-calc-command-indent-function or dcl-calc-cont-indent-function, -;; please send them to the maintainer. -;; +;; please send them to the maintainer. +;; ;; ;; Ideas for improvement: ;; * Change meaning of `left margin' when dcl-tab-always-indent is nil. @@ -98,7 +98,7 @@ dcl-calc-cont-indent-function is set to a function." (defcustom dcl-margin-offset 8 "*Indentation for the first command line in DCL. -The first command line in a file or after a SUBROUTINE statement is indented +The first command line in a file or after a SUBROUTINE statement is indented this much. Other command lines are indented the same number of columns as the preceding command line. A command line is a line that starts with `$'." @@ -137,11 +137,11 @@ Set to nil to only indent at THEN-ELSE-ENDIF." (defcustom dcl-calc-command-indent-function nil "*Function to calculate indentation for a command line in DCL. -If this variable is non-nil it is called as a function: +If this variable is non-nil it is called as a function: \(func INDENT-TYPE CUR-INDENT EXTRA-INDENT LAST-POINT THIS-POINT) -The function must return the number of columns to indent the current line or +The function must return the number of columns to indent the current line or nil to get the default indentation. INDENT-TYPE is a symbol indicating what kind of indentation should be done. @@ -150,14 +150,14 @@ It can have the following values: outdent the lines indentation should be decreased, e.g a line with ENDIF. first-line indentation for the first line in a buffer or SUBROUTINE. CUR-INDENT is the indentation of the preceding command line. -EXTRA-INDENT is the default change in indentation for this line +EXTRA-INDENT is the default change in indentation for this line \(a negative number for 'outdent). LAST-POINT is the buffer position of the first significant word on the previous line or nil if the current line is the first line. THIS-POINT is the buffer position of the first significant word on the current line. -If this variable is nil, the indentation is calculated as +If this variable is nil, the indentation is calculated as CUR-INDENT + EXTRA-INDENT. This package includes two functions suitable for this: @@ -169,14 +169,14 @@ This package includes two functions suitable for this: (defcustom dcl-calc-cont-indent-function 'dcl-calc-cont-indent-relative "*Function to calculate indentation for a continuation line. -If this variable is non-nil it is called as a function: +If this variable is non-nil it is called as a function: \(func CUR-INDENT EXTRA-INDENT) -The function must return the number of columns to indent the current line or +The function must return the number of columns to indent the current line or nil to get the default indentation. -If this variable is nil, the indentation is calculated as +If this variable is nil, the indentation is calculated as CUR-INDENT + EXTRA-INDENT. This package includes one function suitable for this: @@ -189,7 +189,7 @@ This package includes one function suitable for this: "*Controls the operation of the TAB key in DCL mode. If t, pressing TAB always indents the current line. If nil, pressing TAB indents the current line if point is at the left margin. -Data lines (i.e. lines not part of a command line or continuation line) are +Data lines (i.e. lines not part of a command line or continuation line) are never indented." :type 'boolean :group 'dcl) @@ -246,7 +246,7 @@ never indented." "*Default imenu generic expression for DCL. The default includes SUBROUTINE labels in the main listing and -sub-listings for other labels, CALL, GOTO and GOSUB statements. +sub-listings for other labels, CALL, GOTO and GOSUB statements. See `imenu-generic-expression' for details." :type '(repeat (sexp :tag "Imenu Expression")) :group 'dcl) @@ -270,7 +270,7 @@ See `imenu-generic-expression' for details." (modify-syntax-entry ?\n ">" dcl-mode-syntax-table) ; comment end (modify-syntax-entry ?< "(>" dcl-mode-syntax-table) ; < and ... (modify-syntax-entry ?> ")<" dcl-mode-syntax-table) ; > is a matching pair -) +) (defvar dcl-mode-map () @@ -357,7 +357,7 @@ A label is a name followed by a colon followed by white-space or end-of-line." :group 'dcl) -(defcustom dcl-cmd-r +(defcustom dcl-cmd-r "^\\$\\(.*-[ \t]*\\(!.*\\)*\n\\)*[^!\"\n]*\\(\".*\\(\"\".*\\)*\"\\)*[^!\"\n]*" "Regular expression describing a DCL command line up to a trailing comment. A line starting with $, optionally followed by continuation lines, @@ -368,7 +368,7 @@ optionally followed by a comment, followed by a newline." :group 'dcl) -(defcustom dcl-command-regexp +(defcustom dcl-command-regexp "^\\$\\(.*-[ \t]*\\(!.*\\)*\n\\)*.*\\(\".*\\(\"\".*\\)*\"\\)*" "Regular expression describing a DCL command line. A line starting with $, optionally followed by continuation lines, @@ -392,7 +392,7 @@ dcl-electric-character and the you have just typed the `f' in :group 'dcl) -(defvar dcl-option-alist +(defvar dcl-option-alist '((dcl-basic-offset dcl-option-value-basic) (dcl-continuation-offset curval) (dcl-margin-offset dcl-option-value-margin-offset) @@ -400,12 +400,12 @@ dcl-electric-character and the you have just typed the `f' in (dcl-comment-line-regexp dcl-option-value-comment-line) (dcl-block-begin-regexp curval) (dcl-block-end-regexp curval) - (dcl-tab-always-indent toggle) - (dcl-electric-characters toggle) + (dcl-tab-always-indent toggle) + (dcl-electric-characters toggle) (dcl-electric-reindent-regexps curval) - (dcl-tempo-comma curval) - (dcl-tempo-left-paren curval) - (dcl-tempo-right-paren curval) + (dcl-tempo-comma curval) + (dcl-tempo-left-paren curval) + (dcl-tempo-right-paren curval) (dcl-calc-command-indent-function curval) (dcl-calc-cont-indent-function curval) (comment-start curval) @@ -421,7 +421,7 @@ curval the current value toggle the opposite of the current value (for t/nil)") -(defvar dcl-option-history +(defvar dcl-option-history (mapcar (lambda (option-assoc) (format "%s" (car option-assoc))) dcl-option-alist) @@ -443,7 +443,7 @@ Preloaded with all known option names from dcl-option-alist") ; "*Default imenu generic expression for DCL. ;The default includes SUBROUTINE labels in the main listing and -;sub-listings for other labels, CALL, GOTO and GOSUB statements. +;sub-listings for other labels, CALL, GOTO and GOSUB statements. ;See `imenu-generic-expression' in a recent (e.g. Emacs 19.30) imenu.el ;for details.") @@ -460,7 +460,7 @@ THEN-ELSE-ENDIF and between lines matching dcl-block-begin-regexp and dcl-block-end-regexp.) Labels are indented to a fixed position unless they begin or end a block. -Whole-line comments (matching dcl-comment-line-regexp) are not indented. +Whole-line comments (matching dcl-comment-line-regexp) are not indented. Data lines are not indented. Key bindings: @@ -488,7 +488,7 @@ Variables controlling indentation style and extra features: Indentation for a label. dcl-comment-line-regexp - Lines matching this regexp will not be indented. + Lines matching this regexp will not be indented. dcl-block-begin-regexp dcl-block-end-regexp @@ -511,10 +511,10 @@ Variables controlling indentation style and extra features: dcl-tab-always-indent If t, pressing TAB always indents the current line. - If nil, pressing TAB indents the current line if point is at the left + If nil, pressing TAB indents the current line if point is at the left margin. - dcl-electric-characters + dcl-electric-characters Non-nil causes lines to be indented at once when a label, ELSE or ENDIF is typed. @@ -530,7 +530,7 @@ Variables controlling indentation style and extra features: dcl-imenu-generic-expression Default value for imenu-generic-expression. The default includes SUBROUTINE labels in the main listing and sub-listings for - other labels, CALL, GOTO and GOSUB statements. + other labels, CALL, GOTO and GOSUB statements. dcl-imenu-label-labels dcl-imenu-label-goto @@ -539,30 +539,30 @@ Variables controlling indentation style and extra features: Change the text that is used as sub-listing labels in imenu. Loading this package calls the value of the variable -`dcl-mode-load-hook' with no args, if that value is non-nil. -Turning on DCL mode calls the value of the variable `dcl-mode-hook' +`dcl-mode-load-hook' with no args, if that value is non-nil. +Turning on DCL mode calls the value of the variable `dcl-mode-hook' with no args, if that value is non-nil. The following example uses the default values for all variables: -$! This is a comment line that is not indented (it matches +$! This is a comment line that is not indented (it matches $! dcl-comment-line-regexp) $! Next follows the first command line. It is indented dcl-margin-offset. $ i = 1 $ ! Other comments are indented like command lines. $ ! A margin label indented dcl-margin-label-offset: -$ label: +$ label: $ if i.eq.1 $ then -$ ! Lines between THEN-ELSE and ELSE-ENDIF are +$ ! Lines between THEN-ELSE and ELSE-ENDIF are $ ! indented dcl-basic-offset $ loop1: ! This matches dcl-block-begin-regexp... $ ! ...so this line is indented dcl-basic-offset -$ text = \"This \" + - ! is a continued line +$ text = \"This \" + - ! is a continued line \"lined up with the command line\" $ type sys$input -Data lines are not indented at all. +Data lines are not indented at all. $ endloop1: ! This matches dcl-block-end-regexp $ endif $ @@ -582,7 +582,7 @@ $ (make-local-variable 'comment-multi-line) (setq comment-multi-line nil) - + ;; This used to be "^\\$[ \t]*![ \t]*" which looks more correct. ;; The drawback was that you couldn't make empty comment lines by pressing ;; C-M-j repeatedly - only the first line became a comment line. @@ -608,7 +608,7 @@ $ (make-local-variable 'dcl-calc-command-indent-function) (make-local-variable 'dcl-calc-cont-indent-function) (make-local-variable 'dcl-electric-reindent-regexps) - + (setq major-mode 'dcl-mode) (setq mode-name "DCL") (use-local-map dcl-mode-map) @@ -668,7 +668,7 @@ $ "Move backward to a command. Move point to the preceding command line that is not a comment line, a command line with only a comment, only contains a `$' or only -contains a label. +contains a label. Returns point of the found command line or nil if not able to move." (interactive) @@ -712,7 +712,7 @@ Returns point of the found command line or nil if not able to move." "Move forward to a command. Move point to the end of the next command line that is not a comment line, a command line with only a comment, only contains a `$' or only -contains a label. +contains a label. Returns point of the found command line or nil if not able to move." (interactive) @@ -762,9 +762,9 @@ Leading $ and labels counts as whitespace in this case. If this is a comment line then move to the first non-whitespace character in the comment. -Typing \\[dcl-back-to-indentation] several times in a row will move point to other +Typing \\[dcl-back-to-indentation] several times in a row will move point to other `interesting' points closer to the left margin, and then back to the -rightmost point again. +rightmost point again. E.g. on the following line, point would go to the positions indicated by the numbers in order 1-2-3-1-... : @@ -785,7 +785,7 @@ by the numbers in order 1-2-3-1-... : ;; $ ! text ;; 3 2 1 ;; - ;; $ l: command ! + ;; $ l: command ! ;; 3 2 1 ;; ;; text @@ -807,7 +807,7 @@ by the numbers in order 1-2-3-1-... : (setq last-good-point (point))) (cond - ;; Special treatment for comment lines. We are trying to allow + ;; Special treatment for comment lines. We are trying to allow ;; things like "$ !*" as comment lines. ((looking-at dcl-comment-line-regexp) (re-search-forward (concat dcl-comment-line-regexp "[ \t]*") limit t) @@ -901,7 +901,7 @@ Returns one of the following symbols: (dcl-back-to-indentation) (point))) - + ;;;--------------------------------------------------------------------------- (defun dcl-show-line-type () "Test dcl-get-line-type." @@ -979,7 +979,7 @@ $ xxx If you use this function you will probably want to add \"then\" to dcl-electric-reindent-regexps and define the key \"n\" as -dcl-electric-character. +dcl-electric-character. " (let ((case-fold-search t)) (save-excursion @@ -1003,7 +1003,7 @@ dcl-electric-character. (- (+ cur-indent extra-indent) 2)) ((looking-at "\\belse\\b") (- (+ cur-indent extra-indent) 2)))) - ;; Outdent, this word is `endif' or `else': + 2 + ;; Outdent, this word is `endif' or `else': + 2 ((equal indent-type 'outdent) (goto-char this-point) (cond @@ -1028,19 +1028,19 @@ non-nil. If the current line should be outdented, calculate its indentation, either with the default method or by calling -dcl-calc-command-indent-function if it is non-nil. +dcl-calc-command-indent-function if it is non-nil. Rules for default indentation: If it is the first line in the buffer, indent dcl-margin-offset. -Go to the previous command line with a command on it. +Go to the previous command line with a command on it. Find out how much it is indented (cur-indent). Look at the first word on the line to see if the indentation should be adjusted. Skip margin-label, continuations and comments while looking for the first word. Save this buffer position as `last-point'. -If the first word after a label is SUBROUTINE, set extra-indent to +If the first word after a label is SUBROUTINE, set extra-indent to dcl-margin-offset. First word extra-indent @@ -1050,7 +1050,7 @@ block-begin +dcl-basic-offset Then return to the current line and look at the first word to see if the indentation should be adjusted again. Save this buffer position as -`this-point'. +`this-point'. First word extra-indent ELSE -dcl-basic-offset @@ -1063,7 +1063,7 @@ cur-indent to cur-indent+extra-indent. If an extra adjustment is necessary and if dcl-calc-command-indent-function is nil or returns nil set cur-indent -to cur-indent+extra-indent. +to cur-indent+extra-indent. See also documentation for dcl-calc-command-indent-function. The indent-type classification could probably be expanded upon. @@ -1106,7 +1106,7 @@ The indent-type classification could probably be expanded upon. ;; We couldn't go further back, so this must have been the ;; first line. (setq cur-indent dcl-margin-offset - last-point (dcl-indentation-point)) + last-point (dcl-indentation-point)) (setq done t))) ;; Examine the line to get current indentation and possibly a ;; reason to indent. @@ -1202,7 +1202,7 @@ Indented lines will align with either: yyy))) " (let ((case-fold-search t) - indent) + indent) (save-excursion (dcl-beginning-of-statement) (let ((end (save-excursion (forward-line 1) (point)))) @@ -1221,7 +1221,7 @@ Indented lines will align with either: (skip-chars-forward " \t:=" end))) ;; This could be the position to indent to (setq indent (current-column)) - + ;; Move to the next word unless we have seen an ;; assignment. If it starts with `/' it's a ;; qualifier and we will indent to that position @@ -1328,7 +1328,7 @@ Find out how much it is indented." (re-search-forward dcl-label-r))) (dcl-indent-to indent 1) ) - ;; + ;; (if (> (- (point-max) pos) (point)) (goto-char (- (point-max) pos))) )) @@ -1376,7 +1376,7 @@ Adjusts indentation on the current line. Data lines are not indented." (t (message "dcl-indent-line: unknown type")) ))) - + ;;;------------------------------------------------------------------------- (defun dcl-indent-command () @@ -1406,9 +1406,9 @@ the lines indentation; otherwise insert a tab." (start-point (point))) (cond ;; Data line : always insert tab - ((or (equal type 'data) (equal type 'empty-data)) + ((or (equal type 'data) (equal type 'empty-data)) (tab-to-tab-stop)) - ;; Indent only at start of line + ;; Indent only at start of line ((not dcl-tab-always-indent) ; nil (let ((search-end-point (save-excursion @@ -1428,7 +1428,7 @@ the lines indentation; otherwise insert a tab." ;;;------------------------------------------------------------------------- (defun dcl-electric-character (arg) "Inserts a character and indents if necessary. -Insert a character if the user gave a numeric argument or the flag +Insert a character if the user gave a numeric argument or the flag `dcl-electric-characters' is not set. If an argument was given, insert that many characters. @@ -1443,7 +1443,7 @@ regexps in `dcl-electric-reindent-regexps'." (self-insert-command 1) (let ((case-fold-search t)) ;; There must be a better way than (memq t ...). - ;; (apply 'or ...) didn't work + ;; (apply 'or ...) didn't work (if (memq t (mapcar 'dcl-was-looking-at dcl-electric-reindent-regexps)) (dcl-indent-line))))) @@ -1463,7 +1463,7 @@ regexps in `dcl-electric-reindent-regexps'." (progn (dcl-delete-chars " \t") (indent-to col minimum))))) - + ;;;------------------------------------------------------------------------- (defun dcl-split-line () @@ -1511,7 +1511,7 @@ Inserts continuation marks and splits character strings." (if (not done) ; normal M-LFD action (indent-new-comment-line)))) - + ;;;------------------------------------------------------------------------- (defun dcl-delete-indentation (&optional arg) "Join this line to previous like delete-indentation. @@ -1582,7 +1582,7 @@ Returns the column offset." (defun dcl-option-value-margin-offset (option-assoc) "Guess a value for margin offset. Find the column of the first non-blank character on the line, not -counting labels. +counting labels. Returns a number as a string." (save-excursion (beginning-of-line) @@ -1610,7 +1610,7 @@ Must return a string." (let ((regexp (buffer-substring (match-beginning 0) (match-end 0)))) (concat "^" (regexp-quote regexp))) dcl-comment-line-regexp)))) - + ;;;------------------------------------------------------------------------- (defun dcl-guess-option-value (option) @@ -1701,7 +1701,7 @@ Returns the name of the option variable as a string." (and next-indent (/= (- this-indent next-indent) 0)))))) "dcl-basic-offset") - ;; No more guesses. + ;; No more guesses. (t "")))) @@ -1739,8 +1739,8 @@ All variable names are available as completions and in the history list." ;;;------------------------------------------------------------------------- (defun dcl-save-local-variable (var &optional def-prefix def-suffix) "Save a variable in a `Local Variables' list. -Set or update the value of VAR in the current buffers -`Local Variables:' list." +Set or update the value of VAR in the current buffers +`Local Variables:' list." ;; Look for "Local variables:" line in last page. (save-excursion (goto-char (point-max)) @@ -1790,7 +1790,7 @@ Set or update the value of VAR in the current buffers ;; Not found. Insert a new entry before this line (setq continue nil) (beginning-of-line) - (insert (concat prefix-string (symbol-name var) ": " + (insert (concat prefix-string (symbol-name var) ": " (prin1-to-string (eval var)) " " suffix-string "\n"))) ;; Is it the variable we are looking for? @@ -1836,7 +1836,7 @@ Set or update the value of VAR in the current buffers comment-end (concat " " comment-end)))))) (insert (concat def-prefix "Local variables:" def-suffix "\n")) - (insert (concat def-prefix (symbol-name var) ": " + (insert (concat def-prefix (symbol-name var) ": " (prin1-to-string (eval var)) def-suffix "\n")) (insert (concat def-prefix "end:" def-suffix))) ))) @@ -1909,9 +1909,9 @@ section at the end of the current buffer." (require 'tempo) (defvar dcl-tempo-tags nil "Tempo tags for DCL mode.") - + (tempo-define-template "dcl-f$context" - '("f$context" dcl-tempo-left-paren + '("f$context" dcl-tempo-left-paren (p "context-type: ") dcl-tempo-comma (p "context-symbol: ") dcl-tempo-comma (p "selection-item: ") dcl-tempo-comma @@ -1920,33 +1920,33 @@ section at the end of the current buffer." "f$context" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$csid" - '("f$csid" dcl-tempo-left-paren + '("f$csid" dcl-tempo-left-paren (p "context-symbol: ") dcl-tempo-right-paren) "f$csid" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$cvsi" - '("f$cvsi" dcl-tempo-left-paren + '("f$cvsi" dcl-tempo-left-paren (p "start-bit: ") dcl-tempo-comma (p "number-of-bits: ") dcl-tempo-comma (p "string: ") dcl-tempo-right-paren) "f$cvsi" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$cvtime" - '("f$cvtime" dcl-tempo-left-paren + '("f$cvtime" dcl-tempo-left-paren (p "[input_time]: ") dcl-tempo-comma (p "[output_time_format]: ") dcl-tempo-comma (p "[output_field]: ") dcl-tempo-right-paren) "f$cvtime" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$cvui" - '("f$cvui" dcl-tempo-left-paren + '("f$cvui" dcl-tempo-left-paren (p "start-bit: ") dcl-tempo-comma (p "number-of-bits: ") dcl-tempo-comma (p "string") dcl-tempo-right-paren) "f$cvui" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$device" - '("f$device" dcl-tempo-left-paren + '("f$device" dcl-tempo-left-paren (p "[search_devnam]: ") dcl-tempo-comma (p "[devclass]: ") dcl-tempo-comma (p "[devtype]: ") dcl-tempo-comma @@ -1959,56 +1959,56 @@ section at the end of the current buffer." "f$directory" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$edit" - '("f$edit" dcl-tempo-left-paren + '("f$edit" dcl-tempo-left-paren (p "string: ") dcl-tempo-comma (p "edit-list: ") dcl-tempo-right-paren) "f$edit" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$element" - '("f$element" dcl-tempo-left-paren + '("f$element" dcl-tempo-left-paren (p "element-number: ") dcl-tempo-comma (p "delimiter: ") dcl-tempo-comma (p "string: ") dcl-tempo-right-paren) "f$element" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$environment" - '("f$environment" dcl-tempo-left-paren + '("f$environment" dcl-tempo-left-paren (p "item: ") dcl-tempo-right-paren) "f$environment" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$extract" - '("f$extract" dcl-tempo-left-paren + '("f$extract" dcl-tempo-left-paren (p "start: ") dcl-tempo-comma (p "length: ") dcl-tempo-comma (p "string: ") dcl-tempo-right-paren) "f$extract" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$fao" - '("f$fao" dcl-tempo-left-paren + '("f$fao" dcl-tempo-left-paren (p "control-string: ") dcl-tempo-comma ("argument[,...]: ") dcl-tempo-right-paren) "f$fao" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$file_attributes" - '("f$file_attributes" dcl-tempo-left-paren + '("f$file_attributes" dcl-tempo-left-paren (p "filespec: ") dcl-tempo-comma (p "item: ") dcl-tempo-right-paren) "f$file_attributes" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$getdvi" - '("f$getdvi" dcl-tempo-left-paren + '("f$getdvi" dcl-tempo-left-paren (p "device-name: ") dcl-tempo-comma (p "item: ") dcl-tempo-right-paren) "f$getdvi" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$getjpi" - '("f$getjpi" dcl-tempo-left-paren + '("f$getjpi" dcl-tempo-left-paren (p "pid: ") dcl-tempo-comma (p "item: ") dcl-tempo-right-paren ) "f$getjpi" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$getqui" - '("f$getqui" dcl-tempo-left-paren + '("f$getqui" dcl-tempo-left-paren (p "function: ") dcl-tempo-comma (p "[item]: ") dcl-tempo-comma (p "[object-id]: ") dcl-tempo-comma @@ -2016,20 +2016,20 @@ section at the end of the current buffer." "f$getqui" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$getsyi" - '("f$getsyi" dcl-tempo-left-paren + '("f$getsyi" dcl-tempo-left-paren (p "item: ") dcl-tempo-comma (p "[node-name]: ") dcl-tempo-comma (p "[cluster-id]: ") dcl-tempo-right-paren) "f$getsyi" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$identifier" - '("f$identifier" dcl-tempo-left-paren + '("f$identifier" dcl-tempo-left-paren (p "identifier: ") dcl-tempo-comma (p "conversion-type: ") dcl-tempo-right-paren) "f$identifier" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$integer" - '("f$integer" dcl-tempo-left-paren + '("f$integer" dcl-tempo-left-paren (p "expression: ") dcl-tempo-right-paren) "f$integer" "" 'dcl-tempo-tags) @@ -2039,13 +2039,13 @@ section at the end of the current buffer." "f$length" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$locate" - '("f$locate" dcl-tempo-left-paren + '("f$locate" dcl-tempo-left-paren (p "substring: ") dcl-tempo-comma (p "string: ") dcl-tempo-right-paren) "f$locate" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$message" - '("f$message" dcl-tempo-left-paren + '("f$message" dcl-tempo-left-paren (p "status-code: ") dcl-tempo-right-paren ) "f$message" "" 'dcl-tempo-tags) @@ -2054,7 +2054,7 @@ section at the end of the current buffer." "f$mode" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$parse" - '("f$parse" dcl-tempo-left-paren + '("f$parse" dcl-tempo-left-paren (p "filespec: ") dcl-tempo-comma (p "[default-spec]: ") dcl-tempo-comma (p "[related-spec]: ") dcl-tempo-comma @@ -2063,12 +2063,12 @@ section at the end of the current buffer." "f$parse" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$pid" - '("f$pid" dcl-tempo-left-paren + '("f$pid" dcl-tempo-left-paren (p "context-symbol: ") dcl-tempo-right-paren) "f$pid" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$privilege" - '("f$privilege" dcl-tempo-left-paren + '("f$privilege" dcl-tempo-left-paren (p "priv-states: ") dcl-tempo-right-paren) "f$privilege" "" 'dcl-tempo-tags) @@ -2077,18 +2077,18 @@ section at the end of the current buffer." "f$process" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$search" - '("f$search" dcl-tempo-left-paren + '("f$search" dcl-tempo-left-paren (p "filespec: ") dcl-tempo-comma (p "[stream-id]: ") dcl-tempo-right-paren) "f$search" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$setprv" - '("f$setprv" dcl-tempo-left-paren + '("f$setprv" dcl-tempo-left-paren (p "priv-states: ") dcl-tempo-right-paren) "f$setprv" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$string" - '("f$string" dcl-tempo-left-paren + '("f$string" dcl-tempo-left-paren (p "expression: ") dcl-tempo-right-paren) "f$string" "" 'dcl-tempo-tags) @@ -2097,7 +2097,7 @@ section at the end of the current buffer." "f$time" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$trnlnm" - '("f$trnlnm" dcl-tempo-left-paren + '("f$trnlnm" dcl-tempo-left-paren (p "logical-name: ") dcl-tempo-comma (p "[table]: ") dcl-tempo-comma (p "[index]: ") dcl-tempo-comma @@ -2107,7 +2107,7 @@ section at the end of the current buffer." "f$trnlnm" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$type" - '("f$type" dcl-tempo-left-paren + '("f$type" dcl-tempo-left-paren (p "symbol-name: ") dcl-tempo-right-paren) "f$type" "" 'dcl-tempo-tags) @@ -2116,7 +2116,7 @@ section at the end of the current buffer." "f$user" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$verify" - '("f$verify" dcl-tempo-left-paren + '("f$verify" dcl-tempo-left-paren (p "[procedure-value]: ") dcl-tempo-comma (p "[image-value]: ") dcl-tempo-right-paren) "f$verify" "" 'dcl-tempo-tags) @@ -2171,7 +2171,7 @@ otherwise return nil." () (equal start (match-end 0)))))) - + ;;;------------------------------------------------------------------------- (defun dcl-imenu-create-index-function () "Jacket routine to make imenu searches non case sensitive." diff --git a/lisp/progmodes/delphi.el b/lisp/progmodes/delphi.el index ffa86d3b69b..5f1bed74770 100644 --- a/lisp/progmodes/delphi.el +++ b/lisp/progmodes/delphi.el @@ -38,7 +38,7 @@ ;; (add-hook 'delphi-mode-hook 'turn-on-font-lock) ;; If font-lock is not loaded by default, you might have to do: -;; +;; ;; (autoload 'font-lock-mode "font-lock") ;; (autoload 'turn-on-font-lock "font-lock") ;; (setq font-lock-support-mode 'lazy-lock-mode) @@ -65,7 +65,7 @@ (provide 'delphi) (defconst delphi-version - (let ((revision "$Revision: 3.7 $")) + (let ((revision "$Revision: 3.8 $")) (string-match ": \\([^ ]+\\)" revision) (match-string 1 revision)) "Version of this delphi mode.") @@ -187,7 +187,7 @@ differs from the default." (defconst delphi-directives '(absolute abstract assembler automated cdecl default dispid dynamic export external far forward index inline message name near nodefault - overload override pascal private protected public published read readonly + overload override pascal private protected public published read readonly register reintroduce resident resourcestring safecall stdcall stored virtual write writeonly) "Delphi4 directives.") @@ -198,9 +198,9 @@ differs from the default." and array as asm at begin case class const constructor contains destructor dispinterface div do downto else end except exports file finalization finally for function goto if implementation implements - in inherited initialization interface is label library mod nil not + in inherited initialization interface is label library mod nil not of object on or out package packed procedure program property - raise record repeat requires result self set shl shr then threadvar + raise record repeat requires result self set shl shr then threadvar to try type unit uses until var while with xor ;; These routines should be keywords, if Borland had the balls. @@ -248,7 +248,7 @@ are followed by an expression.") (defconst delphi-visibilities '(public private protected published automated) "Class visibilities.") -(defconst delphi-block-statements +(defconst delphi-block-statements '(begin try case repeat initialization finalization asm) "Statements that contain multiple substatements.") @@ -526,7 +526,7 @@ routine.") ;; We have an end only if there is some string content (at ;; least a starting delimiter). (not (delphi-is-literal-end (1- p))))) - + ;; Special case: strings cannot span lines. (and (delphi-is kind delphi-strings) (eq ?\n (char-after (1- p))))))) @@ -568,7 +568,7 @@ routine.") ;; We are completing an incomplete literal. (let ((kind (delphi-literal-kind (1- search-start)))) (delphi-complete-literal kind limit) - (delphi-set-text-properties + (delphi-set-text-properties search-start (point) (delphi-literal-text-properties kind)))) ((re-search-forward @@ -583,7 +583,7 @@ routine.") (start (match-beginning 0))) (delphi-set-text-properties search-start start nil) (delphi-complete-literal kind limit) - (delphi-set-text-properties + (delphi-set-text-properties start (point) (delphi-literal-text-properties kind)))) ;; Nothing found. Mark it as a non-literal. @@ -735,7 +735,7 @@ routine.") (while (< p to) ;; Color the token and move past it. (setq token (delphi-token-at p)) - (add-text-properties + (add-text-properties (delphi-token-start token) (delphi-token-end token) (list 'face (delphi-face-of (delphi-token-kind token)) 'lazy-lock t)) (setq p (delphi-token-end token)) @@ -756,7 +756,7 @@ non-delphi buffer. Set to nil in a delphi buffer. To override, just do: (delphi-progress-start) ;; Reparse at least from the token previous to the change to the end of ;; line after the change. - (delphi-parse-region-until-stable + (delphi-parse-region-until-stable (delphi-token-start (delphi-token-at (1- change-start))) (progn (goto-char change-end) (end-of-line) (point))) (delphi-progress-done))))) @@ -814,7 +814,7 @@ non-delphi buffer. Set to nil in a delphi buffer. To override, just do: (catch 'done (while token (setq kind (delphi-token-kind token)) - (cond + (cond ;; Skip over ()/[] groups. ((eq 'close-group kind) (setq token (delphi-group-start token))) @@ -836,10 +836,10 @@ non-delphi buffer. Set to nil in a delphi buffer. To override, just do: (catch 'done (while token (setq kind (delphi-token-kind token)) - (cond + (cond ((and (eq 'colon kind) (delphi-is (delphi-token-kind last-token) - `(,@delphi-block-statements + `(,@delphi-block-statements ,@delphi-expr-statements))) ;; We hit a label followed by a statement. Indent to the statement. (throw 'done nil)) @@ -916,7 +916,7 @@ non-delphi buffer. Set to nil in a delphi buffer. To override, just do: ((delphi-composite-type-start token last-token) (throw 'done (if stop-on-class last-token token))) ) - (unless (delphi-is token-kind delphi-whitespace) + (unless (delphi-is token-kind delphi-whitespace) (setq last-token token)) (setq token (delphi-previous-token token))) ;; Start not found. @@ -1037,7 +1037,7 @@ non-delphi buffer. Set to nil in a delphi buffer. To override, just do: (defun delphi-is-use-clause-end (at-token last-token last-colon from-kind) ;; True if we are after the end of a uses type clause. - (when (and last-token + (when (and last-token (not last-colon) (eq 'comma (delphi-token-kind at-token)) (eq 'semicolon from-kind)) @@ -1148,7 +1148,7 @@ non-delphi buffer. Set to nil in a delphi buffer. To override, just do: (delphi-line-indent-of token)))) ;; Assembly sections always indent in from the asm keyword. - ((eq token-kind 'asm) + ((eq token-kind 'asm) (throw 'done (delphi-stmt-line-indent-of token delphi-indent-level))) ;; An enclosing statement delimits a previous statement. @@ -1236,7 +1236,7 @@ non-delphi buffer. Set to nil in a delphi buffer. To override, just do: ;; An enclosing ":" means a label. ((and (eq 'colon token-kind) - (delphi-is (delphi-token-kind section-token) + (delphi-is (delphi-token-kind section-token) delphi-block-statements) (not last-terminator) (not expr-delimited) @@ -1270,7 +1270,7 @@ non-delphi buffer. Set to nil in a delphi buffer. To override, just do: (from-kind (delphi-token-kind from-token)) (token-kind nil) (stmt-start nil) - (last-token nil) + (last-token nil) (equals-encountered nil) (before-equals nil) (expr-delimited nil)) @@ -1329,10 +1329,10 @@ non-delphi buffer. Set to nil in a delphi buffer. To override, just do: (if stmt-start ;; We are not actually indenting to the case statement, ;; but are within a label expression. - (delphi-stmt-line-indent-of + (delphi-stmt-line-indent-of stmt-start delphi-indent-level) ;; Indent from the case keyword. - (delphi-stmt-line-indent-of + (delphi-stmt-line-indent-of token delphi-case-label-indent)))) ;; Body expression statements are enclosing. Indent from the @@ -1340,7 +1340,7 @@ non-delphi buffer. Set to nil in a delphi buffer. To override, just do: ;; it. ((delphi-is token-kind delphi-body-expr-statements) (throw 'done - (delphi-stmt-line-indent-of + (delphi-stmt-line-indent-of (or stmt-start token) delphi-indent-level))) ;; An else statement is enclosing, but it doesn't have an expression. @@ -1388,7 +1388,7 @@ non-delphi buffer. Set to nil in a delphi buffer. To override, just do: ((+ (delphi-section-indent-of token) delphi-indent-level))))) ;; Assembly sections always indent in from the asm keyword. - ((eq token-kind 'asm) + ((eq token-kind 'asm) (throw 'done (delphi-stmt-line-indent-of token delphi-indent-level))) ;; Stop at an enclosing statement and indent from it. @@ -1426,18 +1426,18 @@ non-delphi buffer. Set to nil in a delphi buffer. To override, just do: ;; + 2; ;; which doesn't look right. ;;;; Align binary ops with the before token. - ;;((delphi-is from-kind delphi-binary-ops) + ;;((delphi-is from-kind delphi-binary-ops) ;;(throw 'done (delphi-indent-of before-equals 0))) ;; Assignments (:=) we skip over to get a normal indent. ((eq (delphi-token-kind last-token) 'equals)) ;; Otherwise indent in from the equals. - ((throw 'done + ((throw 'done (delphi-indent-of before-equals delphi-indent-level))))) ;; Remember any "=" we encounter if it has not already been processed. - ((eq token-kind 'equals) + ((eq token-kind 'equals) (setq equals-encountered token before-equals last-token)) ) @@ -1473,7 +1473,7 @@ non-delphi buffer. Set to nil in a delphi buffer. To override, just do: ((delphi-is token-kind delphi-match-block-statements) ;; Use the block's indentation. - (let ((block-start + (let ((block-start (delphi-block-start token 'stop-on-class))) (cond ;; When trailing a body statement, indent to diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index 5b22921a65a..05619ce1370 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el @@ -1741,7 +1741,7 @@ CHANGE-WORD should be one of 'upcase-word, 'downcase-word, 'capitalize-word." (concat "\\(" f90-keywords-re "\\|" f90-procedures-re "\\|" f90-hpf-keywords-re "\\|" f90-operators-re "\\)")) - (ref-point (point-min)) + (ref-point (point-min)) (modified (buffer-modified-p)) state saveword back-point) (goto-char beg) diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el index 0c88bc46fa1..0213d2411c8 100644 --- a/lisp/progmodes/hideif.el +++ b/lisp/progmodes/hideif.el @@ -36,7 +36,7 @@ ;; M-x hide-ifdefs or C-c @ h ;; ;; Hide-ifdef suppresses the display of code that the preprocessor wouldn't -;; pass through. The support of constant expressions in #if lines is +;; pass through. The support of constant expressions in #if lines is ;; limited to identifiers, parens, and the operators: &&, ||, !, and ;; "defined". Please extend this. ;; @@ -45,7 +45,7 @@ ;; still in the buffer, and you can move the point into it and modify ;; text unawares. ;; You can make your buffer read-only while hide-ifdef-hiding by setting -;; hide-ifdef-read-only to a non-nil value. You can toggle this +;; hide-ifdef-read-only to a non-nil value. You can toggle this ;; variable with hide-ifdef-toggle-read-only (C-c @ C-q). ;; ;; You can undo the effect of hide-ifdefs by typing @@ -58,7 +58,7 @@ ;; If you define or undefine a symbol while hide-ifdef-mode is in effect, ;; the display will be updated. Only the define list for the current ;; buffer will be affected. You can save changes to the local define -;; list with hide-ifdef-set-define-alist. This adds entries +;; list with hide-ifdef-set-define-alist. This adds entries ;; to hide-ifdef-define-alist. ;; ;; If you have defined a hide-ifdef-mode-hook, you can set @@ -179,7 +179,7 @@ how the hiding is done: is used. `hide-ifdef-define-alist' - An association list of defined symbol lists. + An association list of defined symbol lists. Use `hide-ifdef-set-define-alist' to save the current `hide-ifdef-env' and `hide-ifdef-use-define-alist' to set the current `hide-ifdef-env' from one of the lists in `hide-ifdef-define-alist'. @@ -220,7 +220,7 @@ how the hiding is done: (remove-from-invisibility-spec '(hide-ifdef . t)) (if hide-ifdef-hiding (show-ifdefs)))) - + (defun hif-show-all () "Show all of the text in the current buffer." @@ -420,7 +420,7 @@ that form should be displayed.") (hif-nexttoken) (setq result (list math-op result (hif-factor)))) result)) - + (defun hif-factor () "Parse a factor: '!' factor | '(' expr ')' | 'defined(' id ')' | id." (cond @@ -720,7 +720,7 @@ Point is left unchanged." (setq end (point))) ; (save-excursion (end-of-line) (point)) (hif-make-range start end else)))) - + ;;; A bit slimy. (defun hif-hide-line (point) @@ -730,13 +730,13 @@ Point is left unchanged." (goto-char point) (hide-ifdef-region-internal (line-beginning-position) (progn (hif-end-of-line) (point)))))) - + ;;; Hif-Possibly-Hide ;;; There are four cases. The #ifX expression is "taken" if it ;;; the hide-ifdef-evaluator returns T. Presumably, this means the code ;;; inside the #ifdef would be included when the program was -;;; compiled. +;;; compiled. ;;; ;;; Case 1: #ifX taken, and there's an #else. ;;; The #else part must be hidden. The #if (then) part must be @@ -771,7 +771,7 @@ It uses the judgement of `hide-ifdef-evaluator'." (let ((test (hif-canonicalize)) (range (hif-find-range))) ;; (message "test = %s" test) (sit-for 1) - + (hif-hide-line (hif-range-end range)) (if (not (hif-not (funcall hide-ifdef-evaluator test))) (cond ((hif-range-else range) ; case 1 @@ -851,7 +851,7 @@ It does not do the work that's pointless to redo on a recursive entry." hif-outside-read-only)) (force-mode-line-update)) - + (defun hide-ifdef-define (var) "Define a VAR so that #ifdef VAR would be included." (interactive "SDefine what? ") @@ -866,8 +866,8 @@ It does not do the work that's pointless to redo on a recursive entry." (defun hide-ifdefs (&optional nomsg) - "Hide the contents of some #ifdefs. -Assume that defined symbols have been added to `hide-ifdef-env'. + "Hide the contents of some #ifdefs. +Assume that defined symbols have been added to `hide-ifdef-env'. The text hidden is the text that would not be included by the C preprocessor if it were given the file with those symbols defined. diff --git a/lisp/progmodes/icon.el b/lisp/progmodes/icon.el index f90d8d4f573..df5084814fc 100644 --- a/lisp/progmodes/icon.el +++ b/lisp/progmodes/icon.el @@ -46,7 +46,7 @@ (define-key icon-mode-map "\e\C-e" 'end-of-icon-defun) (define-key icon-mode-map "\e\C-q" 'indent-icon-exp) (define-key icon-mode-map "\177" 'backward-delete-char-untabify) - + (define-key icon-mode-map [menu-bar] (make-sparse-keymap "Icon")) (define-key icon-mode-map [menu-bar icon] (cons "Icon" map)) @@ -188,7 +188,7 @@ with no args, if that value is non-nil." (setq comment-indent-function 'icon-comment-indent) (set (make-local-variable 'indent-line-function) 'icon-indent-line) ;; font-lock support - (setq font-lock-defaults + (setq font-lock-defaults '((icon-font-lock-keywords icon-font-lock-keywords-1 icon-font-lock-keywords-2) nil nil ((?_ . "w")) beginning-of-defun @@ -202,7 +202,7 @@ with no args, if that value is non-nil." ;; we start from the assertion that `hs-special-modes-alist' is autoloaded. (unless (assq 'icon-mode hs-special-modes-alist) (setq hs-special-modes-alist - (cons '(icon-mode "\\<procedure\\>" "\\<end\\>" nil + (cons '(icon-mode "\\<procedure\\>" "\\<end\\>" nil icon-forward-sexp-function) hs-special-modes-alist))) (run-hooks 'icon-mode-hook)) @@ -613,7 +613,7 @@ Returns nil if line starts inside a string, t if in a comment." "Subdued level highlighting for Icon mode.") (defconst icon-font-lock-keywords-2 - (append + (append icon-font-lock-keywords-1 (eval-when-compile (list @@ -624,31 +624,31 @@ Returns nil if line starts inside a string, t if in a comment." 'font-lock-type-face) ;; Fontify all keywords. ;; - (cons - (regexp-opt - '("break" "do" "next" "repeat" "to" "by" "else" "if" "not" "return" - "until" "case" "of" "while" "create" "every" "suspend" "default" + (cons + (regexp-opt + '("break" "do" "next" "repeat" "to" "by" "else" "if" "not" "return" + "until" "case" "of" "while" "create" "every" "suspend" "default" "fail" "record" "then") 'words) 'font-lock-keyword-face) - ;; "end" "initial" + ;; "end" "initial" (cons (regexp-opt '("end" "initial") 'words) 'font-lock-builtin-face) ;; Fontify all system variables. - (cons - (regexp-opt - '("&allocated" "&ascii" "&clock" "&col" "&collections" "&column" + (cons + (regexp-opt + '("&allocated" "&ascii" "&clock" "&col" "&collections" "&column" "&control" "&cset" "¤t" "&date" "&dateline" "&digits" "&dump" - "&e" "&error" "&errornumber" "&errortext" "&errorvalue" "&errout" - "&eventcode" "&eventsource" "&eventvalue" "&fail" "&features" - "&file" "&host" "&input" "&interval" "&lcase" "&ldrag" "&letters" - "&level" "&line" "&lpress" "&lrelease" "&main" "&mdrag" "&meta" - "&mpress" "&mrelease" "&null" "&output" "&phi" "&pi" "&pos" - "&progname" "&random" "&rdrag" "®ions" "&resize" "&row" - "&rpress" "&rrelease" "&shift" "&source" "&storage" "&subject" + "&e" "&error" "&errornumber" "&errortext" "&errorvalue" "&errout" + "&eventcode" "&eventsource" "&eventvalue" "&fail" "&features" + "&file" "&host" "&input" "&interval" "&lcase" "&ldrag" "&letters" + "&level" "&line" "&lpress" "&lrelease" "&main" "&mdrag" "&meta" + "&mpress" "&mrelease" "&null" "&output" "&phi" "&pi" "&pos" + "&progname" "&random" "&rdrag" "®ions" "&resize" "&row" + "&rpress" "&rrelease" "&shift" "&source" "&storage" "&subject" "&time" "&trace" "&ucase" "&version" "&window" "&x" "&y") t) 'font-lock-constant-face) (cons ;; global local static declarations and link files - (concat + (concat "^[ \t]*" (regexp-opt '("global" "link" "local" "static") t) "\\(\\sw+\\>\\)*") @@ -660,13 +660,13 @@ Returns nil if line starts inside a string, t if in a comment." font-lock-variable-name-face))))) (cons ;; $define $elif $ifdef $ifndef $undef - (concat "^" + (concat "^" (regexp-opt'("$define" "$elif" "$ifdef" "$ifndef" "$undef") t) "\\>[ \t]*\\([^ \t\n]+\\)?") - '((1 font-lock-builtin-face) + '((1 font-lock-builtin-face) (4 font-lock-variable-name-face nil t))) - (cons ;; $dump $endif $else $include - (concat + (cons ;; $dump $endif $else $include + (concat "^" (regexp-opt'("$dump" "$endif" "$else" "$include") t) "\\>" ) 'font-lock-builtin-face) (cons ;; $warning $error diff --git a/lisp/progmodes/idlw-rinfo.el b/lisp/progmodes/idlw-rinfo.el index b44e0d0210e..8499574ffbd 100644 --- a/lisp/progmodes/idlw-rinfo.el +++ b/lisp/progmodes/idlw-rinfo.el @@ -49,7 +49,7 @@ ;; New versions of IDLWAVE, documentation, and more information ;; available from: ;; http://idlwave.org -;; +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Code: diff --git a/lisp/progmodes/idlw-toolbar.el b/lisp/progmodes/idlw-toolbar.el index 651d1bafd2a..74f16b6b70c 100644 --- a/lisp/progmodes/idlw-toolbar.el +++ b/lisp/progmodes/idlw-toolbar.el @@ -4,7 +4,7 @@ ;; Author: Carsten Dominik <dominik@astro.uva.nl> ;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu> ;; Version: 4.15 -;; Date: $Date: 2002/06/14 19:06:16 $ +;; Date: $Date: 2002/09/12 16:56:54 $ ;; Keywords: processes ;; This file is part of GNU Emacs. @@ -399,7 +399,7 @@ static char * file[] = { \" \", \" \", \" \"};") - "The Cont icon.") + "The Cont icon.") (defvar idlwave-toolbar-to-here-icon (idlwave-toolbar-make-button diff --git a/lisp/progmodes/m4-mode.el b/lisp/progmodes/m4-mode.el index c85a85e6ad5..56a28b437b7 100644 --- a/lisp/progmodes/m4-mode.el +++ b/lisp/progmodes/m4-mode.el @@ -34,7 +34,7 @@ ;; * want to make m4-m4-(buffer|region) look sorta like M-x compile look&feel ? ;; * sexp motion commands don't seem to work right -;;; Thanks: +;;; Thanks: ;;; to Akim Demaille and Terry Jones for the bug reports ;;; to Simon Marshall for the regexp tip ;;; to Martin Buchholz for some general fixes @@ -154,21 +154,21 @@ ;(char-to-string (char-syntax ?`)) ;;;how I generate the nasty looking regexps at the top -;;;(make-regexp '("builtin" "changecom" "changequote" "changeword" "debugfile" -;;; "debugmode" "decr" "define" "defn" "divert" "divnum" "dnl" +;;;(make-regexp '("builtin" "changecom" "changequote" "changeword" "debugfile" +;;; "debugmode" "decr" "define" "defn" "divert" "divnum" "dnl" ;;; "dumpdef" "errprint" "esyscmd" "eval" "file" "format" "gnu" -;;; "ifdef" "ifelse" "include" "incr" "index" "indir" "len" "line" -;;; "m4exit" "m4wrap" "maketemp" "patsubst" "popdef" "pushdef" "regexp" -;;; "shift" "sinclude" "substr" "syscmd" "sysval" "traceoff" "traceon" +;;; "ifdef" "ifelse" "include" "incr" "index" "indir" "len" "line" +;;; "m4exit" "m4wrap" "maketemp" "patsubst" "popdef" "pushdef" "regexp" +;;; "shift" "sinclude" "substr" "syscmd" "sysval" "traceoff" "traceon" ;;; "translit" "undefine" "undivert" "unix")) -;;;(make-regexp '("m4_builtin" "m4_changecom" "m4_changequote" "m4_changeword" -;;; "m4_debugfile" "m4_debugmode" "m4_decr" "m4_define" "m4_defn" -;;; "m4_divert" "m4_divnum" "m4_dnl" "m4_dumpdef" "m4_errprint" -;;; "m4_esyscmd" "m4_eval" "m4_file" "m4_format" "m4_ifdef" "m4_ifelse" -;;; "m4_include" "m4_incr" "m4_index" "m4_indir" "m4_len" "m4_line" -;;; "m4_m4exit" "m4_m4wrap" "m4_maketemp" "m4_patsubst" "m4_popdef" -;;; "m4_pushdef" "m4_regexp" "m4_shift" "m4_sinclude" "m4_substr" -;;; "m4_syscmd" "m4_sysval" "m4_traceoff" "m4_traceon" "m4_translit" +;;;(make-regexp '("m4_builtin" "m4_changecom" "m4_changequote" "m4_changeword" +;;; "m4_debugfile" "m4_debugmode" "m4_decr" "m4_define" "m4_defn" +;;; "m4_divert" "m4_divnum" "m4_dnl" "m4_dumpdef" "m4_errprint" +;;; "m4_esyscmd" "m4_eval" "m4_file" "m4_format" "m4_ifdef" "m4_ifelse" +;;; "m4_include" "m4_incr" "m4_index" "m4_indir" "m4_len" "m4_line" +;;; "m4_m4exit" "m4_m4wrap" "m4_maketemp" "m4_patsubst" "m4_popdef" +;;; "m4_pushdef" "m4_regexp" "m4_shift" "m4_sinclude" "m4_substr" +;;; "m4_syscmd" "m4_sysval" "m4_traceoff" "m4_traceon" "m4_translit" ;;; "m4_m4_undefine" "m4_undivert")) ;;; m4-mode.el ends here diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el index 62cbdbb291d..4d825f83239 100644 --- a/lisp/progmodes/make-mode.el +++ b/lisp/progmodes/make-mode.el @@ -210,7 +210,7 @@ to MODIFY A FILE WITHOUT YOUR CONFIRMATION when \"it seems necessary\"." ;; ;; Special targets for DMake, Sun's make ... -;; +;; (defcustom makefile-special-targets-list '(("DEFAULT") ("DONE") ("ERROR") ("EXPORT") ("FAILED") ("GROUPEPILOG") ("GROUPPROLOG") ("IGNORE") diff --git a/lisp/progmodes/meta-mode.el b/lisp/progmodes/meta-mode.el index ec53cd1957b..fc34a2aac7e 100644 --- a/lisp/progmodes/meta-mode.el +++ b/lisp/progmodes/meta-mode.el @@ -41,15 +41,15 @@ ;; package or as a separate Emacs Lisp package. ;; Installation: -;; +;; ;; An interface to running Metafont or MetaPost as a shell process ;; from within Emacs is currently under development as a separate ;; Emacs Lisp package (meta-buf.el). In order to have that package ;; loaded automatically when first entering Metafont or MetaPost mode, ;; you might use the load-hook provided in this package by adding ;; these lines to your startup file: -;; -;; (add-hook 'meta-mode-load-hook +;; +;; (add-hook 'meta-mode-load-hook ;; '(lambda () (require 'meta-buf))) ;; ;; The add-on package loaded this way may in turn make use of the @@ -72,7 +72,7 @@ ;; global-font-lock-mode or font-lock-support-mode, you can also ;; activate fontification in Metafont and/or MetaPost mode by adding ;; the following lines to your startup file: -;; +;; ;; (add-hook 'meta-common-mode-hook 'turn-on-font-lock) ;; (add-hook 'meta-common-mode-hook 'turn-on-lazy-lock) @@ -109,7 +109,7 @@ ;; Improved and debbuged indentation function. ;; v 0.4 -- 1997/02/18 UV Added functions to indent regions for M-C-q, ;; also added a preliminary mode-specific menu. -;; v 0.5 -- 1997/02/19 UV Added functions to skip to next or previous +;; v 0.5 -- 1997/02/19 UV Added functions to skip to next or previous ;; defun and to re-indent or comment-out defuns. ;; v 0.6 -- 1997/02/20 UV More debugging, testing and clean-up. ;; v 0.7 -- 1997/02/22 UV Use easymenu to define mode-specific menu. @@ -247,7 +247,7 @@ '((1 font-lock-keyword-face) (2 font-lock-constant-face))) ;; embedded Metafont/MetaPost code in comments - (cons "|\\([^|]+\\)|" + (cons "|\\([^|]+\\)|" '(1 font-lock-constant-face t)) )) "Default expressions to highlight in Metafont or MetaPost mode.") @@ -286,10 +286,10 @@ ;; grep '^primitive' texk-7.0/web2c/{mf,mp}.web |\ ;; sed 's/primitive(\("[a-zA-Z]*"\).*/\1/' > {mf,mp}_prim.list ;; -;; grep '\(let\|def\|vardef\|primarydef\|secondarydef\|tertiarydef\)' +;; grep '\(let\|def\|vardef\|primarydef\|secondarydef\|tertiarydef\)' ;; texmf/meta{font,post}/plain.{mf,mp} > {mf,mp}_plain.list -(defconst meta-common-primitives-list +(defconst meta-common-primitives-list '("ASCII" "addto" "also" "and" "angle" "atleast" "batchmode" "begingroup" "boolean" "boundarychar" "char" "charcode" "chardp" "charexists" "charext" "charht" "charic" "charlist" "charwd" @@ -317,10 +317,10 @@ "transform" "transformed" "true" "turningnumber" "uniformdeviate" "unknown" "until" "vardef" "warningcheck" "withpen" "xpart" "xscaled" "xxpart" "xypart" "year" "ypart" "yscaled" "yxpart" - "yypart" "zscaled") + "yypart" "zscaled") "List of primitives common to Metafont and MetaPost.") -(defconst metafont-primitives-list +(defconst metafont-primitives-list '("at" "autorounding" "chardx" "chardy" "cull" "display" "dropping" "fillin" "from" "granularity" "hppp" "inwindow" "keeping" "numspecial" "openwindow" "proofing" "smoothing" @@ -328,7 +328,7 @@ "withweight" "xoffset" "yoffset") "List of primitives only defined in Metafont.") -(defconst metapost-primitives-list +(defconst metapost-primitives-list '("arclength" "arctime" "bluepart" "bounded" "btex" "clip" "clipped" "color" "dashed" "dashpart" "etex" "filled" "fontpart" "fontsize" "greenpart" "infont" "linecap" "linejoin" "llcorner" @@ -338,7 +338,7 @@ "verbatimtex" "withcolor" "within" "write") "List of primitives only defined in MetaPost.") -(defconst meta-common-plain-macros-list +(defconst meta-common-plain-macros-list '( "abs" "bot" "bye" "byte" "ceiling" "clear_pen_memory" "clearit" "clearpen" "clearxy" "counterclockwise" "cutdraw" "decr" "dir" "direction" "directionpoint" "div" "dotprod" "downto" "draw" @@ -353,7 +353,7 @@ "unitvector" "upto" "whatever") "List of macros common to plain Metafont and MetaPost.") -(defconst metafont-plain-macros-list +(defconst metafont-plain-macros-list '("beginchar" "change_width" "culldraw" "cullit" "cutoff" "define_blacker_pixels" "define_corrected_pixels" "define_good_x_pixels" "define_good_y_pixels" @@ -370,24 +370,24 @@ "mode_proof" "mode_setup" "mode_smoke" "nodisplays" "notransforms" "openit" "penrazor" "pensquare" "proofoffset" "proofrule" "proofrulethickness" "screenchars" "screenrule" "screenstrokes" - "showit" "slantfont" "smode" "titlefont" "vround") + "showit" "slantfont" "smode" "titlefont" "vround") "List of macros only defined in plain Metafont.") -(defconst metapost-plain-macros-list +(defconst metapost-plain-macros-list '("arrowhead" "bbox" "beginfig" "buildcycle" "center" "cutafter" "cutbefore" "dashpattern" "dotlabel" "dotlabels" "drawarrow" "drawdblarrow" "drawoptions" "endfig" "image" "label" "off" "on" - "thelabel") + "thelabel") "List of macros only defined in plain MetaPost.") -(defconst metapost-graph-macros-list - '("augment" "auto.x" "auto.y" "autogrid" "begingraph" "endgraph" - "format" "frame" "gdata" "gdotlabel" "gdraw" "gdrawarrow" - "gdrawdblarrow" "gfill" "glabel" "grid" "itick" "otick" "plot" +(defconst metapost-graph-macros-list + '("augment" "auto.x" "auto.y" "autogrid" "begingraph" "endgraph" + "format" "frame" "gdata" "gdotlabel" "gdraw" "gdrawarrow" + "gdrawdblarrow" "gfill" "glabel" "grid" "itick" "otick" "plot" "setcoords" "setrange") "List of macros only defined in MetaPost \"graph\" package.") - -(defconst metapost-boxes-macros-list + +(defconst metapost-boxes-macros-list '("boxit" "boxjoin" "bpath" "circleit" "drawboxed" "drawboxes" "drawunboxed" "fixpos" "fixsize" "pic" "rboxit") "List of macros only defined in MetaPost \"boxes\" package.") @@ -413,7 +413,7 @@ (defvar meta-symbol-list nil "List of known symbols to complete in Metafont or MetaPost mode.") -(defvar meta-symbol-changed nil +(defvar meta-symbol-changed nil "Flag indicating whether `meta-symbol-list' has been initialized.") (defvar meta-complete-list nil @@ -517,7 +517,7 @@ If the list was changed, sort the list and remove duplicates first." ;; utility function used in `meta-complete-symbol' (let ((pos (point))) (save-excursion - (and (re-search-backward + (and (re-search-backward regexp (if limit (max (point-min) (- (point) limit))) t) (eq (match-end 0) pos))))) @@ -585,7 +585,7 @@ If the list was changed, sort the list and remove duplicates first." (looking-at meta-left-comment-regexp)) (current-column) (skip-chars-backward "\t ") - (max (if (bolp) 0 (1+ (current-column))) + (max (if (bolp) 0 (1+ (current-column))) comment-column))) (defun meta-indent-line () @@ -605,7 +605,7 @@ If the list was changed, sort the list and remove duplicates first." "Return the indentation of current line of Metafont or MetaPost source." (save-excursion (back-to-indentation) - (cond + (cond ;; Comments to the left margin. ((and meta-left-comment-regexp (looking-at meta-left-comment-regexp)) @@ -615,15 +615,15 @@ If the list was changed, sort the list and remove duplicates first." (looking-at meta-right-comment-regexp)) comment-column) ;; Comments best left alone. - ((and meta-ignore-comment-regexp + ((and meta-ignore-comment-regexp (looking-at meta-ignore-comment-regexp)) (current-indentation)) ;; Backindent at end of environments. - ((looking-at + ((looking-at (concat "\\<" meta-end-environment-regexp "\\>")) (- (meta-indent-calculate-last) meta-indent-level)) ;; Backindent at keywords within environments. - ((looking-at + ((looking-at (concat "\\<" meta-within-environment-regexp "\\>")) (- (meta-indent-calculate-last) meta-indent-level)) (t (meta-indent-calculate-last))))) @@ -645,11 +645,11 @@ If the list was changed, sort the list and remove duplicates first." (meta-indent-level-count) (cond ;; Compensate for backindent at end of environments. - ((looking-at + ((looking-at (concat "\\<"meta-end-environment-regexp "\\>")) meta-indent-level) ;; Compensate for backindent within environments. - ((looking-at + ((looking-at (concat "\\<" meta-within-environment-regexp "\\>")) meta-indent-level) (t 0))))) @@ -660,7 +660,7 @@ If the list was changed, sort the list and remove duplicates first." (save-excursion (save-restriction (let ((count 0)) - (narrow-to-region + (narrow-to-region (point) (save-excursion (re-search-forward "[^\\\\\"]%\\|\n\\|\\'" nil t) (backward-char) (point))) @@ -669,12 +669,12 @@ If the list was changed, sort the list and remove duplicates first." (goto-char (match-beginning 0)) (cond ;; Count number of begin-end keywords within line. - ((looking-at + ((looking-at (concat "\\<" meta-begin-environment-regexp "\\>")) (setq count (+ count meta-indent-level))) - ((looking-at + ((looking-at (concat "\\<" meta-end-environment-regexp "\\>")) - (setq count (- count meta-indent-level))) + (setq count (- count meta-indent-level))) ;; Count number of open-close parentheses within line. ((looking-at "(") (setq count (+ count meta-indent-level))) @@ -704,9 +704,9 @@ and initial semicolons." ;; A line with nothing but a comment on it? ((looking-at (concat "[ \t]*" comment-start-skip)) (setq has-comment t) - (setq comment-fill-prefix + (setq comment-fill-prefix (buffer-substring (match-beginning 0) (match-end 0)))) - ;; A line with some code, followed by a comment? + ;; A line with some code, followed by a comment? ((condition-case nil (save-restriction (narrow-to-region (point-min) @@ -718,7 +718,7 @@ and initial semicolons." ((eq (char-after (point)) ?\") (forward-sexp 1)))) (looking-at comment-start-skip)) (error nil)) - (setq has-comment t + (setq has-comment t has-code-and-comment t) (setq comment-fill-prefix (concat (make-string (/ (current-column) 8) ?\t) @@ -736,7 +736,7 @@ and initial semicolons." (save-excursion (while (and (zerop (forward-line -1)) (looking-at (concat "^[ \t]*" comment-start)))) - (or (looking-at (concat ".*" comment-start)) + (or (looking-at (concat ".*" comment-start)) (forward-line 1)) (point)) ;; Find the beginning of the first line past the region to fill. @@ -744,9 +744,9 @@ and initial semicolons." (while (progn (forward-line 1) (looking-at (concat "^[ \t]*" comment-start)))) (point))) - (let* ((paragraph-start + (let* ((paragraph-start (concat paragraph-start "\\|[ \t%]*$")) - (paragraph-separate + (paragraph-separate (concat paragraph-start "\\|[ \t%]*$")) (paragraph-ignore-fill-prefix nil) (fill-prefix comment-fill-prefix) @@ -789,21 +789,21 @@ and initial semicolons." (defun meta-beginning-of-defun (&optional arg) "Move backward to beginnning of a defun in Metafont or MetaPost code. -With numeric argument, do it that many times. +With numeric argument, do it that many times. Negative arg -N means move forward to Nth following beginning of defun. Returns t unless search stops due to beginning or end of buffer." (interactive "p") (if (or (null arg) (= 0 arg)) (setq arg 1)) (and arg (< arg 0) (not (eobp)) (forward-char 1)) - (and (re-search-backward + (and (re-search-backward (concat "\\<" meta-begin-defun-regexp "\\>") nil t arg) (progn (goto-char (match-beginning 0)) (skip-chars-backward "%") (skip-chars-backward " \t") t))) - + (defun meta-end-of-defun (&optional arg) "Move forward to end of a defun in Metafont or MetaPost code. -With numeric argument, do it that many times. +With numeric argument, do it that many times. Negative argument -N means move back to Nth preceding end of defun. Returns t unless search stops due to beginning or end of buffer." (interactive "p") @@ -926,7 +926,7 @@ The environment marked is the one that contains point or follows point." () (setq meta-mode-map (make-sparse-keymap)) (define-key meta-mode-map "\t" 'meta-indent-line) - (define-key meta-mode-map "\C-m" 'reindent-then-newline-and-indent) + (define-key meta-mode-map "\C-m" 'reindent-then-newline-and-indent) ;; Comment Paragraphs: ; (define-key meta-mode-map "\M-a" 'backward-sentence) ; (define-key meta-mode-map "\M-e" 'forward-sentence) @@ -950,11 +950,11 @@ The environment marked is the one that contains point or follows point." (define-key meta-mode-map "\M-\t" 'meta-complete-symbol) ;; Shell Commands: ; (define-key meta-mode-map "\C-c\C-c" 'meta-command-file) -; (define-key meta-mode-map "\C-c\C-k" 'meta-kill-job) +; (define-key meta-mode-map "\C-c\C-k" 'meta-kill-job) ; (define-key meta-mode-map "\C-c\C-l" 'meta-recenter-output) ) -(easy-menu-define +(easy-menu-define meta-mode-menu meta-mode-map "Menu used in Metafont or MetaPost mode." (list "Meta" @@ -963,15 +963,15 @@ The environment marked is the one that contains point or follows point." "--" ["Indent Line" meta-indent-line t] ["Indent Environment" meta-indent-defun t] - ["Indent Region" meta-indent-region + ["Indent Region" meta-indent-region :active (meta-mark-active)] ["Indent Buffer" meta-indent-buffer t] "--" ["Comment Out Environment" meta-comment-defun t] ["Uncomment Environment" meta-uncomment-defun t] - ["Comment Out Region" meta-comment-region + ["Comment Out Region" meta-comment-region :active (meta-mark-active)] - ["Uncomment Region" meta-uncomment-region + ["Uncomment Region" meta-uncomment-region :active (meta-mark-active)] "--" ["Complete Symbol" meta-complete-symbol t] @@ -1019,9 +1019,9 @@ The environment marked is the one that contains point or follows point." (make-local-variable 'paragraph-start) (make-local-variable 'paragraph-separate) - (setq paragraph-start + (setq paragraph-start (concat page-delimiter "\\|$")) - (setq paragraph-separate + (setq paragraph-separate (concat page-delimiter "\\|$")) (make-local-variable 'paragraph-ignore-fill-prefix) diff --git a/lisp/progmodes/modula2.el b/lisp/progmodes/modula2.el index 15b716feaec..81e5653275f 100644 --- a/lisp/progmodes/modula2.el +++ b/lisp/progmodes/modula2.el @@ -1,6 +1,6 @@ ;;; modula2.el --- Modula-2 editing support package -;; Author: Michael Schmidt <michael@pbinfo.UUCP> +;; Author: Michael Schmidt <michael@pbinfo.UUCP> ;; Tom Perrine <Perrin@LOGICON.ARPA> ;; Maintainer: FSF ;; Keywords: languages @@ -104,11 +104,11 @@ (define-key map "\C-c\C-c" 'm2-compile) (setq m2-mode-map map))) -(defcustom m2-indent 5 +(defcustom m2-indent 5 "*This variable gives the indentation in Modula-2-Mode." :type 'integer :group 'modula2) - + ;;;###autoload (defun modula-2-mode () "This is a mode intended to support program development in Modula-2. @@ -429,7 +429,7 @@ followed by the first character of the construct. (defun m2-stdio () (interactive) (insert " -FROM TextIO IMPORT +FROM TextIO IMPORT WriteCHAR, ReadCHAR, WriteINTEGER, ReadINTEGER, WriteCARDINAL, ReadCARDINAL, WriteBOOLEAN, ReadBOOLEAN, WriteREAL, ReadREAL, WriteBITSET, ReadBITSET, diff --git a/lisp/progmodes/octave-hlp.el b/lisp/progmodes/octave-hlp.el index 4250797a799..9291392b41d 100644 --- a/lisp/progmodes/octave-hlp.el +++ b/lisp/progmodes/octave-hlp.el @@ -80,7 +80,7 @@ If KEY is not a string, prompt for it with completion." The files specified by `octave-help-files' are searched." (if octave-help-lookup-alist () - (message "Building help lookup alist...") + (message "Building help lookup alist...") (let ((files octave-help-files) file key node) (save-window-excursion (while files @@ -127,7 +127,7 @@ The files specified by `octave-help-files' are searched." (add-to-list 'octave-help-completion-alist (cons (car entry) (car entry))) (setq alist (cdr alist)))) - (message "Building help completion alist...done")) + (message "Building help completion alist...done")) octave-help-completion-alist) ;;; provide ourself diff --git a/lisp/progmodes/octave-inf.el b/lisp/progmodes/octave-inf.el index 1274c3eff31..bedc1a86aa8 100644 --- a/lisp/progmodes/octave-inf.el +++ b/lisp/progmodes/octave-inf.el @@ -116,7 +116,7 @@ the regular expression `comint-prompt-regexp', a buffer local variable." "Non-nil means that `inferior-octave-complete' is impossible.") (defvar inferior-octave-dynamic-complete-functions - '(inferior-octave-complete comint-dynamic-complete-filename) + '(inferior-octave-complete comint-dynamic-complete-filename) "List of functions called to perform completion for inferior Octave. This variable is used to initialize `comint-dynamic-complete-functions' in the Inferior Octave buffer.") @@ -138,12 +138,12 @@ Entry to this mode successively runs the hooks `comint-mode-hook' and (use-local-map inferior-octave-mode-map) (set-syntax-table inferior-octave-mode-syntax-table) - (make-local-variable 'comment-start) + (make-local-variable 'comment-start) (setq comment-start octave-comment-start) (make-local-variable 'comment-end) (setq comment-end "") (make-local-variable 'comment-column) - (setq comment-column 32) + (setq comment-column 32) (make-local-variable 'comment-start-skip) (setq comment-start-skip octave-comment-start-skip) @@ -227,7 +227,7 @@ startup file, `~/.emacs-octave'." (setq commands (list "page_screen_output = 0;\n" (if (not (string-equal - inferior-octave-output-string ">> ")) + inferior-octave-output-string ">> ")) "PS1=\"\\\\s> \";\n") (if (file-exists-p file) (format "source (\"%s\");\n" file)))) diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el index 47d16fb3944..23a0cda0355 100644 --- a/lisp/progmodes/octave-mod.el +++ b/lisp/progmodes/octave-mod.el @@ -51,7 +51,7 @@ (defvar inferior-octave-receive-in-progress nil) (defconst octave-maintainer-address - "Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at>, bug-gnu-emacs@gnu.org" + "Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at>, bug-gnu-emacs@gnu.org" "Current maintainer of the Emacs Octave package.") (defvar octave-abbrev-table nil @@ -207,19 +207,19 @@ parenthetical grouping.") (define-key map "\n" 'octave-reindent-then-newline-and-indent) (define-key map "\t" 'indent-according-to-mode) (define-key map "\e;" 'octave-indent-for-comment) - (define-key map "\e\n" 'octave-indent-new-comment-line) + (define-key map "\e\n" 'octave-indent-new-comment-line) (define-key map "\e\t" 'octave-complete-symbol) (define-key map "\M-\C-a" 'octave-beginning-of-defun) (define-key map "\M-\C-e" 'octave-end-of-defun) (define-key map "\M-\C-h" 'octave-mark-defun) - (define-key map "\M-\C-q" 'octave-indent-defun) + (define-key map "\M-\C-q" 'octave-indent-defun) (define-key map "\C-c;" 'octave-comment-region) - (define-key map "\C-c:" 'octave-uncomment-region) + (define-key map "\C-c:" 'octave-uncomment-region) (define-key map "\C-c\C-b" 'octave-submit-bug-report) (define-key map "\C-c\C-p" 'octave-previous-code-line) (define-key map "\C-c\C-n" 'octave-next-code-line) (define-key map "\C-c\C-a" 'octave-beginning-of-line) - (define-key map "\C-c\C-e" 'octave-end-of-line) + (define-key map "\C-c\C-e" 'octave-end-of-line) (define-key map "\C-c\M-\C-n" 'octave-forward-block) (define-key map "\C-c\M-\C-p" 'octave-backward-block) (define-key map "\C-c\M-\C-u" 'octave-backward-up-block) @@ -231,14 +231,14 @@ parenthetical grouping.") (define-key map "\C-c\C-il" 'octave-send-line) (define-key map "\C-c\C-ib" 'octave-send-block) (define-key map "\C-c\C-if" 'octave-send-defun) - (define-key map "\C-c\C-ir" 'octave-send-region) + (define-key map "\C-c\C-ir" 'octave-send-region) (define-key map "\C-c\C-is" 'octave-show-process-buffer) (define-key map "\C-c\C-ih" 'octave-hide-process-buffer) (define-key map "\C-c\C-ik" 'octave-kill-process) (define-key map "\C-c\C-i\C-l" 'octave-send-line) (define-key map "\C-c\C-i\C-b" 'octave-send-block) (define-key map "\C-c\C-i\C-f" 'octave-send-defun) - (define-key map "\C-c\C-i\C-r" 'octave-send-region) + (define-key map "\C-c\C-i\C-r" 'octave-send-region) (define-key map "\C-c\C-i\C-s" 'octave-show-process-buffer) (define-key map "\C-c\C-i\C-h" 'octave-hide-process-buffer) (define-key map "\C-c\C-i\C-k" 'octave-kill-process) @@ -383,7 +383,7 @@ end keywords as associated values.") "Alist of Octave symbols for completion in Octave mode. Each element looks like (VAR . VAR), where the car and cdr are the same symbol (an Octave command or variable name). -Currently, only builtin variables can be completed.") +Currently, only builtin variables can be completed.") (defvar octave-mode-imenu-generic-expression (list @@ -516,16 +516,16 @@ including a reproducible test case and send the message." (setq mode-name "Octave") (setq local-abbrev-table octave-abbrev-table) (set-syntax-table octave-mode-syntax-table) - + (make-local-variable 'indent-line-function) (setq indent-line-function 'octave-indent-line) - (make-local-variable 'comment-start) + (make-local-variable 'comment-start) (setq comment-start octave-comment-start) (make-local-variable 'comment-end) (setq comment-end "") (make-local-variable 'comment-column) - (setq comment-column 32) + (setq comment-column 32) (make-local-variable 'comment-start-skip) (setq comment-start-skip "\\s<+\\s-*") (make-local-variable 'comment-indent-function) @@ -566,7 +566,7 @@ including a reproducible test case and send the message." (describe-function major-mode)) (defun octave-point (position) - "Returns the value of point at certain positions." + "Returns the value of point at certain positions." (save-excursion (cond ((eq position 'bol) (beginning-of-line)) @@ -644,7 +644,7 @@ See `comment-region'." (interactive "r\nP") (let ((comment-start (char-to-string octave-comment-char))) (comment-region beg end arg))) - + (defun octave-uncomment-region (beg end &optional arg) "Uncomment each line in the region as Octave code." (interactive "r\nP") @@ -741,7 +741,7 @@ level." "Maybe insert and indent an Octave comment. If there is no comment already on this line, create a code-level comment \(started by two comment characters) if the line is empty, or an in-line -comment (started by one comment character) otherwise. +comment (started by one comment character) otherwise. Point is left after the start of the comment which is properly aligned." (interactive) (indent-for-comment) @@ -767,8 +767,8 @@ fixed goal column." (defun octave-indent-new-comment-line () "Break Octave line at point, continuing comment if within one. If within code, insert `octave-continuation-string' before breaking the -line. If within a string, signal an error. -The new line is properly indented." +line. If within a string, signal an error. +The new line is properly indented." (interactive) (delete-horizontal-space) (cond @@ -808,7 +808,7 @@ On success, return 0. Otherwise, go as far as possible and return -1." (setq n (forward-line inc))) (setq arg (- arg inc))) n)) - + (defun octave-previous-code-line (&optional arg) "Move ARG lines of Octave code backward (forward if ARG is negative). Skips past all empty and comment lines. Default for ARG is 1. @@ -863,7 +863,7 @@ does not end in `...' or `\\' or is inside an open parenthesis list." (looking-at octave-continuation-regexp))) (zerop (forward-line 1))))) (end-of-line))) - + (defun octave-scan-blocks (from count depth) "Scan from character number FROM by COUNT Octave begin-end blocks. Returns the character number of the position thus found. @@ -1068,7 +1068,7 @@ An end of a function occurs right after the end keyword matching the (interactive "p") (or arg (setq arg 1)) (and (< arg 0) (skip-syntax-backward "w")) - (and (> arg 0) (skip-syntax-forward "w")) + (and (> arg 0) (skip-syntax-forward "w")) (if (octave-in-defun-p) (setq arg (- arg 1))) (if (= arg 0) (setq arg -1)) @@ -1091,7 +1091,7 @@ The function marked is the one containing point or following point." (exchange-point-and-mark)) (goto-char pos) (message "No function to mark found")))) - + ;;; Filling (defun octave-auto-fill () @@ -1101,7 +1101,7 @@ otherwise." (let (fc give-up) (if (or (null (setq fc (current-fill-column))) (save-excursion - (beginning-of-line) + (beginning-of-line) (and auto-fill-inhibit-regexp (looking-at auto-fill-inhibit-regexp)))) nil ; Can't do anything @@ -1158,7 +1158,7 @@ otherwise." (defun octave-fill-paragraph (&optional arg) "Fill paragraph of Octave code, handling Octave comments." (interactive "P") - (save-excursion + (save-excursion (let ((end (progn (forward-paragraph) (point))) (beg (progn (forward-paragraph -1) @@ -1263,7 +1263,7 @@ variables." (let ((list (all-completions string octave-completion-alist)) (conf (current-window-configuration))) ;; Taken from comint.el - (message "Making completion list...") + (message "Making completion list...") (with-output-to-temp-buffer "*Completions*" (display-completion-list list)) (message "Hit space to flush") @@ -1284,7 +1284,7 @@ variables." (set-window-configuration conf) (setq unread-command-events (listify-key-sequence key)))))))))) - + ;;; Electric characters && friends (defun octave-reindent-then-newline-and-indent () @@ -1383,21 +1383,21 @@ entered without parens)." (indent-according-to-mode) (newline 2) (insert prefix "usage: " string) - (reindent-then-newline-and-indent) + (reindent-then-newline-and-indent) (insert prefix) - (reindent-then-newline-and-indent) + (reindent-then-newline-and-indent) (insert prefix) (indent-according-to-mode) (save-excursion (newline 2) (insert "endfunction") (indent-according-to-mode)))) - + ;;; Menu (defun octave-add-octave-menu () "Adds the `Octave' menu to the menu bar in Octave mode." - (require 'easymenu) + (require 'easymenu) (easy-menu-define octave-mode-menu-map octave-mode-map "Menu keymap for Octave mode." octave-mode-menu) (easy-menu-add octave-mode-menu-map octave-mode-map)) @@ -1431,7 +1431,7 @@ entered without parens)." (defun octave-send-region (beg end) "Send current region to the inferior Octave process." (interactive "r") - (inferior-octave t) + (inferior-octave t) (let ((proc inferior-octave-process) (string (buffer-substring-no-properties beg end)) line) @@ -1459,7 +1459,7 @@ entered without parens)." (display-buffer inferior-octave-buffer))) (defun octave-send-block () - "Send current Octave block to the inferior Octave process." + "Send current Octave block to the inferior Octave process." (interactive) (save-excursion (octave-mark-block) @@ -1498,7 +1498,7 @@ code line." (print-escape-newlines nil) (opoint (point))) (terpri) - (prin1 + (prin1 (save-excursion (forward-sexp -1) (inferior-octave-send-list-and-digest diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el index dd718217ec6..debe52ed6f3 100644 --- a/lisp/progmodes/pascal.el +++ b/lisp/progmodes/pascal.el @@ -43,7 +43,7 @@ ;; pascal-auto-endcomments t ;; pascal-auto-lineup '(all) ;; pascal-toggle-completions nil -;; pascal-type-keywords '("array" "file" "packed" "char" +;; pascal-type-keywords '("array" "file" "packed" "char" ;; "integer" "real" "string" "record") ;; pascal-start-keywords '("begin" "end" "function" "procedure" ;; "repeat" "until" "while" "read" "readln" @@ -104,9 +104,9 @@ "Imenu expression for Pascal-mode. See `imenu-generic-expression'.") (defvar pascal-keywords - '("and" "array" "begin" "case" "const" "div" "do" "downto" "else" "end" - "file" "for" "function" "goto" "if" "in" "label" "mod" "nil" "not" "of" - "or" "packed" "procedure" "program" "record" "repeat" "set" "then" "to" + '("and" "array" "begin" "case" "const" "div" "do" "downto" "else" "end" + "file" "for" "function" "goto" "if" "in" "label" "mod" "nil" "not" "of" + "or" "packed" "procedure" "program" "record" "repeat" "set" "then" "to" "type" "until" "var" "while" "with" ;; The following are not standard in pascal, but widely used. "get" "put" "input" "output" "read" "readln" "reset" "rewrite" "write" @@ -138,7 +138,7 @@ () (setq pascal-mode-syntax-table (make-syntax-table)) (modify-syntax-entry ?\\ "." pascal-mode-syntax-table) - (modify-syntax-entry ?( "()1" pascal-mode-syntax-table) + (modify-syntax-entry ?( "()1" pascal-mode-syntax-table) (modify-syntax-entry ?) ")(4" pascal-mode-syntax-table) (modify-syntax-entry ?* ". 23b" pascal-mode-syntax-table) (modify-syntax-entry ?{ "<" pascal-mode-syntax-table) @@ -283,8 +283,8 @@ are handled in another way, and should not be added to this list." (defun pascal-declaration-end () (let ((nest 1)) (while (and (> nest 0) - (re-search-forward - "[:=]\\|\\(\\<record\\>\\)\\|\\(\\<end\\>\\)" + (re-search-forward + "[:=]\\|\\(\\<record\\>\\)\\|\\(\\<end\\>\\)" (save-excursion (end-of-line 2) (point)) t)) (cond ((match-beginning 1) (setq nest (1+ nest))) ((match-beginning 2) (setq nest (1- nest))) @@ -300,7 +300,7 @@ are handled in another way, and should not be added to this list." ((match-beginning 3) (setq nest (1+ nest))))) (= nest 0))) - + (defsubst pascal-within-string () (save-excursion (nth 3 (parse-partial-sexp (pascal-get-beg-of-line) (point))))) @@ -420,7 +420,7 @@ no args, if that value is non-nil." (search-forward "*)" (pascal-get-end-of-line) t)))) (setq setstar t)))) ;; If last line was a star comment line then this one shall be too. - (if (null setstar) + (if (null setstar) (pascal-indent-line) (insert "* ")))) @@ -602,7 +602,7 @@ area. See also `pascal-comment-area'." (if (not (looking-at (concat "\\s \\|\\s)\\|" pascal-defun-re))) (forward-sexp 1)) (let ((nest 0) (max -1) (func 0) - (reg (concat pascal-beg-block-re "\\|" + (reg (concat pascal-beg-block-re "\\|" pascal-end-block-re "\\|" pascal-defun-re))) (while (re-search-backward reg nil 'move) @@ -634,7 +634,7 @@ area. See also `pascal-comment-area'." (pascal-beg-of-defun)) (forward-char 1) (let ((nest 0) (func 1) - (reg (concat pascal-beg-block-re "\\|" + (reg (concat pascal-beg-block-re "\\|" pascal-end-block-re "\\|" pascal-defun-re))) (while (and (/= func 0) @@ -686,7 +686,7 @@ area. See also `pascal-comment-area'." (catch 'found (while t (re-search-forward regexp nil 'move) - (setq nest (if (match-end 1) + (setq nest (if (match-end 1) (1+ nest) (1- nest))) (cond ((eobp) @@ -939,7 +939,7 @@ Return a list of two elements: (INDENT-TYPE INDENT-LEVEL)." ))))) ;; Return type of block and indent level. - (if (> par 0) ; Unclosed Parenthesis + (if (> par 0) ; Unclosed Parenthesis (list 'contexp par) (list type (pascal-indent-level)))))) @@ -974,7 +974,7 @@ Do not count labels, case-statements or records." (ind 0)) ;; Get right indent (while (< (point) end) - (if (re-search-forward + (if (re-search-forward "^[ \t]*[^ \t,:]+[ \t]*\\(,[ \t]*[^ \t,:]+[ \t]*\\)*:" (marker-position end) 'move) (forward-char -1)) @@ -1010,7 +1010,7 @@ indent of the current line in parameterlist." (let* ((oldpos (point)) (stpos (progn (goto-char (scan-lists (point) -1 1)) (point))) (stcol (1+ (current-column))) - (edpos (progn (pascal-declaration-end) + (edpos (progn (pascal-declaration-end) (search-backward ")" (pascal-get-beg-of-line) t) (point))) (usevar (re-search-backward "\\<var\\>" stpos t))) @@ -1032,7 +1032,7 @@ indent of the current line in parameterlist." (let ((pos (point-marker))) (if (and (not (or arg start)) (not (pascal-declaration-beg))) () - (let ((lineup (if (or (looking-at "\\<var\\>\\|\\<record\\>") arg start) + (let ((lineup (if (or (looking-at "\\<var\\>\\|\\<record\\>") arg start) ":" "=")) (stpos (if start start (forward-word 2) (backward-word 1) (point))) @@ -1108,7 +1108,7 @@ indent of the current line in parameterlist." (end-of-line) (skip-chars-backward " \t") (1+ (current-column)))))) - + ;;; @@ -1146,7 +1146,7 @@ indent of the current line in parameterlist." (t "\\<\\(function\\|procedure\\)\\s +")) "\\<\\(" pascal-str "[a-zA-Z0-9_.]*\\)\\>")) match) - + (if (not (looking-at "\\<\\(function\\|procedure\\)\\>")) (re-search-backward "\\<\\(function\\|procedure\\)\\>" nil t)) (forward-char 1) @@ -1171,8 +1171,8 @@ indent of the current line in parameterlist." (while (< (point) end) (if (re-search-forward "[:=]" (pascal-get-end-of-line) t) ;; Traverse current line - (while (and (re-search-backward - (concat "\\((\\|\\<\\(var\\|type\\|const\\)\\>\\)\\|" + (while (and (re-search-backward + (concat "\\((\\|\\<\\(var\\|type\\|const\\)\\>\\)\\|" pascal-symbol-re) (pascal-get-beg-of-line) t) (not (match-end 1))) @@ -1232,7 +1232,7 @@ indent of the current line in parameterlist." (defun pascal-keyword-completion (keyword-list) "Give list of all possible completions of keywords in KEYWORD-LIST." - (mapcar '(lambda (s) + (mapcar '(lambda (s) (if (string-match (concat "\\<" pascal-str) s) (if (or (null pascal-pred) (funcall pascal-pred s)) @@ -1283,7 +1283,7 @@ indent of the current line in parameterlist." (save-excursion (pascal-var-completion)) (pascal-func-completion 'function) (pascal-keyword-completion pascal-separator-keywords)))) - + ;; Now we have built a list of all matches. Give response to caller (pascal-completion-response)))) @@ -1352,7 +1352,7 @@ indent of the current line in parameterlist." (progn ;; Update entry number in list (setq pascal-last-completions allcomp - pascal-last-word-numb + pascal-last-word-numb (if (>= pascal-last-word-numb (1- (length allcomp))) 0 (1+ pascal-last-word-numb))) @@ -1374,7 +1374,7 @@ indent of the current line in parameterlist." (if (not (null (cdr allcomp))) (message "(Complete but not unique)") (message "(Sole completion)"))) - ;; Display buffer if the current completion didn't help + ;; Display buffer if the current completion didn't help ;; on completing the label. ((and (not (null (cdr allcomp))) (= (length pascal-str) (length match))) @@ -1447,7 +1447,7 @@ With optional second arg non-nil, STR is the complete name of the instruction." (setq pascal-str (pascal-build-defun-re "[a-zA-Z_]")) (setq pascal-str (pascal-build-defun-re pascal-str))) (goto-char (point-min)) - + ;; Build a list of all possible completions (while (re-search-forward pascal-str nil t) (setq match (buffer-substring (match-beginning 2) (match-end 2))) @@ -1547,7 +1547,7 @@ Pascal Outline mode provides some additional commands. (defun pascal-outline-change (b e pascal-flag) (let ((modp (buffer-modified-p))) (unwind-protect - (subst-char-in-region b e (if (= pascal-flag ?\n) + (subst-char-in-region b e (if (= pascal-flag ?\n) ?\^M ?\n) pascal-flag) (set-buffer-modified-p modp)))) diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index 5eaee97e74f..b5027ee3841 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -96,7 +96,7 @@ ;; /{/; while (<${glob_me}>) ;; but a simpler solution is to add a space between the $ and the {: ;; while (<$ {glob_me}>) -;; +;; ;; Problem 7 is even worse, but this 'fix' does work :-( ;; $DB'stop#' ;; [$DB'line#' @@ -337,7 +337,7 @@ The expansion is entirely correct because it uses the C preprocessor." (put-text-property (point) (progn (forward-comment (point-max)) (point)) 'font-lock-multiline t) - ;; + ;; (unless (save-excursion (let* ((char2 (char-after)) @@ -365,7 +365,7 @@ The expansion is entirely correct because it uses the C preprocessor." ;; ;; FIXME: `end' is accessed via dyn-scoping. ;; pos (min end (1- (point))) nil '(nil)) ;; nil))))))) - + (defcustom perl-indent-level 4 "*Indentation of Perl statements with respect to containing block." @@ -435,7 +435,7 @@ Variables controlling indentation style: regardless of where in the line point is when the TAB command is used. `perl-tab-to-comment' Non-nil means that for lines which don't need indenting, TAB will - either delete an empty comment, indent an existing comment, move + either delete an empty comment, indent an existing comment, move to end-of-line, or if at end-of-line already, create a new comment. `perl-nochange' Lines starting with this regular expression are not auto-indented. @@ -535,7 +535,7 @@ If at end-of-line, and not in a comment or a quote, correct the's indentation." (or (/= last-command-char ?:) ;; Colon is special only after a label .... (looking-at "\\s-*\\(\\w\\|\\s_\\)+$")) - (let ((pps (parse-partial-sexp + (let ((pps (parse-partial-sexp (perl-beginning-of-function) insertpos))) (not (or (nth 3 pps) (nth 4 pps) (nth 5 pps)))))) (progn ; must insert, indent, delete @@ -622,7 +622,7 @@ possible action from the following list: (defun perl-indent-line (&optional nochange parse-start) "Indent current line as Perl code. -Return the amount the indentation +Return the amount the indentation changed by, or (parse-state) if line starts in a quoted string." (let ((case-fold-search nil) (pos (- (point-max) (point))) @@ -850,7 +850,7 @@ Optional argument PARSE-START should be the position of `beginning-of-defun'." (while (< (point) (marker-position last-mark)) (setq delta (perl-indent-line nil (marker-position bof-mark))) (if (numberp delta) ; unquoted start-of-line? - (progn + (progn (if (eolp) (delete-horizontal-space)) (setq lsexp-mark (point-marker)))) diff --git a/lisp/progmodes/simula.el b/lisp/progmodes/simula.el index ab3e9547120..6737e6a9dc5 100644 --- a/lisp/progmodes/simula.el +++ b/lisp/progmodes/simula.el @@ -77,7 +77,7 @@ If value is a list, each line in a multipleline continued statement will have the car of the list extra indentation with respect to the previous line of the statement.") -(defcustom simula-continued-statement-offset +(defcustom simula-continued-statement-offset simula-continued-statement-offset-default "*Extra indentation for lines not starting a statement or substatement. If value is a list, each line in a multipleline continued statement @@ -201,7 +201,7 @@ for SIMULA mode to function correctly." "spect\\)\\)\\|l\\([et]\\|abel\\)\\|n\\(ew?\\|ot\\)\\|" "o\\(r\\|therwise\\)\\|pr\\(ior\\|otected\\)\\|qua\\|" "reactivate\\|s\\(tep\\|witch\\)\\|t\\(h\\(en\\|is\\)\\|o\\)\\|" - "until\\|virtual\\|wh\\(en\\|ile\\)" + "until\\|virtual\\|wh\\(en\\|ile\\)" "\\)\\>") ;; ;; Types. @@ -496,7 +496,7 @@ at all." (simula-indent-line)) (forward-line 1))) (and end (set-marker end nil)))))) - + (defun simula-indent-line () "Indent this line as SIMULA code. @@ -728,7 +728,7 @@ The relative indentation among the lines of the statement are preserved." (delete-horizontal-space) (indent-to amount))) (goto-char (- (point-max) origin))))) - + (defun simula-backward-up-level (count) "Move backward up COUNT block levels. @@ -797,7 +797,7 @@ If COUNT is negative, move backward down block level instead." (goto-char origin) (signal 'quit nil)))))) - + (defun simula-previous-statement (count) "Move backward COUNT statements. If COUNT is negative, move forward instead." @@ -808,7 +808,7 @@ If COUNT is negative, move forward instead." (case-fold-search t) (origin (point))) (condition-case () - ;; + ;; (progn (simula-skip-comment-backward) (if (memq (preceding-char) '(?n ?N)) @@ -1104,7 +1104,7 @@ If COUNT is negative, move backward instead." ;; (at or before comment or label) ;; temp = t means finished (setq temp - (and (not (simula-context)) + (and (not (simula-context)) (save-excursion (skip-chars-forward " \t\f") (or (looking-at "virtual") @@ -1443,7 +1443,7 @@ If not nil and not t, move to limit of search and return nil." nil (signal 'search-failed (list regexp)))))) - + (defun simula-install-standard-abbrevs () "Define Simula keywords, procedures and classes in local abbrev table." ;; procedure and class names are as of the SIMULA 87 standard. diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el index 38867b96ec8..dedf0c4b664 100644 --- a/lisp/progmodes/tcl.el +++ b/lisp/progmodes/tcl.el @@ -6,7 +6,7 @@ ;; Author: Tom Tromey <tromey@redhat.com> ;; Chris Lindblad <cjl@lcs.mit.edu> ;; Keywords: languages tcl modes -;; Version: $Revision: 1.69 $ +;; Version: $Revision: 1.70 $ ;; This file is part of GNU Emacs. @@ -318,7 +318,7 @@ have three inferior Lisps running: If you do a \\[tcl-eval-defun] command on some Lisp source code, what process do you send it to? -- If you're in a process buffer (foo, bar, or *inferior-tcl*), +- If you're in a process buffer (foo, bar, or *inferior-tcl*), you send it to that process. - If you're in some other buffer (e.g., a source file), you send it to the process attached to buffer `inferior-tcl-buffer'. @@ -494,7 +494,7 @@ Uses variables `tcl-proc-regexp' and `tcl-keyword-list'." ;; FIXME consider using "not word or symbol", not ;; "whitespace". (cons (concat "\\(\\s-\\|^\\)" - ;; FIXME Use regexp-quote? + ;; FIXME Use regexp-quote? (regexp-opt tcl-keyword-list t) "\\(\\s-\\|$\\)") 2)))) @@ -573,7 +573,7 @@ Commands: (set (make-local-variable 'imenu-generic-expression) 'tcl-imenu-generic-expression) - + ;; Settings for new dabbrev code. (set (make-local-variable 'dabbrev-case-fold-search) nil) (set (make-local-variable 'dabbrev-case-replace) nil) @@ -789,7 +789,7 @@ Returns nil if line starts inside a string, t if in a comment." (beginning-of-line) (let* ((indent-point (point)) (case-fold-search nil) - (continued-line + (continued-line (save-excursion (if (bobp) nil @@ -937,13 +937,13 @@ Returns nil if line starts inside a string, t if in a comment." contain-stack (cons nil contain-stack) last-depth (1+ last-depth))) (if (null (car contain-stack)) - (setcar contain-stack + (setcar contain-stack (or (car (cdr state)) (save-excursion (forward-sexp -1) (point))))) (forward-line 1) - (setq continued-line + (setq continued-line (save-excursion (backward-char) (= (preceding-char) ?\\))) @@ -969,14 +969,14 @@ Returns nil if line starts inside a string, t if in a comment." (setq this-indent (- this-indent 1)))) ;; Put chosen indentation into effect. (or (null this-indent) - (= (current-column) - (if continued-line + (= (current-column) + (if continued-line (+ this-indent tcl-indent-level) this-indent)) (progn (delete-region (point) (progn (beginning-of-line) (point))) - (indent-to - (if continued-line + (indent-to + (if continued-line (+ this-indent tcl-indent-level) this-indent))))))))) ) diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index 5b9091c8f3e..9827ad3696e 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -605,7 +605,7 @@ begin -- process <label> <cursor> elsif <clock>'event and <clock> = '1' then -- rising clock edge if <enable> = '1' then -- synchronous load - + end if; end if; end process <label>;" |