Skip to main content
added 577 characters in body
Source Link
Drew
  • 79.1k
  • 10
  • 123
  • 257
  1. There is no GNU Emacs convention wrt case for Emacs-Lisp function and variable names. (There can be any number of such "conventions" that anyone could come up with, of course.)

  2. The "Emacs Lisp Style Guide" that you reference is just one person's proposed guidelines.

  3. A (very) few longstanding libraries distributed with Emacs do use two styles that you mentioned: Some names are title-case (capitalized) and some are lowercase.

    In some cases, at least originally, a distinction was made between names of commands and customizable variables intended forthat it is expected might be typed by users to type(e.g., for M-x or C-h f), and names of non-interactive functions and variables intendedthat are expected to be bound toinvoked mainly by keys or invoked from Lisp code. But

    But this has not been adopted/respected generally, and it has not always been implemented consistently. It typically applies to particular modes (e.g. Info-mode) where there are lots of commands that a user is not expected to input by name.

    For example, the commands in buff-menu.el that are expected to be invoked mainly by M-x are lowercase (for typing convenience), and the commands that are bound to keys in the buffer-list display are capitalized, as are other objects in the library (variables, non-interactive functions, etc.). Someone thought this was

    Such libraries are a great idea at one point, and it has remained in place insmall minority (hence the doc says that libraryusually function and variable names are lowercase). But such librariesthe logic behind this design by RMS 30 years ago is still valid today. The idea is to simplify choices (and typing) for commands that you might invoke using M-x, by excluding commands that are useful only in a small minorityparticular buffer and are bound to keys there. So Info-prev-reference (bound to C-M-i in Info), but info-apropos (useful outside Info).

  4. Generally,Usually it makes sense to use all lowercase, especially for names that a user will type (e.g., to M-x, as input). It's It's just easier that way. And in practice most names are in fact lowercase.

UseBut you can use whatever you want. Use whatever you feel is most convenient for your use cases. It is the particular context that should guide you.

If it is important for your use case to distinguish command Abc from command abc, go for it. This is Lisp. You can have command, variable, face,.. whatever names that start with digits, symbols (e.g. >), etc. - pretty much any chars you like.

If you want to keep things simple for most users who might type a name using a common keyboard, then you might want to stick with lowercase a to z plus digits and hyphen (-) instead of underscore (_), to obviate their needing to use the Shift key. But it's really up to you.

  1. There is no GNU Emacs convention wrt case for Emacs-Lisp function and variable names. (There can be any number of such "conventions" that anyone could come up with, of course.)

  2. The "Emacs Lisp Style Guide" that you reference is just one person's proposed guidelines.

  3. A (very) few longstanding libraries distributed with Emacs do use two styles that you mentioned: Some names are title-case (capitalized) and some are lowercase.

    In some cases, at least originally, a distinction was made between names of commands and customizable variables intended for users to type, and names of non-interactive functions and variables intended to be bound to keys or invoked from Lisp code. But this has not been adopted/respected generally, and it has not always been implemented consistently.

    For example, the commands in buff-menu.el that are expected to be invoked mainly by M-x are lowercase (for typing convenience), and the commands that are bound to keys in the buffer-list display are capitalized, as are other objects in the library (variables, non-interactive functions, etc.). Someone thought this was a great idea at one point, and it has remained in place in that library. But such libraries are a small minority.

  4. Generally, it makes sense to use all lowercase, especially for names that a user will type (e.g., to M-x, as input). It's just easier that way. And in practice most names are in fact lowercase.

Use whatever you want. Use whatever you feel is most convenient for your use cases.

If it is important for your use case to distinguish command Abc from command abc, go for it. This is Lisp. You can have command, variable, face,.. whatever names that start with digits, symbols (e.g. >), etc. - pretty much any chars you like.

If you want to keep things simple for most users who might type a name using a common keyboard, then you might want to stick with lowercase a to z plus digits and hyphen (-) instead of underscore (_), to obviate their needing to use the Shift key. But it's really up to you.

  1. There is no GNU Emacs convention wrt case for Emacs-Lisp function and variable names. (There can be any number of such "conventions" that anyone could come up with, of course.)

  2. The "Emacs Lisp Style Guide" that you reference is just one person's proposed guidelines.

  3. A (very) few longstanding libraries distributed with Emacs do use two styles that you mentioned: Some names are title-case (capitalized) and some are lowercase.

    In some cases a distinction was made between names of commands and customizable variables that it is expected might be typed by users (e.g., for M-x or C-h f), and names of non-interactive functions and variables that are expected to be invoked mainly by keys or from Lisp code.

    But this has not been adopted generally, and it has not always been implemented consistently. It typically applies to particular modes (e.g. Info-mode) where there are lots of commands that a user is not expected to input by name.

    For example, the commands in buff-menu.el that are expected to be invoked mainly by M-x are lowercase (for typing convenience), and the commands that are bound to keys in the buffer-list display are capitalized, as are other objects in the library (variables, non-interactive functions, etc.).

    Such libraries are a small minority (hence the doc says that usually function and variable names are lowercase). But the logic behind this design by RMS 30 years ago is still valid today. The idea is to simplify choices (and typing) for commands that you might invoke using M-x, by excluding commands that are useful only in a particular buffer and are bound to keys there. So Info-prev-reference (bound to C-M-i in Info), but info-apropos (useful outside Info).

  4. Usually it makes sense to use all lowercase, especially for names that a user will type (e.g., to M-x, as input). It's just easier that way. And in practice most names are in fact lowercase.

But you can use whatever you want. Use whatever you feel is most convenient for your use cases. It is the particular context that should guide you.

If it is important for your use case to distinguish command Abc from command abc, go for it. This is Lisp. You can have command, variable, face,.. whatever names that start with digits, symbols (e.g. >), etc. - pretty much any chars you like.

If you want to keep things simple for most users who might type a name using a common keyboard, then you might want to stick with lowercase a to z plus digits and hyphen (-) instead of underscore (_), to obviate their needing to use the Shift key. But it's really up to you.

added 662 characters in body
Source Link
Drew
  • 79.1k
  • 10
  • 123
  • 257
  1. There is no conventionGNU Emacs convention wrt case for Emacs-Lisp function and variable names. (There can be any number of such "conventions" that anyone could come up with, but there are none that are followed generallyof course.)

  2. The "Emacs Lisp Style Guide""Emacs Lisp Style Guide" that you reference is just one person's proposed guidelines.

  3. A (very) few longstanding libraries distributed with Emacs do use two styles that you mentioned: Some names are title-case (capitalized) and some are lowercase.

    In some cases, at least originally, a distinction was made between names of commands and customizable variables intended for users to type, and names of non-interactive functions and variables intended to be bound to keys or invoked from Lisp code. But this has not been adopted/respected generally, and it has not always been implemented consistently.

    For example, the commands in buff-menu.el that are expected to be invoked mainly by M-x are lowercase (for typing convenience), and the commands that are bound to keys in the buffer-list display are capitalized, as are other objects in the library (variables, non-interactive functions, etc.). Someone thought this was a great idea at one point, and it has remained in place in that library. But such libraries are a small minority.

  4. Generally, it makes sense to use all lowercase, especially for names that a user will type (e.g., to M-x, as input). It's just easier that way. And in practice most names are in fact lowercase.

Use whatever you want. Use whatever you feel is most convenient for your use cases.

If it is important for your use case to distinguish command Abc from command abc, go for it. This is Lisp. You can have command, variable, face,.. whatever names that start with digits, symbols (e.g. >), etc. - pretty much any chars you like.

If you want to keep things simple for most users who might type a name using a common keyboard, then you might want to stick with lowercase a to z plus digits and hyphen (-) instead of underscore (_), to obviate their needing to use the Shift key. But it's really up to you.

  1. There is no convention wrt case for Emacs-Lisp function and variable names. (There can be any number of such "conventions" that anyone could come up with, but there are none that are followed generally.)

  2. The "Emacs Lisp Style Guide" that you reference is just one person's proposed guidelines.

  3. A (very) few longstanding libraries distributed with Emacs do use two styles that you mentioned: Some names are title-case (capitalized) and some are lowercase.

    In some cases, at least originally, a distinction was made between names of commands and customizable variables intended for users to type, and names of non-interactive functions and variables intended to be bound to keys or invoked from Lisp code. But this has not been adopted/respected generally, and it has not always been implemented consistently.

    For example, the commands in buff-menu.el that are expected to be invoked mainly by M-x are lowercase (for typing convenience), and the commands that are bound to keys in the buffer-list display are capitalized, as are other objects in the library (variables, non-interactive functions, etc.). Someone thought this was a great idea at one point, and it has remained in place in that library. But such libraries are a small minority.

  4. Generally, it makes sense to use all lowercase, especially for names that a user will type (e.g., to M-x, as input). It's just easier that way. And in practice most names are in fact lowercase.

Use whatever you want. Use whatever you feel is most convenient for your use cases.

  1. There is no GNU Emacs convention wrt case for Emacs-Lisp function and variable names. (There can be any number of such "conventions" that anyone could come up with, of course.)

  2. The "Emacs Lisp Style Guide" that you reference is just one person's proposed guidelines.

  3. A (very) few longstanding libraries distributed with Emacs do use two styles that you mentioned: Some names are title-case (capitalized) and some are lowercase.

    In some cases, at least originally, a distinction was made between names of commands and customizable variables intended for users to type, and names of non-interactive functions and variables intended to be bound to keys or invoked from Lisp code. But this has not been adopted/respected generally, and it has not always been implemented consistently.

    For example, the commands in buff-menu.el that are expected to be invoked mainly by M-x are lowercase (for typing convenience), and the commands that are bound to keys in the buffer-list display are capitalized, as are other objects in the library (variables, non-interactive functions, etc.). Someone thought this was a great idea at one point, and it has remained in place in that library. But such libraries are a small minority.

  4. Generally, it makes sense to use all lowercase, especially for names that a user will type (e.g., to M-x, as input). It's just easier that way. And in practice most names are in fact lowercase.

Use whatever you want. Use whatever you feel is most convenient for your use cases.

If it is important for your use case to distinguish command Abc from command abc, go for it. This is Lisp. You can have command, variable, face,.. whatever names that start with digits, symbols (e.g. >), etc. - pretty much any chars you like.

If you want to keep things simple for most users who might type a name using a common keyboard, then you might want to stick with lowercase a to z plus digits and hyphen (-) instead of underscore (_), to obviate their needing to use the Shift key. But it's really up to you.

added 6 characters in body
Source Link
Drew
  • 79.1k
  • 10
  • 123
  • 257
  1. There is no convention wrt case for Emacs-Lisp function and variable names. (There can be any number of such "conventions" that anyone could come up with, but there are none that are followed generally.)

  2. The "Emacs Lisp Style Guide" that you reference is just one person's proposed guidelines.

  3. A (very) few longstanding libraries distributed with Emacs do use two styles that you mentioned: Some names are title-case (capitalized) and some are lowercase.

    In some cases, at least originally, a distinction was made between names of commands and customizable variables intended for users to type, and names of non-interactive functions and variables intended to be bound to keys or invoked from Lisp code. But this has not been adopted/respected generally, and it has not always been implemented consistently.

    For example, the commands in buff-menu.el that are expected to be invoked mainly by M-x are lowercase (for typing convenience), and the commands that are bound to keys in the buffer-list display are capitalized, as are other objects in the library (variables, non-interactive functions, etc.). Someone thought this was a great idea at one point, and it has remained in place in that library. But such libraries are a small minority.

  4. Generally, it makes sense to use all lowercase, especially for names that a user will type (e.g., to M-x, as input). It's just easier that way. And in practice most names are in fact lowercase.

Use whatever you want. Use whatever you feel is Use whatever you want. Use whatever you feel is mostmost convenient for your use cases..

  1. There is no convention wrt case for Emacs-Lisp function and variable names. (There can be any number of such "conventions" that anyone could come up with, but there are none that are followed generally.)

  2. The "Emacs Lisp Style Guide" that you reference is just one person's proposed guidelines.

  3. A (very) few longstanding libraries distributed with Emacs do use two styles that you mentioned: Some names are title-case (capitalized) and some are lowercase.

    In some cases, at least originally, a distinction was made between names of commands and customizable variables intended for users to type, and names of non-interactive functions and variables intended to be bound to keys or invoked from Lisp code. But this has not been adopted/respected generally, and it has not always been implemented consistently.

    For example, the commands in buff-menu.el that are expected to be invoked mainly by M-x are lowercase (for typing convenience), and the commands that are bound to keys in the buffer-list display are capitalized, as are other objects in the library (variables, non-interactive functions, etc.). Someone thought this was a great idea at one point, and it has remained in place in that library. But such libraries are a small minority.

  4. Generally, it makes sense to use all lowercase, especially for names that a user will type (e.g., to M-x, as input). It's just easier that way. And in practice most names are in fact lowercase.

Use whatever you want. Use whatever you feel is most convenient for your use cases.

  1. There is no convention wrt case for Emacs-Lisp function and variable names. (There can be any number of such "conventions" that anyone could come up with, but there are none that are followed generally.)

  2. The "Emacs Lisp Style Guide" that you reference is just one person's proposed guidelines.

  3. A (very) few longstanding libraries distributed with Emacs do use two styles that you mentioned: Some names are title-case (capitalized) and some are lowercase.

    In some cases, at least originally, a distinction was made between names of commands and customizable variables intended for users to type, and names of non-interactive functions and variables intended to be bound to keys or invoked from Lisp code. But this has not been adopted/respected generally, and it has not always been implemented consistently.

    For example, the commands in buff-menu.el that are expected to be invoked mainly by M-x are lowercase (for typing convenience), and the commands that are bound to keys in the buffer-list display are capitalized, as are other objects in the library (variables, non-interactive functions, etc.). Someone thought this was a great idea at one point, and it has remained in place in that library. But such libraries are a small minority.

  4. Generally, it makes sense to use all lowercase, especially for names that a user will type (e.g., to M-x, as input). It's just easier that way. And in practice most names are in fact lowercase.

Use whatever you want. Use whatever you feel is most convenient for your use cases.

added 532 characters in body
Source Link
Drew
  • 79.1k
  • 10
  • 123
  • 257
Loading
Source Link
Drew
  • 79.1k
  • 10
  • 123
  • 257
Loading