mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-20 20:50:53 -08:00
upstream
This commit is contained in:
commit
017a270078
401 changed files with 33851 additions and 14870 deletions
18
ChangeLog
18
ChangeLog
|
|
@ -1,3 +1,21 @@
|
||||||
|
2012-10-04 Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
|
||||||
|
Port timers to OpenBSD, plus check for timer failures.
|
||||||
|
OpenBSD problem reported by Han Boetes.
|
||||||
|
* profiler.c (setup_cpu_timer): Check for failure of timer_settime
|
||||||
|
and/or setitimer.
|
||||||
|
(Fprofiler_cpu_stop): Don't assume HAVE_SETITIMER.
|
||||||
|
* syssignal.h (HAVE_ITIMERSPEC): New macro. This is for platforms
|
||||||
|
like OpenBSD, which has timer_settime but does not declare it.
|
||||||
|
OpenBSD does not define SIGEV_SIGNAL, so use that when deciding
|
||||||
|
whether to use itimerspec-related primitives. All uses of
|
||||||
|
HAVE_TIMER_SETTIME replaced with HAVE_ITIMERSPEC.
|
||||||
|
|
||||||
|
2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
|
||||||
|
Merge from gnulib, incorporating:
|
||||||
|
2012-09-28 extern-inline: provide a -Wundef safe config.h
|
||||||
|
|
||||||
2012-09-27 Paul Eggert <eggert@cs.ucla.edu>
|
2012-09-27 Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
|
||||||
Check more robustly for timer_settime.
|
Check more robustly for timer_settime.
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,18 @@
|
||||||
|
2012-10-01 David Engster <deng@randomsample.de>
|
||||||
|
|
||||||
|
* grammars/bovine-grammar.el (bovine--grammar-newstyle-unquote):
|
||||||
|
Remove.
|
||||||
|
(bovine-grammar-expand-form): Test for emacs-major-version.
|
||||||
|
|
||||||
|
* grammars/c.by: Add EXPLICIT to keyword tokens.
|
||||||
|
|
||||||
|
* grammars/f90.by: Add %provide token.
|
||||||
|
|
||||||
|
* grammar/grammar.wy (semantic-grammar-lexer): Remove, since it
|
||||||
|
was copied to grammar.el. New %provide token to generate prefix
|
||||||
|
which conforms with Emacs conventions. Remove lexer definition,
|
||||||
|
which is now in grammar.el.
|
||||||
|
|
||||||
2012-09-27 Glenn Morris <rgm@gnu.org>
|
2012-09-27 Glenn Morris <rgm@gnu.org>
|
||||||
|
|
||||||
* admin.el (set-version): Set msdos.c's Vwindow_system_version.
|
* admin.el (set-version): Set msdos.c's Vwindow_system_version.
|
||||||
|
|
|
||||||
|
|
@ -109,14 +109,6 @@ NAME, ALIASCLASS, DEFINITION and ATTRIBUTES."
|
||||||
;; Cache of macro definitions currently in use.
|
;; Cache of macro definitions currently in use.
|
||||||
(defvar bovine--grammar-macros nil)
|
(defvar bovine--grammar-macros nil)
|
||||||
|
|
||||||
;; Detect if we have an Emacs with newstyle unquotes allowed outside
|
|
||||||
;; of backquote.
|
|
||||||
;; This should probably be changed to a test to (= emacs-major-version 24)
|
|
||||||
;; when it is released, but at the moment it might be possible that people
|
|
||||||
;; are using an older snapshot.
|
|
||||||
(defvar bovine--grammar-newstyle-unquote
|
|
||||||
(equal '(\, test) (read ",test")))
|
|
||||||
|
|
||||||
(defun bovine-grammar-expand-form (form quotemode &optional inplace)
|
(defun bovine-grammar-expand-form (form quotemode &optional inplace)
|
||||||
"Expand FORM into a new one suitable to the bovine parser.
|
"Expand FORM into a new one suitable to the bovine parser.
|
||||||
FORM is a list in which we are substituting.
|
FORM is a list in which we are substituting.
|
||||||
|
|
@ -152,7 +144,7 @@ expanded from elsewhere."
|
||||||
form (cdr form))
|
form (cdr form))
|
||||||
;; Hack for dealing with new reading of unquotes outside of
|
;; Hack for dealing with new reading of unquotes outside of
|
||||||
;; backquote (introduced in rev. 102591 in emacs-bzr).
|
;; backquote (introduced in rev. 102591 in emacs-bzr).
|
||||||
(when (and bovine--grammar-newstyle-unquote
|
(when (and (>= emacs-major-version 24)
|
||||||
(listp first)
|
(listp first)
|
||||||
(or (equal (car first) '\,)
|
(or (equal (car first) '\,)
|
||||||
(equal (car first) '\,@)))
|
(equal (car first) '\,@)))
|
||||||
|
|
@ -456,6 +448,7 @@ Menu items are appended to the common grammar menu.")
|
||||||
|
|
||||||
(defun bovine-make-parsers ()
|
(defun bovine-make-parsers ()
|
||||||
"Generate Emacs' built-in Bovine-based parser files."
|
"Generate Emacs' built-in Bovine-based parser files."
|
||||||
|
(interactive)
|
||||||
(semantic-mode 1)
|
(semantic-mode 1)
|
||||||
;; Loop through each .by file in current directory, and run
|
;; Loop through each .by file in current directory, and run
|
||||||
;; `semantic-grammar-batch-build-one-package' to build the grammar.
|
;; `semantic-grammar-batch-build-one-package' to build the grammar.
|
||||||
|
|
@ -465,13 +458,14 @@ Menu items are appended to the common grammar menu.")
|
||||||
(with-current-buffer (find-file-noselect f)
|
(with-current-buffer (find-file-noselect f)
|
||||||
(semantic-grammar-create-package))
|
(semantic-grammar-create-package))
|
||||||
(error (message "%s" (error-message-string err)) nil)))
|
(error (message "%s" (error-message-string err)) nil)))
|
||||||
lang)
|
lang filename)
|
||||||
(when (and packagename
|
(when (and packagename
|
||||||
(string-match "^semantic-\\(.*\\)-by\\.el\\'" packagename))
|
(string-match "^.*/\\(.*\\)-by\\.el\\'" packagename))
|
||||||
(setq lang (match-string 1 packagename))
|
(setq lang (match-string 1 packagename))
|
||||||
|
(setq filename (concat lang "-by.el"))
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(insert-file-contents packagename)
|
(insert-file-contents filename)
|
||||||
(setq buffer-file-name (expand-file-name packagename))
|
(setq buffer-file-name (expand-file-name filename))
|
||||||
;; Fix copyright header:
|
;; Fix copyright header:
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(re-search-forward "^;; Author:")
|
(re-search-forward "^;; Author:")
|
||||||
|
|
@ -500,20 +494,14 @@ Menu items are appended to the common grammar menu.")
|
||||||
lang ".by.
|
lang ".by.
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
")
|
||||||
\(require 'semantic/lex)
|
|
||||||
\(eval-when-compile (require 'semantic/bovine))\n")
|
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(delete-region (point-min) (line-end-position))
|
(delete-region (point-min) (line-end-position))
|
||||||
(insert ";;; semantic/bovine/" lang
|
(insert ";;; " packagename
|
||||||
"-by.el --- Generated parser support file")
|
" --- Generated parser support file")
|
||||||
(delete-trailing-whitespace)
|
(delete-trailing-whitespace)
|
||||||
;; Fix footer:
|
(re-search-forward ";;; \\(.*\\) ends here")
|
||||||
(goto-char (point-max))
|
(replace-match packagename nil nil nil 1)
|
||||||
(re-search-backward ".\n;;; Analyzers")
|
|
||||||
(delete-region (point) (point-max))
|
|
||||||
(insert "(provide 'semantic/bovine/" lang "-by)\n\n")
|
|
||||||
(insert ";;; semantic/bovine/" lang "-by.el ends here\n")
|
|
||||||
(save-buffer))))))
|
(save-buffer))))))
|
||||||
|
|
||||||
;;; bovine-grammar.el ends here
|
;;; bovine-grammar.el ends here
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
;;; c.by -- LL grammar for C/C++ language specification
|
;;; c.by -- LL grammar for C/C++ language specification
|
||||||
|
|
||||||
;; Copyright (C) 1999-2012 Free Software Foundation, Inc.
|
;; Copyright (C) 1999-2012 Free Software Foundation, Inc.
|
||||||
;;
|
;;
|
||||||
;; Author: Eric M. Ludlam <zappo@gnu.org>
|
;; Author: Eric M. Ludlam <zappo@gnu.org>
|
||||||
|
|
@ -39,6 +38,13 @@
|
||||||
;; > * Can't parse signature element: "RmcBucStatus* rftBucStatus"
|
;; > * Can't parse signature element: "RmcBucStatus* rftBucStatus"
|
||||||
|
|
||||||
%package semantic-c-by
|
%package semantic-c-by
|
||||||
|
%provide semantic/bovine/c-by
|
||||||
|
|
||||||
|
%{
|
||||||
|
(declare-function semantic-c-reconstitute-token "semantic/bovine/c")
|
||||||
|
(declare-function semantic-c-reconstitute-template "semantic/bovine/c")
|
||||||
|
(declare-function semantic-expand-c-tag "semantic/bovine/c")
|
||||||
|
}
|
||||||
|
|
||||||
%languagemode c-mode c++-mode
|
%languagemode c-mode c++-mode
|
||||||
%start declaration
|
%start declaration
|
||||||
|
|
@ -98,6 +104,8 @@
|
||||||
%put VIRTUAL summary "Method Modifier: virtual <type> <name>(...) ..."
|
%put VIRTUAL summary "Method Modifier: virtual <type> <name>(...) ..."
|
||||||
%token MUTABLE "mutable"
|
%token MUTABLE "mutable"
|
||||||
%put MUTABLE summary "Member Declaration Modifier: mutable <type> <name> ..."
|
%put MUTABLE summary "Member Declaration Modifier: mutable <type> <name> ..."
|
||||||
|
%token EXPLICIT "explicit"
|
||||||
|
%put EXPLICIT summary "Forbids implicit type conversion: explicit <constructor>"
|
||||||
|
|
||||||
%token STRUCT "struct"
|
%token STRUCT "struct"
|
||||||
%put STRUCT summary "Structure Type Declaration: struct [name] { ... };"
|
%put STRUCT summary "Structure Type Declaration: struct [name] { ... };"
|
||||||
|
|
@ -370,6 +378,9 @@ namespacesubparts
|
||||||
;; PUBLIC or PRIVATE bits. Ignore them for now.
|
;; PUBLIC or PRIVATE bits. Ignore them for now.
|
||||||
| template
|
| template
|
||||||
| using
|
| using
|
||||||
|
;; Includes inside namespaces
|
||||||
|
| spp-include
|
||||||
|
(TAG $1 'include :inside-ns t)
|
||||||
| ;;EMPTY
|
| ;;EMPTY
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
@ -1098,6 +1109,8 @@ functionname
|
||||||
function-pointer
|
function-pointer
|
||||||
: LPAREN STAR symbol RPAREN
|
: LPAREN STAR symbol RPAREN
|
||||||
( (concat "*" $3) )
|
( (concat "*" $3) )
|
||||||
|
| LPAREN symbol RPAREN
|
||||||
|
( $2 )
|
||||||
;
|
;
|
||||||
|
|
||||||
fun-or-proto-end
|
fun-or-proto-end
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,9 @@
|
||||||
;; You should have received a copy of the GNU General Public License
|
;; You should have received a copy of the GNU General Public License
|
||||||
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
%package semantic-grammar-wy
|
||||||
|
%provide semantic/grammar-wy
|
||||||
|
|
||||||
%{
|
%{
|
||||||
(defvar semantic-grammar-lex-c-char-re)
|
(defvar semantic-grammar-lex-c-char-re)
|
||||||
|
|
||||||
|
|
@ -32,8 +35,6 @@
|
||||||
(defvar semantic-grammar-wy--rindx nil)
|
(defvar semantic-grammar-wy--rindx nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
%package semantic-grammar-wy
|
|
||||||
|
|
||||||
%languagemode wy-mode
|
%languagemode wy-mode
|
||||||
|
|
||||||
;; Main
|
;; Main
|
||||||
|
|
@ -52,6 +53,7 @@
|
||||||
%keyword LEFT "%left"
|
%keyword LEFT "%left"
|
||||||
%keyword NONASSOC "%nonassoc"
|
%keyword NONASSOC "%nonassoc"
|
||||||
%keyword PACKAGE "%package"
|
%keyword PACKAGE "%package"
|
||||||
|
%keyword PROVIDE "%provide"
|
||||||
%keyword PREC "%prec"
|
%keyword PREC "%prec"
|
||||||
%keyword PUT "%put"
|
%keyword PUT "%put"
|
||||||
%keyword QUOTEMODE "%quotemode"
|
%keyword QUOTEMODE "%quotemode"
|
||||||
|
|
@ -134,6 +136,7 @@ decl:
|
||||||
| no_default_prec_decl
|
| no_default_prec_decl
|
||||||
| languagemode_decl
|
| languagemode_decl
|
||||||
| package_decl
|
| package_decl
|
||||||
|
| provide_decl
|
||||||
| precedence_decl
|
| precedence_decl
|
||||||
| put_decl
|
| put_decl
|
||||||
| quotemode_decl
|
| quotemode_decl
|
||||||
|
|
@ -165,6 +168,11 @@ package_decl:
|
||||||
`(PACKAGE-TAG ',$2 nil)
|
`(PACKAGE-TAG ',$2 nil)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
provide_decl:
|
||||||
|
PROVIDE SYMBOL
|
||||||
|
`(TAG ',$2 'provide)
|
||||||
|
;
|
||||||
|
|
||||||
precedence_decl:
|
precedence_decl:
|
||||||
associativity token_type_opt items
|
associativity token_type_opt items
|
||||||
`(TAG ',$1 'assoc :type ',$2 :value ',$3)
|
`(TAG ',$1 'assoc :type ',$2 :value ',$3)
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@
|
||||||
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
%package wisent-java-tags-wy
|
%package wisent-java-tags-wy
|
||||||
|
%provide semantic/wisent/javat-wy
|
||||||
|
|
||||||
%languagemode java-mode
|
%languagemode java-mode
|
||||||
|
|
||||||
|
|
@ -444,7 +445,7 @@ class_member_declaration
|
||||||
;;; Type Declaration token
|
;;; Type Declaration token
|
||||||
;; ("NAME" type "TYPE" ( PART-LIST ) ( PARENTS ) EXTRA-SPEC "DOCSTRING")
|
;; ("NAME" type "TYPE" ( PART-LIST ) ( PARENTS ) EXTRA-SPEC "DOCSTRING")
|
||||||
interface_declaration
|
interface_declaration
|
||||||
: modifiers_opt INTERFACE IDENTIFIER extends_interfaces_opt interface_body
|
: modifiers_opt INTERFACE qualified_name extends_interfaces_opt interface_body
|
||||||
(TYPE-TAG $3 $2 $5 (if $4 (cons nil $4)) :typemodifiers $1)
|
(TYPE-TAG $3 $2 $5 (if $4 (cons nil $4)) :typemodifiers $1)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
@ -547,7 +548,7 @@ formal_parameters
|
||||||
;;; Variable token
|
;;; Variable token
|
||||||
;; ("NAME" variable "TYPE" DEFAULT-VALUE EXTRA-SPEC "DOCSTRING")
|
;; ("NAME" variable "TYPE" DEFAULT-VALUE EXTRA-SPEC "DOCSTRING")
|
||||||
formal_parameter
|
formal_parameter
|
||||||
: formal_parameter_modifier_opt type variable_declarator_id
|
: formal_parameter_modifier_opt type opt_variable_declarator_id
|
||||||
(VARIABLE-TAG $3 $2 nil :typemodifiers $1)
|
(VARIABLE-TAG $3 $2 nil :typemodifiers $1)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
@ -582,6 +583,13 @@ variable_declarator
|
||||||
(cons $1 $region)
|
(cons $1 $region)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
opt_variable_declarator_id
|
||||||
|
: ;; EMPTY
|
||||||
|
(identity "")
|
||||||
|
| variable_declarator_id
|
||||||
|
(identity $1)
|
||||||
|
;
|
||||||
|
|
||||||
variable_declarator_id
|
variable_declarator_id
|
||||||
: IDENTIFIER dims_opt
|
: IDENTIFIER dims_opt
|
||||||
(concat $1 $2)
|
(concat $1 $2)
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,7 @@
|
||||||
;; DAMAGE.
|
;; DAMAGE.
|
||||||
|
|
||||||
%package wisent-javascript-jv-wy
|
%package wisent-javascript-jv-wy
|
||||||
|
%provide semantic/wisent/js-wy
|
||||||
;; JAVE I prefere ecmascript-mode
|
;; JAVE I prefere ecmascript-mode
|
||||||
%languagemode ecmascript-mode javascript-mode
|
%languagemode ecmascript-mode javascript-mode
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
%package semantic-make-by
|
%package semantic-make-by
|
||||||
|
%provide semantic/bovine/make-by
|
||||||
|
|
||||||
%languagemode makefile-mode
|
%languagemode makefile-mode
|
||||||
%start Makefile
|
%start Makefile
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,12 @@
|
||||||
;; --------
|
;; --------
|
||||||
|
|
||||||
%package wisent-python-wy
|
%package wisent-python-wy
|
||||||
|
%provide semantic/wisent/python-wy
|
||||||
|
|
||||||
|
%{
|
||||||
|
(declare-function wisent-python-reconstitute-function-tag "semantic/wisent/python")
|
||||||
|
(declare-function wisent-python-reconstitute-class-tag "semantic/wisent/python")
|
||||||
|
}
|
||||||
|
|
||||||
%languagemode python-mode
|
%languagemode python-mode
|
||||||
|
|
||||||
|
|
@ -173,6 +179,7 @@
|
||||||
%token <punctuation> COMMA ","
|
%token <punctuation> COMMA ","
|
||||||
%token <punctuation> ASSIGN "="
|
%token <punctuation> ASSIGN "="
|
||||||
%token <punctuation> BACKQUOTE "`"
|
%token <punctuation> BACKQUOTE "`"
|
||||||
|
%token <punctuation> AT "@"
|
||||||
|
|
||||||
|
|
||||||
;; -----------------
|
;; -----------------
|
||||||
|
|
@ -307,6 +314,10 @@
|
||||||
%put WHILE summary
|
%put WHILE summary
|
||||||
"Start a 'while' loop"
|
"Start a 'while' loop"
|
||||||
|
|
||||||
|
%keyword WITH "with"
|
||||||
|
%put WITH summary
|
||||||
|
"Start statement with an associated context object"
|
||||||
|
|
||||||
%keyword YIELD "yield"
|
%keyword YIELD "yield"
|
||||||
%put YIELD summary
|
%put YIELD summary
|
||||||
"Create a generator function"
|
"Create a generator function"
|
||||||
|
|
@ -545,8 +556,10 @@ import_stmt
|
||||||
|
|
||||||
;; dotted_as_name (',' dotted_as_name)*
|
;; dotted_as_name (',' dotted_as_name)*
|
||||||
dotted_as_name_list
|
dotted_as_name_list
|
||||||
: dotted_as_name
|
: dotted_as_name_list COMMA dotted_as_name
|
||||||
| dotted_as_name_list COMMA dotted_as_name
|
(cons $3 $1)
|
||||||
|
| dotted_as_name
|
||||||
|
(list $1)
|
||||||
;
|
;
|
||||||
|
|
||||||
;; ('*' | import_as_name (',' import_as_name)*)
|
;; ('*' | import_as_name (',' import_as_name)*)
|
||||||
|
|
@ -649,6 +662,7 @@ compound_stmt
|
||||||
| while_stmt
|
| while_stmt
|
||||||
| for_stmt
|
| for_stmt
|
||||||
| try_stmt
|
| try_stmt
|
||||||
|
| with_stmt
|
||||||
| funcdef
|
| funcdef
|
||||||
| class_declaration
|
| class_declaration
|
||||||
;
|
;
|
||||||
|
|
@ -755,14 +769,47 @@ zero_one_or_two_test
|
||||||
()
|
()
|
||||||
;
|
;
|
||||||
|
|
||||||
|
;;;============================================================================
|
||||||
|
;;@@ with_stmt
|
||||||
|
;;;============================================================================
|
||||||
|
|
||||||
|
;; with_stmt: 'with' test [ with_var ] ':' suite
|
||||||
|
with_stmt
|
||||||
|
: WITH test COLON suite
|
||||||
|
(CODE-TAG $1 nil)
|
||||||
|
| WITH test with_var COLON suite
|
||||||
|
(CODE-TAG $1 nil) ;; TODO capture variable
|
||||||
|
;
|
||||||
|
|
||||||
|
with_var
|
||||||
|
: AS expr
|
||||||
|
() ;; TODO capture
|
||||||
|
;
|
||||||
|
|
||||||
;;;============================================================================
|
;;;============================================================================
|
||||||
;;;@@ funcdef
|
;;;@@ funcdef
|
||||||
;;;============================================================================
|
;;;============================================================================
|
||||||
|
|
||||||
;; funcdef: 'def' NAME parameters ':' suite
|
decorator
|
||||||
|
: AT dotted_name varargslist_opt NEWLINE
|
||||||
|
(FUNCTION-TAG $2 "decorator" $3)
|
||||||
|
;
|
||||||
|
|
||||||
|
decorators
|
||||||
|
: decorator
|
||||||
|
(list $1)
|
||||||
|
| decorator decorators
|
||||||
|
(cons $1 $2)
|
||||||
|
;
|
||||||
|
|
||||||
|
;; funcdef: [decorators] 'def' NAME parameters ':' suite
|
||||||
funcdef
|
funcdef
|
||||||
: DEF NAME function_parameter_list COLON suite
|
: DEF NAME function_parameter_list COLON suite
|
||||||
(FUNCTION-TAG $2 nil $3)
|
(wisent-python-reconstitute-function-tag
|
||||||
|
(FUNCTION-TAG $2 nil $3) $5)
|
||||||
|
| decorators DEF NAME function_parameter_list COLON suite
|
||||||
|
(wisent-python-reconstitute-function-tag
|
||||||
|
(FUNCTION-TAG $3 nil $4 :decorators $1) $6)
|
||||||
;
|
;
|
||||||
|
|
||||||
function_parameter_list
|
function_parameter_list
|
||||||
|
|
@ -798,10 +845,11 @@ function_parameter
|
||||||
;; classdef: 'class' NAME ['(' testlist ')'] ':' suite
|
;; classdef: 'class' NAME ['(' testlist ')'] ':' suite
|
||||||
class_declaration
|
class_declaration
|
||||||
: CLASS NAME paren_class_list_opt COLON suite
|
: CLASS NAME paren_class_list_opt COLON suite
|
||||||
|
(wisent-python-reconstitute-class-tag
|
||||||
(TYPE-TAG $2 $1 ;; Name "class"
|
(TYPE-TAG $2 $1 ;; Name "class"
|
||||||
$5 ;; Members
|
$5 ;; Members
|
||||||
(cons $3 nil) ;; (SUPERCLASSES . INTERFACES)
|
(cons $3 nil) ;; (SUPERCLASSES . INTERFACES)
|
||||||
)
|
))
|
||||||
;
|
;
|
||||||
|
|
||||||
;; ['(' testlist ')']
|
;; ['(' testlist ')']
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@
|
||||||
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
%package semantic-scm-by
|
%package semantic-scm-by
|
||||||
|
%provide semantic/bovine/scm-by
|
||||||
|
|
||||||
%languagemode scheme-mode
|
%languagemode scheme-mode
|
||||||
%start scheme
|
%start scheme
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,9 @@
|
||||||
;; Semantic Recoder templates are based on Google Templates
|
;; Semantic Recoder templates are based on Google Templates
|
||||||
;; and are at the bottom of the Semantic Recoder API.
|
;; and are at the bottom of the Semantic Recoder API.
|
||||||
|
|
||||||
|
%package srecode-template-wy
|
||||||
|
%provide srecode/srt-wy
|
||||||
|
|
||||||
%languagemode srecode-mode
|
%languagemode srecode-mode
|
||||||
|
|
||||||
%start template_file
|
%start template_file
|
||||||
|
|
@ -46,6 +49,15 @@
|
||||||
%put TEMPLATE summary "template <name>\\n <template definition>"
|
%put TEMPLATE summary "template <name>\\n <template definition>"
|
||||||
%keyword SECTIONDICTIONARY "sectiondictionary"
|
%keyword SECTIONDICTIONARY "sectiondictionary"
|
||||||
%put SECTIONDICTIONARY summary "sectiondictionary <name>\\n <dictionary entries>"
|
%put SECTIONDICTIONARY summary "sectiondictionary <name>\\n <dictionary entries>"
|
||||||
|
|
||||||
|
%keyword SECTION "section"
|
||||||
|
%put SECTION summary
|
||||||
|
"section <name>\\n <dictionary entries>\\n end"
|
||||||
|
|
||||||
|
%keyword END "end"
|
||||||
|
%put END summary
|
||||||
|
"section ... end"
|
||||||
|
|
||||||
%keyword PROMPT "prompt"
|
%keyword PROMPT "prompt"
|
||||||
%keyword DEFAULT "default"
|
%keyword DEFAULT "default"
|
||||||
%keyword DEFAULTMACRO "defaultmacro"
|
%keyword DEFAULTMACRO "defaultmacro"
|
||||||
|
|
@ -62,7 +74,7 @@
|
||||||
%token <separator> TEMPLATE_BLOCK "^----"
|
%token <separator> TEMPLATE_BLOCK "^----"
|
||||||
|
|
||||||
;;; Bland default types
|
;;; Bland default types
|
||||||
%type <property> ":\\(\\w\\|\\s_\\)*"
|
%type <property> syntax ":\\(\\w\\|\\s_\\)*"
|
||||||
%token <property> property
|
%token <property> property
|
||||||
|
|
||||||
%type <symbol>
|
%type <symbol>
|
||||||
|
|
@ -134,7 +146,7 @@ insertable-string
|
||||||
template
|
template
|
||||||
: TEMPLATE templatename opt-dynamic-arguments newline
|
: TEMPLATE templatename opt-dynamic-arguments newline
|
||||||
opt-string
|
opt-string
|
||||||
opt-section-dictionaries
|
section-dictionary-list
|
||||||
TEMPLATE_BLOCK newline
|
TEMPLATE_BLOCK newline
|
||||||
opt-bind
|
opt-bind
|
||||||
(FUNCTION-TAG $2 nil $3 :documentation $5 :code $7
|
(FUNCTION-TAG $2 nil $3 :documentation $5 :code $7
|
||||||
|
|
@ -165,29 +177,52 @@ opt-string
|
||||||
| ()
|
| ()
|
||||||
;
|
;
|
||||||
|
|
||||||
opt-section-dictionaries
|
|
||||||
: () ;; EMPTY
|
|
||||||
| section-dictionary-list
|
|
||||||
;
|
|
||||||
|
|
||||||
section-dictionary-list
|
section-dictionary-list
|
||||||
: one-section-dictionary
|
: ;; empty
|
||||||
(list $1)
|
()
|
||||||
| section-dictionary-list one-section-dictionary
|
| section-dictionary-list flat-section-dictionary
|
||||||
|
(append $1 (list $2))
|
||||||
|
| section-dictionary-list section-dictionary
|
||||||
(append $1 (list $2))
|
(append $1 (list $2))
|
||||||
;
|
;
|
||||||
|
|
||||||
one-section-dictionary
|
flat-section-dictionary
|
||||||
: SECTIONDICTIONARY string newline
|
: SECTIONDICTIONARY string newline
|
||||||
variable-list
|
flat-dictionary-entry-list
|
||||||
(cons (read $2) $4)
|
(cons (read $2) $4)
|
||||||
;
|
;
|
||||||
|
|
||||||
variable-list
|
flat-dictionary-entry-list
|
||||||
|
: ;; empty
|
||||||
|
()
|
||||||
|
| flat-dictionary-entry-list flat-dictionary-entry
|
||||||
|
(append $1 $2)
|
||||||
|
;
|
||||||
|
|
||||||
|
flat-dictionary-entry
|
||||||
: variable
|
: variable
|
||||||
(EXPANDTAG $1)
|
(EXPANDTAG $1)
|
||||||
| variable-list variable
|
;
|
||||||
(append $1 (EXPANDTAG $2))
|
|
||||||
|
section-dictionary
|
||||||
|
: SECTION string newline
|
||||||
|
dictionary-entry-list
|
||||||
|
END newline
|
||||||
|
(cons (read $2) $4)
|
||||||
|
;
|
||||||
|
|
||||||
|
dictionary-entry-list
|
||||||
|
: ;; emtpy
|
||||||
|
()
|
||||||
|
| dictionary-entry-list dictionary-entry
|
||||||
|
(append $1 $2)
|
||||||
|
;
|
||||||
|
|
||||||
|
dictionary-entry
|
||||||
|
: variable
|
||||||
|
(EXPANDTAG $1)
|
||||||
|
| section-dictionary
|
||||||
|
(list $1)
|
||||||
;
|
;
|
||||||
|
|
||||||
opt-bind
|
opt-bind
|
||||||
|
|
@ -232,4 +267,4 @@ It ignores whitespace, newlines and comments."
|
||||||
semantic-lex-default-action
|
semantic-lex-default-action
|
||||||
)
|
)
|
||||||
|
|
||||||
;;; wisent-dot.wy ends here
|
;;; srecode-template.wy ends here
|
||||||
|
|
|
||||||
|
|
@ -209,7 +209,7 @@ See also the function `wisent-skip-token'."
|
||||||
"Return the list of terminal symbols.
|
"Return the list of terminal symbols.
|
||||||
Keep order of declaration in the WY file without duplicates."
|
Keep order of declaration in the WY file without duplicates."
|
||||||
(let (terms)
|
(let (terms)
|
||||||
(mapcar
|
(mapc
|
||||||
#'(lambda (tag)
|
#'(lambda (tag)
|
||||||
(mapcar #'(lambda (name)
|
(mapcar #'(lambda (name)
|
||||||
(add-to-list 'terms (intern name)))
|
(add-to-list 'terms (intern name)))
|
||||||
|
|
@ -464,23 +464,20 @@ Menu items are appended to the common grammar menu.")
|
||||||
;; DAMAGE.")
|
;; DAMAGE.")
|
||||||
|
|
||||||
(defvar wisent-make-parsers--parser-file-name
|
(defvar wisent-make-parsers--parser-file-name
|
||||||
`(("semantic-grammar-wy.el"
|
`(("semantic/grammar-wy.el")
|
||||||
"semantic/grammar-wy")
|
("srecode/srt-wy.el")
|
||||||
("srecode-template-wy.el"
|
("semantic/wisent/js-wy.el"
|
||||||
"srecode/srt-wy")
|
|
||||||
("wisent-javascript-jv-wy.el"
|
|
||||||
"semantic/wisent/js-wy"
|
|
||||||
"Copyright (C) 1998-2011 Ecma International."
|
"Copyright (C) 1998-2011 Ecma International."
|
||||||
,wisent-make-parsers--ecmascript-license)
|
,wisent-make-parsers--ecmascript-license)
|
||||||
("wisent-java-tags-wy.el"
|
("semantic/wisent/javat-wy.el")
|
||||||
"semantic/wisent/javat-wy")
|
("semantic/wisent/python-wy.el"
|
||||||
("wisent-python-wy.el"
|
"Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
|
||||||
"semantic/wisent/python-wy"
|
\;; 2009, 2010 Python Software Foundation; All Rights Reserved"
|
||||||
"Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Python Software Foundation; All Rights Reserved."
|
|
||||||
,wisent-make-parsers--python-license)))
|
,wisent-make-parsers--python-license)))
|
||||||
|
|
||||||
(defun wisent-make-parsers ()
|
(defun wisent-make-parsers ()
|
||||||
"Generate Emacs' built-in Wisent-based parser files."
|
"Generate Emacs' built-in Wisent-based parser files."
|
||||||
|
(interactive)
|
||||||
(semantic-mode 1)
|
(semantic-mode 1)
|
||||||
;; Loop through each .wy file in current directory, and run
|
;; Loop through each .wy file in current directory, and run
|
||||||
;; `semantic-grammar-batch-build-one-package' to build the grammar.
|
;; `semantic-grammar-batch-build-one-package' to build the grammar.
|
||||||
|
|
@ -492,13 +489,13 @@ Menu items are appended to the common grammar menu.")
|
||||||
(error (message "%s" (error-message-string err)) nil)))
|
(error (message "%s" (error-message-string err)) nil)))
|
||||||
output-data)
|
output-data)
|
||||||
(when (setq output-data (assoc packagename wisent-make-parsers--parser-file-name))
|
(when (setq output-data (assoc packagename wisent-make-parsers--parser-file-name))
|
||||||
(let ((require-name (nth 1 output-data))
|
(let ((additional-copyright (nth 1 output-data))
|
||||||
(additional-copyright (nth 2 output-data))
|
(additional-license (nth 2 output-data))
|
||||||
(additional-license (nth 3 output-data))
|
(filename (progn (string-match ".*/\\(.*\\)" packagename) (match-string 1 packagename)))
|
||||||
copyright-end)
|
copyright-end)
|
||||||
;; Touch up the generated parsers for Emacs integration.
|
;; Touch up the generated parsers for Emacs integration.
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(insert-file-contents packagename)
|
(insert-file-contents filename)
|
||||||
;; Fix copyright header:
|
;; Fix copyright header:
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(when additional-copyright
|
(when additional-copyright
|
||||||
|
|
@ -516,22 +513,14 @@ Menu items are appended to the common grammar menu.")
|
||||||
f ".")
|
f ".")
|
||||||
(when additional-license
|
(when additional-license
|
||||||
(insert "\n" additional-license))
|
(insert "\n" additional-license))
|
||||||
(insert "\n\n;;; Code:\n
|
(insert "\n\n;;; Code:\n")
|
||||||
\(require 'semantic/lex)\n")
|
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(delete-region (point-min) (line-end-position))
|
(delete-region (point-min) (line-end-position))
|
||||||
(insert ";;; " require-name
|
(insert ";;; " packagename
|
||||||
".el --- Generated parser support file")
|
" --- Generated parser support file")
|
||||||
|
(re-search-forward ";;; \\(.*\\) ends here")
|
||||||
|
(replace-match packagename nil nil nil 1)
|
||||||
(delete-trailing-whitespace)
|
(delete-trailing-whitespace)
|
||||||
(re-search-forward ";;\n(require 'semantic/lex)\n")
|
(write-region nil nil (expand-file-name filename))))))))
|
||||||
(delete-region (match-beginning 0) (match-end 0))
|
|
||||||
;; Fix footer:
|
|
||||||
(goto-char (point-max))
|
|
||||||
(re-search-backward "^(provide")
|
|
||||||
(delete-region (match-beginning 0) (point-max))
|
|
||||||
(goto-char (point-max))
|
|
||||||
(insert "(provide '" require-name ")\n\n")
|
|
||||||
(insert ";;; " require-name ".el ends here\n")
|
|
||||||
(write-region nil nil (expand-file-name packagename))))))))
|
|
||||||
|
|
||||||
;;; wisent-grammar.el ends here
|
;;; wisent-grammar.el ends here
|
||||||
|
|
|
||||||
|
|
@ -1522,7 +1522,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
<http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113>.
|
<http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113>.
|
||||||
_GL_INLINE_HEADER_END contains useful stuff to put
|
_GL_INLINE_HEADER_END contains useful stuff to put
|
||||||
in the same include file, after uses of _GL_INLINE. */
|
in the same include file, after uses of _GL_INLINE. */
|
||||||
#if __GNUC__ ? __GNUC_STDC_INLINE__ : 199901L <= __STDC_VERSION__
|
#if (__GNUC__ \
|
||||||
|
? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
|
||||||
|
: 199901L <= __STDC_VERSION__)
|
||||||
# define _GL_INLINE inline
|
# define _GL_INLINE inline
|
||||||
# define _GL_EXTERN_INLINE extern inline
|
# define _GL_EXTERN_INLINE extern inline
|
||||||
#elif 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
|
#elif 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
|
||||||
|
|
@ -1539,7 +1541,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
|
#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
|
||||||
# if __GNUC_STDC_INLINE__
|
# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
|
||||||
# define _GL_INLINE_HEADER_CONST_PRAGMA
|
# define _GL_INLINE_HEADER_CONST_PRAGMA
|
||||||
# else
|
# else
|
||||||
# define _GL_INLINE_HEADER_CONST_PRAGMA \
|
# define _GL_INLINE_HEADER_CONST_PRAGMA \
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,34 @@
|
||||||
|
2012-10-02 Glenn Morris <rgm@gnu.org>
|
||||||
|
|
||||||
|
* maintaining.texi (VC Directory Commands):
|
||||||
|
Remove duplicate `q' entry. (Bug#12553)
|
||||||
|
|
||||||
|
2012-09-30 Chong Yidong <cyd@gnu.org>
|
||||||
|
|
||||||
|
* killing.texi (Rectangles): Document copy-rectangle-as-kill.
|
||||||
|
|
||||||
|
* search.texi (Special Isearch): Document the lax space search
|
||||||
|
feature and M-s SPC.
|
||||||
|
(Regexp Search): Move main search-whitespace-regexp description to
|
||||||
|
Special Isearch.
|
||||||
|
(Replace): Document replace-lax-whitespace.
|
||||||
|
|
||||||
|
* basic.texi (Position Info): Document C-u M-=.
|
||||||
|
(Moving Point): Document move-to-column.
|
||||||
|
|
||||||
|
* display.texi (Useless Whitespace): Add delete-trailing-lines.
|
||||||
|
|
||||||
|
* misc.texi (emacsclient Options): Document the effect of
|
||||||
|
initial-buffer-choice on client frames. Document server-auth-dir.
|
||||||
|
Do not document server-host, which is bad security practice.
|
||||||
|
|
||||||
|
* building.texi (Lisp Libraries): Docstring lookups can trigger
|
||||||
|
autoloading. Document help-enable-auto-load.
|
||||||
|
|
||||||
|
* mini.texi (Yes or No Prompts): New node.
|
||||||
|
|
||||||
|
* ack.texi (Acknowledgments): Remove obsolete packages.
|
||||||
|
|
||||||
2012-09-27 Glenn Morris <rgm@gnu.org>
|
2012-09-27 Glenn Morris <rgm@gnu.org>
|
||||||
|
|
||||||
* cal-xtra.texi (Advanced Calendar/Diary Usage):
|
* cal-xtra.texi (Advanced Calendar/Diary Usage):
|
||||||
|
|
|
||||||
|
|
@ -644,10 +644,9 @@ statically scoped Emacs lisp.
|
||||||
@item
|
@item
|
||||||
Daniel LaLiberte wrote @file{edebug.el}, a source-level debugger for
|
Daniel LaLiberte wrote @file{edebug.el}, a source-level debugger for
|
||||||
Emacs Lisp; @file{cl-specs.el}, specifications to help @code{edebug}
|
Emacs Lisp; @file{cl-specs.el}, specifications to help @code{edebug}
|
||||||
debug code written using David Gillespie's Common Lisp support;
|
debug code written using David Gillespie's Common Lisp support; and
|
||||||
@file{cust-print.el}, a customizable package for printing lisp
|
@file{isearch.el}, Emacs's incremental search minor mode. He also
|
||||||
objects; and @file{isearch.el}, Emacs's incremental search minor mode.
|
co-wrote @file{hideif.el} (q.v.@:).
|
||||||
He also co-wrote @file{hideif.el} (q.v.@:).
|
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Karl Landstrom and Daniel Colascione wrote @file{js.el}, a mode for
|
Karl Landstrom and Daniel Colascione wrote @file{js.el}, a mode for
|
||||||
|
|
@ -1301,15 +1300,14 @@ providing electric accent keys.
|
||||||
Colin Walters wrote Ibuffer, an enhanced buffer menu.
|
Colin Walters wrote Ibuffer, an enhanced buffer menu.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Barry Warsaw wrote @file{assoc.el}, a set of utility functions for
|
Barry Warsaw wrote @file{cc-mode.el}, a mode for editing C, C@t{++},
|
||||||
working with association lists; @file{cc-mode.el}, a mode for editing
|
and Java code, based on earlier work by Dave Detlefs, Stewart Clamen,
|
||||||
C, C@t{++}, and Java code, based on earlier work by Dave Detlefs,
|
and Richard Stallman; @file{elp.el}, a profiler for Emacs Lisp
|
||||||
Stewart Clamen, and Richard Stallman; @file{elp.el}, a profiler for
|
programs; @file{man.el}, a mode for reading Unix manual pages;
|
||||||
Emacs Lisp programs; @file{man.el}, a mode for reading Unix manual
|
@file{regi.el}, providing an AWK-like functionality for use in lisp
|
||||||
pages; @file{regi.el}, providing an AWK-like functionality for use in
|
programs; @file{reporter.el}, providing customizable bug reporting for
|
||||||
lisp programs; @file{reporter.el}, providing customizable bug
|
lisp packages; and @file{supercite.el}, a minor mode for quoting
|
||||||
reporting for lisp packages; and @file{supercite.el}, a minor mode for
|
sections of mail messages and news articles.
|
||||||
quoting sections of mail messages and news articles.
|
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Christoph Wedler wrote @file{antlr-mode.el}, a major mode for ANTLR
|
Christoph Wedler wrote @file{antlr-mode.el}, a major mode for ANTLR
|
||||||
|
|
@ -1351,9 +1349,8 @@ Directory Client; and @code{eshell}, a command shell implemented
|
||||||
entirely in Emacs Lisp. He also contributed to Org mode (q.v.@:).
|
entirely in Emacs Lisp. He also contributed to Org mode (q.v.@:).
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Mike Williams wrote @file{mouse-sel.el}, providing enhanced mouse
|
Mike Williams wrote @file{thingatpt.el}, a library of functions for
|
||||||
selection; and @file{thingatpt.el}, a library of functions for finding
|
finding the ``thing'' (word, line, s-expression) at point.
|
||||||
the ``thing'' (word, line, s-expression) containing point.
|
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Roland Winkler wrote @file{proced.el}, a system process editor.
|
Roland Winkler wrote @file{proced.el}, a system process editor.
|
||||||
|
|
|
||||||
|
|
@ -267,7 +267,8 @@ necessary (@code{scroll-up-command}). @xref{Scrolling}.
|
||||||
Scroll one screen backward, and move point onscreen if necessary
|
Scroll one screen backward, and move point onscreen if necessary
|
||||||
(@code{scroll-down-command}). @xref{Scrolling}.
|
(@code{scroll-down-command}). @xref{Scrolling}.
|
||||||
|
|
||||||
@item M-x goto-char
|
@item M-g c
|
||||||
|
@kindex M-g c
|
||||||
@findex goto-char
|
@findex goto-char
|
||||||
Read a number @var{n} and move point to buffer position @var{n}.
|
Read a number @var{n} and move point to buffer position @var{n}.
|
||||||
Position 1 is the beginning of the buffer.
|
Position 1 is the beginning of the buffer.
|
||||||
|
|
@ -285,6 +286,13 @@ also specify @var{n} by giving @kbd{M-g M-g} a numeric prefix argument.
|
||||||
@xref{Select Buffer}, for the behavior of @kbd{M-g M-g} when you give it
|
@xref{Select Buffer}, for the behavior of @kbd{M-g M-g} when you give it
|
||||||
a plain prefix argument.
|
a plain prefix argument.
|
||||||
|
|
||||||
|
@item M-g @key{TAB}
|
||||||
|
@kindex M-g TAB
|
||||||
|
@findex move-to-column
|
||||||
|
Read a number @var{n} and move to column @var{n} in the current line.
|
||||||
|
Column 0 is the leftmost column. If called with a prefix argument,
|
||||||
|
move to the column number specified by the argument's numeric value.
|
||||||
|
|
||||||
@item C-x C-n
|
@item C-x C-n
|
||||||
@kindex C-x C-n
|
@kindex C-x C-n
|
||||||
@findex set-goal-column
|
@findex set-goal-column
|
||||||
|
|
@ -619,12 +627,16 @@ narrowed region and the line number relative to the whole buffer.
|
||||||
|
|
||||||
@kindex M-=
|
@kindex M-=
|
||||||
@findex count-words-region
|
@findex count-words-region
|
||||||
@findex count-words
|
|
||||||
@kbd{M-=} (@code{count-words-region}) displays a message reporting
|
@kbd{M-=} (@code{count-words-region}) displays a message reporting
|
||||||
the number of lines, words, and characters in the region. @kbd{M-x
|
the number of lines, words, and characters in the region
|
||||||
count-words} displays a similar message for the entire buffer, or for
|
(@pxref{Mark}, for an explanation of the region). With a prefix
|
||||||
the region if the region is @dfn{active}. @xref{Mark}, for an
|
argument, @kbd{C-u M-=}, the command displays a count for the entire
|
||||||
explanation of the region.
|
buffer.
|
||||||
|
|
||||||
|
@findex count-words
|
||||||
|
The command @kbd{M-x count-words} does the same job, but with a
|
||||||
|
different calling convention. It displays a count for the region if
|
||||||
|
the region is active, and for the buffer otherwise.
|
||||||
|
|
||||||
@kindex C-x =
|
@kindex C-x =
|
||||||
@findex what-cursor-position
|
@findex what-cursor-position
|
||||||
|
|
|
||||||
|
|
@ -1393,13 +1393,21 @@ putting a line like this in your init file (@pxref{Init File}):
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@cindex autoload
|
@cindex autoload
|
||||||
Some commands are @dfn{autoloaded}: when you run them, Emacs
|
Some commands are @dfn{autoloaded}; when you run them, Emacs
|
||||||
automatically loads the associated library first. For instance, the
|
automatically loads the associated library first. For instance, the
|
||||||
@kbd{M-x compile} command (@pxref{Compilation}) is autoloaded; if you
|
@kbd{M-x compile} command (@pxref{Compilation}) is autoloaded; if you
|
||||||
call it, Emacs automatically loads the @code{compile} library first.
|
call it, Emacs automatically loads the @code{compile} library first.
|
||||||
In contrast, the command @kbd{M-x recompile} is not autoloaded, so it
|
In contrast, the command @kbd{M-x recompile} is not autoloaded, so it
|
||||||
is unavailable until you load the @code{compile} library.
|
is unavailable until you load the @code{compile} library.
|
||||||
|
|
||||||
|
@vindex help-enable-auto-load
|
||||||
|
Automatic loading can also occur when you look up the documentation
|
||||||
|
of an autoloaded command (@pxref{Name Help}), if the documentation
|
||||||
|
refers to other functions and variables in its library (loading the
|
||||||
|
library lets Emacs properly set up the hyperlinks in the @file{*Help*}
|
||||||
|
buffer). To disable this feature, change the variable
|
||||||
|
@code{help-enable-auto-load} to @code{nil}.
|
||||||
|
|
||||||
@vindex load-dangerous-libraries
|
@vindex load-dangerous-libraries
|
||||||
@cindex Lisp files byte-compiled by XEmacs
|
@cindex Lisp files byte-compiled by XEmacs
|
||||||
By default, Emacs refuses to load compiled Lisp files which were
|
By default, Emacs refuses to load compiled Lisp files which were
|
||||||
|
|
|
||||||
|
|
@ -1044,9 +1044,9 @@ the left fringe, but no arrow bitmaps, use @code{((top . left)
|
||||||
@cindex whitespace, trailing
|
@cindex whitespace, trailing
|
||||||
@vindex show-trailing-whitespace
|
@vindex show-trailing-whitespace
|
||||||
It is easy to leave unnecessary spaces at the end of a line, or
|
It is easy to leave unnecessary spaces at the end of a line, or
|
||||||
empty lines at the end of a file, without realizing it. In most
|
empty lines at the end of a buffer, without realizing it. In most
|
||||||
cases, this @dfn{trailing whitespace} has no effect, but there are
|
cases, this @dfn{trailing whitespace} has no effect, but sometimes it
|
||||||
special circumstances where it matters, and it can be a nuisance.
|
can be a nuisance.
|
||||||
|
|
||||||
You can make trailing whitespace at the end of a line visible by
|
You can make trailing whitespace at the end of a line visible by
|
||||||
setting the buffer-local variable @code{show-trailing-whitespace} to
|
setting the buffer-local variable @code{show-trailing-whitespace} to
|
||||||
|
|
@ -1061,9 +1061,13 @@ the location of point is enough to show you that the spaces are
|
||||||
present.
|
present.
|
||||||
|
|
||||||
@findex delete-trailing-whitespace
|
@findex delete-trailing-whitespace
|
||||||
|
@vindex delete-trailing-lines
|
||||||
Type @kbd{M-x delete-trailing-whitespace} to delete all trailing
|
Type @kbd{M-x delete-trailing-whitespace} to delete all trailing
|
||||||
whitespace within the buffer. If the region is active, it deletes all
|
whitespace. This command deletes all extra spaces at the end of each
|
||||||
trailing whitespace in the region instead.
|
line in the buffer, and all empty lines at the end of the buffer; to
|
||||||
|
ignore the latter, change the varaible @code{delete-trailing-lines} to
|
||||||
|
@code{nil}. If the region is active, the command instead deletes
|
||||||
|
extra spaces at the end of each line in the region.
|
||||||
|
|
||||||
@vindex indicate-empty-lines
|
@vindex indicate-empty-lines
|
||||||
@cindex unused lines
|
@cindex unused lines
|
||||||
|
|
|
||||||
|
|
@ -267,6 +267,7 @@ The Minibuffer
|
||||||
* Minibuffer History:: Reusing recent minibuffer arguments.
|
* Minibuffer History:: Reusing recent minibuffer arguments.
|
||||||
* Repetition:: Re-executing commands that used the minibuffer.
|
* Repetition:: Re-executing commands that used the minibuffer.
|
||||||
* Passwords:: Entering passwords in the echo area.
|
* Passwords:: Entering passwords in the echo area.
|
||||||
|
* Yes or No Prompts:: Replying yes or no in the echo area.
|
||||||
|
|
||||||
Completion
|
Completion
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -79,11 +79,6 @@ non-@code{nil} value. (In that case, even if you specify one or more
|
||||||
files on the command line, Emacs opens but does not display them.)
|
files on the command line, Emacs opens but does not display them.)
|
||||||
The value of @code{initial-buffer-choice} should be the name of
|
The value of @code{initial-buffer-choice} should be the name of
|
||||||
the desired file or directory.
|
the desired file or directory.
|
||||||
@ignore
|
|
||||||
@c I do not think this should be mentioned. AFAICS it is just a dodge
|
|
||||||
@c around inhibit-startup-screen not being settable on a site-wide basis.
|
|
||||||
or @code{t}, which means to display the @file{*scratch*} buffer.
|
|
||||||
@end ignore
|
|
||||||
|
|
||||||
@node Exiting
|
@node Exiting
|
||||||
@section Exiting Emacs
|
@section Exiting Emacs
|
||||||
|
|
|
||||||
|
|
@ -243,7 +243,7 @@ by the innermost Lisp expression in the buffer around point,
|
||||||
(That name appears as the default while you enter the argument.) For
|
(That name appears as the default while you enter the argument.) For
|
||||||
example, if point is located following the text @samp{(make-vector
|
example, if point is located following the text @samp{(make-vector
|
||||||
(car x)}, the innermost list containing point is the one that starts
|
(car x)}, the innermost list containing point is the one that starts
|
||||||
with @samp{(make-vector}, so @kbd{C-h f @key{RET}} will describe the
|
with @samp{(make-vector}, so @kbd{C-h f @key{RET}} describes the
|
||||||
function @code{make-vector}.
|
function @code{make-vector}.
|
||||||
|
|
||||||
@kbd{C-h f} is also useful just to verify that you spelled a
|
@kbd{C-h f} is also useful just to verify that you spelled a
|
||||||
|
|
|
||||||
|
|
@ -709,6 +709,9 @@ rectangle, depending on the command that uses them.
|
||||||
@item C-x r k
|
@item C-x r k
|
||||||
Kill the text of the region-rectangle, saving its contents as the
|
Kill the text of the region-rectangle, saving its contents as the
|
||||||
``last killed rectangle'' (@code{kill-rectangle}).
|
``last killed rectangle'' (@code{kill-rectangle}).
|
||||||
|
@item C-x r M-w
|
||||||
|
Save the text of the region-rectangle as the ``last killed rectangle''
|
||||||
|
(@code{copy-rectangle-as-kill}).
|
||||||
@item C-x r d
|
@item C-x r d
|
||||||
Delete the text of the region-rectangle (@code{delete-rectangle}).
|
Delete the text of the region-rectangle (@code{delete-rectangle}).
|
||||||
@item C-x r y
|
@item C-x r y
|
||||||
|
|
@ -757,6 +760,12 @@ yanking a rectangle is so different from yanking linear text that
|
||||||
different yank commands have to be used. Yank-popping is not defined
|
different yank commands have to be used. Yank-popping is not defined
|
||||||
for rectangles.
|
for rectangles.
|
||||||
|
|
||||||
|
@kindex C-x r M-w
|
||||||
|
@findex copy-rectangle-as-kill
|
||||||
|
@kbd{C-x r M-w} (@code{copy-rectangle-as-kill}) is the equivalent of
|
||||||
|
@kbd{M-w} for rectangles: it records the rectangle as the ``last
|
||||||
|
killed rectangle'', without deleting the text from the buffer.
|
||||||
|
|
||||||
@kindex C-x r y
|
@kindex C-x r y
|
||||||
@findex yank-rectangle
|
@findex yank-rectangle
|
||||||
To yank the last killed rectangle, type @kbd{C-x r y}
|
To yank the last killed rectangle, type @kbd{C-x r y}
|
||||||
|
|
|
||||||
|
|
@ -1186,11 +1186,8 @@ point is on a directory entry, mark all files in that directory tree
|
||||||
(@code{vc-dir-mark-all-files}). With a prefix argument, mark all
|
(@code{vc-dir-mark-all-files}). With a prefix argument, mark all
|
||||||
listed files and directories.
|
listed files and directories.
|
||||||
|
|
||||||
@kindex q @r{(VC Directory)}
|
|
||||||
@findex quit-window
|
|
||||||
@item q
|
@item q
|
||||||
Bury the VC Directory buffer, and delete its window if the window was
|
Quit the VC Directory buffer, and bury it (@code{quit-window}).
|
||||||
created just for that buffer.
|
|
||||||
|
|
||||||
@item u
|
@item u
|
||||||
Unmark the file or directory on the current line. If the region is
|
Unmark the file or directory on the current line. If the region is
|
||||||
|
|
@ -1205,9 +1202,6 @@ files and directories.
|
||||||
@item x
|
@item x
|
||||||
Hide files with @samp{up-to-date} status
|
Hide files with @samp{up-to-date} status
|
||||||
(@code{vc-dir-hide-up-to-date}).
|
(@code{vc-dir-hide-up-to-date}).
|
||||||
|
|
||||||
@item q
|
|
||||||
Quit the VC Directory buffer, and bury it (@code{quit-window}).
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@findex vc-dir-mark
|
@findex vc-dir-mark
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@ do not echo.
|
||||||
* Minibuffer History:: Reusing recent minibuffer arguments.
|
* Minibuffer History:: Reusing recent minibuffer arguments.
|
||||||
* Repetition:: Re-executing commands that used the minibuffer.
|
* Repetition:: Re-executing commands that used the minibuffer.
|
||||||
* Passwords:: Entering passwords in the echo area.
|
* Passwords:: Entering passwords in the echo area.
|
||||||
|
* Yes or No Prompts:: Replying yes or no in the echo area.
|
||||||
@end menu
|
@end menu
|
||||||
|
|
||||||
@node Minibuffer File
|
@node Minibuffer File
|
||||||
|
|
@ -733,3 +734,53 @@ password (@pxref{Killing}). You may type either @key{RET} or
|
||||||
@key{ESC} to submit the password. Any other self-inserting character
|
@key{ESC} to submit the password. Any other self-inserting character
|
||||||
key inserts the associated character into the password, and all other
|
key inserts the associated character into the password, and all other
|
||||||
input is ignored.
|
input is ignored.
|
||||||
|
|
||||||
|
@node Yes or No Prompts
|
||||||
|
@section Yes or No Prompts
|
||||||
|
|
||||||
|
An Emacs command may require you to answer a ``yes or no'' question
|
||||||
|
during the course of its execution. Such queries come in two main
|
||||||
|
varieties.
|
||||||
|
|
||||||
|
@cindex y or n prompt
|
||||||
|
For the first type of ``yes or no'' query, the prompt ends with
|
||||||
|
@samp{(y or n)}. Such a query does not actually use the minibuffer;
|
||||||
|
the prompt appears in the echo area, and you answer by typing either
|
||||||
|
@samp{y} or @samp{n}, which immediately delivers the response. For
|
||||||
|
example, if you type @kbd{C-x C-w} (@kbd{write-file}) to save a
|
||||||
|
buffer, and enter the name of an existing file, Emacs issues a prompt
|
||||||
|
like this:
|
||||||
|
|
||||||
|
@smallexample
|
||||||
|
File `foo.el' exists; overwrite? (y or n)
|
||||||
|
@end smallexample
|
||||||
|
|
||||||
|
@noindent
|
||||||
|
Because this query does not actually use the minibuffer, the usual
|
||||||
|
minibuffer editing commands cannot be used. However, you can perform
|
||||||
|
some window scrolling operations while the query is active: @kbd{C-l}
|
||||||
|
recenters the selected window; @kbd{M-v} (or @key{PageDown} or
|
||||||
|
@key{next}) scrolls forward; @kbd{C-v} (or @key{PageUp}, or
|
||||||
|
@key{prior}) scrolls backward; @kbd{C-M-v} scrolls forward in the next
|
||||||
|
window; and @kbd{C-M-S-v} scrolls backward in the next window. Typing
|
||||||
|
@kbd{C-g} dismisses the query, and quits the command that issued it
|
||||||
|
(@pxref{Quitting}).
|
||||||
|
|
||||||
|
@cindex yes or no prompt
|
||||||
|
The second type of ``yes or no'' query is typically employed if
|
||||||
|
giving the wrong answer would have serious consequences; it uses the
|
||||||
|
minibuffer, and features a prompt ending with @samp{(yes or no)}. For
|
||||||
|
example, if you invoke @kbd{C-x k} (@code{kill-buffer}) on a
|
||||||
|
file-visiting buffer with unsaved changes, Emacs activates the
|
||||||
|
minibuffer with a prompt like this:
|
||||||
|
|
||||||
|
@smallexample
|
||||||
|
Buffer foo.el modified; kill anyway? (yes or no)
|
||||||
|
@end smallexample
|
||||||
|
|
||||||
|
@noindent
|
||||||
|
To answer, you must type @samp{yes} or @samp{no} into the minibuffer,
|
||||||
|
followed by @key{RET}. The minibuffer behaves as described in the
|
||||||
|
previous sections; you can switch to another window with @kbd{C-x o},
|
||||||
|
use the history commands @kbd{M-p} and @kbd{M-f}, etc. Type @kbd{C-g}
|
||||||
|
to quit the minibuffer and the querying command.
|
||||||
|
|
|
||||||
|
|
@ -1509,15 +1509,11 @@ precedence.
|
||||||
@cindex client frame
|
@cindex client frame
|
||||||
@item -c
|
@item -c
|
||||||
Create a new graphical @dfn{client frame}, instead of using an
|
Create a new graphical @dfn{client frame}, instead of using an
|
||||||
existing Emacs frame. If you omit a filename argument while supplying
|
existing Emacs frame. See below for the special behavior of @kbd{C-x
|
||||||
the @samp{-c} option, the new frame displays the @file{*scratch*}
|
C-c} in a client frame. If Emacs cannot create a new graphical frame
|
||||||
buffer (@pxref{Buffers}). See below for the special behavior of
|
(e.g.@: if it cannot connect to the X server), it tries to create a
|
||||||
@kbd{C-x C-c} in a client frame.
|
text terminal client frame, as though you had supplied the @samp{-t}
|
||||||
|
option instead.
|
||||||
If Emacs is unable to create a new graphical frame (e.g.@: if it is
|
|
||||||
unable to connect to the X server), it tries to create a text terminal
|
|
||||||
client frame, as though you had supplied the @samp{-t} option instead
|
|
||||||
(see below).
|
|
||||||
|
|
||||||
On MS-Windows, a single Emacs session cannot display frames on both
|
On MS-Windows, a single Emacs session cannot display frames on both
|
||||||
graphical and text terminals, nor on multiple text terminals. Thus,
|
graphical and text terminals, nor on multiple text terminals. Thus,
|
||||||
|
|
@ -1525,6 +1521,11 @@ if the Emacs server is running on a text terminal, the @samp{-c}
|
||||||
option, like the @samp{-t} option, creates a new frame in the server's
|
option, like the @samp{-t} option, creates a new frame in the server's
|
||||||
current text terminal. @xref{Windows Startup}.
|
current text terminal. @xref{Windows Startup}.
|
||||||
|
|
||||||
|
If you omit a filename argument while supplying the @samp{-c} option,
|
||||||
|
the new frame displays the @file{*scratch*} buffer by default. If
|
||||||
|
@code{initial-buffer-choice} is a string (@pxref{Entering Emacs}), the
|
||||||
|
new frame displays that file or directory instead.
|
||||||
|
|
||||||
@item -F @var{alist}
|
@item -F @var{alist}
|
||||||
@itemx --frame-parameters=@var{alist}
|
@itemx --frame-parameters=@var{alist}
|
||||||
Set the parameters for a newly-created graphical frame
|
Set the parameters for a newly-created graphical frame
|
||||||
|
|
@ -1545,38 +1546,24 @@ evaluate, @emph{not} as a list of files to visit.
|
||||||
@item -f @var{server-file}
|
@item -f @var{server-file}
|
||||||
@itemx --server-file=@var{server-file}
|
@itemx --server-file=@var{server-file}
|
||||||
@cindex @env{EMACS_SERVER_FILE} environment variable
|
@cindex @env{EMACS_SERVER_FILE} environment variable
|
||||||
@cindex server file
|
|
||||||
@vindex server-use-tcp
|
|
||||||
@vindex server-host
|
|
||||||
Specify a @dfn{server file} for connecting to an Emacs server via TCP.
|
Specify a @dfn{server file} for connecting to an Emacs server via TCP.
|
||||||
|
|
||||||
An Emacs server usually uses an operating system feature called a
|
An Emacs server usually uses an operating system feature called a
|
||||||
``local socket'' to listen for connections. Some operating systems,
|
``local socket'' to listen for connections. Some operating systems,
|
||||||
such as Microsoft Windows, do not support local sockets; in that case,
|
such as Microsoft Windows, do not support local sockets; in that case,
|
||||||
Emacs uses TCP instead. When you start the Emacs server, Emacs
|
the server communicates with @command{emacsclient} via TCP.
|
||||||
creates a server file containing some TCP information that
|
|
||||||
@command{emacsclient} needs for making the connection. By default,
|
|
||||||
the server file is in @file{~/.emacs.d/server/}. On Microsoft
|
|
||||||
Windows, if @command{emacsclient} does not find the server file there,
|
|
||||||
it looks in the @file{.emacs.d/server/} subdirectory of the directory
|
|
||||||
pointed to by the @env{APPDATA} environment variable. You can tell
|
|
||||||
@command{emacsclient} to use a specific server file with the @samp{-f}
|
|
||||||
or @samp{--server-file} option, or by setting the
|
|
||||||
@env{EMACS_SERVER_FILE} environment variable.
|
|
||||||
|
|
||||||
Even if local sockets are available, you can tell Emacs to use TCP by
|
|
||||||
setting the variable @code{server-use-tcp} to @code{t}. One advantage
|
|
||||||
of TCP is that the server can accept connections from remote machines.
|
|
||||||
For this to work, you must (i) set the variable @code{server-host} to
|
|
||||||
the hostname or IP address of the machine on which the Emacs server
|
|
||||||
runs, and (ii) provide @command{emacsclient} with the server file.
|
|
||||||
(One convenient way to do the latter is to put the server file on a
|
|
||||||
networked file system such as NFS.)
|
|
||||||
|
|
||||||
|
@vindex server-auth-dir
|
||||||
|
@cindex server file
|
||||||
@vindex server-port
|
@vindex server-port
|
||||||
When the Emacs server is using TCP, the variable @code{server-port}
|
When you start a TCP Emacs server, Emacs creates a @dfn{server file}
|
||||||
determines the port number to listen on; the default value,
|
containing the TCP information to be used by @command{emacsclient} to
|
||||||
@code{nil}, means to choose a random port when the server starts.
|
connect to the server. The variable @code{server-auth-dir} specifies
|
||||||
|
the directory containing the server file; by default, this is
|
||||||
|
@file{~/.emacs.d/server/}. To tell @command{emacsclient} to connect
|
||||||
|
to the server over TCP with a specific server file, use the @samp{-f}
|
||||||
|
or @samp{--server-file} option, or set the @env{EMACS_SERVER_FILE}
|
||||||
|
environment variable.
|
||||||
|
|
||||||
@item -n
|
@item -n
|
||||||
@itemx --no-wait
|
@itemx --no-wait
|
||||||
|
|
@ -1606,19 +1593,14 @@ server it finds. (This option is not supported on MS-Windows.)
|
||||||
@itemx --tty
|
@itemx --tty
|
||||||
@itemx -nw
|
@itemx -nw
|
||||||
Create a new client frame on the current text terminal, instead of
|
Create a new client frame on the current text terminal, instead of
|
||||||
using an existing Emacs frame. This is similar to the @samp{-c}
|
using an existing Emacs frame. This behaves just like the @samp{-c}
|
||||||
option, above, except that it creates a text terminal frame
|
option, described above, except that it creates a text terminal frame
|
||||||
(@pxref{Non-Window Terminals}). If you omit a filename argument while
|
(@pxref{Non-Window Terminals}).
|
||||||
supplying this option, the new frame displays the @file{*scratch*}
|
|
||||||
buffer (@pxref{Buffers}). See below for the special behavior of
|
|
||||||
@kbd{C-x C-c} in a client frame.
|
|
||||||
|
|
||||||
On MS-Windows, a single Emacs session cannot display frames on both
|
On MS-Windows, @samp{-t} behaves just like @samp{-c} if the Emacs
|
||||||
graphical and text terminals, nor on multiple text terminals. Thus,
|
server is using the graphical display, but if the Emacs server is
|
||||||
if the Emacs server is using the graphical display, @samp{-t} behaves
|
running on a text terminal, it creates a new frame in the current text
|
||||||
like @samp{-c} (see above); whereas if the Emacs server is running on
|
terminal.
|
||||||
a text terminal, it creates a new frame in its current text terminal.
|
|
||||||
@xref{Windows Startup}.
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
The new graphical or text terminal frames created by the @samp{-c}
|
The new graphical or text terminal frames created by the @samp{-c}
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ thing, but search for patterns instead of fixed strings.
|
||||||
(@pxref{Operating on Files}), or ask the @code{grep} program to do it
|
(@pxref{Operating on Files}), or ask the @code{grep} program to do it
|
||||||
(@pxref{Grep Searching}).
|
(@pxref{Grep Searching}).
|
||||||
|
|
||||||
|
|
||||||
@menu
|
@menu
|
||||||
* Incremental Search:: Search happens as you type the string.
|
* Incremental Search:: Search happens as you type the string.
|
||||||
* Nonincremental Search:: Specify entire string and then search.
|
* Nonincremental Search:: Specify entire string and then search.
|
||||||
|
|
@ -218,6 +217,24 @@ search.
|
||||||
Some of the characters you type during incremental search have
|
Some of the characters you type during incremental search have
|
||||||
special effects.
|
special effects.
|
||||||
|
|
||||||
|
@cindex lax space matching
|
||||||
|
@kindex M-s SPC @r{(Incremental search)}
|
||||||
|
@kindex SPC @r{(Incremental search)}
|
||||||
|
@findex isearch-toggle-lax-whitespace
|
||||||
|
@vindex search-whitespace-regexp
|
||||||
|
By default, incremental search performs @dfn{lax space matching}:
|
||||||
|
each space, or sequence of spaces, matches any sequence of one or more
|
||||||
|
spaces in the text. Hence, @samp{foo bar} matches @samp{foo bar},
|
||||||
|
@samp{foo bar}, @samp{foo bar}, and so on (but not @samp{foobar}).
|
||||||
|
More precisely, Emacs matches each sequence of space characters in the
|
||||||
|
search string to a regular expression specified by the variable
|
||||||
|
@code{search-whitespace-regexp}. For example, set it to
|
||||||
|
@samp{"[[:space:]\n]+"} to make spaces match sequences of newlines as
|
||||||
|
well as spaces. To toggle lax space matching, type @kbd{M-s SPC}
|
||||||
|
(@code{isearch-toggle-lax-whitespace}). To disable this feature
|
||||||
|
entirely, change @code{search-whitespace-regexp} to @code{nil}; then
|
||||||
|
each space in the search string matches exactly one space
|
||||||
|
|
||||||
If the search string you entered contains only lower-case letters,
|
If the search string you entered contains only lower-case letters,
|
||||||
the search is case-insensitive; as long as an upper-case letter exists
|
the search is case-insensitive; as long as an upper-case letter exists
|
||||||
in the search string, the search becomes case-sensitive. If you
|
in the search string, the search becomes case-sensitive. If you
|
||||||
|
|
@ -492,12 +509,12 @@ Incremental regexp and non-regexp searches have independent defaults.
|
||||||
They also have separate search rings, which you can access with
|
They also have separate search rings, which you can access with
|
||||||
@kbd{M-p} and @kbd{M-n}.
|
@kbd{M-p} and @kbd{M-n}.
|
||||||
|
|
||||||
@vindex search-whitespace-regexp
|
Just as in ordinary incremental search, any @key{SPC} typed in
|
||||||
If you type @key{SPC} in incremental regexp search, it matches any
|
incremental regexp search matches any sequence of one or more
|
||||||
sequence of whitespace characters, including newlines. If you want to
|
whitespace characters. The variable @code{search-whitespace-regexp}
|
||||||
match just a space, type @kbd{C-q @key{SPC}}. You can control what a
|
specifies the regexp for the lax space matching, and @kbd{M-s SPC}
|
||||||
bare space matches by setting the variable
|
(@code{isearch-toggle-lax-whitespace}) toggles the feature.
|
||||||
@code{search-whitespace-regexp} to the desired regexp.
|
@xref{Special Isearch}.
|
||||||
|
|
||||||
In some cases, adding characters to the regexp in an incremental
|
In some cases, adding characters to the regexp in an incremental
|
||||||
regexp search can make the cursor move back and start again. For
|
regexp search can make the cursor move back and start again. For
|
||||||
|
|
@ -974,6 +991,13 @@ instead (@pxref{Mark}). The basic replace commands replace one
|
||||||
is possible to perform several replacements in parallel, using the
|
is possible to perform several replacements in parallel, using the
|
||||||
command @code{expand-region-abbrevs} (@pxref{Expanding Abbrevs}).
|
command @code{expand-region-abbrevs} (@pxref{Expanding Abbrevs}).
|
||||||
|
|
||||||
|
@vindex replace-lax-whitespace
|
||||||
|
Unlike incremental search, the replacement commands do not use lax
|
||||||
|
space matching (@pxref{Special Isearch}) by default. To enable lax
|
||||||
|
space matching for replacement, change the variable
|
||||||
|
@code{replace-lax-whitespace} to @code{t}. (This only affects how
|
||||||
|
Emacs finds the text to replace, not the replacement text.)
|
||||||
|
|
||||||
@menu
|
@menu
|
||||||
* Unconditional Replace:: Replacing all matches for a string.
|
* Unconditional Replace:: Replacing all matches for a string.
|
||||||
* Regexp Replace:: Replacing all matches for a regexp.
|
* Regexp Replace:: Replacing all matches for a regexp.
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,60 @@
|
||||||
|
2012-10-01 Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
|
||||||
|
Revert the FOLLOW-SYMLINKS change for file-attributes.
|
||||||
|
* files.texi (File Attributes, Magic File Names): Undo last change.
|
||||||
|
|
||||||
|
2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
|
||||||
|
file-attributes has a new optional arg FOLLOW-SYMLINKS.
|
||||||
|
* files.texi (File Attributes): Describe it.
|
||||||
|
(Magic File Names): Use it.
|
||||||
|
|
||||||
|
2012-09-30 Chong Yidong <cyd@gnu.org>
|
||||||
|
|
||||||
|
* commands.texi (Click Events): Define "mouse position list".
|
||||||
|
Remove mention of unimplemented horizontal scroll bars.
|
||||||
|
(Drag Events, Motion Events): Refer to "mouse position list".
|
||||||
|
(Accessing Mouse): Document posnp.
|
||||||
|
|
||||||
|
* errors.texi (Standard Errors): Tweak arith-error description.
|
||||||
|
Tweak markup. Remove domain-error and friends, which seem to be
|
||||||
|
unused after the floating-point code revamp.
|
||||||
|
|
||||||
|
* functions.texi (Obsolete Functions): Obsolescence also affects
|
||||||
|
documentation commands. Various clarifications.
|
||||||
|
(Declare Form): New node.
|
||||||
|
|
||||||
|
* strings.texi (String Basics): Copyedits.
|
||||||
|
|
||||||
|
* os.texi (Idle Timers): Minor clarifications.
|
||||||
|
(User Identification): Add system-users and system-groups.
|
||||||
|
|
||||||
|
* macros.texi (Defining Macros): Move description of `declare' to
|
||||||
|
Declare Form node.
|
||||||
|
|
||||||
|
* loading.texi (Autoload):
|
||||||
|
* help.texi (Documentation Basics): The special sequences can
|
||||||
|
trigger autoloading.
|
||||||
|
|
||||||
|
* numbers.texi (Integer Basics): Copyedits.
|
||||||
|
(Float Basics): Consider IEEE floating point always available.
|
||||||
|
(Random Numbers): Document actual limits.
|
||||||
|
(Arithmetic Operations): Clarify division by zero. Don't mention
|
||||||
|
the machine-independence of negative division since it does not
|
||||||
|
happen in practice.
|
||||||
|
|
||||||
|
2012-09-28 Chong Yidong <cyd@gnu.org>
|
||||||
|
|
||||||
|
* os.texi (Startup Summary): Document leim-list.el change.
|
||||||
|
|
||||||
|
2012-09-25 Chong Yidong <cyd@gnu.org>
|
||||||
|
|
||||||
|
* functions.texi (Defining Functions): defun is now a macro.
|
||||||
|
|
||||||
|
2012-09-28 Leo Liu <sdl.web@gmail.com>
|
||||||
|
|
||||||
|
* files.texi (Files): Fix typo.
|
||||||
|
|
||||||
2012-09-23 Chong Yidong <cyd@gnu.org>
|
2012-09-23 Chong Yidong <cyd@gnu.org>
|
||||||
|
|
||||||
* buffers.texi (Read Only Buffers): Document read-only-mode.
|
* buffers.texi (Read Only Buffers): Document read-only-mode.
|
||||||
|
|
|
||||||
|
|
@ -1275,12 +1275,21 @@ describe events by their types; thus, if there is a key binding for
|
||||||
@var{event-type} is @code{mouse-1}.
|
@var{event-type} is @code{mouse-1}.
|
||||||
|
|
||||||
@item @var{position}
|
@item @var{position}
|
||||||
This is the position where the mouse click occurred. The actual
|
@cindex mouse position list
|
||||||
format of @var{position} depends on what part of a window was clicked
|
This is a @dfn{mouse position list} specifying where the mouse click
|
||||||
on.
|
occurred; see below for details.
|
||||||
|
|
||||||
For mouse click events in the text area, mode line, header line, or in
|
@item @var{click-count}
|
||||||
the marginal areas, @var{position} has this form:
|
This is the number of rapid repeated presses so far of the same mouse
|
||||||
|
button. @xref{Repeat Events}.
|
||||||
|
@end table
|
||||||
|
|
||||||
|
To access the contents of a mouse position list in the
|
||||||
|
@var{position} slot of a click event, you should typically use the
|
||||||
|
functions documented in @ref{Accessing Mouse}. The explicit format of
|
||||||
|
the list depends on where the click occurred. For clicks in the text
|
||||||
|
area, mode line, header line, or in the fringe or marginal areas, the
|
||||||
|
mouse position list has the form
|
||||||
|
|
||||||
@example
|
@example
|
||||||
(@var{window} @var{pos-or-area} (@var{x} . @var{y}) @var{timestamp}
|
(@var{window} @var{pos-or-area} (@var{x} . @var{y}) @var{timestamp}
|
||||||
|
|
@ -1289,18 +1298,16 @@ the marginal areas, @var{position} has this form:
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@noindent
|
@noindent
|
||||||
The meanings of these list elements are documented below.
|
The meanings of these list elements are as follows:
|
||||||
@xref{Accessing Mouse}, for functions that let you easily access these
|
|
||||||
elements.
|
|
||||||
|
|
||||||
@table @asis
|
@table @asis
|
||||||
@item @var{window}
|
@item @var{window}
|
||||||
This is the window in which the click occurred.
|
The window in which the click occurred.
|
||||||
|
|
||||||
@item @var{pos-or-area}
|
@item @var{pos-or-area}
|
||||||
This is the buffer position of the character clicked on in the text
|
The buffer position of the character clicked on in the text area; or,
|
||||||
area, or if clicked outside the text area, it is the window area in
|
if the click was outside the text area, the window area where it
|
||||||
which the click occurred. It is one of the symbols @code{mode-line},
|
occurred. It is one of the symbols @code{mode-line},
|
||||||
@code{header-line}, @code{vertical-line}, @code{left-margin},
|
@code{header-line}, @code{vertical-line}, @code{left-margin},
|
||||||
@code{right-margin}, @code{left-fringe}, or @code{right-fringe}.
|
@code{right-margin}, @code{left-fringe}, or @code{right-fringe}.
|
||||||
|
|
||||||
|
|
@ -1310,22 +1317,23 @@ happens after the imaginary prefix keys for the event are registered
|
||||||
by Emacs. @xref{Key Sequence Input}.
|
by Emacs. @xref{Key Sequence Input}.
|
||||||
|
|
||||||
@item @var{x}, @var{y}
|
@item @var{x}, @var{y}
|
||||||
These are the relative pixel coordinates of the click. For clicks in
|
The relative pixel coordinates of the click. For clicks in the text
|
||||||
the text area of a window, the coordinate origin @code{(0 . 0)} is
|
area of a window, the coordinate origin @code{(0 . 0)} is taken to be
|
||||||
taken to be the top left corner of the text area. @xref{Window
|
the top left corner of the text area. @xref{Window Sizes}. For
|
||||||
Sizes}. For clicks in a mode line or header line, the coordinate
|
clicks in a mode line or header line, the coordinate origin is the top
|
||||||
origin is the top left corner of the window itself. For fringes,
|
left corner of the window itself. For fringes, margins, and the
|
||||||
margins, and the vertical border, @var{x} does not have meaningful
|
vertical border, @var{x} does not have meaningful data. For fringes
|
||||||
data. For fringes and margins, @var{y} is relative to the bottom edge
|
and margins, @var{y} is relative to the bottom edge of the header
|
||||||
of the header line. In all cases, the @var{x} and @var{y} coordinates
|
line. In all cases, the @var{x} and @var{y} coordinates increase
|
||||||
increase rightward and downward respectively.
|
rightward and downward respectively.
|
||||||
|
|
||||||
@item @var{timestamp}
|
@item @var{timestamp}
|
||||||
This is the time at which the event occurred, in milliseconds.
|
The time at which the event occurred, as an integer number of
|
||||||
|
milliseconds since a system-dependent initial time.
|
||||||
|
|
||||||
@item @var{object}
|
@item @var{object}
|
||||||
This is either @code{nil} if there is no string-type text property at
|
Either @code{nil} if there is no string-type text property at the
|
||||||
the click position, or a cons cell of the form (@var{string}
|
click position, or a cons cell of the form (@var{string}
|
||||||
. @var{string-pos}) if there is one:
|
. @var{string-pos}) if there is one:
|
||||||
|
|
||||||
@table @asis
|
@table @asis
|
||||||
|
|
@ -1371,8 +1379,7 @@ These are the pixel width and height of @var{object} or, if this is
|
||||||
@code{nil}, those of the character glyph clicked on.
|
@code{nil}, those of the character glyph clicked on.
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@sp 1
|
For clicks on a scroll bar, @var{position} has this form:
|
||||||
For mouse clicks on a scroll-bar, @var{position} has this form:
|
|
||||||
|
|
||||||
@example
|
@example
|
||||||
(@var{window} @var{area} (@var{portion} . @var{whole}) @var{timestamp} @var{part})
|
(@var{window} @var{area} (@var{portion} . @var{whole}) @var{timestamp} @var{part})
|
||||||
|
|
@ -1380,32 +1387,35 @@ For mouse clicks on a scroll-bar, @var{position} has this form:
|
||||||
|
|
||||||
@table @asis
|
@table @asis
|
||||||
@item @var{window}
|
@item @var{window}
|
||||||
This is the window whose scroll-bar was clicked on.
|
The window whose scroll bar was clicked on.
|
||||||
|
|
||||||
@item @var{area}
|
@item @var{area}
|
||||||
This is the scroll bar where the click occurred. It is one of the
|
This is the symbol @code{vertical-scroll-bar}.
|
||||||
symbols @code{vertical-scroll-bar} or @code{horizontal-scroll-bar}.
|
|
||||||
|
|
||||||
@item @var{portion}
|
@item @var{portion}
|
||||||
This is the distance of the click from the top or left end of
|
The number of pixels from the top of the scroll bar to the click
|
||||||
the scroll bar.
|
position. On some toolkits, including GTK+, Emacs cannot extract this
|
||||||
|
data, so the value is always @code{0}.
|
||||||
|
|
||||||
@item @var{whole}
|
@item @var{whole}
|
||||||
This is the length of the entire scroll bar.
|
The total length, in pixels, of the scroll bar. On some toolkits,
|
||||||
|
including GTK+, Emacs cannot extract this data, so the value is always
|
||||||
|
@code{0}.
|
||||||
|
|
||||||
@item @var{timestamp}
|
@item @var{timestamp}
|
||||||
This is the time at which the event occurred, in milliseconds.
|
The time at which the event occurred, in milliseconds. On some
|
||||||
|
toolkits, including GTK+, Emacs cannot extract this data, so the value
|
||||||
|
is always @code{0}.
|
||||||
|
|
||||||
@item @var{part}
|
@item @var{part}
|
||||||
This is the part of the scroll-bar which was clicked on. It is one
|
The part of the scroll bar on which the click occurred. It is one of
|
||||||
of the symbols @code{above-handle}, @code{handle}, @code{below-handle},
|
the symbols @code{handle} (the scroll bar handle), @code{above-handle}
|
||||||
@code{up}, @code{down}, @code{top}, @code{bottom}, and @code{end-scroll}.
|
(the area above the handle), @code{below-handle} (the area below the
|
||||||
|
handle), @code{up} (the up arrow at one end of the scroll bar), or
|
||||||
|
@code{down} (the down arrow at one end of the scroll bar).
|
||||||
|
@c The `top', `bottom', and `end-scroll' codes don't seem to be used.
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@item @var{click-count}
|
|
||||||
This is the number of rapid repeated presses so far of the same mouse
|
|
||||||
button. @xref{Repeat Events}.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@node Drag Events
|
@node Drag Events
|
||||||
@subsection Drag Events
|
@subsection Drag Events
|
||||||
|
|
@ -1429,10 +1439,9 @@ For a drag event, the name of the symbol @var{event-type} contains the
|
||||||
prefix @samp{drag-}. For example, dragging the mouse with button 2
|
prefix @samp{drag-}. For example, dragging the mouse with button 2
|
||||||
held down generates a @code{drag-mouse-2} event. The second and third
|
held down generates a @code{drag-mouse-2} event. The second and third
|
||||||
elements of the event give the starting and ending position of the
|
elements of the event give the starting and ending position of the
|
||||||
drag. They have the same form as @var{position} in a click event
|
drag, as mouse position lists (@pxref{Click Events}). You can access
|
||||||
(@pxref{Click Events}) that is not on the scroll bar part of the
|
the second element of any mouse event in the same way, with no need to
|
||||||
window. You can access the second element of any mouse event in the
|
distinguish drag events from others.
|
||||||
same way, with no need to distinguish drag events from others.
|
|
||||||
|
|
||||||
The @samp{drag-} prefix follows the modifier key prefixes such as
|
The @samp{drag-} prefix follows the modifier key prefixes such as
|
||||||
@samp{C-} and @samp{M-}.
|
@samp{C-} and @samp{M-}.
|
||||||
|
|
@ -1575,13 +1584,14 @@ represented by lists that look like this:
|
||||||
(mouse-movement POSITION)
|
(mouse-movement POSITION)
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
The second element of the list describes the current position of the
|
@noindent
|
||||||
mouse, just as in a click event (@pxref{Click Events}).
|
@var{position} is a mouse position list (@pxref{Click Events}),
|
||||||
|
specifying the current position of the mouse cursor.
|
||||||
|
|
||||||
The special form @code{track-mouse} enables generation of motion events
|
The special form @code{track-mouse} enables generation of motion
|
||||||
within its body. Outside of @code{track-mouse} forms, Emacs does not
|
events within its body. Outside of @code{track-mouse} forms, Emacs
|
||||||
generate events for mere motion of the mouse, and these events do not
|
does not generate events for mere motion of the mouse, and these
|
||||||
appear. @xref{Mouse Tracking}.
|
events do not appear. @xref{Mouse Tracking}.
|
||||||
|
|
||||||
@node Focus Events
|
@node Focus Events
|
||||||
@subsection Focus Events
|
@subsection Focus Events
|
||||||
|
|
@ -1648,13 +1658,11 @@ frame has already been made visible, Emacs has no work to do.
|
||||||
@cindex @code{wheel-up} event
|
@cindex @code{wheel-up} event
|
||||||
@cindex @code{wheel-down} event
|
@cindex @code{wheel-down} event
|
||||||
@item (wheel-up @var{position})
|
@item (wheel-up @var{position})
|
||||||
@item (wheel-down @var{position})
|
@itemx (wheel-down @var{position})
|
||||||
These kinds of event are generated by moving a mouse wheel. Their
|
These kinds of event are generated by moving a mouse wheel. The
|
||||||
usual meaning is a kind of scroll or zoom.
|
@var{position} element is a mouse position list (@pxref{Click
|
||||||
|
Events}), specifying the position of the mouse cursor when the event
|
||||||
The element @var{position} is a list describing the position of the
|
occurred.
|
||||||
event, in the same format as used in a mouse-click event (@pxref{Click
|
|
||||||
Events}).
|
|
||||||
|
|
||||||
@vindex mouse-wheel-up-event
|
@vindex mouse-wheel-up-event
|
||||||
@vindex mouse-wheel-down-event
|
@vindex mouse-wheel-down-event
|
||||||
|
|
@ -1922,14 +1930,8 @@ must be the last element of the list. For example,
|
||||||
This section describes convenient functions for accessing the data in
|
This section describes convenient functions for accessing the data in
|
||||||
a mouse button or motion event.
|
a mouse button or motion event.
|
||||||
|
|
||||||
These two functions return the starting or ending position of a
|
The following two functions return a mouse position list
|
||||||
mouse-button event, as a list of this form (@pxref{Click Events}):
|
(@pxref{Click Events}), specifying the position of a mouse event.
|
||||||
|
|
||||||
@example
|
|
||||||
(@var{window} @var{pos-or-area} (@var{x} . @var{y}) @var{timestamp}
|
|
||||||
@var{object} @var{text-pos} (@var{col} . @var{row})
|
|
||||||
@var{image} (@var{dx} . @var{dy}) (@var{width} . @var{height}))
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@defun event-start event
|
@defun event-start event
|
||||||
This returns the starting position of @var{event}.
|
This returns the starting position of @var{event}.
|
||||||
|
|
@ -1948,9 +1950,15 @@ event, the value is actually the starting position, which is the only
|
||||||
position such events have.
|
position such events have.
|
||||||
@end defun
|
@end defun
|
||||||
|
|
||||||
|
@defun posnp object
|
||||||
|
This function returns non-@code{nil} if @var{object} is a mouse
|
||||||
|
oposition list, in either of the formats documented in @ref{Click
|
||||||
|
Events}); and @code{nil} otherwise.
|
||||||
|
@end defun
|
||||||
|
|
||||||
@cindex mouse position list, accessing
|
@cindex mouse position list, accessing
|
||||||
These functions take a position list as described above, and
|
These functions take a mouse position list as argument, and return
|
||||||
return various parts of it.
|
various parts of it:
|
||||||
|
|
||||||
@defun posn-window position
|
@defun posn-window position
|
||||||
Return the window that @var{position} is in.
|
Return the window that @var{position} is in.
|
||||||
|
|
|
||||||
|
|
@ -516,6 +516,7 @@ Functions
|
||||||
* Obsolete Functions:: Declaring functions obsolete.
|
* Obsolete Functions:: Declaring functions obsolete.
|
||||||
* Inline Functions:: Defining functions that the compiler
|
* Inline Functions:: Defining functions that the compiler
|
||||||
will expand inline.
|
will expand inline.
|
||||||
|
* Declare Form:: Adding additional information about a function.
|
||||||
* Declaring Functions:: Telling the compiler that a function is defined.
|
* Declaring Functions:: Telling the compiler that a function is defined.
|
||||||
* Function Safety:: Determining whether a function is safe to call.
|
* Function Safety:: Determining whether a function is safe to call.
|
||||||
* Related Topics:: Cross-references to specific Lisp primitives
|
* Related Topics:: Cross-references to specific Lisp primitives
|
||||||
|
|
|
||||||
|
|
@ -37,78 +37,69 @@ handled.
|
||||||
|
|
||||||
@table @code
|
@table @code
|
||||||
@item error
|
@item error
|
||||||
@code{"error"}@*
|
The message is @samp{error}. @xref{Errors}.
|
||||||
@xref{Errors}.
|
|
||||||
|
|
||||||
@item quit
|
@item quit
|
||||||
@code{"Quit"}@*
|
The message is @samp{Quit}. @xref{Quitting}.
|
||||||
@xref{Quitting}.
|
|
||||||
|
|
||||||
@item args-out-of-range
|
@item args-out-of-range
|
||||||
@code{"Args out of range"}@*
|
The message is @samp{Args out of range}. This happens when trying to
|
||||||
This happens when trying to access an element beyond the range of a
|
access an element beyond the range of a sequence, buffer, or other
|
||||||
sequence or buffer.@*
|
container-like object. @xref{Sequences Arrays Vectors}, and
|
||||||
@xref{Sequences Arrays Vectors}, @xref{Text}.
|
@xref{Text}.
|
||||||
|
|
||||||
@item arith-error
|
@item arith-error
|
||||||
@code{"Arithmetic error"}@*
|
The message is @samp{Arithmetic error}. This occurs when trying to
|
||||||
|
perform integer division by zero. @xref{Numeric Conversions}, and
|
||||||
@xref{Arithmetic Operations}.
|
@xref{Arithmetic Operations}.
|
||||||
|
|
||||||
@item beginning-of-buffer
|
@item beginning-of-buffer
|
||||||
@code{"Beginning of buffer"}@*
|
The message is @samp{Beginning of buffer}. @xref{Character Motion}.
|
||||||
@xref{Character Motion}.
|
|
||||||
|
|
||||||
@item buffer-read-only
|
@item buffer-read-only
|
||||||
@code{"Buffer is read-only"}@*
|
The message is @samp{Buffer is read-only}. @xref{Read Only Buffers}.
|
||||||
@xref{Read Only Buffers}.
|
|
||||||
|
|
||||||
@item circular-list
|
@item circular-list
|
||||||
@code{"List contains a loop"}@*
|
The message is @samp{List contains a loop}. This happens when a
|
||||||
This happens when some operations (e.g. resolving face names)
|
circular structure is encountered. @xref{Circular Objects}.
|
||||||
encounter circular structures.@*
|
|
||||||
@xref{Circular Objects}.
|
|
||||||
|
|
||||||
@item cl-assertion-failed
|
@item cl-assertion-failed
|
||||||
@code{"Assertion failed"}@*
|
The message is @samp{Assertion failed}. This happens when the
|
||||||
This happens when the @code{assert} macro fails a test.@*
|
@code{assert} macro fails a test. @xref{Assertions,,, cl, Common Lisp
|
||||||
@xref{Assertions,,, cl, Common Lisp Extensions}.
|
Extensions}.
|
||||||
|
|
||||||
@item coding-system-error
|
@item coding-system-error
|
||||||
@code{"Invalid coding system"}@*
|
The message is @samp{Invalid coding system}. @xref{Lisp and Coding
|
||||||
@xref{Lisp and Coding Systems}.
|
Systems}.
|
||||||
|
|
||||||
@item cyclic-function-indirection
|
@item cyclic-function-indirection
|
||||||
@code{"Symbol's chain of function indirections contains a loop"}@*
|
The message is @samp{Symbol's chain of function indirections contains
|
||||||
@xref{Function Indirection}.
|
a loop}. @xref{Function Indirection}.
|
||||||
|
|
||||||
@item cyclic-variable-indirection
|
@item cyclic-variable-indirection
|
||||||
@code{"Symbol's chain of variable indirections contains a loop"}@*
|
The message is @samp{Symbol's chain of variable indirections contains
|
||||||
@xref{Variable Aliases}.
|
a loop}. @xref{Variable Aliases}.
|
||||||
|
|
||||||
@item dbus-error
|
@item dbus-error
|
||||||
@code{"D-Bus error"}@*
|
The message is @samp{D-Bus error}. This is only defined if Emacs was
|
||||||
This is only defined if Emacs was compiled with D-Bus support.@*
|
compiled with D-Bus support. @xref{Errors and Events,,, dbus, D-Bus
|
||||||
@xref{Errors and Events,,, dbus, D-Bus integration in Emacs}.
|
integration in Emacs}.
|
||||||
|
|
||||||
@item end-of-buffer
|
@item end-of-buffer
|
||||||
@code{"End of buffer"}@*
|
The message is @samp{End of buffer}. @xref{Character Motion}.
|
||||||
@xref{Character Motion}.
|
|
||||||
|
|
||||||
@item end-of-file
|
@item end-of-file
|
||||||
@code{"End of file during parsing"}@*
|
The message is @samp{End of file during parsing}. Note that this is
|
||||||
Note that this is not a subcategory of @code{file-error},
|
not a subcategory of @code{file-error}, because it pertains to the
|
||||||
because it pertains to the Lisp reader, not to file I/O.@*
|
Lisp reader, not to file I/O. @xref{Input Functions}.
|
||||||
@xref{Input Functions}.
|
|
||||||
|
|
||||||
@item file-already-exists
|
@item file-already-exists
|
||||||
This is a subcategory of @code{file-error}.@*
|
This is a subcategory of @code{file-error}. @xref{Writing to Files}.
|
||||||
@xref{Writing to Files}.
|
|
||||||
|
|
||||||
@item file-date-error
|
@item file-date-error
|
||||||
This is a subcategory of @code{file-error}. It occurs when
|
This is a subcategory of @code{file-error}. It occurs when
|
||||||
@code{copy-file} tries and fails to set the last-modification time of
|
@code{copy-file} tries and fails to set the last-modification time of
|
||||||
the output file.@*
|
the output file. @xref{Changing Files}.
|
||||||
@xref{Changing Files}.
|
|
||||||
|
|
||||||
@item file-error
|
@item file-error
|
||||||
We do not list the error-strings of this error and its subcategories,
|
We do not list the error-strings of this error and its subcategories,
|
||||||
|
|
@ -116,122 +107,109 @@ because the error message is normally constructed from the data items
|
||||||
alone when the error condition @code{file-error} is present. Thus,
|
alone when the error condition @code{file-error} is present. Thus,
|
||||||
the error-strings are not very relevant. However, these error symbols
|
the error-strings are not very relevant. However, these error symbols
|
||||||
do have @code{error-message} properties, and if no data is provided,
|
do have @code{error-message} properties, and if no data is provided,
|
||||||
the @code{error-message} property @emph{is} used.@*
|
the @code{error-message} property @emph{is} used. @xref{Files}.
|
||||||
@xref{Files}.
|
|
||||||
|
|
||||||
@c jka-compr.el
|
@c jka-compr.el
|
||||||
@item compression-error
|
@item compression-error
|
||||||
This is a subcategory of @code{file-error}, which results from
|
This is a subcategory of @code{file-error}, which results from
|
||||||
problems handling a compressed file.@*
|
problems handling a compressed file. @xref{How Programs Do Loading}.
|
||||||
@xref{How Programs Do Loading}.
|
|
||||||
|
|
||||||
@c userlock.el
|
@c userlock.el
|
||||||
@item file-locked
|
@item file-locked
|
||||||
This is a subcategory of @code{file-error}.@*
|
This is a subcategory of @code{file-error}. @xref{File Locks}.
|
||||||
@xref{File Locks}.
|
|
||||||
|
|
||||||
@c userlock.el
|
@c userlock.el
|
||||||
@item file-supersession
|
@item file-supersession
|
||||||
This is a subcategory of @code{file-error}.@*
|
This is a subcategory of @code{file-error}. @xref{Modification Time}.
|
||||||
@xref{Modification Time}.
|
|
||||||
|
|
||||||
@c net/ange-ftp.el
|
@c net/ange-ftp.el
|
||||||
@item ftp-error
|
@item ftp-error
|
||||||
This is a subcategory of @code{file-error}, which results from problems
|
This is a subcategory of @code{file-error}, which results from
|
||||||
in accessing a remote file using ftp.@*
|
problems in accessing a remote file using ftp. @xref{Remote Files,,,
|
||||||
@xref{Remote Files,,, emacs, The GNU Emacs Manual}.
|
emacs, The GNU Emacs Manual}.
|
||||||
|
|
||||||
@item invalid-function
|
@item invalid-function
|
||||||
@code{"Invalid function"}@*
|
The message is @samp{Invalid function}. @xref{Function Indirection}.
|
||||||
@xref{Function Indirection}.
|
|
||||||
|
|
||||||
@item invalid-read-syntax
|
@item invalid-read-syntax
|
||||||
@code{"Invalid read syntax"}@*
|
The message is @samp{Invalid read syntax}. @xref{Printed
|
||||||
@xref{Printed Representation}.
|
Representation}.
|
||||||
|
|
||||||
@item invalid-regexp
|
@item invalid-regexp
|
||||||
@code{"Invalid regexp"}@*
|
The message is @samp{Invalid regexp}. @xref{Regular Expressions}.
|
||||||
@xref{Regular Expressions}.
|
|
||||||
|
|
||||||
@c simple.el
|
@c simple.el
|
||||||
@item mark-inactive
|
@item mark-inactive
|
||||||
@code{"The mark is not active now"}@*
|
The message is @samp{The mark is not active now}. @xref{The Mark}.
|
||||||
@xref{The Mark}.
|
|
||||||
|
|
||||||
@item no-catch
|
@item no-catch
|
||||||
@code{"No catch for tag"}@*
|
The message is @samp{No catch for tag}. @xref{Catch and Throw}.
|
||||||
@xref{Catch and Throw}.
|
|
||||||
|
|
||||||
@ignore
|
@ignore
|
||||||
@c Not actually used for anything? Probably definition should be removed.
|
@c Not actually used for anything? Probably definition should be removed.
|
||||||
@item protected-field
|
@item protected-field
|
||||||
@code{"Attempt to modify a protected field"}
|
The message is @samp{Attempt to modify a protected fiel.
|
||||||
@end ignore
|
@end ignore
|
||||||
|
|
||||||
@item scan-error
|
@item scan-error
|
||||||
@code{"Scan error"}@*
|
The message is @samp{Scan error}. This happens when certain
|
||||||
This happens when certain syntax-parsing functions
|
syntax-parsing functions find invalid syntax or mismatched
|
||||||
find invalid syntax or mismatched parentheses.@*
|
parentheses. @xref{List Motion}, and @xref{Parsing Expressions}.
|
||||||
@xref{List Motion}, and @ref{Parsing Expressions}.
|
|
||||||
|
|
||||||
@item search-failed
|
@item search-failed
|
||||||
@code{"Search failed"}@*
|
The message is @samp{Search failed}. @xref{Searching and Matching}.
|
||||||
@xref{Searching and Matching}.
|
|
||||||
|
|
||||||
@item setting-constant
|
@item setting-constant
|
||||||
@code{"Attempt to set a constant symbol"}@*
|
The message is @samp{Attempt to set a constant symbol}. This happens
|
||||||
The values of the symbols @code{nil} and @code{t},
|
when attempting to assign values to @code{nil}, @code{t}, and keyword
|
||||||
and any symbols that start with @samp{:},
|
symbols. @xref{Constant Variables}.
|
||||||
may not be changed.@*
|
|
||||||
@xref{Constant Variables, , Variables that Never Change}.
|
|
||||||
|
|
||||||
@c simple.el
|
@c simple.el
|
||||||
@item text-read-only
|
@item text-read-only
|
||||||
@code{"Text is read-only"}@*
|
The message is @samp{Text is read-only}. This is a subcategory of
|
||||||
This is a subcategory of @code{buffer-read-only}.@*
|
@code{buffer-read-only}. @xref{Special Properties}.
|
||||||
@xref{Special Properties}.
|
|
||||||
|
|
||||||
@item undefined-color
|
@item undefined-color
|
||||||
@code{"Undefined color"}@*
|
The message is @samp{Undefined color}. @xref{Color Names}.
|
||||||
@xref{Color Names}.
|
|
||||||
|
|
||||||
@item void-function
|
@item void-function
|
||||||
@code{"Symbol's function definition is void"}@*
|
The message is @samp{Symbol's function definition is void}.
|
||||||
@xref{Function Cells}.
|
@xref{Function Cells}.
|
||||||
|
|
||||||
@item void-variable
|
@item void-variable
|
||||||
@code{"Symbol's value as variable is void"}@*
|
The message is @samp{Symbol's value as variable is void}.
|
||||||
@xref{Accessing Variables}.
|
@xref{Accessing Variables}.
|
||||||
|
|
||||||
@item wrong-number-of-arguments
|
@item wrong-number-of-arguments
|
||||||
@code{"Wrong number of arguments"}@*
|
The message is @samp{Wrong number of arguments}. @xref{Classifying
|
||||||
@xref{Classifying Lists}.
|
Lists}.
|
||||||
|
|
||||||
@item wrong-type-argument
|
@item wrong-type-argument
|
||||||
@code{"Wrong type argument"}@*
|
The message is @samp{Wrong type argument}. @xref{Type Predicates}.
|
||||||
@xref{Type Predicates}.
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
|
@ignore The following seem to be unused now.
|
||||||
The following kinds of error, which are classified as special cases of
|
The following kinds of error, which are classified as special cases of
|
||||||
@code{arith-error}, can occur on certain systems for invalid use of
|
@code{arith-error}, can occur on certain systems for invalid use of
|
||||||
mathematical functions. @xref{Math Functions}.
|
mathematical functions. @xref{Math Functions}.
|
||||||
|
|
||||||
@table @code
|
@table @code
|
||||||
@item domain-error
|
@item domain-error
|
||||||
@code{"Arithmetic domain error"}
|
The message is @samp{Arithmetic domain error}.
|
||||||
|
|
||||||
@item overflow-error
|
@item overflow-error
|
||||||
@code{"Arithmetic overflow error"}@*
|
The message is @samp{Arithmetic overflow error}. This is a subcategory
|
||||||
This is a subcategory of @code{domain-error}.
|
of @code{domain-error}.
|
||||||
|
|
||||||
@item range-error
|
@item range-error
|
||||||
@code{"Arithmetic range error"}
|
The message is @code{Arithmetic range error}.
|
||||||
|
|
||||||
@item singularity-error
|
@item singularity-error
|
||||||
@code{"Arithmetic singularity error"}@*
|
The mssage is @samp{Arithmetic singularity error}. This is a
|
||||||
This is a subcategory of @code{domain-error}.
|
subcategory of @code{domain-error}.
|
||||||
|
|
||||||
@item underflow-error
|
@item underflow-error
|
||||||
@code{"Arithmetic underflow error"}@*
|
The message is @samp{Arithmetic underflow error}. This is a
|
||||||
This is a subcategory of @code{domain-error}.
|
subcategory of @code{domain-error}.
|
||||||
@end table
|
@end table
|
||||||
|
@end ignore
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ arguments, except where noted. @xref{Magic File Names}, for details.
|
||||||
When file I/O functions signal Lisp errors, they usually use the
|
When file I/O functions signal Lisp errors, they usually use the
|
||||||
condition @code{file-error} (@pxref{Handling Errors}). The error
|
condition @code{file-error} (@pxref{Handling Errors}). The error
|
||||||
message is in most cases obtained from the operating system, according
|
message is in most cases obtained from the operating system, according
|
||||||
to locale @code{system-message-locale}, and decoded using coding system
|
to locale @code{system-messages-locale}, and decoded using coding system
|
||||||
@code{locale-coding-system} (@pxref{Locales}).
|
@code{locale-coding-system} (@pxref{Locales}).
|
||||||
|
|
||||||
@menu
|
@menu
|
||||||
|
|
|
||||||
|
|
@ -1529,24 +1529,14 @@ track of such changes. @xref{Misc Events}.
|
||||||
@node Raising and Lowering
|
@node Raising and Lowering
|
||||||
@section Raising and Lowering Frames
|
@section Raising and Lowering Frames
|
||||||
|
|
||||||
Most window systems use a desktop metaphor. Part of this metaphor is
|
@cindex raising a frame
|
||||||
the idea that windows are stacked in a notional third dimension
|
|
||||||
perpendicular to the screen surface, and thus ordered from ``highest''
|
|
||||||
to ``lowest''. Where two windows overlap, the one higher up covers
|
|
||||||
the one underneath. Even a window at the bottom of the stack can be
|
|
||||||
seen if no other window overlaps it.
|
|
||||||
|
|
||||||
@c @cindex raising a frame redundant with raise-frame
|
|
||||||
@cindex lowering a frame
|
@cindex lowering a frame
|
||||||
A window's place in this ordering is not fixed; in fact, users tend
|
Most window systems use a desktop metaphor. Part of this metaphor
|
||||||
to change the order frequently. @dfn{Raising} a window means moving
|
is the idea that system-level windows (e.g.@: Emacs frames) are
|
||||||
it ``up'', to the top of the stack. @dfn{Lowering} a window means
|
stacked in a notional third dimension perpendicular to the screen
|
||||||
moving it to the bottom of the stack. This motion is in the notional
|
surface. Where two overlap, the one higher up covers the one
|
||||||
third dimension only, and does not change the position of the window
|
underneath. You can @dfn{raise} or @dfn{lower} a frame using the
|
||||||
on the screen.
|
functions @code{raise-frame} and @code{lower-frame}.
|
||||||
|
|
||||||
With Emacs, frames constitute the windows in the metaphor sketched
|
|
||||||
above. You can raise and lower frames using these functions:
|
|
||||||
|
|
||||||
@deffn Command raise-frame &optional frame
|
@deffn Command raise-frame &optional frame
|
||||||
This function raises frame @var{frame} (default, the selected frame).
|
This function raises frame @var{frame} (default, the selected frame).
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ define them.
|
||||||
* Closures:: Functions that enclose a lexical environment.
|
* Closures:: Functions that enclose a lexical environment.
|
||||||
* Obsolete Functions:: Declaring functions obsolete.
|
* Obsolete Functions:: Declaring functions obsolete.
|
||||||
* Inline Functions:: Functions that the compiler will expand inline.
|
* Inline Functions:: Functions that the compiler will expand inline.
|
||||||
|
* Declare Form:: Adding additional information about a function.
|
||||||
* Declaring Functions:: Telling the compiler that a function is defined.
|
* Declaring Functions:: Telling the compiler that a function is defined.
|
||||||
* Function Safety:: Determining whether a function is safe to call.
|
* Function Safety:: Determining whether a function is safe to call.
|
||||||
* Related Topics:: Cross-references to specific Lisp primitives
|
* Related Topics:: Cross-references to specific Lisp primitives
|
||||||
|
|
@ -521,7 +522,7 @@ Scheme.)
|
||||||
is called @dfn{defining a function}, and it is done with the
|
is called @dfn{defining a function}, and it is done with the
|
||||||
@code{defun} special form.
|
@code{defun} special form.
|
||||||
|
|
||||||
@defspec defun name argument-list body-forms...
|
@defmac defun name argument-list body-forms...
|
||||||
@code{defun} is the usual way to define new Lisp functions. It
|
@code{defun} is the usual way to define new Lisp functions. It
|
||||||
defines the symbol @var{name} as a function that looks like this:
|
defines the symbol @var{name} as a function that looks like this:
|
||||||
|
|
||||||
|
|
@ -578,7 +579,7 @@ without any hesitation or notification. Emacs does not prevent you
|
||||||
from doing this, because redefining a function is sometimes done
|
from doing this, because redefining a function is sometimes done
|
||||||
deliberately, and there is no way to distinguish deliberate
|
deliberately, and there is no way to distinguish deliberate
|
||||||
redefinition from unintentional redefinition.
|
redefinition from unintentional redefinition.
|
||||||
@end defspec
|
@end defmac
|
||||||
|
|
||||||
@cindex function aliases
|
@cindex function aliases
|
||||||
@defun defalias name definition &optional docstring
|
@defun defalias name definition &optional docstring
|
||||||
|
|
@ -1132,29 +1133,46 @@ examining or altering the structure of closure objects.
|
||||||
@node Obsolete Functions
|
@node Obsolete Functions
|
||||||
@section Declaring Functions Obsolete
|
@section Declaring Functions Obsolete
|
||||||
|
|
||||||
You can use @code{make-obsolete} to declare a function obsolete. This
|
You can mark a named function as @dfn{obsolete}, meaning that it may
|
||||||
indicates that the function may be removed at some stage in the future.
|
be removed at some point in the future. This causes Emacs to warn
|
||||||
|
that the function is obsolete whenever it byte-compiles code
|
||||||
|
containing that function, and whenever it displays the documentation
|
||||||
|
for that function. In all other respects, an obsolete function
|
||||||
|
behaves like any other function.
|
||||||
|
|
||||||
|
The easiest way to mark a function as obsolete is to put a
|
||||||
|
@code{(declare (obsolete @dots{}))} form in the function's
|
||||||
|
@code{defun} definition. @xref{Declare Form}. Alternatively, you can
|
||||||
|
use the @code{make-obsolete} function, described below.
|
||||||
|
|
||||||
|
A macro (@pxref{Macros}) can also be marked obsolete with
|
||||||
|
@code{make-obsolete}; this has the same effects as for a function. An
|
||||||
|
alias for a function or macro can also be marked as obsolete; this
|
||||||
|
makes the alias itself obsolete, not the function or macro which it
|
||||||
|
resolves to.
|
||||||
|
|
||||||
@defun make-obsolete obsolete-name current-name &optional when
|
@defun make-obsolete obsolete-name current-name &optional when
|
||||||
This function makes the byte compiler warn that the function
|
This function marks @var{obsolete-name} as obsolete.
|
||||||
@var{obsolete-name} is obsolete. If @var{current-name} is a symbol, the
|
@var{obsolete-name} should be a symbol naming a function or macro, or
|
||||||
warning message says to use @var{current-name} instead of
|
an alias for a function or macro.
|
||||||
@var{obsolete-name}. @var{current-name} does not need to be an alias for
|
|
||||||
@var{obsolete-name}; it can be a different function with similar
|
If @var{current-name} is a symbol, the warning message says to use
|
||||||
functionality. If @var{current-name} is a string, it is the warning
|
@var{current-name} instead of @var{obsolete-name}. @var{current-name}
|
||||||
message.
|
does not need to be an alias for @var{obsolete-name}; it can be a
|
||||||
|
different function with similar functionality. @var{current-name} can
|
||||||
|
also be a string, which serves as the warning message. The message
|
||||||
|
should begin in lower case, and end with a period. It can also be
|
||||||
|
@code{nil}, in which case the warning message provides no additional
|
||||||
|
details.
|
||||||
|
|
||||||
If provided, @var{when} should be a string indicating when the function
|
If provided, @var{when} should be a string indicating when the function
|
||||||
was first made obsolete---for example, a date or a release number.
|
was first made obsolete---for example, a date or a release number.
|
||||||
@end defun
|
@end defun
|
||||||
|
|
||||||
You can define a function as an alias and declare it obsolete at the
|
|
||||||
same time using the macro @code{define-obsolete-function-alias}:
|
|
||||||
|
|
||||||
@defmac define-obsolete-function-alias obsolete-name current-name &optional when docstring
|
@defmac define-obsolete-function-alias obsolete-name current-name &optional when docstring
|
||||||
This macro marks the function @var{obsolete-name} obsolete and also
|
This convenience macro marks the function @var{obsolete-name} obsolete
|
||||||
defines it as an alias for the function @var{current-name}. It is
|
and also defines it as an alias for the function @var{current-name}.
|
||||||
equivalent to the following:
|
It is equivalent to the following:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
(defalias @var{obsolete-name} @var{current-name} @var{docstring})
|
(defalias @var{obsolete-name} @var{current-name} @var{docstring})
|
||||||
|
|
@ -1236,6 +1254,63 @@ body uses the arguments, as you do for macros.
|
||||||
After an inline function is defined, its inline expansion can be
|
After an inline function is defined, its inline expansion can be
|
||||||
performed later on in the same file, just like macros.
|
performed later on in the same file, just like macros.
|
||||||
|
|
||||||
|
@node Declare Form
|
||||||
|
@section The @code{declare} Form
|
||||||
|
@findex declare
|
||||||
|
|
||||||
|
@code{declare} is a special macro which can be used to add ``meta''
|
||||||
|
properties to a function or macro: for example, marking it as
|
||||||
|
obsolete, or giving its forms a special @key{TAB} indentation
|
||||||
|
convention in Emacs Lisp mode.
|
||||||
|
|
||||||
|
@anchor{Definition of declare}
|
||||||
|
@defmac declare @var{specs}@dots{}
|
||||||
|
This macro ignores its arguments and evaluates to @code{nil}; it has
|
||||||
|
no run-time effect. However, when a @code{declare} form occurs as the
|
||||||
|
@emph{very first form} in the body of a @code{defun} function
|
||||||
|
definition or a @code{defmacro} macro definition (@pxref{Defining
|
||||||
|
Macros}, for a description of @code{defmacro}), it appends the
|
||||||
|
properties specified by @var{specs} to the function or macro. This
|
||||||
|
work is specially performed by the @code{defun} and @code{defmacro}
|
||||||
|
macros.
|
||||||
|
|
||||||
|
Note that if you put a @code{declare} form in an interactive function,
|
||||||
|
it should go before the @code{interactive} form.
|
||||||
|
|
||||||
|
Each element in @var{specs} should have the form @code{(@var{property}
|
||||||
|
@var{args}@dots{})}, which should not be quoted. These have the
|
||||||
|
following effects:
|
||||||
|
|
||||||
|
@table @code
|
||||||
|
@item (advertised-calling-convention @var{signature} @var{when})
|
||||||
|
This acts like a call to @code{set-advertised-calling-convention}
|
||||||
|
(@pxref{Obsolete Functions}); @var{signature} specifies the correct
|
||||||
|
argument list for calling the function or macro, and @var{when} should
|
||||||
|
be a string indicating when the variable was first made obsolete.
|
||||||
|
|
||||||
|
@item (debug @var{edebug-form-spec})
|
||||||
|
This is valid for macros only. When stepping through the macro with
|
||||||
|
Edebug, use @var{edebug-form-spec}. @xref{Instrumenting Macro Calls}.
|
||||||
|
|
||||||
|
@item (doc-string @var{n})
|
||||||
|
Use element number @var{n}, if any, as the documentation string.
|
||||||
|
|
||||||
|
@item (indent @var{indent-spec})
|
||||||
|
Indent calls to this function or macro according to @var{indent-spec}.
|
||||||
|
This is typically used for macros, though it works for functions too.
|
||||||
|
@xref{Indenting Macros}.
|
||||||
|
|
||||||
|
@item (obsolete @var{current-name} @var{when})
|
||||||
|
Mark the function or macro as obsolete, similar to a call to
|
||||||
|
@code{make-obsolete} (@pxref{Obsolete Functions}). @var{current-name}
|
||||||
|
should be a symbol (in which case the warning message says to use that
|
||||||
|
instead), a string (specifying the warning message), or @code{nil} (in
|
||||||
|
which case the warning message gives no extra details). @var{when}
|
||||||
|
should be a string indicating when the function or macro was first
|
||||||
|
made obsolete.
|
||||||
|
@end table
|
||||||
|
@end defmac
|
||||||
|
|
||||||
@node Declaring Functions
|
@node Declaring Functions
|
||||||
@section Telling the Compiler that a Function is Defined
|
@section Telling the Compiler that a Function is Defined
|
||||||
@cindex function declaration
|
@cindex function declaration
|
||||||
|
|
|
||||||
|
|
@ -58,11 +58,17 @@ use @kbd{C-h f} (@code{describe-function}) or @kbd{C-h v}
|
||||||
are many other conventions for documentation strings; see
|
are many other conventions for documentation strings; see
|
||||||
@ref{Documentation Tips}.
|
@ref{Documentation Tips}.
|
||||||
|
|
||||||
Documentation strings can contain several special substrings, which
|
Documentation strings can contain several special text sequences,
|
||||||
stand for key bindings to be looked up in the current keymaps when the
|
referring to key bindings which are looked up in the current keymaps
|
||||||
documentation is displayed. This allows documentation strings to refer
|
when the user views the documentation. This allows the help commands
|
||||||
to the keys for related commands and be accurate even when a user
|
to display the correct keys even if a user rearranges the default key
|
||||||
rearranges the key bindings. (@xref{Keys in Documentation}.)
|
bindings. @xref{Keys in Documentation}.
|
||||||
|
|
||||||
|
In the documentation string of an autoloaded command
|
||||||
|
(@pxref{Autoload}), these special text sequences have an additional
|
||||||
|
special effect: they cause @kbd{C-h f} (@code{describe-function}) on
|
||||||
|
the command to trigger autoloading. (This is needed for correctly
|
||||||
|
setting up the hyperlinks in the @file{*Help*} buffer).
|
||||||
|
|
||||||
@vindex emacs-lisp-docstring-fill-column
|
@vindex emacs-lisp-docstring-fill-column
|
||||||
Emacs Lisp mode fills documentation strings to the width
|
Emacs Lisp mode fills documentation strings to the width
|
||||||
|
|
|
||||||
|
|
@ -384,11 +384,13 @@ non-@acronym{ASCII} characters written as @code{?v@var{literal}}.
|
||||||
@section Autoload
|
@section Autoload
|
||||||
@cindex autoload
|
@cindex autoload
|
||||||
|
|
||||||
The @dfn{autoload} facility allows you to register the existence of
|
The @dfn{autoload} facility lets you register the existence of a
|
||||||
a function or macro, but put off loading the file that defines it.
|
function or macro, but put off loading the file that defines it. The
|
||||||
The first call to the function automatically reads the proper file, in
|
first call to the function automatically loads the proper library, in
|
||||||
order to install the real definition and other associated code, then
|
order to install the real definition and other associated code, then
|
||||||
runs the real definition as if it had been loaded all along.
|
runs the real definition as if it had been loaded all along.
|
||||||
|
Autoloading can also be triggered by looking up the documentation of
|
||||||
|
the function or macro (@pxref{Documentation Basics}).
|
||||||
|
|
||||||
There are two ways to set up an autoloaded function: by calling
|
There are two ways to set up an autoloaded function: by calling
|
||||||
@code{autoload}, and by writing a special ``magic'' comment in the
|
@code{autoload}, and by writing a special ``magic'' comment in the
|
||||||
|
|
|
||||||
|
|
@ -235,43 +235,8 @@ of constants and nonconstant parts. To make this easier, use the
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
The body of a macro definition can include a @code{declare} form,
|
The body of a macro definition can include a @code{declare} form,
|
||||||
which can specify how @key{TAB} should indent macro calls, and how to
|
which specifies additional properties about the macro. @xref{Declare
|
||||||
step through them for Edebug.
|
Form}.
|
||||||
|
|
||||||
@defmac declare @var{specs}@dots{}
|
|
||||||
@anchor{Definition of declare}
|
|
||||||
A @code{declare} form is used in a macro definition to specify various
|
|
||||||
additional information about it. The following specifications are
|
|
||||||
currently supported:
|
|
||||||
|
|
||||||
@table @code
|
|
||||||
@item (debug @var{edebug-form-spec})
|
|
||||||
Specify how to step through macro calls for Edebug.
|
|
||||||
@xref{Instrumenting Macro Calls}.
|
|
||||||
|
|
||||||
@item (indent @var{indent-spec})
|
|
||||||
Specify how to indent calls to this macro. @xref{Indenting Macros},
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
@item (doc-string @var{number})
|
|
||||||
Specify which element of the macro is the documentation string, if
|
|
||||||
any.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
A @code{declare} form only has its special effect in the body of a
|
|
||||||
@code{defmacro} form if it immediately follows the documentation
|
|
||||||
string, if present, or the argument list otherwise. (Strictly
|
|
||||||
speaking, @emph{several} @code{declare} forms can follow the
|
|
||||||
documentation string or argument list, but since a @code{declare} form
|
|
||||||
can have several @var{specs}, they can always be combined into a
|
|
||||||
single form.) When used at other places in a @code{defmacro} form, or
|
|
||||||
outside a @code{defmacro} form, @code{declare} just returns @code{nil}
|
|
||||||
without evaluating any @var{specs}.
|
|
||||||
@end defmac
|
|
||||||
|
|
||||||
No macro absolutely needs a @code{declare} form, because that form
|
|
||||||
has no effect on how the macro expands, on what the macro means in the
|
|
||||||
program. It only affects the secondary features listed above.
|
|
||||||
|
|
||||||
@node Problems with Macros
|
@node Problems with Macros
|
||||||
@section Common Problems Using Macros
|
@section Common Problems Using Macros
|
||||||
|
|
|
||||||
|
|
@ -48,9 +48,8 @@ to
|
||||||
@tex
|
@tex
|
||||||
@math{2^{29}-1}),
|
@math{2^{29}-1}),
|
||||||
@end tex
|
@end tex
|
||||||
but some machines provide a wider range. Many examples in this
|
but many machines provide a wider range. Many examples in this
|
||||||
chapter assume that an integer has 30 bits and that floating point
|
chapter assume the minimum integer width of 30 bits.
|
||||||
numbers are IEEE double precision.
|
|
||||||
@cindex overflow
|
@cindex overflow
|
||||||
|
|
||||||
The Lisp reader reads an integer as a sequence of digits with optional
|
The Lisp reader reads an integer as a sequence of digits with optional
|
||||||
|
|
@ -160,8 +159,9 @@ The value of this variable is the smallest integer that Emacs Lisp can
|
||||||
handle. It is negative.
|
handle. It is negative.
|
||||||
@end defvar
|
@end defvar
|
||||||
|
|
||||||
@xref{Character Codes, max-char}, for the maximum value of a valid
|
In Emacs Lisp, text characters are represented by integers. Any
|
||||||
character codepoint.
|
integer between zero and the value of @code{max-char}, inclusive, is
|
||||||
|
considered to be valid as a character. @xref{String Basics}.
|
||||||
|
|
||||||
@node Float Basics
|
@node Float Basics
|
||||||
@section Floating Point Basics
|
@section Floating Point Basics
|
||||||
|
|
@ -171,8 +171,8 @@ character codepoint.
|
||||||
not integral. The precise range of floating point numbers is
|
not integral. The precise range of floating point numbers is
|
||||||
machine-specific; it is the same as the range of the C data type
|
machine-specific; it is the same as the range of the C data type
|
||||||
@code{double} on the machine you are using. Emacs uses the
|
@code{double} on the machine you are using. Emacs uses the
|
||||||
@acronym{IEEE} floating point standard where possible (the standard is
|
@acronym{IEEE} floating point standard, which is supported by all
|
||||||
supported by most modern computers).
|
modern computers.
|
||||||
|
|
||||||
The read syntax for floating point numbers requires either a decimal
|
The read syntax for floating point numbers requires either a decimal
|
||||||
point (with at least one digit following), an exponent, or both. For
|
point (with at least one digit following), an exponent, or both. For
|
||||||
|
|
@ -316,17 +316,16 @@ compare them, then you test whether two values are the same
|
||||||
@emph{object}. By contrast, @code{=} compares only the numeric values
|
@emph{object}. By contrast, @code{=} compares only the numeric values
|
||||||
of the objects.
|
of the objects.
|
||||||
|
|
||||||
At present, each integer value has a unique Lisp object in Emacs Lisp.
|
In Emacs Lisp, each integer value is a unique Lisp object.
|
||||||
Therefore, @code{eq} is equivalent to @code{=} where integers are
|
Therefore, @code{eq} is equivalent to @code{=} where integers are
|
||||||
concerned. It is sometimes convenient to use @code{eq} for comparing an
|
concerned. It is sometimes convenient to use @code{eq} for comparing
|
||||||
unknown value with an integer, because @code{eq} does not report an
|
an unknown value with an integer, because @code{eq} does not report an
|
||||||
error if the unknown value is not a number---it accepts arguments of any
|
error if the unknown value is not a number---it accepts arguments of
|
||||||
type. By contrast, @code{=} signals an error if the arguments are not
|
any type. By contrast, @code{=} signals an error if the arguments are
|
||||||
numbers or markers. However, it is a good idea to use @code{=} if you
|
not numbers or markers. However, it is better programming practice to
|
||||||
can, even for comparing integers, just in case we change the
|
use @code{=} if you can, even for comparing integers.
|
||||||
representation of integers in a future Emacs version.
|
|
||||||
|
|
||||||
Sometimes it is useful to compare numbers with @code{equal}; it
|
Sometimes it is useful to compare numbers with @code{equal}, which
|
||||||
treats two numbers as equal if they have the same data type (both
|
treats two numbers as equal if they have the same data type (both
|
||||||
integers, or both floating point) and the same value. By contrast,
|
integers, or both floating point) and the same value. By contrast,
|
||||||
@code{=} can treat an integer and a floating point number as equal.
|
@code{=} can treat an integer and a floating point number as equal.
|
||||||
|
|
@ -439,15 +438,16 @@ If @var{number} is already a floating point number, @code{float} returns
|
||||||
it unchanged.
|
it unchanged.
|
||||||
@end defun
|
@end defun
|
||||||
|
|
||||||
There are four functions to convert floating point numbers to integers;
|
There are four functions to convert floating point numbers to
|
||||||
they differ in how they round. All accept an argument @var{number}
|
integers; they differ in how they round. All accept an argument
|
||||||
and an optional argument @var{divisor}. Both arguments may be
|
@var{number} and an optional argument @var{divisor}. Both arguments
|
||||||
integers or floating point numbers. @var{divisor} may also be
|
may be integers or floating point numbers. @var{divisor} may also be
|
||||||
@code{nil}. If @var{divisor} is @code{nil} or omitted, these
|
@code{nil}. If @var{divisor} is @code{nil} or omitted, these
|
||||||
functions convert @var{number} to an integer, or return it unchanged
|
functions convert @var{number} to an integer, or return it unchanged
|
||||||
if it already is an integer. If @var{divisor} is non-@code{nil}, they
|
if it already is an integer. If @var{divisor} is non-@code{nil}, they
|
||||||
divide @var{number} by @var{divisor} and convert the result to an
|
divide @var{number} by @var{divisor} and convert the result to an
|
||||||
integer. An @code{arith-error} results if @var{divisor} is 0.
|
integer. integer. If @var{divisor} is zero (whether integer or
|
||||||
|
floating-point), Emacs signals an @code{arith-error} error.
|
||||||
|
|
||||||
@defun truncate number &optional divisor
|
@defun truncate number &optional divisor
|
||||||
This returns @var{number}, converted to an integer by rounding towards
|
This returns @var{number}, converted to an integer by rounding towards
|
||||||
|
|
@ -524,14 +524,12 @@ depending on your machine.
|
||||||
@section Arithmetic Operations
|
@section Arithmetic Operations
|
||||||
@cindex arithmetic operations
|
@cindex arithmetic operations
|
||||||
|
|
||||||
Emacs Lisp provides the traditional four arithmetic operations:
|
Emacs Lisp provides the traditional four arithmetic operations
|
||||||
addition, subtraction, multiplication, and division. Remainder and modulus
|
(addition, subtraction, multiplication, and division), as well as
|
||||||
functions supplement the division functions. The functions to
|
remainder and modulus functions, and functions to add or subtract 1.
|
||||||
add or subtract 1 are provided because they are traditional in Lisp and
|
Except for @code{%}, each of these functions accepts both integer and
|
||||||
commonly used.
|
floating point arguments, and returns a floating point number if any
|
||||||
|
argument is a floating point number.
|
||||||
All of these functions except @code{%} return a floating point value
|
|
||||||
if any argument is floating.
|
|
||||||
|
|
||||||
It is important to note that in Emacs Lisp, arithmetic functions
|
It is important to note that in Emacs Lisp, arithmetic functions
|
||||||
do not check for overflow. Thus @code{(1+ 536870911)} may evaluate to
|
do not check for overflow. Thus @code{(1+ 536870911)} may evaluate to
|
||||||
|
|
@ -620,40 +618,49 @@ quotient. If there are additional arguments @var{divisors}, then it
|
||||||
divides @var{dividend} by each divisor in turn. Each argument may be a
|
divides @var{dividend} by each divisor in turn. Each argument may be a
|
||||||
number or a marker.
|
number or a marker.
|
||||||
|
|
||||||
If all the arguments are integers, then the result is an integer too.
|
If all the arguments are integers, the result is an integer, obtained
|
||||||
This means the result has to be rounded. On most machines, the result
|
by rounding the quotient towards zero after each division.
|
||||||
is rounded towards zero after each division, but some machines may round
|
(Hypothetically, some machines may have different rounding behavior
|
||||||
differently with negative arguments. This is because the Lisp function
|
for negative arguments, because @code{/} is implemented using the C
|
||||||
@code{/} is implemented using the C division operator, which also
|
division operator, which permits machine-dependent rounding; but this
|
||||||
permits machine-dependent rounding. As a practical matter, all known
|
does not happen in practice.)
|
||||||
machines round in the standard fashion.
|
|
||||||
|
|
||||||
@cindex @code{arith-error} in division
|
|
||||||
If you divide an integer by 0, an @code{arith-error} error is signaled.
|
|
||||||
(@xref{Errors}.) Floating point division by zero returns either
|
|
||||||
infinity or a NaN if your machine supports @acronym{IEEE} floating point;
|
|
||||||
otherwise, it signals an @code{arith-error} error.
|
|
||||||
|
|
||||||
@example
|
@example
|
||||||
@group
|
@group
|
||||||
(/ 6 2)
|
(/ 6 2)
|
||||||
@result{} 3
|
@result{} 3
|
||||||
@end group
|
@end group
|
||||||
|
@group
|
||||||
(/ 5 2)
|
(/ 5 2)
|
||||||
@result{} 2
|
@result{} 2
|
||||||
|
@end group
|
||||||
|
@group
|
||||||
(/ 5.0 2)
|
(/ 5.0 2)
|
||||||
@result{} 2.5
|
@result{} 2.5
|
||||||
|
@end group
|
||||||
|
@group
|
||||||
(/ 5 2.0)
|
(/ 5 2.0)
|
||||||
@result{} 2.5
|
@result{} 2.5
|
||||||
|
@end group
|
||||||
|
@group
|
||||||
(/ 5.0 2.0)
|
(/ 5.0 2.0)
|
||||||
@result{} 2.5
|
@result{} 2.5
|
||||||
|
@end group
|
||||||
|
@group
|
||||||
(/ 25 3 2)
|
(/ 25 3 2)
|
||||||
@result{} 4
|
@result{} 4
|
||||||
|
@end group
|
||||||
@group
|
@group
|
||||||
(/ -17 6)
|
(/ -17 6)
|
||||||
@result{} -2 @r{(could in theory be @minus{}3 on some machines)}
|
@result{} -2
|
||||||
@end group
|
@end group
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
|
@cindex @code{arith-error} in division
|
||||||
|
If you divide an integer by the integer 0, Emacs signals an
|
||||||
|
@code{arith-error} error (@pxref{Errors}). If you divide a floating
|
||||||
|
point number by 0, or divide by the floating point number 0.0, the
|
||||||
|
result is either positive or negative infinity (@pxref{Float Basics}).
|
||||||
@end defun
|
@end defun
|
||||||
|
|
||||||
@defun % dividend divisor
|
@defun % dividend divisor
|
||||||
|
|
@ -661,22 +668,6 @@ otherwise, it signals an @code{arith-error} error.
|
||||||
This function returns the integer remainder after division of @var{dividend}
|
This function returns the integer remainder after division of @var{dividend}
|
||||||
by @var{divisor}. The arguments must be integers or markers.
|
by @var{divisor}. The arguments must be integers or markers.
|
||||||
|
|
||||||
For negative arguments, the remainder is in principle machine-dependent
|
|
||||||
since the quotient is; but in practice, all known machines behave alike.
|
|
||||||
|
|
||||||
An @code{arith-error} results if @var{divisor} is 0.
|
|
||||||
|
|
||||||
@example
|
|
||||||
(% 9 4)
|
|
||||||
@result{} 1
|
|
||||||
(% -9 4)
|
|
||||||
@result{} -1
|
|
||||||
(% 9 -4)
|
|
||||||
@result{} 1
|
|
||||||
(% -9 -4)
|
|
||||||
@result{} -1
|
|
||||||
@end example
|
|
||||||
|
|
||||||
For any two integers @var{dividend} and @var{divisor},
|
For any two integers @var{dividend} and @var{divisor},
|
||||||
|
|
||||||
@example
|
@example
|
||||||
|
|
@ -687,7 +678,19 @@ For any two integers @var{dividend} and @var{divisor},
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@noindent
|
@noindent
|
||||||
always equals @var{dividend}.
|
always equals @var{dividend}. If @var{divisor} is zero, Emacs signals
|
||||||
|
an @code{arith-error} error.
|
||||||
|
|
||||||
|
@example
|
||||||
|
(% 9 4)
|
||||||
|
@result{} 1
|
||||||
|
(% -9 4)
|
||||||
|
@result{} -1
|
||||||
|
(% 9 -4)
|
||||||
|
@result{} 1
|
||||||
|
(% -9 -4)
|
||||||
|
@result{} -1
|
||||||
|
@end example
|
||||||
@end defun
|
@end defun
|
||||||
|
|
||||||
@defun mod dividend divisor
|
@defun mod dividend divisor
|
||||||
|
|
@ -697,10 +700,9 @@ in other words, the remainder after division of @var{dividend}
|
||||||
by @var{divisor}, but with the same sign as @var{divisor}.
|
by @var{divisor}, but with the same sign as @var{divisor}.
|
||||||
The arguments must be numbers or markers.
|
The arguments must be numbers or markers.
|
||||||
|
|
||||||
Unlike @code{%}, @code{mod} returns a well-defined result for negative
|
Unlike @code{%}, @code{mod} permits floating point arguments; it
|
||||||
arguments. It also permits floating point arguments; it rounds the
|
rounds the quotient downward (towards minus infinity) to an integer,
|
||||||
quotient downward (towards minus infinity) to an integer, and uses that
|
and uses that quotient to compute the remainder.
|
||||||
quotient to compute the remainder.
|
|
||||||
|
|
||||||
If @var{divisor} is zero, @code{mod} signals an @code{arith-error}
|
If @var{divisor} is zero, @code{mod} signals an @code{arith-error}
|
||||||
error if both arguments are integers, and returns a NaN otherwise.
|
error if both arguments are integers, and returns a NaN otherwise.
|
||||||
|
|
@ -1086,8 +1088,8 @@ numbers as arguments.
|
||||||
@defun sin arg
|
@defun sin arg
|
||||||
@defunx cos arg
|
@defunx cos arg
|
||||||
@defunx tan arg
|
@defunx tan arg
|
||||||
These are the ordinary trigonometric functions, with argument measured
|
These are the basic trigonometric functions, with argument @var{arg}
|
||||||
in radians.
|
measured in radians.
|
||||||
@end defun
|
@end defun
|
||||||
|
|
||||||
@defun asin arg
|
@defun asin arg
|
||||||
|
|
@ -1154,20 +1156,6 @@ This function returns the logarithm of @var{arg}, with base
|
||||||
returns a NaN.
|
returns a NaN.
|
||||||
@end defun
|
@end defun
|
||||||
|
|
||||||
@ignore
|
|
||||||
@defun expm1 arg
|
|
||||||
This function returns @code{(1- (exp @var{arg}))}, but it is more
|
|
||||||
accurate than that when @var{arg} is negative and @code{(exp @var{arg})}
|
|
||||||
is close to 1.
|
|
||||||
@end defun
|
|
||||||
|
|
||||||
@defun log1p arg
|
|
||||||
This function returns @code{(log (1+ @var{arg}))}, but it is more
|
|
||||||
accurate than that when @var{arg} is so small that adding 1 to it would
|
|
||||||
lose accuracy.
|
|
||||||
@end defun
|
|
||||||
@end ignore
|
|
||||||
|
|
||||||
@defun log10 arg
|
@defun log10 arg
|
||||||
This function returns the logarithm of @var{arg}, with base 10:
|
This function returns the logarithm of @var{arg}, with base 10:
|
||||||
@code{(log10 @var{x})} @equiv{} @code{(log @var{x} 10)}.
|
@code{(log10 @var{x})} @equiv{} @code{(log @var{x} 10)}.
|
||||||
|
|
@ -1201,18 +1189,18 @@ The mathematical constant @math{pi} (3.14159@dots{}).
|
||||||
@section Random Numbers
|
@section Random Numbers
|
||||||
@cindex random numbers
|
@cindex random numbers
|
||||||
|
|
||||||
A deterministic computer program cannot generate true random numbers.
|
A deterministic computer program cannot generate true random
|
||||||
For most purposes, @dfn{pseudo-random numbers} suffice. A series of
|
numbers. For most purposes, @dfn{pseudo-random numbers} suffice. A
|
||||||
pseudo-random numbers is generated in a deterministic fashion. The
|
series of pseudo-random numbers is generated in a deterministic
|
||||||
numbers are not truly random, but they have certain properties that
|
fashion. The numbers are not truly random, but they have certain
|
||||||
mimic a random series. For example, all possible values occur equally
|
properties that mimic a random series. For example, all possible
|
||||||
often in a pseudo-random series.
|
values occur equally often in a pseudo-random series.
|
||||||
|
|
||||||
In Emacs, pseudo-random numbers are generated from a ``seed''.
|
Pseudo-random numbers are generated from a ``seed''. Starting from
|
||||||
Starting from any given seed, the @code{random} function always
|
any given seed, the @code{random} function always generates the same
|
||||||
generates the same sequence of numbers. Emacs typically starts with a
|
sequence of numbers. By default, Emacs initializes the random seed at
|
||||||
different seed each time, so the sequence of values of @code{random}
|
startup, in such a way that the sequence of values of @code{random}
|
||||||
typically differs in each Emacs run.
|
(with overwhelming likelihood) differs in each Emacs run.
|
||||||
|
|
||||||
Sometimes you want the random number sequence to be repeatable. For
|
Sometimes you want the random number sequence to be repeatable. For
|
||||||
example, when debugging a program whose behavior depends on the random
|
example, when debugging a program whose behavior depends on the random
|
||||||
|
|
@ -1227,8 +1215,10 @@ This function returns a pseudo-random integer. Repeated calls return a
|
||||||
series of pseudo-random integers.
|
series of pseudo-random integers.
|
||||||
|
|
||||||
If @var{limit} is a positive integer, the value is chosen to be
|
If @var{limit} is a positive integer, the value is chosen to be
|
||||||
nonnegative and less than @var{limit}. Otherwise, the value
|
nonnegative and less than @var{limit}. Otherwise, the value might be
|
||||||
might be any integer representable in Lisp.
|
any integer representable in Lisp, i.e.@: an integer between
|
||||||
|
@code{most-negative-fixnum} and @code{most-positive-fixnum}
|
||||||
|
(@pxref{Integer Basics}).
|
||||||
|
|
||||||
If @var{limit} is @code{t}, it means to choose a new seed based on the
|
If @var{limit} is @code{t}, it means to choose a new seed based on the
|
||||||
current time of day and on Emacs's process @acronym{ID} number.
|
current time of day and on Emacs's process @acronym{ID} number.
|
||||||
|
|
|
||||||
|
|
@ -70,13 +70,11 @@ in their turn. The files @file{subdirs.el} are normally generated
|
||||||
automatically when Emacs is installed.
|
automatically when Emacs is installed.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
It registers input methods by loading any @file{leim-list.el} file
|
If the library @file{leim-list.el} exists, Emacs loads it. This
|
||||||
found in the @code{load-path}.
|
optional library is intended for registering input methods; Emacs
|
||||||
|
looks for it in @code{load-path} (@pxref{Library Search}), skipping
|
||||||
@c It removes PWD from the environment if it is not accurate.
|
those directories containing the standard Emacs libraries (since
|
||||||
@c It abbreviates default-directory.
|
@file{leim-list.el} should not exist in those directories).
|
||||||
|
|
||||||
@c Now normal-top-level calls command-line.
|
|
||||||
|
|
||||||
@vindex before-init-time
|
@vindex before-init-time
|
||||||
@item
|
@item
|
||||||
|
|
@ -1159,6 +1157,20 @@ This function returns the effective @acronym{UID} of the user.
|
||||||
The value may be a floating point number.
|
The value may be a floating point number.
|
||||||
@end defun
|
@end defun
|
||||||
|
|
||||||
|
@defun system-users
|
||||||
|
This function returns a list of strings, listing the user names on the
|
||||||
|
system. If Emacs cannot retrieve this information, the return value
|
||||||
|
is a list containing just the value of @code{user-real-login-name}.
|
||||||
|
@end defun
|
||||||
|
|
||||||
|
@cindex user groups
|
||||||
|
@defun system-groups
|
||||||
|
This function returns a list of strings, listing the names of user
|
||||||
|
groups on the system. If Emacs cannot retrieve this information, the
|
||||||
|
return value is @code{nil}.
|
||||||
|
@end defun
|
||||||
|
|
||||||
|
|
||||||
@node Time of Day
|
@node Time of Day
|
||||||
@section Time of Day
|
@section Time of Day
|
||||||
|
|
||||||
|
|
@ -1812,43 +1824,6 @@ minutes, and even if there have been garbage collections and autosaves.
|
||||||
input. Then it becomes idle again, and all the idle timers that are
|
input. Then it becomes idle again, and all the idle timers that are
|
||||||
set up to repeat will subsequently run another time, one by one.
|
set up to repeat will subsequently run another time, one by one.
|
||||||
|
|
||||||
@defun current-idle-time
|
|
||||||
If Emacs is idle, this function returns the length of time Emacs has
|
|
||||||
been idle, as a list of four integers: @code{(@var{sec-high}
|
|
||||||
@var{sec-low} @var{microsec} @var{picosec})}, using the same format as
|
|
||||||
@code{current-time} (@pxref{Time of Day}).
|
|
||||||
|
|
||||||
When Emacs is not idle, @code{current-idle-time} returns @code{nil}.
|
|
||||||
This is a convenient way to test whether Emacs is idle.
|
|
||||||
|
|
||||||
The main use of this function is when an idle timer function wants to
|
|
||||||
``take a break'' for a while. It can set up another idle timer to
|
|
||||||
call the same function again, after a few seconds more idleness.
|
|
||||||
Here's an example:
|
|
||||||
|
|
||||||
@smallexample
|
|
||||||
(defvar resume-timer nil
|
|
||||||
"Timer that `timer-function' used to reschedule itself, or nil.")
|
|
||||||
|
|
||||||
(defun timer-function ()
|
|
||||||
;; @r{If the user types a command while @code{resume-timer}}
|
|
||||||
;; @r{is active, the next time this function is called from}
|
|
||||||
;; @r{its main idle timer, deactivate @code{resume-timer}.}
|
|
||||||
(when resume-timer
|
|
||||||
(cancel-timer resume-timer))
|
|
||||||
...@var{do the work for a while}...
|
|
||||||
(when @var{taking-a-break}
|
|
||||||
(setq resume-timer
|
|
||||||
(run-with-idle-timer
|
|
||||||
;; Compute an idle time @var{break-length}
|
|
||||||
;; more than the current value.
|
|
||||||
(time-add (current-idle-time)
|
|
||||||
(seconds-to-time @var{break-length}))
|
|
||||||
nil
|
|
||||||
'timer-function))))
|
|
||||||
@end smallexample
|
|
||||||
@end defun
|
|
||||||
|
|
||||||
Do not write an idle timer function containing a loop which does a
|
Do not write an idle timer function containing a loop which does a
|
||||||
certain amount of processing each time around, and exits when
|
certain amount of processing each time around, and exits when
|
||||||
@code{(input-pending-p)} is non-@code{nil}. This approach seems very
|
@code{(input-pending-p)} is non-@code{nil}. This approach seems very
|
||||||
|
|
@ -1864,16 +1839,50 @@ It blocks out any idle timers that ought to run during that time.
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
@noindent
|
@noindent
|
||||||
For similar reasons, do not write an idle timer function that sets
|
Similarly, do not write an idle timer function that sets up another
|
||||||
up another idle time (including the same idle timer) with the
|
idle timer (including the same idle timer) with @var{secs} argument
|
||||||
@var{secs} argument less or equal to the current idleness time. Such
|
less than or equal to the current idleness time. Such a timer will
|
||||||
a timer will run almost immediately, and continue running again and
|
run almost immediately, and continue running again and again, instead
|
||||||
again, instead of waiting for the next time Emacs becomes idle.
|
of waiting for the next time Emacs becomes idle. The correct approach
|
||||||
|
is to reschedule with an appropriate increment of the current value of
|
||||||
|
the idleness time, as described below.
|
||||||
|
|
||||||
@noindent
|
@defun current-idle-time
|
||||||
The correct approach is for the idle timer to reschedule itself after
|
If Emacs is idle, this function returns the length of time Emacs has
|
||||||
a brief pause, using the method in the @code{timer-function} example
|
been idle, as a list of four integers: @code{(@var{sec-high}
|
||||||
above.
|
@var{sec-low} @var{microsec} @var{picosec})}, using the same format as
|
||||||
|
@code{current-time} (@pxref{Time of Day}).
|
||||||
|
|
||||||
|
When Emacs is not idle, @code{current-idle-time} returns @code{nil}.
|
||||||
|
This is a convenient way to test whether Emacs is idle.
|
||||||
|
@end defun
|
||||||
|
|
||||||
|
The main use of @code{current-idle-time} is when an idle timer
|
||||||
|
function wants to ``take a break'' for a while. It can set up another
|
||||||
|
idle timer to call the same function again, after a few seconds more
|
||||||
|
idleness. Here's an example:
|
||||||
|
|
||||||
|
@example
|
||||||
|
(defvar my-resume-timer nil
|
||||||
|
"Timer for `my-timer-function' to reschedule itself, or nil.")
|
||||||
|
|
||||||
|
(defun my-timer-function ()
|
||||||
|
;; @r{If the user types a command while @code{my-resume-timer}}
|
||||||
|
;; @r{is active, the next time this function is called from}
|
||||||
|
;; @r{its main idle timer, deactivate @code{my-resume-timer}.}
|
||||||
|
(when my-resume-timer
|
||||||
|
(cancel-timer my-resume-timer))
|
||||||
|
...@var{do the work for a while}...
|
||||||
|
(when @var{taking-a-break}
|
||||||
|
(setq my-resume-timer
|
||||||
|
(run-with-idle-timer
|
||||||
|
;; Compute an idle time @var{break-length}
|
||||||
|
;; more than the current value.
|
||||||
|
(time-add (current-idle-time)
|
||||||
|
(seconds-to-time @var{break-length}))
|
||||||
|
nil
|
||||||
|
'my-timer-function))))
|
||||||
|
@end example
|
||||||
|
|
||||||
@node Terminal Input
|
@node Terminal Input
|
||||||
@section Terminal Input
|
@section Terminal Input
|
||||||
|
|
@ -1907,7 +1916,6 @@ If @var{flow} is non-@code{nil}, then Emacs uses @sc{xon/xoff}
|
||||||
(@kbd{C-q}, @kbd{C-s}) flow control for output to the terminal. This
|
(@kbd{C-q}, @kbd{C-s}) flow control for output to the terminal. This
|
||||||
has no effect except in @sc{cbreak} mode.
|
has no effect except in @sc{cbreak} mode.
|
||||||
|
|
||||||
@c Emacs 19 feature
|
|
||||||
The argument @var{meta} controls support for input character codes
|
The argument @var{meta} controls support for input character codes
|
||||||
above 127. If @var{meta} is @code{t}, Emacs converts characters with
|
above 127. If @var{meta} is @code{t}, Emacs converts characters with
|
||||||
the 8th bit set into Meta characters. If @var{meta} is @code{nil},
|
the 8th bit set into Meta characters. If @var{meta} is @code{nil},
|
||||||
|
|
@ -1916,7 +1924,6 @@ it as a parity bit. If @var{meta} is neither @code{t} nor @code{nil},
|
||||||
Emacs uses all 8 bits of input unchanged. This is good for terminals
|
Emacs uses all 8 bits of input unchanged. This is good for terminals
|
||||||
that use 8-bit character sets.
|
that use 8-bit character sets.
|
||||||
|
|
||||||
@c Emacs 19 feature
|
|
||||||
If @var{quit-char} is non-@code{nil}, it specifies the character to
|
If @var{quit-char} is non-@code{nil}, it specifies the character to
|
||||||
use for quitting. Normally this character is @kbd{C-g}.
|
use for quitting. Normally this character is @kbd{C-g}.
|
||||||
@xref{Quitting}.
|
@xref{Quitting}.
|
||||||
|
|
@ -1925,7 +1932,6 @@ use for quitting. Normally this character is @kbd{C-g}.
|
||||||
The @code{current-input-mode} function returns the input mode settings
|
The @code{current-input-mode} function returns the input mode settings
|
||||||
Emacs is currently using.
|
Emacs is currently using.
|
||||||
|
|
||||||
@c Emacs 19 feature
|
|
||||||
@defun current-input-mode
|
@defun current-input-mode
|
||||||
This function returns the current mode for reading keyboard input. It
|
This function returns the current mode for reading keyboard input. It
|
||||||
returns a list, corresponding to the arguments of @code{set-input-mode},
|
returns a list, corresponding to the arguments of @code{set-input-mode},
|
||||||
|
|
|
||||||
|
|
@ -35,28 +35,31 @@ keyboard character events.
|
||||||
@node String Basics
|
@node String Basics
|
||||||
@section String and Character Basics
|
@section String and Character Basics
|
||||||
|
|
||||||
Characters are represented in Emacs Lisp as integers;
|
A character is a Lisp object which represents a single character of
|
||||||
whether an integer is a character or not is determined only by how it is
|
text. In Emacs Lisp, characters are simply integers; whether an
|
||||||
used. Thus, strings really contain integers. @xref{Character Codes},
|
integer is a character or not is determined only by how it is used.
|
||||||
for details about character representation in Emacs.
|
@xref{Character Codes}, for details about character representation in
|
||||||
|
Emacs.
|
||||||
|
|
||||||
The length of a string (like any array) is fixed, and cannot be
|
A string is a fixed sequence of characters. It is a type of
|
||||||
altered once the string exists. Strings in Lisp are @emph{not}
|
sequence called a @dfn{array}, meaning that its length is fixed and
|
||||||
terminated by a distinguished character code. (By contrast, strings in
|
cannot be altered once it is created (@pxref{Sequences Arrays
|
||||||
C are terminated by a character with @acronym{ASCII} code 0.)
|
Vectors}). Unlike in C, Emacs Lisp strings are @emph{not} terminated
|
||||||
|
by a distinguished character code.
|
||||||
|
|
||||||
Since strings are arrays, and therefore sequences as well, you can
|
Since strings are arrays, and therefore sequences as well, you can
|
||||||
operate on them with the general array and sequence functions.
|
operate on them with the general array and sequence functions
|
||||||
(@xref{Sequences Arrays Vectors}.) For example, you can access or
|
documented in @ref{Sequences Arrays Vectors}. For example, you can
|
||||||
change individual characters in a string using the functions @code{aref}
|
access or change individual characters in a string using the functions
|
||||||
and @code{aset} (@pxref{Array Functions}). However, note that
|
@code{aref} and @code{aset} (@pxref{Array Functions}). However, note
|
||||||
@code{length} should @emph{not} be used for computing the width of a
|
that @code{length} should @emph{not} be used for computing the width
|
||||||
string on display; use @code{string-width} (@pxref{Width}) instead.
|
of a string on display; use @code{string-width} (@pxref{Width})
|
||||||
|
instead.
|
||||||
|
|
||||||
There are two text representations for non-@acronym{ASCII} characters in
|
There are two text representations for non-@acronym{ASCII}
|
||||||
Emacs strings (and in buffers): unibyte and multibyte (@pxref{Text
|
characters in Emacs strings (and in buffers): unibyte and multibyte.
|
||||||
Representations}). For most Lisp programming, you don't need to be
|
For most Lisp programming, you don't need to be concerned with these
|
||||||
concerned with these two representations.
|
two representations. @xref{Text Representations}, for details.
|
||||||
|
|
||||||
Sometimes key sequences are represented as unibyte strings. When a
|
Sometimes key sequences are represented as unibyte strings. When a
|
||||||
unibyte string is a key sequence, string elements in the range 128 to
|
unibyte string is a key sequence, string elements in the range 128 to
|
||||||
|
|
@ -88,7 +91,7 @@ for information about the syntax of characters and strings.
|
||||||
representations and to encode and decode character codes.
|
representations and to encode and decode character codes.
|
||||||
|
|
||||||
@node Predicates for Strings
|
@node Predicates for Strings
|
||||||
@section The Predicates for Strings
|
@section Predicates for Strings
|
||||||
|
|
||||||
For more information about general sequence and array predicates,
|
For more information about general sequence and array predicates,
|
||||||
see @ref{Sequences Arrays Vectors}, and @ref{Arrays}.
|
see @ref{Sequences Arrays Vectors}, and @ref{Arrays}.
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,255 @@
|
||||||
|
2012-10-01 Eric Ludlam <zappo@gnu.org>
|
||||||
|
|
||||||
|
* ede.texi (Quick Start, Project Local Variables)
|
||||||
|
(Miscellaneous commands, ede-java-root, Development Overview)
|
||||||
|
(Detecting a Project): New nodes.
|
||||||
|
(Simple projects): Node deleted.
|
||||||
|
|
||||||
|
* eieio.texi (Building Classes): Some slot attributes cannot be
|
||||||
|
overridden.
|
||||||
|
(Slot Options): Remove an example.
|
||||||
|
(Method Invocation, Documentation): New nodes.
|
||||||
|
|
||||||
|
2012-10-01 Glenn Morris <rgm@gnu.org>
|
||||||
|
|
||||||
|
* Makefile.in ($(buildinfodir)/reftex$(INFO_EXT)), reftex.dvi)
|
||||||
|
(reftex.pdf): Add dependency on emacsver.texi.
|
||||||
|
* reftex.texi: Don't include directory part for emacsver.texi;
|
||||||
|
the Makefile's -I handles it.
|
||||||
|
|
||||||
|
2012-09-30 Ralf Angeli <angeli@caeruleus.net>
|
||||||
|
|
||||||
|
Merge from standalone RefTeX repository.
|
||||||
|
|
||||||
|
* reftex.texi: Express TeX, LaTeX, AUCTeX, BibTeX and RefTeX
|
||||||
|
with macros.
|
||||||
|
(Imprint): Mention Wolfgang in list of contributors.
|
||||||
|
(Creating Citations): Give a hint about how to
|
||||||
|
auto-revert the BibTeX database file when using external editors.
|
||||||
|
(Referencing Labels): Simplify section about reference macro
|
||||||
|
cycling.
|
||||||
|
(Options (Referencing Labels)): Adapt to new structure of
|
||||||
|
`reftex-ref-style-alist'.
|
||||||
|
(Referencing Labels, Reference Styles): Document changes in the
|
||||||
|
referencing functionality.
|
||||||
|
(Commands): Mention options for definition of header and footer in
|
||||||
|
BibTeX files.
|
||||||
|
(Options (Creating Citations)): Document
|
||||||
|
`reftex-create-bibtex-header' and `reftex-create-bibtex-footer'.
|
||||||
|
(Reference Styles): New section.
|
||||||
|
(varioref (LaTeX package), fancyref (LaTeX package)): Remove.
|
||||||
|
(Options (Referencing Labels)): Remove descriptions of deprecated
|
||||||
|
variables `reftex-vref-is-default' and `reftex-fref-is-default'.
|
||||||
|
Add descriptions for `reftex-ref-style-alist' and
|
||||||
|
`reftex-ref-style-default-list'.
|
||||||
|
(Referencing Labels): Update regarding reference styles.
|
||||||
|
(Citation Styles): Mention support for ConTeXt.
|
||||||
|
(Options (Defining Label Environments)): Fix typo.
|
||||||
|
(Options (Creating Citations)): Document
|
||||||
|
`reftex-cite-key-separator'.
|
||||||
|
|
||||||
|
2012-09-30 Achim Gratz <Stromeko@Stromeko.DE>
|
||||||
|
|
||||||
|
* org.texi: Add description of ORG_ADD_CONTRIB to info
|
||||||
|
documentation. Add link to Worg for more details.
|
||||||
|
|
||||||
|
* org.texi: Clarify installation procedure. Provide link to the
|
||||||
|
build system description on Worg.
|
||||||
|
|
||||||
|
* org.texi: Remove reference to utils/, x11idle.c is now in
|
||||||
|
contrib/scripts.
|
||||||
|
|
||||||
|
* org.texi: Re-normalize to "Org mode" in manual.
|
||||||
|
|
||||||
|
* org.texi (Installation): Adapt documentation to new build
|
||||||
|
system. Mention GNU ELPA (since it needs to be handled like Emacs
|
||||||
|
built-in Org).
|
||||||
|
|
||||||
|
2012-09-30 Adam Spiers <orgmode@adamspiers.org> (tiny change)
|
||||||
|
|
||||||
|
* org.texi: Fix typo in description of the 'Hooks' section.
|
||||||
|
|
||||||
|
* org.texi: Add ID to the list of special properties.
|
||||||
|
|
||||||
|
2012-09-30 Andrew Hyatt <ahyatt@gmail.com> (tiny change)
|
||||||
|
|
||||||
|
* org.texi (Moving subtrees): Document the ability to archive to a
|
||||||
|
datetree.
|
||||||
|
|
||||||
|
2012-09-30 Bastien Guerry <bzg@altern.org>
|
||||||
|
|
||||||
|
* org.texi (Installation, Feedback, Batch execution): Use
|
||||||
|
(add-to-list 'load-path ... t) for the contrib dir.
|
||||||
|
|
||||||
|
* org.texi (results): Update documentation for ":results drawer"
|
||||||
|
and ":results org".
|
||||||
|
|
||||||
|
* org.texi (Column width and alignment): Fix typo.
|
||||||
|
|
||||||
|
* org.texi (Activation): Point to the "Conflicts" section.
|
||||||
|
|
||||||
|
* org.texi (Conflicts): Mention filladapt.el in the list of
|
||||||
|
conflicting packages.
|
||||||
|
|
||||||
|
* org.texi (Activation): Adding org-mode to `auto-mode-alist' is
|
||||||
|
not needed for versions of Emacs > 22.1.
|
||||||
|
|
||||||
|
* org.texi (History and Acknowledgments): Fix typo.
|
||||||
|
|
||||||
|
* org.texi (History and Acknowledgments): Add my own
|
||||||
|
acknowledgments.
|
||||||
|
|
||||||
|
* org.texi (Agenda commands): Document the new command and the new
|
||||||
|
option.
|
||||||
|
|
||||||
|
* org.texi (Agenda commands): Delete `org-agenda-action' section.
|
||||||
|
(Agenda commands): Reorder. Document `*' to toggle persistent
|
||||||
|
marks.
|
||||||
|
|
||||||
|
* org.texi (Agenda dispatcher): Mention
|
||||||
|
`org-toggle-agenda-sticky'.
|
||||||
|
(Agenda commands, Exporting Agenda Views): Fix typo.
|
||||||
|
|
||||||
|
* org.texi (Templates in contexts, Setting Options): Update to
|
||||||
|
reflect changes in how contexts options are processed.
|
||||||
|
|
||||||
|
* org.texi (Templates in contexts): Document the new structure of
|
||||||
|
the variables `org-agenda-custom-commands-contexts' and
|
||||||
|
`org-capture-templates-contexts'.
|
||||||
|
|
||||||
|
* org.texi (Templates in contexts): Document the new option
|
||||||
|
`org-capture-templates-contexts'.
|
||||||
|
(Storing searches): Document the new option
|
||||||
|
`org-agenda-custom-commands-contexts'.
|
||||||
|
|
||||||
|
* org.texi (Formula syntax for Lisp): Reformat.
|
||||||
|
|
||||||
|
* org.texi (Special properties, Column attributes)
|
||||||
|
(Agenda column view): Document the new special property
|
||||||
|
CLOCKSUM_T.
|
||||||
|
|
||||||
|
* org.texi (Template expansion): Document the new %l template.
|
||||||
|
|
||||||
|
* org.texi (Fast access to TODO states): Fix documentation about
|
||||||
|
allowed characters for fast todo selection.
|
||||||
|
|
||||||
|
* org.texi (Weekly/daily agenda): Mention APPT_WARNTIME and its
|
||||||
|
use in `org-agenda-to-appt'.
|
||||||
|
|
||||||
|
* org.texi (Comment lines): Update wrt comments.
|
||||||
|
|
||||||
|
* org.texi (Resolving idle time): Document new keybinding.
|
||||||
|
|
||||||
|
* org.texi (Clocking commands): Document the use of S-M-<up/down>
|
||||||
|
on clock timestamps.
|
||||||
|
|
||||||
|
* org.texi (Fast access to TODO states): Explicitely says only
|
||||||
|
letters are supported as fast TODO selection keys.
|
||||||
|
|
||||||
|
* org.texi (Link abbreviations): Illustrate the use of the "%h"
|
||||||
|
specifier. Document the new "%(my-function)" specifier.
|
||||||
|
|
||||||
|
* org.texi (Clocking commands): New cindex.
|
||||||
|
(Clocking commands): Update documentation for `org-clock-in'.
|
||||||
|
Document `org-clock-in-last'. Mention `org-clock-out' and
|
||||||
|
`org-clock-in-last' as commands that can be globally bound.
|
||||||
|
(Resolving idle time): Document continuous clocking.
|
||||||
|
|
||||||
|
* org.texi (Top, Introduction): Fix formatting.
|
||||||
|
(Activation): Add index entries.
|
||||||
|
(Conventions): Update section.
|
||||||
|
(Embedded @LaTeX{}): Fix formatting.
|
||||||
|
|
||||||
|
* org.texi (Visibility cycling): Document `show-children'.
|
||||||
|
|
||||||
|
* org.texi (Using capture): Mention the `org-capture-last-stored'
|
||||||
|
bookmark as a way to jump to the last stored capture.
|
||||||
|
|
||||||
|
* org.texi (Uploading files): Fix typo.
|
||||||
|
|
||||||
|
* org.texi (Using capture): Document `C-0' as a prefix argument
|
||||||
|
for `org-capture'.
|
||||||
|
|
||||||
|
* org.texi (Agenda commands): Document persistent marks.
|
||||||
|
|
||||||
|
* org.texi (Template expansion): Update doc to reflect change.
|
||||||
|
|
||||||
|
* org.texi (Radio tables): Document the :no-escape parameter.
|
||||||
|
|
||||||
|
* org.texi (Repeated tasks): Document repeat cookies for years,
|
||||||
|
months, weeks, days and hours.
|
||||||
|
|
||||||
|
* org.texi (Export options): State that you can use the d: option
|
||||||
|
by specifying a list of drawers.
|
||||||
|
|
||||||
|
* org.texi (HTML preamble and postamble): Small doc improvement.
|
||||||
|
|
||||||
|
2012-09-30 Brian van den Broek <vanden@gmail.com> (tiny change)
|
||||||
|
|
||||||
|
* org.texi: The sections in the Exporting section of the manual
|
||||||
|
left out articles in the description of the org-export-as-*
|
||||||
|
commands, among other places. This patch adds them, adds a few
|
||||||
|
missing prepositions, and switches instances of "an HTML" to "a
|
||||||
|
html" for internal consistency.
|
||||||
|
|
||||||
|
* org.texi: Alter several examples of headings with timestamps in
|
||||||
|
them to include the timestamps in the body instead of the heading.
|
||||||
|
|
||||||
|
2012-09-30 Carsten Dominik <carsten.dominik@gmail.com>
|
||||||
|
|
||||||
|
* org.texi (Agenda dispatcher): Document sticky agenda views and
|
||||||
|
the new key for them.
|
||||||
|
|
||||||
|
2012-09-30 Charles <millarc@verizon.net> (tiny change)
|
||||||
|
|
||||||
|
* org.texi (Advanced features): Fix error in table.
|
||||||
|
|
||||||
|
2012-09-30 Feng Shu <tumashu@gmail.com>
|
||||||
|
|
||||||
|
* org.texi (@LaTeX{} fragments): Document imagemagick as an
|
||||||
|
alternative to dvipng.
|
||||||
|
|
||||||
|
2012-09-30 François Allisson <francois@allisson.co> (tiny change)
|
||||||
|
|
||||||
|
* org.texi: Remove extra curly bracket.
|
||||||
|
|
||||||
|
2012-09-30 Giovanni Ridolfi <giovanni.ridolfi@yahoo.it> (tiny change)
|
||||||
|
|
||||||
|
* org.texi (org-clock-in-last and org-clock-cancel): Update the
|
||||||
|
defkeys.
|
||||||
|
|
||||||
|
2012-09-30 Ippei FURUHASHI <top.tuna+orgmode@gmail.com> (tiny change)
|
||||||
|
|
||||||
|
* org.texi (Agenda commands): Fix two typos by giving
|
||||||
|
corresponding function names, according to
|
||||||
|
`org-agenda-view-mode-dispatch'.
|
||||||
|
|
||||||
|
2012-09-30 Jan Bäcker <jan.boecker@jboecker.de>
|
||||||
|
|
||||||
|
* org.texi (The spreadsheet): Fix typo.
|
||||||
|
|
||||||
|
2012-09-30 Memnon Anon <gegendosenfleisch@gmail.com> (tiny change)
|
||||||
|
|
||||||
|
* org.texi (Tracking your habits): Point to the "Tracking TODO
|
||||||
|
state changes" section.
|
||||||
|
|
||||||
|
2012-09-30 Nicolas Goaziou <n.goaziou@gmail.com>
|
||||||
|
|
||||||
|
* org.texi (Literal examples): Remove reference to unknown
|
||||||
|
`org-export-latex-minted' variable. Also simplify footnote since
|
||||||
|
`org-export-latex-listings' documentation is exhaustive already.
|
||||||
|
|
||||||
|
* org.texi (Plain lists): Remove reference to now hard-coded
|
||||||
|
`bullet' automatic rule.
|
||||||
|
|
||||||
|
2012-09-30 Toby S. Cubitt <tsc25@cantab.net>
|
||||||
|
|
||||||
|
* org.texi: Updated documentation accordingly.
|
||||||
|
|
||||||
|
2012-09-13 Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
|
||||||
|
* texinfo.tex: Merge from gnulib.
|
||||||
|
|
||||||
2012-09-12 Michael Albinus <michael.albinus@gmx.de>
|
2012-09-12 Michael Albinus <michael.albinus@gmx.de>
|
||||||
|
|
||||||
Sync with Tramp 2.2.6.
|
Sync with Tramp 2.2.6.
|
||||||
|
|
|
||||||
|
|
@ -526,12 +526,12 @@ rcirc.pdf: ${srcdir}/rcirc.texi
|
||||||
$(ENVADD) $(TEXI2PDF) ${srcdir}/rcirc.texi
|
$(ENVADD) $(TEXI2PDF) ${srcdir}/rcirc.texi
|
||||||
|
|
||||||
reftex : $(buildinfodir)/reftex$(INFO_EXT)
|
reftex : $(buildinfodir)/reftex$(INFO_EXT)
|
||||||
$(buildinfodir)/reftex$(INFO_EXT): ${srcdir}/reftex.texi
|
$(buildinfodir)/reftex$(INFO_EXT): ${srcdir}/reftex.texi $(emacsdir)/emacsver.texi
|
||||||
$(mkinfodir)
|
$(mkinfodir)
|
||||||
$(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/reftex.texi
|
$(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/reftex.texi
|
||||||
reftex.dvi: ${srcdir}/reftex.texi
|
reftex.dvi: ${srcdir}/reftex.texi $(emacsdir)/emacsver.texi
|
||||||
$(ENVADD) $(TEXI2DVI) ${srcdir}/reftex.texi
|
$(ENVADD) $(TEXI2DVI) ${srcdir}/reftex.texi
|
||||||
reftex.pdf: ${srcdir}/reftex.texi
|
reftex.pdf: ${srcdir}/reftex.texi $(emacsdir)/emacsver.texi
|
||||||
$(ENVADD) $(TEXI2PDF) ${srcdir}/reftex.texi
|
$(ENVADD) $(TEXI2PDF) ${srcdir}/reftex.texi
|
||||||
|
|
||||||
remember : $(buildinfodir)/remember$(INFO_EXT)
|
remember : $(buildinfodir)/remember$(INFO_EXT)
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -63,7 +63,7 @@ Emacs.
|
||||||
* Making New Objects:: How to construct new objects.
|
* Making New Objects:: How to construct new objects.
|
||||||
* Accessing Slots:: How to access a slot.
|
* Accessing Slots:: How to access a slot.
|
||||||
* Writing Methods:: How to write a method.
|
* Writing Methods:: How to write a method.
|
||||||
@c * Method Invocation:: How methods are invoked.
|
* Method Invocation:: How methods are invoked.
|
||||||
* Predicates:: Class-p, Object-p, etc-p.
|
* Predicates:: Class-p, Object-p, etc-p.
|
||||||
* Association Lists:: List of objects as association lists.
|
* Association Lists:: List of objects as association lists.
|
||||||
* Customizing:: Customizing objects.
|
* Customizing:: Customizing objects.
|
||||||
|
|
@ -71,8 +71,9 @@ Emacs.
|
||||||
* Base Classes:: Additional classes you can inherit from.
|
* Base Classes:: Additional classes you can inherit from.
|
||||||
* Browsing:: Browsing your class lists.
|
* Browsing:: Browsing your class lists.
|
||||||
* Class Values:: Displaying information about a class or object.
|
* Class Values:: Displaying information about a class or object.
|
||||||
|
* Documentation:: Automatically creating texinfo documentation.
|
||||||
* Default Superclass:: The root superclasses.
|
* Default Superclass:: The root superclasses.
|
||||||
* Signals:: When you make errors
|
* Signals:: When you make errors.
|
||||||
* Naming Conventions:: Name your objects in an Emacs friendly way.
|
* Naming Conventions:: Name your objects in an Emacs friendly way.
|
||||||
* CLOS compatibility:: What are the differences?
|
* CLOS compatibility:: What are the differences?
|
||||||
* Wish List:: Things about EIEIO that could be improved.
|
* Wish List:: Things about EIEIO that could be improved.
|
||||||
|
|
@ -269,6 +270,10 @@ If two parents share the same slot name, the parent which appears in
|
||||||
the @var{superclass-list} first sets the tags for that slot. If the
|
the @var{superclass-list} first sets the tags for that slot. If the
|
||||||
new class has a slot with the same name as the parent, the new slot
|
new class has a slot with the same name as the parent, the new slot
|
||||||
overrides the parent's slot.
|
overrides the parent's slot.
|
||||||
|
|
||||||
|
When overriding a slot, some slot attributes cannot be overridden
|
||||||
|
because they break basic OO rules. You cannot override @code{:type}
|
||||||
|
or @code{:protection}.
|
||||||
@end defmac
|
@end defmac
|
||||||
|
|
||||||
@noindent
|
@noindent
|
||||||
|
|
@ -294,7 +299,7 @@ This option is here to support programs written with older versions of
|
||||||
@end defvar
|
@end defvar
|
||||||
|
|
||||||
@menu
|
@menu
|
||||||
* Inheritance:: How to specify parents classes
|
* Inheritance:: How to specify parents classes.
|
||||||
* Slot Options:: How to specify features of a slot.
|
* Slot Options:: How to specify features of a slot.
|
||||||
* Class Options:: How to specify features for this class.
|
* Class Options:: How to specify features for this class.
|
||||||
@end menu
|
@end menu
|
||||||
|
|
@ -435,35 +440,6 @@ A symbol that is a function like this:
|
||||||
:initform +
|
:initform +
|
||||||
@end example
|
@end example
|
||||||
will set the initial value as that symbol.
|
will set the initial value as that symbol.
|
||||||
A function that is a lambda expression, like this:
|
|
||||||
@example
|
|
||||||
:initform (lambda () some-variablename)
|
|
||||||
@end example
|
|
||||||
|
|
||||||
will be evaluated at instantiation time to the value of
|
|
||||||
@code{some-variablename}.
|
|
||||||
@c This feature was more annoying than useful. Use the
|
|
||||||
@c `initialize-instance' function to do this.
|
|
||||||
@c
|
|
||||||
@c On the other hand, if you need code to be
|
|
||||||
@c executed at instantiation time as the initform, code like this:
|
|
||||||
@c @example
|
|
||||||
@c :initform (lambda () (+ 1 some-global-var))
|
|
||||||
@c @end example
|
|
||||||
@c will be identified as a function call, and be executed in place.
|
|
||||||
|
|
||||||
@cindex lambda-default
|
|
||||||
|
|
||||||
|
|
||||||
Lastly, using the function @code{lambda-default} instead of
|
|
||||||
@code{lambda} will let you specify a lambda expression to use as the
|
|
||||||
value, without evaluation, thus:
|
|
||||||
@example
|
|
||||||
:initform (lambda-default () some-variablename)
|
|
||||||
@end example
|
|
||||||
@c @@TODO - This will be deleted after fair warning.
|
|
||||||
will not be evaluated at instantiation time, and the value in this
|
|
||||||
slot will instead be @code{(lambda () some-variablename)}.
|
|
||||||
|
|
||||||
After a class has been created with @code{defclass}, you can change
|
After a class has been created with @code{defclass}, you can change
|
||||||
that default value with @code{oset-default}. @ref{Accessing Slots}.
|
that default value with @code{oset-default}. @ref{Accessing Slots}.
|
||||||
|
|
@ -481,9 +457,6 @@ Here are some examples:
|
||||||
An object of your class type.
|
An object of your class type.
|
||||||
@item (or null symbol)
|
@item (or null symbol)
|
||||||
A symbol, or nil.
|
A symbol, or nil.
|
||||||
@item function
|
|
||||||
A function symbol, or a @code{lambda-default} expression.
|
|
||||||
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@item :allocation
|
@item :allocation
|
||||||
|
|
@ -621,9 +594,12 @@ Search for methods in the class hierarchy in breadth first order.
|
||||||
This is the default.
|
This is the default.
|
||||||
@item :depth-first
|
@item :depth-first
|
||||||
Search for methods in the class hierarchy in a depth first order.
|
Search for methods in the class hierarchy in a depth first order.
|
||||||
|
@item :c3
|
||||||
|
Searches for methods in in a learnarized way that most closely matches
|
||||||
|
what CLOS does when a monotonic class structure is defined.
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@c @xref{Method Invocation}, for more on method invocation order.
|
@xref{Method Invocation}, for more on method invocation order.
|
||||||
|
|
||||||
@item :metaclass
|
@item :metaclass
|
||||||
Unsupported CLOS option. Enables the use of a different base class other
|
Unsupported CLOS option. Enables the use of a different base class other
|
||||||
|
|
@ -1008,10 +984,39 @@ method.
|
||||||
|
|
||||||
@c TODO - Write some more about static methods here
|
@c TODO - Write some more about static methods here
|
||||||
|
|
||||||
@c @node Method Invocation
|
@node Method Invocation
|
||||||
@c @chapter Method Invocation
|
@chapter Method Invocation
|
||||||
|
|
||||||
@c TODO - writeme
|
When classes are defined, you can specify the
|
||||||
|
@code{:method-invocation-order}. This is a feature specific to EIEIO.
|
||||||
|
|
||||||
|
This controls the order in which method resolution occurs for
|
||||||
|
@code{:primary} methods in cases of multiple inheritance. The order
|
||||||
|
affects which method is called first in a tree, and if
|
||||||
|
@code{call-next-method} is used, it controls the order in which the
|
||||||
|
stack of methods are run.
|
||||||
|
|
||||||
|
The original EIEIO order turned out to be broken for multiple
|
||||||
|
inheritance, but some programs depended on it. As such this option
|
||||||
|
was added when the default invocation order was fixed to something
|
||||||
|
that made more sense in that case.
|
||||||
|
|
||||||
|
Valid values are:
|
||||||
|
|
||||||
|
@table @code
|
||||||
|
@item :breadth-first
|
||||||
|
Search for methods in the class hierarchy in breadth first order.
|
||||||
|
This is the default.
|
||||||
|
@item :depth-first
|
||||||
|
Search for methods in the class hierarchy in a depth first order.
|
||||||
|
@item :c3
|
||||||
|
Searches for methods in in a learnarized way that most closely matches
|
||||||
|
what CLOS does when CLOS when a monotonic class structure is defined.
|
||||||
|
|
||||||
|
This is derived from the Dylan language documents by
|
||||||
|
Kim Barrett et al.: A Monotonic Superclass Linearization for Dylan
|
||||||
|
Retrieved from: http://192.220.96.201/dylan/linearization-oopsla96.html
|
||||||
|
@end table
|
||||||
|
|
||||||
@node Predicates
|
@node Predicates
|
||||||
@comment node-name, next, previous, up
|
@comment node-name, next, previous, up
|
||||||
|
|
@ -1399,9 +1404,12 @@ a header line comment from the class allocated slot if one is not
|
||||||
provided.
|
provided.
|
||||||
@end defmethod
|
@end defmethod
|
||||||
|
|
||||||
@defun eieio-persistent-read filename
|
@defun eieio-persistent-read filename &optional class allow-subclass
|
||||||
Read @var{filename} which contains an @code{eieio-persistent} object
|
Read a persistent object from @var{filename}, and return it.
|
||||||
previously written with @code{eieio-persistent-save}.
|
Signal an error if the object in @var{FILENAME} is not a constructor
|
||||||
|
for @var{CLASS}. Optional @var{allow-subclass} says that it is ok for
|
||||||
|
@code{eieio-peristent-read} to load in subclasses of class instead of
|
||||||
|
being pendantic."
|
||||||
@end defun
|
@end defun
|
||||||
|
|
||||||
@node eieio-named
|
@node eieio-named
|
||||||
|
|
@ -1544,8 +1552,51 @@ a class. In a program, pass it a string with the name of a class, a
|
||||||
class symbol, or an object. The resulting buffer will display all slot
|
class symbol, or an object. The resulting buffer will display all slot
|
||||||
names.
|
names.
|
||||||
|
|
||||||
Additionally, all methods defined to have functionality on this class
|
Additionally, all methods defined to have functionality on this class is
|
||||||
are displayed.
|
displayed.
|
||||||
|
|
||||||
|
@node Documentation
|
||||||
|
@comment node-name, next, previous, up
|
||||||
|
@chapter Documentation
|
||||||
|
|
||||||
|
It is possible to automatically create documentation for your classes in
|
||||||
|
texinfo format by using the tools in the file @file{eieio-doc.el}
|
||||||
|
|
||||||
|
@deffn Command eieiodoc-class class indexstring &optional skiplist
|
||||||
|
|
||||||
|
This will start at the current point, and created an indented menu of
|
||||||
|
all the child classes of, and including @var{class}, but skipping any
|
||||||
|
classes that might be in @var{skiplist} It will then create nodes for
|
||||||
|
all these classes, subsection headings, and indexes.
|
||||||
|
|
||||||
|
Each class will be indexed using the texinfo labeled index
|
||||||
|
@var{indexstring} which is a two letter description.
|
||||||
|
@xref{(texinfo) New Indices}.
|
||||||
|
|
||||||
|
To use this command, the texinfo macro
|
||||||
|
|
||||||
|
@example
|
||||||
|
@@defindex @@var @{ indexstring @}
|
||||||
|
@end example
|
||||||
|
|
||||||
|
@noindent
|
||||||
|
where @var{indexstring} is replaced with the two letter code.
|
||||||
|
|
||||||
|
Next, an inheritance tree will be created listing all parents of that
|
||||||
|
section's class.
|
||||||
|
|
||||||
|
Then,all the slots will be expanded in tables, and described
|
||||||
|
using the documentation strings from the code. Default values will also
|
||||||
|
be displayed. Only those slots with @code{:initarg} specified will be
|
||||||
|
expanded, others will be hidden. If a slot is inherited from a parent,
|
||||||
|
that slot will also be skipped unless the default value is different.
|
||||||
|
If there is a change, then the documentation part of the slot will be
|
||||||
|
replace with an @@xref back to the parent.
|
||||||
|
|
||||||
|
This command can only display documentation for classes whose
|
||||||
|
definitions have been loaded in this Emacs session.
|
||||||
|
|
||||||
|
@end deffn
|
||||||
|
|
||||||
@node Default Superclass
|
@node Default Superclass
|
||||||
@comment node-name, next, previous, up
|
@comment node-name, next, previous, up
|
||||||
|
|
|
||||||
1062
doc/misc/org.texi
1062
doc/misc/org.texi
File diff suppressed because it is too large
Load diff
1279
doc/misc/reftex.texi
1279
doc/misc/reftex.texi
File diff suppressed because it is too large
Load diff
|
|
@ -1,3 +1,47 @@
|
||||||
|
2012-10-01 Eric Ludlam <zappo@gnu.org>
|
||||||
|
|
||||||
|
* srecode/cc.srt, srecode/ede-autoconf.srt: New files.
|
||||||
|
|
||||||
|
* srecode/cpp.srt: Move parts to c.srt.
|
||||||
|
|
||||||
|
* srecode/ede-make.srt: Extra templates for Arduino Makefiles.
|
||||||
|
|
||||||
|
2012-10-01 Ralf Mattes <rm@mh-freiburg.de> (tiny change)
|
||||||
|
|
||||||
|
* srecode/el.srt (variable-option): Add missing quote.
|
||||||
|
|
||||||
|
2012-10-01 Chong Yidong <cyd@gnu.org>
|
||||||
|
|
||||||
|
* images/icons/hicolor/32x32/apps/emacs22.png:
|
||||||
|
* images/icons/hicolor/16x16/apps/emacs22.png:
|
||||||
|
* images/icons/hicolor/48x48/apps/emacs22.png:
|
||||||
|
* images/icons/hicolor/24x24/apps/emacs22.png: Remove old icons
|
||||||
|
(Bug#12536).
|
||||||
|
|
||||||
|
2012-10-01 Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
|
||||||
|
Revert the FOLLOW-SYMLINKS change for file-attributes.
|
||||||
|
* NEWS: Undo last change.
|
||||||
|
|
||||||
|
2012-09-30 Bastien Guerry <bzg@gnu.org>
|
||||||
|
|
||||||
|
* refcards/orgcard.tex: Update version number.
|
||||||
|
|
||||||
|
2012-09-30 Jambunathan K <kjambunathan@gmail.com>
|
||||||
|
|
||||||
|
* org/OrgOdtContentTemplate.xml:
|
||||||
|
* org/OrgOdtStyles.xml: Add Listing-related entries.
|
||||||
|
|
||||||
|
2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
|
||||||
|
file-attributes has a new optional arg FOLLOW-SYMLINKS.
|
||||||
|
* NEWS: Document the change.
|
||||||
|
|
||||||
|
2012-09-30 Jan Djärv <jan.h.d@swipnet.se>
|
||||||
|
|
||||||
|
* NEWS: The NS port supports fullscreen.
|
||||||
|
Mention that the file dialog is used on NS.
|
||||||
|
|
||||||
2012-09-17 Glenn Morris <rgm@gnu.org>
|
2012-09-17 Glenn Morris <rgm@gnu.org>
|
||||||
|
|
||||||
* refcards/emacsver.tex: New file.
|
* refcards/emacsver.tex: New file.
|
||||||
|
|
|
||||||
131
etc/NEWS
131
etc/NEWS
|
|
@ -76,6 +76,7 @@ You can explicitly require a specific version by passing
|
||||||
|
|
||||||
* Startup Changes in Emacs 24.3
|
* Startup Changes in Emacs 24.3
|
||||||
|
|
||||||
|
+++
|
||||||
** Emacs no longer searches for `leim-list.el' files beneath the standard
|
** Emacs no longer searches for `leim-list.el' files beneath the standard
|
||||||
lisp/ directory. There should not be any there anyway. If you have
|
lisp/ directory. There should not be any there anyway. If you have
|
||||||
been adding them there, put them somewhere else, eg site-lisp.
|
been adding them there, put them somewhere else, eg site-lisp.
|
||||||
|
|
@ -89,10 +90,12 @@ been adding them there, put them somewhere else, eg site-lisp.
|
||||||
** minibuffer-electric-default-mode can rewrite (default ...) to [...].
|
** minibuffer-electric-default-mode can rewrite (default ...) to [...].
|
||||||
Just set minibuffer-eldef-shorten-default to t before enabling the mode.
|
Just set minibuffer-eldef-shorten-default to t before enabling the mode.
|
||||||
|
|
||||||
|
+++
|
||||||
** Most y-or-n prompts now allow you to scroll the selected window.
|
** Most y-or-n prompts now allow you to scroll the selected window.
|
||||||
Typing C-v or M-v at a y-or-n prompt scrolls forward or backward
|
Typing C-v or M-v at a y-or-n prompt scrolls forward or backward
|
||||||
respectively, without exiting from the prompt.
|
respectively, without exiting from the prompt.
|
||||||
|
|
||||||
|
---
|
||||||
** In minibuffer filename prompts, `C-M-f' and `C-M-b' now move to the
|
** In minibuffer filename prompts, `C-M-f' and `C-M-b' now move to the
|
||||||
next and previous path separator, respectively.
|
next and previous path separator, respectively.
|
||||||
|
|
||||||
|
|
@ -107,12 +110,14 @@ invokes `set-buffer-file-coding-system'.
|
||||||
|
|
||||||
** Help changes
|
** Help changes
|
||||||
|
|
||||||
|
+++
|
||||||
*** `C-h f' (describe-function) can now perform autoloading.
|
*** `C-h f' (describe-function) can now perform autoloading.
|
||||||
When this command is called for an autoloaded function whose docstring
|
When this command is called for an autoloaded function whose docstring
|
||||||
contains a key substitution construct, that function's library is
|
contains a key substitution construct, that function's library is
|
||||||
automatically loaded, so that the documentation can be shown
|
automatically loaded, so that the documentation can be shown
|
||||||
correctly. To disable this, set `help-enable-auto-load' to nil.
|
correctly. To disable this, set `help-enable-auto-load' to nil.
|
||||||
|
|
||||||
|
---
|
||||||
*** `C-h f' now reports previously-autoloaded functions as "autoloaded",
|
*** `C-h f' now reports previously-autoloaded functions as "autoloaded",
|
||||||
even after their associated libraries have been loaded (and the
|
even after their associated libraries have been loaded (and the
|
||||||
autoloads have been redefined as functions).
|
autoloads have been redefined as functions).
|
||||||
|
|
@ -136,11 +141,11 @@ treated as images.
|
||||||
:background image spec property.
|
:background image spec property.
|
||||||
|
|
||||||
** Server and client changes
|
** Server and client changes
|
||||||
|
+++
|
||||||
*** emacsclient now obeys string values for `initial-buffer-choice',
|
*** emacsclient now obeys string values for `initial-buffer-choice',
|
||||||
if it is told to open a new frame without specifying any file to visit
|
if it is told to open a new frame without specifying any file to visit
|
||||||
or expression to evaluate.
|
or expression to evaluate.
|
||||||
|
---
|
||||||
*** New option `server-auth-key' specifies a shared server key.
|
*** New option `server-auth-key' specifies a shared server key.
|
||||||
|
|
||||||
** In the Package Menu, newly-available packages are listed as "new",
|
** In the Package Menu, newly-available packages are listed as "new",
|
||||||
|
|
@ -155,6 +160,9 @@ On encountering a fatal error, Emacs now outputs a textual description
|
||||||
of the fatal signal, and a short backtrace on platforms like glibc
|
of the fatal signal, and a short backtrace on platforms like glibc
|
||||||
that support backtraces.
|
that support backtraces.
|
||||||
|
|
||||||
|
** `message-log-max' now defaults to 1000, not 100.
|
||||||
|
|
||||||
|
---
|
||||||
** If your Emacs was built from a bzr checkout, the new variable
|
** If your Emacs was built from a bzr checkout, the new variable
|
||||||
`emacs-bzr-version' contains information about the bzr revision used.
|
`emacs-bzr-version' contains information about the bzr revision used.
|
||||||
|
|
||||||
|
|
@ -181,9 +189,42 @@ The PCL-CVS commands are still available via the keyboard.
|
||||||
---
|
---
|
||||||
*** New input method `vietnamese-vni'.
|
*** New input method `vietnamese-vni'.
|
||||||
|
|
||||||
|
** NextStep/OSX port changes.
|
||||||
|
---
|
||||||
|
*** Fullscreen and frame parameter fullscreen is supported.
|
||||||
|
---
|
||||||
|
*** A file dialog is used when open/saved is done from the menu/toolbar.
|
||||||
|
|
||||||
* Editing Changes in Emacs 24.3
|
* Editing Changes in Emacs 24.3
|
||||||
|
|
||||||
|
** Navigation command changes
|
||||||
|
+++
|
||||||
|
*** New binding `M-g c' for `goto-char'.
|
||||||
|
+++
|
||||||
|
*** New binding `M-g TAB' for `move-to-column'.
|
||||||
|
+++
|
||||||
|
*** `M-g TAB' (`move-to-column') prompts for a column number if called
|
||||||
|
interactively with no prefix arg. Previously, it moved to column 1.
|
||||||
|
|
||||||
|
** Search and Replace changes
|
||||||
|
+++
|
||||||
|
*** Non-regexp Isearch now performs "lax" space matching.
|
||||||
|
Each sequence of spaces in the supplied search string may match any
|
||||||
|
sequence of one or more whitespace characters, as specified by the
|
||||||
|
variable `search-whitespace-regexp'. (This variable is also used by a
|
||||||
|
similar existing feature for regexp Isearch).
|
||||||
|
+++
|
||||||
|
*** New Isearch command `M-s SPC' toggles lax space matching.
|
||||||
|
This applies to both ordinary and regexp Isearch.
|
||||||
|
+++
|
||||||
|
*** New option `replace-lax-whitespace'.
|
||||||
|
If non-nil, `query-replace' uses flexible whitespace matching too.
|
||||||
|
The default is nil.
|
||||||
|
|
||||||
|
*** Global `M-s _' starts a symbol (identifier) incremental search,
|
||||||
|
and `M-s _' in Isearch toggles symbol search mode.
|
||||||
|
`M-s c' in Isearch toggles search case-sensitivity.
|
||||||
|
|
||||||
+++
|
+++
|
||||||
** `C-x 8 RET' is now bound to `insert-char', which is now a command.
|
** `C-x 8 RET' is now bound to `insert-char', which is now a command.
|
||||||
`ucs-insert' is now an obsolete alias for `insert-char'.
|
`ucs-insert' is now an obsolete alias for `insert-char'.
|
||||||
|
|
@ -193,29 +234,11 @@ The PCL-CVS commands are still available via the keyboard.
|
||||||
It used to be bound to `kill-this-buffer', but `z' is too easy to
|
It used to be bound to `kill-this-buffer', but `z' is too easy to
|
||||||
accidentally type.
|
accidentally type.
|
||||||
|
|
||||||
|
+++
|
||||||
** New option `delete-trailing-lines' specifies whether
|
** New option `delete-trailing-lines' specifies whether
|
||||||
M-x delete-trailing-whitespace should delete trailing lines at the end
|
M-x delete-trailing-whitespace should delete trailing lines at the end
|
||||||
of the buffer. It defaults to t.
|
of the buffer. It defaults to t.
|
||||||
|
|
||||||
** Search and Replace changes
|
|
||||||
|
|
||||||
*** Non-regexp Isearch now performs "lax" space matching.
|
|
||||||
Each sequence of spaces in the supplied search string may match any
|
|
||||||
sequence of one or more whitespace characters, as specified by the
|
|
||||||
variable `search-whitespace-regexp'. (This variable is also used by a
|
|
||||||
similar existing feature for regexp Isearch).
|
|
||||||
|
|
||||||
*** New Isearch command `M-s SPC' toggles lax space matching.
|
|
||||||
This applies to both ordinary and regexp Isearch.
|
|
||||||
|
|
||||||
*** New option `replace-lax-whitespace'.
|
|
||||||
If non-nil, `query-replace' uses flexible whitespace matching too.
|
|
||||||
The default is nil.
|
|
||||||
|
|
||||||
*** Global `M-s _' starts a symbol (identifier) incremental search,
|
|
||||||
and `M-s _' in Isearch toggles symbol search mode.
|
|
||||||
`M-s c' in Isearch toggles search case-sensitivity.
|
|
||||||
|
|
||||||
** Register changes
|
** Register changes
|
||||||
+++
|
+++
|
||||||
*** `C-x r +' is now overloaded to invoke `append-to-register.
|
*** `C-x r +' is now overloaded to invoke `append-to-register.
|
||||||
|
|
@ -224,13 +247,10 @@ and `M-s _' in Isearch toggles symbol search mode.
|
||||||
the text to put between collected texts for use with M-x
|
the text to put between collected texts for use with M-x
|
||||||
append-to-register and M-x prepend-to-register.
|
append-to-register and M-x prepend-to-register.
|
||||||
|
|
||||||
|
+++
|
||||||
** `C-u M-=' now counts lines/words/characters in the entire buffer.
|
** `C-u M-=' now counts lines/words/characters in the entire buffer.
|
||||||
|
|
||||||
** New binding `M-g c' for `goto-char'.
|
+++
|
||||||
|
|
||||||
** M-x move-to-column, if called interactively with no prefix arg, now
|
|
||||||
prompts for a column number.
|
|
||||||
|
|
||||||
** New command `C-x r M-w' (copy-rectangle-as-kill).
|
** New command `C-x r M-w' (copy-rectangle-as-kill).
|
||||||
It copies the region-rectangle as the last rectangle kill.
|
It copies the region-rectangle as the last rectangle kill.
|
||||||
|
|
||||||
|
|
@ -242,17 +262,17 @@ just removing them, as done by `yank-excluded-properties'.
|
||||||
* Changes in Specialized Modes and Packages in Emacs 24.3
|
* Changes in Specialized Modes and Packages in Emacs 24.3
|
||||||
|
|
||||||
** Apropos
|
** Apropos
|
||||||
|
---
|
||||||
*** The faces used by Apropos are now directly customizable.
|
*** The faces used by Apropos are now directly customizable.
|
||||||
These faces are named `apropos-symbol', `apropos-keybinding', and so on;
|
These faces are named `apropos-symbol', `apropos-keybinding', and so on;
|
||||||
see the `apropos' Custom group for details.
|
see the `apropos' Custom group for details.
|
||||||
|
---
|
||||||
**** The old options whose values specified faces to use were removed
|
*** The old options whose values specified faces to use were removed
|
||||||
(i.e. `apropos-symbol-face', `apropos-keybinding-face', etc.).
|
(i.e. `apropos-symbol-face', `apropos-keybinding-face', etc.).
|
||||||
|
|
||||||
** Buffer Menu
|
** Buffer Menu
|
||||||
This package has been rewritten to use Tabulated List mode.
|
This package has been rewritten to use Tabulated List mode.
|
||||||
|
---
|
||||||
*** Option `Buffer-menu-buffer+size-width' is now obsolete.
|
*** Option `Buffer-menu-buffer+size-width' is now obsolete.
|
||||||
Use `Buffer-menu-name-width' and `Buffer-menu-size-width' instead.
|
Use `Buffer-menu-name-width' and `Buffer-menu-size-width' instead.
|
||||||
|
|
||||||
|
|
@ -568,27 +588,30 @@ in case that is not properly encoded.
|
||||||
|
|
||||||
** which-function-mode now applies to all applicable major modes by default.
|
** which-function-mode now applies to all applicable major modes by default.
|
||||||
|
|
||||||
|
---
|
||||||
|
** winner-mode-hook now runs when the mode is disabled, as well as when it is
|
||||||
|
enabled.
|
||||||
|
|
||||||
** FIXME something happened to ses.el, 2012-04-17.
|
** FIXME something happened to ses.el, 2012-04-17.
|
||||||
|
|
||||||
|
|
||||||
** Obsolete packages:
|
** Obsolete packages:
|
||||||
|
+++
|
||||||
*** assoc.el
|
*** assoc.el
|
||||||
In most cases, assoc+member+push+delq work just as well.
|
In most cases, assoc+member+push+delq work just as well.
|
||||||
And in any case it's just a terrible package: ugly semantics, terrible
|
And in any case it's just a terrible package: ugly semantics, terrible
|
||||||
inefficiency, and not namespace-clean.
|
inefficiency, and not namespace-clean.
|
||||||
|
---
|
||||||
*** bruce.el
|
*** bruce.el
|
||||||
|
---
|
||||||
*** ledit.el
|
*** ledit.el
|
||||||
|
---
|
||||||
*** mailpost.el
|
*** mailpost.el
|
||||||
|
+++
|
||||||
*** mouse-sel.el
|
*** mouse-sel.el
|
||||||
|
---
|
||||||
*** patcomp.el
|
*** patcomp.el
|
||||||
|
+++
|
||||||
*** cust-print.el
|
*** cust-print.el
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -596,11 +619,15 @@ inefficiency, and not namespace-clean.
|
||||||
|
|
||||||
* Incompatible Lisp Changes in Emacs 24.3
|
* Incompatible Lisp Changes in Emacs 24.3
|
||||||
|
|
||||||
|
** set-buffer-multibyte now signals an error in narrowed buffers.
|
||||||
|
|
||||||
|
+++
|
||||||
** (random) by default now returns a different random sequence in
|
** (random) by default now returns a different random sequence in
|
||||||
every Emacs run. Use (random S), where S is a string, to set the
|
every Emacs run. Use (random S), where S is a string, to set the
|
||||||
random seed to a value based on S, in order to get a repeatable
|
random seed to a value based on S, in order to get a repeatable
|
||||||
sequence in later calls.
|
sequence in later calls.
|
||||||
|
|
||||||
|
---
|
||||||
** The function `x-select-font' can return a font spec, instead of a
|
** The function `x-select-font' can return a font spec, instead of a
|
||||||
font name as a string. Whether it returns a font spec or a font name
|
font name as a string. Whether it returns a font spec or a font name
|
||||||
depends on the graphical library.
|
depends on the graphical library.
|
||||||
|
|
@ -621,6 +648,7 @@ and are now undefined. For backwards compatibility, defun and
|
||||||
defmacro currently return the name of the newly defined function/macro
|
defmacro currently return the name of the newly defined function/macro
|
||||||
but this should not be relied upon.
|
but this should not be relied upon.
|
||||||
|
|
||||||
|
---
|
||||||
** `face-spec-set' no longer sets frame-specific attributes when the
|
** `face-spec-set' no longer sets frame-specific attributes when the
|
||||||
third argument is a frame (that usage was obsolete since Emacs 22.2).
|
third argument is a frame (that usage was obsolete since Emacs 22.2).
|
||||||
|
|
||||||
|
|
@ -658,7 +686,7 @@ are deprecated and will be removed eventually.
|
||||||
**** inactivate-current-input-method-function ->
|
**** inactivate-current-input-method-function ->
|
||||||
deactivate-current-input-method-function
|
deactivate-current-input-method-function
|
||||||
|
|
||||||
** Some obsolete functions and variables were removed:
|
** Some obsolete functions, variables, and faces were removed:
|
||||||
|
|
||||||
*** `facemenu-unlisted-faces'
|
*** `facemenu-unlisted-faces'
|
||||||
*** `rmail-decode-mime-charset'
|
*** `rmail-decode-mime-charset'
|
||||||
|
|
@ -677,6 +705,7 @@ are deprecated and will be removed eventually.
|
||||||
*** `vc-ignore-vc-files' (use `vc-handled-backends' instead)
|
*** `vc-ignore-vc-files' (use `vc-handled-backends' instead)
|
||||||
*** `vc-master-templates' (use `vc-handled-backends' instead)
|
*** `vc-master-templates' (use `vc-handled-backends' instead)
|
||||||
*** `vc-checkout-carefully'
|
*** `vc-checkout-carefully'
|
||||||
|
*** `modeline'
|
||||||
|
|
||||||
|
|
||||||
* Lisp changes in Emacs 24.3
|
* Lisp changes in Emacs 24.3
|
||||||
|
|
@ -731,14 +760,11 @@ now accept a third argument to avoid choosing the selected window.
|
||||||
|
|
||||||
*** New macro `with-temp-buffer-window'.
|
*** New macro `with-temp-buffer-window'.
|
||||||
|
|
||||||
*** New options `temp-buffer-resize-frames' and
|
|
||||||
`temp-buffer-resize-regexps'.
|
|
||||||
|
|
||||||
*** `temp-buffer-resize-mode' no longer resizes windows that have been
|
*** `temp-buffer-resize-mode' no longer resizes windows that have been
|
||||||
reused.
|
reused.
|
||||||
|
|
||||||
*** New function `fit-frame-to-buffer' and new option
|
*** New function `fit-frame-to-buffer' and new options
|
||||||
`fit-frame-to-buffer-bottom-margin'.
|
`fit-frame-to-buffer' and `fit-frame-to-buffer-bottom-margin'.
|
||||||
|
|
||||||
*** New display action functions `display-buffer-below-selected',
|
*** New display action functions `display-buffer-below-selected',
|
||||||
`display-buffer-at-bottom' and `display-buffer-in-previous-window'.
|
`display-buffer-at-bottom' and `display-buffer-in-previous-window'.
|
||||||
|
|
@ -753,6 +779,9 @@ non-nil, specifies frame parameters to give any newly-created frame.
|
||||||
*** New display action alist entry `previous-window', if non-nil,
|
*** New display action alist entry `previous-window', if non-nil,
|
||||||
specifies window to reuse in `display-buffer-in-previous-window'.
|
specifies window to reuse in `display-buffer-in-previous-window'.
|
||||||
|
|
||||||
|
*** New display action alist entries `window-height' and `window-width'
|
||||||
|
to specify size of new window created by `display-buffer'.
|
||||||
|
|
||||||
*** The following variables are obsolete, as they can be replaced by
|
*** The following variables are obsolete, as they can be replaced by
|
||||||
appropriate entries in the `display-buffer-alist' function introduced
|
appropriate entries in the `display-buffer-alist' function introduced
|
||||||
in Emacs 24.1:
|
in Emacs 24.1:
|
||||||
|
|
@ -765,23 +794,24 @@ in Emacs 24.1:
|
||||||
**** `display-buffer-function'
|
**** `display-buffer-function'
|
||||||
|
|
||||||
** Time
|
** Time
|
||||||
|
---
|
||||||
*** `current-time-string' no longer requires that its argument's year
|
*** `current-time-string' no longer requires that its argument's year
|
||||||
must be in the range 1000..9999. It now works with any year supported
|
must be in the range 1000..9999. It now works with any year supported
|
||||||
by the underlying C implementation.
|
by the underlying C implementation.
|
||||||
|
---
|
||||||
*** `current-time' now returns extended-format time stamps
|
*** `current-time' now returns extended-format time stamps
|
||||||
(HIGH LOW USEC PSEC), where the new PSEC slot specifies picoseconds.
|
(HIGH LOW USEC PSEC), where the new PSEC slot specifies picoseconds.
|
||||||
PSEC is typically a multiple of 1000 on current machines. Other
|
PSEC is typically a multiple of 1000 on current machines. Other
|
||||||
functions that use this format, such as file-attributes and
|
functions that use this format, such as file-attributes and
|
||||||
format-time-string, have been changed accordingly. Old-format time
|
format-time-string, have been changed accordingly. Old-format time
|
||||||
stamps are still accepted.
|
stamps are still accepted.
|
||||||
|
---
|
||||||
*** The format of timers in timer-list and timer-idle-list is now
|
*** The format of timers in timer-list and timer-idle-list is now
|
||||||
[TRIGGERED-P HI-SECS LO-SECS USECS REPEAT-DELAY FUNCTION ARGS IDLE-DELAY PSECS].
|
[TRIGGERED-P HI-SECS LO-SECS USECS REPEAT-DELAY FUNCTION ARGS IDLE-DELAY PSECS].
|
||||||
The PSECS slot is new, and uses picosecond resolution. It can be
|
The PSECS slot is new, and uses picosecond resolution. It can be
|
||||||
accessed via the new timer--psecs accessor.
|
accessed via the new timer--psecs accessor.
|
||||||
|
|
||||||
|
+++
|
||||||
** Floating point functions now always return special values like NaN,
|
** Floating point functions now always return special values like NaN,
|
||||||
instead of signaling errors, if given invalid args, e.g. (log -1.0).
|
instead of signaling errors, if given invalid args, e.g. (log -1.0).
|
||||||
Previously, they returned NaNs on some platforms but signaled errors
|
Previously, they returned NaNs on some platforms but signaled errors
|
||||||
|
|
@ -793,24 +823,29 @@ This can significantly speed up execution of non-byte-compiled code,
|
||||||
but can also bump into harmless and previously unnoticed cyclic
|
but can also bump into harmless and previously unnoticed cyclic
|
||||||
dependencies. These should not be fatal: they will simply cause the
|
dependencies. These should not be fatal: they will simply cause the
|
||||||
macro-calls to be left for later expansion (as before), but will also
|
macro-calls to be left for later expansion (as before), but will also
|
||||||
result in a warning describing the cycle.
|
result in a warning ("Eager macro-expansion skipped due to cycle")
|
||||||
|
describing the cycle.
|
||||||
|
|
||||||
** Misc new functions:
|
** Misc new functions:
|
||||||
|
|
||||||
*** `autoloadp'
|
*** `autoloadp'
|
||||||
*** `autoload-do-load'.
|
*** `autoload-do-load'.
|
||||||
|
+++
|
||||||
*** `buffer-narrowed-p' tests if the buffer is narrowed.
|
*** `buffer-narrowed-p' tests if the buffer is narrowed.
|
||||||
*** `file-name-base' returns a file name sans directory and extension.
|
*** `file-name-base' returns a file name sans directory and extension.
|
||||||
*** `function-get' fetches a function property, following aliases.
|
*** `function-get' fetches a function property, following aliases.
|
||||||
|
+++
|
||||||
*** `posnp' tests if an object is a `posn'.
|
*** `posnp' tests if an object is a `posn'.
|
||||||
*** `set-temporary-overlay-map' sets up a temporary overlay map.
|
*** `set-temporary-overlay-map' sets up a temporary overlay map.
|
||||||
|
+++
|
||||||
*** `system-users' returns the user names on the system.
|
*** `system-users' returns the user names on the system.
|
||||||
|
+++
|
||||||
*** `system-groups' returns the group names on the system.
|
*** `system-groups' returns the group names on the system.
|
||||||
*** `tty-top-frame' returns the topmost frame of a text terminal.
|
*** `tty-top-frame' returns the topmost frame of a text terminal.
|
||||||
|
|
||||||
** New macros `setq-local' and `defvar-local'.
|
** New macros `setq-local' and `defvar-local'.
|
||||||
|
|
||||||
** New fringe bitmap exclamation-mark.
|
** New fringe bitmap `exclamation-mark'.
|
||||||
|
|
||||||
** Face underlining can now use a wave.
|
** Face underlining can now use a wave.
|
||||||
See the "Face Attributes" section of the Elisp manual.
|
See the "Face Attributes" section of the Elisp manual.
|
||||||
|
|
|
||||||
1468
etc/ORG-NEWS
1468
etc/ORG-NEWS
File diff suppressed because it is too large
Load diff
|
|
@ -9,13 +9,6 @@ Copyright (C) 2007-2012 Free Software Foundation, Inc.
|
||||||
License: GNU General Public License version 3 or later (see COPYING)
|
License: GNU General Public License version 3 or later (see COPYING)
|
||||||
|
|
||||||
|
|
||||||
Files: hicolor/16x16/apps/emacs22.png hicolor/24x24/apps/emacs22.png
|
|
||||||
hicolor/32x32/apps/emacs22.png hicolor/48x48/apps/emacs22.png
|
|
||||||
|
|
||||||
Author: Andrew Zhilin <andrew_zhilin@yahoo.com>
|
|
||||||
Copyright (C) 2005-2012 Free Software Foundation, Inc.
|
|
||||||
License: GNU General Public License version 3 or later (see COPYING)
|
|
||||||
|
|
||||||
Files: allout-widgets-dark-bg/closed.png
|
Files: allout-widgets-dark-bg/closed.png
|
||||||
allout-widgets-dark-bg/closed.xpm
|
allout-widgets-dark-bg/closed.xpm
|
||||||
allout-widgets-dark-bg/empty.png
|
allout-widgets-dark-bg/empty.png
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 705 B |
Binary file not shown.
|
Before Width: | Height: | Size: 988 B |
Binary file not shown.
|
Before Width: | Height: | Size: 2.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.4 KiB |
|
|
@ -256,6 +256,7 @@
|
||||||
<text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
|
<text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
|
||||||
<text:sequence-decl text:display-outline-level="0" text:name="Equation"/>
|
<text:sequence-decl text:display-outline-level="0" text:name="Equation"/>
|
||||||
<text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
|
<text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
|
||||||
|
<text:sequence-decl text:display-outline-level="0" text:name="Listing"/>
|
||||||
</text:sequence-decls>
|
</text:sequence-decls>
|
||||||
</office:text>
|
</office:text>
|
||||||
</office:body>
|
</office:body>
|
||||||
|
|
|
||||||
|
|
@ -319,6 +319,11 @@
|
||||||
<style:style style:name="Table" style:family="paragraph" style:parent-style-name="Caption" style:class="extra">
|
<style:style style:name="Table" style:family="paragraph" style:parent-style-name="Caption" style:class="extra">
|
||||||
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
|
||||||
</style:style>
|
</style:style>
|
||||||
|
<style:style style:name="Listing" style:family="paragraph" style:parent-style-name="Caption" style:class="extra">
|
||||||
|
<style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false" fo:keep-with-next="always">
|
||||||
|
<style:tab-stops/>
|
||||||
|
</style:paragraph-properties>
|
||||||
|
</style:style>
|
||||||
<style:style style:name="Horizontal_20_Line" style:display-name="Horizontal Line" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="html">
|
<style:style style:name="Horizontal_20_Line" style:display-name="Horizontal Line" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="html">
|
||||||
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.499cm" style:border-line-width-bottom="0.002cm 0.035cm 0.002cm" fo:padding="0cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.039cm double #808080" text:number-lines="false" text:line-number="0" style:join-border="false"/>
|
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.499cm" style:border-line-width-bottom="0.002cm 0.035cm 0.002cm" fo:padding="0cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.039cm double #808080" text:number-lines="false" text:line-number="0" style:join-border="false"/>
|
||||||
<style:text-properties fo:font-size="6pt" style:font-size-asian="6pt" style:font-size-complex="6pt"/>
|
<style:text-properties fo:font-size="6pt" style:font-size-asian="6pt" style:font-size-complex="6pt"/>
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
% Reference Card for Org Mode
|
% Reference Card for Org Mode
|
||||||
\def\orgversionnumber{7.8.11}
|
\def\orgversionnumber{7.9.2}
|
||||||
\def\versionyear{2012} % latest update
|
\def\versionyear{2012} % latest update
|
||||||
\input emacsver.tex
|
\input emacsver.tex
|
||||||
|
|
||||||
|
|
|
||||||
164
etc/srecode/c.srt
Normal file
164
etc/srecode/c.srt
Normal file
|
|
@ -0,0 +1,164 @@
|
||||||
|
;;; c.srt --- SRecode templates for c-mode
|
||||||
|
|
||||||
|
;; Copyright (C) 2007, 2008, 2009, 2010, 2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
;; Author: Eric M. Ludlam <eric@siege-engine.com>
|
||||||
|
|
||||||
|
;; This file is part of GNU Emacs.
|
||||||
|
|
||||||
|
;; GNU Emacs is free software: you can redistribute it and/or modify
|
||||||
|
;; it under the terms of the GNU General Public License as published by
|
||||||
|
;; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
;; (at your option) any later version.
|
||||||
|
|
||||||
|
;; GNU Emacs is distributed in the hope that it will be useful,
|
||||||
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
;; GNU General Public License for more details.
|
||||||
|
|
||||||
|
;; You should have received a copy of the GNU General Public License
|
||||||
|
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
set mode "c-mode"
|
||||||
|
|
||||||
|
set comment_start "/**"
|
||||||
|
set comment_end " */"
|
||||||
|
set comment_prefix " *"
|
||||||
|
|
||||||
|
;; OVERRIDE THIS in your user or project template file to whatever
|
||||||
|
;; you use for your project.
|
||||||
|
set HEADEREXT ".h"
|
||||||
|
|
||||||
|
context file
|
||||||
|
|
||||||
|
template empty :time :user :file :c
|
||||||
|
----
|
||||||
|
{{>:filecomment}}
|
||||||
|
|
||||||
|
{{#NOTHEADER}}
|
||||||
|
|
||||||
|
{{^}}
|
||||||
|
{{/NOTHEADER}}
|
||||||
|
{{#HEADER}}
|
||||||
|
{{>:header_guard}}
|
||||||
|
{{/HEADER}}
|
||||||
|
----
|
||||||
|
|
||||||
|
template header_guard :file :blank
|
||||||
|
----
|
||||||
|
#ifndef {{FILENAME_SYMBOL}}
|
||||||
|
#define {{FILENAME_SYMBOL}} 1
|
||||||
|
|
||||||
|
{{^}}
|
||||||
|
|
||||||
|
#endif // {{FILENAME_SYMBOL}}
|
||||||
|
----
|
||||||
|
|
||||||
|
context misc
|
||||||
|
|
||||||
|
template arglist
|
||||||
|
"Insert an argument list for a function.
|
||||||
|
@todo - Support smart CR in a buffer for not too long lines."
|
||||||
|
----
|
||||||
|
({{#ARGS}}{{TYPE}} {{NAME}}{{#NOTLAST}},{{/NOTLAST}}{{/ARGS}})
|
||||||
|
----
|
||||||
|
|
||||||
|
context declaration
|
||||||
|
|
||||||
|
prompt TYPE "Return Type: "
|
||||||
|
|
||||||
|
template function :indent :blank
|
||||||
|
"Insert a function declaration."
|
||||||
|
----
|
||||||
|
{{?TYPE}} {{?NAME}}{{>:misc:arglist}}
|
||||||
|
{{#INITIALIZERS}}{{>B:initializers}}{{/INITIALIZERS}}
|
||||||
|
{
|
||||||
|
{{^}}
|
||||||
|
}
|
||||||
|
----
|
||||||
|
bind "f"
|
||||||
|
|
||||||
|
template function-prototype :indent :blank
|
||||||
|
"Insert a function declaration."
|
||||||
|
----
|
||||||
|
{{?TYPE}} {{?NAME}}{{>:misc:arglist}};
|
||||||
|
----
|
||||||
|
|
||||||
|
|
||||||
|
prompt TYPE "Data Type: "
|
||||||
|
|
||||||
|
template variable :indent :blank
|
||||||
|
"Insert a variable declaration."
|
||||||
|
----
|
||||||
|
{{?TYPE}} {{?NAME}}{{#HAVEDEFAULT}} = {{DEFAULT}}{{/HAVEDEFAULT}};
|
||||||
|
----
|
||||||
|
bind "v"
|
||||||
|
|
||||||
|
template variable-prototype :indent :blank
|
||||||
|
"Insert a variable declaration."
|
||||||
|
----
|
||||||
|
{{?TYPE}} {{?NAME}};
|
||||||
|
----
|
||||||
|
bind "v"
|
||||||
|
|
||||||
|
|
||||||
|
template include :blank
|
||||||
|
"An include statement."
|
||||||
|
----
|
||||||
|
#include "{{?NAME}}"
|
||||||
|
----
|
||||||
|
bind "i"
|
||||||
|
|
||||||
|
template system-include :blank
|
||||||
|
"An include statement."
|
||||||
|
----
|
||||||
|
#include <{{?NAME}}>
|
||||||
|
----
|
||||||
|
bind "i"
|
||||||
|
|
||||||
|
template label :blank :indent
|
||||||
|
----
|
||||||
|
{{?NAME}}:
|
||||||
|
----
|
||||||
|
|
||||||
|
context declaration
|
||||||
|
|
||||||
|
template comment-function :indent :blank
|
||||||
|
"Used to put a nice comment in front of a function.
|
||||||
|
Override this with your own preference to avoid using doxygen"
|
||||||
|
----
|
||||||
|
{{>A:declaration:doxygen-function}}
|
||||||
|
----
|
||||||
|
|
||||||
|
;;; DOXYGEN FEATURES
|
||||||
|
;;
|
||||||
|
;;
|
||||||
|
context declaration
|
||||||
|
|
||||||
|
template doxygen-function :indent :blank
|
||||||
|
----
|
||||||
|
/**
|
||||||
|
* @name {{NAME}} - {{DOC}}{{^}}{{#ARGS}}
|
||||||
|
* @param {{NAME}} - {{DOC}}{{/ARGS}}
|
||||||
|
* @return {{TYPE}}
|
||||||
|
*/
|
||||||
|
----
|
||||||
|
|
||||||
|
template doxygen-variable-same-line
|
||||||
|
----
|
||||||
|
/**< {{DOC}}{{^}} */
|
||||||
|
----
|
||||||
|
|
||||||
|
template doxygen-section-comment :blank :indent
|
||||||
|
"Insert a comment that separates sections of an Emacs Lisp file."
|
||||||
|
----
|
||||||
|
|
||||||
|
/** {{?TITLE}}
|
||||||
|
*
|
||||||
|
* {{^}}
|
||||||
|
*/
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
|
||||||
|
;; end
|
||||||
|
|
@ -25,82 +25,8 @@ set comment_start "/**"
|
||||||
set comment_end " */"
|
set comment_end " */"
|
||||||
set comment_prefix " *"
|
set comment_prefix " *"
|
||||||
|
|
||||||
;; OVERRIDE THIS in your user or project template file to whatever
|
|
||||||
;; you use for your project.
|
|
||||||
set HEADEREXT ".h"
|
|
||||||
|
|
||||||
context file
|
|
||||||
|
|
||||||
template empty :time :user :file :cpp
|
|
||||||
----
|
|
||||||
{{>:filecomment}}
|
|
||||||
|
|
||||||
{{#NOTHEADER}}
|
|
||||||
|
|
||||||
{{^}}
|
|
||||||
{{/NOTHEADER}}
|
|
||||||
{{#HEADER}}
|
|
||||||
{{>:header_guard}}
|
|
||||||
{{/HEADER}}
|
|
||||||
----
|
|
||||||
|
|
||||||
template header_guard :file :blank
|
|
||||||
----
|
|
||||||
#ifndef {{FILENAME_SYMBOL}}
|
|
||||||
#define {{FILENAME_SYMBOL}} 1
|
|
||||||
|
|
||||||
{{^}}
|
|
||||||
|
|
||||||
#endif // {{FILENAME_SYMBOL}}
|
|
||||||
----
|
|
||||||
|
|
||||||
context misc
|
|
||||||
|
|
||||||
template arglist
|
|
||||||
"Insert an argument list for a function.
|
|
||||||
@todo - Support smart CR in a buffer for not too long lines."
|
|
||||||
----
|
|
||||||
({{#ARGS}}{{TYPE}} {{NAME}}{{#NOTLAST}},{{/NOTLAST}}{{/ARGS}})
|
|
||||||
----
|
|
||||||
|
|
||||||
context declaration
|
context declaration
|
||||||
|
|
||||||
prompt TYPE "Return Type: "
|
|
||||||
|
|
||||||
template function :indent :blank
|
|
||||||
"Insert a function declaration."
|
|
||||||
----
|
|
||||||
{{?TYPE}} {{?NAME}}{{>:misc:arglist}}
|
|
||||||
{{#INITIALIZERS}}{{>B:initializers}}{{/INITIALIZERS}}
|
|
||||||
{
|
|
||||||
{{^}}
|
|
||||||
}
|
|
||||||
----
|
|
||||||
bind "f"
|
|
||||||
|
|
||||||
template function-prototype :indent :blank
|
|
||||||
"Insert a function declaration."
|
|
||||||
----
|
|
||||||
{{?TYPE}} {{?NAME}}{{>:misc:arglist}};
|
|
||||||
----
|
|
||||||
|
|
||||||
|
|
||||||
prompt TYPE "Data Type: "
|
|
||||||
|
|
||||||
template variable :indent :blank
|
|
||||||
"Insert a variable declaration."
|
|
||||||
----
|
|
||||||
{{?TYPE}} {{?NAME}}{{#HAVEDEFAULT}} = {{DEFAULT}}{{/HAVEDEFAULT}};
|
|
||||||
----
|
|
||||||
bind "v"
|
|
||||||
|
|
||||||
template variable-prototype :indent :blank
|
|
||||||
"Insert a variable declaration."
|
|
||||||
----
|
|
||||||
{{?TYPE}} {{?NAME}};
|
|
||||||
----
|
|
||||||
bind "v"
|
|
||||||
|
|
||||||
template class :indent :blank
|
template class :indent :blank
|
||||||
"Insert a C++ class. For use by user insertion.
|
"Insert a C++ class. For use by user insertion.
|
||||||
Override this template to change contents of a class.
|
Override this template to change contents of a class.
|
||||||
|
|
@ -146,18 +72,6 @@ template method :indent :blank
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
|
|
||||||
template include :blank
|
|
||||||
"An include statement."
|
|
||||||
----
|
|
||||||
#include "{{?NAME}}"
|
|
||||||
----
|
|
||||||
bind "i"
|
|
||||||
|
|
||||||
template label :blank :indent
|
|
||||||
----
|
|
||||||
{{?NAME}}:
|
|
||||||
----
|
|
||||||
|
|
||||||
context classdecl
|
context classdecl
|
||||||
|
|
||||||
template constructor-tag :indent :blank
|
template constructor-tag :indent :blank
|
||||||
|
|
@ -196,15 +110,6 @@ Override this with your own preference to avoid using doxygen."
|
||||||
{{>A:classdecl:doxygen-function-group-end}}
|
{{>A:classdecl:doxygen-function-group-end}}
|
||||||
----
|
----
|
||||||
|
|
||||||
context declaration
|
|
||||||
|
|
||||||
template comment-function :indent :blank
|
|
||||||
"Used to put a nice comment in front of a function.
|
|
||||||
Override this with your own preference to avoid using doxygen"
|
|
||||||
----
|
|
||||||
{{>A:declaration:doxygen-function}}
|
|
||||||
----
|
|
||||||
|
|
||||||
;;; DOXYGEN FEATURES
|
;;; DOXYGEN FEATURES
|
||||||
;;
|
;;
|
||||||
;;
|
;;
|
||||||
|
|
@ -229,32 +134,4 @@ template doxygen-function-group-end :indent :blank
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|
||||||
context declaration
|
|
||||||
|
|
||||||
template doxygen-function :indent :blank
|
|
||||||
----
|
|
||||||
/**
|
|
||||||
* @name {{NAME}} - {{DOC}}{{^}}{{#ARGS}}
|
|
||||||
* @param {{NAME}} - {{DOC}}{{/ARGS}}
|
|
||||||
* @return {{TYPE}}
|
|
||||||
*/
|
|
||||||
----
|
|
||||||
|
|
||||||
template doxygen-variable-same-line
|
|
||||||
----
|
|
||||||
/**< {{DOC}}{{^}} */
|
|
||||||
----
|
|
||||||
|
|
||||||
template doxygen-section-comment :blank :indent
|
|
||||||
"Insert a comment that separates sections of an Emacs Lisp file."
|
|
||||||
----
|
|
||||||
|
|
||||||
/** {{?TITLE}}
|
|
||||||
*
|
|
||||||
* {{^}}
|
|
||||||
*/
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
|
|
||||||
;; end
|
;; end
|
||||||
|
|
|
||||||
54
etc/srecode/ede-autoconf.srt
Normal file
54
etc/srecode/ede-autoconf.srt
Normal file
|
|
@ -0,0 +1,54 @@
|
||||||
|
;; ede/templates/autoconf.srt --- Templates for autoconf used by EDE.
|
||||||
|
;;
|
||||||
|
;; Copyright (C) 2010 Eric M. Ludlam
|
||||||
|
;;
|
||||||
|
;; Author: Eric M. Ludlam <eric@siege-engine.com>
|
||||||
|
;;
|
||||||
|
;; This program is free software; you can redistribute it and/or
|
||||||
|
;; modify it under the terms of the GNU General Public License as
|
||||||
|
;; published by the Free Software Foundation; either version 2, or (at
|
||||||
|
;; your option) any later version.
|
||||||
|
|
||||||
|
;; This program is distributed in the hope that it will be useful, but
|
||||||
|
;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
;; General Public License for more details.
|
||||||
|
|
||||||
|
;; You should have received a copy of the GNU General Public License
|
||||||
|
;; along with this program; see the file COPYING. If not, write to
|
||||||
|
;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
;; Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
set mode "autoconf-mode"
|
||||||
|
set escape_start "{{"
|
||||||
|
set escape_end "}}"
|
||||||
|
set comment_start "#"
|
||||||
|
set comment_prefix "#"
|
||||||
|
set application "ede"
|
||||||
|
|
||||||
|
context file
|
||||||
|
|
||||||
|
template ede-empty
|
||||||
|
"Start a new EDE generated configure.in/ac file."
|
||||||
|
----
|
||||||
|
{{comment_prefix}} Automatically Generated/Maintained {{FILE}} by EDE.
|
||||||
|
{{comment_prefix}}
|
||||||
|
{{comment_prefix}} YOU MAY MODIFY THIS FILE
|
||||||
|
{{comment_prefix}} Hand made changes in some sections will be preserved
|
||||||
|
{{comment_prefix}} by EDE when this file is updated.
|
||||||
|
{{comment_prefix}}
|
||||||
|
{{comment_prefix}} EDE is the Emacs Development Environment.
|
||||||
|
{{comment_prefix}} http://cedet.sourceforge.net/ede.shtml
|
||||||
|
{{comment_prefix}}
|
||||||
|
{{comment_prefix}} Process this file with autoconf to produce a configure script
|
||||||
|
|
||||||
|
AC_INIT({{TEST_FILE}})
|
||||||
|
AM_INIT_AUTOMAKE([{{PROGRAM}}], 0)
|
||||||
|
AM_CONFIG_HEADER(config.h)
|
||||||
|
|
||||||
|
{{comment_prefix}} End the configure script.
|
||||||
|
AC_OUTPUT(Makefile, [date > stamp-h] )
|
||||||
|
----
|
||||||
|
|
||||||
|
|
||||||
|
;; end
|
||||||
|
|
@ -46,4 +46,36 @@ template ede-vars
|
||||||
{{NAME}}={{#VALUE}} {{VAL}}{{/VALUE}}{{/VARIABLE}}
|
{{NAME}}={{#VALUE}} {{VAL}}{{/VALUE}}{{/VARIABLE}}
|
||||||
----
|
----
|
||||||
|
|
||||||
|
;; Some extra templates for Arduino based Makefiles.
|
||||||
|
;; Perhaps split this out someday in the future.
|
||||||
|
context arduino
|
||||||
|
|
||||||
|
template ede-empty :file
|
||||||
|
----
|
||||||
|
# Automatically Generated {{FILE}} by EDE.
|
||||||
|
# For use with Make for an Arduino project.
|
||||||
|
#
|
||||||
|
# DO NOT MODIFY THIS FILE OR YOUR CHANGES MAY BE LOST.
|
||||||
|
# EDE is the Emacs Development Environment.
|
||||||
|
# http://cedet.sourceforge.net/ede.shtml
|
||||||
|
|
||||||
|
ARDUINO_DIR = {{ARDUINO_HOME}}
|
||||||
|
|
||||||
|
TARGET = {{TARGET}}
|
||||||
|
ARDUINO_LIBS = {{ARDUINO_LIBS}}
|
||||||
|
|
||||||
|
MCU = {{MCU}}
|
||||||
|
F_CPU = {{F_CPU}}
|
||||||
|
ARDUINO_PORT = {{PORT}}
|
||||||
|
BOARD_TAG = {{BOARD}}
|
||||||
|
|
||||||
|
AVRDUDE_ARD_BAUDRATE = {{AVRDUDE_ARD_BAUDRATE}}
|
||||||
|
AVRDUDE_ARD_PROGRAMMER = {{AVRDUDE_ARD_PROGRAMMER}}
|
||||||
|
|
||||||
|
include {{ARDUINO_MK}}
|
||||||
|
|
||||||
|
# End of Makefile
|
||||||
|
----
|
||||||
|
|
||||||
|
|
||||||
;; end
|
;; end
|
||||||
|
|
|
||||||
|
|
@ -197,7 +197,7 @@ template variable-option :el :el-custom :indent :blank
|
||||||
----
|
----
|
||||||
(defcustom $?NAME$ $^$
|
(defcustom $?NAME$ $^$
|
||||||
"*$DOC$"
|
"*$DOC$"
|
||||||
:group $GROUP$
|
:group '$GROUP$
|
||||||
:type $?CUSTOMTYPE$)
|
:type $?CUSTOMTYPE$)
|
||||||
----
|
----
|
||||||
bind "o"
|
bind "o"
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,15 @@
|
||||||
|
2012-10-01 Fabrice Popineau <fabrice.popineau@gmail.com>
|
||||||
|
|
||||||
|
* make-docfile.c (write_globals): Special-case
|
||||||
|
Fexit_recursive_edit and Fabort_recursive_edit as well, as
|
||||||
|
functions that are _Noreturn, to be consistent with
|
||||||
|
src/keyboard.c.
|
||||||
|
|
||||||
|
2012-09-30 Eli Zaretskii <eliz@gnu.org>
|
||||||
|
|
||||||
|
* ntlib.c (gettimeofday): Copy from src/w32.c. lib/gettime.c
|
||||||
|
needs this function.
|
||||||
|
|
||||||
2012-09-26 Juanma Barranquero <lekktu@gmail.com>
|
2012-09-26 Juanma Barranquero <lekktu@gmail.com>
|
||||||
|
|
||||||
* makefile.w32-in (obj): Add profiler.o.
|
* makefile.w32-in (obj): Add profiler.o.
|
||||||
|
|
|
||||||
|
|
@ -659,7 +659,9 @@ write_globals (void)
|
||||||
special hacks. */
|
special hacks. */
|
||||||
if (strcmp (globals[i].name, "Fthrow") == 0
|
if (strcmp (globals[i].name, "Fthrow") == 0
|
||||||
|| strcmp (globals[i].name, "Ftop_level") == 0
|
|| strcmp (globals[i].name, "Ftop_level") == 0
|
||||||
|| strcmp (globals[i].name, "Fkill_emacs") == 0)
|
|| strcmp (globals[i].name, "Fkill_emacs") == 0
|
||||||
|
|| strcmp (globals[i].name, "Fexit_recursive_edit") == 0
|
||||||
|
|| strcmp (globals[i].name, "Fabort_recursive_edit") == 0)
|
||||||
fprintf (outfile, "_Noreturn ");
|
fprintf (outfile, "_Noreturn ");
|
||||||
fprintf (outfile, "EXFUN (%s, ", globals[i].name);
|
fprintf (outfile, "EXFUN (%s, ", globals[i].name);
|
||||||
if (globals[i].value == -1)
|
if (globals[i].value == -1)
|
||||||
|
|
|
||||||
|
|
@ -29,9 +29,16 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#include <sys/timeb.h>
|
||||||
|
|
||||||
#include "ntlib.h"
|
#include "ntlib.h"
|
||||||
|
|
||||||
|
struct timezone
|
||||||
|
{
|
||||||
|
int tz_minuteswest; /* minutes west of Greenwich */
|
||||||
|
int tz_dsttime; /* type of dst correction */
|
||||||
|
};
|
||||||
|
|
||||||
#define MAXPATHLEN _MAX_PATH
|
#define MAXPATHLEN _MAX_PATH
|
||||||
|
|
||||||
/* Emulate sleep...we could have done this with a define, but that
|
/* Emulate sleep...we could have done this with a define, but that
|
||||||
|
|
@ -202,6 +209,29 @@ getpass (const char * prompt)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* This is needed because lib/gettime.c calls gettimeofday, which MSVC
|
||||||
|
doesn't have. Copied from w32.c. */
|
||||||
|
void
|
||||||
|
gettimeofday (struct timeval *tv, struct timezone *tz)
|
||||||
|
{
|
||||||
|
struct _timeb tb;
|
||||||
|
_ftime (&tb);
|
||||||
|
|
||||||
|
tv->tv_sec = tb.time;
|
||||||
|
tv->tv_usec = tb.millitm * 1000L;
|
||||||
|
/* Implementation note: _ftime sometimes doesn't update the dstflag
|
||||||
|
according to the new timezone when the system timezone is
|
||||||
|
changed. We could fix that by using GetSystemTime and
|
||||||
|
GetTimeZoneInformation, but that doesn't seem necessary, since
|
||||||
|
Emacs always calls gettimeofday with the 2nd argument NULL (see
|
||||||
|
current_emacs_time). */
|
||||||
|
if (tz)
|
||||||
|
{
|
||||||
|
tz->tz_minuteswest = tb.timezone; /* minutes west of Greenwich */
|
||||||
|
tz->tz_dsttime = tb.dstflag; /* type of dst correction */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
fchown (int fd, unsigned uid, unsigned gid)
|
fchown (int fd, unsigned uid, unsigned gid)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
522
lisp/ChangeLog
522
lisp/ChangeLog
|
|
@ -1,3 +1,520 @@
|
||||||
|
2012-10-03 Fabián Ezequiel Gallina <fgallina@cuca>
|
||||||
|
|
||||||
|
Fix cornercase for string syntax.
|
||||||
|
* progmodes/python.el (python-syntax-propertize-function):
|
||||||
|
Simplify and enhance the regexp for unescaped quotes. Now it also
|
||||||
|
matches quotes in weird situations like the single quote in
|
||||||
|
"something\"'".
|
||||||
|
(python-syntax-stringify): Simplify num-quotes detecting code.
|
||||||
|
|
||||||
|
2012-10-03 Glenn Morris <rgm@gnu.org>
|
||||||
|
|
||||||
|
* help-macro.el (three-step-help):
|
||||||
|
Revert 2012-09-29 change. (Bug#12567)
|
||||||
|
|
||||||
|
2012-10-03 Martin Rudalics <rudalics@gmx.at>
|
||||||
|
|
||||||
|
* menu-bar.el (kill-this-buffer): Don't do anything when
|
||||||
|
`menu-frame' is not alive or visible (Bug#8184).
|
||||||
|
|
||||||
|
* emacs-lisp/debug.el (debug): When quitting the debugger window
|
||||||
|
restore current buffer (Bug#12502).
|
||||||
|
|
||||||
|
2012-10-02 Chong Yidong <cyd@gnu.org>
|
||||||
|
|
||||||
|
* progmodes/hideif.el (hif-lookup, hif-defined): Handle
|
||||||
|
semantic-c-takeover-hideif.
|
||||||
|
|
||||||
|
2012-10-02 Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
|
||||||
|
Change sampling interval units from ms to ns.
|
||||||
|
* profiler.el (profiler-sampling-interval): Change units
|
||||||
|
from ms to ns, multiplying the default by 1000000 so that
|
||||||
|
it remains 1 ms.
|
||||||
|
(profiler-report-cpu-line-format): Give enough room for
|
||||||
|
the maximum counters on 64-bit hosts.
|
||||||
|
(profiler-report-render-calltree-1): Call them "CPU samples",
|
||||||
|
not "Time (ms)", since they are not milliseconds now (and
|
||||||
|
never really were).
|
||||||
|
|
||||||
|
2012-10-02 Sergio Durigan Junior <sergiodj@riseup.net> (tiny change)
|
||||||
|
|
||||||
|
* net/eudcb-bbdb.el (eudc-bbdb-format-record-as-result): Fix
|
||||||
|
querying BBDB for entries without a last name (Bug#11580).
|
||||||
|
|
||||||
|
2012-10-02 Chong Yidong <cyd@gnu.org>
|
||||||
|
|
||||||
|
* emacs-lisp/eieio.el: Restore Version header.
|
||||||
|
|
||||||
|
2012-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||||
|
|
||||||
|
* vc/diff-mode.el (diff--auto-refine-data): New var.
|
||||||
|
(diff-hunk): Use it to delay refinement.
|
||||||
|
(diff-mode): Remove overlays when we turn off font-lock.
|
||||||
|
|
||||||
|
* textmodes/table.el: Use lexical-binding, dolist, define-minor-mode.
|
||||||
|
(table-initialize-table-fixed-width-mode)
|
||||||
|
(table-set-table-fixed-width-mode): Remove functions.
|
||||||
|
(table-command-list): Move initialization into declaration.
|
||||||
|
(table--tweak-menu-for-xemacs): Move defun outside mapcar.
|
||||||
|
(table-with-cache-buffer): Use `declare'.
|
||||||
|
(table-span-cell): Simplify via CSE.
|
||||||
|
(table-fixed-width-mode): Use define-minor-mode.
|
||||||
|
(table-call-interactively, table-funcall, table-apply): Remove.
|
||||||
|
(table-function): New function, to replace them.
|
||||||
|
|
||||||
|
* bookmark.el (bookmark-search-pattern): Remove var.
|
||||||
|
(bookmark-read-search-input): Remove function.
|
||||||
|
(bookmark-bmenu-search): Reimplement using a minibuffer.
|
||||||
|
|
||||||
|
* faces.el (modeline): Remove obsolete face name.
|
||||||
|
|
||||||
|
* vc/add-log.el (add-log-buffer-file-name-function): Demote to defvar
|
||||||
|
and give a non-nil default value.
|
||||||
|
(add-change-log-entry): Simplify accordingly.
|
||||||
|
|
||||||
|
2012-10-01 Dmitry Gutov <dgutov@yandex.ru>
|
||||||
|
|
||||||
|
* vc/vc-git.el (vc-git-log-edit-toggle-signoff): New function.
|
||||||
|
(vc-git-log-edit-toggle-amend): New function.
|
||||||
|
(vc-git-log-edit-toggle-signoff): New function.
|
||||||
|
(vc-git-log-edit-mode): New major mode.
|
||||||
|
(vc-git-log-edit-mode-map): Keymap for it.
|
||||||
|
(vc-git-checkin): Handle "Amend" and "Sign-Off" headers.
|
||||||
|
|
||||||
|
* vc/log-edit.el (log-edit-font-lock-keywords): Allow hyphens in
|
||||||
|
header names.
|
||||||
|
(log-edit-toggle-header): New function.
|
||||||
|
(log-edit-extract-headers): Accept function values in HEADERS alist.
|
||||||
|
|
||||||
|
2012-10-01 David Engster <deng@randomsample.de>
|
||||||
|
|
||||||
|
* emacs-lisp/eieio-opt.el (eieio-describe-class): Add filename
|
||||||
|
from symbol property and change message to be more consistent with
|
||||||
|
Emacs proper.
|
||||||
|
(eieio-describe-generic): Add filename for each implementation.
|
||||||
|
Fix indices for generic and normal methods.
|
||||||
|
(eieio-method-def, eieio-class-def): New buttons.
|
||||||
|
(eieio-help-find-method-definition)
|
||||||
|
(eieio-help-find-class-definition): New functions.
|
||||||
|
(eieio-help-mode-augmentation-maybee): Add buttons to filenames of
|
||||||
|
class, constructor and method definitions.
|
||||||
|
|
||||||
|
* emacs-lisp/eieio.el (eieiomt-add, eieio-defclass): Save file
|
||||||
|
information in symbol property.
|
||||||
|
(scoped-class): Remove.
|
||||||
|
(eieio-slot-name-index, call-next-method): Check if it is bound.
|
||||||
|
|
||||||
|
2012-10-01 Leo P. White <lpw25@cam.ac.uk>
|
||||||
|
|
||||||
|
* emacs-lisp/eieio-custom.el (eieio-custom-mode-map): New option.
|
||||||
|
(eieio-custom-mode): New major mode.
|
||||||
|
(eieio-customize-object): Use it.
|
||||||
|
|
||||||
|
2012-10-01 Eric Ludlam <zappo@gnu.org>
|
||||||
|
|
||||||
|
* emacs-lisp/eieio-base.el (eieio-persistent-read): New input args
|
||||||
|
specifying the expected class, and whether subclassing is allowed.
|
||||||
|
(eieio-persistent-convert-list-to-object):
|
||||||
|
(eieio-persistent-validate/fix-slot-value)
|
||||||
|
(eieio-persistent-slot-type-is-class-p): New functions.
|
||||||
|
(eieio-named::slot-missing): Doc fix.
|
||||||
|
|
||||||
|
* emacs-lisp/eieio-datadebug.el (data-debug/eieio-insert-slots):
|
||||||
|
Stop using unused publd variable.
|
||||||
|
|
||||||
|
* emacs-lisp/eieio-speedbar.el (eieio-speedbar-handle-click):
|
||||||
|
(eieio-speedbar-description, eieio-speedbar-derive-line-path)
|
||||||
|
(eieio-speedbar-object-buttonname, eieio-speedbar-make-tag-line)
|
||||||
|
(eieio-speedbar-handle-click): Do not specify a class for the
|
||||||
|
method. Fixes method invocation order problems with EDE.
|
||||||
|
|
||||||
|
2012-10-01 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||||
|
|
||||||
|
* emacs-lisp/bytecomp.el (byte-compiler-abbreviate-file): New function.
|
||||||
|
(byte-compile-warning-prefix, byte-compile-file): Use it (bug#12508).
|
||||||
|
|
||||||
|
2012-10-01 Karl Fogel <kfogel@red-bean.com>
|
||||||
|
|
||||||
|
* bookmark.el (bookmark-version-control): Give tags in the
|
||||||
|
:type choices (Bug#12309), and improve doc string.
|
||||||
|
(bookmark-write-file): Bind `print-circle' to `t' to allow
|
||||||
|
circular custom bookmark types. (Bug#12503)
|
||||||
|
|
||||||
|
2012-10-01 Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
|
||||||
|
Revert the FOLLOW-SYMLINKS change for file-attributes.
|
||||||
|
* files.el (remote-file-name-inhibit-cache, after-find-file):
|
||||||
|
* time.el (display-time-file-nonempty-p): Undo last change.
|
||||||
|
|
||||||
|
* profiler.el (profiler-sampling-interval): Change default back to 1.
|
||||||
|
See Stefan Monnier in
|
||||||
|
<http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00863.html>.
|
||||||
|
|
||||||
|
2012-10-01 Fabián Ezequiel Gallina <fgallina@cuca>
|
||||||
|
|
||||||
|
Shell output catching a la gud-gdb.
|
||||||
|
* progmodes/python.el (python-shell-fetch-lines-in-progress)
|
||||||
|
(python-shell-fetch-lines-string, python-shell-fetched-lines):
|
||||||
|
New Vars.
|
||||||
|
(python-shell-fetch-lines-filter): New function.
|
||||||
|
(python-shell-send-string-no-output): Use them.
|
||||||
|
|
||||||
|
2012-09-30 Tomohiro Matsuyama <tomo@cx4a.org>
|
||||||
|
|
||||||
|
* profiler.el (profiler-sampling-interval): Rename from
|
||||||
|
profiler-sample-interval.
|
||||||
|
(profiler-sampling-interval): Default to 10.
|
||||||
|
(profiler-find-profile): New command (was profiler-find-log).
|
||||||
|
(profiler-find-profile-other-window): New command.
|
||||||
|
(profiler-find-profile-other-frame): New command.
|
||||||
|
(profiler-profile): Introduce API-level data structure.
|
||||||
|
|
||||||
|
2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
|
||||||
|
file-attributes has a new optional arg FOLLOW-SYMLINKS.
|
||||||
|
* files.el (remote-file-name-inhibit-cache):
|
||||||
|
* time.el (display-time-file-nonempty-p): Use it.
|
||||||
|
* files.el (after-find-file): Don't chase links before calling
|
||||||
|
file-exists-p, as file-exists-p already does the right thing.
|
||||||
|
|
||||||
|
2012-09-30 Ralf Angeli <angeli@caeruleus.net>
|
||||||
|
|
||||||
|
Merge from standalone RefTeX repository.
|
||||||
|
|
||||||
|
The following ChangeLog entries are shortened versions of the
|
||||||
|
original ones with file paths adapted. A not so strongly edited
|
||||||
|
version of the original ChangeLog can be found in the commit log.
|
||||||
|
|
||||||
|
* textmodes/reftex-auc.el: Move `provide' call to bottom of file.
|
||||||
|
(reftex-arg-cite): Use `reftex-cite-key-separator'.
|
||||||
|
Correctly handle new value type returned by `reftex-citation'.
|
||||||
|
|
||||||
|
* textmodes/reftex-cite.el (reftex-create-bibtex-file): Make sure
|
||||||
|
that entries with whitespace at various places are found.
|
||||||
|
Doc fix. Include entries that are cross-referenced from cited entries.
|
||||||
|
Include @String definitions in the resulting bib file. Add header
|
||||||
|
and footer defined in `reftex-create-bibtex-header' and
|
||||||
|
`reftex-create-bibtex-footer'.
|
||||||
|
(reftex-do-citation): Make it possible again to insert
|
||||||
|
non-existent entries. Save match data when asking for optional
|
||||||
|
arguments. Return all keys, not just the first one.
|
||||||
|
(reftex-all-used-citation-keys): Fix regexp to correctly extract
|
||||||
|
all citations in the same line.
|
||||||
|
(reftex-parse-bibtex-entry): Accept additional optional argument
|
||||||
|
`raw' and keep quotes or braces if it is non-nil. Match fields
|
||||||
|
containing hyphens besides word constituents.
|
||||||
|
(reftex-get-string-refs): New function.
|
||||||
|
(reftex-extract-bib-entries): Check if BibTeX file changed on disk
|
||||||
|
and ask if it should be reread in case it did.
|
||||||
|
(reftex-pop-to-bibtex-entry)
|
||||||
|
(reftex-extract-bib-entries-from-thebibliography): Match \bibitem
|
||||||
|
entries with spaces or tabs in front of arguments.
|
||||||
|
(reftex-pop-to-bibtex-entry, reftex-extract-bib-entries)
|
||||||
|
(reftex-parse-bibtex-entry, reftex-create-bibtex-file):
|
||||||
|
Match entries containing numbers and symbol constituents.
|
||||||
|
(reftex-do-citation, reftex-figure-out-cite-format):
|
||||||
|
Use `reftex-cite-key-separator'.
|
||||||
|
|
||||||
|
* textmodes/reftex-dcr.el: Move provide statement to end of file.
|
||||||
|
(reftex-mouse-view-crossref): Explain why point is set.
|
||||||
|
|
||||||
|
* textmodes/reftex-global.el: Whitespace changes.
|
||||||
|
|
||||||
|
* textmodes/reftex-index.el: Move provide statement to end of
|
||||||
|
file.
|
||||||
|
(reftex-index-selection-or-word): Use `reftex-region-active-p'.
|
||||||
|
(reftex-index-visit-phrases-buffer): Set marker when visiting
|
||||||
|
buffer. This allows for returning from the phrases file to the
|
||||||
|
file one was just editing instead of the file where the last
|
||||||
|
phrases was added from.
|
||||||
|
(reftex-index-phrases-syntax-table): New variable. Give ?\"
|
||||||
|
punctuation syntax as it usually is not used as string quote in
|
||||||
|
TeX-related modes and may occur unmatched. The change also
|
||||||
|
prevents fontification of quoted content.
|
||||||
|
(reftex-index-phrases-mode): Use it.
|
||||||
|
|
||||||
|
* textmodes/reftex-parse.el (reftex-parse-from-file):
|
||||||
|
Move backward one char if a `\' was matched after a section macro.
|
||||||
|
(reftex-parse-from-file): Use beginning of match instead of end as
|
||||||
|
bound.
|
||||||
|
|
||||||
|
* textmodes/reftex-ref.el: Adapt creation of
|
||||||
|
`reftex-<package>-<macro>' functions to new structure of
|
||||||
|
`reftex-ref-style-alist'.
|
||||||
|
(reftex-reference): Use `reftex-ref-style-list' function.
|
||||||
|
Adapt to new structure of `reftex-ref-style-alist'. Prompt for a
|
||||||
|
reference macro if `reftex-ref-macro-prompt' is non-nil.
|
||||||
|
(reftex-reference): Pass refstyle to `reftex-format-special'.
|
||||||
|
Determine reference macro by looking at
|
||||||
|
`reftex-ref-style-default-list' and `reftex-ref-style-alist'.
|
||||||
|
Use only one special format function.
|
||||||
|
(reftex-varioref-vref, reftex-fancyref-fref)
|
||||||
|
(reftex-fancyref-Fref): Remove definitions. The functions are now
|
||||||
|
generated from `reftex-ref-style-alist'.
|
||||||
|
(reftex-format-vref, reftex-format-Fref, reftex-format-fref):
|
||||||
|
Remove.
|
||||||
|
(reftex-format-special): New function.
|
||||||
|
|
||||||
|
* textmodes/reftex-sel.el
|
||||||
|
(reftex-select-cycle-ref-style-internal): Adapt to new structure
|
||||||
|
of `reftex-ref-style-alist'. Remove code for testing macro type.
|
||||||
|
(reftex-select-toggle-varioref)
|
||||||
|
(reftex-select-toggle-fancyref): Remove.
|
||||||
|
(reftex-select-cycle-ref-style-internal)
|
||||||
|
(reftex-select-cycle-ref-style-forward)
|
||||||
|
(reftex-select-cycle-ref-style-backward): New functions.
|
||||||
|
(reftex-select-label-map): Use `v' and `V' for general cycling
|
||||||
|
through reference styles. Add `p' for switching between number
|
||||||
|
and page reference types.
|
||||||
|
|
||||||
|
* textmodes/reftex-toc.el (reftex-re-enlarge):
|
||||||
|
Call `enlarge-window' only if there is something to do because in Emacs
|
||||||
|
the horizontal version throws an error even if the parameter is 0.
|
||||||
|
|
||||||
|
* textmodes/reftex-vars.el (reftex-label-alist): Doc fix.
|
||||||
|
(reftex-plug-into-AUCTeX): Doc fix.
|
||||||
|
(reftex-vref-is-default, reftex-fref-is-default): Adapt doc
|
||||||
|
string. Adapt to new name.
|
||||||
|
(reftex-ref-style-alist): Change structure so that it is not
|
||||||
|
possible to use multiple different package names within a style.
|
||||||
|
Remove the symbols for symbols for macro type distinction.
|
||||||
|
Add characters for macro selection.
|
||||||
|
(reftex-ref-macro-prompt, reftex-create-bibtex-header)
|
||||||
|
(reftex-create-bibtex-footer): New variables.
|
||||||
|
(reftex-format-ref-function): Mention third argument of special
|
||||||
|
format function.
|
||||||
|
(reftex-ref-style-alist, reftex-ref-style-default-list):
|
||||||
|
New variables.
|
||||||
|
(reftex-vref-is-default, reftex-fref-is-default): Adapt doc string
|
||||||
|
to new implementation. Mark as obsolete. Add compatibility code
|
||||||
|
for honoring the variable values in case they are set.
|
||||||
|
(reftex-cite-format-builtin, reftex-bibliography-commands):
|
||||||
|
Add support for ConTeXt.
|
||||||
|
(reftex-format-ref-function, reftex-format-cite-function):
|
||||||
|
Fix custom type.
|
||||||
|
(reftex-cite-key-separator): New variable.
|
||||||
|
|
||||||
|
* textmodes/reftex.el (reftex-syntax-table-for-bib)
|
||||||
|
(reftex-mode): Do not derive `reftex-syntax-table-for-bib' from
|
||||||
|
`reftex-syntax-table' because parens have to retain their paren
|
||||||
|
syntax in order for parsing of BibTeX entries like @book(...) to
|
||||||
|
work.
|
||||||
|
(reftex-in-comment): Do not error out if `comment-start-skip' is
|
||||||
|
not set. Deal correctly with escaped comment characters.
|
||||||
|
(reftex-tie-multifile-symbols): Add doc string.
|
||||||
|
Initialize `reftex-ref-style-list'.
|
||||||
|
(reftex-untie-multifile-symbols): Add doc string.
|
||||||
|
(reftex-add-index-macros): Doc fix.
|
||||||
|
(reftex-ref-style-activate, reftex-ref-style-toggle)
|
||||||
|
(reftex-ref-style-list): New functions.
|
||||||
|
(reftex-mode-menu): Use them. Adapt to new structure of
|
||||||
|
`reftex-ref-style-alist'.
|
||||||
|
(reftex-select-with-char): Kill the RefTeX Select buffer when
|
||||||
|
done.
|
||||||
|
(reftex-remove-if): New function.
|
||||||
|
(reftex-erase-all-selection-and-index-buffers)
|
||||||
|
(reftex-mode-menu): Reference styles are now computed from
|
||||||
|
`reftex-ref-style-alist'. Fix typo.
|
||||||
|
(reftex-report-bug): New function.
|
||||||
|
(reftex-uniquify, reftex-uniquify-by-car): Replace O(n^2)
|
||||||
|
algorithms with O(n log n). Introduce optional argument SORT (not
|
||||||
|
yet used).
|
||||||
|
|
||||||
|
2012-09-30 Fabián Ezequiel Gallina <fgallina@cuca>
|
||||||
|
|
||||||
|
Enhancements for triple-quote string syntax.
|
||||||
|
* progmodes/python.el (python-syntax-propertize-function):
|
||||||
|
Match both quote cases in one regexp.
|
||||||
|
(python-syntax-stringify): Handle matches properly.
|
||||||
|
|
||||||
|
2012-09-30 Juri Linkov <juri@jurta.org>
|
||||||
|
|
||||||
|
* arc-mode.el (archive-summarize): Let-bind `buffer-file-truename'
|
||||||
|
to nil around the call to `add-text-properties' to prevent
|
||||||
|
directory time modification by lock_file. (Bug#2295)
|
||||||
|
* tar-mode.el (tar-summarize-buffer): Idem.
|
||||||
|
|
||||||
|
2012-09-30 Juri Linkov <juri@jurta.org>
|
||||||
|
|
||||||
|
* facemenu.el (list-colors-sort): Add option "Luminance".
|
||||||
|
(list-colors-sort-key): Implement it.
|
||||||
|
|
||||||
|
* vc/diff-mode.el (diff-refine-removed):
|
||||||
|
* vc/ediff-init.el (ediff-fine-diff-A):
|
||||||
|
* vc/smerge-mode.el (smerge-refined-removed):
|
||||||
|
Change background color "#ffaaaa" to "#ffbbbb". (Bug#10181)
|
||||||
|
|
||||||
|
2012-09-30 Jan Djärv <jan.h.d@swipnet.se>
|
||||||
|
|
||||||
|
* term/ns-win.el (x-file-dialog): New function.
|
||||||
|
|
||||||
|
2012-09-30 Juanma Barranquero <lekktu@gmail.com>
|
||||||
|
|
||||||
|
* ido.el (ido-max-directory-size): Default to nil; the current
|
||||||
|
default is small for POSIX systems, and impractical on Windows 7
|
||||||
|
now that lstat returns directory sizes for NTFS.
|
||||||
|
|
||||||
|
2012-09-30 Martin Rudalics <rudalics@gmx.at>
|
||||||
|
|
||||||
|
In buffer display functions handle window-height/window-width
|
||||||
|
alist entries. Suggested by Juri Linkov as fix for Bug#1806.
|
||||||
|
* window.el (window--display-buffer): New argument ALIST.
|
||||||
|
Obey window-height and window-width alist entries.
|
||||||
|
(window--try-to-split-window): New argument ALIST.
|
||||||
|
Bind window-combination-limit to t when the window's size shall be
|
||||||
|
changed and window-combination-limit equals `window-size'.
|
||||||
|
(display-buffer-in-atom-window)
|
||||||
|
(display-buffer-in-major-side-window)
|
||||||
|
(display-buffer-in-side-window, display-buffer-same-window)
|
||||||
|
(display-buffer-reuse-window, display-buffer-pop-up-frame)
|
||||||
|
(display-buffer-pop-up-window, display-buffer-below-selected)
|
||||||
|
(display-buffer-at-bottom, display-buffer-in-previous-window)
|
||||||
|
(display-buffer-use-some-window): Adjust all callers of
|
||||||
|
window--display-buffer and window--try-to-split-window.
|
||||||
|
(fit-frame-to-buffer): New option.
|
||||||
|
(fit-window-to-buffer): Can resize frames if fit-frame-to-buffer
|
||||||
|
is non-nil.
|
||||||
|
(display-buffer-in-major-side-window): Evaluate window-height /
|
||||||
|
window-width alist entries.
|
||||||
|
|
||||||
|
* help.el (temp-buffer-resize-frames)
|
||||||
|
(temp-buffer-resize-regexps): Remove options.
|
||||||
|
(temp-buffer-resize-mode): Adjust doc-string.
|
||||||
|
(resize-temp-buffer-window): Don't consult
|
||||||
|
temp-buffer-resize-regexps. Use fit-frame-to-buffer instead of
|
||||||
|
temp-buffer-resize-frames.
|
||||||
|
|
||||||
|
* dired.el (dired-mark-pop-up):
|
||||||
|
Call display-buffer-below-selected with a fit-window-to-buffer alist
|
||||||
|
entry.
|
||||||
|
|
||||||
|
2012-09-30 Chong Yidong <cyd@gnu.org>
|
||||||
|
|
||||||
|
* server.el (server-host): Document the security implications.
|
||||||
|
(server-auth-key): Doc fix.
|
||||||
|
|
||||||
|
* startup.el (initial-buffer-choice): Doc fix.
|
||||||
|
|
||||||
|
* minibuffer.el (minibuffer-local-filename-syntax): Doc fix.
|
||||||
|
|
||||||
|
* simple.el (delete-trailing-whitespace): Avoid an unnecessary
|
||||||
|
restriction change.
|
||||||
|
|
||||||
|
* bindings.el (goto-map): Bind M-g TAB to move-to-column.
|
||||||
|
|
||||||
|
* help-fns.el (help-fns--obsolete): Fix last change.
|
||||||
|
|
||||||
|
2012-09-30 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||||
|
|
||||||
|
* winner.el (winner-mode-map): Obey winner-dont-bind-my-keys here.
|
||||||
|
(minor-mode-map-alist): Remove redundant code.
|
||||||
|
|
||||||
|
* vc/pcvs.el (cvs-cleanup-collection): Keep entries that are currently
|
||||||
|
visited in a buffer.
|
||||||
|
(cvs-insert-visited-file): New function.
|
||||||
|
(find-file-hook): Use it.
|
||||||
|
|
||||||
|
* vc/pcvs-info.el (cvs-fileinfo-pp): Don't use non-existent faces.
|
||||||
|
|
||||||
|
* vc/log-edit.el (log-edit-font-lock-keywords): Ignore case to
|
||||||
|
chose face.
|
||||||
|
(log-edit-empty-buffer-p): Don't require a space after a header.
|
||||||
|
|
||||||
|
* vc/ediff-util.el (ediff-diff-at-point): Don't assume point-min==1.
|
||||||
|
|
||||||
|
* tutorial.el (help-with-tutorial): Use minibuffer-with-setup-hook.
|
||||||
|
|
||||||
|
* textmodes/text-mode.el (paragraph-indent-minor-mode): Make it
|
||||||
|
a proper minor-mode.
|
||||||
|
|
||||||
|
* textmodes/tex-mode.el (tex-mode-map): Don't bind paren keys.
|
||||||
|
|
||||||
|
2012-09-29 Glenn Morris <rgm@gnu.org>
|
||||||
|
|
||||||
|
* winner.el (winner-mode): Remove variable (let define-minor-mode
|
||||||
|
handle it).
|
||||||
|
(winner-dont-bind-my-keys, winner-boring-buffers, winner-mode-hook):
|
||||||
|
Doc fixes.
|
||||||
|
(winner-mode-leave-hook): Rename to winner-mode-off-hook.
|
||||||
|
(winner-mode): Use define-minor-mode.
|
||||||
|
|
||||||
|
* vc/vc-sccs.el (vc-sccs-registered): Use the progn trick to get
|
||||||
|
the full definition in loaddefs, rather than duplicating it.
|
||||||
|
|
||||||
|
* help-macro.el (three-step-help): No need to autoload defcustom.
|
||||||
|
|
||||||
|
* progmodes/inf-lisp.el (inferior-lisp-filter-regexp)
|
||||||
|
(inferior-lisp-program, inferior-lisp-load-command)
|
||||||
|
(inferior-lisp-prompt, inferior-lisp-mode-hook):
|
||||||
|
No need to autoload defcustoms.
|
||||||
|
|
||||||
|
* hippie-exp.el (hippie-expand-try-functions-list)
|
||||||
|
(hippie-expand-verbose, hippie-expand-dabbrev-skip-space)
|
||||||
|
(hippie-expand-dabbrev-as-symbol, hippie-expand-no-restriction)
|
||||||
|
(hippie-expand-max-buffers, hippie-expand-ignore-buffers)
|
||||||
|
(hippie-expand-only-buffers): No need to autoload defcustoms.
|
||||||
|
* progmodes/vhdl-mode.el (vhdl-line-expand):
|
||||||
|
Explicitly load hippie-exp, so it does not get autoloaded
|
||||||
|
while hippie-expand-try-functions-list is let-bound.
|
||||||
|
|
||||||
|
2012-09-28 Glenn Morris <rgm@gnu.org>
|
||||||
|
|
||||||
|
* emacs-lisp/cl.el (flet): Fix case of obsolescence message.
|
||||||
|
|
||||||
|
* emacs-lisp/bytecomp.el (byte-compile-cl-file-p):
|
||||||
|
Only "cl.el" counts as cl these days.
|
||||||
|
|
||||||
|
2012-09-28 Juri Linkov <juri@jurta.org>
|
||||||
|
|
||||||
|
Display archive errors in the echo area instead of inserting
|
||||||
|
to the file buffer.
|
||||||
|
|
||||||
|
* arc-mode.el (archive-extract-by-stdout): Change arg STDERR-FILE
|
||||||
|
to STDERR-TEST that can be a regexp matching a successful output.
|
||||||
|
Create a temporary file and redirect stderr to it. Search for
|
||||||
|
STDERR-TEST in the stderr output and display it in the echo area
|
||||||
|
if no match is found.
|
||||||
|
(archive-extract-by-file): New function like
|
||||||
|
`archive-extract-by-stdout' but extracting archives to files
|
||||||
|
and looking for successful matches in stdout. Function body is
|
||||||
|
mostly copied from `archive-rar-extract'.
|
||||||
|
(archive-rar-extract): Use `archive-extract-by-file'.
|
||||||
|
(archive-7z-extract): Use `archive-extract-by-stdout'. (Bug#10347)
|
||||||
|
|
||||||
|
2012-09-28 Leo Liu <sdl.web@gmail.com>
|
||||||
|
|
||||||
|
* pcomplete.el (pcomplete-show-completions):
|
||||||
|
Use minibuffer-message to make pcomplete usable in minibuffer.
|
||||||
|
|
||||||
|
* ido.el (ido-set-matches-1): Fix 2012-09-11 change.
|
||||||
|
|
||||||
|
2012-09-28 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||||
|
|
||||||
|
* type-break.el: Use lexical-binding.
|
||||||
|
(type-break-mode): Use define-minor-mode.
|
||||||
|
|
||||||
|
* emacs-lisp/pcase.el (pcase--mark-used): New.
|
||||||
|
(pcase--u1): Use it (bug#12512).
|
||||||
|
|
||||||
|
* custom.el (load-theme): Set buffer-file-name so the load is recorded
|
||||||
|
in load-history with the right file name.
|
||||||
|
|
||||||
|
2012-09-28 Tassilo Horn <tsdh@gnu.org>
|
||||||
|
|
||||||
|
* doc-view.el (doc-view-current-cache-doc-pdf): New function.
|
||||||
|
(doc-view-doc->txt, doc-view-convert-current-doc): Use it.
|
||||||
|
(doc-view-get-bounding-box): Make bounding box slicing work for
|
||||||
|
ODF and DVI documents.
|
||||||
|
|
||||||
|
2012-09-28 Glenn Morris <rgm@gnu.org>
|
||||||
|
|
||||||
|
* type-break.el (type-break-mode, type-break-interval)
|
||||||
|
(type-break-good-rest-interval, type-break-keystroke-threshold):
|
||||||
|
No need to autoload.
|
||||||
|
(type-break-good-rest-interval, type-break-keystroke-threshold):
|
||||||
|
Add :set-after.
|
||||||
|
|
||||||
2012-09-28 Chong Yidong <cyd@gnu.org>
|
2012-09-28 Chong Yidong <cyd@gnu.org>
|
||||||
|
|
||||||
* progmodes/verilog-mode.el (verilog-auto-inst-interfaced-ports):
|
* progmodes/verilog-mode.el (verilog-auto-inst-interfaced-ports):
|
||||||
|
|
@ -2506,8 +3023,9 @@
|
||||||
|
|
||||||
* register.el (copy-to-register, copy-rectangle-to-register):
|
* register.el (copy-to-register, copy-rectangle-to-register):
|
||||||
Deactivate the mark, and use indicate-copied-region (Bug#10056).
|
Deactivate the mark, and use indicate-copied-region (Bug#10056).
|
||||||
(append-to-register, prepend-to-register):
|
(append-to-register, prepend-to-register): Call indicate-copied-region.
|
||||||
Call 2012-07-29 Juri Linkov <juri@jurta.org>
|
|
||||||
|
2012-07-29 Juri Linkov <juri@jurta.org>
|
||||||
|
|
||||||
* simple.el (async-shell-command-buffer): New defcustom.
|
* simple.el (async-shell-command-buffer): New defcustom.
|
||||||
(shell-command): Use it. (Bug#4719)
|
(shell-command): Use it. (Bug#4719)
|
||||||
|
|
|
||||||
|
|
@ -787,7 +787,8 @@ is visible (and the real data of the buffer is hidden).
|
||||||
Optional argument SHUT-UP, if non-nil, means don't print messages
|
Optional argument SHUT-UP, if non-nil, means don't print messages
|
||||||
when parsing the archive."
|
when parsing the archive."
|
||||||
(widen)
|
(widen)
|
||||||
(let ((inhibit-read-only t))
|
(let ((buffer-file-truename nil) ; avoid changing dir mtime by lock_file
|
||||||
|
(inhibit-read-only t))
|
||||||
(setq archive-proper-file-start (copy-marker (point-min) t))
|
(setq archive-proper-file-start (copy-marker (point-min) t))
|
||||||
(set (make-local-variable 'change-major-mode-hook) 'archive-desummarize)
|
(set (make-local-variable 'change-major-mode-hook) 'archive-desummarize)
|
||||||
(or shut-up
|
(or shut-up
|
||||||
|
|
@ -1117,13 +1118,54 @@ using `make-temp-file', and the generated name is returned."
|
||||||
(archive-delete-local tmpfile)
|
(archive-delete-local tmpfile)
|
||||||
success))
|
success))
|
||||||
|
|
||||||
(defun archive-extract-by-stdout (archive name command &optional stderr-file)
|
(defun archive-extract-by-stdout (archive name command &optional stderr-test)
|
||||||
|
(let ((stderr-file (make-temp-file "arc-stderr")))
|
||||||
|
(unwind-protect
|
||||||
|
(prog1
|
||||||
(apply 'call-process
|
(apply 'call-process
|
||||||
(car command)
|
(car command)
|
||||||
nil
|
nil
|
||||||
(if stderr-file (list t stderr-file) t)
|
(if stderr-file (list t stderr-file) t)
|
||||||
nil
|
nil
|
||||||
(append (cdr command) (list archive name))))
|
(append (cdr command) (list archive name)))
|
||||||
|
(with-temp-buffer
|
||||||
|
(insert-file-contents stderr-file)
|
||||||
|
(goto-char (point-min))
|
||||||
|
(when (if (stringp stderr-test)
|
||||||
|
(not (re-search-forward stderr-test nil t))
|
||||||
|
(> (buffer-size) 0))
|
||||||
|
(message "%s" (buffer-string)))))
|
||||||
|
(if (file-exists-p stderr-file)
|
||||||
|
(delete-file stderr-file)))))
|
||||||
|
|
||||||
|
(defun archive-extract-by-file (archive name command &optional stdout-test)
|
||||||
|
(let ((dest (make-temp-file "arc-dir" 'dir))
|
||||||
|
(stdout-file (make-temp-file "arc-stdout")))
|
||||||
|
(unwind-protect
|
||||||
|
(prog1
|
||||||
|
(apply 'call-process
|
||||||
|
(car command)
|
||||||
|
nil
|
||||||
|
`(:file ,stdout-file)
|
||||||
|
nil
|
||||||
|
(append (cdr command) (list archive name dest)))
|
||||||
|
(with-temp-buffer
|
||||||
|
(insert-file-contents stdout-file)
|
||||||
|
(goto-char (point-min))
|
||||||
|
(when (if (stringp stdout-test)
|
||||||
|
(not (re-search-forward stdout-test nil t))
|
||||||
|
(> (buffer-size) 0))
|
||||||
|
(message "%s" (buffer-string))))
|
||||||
|
(if (file-exists-p (expand-file-name name dest))
|
||||||
|
(insert-file-contents-literally (expand-file-name name dest))))
|
||||||
|
(if (file-exists-p stdout-file)
|
||||||
|
(delete-file stdout-file))
|
||||||
|
(if (file-exists-p (expand-file-name name dest))
|
||||||
|
(delete-file (expand-file-name name dest)))
|
||||||
|
(while (file-name-directory name)
|
||||||
|
(setq name (directory-file-name (file-name-directory name)))
|
||||||
|
(delete-directory (expand-file-name name dest)))
|
||||||
|
(delete-directory dest))))
|
||||||
|
|
||||||
(defun archive-extract-other-window ()
|
(defun archive-extract-other-window ()
|
||||||
"In archive mode, find this member in another window."
|
"In archive mode, find this member in another window."
|
||||||
|
|
@ -2006,17 +2048,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
|
||||||
;; The code below assumes the name is relative and may do undesirable
|
;; The code below assumes the name is relative and may do undesirable
|
||||||
;; things otherwise.
|
;; things otherwise.
|
||||||
(error "Can't extract files with non-relative names")
|
(error "Can't extract files with non-relative names")
|
||||||
(let ((dest (make-temp-file "arc-rar" 'dir)))
|
(archive-extract-by-file archive name '("unrar-free" "--extract") "All OK")))
|
||||||
(unwind-protect
|
|
||||||
(progn
|
|
||||||
(call-process "unrar-free" nil nil nil
|
|
||||||
"--extract" archive name dest)
|
|
||||||
(insert-file-contents-literally (expand-file-name name dest)))
|
|
||||||
(delete-file (expand-file-name name dest))
|
|
||||||
(while (file-name-directory name)
|
|
||||||
(setq name (directory-file-name (file-name-directory name)))
|
|
||||||
(delete-directory (expand-file-name name dest)))
|
|
||||||
(delete-directory dest)))))
|
|
||||||
|
|
||||||
;;; Section: Rar self-extracting .exe archives.
|
;;; Section: Rar self-extracting .exe archives.
|
||||||
|
|
||||||
|
|
@ -2099,17 +2131,11 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
|
||||||
(apply 'vector files))))
|
(apply 'vector files))))
|
||||||
|
|
||||||
(defun archive-7z-extract (archive name)
|
(defun archive-7z-extract (archive name)
|
||||||
(let ((tmpfile (make-temp-file "7z-stderr")))
|
|
||||||
;; 7z doesn't provide a `quiet' option to suppress non-essential
|
;; 7z doesn't provide a `quiet' option to suppress non-essential
|
||||||
;; stderr messages. So redirect stderr to a temp file and display it
|
;; stderr messages. So redirect stderr to a temp file and display it
|
||||||
;; in the echo area when it contains error messages.
|
;; in the echo area when it contains no message indicating success.
|
||||||
(prog1 (archive-extract-by-stdout
|
(archive-extract-by-stdout
|
||||||
archive name archive-7z-extract tmpfile)
|
archive name archive-7z-extract "Everything is Ok"))
|
||||||
(with-temp-buffer
|
|
||||||
(insert-file-contents tmpfile)
|
|
||||||
(unless (search-forward "Everything is Ok" nil t)
|
|
||||||
(message "%s" (buffer-string)))
|
|
||||||
(delete-file tmpfile)))))
|
|
||||||
|
|
||||||
(defun archive-7z-write-file-member (archive descr)
|
(defun archive-7z-write-file-member (archive descr)
|
||||||
(archive-*-write-file-member
|
(archive-*-write-file-member
|
||||||
|
|
|
||||||
|
|
@ -898,6 +898,7 @@ if `inhibit-field-text-motion' is non-nil."
|
||||||
(define-key goto-map "\M-n" 'next-error)
|
(define-key goto-map "\M-n" 'next-error)
|
||||||
(define-key goto-map "p" 'previous-error)
|
(define-key goto-map "p" 'previous-error)
|
||||||
(define-key goto-map "\M-p" 'previous-error)
|
(define-key goto-map "\M-p" 'previous-error)
|
||||||
|
(define-key goto-map "\t" 'move-to-column)
|
||||||
|
|
||||||
(defvar search-map (make-sparse-keymap)
|
(defvar search-map (make-sparse-keymap)
|
||||||
"Keymap for search related commands.")
|
"Keymap for search related commands.")
|
||||||
|
|
|
||||||
|
|
@ -99,12 +99,14 @@ To specify the file in which to save them, modify the variable
|
||||||
|
|
||||||
(defcustom bookmark-version-control 'nospecial
|
(defcustom bookmark-version-control 'nospecial
|
||||||
"Whether or not to make numbered backups of the bookmark file.
|
"Whether or not to make numbered backups of the bookmark file.
|
||||||
It can have four values: t, nil, `never', and `nospecial'.
|
It can have four values: t, nil, `never', or `nospecial'.
|
||||||
The first three have the same meaning that they do for the
|
The first three have the same meaning that they do for the
|
||||||
variable `version-control', and the final value `nospecial' means just
|
variable `version-control'; the value `nospecial' (the default) means
|
||||||
use the value of `version-control'."
|
just use the value of `version-control'."
|
||||||
:type '(choice (const nil) (const never) (const nospecial)
|
:type '(choice (const :tag "If existing" nil)
|
||||||
(other t))
|
(const :tag "Never" never)
|
||||||
|
(const :tag "Use value of option `version-control'" nospecial)
|
||||||
|
(other :tag "Always" t))
|
||||||
:group 'bookmark)
|
:group 'bookmark)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1357,7 +1359,12 @@ for a file, defaulting to the file defined by variable
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(delete-region (point-min) (point-max))
|
(delete-region (point-min) (point-max))
|
||||||
(let ((print-length nil)
|
(let ((print-length nil)
|
||||||
(print-level nil))
|
(print-level nil)
|
||||||
|
;; See bug #12503 for why we bind `print-circle'. Users
|
||||||
|
;; can define their own bookmark types, which can result in
|
||||||
|
;; arbitrary Lisp objects being stored in bookmark records,
|
||||||
|
;; and some users create objects containing circularities.
|
||||||
|
(print-circle t))
|
||||||
(bookmark-insert-file-format-version-stamp)
|
(bookmark-insert-file-format-version-stamp)
|
||||||
(insert "(")
|
(insert "(")
|
||||||
;; Rather than a single call to `pp' we make one per bookmark.
|
;; Rather than a single call to `pp' we make one per bookmark.
|
||||||
|
|
@ -2003,32 +2010,6 @@ To carry out the deletions that you've marked, use \\<bookmark-bmenu-mode-map>\\
|
||||||
|
|
||||||
;;; Bookmark-bmenu search
|
;;; Bookmark-bmenu search
|
||||||
|
|
||||||
;; Store keyboard input for incremental search.
|
|
||||||
(defvar bookmark-search-pattern)
|
|
||||||
|
|
||||||
(defun bookmark-read-search-input ()
|
|
||||||
"Read each keyboard input and add it to `bookmark-search-pattern'."
|
|
||||||
(let ((prompt (propertize "Pattern: " 'face 'minibuffer-prompt))
|
|
||||||
;; (inhibit-quit t) ; inhibit-quit is evil. Use it with extreme care!
|
|
||||||
(tmp-list ()))
|
|
||||||
(while
|
|
||||||
(let ((char (read-key (concat prompt bookmark-search-pattern))))
|
|
||||||
(pcase char
|
|
||||||
((or ?\e ?\r) nil) ; RET or ESC break the search loop.
|
|
||||||
(?\C-g (setq bookmark-quit-flag t) nil)
|
|
||||||
(?\d (pop tmp-list) t) ; Delete last char of pattern with DEL
|
|
||||||
(_
|
|
||||||
(if (characterp char)
|
|
||||||
(push char tmp-list)
|
|
||||||
(setq unread-command-events
|
|
||||||
(nconc (mapcar 'identity
|
|
||||||
(this-single-command-raw-keys))
|
|
||||||
unread-command-events))
|
|
||||||
nil))))
|
|
||||||
(setq bookmark-search-pattern
|
|
||||||
(apply 'string (reverse tmp-list))))))
|
|
||||||
|
|
||||||
|
|
||||||
(defun bookmark-bmenu-filter-alist-by-regexp (regexp)
|
(defun bookmark-bmenu-filter-alist-by-regexp (regexp)
|
||||||
"Filter `bookmark-alist' with bookmarks matching REGEXP and rebuild list."
|
"Filter `bookmark-alist' with bookmarks matching REGEXP and rebuild list."
|
||||||
(let ((bookmark-alist
|
(let ((bookmark-alist
|
||||||
|
|
@ -2043,19 +2024,23 @@ To carry out the deletions that you've marked, use \\<bookmark-bmenu-mode-map>\\
|
||||||
"Incremental search of bookmarks, hiding the non-matches as we go."
|
"Incremental search of bookmarks, hiding the non-matches as we go."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((bmk (bookmark-bmenu-bookmark))
|
(let ((bmk (bookmark-bmenu-bookmark))
|
||||||
(bookmark-search-pattern "")
|
(timer nil))
|
||||||
(timer (run-with-idle-timer
|
|
||||||
bookmark-search-delay 'repeat
|
|
||||||
#'(lambda ()
|
|
||||||
(bookmark-bmenu-filter-alist-by-regexp
|
|
||||||
bookmark-search-pattern)))))
|
|
||||||
(unwind-protect
|
(unwind-protect
|
||||||
(bookmark-read-search-input)
|
(minibuffer-with-setup-hook
|
||||||
|
(lambda ()
|
||||||
|
(setq timer (run-with-idle-timer
|
||||||
|
bookmark-search-delay 'repeat
|
||||||
|
#'(lambda (buf)
|
||||||
|
(with-current-buffer buf
|
||||||
|
(bookmark-bmenu-filter-alist-by-regexp
|
||||||
|
(minibuffer-contents))))
|
||||||
|
(current-buffer))))
|
||||||
|
(read-string "Pattern: ")
|
||||||
|
(when timer (cancel-timer timer) (setq timer nil)))
|
||||||
|
(when timer ;; Signalled an error or a `quit'.
|
||||||
(cancel-timer timer)
|
(cancel-timer timer)
|
||||||
(message nil)
|
(bookmark-bmenu-list)
|
||||||
(when bookmark-quit-flag ; C-g hit restore menu list.
|
(bookmark-bmenu-goto-bookmark bmk)))))
|
||||||
(bookmark-bmenu-list) (bookmark-bmenu-goto-bookmark bmk))
|
|
||||||
(setq bookmark-quit-flag nil))))
|
|
||||||
|
|
||||||
(defun bookmark-bmenu-goto-bookmark (name)
|
(defun bookmark-bmenu-goto-bookmark (name)
|
||||||
"Move point to bookmark with name NAME."
|
"Move point to bookmark with name NAME."
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,501 @@
|
||||||
|
2012-10-02 Chong Yidong <cyd@gnu.org>
|
||||||
|
|
||||||
|
* srecode.el, ede.el: Restore Version header.
|
||||||
|
|
||||||
|
2012-10-01 Chong Yidong <cyd@gnu.org>
|
||||||
|
|
||||||
|
* semantic/bovine/c-by.el: Regenerate.
|
||||||
|
* semantic/bovine/make-by.el:
|
||||||
|
* semantic/bovine/scm-by.el:
|
||||||
|
* semantic/grammar-wy.el:
|
||||||
|
* semantic/wisent/javat-wy.el:
|
||||||
|
* semantic/wisent/js-wy.el:
|
||||||
|
* srecode/srt-wy.el:
|
||||||
|
|
||||||
|
2012-10-01 Eric Ludlam <zappo@gnu.org>
|
||||||
|
|
||||||
|
* cedet.el (cedet-version, cedet-packages): Update.
|
||||||
|
|
||||||
|
* cedet-global.el (cedet-gnu-global-version-check): Support newer
|
||||||
|
versions that have extra (parens) in the version string.
|
||||||
|
|
||||||
|
* cedet-idutils.el (cedet-idutils-version-check): Make sure a
|
||||||
|
version number was found before calling inversion-check-version.
|
||||||
|
|
||||||
|
* data-debug.el (data-debug-insert-thing): Bind inhibit-read-only
|
||||||
|
while inserting the thing, then clear modified bit.
|
||||||
|
(data-debug-map): Suppress the keymap.
|
||||||
|
(data-debug-mode, data-debug-new-buffer): Make buffer read-only.
|
||||||
|
(data-debug-contract-current-line): Inhibit read-only, then clear
|
||||||
|
modified bit.
|
||||||
|
|
||||||
|
* ede.el (ede-buffer-belongs-to-project-p): Use ede-object-project
|
||||||
|
to allow use in more kinds of buffers.
|
||||||
|
(ede-project-forms-menu): Add `Default configuration' menu item.
|
||||||
|
(ede-configuration-forms-menu): New, for use in above.
|
||||||
|
(ede-project-configurations-set): New command used from menu.
|
||||||
|
(ede-java-classpath): New conveninece for Java support.
|
||||||
|
(ede-apply-object-keymap): Combine keybindings from the project
|
||||||
|
and the target, not just whatever is local to the buffer.
|
||||||
|
(ede-apply-target-options): Call fcn to apply project local
|
||||||
|
variables.
|
||||||
|
(ede-reset-all-buffers): Remove arg.
|
||||||
|
(ede, ede-rescan-toplevel): Callers changed.
|
||||||
|
(ede-new-target): Fix bug where you couldn't call this from Dired.
|
||||||
|
(ede-add-file): Replace assignment of ede-object with generic call
|
||||||
|
to re-init the buffer.
|
||||||
|
(ede-find-target): If ede-object is set, run short-cut code
|
||||||
|
instead of `or' shortcut.
|
||||||
|
(ede-project-buffers): Return buffers belonging to input project,
|
||||||
|
not any buffer belonging to any project.
|
||||||
|
(ede-system-include-path, ede-apply-project-local-variables)
|
||||||
|
(ede-set-project-local-variable): New functions.
|
||||||
|
(ede-make-project-local-variable): Apply to toplevel if none
|
||||||
|
specified.
|
||||||
|
(ede-set): Make it interactive.
|
||||||
|
|
||||||
|
* ede/auto.el (ede-project-autoload): New class.
|
||||||
|
(ede-do-dirmatch): New method.
|
||||||
|
(ede-project-dirmatch-p): New function.
|
||||||
|
(ede-project-root-directory): Call it.
|
||||||
|
(ede-dir-to-projectfile): Don't call project file function if we
|
||||||
|
didn't match the root.
|
||||||
|
(ede-project-root-directory): Don't call a project's root function
|
||||||
|
if the tool in question isn't installed.
|
||||||
|
(ede-dir-to-projectfile): Don't call project file function if we
|
||||||
|
didn't match the root.
|
||||||
|
|
||||||
|
* ede/autoconf-edit.el (autoconf-parameter-strip): Remove any
|
||||||
|
trailing `\' mid string, and replace with a space.
|
||||||
|
(autoconf-parameter-count): New function.
|
||||||
|
(autoconf-set-version): Use it.
|
||||||
|
|
||||||
|
* ede/base.el (ede-project): The :type of targets is now a list of
|
||||||
|
target base classes.
|
||||||
|
|
||||||
|
* ede/emacs.el (ede-emacs-load): Fix typo.
|
||||||
|
|
||||||
|
* ede/files.el (ede-flush-project-hash, ede-flush-directory-hash):
|
||||||
|
Protect against missing locator object.
|
||||||
|
(ede-get-locator-object): Protect against missing project.
|
||||||
|
(ede-flush-directory-hash): New command.
|
||||||
|
(ede-get-locator-object): Protect against missing project.
|
||||||
|
|
||||||
|
* ede/generic.el (ede-generic-config): Add configurable
|
||||||
|
`run-command' slot.
|
||||||
|
(project-compile-project, project-compile-target)
|
||||||
|
(project-debug-target, project-run-target): New methods.
|
||||||
|
(ede-generic-get-configuration): Specify the class to load.
|
||||||
|
(ede-generic-new-autoloader): Use ede-add-project-autoload.
|
||||||
|
(ede-enable-generic-projects): Rename projects so as to never
|
||||||
|
match the edeproject-* projects.
|
||||||
|
|
||||||
|
* ede/makefile-edit.el (makefile-macro-file-list): Case sensitive
|
||||||
|
searches. Protect against "SUBDIRS=$(subdirs)" infloop.
|
||||||
|
|
||||||
|
* ede/proj-elisp.el (ede-proj-tweak-autoconf)
|
||||||
|
(ede-proj-flush-autoconf): Disable local variables when loading
|
||||||
|
the autoconf lisp compile script.
|
||||||
|
|
||||||
|
* ede/proj.el (ede-proj-target-aux, -elisp, -elisp-autoloads)
|
||||||
|
(-scheme, -makefile-misc, ede-proj-target-makefile-program)
|
||||||
|
(-makefile-archive, -makefile-shared-object)
|
||||||
|
(ede-proj-target-makefile-info, -grammar): New autoloads.
|
||||||
|
(ede-proj-project): Inherit from eieio-persistent-read. Specify
|
||||||
|
extension and header line.
|
||||||
|
(ede-proj-load, ede-proj-save): Replace with impl using
|
||||||
|
eieio-persistent-read.
|
||||||
|
|
||||||
|
* ede/project-am.el (project-add-file): Use ede-target-parent
|
||||||
|
instead of loading the project file.
|
||||||
|
|
||||||
|
* semantic.el (semantic-version): Update.
|
||||||
|
(semantic-new-buffer-setup-functions): Add f90-mode, texinfo-mode.
|
||||||
|
(navigate-menu): Add menu item for Stickyfunc mode.
|
||||||
|
|
||||||
|
* semantic/analyze/debug.el
|
||||||
|
(semantic-analyzer-debug-insert-include-summary): Before
|
||||||
|
dereferencing tableinner, make sure it has a value.
|
||||||
|
|
||||||
|
* semantic/analyze/refs.el
|
||||||
|
(semantic-analyze-tag-references-default): When doing a lookup,
|
||||||
|
specify noerror.
|
||||||
|
(semantic--analyze-refs-full-lookup): Add optional noerror input
|
||||||
|
argument. Pass to to full-lookup-simple.
|
||||||
|
(semantic-analyze-refs-impl, semantic-analyze-refs-proto): Ignore
|
||||||
|
:typemodifiers during compare.
|
||||||
|
|
||||||
|
* semantic/bovine/c.el (semantic-lex-cpp-define): Specify limits
|
||||||
|
to looking back for comment chars.
|
||||||
|
(semantic--tag-similar-names-p, semantic--tag-similar-names-p-default)
|
||||||
|
(semantic--tag-attribute-similar-p): New.
|
||||||
|
(semantic-c-describe-environment): Handle list value of ede-object.
|
||||||
|
(semantic-lex-c-preprocessor-symbol-map-builtin): Add
|
||||||
|
__attribute_pure__.
|
||||||
|
|
||||||
|
* semantic/bovine/scm.el (semantic-format-tag-prototype): Add
|
||||||
|
parent and color argument. Pass them through.
|
||||||
|
|
||||||
|
* semantic/complete.el (semantic-collector-calculate-completions):
|
||||||
|
Search for more matches if new prefix is a substring of old one.
|
||||||
|
(semantic-complete-inline-project): New function.
|
||||||
|
|
||||||
|
* semantic/db-el.el (object-print): New method.
|
||||||
|
|
||||||
|
* semantic/db-file.el (semanticdb-load-database): Specify class.
|
||||||
|
|
||||||
|
* semantic/db-typecache.el
|
||||||
|
(semanticdb-abstract-table::semanticdb-typecache-find-method):
|
||||||
|
Allow proxied tags to be resolved during the search.
|
||||||
|
(semanticdb-typecache-complete-flush): Support missing or empty
|
||||||
|
pointmax slot, to allow for more database types.
|
||||||
|
|
||||||
|
* semantic/db.el (semanticdb-abstract-table): Add db-refs slot.
|
||||||
|
(object-print): Allow child classes to overwrite the display of
|
||||||
|
the (%d tags) extra string.
|
||||||
|
(semanticdb-project-database): Specify :type for table.
|
||||||
|
(semanticdb-create-table-for-file): Specify file-truename.
|
||||||
|
(semanticdb-synchronize, semanticdb-partial-synchronize): Restore
|
||||||
|
code that refreshes references to include files.
|
||||||
|
|
||||||
|
* semantic/decorate/include.el
|
||||||
|
(semantic-decoration-on-fileless-includes): New face.
|
||||||
|
(semantic-decoration-on-fileless-include-map)
|
||||||
|
(semantic-decoration-on-fileless-include-menu): New variables.
|
||||||
|
(semantic-decoration-on-includes-highlight-default): Support
|
||||||
|
includes that have a table, but are not associated with a file.
|
||||||
|
(semantic-decoration-fileless-include-describe)
|
||||||
|
(semantic-decoration-fileless-include-menu): New functions.
|
||||||
|
(semantic-decoration-all-include-summary): Add arrows to indicate
|
||||||
|
the file associated with an include name.
|
||||||
|
|
||||||
|
* semantic/find.el
|
||||||
|
(semantic-find-tags-by-scope-protection-default): Also filter on
|
||||||
|
package protection of the slot.
|
||||||
|
|
||||||
|
* semantic/java.el (semantic-java-expand-tag): If some type has a
|
||||||
|
fully qualified name, bust it up into one package and the type
|
||||||
|
with a short name.
|
||||||
|
|
||||||
|
* semantic/lex.el (define-lex-block-analyzer): Protect against
|
||||||
|
random extra close parenthesis.
|
||||||
|
|
||||||
|
* semantic/symref.el (semantic-symref-result-get-tags): Make sure
|
||||||
|
the cursor is on the matched name.
|
||||||
|
|
||||||
|
* semantic/symref/list.el (semantic-symref-results-mode-map):
|
||||||
|
Suppress keymap.
|
||||||
|
|
||||||
|
* semantic/tag-ls.el (semantic--tag-similar-names-p)
|
||||||
|
(semantic--tag-attribute-similar-p)
|
||||||
|
(semantic--tag-similar-types-p): New functions.
|
||||||
|
(semantic-tag-similar-ignorable-attributes): New variable.
|
||||||
|
(semantic-tag-protection-default): Add package concept to return
|
||||||
|
value.
|
||||||
|
(semantic-tag-package-protected-p): New function.
|
||||||
|
(semantic-tag-full-package): New overload method.
|
||||||
|
(semantic-tag-full-package-default): New default for above.
|
||||||
|
(semantic-tag-full-name-default): Look for the full package name.
|
||||||
|
|
||||||
|
* semantic/tag.el (semantic-create-tag-proxy)
|
||||||
|
(semantic-tag-set-proxy, semantic-tag-resolve-proxy): New.
|
||||||
|
|
||||||
|
* semantic/util.el (semantic-describe-buffer): Add
|
||||||
|
semantic-new-buffer-fcn-was-run.
|
||||||
|
|
||||||
|
* semantic/wisent/java-tags.el (semantic-get-local-variables): Add
|
||||||
|
`this' to the local variable context.
|
||||||
|
(semantic-analyze-split-name, semantic-analyze-unsplit-name): New.
|
||||||
|
|
||||||
|
* semantic/wisent/python.el (semantic-python-expand-tag): New
|
||||||
|
function.
|
||||||
|
|
||||||
|
* srecode/compile.el (srecode-compile-templates): Add "framework"
|
||||||
|
special variable support.
|
||||||
|
(srecode-compile-template-table): Support framework specifier.
|
||||||
|
|
||||||
|
* srecode/cpp.el (srecode-semantic-handle-:c)
|
||||||
|
(srecode-semantic-handle-:cpp): New functions.
|
||||||
|
(srecode-semantic-apply-tag-to-dict): Move from cpp-mode function
|
||||||
|
to c-mode function.
|
||||||
|
(srecode-c-apply-templates): Renamed from srecode-cpp-apply-templates.
|
||||||
|
|
||||||
|
* srecode/dictionary.el (initialize-instance): Remove bogus error
|
||||||
|
condition.
|
||||||
|
(srecode-create-section-dictionary): Remove unused function.
|
||||||
|
|
||||||
|
* srecode/java.el (srecode-semantic-handle-:java): Fix filename as
|
||||||
|
package variable. Add current_package variable.
|
||||||
|
|
||||||
|
* srecode/map.el (srecode-map-update-map): Specify the class.
|
||||||
|
|
||||||
|
* srecode/mode.el (srecode-minor-mode): Support the m3 menu.
|
||||||
|
|
||||||
|
* srecode/semantic.el (srecode-semantic-insert-tag): Support
|
||||||
|
system includes.
|
||||||
|
|
||||||
|
* srecode/srt-mode.el (srecode-font-lock-keywords): Update.
|
||||||
|
|
||||||
|
* srecode/table.el (srecode-template-table): Add :framework slot.
|
||||||
|
(srecode-dump): Dump it.
|
||||||
|
(srecode-mode-table): Add new modetables slot.
|
||||||
|
(srecode-get-mode-table): Find the mode, but also find all parent
|
||||||
|
modes, and merge the tables together in :tables from :modetables.
|
||||||
|
(srecode-make-mode-table): Init :modetables
|
||||||
|
(srecode-mode-table-find): Search in modetables.
|
||||||
|
(srecode-mode-table-new): Merge the differet files into the
|
||||||
|
modetables slot.
|
||||||
|
|
||||||
|
2012-10-01 David Engster <deng@randomsample.de>
|
||||||
|
|
||||||
|
* ede.el (ede-apply-preprocessor-map): Check that
|
||||||
|
`semantic-lex-spp-macro-symbol-obarray' is non-nil.
|
||||||
|
(global-ede-mode): Fix call to `ede-reset-all-buffers'.
|
||||||
|
|
||||||
|
* ede/cpp-root.el (ede-preprocessor-map): Make sure we add the
|
||||||
|
lexical-table even when the table doesn't need to be refreshed.
|
||||||
|
|
||||||
|
* ede/dired.el (ede-dired-minor-mode): Use called-interactively-p.
|
||||||
|
|
||||||
|
* ede/pmake.el (ede-pmake-insert-variable-once): Wrap in
|
||||||
|
save-excursion.
|
||||||
|
|
||||||
|
* ede/proj-comp.el (ede-proj-makefile-insert-rules): Fix insertion
|
||||||
|
of phony rule.
|
||||||
|
|
||||||
|
* ede/proj-elisp.el (ede-proj-target-elisp): Remove
|
||||||
|
ede-emacs-preload-compiler.
|
||||||
|
(ede-proj-makefile-insert-rules, ede-proj-makefile-dependencies):
|
||||||
|
New methods.
|
||||||
|
(ede-emacs-compiler): Add 'require' macro to variables and pattern
|
||||||
|
rule. Add .elc object extension.
|
||||||
|
(ede-proj-elisp-packages-to-loadpath): Allow longer relative names.
|
||||||
|
(ede-proj-makefile-insert-variables): Do not insert preload items.
|
||||||
|
(ede-proj-target-elisp-autoloads): Don't depend on cedet-autogen.
|
||||||
|
|
||||||
|
* ede/util.el (ede-make-buffer-writable):
|
||||||
|
* semantic/debug.el (semantic-debug-mode): Set buffer-read-only
|
||||||
|
instead of calling toggle-read-only.
|
||||||
|
|
||||||
|
* semantic.el (semantic-fetch-tags): Use progress reporter only
|
||||||
|
when called interactively.
|
||||||
|
(semantic-submode-list): Add debugging modes.
|
||||||
|
(semantic-mode): Remove Semantic from after-change-functions.
|
||||||
|
Delete the cache, call semantic--tag-unlink-cache-from-buffer, and
|
||||||
|
set semantic-new-buffer-fcn-was-run to nil.
|
||||||
|
|
||||||
|
* semantic/analyze/fcn.el (semantic-analyze-tag-prototype-p)
|
||||||
|
(semantic-analyze-tag-prototype-p-default): Remove.
|
||||||
|
(semantic-analyze-type, semantic-analyze-dereference-metatype-1):
|
||||||
|
Use semantic-tag-prototype-p.
|
||||||
|
|
||||||
|
* semantic/bovine/c.el (semantic-c-reset-preprocessor-symbol-map):
|
||||||
|
Ensure semantic-mode is on before getting preprocessor symbols.
|
||||||
|
(semantic-c-skip-conditional-section): Use c-scan-conditionals.
|
||||||
|
(semantic-c-convert-spp-value-to-hideif-value)
|
||||||
|
(semantic-c-evaluate-symbol-for-hideif, semantic-c-hideif-lookup)
|
||||||
|
(semantic-c-hideif-defined): Revive hideif code from CEDET trunk.
|
||||||
|
(semantic-lex-c-if, semantic-c-do-lex-ifdef): Revert changes for
|
||||||
|
regular expression parsing.
|
||||||
|
(semantic-cpp-lexer): Add semantic-lex-c-ifdef.
|
||||||
|
(semantic-expand-c-tag): Check if tag is non-nil before adding it
|
||||||
|
to return list
|
||||||
|
(semantic-expand-c-extern-C, semantic-expand-c-complex-type): New
|
||||||
|
functions, copied from semantic-expand-c-tag.
|
||||||
|
(semantic-find-tags-included): New override which also searches
|
||||||
|
for include tags inside of namespaces.
|
||||||
|
(semantic-c-dereference-typedef): Use semantic-tag-prototype-p.
|
||||||
|
(semanticdb-find-table-for-include): New override.
|
||||||
|
|
||||||
|
* semantic/bovine/el.el: Remove emacs-lisp-mode-hook.
|
||||||
|
|
||||||
|
* semantic/complete.el (semantic-complete-post-command-hook): Exit
|
||||||
|
completion when user has deleted all characters from the prefix.
|
||||||
|
(semantic-displayor-focus-request): Return to previous window when
|
||||||
|
focussing tags.
|
||||||
|
|
||||||
|
* semantic/db-el.el (semanticdb-normalize-one-tag): Make obsolete.
|
||||||
|
(semanticdb-elisp-sym->tag): Use help-function-arglist instead.
|
||||||
|
|
||||||
|
* semantic/db-file.el (semanticdb-create-database): Use
|
||||||
|
semantic-tag-version instead of just semantic-version as the
|
||||||
|
initializer for the :semantic-tag-version slot.
|
||||||
|
|
||||||
|
* semantic/db-find.el (semanticdb-find-tags-by-class-method):
|
||||||
|
Delegate `include' to semantic-find-tags-included, which by
|
||||||
|
default will just call semantic-find-tags-by-class.
|
||||||
|
|
||||||
|
* semantic/db.el (semanticdb-refresh-table): Do not print warnings
|
||||||
|
when calling semantic-find-file-noselect. This avoids the "file
|
||||||
|
is write protected" messages when parsing system header files,
|
||||||
|
which might easily be mistaken to mean the currently loaded file.
|
||||||
|
(semanticdb-save-current-db, semanticdb-save-all-db): Only emit
|
||||||
|
message when running interactively.
|
||||||
|
|
||||||
|
* semantic/decorate/mode.el (semantic-decoration-mode): Activate
|
||||||
|
decoration of includes by default.
|
||||||
|
|
||||||
|
* semantic/doc.el (semantic-doc-snarf-comment-for-tag): Remove
|
||||||
|
comment delimiter at the end of the text.
|
||||||
|
|
||||||
|
* semantic/ede-grammar.el (semantic-ede-proj-target-grammar):
|
||||||
|
Change aux- and pre-load-packages.
|
||||||
|
(ede-proj-makefile-dependencies): Update pattern rule so that
|
||||||
|
resulting parsers are also byte-compiled.
|
||||||
|
(semantic-ede-grammar-compiler-bovine)
|
||||||
|
(semantic-ede-source-grammar-wisent): Remove .elc from gargage
|
||||||
|
pattern, since this is already covered by the elisp compiler.
|
||||||
|
(project-compile-target): Add compatibility code for Emacs 23,
|
||||||
|
which does not have `byte-recompile-file'.
|
||||||
|
(ede-proj-makefile-insert-rules): Add target specific EMACSFLAGS
|
||||||
|
to raise max-specpdl-size and max-lisp-eval-depth.
|
||||||
|
|
||||||
|
* semantic/find.el (semantic-find-tags-included): Make
|
||||||
|
overridable.
|
||||||
|
|
||||||
|
* semantic/fw.el (semantic-alias-obsolete)
|
||||||
|
(semantic-varalias-obsolete): Use byte-compile-warn.
|
||||||
|
(semantic-find-file-noselect): Disable font lock by calling
|
||||||
|
global-font-lock-mode.
|
||||||
|
|
||||||
|
* semantic/grammar.el (semantic-grammar-create-package): Fix
|
||||||
|
message.
|
||||||
|
(semantic-grammar-batch-build-one-package): When generating
|
||||||
|
parsers in batch-mode, ignore version control and make sure we do
|
||||||
|
not use cached versions.
|
||||||
|
|
||||||
|
* semantic/ia.el (semantic-ia-complete-symbol-menu): Bring back.
|
||||||
|
|
||||||
|
* semantic/lex-spp.el (semantic-lex-spp-symbol-merge): New fun.
|
||||||
|
(semantic-lex-spp-token-macro-to-macro-stream): Use it.
|
||||||
|
(semantic-lex-spp-lex-text-string): Instead of only setting the
|
||||||
|
lexer, call the major mode's setup function.
|
||||||
|
|
||||||
|
* semantic/scope.el (semantic-analyze-scoped-types-default): Use
|
||||||
|
semantic-tag-prototype-p.
|
||||||
|
(semantic-analyze-scope-nested-tags-default): Make sure we don't
|
||||||
|
return tags we already have in scopetypes.
|
||||||
|
|
||||||
|
* semantic/symref/filter.el
|
||||||
|
(semantic-symref-test-count-hits-in-tag): Restore.
|
||||||
|
|
||||||
|
* semantic/wisent/comp.el (wisent-BITS-PER-WORD): Use
|
||||||
|
most-positive-fixnum if available.
|
||||||
|
|
||||||
|
* semantic/wisent/javascript.el (semantic-tag-protection)
|
||||||
|
(semantic-analyze-scope-calculate-access)
|
||||||
|
(semantic-ctxt-current-symbol): New overrides.
|
||||||
|
|
||||||
|
* semantic/wisent/python.el (wisent-python-lex-beginning-of-line):
|
||||||
|
Rewrite to fix byte-compiler warning.
|
||||||
|
|
||||||
|
2012-10-01 Robert Jarzmik <robert.jarzmik@free.fr>
|
||||||
|
|
||||||
|
* ede/linux.el (project-linux): New group.
|
||||||
|
(project-linux-compile-target-command)
|
||||||
|
(project-linux-compile-project-command): New options.
|
||||||
|
(project-compile-project, project-compiler-target): New methods.
|
||||||
|
|
||||||
|
* inversion.el (inversion-decoders): New regexps for SXEmacs.
|
||||||
|
(inversion-package-version): More verbose error message.
|
||||||
|
(inversion-<): Deal with new special cases.
|
||||||
|
(inversion-require-emacs): New argument sxemacs-ver; use it.
|
||||||
|
|
||||||
|
2012-10-01 Nelson Ferreira <nelson.ferreira@ieee.org>
|
||||||
|
|
||||||
|
* ede/emacs.el (ede-emacs-version): Detect SXEmacs.
|
||||||
|
|
||||||
|
2012-10-01 William Xu <william.xwl@gmail.com>
|
||||||
|
|
||||||
|
* semantic/bovine/gcc.el (semantic-gcc-query): Returns status when
|
||||||
|
there is an error.
|
||||||
|
(semantic-gcc-setup): If the first attempt at calling cpp fails,
|
||||||
|
try straight GCC.
|
||||||
|
|
||||||
|
2012-10-01 Jan Moringen <jan.moringen@uni-bielefeld.de>
|
||||||
|
|
||||||
|
* semantic/idle.el
|
||||||
|
(semantic-idle-breadcrumbs--display-in-header-line): Escape
|
||||||
|
%-characters to avoid erroneous expansion in header line.
|
||||||
|
(semantic-idle-breadcrumbs--display-in-mode-line): Likewise.
|
||||||
|
|
||||||
|
* semantic/wisent/python.el (wisent-python-reconstitute-function-tag)
|
||||||
|
(wisent-python-reconstitute-class-tag, semantic-python-special-p)
|
||||||
|
(semantic-python-private-p, semantic-python-instance-variable-p)
|
||||||
|
(semantic-python-docstring-p): New functions.
|
||||||
|
|
||||||
|
* srecode/find.el (srecode-user-template-p): New function.
|
||||||
|
(srecode-all-template-hash): Accept new optional argument
|
||||||
|
predicate; return only templates matching the predicate.
|
||||||
|
(srecode-read-template-name): Only retrieve templates matching
|
||||||
|
srecode-user-template-p.
|
||||||
|
|
||||||
|
* srecode/insert.el (srecode-insert-show-error-report)
|
||||||
|
(srecode-insert-report-error): New functions.
|
||||||
|
(srecode-insert-variable-secondname-handler)
|
||||||
|
(srecode-insert-method, srecode-insert-ask-default)
|
||||||
|
(srecode-insert-variable-secondname-handler)
|
||||||
|
(srecode-insert-subtemplate, srecode-insert-method-helper)
|
||||||
|
(srecode-insert-include-lookup): Use them.
|
||||||
|
|
||||||
|
2012-10-01 Thomas Bach <thbach@students.uni-mainz.de>
|
||||||
|
|
||||||
|
* semantic/wisent/python.el
|
||||||
|
(semantic-python-get-system-include-path): Add Python3k support.
|
||||||
|
|
||||||
|
2012-10-01 Alexander Haeckel <_@_> (tiny change)
|
||||||
|
|
||||||
|
* srecode/getset.el (srecode-query-for-field): Return the first
|
||||||
|
tag found by name from all children tags.
|
||||||
|
|
||||||
|
2012-10-01 Dale Sedivec <dale@codefu.org>
|
||||||
|
|
||||||
|
* semantic/wisent/python.el (wisent-python-string-start-re)
|
||||||
|
(wisent-python-string-re, wisent-python-forward-string)
|
||||||
|
(wisent-python-forward-line,wisent-python-lex-string): New
|
||||||
|
variables.
|
||||||
|
(wisent-python-forward-balanced-expression): New function.
|
||||||
|
|
||||||
|
2012-10-01 Pete Beardmore <elbeardmorez@msn.com>
|
||||||
|
|
||||||
|
* semantic/complete.el (semantic-collector-calculate-completions):
|
||||||
|
Search for additional matches if new prefix is a substring of the
|
||||||
|
old prefix.
|
||||||
|
(semantic-displayor-next-action): Immediately show more
|
||||||
|
completions after user presses TAB the first time.
|
||||||
|
(semantic-displayor-tooltip-mode)
|
||||||
|
(semantic-displayor-tooltip-initial-max-tags)
|
||||||
|
(semantic-displayor-tooltip-max-tags): New defcustoms.
|
||||||
|
(semantic-displayor-tooltip): Use new variables as initforms. Use
|
||||||
|
new slot `mode' instead of `force-show'. Rename `max-tags' to
|
||||||
|
`max-tags-initial'.
|
||||||
|
(semantic-displayor-show-request): Display completions according
|
||||||
|
to new modes, and make variable names clearer.
|
||||||
|
(semantic-displayor-tooltip::semantic-displayor-scroll-request):
|
||||||
|
Use new max-tags-initial slot.
|
||||||
|
|
||||||
|
* semantic/idle.el (semantic-idle-local-symbol-highlight): Make
|
||||||
|
sure there actually is a tag at point.
|
||||||
|
(semantic-idle-completion-list-default): Report errors as messages
|
||||||
|
if semantic-idle-scheduler-verbose-flag is non-nil.
|
||||||
|
|
||||||
|
2012-10-01 Richard Kim <emacs18@gmail.com>
|
||||||
|
|
||||||
|
* semantic/db-global.el (semanticdb-enable-gnu-global-databases):
|
||||||
|
Add optional NOERROR argument.
|
||||||
|
|
||||||
|
2012-10-01 Alex Ott <alexott@gmail.com>
|
||||||
|
|
||||||
|
* semantic/idle.el (semantic-idle-scheduler-enabled-p): Fix
|
||||||
|
file-checking.
|
||||||
|
|
||||||
|
2012-10-01 Darren Hoo <darren.hoo@gmail.com> (tiny change)
|
||||||
|
|
||||||
|
* semantic/db-find.el (semanticdb-find-default-throttle): Make
|
||||||
|
buffer-local.
|
||||||
|
(semanticdb-strip-find-results): Check for existing :filename
|
||||||
|
attribute, so that file information from GNU Global is not lost.
|
||||||
|
|
||||||
2012-08-07 Andreas Schwab <schwab@linux-m68k.org>
|
2012-08-07 Andreas Schwab <schwab@linux-m68k.org>
|
||||||
|
|
||||||
* ede/base.el (ede-with-projectfile): Use backquote forms.
|
* ede/base.el (ede-with-projectfile): Use backquote forms.
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
(declare-function inversion-check-version "inversion")
|
(declare-function inversion-check-version "inversion")
|
||||||
|
|
||||||
(defvar cedet-cscope-min-version "16.0"
|
(defvar cedet-cscope-min-version "15.7"
|
||||||
"Minimum version of CScope required.")
|
"Minimum version of CScope required.")
|
||||||
|
|
||||||
(defcustom cedet-cscope-command "cscope"
|
(defcustom cedet-cscope-command "cscope"
|
||||||
|
|
|
||||||
|
|
@ -147,7 +147,7 @@ return nil."
|
||||||
nil)
|
nil)
|
||||||
(with-current-buffer b
|
(with-current-buffer b
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(re-search-forward "GNU GLOBAL \\([0-9.]+\\)" nil t)
|
(re-search-forward "(?GNU GLOBAL)? \\([0-9.]+\\)" nil t)
|
||||||
(setq rev (match-string 1))
|
(setq rev (match-string 1))
|
||||||
(if (inversion-check-version rev nil cedet-global-min-version)
|
(if (inversion-check-version rev nil cedet-global-min-version)
|
||||||
(if noerror
|
(if noerror
|
||||||
|
|
|
||||||
|
|
@ -179,8 +179,9 @@ return nil."
|
||||||
nil)
|
nil)
|
||||||
(with-current-buffer b
|
(with-current-buffer b
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(re-search-forward "fnid - \\([0-9.]+\\)" nil t)
|
(if (re-search-forward "fnid - \\([0-9.]+\\)" nil t)
|
||||||
(setq rev (match-string 1))
|
(setq rev (match-string 1))
|
||||||
|
(setq rev "0"))
|
||||||
(if (inversion-check-version rev nil cedet-idutils-min-version)
|
(if (inversion-check-version rev nil cedet-idutils-min-version)
|
||||||
(if noerror
|
(if noerror
|
||||||
nil
|
nil
|
||||||
|
|
|
||||||
|
|
@ -35,19 +35,22 @@
|
||||||
|
|
||||||
(declare-function inversion-find-version "inversion")
|
(declare-function inversion-find-version "inversion")
|
||||||
|
|
||||||
(defconst cedet-version "1.0"
|
(defconst cedet-version "1.1"
|
||||||
"Current version of CEDET.")
|
"Current version of CEDET.")
|
||||||
|
|
||||||
(defconst cedet-packages
|
(defconst cedet-packages
|
||||||
`(
|
`(
|
||||||
;;PACKAGE MIN-VERSION
|
;;PACKAGE MIN-VERSION INSTALLDIR DOCDIR
|
||||||
(cedet ,cedet-version)
|
(cedet ,cedet-version "common" "common" )
|
||||||
(eieio "1.3")
|
(eieio "1.4" nil "eieio" )
|
||||||
(semantic "2.0")
|
(semantic "2.1" nil "semantic/doc")
|
||||||
(srecode "1.0")
|
(srecode "1.1" nil "srecode" )
|
||||||
(ede "1.0")
|
(ede "1.1" nil "ede" )
|
||||||
(speedbar "1.0"))
|
(speedbar "1.0.4" nil "speedbar" )
|
||||||
"Table of CEDET packages installed.")
|
(cogre "1.1" nil "cogre" )
|
||||||
|
(cedet-contrib "1.1" "contrib" nil )
|
||||||
|
)
|
||||||
|
"Table of CEDET packages to install.")
|
||||||
|
|
||||||
(defvar cedet-menu-map ;(make-sparse-keymap "CEDET menu")
|
(defvar cedet-menu-map ;(make-sparse-keymap "CEDET menu")
|
||||||
(let ((map (make-sparse-keymap "CEDET menu")))
|
(let ((map (make-sparse-keymap "CEDET menu")))
|
||||||
|
|
|
||||||
|
|
@ -821,20 +821,30 @@ FCN is a function that will display stuff in the data debug buffer."
|
||||||
PREBUTTONTEXT is some text to insert between prefix and the thing
|
PREBUTTONTEXT is some text to insert between prefix and the thing
|
||||||
that is not included in the indentation calculation of any children.
|
that is not included in the indentation calculation of any children.
|
||||||
If PARENT is non-nil, it is somehow related as a parent to thing."
|
If PARENT is non-nil, it is somehow related as a parent to thing."
|
||||||
|
(let ((inhibit-read-only t))
|
||||||
(when (catch 'done
|
(when (catch 'done
|
||||||
(dolist (test data-debug-thing-alist)
|
(dolist (test data-debug-thing-alist)
|
||||||
(when (funcall (car test) thing)
|
(when (funcall (car test) thing)
|
||||||
(condition-case nil
|
(condition-case nil
|
||||||
|
(progn
|
||||||
(funcall (cdr test) thing prefix prebuttontext parent)
|
(funcall (cdr test) thing prefix prebuttontext parent)
|
||||||
(error
|
|
||||||
(funcall (cdr test) thing prefix prebuttontext)))
|
|
||||||
(throw 'done nil))
|
(throw 'done nil))
|
||||||
)
|
(error
|
||||||
|
(condition-case nil
|
||||||
|
(progn
|
||||||
|
(funcall (cdr test) thing prefix prebuttontext)
|
||||||
|
(throw 'done nil))
|
||||||
|
(error nil))))
|
||||||
|
;; Only throw the 'done if no error was caught.
|
||||||
|
;; If an error was caught, skip this predicate as being
|
||||||
|
;; unsuccessful, and move on.
|
||||||
|
))
|
||||||
nil)
|
nil)
|
||||||
(data-debug-insert-simple-thing (format "%S" thing)
|
(data-debug-insert-simple-thing (format "%S" thing)
|
||||||
prefix
|
prefix
|
||||||
prebuttontext
|
prebuttontext
|
||||||
'bold)))
|
'bold)))
|
||||||
|
(set-buffer-modified-p nil))
|
||||||
|
|
||||||
;;; MAJOR MODE
|
;;; MAJOR MODE
|
||||||
;;
|
;;
|
||||||
|
|
@ -861,6 +871,7 @@ If PARENT is non-nil, it is somehow related as a parent to thing."
|
||||||
|
|
||||||
(defvar data-debug-map
|
(defvar data-debug-map
|
||||||
(let ((km (make-sparse-keymap)))
|
(let ((km (make-sparse-keymap)))
|
||||||
|
(suppress-keymap km)
|
||||||
(define-key km [mouse-2] 'data-debug-expand-or-contract-mouse)
|
(define-key km [mouse-2] 'data-debug-expand-or-contract-mouse)
|
||||||
(define-key km " " 'data-debug-expand-or-contract)
|
(define-key km " " 'data-debug-expand-or-contract)
|
||||||
(define-key km "\C-m" 'data-debug-expand-or-contract)
|
(define-key km "\C-m" 'data-debug-expand-or-contract)
|
||||||
|
|
@ -885,7 +896,8 @@ If PARENT is non-nil, it is somehow related as a parent to thing."
|
||||||
(setq major-mode 'data-debug-mode
|
(setq major-mode 'data-debug-mode
|
||||||
mode-name "DATA-DEBUG"
|
mode-name "DATA-DEBUG"
|
||||||
comment-start ";;"
|
comment-start ";;"
|
||||||
comment-end "")
|
comment-end ""
|
||||||
|
buffer-read-only t)
|
||||||
(set (make-local-variable 'comment-start-skip)
|
(set (make-local-variable 'comment-start-skip)
|
||||||
"\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *")
|
"\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *")
|
||||||
(set-syntax-table data-debug-mode-syntax-table)
|
(set-syntax-table data-debug-mode-syntax-table)
|
||||||
|
|
@ -902,6 +914,7 @@ If PARENT is non-nil, it is somehow related as a parent to thing."
|
||||||
(let ((b (get-buffer-create name)))
|
(let ((b (get-buffer-create name)))
|
||||||
(pop-to-buffer b)
|
(pop-to-buffer b)
|
||||||
(set-buffer b)
|
(set-buffer b)
|
||||||
|
(setq buffer-read-only nil) ; disable read-only
|
||||||
(erase-buffer)
|
(erase-buffer)
|
||||||
(data-debug-mode)
|
(data-debug-mode)
|
||||||
b))
|
b))
|
||||||
|
|
@ -964,7 +977,8 @@ Do nothing if already expanded."
|
||||||
(when (or (not (data-debug-line-expandable-p))
|
(when (or (not (data-debug-line-expandable-p))
|
||||||
(not (data-debug-current-line-expanded-p)))
|
(not (data-debug-current-line-expanded-p)))
|
||||||
;; If the next line is the same or less indentation, expand.
|
;; If the next line is the same or less indentation, expand.
|
||||||
(let ((fcn (get-text-property (point) 'ddebug-function)))
|
(let ((fcn (get-text-property (point) 'ddebug-function))
|
||||||
|
(inhibit-read-only t))
|
||||||
(when fcn
|
(when fcn
|
||||||
(funcall fcn (point))
|
(funcall fcn (point))
|
||||||
(beginning-of-line)
|
(beginning-of-line)
|
||||||
|
|
@ -977,6 +991,7 @@ Do nothing if already contracted."
|
||||||
;; Don't contract if the current line is not expandable.
|
;; Don't contract if the current line is not expandable.
|
||||||
(get-text-property (point) 'ddebug-function))
|
(get-text-property (point) 'ddebug-function))
|
||||||
(let ((ti (current-indentation))
|
(let ((ti (current-indentation))
|
||||||
|
(inhibit-read-only t)
|
||||||
)
|
)
|
||||||
;; If next indentation is larger, collapse.
|
;; If next indentation is larger, collapse.
|
||||||
(end-of-line)
|
(end-of-line)
|
||||||
|
|
@ -995,7 +1010,8 @@ Do nothing if already contracted."
|
||||||
(error (setq end (point-max))))
|
(error (setq end (point-max))))
|
||||||
(delete-region start end)
|
(delete-region start end)
|
||||||
(forward-char -1)
|
(forward-char -1)
|
||||||
(beginning-of-line)))))
|
(beginning-of-line))))
|
||||||
|
(set-buffer-modified-p nil))
|
||||||
|
|
||||||
(defun data-debug-expand-or-contract ()
|
(defun data-debug-expand-or-contract ()
|
||||||
"Expand or contract anything at the current point."
|
"Expand or contract anything at the current point."
|
||||||
|
|
@ -1080,7 +1096,4 @@ If the result is a list or vector, then use the data debugger to display it."
|
||||||
|
|
||||||
(provide 'data-debug)
|
(provide 'data-debug)
|
||||||
|
|
||||||
(if (featurep 'eieio)
|
|
||||||
(require 'eieio-datadebug))
|
|
||||||
|
|
||||||
;;; data-debug.el ends here
|
;;; data-debug.el ends here
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
;; Author: Eric M. Ludlam <zappo@gnu.org>
|
;; Author: Eric M. Ludlam <zappo@gnu.org>
|
||||||
;; Keywords: project, make
|
;; Keywords: project, make
|
||||||
;; Version: 1.0pre7
|
;; Version: 1.0
|
||||||
|
|
||||||
;; This file is part of GNU Emacs.
|
;; This file is part of GNU Emacs.
|
||||||
|
|
||||||
|
|
@ -194,7 +194,6 @@ Argument LIST-O-O is the list of objects to choose from."
|
||||||
(define-key pmap "t" 'ede-new-target)
|
(define-key pmap "t" 'ede-new-target)
|
||||||
(define-key pmap "g" 'ede-rescan-toplevel)
|
(define-key pmap "g" 'ede-rescan-toplevel)
|
||||||
(define-key pmap "s" 'ede-speedbar)
|
(define-key pmap "s" 'ede-speedbar)
|
||||||
(define-key pmap "l" 'ede-load-project-file)
|
|
||||||
(define-key pmap "f" 'ede-find-file)
|
(define-key pmap "f" 'ede-find-file)
|
||||||
(define-key pmap "C" 'ede-compile-project)
|
(define-key pmap "C" 'ede-compile-project)
|
||||||
(define-key pmap "c" 'ede-compile-target)
|
(define-key pmap "c" 'ede-compile-target)
|
||||||
|
|
@ -252,7 +251,7 @@ Argument LIST-O-O is the list of objects to choose from."
|
||||||
(defun ede-buffer-belongs-to-project-p ()
|
(defun ede-buffer-belongs-to-project-p ()
|
||||||
"Return non-nil if this buffer belongs to at least one project."
|
"Return non-nil if this buffer belongs to at least one project."
|
||||||
(if (or (null ede-object) (consp ede-object)) nil
|
(if (or (null ede-object) (consp ede-object)) nil
|
||||||
(obj-of-class-p ede-object ede-project)))
|
(obj-of-class-p ede-object-project ede-project)))
|
||||||
|
|
||||||
(defun ede-menu-obj-of-class-p (class)
|
(defun ede-menu-obj-of-class-p (class)
|
||||||
"Return non-nil if some member of `ede-object' is a child of CLASS."
|
"Return non-nil if some member of `ede-object' is a child of CLASS."
|
||||||
|
|
@ -343,6 +342,7 @@ Argument MENU-DEF is the menu definition to use."
|
||||||
(append
|
(append
|
||||||
'( [ "Add Target" ede-new-target (ede-current-project) ]
|
'( [ "Add Target" ede-new-target (ede-current-project) ]
|
||||||
[ "Remove Target" ede-delete-target ede-object ]
|
[ "Remove Target" ede-delete-target ede-object ]
|
||||||
|
( "Default configuration" :filter ede-configuration-forms-menu )
|
||||||
"-")
|
"-")
|
||||||
menu
|
menu
|
||||||
))
|
))
|
||||||
|
|
@ -350,6 +350,41 @@ Argument MENU-DEF is the menu definition to use."
|
||||||
menu)
|
menu)
|
||||||
)))))
|
)))))
|
||||||
|
|
||||||
|
(defun ede-configuration-forms-menu (menu-def)
|
||||||
|
"Create a submenu for selecting the default configuration for this project.
|
||||||
|
The current default is in the current object's CONFIGURATION-DEFAULT slot.
|
||||||
|
All possible configurations are in CONFIGURATIONS.
|
||||||
|
Argument MENU-DEF specifies the menu being created."
|
||||||
|
(easy-menu-filter-return
|
||||||
|
(easy-menu-create-menu
|
||||||
|
"Configurations"
|
||||||
|
(let* ((obj (ede-current-project))
|
||||||
|
(conf (when obj (oref obj configurations)))
|
||||||
|
(cdef (when obj (oref obj configuration-default)))
|
||||||
|
(menu nil))
|
||||||
|
(dolist (C conf)
|
||||||
|
(setq menu (cons (vector C (list 'ede-project-configurations-set C)
|
||||||
|
:style 'toggle
|
||||||
|
:selected (string= C cdef))
|
||||||
|
menu))
|
||||||
|
)
|
||||||
|
(nreverse menu)))))
|
||||||
|
|
||||||
|
(defun ede-project-configurations-set (newconfig)
|
||||||
|
"Set the current project's current configuration to NEWCONFIG.
|
||||||
|
This function is designed to be used by `ede-configuration-forms-menu'
|
||||||
|
but can also be used interactively."
|
||||||
|
(interactive
|
||||||
|
(list (let* ((proj (ede-current-project))
|
||||||
|
(configs (oref proj configurations)))
|
||||||
|
(completing-read "New configuration: "
|
||||||
|
configs nil t
|
||||||
|
(oref proj configuration-default)))))
|
||||||
|
(oset (ede-current-project) configuration-default newconfig)
|
||||||
|
(message "%s will now build in %s mode."
|
||||||
|
(object-name (ede-current-project))
|
||||||
|
newconfig))
|
||||||
|
|
||||||
(defun ede-customize-forms-menu (menu-def)
|
(defun ede-customize-forms-menu (menu-def)
|
||||||
"Create a menu of the project, and targets that can be customized.
|
"Create a menu of the project, and targets that can be customized.
|
||||||
Argument MENU-DEF is the definition of the current menu."
|
Argument MENU-DEF is the definition of the current menu."
|
||||||
|
|
@ -377,9 +412,14 @@ Argument MENU-DEF is the definition of the current menu."
|
||||||
"Add target specific keybindings into the local map.
|
"Add target specific keybindings into the local map.
|
||||||
Optional argument DEFAULT indicates if this should be set to the default
|
Optional argument DEFAULT indicates if this should be set to the default
|
||||||
version of the keymap."
|
version of the keymap."
|
||||||
(let ((object (or ede-object ede-selected-object)))
|
(let ((object (or ede-object ede-selected-object))
|
||||||
|
(proj ede-object-project))
|
||||||
(condition-case nil
|
(condition-case nil
|
||||||
(let ((keys (ede-object-keybindings object)))
|
(let ((keys (ede-object-keybindings object)))
|
||||||
|
;; Add keys for the project to whatever is in the current object
|
||||||
|
;; so long as it isn't the same.
|
||||||
|
(when (not (eq object proj))
|
||||||
|
(setq keys (append keys (ede-object-keybindings proj))))
|
||||||
(while keys
|
(while keys
|
||||||
(local-set-key (concat "\C-c." (car (car keys)))
|
(local-set-key (concat "\C-c." (car (car keys)))
|
||||||
(cdr (car keys)))
|
(cdr (car keys)))
|
||||||
|
|
@ -415,8 +455,8 @@ If optional argument CURRENT is non-nil, return sub-menu code."
|
||||||
|
|
||||||
(defun ede-apply-target-options ()
|
(defun ede-apply-target-options ()
|
||||||
"Apply options to the current buffer for the active project/target."
|
"Apply options to the current buffer for the active project/target."
|
||||||
(if (ede-current-project)
|
(ede-apply-project-local-variables)
|
||||||
(ede-set-project-variables (ede-current-project)))
|
;; Apply keymaps and preprocessor symbols.
|
||||||
(ede-apply-object-keymap)
|
(ede-apply-object-keymap)
|
||||||
(ede-apply-preprocessor-map)
|
(ede-apply-preprocessor-map)
|
||||||
)
|
)
|
||||||
|
|
@ -493,9 +533,9 @@ Sets buffer local variables for EDE."
|
||||||
|
|
||||||
(ede-apply-target-options)))))
|
(ede-apply-target-options)))))
|
||||||
|
|
||||||
(defun ede-reset-all-buffers (onoff)
|
(defun ede-reset-all-buffers ()
|
||||||
"Reset all the buffers due to change in EDE.
|
"Reset all the buffers due to change in EDE."
|
||||||
ONOFF indicates enabling or disabling the mode."
|
(interactive)
|
||||||
(let ((b (buffer-list)))
|
(let ((b (buffer-list)))
|
||||||
(while b
|
(while b
|
||||||
(when (buffer-file-name (car b))
|
(when (buffer-file-name (car b))
|
||||||
|
|
@ -533,7 +573,7 @@ an EDE controlled project."
|
||||||
(add-hook 'dired-mode-hook 'ede-turn-on-hook)
|
(add-hook 'dired-mode-hook 'ede-turn-on-hook)
|
||||||
(add-hook 'kill-emacs-hook 'ede-save-cache)
|
(add-hook 'kill-emacs-hook 'ede-save-cache)
|
||||||
(ede-load-cache)
|
(ede-load-cache)
|
||||||
(ede-reset-all-buffers 1))
|
(ede-reset-all-buffers))
|
||||||
;; Turn off global-ede-mode
|
;; Turn off global-ede-mode
|
||||||
(define-key cedet-menu-map [cedet-menu-separator] nil)
|
(define-key cedet-menu-map [cedet-menu-separator] nil)
|
||||||
(remove-hook 'semanticdb-project-predicate-functions 'ede-directory-project-p)
|
(remove-hook 'semanticdb-project-predicate-functions 'ede-directory-project-p)
|
||||||
|
|
@ -543,7 +583,7 @@ an EDE controlled project."
|
||||||
(remove-hook 'dired-mode-hook 'ede-turn-on-hook)
|
(remove-hook 'dired-mode-hook 'ede-turn-on-hook)
|
||||||
(remove-hook 'kill-emacs-hook 'ede-save-cache)
|
(remove-hook 'kill-emacs-hook 'ede-save-cache)
|
||||||
(ede-save-cache)
|
(ede-save-cache)
|
||||||
(ede-reset-all-buffers -1)))
|
(ede-reset-all-buffers)))
|
||||||
|
|
||||||
(defvar ede-ignored-file-alist
|
(defvar ede-ignored-file-alist
|
||||||
'( "\\.cvsignore$"
|
'( "\\.cvsignore$"
|
||||||
|
|
@ -632,8 +672,7 @@ Otherwise, create a new project for DIR."
|
||||||
;; the user chooses.
|
;; the user chooses.
|
||||||
(if (ede-check-project-directory dir)
|
(if (ede-check-project-directory dir)
|
||||||
(progn
|
(progn
|
||||||
;; If there is a project in DIR, load it, otherwise do
|
;; Load the project in DIR, or make one.
|
||||||
;; nothing.
|
|
||||||
(ede-load-project-file dir)
|
(ede-load-project-file dir)
|
||||||
|
|
||||||
;; Check if we loaded anything on the previous line.
|
;; Check if we loaded anything on the previous line.
|
||||||
|
|
@ -643,7 +682,7 @@ Otherwise, create a new project for DIR."
|
||||||
;; buffers may also be referring to this project.
|
;; buffers may also be referring to this project.
|
||||||
;; Resetting all the buffers will get them to also point
|
;; Resetting all the buffers will get them to also point
|
||||||
;; at this new open project.
|
;; at this new open project.
|
||||||
(ede-reset-all-buffers 1)
|
(ede-reset-all-buffers)
|
||||||
|
|
||||||
;; ELSE
|
;; ELSE
|
||||||
;; There was no project, so switch to `ede-new' which is how
|
;; There was no project, so switch to `ede-new' which is how
|
||||||
|
|
@ -785,7 +824,7 @@ ARGS are additional arguments to pass to method SYM."
|
||||||
(ede-deep-rescan t))
|
(ede-deep-rescan t))
|
||||||
|
|
||||||
(project-rescan (ede-load-project-file toppath))
|
(project-rescan (ede-load-project-file toppath))
|
||||||
(ede-reset-all-buffers 1))))
|
(ede-reset-all-buffers))))
|
||||||
|
|
||||||
(defun ede-new-target (&rest args)
|
(defun ede-new-target (&rest args)
|
||||||
"Create a new target specific to this type of project file.
|
"Create a new target specific to this type of project file.
|
||||||
|
|
@ -794,9 +833,11 @@ Typically you can specify NAME, target TYPE, and AUTOADD, where AUTOADD is
|
||||||
a string \"y\" or \"n\", which answers the y/n question done interactively."
|
a string \"y\" or \"n\", which answers the y/n question done interactively."
|
||||||
(interactive)
|
(interactive)
|
||||||
(apply 'project-new-target (ede-current-project) args)
|
(apply 'project-new-target (ede-current-project) args)
|
||||||
|
(when (and buffer-file-name
|
||||||
|
(not (file-directory-p buffer-file-name)))
|
||||||
(setq ede-object nil)
|
(setq ede-object nil)
|
||||||
(setq ede-object (ede-buffer-object (current-buffer)))
|
(setq ede-object (ede-buffer-object (current-buffer)))
|
||||||
(ede-apply-target-options))
|
(ede-apply-target-options)))
|
||||||
|
|
||||||
(defun ede-new-target-custom ()
|
(defun ede-new-target-custom ()
|
||||||
"Create a new target specific to this type of project file."
|
"Create a new target specific to this type of project file."
|
||||||
|
|
@ -837,7 +878,10 @@ a string \"y\" or \"n\", which answers the y/n question done interactively."
|
||||||
|
|
||||||
(project-add-file target (buffer-file-name))
|
(project-add-file target (buffer-file-name))
|
||||||
(setq ede-object nil)
|
(setq ede-object nil)
|
||||||
(setq ede-object (ede-buffer-object (current-buffer)))
|
|
||||||
|
;; Setup buffer local variables.
|
||||||
|
(ede-initialize-state-current-buffer)
|
||||||
|
|
||||||
(when (not ede-object)
|
(when (not ede-object)
|
||||||
(error "Can't add %s to target %s: Wrong file type"
|
(error "Can't add %s to target %s: Wrong file type"
|
||||||
(file-name-nondirectory (buffer-file-name))
|
(file-name-nondirectory (buffer-file-name))
|
||||||
|
|
@ -1188,7 +1232,15 @@ could become slow in time."
|
||||||
(defmethod ede-find-target ((proj ede-project) buffer)
|
(defmethod ede-find-target ((proj ede-project) buffer)
|
||||||
"Fetch the target in PROJ belonging to BUFFER or nil."
|
"Fetch the target in PROJ belonging to BUFFER or nil."
|
||||||
(with-current-buffer buffer
|
(with-current-buffer buffer
|
||||||
(or ede-object
|
|
||||||
|
;; We can do a short-ut if ede-object local variable is set.
|
||||||
|
(if ede-object
|
||||||
|
;; If the buffer is already loaded with good EDE stuff, make sure the
|
||||||
|
;; saved project is the project we're looking for.
|
||||||
|
(when (and ede-object-project (eq proj ede-object-project)) ede-object)
|
||||||
|
|
||||||
|
;; If the variable wasn't set, then we are probably initializing the buffer.
|
||||||
|
;; In that case, search the file system.
|
||||||
(if (ede-buffer-mine proj buffer)
|
(if (ede-buffer-mine proj buffer)
|
||||||
proj
|
proj
|
||||||
(let ((targets (oref proj targets))
|
(let ((targets (oref proj targets))
|
||||||
|
|
@ -1225,7 +1277,7 @@ This includes buffers controlled by a specific target of PROJECT."
|
||||||
(pl nil))
|
(pl nil))
|
||||||
(while bl
|
(while bl
|
||||||
(with-current-buffer (car bl)
|
(with-current-buffer (car bl)
|
||||||
(if (ede-buffer-belongs-to-project-p)
|
(when (and ede-object (ede-find-target project (car bl)))
|
||||||
(setq pl (cons (car bl) pl))))
|
(setq pl (cons (car bl) pl))))
|
||||||
(setq bl (cdr bl)))
|
(setq bl (cdr bl)))
|
||||||
pl))
|
pl))
|
||||||
|
|
@ -1301,9 +1353,28 @@ Return the first non-nil value returned by PROC."
|
||||||
;;
|
;;
|
||||||
;; These items are needed by ede-cpp-root to add better support for
|
;; These items are needed by ede-cpp-root to add better support for
|
||||||
;; configuring items for Semantic.
|
;; configuring items for Semantic.
|
||||||
|
|
||||||
|
;; Generic paths
|
||||||
|
(defmethod ede-system-include-path ((this ede-project))
|
||||||
|
"Get the system include path used by project THIS."
|
||||||
|
nil)
|
||||||
|
|
||||||
|
(defmethod ede-system-include-path ((this ede-target))
|
||||||
|
"Get the system include path used by project THIS."
|
||||||
|
nil)
|
||||||
|
|
||||||
|
(defmethod ede-source-paths ((this ede-project) mode)
|
||||||
|
"Get the base to all source trees in the current projet for MODE.
|
||||||
|
For example, <root>/src for sources of c/c++, Java, etc,
|
||||||
|
and <root>/doc for doc sources."
|
||||||
|
nil)
|
||||||
|
|
||||||
|
;; C/C++
|
||||||
(defun ede-apply-preprocessor-map ()
|
(defun ede-apply-preprocessor-map ()
|
||||||
"Apply preprocessor tables onto the current buffer."
|
"Apply preprocessor tables onto the current buffer."
|
||||||
(when (and ede-object (boundp 'semantic-lex-spp-macro-symbol-obarray))
|
(when (and ede-object
|
||||||
|
(boundp 'semantic-lex-spp-macro-symbol-obarray)
|
||||||
|
semantic-lex-spp-macro-symbol-obarray)
|
||||||
(let* ((objs ede-object)
|
(let* ((objs ede-object)
|
||||||
(map (ede-preprocessor-map (if (consp objs)
|
(map (ede-preprocessor-map (if (consp objs)
|
||||||
(car objs)
|
(car objs)
|
||||||
|
|
@ -1324,27 +1395,66 @@ Return the first non-nil value returned by PROC."
|
||||||
"Get the pre-processor map for project THIS."
|
"Get the pre-processor map for project THIS."
|
||||||
nil)
|
nil)
|
||||||
|
|
||||||
(defmethod ede-system-include-path ((this ede-target))
|
|
||||||
"Get the system include path used by project THIS."
|
|
||||||
nil)
|
|
||||||
|
|
||||||
(defmethod ede-preprocessor-map ((this ede-target))
|
(defmethod ede-preprocessor-map ((this ede-target))
|
||||||
"Get the pre-processor map for project THIS."
|
"Get the pre-processor map for project THIS."
|
||||||
nil)
|
nil)
|
||||||
|
|
||||||
|
;; Java
|
||||||
|
(defmethod ede-java-classpath ((this ede-project))
|
||||||
|
"Return the classpath for this project."
|
||||||
|
;; @TODO - Can JDEE add something here?
|
||||||
|
nil)
|
||||||
|
|
||||||
|
|
||||||
;;; Project-local variables
|
;;; Project-local variables
|
||||||
;;
|
|
||||||
|
(defun ede-set (variable value &optional proj)
|
||||||
|
"Set the project local VARIABLE to VALUE.
|
||||||
|
If VARIABLE is not project local, just use set. Optional argument PROJ
|
||||||
|
is the project to use, instead of `ede-current-project'."
|
||||||
|
(interactive "sVariable: \nxExpression: ")
|
||||||
|
(let ((p (or proj (ede-toplevel)))
|
||||||
|
a)
|
||||||
|
;; Make the change
|
||||||
|
(ede-make-project-local-variable variable p)
|
||||||
|
(ede-set-project-local-variable variable value p)
|
||||||
|
(ede-commit-local-variables p)
|
||||||
|
|
||||||
|
;; This is a heavy hammer, but will apply variables properly
|
||||||
|
;; based on stacking between the toplevel and child projects.
|
||||||
|
(ede-map-buffers 'ede-apply-project-local-variables)
|
||||||
|
|
||||||
|
value))
|
||||||
|
|
||||||
|
(defun ede-apply-project-local-variables (&optional buffer)
|
||||||
|
"Apply project local variables to the current buffer."
|
||||||
|
(with-current-buffer (or buffer (current-buffer))
|
||||||
|
;; Always apply toplevel variables.
|
||||||
|
(if (not (eq (ede-current-project) (ede-toplevel)))
|
||||||
|
(ede-set-project-variables (ede-toplevel)))
|
||||||
|
;; Next apply more local project's variables.
|
||||||
|
(if (ede-current-project)
|
||||||
|
(ede-set-project-variables (ede-current-project)))
|
||||||
|
))
|
||||||
|
|
||||||
(defun ede-make-project-local-variable (variable &optional project)
|
(defun ede-make-project-local-variable (variable &optional project)
|
||||||
"Make VARIABLE project-local to PROJECT."
|
"Make VARIABLE project-local to PROJECT."
|
||||||
(if (not project) (setq project (ede-current-project)))
|
(if (not project) (setq project (ede-toplevel)))
|
||||||
(if (assoc variable (oref project local-variables))
|
(if (assoc variable (oref project local-variables))
|
||||||
nil
|
nil
|
||||||
(oset project local-variables (cons (list variable)
|
(oset project local-variables (cons (list variable)
|
||||||
(oref project local-variables)))
|
(oref project local-variables)))))
|
||||||
(dolist (b (ede-project-buffers project))
|
|
||||||
(with-current-buffer b
|
(defun ede-set-project-local-variable (variable value &optional project)
|
||||||
(make-local-variable variable)))))
|
"Set VARIABLE to VALUE for PROJECT.
|
||||||
|
If PROJ isn't specified, use the current project.
|
||||||
|
This function only assigns the value within the project structure.
|
||||||
|
It does not apply the value to buffers."
|
||||||
|
(if (not project) (setq project (ede-toplevel)))
|
||||||
|
(let ((va (assoc variable (oref project local-variables))))
|
||||||
|
(unless va
|
||||||
|
(error "Cannot set project variable until it is added with `ede-make-project-local-variable'"))
|
||||||
|
(setcdr va value)))
|
||||||
|
|
||||||
(defmethod ede-set-project-variables ((project ede-project) &optional buffer)
|
(defmethod ede-set-project-variables ((project ede-project) &optional buffer)
|
||||||
"Set variables local to PROJECT in BUFFER."
|
"Set variables local to PROJECT in BUFFER."
|
||||||
|
|
@ -1352,25 +1462,8 @@ Return the first non-nil value returned by PROC."
|
||||||
(with-current-buffer buffer
|
(with-current-buffer buffer
|
||||||
(dolist (v (oref project local-variables))
|
(dolist (v (oref project local-variables))
|
||||||
(make-local-variable (car v))
|
(make-local-variable (car v))
|
||||||
;; set its value here?
|
|
||||||
(set (car v) (cdr v)))))
|
(set (car v) (cdr v)))))
|
||||||
|
|
||||||
(defun ede-set (variable value &optional proj)
|
|
||||||
"Set the project local VARIABLE to VALUE.
|
|
||||||
If VARIABLE is not project local, just use set. Optional argument PROJ
|
|
||||||
is the project to use, instead of `ede-current-project'."
|
|
||||||
(let ((p (or proj (ede-current-project)))
|
|
||||||
a)
|
|
||||||
(if (and p (setq a (assoc variable (oref p local-variables))))
|
|
||||||
(progn
|
|
||||||
(setcdr a value)
|
|
||||||
(dolist (b (ede-project-buffers p))
|
|
||||||
(with-current-buffer b
|
|
||||||
(set variable value))))
|
|
||||||
(set variable value))
|
|
||||||
(ede-commit-local-variables p))
|
|
||||||
value)
|
|
||||||
|
|
||||||
(defmethod ede-commit-local-variables ((proj ede-project))
|
(defmethod ede-commit-local-variables ((proj ede-project))
|
||||||
"Commit change to local variables in PROJ."
|
"Commit change to local variables in PROJ."
|
||||||
nil)
|
nil)
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,84 @@
|
||||||
(declare-function ede-directory-safe-p "ede")
|
(declare-function ede-directory-safe-p "ede")
|
||||||
(declare-function ede-add-project-to-global-list "ede")
|
(declare-function ede-add-project-to-global-list "ede")
|
||||||
|
|
||||||
|
(defclass ede-project-autoload-dirmatch ()
|
||||||
|
((fromconfig :initarg :fromconfig
|
||||||
|
:initform nil
|
||||||
|
:documentation
|
||||||
|
"A config file within which the match pattern lives.")
|
||||||
|
(configregex :initarg :configregex
|
||||||
|
:initform nil
|
||||||
|
:documentation
|
||||||
|
"A regexp to identify the dirmatch pattern.")
|
||||||
|
(configregexidx :initarg :configregexidx
|
||||||
|
:initform nil
|
||||||
|
:documentation
|
||||||
|
"An index into the match-data of `configregex'.")
|
||||||
|
(configdatastash :initform nil
|
||||||
|
:documentation
|
||||||
|
"Save discovered match string.")
|
||||||
|
)
|
||||||
|
"Support complex matches for projects that live in named directories.
|
||||||
|
For most cases, a simple string is sufficient. If, however, a project
|
||||||
|
location is varied dependent on other complex criteria, this class
|
||||||
|
can be used to define that match without loading the specific project
|
||||||
|
into memory.")
|
||||||
|
|
||||||
|
(defmethod ede-dirmatch-installed ((dirmatch ede-project-autoload-dirmatch))
|
||||||
|
"Return non-nil if the tool DIRMATCH might match is installed on the system."
|
||||||
|
(let ((fc (oref dirmatch fromconfig)))
|
||||||
|
|
||||||
|
(cond
|
||||||
|
;; If the thing to match is stored in a config file.
|
||||||
|
((stringp fc)
|
||||||
|
(file-exists-p fc))
|
||||||
|
|
||||||
|
;; Add new types of dirmatches here.
|
||||||
|
|
||||||
|
;; Error for wierd stuff
|
||||||
|
(t (error "Unknown dirmatch type.")))))
|
||||||
|
|
||||||
|
|
||||||
|
(defmethod ede-do-dirmatch ((dirmatch ede-project-autoload-dirmatch) file)
|
||||||
|
"Does DIRMATCH match the filename FILE."
|
||||||
|
(let ((fc (oref dirmatch fromconfig)))
|
||||||
|
|
||||||
|
(cond
|
||||||
|
;; If the thing to match is stored in a config file.
|
||||||
|
((stringp fc)
|
||||||
|
(when (file-exists-p fc)
|
||||||
|
(let ((matchstring (oref dirmatch configdatastash)))
|
||||||
|
(unless matchstring
|
||||||
|
(save-current-buffer
|
||||||
|
(let* ((buff (get-file-buffer fc))
|
||||||
|
(readbuff
|
||||||
|
(let ((find-file-hook nil)) ;; Disable ede from recursing
|
||||||
|
(find-file-noselect fc))))
|
||||||
|
(set-buffer readbuff)
|
||||||
|
(save-excursion
|
||||||
|
(goto-char (point-min))
|
||||||
|
(when (re-search-forward (oref dirmatch configregex) nil t)
|
||||||
|
(setq matchstring
|
||||||
|
(match-string (or (oref dirmatch configregexidx) 0)))))
|
||||||
|
(if (not buff) (kill-buffer readbuff))))
|
||||||
|
;; Save what we find in our cache.
|
||||||
|
(oset dirmatch configdatastash matchstring))
|
||||||
|
;; Match against our discovered string
|
||||||
|
(and matchstring (string-match (regexp-quote matchstring) file))
|
||||||
|
)))
|
||||||
|
|
||||||
|
;; Add new matches here
|
||||||
|
;; ((stringp somenewslot ...)
|
||||||
|
;; )
|
||||||
|
|
||||||
|
;; Error if none others known
|
||||||
|
(t
|
||||||
|
(error "Unknown dirmatch object match style.")))
|
||||||
|
))
|
||||||
|
|
||||||
|
(declare-function ede-directory-safe-p "ede")
|
||||||
|
(declare-function ede-add-project-to-global-list "ede")
|
||||||
|
|
||||||
(defclass ede-project-autoload ()
|
(defclass ede-project-autoload ()
|
||||||
((name :initarg :name
|
((name :initarg :name
|
||||||
:documentation "Name of this project type")
|
:documentation "Name of this project type")
|
||||||
|
|
@ -41,6 +119,13 @@
|
||||||
:documentation "The lisp file belonging to this class.")
|
:documentation "The lisp file belonging to this class.")
|
||||||
(proj-file :initarg :proj-file
|
(proj-file :initarg :proj-file
|
||||||
:documentation "Name of a project file of this type.")
|
:documentation "Name of a project file of this type.")
|
||||||
|
(proj-root-dirmatch :initarg :proj-root-dirmatch
|
||||||
|
:initform ""
|
||||||
|
:type (or string ede-project-autoload-dirmatch)
|
||||||
|
:documentation
|
||||||
|
"To avoid loading a project, check if the directory matches this.
|
||||||
|
For projects that use directory name matches, a function would load that project.
|
||||||
|
Specifying this matcher will allow EDE to check without loading the project.")
|
||||||
(proj-root :initarg :proj-root
|
(proj-root :initarg :proj-root
|
||||||
:type function
|
:type function
|
||||||
:documentation "A function symbol to call for the project root.
|
:documentation "A function symbol to call for the project root.
|
||||||
|
|
@ -57,6 +142,11 @@ associated with a single object class, based on the initializers used.")
|
||||||
:documentation "Fn symbol used to load this project file.")
|
:documentation "Fn symbol used to load this project file.")
|
||||||
(class-sym :initarg :class-sym
|
(class-sym :initarg :class-sym
|
||||||
:documentation "Symbol representing the project class to use.")
|
:documentation "Symbol representing the project class to use.")
|
||||||
|
(generic-p :initform nil
|
||||||
|
:documentation
|
||||||
|
"Generic projects are added to the project list at the end.
|
||||||
|
The add routine will set this to non-nil so that future non-generic placement will
|
||||||
|
be successful.")
|
||||||
(new-p :initarg :new-p
|
(new-p :initarg :new-p
|
||||||
:initform t
|
:initform t
|
||||||
:documentation
|
:documentation
|
||||||
|
|
@ -93,11 +183,56 @@ type is required and the load function used.")
|
||||||
:proj-file "Makefile.am"
|
:proj-file "Makefile.am"
|
||||||
:load-type 'project-am-load
|
:load-type 'project-am-load
|
||||||
:class-sym 'project-am-makefile
|
:class-sym 'project-am-makefile
|
||||||
:new-p nil))
|
:new-p nil
|
||||||
|
:safe-p t)
|
||||||
|
)
|
||||||
"List of vectors defining how to determine what type of projects exist.")
|
"List of vectors defining how to determine what type of projects exist.")
|
||||||
|
|
||||||
(put 'ede-project-class-files 'risky-local-variable t)
|
(put 'ede-project-class-files 'risky-local-variable t)
|
||||||
|
|
||||||
|
(defun ede-add-project-autoload (projauto &optional flag)
|
||||||
|
"Add PROJAUTO, an EDE autoload definition to `ede-project-class-files'.
|
||||||
|
Optional argument FLAG indicates how this autoload should be
|
||||||
|
added. Possible values are:
|
||||||
|
'generic - A generic project type. Keep this at the very end.
|
||||||
|
'unique - A unique project type for a specific project. Keep at the very
|
||||||
|
front of the list so more generic projects don't get priority."
|
||||||
|
;; First, can we identify PROJAUTO as already in the list? If so, replace.
|
||||||
|
(let ((projlist ede-project-class-files)
|
||||||
|
(projname (object-name-string projauto)))
|
||||||
|
(while (and projlist (not (string= (object-name-string (car projlist)) projname)))
|
||||||
|
(setq projlist (cdr projlist)))
|
||||||
|
|
||||||
|
(if projlist
|
||||||
|
;; Stick the new one into the old slot.
|
||||||
|
(setcar projlist projauto)
|
||||||
|
|
||||||
|
;; Else, see where to insert it.
|
||||||
|
(cond ((and flag (eq flag 'unique))
|
||||||
|
;; Unique items get stuck right onto the front.
|
||||||
|
(setq ede-project-class-files
|
||||||
|
(cons projauto ede-project-class-files)))
|
||||||
|
|
||||||
|
;; Generic Projects go at the very end of the list.
|
||||||
|
((and flag (eq flag 'generic))
|
||||||
|
(oset projauto generic-p t)
|
||||||
|
(setq ede-project-class-files
|
||||||
|
(append ede-project-class-files
|
||||||
|
(list projauto))))
|
||||||
|
|
||||||
|
;; Normal projects go at the end of the list, but
|
||||||
|
;; before the generic projects.
|
||||||
|
(t
|
||||||
|
(let ((prev nil)
|
||||||
|
(next ede-project-class-files))
|
||||||
|
(while (and next (not (oref (car next) generic-p)))
|
||||||
|
(setq prev next
|
||||||
|
next (cdr next)))
|
||||||
|
(when (not prev)
|
||||||
|
(error "ede-project-class-files not initialized"))
|
||||||
|
;; Splice into the list.
|
||||||
|
(setcdr prev (cons projauto next))))))))
|
||||||
|
|
||||||
;;; EDE project-autoload methods
|
;;; EDE project-autoload methods
|
||||||
;;
|
;;
|
||||||
(defmethod ede-project-root ((this ede-project-autoload))
|
(defmethod ede-project-root ((this ede-project-autoload))
|
||||||
|
|
@ -105,6 +240,21 @@ type is required and the load function used.")
|
||||||
Allows for one-project-object-for-a-tree type systems."
|
Allows for one-project-object-for-a-tree type systems."
|
||||||
nil)
|
nil)
|
||||||
|
|
||||||
|
(defun ede-project-dirmatch-p (file dirmatch)
|
||||||
|
"Return non-nil if FILE matches DIRMATCH.
|
||||||
|
DIRMATCH could be nil (no match), a string (regexp match),
|
||||||
|
or an `ede-project-autoload-dirmatch' object."
|
||||||
|
;; If dirmatch is a string, then we simply match it against
|
||||||
|
;; the file we are testing.
|
||||||
|
(if (stringp dirmatch)
|
||||||
|
(string-match dirmatch file)
|
||||||
|
;; if dirmatch is instead a dirmatch object, we test against
|
||||||
|
;; that object instead.
|
||||||
|
(if (ede-project-autoload-dirmatch-p dirmatch)
|
||||||
|
(ede-do-dirmatch dirmatch file)
|
||||||
|
(error "Unknown project directory match type."))
|
||||||
|
))
|
||||||
|
|
||||||
(defmethod ede-project-root-directory ((this ede-project-autoload)
|
(defmethod ede-project-root-directory ((this ede-project-autoload)
|
||||||
&optional file)
|
&optional file)
|
||||||
"If a project knows its root, return it here.
|
"If a project knows its root, return it here.
|
||||||
|
|
@ -114,12 +264,36 @@ the current buffer."
|
||||||
(when (not file)
|
(when (not file)
|
||||||
(setq file default-directory))
|
(setq file default-directory))
|
||||||
(when (slot-boundp this :proj-root)
|
(when (slot-boundp this :proj-root)
|
||||||
(let ((rootfcn (oref this proj-root)))
|
(let ((dirmatch (oref this proj-root-dirmatch))
|
||||||
|
(rootfcn (oref this proj-root))
|
||||||
|
(callfcn t))
|
||||||
(when rootfcn
|
(when rootfcn
|
||||||
|
(if ;; If the dirmatch (an object) is not installed, then we
|
||||||
|
;; always skip doing a match.
|
||||||
|
(and (ede-project-autoload-dirmatch-p dirmatch)
|
||||||
|
(not (ede-dirmatch-installed dirmatch)))
|
||||||
|
(setq callfcn nil)
|
||||||
|
;; Other types of dirmatch:
|
||||||
|
(when (and
|
||||||
|
;; If the Emacs Lisp file handling this project hasn't
|
||||||
|
;; been loaded, we will use the quick dirmatch feature.
|
||||||
|
(not (featurep (oref this file)))
|
||||||
|
;; If the dirmatch is an empty string, then we always
|
||||||
|
;; skip doing a match.
|
||||||
|
(not (and (stringp dirmatch) (string= dirmatch "")))
|
||||||
|
)
|
||||||
|
;; If this file DOES NOT match dirmatch, we set the callfcn
|
||||||
|
;; to nil, meaning don't load the ede support file for this
|
||||||
|
;; type of project. If it does match, we will load the file
|
||||||
|
;; and use a more accurate programatic match from there.
|
||||||
|
(unless (ede-project-dirmatch-p file dirmatch)
|
||||||
|
(setq callfcn nil))))
|
||||||
|
;; Call into the project support file for a match.
|
||||||
|
(when callfcn
|
||||||
(condition-case nil
|
(condition-case nil
|
||||||
(funcall rootfcn file)
|
(funcall rootfcn file)
|
||||||
(error
|
(error
|
||||||
(funcall rootfcn)))
|
(funcall rootfcn))))
|
||||||
))))
|
))))
|
||||||
|
|
||||||
(defmethod ede-dir-to-projectfile ((this ede-project-autoload) dir)
|
(defmethod ede-dir-to-projectfile ((this ede-project-autoload) dir)
|
||||||
|
|
@ -128,10 +302,20 @@ Return nil if the project file does not exist."
|
||||||
(let* ((d (file-name-as-directory dir))
|
(let* ((d (file-name-as-directory dir))
|
||||||
(root (ede-project-root-directory this d))
|
(root (ede-project-root-directory this d))
|
||||||
(pf (oref this proj-file))
|
(pf (oref this proj-file))
|
||||||
|
(dm (oref this proj-root-dirmatch))
|
||||||
(f (cond ((stringp pf)
|
(f (cond ((stringp pf)
|
||||||
(expand-file-name pf (or root d)))
|
(expand-file-name pf (or root d)))
|
||||||
((and (symbolp pf) (fboundp pf))
|
((and (symbolp pf) (fboundp pf))
|
||||||
(funcall pf (or root d)))))
|
;; If there is a symbol to call, lets make extra
|
||||||
|
;; sure we really can call it without loading in
|
||||||
|
;; other EDE projects. This happens if the file is
|
||||||
|
;; already loaded, or if there is a dirmatch, but
|
||||||
|
;; root is empty.
|
||||||
|
(when (and (featurep (oref this file))
|
||||||
|
(or (not (stringp dm))
|
||||||
|
(not (string= dm "")))
|
||||||
|
root)
|
||||||
|
(funcall pf (or root d))))))
|
||||||
)
|
)
|
||||||
(when (and f (file-exists-p f))
|
(when (and f (file-exists-p f))
|
||||||
f)))
|
f)))
|
||||||
|
|
|
||||||
|
|
@ -165,6 +165,9 @@ items such as CHECK_HEADERS."
|
||||||
(setq param (substring param (match-end 0))))
|
(setq param (substring param (match-end 0))))
|
||||||
(when (string-match "\\s-*\\]?\\s-*\\'" param)
|
(when (string-match "\\s-*\\]?\\s-*\\'" param)
|
||||||
(setq param (substring param 0 (match-beginning 0))))
|
(setq param (substring param 0 (match-beginning 0))))
|
||||||
|
;; Look for occurances of backslash newline
|
||||||
|
(while (string-match "\\s-*\\\\\\s-*\n\\s-*" param)
|
||||||
|
(setq param (replace-match " " t t param)))
|
||||||
param)
|
param)
|
||||||
|
|
||||||
(defun autoconf-parameters-for-macro (macro &optional ignore-bol ignore-case)
|
(defun autoconf-parameters-for-macro (macro &optional ignore-bol ignore-case)
|
||||||
|
|
@ -373,6 +376,38 @@ Optional argument BODY is the code to execute which edits the autoconf file."
|
||||||
(string= autoconf-deleted-text autoconf-inserted-text))
|
(string= autoconf-deleted-text autoconf-inserted-text))
|
||||||
(set-buffer-modified-p nil))))
|
(set-buffer-modified-p nil))))
|
||||||
|
|
||||||
|
(defun autoconf-parameter-count ()
|
||||||
|
"Return the number of parameters to the function on the current line."
|
||||||
|
(save-excursion
|
||||||
|
(beginning-of-line)
|
||||||
|
(let* ((end-of-cmd
|
||||||
|
(save-excursion
|
||||||
|
(if (re-search-forward "(" (point-at-eol) t)
|
||||||
|
(progn
|
||||||
|
(forward-char -1)
|
||||||
|
(forward-sexp 1)
|
||||||
|
(point))
|
||||||
|
;; Else, just return EOL.
|
||||||
|
(point-at-eol))))
|
||||||
|
(cnt 0))
|
||||||
|
(save-restriction
|
||||||
|
(narrow-to-region (point-at-bol) end-of-cmd)
|
||||||
|
(condition-case nil
|
||||||
|
(progn
|
||||||
|
(down-list 1)
|
||||||
|
(while (re-search-forward ", ?" end-of-cmd t)
|
||||||
|
(setq cnt (1+ cnt)))
|
||||||
|
(cond ((> cnt 1)
|
||||||
|
;; If the # is > 1, then there is one fewer , than args.
|
||||||
|
(1+ cnt))
|
||||||
|
((not (looking-at "\\s-*)"))
|
||||||
|
;; If there are 0 args, then we have to see if there is one arg.
|
||||||
|
(1+ cnt))
|
||||||
|
(t
|
||||||
|
;; Else, just return the 0.
|
||||||
|
cnt)))
|
||||||
|
(error 0))))))
|
||||||
|
|
||||||
(defun autoconf-delete-parameter (index)
|
(defun autoconf-delete-parameter (index)
|
||||||
"Delete the INDEXth parameter from the macro starting on the current line.
|
"Delete the INDEXth parameter from the macro starting on the current line.
|
||||||
Leaves the cursor where a new parameter can be inserted.
|
Leaves the cursor where a new parameter can be inserted.
|
||||||
|
|
@ -396,12 +431,19 @@ INDEX starts at 1."
|
||||||
"Set the version used with automake to VERSION."
|
"Set the version used with automake to VERSION."
|
||||||
(if (not (stringp version))
|
(if (not (stringp version))
|
||||||
(signal 'wrong-type-argument '(stringp version)))
|
(signal 'wrong-type-argument '(stringp version)))
|
||||||
(if (not (autoconf-find-last-macro "AM_INIT_AUTOMAKE"))
|
(if (and (autoconf-find-last-macro "AM_INIT_AUTOMAKE")
|
||||||
(error "Cannot update version")
|
(>= (autoconf-parameter-count) 2))
|
||||||
;; Move to correct position.
|
;; We can edit right here.
|
||||||
|
nil
|
||||||
|
;; Else, look for AC init instead.
|
||||||
|
(if (not (and (autoconf-find-last-macro "AC_INIT")
|
||||||
|
(>= (autoconf-parameter-count) 2)))
|
||||||
|
(error "Cannot update version")))
|
||||||
|
|
||||||
|
;; Perform the edit.
|
||||||
(autoconf-edit-cycle
|
(autoconf-edit-cycle
|
||||||
(autoconf-delete-parameter 2)
|
(autoconf-delete-parameter 2)
|
||||||
(autoconf-insert version))))
|
(autoconf-insert (concat "[" version "]"))))
|
||||||
|
|
||||||
(defun autoconf-set-output (outputlist)
|
(defun autoconf-set-output (outputlist)
|
||||||
"Set the files created in AC_OUTPUT to OUTPUTLIST.
|
"Set the files created in AC_OUTPUT to OUTPUTLIST.
|
||||||
|
|
|
||||||
|
|
@ -163,7 +163,7 @@ and querying them will cause the actual project to get loaded.")
|
||||||
:documentation "Sub projects controlled by this project.
|
:documentation "Sub projects controlled by this project.
|
||||||
For Automake based projects, each directory is treated as a project.")
|
For Automake based projects, each directory is treated as a project.")
|
||||||
(targets :initarg :targets
|
(targets :initarg :targets
|
||||||
:type list
|
:type ede-target-list
|
||||||
:custom (repeat (object :objectcreatefcn ede-new-target-custom))
|
:custom (repeat (object :objectcreatefcn ede-new-target-custom))
|
||||||
:label "Local Targets"
|
:label "Local Targets"
|
||||||
:group (targets)
|
:group (targets)
|
||||||
|
|
@ -287,10 +287,7 @@ All specific project types must derive from this project."
|
||||||
"For the project in which OBJ resides, execute FORMS."
|
"For the project in which OBJ resides, execute FORMS."
|
||||||
`(save-window-excursion
|
`(save-window-excursion
|
||||||
(let* ((pf (if (obj-of-class-p ,obj ede-target)
|
(let* ((pf (if (obj-of-class-p ,obj ede-target)
|
||||||
;; @todo -I think I can change
|
(ede-target-parent ,obj)
|
||||||
;; this to not need ede-load-project-file
|
|
||||||
;; but I'm not sure how to test well.
|
|
||||||
(ede-load-project-file (oref ,obj path))
|
|
||||||
,obj))
|
,obj))
|
||||||
(dbka (get-file-buffer (oref pf file))))
|
(dbka (get-file-buffer (oref pf file))))
|
||||||
(if (not dbka) (find-file (oref pf file))
|
(if (not dbka) (find-file (oref pf file))
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@
|
||||||
;; file name for a header in your project where most of your CPP
|
;; file name for a header in your project where most of your CPP
|
||||||
;; macros reside. Doing this can be easier than listing everything in
|
;; macros reside. Doing this can be easier than listing everything in
|
||||||
;; the :spp-table option. The files listed in :spp-files should not
|
;; the :spp-table option. The files listed in :spp-files should not
|
||||||
;; start with a /, and are relative to something in :include-path.;;
|
;; start with a /, and are relative to something in :include-path.
|
||||||
;;
|
;;
|
||||||
;; If you want to override the file-finding tool with your own
|
;; If you want to override the file-finding tool with your own
|
||||||
;; function you can do this:
|
;; function you can do this:
|
||||||
|
|
@ -135,7 +135,8 @@
|
||||||
;; :proj-file 'MY-FILE-FOR-DIR
|
;; :proj-file 'MY-FILE-FOR-DIR
|
||||||
;; :proj-root 'MY-ROOT-FCN
|
;; :proj-root 'MY-ROOT-FCN
|
||||||
;; :load-type 'MY-LOAD
|
;; :load-type 'MY-LOAD
|
||||||
;; :class-sym 'ede-cpp-root)
|
;; :class-sym 'ede-cpp-root-project
|
||||||
|
;; :safe-p t)
|
||||||
;; t)
|
;; t)
|
||||||
;;
|
;;
|
||||||
;;; TODO
|
;;; TODO
|
||||||
|
|
@ -238,16 +239,20 @@ ROOTPROJ is nil, since there is only one project."
|
||||||
(ede-cpp-root-file-existing dir))
|
(ede-cpp-root-file-existing dir))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(add-to-list 'ede-project-class-files
|
(ede-add-project-autoload
|
||||||
(ede-project-autoload "cpp-root"
|
(ede-project-autoload "cpp-root"
|
||||||
:name "CPP ROOT"
|
:name "CPP ROOT"
|
||||||
:file 'ede/cpp-root
|
:file 'ede-cpp-root
|
||||||
:proj-file 'ede-cpp-root-project-file-for-dir
|
:proj-file 'ede-cpp-root-project-file-for-dir
|
||||||
:proj-root 'ede-cpp-root-project-root
|
:proj-root 'ede-cpp-root-project-root
|
||||||
:load-type 'ede-cpp-root-load
|
:load-type 'ede-cpp-root-load
|
||||||
:class-sym 'ede-cpp-root
|
:class-sym 'ede-cpp-root
|
||||||
:new-p nil)
|
:new-p nil
|
||||||
t)
|
:safe-p t)
|
||||||
|
;; When a user creates one of these, it should override any other project
|
||||||
|
;; type that might happen to be in this directory, so force this to the
|
||||||
|
;; very front.
|
||||||
|
'unique)
|
||||||
|
|
||||||
;;; CLASSES
|
;;; CLASSES
|
||||||
;;
|
;;
|
||||||
|
|
@ -439,6 +444,7 @@ This knows details about or source tree."
|
||||||
;; Else, do the usual.
|
;; Else, do the usual.
|
||||||
(setq ans (call-next-method)))
|
(setq ans (call-next-method)))
|
||||||
)))
|
)))
|
||||||
|
;; TODO - does this call-next-method happen twice. Is that bad?? Why is it here?
|
||||||
(or ans (call-next-method))))
|
(or ans (call-next-method))))
|
||||||
|
|
||||||
(defmethod ede-project-root ((this ede-cpp-root-project))
|
(defmethod ede-project-root ((this ede-cpp-root-project))
|
||||||
|
|
@ -500,16 +506,16 @@ Also set up the lexical preprocessor map."
|
||||||
(table (when expfile
|
(table (when expfile
|
||||||
(semanticdb-file-table-object expfile)))
|
(semanticdb-file-table-object expfile)))
|
||||||
)
|
)
|
||||||
(when (not table)
|
(if (not table)
|
||||||
(message "Cannot find file %s in project." F))
|
(message "Cannot find file %s in project." F)
|
||||||
(when (and table (semanticdb-needs-refresh-p table))
|
(when (semanticdb-needs-refresh-p table)
|
||||||
(semanticdb-refresh-table table)
|
(semanticdb-refresh-table table))
|
||||||
(setq spp (append spp (oref table lexical-table))))))
|
(setq spp (append spp (oref table lexical-table))))))
|
||||||
(oref this spp-files))
|
(oref this spp-files))
|
||||||
spp))
|
spp))
|
||||||
|
|
||||||
(defmethod ede-system-include-path ((this ede-cpp-root-target))
|
(defmethod ede-system-include-path ((this ede-cpp-root-target))
|
||||||
"Get the system include path used by project THIS."
|
"Get the system include path used by target THIS."
|
||||||
(ede-system-include-path (ede-target-parent this)))
|
(ede-system-include-path (ede-target-parent this)))
|
||||||
|
|
||||||
(defmethod ede-preprocessor-map ((this ede-cpp-root-target))
|
(defmethod ede-preprocessor-map ((this ede-cpp-root-target))
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ negative, force off."
|
||||||
(setq ede-dired-minor-mode nil)
|
(setq ede-dired-minor-mode nil)
|
||||||
(error "Not in DIRED mode"))
|
(error "Not in DIRED mode"))
|
||||||
(unless (or (ede-directory-project-p default-directory)
|
(unless (or (ede-directory-project-p default-directory)
|
||||||
(interactive-p))
|
(called-interactively-p 'any))
|
||||||
(setq ede-dired-minor-mode nil)))
|
(setq ede-dired-minor-mode nil)))
|
||||||
|
|
||||||
(defun ede-dired-add-to-target (target)
|
(defun ede-dired-add-to-target (target)
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,17 @@ emacs_beta_version=\\([0-9]+\\)")
|
||||||
(match-string 2) "."
|
(match-string 2) "."
|
||||||
(match-string 3)))
|
(match-string 3)))
|
||||||
)
|
)
|
||||||
|
((file-exists-p "sxemacs.pc.in")
|
||||||
|
(setq emacs "SXEmacs")
|
||||||
|
(insert-file-contents "sxemacs_version.m4")
|
||||||
|
(goto-char (point-min))
|
||||||
|
(re-search-forward "m4_define(\\[SXEM4CS_MAJOR_VERSION\\], \\[\\([0-9]+\\)\\])
|
||||||
|
m4_define(\\[SXEM4CS_MINOR_VERSION\\], \\[\\([0-9]+\\)\\])
|
||||||
|
m4_define(\\[SXEM4CS_BETA_VERSION\\], \\[\\([0-9]+\\)\\])")
|
||||||
|
(setq ver (concat (match-string 1) "."
|
||||||
|
(match-string 2) "."
|
||||||
|
(match-string 3)))
|
||||||
|
)
|
||||||
;; Insert other Emacs here...
|
;; Insert other Emacs here...
|
||||||
|
|
||||||
;; Vaguely recent version of GNU Emacs?
|
;; Vaguely recent version of GNU Emacs?
|
||||||
|
|
@ -125,28 +136,29 @@ Argument DIR is the directory it is created for.
|
||||||
ROOTPROJ is nil, since there is only one project."
|
ROOTPROJ is nil, since there is only one project."
|
||||||
(or (ede-emacs-file-existing dir)
|
(or (ede-emacs-file-existing dir)
|
||||||
;; Doesn't already exist, so let's make one.
|
;; Doesn't already exist, so let's make one.
|
||||||
(let* ((vertuple (ede-emacs-version dir)))
|
(let* ((vertuple (ede-emacs-version dir))
|
||||||
(ede-emacs-project (car vertuple)
|
(proj (ede-emacs-project
|
||||||
|
(car vertuple)
|
||||||
:name (car vertuple)
|
:name (car vertuple)
|
||||||
:version (cdr vertuple)
|
:version (cdr vertuple)
|
||||||
:directory (file-name-as-directory dir)
|
:directory (file-name-as-directory dir)
|
||||||
:file (expand-file-name "src/emacs.c"
|
:file (expand-file-name "src/emacs.c"
|
||||||
dir)))
|
dir))))
|
||||||
(ede-add-project-to-global-list this)
|
(ede-add-project-to-global-list proj))))
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(add-to-list 'ede-project-class-files
|
(ede-add-project-autoload
|
||||||
(ede-project-autoload "emacs"
|
(ede-project-autoload "emacs"
|
||||||
:name "EMACS ROOT"
|
:name "EMACS ROOT"
|
||||||
:file 'ede/emacs
|
:file 'ede/emacs
|
||||||
:proj-file "src/emacs.c"
|
:proj-file "src/emacs.c"
|
||||||
|
:proj-root-dirmatch "emacs[^/]*"
|
||||||
:proj-root 'ede-emacs-project-root
|
:proj-root 'ede-emacs-project-root
|
||||||
:load-type 'ede-emacs-load
|
:load-type 'ede-emacs-load
|
||||||
:class-sym 'ede-emacs-project
|
:class-sym 'ede-emacs-project
|
||||||
:new-p nil)
|
:new-p nil
|
||||||
t)
|
:safe-p t)
|
||||||
|
'unique)
|
||||||
|
|
||||||
(defclass ede-emacs-target-c (ede-target)
|
(defclass ede-emacs-target-c (ede-target)
|
||||||
()
|
()
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,8 @@ the current EDE project."
|
||||||
(interactive)
|
(interactive)
|
||||||
(require 'ede/locate)
|
(require 'ede/locate)
|
||||||
(let* ((loc (ede-get-locator-object (ede-current-project))))
|
(let* ((loc (ede-get-locator-object (ede-current-project))))
|
||||||
(ede-locate-flush-hash loc)))
|
(when loc
|
||||||
|
(ede-locate-flush-hash loc))))
|
||||||
|
|
||||||
;;; Placeholders for ROOT directory scanning on base objects
|
;;; Placeholders for ROOT directory scanning on base objects
|
||||||
;;
|
;;
|
||||||
|
|
@ -110,7 +111,7 @@ of the anchor file for the project."
|
||||||
(when (not ans)
|
(when (not ans)
|
||||||
(if (equal (ede--project-inode SP) inode)
|
(if (equal (ede--project-inode SP) inode)
|
||||||
(setq ans SP)
|
(setq ans SP)
|
||||||
(ede-find-subproject-for-directory SP dir)))))
|
(setq ans (ede-find-subproject-for-directory SP dir))))))
|
||||||
ans)))
|
ans)))
|
||||||
|
|
||||||
;;; DIRECTORY IN OPEN PROJECT
|
;;; DIRECTORY IN OPEN PROJECT
|
||||||
|
|
@ -219,6 +220,18 @@ Does not check subprojects."
|
||||||
:test 'equal)
|
:test 'equal)
|
||||||
"A hash of directory names and associated EDE objects.")
|
"A hash of directory names and associated EDE objects.")
|
||||||
|
|
||||||
|
(defun ede-flush-directory-hash ()
|
||||||
|
"Flush the project directory hash.
|
||||||
|
Do this only when developing new projects that are incorrectly putting
|
||||||
|
'nomatch tokens into the hash."
|
||||||
|
(interactive)
|
||||||
|
(setq ede-project-directory-hash (make-hash-table :test 'equal))
|
||||||
|
;; Also slush the current project's locator hash.
|
||||||
|
(let ((loc (ede-get-locator-object ede-object)))
|
||||||
|
(when loc
|
||||||
|
(ede-locate-flush-hash loc)))
|
||||||
|
)
|
||||||
|
|
||||||
(defun ede-project-directory-remove-hash (dir)
|
(defun ede-project-directory-remove-hash (dir)
|
||||||
"Reset the directory hash for DIR.
|
"Reset the directory hash for DIR.
|
||||||
Do this whenever a new project is created, as opposed to loaded."
|
Do this whenever a new project is created, as opposed to loaded."
|
||||||
|
|
@ -368,10 +381,11 @@ Get it from the toplevel project. If it doesn't have one, make one."
|
||||||
;; Make sure we have a location object available for
|
;; Make sure we have a location object available for
|
||||||
;; caching values, and for locating things more robustly.
|
;; caching values, and for locating things more robustly.
|
||||||
(let ((top (ede-toplevel proj)))
|
(let ((top (ede-toplevel proj)))
|
||||||
|
(when top
|
||||||
(when (not (slot-boundp top 'locate-obj))
|
(when (not (slot-boundp top 'locate-obj))
|
||||||
(ede-enable-locate-on-project top))
|
(ede-enable-locate-on-project top))
|
||||||
(oref top locate-obj)
|
(oref top locate-obj)
|
||||||
))
|
)))
|
||||||
|
|
||||||
(defmethod ede-expand-filename ((this ede-project) filename &optional force)
|
(defmethod ede-expand-filename ((this ede-project) filename &optional force)
|
||||||
"Return a fully qualified file name based on project THIS.
|
"Return a fully qualified file name based on project THIS.
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,7 @@
|
||||||
|
|
||||||
(require 'eieio-opt)
|
(require 'eieio-opt)
|
||||||
(require 'ede)
|
(require 'ede)
|
||||||
|
(require 'ede/shell)
|
||||||
(require 'semantic/db)
|
(require 'semantic/db)
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
@ -105,6 +106,13 @@
|
||||||
:group (default build)
|
:group (default build)
|
||||||
:documentation
|
:documentation
|
||||||
"Command used for debugging this project.")
|
"Command used for debugging this project.")
|
||||||
|
(run-command :initarg :run-command
|
||||||
|
:initform nil
|
||||||
|
:type (or null string)
|
||||||
|
:custom string
|
||||||
|
:group (default build)
|
||||||
|
:documentation
|
||||||
|
"Command used to run something related to this project.")
|
||||||
;; C target customizations
|
;; C target customizations
|
||||||
(c-include-path :initarg :c-include-path
|
(c-include-path :initarg :c-include-path
|
||||||
:initform nil
|
:initform nil
|
||||||
|
|
@ -196,7 +204,7 @@ The class allocated value is replace by different sub classes.")
|
||||||
(oref proj :directory))))
|
(oref proj :directory))))
|
||||||
(if (file-exists-p fname)
|
(if (file-exists-p fname)
|
||||||
;; Load in the configuration
|
;; Load in the configuration
|
||||||
(setq config (eieio-persistent-read fname))
|
(setq config (eieio-persistent-read fname 'ede-generic-config))
|
||||||
;; Create a new one.
|
;; Create a new one.
|
||||||
(setq config (ede-generic-config
|
(setq config (ede-generic-config
|
||||||
"Configuration"
|
"Configuration"
|
||||||
|
|
@ -321,6 +329,44 @@ If one doesn't exist, create a new one for this directory."
|
||||||
(config (ede-generic-get-configuration proj)))
|
(config (ede-generic-get-configuration proj)))
|
||||||
(oref config c-include-path)))
|
(oref config c-include-path)))
|
||||||
|
|
||||||
|
;;; Commands
|
||||||
|
;;
|
||||||
|
(defmethod project-compile-project ((proj ede-generic-project) &optional command)
|
||||||
|
"Compile the entire current project PROJ.
|
||||||
|
Argument COMMAND is the command to use when compiling."
|
||||||
|
(let* ((config (ede-generic-get-configuration proj))
|
||||||
|
(comp (oref config :build-command)))
|
||||||
|
(compile comp)))
|
||||||
|
|
||||||
|
(defmethod project-compile-target ((obj ede-generic-target) &optional command)
|
||||||
|
"Compile the current target OBJ.
|
||||||
|
Argument COMMAND is the command to use for compiling the target."
|
||||||
|
(project-compile-project (ede-current-project) command))
|
||||||
|
|
||||||
|
(defmethod project-debug-target ((target ede-generic-target))
|
||||||
|
"Run the current project derived from TARGET in a debugger."
|
||||||
|
(let* ((proj (ede-target-parent target))
|
||||||
|
(config (ede-generic-get-configuration proj))
|
||||||
|
(debug (oref config :debug-command))
|
||||||
|
(cmd (read-from-minibuffer
|
||||||
|
"Debug Command: "
|
||||||
|
debug))
|
||||||
|
(cmdsplit (split-string cmd " " t))
|
||||||
|
;; @TODO - this depends on the user always typing in something good
|
||||||
|
;; like "gdb" or "dbx" which also exists as a useful Emacs command.
|
||||||
|
;; Is there a better way?
|
||||||
|
(cmdsym (intern-soft (car cmdsplit))))
|
||||||
|
(call-interactively cmdsym t)))
|
||||||
|
|
||||||
|
(defmethod project-run-target ((target ede-generic-target))
|
||||||
|
"Run the current project derived from TARGET."
|
||||||
|
(require 'ede-shell)
|
||||||
|
(let* ((proj (ede-target-parent target))
|
||||||
|
(config (ede-generic-get-configuration proj))
|
||||||
|
(run (concat "./" (oref config :run-command)))
|
||||||
|
(cmd (read-from-minibuffer "Run (like this): " run)))
|
||||||
|
(ede-shell-run-something target cmd)))
|
||||||
|
|
||||||
;;; Customization
|
;;; Customization
|
||||||
;;
|
;;
|
||||||
(defmethod ede-customize ((proj ede-generic-project))
|
(defmethod ede-customize ((proj ede-generic-project))
|
||||||
|
|
@ -365,27 +411,31 @@ PROJECTFILE is a file name that identifies a project of this type to EDE, such a
|
||||||
a Makefile, or SConstruct file.
|
a Makefile, or SConstruct file.
|
||||||
CLASS is the EIEIO class that is used to track this project. It should subclass
|
CLASS is the EIEIO class that is used to track this project. It should subclass
|
||||||
the class `ede-generic-project' project."
|
the class `ede-generic-project' project."
|
||||||
(add-to-list 'ede-project-class-files
|
(ede-add-project-autoload
|
||||||
(ede-project-autoload internal-name
|
(ede-project-autoload internal-name
|
||||||
:name external-name
|
:name external-name
|
||||||
:file 'ede/generic
|
:file 'ede/generic
|
||||||
:proj-file projectfile
|
:proj-file projectfile
|
||||||
:load-type 'ede-generic-load
|
:load-type 'ede-generic-load
|
||||||
:class-sym class
|
:class-sym class
|
||||||
:new-p nil)
|
:new-p nil
|
||||||
|
:safe-p nil) ; @todo - could be
|
||||||
|
; safe if we do something
|
||||||
|
; about the loading of the
|
||||||
|
; generic config file.
|
||||||
;; Generics must go at the end, since more specific types
|
;; Generics must go at the end, since more specific types
|
||||||
;; can create Makefiles also.
|
;; can create Makefiles also.
|
||||||
t))
|
'generic))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun ede-enable-generic-projects ()
|
(defun ede-enable-generic-projects ()
|
||||||
"Enable generic project loaders."
|
"Enable generic project loaders."
|
||||||
(interactive)
|
(interactive)
|
||||||
(ede-generic-new-autoloader "edeproject-makefile" "Make"
|
(ede-generic-new-autoloader "generic-makefile" "Make"
|
||||||
"Makefile" 'ede-generic-makefile-project)
|
"Makefile" 'ede-generic-makefile-project)
|
||||||
(ede-generic-new-autoloader "edeproject-scons" "SCons"
|
(ede-generic-new-autoloader "generic-scons" "SCons"
|
||||||
"SConstruct" 'ede-generic-scons-project)
|
"SConstruct" 'ede-generic-scons-project)
|
||||||
(ede-generic-new-autoloader "edeproject-cmake" "CMake"
|
(ede-generic-new-autoloader "generic-cmake" "CMake"
|
||||||
"CMakeLists" 'ede-generic-cmake-project)
|
"CMakeLists" 'ede-generic-cmake-project)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,11 +33,29 @@
|
||||||
;; * Add website
|
;; * Add website
|
||||||
|
|
||||||
(require 'ede)
|
(require 'ede)
|
||||||
|
(require 'ede/make)
|
||||||
|
|
||||||
(declare-function semanticdb-file-table-object "semantic/db")
|
(declare-function semanticdb-file-table-object "semantic/db")
|
||||||
(declare-function semanticdb-needs-refresh-p "semantic/db")
|
(declare-function semanticdb-needs-refresh-p "semantic/db")
|
||||||
(declare-function semanticdb-refresh-table "semantic/db")
|
(declare-function semanticdb-refresh-table "semantic/db")
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
(defgroup project-linux nil
|
||||||
|
"File and tag browser frame."
|
||||||
|
:group 'tools
|
||||||
|
:group 'ede
|
||||||
|
)
|
||||||
|
|
||||||
|
(defcustom project-linux-compile-target-command (concat ede-make-command " -k -C %s SUBDIRS=%s")
|
||||||
|
"*Default command used to compile a target."
|
||||||
|
:group 'project-linux
|
||||||
|
:type 'string)
|
||||||
|
|
||||||
|
(defcustom project-linux-compile-project-command (concat ede-make-command " -k -C %s")
|
||||||
|
"*Default command used to compile a project."
|
||||||
|
:group 'project-linux
|
||||||
|
:type 'string)
|
||||||
|
|
||||||
(defvar ede-linux-project-list nil
|
(defvar ede-linux-project-list nil
|
||||||
"List of projects created by option `ede-linux-project'.")
|
"List of projects created by option `ede-linux-project'.")
|
||||||
|
|
||||||
|
|
@ -95,6 +113,7 @@ DIR is the directory to search from."
|
||||||
"Project Type for the Linux source code."
|
"Project Type for the Linux source code."
|
||||||
:method-invocation-order :depth-first)
|
:method-invocation-order :depth-first)
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
(defun ede-linux-load (dir &optional rootproj)
|
(defun ede-linux-load (dir &optional rootproj)
|
||||||
"Return an Linux Project object if there is a match.
|
"Return an Linux Project object if there is a match.
|
||||||
Return nil if there isn't one.
|
Return nil if there isn't one.
|
||||||
|
|
@ -102,27 +121,29 @@ Argument DIR is the directory it is created for.
|
||||||
ROOTPROJ is nil, since there is only one project."
|
ROOTPROJ is nil, since there is only one project."
|
||||||
(or (ede-linux-file-existing dir)
|
(or (ede-linux-file-existing dir)
|
||||||
;; Doesn't already exist, so let's make one.
|
;; Doesn't already exist, so let's make one.
|
||||||
(ede-linux-project "Linux"
|
(let ((proj (ede-linux-project
|
||||||
|
"Linux"
|
||||||
:name "Linux"
|
:name "Linux"
|
||||||
:version (ede-linux-version dir)
|
:version (ede-linux-version dir)
|
||||||
:directory (file-name-as-directory dir)
|
:directory (file-name-as-directory dir)
|
||||||
:file (expand-file-name "scripts/ver_linux"
|
:file (expand-file-name "scripts/ver_linux"
|
||||||
dir))
|
dir))))
|
||||||
(ede-add-project-to-global-list this)
|
(ede-add-project-to-global-list proj))
|
||||||
)
|
))
|
||||||
)
|
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(add-to-list 'ede-project-class-files
|
(ede-add-project-autoload
|
||||||
(ede-project-autoload "linux"
|
(ede-project-autoload "linux"
|
||||||
:name "LINUX ROOT"
|
:name "LINUX ROOT"
|
||||||
:file 'ede/linux
|
:file 'ede/linux
|
||||||
:proj-file "scripts/ver_linux"
|
:proj-file "scripts/ver_linux"
|
||||||
|
:proj-root-dirmatch "linux[^/]*"
|
||||||
:proj-root 'ede-linux-project-root
|
:proj-root 'ede-linux-project-root
|
||||||
:load-type 'ede-linux-load
|
:load-type 'ede-linux-load
|
||||||
:class-sym 'ede-linux-project
|
:class-sym 'ede-linux-project
|
||||||
:new-p nil)
|
:new-p nil
|
||||||
t)
|
:safe-p t)
|
||||||
|
'unique)
|
||||||
|
|
||||||
(defclass ede-linux-target-c (ede-target)
|
(defclass ede-linux-target-c (ede-target)
|
||||||
()
|
()
|
||||||
|
|
@ -238,6 +259,42 @@ Knows about how the Linux source tree is organized."
|
||||||
)
|
)
|
||||||
(or F (call-next-method))))
|
(or F (call-next-method))))
|
||||||
|
|
||||||
|
(defmethod project-compile-project ((proj ede-linux-project)
|
||||||
|
&optional command)
|
||||||
|
"Compile the entire current project.
|
||||||
|
Argument COMMAND is the command to use when compiling."
|
||||||
|
(let* ((dir (ede-project-root-directory proj)))
|
||||||
|
|
||||||
|
(require 'compile)
|
||||||
|
(if (not project-linux-compile-project-command)
|
||||||
|
(setq project-linux-compile-project-command compile-command))
|
||||||
|
(if (not command)
|
||||||
|
(setq command
|
||||||
|
(format
|
||||||
|
project-linux-compile-project-command
|
||||||
|
dir)))
|
||||||
|
|
||||||
|
(compile command)))
|
||||||
|
|
||||||
|
(defmethod project-compile-target ((obj ede-linux-target-c) &optional command)
|
||||||
|
"Compile the current target.
|
||||||
|
Argument COMMAND is the command to use for compiling the target."
|
||||||
|
(let* ((proj (ede-target-parent obj))
|
||||||
|
(root (ede-project-root proj))
|
||||||
|
(dir (ede-project-root-directory root))
|
||||||
|
(subdir (oref obj path)))
|
||||||
|
|
||||||
|
(require 'compile)
|
||||||
|
(if (not project-linux-compile-project-command)
|
||||||
|
(setq project-linux-compile-project-command compile-command))
|
||||||
|
(if (not command)
|
||||||
|
(setq command
|
||||||
|
(format
|
||||||
|
project-linux-compile-target-command
|
||||||
|
dir subdir)))
|
||||||
|
|
||||||
|
(compile command)))
|
||||||
|
|
||||||
(provide 'ede/linux)
|
(provide 'ede/linux)
|
||||||
|
|
||||||
;; Local variables:
|
;; Local variables:
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,8 @@ STOP-BEFORE is a regular expression matching a file name."
|
||||||
"Return a list of all files in MACRO."
|
"Return a list of all files in MACRO."
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(let ((lst nil))
|
(let ((lst nil)
|
||||||
|
(case-fold-search nil))
|
||||||
(while (makefile-move-to-macro macro t)
|
(while (makefile-move-to-macro macro t)
|
||||||
(let ((e (save-excursion
|
(let ((e (save-excursion
|
||||||
(makefile-end-of-command)
|
(makefile-end-of-command)
|
||||||
|
|
|
||||||
|
|
@ -265,12 +265,13 @@ Execute BODY in a location where a value can be placed."
|
||||||
"Add VARNAME into the current Makefile if it doesn't exist.
|
"Add VARNAME into the current Makefile if it doesn't exist.
|
||||||
Execute BODY in a location where a value can be placed."
|
Execute BODY in a location where a value can be placed."
|
||||||
`(let ((addcr t) (v ,varname))
|
`(let ((addcr t) (v ,varname))
|
||||||
(unless (re-search-backward (concat "^" v "\\s-*=") nil t)
|
(unless
|
||||||
|
(save-excursion
|
||||||
|
(re-search-backward (concat "^" v "\\s-*=") nil t))
|
||||||
(insert v "=")
|
(insert v "=")
|
||||||
,@body
|
,@body
|
||||||
(if addcr (insert "\n"))
|
(when addcr (insert "\n"))
|
||||||
(goto-char (point-max)))
|
(goto-char (point-max)))))
|
||||||
))
|
|
||||||
(put 'ede-pmake-insert-variable-once 'lisp-indent-function 1)
|
(put 'ede-pmake-insert-variable-once 'lisp-indent-function 1)
|
||||||
|
|
||||||
;;; SOURCE VARIABLE NAME CONSTRUCTION
|
;;; SOURCE VARIABLE NAME CONSTRUCTION
|
||||||
|
|
|
||||||
|
|
@ -319,7 +319,7 @@ Not all compilers do this."
|
||||||
|
|
||||||
(defmethod ede-proj-makefile-insert-rules ((this ede-makefile-rule))
|
(defmethod ede-proj-makefile-insert-rules ((this ede-makefile-rule))
|
||||||
"Insert rules needed for THIS rule object."
|
"Insert rules needed for THIS rule object."
|
||||||
(if (oref this phony) (insert ".PHONY: (oref this target)\n"))
|
(if (oref this phony) (insert ".PHONY: " (oref this target) "\n"))
|
||||||
(insert (oref this target) ": " (oref this dependencies) "\n\t"
|
(insert (oref this target) ": " (oref this dependencies) "\n\t"
|
||||||
(mapconcat (lambda (c) c) (oref this rules) "\n\t")
|
(mapconcat (lambda (c) c) (oref this rules) "\n\t")
|
||||||
"\n\n"))
|
"\n\n"))
|
||||||
|
|
@ -331,7 +331,8 @@ compiler it decides to use after inserting in the rule."
|
||||||
(when (slot-boundp this 'commands)
|
(when (slot-boundp this 'commands)
|
||||||
(with-slots (commands) this
|
(with-slots (commands) this
|
||||||
(mapc
|
(mapc
|
||||||
(lambda (obj) (insert "\t"
|
(lambda (obj) (insert
|
||||||
|
(if (bolp) "\t" " ")
|
||||||
(cond ((stringp obj)
|
(cond ((stringp obj)
|
||||||
obj)
|
obj)
|
||||||
((and (listp obj)
|
((and (listp obj)
|
||||||
|
|
|
||||||
|
|
@ -45,10 +45,37 @@
|
||||||
There should only be one toplevel package per auxiliary tool needed.
|
There should only be one toplevel package per auxiliary tool needed.
|
||||||
These packages location is found, and added to the compile time
|
These packages location is found, and added to the compile time
|
||||||
load path."
|
load path."
|
||||||
))
|
)
|
||||||
|
(pre-load-packages :initarg :pre-load-packages
|
||||||
|
:initform nil
|
||||||
|
:type list
|
||||||
|
:custom (repeat string)
|
||||||
|
:documentation "Additional packages to pre-load.
|
||||||
|
Each package name will be loaded with `require'.
|
||||||
|
Each package's directory should also appear in :aux-packages via a package name.")
|
||||||
|
)
|
||||||
"This target consists of a group of lisp files.
|
"This target consists of a group of lisp files.
|
||||||
A lisp target may be one general program with many separate lisp files in it.")
|
A lisp target may be one general program with many separate lisp files in it.")
|
||||||
|
|
||||||
|
(defmethod ede-proj-makefile-insert-rules :after ((this ede-proj-target-elisp))
|
||||||
|
"Insert rules needed by THIS target.
|
||||||
|
This inserts the PRELOADS target-local variable."
|
||||||
|
(let ((preloads (oref this pre-load-packages)))
|
||||||
|
(when preloads
|
||||||
|
(insert (format "%s: PRELOADS=%s\n"
|
||||||
|
(oref this name)
|
||||||
|
(mapconcat 'identity preloads " ")))))
|
||||||
|
(insert "\n"))
|
||||||
|
|
||||||
|
(defmethod ede-proj-makefile-dependencies ((this ede-proj-target-elisp))
|
||||||
|
"Return a string representing the dependencies for THIS.
|
||||||
|
Some compilers only use the first element in the dependencies, others
|
||||||
|
have a list of intermediates (object files), and others don't care.
|
||||||
|
This allows customization of how these elements appear.
|
||||||
|
For Emacs Lisp, return addsuffix command on source files."
|
||||||
|
(format "$(addsuffix c, $(%s))"
|
||||||
|
(ede-proj-makefile-sourcevar this)))
|
||||||
|
|
||||||
(defvar ede-source-emacs
|
(defvar ede-source-emacs
|
||||||
(ede-sourcecode "ede-emacs-source"
|
(ede-sourcecode "ede-emacs-source"
|
||||||
:name "Emacs Lisp"
|
:name "Emacs Lisp"
|
||||||
|
|
@ -61,18 +88,17 @@ A lisp target may be one general program with many separate lisp files in it.")
|
||||||
"ede-emacs-compiler"
|
"ede-emacs-compiler"
|
||||||
:name "emacs"
|
:name "emacs"
|
||||||
:variables '(("EMACS" . "emacs")
|
:variables '(("EMACS" . "emacs")
|
||||||
("EMACSFLAGS" . "-batch --no-site-file"))
|
("EMACSFLAGS" . "-batch --no-site-file --eval '(setq debug-on-error t)'")
|
||||||
:commands
|
("require" . "$(foreach r,$(1),(require (quote $(r))))"))
|
||||||
'("@echo \"(add-to-list 'load-path nil)\" > $@-compile-script"
|
:rules (list (ede-makefile-rule
|
||||||
"for loadpath in . ${LOADPATH}; do \\"
|
"elisp-inference-rule"
|
||||||
" echo \"(add-to-list 'load-path \\\"$$loadpath\\\")\" >> $@-compile-script; \\"
|
:target "%.elc"
|
||||||
"done;"
|
:dependencies "%.el"
|
||||||
"@echo \"(setq debug-on-error t)\" >> $@-compile-script"
|
:rules '("$(EMACS) $(EMACSFLAGS) $(addprefix -L ,$(LOADPATH)) \
|
||||||
"\"$(EMACS)\" $(EMACSFLAGS) -l $@-compile-script -f batch-byte-compile $^"
|
--eval '(progn $(call require, $(PRELOADS)))' -f batch-byte-compile $^")))
|
||||||
)
|
|
||||||
:autoconf '("AM_PATH_LISPDIR")
|
:autoconf '("AM_PATH_LISPDIR")
|
||||||
:sourcetype '(ede-source-emacs)
|
:sourcetype '(ede-source-emacs)
|
||||||
; :objectextention ".elc"
|
:objectextention ".elc"
|
||||||
)
|
)
|
||||||
"Compile Emacs Lisp programs.")
|
"Compile Emacs Lisp programs.")
|
||||||
|
|
||||||
|
|
@ -112,7 +138,7 @@ Lays claim to all .elc files that match .el files in this target."
|
||||||
(full nil)
|
(full nil)
|
||||||
)
|
)
|
||||||
;; Make sure the relative name isn't to far off
|
;; Make sure the relative name isn't to far off
|
||||||
(when (string-match "^\\.\\./\\.\\./\\.\\./\\.\\." rel)
|
(when (string-match "^\\.\\./\\.\\./\\.\\./\\.\\./\\.\\." rel)
|
||||||
(setq full fnd))
|
(setq full fnd))
|
||||||
;; Do the setup.
|
;; Do the setup.
|
||||||
(setq paths (cons (or full rel) paths)
|
(setq paths (cons (or full rel) paths)
|
||||||
|
|
@ -129,9 +155,20 @@ Bonus: Return a cons cell: (COMPILED . UPTODATE)."
|
||||||
(mapc (lambda (src)
|
(mapc (lambda (src)
|
||||||
(let* ((fsrc (expand-file-name src dir))
|
(let* ((fsrc (expand-file-name src dir))
|
||||||
(elc (concat (file-name-sans-extension fsrc) ".elc")))
|
(elc (concat (file-name-sans-extension fsrc) ".elc")))
|
||||||
|
(with-no-warnings
|
||||||
|
(if (< emacs-major-version 24)
|
||||||
|
;; Does not have `byte-recompile-file'
|
||||||
|
(if (or (not (file-exists-p elc))
|
||||||
|
(file-newer-than-file-p fsrc elc))
|
||||||
|
(progn
|
||||||
|
(setq comp (1+ comp))
|
||||||
|
(byte-compile-file fsrc))
|
||||||
|
(setq utd (1+ utd)))
|
||||||
|
|
||||||
(if (eq (byte-recompile-file fsrc nil 0) t)
|
(if (eq (byte-recompile-file fsrc nil 0) t)
|
||||||
(setq comp (1+ comp))
|
(setq comp (1+ comp))
|
||||||
(setq utd (1+ utd)))))
|
(setq utd (1+ utd)))))))
|
||||||
|
|
||||||
(oref obj source))
|
(oref obj source))
|
||||||
(message "All Emacs Lisp sources are up to date in %s" (object-name obj))
|
(message "All Emacs Lisp sources are up to date in %s" (object-name obj))
|
||||||
(cons comp utd)))
|
(cons comp utd)))
|
||||||
|
|
@ -185,8 +222,7 @@ is found, such as a `-version' variable, or the standard header."
|
||||||
"Insert variables needed by target THIS."
|
"Insert variables needed by target THIS."
|
||||||
(let ((newitems (if (oref this aux-packages)
|
(let ((newitems (if (oref this aux-packages)
|
||||||
(ede-proj-elisp-packages-to-loadpath
|
(ede-proj-elisp-packages-to-loadpath
|
||||||
(oref this aux-packages))))
|
(oref this aux-packages)))))
|
||||||
)
|
|
||||||
(ede-proj-makefile-insert-loadpath-items newitems)))
|
(ede-proj-makefile-insert-loadpath-items newitems)))
|
||||||
|
|
||||||
(defun ede-proj-elisp-add-path (path)
|
(defun ede-proj-elisp-add-path (path)
|
||||||
|
|
@ -211,7 +247,8 @@ is found, such as a `-version' variable, or the standard header."
|
||||||
"Tweak the configure file (current buffer) to accommodate THIS."
|
"Tweak the configure file (current buffer) to accommodate THIS."
|
||||||
(call-next-method)
|
(call-next-method)
|
||||||
;; Ok, now we have to tweak the autoconf provided `elisp-comp' program.
|
;; Ok, now we have to tweak the autoconf provided `elisp-comp' program.
|
||||||
(let ((ec (ede-expand-filename this "elisp-comp" 'newfile)))
|
(let ((ec (ede-expand-filename this "elisp-comp" 'newfile))
|
||||||
|
(enable-local-variables nil))
|
||||||
(if (or (not ec) (not (file-exists-p ec)))
|
(if (or (not ec) (not (file-exists-p ec)))
|
||||||
(message "No elisp-comp file. There may be compile errors? Rerun a second time.")
|
(message "No elisp-comp file. There may be compile errors? Rerun a second time.")
|
||||||
(save-excursion
|
(save-excursion
|
||||||
|
|
@ -235,7 +272,7 @@ is found, such as a `-version' variable, or the standard header."
|
||||||
"Flush the configure file (current buffer) to accommodate THIS."
|
"Flush the configure file (current buffer) to accommodate THIS."
|
||||||
;; Remove crufty old paths from elisp-compile
|
;; Remove crufty old paths from elisp-compile
|
||||||
(let ((ec (ede-expand-filename this "elisp-comp" 'newfile))
|
(let ((ec (ede-expand-filename this "elisp-comp" 'newfile))
|
||||||
)
|
(enable-local-variables nil))
|
||||||
(if (and ec (file-exists-p ec))
|
(if (and ec (file-exists-p ec))
|
||||||
(with-current-buffer (find-file-noselect ec t)
|
(with-current-buffer (find-file-noselect ec t)
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
|
|
@ -251,8 +288,8 @@ is found, such as a `-version' variable, or the standard header."
|
||||||
;;
|
;;
|
||||||
(defclass ede-proj-target-elisp-autoloads (ede-proj-target-elisp)
|
(defclass ede-proj-target-elisp-autoloads (ede-proj-target-elisp)
|
||||||
((availablecompilers :initform '(ede-emacs-cedet-autogen-compiler))
|
((availablecompilers :initform '(ede-emacs-cedet-autogen-compiler))
|
||||||
(aux-packages :initform ("cedet-autogen"))
|
|
||||||
(phony :initform t)
|
(phony :initform t)
|
||||||
|
(rules :initform nil)
|
||||||
(autoload-file :initarg :autoload-file
|
(autoload-file :initarg :autoload-file
|
||||||
:initform "loaddefs.el"
|
:initform "loaddefs.el"
|
||||||
:type string
|
:type string
|
||||||
|
|
@ -287,15 +324,14 @@ Lays claim to all .elc files that match .el files in this target."
|
||||||
(ede-compiler
|
(ede-compiler
|
||||||
"ede-emacs-autogen-compiler"
|
"ede-emacs-autogen-compiler"
|
||||||
:name "emacs"
|
:name "emacs"
|
||||||
:variables '(("EMACS" . "emacs"))
|
:variables '(("EMACS" . "emacs")
|
||||||
|
("EMACSFLAGS" . "-batch --no-site-file --eval '(setq debug-on-error t)'")
|
||||||
|
("require" . "$(foreach r,$(1),(require (quote $(r))))"))
|
||||||
:commands
|
:commands
|
||||||
'("@echo \"(add-to-list 'load-path nil)\" > $@-compile-script"
|
'("$(EMACS) $(EMACSFLAGS) $(addprefix -L ,$(LOADPATH)) \
|
||||||
"for loadpath in . ${LOADPATH}; do \\"
|
--eval '(setq generated-autoload-file \"$(abspath $(LOADDEFS))\")' \
|
||||||
" echo \"(add-to-list 'load-path \\\"$$loadpath\\\")\" >> $@-compile-script; \\"
|
-f batch-update-autoloads $(abspath $(LOADDIRS))")
|
||||||
"done;"
|
:rules (list (ede-makefile-rule "clean-autoloads" :target "clean-autoloads" :phony t :rules '("rm -f $(LOADDEFS)")))
|
||||||
"@echo \"(require 'cedet-autogen)\" >> $@-compile-script"
|
|
||||||
"\"$(EMACS)\" -batch --no-site-file -l $@-compile-script -f cedet-batch-update-autoloads $(LOADDEFS) $(LOADDIRS)"
|
|
||||||
)
|
|
||||||
:sourcetype '(ede-source-emacs)
|
:sourcetype '(ede-source-emacs)
|
||||||
)
|
)
|
||||||
"Build an autoloads file.")
|
"Build an autoloads file.")
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,39 @@
|
||||||
(autoload 'ede-proj-target-makefile-info "ede/proj-info"
|
(autoload 'ede-proj-target-makefile-info "ede/proj-info"
|
||||||
"Target class for info files." nil nil)
|
"Target class for info files." nil nil)
|
||||||
|
|
||||||
|
(eieio-defclass-autoload 'ede-proj-target-aux '(ede-proj-target)
|
||||||
|
"ede/proj-aux"
|
||||||
|
"Target class for a group of lisp files.")
|
||||||
|
(eieio-defclass-autoload 'ede-proj-target-elisp '(ede-proj-target-makefile)
|
||||||
|
"ede/proj-elisp"
|
||||||
|
"Target class for a group of lisp files.")
|
||||||
|
(eieio-defclass-autoload 'ede-proj-target-elisp-autoloads '(ede-proj-target-elisp)
|
||||||
|
"ede/proj-elisp"
|
||||||
|
"Target class for generating autoload files.")
|
||||||
|
(eieio-defclass-autoload 'ede-proj-target-scheme '(ede-proj-target)
|
||||||
|
"ede/proj-scheme"
|
||||||
|
"Target class for a group of lisp files.")
|
||||||
|
(eieio-defclass-autoload 'ede-proj-target-makefile-miscelaneous '(ede-proj-target-makefile)
|
||||||
|
"ede/proj-misc"
|
||||||
|
"Target class for a group of miscellaneous w/ a special makefile.")
|
||||||
|
(eieio-defclass-autoload 'ede-proj-target-makefile-program '(ede-proj-target-makefile-objectcode)
|
||||||
|
"ede/proj-prog"
|
||||||
|
"Target class for building a program.")
|
||||||
|
(eieio-defclass-autoload 'ede-proj-target-makefile-archive '(ede-proj-target-makefile-objectcode)
|
||||||
|
"ede/proj-archive"
|
||||||
|
"Target class for building an archive of object code.")
|
||||||
|
(eieio-defclass-autoload 'ede-proj-target-makefile-shared-object '(ede-proj-target-makefile-program)
|
||||||
|
"ede/proj-shared"
|
||||||
|
"Target class for building a shared object.")
|
||||||
|
(eieio-defclass-autoload 'ede-proj-target-makefile-info '(ede-proj-target-makefile)
|
||||||
|
"ede/proj-info"
|
||||||
|
"Target class for info files.")
|
||||||
|
|
||||||
|
;; Not in ede/ , but part of semantic.
|
||||||
|
(eieio-defclass-autoload 'semantic-ede-proj-target-grammar '(ede-proj-target-elisp)
|
||||||
|
"semantic/ede-grammar"
|
||||||
|
"Target classfor Semantic grammar files.")
|
||||||
|
|
||||||
;;; Class Definitions:
|
;;; Class Definitions:
|
||||||
(defclass ede-proj-target (ede-target)
|
(defclass ede-proj-target (ede-target)
|
||||||
((auxsource :initarg :auxsource
|
((auxsource :initarg :auxsource
|
||||||
|
|
@ -181,8 +214,10 @@ This enables the creation of your target type."
|
||||||
(setq ede-proj-target-alist
|
(setq ede-proj-target-alist
|
||||||
(cons (cons name class) ede-proj-target-alist)))))
|
(cons (cons name class) ede-proj-target-alist)))))
|
||||||
|
|
||||||
(defclass ede-proj-project (ede-project)
|
(defclass ede-proj-project (eieio-persistent ede-project)
|
||||||
((makefile-type :initarg :makefile-type
|
((extension :initform ".ede")
|
||||||
|
(file-header-line :initform ";; EDE Project Files are auto generated: Do Not Edit")
|
||||||
|
(makefile-type :initarg :makefile-type
|
||||||
:initform Makefile
|
:initform Makefile
|
||||||
:type symbol
|
:type symbol
|
||||||
:custom (choice (const Makefile)
|
:custom (choice (const Makefile)
|
||||||
|
|
@ -259,23 +294,16 @@ If optional ROOTPROJ is provided then ROOTPROJ is the root project
|
||||||
for the tree being read in. If ROOTPROJ is nil, then assume that
|
for the tree being read in. If ROOTPROJ is nil, then assume that
|
||||||
the PROJECT being read in is the root project."
|
the PROJECT being read in is the root project."
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(let ((ret nil)
|
(let ((ret (eieio-persistent-read (concat project "Project.ede")
|
||||||
|
ede-proj-project))
|
||||||
(subdirs (directory-files project nil "[^.].*" nil)))
|
(subdirs (directory-files project nil "[^.].*" nil)))
|
||||||
(set-buffer (get-buffer-create " *tmp proj read*"))
|
(if (not (object-of-class-p ret 'ede-proj-project))
|
||||||
(unwind-protect
|
|
||||||
(progn
|
|
||||||
(insert-file-contents (concat project "Project.ede")
|
|
||||||
nil nil nil t)
|
|
||||||
(goto-char (point-min))
|
|
||||||
(setq ret (read (current-buffer)))
|
|
||||||
(if (not (eq (car ret) 'ede-proj-project))
|
|
||||||
(error "Corrupt project file"))
|
(error "Corrupt project file"))
|
||||||
(setq ret (eval ret))
|
|
||||||
(oset ret file (concat project "Project.ede"))
|
|
||||||
(oset ret directory project)
|
(oset ret directory project)
|
||||||
(oset ret rootproject rootproj)
|
(oset ret rootproject rootproj)
|
||||||
)
|
|
||||||
(kill-buffer " *tmp proj read*"))
|
;; Load the project file of each subdirectory containing a
|
||||||
|
;; loadable Project.ede.
|
||||||
(while subdirs
|
(while subdirs
|
||||||
(let ((sd (file-name-as-directory
|
(let ((sd (file-name-as-directory
|
||||||
(expand-file-name (car subdirs) project))))
|
(expand-file-name (car subdirs) project))))
|
||||||
|
|
@ -291,22 +319,13 @@ the PROJECT being read in is the root project."
|
||||||
"Write out object PROJECT into its file."
|
"Write out object PROJECT into its file."
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(if (not project) (setq project (ede-current-project)))
|
(if (not project) (setq project (ede-current-project)))
|
||||||
(let ((b (set-buffer (get-buffer-create " *tmp proj write*")))
|
(let ((cdir (oref project directory)))
|
||||||
(cfn (oref project file))
|
|
||||||
(cdir (oref project directory)))
|
|
||||||
(unwind-protect
|
(unwind-protect
|
||||||
(save-excursion
|
(progn
|
||||||
(erase-buffer)
|
|
||||||
(let ((standard-output (current-buffer)))
|
|
||||||
(oset project file (file-name-nondirectory cfn))
|
|
||||||
(slot-makeunbound project :directory)
|
(slot-makeunbound project :directory)
|
||||||
(object-write project ";; EDE project file."))
|
(eieio-persistent-save project))
|
||||||
(write-file cfn nil)
|
;; Restore the directory slot
|
||||||
)
|
(oset project directory cdir))) ))
|
||||||
;; Restore the :file on exit.
|
|
||||||
(oset project file cfn)
|
|
||||||
(oset project directory cdir)
|
|
||||||
(kill-buffer b)))))
|
|
||||||
|
|
||||||
(defmethod ede-commit-local-variables ((proj ede-proj-project))
|
(defmethod ede-commit-local-variables ((proj ede-proj-project))
|
||||||
"Commit change to local variables in PROJ."
|
"Commit change to local variables in PROJ."
|
||||||
|
|
@ -670,6 +689,8 @@ Optional argument FORCE will force items to be regenerated."
|
||||||
(let ((root (or (ede-project-root this) this))
|
(let ((root (or (ede-project-root this) this))
|
||||||
)
|
)
|
||||||
(setq ede-projects (delq root ede-projects))
|
(setq ede-projects (delq root ede-projects))
|
||||||
|
;; NOTE : parent function double-checks that this dir was
|
||||||
|
;; already in memory once.
|
||||||
(ede-load-project-file (ede-project-root-directory root))
|
(ede-load-project-file (ede-project-root-directory root))
|
||||||
))
|
))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -205,7 +205,7 @@ OT is the object target. DIR is the directory to start in."
|
||||||
(oref amf targets))
|
(oref amf targets))
|
||||||
nil t))))
|
nil t))))
|
||||||
;; The input target might be new. See if we can find it.
|
;; The input target might be new. See if we can find it.
|
||||||
(amf (ede-load-project-file (oref ot path)))
|
(amf (ede-target-parent ot))
|
||||||
(ot (object-assoc target 'name (oref amf targets)))
|
(ot (object-assoc target 'name (oref amf targets)))
|
||||||
(ofn (file-name-nondirectory (buffer-file-name))))
|
(ofn (file-name-nondirectory (buffer-file-name))))
|
||||||
(if (not ot)
|
(if (not ot)
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ their sources to VERSION."
|
||||||
If BUFFER isn't specified, use the current buffer."
|
If BUFFER isn't specified, use the current buffer."
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(if buffer (set-buffer buffer))
|
(if buffer (set-buffer buffer))
|
||||||
(toggle-read-only -1)))
|
(setq buffer-read-only nil)))
|
||||||
|
|
||||||
(provide 'ede/util)
|
(provide 'ede/util)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -79,15 +79,20 @@
|
||||||
|
|
||||||
(defconst inversion-decoders
|
(defconst inversion-decoders
|
||||||
'(
|
'(
|
||||||
(alpha "^\\([0-9]+\\)\\.\\([0-9]+\\)\\s-*\\.?alpha\\([0-9]+\\)?$" 3)
|
(alpha "^\\([0-9]+\\)\\.\\([0-9]+\\)\\.?\\([0-9]*\\)?\\s-*\\.?alpha\\([0-9]+\\)?$" 4)
|
||||||
(beta "^\\([0-9]+\\)\\.\\([0-9]+\\)\\s-*\\.?beta\\([0-9]+\\)?$" 3)
|
(beta "^\\([0-9]+\\)\\.\\([0-9]+\\)\\.?\\([0-9]*\\)?\\s-*\\.?beta\\([0-9]+\\)?$" 4)
|
||||||
(beta "^\\([0-9]+\\)\\.\\([0-9]+\\)\\s-*(beta\\([0-9]+\\)?)" 3)
|
(beta "^\\([0-9]+\\)\\.\\([0-9]+\\)\\.?\\([0-9]*\\)?\\s-*\\.?(beta\\([0-9]+\\)?)$" 4)
|
||||||
|
(beta "^[^/]+/\\w+--\\w+--\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)--patch-\\([0-9]+\\)" 4)
|
||||||
|
(beta "^\\w+: v\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)-\\([0-9]+\\)-\\(.*\\)" 5)
|
||||||
(prerelease "^\\([0-9]+\\)\\.\\([0-9]+\\)\\s-*\\.?pre\\([0-9]+\\)?$" 3)
|
(prerelease "^\\([0-9]+\\)\\.\\([0-9]+\\)\\s-*\\.?pre\\([0-9]+\\)?$" 3)
|
||||||
(full "^\\([0-9]+\\)\\.\\([0-9]+\\)$" 2)
|
(full "^\\([0-9]+\\)\\.\\([0-9]+\\)\\.?\\([0-9]+\\)?$" 3)
|
||||||
(fullsingle "^\\([0-9]+\\)$" 1)
|
(fullsingle "^\\([0-9]+\\)$" 1)
|
||||||
(patch "^\\([0-9]+\\)\\.\\([0-9]+\\) (patch \\([0-9]+\\))" 3)
|
(patch "^\\([0-9]+\\)\\.\\([0-9]+\\)\\.?\\([0-9]+\\)?\\s-*(patch \\([0-9]+\\))" 4)
|
||||||
(point "^\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)$" 3)
|
(point "^\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)$" 3)
|
||||||
|
(point "^\\w+: v\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)-\\(0\\)-\\(.*\\)" 5)
|
||||||
(build "^\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\).\\([0-9]+\\)$" 4)
|
(build "^\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\).\\([0-9]+\\)$" 4)
|
||||||
|
(full "^[^/]+/\\w+--\\w+--\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)--version-\\([0-9]+\\)" 4)
|
||||||
|
(full "^\\w+: v\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)" 5)
|
||||||
)
|
)
|
||||||
"List of decoders for version strings.
|
"List of decoders for version strings.
|
||||||
Each decoder is of the form:
|
Each decoder is of the form:
|
||||||
|
|
@ -140,7 +145,7 @@ where RELEASE is a symbol such as `full', or `beta'."
|
||||||
;; Decode the code
|
;; Decode the code
|
||||||
(setq code (inversion-decode-version ver))
|
(setq code (inversion-decode-version ver))
|
||||||
(unless code
|
(unless code
|
||||||
(error "%S-version value cannot be decoded" package))
|
(error "%S-version value (%s) cannot be decoded" package ver))
|
||||||
code))
|
code))
|
||||||
|
|
||||||
(defun inversion-package-incompatibility-version (package)
|
(defun inversion-package-incompatibility-version (package)
|
||||||
|
|
@ -195,24 +200,25 @@ not an indication of new features or bug fixes."
|
||||||
(v2-3 (nth 3 ver2))
|
(v2-3 (nth 3 ver2))
|
||||||
(v2-4 (nth 4 ver2))
|
(v2-4 (nth 4 ver2))
|
||||||
)
|
)
|
||||||
(or (and (= v1-0 v2-0)
|
|
||||||
(= v1-1 v2-1)
|
(cond ((and (equal (list v1-1 v1-2 v1-3 v1-4)
|
||||||
(= v1-2 v2-2)
|
(list v2-1 v2-2 v2-3 v2-4))
|
||||||
(= v1-3 v2-3)
|
v1-0 v2-0)
|
||||||
v1-4 v2-4 ; all or nothing if elt - is =
|
(< v1-0 v2-0))
|
||||||
|
((and (equal v1-1 v2-1)
|
||||||
|
(equal v1-2 v2-2)
|
||||||
|
(equal v1-3 v2-3)
|
||||||
|
v1-4 v2-4) ; all or nothing if elt - is =
|
||||||
(< v1-4 v2-4))
|
(< v1-4 v2-4))
|
||||||
(and (= v1-0 v2-0)
|
((and (equal v1-1 v2-1)
|
||||||
(= v1-1 v2-1)
|
(equal v1-2 v2-2)
|
||||||
(= v1-2 v2-2)
|
v1-3 v2-3) ; all or nothing if elt - is =
|
||||||
v1-3 v2-3 ; all or nothing if elt - is =
|
|
||||||
(< v1-3 v2-3))
|
(< v1-3 v2-3))
|
||||||
(and (= v1-1 v2-1)
|
((and (equal v1-1 v2-1)
|
||||||
|
v1-2 v2-2)
|
||||||
(< v1-2 v2-2))
|
(< v1-2 v2-2))
|
||||||
(and (< v1-1 v2-1))
|
((and v1-1 v2-1)
|
||||||
(and (< v1-0 v2-0)
|
(< v1-1 v2-1))
|
||||||
(= v1-1 v2-1)
|
|
||||||
(= v1-2 v2-2)
|
|
||||||
)
|
|
||||||
)))
|
)))
|
||||||
|
|
||||||
(defun inversion-check-version (version incompatible-version
|
(defun inversion-check-version (version incompatible-version
|
||||||
|
|
@ -340,13 +346,17 @@ Optional argument RESERVED is saved for later use."
|
||||||
;; Return the package symbol that was required.
|
;; Return the package symbol that was required.
|
||||||
package))
|
package))
|
||||||
|
|
||||||
(defun inversion-require-emacs (emacs-ver xemacs-ver)
|
;;;###autoload
|
||||||
"Declare that you need either EMACS-VER, or XEMACS-VER.
|
(defun inversion-require-emacs (emacs-ver xemacs-ver sxemacs-ver)
|
||||||
|
"Declare that you need either EMACS-VER, XEMACS-VER or SXEMACE-ver.
|
||||||
Only checks one based on which kind of Emacs is being run."
|
Only checks one based on which kind of Emacs is being run."
|
||||||
(let ((err (inversion-test 'emacs
|
(let ((err (inversion-test 'emacs
|
||||||
(if (featurep 'xemacs)
|
(cond ((featurep 'sxemacs)
|
||||||
xemacs-ver
|
sxemacs-ver)
|
||||||
emacs-ver))))
|
((featurep 'xemacs)
|
||||||
|
xemacs-ver)
|
||||||
|
(t
|
||||||
|
emacs-ver)))))
|
||||||
(if err (error err)
|
(if err (error err)
|
||||||
;; Something nice...
|
;; Something nice...
|
||||||
t)))
|
t)))
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
(require 'semantic/tag)
|
(require 'semantic/tag)
|
||||||
(require 'semantic/lex)
|
(require 'semantic/lex)
|
||||||
|
|
||||||
(defvar semantic-version "2.0"
|
(defvar semantic-version "2.1beta"
|
||||||
"Current version of Semantic.")
|
"Current version of Semantic.")
|
||||||
|
|
||||||
(declare-function inversion-test "inversion")
|
(declare-function inversion-test "inversion")
|
||||||
|
|
@ -273,7 +273,9 @@ setup to use Semantic."
|
||||||
(js-mode . wisent-javascript-setup-parser)
|
(js-mode . wisent-javascript-setup-parser)
|
||||||
(python-mode . wisent-python-default-setup)
|
(python-mode . wisent-python-default-setup)
|
||||||
(scheme-mode . semantic-default-scheme-setup)
|
(scheme-mode . semantic-default-scheme-setup)
|
||||||
|
(f90-mode . semantic-default-f90-setup)
|
||||||
(srecode-template-mode . srecode-template-setup-parser)
|
(srecode-template-mode . srecode-template-setup-parser)
|
||||||
|
(texinfo-mode . semantic-default-texi-setup)
|
||||||
(makefile-automake-mode . semantic-default-make-setup)
|
(makefile-automake-mode . semantic-default-make-setup)
|
||||||
(makefile-gmake-mode . semantic-default-make-setup)
|
(makefile-gmake-mode . semantic-default-make-setup)
|
||||||
(makefile-makepp-mode . semantic-default-make-setup)
|
(makefile-makepp-mode . semantic-default-make-setup)
|
||||||
|
|
@ -623,7 +625,9 @@ was marked unparseable, then do nothing, and return the cache."
|
||||||
|
|
||||||
;;;; Parse the whole system.
|
;;;; Parse the whole system.
|
||||||
((semantic-parse-tree-needs-rebuild-p)
|
((semantic-parse-tree-needs-rebuild-p)
|
||||||
;; Use Emacs's built-in progress-reporter
|
;; Use Emacs's built-in progress-reporter (only interactive).
|
||||||
|
(if noninteractive
|
||||||
|
(setq res (semantic-parse-region (point-min) (point-max)))
|
||||||
(let ((semantic--progress-reporter
|
(let ((semantic--progress-reporter
|
||||||
(and (>= (point-max) semantic-minimum-working-buffer-size)
|
(and (>= (point-max) semantic-minimum-working-buffer-size)
|
||||||
(eq semantic-working-type 'percent)
|
(eq semantic-working-type 'percent)
|
||||||
|
|
@ -632,7 +636,7 @@ was marked unparseable, then do nothing, and return the cache."
|
||||||
0 100))))
|
0 100))))
|
||||||
(setq res (semantic-parse-region (point-min) (point-max)))
|
(setq res (semantic-parse-region (point-min) (point-max)))
|
||||||
(if semantic--progress-reporter
|
(if semantic--progress-reporter
|
||||||
(progress-reporter-done semantic--progress-reporter)))
|
(progress-reporter-done semantic--progress-reporter))))
|
||||||
|
|
||||||
;; Clear the caches when we see there were no errors.
|
;; Clear the caches when we see there were no errors.
|
||||||
;; But preserve the unmatched syntax cache and warnings!
|
;; But preserve the unmatched syntax cache and warnings!
|
||||||
|
|
@ -986,6 +990,12 @@ Throw away all the old tags, and recreate the tag database."
|
||||||
:help "Highlight the tag at point"
|
:help "Highlight the tag at point"
|
||||||
:visible semantic-mode
|
:visible semantic-mode
|
||||||
:button (:toggle . global-semantic-highlight-func-mode)))
|
:button (:toggle . global-semantic-highlight-func-mode)))
|
||||||
|
(define-key cedet-menu-map [global-semantic-stickyfunc-mode]
|
||||||
|
'(menu-item "Stick Top Tag to Headerline" global-semantic-stickyfunc-mode
|
||||||
|
:help "Stick the tag scrolled off the top of the buffer into the header line"
|
||||||
|
:visible semantic-mode
|
||||||
|
:button (:toggle . (bound-and-true-p
|
||||||
|
global-semantic-stickyfunc-mode))))
|
||||||
(define-key cedet-menu-map [global-semantic-decoration-mode]
|
(define-key cedet-menu-map [global-semantic-decoration-mode]
|
||||||
'(menu-item "Decorate Tags" global-semantic-decoration-mode
|
'(menu-item "Decorate Tags" global-semantic-decoration-mode
|
||||||
:help "Decorate tags based on tag attributes"
|
:help "Decorate tags based on tag attributes"
|
||||||
|
|
@ -1031,7 +1041,12 @@ Prevent this load system from loading files in twice.")
|
||||||
global-semantic-idle-scheduler-mode
|
global-semantic-idle-scheduler-mode
|
||||||
global-semanticdb-minor-mode
|
global-semanticdb-minor-mode
|
||||||
global-semantic-idle-summary-mode
|
global-semantic-idle-summary-mode
|
||||||
global-semantic-mru-bookmark-mode)
|
global-semantic-mru-bookmark-mode
|
||||||
|
global-cedet-m3-minor-mode
|
||||||
|
global-semantic-idle-local-symbol-highlight-mode
|
||||||
|
global-semantic-highlight-edits-mode
|
||||||
|
global-semantic-show-unmatched-syntax-mode
|
||||||
|
global-semantic-show-parser-state-mode)
|
||||||
"List of auxiliary minor modes in the Semantic package.")
|
"List of auxiliary minor modes in the Semantic package.")
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
|
|
@ -1048,7 +1063,17 @@ The possible elements of this list include the following:
|
||||||
`global-semantic-highlight-func-mode' - Highlight the current tag.
|
`global-semantic-highlight-func-mode' - Highlight the current tag.
|
||||||
`global-semantic-stickyfunc-mode' - Show current fun in header line.
|
`global-semantic-stickyfunc-mode' - Show current fun in header line.
|
||||||
`global-semantic-mru-bookmark-mode' - Provide `switch-to-buffer'-like
|
`global-semantic-mru-bookmark-mode' - Provide `switch-to-buffer'-like
|
||||||
keybinding for tag names."
|
keybinding for tag names.
|
||||||
|
`global-cedet-m3-minor-mode' - A mouse 3 context menu.
|
||||||
|
`global-semantic-idle-local-symbol-highlight-mode' - Highlight references
|
||||||
|
of the symbol under point.
|
||||||
|
The following modes are more targeted at people who want to see
|
||||||
|
some internal information of the semantic parser in action:
|
||||||
|
`global-semantic-highlight-edits-mode' - Visualize incremental parser by
|
||||||
|
highlighting not-yet parsed changes.
|
||||||
|
`global-semantic-show-unmatched-syntax-mode' - Highlight unmatched lexical
|
||||||
|
syntax tokens.
|
||||||
|
`global-semantic-show-parser-state-mode' - Display the parser cache state."
|
||||||
:group 'semantic
|
:group 'semantic
|
||||||
:type `(set ,@(mapcar (lambda (c) (list 'const c))
|
:type `(set ,@(mapcar (lambda (c) (list 'const c))
|
||||||
semantic-submode-list)))
|
semantic-submode-list)))
|
||||||
|
|
@ -1095,16 +1120,27 @@ Semantic mode.
|
||||||
(dolist (b (buffer-list))
|
(dolist (b (buffer-list))
|
||||||
(with-current-buffer b
|
(with-current-buffer b
|
||||||
(semantic-new-buffer-fcn))))
|
(semantic-new-buffer-fcn))))
|
||||||
;; Disable all Semantic features.
|
;; Disable Semantic features. Removing everything Semantic has
|
||||||
|
;; introduced in the buffer is pretty much futile, but we have to
|
||||||
|
;; clean the hooks and delete Semantic-related overlays, so that
|
||||||
|
;; Semantic can be re-activated cleanly.
|
||||||
(remove-hook 'mode-local-init-hook 'semantic-new-buffer-fcn)
|
(remove-hook 'mode-local-init-hook 'semantic-new-buffer-fcn)
|
||||||
(remove-hook 'completion-at-point-functions
|
(remove-hook 'completion-at-point-functions
|
||||||
'semantic-completion-at-point-function)
|
'semantic-completion-at-point-function)
|
||||||
|
(remove-hook 'after-change-functions
|
||||||
|
'semantic-change-function)
|
||||||
(define-key cedet-menu-map [cedet-menu-separator] nil)
|
(define-key cedet-menu-map [cedet-menu-separator] nil)
|
||||||
(define-key cedet-menu-map [semantic-options-separator] nil)
|
(define-key cedet-menu-map [semantic-options-separator] nil)
|
||||||
;; FIXME: handle semanticdb-load-ebrowse-caches
|
;; FIXME: handle semanticdb-load-ebrowse-caches
|
||||||
(dolist (mode semantic-submode-list)
|
(dolist (mode semantic-submode-list)
|
||||||
(if (and (boundp mode) (eval mode))
|
(if (and (boundp mode) (eval mode))
|
||||||
(funcall mode -1)))))
|
(funcall mode -1)))
|
||||||
|
;; Unlink buffer and clear cache
|
||||||
|
(semantic--tag-unlink-cache-from-buffer)
|
||||||
|
(setq semantic--buffer-cache nil)
|
||||||
|
;; Make sure we run the setup function if Semantic gets
|
||||||
|
;; re-activated.
|
||||||
|
(setq semantic-new-buffer-fcn-was-run nil)))
|
||||||
|
|
||||||
(defun semantic-completion-at-point-function ()
|
(defun semantic-completion-at-point-function ()
|
||||||
'semantic-ia-complete-symbol)
|
'semantic-ia-complete-symbol)
|
||||||
|
|
@ -1141,6 +1177,11 @@ minor mode can be turned on only if semantic feature is available and
|
||||||
the current buffer was set up for parsing. Return non-nil if the
|
the current buffer was set up for parsing. Return non-nil if the
|
||||||
minor mode is enabled." t nil)
|
minor mode is enabled." t nil)
|
||||||
|
|
||||||
|
(autoload 'global-semantic-idle-local-symbol-highlight-mode "semantic/idle"
|
||||||
|
"Highlight the tag and symbol references of the symbol under point.
|
||||||
|
Call `semantic-analyze-current-context' to find the reference tag.
|
||||||
|
Call `semantic-symref-hits-in-region' to identify local references." t nil)
|
||||||
|
|
||||||
(autoload 'srecode-template-setup-parser "srecode/srecode-template"
|
(autoload 'srecode-template-setup-parser "srecode/srecode-template"
|
||||||
"Set up buffer for parsing SRecode template files." t nil)
|
"Set up buffer for parsing SRecode template files." t nil)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -443,7 +443,7 @@ or implementing a version specific to ")
|
||||||
(semanticdb-file-table-object fileinner t))))
|
(semanticdb-file-table-object fileinner t))))
|
||||||
(cond ((not fileinner)
|
(cond ((not fileinner)
|
||||||
(setq unknown (1+ unknown)))
|
(setq unknown (1+ unknown)))
|
||||||
((number-or-marker-p (oref tableinner pointmax))
|
((and tableinner (number-or-marker-p (oref tableinner pointmax)))
|
||||||
(setq ok (1+ ok)))
|
(setq ok (1+ ok)))
|
||||||
(t
|
(t
|
||||||
(setq unparsed (1+ unparsed))))))
|
(setq unparsed (1+ unparsed))))))
|
||||||
|
|
|
||||||
|
|
@ -37,24 +37,6 @@
|
||||||
;;
|
;;
|
||||||
;; These queries allow a major mode to help the analyzer make decisions.
|
;; These queries allow a major mode to help the analyzer make decisions.
|
||||||
;;
|
;;
|
||||||
(define-overloadable-function semantic-analyze-tag-prototype-p (tag)
|
|
||||||
"Non-nil if TAG is a prototype."
|
|
||||||
)
|
|
||||||
|
|
||||||
(defun semantic-analyze-tag-prototype-p-default (tag)
|
|
||||||
"Non-nil if TAG is a prototype."
|
|
||||||
(let ((p (semantic-tag-get-attribute tag :prototype-flag)))
|
|
||||||
(cond
|
|
||||||
;; Trust the parser author.
|
|
||||||
(p p)
|
|
||||||
;; Empty types might be a prototype.
|
|
||||||
((eq (semantic-tag-class tag) 'type)
|
|
||||||
(not (semantic-tag-type-members tag)))
|
|
||||||
;; No other heuristics.
|
|
||||||
(t nil))
|
|
||||||
))
|
|
||||||
|
|
||||||
;;------------------------------------------------------------
|
|
||||||
|
|
||||||
(define-overloadable-function semantic-analyze-split-name (name)
|
(define-overloadable-function semantic-analyze-split-name (name)
|
||||||
"Split a tag NAME into a sequence.
|
"Split a tag NAME into a sequence.
|
||||||
|
|
@ -219,7 +201,7 @@ used by the analyzer debugger."
|
||||||
(if (and type-declaration
|
(if (and type-declaration
|
||||||
(semantic-tag-p type-declaration)
|
(semantic-tag-p type-declaration)
|
||||||
(semantic-tag-of-class-p type-declaration 'type)
|
(semantic-tag-of-class-p type-declaration 'type)
|
||||||
(not (semantic-analyze-tag-prototype-p type-declaration))
|
(not (semantic-tag-prototype-p type-declaration))
|
||||||
)
|
)
|
||||||
;; We have an anonymous type for TAG with children.
|
;; We have an anonymous type for TAG with children.
|
||||||
;; Use this type directly.
|
;; Use this type directly.
|
||||||
|
|
@ -312,7 +294,7 @@ SCOPE is the current scope."
|
||||||
(when (and (semantic-tag-p ans)
|
(when (and (semantic-tag-p ans)
|
||||||
(eq (semantic-tag-class ans) 'type))
|
(eq (semantic-tag-class ans) 'type))
|
||||||
;; We have a tag.
|
;; We have a tag.
|
||||||
(if (semantic-analyze-tag-prototype-p ans)
|
(if (semantic-tag-prototype-p ans)
|
||||||
;; It is a prototype.. find the real one.
|
;; It is a prototype.. find the real one.
|
||||||
(or (and scope
|
(or (and scope
|
||||||
(car-safe
|
(car-safe
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ Use `semantic-analyze-current-tag' to debug this fcn."
|
||||||
(semantic-go-to-tag tag db)
|
(semantic-go-to-tag tag db)
|
||||||
(setq scope (semantic-calculate-scope))
|
(setq scope (semantic-calculate-scope))
|
||||||
|
|
||||||
(setq allhits (semantic--analyze-refs-full-lookup tag scope))
|
(setq allhits (semantic--analyze-refs-full-lookup tag scope t))
|
||||||
|
|
||||||
(semantic-analyze-references (semantic-tag-name tag)
|
(semantic-analyze-references (semantic-tag-name tag)
|
||||||
:tag tag
|
:tag tag
|
||||||
|
|
@ -115,7 +115,10 @@ Optional argument IN-BUFFER indicates that the returned tag should be in an acti
|
||||||
(aDB (car ans))
|
(aDB (car ans))
|
||||||
)
|
)
|
||||||
(when (and (not (semantic-tag-prototype-p aT))
|
(when (and (not (semantic-tag-prototype-p aT))
|
||||||
(semantic-tag-similar-p tag aT :prototype-flag :parent))
|
(semantic-tag-similar-p tag aT
|
||||||
|
:prototype-flag
|
||||||
|
:parent
|
||||||
|
:typemodifiers))
|
||||||
(when in-buffer (save-excursion (semantic-go-to-tag aT aDB)))
|
(when in-buffer (save-excursion (semantic-go-to-tag aT aDB)))
|
||||||
(push aT impl))))
|
(push aT impl))))
|
||||||
allhits)
|
allhits)
|
||||||
|
|
@ -135,7 +138,10 @@ Optional argument IN-BUFFER indicates that the returned tag should be in an acti
|
||||||
(aDB (car ans))
|
(aDB (car ans))
|
||||||
)
|
)
|
||||||
(when (and (semantic-tag-prototype-p aT)
|
(when (and (semantic-tag-prototype-p aT)
|
||||||
(semantic-tag-similar-p tag aT :prototype-flag :parent))
|
(semantic-tag-similar-p tag aT
|
||||||
|
:prototype-flag
|
||||||
|
:parent
|
||||||
|
:typemodifiers))
|
||||||
(when in-buffer (save-excursion (semantic-go-to-tag aT aDB)))
|
(when in-buffer (save-excursion (semantic-go-to-tag aT aDB)))
|
||||||
(push aT proto))))
|
(push aT proto))))
|
||||||
allhits)
|
allhits)
|
||||||
|
|
@ -143,14 +149,15 @@ Optional argument IN-BUFFER indicates that the returned tag should be in an acti
|
||||||
|
|
||||||
;;; LOOKUP
|
;;; LOOKUP
|
||||||
;;
|
;;
|
||||||
(defun semantic--analyze-refs-full-lookup (tag scope)
|
(defun semantic--analyze-refs-full-lookup (tag scope &optional noerror)
|
||||||
"Perform a full lookup for all occurrences of TAG in the current project.
|
"Perform a full lookup for all occurrences of TAG in the current project.
|
||||||
TAG should be the tag currently under point.
|
TAG should be the tag currently under point.
|
||||||
SCOPE is the scope the cursor is in. From this a list of parents is
|
SCOPE is the scope the cursor is in. From this a list of parents is
|
||||||
derived. If SCOPE does not have parents, then only a simple lookup is done."
|
derived. If SCOPE does not have parents, then only a simple lookup is done.
|
||||||
|
Optional argument NOERROR means don't error if the lookup fails."
|
||||||
(if (not (oref scope parents))
|
(if (not (oref scope parents))
|
||||||
;; If this tag has some named parent, but is not
|
;; If this tag has some named parent, but is not
|
||||||
(semantic--analyze-refs-full-lookup-simple tag)
|
(semantic--analyze-refs-full-lookup-simple tag noerror)
|
||||||
|
|
||||||
;; We have some sort of lineage we need to consider when we do
|
;; We have some sort of lineage we need to consider when we do
|
||||||
;; our side lookup of tags.
|
;; our side lookup of tags.
|
||||||
|
|
|
||||||
|
|
@ -19,17 +19,21 @@
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;;
|
;;
|
||||||
;; This file was generated from etc/grammars/c.by.
|
;; This file was generated from admin/grammars/c.by.
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(require 'semantic/lex)
|
(require 'semantic/lex)
|
||||||
(eval-when-compile (require 'semantic/bovine))
|
(eval-when-compile (require 'semantic/bovine))
|
||||||
|
|
||||||
|
;;; Prologue
|
||||||
|
;;
|
||||||
(declare-function semantic-c-reconstitute-token "semantic/bovine/c")
|
(declare-function semantic-c-reconstitute-token "semantic/bovine/c")
|
||||||
(declare-function semantic-c-reconstitute-template "semantic/bovine/c")
|
(declare-function semantic-c-reconstitute-template "semantic/bovine/c")
|
||||||
(declare-function semantic-expand-c-tag "semantic/bovine/c")
|
(declare-function semantic-expand-c-tag "semantic/bovine/c")
|
||||||
|
|
||||||
|
;;; Declarations
|
||||||
|
;;
|
||||||
(defconst semantic-c-by--keyword-table
|
(defconst semantic-c-by--keyword-table
|
||||||
(semantic-lex-make-keyword-table
|
(semantic-lex-make-keyword-table
|
||||||
'(("extern" . EXTERN)
|
'(("extern" . EXTERN)
|
||||||
|
|
@ -42,6 +46,7 @@
|
||||||
("inline" . INLINE)
|
("inline" . INLINE)
|
||||||
("virtual" . VIRTUAL)
|
("virtual" . VIRTUAL)
|
||||||
("mutable" . MUTABLE)
|
("mutable" . MUTABLE)
|
||||||
|
("explicit" . EXPLICIT)
|
||||||
("struct" . STRUCT)
|
("struct" . STRUCT)
|
||||||
("union" . UNION)
|
("union" . UNION)
|
||||||
("enum" . ENUM)
|
("enum" . ENUM)
|
||||||
|
|
@ -124,6 +129,7 @@
|
||||||
("enum" summary "Enumeration Type Declaration: enum [name] { ... };")
|
("enum" summary "Enumeration Type Declaration: enum [name] { ... };")
|
||||||
("union" summary "Union Type Declaration: union [name] { ... };")
|
("union" summary "Union Type Declaration: union [name] { ... };")
|
||||||
("struct" summary "Structure Type Declaration: struct [name] { ... };")
|
("struct" summary "Structure Type Declaration: struct [name] { ... };")
|
||||||
|
("explicit" summary "Forbids implicit type conversion: explicit <constructor>")
|
||||||
("mutable" summary "Member Declaration Modifier: mutable <type> <name> ...")
|
("mutable" summary "Member Declaration Modifier: mutable <type> <name> ...")
|
||||||
("virtual" summary "Method Modifier: virtual <type> <name>(...) ...")
|
("virtual" summary "Method Modifier: virtual <type> <name>(...) ...")
|
||||||
("inline" summary "Function Modifier: inline <return type> <name>(...) {...};")
|
("inline" summary "Function Modifier: inline <return type> <name>(...) {...};")
|
||||||
|
|
@ -486,6 +492,12 @@
|
||||||
)
|
)
|
||||||
(template)
|
(template)
|
||||||
(using)
|
(using)
|
||||||
|
(spp-include
|
||||||
|
,(semantic-lambda
|
||||||
|
(semantic-tag
|
||||||
|
(nth 0 vals)
|
||||||
|
'include :inside-ns t))
|
||||||
|
)
|
||||||
( ;;EMPTY
|
( ;;EMPTY
|
||||||
)
|
)
|
||||||
) ;; end namespacesubparts
|
) ;; end namespacesubparts
|
||||||
|
|
@ -1987,6 +1999,15 @@
|
||||||
"*"
|
"*"
|
||||||
(nth 2 vals))))
|
(nth 2 vals))))
|
||||||
)
|
)
|
||||||
|
(open-paren
|
||||||
|
"("
|
||||||
|
symbol
|
||||||
|
close-paren
|
||||||
|
")"
|
||||||
|
,(semantic-lambda
|
||||||
|
(list
|
||||||
|
(nth 1 vals)))
|
||||||
|
)
|
||||||
) ;; end function-pointer
|
) ;; end function-pointer
|
||||||
|
|
||||||
(fun-or-proto-end
|
(fun-or-proto-end
|
||||||
|
|
@ -2186,6 +2207,10 @@
|
||||||
semantic-flex-keywords-obarray semantic-c-by--keyword-table
|
semantic-flex-keywords-obarray semantic-c-by--keyword-table
|
||||||
semantic-equivalent-major-modes '(c-mode c++-mode)
|
semantic-equivalent-major-modes '(c-mode c++-mode)
|
||||||
))
|
))
|
||||||
|
|
||||||
|
|
||||||
|
;;; Analyzers
|
||||||
|
;;
|
||||||
|
|
||||||
;;; Epilogue
|
;;; Epilogue
|
||||||
;;
|
;;
|
||||||
|
|
|
||||||
|
|
@ -27,10 +27,13 @@
|
||||||
|
|
||||||
(require 'semantic)
|
(require 'semantic)
|
||||||
(require 'semantic/analyze)
|
(require 'semantic/analyze)
|
||||||
|
(require 'semantic/bovine)
|
||||||
(require 'semantic/bovine/gcc)
|
(require 'semantic/bovine/gcc)
|
||||||
(require 'semantic/idle)
|
(require 'semantic/idle)
|
||||||
(require 'semantic/lex-spp)
|
(require 'semantic/lex-spp)
|
||||||
(require 'semantic/bovine/c-by)
|
(require 'semantic/bovine/c-by)
|
||||||
|
(require 'semantic/db-find)
|
||||||
|
(require 'hideif)
|
||||||
|
|
||||||
(eval-when-compile
|
(eval-when-compile
|
||||||
(require 'semantic/find))
|
(require 'semantic/find))
|
||||||
|
|
@ -103,8 +106,13 @@ NOTE: In process of obsoleting this."
|
||||||
'( ("__THROW" . "")
|
'( ("__THROW" . "")
|
||||||
("__const" . "const")
|
("__const" . "const")
|
||||||
("__restrict" . "")
|
("__restrict" . "")
|
||||||
|
("__attribute_pure__" . "")
|
||||||
|
("__attribute_malloc__" . "")
|
||||||
|
("__nonnull" . "")
|
||||||
|
("__wur" . "")
|
||||||
("__declspec" . ((spp-arg-list ("foo") 1 . 2)))
|
("__declspec" . ((spp-arg-list ("foo") 1 . 2)))
|
||||||
("__attribute__" . ((spp-arg-list ("foo") 1 . 2)))
|
("__attribute__" . ((spp-arg-list ("foo") 1 . 2)))
|
||||||
|
("__asm" . ((spp-arg-list ("foo") 1 . 2)))
|
||||||
)
|
)
|
||||||
"List of symbols to include by default.")
|
"List of symbols to include by default.")
|
||||||
|
|
||||||
|
|
@ -118,7 +126,15 @@ part of the preprocessor map.")
|
||||||
|
|
||||||
(defun semantic-c-reset-preprocessor-symbol-map ()
|
(defun semantic-c-reset-preprocessor-symbol-map ()
|
||||||
"Reset the C preprocessor symbol map based on all input variables."
|
"Reset the C preprocessor symbol map based on all input variables."
|
||||||
(when (featurep 'semantic/bovine/c)
|
(when (and semantic-mode
|
||||||
|
(featurep 'semantic/bovine/c))
|
||||||
|
(remove-hook 'mode-local-init-hook 'semantic-c-reset-preprocessor-symbol-map)
|
||||||
|
;; Initialize semantic-lex-spp-macro-symbol-obarray with symbols.
|
||||||
|
(setq-mode-local c-mode
|
||||||
|
semantic-lex-spp-macro-symbol-obarray
|
||||||
|
(semantic-lex-make-spp-table
|
||||||
|
(append semantic-lex-c-preprocessor-symbol-map-builtin
|
||||||
|
semantic-lex-c-preprocessor-symbol-map)))
|
||||||
(let ((filemap nil)
|
(let ((filemap nil)
|
||||||
)
|
)
|
||||||
(when (and (not semantic-c-in-reset-preprocessor-table)
|
(when (and (not semantic-c-in-reset-preprocessor-table)
|
||||||
|
|
@ -141,17 +157,17 @@ part of the preprocessor map.")
|
||||||
(error (message "Error updating tables for %S"
|
(error (message "Error updating tables for %S"
|
||||||
(object-name table)))))
|
(object-name table)))))
|
||||||
(setq filemap (append filemap (oref table lexical-table)))
|
(setq filemap (append filemap (oref table lexical-table)))
|
||||||
)
|
;; Update symbol obarray
|
||||||
))))
|
|
||||||
|
|
||||||
(setq-mode-local c-mode
|
(setq-mode-local c-mode
|
||||||
semantic-lex-spp-macro-symbol-obarray
|
semantic-lex-spp-macro-symbol-obarray
|
||||||
(semantic-lex-make-spp-table
|
(semantic-lex-make-spp-table
|
||||||
(append semantic-lex-c-preprocessor-symbol-map-builtin
|
(append semantic-lex-c-preprocessor-symbol-map-builtin
|
||||||
semantic-lex-c-preprocessor-symbol-map
|
semantic-lex-c-preprocessor-symbol-map
|
||||||
filemap))
|
filemap)))))))))))
|
||||||
)
|
|
||||||
)))
|
;; Make sure the preprocessor symbols are set up when mode-local kicks
|
||||||
|
;; in.
|
||||||
|
(add-hook 'mode-local-init-hook 'semantic-c-reset-preprocessor-symbol-map)
|
||||||
|
|
||||||
(defcustom semantic-lex-c-preprocessor-symbol-map nil
|
(defcustom semantic-lex-c-preprocessor-symbol-map nil
|
||||||
"Table of C Preprocessor keywords used by the Semantic C lexer.
|
"Table of C Preprocessor keywords used by the Semantic C lexer.
|
||||||
|
|
@ -236,6 +252,7 @@ Return the defined symbol as a special spp lex token."
|
||||||
nil
|
nil
|
||||||
(let* ((name (buffer-substring-no-properties
|
(let* ((name (buffer-substring-no-properties
|
||||||
(match-beginning 1) (match-end 1)))
|
(match-beginning 1) (match-end 1)))
|
||||||
|
(beginning-of-define (match-end 1))
|
||||||
(with-args (save-excursion
|
(with-args (save-excursion
|
||||||
(goto-char (match-end 0))
|
(goto-char (match-end 0))
|
||||||
(looking-at "(")))
|
(looking-at "(")))
|
||||||
|
|
@ -246,7 +263,13 @@ Return the defined symbol as a special spp lex token."
|
||||||
(raw-stream
|
(raw-stream
|
||||||
(semantic-lex-spp-stream-for-macro (save-excursion
|
(semantic-lex-spp-stream-for-macro (save-excursion
|
||||||
(semantic-c-end-of-macro)
|
(semantic-c-end-of-macro)
|
||||||
(point))))
|
;; HACK - If there's a C comment after
|
||||||
|
;; the macro, do not parse it.
|
||||||
|
(if (looking-back "/\\*.*" beginning-of-define)
|
||||||
|
(progn
|
||||||
|
(goto-char (match-beginning 0))
|
||||||
|
(1- (point)))
|
||||||
|
(point)))))
|
||||||
)
|
)
|
||||||
|
|
||||||
;; Only do argument checking if the paren was immediately after
|
;; Only do argument checking if the paren was immediately after
|
||||||
|
|
@ -295,8 +318,10 @@ Moves completely over balanced #if blocks."
|
||||||
(cond
|
(cond
|
||||||
((looking-at "^\\s-*#\\s-*if")
|
((looking-at "^\\s-*#\\s-*if")
|
||||||
;; We found a nested if. Skip it.
|
;; We found a nested if. Skip it.
|
||||||
;; @TODO - can we use the new c-scan-conditionals
|
(if (fboundp 'c-scan-conditionals)
|
||||||
(c-forward-conditional 1))
|
(goto-char (c-scan-conditionals 1))
|
||||||
|
;; For older Emacsen, but this will set the mark.
|
||||||
|
(c-forward-conditional 1)))
|
||||||
((looking-at "^\\s-*#\\s-*elif")
|
((looking-at "^\\s-*#\\s-*elif")
|
||||||
;; We need to let the preprocessor analyze this one.
|
;; We need to let the preprocessor analyze this one.
|
||||||
(beginning-of-line)
|
(beginning-of-line)
|
||||||
|
|
@ -315,34 +340,207 @@ Moves completely over balanced #if blocks."
|
||||||
;; We found an elif. Stop here.
|
;; We found an elif. Stop here.
|
||||||
(setq done t))))))
|
(setq done t))))))
|
||||||
|
|
||||||
|
;;; HIDEIF USAGE:
|
||||||
|
;; NOTE: All hideif using code was contributed by Brian Carlson as
|
||||||
|
;; copies from hideif plus modifications and additions.
|
||||||
|
;; Eric then converted things to use hideif functions directly,
|
||||||
|
;; deleting most of that code, and added the advice.
|
||||||
|
|
||||||
|
;;; SPP SYM EVAL
|
||||||
|
;;
|
||||||
|
;; Convert SPP symbols into values usable by hideif.
|
||||||
|
;;
|
||||||
|
;; @TODO - can these conversion fcns be a part of semantic-lex-spp.el?
|
||||||
|
;; -- TRY semantic-lex-spp-one-token-to-txt
|
||||||
|
(defun semantic-c-convert-spp-value-to-hideif-value (symbol macrovalue)
|
||||||
|
"Convert an spp macro SYMBOL MACROVALUE, to something that hideif can use.
|
||||||
|
Take the first interesting thing and convert it."
|
||||||
|
;; Just warn for complex macros.
|
||||||
|
(when (> (length macrovalue) 1)
|
||||||
|
(semantic-push-parser-warning
|
||||||
|
(format "Complex macro value (%s) may be improperly evaluated. "
|
||||||
|
symbol) 0 0))
|
||||||
|
|
||||||
|
(let* ((lextoken (car macrovalue))
|
||||||
|
(key (semantic-lex-token-class lextoken))
|
||||||
|
(value (semantic-lex-token-text lextoken)))
|
||||||
|
(cond
|
||||||
|
((eq key 'number) (string-to-number value))
|
||||||
|
((eq key 'symbol) (semantic-c-evaluate-symbol-for-hideif value))
|
||||||
|
((eq key 'string)
|
||||||
|
(if (string-match "^[0-9]+L?$" value)
|
||||||
|
;; If it matches a number expression, then
|
||||||
|
;; convert to a number.
|
||||||
|
(string-to-number value)
|
||||||
|
value))
|
||||||
|
(t (semantic-push-parser-warning
|
||||||
|
(format "Unknown macro value. Token class = %s value = %s. " key value)
|
||||||
|
0 0)
|
||||||
|
nil)
|
||||||
|
)))
|
||||||
|
|
||||||
|
(defun semantic-c-evaluate-symbol-for-hideif (spp-symbol)
|
||||||
|
"Lookup the symbol SPP-SYMBOL (a string) to something hideif can use.
|
||||||
|
Pulls out the symbol list, and call `semantic-c-convert-spp-value-to-hideif-value'."
|
||||||
|
(interactive "sSymbol name: ")
|
||||||
|
(when (symbolp spp-symbol) (setq spp-symbol (symbol-name spp-symbol)))
|
||||||
|
|
||||||
|
(if (semantic-lex-spp-symbol-p spp-symbol )
|
||||||
|
;; Convert the symbol into a stream of tokens from the macro which we
|
||||||
|
;; can then interpret.
|
||||||
|
(let ((stream (semantic-lex-spp-symbol-stream spp-symbol)))
|
||||||
|
(cond
|
||||||
|
;; Empyt string means defined, so t.
|
||||||
|
((null stream) t)
|
||||||
|
;; A list means a parsed macro stream.
|
||||||
|
((listp stream)
|
||||||
|
;; Convert the macro to something we can return.
|
||||||
|
(semantic-c-convert-spp-value-to-hideif-value spp-symbol stream))
|
||||||
|
|
||||||
|
;; Strings might need to be turned into numbers
|
||||||
|
((stringp stream)
|
||||||
|
(if (string-match "^[0-9]+L?$" stream)
|
||||||
|
;; If it matches a number expression, then convert to a
|
||||||
|
;; number.
|
||||||
|
(string-to-number stream)
|
||||||
|
stream))
|
||||||
|
|
||||||
|
;; Just return the stream. A user might have just stuck some
|
||||||
|
;; value in it directly.
|
||||||
|
(t stream)
|
||||||
|
))
|
||||||
|
;; Else, store an error, return nil.
|
||||||
|
(progn
|
||||||
|
(semantic-push-parser-warning
|
||||||
|
(format "SPP Symbol %s not available" spp-symbol)
|
||||||
|
(point) (point))
|
||||||
|
nil)))
|
||||||
|
|
||||||
|
;;; HIDEIF HACK support fcns
|
||||||
|
;;
|
||||||
|
;; These fcns can replace the impl of some hideif features.
|
||||||
|
;;
|
||||||
|
;; @TODO - Should hideif and semantic-c merge?
|
||||||
|
;; I picture a grammar just for CPP that expands into
|
||||||
|
;; a second token stream for the parser.
|
||||||
|
(defun semantic-c-hideif-lookup (var)
|
||||||
|
"Replacement for `hif-lookup'.
|
||||||
|
I think it just gets the value for some CPP variable VAR."
|
||||||
|
(let ((val (semantic-c-evaluate-symbol-for-hideif
|
||||||
|
(cond
|
||||||
|
((stringp var) var)
|
||||||
|
((symbolp var) (symbol-name var))
|
||||||
|
(t "Unable to determine var")))))
|
||||||
|
(if val
|
||||||
|
val
|
||||||
|
;; Real hideif will return the right undefined symbol.
|
||||||
|
nil)))
|
||||||
|
|
||||||
|
(defun semantic-c-hideif-defined (var)
|
||||||
|
"Replacement for `hif-defined'.
|
||||||
|
I think it just returns t/nil dependent on if VAR has been defined."
|
||||||
|
(let ((var-symbol-name
|
||||||
|
(cond
|
||||||
|
((symbolp var) (symbol-name var))
|
||||||
|
((stringp var) var)
|
||||||
|
(t "Not A Symbol"))))
|
||||||
|
(if (not (semantic-lex-spp-symbol-p var-symbol-name))
|
||||||
|
(progn
|
||||||
|
(semantic-push-parser-warning
|
||||||
|
(format "Skip %s" (buffer-substring-no-properties
|
||||||
|
(point-at-bol) (point-at-eol)))
|
||||||
|
(point-at-bol) (point-at-eol))
|
||||||
|
nil)
|
||||||
|
t)))
|
||||||
|
|
||||||
|
;;; HIDEIF ADVICE
|
||||||
|
;;
|
||||||
|
;; Advise hideif functions to use our lexical tables instead.
|
||||||
|
(defvar semantic-c-takeover-hideif nil
|
||||||
|
"Non-nil when Semantic is taking over hideif features.")
|
||||||
|
|
||||||
|
;; (defadvice hif-defined (around semantic-c activate)
|
||||||
|
;; "Is the variable defined?"
|
||||||
|
;; (if semantic-c-takeover-hideif
|
||||||
|
;; (setq ad-return-value
|
||||||
|
;; (semantic-c-hideif-defined (ad-get-arg 0)))
|
||||||
|
;; ad-do-it))
|
||||||
|
|
||||||
|
;; (defadvice hif-lookup (around semantic-c activate)
|
||||||
|
;; "Is the argument defined? Return true or false."
|
||||||
|
;; (let ((ans nil))
|
||||||
|
;; (when semantic-c-takeover-hideif
|
||||||
|
;; (setq ans (semantic-c-hideif-lookup (ad-get-arg 0))))
|
||||||
|
;; (if (null ans)
|
||||||
|
;; ad-do-it
|
||||||
|
;; (setq ad-return-value ans))))
|
||||||
|
|
||||||
|
;;; #if macros
|
||||||
|
;;
|
||||||
|
;; Support #if macros by evaluating the values via use of hideif
|
||||||
|
;; logic. See above for hacks to make this work.
|
||||||
(define-lex-regex-analyzer semantic-lex-c-if
|
(define-lex-regex-analyzer semantic-lex-c-if
|
||||||
"Code blocks wrapped up in #if, or #ifdef.
|
"Code blocks wrapped up in #if, or #ifdef.
|
||||||
Uses known macro tables in SPP to determine what block to skip."
|
Uses known macro tables in SPP to determine what block to skip."
|
||||||
"^\\s-*#\\s-*\\(if\\|ifndef\\|ifdef\\|elif\\)\\s-+\\(!?defined(\\|\\)\\s-*\\(\\(\\sw\\|\\s_\\)+\\)\\(\\s-*)\\)?\\s-*$"
|
"^\\s-*#\\s-*\\(if\\|elif\\).*$"
|
||||||
(semantic-c-do-lex-if))
|
(semantic-c-do-lex-if))
|
||||||
|
|
||||||
(defun semantic-c-do-lex-if ()
|
(defun semantic-c-do-lex-if ()
|
||||||
|
"Handle lexical CPP if statements.
|
||||||
|
Enables a takeover of some hideif functions, then uses hideif to
|
||||||
|
evaluate the #if expression and enables us to make decisions on which
|
||||||
|
code to parse."
|
||||||
|
;; Enable our advice, and use hideif to parse.
|
||||||
|
(let* ((semantic-c-takeover-hideif t)
|
||||||
|
(hif-ifx-regexp (concat hif-cpp-prefix "\\(elif\\|if\\(n?def\\)?\\)[ \t]+"))
|
||||||
|
(parsedtokelist
|
||||||
|
(condition-case nil
|
||||||
|
;; This is imperfect, so always assume on error.
|
||||||
|
(hif-canonicalize)
|
||||||
|
(error nil))))
|
||||||
|
|
||||||
|
(let ((eval-form (eval parsedtokelist)))
|
||||||
|
(if (or (not eval-form)
|
||||||
|
(and (numberp eval-form)
|
||||||
|
(equal eval-form 0)));; ifdefline resulted in false
|
||||||
|
|
||||||
|
;; The if indicates to skip this preprocessor section
|
||||||
|
(let ((pt nil))
|
||||||
|
(semantic-push-parser-warning (format "Skip %s" (buffer-substring-no-properties (point-at-bol) (point-at-eol)))
|
||||||
|
(point-at-bol) (point-at-eol))
|
||||||
|
(beginning-of-line)
|
||||||
|
(setq pt (point))
|
||||||
|
;; This skips only a section of a conditional. Once that section
|
||||||
|
;; is opened, encountering any new #else or related conditional
|
||||||
|
;; should be skipped.
|
||||||
|
(semantic-c-skip-conditional-section)
|
||||||
|
(setq semantic-lex-end-point (point))
|
||||||
|
|
||||||
|
;; @TODO -somewhere around here, we also need to skip
|
||||||
|
;; other sections of the conditional.
|
||||||
|
|
||||||
|
nil)
|
||||||
|
;; Else, don't ignore it, but do handle the internals.
|
||||||
|
(end-of-line)
|
||||||
|
(setq semantic-lex-end-point (point))
|
||||||
|
nil))))
|
||||||
|
|
||||||
|
(define-lex-regex-analyzer semantic-lex-c-ifdef
|
||||||
|
"Code blocks wrapped up in #ifdef.
|
||||||
|
Uses known macro tables in SPP to determine what block to skip."
|
||||||
|
"^\\s-*#\\s-*\\(ifndef\\|ifdef\\)\\s-+\\(\\(\\sw\\|\\s_\\)+\\)$"
|
||||||
|
(semantic-c-do-lex-ifdef))
|
||||||
|
|
||||||
|
(defun semantic-c-do-lex-ifdef ()
|
||||||
"Handle lexical CPP if statements."
|
"Handle lexical CPP if statements."
|
||||||
(let* ((sym (buffer-substring-no-properties
|
(let* ((sym (buffer-substring-no-properties
|
||||||
(match-beginning 3) (match-end 3)))
|
|
||||||
(defstr (buffer-substring-no-properties
|
|
||||||
(match-beginning 2) (match-end 2)))
|
(match-beginning 2) (match-end 2)))
|
||||||
(defined (string= defstr "defined("))
|
|
||||||
(notdefined (string= defstr "!defined("))
|
|
||||||
(ift (buffer-substring-no-properties
|
(ift (buffer-substring-no-properties
|
||||||
(match-beginning 1) (match-end 1)))
|
(match-beginning 1) (match-end 1)))
|
||||||
(ifdef (or (string= ift "ifdef")
|
(ifdef (string= ift "ifdef"))
|
||||||
(and (string= ift "if") defined)
|
(ifndef (string= ift "ifndef"))
|
||||||
(and (string= ift "elif") defined)
|
|
||||||
))
|
|
||||||
(ifndef (or (string= ift "ifndef")
|
|
||||||
(and (string= ift "if") notdefined)
|
|
||||||
(and (string= ift "elif") notdefined)
|
|
||||||
))
|
|
||||||
)
|
)
|
||||||
(if (or (and (or (string= ift "if") (string= ift "elif"))
|
(if (or (and ifdef (not (semantic-lex-spp-symbol-p sym)))
|
||||||
(string= sym "0"))
|
|
||||||
(and ifdef (not (semantic-lex-spp-symbol-p sym)))
|
|
||||||
(and ifndef (semantic-lex-spp-symbol-p sym)))
|
(and ifndef (semantic-lex-spp-symbol-p sym)))
|
||||||
;; The if indicates to skip this preprocessor section.
|
;; The if indicates to skip this preprocessor section.
|
||||||
(let ((pt nil))
|
(let ((pt nil))
|
||||||
|
|
@ -556,6 +754,7 @@ Use semantic-cpp-lexer for parsing text inside a CPP macro."
|
||||||
;; C preprocessor features
|
;; C preprocessor features
|
||||||
semantic-lex-cpp-define
|
semantic-lex-cpp-define
|
||||||
semantic-lex-cpp-undef
|
semantic-lex-cpp-undef
|
||||||
|
semantic-lex-c-ifdef
|
||||||
semantic-lex-c-if
|
semantic-lex-c-if
|
||||||
semantic-lex-c-macro-else
|
semantic-lex-c-macro-else
|
||||||
semantic-lex-c-macrobits
|
semantic-lex-c-macrobits
|
||||||
|
|
@ -724,6 +923,8 @@ the regular parser."
|
||||||
|
|
||||||
;; Hack in mode-local
|
;; Hack in mode-local
|
||||||
(activate-mode-local-bindings)
|
(activate-mode-local-bindings)
|
||||||
|
;; Setup C parser
|
||||||
|
(semantic-default-c-setup)
|
||||||
;; CHEATER! The following 3 lines are from
|
;; CHEATER! The following 3 lines are from
|
||||||
;; `semantic-new-buffer-fcn', but we don't want to turn
|
;; `semantic-new-buffer-fcn', but we don't want to turn
|
||||||
;; on all the other annoying modes for this little task.
|
;; on all the other annoying modes for this little task.
|
||||||
|
|
@ -799,6 +1000,50 @@ now.
|
||||||
(let ((return-list nil)
|
(let ((return-list nil)
|
||||||
)
|
)
|
||||||
;; Expand an EXTERN C first.
|
;; Expand an EXTERN C first.
|
||||||
|
(when (eq (semantic-tag-class tag) 'extern)
|
||||||
|
(setq return-list (semantic-expand-c-extern-C tag))
|
||||||
|
;; The members will be expanded in the next iteration. The
|
||||||
|
;; 'extern' tag itself isn't needed anymore.
|
||||||
|
(setq tag nil))
|
||||||
|
|
||||||
|
;; Check if we have a complex type
|
||||||
|
(when (or (semantic-tag-of-class-p tag 'function)
|
||||||
|
(semantic-tag-of-class-p tag 'variable))
|
||||||
|
(setq tag (semantic-expand-c-complex-type tag))
|
||||||
|
;; Extract new basetag
|
||||||
|
(setq return-list (car tag))
|
||||||
|
(setq tag (cdr tag)))
|
||||||
|
|
||||||
|
;; Name of the tag is a list, so expand it. Tag lists occur
|
||||||
|
;; for variables like this: int var1, var2, var3;
|
||||||
|
;;
|
||||||
|
;; This will expand that to 3 tags that happen to share the
|
||||||
|
;; same overlay information.
|
||||||
|
(if (consp (semantic-tag-name tag))
|
||||||
|
(let ((rl (semantic-expand-c-tag-namelist tag)))
|
||||||
|
(cond
|
||||||
|
;; If this returns nothing, then return nil overall
|
||||||
|
;; because that will restore the old TAG input.
|
||||||
|
((not rl) (setq return-list nil))
|
||||||
|
;; If we have a return, append it to the existing list
|
||||||
|
;; of returns.
|
||||||
|
((consp rl)
|
||||||
|
(setq return-list (append rl return-list)))
|
||||||
|
))
|
||||||
|
;; If we didn't have a list, but the return-list is non-empty,
|
||||||
|
;; that means we still need to take our existing tag, and glom
|
||||||
|
;; it onto our extracted type.
|
||||||
|
(if (and tag (consp return-list))
|
||||||
|
(setq return-list (cons tag return-list)))
|
||||||
|
)
|
||||||
|
|
||||||
|
;; Default, don't change the tag means returning nil.
|
||||||
|
return-list))
|
||||||
|
|
||||||
|
(defun semantic-expand-c-extern-C (tag)
|
||||||
|
"Expand TAG containing an 'extern \"C\"' statement.
|
||||||
|
This will return all members of TAG with 'extern \"C\"' added to
|
||||||
|
the typemodifiers attribute."
|
||||||
(when (eq (semantic-tag-class tag) 'extern)
|
(when (eq (semantic-tag-class tag) 'extern)
|
||||||
(let* ((mb (semantic-tag-get-attribute tag :members))
|
(let* ((mb (semantic-tag-get-attribute tag :members))
|
||||||
(ret mb))
|
(ret mb))
|
||||||
|
|
@ -807,20 +1052,18 @@ now.
|
||||||
(setq mods (cons "extern" (cons "\"C\"" mods)))
|
(setq mods (cons "extern" (cons "\"C\"" mods)))
|
||||||
(semantic-tag-put-attribute (car mb) :typemodifiers mods))
|
(semantic-tag-put-attribute (car mb) :typemodifiers mods))
|
||||||
(setq mb (cdr mb)))
|
(setq mb (cdr mb)))
|
||||||
(setq return-list ret)))
|
(nreverse ret))))
|
||||||
|
|
||||||
;; Function or variables that have a :type that is some complex
|
(defun semantic-expand-c-complex-type (tag)
|
||||||
;; thing, extract it, and replace it with a reference.
|
"Check if TAG has a full :type with a name on its own.
|
||||||
;;
|
If so, extract it, and replace it with a reference to that type.
|
||||||
;; Thus, struct A { int a; } B;
|
Thus, 'struct A { int a; } B;' will create 2 toplevel tags, one
|
||||||
;;
|
is type A, and the other variable B where the :type of B is just
|
||||||
;; will create 2 toplevel tags, one is type A, and the other variable B
|
a type tag A that is a prototype, and the actual struct info of A
|
||||||
;; where the :type of B is just a type tag A that is a prototype, and
|
is its own toplevel tag. This function will return (cons A B)."
|
||||||
;; the actual struct info of A is its own toplevel tag.
|
|
||||||
(when (or (semantic-tag-of-class-p tag 'function)
|
|
||||||
(semantic-tag-of-class-p tag 'variable))
|
|
||||||
(let* ((basetype (semantic-tag-type tag))
|
(let* ((basetype (semantic-tag-type tag))
|
||||||
(typeref nil)
|
(typeref nil)
|
||||||
|
(ret nil)
|
||||||
(tname (when (consp basetype)
|
(tname (when (consp basetype)
|
||||||
(semantic-tag-name basetype))))
|
(semantic-tag-name basetype))))
|
||||||
;; Make tname be a string.
|
;; Make tname be a string.
|
||||||
|
|
@ -844,33 +1087,8 @@ now.
|
||||||
(semantic--tag-set-overlay basetype
|
(semantic--tag-set-overlay basetype
|
||||||
(semantic-tag-overlay tag))
|
(semantic-tag-overlay tag))
|
||||||
;; Store the base tag as part of the return list.
|
;; Store the base tag as part of the return list.
|
||||||
(setq return-list (cons basetype return-list)))))
|
(setq ret (cons basetype ret)))
|
||||||
|
(cons ret tag)))
|
||||||
;; Name of the tag is a list, so expand it. Tag lists occur
|
|
||||||
;; for variables like this: int var1, var2, var3;
|
|
||||||
;;
|
|
||||||
;; This will expand that to 3 tags that happen to share the
|
|
||||||
;; same overlay information.
|
|
||||||
(if (consp (semantic-tag-name tag))
|
|
||||||
(let ((rl (semantic-expand-c-tag-namelist tag)))
|
|
||||||
(cond
|
|
||||||
;; If this returns nothing, then return nil overall
|
|
||||||
;; because that will restore the old TAG input.
|
|
||||||
((not rl) (setq return-list nil))
|
|
||||||
;; If we have a return, append it to the existing list
|
|
||||||
;; of returns.
|
|
||||||
((consp rl)
|
|
||||||
(setq return-list (append rl return-list)))
|
|
||||||
))
|
|
||||||
;; If we didn't have a list, but the return-list is non-empty,
|
|
||||||
;; that means we still need to take our existing tag, and glom
|
|
||||||
;; it onto our extracted type.
|
|
||||||
(if (consp return-list)
|
|
||||||
(setq return-list (cons tag return-list)))
|
|
||||||
)
|
|
||||||
|
|
||||||
;; Default, don't change the tag means returning nil.
|
|
||||||
return-list))
|
|
||||||
|
|
||||||
(defun semantic-expand-c-tag-namelist (tag)
|
(defun semantic-expand-c-tag-namelist (tag)
|
||||||
"Expand TAG whose name is a list into a list of tags, or nil."
|
"Expand TAG whose name is a list into a list of tags, or nil."
|
||||||
|
|
@ -1238,6 +1456,22 @@ Override function for `semantic-tag-protection'."
|
||||||
'public
|
'public
|
||||||
nil))))
|
nil))))
|
||||||
|
|
||||||
|
(define-mode-local-override semantic-find-tags-included c-mode
|
||||||
|
(&optional table)
|
||||||
|
"Find all tags in TABLE that are of the 'include class.
|
||||||
|
TABLE is a tag table. See `semantic-something-to-tag-table'.
|
||||||
|
For C++, we also have to search namespaces for include tags."
|
||||||
|
(let ((tags (semantic-find-tags-by-class 'include table))
|
||||||
|
(namespaces (semantic-find-tags-by-type "namespace" table)))
|
||||||
|
(dolist (cur namespaces)
|
||||||
|
(setq tags
|
||||||
|
(append tags
|
||||||
|
(semantic-find-tags-by-class
|
||||||
|
'include
|
||||||
|
(semantic-tag-get-attribute cur :members)))))
|
||||||
|
tags))
|
||||||
|
|
||||||
|
|
||||||
(define-mode-local-override semantic-tag-components c-mode (tag)
|
(define-mode-local-override semantic-tag-components c-mode (tag)
|
||||||
"Return components for TAG."
|
"Return components for TAG."
|
||||||
(if (and (eq (semantic-tag-class tag) 'type)
|
(if (and (eq (semantic-tag-class tag) 'type)
|
||||||
|
|
@ -1342,7 +1576,7 @@ SCOPE is not used, and TYPE-DECLARATION is used only if TYPE is not a typedef."
|
||||||
(string= (semantic-tag-type type) "typedef"))
|
(string= (semantic-tag-type type) "typedef"))
|
||||||
(let ((dt (semantic-tag-get-attribute type :typedef)))
|
(let ((dt (semantic-tag-get-attribute type :typedef)))
|
||||||
(cond ((and (semantic-tag-p dt)
|
(cond ((and (semantic-tag-p dt)
|
||||||
(not (semantic-analyze-tag-prototype-p dt)))
|
(not (semantic-tag-prototype-p dt)))
|
||||||
;; In this case, DT was declared directly. We need
|
;; In this case, DT was declared directly. We need
|
||||||
;; to clone DT and apply a filename to it.
|
;; to clone DT and apply a filename to it.
|
||||||
(let* ((fname (semantic-tag-file-name type))
|
(let* ((fname (semantic-tag-file-name type))
|
||||||
|
|
@ -1656,6 +1890,58 @@ For types with a :parent, create faux namespaces to put TAG into."
|
||||||
;; Else, return tag unmodified.
|
;; Else, return tag unmodified.
|
||||||
tag)))
|
tag)))
|
||||||
|
|
||||||
|
(define-mode-local-override semanticdb-find-table-for-include c-mode
|
||||||
|
(includetag &optional table)
|
||||||
|
"For a single INCLUDETAG found in TABLE, find a `semanticdb-table' object
|
||||||
|
INCLUDETAG is a semantic TAG of class 'include.
|
||||||
|
TABLE is a semanticdb table that identifies where INCLUDETAG came from.
|
||||||
|
TABLE is optional if INCLUDETAG has an overlay of :filename attribute.
|
||||||
|
|
||||||
|
For C++, we also have to check if the include is inside a
|
||||||
|
namespace, since this means all tags inside this include will
|
||||||
|
have to be wrapped in that namespace."
|
||||||
|
(let ((inctable (semanticdb-find-table-for-include-default includetag table))
|
||||||
|
(inside-ns (semantic-tag-get-attribute includetag :inside-ns))
|
||||||
|
tags newtags namespaces prefix parenttable newtable)
|
||||||
|
(if (or (null inside-ns)
|
||||||
|
(not inctable)
|
||||||
|
(not (slot-boundp inctable 'tags)))
|
||||||
|
inctable
|
||||||
|
(when (and (eq inside-ns t)
|
||||||
|
;; Get the table which has this include.
|
||||||
|
(setq parenttable
|
||||||
|
(semanticdb-find-table-for-include-default
|
||||||
|
(semantic-tag-new-include
|
||||||
|
(semantic--tag-get-property includetag :filename) nil)))
|
||||||
|
table)
|
||||||
|
;; Find the namespace where this include is located.
|
||||||
|
(setq namespaces
|
||||||
|
(semantic-find-tags-by-type "namespace" parenttable))
|
||||||
|
(when (and namespaces
|
||||||
|
(slot-boundp inctable 'tags))
|
||||||
|
(dolist (cur namespaces)
|
||||||
|
(when (semantic-find-tags-by-name
|
||||||
|
(semantic-tag-name includetag)
|
||||||
|
(semantic-tag-get-attribute cur :members))
|
||||||
|
(setq inside-ns (semantic-tag-name cur))
|
||||||
|
;; Cache the namespace value.
|
||||||
|
(semantic-tag-put-attribute includetag :inside-ns inside-ns)))))
|
||||||
|
(unless (semantic-find-tags-by-name
|
||||||
|
inside-ns
|
||||||
|
(semantic-find-tags-by-type "namespace" inctable))
|
||||||
|
(setq tags (oref inctable tags))
|
||||||
|
;; Wrap tags inside namespace tag
|
||||||
|
(setq newtags
|
||||||
|
(list (semantic-tag-new-type inside-ns "namespace" tags nil)))
|
||||||
|
;; Create new semantic-table for the wrapped tags, since we don't want
|
||||||
|
;; the namespace to actually be a part of the header file.
|
||||||
|
(setq newtable (semanticdb-table "include with context"))
|
||||||
|
(oset newtable tags newtags)
|
||||||
|
(oset newtable parent-db (oref inctable parent-db))
|
||||||
|
(oset newtable file (oref inctable file)))
|
||||||
|
newtable)))
|
||||||
|
|
||||||
|
|
||||||
(define-mode-local-override semantic-get-local-variables c++-mode ()
|
(define-mode-local-override semantic-get-local-variables c++-mode ()
|
||||||
"Do what `semantic-get-local-variables' does, plus add `this' if needed."
|
"Do what `semantic-get-local-variables' does, plus add `this' if needed."
|
||||||
(let* ((origvar (semantic-get-local-variables-default))
|
(let* ((origvar (semantic-get-local-variables-default))
|
||||||
|
|
@ -1693,6 +1979,52 @@ For types with a :parent, create faux namespaces to put TAG into."
|
||||||
txt)
|
txt)
|
||||||
(semantic-idle-summary-current-symbol-info-default))))
|
(semantic-idle-summary-current-symbol-info-default))))
|
||||||
|
|
||||||
|
(define-mode-local-override semantic--tag-similar-names-p c-mode (tag1 tag2 blankok)
|
||||||
|
"Compare the names of TAG1 and TAG2.
|
||||||
|
If BLANKOK is false, then the names must exactly match.
|
||||||
|
If BLANKOK is true, then always return t, as for C, the names don't matter
|
||||||
|
for arguments compared."
|
||||||
|
(if blankok t (semantic--tag-similar-names-p-default tag1 tag2 nil)))
|
||||||
|
|
||||||
|
(define-mode-local-override semantic--tag-similar-types-p c-mode (tag1 tag2)
|
||||||
|
"For c-mode, deal with TAG1 and TAG2 being used in different namespaces.
|
||||||
|
In this case, one type will be shorter than the other. Instead
|
||||||
|
of fully resolving all namespaces currently in scope for both
|
||||||
|
types, we simply compare as many elements as the shorter type
|
||||||
|
provides."
|
||||||
|
;; First, we see if the default method fails
|
||||||
|
(if (semantic--tag-similar-types-p-default tag1 tag2)
|
||||||
|
t
|
||||||
|
(let* ((names
|
||||||
|
(mapcar
|
||||||
|
(lambda (tag)
|
||||||
|
(let ((type (semantic-tag-type tag)))
|
||||||
|
(unless (stringp type)
|
||||||
|
(setq type (semantic-tag-name type)))
|
||||||
|
(setq type (semantic-analyze-split-name type))
|
||||||
|
(when (stringp type)
|
||||||
|
(setq type (list type)))
|
||||||
|
type))
|
||||||
|
(list tag1 tag2)))
|
||||||
|
(len1 (length (car names)))
|
||||||
|
(len2 (length (cadr names))))
|
||||||
|
(cond
|
||||||
|
((<= len1 len2)
|
||||||
|
(equal (nthcdr len1 (cadr names)) (car names)))
|
||||||
|
((< len2 len1)
|
||||||
|
(equal (nthcdr len2 (car names)) (cadr names)))))))
|
||||||
|
|
||||||
|
|
||||||
|
(define-mode-local-override semantic--tag-attribute-similar-p c-mode
|
||||||
|
(attr value1 value2 ignorable-attributes)
|
||||||
|
"For c-mode, allow function :arguments to ignore the :name attributes."
|
||||||
|
(cond ((eq attr :arguments)
|
||||||
|
(semantic--tag-attribute-similar-p-default attr value1 value2
|
||||||
|
(cons :name ignorable-attributes)))
|
||||||
|
(t
|
||||||
|
(semantic--tag-attribute-similar-p-default attr value1 value2
|
||||||
|
ignorable-attributes))))
|
||||||
|
|
||||||
(defvar-mode-local c-mode semantic-orphaned-member-metaparent-type "struct"
|
(defvar-mode-local c-mode semantic-orphaned-member-metaparent-type "struct"
|
||||||
"When lost members are found in the class hierarchy generator, use a struct.")
|
"When lost members are found in the class hierarchy generator, use a struct.")
|
||||||
|
|
||||||
|
|
@ -1725,6 +2057,12 @@ For types with a :parent, create faux namespaces to put TAG into."
|
||||||
(defvar-mode-local c-mode senator-step-at-tag-classes '(function variable)
|
(defvar-mode-local c-mode senator-step-at-tag-classes '(function variable)
|
||||||
"Tag classes where senator will stop at the end.")
|
"Tag classes where senator will stop at the end.")
|
||||||
|
|
||||||
|
(defvar-mode-local c-mode semantic-tag-similar-ignorable-attributes
|
||||||
|
'(:prototype-flag :parent :typemodifiers)
|
||||||
|
"Tag attributes to ignore during similarity tests.
|
||||||
|
:parent is here because some tags might specify a parent, while others are
|
||||||
|
actually in their parent which is not accessible.")
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun semantic-default-c-setup ()
|
(defun semantic-default-c-setup ()
|
||||||
"Set up a buffer for semantic parsing of the C language."
|
"Set up a buffer for semantic parsing of the C language."
|
||||||
|
|
@ -1736,6 +2074,8 @@ For types with a :parent, create faux namespaces to put TAG into."
|
||||||
|
|
||||||
(setq semantic-lex-analyzer #'semantic-c-lexer)
|
(setq semantic-lex-analyzer #'semantic-c-lexer)
|
||||||
(add-hook 'semantic-lex-reset-hooks 'semantic-lex-spp-reset-hook nil t)
|
(add-hook 'semantic-lex-reset-hooks 'semantic-lex-spp-reset-hook nil t)
|
||||||
|
(when (eq major-mode 'c++-mode)
|
||||||
|
(add-to-list 'semantic-lex-c-preprocessor-symbol-map '("__cplusplus" . "")))
|
||||||
)
|
)
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
|
|
@ -1759,7 +2099,7 @@ For types with a :parent, create faux namespaces to put TAG into."
|
||||||
(defun semantic-c-describe-environment ()
|
(defun semantic-c-describe-environment ()
|
||||||
"Describe the Semantic features of the current C environment."
|
"Describe the Semantic features of the current C environment."
|
||||||
(interactive)
|
(interactive)
|
||||||
(if (not (or (eq major-mode 'c-mode) (eq major-mode 'c++-mode)))
|
(if (not (member 'c-mode (mode-local-equivalent-mode-p major-mode)))
|
||||||
(error "Not useful to query C mode in %s mode" major-mode))
|
(error "Not useful to query C mode in %s mode" major-mode))
|
||||||
(let ((gcc (when (boundp 'semantic-gcc-setup-data)
|
(let ((gcc (when (boundp 'semantic-gcc-setup-data)
|
||||||
semantic-gcc-setup-data))
|
semantic-gcc-setup-data))
|
||||||
|
|
@ -1780,13 +2120,20 @@ For types with a :parent, create faux namespaces to put TAG into."
|
||||||
(princ "\n\nInclude Path Summary:\n")
|
(princ "\n\nInclude Path Summary:\n")
|
||||||
(when (and (boundp 'ede-object) ede-object)
|
(when (and (boundp 'ede-object) ede-object)
|
||||||
(princ "\n This file's project include is handled by:\n")
|
(princ "\n This file's project include is handled by:\n")
|
||||||
(princ " ")
|
(let ((objs (if (listp ede-object)
|
||||||
(princ (object-print ede-object))
|
ede-object
|
||||||
|
(list ede-object))))
|
||||||
|
(dolist (O objs)
|
||||||
|
(princ " EDE : ")
|
||||||
|
(princ (object-print O))
|
||||||
|
(let ((ipath (ede-system-include-path O)))
|
||||||
|
(if (not ipath)
|
||||||
|
(princ "\n with NO specified system include path.\n")
|
||||||
(princ "\n with the system path:\n")
|
(princ "\n with the system path:\n")
|
||||||
(dolist (dir (ede-system-include-path ede-object))
|
(dolist (dir ipath)
|
||||||
(princ " ")
|
(princ " ")
|
||||||
(princ dir)
|
(princ dir)
|
||||||
(princ "\n"))
|
(princ "\n"))))))
|
||||||
)
|
)
|
||||||
|
|
||||||
(when semantic-dependency-include-path
|
(when semantic-dependency-include-path
|
||||||
|
|
|
||||||
|
|
@ -944,8 +944,6 @@ ELisp variables can be pretty long, so track this one too.")
|
||||||
"Setup hook function for Emacs Lisp files and Semantic."
|
"Setup hook function for Emacs Lisp files and Semantic."
|
||||||
)
|
)
|
||||||
|
|
||||||
(add-hook 'emacs-lisp-mode-hook 'semantic-default-elisp-setup)
|
|
||||||
|
|
||||||
;;; LISP MODE
|
;;; LISP MODE
|
||||||
;;
|
;;
|
||||||
;; @TODO: Lisp supports syntaxes that Emacs Lisp does not.
|
;; @TODO: Lisp supports syntaxes that Emacs Lisp does not.
|
||||||
|
|
@ -956,7 +954,7 @@ ELisp variables can be pretty long, so track this one too.")
|
||||||
;;
|
;;
|
||||||
(add-hook 'lisp-mode-hook 'semantic-default-elisp-setup)
|
(add-hook 'lisp-mode-hook 'semantic-default-elisp-setup)
|
||||||
|
|
||||||
(eval-after-load "semanticdb"
|
(eval-after-load "semantic/db"
|
||||||
'(require 'semantic/db-el)
|
'(require 'semantic/db-el)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue