aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorKaroly Lorentey2006-12-03 12:25:18 +0000
committerKaroly Lorentey2006-12-03 12:25:18 +0000
commitd6e01aa592f7326dffeafa6e97180a1cc39fe7ea (patch)
tree5a22b785cfee1d77d6452607450a12ca82eeecd3 /lisp/progmodes
parent14bcc1e098410087a837313e2fc822319ff2e8ca (diff)
parent4975e69596a64247e8995d1ff9084b98a9a5ed0d (diff)
downloademacs-d6e01aa592f7326dffeafa6e97180a1cc39fe7ea.tar.gz
emacs-d6e01aa592f7326dffeafa6e97180a1cc39fe7ea.zip
Merged from emacs@sv.gnu.org.
Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-479 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-480 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-481 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-482 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-483 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-484 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-485 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-153 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-154 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-155 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-585
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/ada-mode.el20
-rw-r--r--lisp/progmodes/cperl-mode.el39
-rw-r--r--lisp/progmodes/gdb-ui.el1
-rw-r--r--lisp/progmodes/octave-inf.el24
-rw-r--r--lisp/progmodes/python.el10
5 files changed, 57 insertions, 37 deletions
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el
index b1ca93e2f32..d60746c5de8 100644
--- a/lisp/progmodes/ada-mode.el
+++ b/lisp/progmodes/ada-mode.el
@@ -31,9 +31,9 @@
31;;; This mode is a major mode for editing Ada83 and Ada95 source code. 31;;; This mode is a major mode for editing Ada83 and Ada95 source code.
32;;; This is a major rewrite of the file packaged with Emacs-20. The 32;;; This is a major rewrite of the file packaged with Emacs-20. The
33;;; ada-mode is composed of four lisp files, ada-mode.el, ada-xref.el, 33;;; ada-mode is composed of four lisp files, ada-mode.el, ada-xref.el,
34;;; ada-prj.el and ada-stmt.el. Only this file (ada-mode.el) is 34;;; ada-prj.el and ada-stmt.el. Only this file (ada-mode.el) is
35;;; completely independent from the GNU Ada compiler Gnat, distributed 35;;; completely independent from the GNU Ada compiler Gnat, distributed
36;;; by Ada Core Technologies. All the other files rely heavily on 36;;; by Ada Core Technologies. All the other files rely heavily on
37;;; features provided only by Gnat. 37;;; features provided only by Gnat.
38;;; 38;;;
39;;; Note: this mode will not work with Emacs 19. If you are on a VMS 39;;; Note: this mode will not work with Emacs 19. If you are on a VMS
@@ -962,7 +962,7 @@ OLD-LEN indicates what the length of the replaced text was."
962 962
963(defsubst ada-in-string-p (&optional parse-result) 963(defsubst ada-in-string-p (&optional parse-result)
964 "Return t if point is inside a string. 964 "Return t if point is inside a string.
965If parse-result is non-nil, use is instead of calling `parse-partial-sexp'." 965If PARSE-RESULT is non-nil, use it instead of calling `parse-partial-sexp'."
966 (nth 3 (or parse-result 966 (nth 3 (or parse-result
967 (parse-partial-sexp 967 (parse-partial-sexp
968 (line-beginning-position) (point))))) 968 (line-beginning-position) (point)))))
@@ -2410,8 +2410,8 @@ offset."
2410 ;; else 2410 ;; else
2411 2411
2412 ((looking-at "else\\>") 2412 ((looking-at "else\\>")
2413 (if (save-excursion (ada-goto-previous-word) 2413 (if (save-excursion (ada-goto-previous-word)
2414 (looking-at "\\<or\\>")) 2414 (looking-at "\\<or\\>"))
2415 (ada-indent-on-previous-lines nil orgpoint orgpoint) 2415 (ada-indent-on-previous-lines nil orgpoint orgpoint)
2416 (save-excursion 2416 (save-excursion
2417 (ada-goto-matching-start 1 nil t) 2417 (ada-goto-matching-start 1 nil t)
@@ -4205,9 +4205,9 @@ of the region. Otherwise, operate only on the current line."
4205(defun ada-untab-hard () 4205(defun ada-untab-hard ()
4206 "Indent current line to previous tab stop." 4206 "Indent current line to previous tab stop."
4207 (interactive) 4207 (interactive)
4208 (let ((bol (save-excursion (progn (beginning-of-line) (point)))) 4208 (let ((bol (save-excursion (progn (beginning-of-line) (point))))
4209 (eol (save-excursion (progn (end-of-line) (point))))) 4209 (eol (save-excursion (progn (end-of-line) (point)))))
4210 (indent-rigidly bol eol (- 0 ada-indent)))) 4210 (indent-rigidly bol eol (- 0 ada-indent))))
4211 4211
4212 4212
4213 4213
@@ -4217,7 +4217,7 @@ of the region. Otherwise, operate only on the current line."
4217 4217
4218;; Not needed any more for Emacs 21.2, but still needed for backward 4218;; Not needed any more for Emacs 21.2, but still needed for backward
4219;; compatibility 4219;; compatibility
4220(defun ada-remove-trailing-spaces () 4220(defun ada-remove-trailing-spaces ()
4221 "Remove trailing spaces in the whole buffer." 4221 "Remove trailing spaces in the whole buffer."
4222 (interactive) 4222 (interactive)
4223 (save-match-data 4223 (save-match-data
@@ -4904,7 +4904,7 @@ or the spec otherwise."
4904 (let ((is-spec nil) 4904 (let ((is-spec nil)
4905 (is-body nil) 4905 (is-body nil)
4906 (suffixes ada-spec-suffixes) 4906 (suffixes ada-spec-suffixes)
4907 (name (buffer-file-name))) 4907 (name (buffer-file-name)))
4908 4908
4909 ;; Guess whether we have a spec or a body, and get the basename of the 4909 ;; Guess whether we have a spec or a body, and get the basename of the
4910 ;; file. Since the extension may not start with '.', we can not use 4910 ;; file. Since the extension may not start with '.', we can not use
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index 3264e0e72f6..26bbb8f3faf 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -445,12 +445,8 @@ Font for POD headers."
445;;; Some double-evaluation happened with font-locks... Needed with 21.2... 445;;; Some double-evaluation happened with font-locks... Needed with 21.2...
446(defvar cperl-singly-quote-face cperl-xemacs-p) 446(defvar cperl-singly-quote-face cperl-xemacs-p)
447 447
448(defcustom cperl-invalid-face ; Does not customize with '' on XEmacs 448(defcustom cperl-invalid-face 'underline
449 (if cperl-singly-quote-face 449 "*Face for highlighting trailing whitespace."
450 'underline ''underline) ; On older Emacsen was evaluated by `font-lock'
451 (if cperl-singly-quote-face
452 "*This face is used for highlighting trailing whitespace."
453 "*Face for highlighting trailing whitespace.")
454 :type 'face 450 :type 'face
455 :version "21.1" 451 :version "21.1"
456 :group 'cperl-faces) 452 :group 'cperl-faces)
@@ -1835,7 +1831,7 @@ or as help on variables `cperl-tips', `cperl-problems',
1835 (if (boundp 'font-lock-multiline) ; Newer font-lock; use its facilities 1831 (if (boundp 'font-lock-multiline) ; Newer font-lock; use its facilities
1836 (progn 1832 (progn
1837 (setq cperl-font-lock-multiline t) ; Not localized... 1833 (setq cperl-font-lock-multiline t) ; Not localized...
1838 (set 'font-lock-multiline t)) ; not present with old Emacs; auto-local 1834 (set (make-local-variable 'font-lock-multiline) t))
1839 (make-local-variable 'font-lock-fontify-region-function) 1835 (make-local-variable 'font-lock-fontify-region-function)
1840 (set 'font-lock-fontify-region-function ; not present with old Emacs 1836 (set 'font-lock-fontify-region-function ; not present with old Emacs
1841 'cperl-font-lock-fontify-region-function)) 1837 'cperl-font-lock-fontify-region-function))
@@ -5708,19 +5704,22 @@ indentation and initial hashes. Behaves usually outside of comment."
5708 5704
5709(defun cperl-windowed-init () 5705(defun cperl-windowed-init ()
5710 "Initialization under windowed version." 5706 "Initialization under windowed version."
5711 (if (or (featurep 'ps-print) cperl-faces-init) 5707 (cond ((featurep 'ps-print)
5712 ;; Need to init anyway: 5708 (unless cperl-faces-init
5713 (or cperl-faces-init (cperl-init-faces)) 5709 (if (boundp 'font-lock-multiline)
5714 (add-hook 'font-lock-mode-hook 5710 (setq cperl-font-lock-multiline t))
5715 (function 5711 (cperl-init-faces)))
5716 (lambda () 5712 ((not cperl-faces-init)
5717 (if (memq major-mode '(perl-mode cperl-mode)) 5713 (add-hook 'font-lock-mode-hook
5718 (progn 5714 (function
5719 (or cperl-faces-init (cperl-init-faces))))))) 5715 (lambda ()
5720 (if (fboundp 'eval-after-load) 5716 (if (memq major-mode '(perl-mode cperl-mode))
5721 (eval-after-load 5717 (progn
5722 "ps-print" 5718 (or cperl-faces-init (cperl-init-faces)))))))
5723 '(or cperl-faces-init (cperl-init-faces)))))) 5719 (if (fboundp 'eval-after-load)
5720 (eval-after-load
5721 "ps-print"
5722 '(or cperl-faces-init (cperl-init-faces)))))))
5724 5723
5725(defvar cperl-font-lock-keywords-1 nil 5724(defvar cperl-font-lock-keywords-1 nil
5726 "Additional expressions to highlight in Perl mode. Minimal set.") 5725 "Additional expressions to highlight in Perl mode. Minimal set.")
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index 52360a73970..007033a87ba 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -2048,7 +2048,6 @@ static char *magick[] = {
2048 (or gdb-stack-position 2048 (or gdb-stack-position
2049 (setq gdb-stack-position (make-marker))) 2049 (setq gdb-stack-position (make-marker)))
2050 (set-marker gdb-stack-position (point))) 2050 (set-marker gdb-stack-position (point)))
2051 (set-marker gdb-stack-position nil)
2052 (put-text-property bl (+ bl 4) 2051 (put-text-property bl (+ bl 4)
2053 'face '(:inverse-video t)))) 2052 'face '(:inverse-video t))))
2054 (when (re-search-forward 2053 (when (re-search-forward
diff --git a/lisp/progmodes/octave-inf.el b/lisp/progmodes/octave-inf.el
index 863f972086e..0f20626c9b9 100644
--- a/lisp/progmodes/octave-inf.el
+++ b/lisp/progmodes/octave-inf.el
@@ -113,6 +113,9 @@ the regular expression `comint-prompt-regexp', a buffer local variable."
113(defvar inferior-octave-complete-impossible nil 113(defvar inferior-octave-complete-impossible nil
114 "Non-nil means that `inferior-octave-complete' is impossible.") 114 "Non-nil means that `inferior-octave-complete' is impossible.")
115 115
116(defvar inferior-octave-has-built-in-variables nil
117 "Non-nil means that Octave has built-in variables.")
118
116(defvar inferior-octave-dynamic-complete-functions 119(defvar inferior-octave-dynamic-complete-functions
117 '(inferior-octave-complete comint-dynamic-complete-filename) 120 '(inferior-octave-complete comint-dynamic-complete-filename)
118 "List of functions called to perform completion for inferior Octave. 121 "List of functions called to perform completion for inferior Octave.
@@ -218,11 +221,20 @@ startup file, `~/.emacs-octave'."
218 'identity inferior-octave-output-list "\n") 221 'identity inferior-octave-output-list "\n")
219 "\n")))) 222 "\n"))))
220 223
224 ;; Find out whether Octave has built-in variables.
225 (inferior-octave-send-list-and-digest
226 (list "exist \"LOADPATH\"\n"))
227 (setq inferior-octave-has-built-in-variables
228 (string-match "101$" (car inferior-octave-output-list)))
229
221 ;; An empty secondary prompt, as e.g. obtained by '--braindead', 230 ;; An empty secondary prompt, as e.g. obtained by '--braindead',
222 ;; means trouble. 231 ;; means trouble.
223 (inferior-octave-send-list-and-digest (list "PS2\n")) 232 (inferior-octave-send-list-and-digest (list "PS2\n"))
224 (if (string-match "^PS2 = *$" (car inferior-octave-output-list)) 233 (if (string-match "\\(PS2\\|ans\\) = *$" (car inferior-octave-output-list))
225 (inferior-octave-send-list-and-digest (list "PS2 = \"> \"\n"))) 234 (inferior-octave-send-list-and-digest
235 (list (if inferior-octave-has-built-in-variables
236 "PS2 = \"> \"\n"
237 "PS2 (\"> \");\n"))))
226 238
227 ;; O.k., now we are ready for the Inferior Octave startup commands. 239 ;; O.k., now we are ready for the Inferior Octave startup commands.
228 (let* (commands 240 (let* (commands
@@ -230,10 +242,12 @@ startup file, `~/.emacs-octave'."
230 (file (or inferior-octave-startup-file 242 (file (or inferior-octave-startup-file
231 (concat "~/.emacs-" program)))) 243 (concat "~/.emacs-" program))))
232 (setq commands 244 (setq commands
233 (list "page_screen_output = 0;\n" 245 (list "more off;\n"
234 (if (not (string-equal 246 (if (not (string-equal
235 inferior-octave-output-string ">> ")) 247 inferior-octave-output-string ">> "))
236 "PS1=\"\\\\s> \";\n") 248 (if inferior-octave-has-built-in-variables
249 "PS1=\"\\\\s> \";\n"
250 "PS1 (\"\\\\s> \");\n"))
237 (if (file-exists-p file) 251 (if (file-exists-p file)
238 (format "source (\"%s\");\n" file)))) 252 (format "source (\"%s\");\n" file))))
239 (inferior-octave-send-list-and-digest commands)) 253 (inferior-octave-send-list-and-digest commands))
@@ -383,7 +397,7 @@ Use \\[inferior-octave-resync-dirs] to resync if Emacs gets confused."
383This command queries the inferior Octave process about its current 397This command queries the inferior Octave process about its current
384directory and makes this the current buffer's default directory." 398directory and makes this the current buffer's default directory."
385 (interactive) 399 (interactive)
386 (inferior-octave-send-list-and-digest '("pwd\n")) 400 (inferior-octave-send-list-and-digest '("disp (pwd ())\n"))
387 (cd (car inferior-octave-output-list))) 401 (cd (car inferior-octave-output-list)))
388 402
389;;; provide ourself 403;;; provide ourself
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 0387c05134e..4d9a49a6b8d 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1969,6 +1969,13 @@ Repeating the command scrolls the completion window."
1969 1969
1970;;;; Skeletons 1970;;;; Skeletons
1971 1971
1972(defcustom python-use-skeletons nil
1973 "Non-nil means template skeletons will be automagically inserted.
1974This happens when pressing \"if<SPACE>\", for example, to prompt for
1975the if condition."
1976 :type 'boolean
1977 :group 'python)
1978
1972(defvar python-skeletons nil 1979(defvar python-skeletons nil
1973 "Alist of named skeletons for Python mode. 1980 "Alist of named skeletons for Python mode.
1974Elements are of the form (NAME . EXPANDER-FUNCTION).") 1981Elements are of the form (NAME . EXPANDER-FUNCTION).")
@@ -1986,7 +1993,8 @@ The default contents correspond to the elements of `python-skeletons'.")
1986 (function (intern (concat "python-insert-" name)))) 1993 (function (intern (concat "python-insert-" name))))
1987 `(progn 1994 `(progn
1988 (add-to-list 'python-skeletons ',(cons name function)) 1995 (add-to-list 'python-skeletons ',(cons name function))
1989 (define-abbrev python-mode-abbrev-table ,name "" ',function nil t) 1996 (if python-use-skeletons
1997 (define-abbrev python-mode-abbrev-table ,name "" ',function nil t))
1990 (define-skeleton ,function 1998 (define-skeleton ,function
1991 ,(format "Insert Python \"%s\" template." name) 1999 ,(format "Insert Python \"%s\" template." name)
1992 ,@elements))))) 2000 ,@elements)))))