Mercurial > emacs
comparison lisp/emacs-lisp/lisp-mode.el @ 105744:b0a732611398
* keymap.c (Fmake_sparse_keymap): Purecopy the name.
* eval.c (Fautoload): Purecopy the filename. Simplify.
* category.c (Fdefine_category): Purecopy docstring.
* international/mule-cmds.el (set-language-info-alist): Purecopy lang-env.
(leim-list-header, leim-list-entry-regexp): Change defvars to defconst.
(charset): Purecopy the name.
(define-char-code-property): Purecopy string arguments.
* emacs-lisp/byte-run.el (make-obsolete, make-obsolete-variable):
Purecopy string arguments.
* emacs-lisp/lisp-mode.el (emacs-lisp-mode-map):
* ediff-hook.el (menu-bar-ediff-menu):
* buff-menu.el (Buffer-menu-mode-map): Purecopy names and tooltips.
* bookmark.el (menu-bar-bookmark-map): Add :help and purecopy the name.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Sat, 24 Oct 2009 06:32:03 +0000 |
parents | 6a6fcf3e8e4d |
children | db5e4a5897ec |
comparison
equal
deleted
inserted
replaced
105743:f8478bbd8ebe | 105744:b0a732611398 |
---|---|
283 (define-key map "\e\t" 'lisp-complete-symbol) | 283 (define-key map "\e\t" 'lisp-complete-symbol) |
284 (define-key map "\e\C-x" 'eval-defun) | 284 (define-key map "\e\C-x" 'eval-defun) |
285 (define-key map "\e\C-q" 'indent-pp-sexp) | 285 (define-key map "\e\C-q" 'indent-pp-sexp) |
286 (define-key map [menu-bar emacs-lisp] (cons "Emacs-Lisp" menu-map)) | 286 (define-key map [menu-bar emacs-lisp] (cons "Emacs-Lisp" menu-map)) |
287 (define-key menu-map [eldoc] | 287 (define-key menu-map [eldoc] |
288 '(menu-item "Auto-Display Documentation Strings" eldoc-mode | 288 `(menu-item ,(purecopy "Auto-Display Documentation Strings") eldoc-mode |
289 :button (:toggle . (bound-and-true-p eldoc-mode)) | 289 :button (:toggle . (bound-and-true-p eldoc-mode)) |
290 :help "Display the documentation string for the item under cursor")) | 290 :help ,(purecopy "Display the documentation string for the item under cursor"))) |
291 (define-key menu-map [checkdoc] | 291 (define-key menu-map [checkdoc] |
292 '(menu-item "Check Documentation Strings" checkdoc | 292 `(menu-item ,(purecopy "Check Documentation Strings") checkdoc |
293 :help "Check documentation strings for style requirements")) | 293 :help ,(purecopy "Check documentation strings for style requirements"))) |
294 (define-key menu-map [re-builder] | 294 (define-key menu-map [re-builder] |
295 '(menu-item "Construct Regexp" re-builder | 295 `(menu-item ,(purecopy "Construct Regexp") re-builder |
296 :help "Construct a regexp interactively")) | 296 :help ,(purecopy "Construct a regexp interactively"))) |
297 (define-key menu-map [tracing] (cons "Tracing" tracing-map)) | 297 (define-key menu-map [tracing] (cons "Tracing" tracing-map)) |
298 (define-key tracing-map [tr-a] | 298 (define-key tracing-map [tr-a] |
299 '(menu-item "Untrace all" untrace-all | 299 `(menu-item ,(purecopy "Untrace all") untrace-all |
300 :help "Untrace all currently traced functions")) | 300 :help ,(purecopy "Untrace all currently traced functions"))) |
301 (define-key tracing-map [tr-uf] | 301 (define-key tracing-map [tr-uf] |
302 '(menu-item "Untrace function..." untrace-function | 302 `(menu-item ,(purecopy "Untrace function...") untrace-function |
303 :help "Untrace function, and possibly activate all remaining advice")) | 303 :help ,(purecopy "Untrace function, and possibly activate all remaining advice"))) |
304 (define-key tracing-map [tr-sep] '("--")) | 304 (define-key tracing-map [tr-sep] '("--")) |
305 (define-key tracing-map [tr-q] | 305 (define-key tracing-map [tr-q] |
306 '(menu-item "Trace function quietly..." trace-function-background | 306 `(menu-item ,(purecopy "Trace function quietly...") trace-function-background |
307 :help "Trace the function with trace output going quietly to a buffer")) | 307 :help ,(purecopy "Trace the function with trace output going quietly to a buffer"))) |
308 (define-key tracing-map [tr-f] | 308 (define-key tracing-map [tr-f] |
309 '(menu-item "Trace function..." trace-function | 309 `(menu-item ,(purecopy "Trace function...") trace-function |
310 :help "Trace the function given as an argument")) | 310 :help ,(purecopy "Trace the function given as an argument"))) |
311 (define-key menu-map [profiling] (cons "Profiling" prof-map)) | 311 (define-key menu-map [profiling] (cons "Profiling" prof-map)) |
312 (define-key prof-map [prof-restall] | 312 (define-key prof-map [prof-restall] |
313 '(menu-item "Remove Instrumentation for All Functions" elp-restore-all | 313 `(menu-item ,(purecopy "Remove Instrumentation for All Functions") elp-restore-all |
314 :help "Restore the original definitions of all functions being profiled")) | 314 :help ,(purecopy "Restore the original definitions of all functions being profiled"))) |
315 (define-key prof-map [prof-restfunc] | 315 (define-key prof-map [prof-restfunc] |
316 '(menu-item "Remove Instrumentation for Function..." elp-restore-function | 316 `(menu-item ,(purecopy "Remove Instrumentation for Function...") elp-restore-function |
317 :help "Restore an instrumented function to its original definition")) | 317 :help ,(purecopy "Restore an instrumented function to its original definition"))) |
318 | 318 |
319 (define-key prof-map [sep-rem] '("--")) | 319 (define-key prof-map [sep-rem] '("--")) |
320 (define-key prof-map [prof-resall] | 320 (define-key prof-map [prof-resall] |
321 '(menu-item "Reset Counters for All Functions" elp-reset-all | 321 `(menu-item ,(purecopy "Reset Counters for All Functions") elp-reset-all |
322 :help "Reset the profiling information for all functions being profiled")) | 322 :help ,(purecopy "Reset the profiling information for all functions being profiled"))) |
323 (define-key prof-map [prof-resfunc] | 323 (define-key prof-map [prof-resfunc] |
324 '(menu-item "Reset Counters for Function..." elp-reset-function | 324 `(menu-item ,(purecopy "Reset Counters for Function...") elp-reset-function |
325 :help "Reset the profiling information for a function")) | 325 :help ,(purecopy "Reset the profiling information for a function"))) |
326 (define-key prof-map [prof-res] | 326 (define-key prof-map [prof-res] |
327 '(menu-item "Show Profiling Results" elp-results | 327 `(menu-item ,(purecopy "Show Profiling Results") elp-results |
328 :help "Display current profiling results")) | 328 :help ,(purecopy "Display current profiling results"))) |
329 (define-key prof-map [prof-pack] | 329 (define-key prof-map [prof-pack] |
330 '(menu-item "Instrument Package..." elp-instrument-package | 330 `(menu-item ,(purecopy "Instrument Package...") elp-instrument-package |
331 :help "Instrument for profiling all function that start with a prefix")) | 331 :help ,(purecopy "Instrument for profiling all function that start with a prefix"))) |
332 (define-key prof-map [prof-func] | 332 (define-key prof-map [prof-func] |
333 '(menu-item "Instrument Function..." elp-instrument-function | 333 `(menu-item ,(purecopy "Instrument Function...") elp-instrument-function |
334 :help "Instrument a function for profiling")) | 334 :help ,(purecopy "Instrument a function for profiling"))) |
335 (define-key menu-map [lint] (cons "Linting" lint-map)) | 335 (define-key menu-map [lint] (cons "Linting" lint-map)) |
336 (define-key lint-map [lint-di] | 336 (define-key lint-map [lint-di] |
337 '(menu-item "Lint Directory..." elint-directory | 337 `(menu-item ,(purecopy "Lint Directory...") elint-directory |
338 :help "Lint a directory")) | 338 :help ,(purecopy "Lint a directory"))) |
339 (define-key lint-map [lint-f] | 339 (define-key lint-map [lint-f] |
340 '(menu-item "Lint File..." elint-file | 340 `(menu-item ,(purecopy "Lint File...") elint-file |
341 :help "Lint a file")) | 341 :help ,(purecopy "Lint a file"))) |
342 (define-key lint-map [lint-b] | 342 (define-key lint-map [lint-b] |
343 '(menu-item "Lint Buffer" elint-current-buffer | 343 `(menu-item ,(purecopy "Lint Buffer") elint-current-buffer |
344 :help "Lint the current buffer")) | 344 :help ,(purecopy "Lint the current buffer"))) |
345 (define-key lint-map [lint-d] | 345 (define-key lint-map [lint-d] |
346 '(menu-item "Lint Defun" elint-defun | 346 `(menu-item ,(purecopy "Lint Defun") elint-defun |
347 :help "Lint the function at point")) | 347 :help ,(purecopy "Lint the function at point"))) |
348 (define-key menu-map [edebug-defun] | 348 (define-key menu-map [edebug-defun] |
349 '(menu-item "Instrument Function for Debugging" edebug-defun | 349 `(menu-item ,(purecopy "Instrument Function for Debugging") edebug-defun |
350 :help "Evaluate the top level form point is in, stepping through with Edebug" | 350 :help ,(purecopy "Evaluate the top level form point is in, stepping through with Edebug") |
351 :keys "C-u C-M-x")) | 351 :keys "C-u C-M-x")) |
352 (define-key menu-map [separator-byte] '("--")) | 352 (define-key menu-map [separator-byte] '("--")) |
353 (define-key menu-map [disas] | 353 (define-key menu-map [disas] |
354 '(menu-item "Disassemble byte compiled object..." disassemble | 354 `(menu-item ,(purecopy "Disassemble byte compiled object...") disassemble |
355 :help "Print disassembled code for OBJECT in a buffer")) | 355 :help ,(purecopy "Print disassembled code for OBJECT in a buffer"))) |
356 (define-key menu-map [byte-recompile] | 356 (define-key menu-map [byte-recompile] |
357 '(menu-item "Byte-recompile Directory..." byte-recompile-directory | 357 `(menu-item ,(purecopy "Byte-recompile Directory...") byte-recompile-directory |
358 :help "Recompile every `.el' file in DIRECTORY that needs recompilation")) | 358 :help ,(purecopy "Recompile every `.el' file in DIRECTORY that needs recompilation"))) |
359 (define-key menu-map [emacs-byte-compile-and-load] | 359 (define-key menu-map [emacs-byte-compile-and-load] |
360 '(menu-item "Byte-compile And Load" emacs-lisp-byte-compile-and-load | 360 `(menu-item ,(purecopy "Byte-compile And Load") emacs-lisp-byte-compile-and-load |
361 :help "Byte-compile the current file (if it has changed), then load compiled code")) | 361 :help ,(purecopy "Byte-compile the current file (if it has changed), then load compiled code"))) |
362 (define-key menu-map [byte-compile] | 362 (define-key menu-map [byte-compile] |
363 '(menu-item "Byte-compile This File" emacs-lisp-byte-compile | 363 `(menu-item ,(purecopy "Byte-compile This File") emacs-lisp-byte-compile |
364 :help "Byte compile the file containing the current buffer")) | 364 :help ,(purecopy "Byte compile the file containing the current buffer"))) |
365 (define-key menu-map [separator-eval] '("--")) | 365 (define-key menu-map [separator-eval] '("--")) |
366 (define-key menu-map [ielm] | 366 (define-key menu-map [ielm] |
367 '(menu-item "Interactive Expression Evaluation" ielm | 367 `(menu-item ,(purecopy "Interactive Expression Evaluation") ielm |
368 :help "Interactively evaluate Emacs Lisp expressions")) | 368 :help ,(purecopy "Interactively evaluate Emacs Lisp expressions"))) |
369 (define-key menu-map [eval-buffer] | 369 (define-key menu-map [eval-buffer] |
370 '(menu-item "Evaluate Buffer" eval-buffer | 370 `(menu-item ,(purecopy "Evaluate Buffer") eval-buffer |
371 :help "Execute the current buffer as Lisp code")) | 371 :help ,(purecopy "Execute the current buffer as Lisp code"))) |
372 (define-key menu-map [eval-region] | 372 (define-key menu-map [eval-region] |
373 '(menu-item "Evaluate Region" eval-region | 373 `(menu-item ,(purecopy "Evaluate Region") eval-region |
374 :help "Execute the region as Lisp code" | 374 :help ,(purecopy "Execute the region as Lisp code") |
375 :enable mark-active)) | 375 :enable mark-active)) |
376 (define-key menu-map [eval-sexp] | 376 (define-key menu-map [eval-sexp] |
377 '(menu-item "Evaluate Last S-expression" eval-last-sexp | 377 `(menu-item ,(purecopy "Evaluate Last S-expression") eval-last-sexp |
378 :help "Evaluate sexp before point; print value in minibuffer")) | 378 :help ,(purecopy "Evaluate sexp before point; print value in minibuffer"))) |
379 (define-key menu-map [separator-format] '("--")) | 379 (define-key menu-map [separator-format] '("--")) |
380 (define-key menu-map [comment-region] | 380 (define-key menu-map [comment-region] |
381 '(menu-item "Comment Out Region" comment-region | 381 `(menu-item ,(purecopy "Comment Out Region") comment-region |
382 :help "Comment or uncomment each line in the region" | 382 :help ,(purecopy "Comment or uncomment each line in the region") |
383 :enable mark-active)) | 383 :enable mark-active)) |
384 (define-key menu-map [indent-region] | 384 (define-key menu-map [indent-region] |
385 '(menu-item "Indent Region" indent-region | 385 `(menu-item ,(purecopy "Indent Region") indent-region |
386 :help "Indent each nonblank line in the region" | 386 :help ,(purecopy "Indent each nonblank line in the region") |
387 :enable mark-active)) | 387 :enable mark-active)) |
388 (define-key menu-map [indent-line] '("Indent Line" . lisp-indent-line)) | 388 (define-key menu-map [indent-line] '("Indent Line" . lisp-indent-line)) |
389 map) | 389 map) |
390 "Keymap for Emacs Lisp mode. | 390 "Keymap for Emacs Lisp mode. |
391 All commands in `lisp-mode-shared-map' are inherited by this map.") | 391 All commands in `lisp-mode-shared-map' are inherited by this map.") |
456 (set-keymap-parent map lisp-mode-shared-map) | 456 (set-keymap-parent map lisp-mode-shared-map) |
457 (define-key map "\e\C-x" 'lisp-eval-defun) | 457 (define-key map "\e\C-x" 'lisp-eval-defun) |
458 (define-key map "\C-c\C-z" 'run-lisp) | 458 (define-key map "\C-c\C-z" 'run-lisp) |
459 (define-key map [menu-bar lisp] (cons "Lisp" menu-map)) | 459 (define-key map [menu-bar lisp] (cons "Lisp" menu-map)) |
460 (define-key menu-map [run-lisp] | 460 (define-key menu-map [run-lisp] |
461 '(menu-item "Run inferior Lisp" run-lisp | 461 `(menu-item ,(purecopy "Run inferior Lisp") run-lisp |
462 :help "Run an inferior Lisp process, input and output via buffer `*inferior-lisp*'")) | 462 :help ,(purecopy "Run an inferior Lisp process, input and output via buffer `*inferior-lisp*'"))) |
463 (define-key menu-map [ev-def] | 463 (define-key menu-map [ev-def] |
464 '(menu-item "Eval defun" lisp-eval-defun | 464 `(menu-item ,(purecopy "Eval defun") lisp-eval-defun |
465 :help "Send the current defun to the Lisp process made by M-x run-lisp")) | 465 :help ,(purecopy "Send the current defun to the Lisp process made by M-x run-lisp"))) |
466 (define-key menu-map [ind-sexp] | 466 (define-key menu-map [ind-sexp] |
467 '(menu-item "Indent sexp" indent-sexp | 467 `(menu-item ,(purecopy "Indent sexp") indent-sexp |
468 :help "Indent each line of the list starting just after point")) | 468 :help ,(purecopy "Indent each line of the list starting just after point"))) |
469 map) | 469 map) |
470 "Keymap for ordinary Lisp mode. | 470 "Keymap for ordinary Lisp mode. |
471 All commands in `lisp-mode-shared-map' are inherited by this map.") | 471 All commands in `lisp-mode-shared-map' are inherited by this map.") |
472 | 472 |
473 (defun lisp-mode () | 473 (defun lisp-mode () |
520 (define-key map "\e\C-q" 'indent-pp-sexp) | 520 (define-key map "\e\C-q" 'indent-pp-sexp) |
521 (define-key map "\e\t" 'lisp-complete-symbol) | 521 (define-key map "\e\t" 'lisp-complete-symbol) |
522 (define-key map "\n" 'eval-print-last-sexp) | 522 (define-key map "\n" 'eval-print-last-sexp) |
523 (define-key map [menu-bar lisp-interaction] (cons "Lisp-Interaction" menu-map)) | 523 (define-key map [menu-bar lisp-interaction] (cons "Lisp-Interaction" menu-map)) |
524 (define-key menu-map [eval-defun] | 524 (define-key menu-map [eval-defun] |
525 '(menu-item "Evaluate Defun" eval-defun | 525 `(menu-item ,(purecopy "Evaluate Defun") eval-defun |
526 :help "Evaluate the top-level form containing point, or after point")) | 526 :help ,(purecopy "Evaluate the top-level form containing point, or after point"))) |
527 (define-key menu-map [eval-print-last-sexp] | 527 (define-key menu-map [eval-print-last-sexp] |
528 '(menu-item "Evaluate and print" eval-print-last-sexp | 528 `(menu-item ,(purecopy "Evaluate and print") eval-print-last-sexp |
529 :help "Evaluate sexp before point; print value into current buffer")) | 529 :help ,(purecopy "Evaluate sexp before point; print value into current buffer"))) |
530 (define-key menu-map [edebug-defun-lisp-interaction] | 530 (define-key menu-map [edebug-defun-lisp-interaction] |
531 '(menu-item "Instrument Function for Debugging" edebug-defun | 531 `(menu-item ,(purecopy "Instrument Function for Debugging") edebug-defun |
532 :help "Evaluate the top level form point is in, stepping through with Edebug" | 532 :help ,(purecopy "Evaluate the top level form point is in, stepping through with Edebug") |
533 :keys "C-u C-M-x")) | 533 :keys "C-u C-M-x")) |
534 (define-key menu-map [indent-pp-sexp] | 534 (define-key menu-map [indent-pp-sexp] |
535 '(menu-item "Indent or Pretty-Print" indent-pp-sexp | 535 `(menu-item ,(purecopy "Indent or Pretty-Print") indent-pp-sexp |
536 :help "Indent each line of the list starting just after point, or prettyprint it")) | 536 :help ,(purecopy "Indent each line of the list starting just after point, or prettyprint it"))) |
537 (define-key menu-map [lisp-complete-symbol] | 537 (define-key menu-map [lisp-complete-symbol] |
538 '(menu-item "Complete Lisp Symbol" lisp-complete-symbol | 538 `(menu-item ,(purecopy "Complete Lisp Symbol") lisp-complete-symbol |
539 :help "Perform completion on Lisp symbol preceding point")) | 539 :help ,(purecopy "Perform completion on Lisp symbol preceding point"))) |
540 map) | 540 map) |
541 "Keymap for Lisp Interaction mode. | 541 "Keymap for Lisp Interaction mode. |
542 All commands in `lisp-mode-shared-map' are inherited by this map.") | 542 All commands in `lisp-mode-shared-map' are inherited by this map.") |
543 | 543 |
544 (defvar lisp-interaction-mode-abbrev-table lisp-mode-abbrev-table) | 544 (defvar lisp-interaction-mode-abbrev-table lisp-mode-abbrev-table) |