Mercurial > hg > xemacs-beta
comparison lisp/cmdloop.el @ 4806:fd36a980d701
Use uninterned symbols in various information-hiding contexts.
lisp/ChangeLog addition:
2010-01-01 Aidan Kehoe <kehoea@parhasard.net>
* syntax.el (map-syntax-table):
* subr.el (map-plist):
* startup.el (load-init-file):
* minibuf.el (read-from-minbuffer):
* cus-edit.el (custom-load-custom-defines-1):
* cmdloop.el (execute-extended-command):
Replace symbol names using underscore, whether to avoid dynamic
scope problems or to ensure helpful arguments to
#'call-with-condition-handler, with uninterned symbols.
src/ChangeLog addition:
2010-01-01 Aidan Kehoe <kehoea@parhasard.net>
* mule-charset.c (Fmake_charset):
Don't intern the symbols used to refer to temporary character
sets, that doesn't bring us anything.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Fri, 01 Jan 2010 19:45:39 +0000 |
parents | 38ef5a6da799 |
children | 9fa29ec759e3 |
comparison
equal
deleted
inserted
replaced
4767:dba492ef7440 | 4806:fd36a980d701 |
---|---|
342 "M-x "))))) | 342 "M-x "))))) |
343 | 343 |
344 (if (and teach-extended-commands-p | 344 (if (and teach-extended-commands-p |
345 (interactive-p)) | 345 (interactive-p)) |
346 ;; Remember the keys, run the command, and show the keys (if | 346 ;; Remember the keys, run the command, and show the keys (if |
347 ;; any). The funny variable names are a poor man's guarantee | 347 ;; any). The symbol-macrolet avoids some lexical-scope lossage. |
348 ;; that we don't get tripped by this-command doing something | 348 (symbol-macrolet |
349 ;; funny. Quoth our forefathers: "We want lexical scope!" | 349 ((execute-command-keys #:execute-command-keys) |
350 (let ((_execute_command_keys_ (where-is-internal this-command)) | 350 (execute-command-name #:execute-command-name)) |
351 (_execute_command_name_ this-command)) ; the name can change | 351 (let ((execute-command-keys (where-is-internal this-command)) |
352 (command-execute this-command t) | 352 (execute-command-name this-command)) ; the name can change |
353 (when _execute_command_keys_ | 353 (command-execute this-command t) |
354 ;; Normally the region is adjusted in post_command_hook; | 354 (when execute-command-keys |
355 ;; however, it is not called until after we finish. It | 355 ;; Normally the region is adjusted in post_command_hook; |
356 ;; looks ugly for the region to get updated after the | 356 ;; however, it is not called until after we finish. It |
357 ;; delays, so we do it now. The code below is a Lispified | 357 ;; looks ugly for the region to get updated after the |
358 ;; copy of code in event-stream.c:post_command_hook(). | 358 ;; delays, so we do it now. The code below is a Lispified |
359 (if (and (not zmacs-region-stays) | 359 ;; copy of code in event-stream.c:post_command_hook(). |
360 (or (not (eq (selected-window) (minibuffer-window))) | 360 (if (and (not zmacs-region-stays) |
361 (eq (zmacs-region-buffer) (current-buffer)))) | 361 (or (not (eq (selected-window) (minibuffer-window))) |
362 (zmacs-deactivate-region) | 362 (eq (zmacs-region-buffer) (current-buffer)))) |
363 (zmacs-update-region)) | 363 (zmacs-deactivate-region) |
364 ;; Wait for a while, so the user can see a message printed, | 364 (zmacs-update-region)) |
365 ;; if any. | 365 ;; Wait for a while, so the user can see a message printed, |
366 (when (sit-for 1) | 366 ;; if any. |
367 (display-message | 367 (when (sit-for 1) |
368 'no-log | 368 (display-message |
369 (format (if (cdr _execute_command_keys_) | 369 'no-log |
370 "Command `%s' is bound to keys: %s" | 370 (format (if (cdr execute-command-keys) |
371 "Command `%s' is bound to key: %s") | 371 "Command `%s' is bound to keys: %s" |
372 _execute_command_name_ | 372 "Command `%s' is bound to key: %s") |
373 (sorted-key-descriptions _execute_command_keys_))) | 373 execute-command-name |
374 (sit-for teach-extended-commands-timeout) | 374 (sorted-key-descriptions execute-command-keys))) |
375 (clear-message 'no-log)))) | 375 (sit-for teach-extended-commands-timeout) |
376 (clear-message 'no-log))))) | |
376 ;; Else, just run the command. | 377 ;; Else, just run the command. |
377 (command-execute this-command t))) | 378 (command-execute this-command t))) |
378 | 379 |
379 | 380 |
380 ;;; C code calls this; the underscores in the variable names are to avoid | 381 ;;; C code calls this; the underscores in the variable names are to avoid |