xtodo emacs

;; add to tutorial
;; way to define a new face for ur mode but borrow existing
(defface css-selector '((t :inherit font-lock-function-name-face))
  "Face to use for selectors."
  :group 'css)

most important

emacs to review

code update

xah html mode command changes:

This command was named xah-html-wrap-p-tag. Changed around 2021-08-17.

review

work on emacs lisp

find in emacs doc and read • char-fold-to-regexpchar-fold-includesearch-default-modeisearch-toggle-char-foldisearch-toggle-case-foldisearch-toggle-lax-whitespacedabbrev-completionchar-fold-symmetric

emacs lisp XahEmacs key design

2021-08-08 notes. designing a key system for whole XahEmacs

now, with XahEmacs, several packages, with xah-fly-keys system, there needs to be a scheme for the leader keys. For example, gnu emacs has Emacs Keys Overview. I needd a scheme for XahEmacs, so the whole is consistant, as a secondary requirement to key efficiency and ergonomics.

here's outline of current xah-fly-keys

..[hilight]  p.replace       g.close c.[open]
e.[insert] u.switchBuff     h.[help] t.[edit]
j.copyAll k.pasteOrPrev     m.diredJump w.[eval/del]

emacs website minor

2021-08-16 need to update these, and put them into emacs lisp example

Tags

Links

CSS

Misc

elisp format 2022-03-24
elisp format 2022-03-24
(setq xNormalList
      '(("mary" 23)
        ("john" 24)
        ("smith" 33)))

(setq xAssoList
      '(("mary" . 23)
        ("john" . 24)
        ("smith" . 33)))

(proper-list-p (nth 0 xNormalList) )
;; 1

(proper-list-p (nth 0 xAssoList))
;; nil

(cdr (car xNormalList))
;; (23)
(cdr (car xAssoList))
;; 23

;; in a normal proper list, each element, if u want it to be pairs, is
;; (cons a (cons b nil))

;; item in a asso list is
;; (cons a b)

Another issue I just now noticed is that enabling and disabling `xah-fly-keys' is not idempotent (as most people would assume it to be), since the global map is manipulated. The user options `xah-fly-use-control-key' and `xah-fly-use-meta-key' should probably have custom :set properties added that manipulate `xah-fly-keys-map', and binding #'undefined instead of nil.

Rather than using `global-set-key` another option (since Emacs-24) is to keep the package's global bindings on a separate keymap which is then added/removed from the global map when enabling/disabling the mode.

The basic idea could look like:

(cond
    (enabling
     (unless (memq xah-fly-keys-global-map global-map) ;; Already done
       (unless (keymap-parent global-map)
         ;; Separate the default part of the global map from the user's
         ;; own changes that might occur later.
         (setq global-map (make-composed-keymap nil global-map)))
       ;; Add `xah-fly-keys-global-map' so that it takes precedence over
       ;; the main part of `global-map' but not over the user's own settings.
       (set-keymap-parent global-map
                          (make-composed-keymap xah-fly-keys-global-map
                                                (keymap-parent global-map)))))
    (disabling
     ;; FIXME: Repeated enable/disable will keep adding a `keymap` symbol
     ;; to the map :-(
     (setq global-map (delq xah-fly-keys-global-map global-map)))