diff options
author | Alan Mackenzie <acm@muc.de> | 2011-10-28 14:35:39 +0000 |
---|---|---|
committer | Alan Mackenzie <acm@muc.de> | 2011-10-28 14:35:39 +0000 |
commit | 93b5b3bdc8b734132c530acd6ffae1196c0865bc (patch) | |
tree | da8ed72a56bfbf65d6f3cd9bdc3fa5d123dc4873 /lisp/progmodes | |
parent | 020716e178cdae443a3630c4307023cb3fc4c350 (diff) | |
parent | bc97a826f8ea89a269f6043be3148930f023e2b2 (diff) | |
download | emacs-93b5b3bdc8b734132c530acd6ffae1196c0865bc.tar.gz |
Boring merge from savannah.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r-- | lisp/progmodes/cc-defs.el | 19 | ||||
-rw-r--r-- | lisp/progmodes/cc-engine.el | 150 | ||||
-rw-r--r-- | lisp/progmodes/cc-fonts.el | 8 | ||||
-rw-r--r-- | lisp/progmodes/cc-langs.el | 72 | ||||
-rw-r--r-- | lisp/progmodes/cc-mode.el | 3 | ||||
-rw-r--r-- | lisp/progmodes/cc-vars.el | 48 | ||||
-rw-r--r-- | lisp/progmodes/gdb-mi.el | 42 | ||||
-rw-r--r-- | lisp/progmodes/octave-inf.el | 5 | ||||
-rw-r--r-- | lisp/progmodes/octave-mod.el | 12 |
9 files changed, 256 insertions, 103 deletions
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el index e5b4d7e35a4..93da6e3e2be 100644 --- a/lisp/progmodes/cc-defs.el +++ b/lisp/progmodes/cc-defs.el @@ -744,19 +744,20 @@ be after it." ;; V i r t u a l S e m i c o l o n s ;; ;; In most CC Mode languages, statements are terminated explicitly by -;; semicolons or closing braces. In some of the CC modes (currently only AWK -;; Mode (April 2004)), statements are (or can be) terminated by EOLs. Such a -;; statement is said to be terminated by a "virtual semicolon" (VS). A -;; statement terminated by an actual semicolon or brace is never considered to -;; have a VS. +;; semicolons or closing braces. In some of the CC modes (currently AWK Mode +;; and certain user-specified #define macros in C, C++, etc. (November 2008)), +;; statements are (or can be) terminated by EOLs. Such a statement is said to +;; be terminated by a "virtual semicolon" (VS). A statement terminated by an +;; actual semicolon or brace is never considered to have a VS. ;; ;; The indentation engine (or whatever) tests for a VS at a specific position ;; by invoking the macro `c-at-vsemi-p', which in its turn calls the mode ;; specific function (if any) which is the value of the language variable -;; `c-at-vsemi-p-fn'. The actual details of what constitutes a VS in a -;; language are thus encapsulated in code specific to that language -;; (e.g. cc-awk.el). `c-at-vsemi-p' returns non-nil if point (or the optional -;; parameter POS) is at a VS, nil otherwise. +;; `c-at-vsemi-p-fn'. This function should only use "low-level" features of +;; CC Mode, i.e. features which won't trigger infinite recursion. ;-) The +;; actual details of what constitutes a VS in a language are thus encapsulated +;; in code specific to that language (e.g. cc-awk.el). `c-at-vsemi-p' returns +;; non-nil if point (or the optional parameter POS) is at a VS, nil otherwise. ;; ;; The language specific function might well do extensive analysis of the ;; source text, and may use a cacheing scheme to speed up repeated calls. diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index bc42e1032ab..ea0a8f2d3b3 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -1154,42 +1154,65 @@ the line. If this virtual semicolon is _at_ from, the function recognizes it. Note that this function might do hidden buffer changes. See the comment at the start of cc-engine.el for more info." - (let ((skip-chars c-stmt-delim-chars) - lit-range) - (save-excursion - (catch 'done - (goto-char from) - (while (progn (skip-chars-forward skip-chars to) - (< (point) to)) - (cond - ((setq lit-range (c-literal-limits from)) ; Have we landed in a string/comment? - (goto-char (cdr lit-range))) - ((eq (char-after) ?:) - (forward-char) - (if (and (eq (char-after) ?:) - (< (point) to)) - ;; Ignore scope operators. - (forward-char) - (setq c-maybe-labelp (1- (point))))) - ((eq (char-after) ??) - ;; A question mark. Can't be a label, so stop - ;; looking for more : and ?. - (setq c-maybe-labelp nil - skip-chars (substring c-stmt-delim-chars 0 -2))) - ((memq (char-after) '(?# ?\n ?\r)) ; A virtual semicolon? - (if (and (eq (char-before) ?\\) (memq (char-after) '(?\n ?\r))) - (backward-char)) - (skip-chars-backward " \t" from) - (if (c-at-vsemi-p) - (throw 'done (point)) - (forward-line))) - (t (throw 'done (point))))) - ;; In trailing space after an as yet undetected virtual semicolon? - (c-backward-syntactic-ws from) - (if (and (< (point) to) - (c-at-vsemi-p)) - (point) - nil))))) + (let* ((skip-chars + ;; If the current language has CPP macros, insert # into skip-chars. + (if c-opt-cpp-symbol + (concat (substring c-stmt-delim-chars 0 1) ; "^" + c-opt-cpp-symbol ; usually "#" + (substring c-stmt-delim-chars 1)) ; e.g. ";{}?:" + c-stmt-delim-chars)) + (non-skip-list + (append (substring skip-chars 1) nil)) ; e.g. (?# ?\; ?{ ?} ?? ?:) + lit-range vsemi-pos) + (save-restriction + (widen) + (save-excursion + (catch 'done + (goto-char from) + (while (progn (skip-chars-forward + skip-chars + (min to (c-point 'bonl))) + (< (point) to)) + (cond + ;; Virtual semicolon? + ((and (bolp) + (save-excursion + (progn + (if (setq lit-range (c-literal-limits from)) ; Have we landed in a string/comment? + (goto-char (car lit-range))) + (c-backward-syntactic-ws) ; ? put a limit here, maybe? + (setq vsemi-pos (point)) + (c-at-vsemi-p)))) + (throw 'done vsemi-pos)) + ;; In a string/comment? + ((setq lit-range (c-literal-limits)) + (goto-char (cdr lit-range))) + ((eq (char-after) ?:) + (forward-char) + (if (and (eq (char-after) ?:) + (< (point) to)) + ;; Ignore scope operators. + (forward-char) + (setq c-maybe-labelp (1- (point))))) + ((eq (char-after) ??) + ;; A question mark. Can't be a label, so stop + ;; looking for more : and ?. + (setq c-maybe-labelp nil + skip-chars (substring c-stmt-delim-chars 0 -2))) + ;; At a CPP construct? + ((and c-opt-cpp-symbol (looking-at c-opt-cpp-symbol) + (save-excursion + (forward-line 0) + (looking-at c-opt-cpp-prefix))) + (c-end-of-macro)) + ((memq (char-after) non-skip-list) + (throw 'done (point))))) + ;; In trailing space after an as yet undetected virtual semicolon? + (c-backward-syntactic-ws from) + (if (and (< (point) to) + (c-at-vsemi-p)) + (point) + nil)))))) (defun c-at-statement-start-p () "Return non-nil if the point is at the first token in a statement @@ -7163,12 +7186,14 @@ comment at the start of cc-engine.el for more info." ;; Check that we're not after a token that can't precede a label. (or ;; Trivially succeeds when there's no preceding token. + ;; Succeeds when we're at a virtual semicolon. (if preceding-token-end (<= preceding-token-end (point-min)) (save-excursion (c-backward-syntactic-ws) (setq preceding-token-end (point)) - (bobp))) + (or (bobp) + (c-at-vsemi-p)))) ;; Check if we're after a label, if we're after a closing ;; paren that belong to statement, and with @@ -8400,6 +8425,57 @@ comment at the start of cc-engine.el for more info." paren-state) containing-sexp))))) +(defun c-at-macro-vsemi-p (&optional pos) + ;; Is there a "virtual semicolon" at POS or point? + ;; (See cc-defs.el for full details of "virtual semicolons".) + ;; + ;; This is true when point is at the last non syntactic WS position on the + ;; line, there is a macro call last on the line, and this particular macro's + ;; name is defined by the regexp `c-vs-macro-regexp' as not needing a + ;; semicolon. + (save-excursion + (save-restriction + (widen) + (if pos + (goto-char pos) + (setq pos (point))) + (and + c-macro-with-semi-re + (not (c-in-literal)) + (eq (skip-chars-backward " \t") 0) + + ;; Check we've got nothing after this except comments and empty lines + ;; joined by escaped EOLs. + (skip-chars-forward " \t") ; always returns non-nil. + (progn + (while ; go over 1 block comment per iteration. + (and + (looking-at "\\(\\\\[\n\r][ \t]*\\)*") + (goto-char (match-end 0)) + (cond + ((looking-at c-block-comment-start-regexp) + (and (forward-comment 1) + (skip-chars-forward " \t"))) ; always returns non-nil + ((looking-at c-line-comment-start-regexp) + (end-of-line) + nil) + (t nil)))) + (eolp)) + + (goto-char pos) + (progn (c-backward-syntactic-ws) + (eq (point) pos)) + + ;; Check for one of the listed macros being before point. + (or (not (eq (char-before) ?\))) + (when (c-go-list-backward) + (c-backward-syntactic-ws) + t)) + (c-simple-skip-symbol-backward) + (looking-at c-macro-with-semi-re))))) + +(defun c-macro-vsemi-status-unknown-p () t) ; See cc-defs.el. + ;; `c-guess-basic-syntax' and the functions that precedes it below ;; implements the main decision tree for determining the syntactic diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index fd817e3b4f4..9a83d5196db 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el @@ -1277,9 +1277,11 @@ casts and declarations are fontified. Used on level 2 and higher." (when ;; The result of the form below is true when we don't recognize a ;; declaration or cast. - (if (and (eq (get-text-property (point) 'face) - 'font-lock-keyword-face) - (looking-at c-not-decl-init-keywords)) + (if (or (and (eq (get-text-property (point) 'face) + 'font-lock-keyword-face) + (looking-at c-not-decl-init-keywords)) + (and c-macro-with-semi-re + (looking-at c-macro-with-semi-re))) ; 2008-11-04 ;; Don't do anything more if we're looking at a keyword that ;; can't start a declaration. t diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 279c5e46c46..09f8b318378 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -509,6 +509,31 @@ parameters \(point-min), \(point-max) and <buffer size>." (c-lang-const c-before-font-lock-function)) +;;; Syntactic analysis ("virtual semicolons") for line-oriented languages (AWK). +(c-lang-defconst c-at-vsemi-p-fn + "Contains a function \"Is there a virtual semicolon at POS or point?\". +Such a function takes one optional parameter, a buffer position (defaults to +point), and returns nil or t. This variable contains nil for languages which +don't have EOL terminated statements. " + t nil + (c c++ objc) 'c-at-macro-vsemi-p + awk 'c-awk-at-vsemi-p) +(c-lang-defvar c-at-vsemi-p-fn (c-lang-const c-at-vsemi-p-fn)) + +(c-lang-defconst c-vsemi-status-unknown-p-fn + "Contains a function \"are we unsure whether there is a virtual semicolon on this line?\". +The (admittedly kludgey) purpose of such a function is to prevent an infinite +recursion in c-beginning-of-statement-1 when point starts at a `while' token. +The function MUST NOT UNDER ANY CIRCUMSTANCES call c-beginning-of-statement-1, +even indirectly. This variable contains nil for languages which don't have +EOL terminated statements." + t nil + (c c++ objc) 'c-macro-vsemi-status-unknown-p + awk 'c-awk-vsemi-status-unknown-p) +(c-lang-defvar c-vsemi-status-unknown-p-fn + (c-lang-const c-vsemi-status-unknown-p-fn)) + + ;;; Lexer-level syntax (identifiers, tokens etc). (c-lang-defconst c-has-bitfields @@ -737,6 +762,12 @@ literal are multiline." (c-lang-defvar c-multiline-string-start-char (c-lang-const c-multiline-string-start-char)) +(c-lang-defconst c-opt-cpp-symbol + "The symbol which starts preprocessor constructs when in the margin." + t "#" + (java awk) nil) +(c-lang-defvar c-opt-cpp-symbol (c-lang-const c-opt-cpp-symbol)) + (c-lang-defconst c-opt-cpp-prefix "Regexp matching the prefix of a cpp directive in the languages that normally use that macro preprocessor. Tested at bol or at boi. @@ -785,6 +816,8 @@ file name in angle brackets or quotes." definition, or nil if the language doesn't have any." t (if (c-lang-const c-opt-cpp-prefix) "define")) +(c-lang-defvar c-opt-cpp-macro-define + (c-lang-const c-opt-cpp-macro-define)) (c-lang-defconst c-opt-cpp-macro-define-start ;; Regexp matching everything up to the macro body of a cpp define, or the @@ -1171,14 +1204,12 @@ operators." ;; optimize `c-crosses-statement-barrier-p' somewhat, it's assumed to ;; begin with "^" to negate the set. If ? : operators should be ;; detected then the string must end with "?:". - t "^;{}?:" - awk "^;{}#\n\r?:") ; The newline chars gets special treatment. + t "^;{}?:") (c-lang-defvar c-stmt-delim-chars (c-lang-const c-stmt-delim-chars)) (c-lang-defconst c-stmt-delim-chars-with-comma ;; Variant of `c-stmt-delim-chars' that additionally contains ','. - t "^;,{}?:" - awk "^;,{}\n\r?:") ; The newline chars gets special treatment. + t "^;,{}?:") (c-lang-defvar c-stmt-delim-chars-with-comma (c-lang-const c-stmt-delim-chars-with-comma)) @@ -1238,7 +1269,6 @@ properly." re))) (c-lang-defvar c-comment-start-regexp (c-lang-const c-comment-start-regexp)) -;;;; Added by ACM, 2003/9/18. (c-lang-defconst c-block-comment-start-regexp ;; Regexp which matches the start of a block comment (if such exists in the ;; language) @@ -1248,6 +1278,15 @@ properly." (c-lang-defvar c-block-comment-start-regexp (c-lang-const c-block-comment-start-regexp)) +(c-lang-defconst c-line-comment-start-regexp + ;; Regexp which matches the start of a line comment (if such exists in the + ;; language; it does in all 7 CC Mode languages). + t (if (c-lang-const c-line-comment-starter) + (regexp-quote (c-lang-const c-line-comment-starter)) + "\\<\\>")) +(c-lang-defvar c-line-comment-start-regexp + (c-lang-const c-line-comment-start-regexp)) + (c-lang-defconst c-literal-start-regexp ;; Regexp to match the start of comments and string literals. t (concat (c-lang-const c-comment-start-regexp) @@ -1475,29 +1514,6 @@ properly." (c-lang-defvar c-syntactic-eol (c-lang-const c-syntactic-eol)) -;;; Syntactic analysis ("virtual semicolons") for line-oriented languages (AWK). -(c-lang-defconst c-at-vsemi-p-fn - "Contains a function \"Is there a virtual semicolon at POS or point?\". -Such a function takes one optional parameter, a buffer position (defaults to -point), and returns nil or t. This variable contains nil for languages which -don't have EOL terminated statements. " - t nil - awk 'c-awk-at-vsemi-p) -(c-lang-defvar c-at-vsemi-p-fn (c-lang-const c-at-vsemi-p-fn)) - -(c-lang-defconst c-vsemi-status-unknown-p-fn - "Contains a function \"are we unsure whether there is a virtual semicolon on this line?\". -The (admittedly kludgey) purpose of such a function is to prevent an infinite -recursion in c-beginning-of-statement-1 when point starts at a `while' token. -The function MUST NOT UNDER ANY CIRCUMSTANCES call c-beginning-of-statement-1, -even indirectly. This variable contains nil for languages which don't have -EOL terminated statements." - t nil - awk 'c-awk-vsemi-status-unknown-p) -(c-lang-defvar c-vsemi-status-unknown-p-fn - (c-lang-const c-vsemi-status-unknown-p-fn)) - - ;;; Defun functions ;; The Emacs variables beginning-of-defun-function and diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index eec63b4fa3b..a6bf241f0db 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -1187,6 +1187,7 @@ Key bindings: abbrev-mode t) (use-local-map c-mode-map) (c-init-language-vars-for 'c-mode) + (c-make-macro-with-semi-re) ; matches macro names whose expansion ends with ; (c-common-init 'c-mode) (easy-menu-add c-c-menu) (cc-imenu-init cc-imenu-c-generic-expression) @@ -1246,6 +1247,7 @@ Key bindings: abbrev-mode t) (use-local-map c++-mode-map) (c-init-language-vars-for 'c++-mode) + (c-make-macro-with-semi-re) ; matches macro names whose expansion ends with ; (c-common-init 'c++-mode) (easy-menu-add c-c++-menu) (cc-imenu-init cc-imenu-c++-generic-expression) @@ -1303,6 +1305,7 @@ Key bindings: abbrev-mode t) (use-local-map objc-mode-map) (c-init-language-vars-for 'objc-mode) + (c-make-macro-with-semi-re) ; matches macro names whose expansion ends with ; (c-common-init 'objc-mode) (easy-menu-add c-objc-menu) (cc-imenu-init nil 'cc-imenu-objc-function) diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el index 769bf63f63c..24361e3667a 100644 --- a/lisp/progmodes/cc-vars.el +++ b/lisp/progmodes/cc-vars.el @@ -1622,6 +1622,54 @@ names).")) ;; Non-customizable variables, still part of the interface to CC Mode +(defvar c-macro-with-semi-re nil + ;; Regular expression which matches a (#define'd) symbol whose expansion + ;; ends with a semicolon. + ;; + ;; This variable should be set by `c-make-macros-with-semi-re' rather than + ;; directly. +) +(make-variable-buffer-local 'c-macro-with-semi-re) + +(defun c-make-macro-with-semi-re () + ;; Convert `c-macro-names-with-semicolon' into the regexp + ;; `c-macro-with-semi-re' (or just copy it if it's already a re). + (setq c-macro-with-semi-re + (and + c-opt-cpp-macro-define + (cond + ((stringp c-macro-names-with-semicolon) + (copy-sequence c-macro-names-with-semicolon)) + ((consp c-macro-names-with-semicolon) + (concat + "\\<" + (regexp-opt c-macro-names-with-semicolon) + "\\>")) ; N.B. the PAREN param of regexp-opt isn't supported by + ; all XEmacsen. + ((null c-macro-names-with-semicolon) + nil) + (t (error "c-make-macro-with-semi-re: invalid \ +c-macro-names-with-semicolon: %s" + c-macro-names-with-semicolon)))))) + +(defvar c-macro-names-with-semicolon + '("Q_OBJECT" "Q_PROPERTY" "Q_DECLARE" "Q_ENUMS") + "List of #defined symbols whose expansion ends with a semicolon. +Alternatively it can be a string, a regular expression which +matches all such symbols. + +The \"symbols\" must be syntactically valid identifiers in the +target language \(C, C++, Objective C), or \(as the case may be) +the regular expression must match only valid identifiers. + +If you change this variable's value, call the function +`c-make-macros-with-semi-re' to set the necessary internal +variables. + +Note that currently \(2008-11-04) this variable is a prototype, +and is likely to disappear or change its form soon.") +(make-variable-buffer-local 'c-macro-names-with-semicolon) + (defvar c-file-style nil "Variable interface for setting style via File Local Variables. In a file's Local Variable section, you can set this variable to a diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 22db7b2e5f4..dde00d753ac 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -43,21 +43,10 @@ ;; M-x gdb will start the debugger. -;; This file uses GDB/MI as the primary interface to GDB. It is still under -;; development and is part of a process to migrate Emacs from annotations (as -;; used in gdb-ui.el) to GDB/MI. It runs gdb with GDB/MI (-interp=mi) and -;; access CLI using "-interpreter-exec console cli-command". This code works -;; without gdb-ui.el and uses MI tokens instead of queues. Eventually MI -;; should be asynchronous. - -;; This mode will PARTLY WORK WITH RECENT GDB RELEASES (status in modeline -;; doesn't update properly when execution commands are issued from GUD buffer) -;; and WORKS BEST when GDB runs asynchronously: maint set linux-async on. -;; -;; You need development version of GDB 7.0 for the thread buffer to work. - -;; This file replaces gdb-ui.el and is for development with GDB. Use the -;; release branch of Emacs 22 for the latest version of gdb-ui.el. +;; This file uses GDB/MI as the primary interface to GDB. It runs gdb with +;; GDB/MI (-interp=mi) and access CLI using "-interpreter-exec console +;; cli-command". This code works without gdb-ui.el and uses MI tokens instead +;; of queues. Eventually MI should be asynchronous. ;; Windows Platforms: @@ -599,6 +588,22 @@ NOARG must be t when this macro is used outside `gud-def'" (concat (gdb-gud-context-command ,cmd1 ,noall) " " ,cmd2) ,(when (not noarg) 'arg))) +(defun gdb--check-interpreter (proc string) + (unless (zerop (length string)) + (let ((filter (process-get proc 'gud-normal-filter))) + (set-process-filter proc filter) + (unless (memq (aref string 0) '(?^ ?~ ?@ ?& ?* ?=)) + ;; Apparently we're not running with -i=mi. + (let ((msg "Error: you did not specify -i=mi on GDB's command line!")) + (message msg) + (setq string (concat (propertize msg 'font-lock-face 'error) + "\n" string))) + ;; Use the old gud-gbd filter, not because it works, but because it + ;; will properly display GDB's answers rather than hanging waiting for + ;; answers that aren't coming. + (set (make-local-variable 'gud-marker-filter) #'gud-gdb-marker-filter)) + (funcall filter proc string)))) + ;;;###autoload (defun gdb (command-line) "Run gdb on program FILE in buffer *gud-FILE*. @@ -665,6 +670,13 @@ detailed description of this mode. "Multiple debugging requires restarting in text command mode")) ;; (gud-common-init command-line nil 'gud-gdbmi-marker-filter) + + ;; Setup a temporary process filter to warn when GDB was not started + ;; with -i=mi. + (let ((proc (get-buffer-process gud-comint-buffer))) + (process-put proc 'gud-normal-filter (process-filter proc)) + (set-process-filter proc #'gdb--check-interpreter)) + (set (make-local-variable 'gud-minor-mode) 'gdbmi) (setq comint-input-sender 'gdb-send) (when (ring-empty-p comint-input-ring) ; cf shell-mode diff --git a/lisp/progmodes/octave-inf.el b/lisp/progmodes/octave-inf.el index cb64b2436c6..421f476016e 100644 --- a/lisp/progmodes/octave-inf.el +++ b/lisp/progmodes/octave-inf.el @@ -4,7 +4,7 @@ ;; Author: Kurt Hornik <Kurt.Hornik@wu-wien.ac.at> ;; Author: John Eaton <jwe@bevo.che.wisc.edu> -;; Maintainer: Kurt Hornik <Kurt.Hornik@wu-wien.ac.at> +;; Maintainer: FSF ;; Keywords: languages ;; Package: octave-mod @@ -68,7 +68,8 @@ mode, set this to (\"-q\" \"--traditional\")." (define-key map "\C-c\C-l" 'inferior-octave-dynamic-list-input-ring) (define-key map [menu-bar inout list-history] '("List Input History" . inferior-octave-dynamic-list-input-ring)) - (define-key map "\C-c\C-h" 'octave-help) + ;; FIXME: free C-h so it can do the describe-prefix-bindings. + (define-key map "\C-c\C-h" 'info-lookup-symbol) map) "Keymap used in Inferior Octave mode.") diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el index 183347cdeca..28e25a35c70 100644 --- a/lisp/progmodes/octave-mod.el +++ b/lisp/progmodes/octave-mod.el @@ -4,7 +4,7 @@ ;; Author: Kurt Hornik <Kurt.Hornik@wu-wien.ac.at> ;; Author: John Eaton <jwe@octave.org> -;; Maintainer: Kurt Hornik <Kurt.Hornik@wu-wien.ac.at> +;; Maintainer: FSF ;; Keywords: languages ;; This file is part of GNU Emacs. @@ -223,6 +223,7 @@ parenthetical grouping.") (define-key map "\C-c]" 'smie-close-block) (define-key map "\C-c/" 'smie-close-block) (define-key map "\C-c\C-f" 'octave-insert-defun) + ;; FIXME: free C-h so it can do the describe-prefix-bindings. (define-key map "\C-c\C-h" 'info-lookup-symbol) (define-key map "\C-c\C-il" 'octave-send-line) (define-key map "\C-c\C-ib" 'octave-send-block) @@ -236,6 +237,7 @@ parenthetical grouping.") (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-s" 'octave-show-process-buffer) + ;; FIXME: free C-h so it can do the describe-prefix-bindings. (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) map) @@ -655,14 +657,6 @@ including a reproducible test case and send the message." (easy-menu-add octave-mode-menu) (octave-initialize-completions)) - -(defvar info-lookup-mode) - -(defun octave-help () - "Get help on Octave symbols from the Octave info files. -Look up symbol in the function, operator and variable indices of the info files." - (let ((info-lookup-mode 'octave-mode)) - (call-interactively 'info-lookup-symbol))) ;;; Miscellaneous useful functions |