emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ada templates not properly initialized


From: Richard Stallman
Subject: Re: Ada templates not properly initialized
Date: Fri, 06 May 2005 14:57:29 -0400

    Hmm, the end of ada-mode.el loads ada-stmt.

I don't see anything in ada-mode.el that would load ada-stmt.
What it does is define various functions as autoloads that would
load ada-stmt if and when those functions are called later.

Thus, the statement that ada-stmt is "automatically loaded from
ada-mode.el" is not true.  Anything done in ada-stmt.el other than
define those autoloaded functions will have no effect until one of
those functions is called.

I would recommend this patch in ada-mode.el,
plus removing the corresponding code from ada-stmt.el.


*** ada-mode.el 31 Dec 2004 09:22:22 -0500      1.61
--- ada-mode.el 06 May 2005 12:50:42 -0400      
***************
*** 1364,1369 ****
--- 1364,1374 ----
          (add-hook 'local-write-file-hooks
                    (lambda () (untabify (point-min) (point-max))))))
  
+   (set (make-local-variable 'skeleton-further-elements)
+        '((< '(backward-delete-char-untabify
+             (min ada-indent (current-column))))))
+   (add-hook 'skeleton-end-hook  'ada-adjust-case-skeleton nil t)
+ 
    (run-hooks 'ada-mode-hook)
  
    ;;  To be run after the hook, in case the user modified
***************
*** 1393,1398 ****
--- 1398,1410 ----
    (if ada-auto-case
        (ada-activate-keys-for-case)))
  
+ (defun ada-adjust-case-skeleton ()
+   "Adjust the case of the text inserted by a skeleton."
+   (save-excursion
+     (let ((aa-end (point)))
+       (ada-adjust-case-region
+        (progn (goto-char (symbol-value 'beg)) (forward-word -1) (point))
+        (goto-char aa-end)))))
  
  ;;  transient-mark-mode and mark-active are not defined in XEmacs
  (defun ada-region-selected ()





reply via email to

[Prev in Thread] Current Thread [Next in Thread]